コード例 #1
0
 protected function execute($arguments = array(), $options = array())
 {
     // initialize the database connection
     $databaseManager = new sfDatabaseManager($this->configuration);
     $connection = $databaseManager->getDatabase($options['connection'] ? $options['connection'] : null)->getConnection();
     $deleted = PluginTagTable::purgeOrphans();
     $count = count($deleted);
     echo "deleted {$count} orphan tags.\n";
 }
コード例 #2
0
 /**
  * DOCUMENT ME
  * @param sfWebRequest $request
  */
 public function executeClean(sfWebRequest $request)
 {
     $deleted = PluginTagTable::purgeOrphans();
     $count = count($deleted);
     $this->getUser()->setFlash('notice', "{$count} unused tags removed.");
     $this->redirect('a_tag_admin');
 }