r82879 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82878‎ | r82879 | r82880 >
Date:00:29, 27 February 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove unreachable return

Swap "dieout" for "die" in DatabaseMssql
Modified paths:
  • /trunk/phase3/includes/Namespace.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMssql.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseMssql.php
@@ -820,20 +820,20 @@
821821 $res = $this->doQuery( $SQL );
822822 if ( !$res ) {
823823 print "<b>FAILED</b>. Make sure that the user " . htmlspecialchars( $wgDBuser ) . " can write to the database</li>\n";
824 - dieout( );
 824+ die();
825825 }
826826 $this->doQuery( "DROP TABLE $ctest" );
827827
828828 $res = $this->sourceFile( "../maintenance/mssql/tables.sql" );
829829 if ( $res !== true ) {
830830 echo " <b>FAILED</b></li>";
831 - dieout( htmlspecialchars( $res ) );
 831+ die( htmlspecialchars( $res ) );
832832 }
833833
834834 # Avoid the non-standard "REPLACE INTO" syntax
835835 $f = fopen( "../maintenance/interwiki.sql", 'r' );
836836 if ( $f == false ) {
837 - dieout( "<li>Could not find the interwiki.sql file" );
 837+ die( "<li>Could not find the interwiki.sql file" );
838838 }
839839 # We simply assume it is already empty as we have just created it
840840 $SQL = "INSERT INTO interwiki(iw_prefix,iw_url,iw_local) VALUES ";
Index: trunk/phase3/includes/Namespace.php
@@ -64,7 +64,6 @@
6565 private static function isMethodValidFor( $index, $method ) {
6666 if( $index < NS_MAIN ) {
6767 throw new MWException( "$method does not make any sense for given namespace $index" );
68 - return false;
6968 }
7069 return true;
7170 }

Status & tagging log