summaryrefslogtreecommitdiff
path: root/includes/installer/MysqlInstaller.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/installer/MysqlInstaller.php
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/installer/MysqlInstaller.php')
-rw-r--r--includes/installer/MysqlInstaller.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php
index f66f15f2..f9a8ce75 100644
--- a/includes/installer/MysqlInstaller.php
+++ b/includes/installer/MysqlInstaller.php
@@ -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'] ) ) {
@@ -516,7 +516,8 @@ class MysqlInstaller extends DatabaseInstaller {
}
if( $tryToCreate ) {
- $createHostList = array($server,
+ $createHostList = array(
+ $server,
'localhost',
'localhost.localdomain',
'%'
@@ -573,8 +574,8 @@ class MysqlInstaller extends DatabaseInstaller {
/**
* Return a formal 'User'@'Host' username for use in queries
- * @param $name String Username, quotes will be added
- * @param $host String Hostname, quotes will be added
+ * @param string $name Username, quotes will be added
+ * @param string $host Hostname, quotes will be added
* @return String
*/
private function buildFullUserName( $name, $host ) {
@@ -584,8 +585,8 @@ class MysqlInstaller extends DatabaseInstaller {
/**
* Try to see if the user account exists. Our "superuser" may not have
* access to mysql.user, so false means "no" or "maybe"
- * @param $host String Hostname to check
- * @param $user String Username to check
+ * @param string $host Hostname to check
+ * @param string $user Username to check
* @return boolean
*/
private function userDefinitelyExists( $host, $user ) {
@@ -636,10 +637,10 @@ class MysqlInstaller extends DatabaseInstaller {
$tblOpts = LocalSettingsGenerator::escapePhpString( $this->getTableOptions() );
return
"# MySQL specific settings
-\$wgDBprefix = \"{$prefix}\";
+\$wgDBprefix = \"{$prefix}\";
# MySQL table options to use during installation or update
-\$wgDBTableOptions = \"{$tblOpts}\";
+\$wgDBTableOptions = \"{$tblOpts}\";
# Experimental charset support for MySQL 5.0.
\$wgDBmysql5 = {$dbmysql5};";