r77970 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77969‎ | r77970 | r77971 >
Date:10:51, 7 December 2010
Author:ialex
Status:ok
Tags:
Comment:
$fname -> __METHOD__
Modified paths:
  • /trunk/phase3/includes/search/SearchUpdate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/search/SearchUpdate.php
@@ -39,23 +39,23 @@
4040 if( $wgDisableSearchUpdate || !$this->mId ) {
4141 return false;
4242 }
43 - $fname = 'SearchUpdate::doUpdate';
44 - wfProfileIn( $fname );
4543
 44+ wfProfileIn( __METHOD__ );
 45+
4646 $search = SearchEngine::create();
4747 $lc = SearchEngine::legalSearchChars() . '&#;';
4848
4949 if( $this->mText === false ) {
5050 $search->updateTitle($this->mId,
5151 $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) );
52 - wfProfileOut( $fname );
 52+ wfProfileOut( __METHOD__ );
5353 return;
5454 }
5555
5656 # Language-specific strip/conversion
5757 $text = $wgContLang->normalizeForSearch( $this->mText );
5858
59 - wfProfileIn( $fname.'-regexps' );
 59+ wfProfileIn( __METHOD__ . '-regexps' );
6060 $text = preg_replace( "/<\\/?\\s*[A-Za-z][^>]*?>/",
6161 ' ', $wgContLang->lc( " " . $text . " " ) ); # Strip HTML markup
6262 $text = preg_replace( "/(^|\\n)==\\s*([^\\n]+)\\s*==(\\s)/sD",
@@ -102,7 +102,7 @@
103103
104104 # Strip wiki '' and '''
105105 $text = preg_replace( "/''[']*/", " ", $text );
106 - wfProfileOut( "$fname-regexps" );
 106+ wfProfileOut( __METHOD__ . '-regexps' );
107107
108108 wfRunHooks( 'SearchUpdate', array( $this->mId, $this->mNamespace, $this->mTitle, &$text ) );
109109
@@ -110,7 +110,7 @@
111111 $search->update($this->mId, $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ),
112112 $search->normalizeText( $text ) );
113113
114 - wfProfileOut( $fname );
 114+ wfProfileOut( __METHOD__ );
115115 }
116116 }
117117

Status & tagging log