From 65ec52f1165e243809db1f89a59a169d76b11f92 Mon Sep 17 00:00:00 2001 From: evilbloodydemon Date: Sat, 11 Dec 2010 18:12:40 +0300 Subject: [PATCH] upgrade shell - added ability to upgrade app separately from plugins --- cake/console/shells/upgrade.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cake/console/shells/upgrade.php b/cake/console/shells/upgrade.php index 81d780049c7..6e63549c5f4 100644 --- a/cake/console/shells/upgrade.php +++ b/cake/console/shells/upgrade.php @@ -16,8 +16,14 @@ class UpgradeShell extends Shell { * @return void */ function i18n() { - if ($this->params['plugin']) { + if (!empty($this->params['plugin'])) { $this->_paths = array(App::pluginPath($this->params['plugin'])); + } else { + $this->_paths = array( + CONTROLLERS, + MODELS, + VIEWS + ); } $this->_findFiles(); foreach ($this->_files as $file) { @@ -26,7 +32,7 @@ function i18n() { } } - protected function _findFiles() { + protected function _findFiles($pattern = '') { foreach ($this->_paths as $path) { $Folder = new Folder($path); $files = $Folder->findRecursive('.*\.(php|ctp|thtml|inc|tpl)', true);