r75681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75680‎ | r75681 | r75682 >
Date:21:59, 29 October 2010
Author:reedy
Status:ok
Tags:
Comment:
Make all functions static. Used as static, and commented as such, but not actually static :/
Modified paths:
  • /trunk/extensions/MWSearch/MWSearchUpdater.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MWSearch/MWSearchUpdater.php
@@ -19,7 +19,7 @@
2020 * @return bool
2121 * @static
2222 */
23 - function updatePage( $dbname, $title, $text ) {
 23+ static function updatePage( $dbname, $title, $text ) {
2424 return MWSearchUpdater::sendRPC( 'searchupdater.updatePage',
2525 array( $dbname, $title, $text ) );
2626 }
@@ -35,7 +35,7 @@
3636 * @return bool
3737 * @static
3838 */
39 - function updatePageData( $dbname, $title, $text, $metadata ) {
 39+ static function updatePageData( $dbname, $title, $text, $metadata ) {
4040 $translated = array();
4141 foreach( $metadata as $pair ) {
4242 list( $key, $value ) = explode( '=', $pair, 2 );
@@ -53,7 +53,7 @@
5454 * @return bool
5555 * @static
5656 */
57 - function deletePage( $dbname, $title ) {
 57+ static function deletePage( $dbname, $title ) {
5858 return MWSearchUpdater::sendRPC( 'searchupdater.deletePage',
5959 array( $dbname, $title ) );
6060 }
@@ -63,7 +63,7 @@
6464 * @return string
6565 * @static
6666 */
67 - function getStatus() {
 67+ static function getStatus() {
6868 return MWSearchUpdater::sendRPC( 'searchupdater.getStatus' );
6969 }
7070
@@ -72,7 +72,7 @@
7373 * @return bool
7474 * @static
7575 */
76 - function start() {
 76+ static function start() {
7777 return MWSearchUpdater::sendRPC( 'searchupdater.start' );
7878 }
7979
@@ -81,7 +81,7 @@
8282 * @return bool
8383 * @static
8484 */
85 - function stop() {
 85+ static function stop() {
8686 return MWSearchUpdater::sendRPC( 'searchupdater.stop' );
8787 }
8888
@@ -90,7 +90,7 @@
9191 * @return bool
9292 * @static
9393 */
94 - function quit() {
 94+ static function quit() {
9595 return MWSearchUpdater::sendRPC( 'searchupdater.quit' );
9696 }
9797
@@ -100,7 +100,7 @@
101101 * @return bool
102102 * @static
103103 */
104 - function flushAll() {
 104+ static function flushAll() {
105105 return MWSearchUpdater::sendRPC( 'searchupdater.flushAll' );
106106 }
107107
@@ -111,7 +111,7 @@
112112 * @return bool
113113 * @static
114114 */
115 - function optimize() {
 115+ static function optimize() {
116116 return MWSearchUpdater::sendRPC( 'searchupdater.optimize' );
117117 }
118118
@@ -121,7 +121,7 @@
122122 * @return bool
123123 * @static
124124 */
125 - function flush( $dbname ) {
 125+ static function flush( $dbname ) {
126126 return MWSearchUpdater::sendRPC( 'searchupdater.flush',
127127 array( $dbname ) );
128128 }
@@ -130,7 +130,7 @@
131131 * @access private
132132 * @static
133133 */
134 - function outParam( $param ) {
 134+ static function outParam( $param ) {
135135 if( $param instanceof Title ) {
136136 return new XML_RPC_Value(
137137 array(
@@ -158,7 +158,7 @@
159159 * @access private
160160 * @static
161161 */
162 - 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