diff --git a/cake/libs/configure.php b/cake/libs/configure.php index d77a8e987..4c220fdab 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -403,10 +403,14 @@ class Configure extends Object { } Cache::config('default'); } - App::build(compact( - 'models', 'views', 'controllers', 'helpers', 'components', - 'behaviors', 'plugins', 'vendors', 'locales', 'shells' - )); + if (App::path('controllers') == array()) { + App::build(array( + 'models' => $modelPaths, 'views' => $viewPaths, 'controllers' => $controllerPaths, + 'helpers' => $helperPaths, 'components' => $componentPaths, 'behaviors' => $behaviorPaths, + 'plugins' => $pluginPaths, 'vendors' => $vendorPaths, 'locales' => $localePaths, + 'shells' => $shellPaths + )); + } } } /** @@ -1135,19 +1139,6 @@ class App extends Object { if ($paths = App::path($type .'s')) { return $paths; } - - switch ($type) { - case 'plugin': - return array(APP . 'plugins' . DS); - case 'vendor': - return array(APP . 'vendors' . DS, VENDORS, APP . 'plugins' . DS); - case 'controller': - return array(APP . 'controllers' . DS, APP); - case 'model': - return array(APP . 'models' . DS, APP); - case 'view': - return array(APP . 'views' . DS); - } } /** * Removes file location from map if the file has been deleted. diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index dc6e1357d..41bf616c9 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -130,13 +130,15 @@ class Debugger extends Object { define('E_DEPRECATED', 8192); } - $e = ''; + $e .= '{:error} ({:code}): {:description} '; $e .= '[{:path}, line {:line}]'; $e .= '
'; + $e .= ''; $this->_templates['js']['error'] = $e; $t = ' '; - $e = '{:error} ({:code}) : {:description} '; + $e = '{:error} ({:code}) : {:description} '; $e .= '[{:path}, line {:line}]'; $this->_templates['html']['error'] = $e; @@ -425,7 +427,7 @@ class Debugger extends Object { } elseif (strpos($path, ROOT) === 0) { return str_replace(ROOT, 'ROOT', $path); } - $corePaths = App::core('cake'); + $corePaths = Configure::corePaths('cake'); foreach ($corePaths as $corePath) { if (strpos($path, $corePath) === 0) { return str_replace($corePath, 'CORE' .DS . 'cake' .DS, $path); diff --git a/cake/tests/cases/libs/debugger.test.php b/cake/tests/cases/libs/debugger.test.php index 555ec2b34..9286b4667 100644 --- a/cake/tests/cases/libs/debugger.test.php +++ b/cake/tests/cases/libs/debugger.test.php @@ -93,8 +93,8 @@ class DebuggerTest extends CakeTestCase { $this->assertTrue(is_array($result)); $this->assertEqual(count($result), 4); - $expected = '<?php'; - $expected .= '
'; + $expected = '<?php'; + $expected .= '
'; $this->assertEqual($result[0], $expected); $return = Debugger::excerpt('[internal]', 2, 2); @@ -141,15 +141,16 @@ class DebuggerTest extends CakeTestCase { $buzz .= ''; $result = explode('', ob_get_clean()); $this->assertTags($result[0], array( + 'pre' => array('class' => 'cake-debug'), 'a' => array( 'href' => "javascript:void(0);", 'onclick' => "document.getElementById('cakeErr4-trace').style.display = " . "(document.getElementById('cakeErr4-trace').style.display == 'none'" . " ? '' : 'none');" ), - 'b' => array(), 'Notice', '/b', ' (8)' + 'b' => array(), 'Notice', '/b', ' (8)', )); - + $this->assertPattern('/Undefined variable: buzz/', $result[1]); $this->assertPattern('/]+>Code/', $result[1]); $this->assertPattern('/]+>Context/', $result[2]);