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

@@ -149,19 +149,18 @@ class Vendor {
/**
* Deletes the vendor from the database.
*/
function delete($bSilent=false)
function delete()
{
if(sizeof($this->aApplicationsIds)>0)
{
addmsg("The vendor has not been deleted because there are still applications linked to it.", "red");
} else
return FALSE;
} else
{
$sQuery = "DELETE FROM vendor
WHERE vendorId = '?'
LIMIT 1";
if(query_parameters($sQuery, $this->iVendorId))
{
addmsg("The vendor has been deleted.", "green");
return TRUE;
}
@@ -292,6 +291,29 @@ class Vendor {
return TRUE;
}
function objectGetMailOptions($sAction, $bMailSubmitter, $bParentAction)
{
return new mailOptions();
}
function objectGetChildren()
{
/* We don't have any */
return array();
}
function objectGetMail($sAction, $bMailSubmitter, $bParentAction)
{
/* We don't send notification mails */
return array(null, null, null);
}
function objectGetSubmitterId()
{
/* We don't record the submitter id */
return NULL;
}
function getOutputEditorValues($aClean)
{
$this->sName = $aClean['sVendorName'];