diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-02-27 12:32:23 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-02-27 12:32:23 +0000 |
commit | dca9bd094a4231ba931abac2af33119f2079601d (patch) | |
tree | 3c4bc02256a06cbc980452cad453bc3abff46f49 /include/ws_protocols | |
parent | 7053787d1f4d4500080185af6878835217aa17a5 (diff) |
- function delete_user now clears asssociated data in the caddie table and the sessions table
- xml writer improvement for web service
git-svn-id: http://piwigo.org/svn/trunk@1863 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/ws_protocols/rest_encoder.php | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/include/ws_protocols/rest_encoder.php b/include/ws_protocols/rest_encoder.php index c66cf2536..9352e5644 100644 --- a/include/ws_protocols/rest_encoder.php +++ b/include/ws_protocols/rest_encoder.php @@ -3,11 +3,10 @@ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ -// | branch : BSF (Best So Far) -// | file : $URL: svn+ssh://rvelices@svn.gna.org/svn/phpwebgallery/trunk/action.php $ -// | last update : $Date: 2006-12-21 18:49:12 -0500 (Thu, 21 Dec 2006) $ -// | last modifier : $Author: rvelices $ -// | revision : $Rev: 1678 $ +// | file : $Id$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | // | it under the terms of the GNU General Public License as published by | @@ -84,15 +83,17 @@ class PwgXmlWriter { $this->_end_prev(false); $value = (string)$value; - $need_cdata = (strpos($value, "\r")!==false)?true:false; - if ($need_cdata) - { - $this->_output( '<![CDATA[' . $value . ']]>' ); - } - else - { - $this->_output( htmlspecialchars( $value ) ); - } + $this->_output( htmlspecialchars( $value ) ); + } + + function write_cdata($value) + { + $this->_end_prev(false); + $value = (string)$value; + $this->_output( + '<![CDATA[' + . str_replace(']]>', ']]>', $value) + . ']]>' ); } function write_attribute($name, $value) @@ -164,8 +165,6 @@ class PwgRestEncoder extends PwgResponseEncoder return $ret; } -//parent::flattenResponse($response); - $this->_writer = new PwgXmlWriter(); $this->encode($response); $ret = $this->_writer->getOutput(); |