mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 18:08:02 +02:00
A couple of fixes for overlapping event probelms.
This commit is contained in:
parent
fa6d037ed4
commit
1391231baf
@ -400,8 +400,6 @@
|
|||||||
echo "ID : ".$l_cal['id']."<br>\n";
|
echo "ID : ".$l_cal['id']."<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$ui = CreateObject('calendar.uicalendar');
|
|
||||||
|
|
||||||
if(isset($GLOBALS['HTTP_GET_VARS']['readsess']))
|
if(isset($GLOBALS['HTTP_GET_VARS']['readsess']))
|
||||||
{
|
{
|
||||||
$event = $this->restore_from_appsession();
|
$event = $this->restore_from_appsession();
|
||||||
@ -410,12 +408,13 @@
|
|||||||
$datetime_check = $this->validate_update($event);
|
$datetime_check = $this->validate_update($event);
|
||||||
if($datetime_check)
|
if($datetime_check)
|
||||||
{
|
{
|
||||||
$ui->edit(
|
ExecMethod('calendar.uicalendar.edit',
|
||||||
Array(
|
Array(
|
||||||
'cd' => $datetime_check,
|
'cd' => $datetime_check,
|
||||||
'readsess' => 1
|
'readsess' => 1
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_exit(True);
|
||||||
}
|
}
|
||||||
$overlapping_events = False;
|
$overlapping_events = False;
|
||||||
}
|
}
|
||||||
@ -423,11 +422,13 @@
|
|||||||
{
|
{
|
||||||
if(!$l_cal['id'] && !$this->check_perms(PHPGW_ACL_ADD))
|
if(!$l_cal['id'] && !$this->check_perms(PHPGW_ACL_ADD))
|
||||||
{
|
{
|
||||||
$ui->index();
|
ExecMethod('calendar.uicalendar.index');
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
elseif($l_cal['id'] && !$this->check_perms(PHPGW_ACL_EDIT))
|
elseif($l_cal['id'] && !$this->check_perms(PHPGW_ACL_EDIT))
|
||||||
{
|
{
|
||||||
$ui->index();
|
ExecMethod('calendar.uicalendar.index');
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fix_update_time($l_start);
|
$this->fix_update_time($l_start);
|
||||||
@ -558,7 +559,7 @@
|
|||||||
$datetime_check = $this->validate_update($event);
|
$datetime_check = $this->validate_update($event);
|
||||||
if($datetime_check)
|
if($datetime_check)
|
||||||
{
|
{
|
||||||
$ui->edit(
|
$ExecMethod('calendar.uicalendar.edit',
|
||||||
Array(
|
Array(
|
||||||
'cd' => $datetime_check,
|
'cd' => $datetime_check,
|
||||||
'readsess' => 1
|
'readsess' => 1
|
||||||
@ -591,9 +592,13 @@
|
|||||||
{
|
{
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||||
$ui->overlap($overlapping_events,$event);
|
ExecMethod('calendar.uicalendar.overlap',
|
||||||
$GLOBALS['phpgw_info']['flags']['nofooter'] = True;
|
Array(
|
||||||
return;
|
'o_events' => $overlapping_events,
|
||||||
|
'this_event' => $event
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_exit(True);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -618,7 +623,8 @@
|
|||||||
$date = sprintf("%04d%02d%02d",$event['start']['year'],$event['start']['month'],$event['start']['mday']);
|
$date = sprintf("%04d%02d%02d",$event['start']['year'],$event['start']['month'],$event['start']['mday']);
|
||||||
if($send_to_ui)
|
if($send_to_ui)
|
||||||
{
|
{
|
||||||
$ui->index();
|
Execmethod('calendar.uicalendar.index');
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1263,6 +1263,7 @@
|
|||||||
// If we reach this, it is because they didn't search for anything,
|
// If we reach this, it is because they didn't search for anything,
|
||||||
// attempt to send them back to where they where.
|
// attempt to send them back to where they where.
|
||||||
Header('Location: ' . $phpgw->link($from));
|
Header('Location: ' . $phpgw->link($from));
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||||
@ -1719,8 +1720,18 @@
|
|||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function overlap($overlapping_events,$event)
|
function overlap($params)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(!is_array($params))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$overlapping_events = $params['o_events'];
|
||||||
|
$event = $params['this_event'];
|
||||||
|
}
|
||||||
|
|
||||||
$month = $event['start']['month'];
|
$month = $event['start']['month'];
|
||||||
$mday = $event['start']['mday'];
|
$mday = $event['start']['mday'];
|
||||||
$year = $event['start']['year'];
|
$year = $event['start']['year'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user