[Pkg-owncloud-commits] [php-sabredav] 53/66: Removing properties from browser plugin that are not that interesting.

David Prévot taffit at moszumanska.debian.org
Wed May 27 13:56:56 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 3c24b617480b0a539aa97271ed50f7e2f87e3553
Author: Evert Pot <me at evertpot.com>
Date:   Wed Apr 29 17:54:07 2015 -0400

    Removing properties from browser plugin that are not that interesting.
---
 lib/DAV/Browser/Plugin.php | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/lib/DAV/Browser/Plugin.php b/lib/DAV/Browser/Plugin.php
index e777761..9fb97f5 100644
--- a/lib/DAV/Browser/Plugin.php
+++ b/lib/DAV/Browser/Plugin.php
@@ -40,6 +40,20 @@ class Plugin extends DAV\ServerPlugin {
     protected $enablePost = true;
 
     /**
+     * A list of properties that are usually not interesting. This can cut down
+     * the browser output a bit by removing the properties that most people
+     * will likely not want to see.
+     *
+     * @var array
+     */
+    public $uninterestingProperties = [
+        '{DAV:}supportedlock',
+        '{DAV:}acl-restrictions',
+        '{DAV:}supported-privilege-set',
+        '{DAV:}supported-method-set',
+    ];
+
+    /**
      * Creates the object.
      *
      * By default it will allow file creation and uploads.
@@ -327,7 +341,9 @@ class Plugin extends DAV\ServerPlugin {
         $properties = $propFind->getResultForMultiStatus()[200];
 
         foreach($properties as $propName => $propValue) {
-            $html.=$this->drawPropertyRow($propName, $propValue);
+            if (!in_array($propName, $this->uninterestingProperties)) {
+                $html.=$this->drawPropertyRow($propName, $propValue);
+            }
 
         }
 

-- 
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