Skip to content

Commit

Permalink
Updating tasks to not rely on the dispatcher being available.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 24, 2010
1 parent c169de6 commit 0a022f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cake/console/shells/tasks/extract.php
Expand Up @@ -192,7 +192,10 @@ public function getOptionParser() {
return $parser->description(__('CakePHP Language String Extraction:'))
->addOption('app', array('help' => __('directory where your application is located.')))
->addOption('paths', array('help' => __('comma separted list of paths, full paths are needed.')))
->addOption('merge', array('help' => __('[yes|no] Merge all domain strings into the default.po file.')))
->addOption('merge', array(
'help' => __('[yes|no] Merge all domain strings into the default.po file.'),
'choices' => array('yes', 'no')
))
->addOption('output', array('help' => __('Full path to output directory.')))
->addOption('files', array('help' => __('comma separated list of files, full paths are needed.')));
}
Expand Down
4 changes: 2 additions & 2 deletions cake/console/shells/tasks/fixture.php
Expand Up @@ -54,8 +54,8 @@ class FixtureTask extends BakeTask {
* Override initialize
*
*/
public function __construct(&$dispatch, $stdout = null, $stderr = null, $stdin = null) {
parent::__construct($dispatch, $stdout, $stderr, $stdin);
public function __construct($stdout = null, $stderr = null, $stdin = null) {
parent::__construct($stdout, $stderr, $stdin);
$this->path = APP_PATH . 'tests' . DS . 'fixtures' . DS;
}

Expand Down
4 changes: 3 additions & 1 deletion cake/console/shells/tasks/template.php
Expand Up @@ -17,6 +17,8 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', 'Folder');

class TemplateTask extends Shell {

/**
Expand Down Expand Up @@ -179,7 +181,7 @@ public function getThemePath() {
}
$index = $this->in(__('Which bake theme would you like to use?'), range(1, $i - 1), 1);
$themeNames = array_keys($this->templatePaths);
$this->Dispatch->params['theme'] = $themeNames[$index - 1];
$this->params['theme'] = $themeNames[$index - 1];
return $indexedPaths[$index];
}

Expand Down

0 comments on commit 0a022f1

Please sign in to comment.