RunIndexer() public static method

fn OnArticleDelete
public static RunIndexer ( $p_timeLimit = null, $p_articlesLimit = null, $p_lastModifiedFirst = true )
Esempio n. 1
0
 /**
  * @see Console\Command\Command
  */
 protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
 {
     $res = \ArticleIndex::RunIndexer($input->getOption('time-limit'));
     if ($input->getOption('verbose')) {
         $output->writeln($res['articles'] . ' out of ' . $res['total articles'] . ' articles were indexed with a total of ' . $res['words'] . ' words.');
         $output->writeln('Total index time was ' . sprintf("%.3f", $res['total time'] . ' seconds.'));
         $output->writeln('Average article index time was ' . sprintf("%.3f", $res['article time']) . ' seconds.');
     }
 }
Esempio n. 2
0
                    camp_html_goto_page($backLink);
                } else {
                    $tmpArticle->move($f_destination_publication_id, $f_destination_issue_number, $f_destination_section_number);
                    $tmpArticle->setWorkflowStatus('S');
                    \Zend_Registry::get('container')->getService('dispatcher')->dispatch('article.submit', new \Newscoop\EventDispatcher\Events\GenericEvent($this, array('article' => $tmpArticle)));
                    $tmpArticles[] = $tmpArticle;
                }
            }
        }
        $tmpArticle = camp_array_peek($tmpArticles);
        if ($f_mode == "single") {
            $url = camp_html_article_url($tmpArticle, $tmpArticle->getLanguageId(), "edit.php");
        } else {
            $url = $destArticleIndexUrl;
        }
        ArticleIndex::RunIndexer(3, 10, true);
        camp_html_goto_page($url);
    }
}
// END perform the action
$title = "";
if (count($doAction) > 1) {
    if ($f_action == "duplicate") {
        $title = $translator->trans("Duplicate articles", array(), 'articles');
    } elseif ($f_action == "move") {
        $title = $translator->trans("Move articles", array(), 'articles');
    } elseif ($f_action == "publish") {
        $title = $translator->trans("Publish articles", array(), 'articles');
    } elseif ($f_action == "submit") {
        $title = $translator->trans("Submit articles", array(), 'articles');
    }