X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2FpopulateArchiveRevId.php;h=c85e194eeff18b5d2e4e330edf7387a197caabe1;hb=04d1aa3033f40a38d721f7f0e88b5bac440d2869;hp=96fcebf40973fb909d3a88ddd029301124ebdc1b;hpb=1d1bb122942d2ca6e557dc13e2d198276ce65ba6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateArchiveRevId.php b/maintenance/populateArchiveRevId.php index 96fcebf409..c85e194eef 100644 --- a/maintenance/populateArchiveRevId.php +++ b/maintenance/populateArchiveRevId.php @@ -43,6 +43,15 @@ class PopulateArchiveRevId extends LoggedUpdateMaintenance { $this->setBatchSize( 100 ); } + /** + * @param IDatabase $dbw + * @return bool + */ + public static function isNewInstall( IDatabase $dbw ) { + return $dbw->selectRowCount( 'archive' ) === 0 && + $dbw->selectRowCount( 'revision' ) === 1; + } + protected function getUpdateKey() { return __CLASS__; }