From 68839d5d9431c2d07e3f40c6a5faa46dc880c414 Mon Sep 17 00:00:00 2001 From: niekt0 Date: Thu, 29 Sep 2011 00:12:32 +0200 Subject: [PATCH] warnings fix --- wwwroot/backend/mysql/backend.inc | 7 ++++--- .../inc/smarty/node_methodz/function.get_linked_nodes.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index 0f66b8d..bd765af 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -541,7 +541,7 @@ public static function logout() { // getNodesByType -// +// XXX // Secure // returns xxx @@ -576,10 +576,11 @@ public static function getNodesByType($vector,$user_id,$type,$orderby,$offset,$l // getLinkedNodes -// +// XXX +// Secure // returns XXX -function getLinkedNodes($node_id,$orderby,$offset,$listing_amount) { +public static function getLinkedNodes($node_id,$orderby,$offset,$listing_amount) { global $db; if ((!is_numeric($node_id)) diff --git a/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php b/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php index ad44bac..9a846e4 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php @@ -8,8 +8,8 @@ function smarty_function_get_linked_nodes($params,&$smarty) { elseif (is_numeric($params['listing_amount'])) $listing_amount=$params['listing_amount']; else $listing_amount=DEFAULT_LISTING_AMOUNT; - if (is_numeric($params['offset'])) $offset=$params['offset']; - elseif (is_numeric($_POST['offset'])) $offset=$_POST['offset']; + if (isset($params['offset']) && is_numeric($params['offset'])) $offset=$params['offset']; + elseif (isset($_POST['offset']) && is_numeric($_POST['offset'])) $offset=$_POST['offset']; else $offset=0; if (isset($params['node_id'])) { -- 2.30.2