X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Feventz%2Fdisplay.inc;h=fdfa0fdca68d15146aac5ae148559cd8dff45595;hb=e0946a04a8845b6e181544064f059fba1c92983e;hp=fe180e462212002b1048022efece71e3af56bfc0;hpb=80ce65a753a767b970a1d51f2a2fbe62015fdcf9;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/eventz/display.inc b/wwwroot/inc/eventz/display.inc index fe180e4..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); - } -} - - -elseif (!$permissions['r'] && $_GET['magic_word']) { - $magic_word_big=$_GET['magic_word']; - - if ( preg_match("/(\d+)-(.+)/",$_GET['magic_word'],$mu)) { - $magic_uid=$mu['1']; - $magic_word=addslashes($mu['2']); - // XXX WTF column magic_word does not exists - $q="select login from users where user_id='$magic_uid' and magic_word='$magic_word'"; - $set=$db->query($q); - if ($set->getNumRows()) { - $permissions['r']=true; - } - } -} - - - - - -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'])) { @@ -169,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; @@ -340,5 +302,5 @@ if ($template_id=='2019721'){ } //end of displaying - return false; + return true; }