r82154 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82153‎ | r82154 | r82155 >
Date:00:03, 15 February 2011
Author:reedy
Status:ok
Tags:
Comment:
Few bits of style tweaks, some documentation
Modified paths:
  • /trunk/extensions/MWSearch/MWSearch.php (modified) (history)
  • /trunk/extensions/MWSearch/MWSearchUpdateHook.php (modified) (history)
  • /trunk/extensions/MWSearch/MWSearchUpdater.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MWSearch/MWSearch.php
@@ -76,6 +76,7 @@
7777
7878 function efLucenePrefixSetup() {
7979 global $wgHooks, $wgLuceneSearchVersion, $wgEnableLucenePrefixSearch;
80 - if($wgLuceneSearchVersion >= 2.1 && $wgEnableLucenePrefixSearch)
 80+ if( $wgLuceneSearchVersion >= 2.1 && $wgEnableLucenePrefixSearch ) {
8181 $wgHooks['PrefixSearchBackend'][] = 'LuceneSearch::prefixSearch';
 82+ }
8283 }
Index: trunk/extensions/MWSearch/MWSearchUpdateHook.php
@@ -11,18 +11,42 @@
1212 $wgHooks['TitleMoveComplete' ][] = 'mwSearchUpdateMove';
1313 }
1414
 15+/**
 16+ * @param $article Article
 17+ * @param $user
 18+ * @param $text
 19+ * @param $summary
 20+ * @param $isminor
 21+ * @param $iswatch
 22+ * @param $section
 23+ * @return bool
 24+ */
1525 function mwSearchUpdateSave( $article, $user, $text, $summary, $isminor, $iswatch, $section ) {
1626 global $wgDBname;
1727 MWSearchUpdater::updatePage( $wgDBname, $article->getTitle(), $text );
1828 return true;
1929 }
2030
 31+/**
 32+ * @param $article Article
 33+ * @param $user
 34+ * @param $reason
 35+ * @return bool
 36+ */
2137 function mwSearchUpdateDelete( $article, $user, $reason ) {
2238 global $wgDBname;
2339 MWSearchUpdater::deletePage( $wgDBname, $article->getTitle() );
2440 return true;
2541 }
2642
 43+/**
 44+ * @param $from
 45+ * @param $to Title
 46+ * @param $user
 47+ * @param $pageid
 48+ * @param $redirid
 49+ * @return bool
 50+ */
2751 function mwSearchUpdateMove( $from, $to, $user, $pageid, $redirid ) {
2852 global $wgDBname;
2953
Index: trunk/extensions/MWSearch/MWSearchUpdater.php
@@ -136,7 +136,7 @@
137137 array(
138138 'Namespace' => new XML_RPC_Value( $param->getNamespace(), 'int' ),
139139 'Text' => new XML_RPC_Value( $param->getText(), 'string' ) ),
140 - 'struct' );
 140+ 'struct' );
141141 } elseif( is_string( $param ) ) {
142142 return new XML_RPC_Value( $param, 'string' );
143143 } elseif( is_array( $param ) ) {
@@ -158,7 +158,7 @@
159159 * @access private
160160 * @static
161161 */
162 - static function sendRPC( $method, $params=array() ) {
 162+ static function sendRPC( $method, $params = array() ) {
163163 global $mwSearchUpdateHost, $mwSearchUpdatePort, $mwSearchUpdateDebug;
164164 $client = new XML_RPC_Client( '/SearchUpdater', $mwSearchUpdateHost, $mwSearchUpdatePort );
165165 if( $mwSearchUpdateDebug ) {

Status & tagging log