Revert "Adding bake skeleton's view directory to view paths list to avoid promlems with existing installation due to file moving done in earlier commit."

This reverts commit 5c792aa831.
This commit is contained in:
Jose Lorenzo Rodriguez 2012-02-20 15:21:03 -04:30
parent ee54daef35
commit cec9d2e615
4 changed files with 10 additions and 12 deletions

View file

@ -838,8 +838,7 @@ class App {
'%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

View file

@ -156,8 +156,7 @@ class AppTest extends CakeTestCase {
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);

View file

@ -403,7 +403,6 @@ class ViewTest extends CakeTestCase {
$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
);

View file

@ -1096,14 +1096,15 @@ class View extends Object {
$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);
}