Loading...
 
Skip to main content

Features / Usability


You are viewing a reply to mod-upcoming_events problems

Re: mod-upcoming_events problems

I was having the same problem, and here's what I changed to fix it (Tiki version 1.9.1):

On line 776 of lib/calendar/calendarlib.php:

Image
Copy to clipboard
$cond = $cond." and `start` < (unix_timestamp(now()) + ?)";

to

Image
Copy to clipboard
$cond = $cond." and `start` > (unix_timestamp(now())) and `start` < (unix_timestamp(now()) + ?)";


and on line 779 of lib/calendar/calendarlib.php:

Image
Copy to clipboard
$query = "select `start`, `name`, `calitemId`, `calendarId`, `user`, `lastModif` from `tiki_calendar_items` where 1=1 ".$cond." order by ".$this->convert_sortmode('start_desc');

to

Image
Copy to clipboard
$query = "select `start`, `name`, `calitemId`, `calendarId`, `user`, `lastModif` from `tiki_calendar_items` where 1=1 ".$cond." order by ".$this->convert_sortmode('start_asc');


the change being start_asc (sort ascending) instead of start_desc (sort descending).

This is working well for our install, however I haven't tested any weird conditions (no cal entries, no future cal entries, etc.).