Skip to content

Commit

Permalink
Moving core view to the new folder and allowing the view class to fin…
Browse files Browse the repository at this point in the history
…d those views
  • Loading branch information
lorenzo committed Dec 5, 2010
1 parent 0596f5a commit c542ac2
Show file tree
Hide file tree
Showing 37 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Core/App.php
Expand Up @@ -330,7 +330,7 @@ public static function core($type = null) {
static $paths = false;
if (!$paths) {
$paths = array();
$libs = dirname(__FILE__) . DS;
$libs = LIBS;
$cake = dirname($libs) . DS;
$path = dirname($cake) . DS;

Expand All @@ -341,7 +341,7 @@ public static function core($type = null) {
$paths['behaviors'][] = $libs . 'model' . DS . 'behaviors' . DS;
$paths['controllers'][] = $libs . 'controller' . DS;
$paths['components'][] = $libs . 'controller' . DS . 'components' . DS;
$paths['views'][] = $libs . 'view' . DS;
$paths['views'][] = $libs . 'View' . DS;
$paths['helpers'][] = $libs . 'view' . DS . 'helpers' . DS;
$paths['plugins'][] = $path . 'plugins' . DS;
$paths['vendors'][] = $path . 'vendors' . DS;
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Utility/ClassRegistry.php
Expand Up @@ -140,11 +140,11 @@ public static function &init($class, $type = null) {
if (class_exists($class)) {
${$class} = new $class($settings);
} elseif ($type === 'Model') {
//if ($plugin && class_exists($plugin . 'AppModel')) {
// $appModel = $plugin . 'AppModel';
//} else {
if ($plugin && class_exists($plugin . 'AppModel')) {
$appModel = $plugin . 'AppModel';
} else {
$appModel = 'AppModel';
//}
}
$settings['name'] = $class;
${$class} = new $appModel($settings);
}
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion lib/Cake/View/View.php
Expand Up @@ -811,7 +811,8 @@ protected function _paths($plugin = null, $cached = true) {
}
$paths[] = App::pluginPath($plugin) . 'views' . DS;
}
$this->__paths = array_merge($paths, $viewPaths);

$this->__paths = array_merge($paths, $viewPaths, array_flip($corePaths));
return $this->__paths;
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c542ac2

Please sign in to comment.