r64600 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64599‎ | r64600 | r64601 >
Date:18:33, 4 April 2010
Author:ialex
Status:ok
Tags:
Comment:
$fname -> __METHOD__/__FUNCTION__
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Export.php
@@ -152,15 +152,14 @@
153153 # Not called by default (depends on $this->list_authors)
154154 # Can be set by Special:Export when not exporting whole history
155155 protected function do_list_authors( $page , $revision , $cond ) {
156 - $fname = "do_list_authors" ;
157 - wfProfileIn( $fname );
 156+ wfProfileIn( __METHOD__ );
158157 $this->author_list = "<contributors>";
159158 //rev_deleted
160159 $nothidden = '('.$this->db->bitAnd('rev_deleted', Revision::DELETED_USER) . ') = 0';
161160
162161 $sql = "SELECT DISTINCT rev_user_text,rev_user FROM {$page},{$revision}
163162 WHERE page_id=rev_page AND $nothidden AND " . $cond ;
164 - $result = $this->db->query( $sql, $fname );
 163+ $result = $this->db->query( $sql, __METHOD__ );
165164 $resultset = $this->db->resultObject( $result );
166165 while( $row = $resultset->fetchObject() ) {
167166 $this->author_list .= "<contributor>" .
@@ -172,7 +171,7 @@
173172 "</id>" .
174173 "</contributor>";
175174 }
176 - wfProfileOut( $fname );
 175+ wfProfileOut( __METHOD__ );
177176 $this->author_list .= "</contributors>";
178177 }
179178
@@ -477,8 +476,7 @@
478477 * @access private
479478 */
480479 function writeRevision( $row ) {
481 - $fname = 'WikiExporter::dumpRev';
482 - wfProfileIn( $fname );
 480+ wfProfileIn( __METHOD__ );
483481
484482 $out = " <revision>\n";
485483 $out .= " " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n";
@@ -520,7 +518,7 @@
521519
522520 $out .= " </revision>\n";
523521
524 - wfProfileOut( $fname );
 522+ wfProfileOut( __METHOD__ );
525523 return $out;
526524 }
527525
@@ -533,8 +531,7 @@
534532 * @access private
535533 */
536534 function writeLogItem( $row ) {
537 - $fname = 'WikiExporter::writeLogItem';
538 - wfProfileIn( $fname );
 535+ wfProfileIn( __METHOD__ );
539536
540537 $out = " <logitem>\n";
541538 $out .= " " . Xml::element( 'id', null, strval( $row->log_id ) ) . "\n";
@@ -568,7 +565,7 @@
569566
570567 $out .= " </logitem>\n";
571568
572 - wfProfileOut( $fname );
 569+ wfProfileOut( __METHOD__ );
573570 return $out;
574571 }
575572
@@ -919,8 +916,7 @@
920917 }
921918
922919 function xmlsafe( $string ) {
923 - $fname = 'xmlsafe';
924 - wfProfileIn( $fname );
 920+ wfProfileIn( __FUNCTION__ );
925921
926922 /**
927923 * The page may contain old data which has not been properly normalized.
@@ -930,6 +926,6 @@
931927 $string = UtfNormal::cleanUp( $string );
932928
933929 $string = htmlspecialchars( $string );
934 - wfProfileOut( $fname );
 930+ wfProfileOut( __FUNCTION__ );
935931 return $string;
936932 }

Status & tagging log