/** * Propagate edited data * Sets xml property and calls the abstract function propagateEditData() * @param string $text contains new text * @param Article $article * @return bool true if propagate succeeded */ public function propagateEdit(&$text, &$article) { global $wgArticle, $wgUser, $wrBotUserID, $wgParser; $result = true; // we don't propagate fixup edits after move, undelete, and revert (do propagate bot edits) if (PropagationManager::isPropagationEnabled()) { // && $wgUser->getID() != $wrBotUserID) { $this->xml = StructuredData::getXml($this->tagName, $text); // get the old text $oldText = $article->getContent(); $textChanged = false; $result = $this->propagateEditData($oldText, $text, $textChanged); } return $result; }
public static function enablePropagation($enabled) { PropagationManager::$isPropagationEnabled = $enabled; }