mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-22 04:26:15 +00:00
upgrade shell - added ability to upgrade app separately from plugins
This commit is contained in:
parent
1d87411537
commit
92f92ac051
1 changed files with 8 additions and 2 deletions
|
@ -16,8 +16,14 @@ class UpgradeShell extends Shell {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function i18n() {
|
function i18n() {
|
||||||
if ($this->params['plugin']) {
|
if (!empty($this->params['plugin'])) {
|
||||||
$this->_paths = array(App::pluginPath($this->params['plugin']));
|
$this->_paths = array(App::pluginPath($this->params['plugin']));
|
||||||
|
} else {
|
||||||
|
$this->_paths = array(
|
||||||
|
CONTROLLERS,
|
||||||
|
MODELS,
|
||||||
|
VIEWS
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$this->_findFiles();
|
$this->_findFiles();
|
||||||
foreach ($this->_files as $file) {
|
foreach ($this->_files as $file) {
|
||||||
|
@ -26,7 +32,7 @@ class UpgradeShell extends Shell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _findFiles() {
|
protected function _findFiles($pattern = '') {
|
||||||
foreach ($this->_paths as $path) {
|
foreach ($this->_paths as $path) {
|
||||||
$Folder = new Folder($path);
|
$Folder = new Folder($path);
|
||||||
$files = $Folder->findRecursive('.*\.(php|ctp|thtml|inc|tpl)', true);
|
$files = $Folder->findRecursive('.*\.(php|ctp|thtml|inc|tpl)', true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue