r56938 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56937‎ | r56938 | r56939 >
Date:08:05, 26 September 2009
Author:ialex
Status:ok
Tags:
Comment:
change $fname to __METHOD__ in Title::moveOverExistingRedirect() and Title::moveToNewTitle()
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2856,7 +2856,7 @@
28572857 */
28582858 private function moveOverExistingRedirect( &$nt, $reason = '', $createRedirect = true ) {
28592859 global $wgUseSquid, $wgUser;
2860 - $fname = 'Title::moveOverExistingRedirect';
 2860+
28612861 $comment = wfMsgForContent( '1movedto2_redir', $this->getPrefixedText(), $nt->getPrefixedText() );
28622862
28632863 if ( $reason ) {
@@ -2878,7 +2878,7 @@
28792879 # by definition if we've got here it's rather uninteresting.
28802880 # We have to remove it so that the next step doesn't trigger
28812881 # a conflict on the unique namespace+title index...
2882 - $dbw->delete( 'page', array( 'page_id' => $newid ), $fname );
 2882+ $dbw->delete( 'page', array( 'page_id' => $newid ), __METHOD__ );
28832883 if ( !$dbw->cascadingDeletes() ) {
28842884 $dbw->delete( 'revision', array( 'rev_page' => $newid ), __METHOD__ );
28852885 global $wgUseTrackbacks;
@@ -2914,7 +2914,7 @@
29152915 'page_latest' => $nullRevId,
29162916 ),
29172917 /* WHERE */ array( 'page_id' => $oldid ),
2918 - $fname
 2918+ __METHOD__
29192919 );
29202920 $nt->resetArticleID( $oldid );
29212921
@@ -2935,13 +2935,13 @@
29362936
29372937 # Now, we record the link from the redirect to the new title.
29382938 # It should have no other outgoing links...
2939 - $dbw->delete( 'pagelinks', array( 'pl_from' => $newid ), $fname );
 2939+ $dbw->delete( 'pagelinks', array( 'pl_from' => $newid ), __METHOD__ );
29402940 $dbw->insert( 'pagelinks',
29412941 array(
29422942 'pl_from' => $newid,
29432943 'pl_namespace' => $nt->getNamespace(),
29442944 'pl_title' => $nt->getDBkey() ),
2945 - $fname );
 2945+ __METHOD__ );
29462946 $redirectSuppressed = false;
29472947 } else {
29482948 $this->resetArticleID( 0 );
@@ -2970,7 +2970,7 @@
29712971 */
29722972 private function moveToNewTitle( &$nt, $reason = '', $createRedirect = true ) {
29732973 global $wgUseSquid, $wgUser;
2974 - $fname = 'MovePageForm::moveToNewTitle';
 2974+
29752975 $comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() );
29762976 if ( $reason ) {
29772977 $comment .= wfMsgExt( 'colon-separator',
@@ -3004,7 +3004,7 @@
30053005 'page_latest' => $nullRevId,
30063006 ),
30073007 /* WHERE */ array( 'page_id' => $oldid ),
3008 - $fname
 3008+ __METHOD__
30093009 );
30103010 $nt->resetArticleID( $oldid );
30113011
@@ -3029,7 +3029,7 @@
30303030 'pl_from' => $newid,
30313031 'pl_namespace' => $nt->getNamespace(),
30323032 'pl_title' => $nt->getDBkey() ),
3033 - $fname );
 3033+ __METHOD__ );
30343034 $redirectSuppressed = false;
30353035 } else {
30363036 $this->resetArticleID( 0 );

Status & tagging log