Ensure that PHP doesn't interpret read ini file values and therefor

scrambles the output of hgrc files (issue 523).
This commit is contained in:
Thomas Keller 2012-06-05 20:55:21 +02:00
parent 64c6674762
commit d17098e703
2 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,10 @@ or newer to run properly!
## Bugfixes
- A long standing bug in the Mercurial plugin that lead to corruption
of boolean configuration values in the `hgrc` of the served repository
has been fixed (issue 523).
- If an anonymous or authenticated user had no access to any project in a
forge, all projects were listed for him (but still no one was actually
accessible). This has been fixed.

View File

@ -178,7 +178,10 @@ class IDF_Plugin_SyncMercurial
// Generate hgrc content
if (is_file($hgrc_file)) {
$tmp_content = parse_ini_file($hgrc_file, true);
$tmp_content = @parse_ini_file($hgrc_file, true, INI_SCANNER_RAW);
if ($tmp_content === false) {
throw new Exception('could not parse "'.$hgrc_file.'" because of syntax problems');
}
$tmp_content['web']['allow_push'] = $allow_push;
}
else {