|
|
@@ -18,6 +18,7 @@
|
|
|
|
|
|
App::uses('AppShell', 'Console/Command');
|
|
|
App::uses('Folder', 'Utility');
|
|
|
+App::uses('CakePlugin', 'Core');
|
|
|
|
|
|
/**
|
|
|
* A shell class to help developers upgrade applications to CakePHP 2.0
|
|
|
@@ -102,7 +103,7 @@ class UpgradeShell extends AppShell {
|
|
|
public function tests() {
|
|
|
$this->_paths = array(APP . 'tests' . DS);
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $this->_paths = array(App::pluginPath($this->params['plugin']) . 'tests' . DS);
|
|
|
+ $this->_paths = array(CakePlugin::path($this->params['plugin']) . 'tests' . DS);
|
|
|
}
|
|
|
$patterns = array(
|
|
|
array(
|
|
|
@@ -128,7 +129,7 @@ class UpgradeShell extends AppShell {
|
|
|
$cwd = getcwd();
|
|
|
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- chdir(App::pluginPath($this->params['plugin']));
|
|
|
+ chdir(CakePlugin::path($this->params['plugin']));
|
|
|
}
|
|
|
|
|
|
if (is_dir('plugins')) {
|
|
|
@@ -215,7 +216,7 @@ class UpgradeShell extends AppShell {
|
|
|
$this->_paths = array_diff(App::path('views'), App::core('views'));
|
|
|
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $this->_paths = array(App::pluginPath($this->params['plugin']) . 'views' . DS);
|
|
|
+ $this->_paths = array(CakePlugin::path($this->params['plugin']) . 'views' . DS);
|
|
|
}
|
|
|
|
|
|
$patterns = array();
|
|
|
@@ -229,7 +230,7 @@ class UpgradeShell extends AppShell {
|
|
|
CakePlugin::load($plugin);
|
|
|
$pluginHelpers = array_merge(
|
|
|
$pluginHelpers,
|
|
|
- App::objects('helper', App::pluginPath($plugin) . DS . 'views' . DS . 'helpers' . DS, false)
|
|
|
+ App::objects('helper', CakePlugin::path($plugin) . DS . 'views' . DS . 'helpers' . DS, false)
|
|
|
);
|
|
|
}
|
|
|
$helpers = array_merge($pluginHelpers, $helpers);
|
|
|
@@ -260,7 +261,7 @@ class UpgradeShell extends AppShell {
|
|
|
APP
|
|
|
);
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $this->_paths = array(App::pluginPath($this->params['plugin']));
|
|
|
+ $this->_paths = array(CakePlugin::path($this->params['plugin']));
|
|
|
}
|
|
|
|
|
|
$patterns = array(
|
|
|
@@ -299,7 +300,7 @@ class UpgradeShell extends AppShell {
|
|
|
APP
|
|
|
);
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $this->_paths = array(App::pluginPath($this->params['plugin']));
|
|
|
+ $this->_paths = array(CakePlugin::path($this->params['plugin']));
|
|
|
}
|
|
|
$patterns = array(
|
|
|
array(
|
|
|
@@ -354,7 +355,7 @@ class UpgradeShell extends AppShell {
|
|
|
$this->_paths = array_merge($views, $controllers, $components);
|
|
|
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $pluginPath = App::pluginPath($this->params['plugin']);
|
|
|
+ $pluginPath = CakePlugin::path($this->params['plugin']);
|
|
|
$this->_paths = array(
|
|
|
$pluginPath . 'controllers' . DS,
|
|
|
$pluginPath . 'controllers' . DS . 'components' . DS,
|
|
|
@@ -411,7 +412,7 @@ class UpgradeShell extends AppShell {
|
|
|
APP
|
|
|
);
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $this->_paths = array(App::pluginPath($this->params['plugin']));
|
|
|
+ $this->_paths = array(CakePlugin::path($this->params['plugin']));
|
|
|
}
|
|
|
$patterns = array(
|
|
|
array(
|
|
|
@@ -433,7 +434,7 @@ class UpgradeShell extends AppShell {
|
|
|
APP
|
|
|
);
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $this->_paths = array(App::pluginPath($this->params['plugin']));
|
|
|
+ $this->_paths = array(CakePlugin::path($this->params['plugin']));
|
|
|
}
|
|
|
$patterns = array(
|
|
|
array(
|
|
|
@@ -564,7 +565,7 @@ class UpgradeShell extends AppShell {
|
|
|
$this->_paths = array_merge($controllers, $components);
|
|
|
|
|
|
if (!empty($this->params['plugin'])) {
|
|
|
- $pluginPath = App::pluginPath($this->params['plugin']);
|
|
|
+ $pluginPath = CakePlugin::path($this->params['plugin']);
|
|
|
$this->_paths = array(
|
|
|
$pluginPath . 'controllers' . DS,
|
|
|
$pluginPath . 'controllers' . DS . 'components' . DS,
|