From a73e2ce8de3956e0dd430ecc34d0bae427ddcbfa Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Fri, 1 Jul 2011 14:28:30 +0000 Subject: [PATCH] * fix the error of load wrong hook files. --- framework/control.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/control.class.php b/framework/control.class.php index f2900ca190..ca3ef8e628 100755 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -270,7 +270,7 @@ class control /* The main view file, extension view file and hook file. */ $mainViewFile = $modulePath . 'view' . $this->pathFix . $methodName . '.' . $this->viewType . '.php'; $extViewFile = $viewExtPath . $methodName . ".{$this->viewType}.php"; - $extHookFiles = helper::ls($viewExtPath, '.hook.php'); + $extHookFiles = glob($viewExtPath . $methodName . "*.{$this->viewType}.hook.php"); $viewFile = file_exists($extViewFile) ? $extViewFile : $mainViewFile; if(!is_file($viewFile)) $this->app->error("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);