public static function onSaveRevisionComplete($oPage, $oRevision, $revision_id, $oUser, $allow = true) { wfProfileIn(__METHOD__); # producer if ($allow) { $oScribeProducer = new ScribeEventProducer('edit'); if (is_object($oScribeProducer)) { /** * Ugly fix! TODO * See the description above. */ $oTitle = $oPage->getTitle(); if ($oTitle->getNamespace() == NS_FILE) { self::$oPage = $oPage; self::$oUser = $oUser; self::$oRevision = $oRevision; } if ($oScribeProducer->buildEditPackage($oPage, $oUser, $oRevision, $revision_id)) { $oScribeProducer->sendLog(); } } } wfProfileOut(__METHOD__); return true; }
/** * Save the metadata to DB ( page_wikia_props ) * to prop name defined in self::article_prop_name */ public function save($propagateToSolr = false) { $this->setWikiaProp(self::ARTICLE_PROP_NAME, $this->articleId, $this->getMetadata()); if ($propagateToSolr) { $article = new Article($this->articleTitle); // push directly to article_metadata core $this->pushToSolr(F::app()->wg->CityId, $this->articleId, $this->getMetadata()); // push to main core via scribe ScribeEventProducerController::notifyPageHasChanged($article->getPage()); } }
public function triggerReindexing() { // FIXME: currently reindexing of only SpecialPromote data is impossible, some page must be indexed with it // so MainPage took the bullet, if in future search reindexing would be more selective, attempt to reindex only SpecialPromote data $article = new Article(Title::newMainPage()); ScribeEventProducerController::notifyPageHasChanged($article->getPage()); }