cleaning warnings
authorniekt0 <niekt0@kyberia.cz>
Wed, 28 Sep 2011 21:54:00 +0000 (23:54 +0200)
committerniekt0 <niekt0@kyberia.cz>
Wed, 28 Sep 2011 21:54:00 +0000 (23:54 +0200)
wwwroot/backend/mysql/permissions.inc
wwwroot/inc/smarty/node_methodz/function.get_nodes_by_type.php
wwwroot/nodes.php

index 234221cd546a64af9d18426dac5e1797d92aef69..da78555fd748431541df0230fd642d38a153bda8 100644 (file)
@@ -79,7 +79,7 @@ public static function checkPerms($node) {
             }
 
             if ($perms['node_system_access'] != 'private'
-                && !$_SESSION['user_id']
+                && (empty($_SESSION['user_id']))
                 && $perms['node_external_access'] == 'yes') {
                     $perms['r'] = 1;
                     $perms['w'] = 0;
index 136500ca3b385e7c60bb365b95f17dad3833034f..fe45e7c0ec21b7023e6d6913ed5711978e82165c 100644 (file)
@@ -3,21 +3,23 @@
 function smarty_function_get_nodes_by_type($params,&$smarty) {
        global $node;
 
+       $vector="";
+       $orderby="";
        $type=$params['type'];
        if ($params['listing_amount']=='all') $listing_amount=DEF_MAX_LISTING_AMMOUNT;
        else $listing_amount=$params['listing_amount'];
        if (empty($params['offset'])) $offset=0;
        else $offset=$params['offset'];
-       if ($params['vector']) {
+       if (isset($params['vector']) && $params['vector']) {
                $vector=$params['vector'];
        }
-       if ($params['orderby']) {
+       if (isset($params['orderby']) && $params['orderby']) {
                $orderby=$params['orderby'];
        }
        $node_id=$node['node_id'];
        $user_id=$_SESSION['user_id'];
 
-       $result=nodes::getNodesByType(isset($vector)?$vector:"",$user_id,$type,isset($orderby)?$orderby:"",$offset,$listing_amount);
+       $result=nodes::getNodesByType($vector,$user_id,$type,$orderby,$offset,$listing_amount);
 
        $smarty->assign('get_nodes_by_type',$result);
 
index 063f4e66110a74da4c5e7c9152c0dac1813555b0..7bb46aec4bba225eae8a025f10e6f1acc8fd45ec 100644 (file)
@@ -119,7 +119,7 @@ $smarty->compile_dir = SYSTEM_DATA.'templates_c/';
 $smarty->config_dir = SMARTY_DIR.'configs/'; //XXX neexistuje
 $smarty->cache_dir = SMARTY_DIR.'cache/';
 $smarty->plugins_dir = SMARTY_PLUGIN_DIR ;
-if ($_SESSION['debugging']) $smarty->debugging=true;
+if (isset($_SESSION['debugging']) && $_SESSION['debugging']) $smarty->debugging=true;
 
 // initializing variables
 // preg_replace prevents LFI
@@ -127,7 +127,7 @@ if (empty($_POST['event'])) $event='display';
 else $event= preg_replace( "![^a-zA-Z0-9_]+!", "", $_POST['event']);
 
 
-if ($_SESSION['debugging']) {
+if (isset($_SESSION['debugging']) && $_SESSION['debugging']) {
        echo "<pre><b>NODE::";
        print_r($node);
        echo "</pre>";
This page took 0.132497 seconds and 4 git commands to generate.