projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
560f877
)
Strip ; comments at end of lines:
author
Jamie Cameron
<jcameron@webmin.com>
Sat, 5 May 2007 04:48:38 +0000
(
04:48
+0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Sat, 5 May 2007 04:48:38 +0000
(
04:48
+0000)
phpini/phpini-lib.pl
patch
|
blob
|
history
diff --git
a/phpini/phpini-lib.pl
b/phpini/phpini-lib.pl
index
b25d262
..
6afa978
100644
(file)
--- a/
phpini/phpini-lib.pl
+++ b/
phpini/phpini-lib.pl
@@
-21,9
+21,10
@@
if (!defined($get_config_cache{$file})) {
while(<CONFIG>) {
s/\r|\n//g;
s/\s+$//;
+ local $uq;
if (/^(;?)\s*(\S+)\s*=\s*"(.*)"/ ||
/^(;?)\s*(\S+)\s*=\s*'(.*)'/ ||
-
/^(;?)\s*(\S+)\s*=\s*(.*)/
) {
+
($uq = ($_ =~ /^(;?)\s*(\S+)\s*=\s*(.*)/))
) {
# Found a variable
push(@rv, { 'name' => $2,
'value' => $3,
@@
-32,6
+33,10
@@
if (!defined($get_config_cache{$file})) {
'file' => $file,
'section' => $section,
});
+ if ($uq) {
+ # Remove any comments
+ $rv[$#rv]->{'value'} =~ s/\s+;.*$//;
+ }
}
elsif (/^\[(.*)\]/) {
# A new section