[Pkg-owncloud-commits] [php-sabredav] 05/66: Better xml formatting.
David Prévot
taffit at moszumanska.debian.org
Wed May 27 13:56:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 3.0.0-alpha1
in repository php-sabredav.
commit 1a4f158d76fd97c11316987bd66dd27ff8903499
Author: Evert Pot <me at evertpot.com>
Date: Mon Apr 13 14:48:25 2015 -0400
Better xml formatting.
---
lib/DAV/Browser/Plugin.php | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/DAV/Browser/Plugin.php b/lib/DAV/Browser/Plugin.php
index 1d06ea6..013d16f 100644
--- a/lib/DAV/Browser/Plugin.php
+++ b/lib/DAV/Browser/Plugin.php
@@ -772,10 +772,9 @@ HTML;
$xml = $this->server->xml->write('{DAV:}root', $value, $this->server->getBaseUri());
// removing first and last line, as they contain our root
// element.
- $xml = substr($xml, strpos($xml,"\n")+1);
- $xml = substr($xml, 0, strrpos($xml,"\n"));
- $xml = substr($xml, 0, strrpos($xml,"\n"));
- echo "<pre>", $this->escapeHtml($xml), "</pre>";
+ $xml = explode("\n", $xml);
+ $xml = array_slice($xml, 2, -2);
+ echo "<pre>", $this->escapeHtml(implode("\n", $xml)), "</pre>";
break;
case 'complex' :
echo '<em title="' . $this->escapeHTML(get_class($value)) . '">complex</em>';
--
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