summaryrefslogtreecommitdiff
path: root/main/configuration-parser.y
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-01-30 20:31:41 +0000
committerZeev Suraski <zeev@php.net>2000-01-30 20:31:41 +0000
commit430571d62c90e2f81dc4909b43e300ff1e2edc13 (patch)
tree98f770be32ba13490d12975737b52985997b515d /main/configuration-parser.y
parent0296bba808e63deb27a7e6cf58b5a6ae3cbb90bc (diff)
downloadphp-git-430571d62c90e2f81dc4909b43e300ff1e2edc13.tar.gz
Initial work on the protected env vars stuff
Diffstat (limited to 'main/configuration-parser.y')
-rw-r--r--main/configuration-parser.y16
1 files changed, 8 insertions, 8 deletions
diff --git a/main/configuration-parser.y b/main/configuration-parser.y
index 28b3994b31..c367b73938 100644
--- a/main/configuration-parser.y
+++ b/main/configuration-parser.y
@@ -48,7 +48,7 @@ static HashTable configuration_hash;
extern HashTable browser_hash;
PHPAPI extern char *php_ini_path;
#endif
-static HashTable *activezend_hash_table;
+static HashTable *active_hash_table;
static pval *current_section;
static char *currently_parsed_filename;
@@ -226,7 +226,7 @@ int php_init_config(void)
}
init_cfg_scanner();
- activezend_hash_table = &configuration_hash;
+ active_hash_table = &configuration_hash;
parsing_mode = PARSING_MODE_CFG;
currently_parsed_filename = "php.ini";
yyparse();
@@ -254,7 +254,7 @@ PHP_MINIT_FUNCTION(browscap)
return FAILURE;
}
init_cfg_scanner();
- activezend_hash_table = &browser_hash;
+ active_hash_table = &browser_hash;
parsing_mode = PARSING_MODE_BROWSCAP;
currently_parsed_filename = browscap;
yyparse();
@@ -410,10 +410,10 @@ statement:
#endif
$3.type = IS_STRING;
if (parsing_mode==PARSING_MODE_CFG) {
- zend_hash_update(activezend_hash_table, $1.value.str.val, $1.value.str.len+1, &$3, sizeof(pval), NULL);
- if (activezend_hash_table == &configuration_hash) {
- php_alter_ini_entry($1.value.str.val, $1.value.str.len+1, $3.value.str.val, $3.value.str.len+1, PHP_INI_SYSTEM);
- }
+ zend_hash_update(active_hash_table, $1.value.str.val, $1.value.str.len+1, &$3, sizeof(pval), NULL);
+ if (active_hash_table == &configuration_hash) {
+ php_alter_ini_entry($1.value.str.val, $1.value.str.len+1, $3.value.str.val, $3.value.str.len+1, PHP_INI_SYSTEM);
+ }
} else if (parsing_mode==PARSING_MODE_BROWSCAP) {
zend_str_tolower($1.value.str.val,$1.value.str.len);
zend_hash_update(current_section->value.ht, $1.value.str.val, $1.value.str.len+1, &$3, sizeof(pval), NULL);
@@ -461,7 +461,7 @@ statement:
tmp.value.ht = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init(tmp.value.ht, 0, NULL, (void (*)(void *))pvalue_config_destructor, 1);
tmp.type = IS_OBJECT;
- zend_hash_update(activezend_hash_table, $1.value.str.val, $1.value.str.len+1, (void *) &tmp, sizeof(pval), (void **) &current_section);
+ zend_hash_update(active_hash_table, $1.value.str.val, $1.value.str.len+1, (void *) &tmp, sizeof(pval), (void **) &current_section);
tmp.value.str.val = zend_strndup($1.value.str.val,$1.value.str.len);
tmp.value.str.len = $1.value.str.len;
tmp.type = IS_STRING;