Ticket #3420: propel-skip-forms.php.patch
| File propel-skip-forms.php.patch, 2.4 kB (added by Carl.Vondrick, 9 months ago) |
|---|
-
lib/task/sfPropelBuildAllLoadTask.class.php
old new 32 32 $this->addOptions(array( 33 33 new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'), 34 34 new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'propel'), 35 new sfCommandOption('skip-forms', 'F', sfCommandOption::PARAMETER_NONE, 'Skip generating forms') 35 36 )); 36 37 37 38 $this->aliases = array('propel-build-all-load'); … … 65 66 66 67 $buildAll = new sfPropelBuildAllTask($this->dispatcher, $this->formatter); 67 68 $buildAll->setCommandApplication($this->commandApplication); 68 $buildAll->run( );69 $buildAll->run(array(), $options['skip-forms'] ? array('--skip-forms') : array()); 69 70 70 71 $loadData = new sfPropelLoadDataTask($this->dispatcher, $this->formatter); 71 72 $loadData->setCommandApplication($this->commandApplication); -
lib/task/sfPropelBuildAllTask.class.php
old new 30 30 $this->name = 'build-all'; 31 31 $this->briefDescription = 'Generates Propel model, SQL and initializes the database'; 32 32 33 $this->addOptions(array( 34 new sfCommandOption('skip-forms', 'F', sfCommandOption::PARAMETER_NONE, 'Skip generating forms') 35 )); 36 33 37 $this->detailedDescription = <<<EOF 34 38 The [propel:build-all|INFO] task is a shortcut for three other tasks: 35 39 … … 59 63 $buildSql->setCommandApplication($this->commandApplication); 60 64 $buildSql->run(); 61 65 62 $buildForms = new sfPropelBuildFormsTask($this->dispatcher, $this->formatter); 63 $buildForms->setCommandApplication($this->commandApplication); 64 $buildForms->run(); 66 if (!$options['skip-forms']) 67 { 68 $buildForms = new sfPropelBuildFormsTask($this->dispatcher, $this->formatter); 69 $buildForms->setCommandApplication($this->commandApplication); 70 $buildForms->run(); 71 } 65 72 66 73 $insertSql = new sfPropelInsertSqlTask($this->dispatcher, $this->formatter); 67 74 $insertSql->setCommandApplication($this->commandApplication);