From: Robin Appelman Date: Sat, 22 Oct 2011 12:10:51 +0000 (+0200) Subject: add option to dissable fileproxies X-Git-Tag: v4.0.0beta~440^2~76 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=82394f9527817673f3ecbf7e5fd1d4857f0f3fe1;p=nextcloud-server.git add option to dissable fileproxies --- diff --git a/lib/fileproxy.php b/lib/fileproxy.php index 796fd95cb38..46fc2f49c50 100644 --- a/lib/fileproxy.php +++ b/lib/fileproxy.php @@ -39,6 +39,7 @@ class OC_FileProxy{ private static $proxies=array(); + public static $enabled=true; /** * check if this proxy implments a specific proxy operation @@ -84,6 +85,9 @@ class OC_FileProxy{ } public static function runPreProxies($operation,&$filepath,&$filepath2=null){ + if(!self::$enabled){ + return true; + } $proxies=self::getProxies($operation,false); $operation='pre'.$operation; foreach($proxies as $proxy){ @@ -101,6 +105,9 @@ class OC_FileProxy{ } public static function runPostProxies($operation,$path,$result){ + if(!self::$enabled){ + return $result; + } $proxies=self::getProxies($operation,true); $operation='post'.$operation; foreach($proxies as $proxy){