[Pkg-owncloud-commits] [php-sabredav] 01/12: Fixed encoding of base path.

David Prévot taffit at moszumanska.debian.org
Wed May 27 13:56:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch 2.1
in repository php-sabredav.

commit 809033f1f9b991ebbe7902726cc4302df95d1052
Author: Evert Pot <me at evertpot.com>
Date:   Mon May 11 17:54:58 2015 +0200

    Fixed encoding of base path.
    
    Fixes #651.
---
 ChangeLog.md               | 7 +++++++
 lib/DAV/Browser/Plugin.php | 4 ++--
 lib/DAV/Version.php        | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog.md b/ChangeLog.md
index 7fa5012..cec7cf7 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,6 +1,13 @@
 ChangeLog
 =========
 
+2.1.4 (2015-??-??)
+------------------
+
+* #651: Double-encoded path in the browser plugin. Should fix a few broken
+  links in some setups.
+
+
 2.1.3 (2015-02-25)
 ------------------
 
diff --git a/lib/DAV/Browser/Plugin.php b/lib/DAV/Browser/Plugin.php
index e8d8dca..4573c2d 100644
--- a/lib/DAV/Browser/Plugin.php
+++ b/lib/DAV/Browser/Plugin.php
@@ -225,7 +225,7 @@ HTML;
         // If the path is empty, there's no parent.
         if ($path)  {
             list($parentUri) = URLUtil::splitPath($path);
-            $fullPath = URLUtil::encodePath($this->server->getBaseUri() . $parentUri);
+            $fullPath = $this->server->getBaseUri() . URLUtil::encodePath($parentUri);
             $html.='<a href="' . $fullPath . '" class="btn">⇤ Go to parent</a>';
         } else {
             $html.='<span class="btn disabled">⇤ Go to parent</span>';
@@ -250,7 +250,7 @@ HTML;
             foreach($subNodes as $subPath=>$subProps) {
 
                 $subNode = $this->server->tree->getNodeForPath($subPath);
-                $fullPath = URLUtil::encodePath($this->server->getBaseUri() . $subPath);
+                $fullPath = $this->server->getBaseUri() . URLUtil::encodePath($subPath);
                 list(, $displayPath) = URLUtil::splitPath($subPath);
 
                 $subNodes[$subPath]['subNode'] = $subNode;
diff --git a/lib/DAV/Version.php b/lib/DAV/Version.php
index a26fa99..c2cf998 100644
--- a/lib/DAV/Version.php
+++ b/lib/DAV/Version.php
@@ -14,6 +14,6 @@ class Version {
     /**
      * Full version number
      */
-    const VERSION = '2.1.3';
+    const VERSION = '2.1.4';
 
 }

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