Index: trunk/phase3/includes/search/SearchUpdate.php |
— | — | @@ -39,23 +39,23 @@ |
40 | 40 | if( $wgDisableSearchUpdate || !$this->mId ) { |
41 | 41 | return false; |
42 | 42 | } |
43 | | - $fname = 'SearchUpdate::doUpdate'; |
44 | | - wfProfileIn( $fname ); |
45 | 43 | |
| 44 | + wfProfileIn( __METHOD__ ); |
| 45 | + |
46 | 46 | $search = SearchEngine::create(); |
47 | 47 | $lc = SearchEngine::legalSearchChars() . '&#;'; |
48 | 48 | |
49 | 49 | if( $this->mText === false ) { |
50 | 50 | $search->updateTitle($this->mId, |
51 | 51 | $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) ); |
52 | | - wfProfileOut( $fname ); |
| 52 | + wfProfileOut( __METHOD__ ); |
53 | 53 | return; |
54 | 54 | } |
55 | 55 | |
56 | 56 | # Language-specific strip/conversion |
57 | 57 | $text = $wgContLang->normalizeForSearch( $this->mText ); |
58 | 58 | |
59 | | - wfProfileIn( $fname.'-regexps' ); |
| 59 | + wfProfileIn( __METHOD__ . '-regexps' ); |
60 | 60 | $text = preg_replace( "/<\\/?\\s*[A-Za-z][^>]*?>/", |
61 | 61 | ' ', $wgContLang->lc( " " . $text . " " ) ); # Strip HTML markup |
62 | 62 | $text = preg_replace( "/(^|\\n)==\\s*([^\\n]+)\\s*==(\\s)/sD", |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | |
104 | 104 | # Strip wiki '' and ''' |
105 | 105 | $text = preg_replace( "/''[']*/", " ", $text ); |
106 | | - wfProfileOut( "$fname-regexps" ); |
| 106 | + wfProfileOut( __METHOD__ . '-regexps' ); |
107 | 107 | |
108 | 108 | wfRunHooks( 'SearchUpdate', array( $this->mId, $this->mNamespace, $this->mTitle, &$text ) ); |
109 | 109 | |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | $search->update($this->mId, $search->normalizeText( Title::indexTitle( $this->mNamespace, $this->mTitle ) ), |
112 | 112 | $search->normalizeText( $text ) ); |
113 | 113 | |
114 | | - wfProfileOut( $fname ); |
| 114 | + wfProfileOut( __METHOD__ ); |
115 | 115 | } |
116 | 116 | } |
117 | 117 | |