From d35514aaea472e217b6e94d15af434c270ca6589 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 8 Jun 2007 08:54:04 +0000 Subject: [PATCH] two fixes for the num_rows in the next-match widget: - use a default of 15 rows, if user&group has no pref set - use what's stored in the extension data, if value not set (nm-header not shown) --- etemplate/inc/class.nextmatch_widget.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 4f141075c1..9c4af8cae5 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -209,7 +209,7 @@ } if (!isset($value['cat_app'])) $value['cat_app'] = $app; // if no cat_app set, use the app from the get_rows func - $max = (int)$GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']; + if (!($max = (int)$GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'])) $max = 15; $row_options = array(); foreach(array(5,12,25,50,100,200,500,999) as $n) { @@ -593,10 +593,10 @@ { $loop = true; // num_rows changed } - $value['num_rows'] = (int) $value['num_rows']; + // num_rows: use old value in extension data, if $value['num_rows'] is not set because nm-header is not shown + $value['num_rows'] = isset($value['num_rows']) ? (int) $value['num_rows'] : (int) $extension_data['num_rows']; $max = $value['num_rows'] ? $value['num_rows'] : (int)$GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']; - if(strpos($value['search'],'xjxquery')) { // We deal with advancedsearch $aXml = $value['search'];