forked from extern/egroupware
stops deleting of events if no permission to do so
This commit is contained in:
parent
16323572bd
commit
5439880d7f
@ -12,19 +12,25 @@
|
|||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "noheader" => True, "nonavbar" => True);
|
$phpgw_flags = Array(
|
||||||
include("../header.inc.php");
|
'currentapp' => 'calendar',
|
||||||
|
'noheader' => True,
|
||||||
|
'nonavbar' => True
|
||||||
|
);
|
||||||
|
$phpgw_info['flags'] = $phpgw_flags;
|
||||||
|
include('../header.inc.php');
|
||||||
|
|
||||||
if ($id > 0) {
|
if ($id > 0) && ($cal_info->owner == $owner) && ($phpgw->calendar->check_perms(PHPGW_ACL_EDIT) == True))
|
||||||
$phpgw->db->query("SELECT cal_datetime FROM calendar_entry WHERE cal_id = $id",__LINE__,__FILE__);
|
{
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->query('SELECT cal_datetime FROM calendar_entry WHERE cal_id='.$id,__LINE__,__FILE__);
|
||||||
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
$thisyear = intval($phpgw->common->show_date($phpgw->db->f("cal_datetime"),"Y"));
|
$thisyear = intval($phpgw->common->show_date($phpgw->db->f('cal_datetime'),'Y'));
|
||||||
$thismonth = intval($phpgw->common->show_date($phpgw->db->f("cal_datetime"),"n"));
|
$thismonth = intval($phpgw->common->show_date($phpgw->db->f('cal_datetime'),'n'));
|
||||||
|
|
||||||
$phpgw->calendar->delete(intval($id));
|
$phpgw->calendar->delete(intval($id));
|
||||||
}
|
}
|
||||||
|
|
||||||
Header("Location: " . $phpgw->link("index.php","year=$thisyear&month=$thismonth"));
|
Header('Location: ' . $phpgw->link('index.php','year='.$thisyear.'&month='.$thismonth));
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user