dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git]
/
includes
/
installer
/
MysqlInstaller.php
diff --git
a/includes/installer/MysqlInstaller.php
b/includes/installer/MysqlInstaller.php
index
2d43324
..
b82e611
100644
(file)
--- a/
includes/installer/MysqlInstaller.php
+++ b/
includes/installer/MysqlInstaller.php
@@
-65,7
+65,7
@@
class MysqlInstaller extends DatabaseInstaller {
}
/**
}
/**
- * @return
B
ool
+ * @return
b
ool
*/
public function isCompiled() {
return self::checkExtension( 'mysql' ) || self::checkExtension( 'mysqli' );
*/
public function isCompiled() {
return self::checkExtension( 'mysql' ) || self::checkExtension( 'mysqli' );
@@
-100,7
+100,9
@@
class MysqlInstaller extends DatabaseInstaller {
public function submitConnectForm() {
// Get variables from the request.
public function submitConnectForm() {
// Get variables from the request.
- $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBname', 'wgDBprefix' ) );
+ $newValues = $this->setVarsFromRequest( array(
+ 'wgDBserver', 'wgDBname', 'wgDBprefix', '_InstallUser', '_InstallPassword'
+ ) );
// Validate them.
$status = Status::newGood();
// Validate them.
$status = Status::newGood();
@@
-115,6
+117,12
@@
class MysqlInstaller extends DatabaseInstaller {
if ( !preg_match( '/^[a-z0-9_-]*$/i', $newValues['wgDBprefix'] ) ) {
$status->fatal( 'config-invalid-db-prefix', $newValues['wgDBprefix'] );
}
if ( !preg_match( '/^[a-z0-9_-]*$/i', $newValues['wgDBprefix'] ) ) {
$status->fatal( 'config-invalid-db-prefix', $newValues['wgDBprefix'] );
}
+ if ( !strlen( $newValues['_InstallUser'] ) ) {
+ $status->fatal( 'config-db-username-empty' );
+ }
+ if ( !strlen( $newValues['_InstallPassword'] ) ) {
+ $status->fatal( 'config-db-password-empty', $newValues['_InstallUser'] );
+ }
if ( !$status->isOK() ) {
return $status;
}
if ( !$status->isOK() ) {
return $status;
}
@@
-595,7
+603,7
@@
class MysqlInstaller extends DatabaseInstaller {
* Return a formal 'User'@'Host' username for use in queries
* @param string $name Username, quotes will be added
* @param string $host Hostname, quotes will be added
* Return a formal 'User'@'Host' username for use in queries
* @param string $name Username, quotes will be added
* @param string $host Hostname, quotes will be added
- * @return
S
tring
+ * @return
s
tring
*/
private function buildFullUserName( $name, $host ) {
return $this->db->addQuotes( $name ) . '@' . $this->db->addQuotes( $host );
*/
private function buildFullUserName( $name, $host ) {
return $this->db->addQuotes( $name ) . '@' . $this->db->addQuotes( $host );
@@
-606,7
+614,7
@@
class MysqlInstaller extends DatabaseInstaller {
* access to mysql.user, so false means "no" or "maybe"
* @param string $host Hostname to check
* @param string $user Username to check
* access to mysql.user, so false means "no" or "maybe"
* @param string $host Hostname to check
* @param string $user Username to check
- * @return bool
ean
+ * @return bool
*/
private function userDefinitelyExists( $host, $user ) {
try {
*/
private function userDefinitelyExists( $host, $user ) {
try {
@@
-623,7
+631,7
@@
class MysqlInstaller extends DatabaseInstaller {
* Return any table options to be applied to all tables that don't
* override them.
*
* Return any table options to be applied to all tables that don't
* override them.
*
- * @return
S
tring
+ * @return
s
tring
*/
protected function getTableOptions() {
$options = array();
*/
protected function getTableOptions() {
$options = array();