From cc43b45fab7f638979d74c53b8eb28c1f37ff62a Mon Sep 17 00:00:00 2001 From: Daniel Hromada Date: Wed, 26 Jan 2011 22:50:02 +0100 Subject: [PATCH] 1) template_id should be global, otherwise it is impossible to use other templates 2) display event returns true value --- wwwroot/inc/eventz/display.inc | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/wwwroot/inc/eventz/display.inc b/wwwroot/inc/eventz/display.inc index 76ad8bd..fdfa0fd 100644 --- a/wwwroot/inc/eventz/display.inc +++ b/wwwroot/inc/eventz/display.inc @@ -1,6 +1,6 @@ update("update nodes set node_views=node_views+1 where node_id='".$node['node_id']."'"); -if (isset($referer_id) && is_numeric($referer_id)) { - $q="update neurons set synapse=synapse+1 where dst='".$node['node_id']."' and src='$referer_id'"; - $result=$db->update($q); - if (!$result) { - $q="insert into neurons set synapse_creator='".$_SESSION['user_id']."',dst='".$node['node_id']."',src='$referer_id',synapse=1"; - $db->query($q); - } -} else { - logger::log('enter',$node['node_id'],'failed'); -} - - //assigning user data to smarty if user logged in if (isset($_SESSION['user_id'])&&($user_id=$_SESSION['user_id'])) { @@ -147,7 +132,6 @@ if ($permissions['r']) { $smarty->assign('node_json',json_encode($node)); } else { - $smarty->assign('node',$node); //new templates by Dark matter $smarty->template_dir=OWN_TEMPLATE_DIR; @@ -318,5 +302,5 @@ if ($template_id=='2019721'){ } //end of displaying - return false; + return true; } -- 2.30.2