diff options
Diffstat (limited to 'include/ws_protocols')
-rw-r--r-- | include/ws_protocols/index.php | 2 | ||||
-rw-r--r-- | include/ws_protocols/json_encoder.php | 2 | ||||
-rw-r--r-- | include/ws_protocols/php_encoder.php | 2 | ||||
-rw-r--r-- | include/ws_protocols/rest_encoder.php | 12 | ||||
-rw-r--r-- | include/ws_protocols/rest_handler.php | 4 | ||||
-rw-r--r-- | include/ws_protocols/xmlrpc_encoder.php | 2 |
6 files changed, 11 insertions, 13 deletions
diff --git a/include/ws_protocols/index.php b/include/ws_protocols/index.php index 41732f2fd..c8de97f60 100644 --- a/include/ws_protocols/index.php +++ b/include/ws_protocols/index.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ diff --git a/include/ws_protocols/json_encoder.php b/include/ws_protocols/json_encoder.php index 7d400aae8..695498b74 100644 --- a/include/ws_protocols/json_encoder.php +++ b/include/ws_protocols/json_encoder.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ diff --git a/include/ws_protocols/php_encoder.php b/include/ws_protocols/php_encoder.php index 5d18d680c..485ad89ea 100644 --- a/include/ws_protocols/php_encoder.php +++ b/include/ws_protocols/php_encoder.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ diff --git a/include/ws_protocols/rest_encoder.php b/include/ws_protocols/rest_encoder.php index 5f86acb6d..2c8dbd698 100644 --- a/include/ws_protocols/rest_encoder.php +++ b/include/ws_protocols/rest_encoder.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -66,7 +66,7 @@ class PwgXmlWriter } $this->_output( '<'.$name ); $this->_lastTagOpen = true; - array_push( $this->_elementStack, $name); + $this->_elementStack[] = $name; } function end_element($x) @@ -226,11 +226,9 @@ class PwgRestEncoder extends PwgResponseEncoder continue; if ( is_null($value) ) continue; // null means we dont put it - if ($name!=WS_XML_CONTENT) - $this->_writer->start_element($name); + $this->_writer->start_element($name); $this->encode($value); - if ($name!=WS_XML_CONTENT) - $this->_writer->end_element($name); + $this->_writer->end_element($name); } } @@ -270,7 +268,7 @@ class PwgRestEncoder extends PwgResponseEncoder $this->encode_array($data->_content, $data->_itemName, $data->_xmlAttributes); break; case 'pwgnamedstruct': - $this->encode_array( array($data->_content), $data->_name, $data->_xmlAttributes); + $this->encode_struct($data->_content, false, $data->_xmlAttributes); break; default: $this->encode_struct(get_object_vars($data), true); diff --git a/include/ws_protocols/rest_handler.php b/include/ws_protocols/rest_handler.php index b00987e02..e706ef7fa 100644 --- a/include/ws_protocols/rest_handler.php +++ b/include/ws_protocols/rest_handler.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -21,7 +21,7 @@ // | USA. | // +-----------------------------------------------------------------------+ -class PwgRestRequestHandler +class PwgRestRequestHandler extends PwgRequestHandler { function handleRequest(&$service) { diff --git a/include/ws_protocols/xmlrpc_encoder.php b/include/ws_protocols/xmlrpc_encoder.php index 629b77e75..d081f6d27 100644 --- a/include/ws_protocols/xmlrpc_encoder.php +++ b/include/ws_protocols/xmlrpc_encoder.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ |