summaryrefslogtreecommitdiffstats
path: root/inc/lib_files.php
diff options
context:
space:
mode:
authorThibaut GRIDEL <tgridel@free.fr>2010-05-03 22:26:34 +0200
committerThibaut GRIDEL <tgridel@free.fr>2010-05-16 21:26:24 +0200
commit6e8001b05d0d9346c8d0c8c73044b591c09b85e1 (patch)
tree6578a860c7539dbae2abc3d63a9f1401a0612f82 /inc/lib_files.php
parent78e54e1909506cb6606354a4b6e9120f7c4475b7 (diff)
downloadnextcloud-server-6e8001b05d0d9346c8d0c8c73044b591c09b85e1.tar.gz
nextcloud-server-6e8001b05d0d9346c8d0c8c73044b591c09b85e1.zip
log read/write files
Diffstat (limited to 'inc/lib_files.php')
-rwxr-xr-xinc/lib_files.php29
1 files changed, 16 insertions, 13 deletions
diff --git a/inc/lib_files.php b/inc/lib_files.php
index 7073d0326ad..763873733b2 100755
--- a/inc/lib_files.php
+++ b/inc/lib_files.php
@@ -3,24 +3,25 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
+*
+* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
+oc_require_once("lib_log.php");
/**
@@ -139,6 +140,7 @@ class OC_FILES {
$filename=OC_FILESYSTEM::toTmpFile($filename);
}
ob_end_clean();
+ OC_LOG::event($_SESSION['username'],3,"$dir/$files");
readfile($filename);
unlink($filename);
foreach(self::$tmpFiles as $tmpFile){
@@ -147,7 +149,7 @@ class OC_FILES {
}
}
}
-
+
/**
* move a file or folder
*
@@ -163,7 +165,7 @@ class OC_FILES {
return OC_FILESYSTEM::rename($sourceFile,$targetFile);
}
}
-
+
/**
* copy a file or folder
*
@@ -179,7 +181,7 @@ class OC_FILES {
return OC_FILESYSTEM::copy($sourceFile,$targetFile);
}
}
-
+
/**
* create a new file or folder
*
@@ -196,6 +198,7 @@ class OC_FILES {
$fileHandle=OC_FILESYSTEM::fopen($file, 'w');
if($fileHandle){
fclose($fileHandle);
+ OC_LOG::event($_SESSION['username'],4,"$dir/$name");
return true;
}else{
return false;
@@ -203,7 +206,7 @@ class OC_FILES {
}
}
}
-
+
/**
* deletes a file or folder
*
@@ -220,7 +223,7 @@ class OC_FILES {
}
}
}
-
+
/**
* try to detect the mime type of a file
*