Skip to content

Commit

Permalink
Don't reference Configure variable path directly.
Browse files Browse the repository at this point in the history
If it changes in the future I want as few places to modify as possible.
Using App::path() also lets us change the implementation without having
to update the callers later if necessary.
  • Loading branch information
markstory committed Sep 11, 2013
1 parent bc01101 commit 02308d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/Task/PluginTask.php
Expand Up @@ -49,7 +49,7 @@ class PluginTask extends Shell {
* @return void
*/
public function initialize() {
$this->path = Configure::read('App.pluginPath');
$this->path = current(App::path('Plugin'));
$this->bootstrap = APP . 'Config/bootstrap.php';
}

Expand Down Expand Up @@ -96,7 +96,7 @@ protected function _interactive($plugin = null) {
* @return boolean
*/
public function bake($plugin) {
$pathOptions = (array)Configure::read('App.pluginPath');
$pathOptions = App::path('Plugin');
if (count($pathOptions) > 1) {
$this->findPath($pathOptions);
}
Expand Down
Expand Up @@ -53,7 +53,7 @@ public function setUp() {
$this->Task->bootstrap = TMP . 'tests/bootstrap.php';
touch($this->Task->bootstrap);

$this->_path = Configure::read('App.pluginPath');
$this->_path = App::path('Plugin');
}

/**
Expand Down

0 comments on commit 02308d7

Please sign in to comment.