Merge "Fix sessionfailure i18n message during authentication"
[lhc/web/wiklou.git] / maintenance / mwdocgen.php
index d005629..2d6a0be 100644 (file)
@@ -105,7 +105,7 @@ class MWDocGen extends Maintenance {
                        $this->excludePatterns[] = 'extensions';
                }
 
-               $this->doDot = `which dot`;
+               $this->doDot = shell_exec( 'which dot' );
                $this->doMan = $this->hasOption( 'generate-man' );
        }
 
@@ -138,8 +138,7 @@ class MWDocGen extends Maintenance {
 
                $tmpFile = tempnam( wfTempDir(), 'MWDocGen-' );
                if ( file_put_contents( $tmpFile, $conf ) === false ) {
-                       $this->error( "Could not write doxygen configuration to file $tmpFile\n",
-                               /** exit code: */ 1 );
+                       $this->fatalError( "Could not write doxygen configuration to file $tmpFile\n" );
                }
 
                $command = $this->doxygen . ' ' . $tmpFile;
@@ -161,11 +160,10 @@ TEXT
                );
 
                if ( $exitcode !== 0 ) {
-                       $this->error( "Something went wrong (exit: $exitcode)\n",
-                               $exitcode );
+                       $this->fatalError( "Something went wrong (exit: $exitcode)\n", $exitcode );
                }
        }
 }
 
-$maintClass = 'MWDocGen';
+$maintClass = MWDocGen::class;
 require_once RUN_MAINTENANCE_IF_MAIN;