X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FtidyUpBug37714.php;h=eac7b3f91eccce46a96c648c1e308cc8828fabc5;hb=92f6090948a202e8f1a5bb57c1319d0be6fd4c26;hp=1ad9c7ee25d1d736e0a0aad3d74961c7b9dae7dc;hpb=565b65d5e4cc74fe80b8e524bfb08e412ff4af25;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/tidyUpBug37714.php b/maintenance/tidyUpBug37714.php index 1ad9c7ee25..eac7b3f91e 100644 --- a/maintenance/tidyUpBug37714.php +++ b/maintenance/tidyUpBug37714.php @@ -7,7 +7,7 @@ require_once __DIR__ . '/Maintenance.php'; class TidyUpBug37714 extends Maintenance { public function execute() { // Search for all log entries which are about changing the visability of other log entries. - $result = wfGetDB( DB_SLAVE )->select( + $result = $this->getDB( DB_SLAVE )->select( 'logging', array( 'log_id', 'log_params' ), array( @@ -22,7 +22,7 @@ class TidyUpBug37714 extends Maintenance { foreach ( $result as $row ) { $paramLines = explode( "\n", $row->log_params ); $ids = explode( ',', $paramLines[0] ); // Array dereferencing is PHP >= 5.4 :( - $result = wfGetDB( DB_SLAVE )->select( // Work out what log entries were changed here. + $result = $this->getDB( DB_SLAVE )->select( // Work out what log entries were changed here. 'logging', 'log_type', array( 'log_id' => $ids ), @@ -33,7 +33,7 @@ class TidyUpBug37714 extends Maintenance { // If there's only one type, the target title can be set to include it. $logTitle = SpecialPage::getTitleFor( 'Log', $result->current()->log_type )->getText(); $this->output( 'Set log_title to "' . $logTitle . '" for log entry ' . $row->log_id . ".\n" ); - wfGetDB( DB_MASTER )->update( + $this->getDB( DB_MASTER )->update( 'logging', array( 'log_title' => $logTitle ), array( 'log_id' => $row->log_id ),