rrichards               Mon Aug 28 19:31:51 2006 UTC

  Modified files:              
    /php-src/ext/dom    document.c 
  Log:
  implement output formatting for saveHTML with libxml 2.6.23+
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.78&r2=1.79&diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.78 php-src/ext/dom/document.c:1.79
--- php-src/ext/dom/document.c:1.78     Sat Aug  5 12:33:34 2006
+++ php-src/ext/dom/document.c  Mon Aug 28 19:31:51 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: document.c,v 1.78 2006/08/05 12:33:34 rrichards Exp $ */
+/* $Id: document.c,v 1.79 2006/08/28 19:31:51 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2240,7 +2240,8 @@
        xmlDoc *docp;
        dom_object *intern;
        xmlChar *mem;
-       int size;
+       int size, format;
+       dom_doc_propsptr doc_props;
 
        if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"O", &id, dom_document_class_entry) == FAILURE) {
                return;
@@ -2248,7 +2249,15 @@
 
        DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
 
+#if LIBXML_VERSION >= 20623
+       doc_props = dom_get_doc_props(intern->document);
+       format = doc_props->formatoutput;
+
+       htmlDocDumpMemoryFormat(docp, &mem, &size, format);
+#else
        htmlDocDumpMemory(docp, &mem, &size);
+#endif
+
        if (!size) {
                if (mem)
                        xmlFree(mem);

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

Reply via email to