R50966 - /trunk/calendar/inc/class.calendar_datasource.inc.php

Author: nathangray
New Revision: 50966

URL: http://svn.stylite.de/viewvc/egroupware?rev=50966&view=rev
Log:
Make sure event spans multiple days before removing nights, fixes late/overnight events giving negative time.

Modified:
trunk/calendar/inc/class.calendar_datasource.inc.php

Modified: trunk/calendar/inc/class.calendar_datasource.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_datasource.inc.php?rev=50966&r1=50965&r2=50966&view=diff

— trunk/calendar/inc/class.calendar_datasource.inc.php (original)
+++ trunk/calendar/inc/class.calendar_datasource.inc.php Thu Dec 11 17:22:55 2014
@@ -73,7 +73,7 @@
$ds[‘pe_planned_time’] = (int) (($ds[‘pe_planned_end’] - $ds[‘pe_planned_start’])/60); // time is in minutes

	// if the event spans multiple days, we have to substract the nights (24h - daily working time specified in PM)
  •   if (date('Y-m-d',$ds['pe_planned_end']) != date('Y-m-d',$ds['pe_planned_start']))
    
  •   if (($ds['pe_planned_time']/ 60 > 24) && date('Y-m-d',$ds['pe_planned_end']) != date('Y-m-d',$ds['pe_planned_start']))
      {
      	foreach(array('start','end') as $name)
      	{
    

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs