Replace "Bug37714" by "T39714"
authorFomafix <fomafix@googlemail.com>
Sat, 18 Aug 2018 15:32:48 +0000 (17:32 +0200)
committerFomafix <fomafix@googlemail.com>
Mon, 20 Aug 2018 21:48:11 +0000 (23:48 +0200)
Change-Id: I7951b24d08fb5257c8e7a52fa5f8f45b6631b979

autoload.php
maintenance/tidyUpBug37714.php [deleted file]
maintenance/tidyUpT39714.php [new file with mode: 0644]

index a372dd1..f914474 100644 (file)
@@ -1480,7 +1480,7 @@ $wgAutoloadLocalClasses = [
        'ThrottledError' => __DIR__ . '/includes/exception/ThrottledError.php',
        'ThumbnailImage' => __DIR__ . '/includes/media/MediaTransformOutput.php',
        'ThumbnailRenderJob' => __DIR__ . '/includes/jobqueue/jobs/ThumbnailRenderJob.php',
-       'TidyUpBug37714' => __DIR__ . '/maintenance/tidyUpBug37714.php',
+       'TidyUpT39714' => __DIR__ . '/maintenance/tidyUpT39714.php',
        'TiffHandler' => __DIR__ . '/includes/media/TiffHandler.php',
        'Timing' => __DIR__ . '/includes/libs/Timing.php',
        'Title' => __DIR__ . '/includes/Title.php',
diff --git a/maintenance/tidyUpBug37714.php b/maintenance/tidyUpBug37714.php
deleted file mode 100644 (file)
index 0dd0341..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-require_once __DIR__ . '/Maintenance.php';
-
-/**
- * Fixes all rows affected by https://bugzilla.wikimedia.org/show_bug.cgi?id=37714
- */
-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_REPLICA )->select(
-                       'logging',
-                       [ 'log_id', 'log_params' ],
-                       [
-                               'log_type' => [ 'suppress', 'delete' ],
-                               'log_action' => 'event',
-                               'log_namespace' => NS_SPECIAL,
-                               'log_title' => SpecialPage::getTitleFor( 'Log' )->getText()
-                       ],
-                       __METHOD__
-               );
-
-               foreach ( $result as $row ) {
-                       $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 ],
-                               __METHOD__,
-                               'DISTINCT'
-                       );
-                       if ( $result->numRows() === 1 ) {
-                               // 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" );
-                               $this->getDB( DB_MASTER )->update(
-                                       'logging',
-                                       [ 'log_title' => $logTitle ],
-                                       [ 'log_id' => $row->log_id ],
-                                       __METHOD__
-                               );
-                               wfWaitForSlaves();
-                       }
-               }
-       }
-}
-
-$maintClass = TidyUpBug37714::class;
-require_once RUN_MAINTENANCE_IF_MAIN;
diff --git a/maintenance/tidyUpT39714.php b/maintenance/tidyUpT39714.php
new file mode 100644 (file)
index 0000000..9dacdaa
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+require_once __DIR__ . '/Maintenance.php';
+
+/**
+ * Fixes all rows affected by T39714
+ */
+class TidyUpT39714 extends Maintenance {
+       public function execute() {
+               // Search for all log entries which are about changing the visability of other log entries.
+               $result = $this->getDB( DB_REPLICA )->select(
+                       'logging',
+                       [ 'log_id', 'log_params' ],
+                       [
+                               'log_type' => [ 'suppress', 'delete' ],
+                               'log_action' => 'event',
+                               'log_namespace' => NS_SPECIAL,
+                               'log_title' => SpecialPage::getTitleFor( 'Log' )->getText()
+                       ],
+                       __METHOD__
+               );
+
+               foreach ( $result as $row ) {
+                       $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 ],
+                               __METHOD__,
+                               'DISTINCT'
+                       );
+                       if ( $result->numRows() === 1 ) {
+                               // 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" );
+                               $this->getDB( DB_MASTER )->update(
+                                       'logging',
+                                       [ 'log_title' => $logTitle ],
+                                       [ 'log_id' => $row->log_id ],
+                                       __METHOD__
+                               );
+                               wfWaitForSlaves();
+                       }
+               }
+       }
+}
+
+$maintClass = TidyUpT39714::class;
+require_once RUN_MAINTENANCE_IF_MAIN;