public static function titleMoveComplete(&$title, &$nt, &$wgUser, &$pageid, &$redirid) { $oldtitletext = $title->getText(); $oldns = $title->getNamespace(); $newtitletext = $nt->getText(); $newns = $nt->getNamespace(); wfDebug('HIPP: ' . __METHOD__ . "\n"); if ($oldns != 0 && $newns != 0) { return true; } # TODO we can't always check if we're moving a redirect because the old article's content # TODO has already been replaced with the redirect to the new title but a # TODO new title's content is still "noarticletext" at this point! #$a1 = new Article( $title ); #$a2 = new Article( $nt ); #wfDebug( "HIPP: getContent() for isRedirect()\n\tfrom <<<" . $a1->getContent() . ">>>\n\t to <<<" . $a2->getContent() . ">>>\n" ); #if ($a1->isRedirect( $a->getContent() )) { # wfDebug( "HIPP: moving a redirect (?)\n" ); # return true; #} if ($oldns == 0 && $newns == 0) { DidYouMean::doUpdate($pageid, $newtitletext); } elseif ($oldns == 0) { DidYouMean::doDelete($pageid); } elseif ($newns == 0) { DidYouMean::doInsert($pageid, $newtitletext); } return true; }