HistoryAction: Amend `margin` in collapsed form state
[lhc/web/wiklou.git] / maintenance / rebuildLocalisationCache.php
index 82b362b..4213d5f 100644 (file)
@@ -29,8 +29,6 @@
  * @ingroup Maintenance
  */
 
-use MediaWiki\MediaWikiServices;
-
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -94,7 +92,7 @@ class RebuildLocalisationCache extends Maintenance {
                                explode( ',', $this->getOption( 'lang' ) ) );
                        # Bailed out if nothing is left
                        if ( count( $codes ) == 0 ) {
-                               $this->error( 'None of the languages specified exists.', 1 );
+                               $this->fatalError( 'None of the languages specified exists.' );
                        }
                } else {
                        # By default get all languages
@@ -113,8 +111,9 @@ class RebuildLocalisationCache extends Maintenance {
                        $pid = ( $threads > 1 ) ? pcntl_fork() : -1;
 
                        if ( $pid === 0 ) {
-                               // Reset services, so we don't re-use connections.
-                               MediaWikiServices::resetChildProcessServices();
+                               // Child, reseed because there is no bug in PHP:
+                               // https://bugs.php.net/bug.php?id=42465
+                               mt_srand( getmypid() );
 
                                $this->doRebuild( $codes, $lc, $force );
                                exit( 0 );
@@ -178,5 +177,5 @@ class RebuildLocalisationCache extends Maintenance {
        }
 }
 
-$maintClass = "RebuildLocalisationCache";
+$maintClass = RebuildLocalisationCache::class;
 require_once RUN_MAINTENANCE_IF_MAIN;