Skip to content

Commit

Permalink
upgrade shell - added ability to upgrade app separately from plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
evilbloodydemon authored and AD7six committed May 1, 2011
1 parent 0b42761 commit 65ec52f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cake/console/shells/upgrade.php
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 65ec52f

Please sign in to comment.