function mvMoveHook(&$old_title, &$new_title, &$user, $pageid, $redirid) { global $mvgIP; //die; //confirm we are in the mvd Namespace & update the wiki_title if ($old_title->getNamespace() == MV_NS_MVD) { MV_Index::update_index_title($old_title->getDBkey(), $new_title->getDBkey()); } return true; // always return true, in order not to stop MW's hook processing! }
function mvMoveHook(&$old_title, &$new_title, &$user, $pageid, $redirid) { global $mvgIP, $wgOut; // die; // confirm we are in the mvd Namespace & update the wiki_title if ($old_title->getNamespace() == MV_NS_MVD) { MV_Index::update_index_title($old_title->getDBkey(), $new_title->getDBkey()); //remove the old MVD having lots of redirects around is not fun $oldArticle = new Article($old_title); $oldArticle->doDelete(wfMsg('mv_move_delete_msg', $new_title->getText()), false); //clear output @@todo (should really check for errors and integrate info into move) $wgOut->clearHTML(); } else { //make sure we call smwfMoveHook after and only if we don't delete if (function_exists('smwfMoveHook')) { smwfMoveHook($old_title, $new_title, $user, $pageid, $redirid); } } return true; // always return true, in order not to stop MW's hook processing! }