warnings cleanup
authorniekt0 <niekt0@kyberia.cz>
Tue, 27 Sep 2011 23:16:07 +0000 (01:16 +0200)
committerniekt0 <niekt0@kyberia.cz>
Tue, 27 Sep 2011 23:16:07 +0000 (01:16 +0200)
wwwroot/backend/mysql/backend.inc
wwwroot/inc/senate.inc
wwwroot/inc/smarty/node_methodz/function.get_movement_params.php

index 7efab4280258b680e9d21ceb91cb58b5fe50b9d9..7b1957770f0d1f170034ec2c1f30fb1a762dea4c 100644 (file)
@@ -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'];
index 7fa7c8b74d8184258c7856d7fca7035aff3d4833..2219113690e49dab28a987f0bcbbcb2d04effb51 100644 (file)
@@ -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?
index 7cc3fc2dfa0689d6bf5aa0f11b7436b9a9f1b6ec..5f57d230d67fb38dc3d4ae085318075f6a401c0a 100644 (file)
@@ -1,45 +1,44 @@
 <?php
 
-       function smarty_function_get_movement_params($params,&$smarty) {
-               $children_count=$params['children_count'];
+function smarty_function_get_movement_params($params,&$smarty) {
 
-               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;
+       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);
+       $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);
+
+}
 ?>
This page took 0.128991 seconds and 4 git commands to generate.