コード例 #1
0
 public function afterTopicImported(TopicImportState $state, IImportTopic $topic)
 {
     if (!$topic instanceof ImportTopic) {
         return;
     }
     $this->doRedirect($topic->getTitle(), $state->topicWorkflow->getId());
     foreach ($this->redirectsToDo as $args) {
         call_user_func_array(array($this, 'doRedirect'), $args);
     }
     $this->redirectsToDo = array();
 }
コード例 #2
0
 public function afterTopicImported(TopicImportState $state, IImportTopic $topic)
 {
     if (!$this->newPosts) {
         return;
     }
     $logEntry = new ManualLogEntry('import', $topic->getLogType());
     $logEntry->setTarget($state->topicWorkflow->getOwnerTitle());
     $logEntry->setPerformer($this->user);
     $logEntry->setParameters(array('topic' => $state->topicWorkflow->getArticleTitle()->getPrefixedText()) + $topic->getLogParameters());
     $logEntry->insert();
     $this->newPosts = false;
 }
コード例 #3
0
 public function afterTopicImported(TopicImportState $state, IImportTopic $topic)
 {
     if (!$topic instanceof LqtImportTopic) {
         return;
     }
     if ($this->postsImported === false) {
         // nothing was imported in this topic
         return;
     }
     $this->postsImported = false;
     $this->controller->notifyPostChange('flow-post-reply', array('revision' => $state->topicTitle, 'topic-title' => $state->topicTitle, 'topic-workflow' => $state->topicWorkflow, 'title' => $state->topicWorkflow->getOwnerTitle(), 'reply-to' => $state->topicTitle, 'extra-data' => array('lqtThreadId' => $topic->getLqtThreadId(), 'notifyAgent' => true), 'timestamp' => $topic->getTimestamp()));
 }
コード例 #4
0
 /**
  * @param TopicImportState $topicState
  * @param IImportTopic    $importTopic
  */
 public function importTopic(TopicImportState $topicState, IImportTopic $importTopic)
 {
     $summary = $importTopic->getTopicSummary();
     if ($summary) {
         $this->importSummary($topicState, $summary);
     }
     foreach ($importTopic->getReplies() as $post) {
         $this->importPost($topicState, $post, $topicState->topicTitle);
     }
     $topicState->commitLastModified();
 }