Delete maintainers when deleting applications and versions so maintainers aren't
orphaned.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user