[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-12-16 Thread changelog
changelog   Wed Dec 17 01:32:15 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3260r2=1.3261diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3260 php-src/ChangeLog:1.3261
--- php-src/ChangeLog:1.3260Tue Dec 16 01:32:14 2008
+++ php-src/ChangeLog   Wed Dec 17 01:32:14 2008
@@ -1,3 +1,35 @@
+2008-12-16  Zoe Slattery  zoe.slatt...@googlemail.com
+
+* ext/imap/php_imap.c
+  ext/imap/php_imap.c
+  ext/imap/php_imap.c:
+  bug #46837 fix
+
+* ext/imap/php_imap.c
+  ext/imap/php_imap.c
+  ext/imap/php_imap.c:
+  bug #46884 fix
+
+2008-12-16  Rob Richards  rricha...@ctindustries.net
+
+* (PHP_5_3)
+  NEWS:
+  BFN
+
+* (PHP_5_3)
+  ext/dom/php_dom.c
+  ext/dom/tests/bug46849.phpt:
+  MFH: fix bug #46849 (Cloning DOMDocument doesn't clone the properties)
+  fix some warnings
+  add test
+
+* ext/dom/php_dom.c
+  ext/dom/tests/bug46849.phpt
+  ext/dom/tests/bug46849.phpt:
+  fix bug #46849 (Cloning DOMDocument doesn't clone the properties)
+  fix some warnings
+  add test
+
 2008-12-15  Steve Seear  steve.se...@googlemail.com
 
 * (PHP_5_2)
@@ -19773,7 +19805,7 @@
 
 * sapi/litespeed/lsapi_main.c
   sapi/litespeed/lsapilib.c:
-  - Added missing $Id: ChangeLog,v 1.3260 2008/12/16 01:32:14 changelog 
Exp $ tags and nuked c++ comments
+  - Added missing $Id: ChangeLog,v 1.3261 2008/12/17 01:32:14 changelog 
Exp $ tags and nuked c++ comments
 
 * (PHP_5_3)
   ext/intl/locale/locale.c




[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom php_dom.c /ext/dom/tests bug46849.phpt

2008-12-16 Thread Rob Richards
rrichards   Tue Dec 16 12:53:29 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/dom/tests  bug46849.phpt 

  Modified files:  
/php-src/ext/domphp_dom.c 
  Log:
  MFH: fix bug #46849 (Cloning DOMDocument doesn't clone the properties)
  fix some warnings
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.12.2.12r2=1.73.2.12.2.12.2.13diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.12 
php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.13
--- php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.12   Mon Nov 17 11:27:54 2008
+++ php-src/ext/dom/php_dom.c   Tue Dec 16 12:53:29 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.73.2.12.2.12.2.12 2008/11/17 11:27:54 felipe Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.12.2.13 2008/12/16 12:53:29 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -172,6 +172,31 @@
}
 }
 
+static void dom_copy_doc_props(php_libxml_ref_obj *source_doc, 
php_libxml_ref_obj *dest_doc)
+{
+   dom_doc_propsptr source, dest;
+   
+   if (source_doc  dest_doc) {
+   
+   source = dom_get_doc_props(source_doc);
+   dest = dom_get_doc_props(dest_doc);
+
+   dest-formatoutput = source-formatoutput;
+   dest-validateonparse = source-validateonparse;
+   dest-resolveexternals = source-resolveexternals;
+   dest-preservewhitespace = source-preservewhitespace;
+   dest-substituteentities = source-substituteentities;
+   dest-stricterror = source-stricterror;
+   dest-recover = source-recover;
+   if (source-classmap) {
+   ALLOC_HASHTABLE(dest-classmap);
+   zend_hash_init(dest-classmap, 0, NULL, NULL, 0);
+   zend_hash_copy(dest-classmap, source-classmap, NULL, 
NULL, sizeof(zend_class_entry *));
+   }
+
+   }
+}
+
 int dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry 
*basece, zend_class_entry *ce TSRMLS_DC)
 {
dom_doc_propsptr doc_props;
@@ -1078,6 +1103,9 @@
}

php_libxml_increment_doc_ref((php_libxml_node_object *)clone, cloned_node-doc 
TSRMLS_CC);

php_libxml_increment_node_ptr((php_libxml_node_object *)clone, cloned_node, 
(void *)clone TSRMLS_CC);
+   if (intern-document != clone-document) {
+   dom_copy_doc_props(intern-document, 
clone-document);
+   }
}
 
}
@@ -1371,8 +1399,8 @@
 
while (nodep != NULL  (*cur = index || index == -1)) {
if (nodep-type == XML_ELEMENT_NODE) {
-   if (xmlStrEqual(nodep-name, local) || xmlStrEqual(*, 
local)) {
-   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, ns) || xmlStrEqual(*, ns {
+   if (xmlStrEqual(nodep-name, (xmlChar *)local) || 
xmlStrEqual((xmlChar *)*, (xmlChar *)local)) {
+   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, (xmlChar *)ns) || xmlStrEqual((xmlChar *)*, 
(xmlChar *)ns {
if (*cur == index) {
ret = nodep;
break;
@@ -1479,9 +1507,9 @@
return NAMESPACE_ERR;
}

-   *localname = xmlSplitQName2(qname, (xmlChar **) prefix);
+   *localname = (char *)xmlSplitQName2((xmlChar *)qname, (xmlChar **) 
prefix);
if (*localname == NULL) {
-   *localname = xmlStrdup(qname);
+   *localname = (char *)xmlStrdup((xmlChar *)qname);
if (*prefix == NULL  uri_len == 0) {
return 0;
}
@@ -1517,10 +1545,10 @@
 
*errorcode = 0;
 
-   if (! ((prefix  !strcmp (prefix, xml  )  strcmp(uri, 
XML_XML_NAMESPACE)) ||
-  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, 
DOM_XMLNS_NAMESPACE)) ||
-  (prefix  !strcmp(uri, DOM_XMLNS_NAMESPACE)  strcmp 
(prefix, xmlns {
-   nsptr = xmlNewNs(nodep, uri, prefix);
+   if (! ((prefix  !strcmp (prefix, xml)  strcmp(uri, (char 
*)XML_XML_NAMESPACE)) ||
+  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, (char 
*)DOM_XMLNS_NAMESPACE)) ||
+  (prefix  !strcmp(uri, (char *)DOM_XMLNS_NAMESPACE)  
strcmp (prefix, xmlns {
+   nsptr = xmlNewNs(nodep, (xmlChar *)uri, (xmlChar *)prefix);
}
 
if (nsptr == NULL) {
@@ -1539,7 +1567,7 @@
if (node == NULL)
return NULL;
 
-   if 

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2008-12-16 Thread Rob Richards
rrichards   Tue Dec 16 12:54:05 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.415r2=1.2027.2.547.2.965.2.416diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.415 
php-src/NEWS:1.2027.2.547.2.965.2.416
--- php-src/NEWS:1.2027.2.547.2.965.2.415   Sat Dec 13 05:31:15 2008
+++ php-src/NEWSTue Dec 16 12:54:05 2008
@@ -7,6 +7,7 @@
 - Deprecated session_register(), session_unregister() and
   session_is_registered(). (Hannes)
 
+- Fixed bug #46849 (Cloning DOMDocument doesn't clone the properties). (Rob)
 - Fixed bug #46847 (phpinfo() is missing some settings). (Hannes)
 - Fixed bug #46811 (ini_set() doesn't return false on failure). (Hannes)
 - Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error when



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom php_dom.c /ext/dom/tests bug46849.phpt

2008-12-16 Thread Rob Richards
rrichards   Tue Dec 16 12:51:58 2008 UTC

  Added files: 
/php-src/ext/dom/tests  bug46849.phpt 

  Modified files:  
/php-src/ext/domphp_dom.c 
  Log:
  fix bug #46849 (Cloning DOMDocument doesn't clone the properties)
  fix some warnings
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.115r2=1.116diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.115 php-src/ext/dom/php_dom.c:1.116
--- php-src/ext/dom/php_dom.c:1.115 Mon Nov 17 11:26:20 2008
+++ php-src/ext/dom/php_dom.c   Tue Dec 16 12:51:58 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.115 2008/11/17 11:26:20 felipe Exp $ */
+/* $Id: php_dom.c,v 1.116 2008/12/16 12:51:58 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -147,6 +147,31 @@
}
 }
 
+static void dom_copy_doc_props(php_libxml_ref_obj *source_doc, 
php_libxml_ref_obj *dest_doc)
+{
+   dom_doc_propsptr source, dest;
+   
+   if (source_doc  dest_doc) {
+   
+   source = dom_get_doc_props(source_doc);
+   dest = dom_get_doc_props(dest_doc);
+
+   dest-formatoutput = source-formatoutput;
+   dest-validateonparse = source-validateonparse;
+   dest-resolveexternals = source-resolveexternals;
+   dest-preservewhitespace = source-preservewhitespace;
+   dest-substituteentities = source-substituteentities;
+   dest-stricterror = source-stricterror;
+   dest-recover = source-recover;
+   if (source-classmap) {
+   ALLOC_HASHTABLE(dest-classmap);
+   zend_u_hash_init(dest-classmap, 0, NULL, NULL, 0, 
UG(unicode));
+   zend_hash_copy(dest-classmap, source-classmap, NULL, 
NULL, sizeof(zend_class_entry *));
+   }
+
+   }
+}
+
 int dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry 
*basece, zend_class_entry *ce TSRMLS_DC)
 {
dom_doc_propsptr doc_props;
@@ -1068,6 +1093,9 @@
}

php_libxml_increment_doc_ref((php_libxml_node_object *)clone, cloned_node-doc 
TSRMLS_CC);

php_libxml_increment_node_ptr((php_libxml_node_object *)clone, cloned_node, 
(void *)clone TSRMLS_CC);
+   if (intern-document != clone-document) {
+   dom_copy_doc_props(intern-document, 
clone-document);
+   }
}
 
}
@@ -1363,8 +1391,8 @@
 
while (nodep != NULL  (*cur = index || index == -1)) {
if (nodep-type == XML_ELEMENT_NODE) {
-   if (xmlStrEqual(nodep-name, local) || xmlStrEqual(*, 
local)) {
-   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, ns) || xmlStrEqual(*, ns {
+   if (xmlStrEqual(nodep-name, (xmlChar *)local) || 
xmlStrEqual((xmlChar *)*, (xmlChar *)local)) {
+   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, (xmlChar *)ns) || xmlStrEqual((xmlChar *)*, 
(xmlChar *)ns {
if (*cur == index) {
ret = nodep;
break;
@@ -1469,9 +1497,9 @@
return NAMESPACE_ERR;
}

-   *localname = xmlSplitQName2(qname, (xmlChar **) prefix);
+   *localname = (char *)xmlSplitQName2((xmlChar *)qname, (xmlChar **) 
prefix);
if (*localname == NULL) {
-   *localname = xmlStrdup(qname);
+   *localname = (char *)xmlStrdup(qname);
if (*prefix == NULL  uri_len == 0) {
return 0;
}
@@ -1507,10 +1535,10 @@
 
*errorcode = 0;
 
-   if (! ((prefix  !strcmp (prefix, xml  )  strcmp(uri, 
XML_XML_NAMESPACE)) ||
-  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, 
DOM_XMLNS_NAMESPACE)) ||
-  (prefix  !strcmp(uri, DOM_XMLNS_NAMESPACE)  strcmp 
(prefix, xmlns {
-   nsptr = xmlNewNs(nodep, uri, prefix);
+   if (! ((prefix  !strcmp (prefix, xml)  strcmp(uri, (char 
*)XML_XML_NAMESPACE)) ||
+  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, (char 
*)DOM_XMLNS_NAMESPACE)) ||
+  (prefix  !strcmp(uri, (char *)DOM_XMLNS_NAMESPACE)  
strcmp (prefix, xmlns {
+   nsptr = xmlNewNs(nodep, (xmlChar *)uri, (xmlChar *)prefix);
}
 
if (nsptr == NULL) {
@@ -1529,7 +1557,7 @@
if (node == NULL)
return NULL;
 
-   if (localName == NULL || xmlStrEqual(localName, )) {
+   if (localName == NULL || xmlStrEqual(localName, (xmlChar *))) {
  

[PHP-CVS] cvs: php-src /ext/imap php_imap.c

2008-12-16 Thread Zoe Slattery
zoe Tue Dec 16 21:08:50 2008 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c 
  Log:
  bug #46884 fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.265r2=1.266diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.265 php-src/ext/imap/php_imap.c:1.266
--- php-src/ext/imap/php_imap.c:1.265   Fri Dec  5 11:57:24 2008
+++ php-src/ext/imap/php_imap.c Tue Dec 16 21:08:50 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.265 2008/12/05 11:57:24 zoe Exp $ */
+/* $Id: php_imap.c,v 1.266 2008/12/16 21:08:50 zoe Exp $ */
 
 #define IMAP41
 
@@ -1560,6 +1560,12 @@
return;
}
 
+if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+RETURN_FALSE;
+}
+
+
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
if ((argc == 3)  (flags  FT_UID)) {
@@ -2151,6 +2157,12 @@
if (zend_parse_parameters(argc TSRMLS_CC, rl|l, streamind, msgno, 
flags) == FAILURE) {
return;
}
+
+if (flags  ((flags  ~FT_UID) != 0)) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+RETURN_FALSE;
+}
+

ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
@@ -2197,6 +2209,12 @@
return;
}
 
+if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+RETURN_FALSE;
+}
+
+
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
if (argc  4 || !(flags  FT_UID)) {
@@ -2915,13 +2933,20 @@
 PHP_FUNCTION(imap_fetchheader)
 {
zval *streamind;
-   long msgno, flags;
+   long msgno, flags=0L;
pils *imap_le_struct;
int msgindex, argc = ZEND_NUM_ARGS();

if (zend_parse_parameters(argc TSRMLS_CC, rl|l, streamind, msgno, 
flags) == FAILURE) {
return;
}
+
+
+if (flags  ((flags  ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) != 0)) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+RETURN_FALSE;
+}
+

ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);

@@ -3159,7 +3184,7 @@
return;
}
 
-   if (flags  ((flags  ~FT_UID) !=0)) { 
+   if (flags  ((flags  ~FT_UID) != 0)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
RETURN_FALSE;
}



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/imap php_imap.c

2008-12-16 Thread Zoe Slattery
zoe Tue Dec 16 21:10:16 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/imap   php_imap.c 
  Log:
  bug #46884 fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.25r2=1.208.2.7.2.26.2.26diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.25 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.26
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.25 Wed Dec  3 16:52:04 2008
+++ php-src/ext/imap/php_imap.c Tue Dec 16 21:10:16 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.25 2008/12/03 16:52:04 zoe Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.26 2008/12/16 21:10:16 zoe Exp $ */
 
 #define IMAP41
 
@@ -1575,6 +1575,11 @@
return;
}
 
+   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
+
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
if ((argc == 3)  (flags  FT_UID)) {
@@ -2166,6 +2171,11 @@
if (zend_parse_parameters(argc TSRMLS_CC, rl|l, streamind, msgno, 
flags) == FAILURE) {
return;
}
+
+   if (flags  ((flags  ~FT_UID) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }

ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
@@ -2211,6 +2221,11 @@
if (zend_parse_parameters(argc TSRMLS_CC, rls|l, streamind, msgno, 
sec, sec_len, flags) == FAILURE) {
return;
}
+   
+   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
 
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
@@ -2930,13 +2945,18 @@
 PHP_FUNCTION(imap_fetchheader)
 {
zval *streamind;
-   long msgno, flags;
+   long msgno, flags=0L;
pils *imap_le_struct;
int msgindex, argc = ZEND_NUM_ARGS();

if (zend_parse_parameters(argc TSRMLS_CC, rl|l, streamind, msgno, 
flags) == FAILURE) {
return;
}
+
+   if (flags  ((flags  ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }

ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);




-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap php_imap.c

2008-12-16 Thread Zoe Slattery
zoe Tue Dec 16 21:11:50 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/imap   php_imap.c 
  Log:
  bug #46884 fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.38r2=1.208.2.7.2.39diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.38 
php-src/ext/imap/php_imap.c:1.208.2.7.2.39
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.38  Fri Dec  5 11:59:01 2008
+++ php-src/ext/imap/php_imap.c Tue Dec 16 21:11:49 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.38 2008/12/05 11:59:01 zoe Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.39 2008/12/16 21:11:49 zoe Exp $ */
 
 #define IMAP41
 
@@ -1208,22 +1208,29 @@
Read the message body */
 PHP_FUNCTION(imap_body)
 {
-   zval **streamind, **msgno, **flags;
+   zval **streamind, **msgno, **pflags;
pils *imap_le_struct; 
int msgindex, myargc=ZEND_NUM_ARGS();
+   long flags=0L;
 
-   if (myargc  2 || myargc  3 || zend_get_parameters_ex(myargc, 
streamind, msgno, flags) == FAILURE) {
+   if (myargc  2 || myargc  3 || zend_get_parameters_ex(myargc, 
streamind, msgno, pflags) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
 
+
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);

convert_to_long_ex(msgno);
if (myargc == 3) {
-   convert_to_long_ex(flags);
+   convert_to_long_ex(pflags);
+   flags = Z_LVAL_PP(pflags);
+   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
invalid value for the options parameter);
+   RETURN_FALSE;
+   }
}
 
-   if ((myargc == 3)  (Z_LVAL_PP(flags)  FT_UID)) {
+   if ((myargc == 3)  (flags  FT_UID)) {
/* This should be cached; if it causes an extra RTT to the
   IMAP server, then that's the price we pay for making
   sure we don't crash. */
@@ -1236,7 +1243,7 @@
RETURN_FALSE;
}
 
-   RETVAL_STRING(mail_fetchtext_full (imap_le_struct-imap_stream, 
Z_LVAL_PP(msgno), NIL, myargc==3 ? Z_LVAL_PP(flags) : NIL), 1);
+   RETVAL_STRING(mail_fetchtext_full (imap_le_struct-imap_stream, 
Z_LVAL_PP(msgno), NIL, myargc==3 ? Z_LVAL_PP(pflags) : NIL), 1);
 }
 /* }}} */
 
@@ -1830,14 +1837,16 @@
Read the full structure of a message */
 PHP_FUNCTION(imap_fetchstructure)
 {
-   zval **streamind, **msgno, **flags;
+   zval **streamind, **msgno, **pflags;
pils *imap_le_struct;
BODY *body;
int msgindex, myargc=ZEND_NUM_ARGS();
+   long flags=0L;
 
-   if (myargc  2  || myargc  3 || zend_get_parameters_ex(myargc, 
streamind, msgno, flags) == FAILURE) {
+   if (myargc  2  || myargc  3 || zend_get_parameters_ex(myargc, 
streamind, msgno, pflags) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
+

ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
@@ -1846,12 +1855,18 @@
RETURN_FALSE;
}
if (myargc == 3) {
-   convert_to_long_ex(flags);
+   convert_to_long_ex(pflags);
+   flags = Z_LVAL_PP(pflags);
+
+   if (flags  ((flags  ~FT_UID) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
invalid value for the options parameter);
+   RETURN_FALSE;
+   }
}
 
object_init(return_value);
 
-   if ((myargc == 3)  (Z_LVAL_PP(flags)  FT_UID)) {
+   if ((myargc == 3)  (flags  FT_UID)) {
/* This should be cached; if it causes an extra RTT to the
   IMAP server, then that's the price we pay for making
   sure we don't crash. */
@@ -1861,7 +1876,7 @@
}
PHP_IMAP_CHECK_MSGNO(msgindex);
 
-   mail_fetchstructure_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), 
body , myargc == 3 ? Z_LVAL_PP(flags) : NIL);
+   mail_fetchstructure_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), 
body , myargc == 3 ? Z_LVAL_PP(pflags) : NIL);

if (!body) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, No body 
information available);
@@ -1876,30 +1891,37 @@
Get a specific body section */
 PHP_FUNCTION(imap_fetchbody)
 {
-   zval **streamind, **msgno, **sec, **flags;
+   zval **streamind, **msgno, **sec, **pflags;
pils *imap_le_struct;
char *body;
+long flags=0L;
unsigned long len;
int myargc=ZEND_NUM_ARGS();
 
-   if (myargc  3 || myargc  4 || zend_get_parameters_ex(myargc, 
streamind, msgno, sec, flags) == 

[PHP-CVS] cvs: win-installer / PHPInstallerBase52.wxs PHPInstallerBase52NTS.wxs PHPInstallerBase53.wxs PHPInstallerBase53NTS.wxs PHPInstallerBase60.wxs PHPInstallerBase60NTS.wxs

2008-12-16 Thread John Mertic
jmertic Tue Dec 16 21:12:25 2008 UTC

  Modified files:  
/win-installer  PHPInstallerBase52.wxs PHPInstallerBase52NTS.wxs 
PHPInstallerBase53.wxs PHPInstallerBase53NTS.wxs 
PHPInstallerBase60.wxs PHPInstallerBase60NTS.wxs 
  Log:
  Sync up the setttings for the CustomActions amongst the various PHP installer 
versions. Fixes Bug 46826.
  http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase52.wxs?r1=1.31r2=1.32diff_format=u
Index: win-installer/PHPInstallerBase52.wxs
diff -u win-installer/PHPInstallerBase52.wxs:1.31 
win-installer/PHPInstallerBase52.wxs:1.32
--- win-installer/PHPInstallerBase52.wxs:1.31   Fri Dec  5 12:33:13 2008
+++ win-installer/PHPInstallerBase52.wxsTue Dec 16 21:12:25 2008
@@ -118,7 +118,7 @@
 Custom Action=AssignAPACHEDIR After=CostInitializeNOT 
APACHEDIR/Custom
 Custom Action=AssignAPACHEDIR2 
After=CostInitializeAPACHEREGDIR/Custom
 /InstallUISequence
-
+
 Property Id=WEBSERVERPICKER
   RegistrySearch Id=webservertype 
 Root=HKLM 
@@ -337,7 +337,7 @@
 LongName=Programs
 Directory Id=ProgramMenuDir 
   Name=PHP5 
-  LongName=PHP 5 /
+  LongName=PHP 5/
   /Directory
   Directory Id=usrdirectory Name=usr
   Directory Id=mibsdirectory Name=mibs /
@@ -737,16 +737,16 @@
   Custom Action=fcgiconfigJSFastCGIremove After=InstallInitialize
 ![CDATA[((VersionNT = 501 AND ServicePackLevel = 2) OR (VersionNT = 
502 AND ServicePackLevel = 2)) AND iis4FastCGI = 2]]
   /Custom
-  Custom Action=unconfigIIS4 After=InstallInitialize
+  Custom Action=unconfigIIS4 After=InstallValidate
 ![CDATA[VersionNT  600 AND (iis4ISAPI = 2 OR iis4CGI = 2 OR 
iis4FastCGI = 2)]]
   /Custom
-  Custom Action=configIIS4 After=InstallInitialize
+  Custom Action=configIIS4 After=InstallFinalize
 ![CDATA[VersionNT  600 AND (iis4ISAPI = 3 OR iis4CGI = 3 OR 
iis4FastCGI = 3)]]
   /Custom
-  Custom Action=unconfigApache After=InstallInitialize
+  Custom Action=unconfigApache After=InstallValidate
 ![CDATA[apache13 = 2 OR apache20 = 2 OR apache22 = 2 OR apacheCGI 
= 2]]
   /Custom
-  Custom Action=configApache After=InstallInitialize
+  Custom Action=configApache After=InstallFinalize
 ![CDATA[apache13 = 3 OR apache20 = 3 OR apache22 = 3 OR apacheCGI 
= 3]]
   /Custom
   RemoveExistingProducts After=InstallValidate /
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase52NTS.wxs?r1=1.7r2=1.8diff_format=u
Index: win-installer/PHPInstallerBase52NTS.wxs
diff -u win-installer/PHPInstallerBase52NTS.wxs:1.7 
win-installer/PHPInstallerBase52NTS.wxs:1.8
--- win-installer/PHPInstallerBase52NTS.wxs:1.7 Mon Nov 10 19:13:10 2008
+++ win-installer/PHPInstallerBase52NTS.wxs Tue Dec 16 21:12:25 2008
@@ -317,7 +317,6 @@
   Name=PHP5 
   LongName=PHP 5/
   /Directory
-  
   Directory Id=usrdirectory Name=usr
   Directory Id=mibsdirectory Name=mibs /
   /Directory
@@ -497,10 +496,10 @@
   Custom Action=iis700FastCGIremove After=InstallInitialize
 ![CDATA[VersionNT = 600 AND iis4FastCGI = 2]]
   /Custom
-  Custom Action=fcgiconfigJSFastCGI After=InstallFinalize
+  Custom Action=fcgiconfigJSFastCGI After=InstallInitialize
 ![CDATA[((VersionNT = 501 AND ServicePackLevel = 2) OR (VersionNT = 
502 AND ServicePackLevel = 2)) AND iis4FastCGI = 3]]
   /Custom
-  Custom Action=fcgiconfigJSFastCGIremove After=InstallFinalize
+  Custom Action=fcgiconfigJSFastCGIremove After=InstallInitialize
 ![CDATA[((VersionNT = 501 AND ServicePackLevel = 2) OR (VersionNT = 
502 AND ServicePackLevel = 2)) AND iis4FastCGI = 2]]
   /Custom
   Custom Action=unconfigIIS4 After=InstallValidate
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase53.wxs?r1=1.7r2=1.8diff_format=u
Index: win-installer/PHPInstallerBase53.wxs
diff -u win-installer/PHPInstallerBase53.wxs:1.7 
win-installer/PHPInstallerBase53.wxs:1.8
--- win-installer/PHPInstallerBase53.wxs:1.7Fri Dec  5 12:33:13 2008
+++ win-installer/PHPInstallerBase53.wxsTue Dec 16 21:12:25 2008
@@ -118,7 +118,7 @@
 Custom Action=AssignAPACHEDIR After=CostInitializeNOT 
APACHEDIR/Custom
 Custom Action=AssignAPACHEDIR2 
After=CostInitializeAPACHEREGDIR/Custom
 /InstallUISequence
-
+
 Property Id=WEBSERVERPICKER
   RegistrySearch Id=webservertype 
 Root=HKLM 
@@ -319,7 +319,7 @@
 LongName=Programs
 Directory Id=ProgramMenuDir 
   Name=PHP5 
-  LongName=PHP 5 /
+  LongName=PHP 5/
   /Directory
 /Directory
 Feature AllowAdvertise=no 
@@ -384,10 +384,8 @@
   Title=$(loc.Featureapache13Title) 
   Description=$(loc.Featureapache13Description) 
   Level=10
-!--
   ComponentRef Id=php5apacheDLL/
 

[PHP-CVS] cvs: php-src /ext/imap php_imap.c

2008-12-16 Thread Zoe Slattery
zoe Tue Dec 16 21:34:16 2008 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c 
  Log:
  bug #46837 fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.266r2=1.267diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.266 php-src/ext/imap/php_imap.c:1.267
--- php-src/ext/imap/php_imap.c:1.266   Tue Dec 16 21:08:50 2008
+++ php-src/ext/imap/php_imap.c Tue Dec 16 21:34:16 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.266 2008/12/16 21:08:50 zoe Exp $ */
+/* $Id: php_imap.c,v 1.267 2008/12/16 21:34:16 zoe Exp $ */
 
 #define IMAP41
 
@@ -1483,6 +1483,13 @@
 
if (argc == 2) {
flags = options;
+
+/* Check that flags is exactly equal to PHP_EXPUNGE or zero */
+if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
+ RETURN_FALSE;
+}
+
/* Do the translation from PHP's internal PHP_EXPUNGE define to 
c-client's CL_EXPUNGE */
if (flags  PHP_EXPUNGE) {
flags ^= PHP_EXPUNGE;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/imap php_imap.c

2008-12-16 Thread Zoe Slattery
zoe Tue Dec 16 21:35:01 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/imap   php_imap.c 
  Log:
  bug #46837 fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.26r2=1.208.2.7.2.26.2.27diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.26 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.27
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.26 Tue Dec 16 21:10:16 2008
+++ php-src/ext/imap/php_imap.c Tue Dec 16 21:35:01 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.26 2008/12/16 21:10:16 zoe Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.27 2008/12/16 21:35:01 zoe Exp $ */
 
 #define IMAP41
 
@@ -1498,6 +1498,13 @@
 
if (argc == 2) {
flags = options;
+
+/* Check that flags is exactly equal to PHP_EXPUNGE or zero */
+if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
+ RETURN_FALSE;
+} 
+
/* Do the translation from PHP's internal PHP_EXPUNGE define to 
c-client's CL_EXPUNGE */
if (flags  PHP_EXPUNGE) {
flags ^= PHP_EXPUNGE;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap php_imap.c

2008-12-16 Thread Zoe Slattery
zoe Tue Dec 16 21:35:42 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/imap   php_imap.c 
  Log:
  bug #46837 fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.39r2=1.208.2.7.2.40diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.39 
php-src/ext/imap/php_imap.c:1.208.2.7.2.40
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.39  Tue Dec 16 21:11:49 2008
+++ php-src/ext/imap/php_imap.c Tue Dec 16 21:35:42 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.39 2008/12/16 21:11:49 zoe Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.40 2008/12/16 21:35:42 zoe Exp $ */
 
 #define IMAP41
 
@@ -1140,6 +1140,13 @@
if (myargcount == 2) {
convert_to_long_ex(options);
flags = Z_LVAL_PP(options);
+
+/* Check that flags is exactly equal to PHP_EXPUNGE or Zero*/
+if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
+php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
+ RETURN_FALSE;
+}
+
/* Do the translation from PHP's internal PHP_EXPUNGE define to 
c-client's CL_EXPUNGE */
if (flags  PHP_EXPUNGE) {
flags ^= PHP_EXPUNGE;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xmlrpc/libxmlrpc xml_element.c

2008-12-16 Thread Ilia Alshanetsky
iliaa   Wed Dec 17 00:30:27 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlrpc/libxmlrpc   xml_element.c 
  Log:
  
  Removed unused variable
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xml_element.c?r1=1.9.4.1.2.1r2=1.9.4.1.2.2diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xml_element.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.9.4.1.2.1 
php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.9.4.1.2.2
--- php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.9.4.1.2.1  Tue Dec  9 
17:22:12 2008
+++ php-src/ext/xmlrpc/libxmlrpc/xml_element.c  Wed Dec 17 00:30:27 2008
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xml_element.c,v 1.9.4.1.2.1 2008/12/09 
17:22:12 iliaa Exp $;
+static const char rcsid[] = #(@) $Id: xml_element.c,v 1.9.4.1.2.2 2008/12/17 
00:30:27 iliaa Exp $;
 
 
 
@@ -44,6 +44,10 @@
  *   06/2000
  * HISTORY
  *   $Log: xml_element.c,v $
+ *   Revision 1.9.4.1.2.2  2008/12/17 00:30:27  iliaa
+ *
+ *   Removed unused variable
+ *
  *   Revision 1.9.4.1.2.1  2008/12/09 17:22:12  iliaa
  *
  *   MFH: Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable 
error
@@ -721,7 +725,7 @@
  int line_num = XML_GetCurrentLineNumber(parser);
  int col_num = XML_GetCurrentColumnNumber(parser);
  long byte_idx = XML_GetCurrentByteIndex(parser);
- int byte_total = XML_GetCurrentByteCount(parser);
+/* int byte_total = XML_GetCurrentByteCount(parser); */
  const char * error_str = XML_ErrorString(err_code);
  if(byte_idx = 0) {
  snprintf(buf, 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlrpc/libxmlrpc xml_element.c

2008-12-16 Thread Ilia Alshanetsky
iliaa   Wed Dec 17 00:30:48 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/xmlrpc/libxmlrpc   xml_element.c 
  Log:
  
  MFH: removed unused var
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xml_element.c?r1=1.9.4.1r2=1.9.4.2diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xml_element.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.9.4.1 
php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.9.4.2
--- php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.9.4.1  Sun Jul 30 11:34:02 2006
+++ php-src/ext/xmlrpc/libxmlrpc/xml_element.c  Wed Dec 17 00:30:48 2008
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xml_element.c,v 1.9.4.1 2006/07/30 
11:34:02 tony2001 Exp $;
+static const char rcsid[] = #(@) $Id: xml_element.c,v 1.9.4.2 2008/12/17 
00:30:48 iliaa Exp $;
 
 
 
@@ -44,6 +44,10 @@
  *   06/2000
  * HISTORY
  *   $Log: xml_element.c,v $
+ *   Revision 1.9.4.2  2008/12/17 00:30:48  iliaa
+ *
+ *   MFH: removed unused var
+ *
  *   Revision 1.9.4.1  2006/07/30 11:34:02  tony2001
  *   MFH: fix compile warnings (#38257)
  *
@@ -716,7 +720,7 @@
  int line_num = XML_GetCurrentLineNumber(parser);
  int col_num = XML_GetCurrentColumnNumber(parser);
  long byte_idx = XML_GetCurrentByteIndex(parser);
- int byte_total = XML_GetCurrentByteCount(parser);
+/* int byte_total = XML_GetCurrentByteCount(parser); */
  const char * error_str = XML_ErrorString(err_code);
  if(byte_idx = 0) {
  snprintf(buf, 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/xmlrpc/libxmlrpc xml_element.c

2008-12-16 Thread Ilia Alshanetsky
iliaa   Wed Dec 17 00:30:59 2008 UTC

  Modified files:  
/php-src/ext/xmlrpc/libxmlrpc   xml_element.c 
  Log:
  
  MFB: removed unused var
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xml_element.c?r1=1.12r2=1.13diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xml_element.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.12 
php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.13
--- php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.12 Tue Dec  9 17:20:57 2008
+++ php-src/ext/xmlrpc/libxmlrpc/xml_element.c  Wed Dec 17 00:30:59 2008
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xml_element.c,v 1.12 2008/12/09 
17:20:57 iliaa Exp $;
+static const char rcsid[] = #(@) $Id: xml_element.c,v 1.13 2008/12/17 
00:30:59 iliaa Exp $;
 
 
 
@@ -44,6 +44,10 @@
  *   06/2000
  * HISTORY
  *   $Log: xml_element.c,v $
+ *   Revision 1.13  2008/12/17 00:30:59  iliaa
+ *
+ *   MFB: removed unused var
+ *
  *   Revision 1.12  2008/12/09 17:20:57  iliaa
  *   Comment out fprintf() use inside the library
  *
@@ -722,7 +726,7 @@
  int line_num = XML_GetCurrentLineNumber(parser);
  int col_num = XML_GetCurrentColumnNumber(parser);
  long byte_idx = XML_GetCurrentByteIndex(parser);
- int byte_total = XML_GetCurrentByteCount(parser);
+/* int byte_total = XML_GetCurrentByteCount(parser); */
  const char * error_str = XML_ErrorString(err_code);
  if(byte_idx = 0) {
  snprintf(buf, 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php