mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
delete no deletes accounts calendar events
This commit is contained in:
parent
ddbe64e26d
commit
d6295ba513
@ -18,6 +18,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||||
|
$phpgw_info["flags"]["enable_calendar_class"] = True;
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
||||||
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
||||||
@ -67,7 +68,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr colspan=2>
|
<tr colspan=2>
|
||||||
<td align=center>
|
<td align=center>
|
||||||
<?php echo lang("All records and account information will be lost!"); ?>
|
<?php echo "<font color=\"red\"><blink>".lang("All records and account information will be lost!")."</blink></font>"; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -170,24 +170,12 @@
|
|||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
$lid = $phpgw->db->f(0);
|
$lid = $phpgw->db->f(0);
|
||||||
|
|
||||||
$i = 0;
|
$table_locks = array('preferences','todo','addressbook','accounts');
|
||||||
$phpgw->db->query("select cal_id from webcal_entry where cal_create_by='$account_id'");
|
|
||||||
while ($phpgw->db->next_record()) {
|
$phpgw->calendar->delete($lid);
|
||||||
$cal_id[$i] = $phpgw->db->f("cal_id");
|
|
||||||
echo "<br>" . $phpgw->db->f("cal_id");
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$table_locks = array('preferences','todo','addressbook','accounts',
|
|
||||||
'webcal_entry','webcal_entry_user','webcal_entry_repeats',
|
|
||||||
'webcal_entry_groups');
|
|
||||||
$phpgw->db->lock($table_locks);
|
$phpgw->db->lock($table_locks);
|
||||||
|
|
||||||
for ($i=0; $i<count($cal_id); $i++) {
|
|
||||||
$phpgw->db->query("delete from webcal_entry_repeats where cal_id='".$cal_id[$i]."'");
|
|
||||||
$phpgw->db->query("delete from webcal_entry_groups where cal_id='".$cal_id[$i]."'");
|
|
||||||
}
|
|
||||||
|
|
||||||
$phpgw->db->query("delete from webcal_entry where cal_create_by='".$account_id."'");
|
$phpgw->db->query("delete from webcal_entry where cal_create_by='".$account_id."'");
|
||||||
$phpgw->db->query("delete from webcal_entry_user where cal_login='".$account_id."'");
|
$phpgw->db->query("delete from webcal_entry_user where cal_login='".$account_id."'");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user