From: Thomas Mudrunka Date: Wed, 26 Oct 2011 12:26:49 +0000 (+0200) Subject: Pridan defaultni listing limit 23 :-) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=2415a365238798a0496e4438c39188fc5e2b5d38;p=mirrors%2FSokoMan.git Pridan defaultni listing limit 23 :-) --- 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/');