X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FpopulateRevisionLength.php;h=07c395fbae242e4888f34a5799ef068504b5ffaa;hb=9d22dd50174451fa577edd5483186c5f337f23b4;hp=6c835f4ed2fd5d47a57df7977323942b9f3000f3;hpb=b0cb8e159236e8e57edcc36f0f1dfb303a5acf11;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php index 6c835f4ed2..07c395fbae 100644 --- a/maintenance/populateRevisionLength.php +++ b/maintenance/populateRevisionLength.php @@ -74,16 +74,16 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { # Go through and update rev_len from these rows. foreach ( $res as $row ) { $rev = new Revision( $row ); - $text = $rev->getRawText(); - if ( !is_string( $text ) ) { + $content = $rev->getContent(); + if ( !$content ) { # This should not happen, but sometimes does (bug 20757) - $this->output( "Text of revision {$row->rev_id} unavailable!\n" ); + $this->output( "Content of revision {$row->rev_id} unavailable!\n" ); $missing++; } else { # Update the row... $db->update( 'revision', - array( 'rev_len' => strlen( $text ) ), + array( 'rev_len' => $content->getSize() ), array( 'rev_id' => $row->rev_id ), __METHOD__ ); $count++;