From 2415a365238798a0496e4438c39188fc5e2b5d38 Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Wed, 26 Oct 2011 14:26:49 +0200 Subject: [PATCH] Pridan defaultni listing limit 23 :-) --- index.php | 4 ++-- sklad.conf.php.example | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 59156ab..18ba761 100755 --- 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); diff --git a/sklad.conf.php.example b/sklad.conf.php.example index c779f9b..0456fbe 100755 --- a/sklad.conf.php.example +++ b/sklad.conf.php.example @@ -24,6 +24,8 @@ define('LOCALE_LANG', 'en'); define('INSTANCE_ID', ''); +define('FRONTEND_LISTING_LIMIT', 23); + define('BARCODE_TYPE', 'code128b'); define('BARCODE_PREFIX', 'STORE/'); -- 2.30.2