Delete maintainers when deleting applications and versions so maintainers aren't

orphaned.
This commit is contained in:
Chris Morgan
2005-05-07 18:45:33 +00:00
committed by WineHQ
parent 694fc5d561
commit 44356371ab
2 changed files with 16 additions and 1 deletions

View File

@@ -237,6 +237,13 @@ class Application {
$oUrl = new Url($iUrlId);
$oUrl->delete($bSilent);
}
// remove any supermaintainers for this application so we don't orphan them
$sQuery = "DELETE from appMaintainers WHERE appId='".$this->iAppId."';";
if(!($hResult = query_appdb($sQuery)))
{
addmsg("Error removing app maintainers for the deleted application!", "red");
}
}
if(!$bSilent)
$this->mailSupermaintainers("delete");

View File

@@ -240,10 +240,18 @@ class Version {
$oUrl = new Url($iUrlId);
$oUrl->delete($bSilent);
}
// remove any maintainers for this version so we don't orphan them
$sQuery = "DELETE from appMaintainers WHERE versionId='".$this->iVersionId."';";
if(!($hResult = query_appdb($sQuery)))
{
addmsg("Error removing version maintainers for the deleted version!", "red");
}
}
if(!$bSilent)
$this->mailMaintainers("delete");
$this->mailSubmitter(true);
$this->mailSubmitter(true);
}