Report any technical problems you discover and discuss solutions.

V3 beta: DB folder field not set correctly - fixed

Plus d'informations
il y a 11 ans 1 semaine - il y a 11 ans 1 semaine #2945 par jayaich
Hi,

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').

A patch for this:
============================
Code:
--- 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']);
============================
Dernière édition: il y a 11 ans 1 semaine par jayaich.
Les utilisateur(s) suivant ont remercié: JohnSmith

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 11 ans 1 semaine #2946 par JohnSmith
Réponse de JohnSmith sur le sujet V3 beta: DB folder field not set correctly - fixed
Thanks John, will get that committed once the Github updates to reflect that v3 is out of beta...

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 ans 5 mois #4238 par jayaich
Réponse de jayaich sur le sujet V3 beta: DB folder field not set correctly - fixed
In Xerte 3.3 it looks like this correction has not been applied.


John.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 ans 5 mois #4243 par JohnSmith
Réponse de JohnSmith sur le sujet V3 beta: DB folder field not set correctly - fixed
Not sure why that was never done or if it was reverted but i'll raise it as an issue on Github.

John

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ronmjultenJohnSmith
Temps de génération de la page : 0.133 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo