(bug 43751) Allow '+' in MySQL database names.
authorVictor Vasiliev <vasilvv@gmail.com>
Sun, 20 Jan 2013 00:46:26 +0000 (19:46 -0500)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 25 Jan 2013 22:42:16 +0000 (22:42 +0000)
Change-Id: I0196af1989a09d941bfcc8e52c6c9f97ea5abe95

includes/installer/MysqlInstaller.php

index f66f15f..94c38c4 100644 (file)
@@ -107,7 +107,7 @@ class MysqlInstaller extends DatabaseInstaller {
                }
                if ( !strlen( $newValues['wgDBname'] ) ) {
                        $status->fatal( 'config-missing-db-name' );
-               } elseif ( !preg_match( '/^[a-z0-9_-]+$/i', $newValues['wgDBname'] ) ) {
+               } elseif ( !preg_match( '/^[a-z0-9+_-]+$/i', $newValues['wgDBname'] ) ) {
                        $status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] );
                }
                if ( !preg_match( '/^[a-z0-9_-]*$/i', $newValues['wgDBprefix'] ) ) {