Alexander Nicolaysen Sørnes <alex@thehandofagony.com>

Let objectManager handle deletion and delete notification.
This commit is contained in:
Chris Morgan
2007-09-14 23:02:12 -04:00
parent e3ca73f7df
commit 2827e0654e
21 changed files with 958 additions and 212 deletions

View File

@@ -151,24 +151,12 @@ class Bug
*
* Return true if successful, false if an error occurs
*/
function delete($bSilent=false)
function delete()
{
$sQuery = "DELETE FROM buglinks
WHERE linkId = '?'";
if($hResult = query_parameters($sQuery, $this->iLinkId))
{
if(!$bSilent)
$this->SendNotificationMail(true);
} else
{
return false;
}
if($this->iSubmitterId &&
($this->iSubmitterId != $_SESSION['current']->iUserId))
{
$this->mailSubmitter(true);
}
if(!($hResult = query_parameters($sQuery, $this->iLinkId)))
return false;
return true;
}
@@ -269,6 +257,22 @@ class Bug
}
}
function objectGetSubmitterId()
{
return $this->iSubmitterId;
}
function objectGetMailOptions($sAction, $bMailSubmitter, $bParentAction)
{
return new mailOptions();
}
function objectGetMail($sAction, $bMailSubmitter, $bParentAction)
{
/* We don't do this at the moment */
return array(null, null, null);
}
function objectGetChildren()
{
return array();