* many rows where updated.
*/
protected function doDBUpdates() {
+ global $wgCommentTableSchemaMigrationStage;
+
$dbw = $this->db;
// Update current image
[ 'img_name' => $this->oldName ],
__METHOD__
);
+ if ( $wgCommentTableSchemaMigrationStage > MIGRATION_OLD ) {
+ $dbw->update(
+ 'image_comment_temp',
+ [ 'imgcomment_name' => $this->newName ],
+ [ 'imgcomment_name' => $this->oldName ],
+ __METHOD__
+ );
+ }
+
// Update old images
$dbw->update(
'oldimage',
return $this->sourceMap;
}
- /**
- * Get a new hash ring with a location removed from the ring
- *
- * @param string $location
- * @return HashRing|bool Returns false if no non-zero weighted spots are left
- */
- public function newWithoutLocation( $location ) {
- $map = $this->sourceMap;
- unset( $map[$location] );
-
- return count( $map ) ? new self( $map ) : false;
- }
-
/**
* Remove a location from the "live" hash ring
*
/**
* @param array $groupDefinition Group definition
* @param string $input Value in URL
- *
- * @dataProvider provideModifyQuery
*/
protected function modifyQueryHelper( $groupDefinition, $input ) {
$ctx = $this->createMock( IContextSource::class );
* @since 1.20
*
* @param callable $function
- *
- * @covers GenericArrayObject::getObjectType
*/
protected function checkTypeChecks( $function ) {
$excption = null;
* @since 1.20
*
* @param array $elements
- *
+ * @covers GenericArrayObject::getObjectType
* @covers GenericArrayObject::offsetSet
*/
public function testOffsetSet( array $elements ) {
* @covers WikiPage::newFromID
*/
public function testNewFromId_returnsNullOnNonExistingId() {
- $this->assertNull( WikiPage::newFromID( 73574757437437743743 ) );
+ $this->assertNull( WikiPage::newFromID( 2147483647 ) );
}
public function provideTestInsertProtectNullRevision() {