[Pkg-owncloud-commits] [php-sabredav] 09/23: Slightly faster tffp

David Prévot taffit at moszumanska.debian.org
Sat Nov 30 15:44:01 UTC 2013


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

taffit pushed a commit to tag version-1.0.12
in repository php-sabredav.

commit 85f95aa0cddfdd53a4020dc7395a0d882499ab25
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Fri Mar 26 16:52:04 2010 +0900

    Slightly faster tffp
---
 lib/Sabre/DAV/TemporaryFileFilterPlugin.php | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/Sabre/DAV/TemporaryFileFilterPlugin.php b/lib/Sabre/DAV/TemporaryFileFilterPlugin.php
index 1f80627..ea80998 100644
--- a/lib/Sabre/DAV/TemporaryFileFilterPlugin.php
+++ b/lib/Sabre/DAV/TemporaryFileFilterPlugin.php
@@ -149,18 +149,15 @@ class Sabre_DAV_TemporaryFileFilterPlugin extends Sabre_DAV_ServerPlugin {
             '/^\.dat(.*)$/',   // Smultron seems to create these
         );
 
-        $match = false;
         foreach($tempFiles as $tempFile) {
 
-            if (preg_match($tempFile,$tempPath)) $match = true; 
+            if (preg_match($tempFile,$tempPath)) {
+                return $this->dataDir . '/sabredav_' . md5($path) . '.tempfile';
+            }
 
         }
 
-        if ($match) {
-            return $this->dataDir . '/sabredav_' . md5($path) . '.tempfile';
-        } else {
-            return false;
-        }
+        return false;
 
     }
 

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