mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
Enabling auto-load for AppHelper
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3751 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
de52eb88c9
commit
607dfac428
1 changed files with 8 additions and 1 deletions
|
@ -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')) {
|
||||
|
|
Loading…
Add table
Reference in a new issue