delete no deletes accounts calendar events

This commit is contained in:
skeeter 2000-11-21 02:32:22 +00:00
parent ddbe64e26d
commit d6295ba513
2 changed files with 5 additions and 16 deletions

View File

@ -18,6 +18,7 @@
}
$phpgw_info["flags"]["currentapp"] = "admin";
$phpgw_info["flags"]["enable_calendar_class"] = True;
include("../header.inc.php");
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
. $phpgw_info["server"]["account_repository"] . ".inc.php");
@ -67,7 +68,7 @@
</tr>
<tr colspan=2>
<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>
</tr>
<tr>

View File

@ -170,24 +170,12 @@
$phpgw->db->next_record();
$lid = $phpgw->db->f(0);
$i = 0;
$phpgw->db->query("select cal_id from webcal_entry where cal_create_by='$account_id'");
while ($phpgw->db->next_record()) {
$cal_id[$i] = $phpgw->db->f("cal_id");
echo "<br>" . $phpgw->db->f("cal_id");
$i++;
}
$table_locks = array('preferences','todo','addressbook','accounts');
$phpgw->calendar->delete($lid);
$table_locks = array('preferences','todo','addressbook','accounts',
'webcal_entry','webcal_entry_user','webcal_entry_repeats',
'webcal_entry_groups');
$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_user where cal_login='".$account_id."'");