X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FMysqlUpdater.php;h=44086a125e02bc1b792d53c6f53b12de8108efc0;hb=153ad6a2c8610df3d9763fd2e1bb67d345c10231;hp=bc7725e93ff11e12ab7c5e26f0c82fb788ca5eaa;hpb=3b7f4539639b3899e246e245df481882f81f9340;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index bc7725e93f..44086a125e 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -335,6 +335,7 @@ class MysqlUpdater extends DatabaseUpdater { [ 'addTable', 'content', 'patch-content.sql' ], [ 'addTable', 'slot_roles', 'patch-slot_roles.sql' ], [ 'addTable', 'content_models', 'patch-content_models.sql' ], + [ 'migrateArchiveText' ], ]; } @@ -871,7 +872,8 @@ class MysqlUpdater extends DatabaseUpdater { $this->applyPatch( 'patch-templatelinks.sql', false, "Creating templatelinks table" ); $this->output( "Populating...\n" ); - if ( wfGetLB()->getServerCount() > 1 ) { + $services = MediaWikiServices::getInstance(); + if ( $services->getDBLoadBalancer()->getServerCount() > 1 ) { // Slow, replication-friendly update $res = $this->db->select( 'pagelinks', [ 'pl_from', 'pl_namespace', 'pl_title' ], [ 'pl_namespace' => NS_TEMPLATE ], __METHOD__ ); @@ -879,7 +881,7 @@ class MysqlUpdater extends DatabaseUpdater { foreach ( $res as $row ) { $count = ( $count + 1 ) % 100; if ( $count == 0 ) { - $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); + $lbFactory = $services->getDBLoadBalancerFactory(); $lbFactory->waitForReplication( [ 'wiki' => wfWikiID() ] ); } $this->db->insert( 'templatelinks',