I noticed that the 'folderdetails' table 'date_created' field showed that the folders created for me
were created on 2008-12-08 ! This was obviously wrong. It seems that the date_created field is not initialised
to the current date in the 'user_library.php' file (functions 'recycle_bin' and 'create_a_virtual_root_folder').
--- user_library.php.orig 2015-07-23 22:17:27.000000000 +0100
+++ user_library.php 2015-07-29 22:32:40.160501332 +0100
@@ -136,8 +136,8 @@
if(sizeof($res)==0){
$query = "insert into {$xerte_toolkits_site->database_table_prefix}folderdetails
- (login_id,folder_parent,folder_name) VALUES (?,?,?)";
- $res = db_query($query, array($_SESSION['toolkits_logon_id'], "0", "recyclebin") );
+ (login_id,folder_parent,folder_name,date_created) VALUES (?,?,?,?)";
+ $res = db_query($query, array($_SESSION['toolkits_logon_id'], "0", "recyclebin", date('Y-m-d')) );
if($res) {
@@ -192,10 +192,10 @@
$prefix = $xerte_toolkits_site->database_table_prefix ;
- $query = "insert into {$prefix}folderdetails (login_id,folder_parent,folder_name) VALUES (?,?,?)";
- $params = array($_SESSION['toolkits_logon_id'], "0", $_SESSION['toolkits_logon_username']);
+ $query = "insert into {$prefix}folderdetails (login_id,folder_parent,folder_name,date_created) VALUES (?,?,?,?)";
+ $params = array($_SESSION['toolkits_logon_id'], "0", $_SESSION['toolkits_logon_username'], date('Y-m-d'));
- if(db_query($query, $params)){
+ if(db_query($query, $params) !== false){
receive_message($_SESSION['toolkits_logon_username'], "ADMIN", "SUCCESS", "Succeeded in creating users root folder " .$_SESSION['toolkits_logon_id'], "Succeeded in creating users root folder " .$_SESSION['toolkits_logon_id']);