X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateRevisionLength.php;h=b73ac7f270da219b956756f6398a7a16f10ae023;hb=b3f9120af5fc883b38d5e7b55368ff61c2bbdd09;hp=042790fc7601c67f32c75535aa4368221c56ae6f;hpb=8d7c0346307d94c679109a41e1a93fa93c921edf;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php index 042790fc76..b73ac7f270 100644 --- a/maintenance/populateRevisionLength.php +++ b/maintenance/populateRevisionLength.php @@ -49,6 +49,7 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { $this->error( "archive table does not exist", true ); } elseif ( !$db->fieldExists( 'revision', 'rev_len', __METHOD__ ) ) { $this->output( "rev_len column does not exist\n\n", true ); + return false; } @@ -58,7 +59,9 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { $this->output( "Populating ar_len column\n" ); $ar = $this->doLenUpdates( 'archive', 'ar_id', 'ar', Revision::selectArchiveFields() ); - $this->output( "rev_len and ar_len population complete [$rev revision rows, $ar archive rows].\n" ); + $this->output( "rev_len and ar_len population complete " + . "[$rev revision rows, $ar archive rows].\n" ); + return true; } @@ -75,6 +78,7 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { $end = $db->selectField( $table, "MAX($idCol)", false, __METHOD__ ); if ( !$start || !$end ) { $this->output( "...$table table seems to be empty.\n" ); + return 0; } @@ -114,7 +118,7 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { } /** - * @param $row + * @param stdClass $row * @param string $table * @param string $idCol * @param string $prefix @@ -132,6 +136,7 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { # This should not happen, but sometimes does (bug 20757) $id = $row->$idCol; $this->output( "Content of $table $id unavailable!\n" ); + return false; }