warning fix
authorniekt0 <niekt0@kyberia.cz>
Fri, 12 Nov 2010 22:05:01 +0000 (23:05 +0100)
committerniekt0 <niekt0@kyberia.cz>
Fri, 12 Nov 2010 22:05:01 +0000 (23:05 +0100)
wwwroot/inc/permissions.inc

index 64da8ef3c81797e960b87cba1170ee28aad2b02f..e6c2eb95ce7322c4b33d88a5589811dd3f5b1cbf 100644 (file)
@@ -5,8 +5,13 @@ class permissions {
 function isHierarch($node) {
 
        global $db;
-       $user_id=$_SESSION['user_id'];
+       if (IsSet($_SESSION['user_id'])) {
+               $user_id=$_SESSION['user_id'];
+       } else {
+               $user_id=0;
+       }
        if (!$user_id) return false;
+
        $node_vector=chunk_split($node['node_vector'],VECTOR_CHARS,';');
        $hierarchy=explode(';',$node_vector);
        foreach ($hierarchy as $hierarch) {
This page took 0.113309 seconds and 4 git commands to generate.