From: Brion Vibber Date: Sun, 29 May 2005 10:20:21 +0000 (+0000) Subject: * (bug 2234) allow special chars in database passwords during install X-Git-Tag: 1.5.0alpha2~40 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=fd80bf5b38bf1cab65aba129bc4070e57ad6f86d;p=lhc%2Fweb%2Fwiklou.git * (bug 2234) allow special chars in database passwords during install --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a4a26eb747..151908cef3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -219,6 +219,8 @@ Various bugfixes, small features, and a few experimental things: * Add validate table and val_ip column through the updater. * Simple rate limiter for edits and page moves; set $wgRateLimits (somewhat experimental; currently needs memcached) +* (bug 2234) allow special chars in database passwords during install + === Caveats === diff --git a/install-utils.inc b/install-utils.inc index 1cd85605c2..913dae531e 100644 --- a/install-utils.inc +++ b/install-utils.inc @@ -76,10 +76,12 @@ function replacevars( $ins ) { ); foreach ( $varnames as $var ) { - global $$var; - $ins = str_replace( '{$' . $var . '}', $$var, $ins ); - $ins = str_replace( '/*$' . $var . '*/`', '`' . $$var, $ins ); - $ins = str_replace( '/*$' . $var . '*/', $$var, $ins ); + if( isset( $GLOBALS[$var] ) ) { + $val = addslashes( $GLOBALS[$var] ); + $ins = str_replace( '{$' . $var . '}', $val, $ins ); + $ins = str_replace( '/*$' . $var . '*/`', '`' . $val, $ins ); + $ins = str_replace( '/*$' . $var . '*/', $val, $ins ); + } } return $ins; }