X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2FupdateSearchIndex.php;h=0691bee811238ee0e19eabf5048beabd82eea22f;hb=4d4471ec88b0a013d6eeea3027b976a7f09fc13f;hp=ac784847852b70547344356af9fa3c06188f234c;hpb=02203696305f2879c9be1d6a03ad1c61dd7af46b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php index ac78484785..0691bee811 100644 --- a/maintenance/updateSearchIndex.php +++ b/maintenance/updateSearchIndex.php @@ -28,7 +28,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script for periodic off-peak updating of the search index. @@ -60,7 +60,7 @@ class UpdateSearchIndex extends Maintenance { # We can safely delete the file when we're done though. $start = file_get_contents( 'searchUpdate.pos' ); unlink( 'searchUpdate.pos' ); - } elseif( is_readable( $posFile ) ) { + } elseif ( is_readable( $posFile ) ) { $start = file_get_contents( $posFile ); } else { $start = wfTimestamp( TS_MW, time() - 86400 ); @@ -97,9 +97,8 @@ class UpdateSearchIndex extends Maintenance { $page = $dbw->tableName( 'page' ); $sql = "SELECT rc_cur_id FROM $recentchanges - JOIN $page ON rc_cur_id=page_id AND rc_this_oldid=page_latest - WHERE rc_type != " . RC_LOG . " AND rc_timestamp BETWEEN '$start' AND '$end' - "; + JOIN $page ON rc_cur_id=page_id AND rc_this_oldid=page_latest + WHERE rc_type != " . RC_LOG . " AND rc_timestamp BETWEEN '$start' AND '$end'"; $res = $dbw->query( $sql, __METHOD__ ); $this->updateSearchIndex( $maxLockTime, array( $this, 'searchIndexUpdateCallback' ), $dbw, $res ); @@ -113,4 +112,4 @@ class UpdateSearchIndex extends Maintenance { } $maintClass = "UpdateSearchIndex"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;