Index: trunk/extensions/MWSearch/MWSearch.php |
— | — | @@ -76,6 +76,7 @@ |
77 | 77 | |
78 | 78 | function efLucenePrefixSetup() { |
79 | 79 | global $wgHooks, $wgLuceneSearchVersion, $wgEnableLucenePrefixSearch; |
80 | | - if($wgLuceneSearchVersion >= 2.1 && $wgEnableLucenePrefixSearch) |
| 80 | + if( $wgLuceneSearchVersion >= 2.1 && $wgEnableLucenePrefixSearch ) { |
81 | 81 | $wgHooks['PrefixSearchBackend'][] = 'LuceneSearch::prefixSearch'; |
| 82 | + } |
82 | 83 | } |
Index: trunk/extensions/MWSearch/MWSearchUpdateHook.php |
— | — | @@ -11,18 +11,42 @@ |
12 | 12 | $wgHooks['TitleMoveComplete' ][] = 'mwSearchUpdateMove'; |
13 | 13 | } |
14 | 14 | |
| 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 | + */ |
15 | 25 | function mwSearchUpdateSave( $article, $user, $text, $summary, $isminor, $iswatch, $section ) { |
16 | 26 | global $wgDBname; |
17 | 27 | MWSearchUpdater::updatePage( $wgDBname, $article->getTitle(), $text ); |
18 | 28 | return true; |
19 | 29 | } |
20 | 30 | |
| 31 | +/** |
| 32 | + * @param $article Article |
| 33 | + * @param $user |
| 34 | + * @param $reason |
| 35 | + * @return bool |
| 36 | + */ |
21 | 37 | function mwSearchUpdateDelete( $article, $user, $reason ) { |
22 | 38 | global $wgDBname; |
23 | 39 | MWSearchUpdater::deletePage( $wgDBname, $article->getTitle() ); |
24 | 40 | return true; |
25 | 41 | } |
26 | 42 | |
| 43 | +/** |
| 44 | + * @param $from |
| 45 | + * @param $to Title |
| 46 | + * @param $user |
| 47 | + * @param $pageid |
| 48 | + * @param $redirid |
| 49 | + * @return bool |
| 50 | + */ |
27 | 51 | function mwSearchUpdateMove( $from, $to, $user, $pageid, $redirid ) { |
28 | 52 | global $wgDBname; |
29 | 53 | |
Index: trunk/extensions/MWSearch/MWSearchUpdater.php |
— | — | @@ -136,7 +136,7 @@ |
137 | 137 | array( |
138 | 138 | 'Namespace' => new XML_RPC_Value( $param->getNamespace(), 'int' ), |
139 | 139 | 'Text' => new XML_RPC_Value( $param->getText(), 'string' ) ), |
140 | | - 'struct' ); |
| 140 | + 'struct' ); |
141 | 141 | } elseif( is_string( $param ) ) { |
142 | 142 | return new XML_RPC_Value( $param, 'string' ); |
143 | 143 | } elseif( is_array( $param ) ) { |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | * @access private |
160 | 160 | * @static |
161 | 161 | */ |
162 | | - static function sendRPC( $method, $params=array() ) { |
| 162 | + static function sendRPC( $method, $params = array() ) { |
163 | 163 | global $mwSearchUpdateHost, $mwSearchUpdatePort, $mwSearchUpdateDebug; |
164 | 164 | $client = new XML_RPC_Client( '/SearchUpdater', $mwSearchUpdateHost, $mwSearchUpdatePort ); |
165 | 165 | if( $mwSearchUpdateDebug ) { |