Development

Changeset 7400

You must first sign up to be able to contribute.

Changeset 7400

Show
Ignore:
Timestamp:
02/08/08 08:57:06 (10 months ago)
Author:
fabien
Message:

fixed CLI verbose switch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelBuildAllLoadTask.class.php

    r7247 r7400  
    5656  { 
    5757    $buildAll = new sfPropelBuildAllTask($this->dispatcher, $this->formatter); 
     58    $buildAll->setCommandApplication($this->commandApplication); 
    5859    $buildAll->run(); 
    5960 
    6061    $loadData = new sfPropelLoadDataTask($this->dispatcher, $this->formatter); 
     62    $loadData->setCommandApplication($this->commandApplication); 
    6163    $loadData->run(array('application' => $arguments['application'])); 
    6264  } 
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelBuildAllTask.class.php

    r7247 r7400  
    5353  { 
    5454    $buildModel = new sfPropelBuildModelTask($this->dispatcher, $this->formatter); 
     55    $buildModel->setCommandApplication($this->commandApplication); 
    5556    $buildModel->run(); 
    5657 
    5758    $buildSql = new sfPropelBuildSqlTask($this->dispatcher, $this->formatter); 
     59    $buildSql->setCommandApplication($this->commandApplication); 
    5860    $buildSql->run(); 
    5961 
    6062    $buildForms = new sfPropelBuildFormsTask($this->dispatcher, $this->formatter); 
     63    $buildForms->setCommandApplication($this->commandApplication); 
    6164    $buildForms->run(); 
    6265 
    6366    $insertSql = new sfPropelInsertSqlTask($this->dispatcher, $this->formatter); 
     67    $insertSql->setCommandApplication($this->commandApplication); 
    6468    $insertSql->run(); 
    6569  } 
  • branches/1.1/lib/task/generator/sfGenerateAppTask.class.php

    r7333 r7400  
    105105 
    106106    $fixPerms = new sfProjectPermissionsTask($this->dispatcher, $this->formatter); 
     107    $fixPerms->setCommandApplication($this->commandApplication); 
    107108    $fixPerms->run(); 
    108109 
  • branches/1.1/lib/task/generator/sfGenerateProjectTask.class.php

    r7322 r7400  
    8282 
    8383    $fixPerms = new sfProjectPermissionsTask($this->dispatcher, $this->formatter); 
     84    $fixPerms->setCommandApplication($this->commandApplication); 
    8485    $fixPerms->run(); 
    8586  } 
  • branches/1.1/lib/task/project/sfProjectEnableTask.class.php

    r7397 r7400  
    5858 
    5959    $clearCache = new sfCacheClearTask($this->dispatcher, $this->formatter); 
     60    $clearCache->setCommandApplication($this->commandApplication); 
    6061    $clearCache->run(); 
    6162 
  • branches/1.1/lib/task/project/sfUpgradeTo11Task.class.php

    r6931 r7400  
    4646    { 
    4747      $upgrader = new $class($this->dispatcher, $this->formatter); 
     48      $upgrader->setCommandApplication($this->commandApplication); 
    4849      $upgrader->upgrade(); 
    4950    } 
  • branches/1.1/lib/task/sfBaseTask.class.php

    r7308 r7400  
    4949        if (!isset($this->filesystem)) 
    5050        { 
    51           $this->filesystem = new sfFilesystem($this->dispatcher, $this->formatter); 
     51          if (is_null($this->commandApplication) || $this->commandApplication->isVerbose()) 
     52          { 
     53            $this->filesystem = new sfFilesystem($this->dispatcher, $this->formatter); 
     54          } 
     55          else 
     56          { 
     57            $this->filesystem = new sfFilesystem(); 
     58          } 
    5259        } 
    5360 
  • branches/1.1/lib/task/sfCommandApplicationTask.class.php

    r7308 r7400  
    2222    $commandApplication = null; 
    2323 
    24   public function setCommandApplication(sfCommandApplication $commandApplication
     24  public function setCommandApplication(sfCommandApplication $commandApplication = null
    2525  { 
    2626    $this->commandApplication = $commandApplication; 
    2727  } 
     28 
     29  /** 
     30   * @see sfTask 
     31   */ 
     32  protected function log($messages) 
     33  { 
     34    if (is_null($this->commandApplication) || $this->commandApplication->isVerbose()) 
     35    { 
     36      parent::log($messages); 
     37    } 
     38  } 
     39 
     40  /** 
     41   * @see sfTask 
     42   */ 
     43  protected function logSection($section, $message, $size = null) 
     44  { 
     45    if (is_null($this->commandApplication) || $this->commandApplication->isVerbose()) 
     46    { 
     47      parent::logSection($section, $message, $size); 
     48    } 
     49  } 
    2850}