*/
public function modelAction( $actionData = false )
{
+ $limit = null;
$status = null;
$categoryId = null;
$action = '';
} else {
// This is the default date range for this agenda view
$total_current_events = $this->checkHaveAnyEvents();
- echo '<pre>$total_current_events: ' . print_r( $total_current_events, true ) . '</pre>';
- $weeks_to_check = 2;
+ $weeks_to_check = 1;
$event_count = 0;
do {
- $event_count = $this->getEventCountForWeekRange( $weeks_to_check );
- ++$weeks_to_check;
+ $event_count = $this->getEventCountForWeekRange( ++$weeks_to_check );
} while ( $event_count <= 5 && $total_current_events > 5 );
- echo '<pre>$event_count: ' . print_r( $event_count, true ) . '</pre>';
- echo '<pre>$weeks_to_check: ' . print_r( $weeks_to_check, true ) . '</pre>';
- $week_string = ( $weeks === 1 ) ? 'weeks': 'week';
+ $week_string = ( $weeks_to_check === 1 ) ? 'weeks': 'week';
$toDate = date('m/d/Y', strtotime( '+ ' . $weeks_to_check . ' ' . $week_string ));
- echo '<pre>$toDate: ' . print_r( $toDate, true ) . '</pre>';
}
}
if ( $fromDate && $toDate && !(isset($_REQUEST['event_name']) && $_REQUEST['event_name'])) {