Skip to content

Commit

Permalink
remove some unneeded code of sfApplicationConfiguration creation (fix…
Browse files Browse the repository at this point in the history
…es #1954)
  • Loading branch information
upsilon authored and kawahara committed Mar 16, 2011
1 parent 667710a commit da236f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/task/opOpenSocialExecuteLifecycleEventTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected function configure()
$this->name = 'execute-lifecycle-event';

$this->addOption('application', null, sfCommandOption::PARAMETER_OPTIONAL, 'The application', true);
$this->addOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev');
$this->addOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'prod');
$this->addOption('consumer-key', null, sfCommandOption::PARAMETER_OPTIONAL, 'The consumer key for signing by OAuth', null);
$this->addOption('limit-request', null, sfCommandOption::PARAMETER_OPTIONAL, 'Limit of request', 0);
$this->addOption('limit-request-app', null, sfCommandOption::PARAMETER_OPTIONAL, 'Limit of request par an application', 0);
Expand All @@ -41,9 +41,7 @@ protected function configure()
protected function execute($arguments = array(), $options = array())
{
require_once realpath(dirname(__FILE__).'/../../../../lib/vendor/OAuth/OAuth.php');

new sfDatabaseManager($this->configuration);
sfContext::createInstance($this->createConfiguration('pc_frontend', 'prod'), 'pc_frontend');
sfContext::createInstance($this->configuration);

$consumerKey = (isset($options['consumer-key']) && $options['consumer-key']) ?
$options['consumer-key'] :
Expand Down

0 comments on commit da236f7

Please sign in to comment.