Skip to content
Permalink
Browse files

Revert "Adding bake skeleton's view directory to view paths list to a…

…void promlems with existing installation due to file moving done in earlier commit."

This reverts commit 5c792aa.
  • Loading branch information...
lorenzo committed Feb 20, 2012
1 parent ee54dae commit cec9d2e615a7c142188d940ddcc3196d95f04d2a
Showing with 10 additions and 12 deletions.
  1. +1 −2 lib/Cake/Core/App.php
  2. +1 −2 lib/Cake/Test/Case/Core/AppTest.php
  3. +0 −1 lib/Cake/Test/Case/View/ViewTest.php
  4. +8 −7 lib/Cake/View/View.php
@@ -838,8 +838,7 @@ protected static function _packageFormat() {
'%s' . 'Controller' . DS . 'Component' . DS . 'Acl' . DS
),
'View' => array(
'%s' . 'View' . DS,
CAKE . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'View' . DS
'%s' . 'View' . DS
),
'View/Helper' => array(
'%s' . 'View' . DS . 'Helper' . DS
@@ -156,8 +156,7 @@ public function testCompatibleBuild() {
App::build(array('views' => array('/path/to/views/')));
$expected = array(
'/path/to/views/',
APP . 'View' . DS,
CAKE . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'View' . DS
APP . 'View' . DS
);
$result = App::path('views');
$this->assertEquals($expected, $result);
@@ -403,7 +403,6 @@ public function testPluginPathGeneration() {
$expected = array(
CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Plugin' . DS . 'TestPlugin' . DS,
$pluginPath . 'View' . DS,
CAKE . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'View' . DS,
CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS,
CAKE . 'View' . DS
);
@@ -1096,14 +1096,15 @@ protected function _paths($plugin = null, $cached = true) {
$paths = array_unique(array_merge($paths, $viewPaths, array_keys($corePaths)));
if (!empty($this->theme)) {
$themePaths = array();
foreach ($paths as $path) {
if (strpos($path, DS . 'Plugin' . DS) === false
&& strpos($path, DS . 'Cake' . DS . 'View') === false) {
if ($plugin) {
$themePaths[] = $path . 'Themed'. DS . $this->theme . DS . 'Plugin' . DS . $plugin . DS;
$count = count($paths);
for ($i = 0; $i < $count; $i++) {
if (strpos($paths[$i], DS . 'Plugin' . DS) === false
&& strpos($paths[$i], DS . 'Cake' . DS . 'View') === false) {
if ($plugin) {
$themePaths[] = $paths[$i] . 'Themed'. DS . $this->theme . DS . 'Plugin' . DS . $plugin . DS;
}
$themePaths[] = $paths[$i] . 'Themed'. DS . $this->theme . DS;
}
$themePaths[] = $path . 'Themed'. DS . $this->theme . DS;
}
}
$paths = array_merge($themePaths, $paths);
}

0 comments on commit cec9d2e

Please sign in to comment.
You can’t perform that action at this time.