Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
>
php-5.2.6
> php-5.2.5-restore-ini-level2.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-5.2.5-restore-ini-level2.patch of Package php-5.2.6 (Revision 15)
Currently displaying revision
15
,
show latest
diff -Naur php-5.2.5.orig/Zend/zend_ini.c /root/php-5.2.5/Zend/zend_ini.c --- php-5.2.5.orig/Zend/zend_ini.c 2007-10-01 17:00:15.000000000 +0200 +++ /root/php-5.2.5/Zend/zend_ini.c 2008-01-21 18:00:22.000000000 +0100 @@ -63,6 +63,9 @@ ini_entry->modified = 0; ini_entry->orig_value = NULL; ini_entry->orig_value_length = 0; + if (ini_entry->modifiable >= (1 << 3)) { + ini_entry->modifiable >>= 3; + } } return 0; } @@ -244,6 +247,7 @@ { zend_ini_entry *ini_entry; char *duplicate; + zend_bool modifiable; zend_bool modified; TSRMLS_FETCH(); @@ -251,8 +255,12 @@ return FAILURE; } + modifiable = ini_entry->modifiable; + modified = ini_entry->modified; + if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM) { - ini_entry->modifiable = ZEND_INI_SYSTEM; + /* only touch lower bits */ + ini_entry->modifiable = (ini_entry->modifiable & (ZEND_INI_ALL << 3)) | ZEND_INI_SYSTEM; } if (!force_change) { @@ -261,8 +269,6 @@ } } - modified = ini_entry->modified; - if (!EG(modified_ini_directives)) { ALLOC_HASHTABLE(EG(modified_ini_directives)); zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0); @@ -270,6 +276,8 @@ if (!modified) { ini_entry->orig_value = ini_entry->value; ini_entry->orig_value_length = ini_entry->value_length; + /* store orginial value in the upper bits */ + ini_entry->modifiable = (modifiable << 3) | ini_entry->modifiable; ini_entry->modified = 1; zend_hash_add(EG(modified_ini_directives), name, name_length, &ini_entry, sizeof(zend_ini_entry*), NULL); } diff -Naur php-5.2.5.orig/ext/reflection/php_reflection.c /root/php-5.2.5/ext/reflection/php_reflection.c --- php-5.2.5.orig/ext/reflection/php_reflection.c 2008-01-21 18:07:47.000000000 +0100 +++ /root/php-5.2.5/ext/reflection/php_reflection.c 2008-01-21 18:07:57.000000000 +0100 @@ -836,7 +836,7 @@ if (number == ini_entry->module_number) { string_printf(str, " %sEntry [ %s <", indent, ini_entry->name); - if (ini_entry->modifiable == ZEND_INI_ALL) { + if (ini_entry->modifiable & ZEND_INI_ALL) { string_printf(str, "ALL"); } else { if (ini_entry->modifiable & ZEND_INI_USER) {