X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FtidyUpBug37714.php;h=9d7cc0e9c3603e54ccad7e7990aeb9b9ca73ead5;hb=90845301542482bd4e502221e6485a7375193529;hp=e9c006eac550e6d4d4adbf0ada411f33890f81ee;hpb=6e9b4f0e9ce4ccd6089c18b205065ef7fa077484;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/tidyUpBug37714.php b/maintenance/tidyUpBug37714.php index e9c006eac5..9d7cc0e9c3 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 = $this->getDB( DB_SLAVE )->select( + $result = $this->getDB( DB_REPLICA )->select( 'logging', [ 'log_id', 'log_params' ], [ @@ -20,9 +20,8 @@ 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 = $this->getDB( DB_SLAVE )->select( // Work out what log entries were changed here. + $ids = explode( ',', explode( "\n", $row->log_params )[0] ); + $result = $this->getDB( DB_REPLICA )->select( // Work out what log entries were changed here. 'logging', 'log_type', [ 'log_id' => $ids ],