Fix email sending logic when adding/rejecting applications

This commit is contained in:
Jonathan Ernst
2005-02-27 16:45:49 +00:00
committed by WineHQ
parent 7e7d514274
commit 57223914a0
3 changed files with 8 additions and 5 deletions

View File

@@ -81,7 +81,7 @@ if ($_REQUEST['sub'])
echo '<td><p style="width:700px"><textarea cols="80" rows="20" id="editor" name="versionDescription">'.$oVersion->sDescription.'</textarea></p></td></tr>',"\n";
echo '<tr valign=top><td class="color0"><b>email Text</b></td>',"\n";
echo '<td><textarea name="emailtext" rows="10" cols="35"></textarea></td></tr>',"\n";
echo '<td><textarea name="replyText" rows="10" cols="35"></textarea></td></tr>',"\n";
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
@@ -181,7 +181,7 @@ if ($_REQUEST['sub'])
echo '<td><p style="width:700px"><textarea cols="80" rows="20" id="editor" name="description">'.$oApp->sDescription.'</textarea></p></td></tr>',"\n";
echo '<tr valign=top><td class="color0"><b>email Text</b></td>',"\n";
echo '<td><textarea name="emailtext" rows=10 cols=35></textarea></td></tr>',"\n";
echo '<td><textarea name="replyText" rows=10 cols=35></textarea></td></tr>',"\n";
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
echo '<input type="hidden" name="appId" value="'.$oApp->iAppId.'" />';
@@ -218,7 +218,7 @@ if ($_REQUEST['sub'])
}
else if ($_REQUEST['sub'] == 'Delete')
{
if (is_numeric($_REQUEST['appId'])) // application
if (is_numeric($_REQUEST['appId']) && !is_numeric($_REQUEST['versionId'])) // application
{
$oApp = new Application($_REQUEST['appId']);
$oApp->delete();

View File

@@ -239,7 +239,7 @@ class Application {
}
}
if(!$bSilent)
$this->mailSupermaintainers(true);
$this->mailSupermaintainers("delete");
}
@@ -256,6 +256,7 @@ class Application {
'keywords'=> str_replace(" *** ","",$this->sKeywords) ));
if(query_appdb("UPDATE appFamily SET ".$sUpdate." WHERE appId = ".$this->iAppId))
{
$this->bQueued = false;
// we send an e-mail to intersted people
$this->mailSubmitter();
$this->mailSupermaintainers();

View File

@@ -242,7 +242,8 @@ class Version {
}
}
if(!$bSilent)
$this->mailMaintainers(true);
$this->mailMaintainers("delete");
$this->mailSubmitter(true);
}
@@ -258,6 +259,7 @@ class Version {
$sUpdate = compile_update_string(array('queued' => "false"));
if(query_appdb("UPDATE appVersion SET ".$sUpdate." WHERE versionId = ".$this->iVersionId))
{
$this->bQueued = false;
// we send an e-mail to intersted people
$this->mailSubmitter();
$this->mailMaintainers();