From 0c294774cbc71af18e04b48148667f78f0b8fb35 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Thu, 17 Mar 2016 16:52:53 +0000 Subject: [PATCH] bug: Page Limit Default to system default of staff doesn't have page limit set. Credit: @antriver PR#2951 --- include/ajax.config.php | 2 +- scp/staff.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ajax.config.php b/include/ajax.config.php index 132da3daf..1ac326e98 100644 --- a/include/ajax.config.php +++ b/include/ajax.config.php @@ -48,7 +48,7 @@ class ConfigAjaxAPI extends AjaxController { 'primary_lang_flag' => strtolower($primary_info['flag'] ?: $primary_locale ?: $primary_sl), 'primary_language' => Internationalization::rfc1766($primary), 'secondary_languages' => $cfg->getSecondaryLanguages(), - 'page_size' => $thisstaff->getPageLimit(), + 'page_size' => $thisstaff->getPageLimit() ?: PAGE_LIMIT, ); return $this->json_encode($config); } diff --git a/scp/staff.inc.php b/scp/staff.inc.php index 757befc8d..e486cde88 100644 --- a/scp/staff.inc.php +++ b/scp/staff.inc.php @@ -107,7 +107,7 @@ $ost->addExtraHeader('<meta name="csrf_token" content="'.$ost->getCSRFToken().'" require_once(INCLUDE_DIR.'class.nav.php'); /******* SET STAFF DEFAULTS **********/ -define('PAGE_LIMIT', $thisstaff->getPageLimit()?$thisstaff->getPageLimit():DEFAULT_PAGE_LIMIT); +define('PAGE_LIMIT', $thisstaff->getPageLimit() ?: DEFAULT_PAGE_LIMIT); $tabs=array(); $submenu=array(); -- GitLab