From: niekt0 Date: Mon, 16 Jan 2012 17:14:33 +0000 (+0100) Subject: Minor display cleanup X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8fc54d8f71a9ba9526cd396fe8f5c6f4764fb6c3;p=mirrors%2FKyberia-bloodline.git Minor display cleanup --- diff --git a/doc/TODO b/doc/TODO index b81cdc1..3d48cf8 100644 --- 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) diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index bf4c80d..554ba63 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -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); + +} + + } ?> diff --git a/wwwroot/inc/eventz/display.inc b/wwwroot/inc/eventz/display.inc index 50b2baf..aff889d 100644 --- a/wwwroot/inc/eventz/display.inc +++ b/wwwroot/inc/eventz/display.inc @@ -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);