X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Forphans.php;h=7e27107a44db45f4e008aa9187a075bdffdd9523;hb=3e51aeea1ca1554f033955b463c0e51f0889a47b;hp=044003e735e447a63e4c906ec3bd4ea96a327ffc;hpb=79ebb4b0288b709fb53cff8f7ebc5f50221931c9;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/orphans.php b/maintenance/orphans.php index 044003e735..7e27107a44 100644 --- a/maintenance/orphans.php +++ b/maintenance/orphans.php @@ -40,9 +40,9 @@ class Orphans extends Maintenance { public function __construct() { parent::__construct(); $this->mDescription = "Look for 'orphan' revisions hooked to pages which don't exist\n" . - "and 'childless' pages with no revisions\n" . - "Then, kill the poor widows and orphans\n" . - "Man this is depressing"; + "and 'childless' pages with no revisions\n" . + "Then, kill the poor widows and orphans\n" . + "Man this is depressing"; $this->addOption( 'fix', 'Actually fix broken entries' ); } @@ -79,7 +79,8 @@ class Orphans extends Maintenance { $this->lockTables( $dbw ); } - $this->output( "Checking for orphan revision table entries... (this may take a while on a large wiki)\n" ); + $this->output( "Checking for orphan revision table entries... " + . "(this may take a while on a large wiki)\n" ); $result = $dbw->query( " SELECT * FROM $revision LEFT OUTER JOIN $page ON rev_page=page_id @@ -88,8 +89,13 @@ class Orphans extends Maintenance { $orphans = $result->numRows(); if ( $orphans > 0 ) { global $wgContLang; + $this->output( "$orphans orphan revisions...\n" ); - $this->output( sprintf( "%10s %10s %14s %20s %s\n", 'rev_id', 'rev_page', 'rev_timestamp', 'rev_user_text', 'rev_comment' ) ); + $this->output( sprintf( + "%10s %10s %14s %20s %s\n", + 'rev_id', 'rev_page', 'rev_timestamp', 'rev_user_text', 'rev_comment' + ) ); + foreach ( $result as $row ) { $comment = ( $row->rev_comment == '' ) ? '' @@ -131,7 +137,8 @@ class Orphans extends Maintenance { $this->lockTables( $dbw ); } - $this->output( "\nChecking for childless page table entries... (this may take a while on a large wiki)\n" ); + $this->output( "\nChecking for childless page table entries... " + . "(this may take a while on a large wiki)\n" ); $result = $dbw->query( " SELECT * FROM $page LEFT OUTER JOIN $revision ON page_latest=rev_id @@ -176,7 +183,8 @@ class Orphans extends Maintenance { $this->lockTables( $dbw, array( 'user', 'text' ) ); } - $this->output( "\nChecking for pages whose page_latest links are incorrect... (this may take a while on a large wiki)\n" ); + $this->output( "\nChecking for pages whose page_latest links are incorrect... " + . "(this may take a while on a large wiki)\n" ); $result = $dbw->query( " SELECT * FROM $page LEFT OUTER JOIN $revision ON page_latest=rev_id