diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-24 06:02:38 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-24 06:02:38 +0000 |
commit | dd200ce5ff5c5039f6ccf95067164aac2388183f (patch) | |
tree | e6af339717e8a7083a7e5df3e400ca4ba29fb016 | |
parent | 8b52d9cde47953fb70587c6d404ec681fff71bee (diff) |
Don't bother trying to check if the class file exists, just use method_exists, which will use the php auto loader to find the class.
-rw-r--r-- | core/libraries/Theme.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php index d5af41b4..df657ad1 100644 --- a/core/libraries/Theme.php +++ b/core/libraries/Theme.php @@ -82,13 +82,8 @@ class Theme_Core { case "photo_bottom": if (empty($this->block_helpers[$function])) { foreach (module::get_list() as $module) { - if ($module->name == "core") { - $helper_path = APPPATH . "helpers/{$module->name}_block.php"; - } else { - $helper_path = MODPATH . "$module->name/helpers/{$module->name}_block.php"; - } $helper_class = "{$module->name}_block"; - if (file_exists($helper_path) && method_exists($helper_class, $function)) { + if (method_exists($helper_class, $function)) { $this->block_helpers[$function][] = $helper_class; } } |