From 8648e3c43c26da898c17798f89d60c9505d149b3 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 22 Sep 2011 19:24:32 +0200 Subject: only call error_log() if DEBUG is true Signed-off-by: Florian Pritz --- lib/filesystem.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/filesystem.php') diff --git a/lib/filesystem.php b/lib/filesystem.php index 76032fae204..f242a1b158e 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -286,7 +286,7 @@ class OC_Filesystem{ return self::basicOperation('file_get_contents',$path,array('read')); } static public function file_put_contents($path,$data){ - error_log($data); + if(defined("DEBUG") && DEBUG) {error_log($data);} return self::basicOperation('file_put_contents',$path,array('create','write'),$data); } static public function unlink($path){ @@ -393,7 +393,7 @@ class OC_Filesystem{ } } static public function fromUploadedFile($tmpFile,$path){ - error_log('upload'); + if(defined("DEBUG") && DEBUG) {error_log('upload');} if(OC_FileProxy::runPreProxies('fromUploadedFile',$tmpFile,$path) and self::canWrite($path) and $storage=self::getStorage($path)){ $run=true; $exists=self::file_exists($path); @@ -403,7 +403,7 @@ class OC_Filesystem{ if($run){ OC_Hook::emit( 'OC_Filesystem', 'write', array( 'path' => $path, 'run' => &$run)); } - error_log('upload2'); + if(defined("DEBUG") && DEBUG) {error_log('upload2');} if($run){ $result=$storage->fromUploadedFile($tmpFile,self::getInternalPath($path)); if(!$exists){ -- cgit v1.2.3