Index: trunk/phase3/config/index.php |
— | — | @@ -793,11 +793,16 @@ |
794 | 794 | print "<li>Database <tt>" . htmlspecialchars( $wgDBname ) . "</tt> exists</li>\n"; |
795 | 795 | } else { |
796 | 796 | $err = mysql_errno(); |
797 | | - if ( $err != 1049 ) { |
798 | | - print "<ul><li>Error selecting database $wgDBname: $err " . |
799 | | - htmlspecialchars( mysql_error() ) . "</li></ul>"; |
| 797 | + $databaseSafe = htmlspecialchars( $wgDBname ); |
| 798 | + if( $err == 1102 /* Invalid database name */ ) { |
| 799 | + print "<ul><li><strong>{$databaseSafe}</strong> is not a valid database name.</li></ul>"; |
800 | 800 | continue; |
| 801 | + } elseif( $err != 1049 /* Database doesn't exist */ ) { |
| 802 | + print "<ul><li>Error selecting database <strong>{$databaseSafe}</strong>: {$err} "; |
| 803 | + print htmlspecialchars( mysql_error() ) . "</li></ul>"; |
| 804 | + continue; |
801 | 805 | } |
| 806 | + print "<li>Attempting to create database...</li>"; |
802 | 807 | $res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" ); |
803 | 808 | if( !$res ) { |
804 | 809 | print "<li>Couldn't create database <tt>" . |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -425,6 +425,8 @@ |
426 | 426 | Linux systems with at least some versions of PHP |
427 | 427 | * (bug 5908) Allow overriding the default category sort key for all items on |
428 | 428 | a page using {{DEFAULTSORT}} |
| 429 | +* (bug 6449) Throw a more definitive error message when installation fails |
| 430 | + due to an invalid database name |
429 | 431 | |
430 | 432 | == Languages updated == |
431 | 433 | |