Skip to content
Snippets Groups Projects
Commit 6e8001b0 authored by Thibaut GRIDEL's avatar Thibaut GRIDEL
Browse files

log read/write files

parent 78e54e19
Branches
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
+----------------------------------------------------------------------+ +----------------------------------------------------------------------+
*/ */
require_once("../inc/lib_base.php"); require_once("../inc/lib_base.php");
oc_require_once("lib_log.php");
oc_require_once("HTTP/WebDAV/Server.php"); oc_require_once("HTTP/WebDAV/Server.php");
oc_require_once("System.php"); oc_require_once("System.php");
...@@ -299,7 +300,7 @@ ...@@ -299,7 +300,7 @@
// no need to check result here, it is handled by the base class // no need to check result here, it is handled by the base class
$options['stream'] = OC_FILESYSTEM::fopen($fspath, "r"); $options['stream'] = OC_FILESYSTEM::fopen($fspath, "r");
OC_LOG::event($_SESSION['username'],3,$options["path"]);
return true; return true;
} }
...@@ -387,7 +388,7 @@ ...@@ -387,7 +388,7 @@
return "403 Forbidden"; return "403 Forbidden";
} }
$fp = OC_FILESYSTEM::fopen($fspath, "w"); $fp = OC_FILESYSTEM::fopen($fspath, "w");
OC_LOG::event($_SESSION['username'],4,$options["path"]);
return $fp; return $fp;
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
*/ */
oc_require_once("lib_log.php");
/** /**
...@@ -139,6 +140,7 @@ class OC_FILES { ...@@ -139,6 +140,7 @@ class OC_FILES {
$filename=OC_FILESYSTEM::toTmpFile($filename); $filename=OC_FILESYSTEM::toTmpFile($filename);
} }
ob_end_clean(); ob_end_clean();
OC_LOG::event($_SESSION['username'],3,"$dir/$files");
readfile($filename); readfile($filename);
unlink($filename); unlink($filename);
foreach(self::$tmpFiles as $tmpFile){ foreach(self::$tmpFiles as $tmpFile){
...@@ -196,6 +198,7 @@ class OC_FILES { ...@@ -196,6 +198,7 @@ class OC_FILES {
$fileHandle=OC_FILESYSTEM::fopen($file, 'w'); $fileHandle=OC_FILESYSTEM::fopen($file, 'w');
if($fileHandle){ if($fileHandle){
fclose($fileHandle); fclose($fileHandle);
OC_LOG::event($_SESSION['username'],4,"$dir/$name");
return true; return true;
}else{ }else{
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment