<?php
/**
- * Rebuild link tracking tables from scratch. This takes several
- * hours, depending on the database size and server configuration.
+ * Rebuild recent changes from scratch. This takes several hours,
+ * depending on the database size and server configuration.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
+ * @file
* @ingroup Maintenance
* @todo Document
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+/**
+ * Maintenance script that rebuilds recent changes from scratch.
+ *
+ * @ingroup Maintenance
+ */
class RebuildRecentchanges extends Maintenance {
public function __construct() {
parent::__construct();
if ( $row ) {
$lastOldId = intval( $row->rev_id );
# Grab the last text size if available
- $lastSize = !is_null( $row->rev_len ) ? intval( $row->rev_len ) : 'NULL';
+ $lastSize = !is_null( $row->rev_len ) ? intval( $row->rev_len ) : null;
} else {
# No previous edit
$lastOldId = 0;
- $lastSize = 'NULL';
+ $lastSize = null;
$new = 1; // probably true
}
}
} else {
# Grab the entry's text size
$size = $dbw->selectField( 'revision', 'rev_len', array( 'rev_id' => $obj->rc_this_oldid ) );
- $size = !is_null( $size ) ? intval( $size ) : 'NULL';
$dbw->update( 'recentchanges',
array(