Pridan defaultni listing limit 23 :-)
authorThomas Mudrunka <tomas@mudrunka.cz>
Wed, 26 Oct 2011 12:26:49 +0000 (14:26 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Wed, 26 Oct 2011 12:26:49 +0000 (14:26 +0200)
index.php
sklad.conf.php.example

index 59156ab60c20b5acf77a98b186c12e3c75daf26a..18ba761eba9784cab1c3f61450456eca400a4e0f 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -945,8 +945,8 @@ class Sklad_UI {
                                                                $edit=true;
                                                        default:        //?/?/?
                                                                $history = $PATH_CHUNKS[3] == 'history' ? true : false;
-                                                               $limit  = (int) (isset($PATH_CHUNKS[3]) ? $PATH_CHUNKS[3] : '0');
-                                                               $offset = (int) (isset($PATH_CHUNKS[4]) ? $PATH_CHUNKS[4] : '0');
+                                                               $limit  = is_numeric($PATH_CHUNKS[3]) ? (int) $PATH_CHUNKS[3] : FRONTEND_LISTING_LIMIT;
+                                                               $offset = isset($PATH_CHUNKS[4]) ? (int) $PATH_CHUNKS[4] : 0;
                                                                $where = @is_array($_GET['where']) ? $_GET['where'] : false;
                                                                echo $this->render_items($class, $id, $limit, $offset, $where, $search, $history);
                                                                echo $this->render_listing_extensions($class, $id, $limit, $offset, $edit);
index c779f9b9cfc02795fc7944f0345e834712fc5011..0456fbea4fc821c0c43f42912a8417463b2ec8cd 100755 (executable)
@@ -24,6 +24,8 @@ define('LOCALE_LANG',         'en');
 
 define('INSTANCE_ID',          '');
 
+define('FRONTEND_LISTING_LIMIT',       23);
+
 define('BARCODE_TYPE',         'code128b');
 define('BARCODE_PREFIX',       'STORE/');
 
This page took 0.150056 seconds and 4 git commands to generate.