X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateRevisionSha1.php;h=382b7be4d8651d41869eb7a5f58071be9c2105e0;hb=86a180097bbe38cc314798b48a5a8b8e70566273;hp=bb620c527afcff77fbecb7f1366305b19decfc3a;hpb=7d1fae940a4387853e9970b840154de0c8bb7119;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateRevisionSha1.php b/maintenance/populateRevisionSha1.php index bb620c527a..382b7be4d8 100644 --- a/maintenance/populateRevisionSha1.php +++ b/maintenance/populateRevisionSha1.php @@ -22,7 +22,7 @@ * @ingroup Maintenance */ -require_once( dirname( __FILE__ ) . '/Maintenance.php' ); +require_once( __DIR__ . '/Maintenance.php' ); /** * Maintenance script that fills the rev_sha1 and ar_sha1 columns of revision @@ -143,14 +143,14 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance { $rev = ( $table === 'archive' ) ? Revision::newFromArchiveRow( $row ) : new Revision( $row ); - $text = $rev->getRawText(); + $text = $rev->getSerializedData(); } catch ( MWException $e ) { - $this->output( "Text of revision with {$idCol}={$row->$idCol} unavailable!\n" ); + $this->output( "Data of revision with {$idCol}={$row->$idCol} unavailable!\n" ); return false; // bug 22624? } if ( !is_string( $text ) ) { # This should not happen, but sometimes does (bug 20757) - $this->output( "Text of revision with {$idCol}={$row->$idCol} unavailable!\n" ); + $this->output( "Data of revision with {$idCol}={$row->$idCol} unavailable!\n" ); return false; } else { $db->update( $table, @@ -174,10 +174,10 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance { $this->output( "Text of revision with timestamp {$row->ar_timestamp} unavailable!\n" ); return false; // bug 22624? } - $text = $rev->getRawText(); + $text = $rev->getSerializedData(); if ( !is_string( $text ) ) { # This should not happen, but sometimes does (bug 20757) - $this->output( "Text of revision with timestamp {$row->ar_timestamp} unavailable!\n" ); + $this->output( "Data of revision with timestamp {$row->ar_timestamp} unavailable!\n" ); return false; } else { # Archive table as no PK, but (NS,title,time) should be near unique.