Author: jablko
Date: Tue Aug 25 18:17:55 2009
New Revision: 3074
Log:
Update xfPopulateTask with changes to symfony 1.2
Modified:
trunk/plugins/sfSearchPlugin/lib/task/xfBaseTask.class.php
trunk/plugins/sfSearchPlugin/lib/task/xfPopulateTask.class.php
Modified: trunk/plugins/sfSearchPlugin/lib/task/xfBaseTask.class.php
==============================================================================
--- trunk/plugins/sfSearchPlugin/lib/task/xfBaseTask.class.php Tue Aug 25
16:03:46 2009 (r3073)
+++ trunk/plugins/sfSearchPlugin/lib/task/xfBaseTask.class.php Tue Aug 25
18:17:55 2009 (r3074)
@@ -17,32 +17,6 @@
abstract class xfBaseTask extends sfBaseTask
{
/**
- * Flag for when autoloader is already setup (true if setup)
- *
- * @var bool
- */
- static private $done = false;
-
- /**
- * @see sfTask
- */
- protected function doRun(sfCommandManager $commandManager, $options)
- {
- if (!self::$done)
- {
- $auto = sfSimpleAutoload::getInstance();
- $auto->addDirectory(sfConfig::get('sf_lib_dir'));
- $auto->addDirectory(sfConfig::get('sf_root_dir') . '/lib');
- $auto->addDirectory(sfConfig::get('sf_plugins_dir') . '/*/lib');
- $auto->register();
-
- self::$done = true;
- }
-
- return parent::doRun($commandManager, $options);
- }
-
- /**
* Checks to see if index exists.
*
* @param string $index The index name
Modified: trunk/plugins/sfSearchPlugin/lib/task/xfPopulateTask.class.php
==============================================================================
--- trunk/plugins/sfSearchPlugin/lib/task/xfPopulateTask.class.php Tue Aug
25 16:03:46 2009 (r3073)
+++ trunk/plugins/sfSearchPlugin/lib/task/xfPopulateTask.class.php Tue Aug
25 18:17:55 2009 (r3074)
@@ -7,8 +7,6 @@
* file that was distributed with this source code.
*/
-require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'xfBaseTask.class.php';
-
/**
* A task to populate a index.
*
@@ -23,11 +21,12 @@
*/
protected function configure()
{
- $this->addArguments(array(new sfCommandArgument('index',
sfCommandArgument::REQUIRED, 'The index name to populate')));
+ $this->addArguments(array(
+ new sfCommandArgument('index', sfCommandArgument::REQUIRED, 'The index
name to populate')));
$this->addOptions(array(
- new sfCommandOption('optimize', 'o', sfCommandOption::PARAMETER_NONE,
'If passed, the index is optimized after population'),
- ));
+ new sfCommandOption('application', null,
sfCommandOption::PARAMETER_OPTIONAL, 'The application name', true),
+ new sfCommandOption('optimize', 'o', sfCommandOption::PARAMETER_NONE,
'If passed, the index is optimized after population')));
$this->namespace = 'search';
$this->name = 'populate';
@@ -57,9 +56,7 @@
$this->checkIndexExists($index);
- // this is a hack and will be hopefully removed
- // see
http://groups.google.com/group/symfony-devs/browse_thread/thread/dc399312da49598a
- $db = new sfDatabaseManager(new xfSearchConfiguration('cli', false,
$this->configuration->getRootDir(), $this->dispatcher));
+ new sfDatabaseManager($this->configuration);
$index = new $index;
$index->setLogger(new xfLoggerTask($this->dispatcher, $this->formatter));
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---