Minor display cleanup
authorniekt0 <niekt0@kyberia.cz>
Mon, 16 Jan 2012 17:14:33 +0000 (18:14 +0100)
committerniekt0 <niekt0@kyberia.cz>
Mon, 16 Jan 2012 17:14:33 +0000 (18:14 +0100)
doc/TODO
wwwroot/backend/mysql/backend.inc
wwwroot/inc/eventz/display.inc

index b81cdc13c928f1def738dde207d7b0ee3eb8f73b..3d48cf85dd9978148247aacc9bb278600b352e78 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -72,8 +72,6 @@
   (Delete unused tables)
   (Replace duplicit tables with VIEWs)
 
-- Image uploading not working (?)
-
 - put "setParent" everywhere
 
 - set_synapse_weigth not working sometimes (synapse from 904 to 332 for example)
index bf4c80d806c2b37c4ea16954d5b23845d776663d..554ba63c37358dc693def85738493c7f5443d1a6 100644 (file)
@@ -739,5 +739,19 @@ public static function resetPassword($login_id,$login,$vercode,$password) {
        return $error;
 }
 
+// levenshteinLog
+
+// Log user action for later analysis
+// Secure.
+
+public static function levenshteinLog($userid,$nodeid) {
+       global $db;
+
+       $q="insert delayed into levenshtein set user_id='".$userid."',node_id='".$node_id."'";
+       $db->update($q);
+       
+}
+
+
 }
 ?>
index 50b2bafcc151eb902cb049fd66670593f0a9aa43..aff889de0186de9956419f3bef24fdc564bdeba8 100644 (file)
@@ -10,19 +10,13 @@ function display() {
 
 if ($permissions['r']) {
 
-// these 4 lines are not the source of kyberia lagging problems.
-// leave them. started on the 10.4. 
 // data gained will be used for scientific purposes
 
-// if (isset($_SESSION['user_id']) {
-//     log_levenshtein($_SESSION['user_id'],$node['node_id']);
-// }
-
 if ((isset($_SESSION['user_id'])) && ($_SESSION['user_id'])) {
-       $q="insert delayed into levenshtein set user_id='".$_SESSION['user_id']."',node_id='".$node['node_id']."'";
-       $db->update($q);
+       levenshteinLog($_SESSION['user_id'],$node['node_id']);
 }
 
+// WTF
 //if node is css
 //XXX into function
 if ($node['template_id']!='2019721'){
@@ -30,7 +24,6 @@ if ($node['template_id']!='2019721'){
        logger::log('enter',$node['node_id'],'ok',$node['node_user_subchild_count']);
        if (!empty($_SESSION['user_id']) && is_numeric($node['node_id'])) {
                $q="update node_access set visits=visits+1,node_user_subchild_count='0',last_visit=NOW() where node_id='".$node['node_id']."' and user_id='".$_SESSION['user_id']."'";
-//             echo $q;
                $result=$db->update($q);
 
                if (!$result) {
@@ -42,16 +35,6 @@ if ($node['template_id']!='2019721'){
 
 }
 
-//XXX into function
-// if (isset($_SESSION['user_id']) {
-//     if (isset($referer_id)) {
-//             update_nodes($_SESSION['user_id'],$node['node_id'],$referer_id);
-//     } else {
-//             update_nodes($_SESSION['user_id'],$node['node_id'],0);  
-//     }
-// }
-
-
 //assigning user data to smarty if user logged in
 if (isset($_SESSION['user_id'])&&($user_id=$_SESSION['user_id'])) {
        $smarty->assign('_POST',$_POST);
This page took 0.183772 seconds and 4 git commands to generate.