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' ],
[
);
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 ],
}
}
-$maintClass = 'TidyUpBug37714';
+$maintClass = TidyUpBug37714::class;
require_once RUN_MAINTENANCE_IF_MAIN;