[Mediawiki-l] Proposal to add new hook to MW core: TitleMove

Eric K ek79501 at yahoo.com
Mon Nov 13 23:14:01 UTC 2006


I introduced this new hook "TitleMove" in the MW core. I had no option while making the Edit Throttle code. This hook interrupts a Move - crucial for checking against vandals. I was surprised actually that this hook wasnt there already. I think it should be added. Its simple, basically a copy of the hook "ArticleSave"
   
   global $wgUser;
  $fname = 'Article::MoveArticle';
  wfProfileIn( $fname );
       if( !wfRunHooks( 'TitleMove', array( &$this, &$wgUser, &$nt, NULL ) ) ) {
   wfDebug( "$fname: TitleMove hook aborted move!\n" );
   wfProfileOut( $fname );
   return false;
  }
   
  (near to the top of "function MoveTo", in Title.php, to be added after:
    $pageid = $this->getArticleID();

 
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.


More information about the MediaWiki-l mailing list