From 607dfac4284f9ea948678a3c59019f74348e4e0d Mon Sep 17 00:00:00 2001 From: nate Date: Fri, 27 Oct 2006 21:41:34 +0000 Subject: [PATCH] Enabling auto-load for AppHelper git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3751 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/basics.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cake/basics.php b/cake/basics.php index 29fcfa2ba..aa3bd15cd 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -264,13 +264,20 @@ */ function loadHelper($name) { $paths = Configure::getInstance(); + if (!class_exists('AppHelper')) { + if (file_exists(APP . 'app_helper.php')) { + require(APP . 'app_helper.php'); + } else { + require(CAKE . 'app_helper.php'); + } + } if ($name === null) { return true; } if (!class_exists($name . 'Helper')) { - $name=Inflector::underscore($name); + $name = Inflector::underscore($name); foreach($paths->helperPaths as $path) { if (file_exists($path . $name . '.php')) {