X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupTitles.php;h=50e17d8dad2b61beb7ffec7426b6f732b2c8415a;hb=fcfc3a95ed684477924c58bb2aba2d824d095002;hp=650fae085a59365d580a94d2e35eb7543223a1fd;hpb=17914cc990c375340b688900b7782f1d7d5339fc;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index 650fae085a..50e17d8dad 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -25,6 +25,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/cleanupTable.inc'; /** @@ -130,22 +132,25 @@ class TitleCleanup extends TableCleanup { * @param object $row * @param Title $title */ - protected function moveInconsistentPage( $row, $title ) { - if ( $title->exists() || $title->getInterwiki() || !$title->canExist() ) { + protected function moveInconsistentPage( $row, Title $title ) { + if ( $title->exists( Title::GAID_FOR_UPDATE ) + || $title->getInterwiki() + || !$title->canExist() + ) { if ( $title->getInterwiki() || !$title->canExist() ) { $prior = $title->getPrefixedDBkey(); } else { $prior = $title->getDBkey(); } - # Old cleanupTitles could move articles there. See bug 23147. + # Old cleanupTitles could move articles there. See T25147. $ns = $row->page_namespace; if ( $ns < 0 ) { $ns = 0; } # Namespace which no longer exists. Put the page in the main namespace - # since we don't have any idea of the old namespace name. See bug 68501. + # since we don't have any idea of the old namespace name. See T70501. if ( !MWNamespace::exists( $ns ) ) { $ns = 0; } @@ -179,7 +184,7 @@ class TitleCleanup extends TableCleanup { ], [ 'page_id' => $row->page_id ], __METHOD__ ); - LinkCache::singleton()->clear(); + MediaWikiServices::getInstance()->getLinkCache()->clear(); } } }