From: niekt0 Date: Fri, 12 Nov 2010 22:02:42 +0000 (+0100) Subject: Warning fix X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=d9464c685bd249a07b65ed8a514ac29ab86da57e;p=mirrors%2FKyberia-bloodline.git Warning fix --- diff --git a/wwwroot/inc/permissions.inc b/wwwroot/inc/permissions.inc index 912b386..64da8ef 100644 --- a/wwwroot/inc/permissions.inc +++ b/wwwroot/inc/permissions.inc @@ -31,6 +31,8 @@ function checkPermissions($node) { global $db; if (IsSet($_SESSION['user_id'])) { $user_id=$_SESSION['user_id']; +} else { + $user_id=0; } /* diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index a0aec7f..2985336 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -282,7 +282,7 @@ elseif ($transaction) { 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 ($_SESSION['user_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); }