From d9464c685bd249a07b65ed8a514ac29ab86da57e Mon Sep 17 00:00:00 2001 From: niekt0 Date: Fri, 12 Nov 2010 23:02:42 +0100 Subject: [PATCH] Warning fix --- wwwroot/inc/permissions.inc | 2 ++ wwwroot/nodes.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.30.2