From: niekt0 Date: Tue, 27 Sep 2011 23:16:07 +0000 (+0200) Subject: warnings cleanup X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=38927c4d48865f73d1b965f1a07c76efe4339a9a;p=mirrors%2FKyberia-bloodline.git warnings cleanup --- diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index 7efab42..7b19577 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -370,9 +370,9 @@ public static function getLast($params) { else $offset=addslashes($params['offset']); global $db,$node; - if ($node['node_id']==23) { + if ($node['node_id']==DEF_LAST_NODE) { $interval=" nodes.node_created>NOW()-INTERVAL 65 HOUR and"; - $params['vector']="00"; + $vector="00"; } else { $vector=$node['node_vector']; diff --git a/wwwroot/inc/senate.inc b/wwwroot/inc/senate.inc index 7fa7c8b..2219113 100644 --- a/wwwroot/inc/senate.inc +++ b/wwwroot/inc/senate.inc @@ -12,6 +12,7 @@ define('UNVERIFIED_REGISTRATIONS_NODE',1836516); define('DEF_DATA_TEMPLATE',12); define('DEF_GALLERY_TEMPLATE',1041658); +define('DEF_LAST_NODE',23); // 1961061 citizens? // 1061495 citizens? diff --git a/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php b/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php index 7cc3fc2..5f57d23 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php @@ -1,45 +1,44 @@ assign('listing_amount',$listing_amount); + $smarty->assign('listing_amount',$listing_amount); - if (isset($_POST['get_children_offset']) && - (is_numeric($_POST['get_children_offset']))) { - $offset=$_POST['get_children_offset']; + if (isset($_POST['get_children_offset']) && + (is_numeric($_POST['get_children_offset']))) { + $offset=$_POST['get_children_offset']; - //movement forward and backward - if ($_POST['get_children_move']=='<') { - $offset=$offset-$listing_amount; - if ($offset<0) $offset=0; - } - elseif ($_POST['get_children_move']=='>') { - - $offset=$offset+$listing_amount; - } - - elseif ($_POST['get_children_move']=='>>') { - $offset=$children_count-$listing_amount; - if ($offset<0) $offset=0; - } + //movement forward and backward + if ($_POST['get_children_move']=='<') { + $offset=$offset-$listing_amount; + if ($offset<0) $offset=0; + } - elseif ($_POST['get_children_move']=='<<') { - $offset=0; - } + elseif ($_POST['get_children_move']=='>') { + $offset=$offset+$listing_amount; + } + elseif ($_POST['get_children_move']=='>>') { + $offset=$children_count-$listing_amount; + if ($offset<0) $offset=0; + } + elseif ($_POST['get_children_move']=='<<') { + $offset=0; } - else $offset=0; - $smarty->assign('offset',$offset); } + + else $offset=0; + $smarty->assign('offset',$offset); + +} ?>