Localization update for he.
[lhc/web/wiklou.git] / maintenance / updateDoubleWidthSearch.php
index 09eaf75..0efc6a1 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
-require_once( dirname(__FILE__) . '/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
 class UpdateDoubleWidthSearch extends Maintenance {
 
@@ -43,22 +44,22 @@ class UpdateDoubleWidthSearch extends Maintenance {
                $lockTime = time();
 
                $dbw = wfGetDB( DB_MASTER );
-               if( $dbw->getType() !== 'mysql' ) {
-                       $this->output( "This change is only needed on MySQL, quitting..." );
-                       exit(1);
+               if ( $dbw->getType() !== 'mysql' ) {
+                       $this->output( "This change is only needed on MySQL, quitting.\n" );
+                       exit( 1 );
                }
 
-               $res = $this->findRows($dbw);
-               $this->updateSearchIndex($maxLockTime, array($this, 'searchIndexUpdateCallback'), $dbw, $res);
+               $res = $this->findRows( $dbw );
+               $this->updateSearchIndex( $maxLockTime, array( $this, 'searchIndexUpdateCallback' ), $dbw, $res );
 
                $this->output( "Done\n" );
        }
 
-       public function searchIndexUpdateCallback($dbw, $row) {
+       public function searchIndexUpdateCallback( $dbw, $row ) {
                return $this->updateSearchIndexForPage( $dbw, $row->si_page );
        }
 
-       private function findRows($dbw) {
+       private function findRows( $dbw ) {
                $searchindex = $dbw->tableName( 'searchindex' );
                $regexp = '[[:<:]]u8efbd([89][1-9a]|8[b-f]|90)[[:>:]]';
                $sql = "SELECT si_page FROM $searchindex