diff --git a/framework/helper.class.php b/framework/helper.class.php index 76ba1c4730..054ed9b7e5 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -157,7 +157,7 @@ class helper if(empty($extFiles)) return $mainModelFile; /* Else, judge whether needed update or not .*/ - $mergedModelFile = $app->getTmpRoot() . 'model' . $app->getPathFix() . $app->site->code . '.' . $moduleName . '.php'; + $mergedModelFile = $app->getTmpRoot() . 'model' . $app->getPathFix() . $moduleName . '.php'; $needUpdate = false; $lastTime = file_exists($mergedModelFile) ? filemtime($mergedModelFile) : 0; foreach($extFiles as $extFile) @@ -186,8 +186,8 @@ class helper foreach($extFiles as $extFile) { $extLines = trim(file_get_contents($extFile)); - $extLines = ltrim($extLines, ''); + if(strpos($extLines, '') !== false) $extLines = rtrim($extLines, '?>'); $modelLines .= $extLines . "\n"; } diff --git a/framework/router.class.php b/framework/router.class.php index 8cd842311b..0e63892bf3 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -304,6 +304,7 @@ class router $this->loadClass('front', $static = true); $this->loadClass('filter', $static = true); + $this->loadClass('dao', $static = true); } /**