From: Daniel Hromada Date: Wed, 26 Jan 2011 21:50:02 +0000 (+0100) Subject: 1) template_id should be global, otherwise it is impossible to use other templates X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=cc43b45fab7f638979d74c53b8eb28c1f37ff62a;p=mirrors%2FKyberia-bloodline.git 1) template_id should be global, otherwise it is impossible to use other templates 2) display event returns true value --- 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; }