summaryrefslogtreecommitdiff
path: root/maintenance/updateSearchIndex.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/updateSearchIndex.php')
-rw-r--r--maintenance/updateSearchIndex.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php
index 2a71e7ed..ac784847 100644
--- a/maintenance/updateSearchIndex.php
+++ b/maintenance/updateSearchIndex.php
@@ -96,9 +96,9 @@ class UpdateSearchIndex extends Maintenance {
$end = $dbw->timestamp( $end );
$page = $dbw->tableName( 'page' );
- $sql = "SELECT rc_cur_id,rc_type,rc_moved_to_ns,rc_moved_to_title FROM $recentchanges
+ $sql = "SELECT rc_cur_id FROM $recentchanges
JOIN $page ON rc_cur_id=page_id AND rc_this_oldid=page_latest
- WHERE rc_timestamp BETWEEN '$start' AND '$end'
+ WHERE rc_type != " . RC_LOG . " AND rc_timestamp BETWEEN '$start' AND '$end'
";
$res = $dbw->query( $sql, __METHOD__ );
@@ -108,17 +108,7 @@ class UpdateSearchIndex extends Maintenance {
}
public function searchIndexUpdateCallback( $dbw, $row ) {
- if ( $row->rc_type == RC_MOVE || $row->rc_type == RC_MOVE_OVER_REDIRECT ) {
- # Rename searchindex entry
- $titleObj = Title::makeTitle( $row->rc_moved_to_ns, $row->rc_moved_to_title );
- $title = $titleObj->getPrefixedDBkey();
- $this->output( "$title..." );
- $u = new SearchUpdate( $row->rc_cur_id, $title, false );
- $u->doUpdate();
- $this->output( "\n" );
- } elseif ( $row->rc_type !== RC_LOG ) {
- $this->updateSearchIndexForPage( $dbw, $row->rc_cur_id );
- }
+ $this->updateSearchIndexForPage( $dbw, $row->rc_cur_id );
}
}