X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=maintenance%2FfixDefaultJsonContentPages.php;h=25ec34252c157a4251d42c7cad47c104d7051c00;hb=1dd4c867e5368cfd187a9eb2f141440a5a8ce86f;hp=12658910ec162830ae3da7b346e06d7265c923d9;hpb=899bd46cbb1695a1e5fbce81839dbc7a352ceeb1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/fixDefaultJsonContentPages.php b/maintenance/fixDefaultJsonContentPages.php index 12658910ec..25ec34252c 100644 --- a/maintenance/fixDefaultJsonContentPages.php +++ b/maintenance/fixDefaultJsonContentPages.php @@ -47,7 +47,7 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance { return true; } - $dbr = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_SLAVE ); $namespaces = array( NS_MEDIAWIKI => $dbr->buildLike( $dbr->anyString(), '.json' ), NS_USER => $dbr->buildLike( $dbr->anyString(), '/', $dbr->anyString(), '.json' ), @@ -80,7 +80,7 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance { $this->output( "Processing {$title} ({$row->page_id})...\n" ); $rev = Revision::newFromTitle( $title ); $content = $rev->getContent( Revision::RAW ); - $dbw = wfGetDB( DB_MASTER ); + $dbw = $this->getDB( DB_MASTER ); if ( $content instanceof JsonContent ) { if ( $content->isValid() ) { // Yay, actually JSON. We need to just change the