Permalink
Browse files

attempt at making --plugin param actually work.

  • Loading branch information...
1 parent 58de670 commit bb824288b4168ff585ebb88b59ea84cf326feb82 @tenebrousedge committed Nov 15, 2012
Showing with 12 additions and 11 deletions.
  1. +12 −11 lib/Cake/Console/Command/UpgradeShell.php
@@ -103,7 +103,7 @@ public function all() {
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($this->_pluginPath($this->params['plugin']) . 'tests' . DS);
}
$patterns = array(
array(
@@ -129,7 +129,7 @@ public function locations() {
$cwd = getcwd();
if (!empty($this->params['plugin'])) {
- chdir(App::pluginPath($this->params['plugin']));
+ chdir($this->_pluginPath($this->params['plugin']));
}
if (is_dir('plugins')) {
@@ -216,7 +216,7 @@ public function helpers() {
$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($this->_pluginPath($this->params['plugin']) . 'views' . DS);
}
$patterns = array();
@@ -230,7 +230,7 @@ public function helpers() {
CakePlugin::load($plugin);
$pluginHelpers = array_merge(
$pluginHelpers,
- App::objects('helper', App::pluginPath($plugin) . DS . 'views' . DS . 'helpers' . DS, false)
+ App::objects('helper', $this->_pluginPath($plugin) . DS . 'views' . DS . 'helpers' . DS, false)
);
}
$helpers = array_merge($pluginHelpers, $helpers);
@@ -261,7 +261,7 @@ public function i18n() {
APP
);
if (!empty($this->params['plugin'])) {
- $this->_paths = array(App::pluginPath($this->params['plugin']));
+ $this->_paths = array($this->_pluginPath($this->params['plugin']));
}
$patterns = array(
@@ -300,7 +300,7 @@ public function basics() {
APP
);
if (!empty($this->params['plugin'])) {
- $this->_paths = array(App::pluginPath($this->params['plugin']));
+ $this->_paths = array($this->_pluginPath($this->params['plugin']));
}
$patterns = array(
array(
@@ -355,7 +355,7 @@ public function request() {
$this->_paths = array_merge($views, $controllers, $components);
if (!empty($this->params['plugin'])) {
- $pluginPath = App::pluginPath($this->params['plugin']);
+ $pluginPath = $this->_pluginPath($this->params['plugin']);
$this->_paths = array(
$pluginPath . 'controllers' . DS,
$pluginPath . 'controllers' . DS . 'components' . DS,
@@ -407,7 +407,7 @@ public function configure() {
APP
);
if (!empty($this->params['plugin'])) {
- $this->_paths = array(App::pluginPath($this->params['plugin']));
+ $this->_paths = array($this->_pluginPath($this->params['plugin']));
}
$patterns = array(
array(
@@ -429,7 +429,7 @@ public function constants() {
APP
);
if (!empty($this->params['plugin'])) {
- $this->_paths = array(App::pluginPath($this->params['plugin']));
+ $this->_paths = array($this->_pluginPath($this->params['plugin']));
}
$patterns = array(
array(
@@ -511,7 +511,7 @@ public function constants() {
public function components() {
$this->_paths = App::Path('Controller/Component');
if (!empty($this->params['plugin'])) {
- $this->_paths = App::Path('Controller/Component', $this->params['plugin']);
+ $this->_paths = $this->_pluginPath($this->params['plugin']) . 'controllers' . DS . 'components' . DS;
}
$patterns = array(
array(
@@ -536,7 +536,7 @@ public function exceptions() {
$this->_paths = array_merge($controllers, $components);
if (!empty($this->params['plugin'])) {
- $pluginPath = App::pluginPath($this->params['plugin']);
+ $pluginPath = $this->_pluginPath($this->params['plugin']);
$this->_paths = array(
$pluginPath . 'controllers' . DS,
$pluginPath . 'controllers' . DS . 'components' . DS,
@@ -859,3 +859,4 @@ public function getOptionParser() {
}
}
+

0 comments on commit bb82428

Please sign in to comment.