mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 08:19:45 +01:00
Written the delete_calendar() for sql.
This commit is contained in:
parent
4c4d43ef8c
commit
b7207cffaf
@ -77,6 +77,19 @@ class calendar_ extends calendar__
|
|||||||
|
|
||||||
function delete_calendar($stream='',$calendar='')
|
function delete_calendar($stream='',$calendar='')
|
||||||
{
|
{
|
||||||
|
$this->stream->query('SELECT cal_id FROM calendar_entry WHERE cal_owner='.$calendar,__LINE__,__FILE__);
|
||||||
|
if($this->stream->num_rows())
|
||||||
|
{
|
||||||
|
while($this->stream->next_record())
|
||||||
|
{
|
||||||
|
$this->delete_event($stream,intval($this->stream->f('cal_id')));
|
||||||
|
}
|
||||||
|
$this->expunge($stream);
|
||||||
|
}
|
||||||
|
$this->stream->lock(array('calendar_entry_user'));
|
||||||
|
$this->stream->query('DELETE FROM calendar_entry_user WHERE cal_login='.$calendar,__LINE__,__FILE__);
|
||||||
|
$this->stream->unlock();
|
||||||
|
|
||||||
return $calendar;
|
return $calendar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user