X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateCollation.php;h=bd75b3b666abdfd9fc052d6771f9b6fce391d0a5;hb=a36c567fa636af4a7c96cdeff521b64d6f291f22;hp=5cf8afa941b0a89b2cda0b8ecc2dc5546fab992e;hpb=200322ca9a983f0a13d8ad2c3d70e623bfd68d24;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 5cf8afa941..bd75b3b666 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -86,7 +86,7 @@ TEXT; $options = array( 'LIMIT' => self::BATCH_SIZE, - 'ORDER BY' => 'cl_to, cl_type, cl_from', + 'ORDER BY' => 'cl_from, cl_to', 'STRAIGHT_JOIN', ); @@ -132,7 +132,7 @@ TEXT; $res = $dbw->select( array( 'categorylinks', 'page' ), array( 'cl_from', 'cl_to', 'cl_sortkey_prefix', 'cl_collation', - 'cl_sortkey', 'cl_type', 'page_namespace', 'page_title' + 'cl_sortkey', 'page_namespace', 'page_title' ), array_merge( $collationConds, $batchConds, array( 'cl_from = page_id' ) ), __METHOD__, @@ -141,7 +141,7 @@ TEXT; $this->output( " processing..." ); if ( !$dryRun ) { - $dbw->begin( __METHOD__ ); + $this->beginTransaction( $dbw, __METHOD__ ); } foreach ( $res as $row ) { $title = Title::newFromRow( $row ); @@ -193,7 +193,7 @@ TEXT; } } if ( !$dryRun ) { - $dbw->commit( __METHOD__ ); + $this->commitTransaction( $dbw, __METHOD__ ); } $count += $res->numRows(); @@ -216,13 +216,13 @@ TEXT; /** * Return an SQL expression selecting rows which sort above the given row, - * assuming an ordering of cl_to, cl_type, cl_from + * assuming an ordering of cl_from, cl_to * @param stdClass $row * @param DatabaseBase $dbw * @return string */ function getBatchCondition( $row, $dbw ) { - $fields = array( 'cl_to', 'cl_type', 'cl_from' ); + $fields = array( 'cl_from', 'cl_to' ); $first = true; $cond = false; $prefix = false;