[Pkg-owncloud-commits] [php-sabredav] 62/148: Merge branch 'master' into xml-rewrite2

David Prévot taffit at moszumanska.debian.org
Wed Apr 15 01:37:15 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 919bb7450acda4a0159ff9d92dfd1a8015bb8511
Merge: 4222728 f91b398
Author: Evert Pot <me at evertpot.com>
Date:   Wed Mar 4 15:08:01 2015 -0500

    Merge branch 'master' into xml-rewrite2
    
    Conflicts:
    	composer.json

 .travis.yml                                        |   3 +-
 ChangeLog.md => CHANGELOG.md                       |  35 +++-
 bin/build.php                                      |  14 +-
 bin/naturalselection                               |  28 +--
 composer.json                                      |   4 +-
 lib/DAV/Browser/Plugin.php                         |  17 +-
 lib/DAV/FS/Directory.php                           |   4 +-
 lib/DAV/FS/File.php                                |   7 +-
 lib/DAV/FS/Node.php                                |   2 -
 lib/DAV/FSExt/Directory.php                        |  11 +-
 lib/DAV/FSExt/File.php                             |  16 +-
 .../PropertyStorage/Backend/BackendInterface.php   |  16 ++
 lib/DAV/PropertyStorage/Backend/PDO.php            |  31 ++-
 lib/DAV/PropertyStorage/Plugin.php                 |  15 ++
 lib/DAV/Server.php                                 |  20 +-
 lib/DAV/SimpleFile.php                             |   2 +-
 lib/DAV/Version.php                                |   2 +-
 tests/Sabre/DAV/Browser/PluginTest.php             |  10 +
 tests/Sabre/DAV/FSExt/FileTest.php                 |  73 ++++---
 tests/Sabre/DAV/FSExt/ServerTest.php               |  18 +-
 tests/Sabre/DAV/Locks/PluginTest.php               |   9 +-
 .../PropertyStorage/Backend/AbstractPDOTest.php    |  17 ++
 tests/Sabre/DAV/ServerRangeTest.php                | 137 ++++++------
 tests/Sabre/DAV/ServerSimpleTest.php               | 233 +++++++++++----------
 tests/Sabre/DAV/SimpleFileTest.php                 |   2 +-
 25 files changed, 458 insertions(+), 268 deletions(-)

diff --cc composer.json
index 009202b,563cca8..433d28e
--- a/composer.json
+++ b/composer.json
@@@ -15,10 -15,9 +15,10 @@@
      ],
      "require": {
          "php": ">=5.4.1",
-         "sabre/vobject": "~3.3.4",
+         "sabre/vobject": ">=3.3.4 <4",
          "sabre/event" : "~2.0.0",
 +        "sabre/xml"  : "~0.3.1",
-         "sabre/http" : "dev-master",
+         "sabre/http" : "~4.0.0-alpha1",
          "sabre/uri" : "~1.0",
          "ext-dom": "*",
          "ext-pcre": "*",
diff --cc lib/DAV/Browser/Plugin.php
index a2aba26,d7cda19..29b2cfb
--- a/lib/DAV/Browser/Plugin.php
+++ b/lib/DAV/Browser/Plugin.php
@@@ -628,18 -634,18 +633,18 @@@ HTML
      private function drawPropertyRow($name, $value) {
  
          $view = 'unknown';
-         if (is_string($value)) {
+         if (is_scalar($value)) {
              $view = 'string';
 -        } elseif($value instanceof DAV\Property) {
 +        } elseif($value instanceof \Sabre\Xml\XmlSerializable) {
  
              $mapping = [
 -                'Sabre\\DAV\\Property\\IHref' => 'href',
 -                'Sabre\\DAV\\Property\\HrefList' => 'hreflist',
 -                'Sabre\\DAV\\Property\\SupportedMethodSet' => 'valuelist',
 -                'Sabre\\DAV\\Property\\ResourceType' => 'xmlvaluelist',
 -                'Sabre\\DAV\\Property\\SupportedReportSet' => 'xmlvaluelist',
 -                'Sabre\\DAVACL\\Property\\CurrentUserPrivilegeSet' => 'xmlvaluelist',
 -                'Sabre\\DAVACL\\Property\\SupportedPrivilegeSet' => 'supported-privilege-set',
 +                'Sabre\\DAV\\Xml\\Property\\Href' => 'href',
 +                'Sabre\\DAV\\Xml\\Property\\SupportedMethodSet' => 'valuelist',
 +                'Sabre\\DAV\\Xml\\Property\\ResourceType' => 'xmlvaluelist',
 +                'Sabre\\DAV\\Xml\\Property\\SupportedReportSet' => 'xmlvaluelist',
 +                'Sabre\\DAVACL\\Xml\\Property\\CurrentUserPrivilegeSet' => 'xmlvaluelist',
 +                'Sabre\\DAVACL\\Xml\\Property\\SupportedPrivilegeSet' => 'supported-privilege-set',
 +                'Sabre\\Xml\\XmlSerializable' => 'xml',
              ];
  
              $view = 'complex';
@@@ -714,17 -723,8 +719,17 @@@
              case 'string' :
                  echo $this->escapeHTML($value);
                  break;
 +            case 'xml' :
 +                $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>";
 +                break;
              case 'complex' :
-                 echo '<em title="' . get_class($value) . '">complex</em>';
+                 echo '<em title="' . $this->escapeHTML(get_class($value)) . '">complex</em>';
                  break;
              default :
                  echo '<em>unknown</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