X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateRevisionLength.php;h=07c395fbae242e4888f34a5799ef068504b5ffaa;hb=479292b8e1bf9efe386bc9411d161e706827ccdf;hp=6c835f4ed2fd5d47a57df7977323942b9f3000f3;hpb=a1a296ac845aa37bfb34f0ca0085de67f9b2e8c4;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++;