"Fixed problem created by viewing calendars in the far future.

The calendar horizont, responsible for how far in the future unlimited repeating events get rendered, 
would previously be moved to that date, even if it was far in the future like 2030.
Now all requests for more then 1000 days in the future get simply ignored."
This commit is contained in:
Ralf Becker 2007-12-20 19:53:06 +00:00
parent 5fee16c3ef
commit c44e546285

View File

@ -478,7 +478,12 @@ class bocal
$this->debug_message('bocal::check_move_horizont(%1) horizont=%2',true,$new_horizont,$this->config['horizont']);
}
$new_horizont = $this->date2ts($new_horizont,true); // now we are in server-time, where this function operates
if ($new_horizont > time()+1000*DAY_s) // some user tries to "look" more then 1000 days in the future
{
if ($this->debug == 'check_move_horizont') $this->debug_message('bocal::check_move_horizont(%1) horizont=%2 new horizont more then 1000 days from now --> ignoring it',true,$new_horizont,$this->config['horizont']);
return;
}
if ($new_horizont <= $this->config['horizont']) // no move necessary
{
if ($this->debug == 'check_move_horizont') $this->debug_message('bocal::check_move_horizont(%1) horizont=%2 is bigger ==> nothing to do',true,$new_horizont,$this->config['horizont']);