cvs: ZendEngine2(PHP_5_3) / zend_ini.c zend_ini.h

[email protected] ("Ilia Alshanetsky")
Newsgroups php.zend-engine.cvs
Message-ID <cvsiliaa1205424092@cvsserver>
iliaa		Thu Mar 13 16:01:32 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2	zend_ini.c zend_ini.h 
  Log:
  MFB: Fixed bug #43677 (Inconsistent behaviour of include_path set with
  php_value). (Patch by: manuel at mausz dot at)
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.18.2.12&r2=1.39.2.2.2.18.2.13&diff_format=u
Index: ZendEngine2/zend_ini.c
diff -u ZendEngine2/zend_ini.c:1.39.2.2.2.18.2.12 ZendEngine2/zend_ini.c:1.39.2.2.2.18.2.13
--- ZendEngine2/zend_ini.c:1.39.2.2.2.18.2.12	Mon Dec 31 07:17:04 2007
+++ ZendEngine2/zend_ini.c	Thu Mar 13 16:01:31 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_ini.c,v 1.39.2.2.2.18.2.12 2007/12/31 07:17:04 sebastian Exp $ */
+/* $Id: zend_ini.c,v 1.39.2.2.2.18.2.13 2008/03/13 16:01:31 iliaa Exp $ */
 
 #include "zend.h"
 #include "zend_qsort.h"
@@ -60,9 +60,11 @@
 		}
 		ini_entry->value = ini_entry->orig_value;
 		ini_entry->value_length = ini_entry->orig_value_length;
+		ini_entry->modifiable = ini_entry->orig_modifiable;
 		ini_entry->modified = 0;
 		ini_entry->orig_value = NULL;
 		ini_entry->orig_value_length = 0;
+		ini_entry->orig_modifiable = 0;
 	}
 	return 0;
 }
@@ -246,12 +248,16 @@
 {
 	zend_ini_entry *ini_entry;
 	char *duplicate;
+	zend_bool modifiable;
 	zend_bool modified;
 
 	if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == FAILURE) {
 		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;
 	}
@@ -262,8 +268,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);
@@ -271,6 +275,7 @@
 	if (!modified) {
 		ini_entry->orig_value = ini_entry->value;
 		ini_entry->orig_value_length = ini_entry->value_length;
+		ini_entry->orig_modifiable = modifiable;
 		ini_entry->modified = 1;
 		zend_hash_add(EG(modified_ini_directives), name, name_length, &ini_entry, sizeof(zend_ini_entry*), NULL);
 	}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.h?r1=1.34.2.1.2.6.2.4&r2=1.34.2.1.2.6.2.5&diff_format=u
Index: ZendEngine2/zend_ini.h
diff -u ZendEngine2/zend_ini.h:1.34.2.1.2.6.2.4 ZendEngine2/zend_ini.h:1.34.2.1.2.6.2.5
--- ZendEngine2/zend_ini.h:1.34.2.1.2.6.2.4	Mon Dec 31 07:17:04 2007
+++ ZendEngine2/zend_ini.h	Thu Mar 13 16:01:31 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_ini.h,v 1.34.2.1.2.6.2.4 2007/12/31 07:17:04 sebastian Exp $ */
+/* $Id: zend_ini.h,v 1.34.2.1.2.6.2.5 2008/03/13 16:01:31 iliaa Exp $ */
 
 #ifndef ZEND_INI_H
 #define ZEND_INI_H
@@ -77,6 +77,7 @@
 
 	char *orig_value;
 	uint orig_value_length;
+	int orig_modifiable;
 	int modified;
 
 	void (*displayer)(zend_ini_entry *ini_entry, int type);
@@ -112,10 +113,10 @@
 END_EXTERN_C()
 
 #define ZEND_INI_BEGIN()		static const zend_ini_entry ini_entries[] = {
-#define ZEND_INI_END()		{ 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, NULL } };
+#define ZEND_INI_END()		{ 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, NULL } };
 
 #define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer) \
-	{ 0, modifiable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, displayer },
+	{ 0, modifiable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, 0, displayer },
 
 #define ZEND_INI_ENTRY3(name, default_value, modifiable, on_modify, arg1, arg2, arg3) \
 	ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, NULL)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.