diff options
author | Zeev Suraski <zeev@php.net> | 2003-02-04 13:12:48 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2003-02-04 13:12:48 +0000 |
commit | 3a1a209bafba96a80e6c314a4754668c16e01972 (patch) | |
tree | 5672e5dd44228154966353c58e858fb2812a0f2a /sapi/apache/mod_php4.c | |
parent | 471947b1885b82f82ba9c338731979c5cc952aec (diff) | |
download | php-git-3a1a209bafba96a80e6c314a4754668c16e01972.tar.gz |
Updates reflecting infrastructure changes
Diffstat (limited to 'sapi/apache/mod_php4.c')
-rw-r--r-- | sapi/apache/mod_php4.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 0a14fd6804..1514db72d6 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -672,8 +672,15 @@ static void copy_per_dir_entry(php_per_dir_entry *per_dir_entry) /* {{{ should_overwrite_per_dir_entry */ -static zend_bool should_overwrite_per_dir_entry(php_per_dir_entry *orig_per_dir_entry, php_per_dir_entry *new_per_dir_entry) +static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, php_per_dir_entry *orig_per_dir_entry, zend_hash_key *hash_key, void *pData) { + php_per_dir_entry *orig_per_dir_entry; + php_per_dir_entry *new_per_dir_entry; + + if (zend_hash_find(target_ht, hash_key->arKey, hash_key->nKeyLength, (void **) &new_per_dir_entry)==FAILURE) { + return 1; /* does not exist in dest, copy from source */ + } + if (new_per_dir_entry->type==PHP_INI_SYSTEM && orig_per_dir_entry->type!=PHP_INI_SYSTEM) { return 1; @@ -711,7 +718,7 @@ static void *php_create_dir(pool *p, char *dummy) static void *php_merge_dir(pool *p, void *basev, void *addv) { /* This function *must* return addv, and not modify basev */ - zend_hash_merge_ex((HashTable *) addv, (HashTable *) basev, (copy_ctor_func_t) copy_per_dir_entry, sizeof(php_per_dir_entry), (zend_bool (*)(void *, void *)) should_overwrite_per_dir_entry); + zend_hash_merge_ex((HashTable *) addv, (HashTable *) basev, (copy_ctor_func_t) copy_per_dir_entry, sizeof(php_per_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL); return addv; } /* }}} */ |