From 054a9dad0c97fa0ec7530ed4500e439ee7ec0c66 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 29 Jan 2015 16:09:38 +0800 Subject: [PATCH] * finish tsak #2199. --- framework/router.class.php | 47 ++++---------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index cfda80830b..7fd0d2019e 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -57,14 +57,6 @@ class router */ private $appRoot; - /** - * The root directory of the app library($this->appRoot/lib). - * - * @var string - * @access private - */ - private $appLibRoot; - /** * The root directory of temp. * @@ -293,7 +285,6 @@ class router $this->setFrameRoot(); $this->setCoreLibRoot(); $this->setAppRoot($appName, $appRoot); - $this->setAppLibRoot(); $this->setTmpRoot(); $this->setCacheRoot(); $this->setLogRoot(); @@ -411,17 +402,6 @@ class router if(!is_dir($this->appRoot)) $this->triggerError("The app you call not found in {$this->appRoot}", __FILE__, __LINE__, $exit = true); } - /** - * Set the app lib root. - * - * @access protected - * @return void - */ - protected function setAppLibRoot() - { - $this->appLibRoot = $this->appRoot . 'lib' . $this->pathFix; - } - /** * Set the tmp root. * @@ -592,17 +572,6 @@ class router { return $this->appRoot; } - - /** - * Get the $appLibRoot var - * - * @access public - * @return string - */ - public function getAppLibRoot() - { - return $this->appLibRoot; - } /** * Get the $tmpRoot var @@ -1305,7 +1274,7 @@ class router /** * Load a class file. * - * First search in $appLibRoot, then $coreLibRoot. + * Search in $coreLibRoot. * * @param string $className the class name * @param bool $static statis class or not @@ -1316,19 +1285,11 @@ class router { $className = strtolower($className); - /* Search in $appLibRoot. */ - $classFile = $this->appLibRoot . $className; + /* Search in $coreLibRoot. */ + $classFile = $this->coreLibRoot . $className; if(is_dir($classFile)) $classFile .= $this->pathFix . $className; $classFile .= '.class.php'; - - if(!helper::import($classFile)) - { - /* Search in $coreLibRoot. */ - $classFile = $this->coreLibRoot . $className; - if(is_dir($classFile)) $classFile .= $this->pathFix . $className; - $classFile .= '.class.php'; - if(!helper::import($classFile)) $this->triggerError("class file $classFile not found", __FILE__, __LINE__, $exit = true); - } + if(!helper::import($classFile)) $this->triggerError("class file $classFile not found", __FILE__, __LINE__, $exit = true); /* If staitc, return. */ if($static) return true;