Fixed the problem where calendar items were not being deleted. Tracked it down to a ->db overwrite problem where todo was using ->db and the deleteaccount.php page was using the same.

This commit is contained in:
skeeter 2001-05-09 03:21:14 +00:00
parent 856e26d09e
commit 537dfe14e9

View File

@ -77,7 +77,7 @@ class calendar_ extends calendar__
function delete_calendar($stream='',$calendar='')
{
$this->stream->query('SELECT cal_id FROM phpgw_cal WHERE owner='.$calendar,__LINE__,__FILE__);
$this->stream->query('SELECT cal_id FROM phpgw_cal WHERE owner='.intval($calendar),__LINE__,__FILE__);
if($this->stream->num_rows())
{
while($this->stream->next_record())
@ -87,7 +87,7 @@ class calendar_ extends calendar__
$this->expunge($stream);
}
$this->stream->lock(array('phpgw_cal_user'));
$this->stream->query('DELETE FROM phpgw_cal_user WHERE cal_login='.$calendar,__LINE__,__FILE__);
$this->stream->query('DELETE FROM phpgw_cal_user WHERE cal_login='.intval($calendar),__LINE__,__FILE__);
$this->stream->unlock();
return $calendar;