[PHP-DEV] domxml patch

2002-06-04 Thread Rob Richards

can someone apply this patch to cvs for me. it fixes the problem reported in
bug # 17560
i think i have solved the attachment problems, let me know if people still
cant get my attachments.

xmlKeepBlanksDefault default is 1 if not set. once set it remains at the new
value until changed.
the patch just resets it to its previous value before the formatting.
bug is only reproduceable when running php as a mod.

thanks

rob


Index: php_domxml.c
===
RCS file: /repository/php4/ext/domxml/php_domxml.c,v
retrieving revision 1.161
diff -u -r1.161 php_domxml.c
--- php_domxml.c31 May 2002 06:14:29 -  1.161
+++ php_domxml.c4 Jun 2002 12:55:47 -
@@ -3238,19 +3238,20 @@
xmlDoc *docp;
xmlChar *mem;
int format = 0;
-   int size;
+   int size, keepblanks;
int encoding_len = 0;
char *encoding;
 
 
DOMXML_PARAM_THREE(docp, id, le_domxmldocp, "|ls", &format, &encoding, 
&encoding_len);
if (format) {
-   xmlKeepBlanksDefault(0);
+   keepblanks = xmlKeepBlanksDefault(0);
if (encoding_len) {
xmlDocDumpFormatMemoryEnc(docp, &mem, &size, encoding, format);
} else {
xmlDocDumpFormatMemory(docp, &mem, &size, format);
}
+   xmlKeepBlanksDefault(keepblanks);
} else {
if (encoding_len) {
xmlDocDumpMemoryEnc(docp, &mem, &size, encoding);



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


[PHP-DEV] domxml patch

2002-06-05 Thread Rob Richards

can someone apply this patch to cvs for me.
it fixes a problem in domxml_dump_mem_file with xmlKeepBlanksDefault not
being reset when the formatting parameter is true.
same problem that was in domxml_dump_mem, but missed this function
yesterday.

thanks

rob


Index: php_domxml.c
===
RCS file: /repository/php4/ext/domxml/php_domxml.c,v
retrieving revision 1.163
diff -u -r1.163 php_domxml.c
--- php_domxml.c4 Jun 2002 14:30:12 -   1.163
+++ php_domxml.c5 Jun 2002 15:02:05 -
@@ -3274,7 +3274,7 @@
 {
zval *id;
xmlDoc *docp;
-   int file_len, bytes;
+   int file_len, bytes, keepblanks;
int format = 0;
int compressmode = 0;
char *file;
@@ -3284,8 +3284,9 @@
xmlSetCompressMode(compressmode);
 
if (format) {
-   xmlKeepBlanksDefault(0);
+   keepblanks = xmlKeepBlanksDefault(0);
bytes = xmlSaveFormatFile(file, docp, format);
+   xmlKeepBlanksDefault(keepblanks);
} else {
bytes = xmlSaveFile(file, docp);
}



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


Re: [PHP-DEV] domxml patch

2002-06-05 Thread derick

Hoi,

I committed this (and yesterday's fix).
Thanks!

Derick

On Wed, 5 Jun 2002, Rob Richards wrote:

> can someone apply this patch to cvs for me.
> it fixes a problem in domxml_dump_mem_file with xmlKeepBlanksDefault not
> being reset when the formatting parameter is true.
> same problem that was in domxml_dump_mem, but missed this function
> yesterday.
> 
> thanks
> 
> rob
> 

---
 Did I help you?   http://www.jdimedia.nl/derick/link.php?url=giftlist
 Frequent ranting: http://www.jdimedia.nl/derick/
---
 PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


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