summaryrefslogtreecommitdiff
path: root/maintenance/purgeOldText.inc
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /maintenance/purgeOldText.inc
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'maintenance/purgeOldText.inc')
-rw-r--r--maintenance/purgeOldText.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/maintenance/purgeOldText.inc b/maintenance/purgeOldText.inc
index 111c786a..db961d81 100644
--- a/maintenance/purgeOldText.inc
+++ b/maintenance/purgeOldText.inc
@@ -34,42 +34,42 @@ function PurgeRedundantText( $delete = false ) {
$tbl_txt = $dbw->tableName( 'text' );
# Get "active" text records from the revisions table
- echo( "Searching for active text records in revisions table..." );
+ echo "Searching for active text records in revisions table...";
$res = $dbw->query( "SELECT DISTINCT rev_text_id FROM $tbl_rev" );
foreach ( $res as $row ) {
$cur[] = $row->rev_text_id;
}
- echo( "done.\n" );
+ echo "done.\n";
# Get "active" text records from the archive table
- echo( "Searching for active text records in archive table..." );
+ echo "Searching for active text records in archive table...";
$res = $dbw->query( "SELECT DISTINCT ar_text_id FROM $tbl_arc" );
$cur = array();
foreach ( $res as $row ) {
$cur[] = $row->ar_text_id;
}
- echo( "done.\n" );
+ echo "done.\n";
# Get the IDs of all text records not in these sets
- echo( "Searching for inactive text records..." );
+ echo "Searching for inactive text records...";
$set = implode( ', ', $cur );
$res = $dbw->query( "SELECT old_id FROM $tbl_txt WHERE old_id NOT IN ( $set )" );
$old = array();
foreach ( $res as $row ) {
$old[] = $row->old_id;
}
- echo( "done.\n" );
+ echo "done.\n";
# Inform the user of what we're going to do
$count = count( $old );
- echo( "$count inactive items found.\n" );
+ echo "$count inactive items found.\n";
# Delete as appropriate
if ( $delete && $count ) {
- echo( "Deleting..." );
+ echo "Deleting...";
$set = implode( ', ', $old );
$dbw->query( "DELETE FROM $tbl_txt WHERE old_id IN ( $set )" );
- echo( "done.\n" );
+ echo "done.\n";
}
# Done