From 57542f5f740fa731aeba58ef93a28b279bb57f51 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 5 Aug 2009 11:47:29 +0000 Subject: [PATCH] set offset to false if no num_rows is passed via argument, as 0 triggers the use of num rows, which defaults to the default max_rows --- calendar/sitemgr/class.module_calendar_month.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/sitemgr/class.module_calendar_month.inc.php b/calendar/sitemgr/class.module_calendar_month.inc.php index 3e296a316a..e4394838a8 100644 --- a/calendar/sitemgr/class.module_calendar_month.inc.php +++ b/calendar/sitemgr/class.module_calendar_month.inc.php @@ -261,7 +261,7 @@ class module_calendar_month extends Module // set the search parameters $search_params = Array ( - 'offset' => 0, + 'offset' => 0, // should be false if you want no restrictions on the number of results 'order' => 'cal_start ASC', 'start' => $first, 'end' => $last, @@ -284,6 +284,10 @@ class module_calendar_month extends Module { $search_params['num_rows'] = (int) $arguments['numEntries']; } + else + { + $search_params['offset'] = false; + } $rows = $this->bo->search($search_params); if ($arguments['showWeeks']) {