public static function onTitleMoveComplete(&$title, &$nt, &$user, $pageid, $redirid) { # Update watchlists $oldnamespace = $title->getNamespace() & ~1; $newnamespace = $nt->getNamespace() & ~1; $oldtitle = $title->getDBkey(); $newtitle = $nt->getDBkey(); if ($oldnamespace != $newnamespace || $oldtitle != $newtitle) { FavoritedItem::duplicateEntries($title, $nt); } return true; }
/** * Check if the given title already is favorited by the user, and if so * add favorite on a new title. To be used for page renames and such. * * @param $ot Title: page title to duplicate entries from, if present * @param $nt Title: page title to add favorite on */ public static function duplicateEntries($ot, $nt) { FavoritedItem::doDuplicateEntries($ot->getSubjectPage(), $nt->getSubjectPage()); //FavoritedItem::doDuplicateEntries( $ot->getTalkPage(), $nt->getTalkPage() ); }