summaryrefslogtreecommitdiff
path: root/www/functions/func_folder.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/functions/func_folder.php')
-rw-r--r--www/functions/func_folder.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/www/functions/func_folder.php b/www/functions/func_folder.php
index 044fd8e..f389227 100644
--- a/www/functions/func_folder.php
+++ b/www/functions/func_folder.php
@@ -3,7 +3,7 @@
function database_mkdir($db, $file_id, $new_folder_name, $share){
if($db->exec("
BEGIN TRANSACTION;
- INSERT INTO files (id, parent, owner, name, folder, size, share, hash) VALUES (Null, " . $file_id . ", " . $_SESSION['userid'] . ", '" . SQLite3::escapeString($new_folder_name) . "', 'DIRECTORY', 0, '" . SQLite3::escapeString($share) . "', '');
+ INSERT INTO files (id, parent, owner, name, folder, size, share, hash, upload, lastseen) VALUES (Null, " . $file_id . ", " . $_SESSION['userid'] . ", '" . SQLite3::escapeString($new_folder_name) . "', 'DIRECTORY', 0, '" . SQLite3::escapeString($share) . "', '', (SELECT strftime('%s', 'now')), (SELECT strftime('%s', 'now')));
COMMIT;
")){
return true;
@@ -78,7 +78,7 @@ function move_folder($old_path, $new_path){
if($db->exec("
BEGIN TRANSACTION;
- UPDATE files SET parent=".$new_file_id." WHERE id=".$old_file_id.";
+ UPDATE files SET parent=".$new_file_id.", lastseen=(SELECT strftime('%s', 'now')) WHERE id=".$old_file_id.";
COMMIT;
")){
return MV_FOLDER_SUCCESS;
@@ -116,7 +116,7 @@ function rename_folder($path, $new_name){
if($db->exec("
BEGIN TRANSACTION;
- UPDATE files SET name='".SQLite3::escapeString($new_name)."' WHERE id=".$file_id.";
+ UPDATE files SET name='".SQLite3::escapeString($new_name)."', lastseen=(SELECT strftime('%s', 'now')) WHERE id=".$file_id.";
COMMIT;
")){
return true;