php warnings removed
authorniekt0 <niekt0@kyberia.cz>
Fri, 1 Apr 2011 23:29:45 +0000 (01:29 +0200)
committerniekt0 <niekt0@kyberia.cz>
Fri, 1 Apr 2011 23:29:45 +0000 (01:29 +0200)
wwwroot/inc/smarty/node_methodz/function.get_movement_params.php
wwwroot/inc/smarty/resource.kyberia.php

index c0918aa821d7c34e1678b0062e9a9af136d1abe2..7cc3fc2dfa0689d6bf5aa0f11b7436b9a9f1b6ec 100644 (file)
@@ -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
+?>
index db739208a7cef9a033df9f9ebab6393682469437..dc77b4fa55a67fc482f8390506a5e78af9bce77b 100644 (file)
@@ -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;
 }
This page took 0.288294 seconds and 4 git commands to generate.