Remove unreachable return
authorSam Reed <reedy@users.mediawiki.org>
Sun, 27 Feb 2011 00:29:21 +0000 (00:29 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 27 Feb 2011 00:29:21 +0000 (00:29 +0000)
Swap "dieout" for "die" in DatabaseMssql

includes/Namespace.php
includes/db/DatabaseMssql.php

index c0df368..95c58cc 100644 (file)
@@ -64,7 +64,6 @@ class MWNamespace {
        private static function isMethodValidFor( $index, $method ) {
                if( $index < NS_MAIN ) {
                        throw new MWException( "$method does not make any sense for given namespace $index" );
-                       return false;
                }
                return true;
        }
index c9fd1e4..015f5a0 100644 (file)
@@ -820,20 +820,20 @@ class DatabaseMssql extends DatabaseBase {
                $res = $this->doQuery( $SQL );
                if ( !$res ) {
                        print "<b>FAILED</b>. Make sure that the user " . htmlspecialchars( $wgDBuser ) . " can write to the database</li>\n";
-                       dieout( );
+                       die();
                }
                $this->doQuery( "DROP TABLE $ctest" );
 
                $res = $this->sourceFile( "../maintenance/mssql/tables.sql" );
                if ( $res !== true ) {
                        echo " <b>FAILED</b></li>";
-                       dieout( htmlspecialchars( $res ) );
+                       die( htmlspecialchars( $res ) );
                }
 
                # Avoid the non-standard "REPLACE INTO" syntax
                $f = fopen( "../maintenance/interwiki.sql", 'r' );
                if ( $f == false ) {
-                       dieout( "<li>Could not find the interwiki.sql file" );
+                       die( "<li>Could not find the interwiki.sql file" );
                }
                # We simply assume it is already empty as we have just created it
                $SQL = "INSERT INTO interwiki(iw_prefix,iw_url,iw_local) VALUES ";