[Pkg-owncloud-commits] [php-sabredav] 17/148: Temporarily showing rather ugly xml in the browser plugin.
David Prévot
taffit at moszumanska.debian.org
Wed Apr 15 01:37:03 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 17201a48a263089eef4a823aa083f70fe6493774
Author: Evert Pot <me at evertpot.com>
Date: Fri Feb 6 00:14:13 2015 -0500
Temporarily showing rather ugly xml in the browser plugin.
---
lib/DAV/Browser/Plugin.php | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/lib/DAV/Browser/Plugin.php b/lib/DAV/Browser/Plugin.php
index d5075fe..6294f4d 100644
--- a/lib/DAV/Browser/Plugin.php
+++ b/lib/DAV/Browser/Plugin.php
@@ -2,11 +2,11 @@
namespace Sabre\DAV\Browser;
-use
- Sabre\DAV,
- Sabre\HTTP\URLUtil,
- Sabre\HTTP\RequestInterface,
- Sabre\HTTP\ResponseInterface;
+use Sabre\DAV;
+use Sabre\HTTP\URLUtil;
+use Sabre\HTTP\RequestInterface;
+use Sabre\HTTP\ResponseInterface;
+use Sabre\Xml\Writer as XmlWriter;
/**
* Browser Plugin
@@ -639,8 +639,9 @@ HTML;
'Sabre\\DAV\\Xml\\Property\\SupportedMethodSet' => 'valuelist',
'Sabre\\DAV\\Xml\\Property\\ResourceType' => 'xmlvaluelist',
'Sabre\\DAV\\Xml\\Property\\SupportedReportSet' => 'xmlvaluelist',
- 'Sabre\\DAVACL\\Property\\CurrentUserPrivilegeSet' => 'xmlvaluelist',
- 'Sabre\\DAVACL\\Property\\SupportedPrivilegeSet' => 'supported-privilege-set',
+ 'Sabre\\DAVACL\\Xml\\Property\\CurrentUserPrivilegeSet' => 'xmlvaluelist',
+ 'Sabre\\DAVACL\\Xml\\Property\\SupportedPrivilegeSet' => 'supported-privilege-set',
+ 'Sabre\\Xml\\XmlSerializable' => 'xml',
];
$view = 'complex';
@@ -718,6 +719,13 @@ HTML;
case 'string' :
echo $this->escapeHTML($value);
break;
+ case 'xml' :
+ $writer = new XmlWriter();
+ $writer->openMemory();
+ $writer->namespaceMap = $this->server->xml->namespaceMap;
+ $writer->write($value);
+ echo $this->escapeHtml($writer->outputMemory());
+ break;
case 'complex' :
echo '<em title="' . get_class($value) . '">complex</em>';
break;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list