From c0aaf671335c0eff681bc78b3f4da279a26d0d3e Mon Sep 17 00:00:00 2001 From: niekt0 Date: Sat, 2 Apr 2011 01:29:45 +0200 Subject: [PATCH] php warnings removed --- .../node_methodz/function.get_movement_params.php | 14 +++++++++----- wwwroot/inc/smarty/resource.kyberia.php | 3 ++- 2 files changed, 11 insertions(+), 6 deletions(-) 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 c0918aa..7cc3fc2 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_movement_params.php @@ -3,13 +3,17 @@ function smarty_function_get_movement_params($params,&$smarty) { $children_count=$params['children_count']; - if (is_numeric($_POST['listing_amount'])) $listing_amount=$_POST['listing_amount']; - elseif (!empty($_SESSION['listing_amount'])) $listing_amount=$_SESSION['listing_amount']; - else $listing_amount=DEFAULT_LISTING_AMOUNT; + if (isset($_POST['listing_amount']) && + (is_numeric($_POST['listing_amount']))) { + $listing_amount=$_POST['listing_amount']; + } elseif (!empty($_SESSION['listing_amount'])) { + $listing_amount=$_SESSION['listing_amount']; + } else $listing_amount=DEFAULT_LISTING_AMOUNT; $smarty->assign('listing_amount',$listing_amount); - if (is_numeric($_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 @@ -38,4 +42,4 @@ $smarty->assign('offset',$offset); } -?> \ No newline at end of file +?> diff --git a/wwwroot/inc/smarty/resource.kyberia.php b/wwwroot/inc/smarty/resource.kyberia.php index db73920..dc77b4f 100644 --- a/wwwroot/inc/smarty/resource.kyberia.php +++ b/wwwroot/inc/smarty/resource.kyberia.php @@ -37,7 +37,8 @@ function db_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj) // with unix epoch time value of last template modification. // This is used to determine if recompile is necessary. $recompile = 100; //recompile every N seconds - $tpl_timestamp = floor(time()/$recompile)*$recompile; // this example will recompile even unchanged templates! XXX!!! FIXME!!! TODO!!! + $tpl_timestamp = floor(time()/$recompile)*$recompile; + // this example will recompile even unchanged templates! XXX!!! FIXME!!! TODO!!! // return true on success, false to generate failure notification return true; } -- 2.30.2