From dd200ce5ff5c5039f6ccf95067164aac2388183f Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 24 Nov 2008 06:02:38 +0000 Subject: 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. --- core/libraries/Theme.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'core') 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; } } -- cgit v1.2.3