ChangeSet ID: 31293 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/07/30 18:17:16
Modified files: . : contact.php
Log message: Alexander Nicolaysen Sørnes alex@thehandofagony.com Preserve subject when replying to contact form mails
Patch: http://cvs.winehq.org/patch.py?id=31293
Old revision New revision Changes Path 1.4 1.5 +12 -3 appdb/contact.php
Index: appdb/contact.php diff -u -p appdb/contact.php:1.4 appdb/contact.php:1.5 --- appdb/contact.php:1.4 30 Jul 2007 23:17:16 -0000 +++ appdb/contact.php 30 Jul 2007 23:17:16 -0000 @@ -57,7 +57,8 @@ if(!$aClean['sSubmit']) $oTableRow = new TableRow(); $oTableRow->SetClass("color4"); $oTableRow->AddTextCell("Subject"); - $oTableCell = new TableCell("<input type="text" name="sSubject" size="71" />"); + $oTableCell = new TableCell("<input type="text" name="sSubject" size="71"". + " value="".$aClean['sSubject']."" />"); $oTableRow->AddCell($oTableCell); $oTable->AddRow($oTableRow);
@@ -66,7 +67,8 @@ if(!$aClean['sSubmit']) $oTableCell = new TableCell("Message"); $oTableCell->SetValign("top"); $oTableRow->AddCell($oTableCell); - $oTableCell = new TableCell("<textarea name="sMessage" rows="15" cols="60"></textarea>"); + $oTableCell = new TableCell("<textarea name="sMessage" rows="15" cols="60">" + .$aClean['sMessage']."</textarea>"); $oTableRow->AddCell($oTableCell); $oTable->AddRow($oTableRow);
@@ -87,9 +89,16 @@ if(!$aClean['sSubmit'])
} else if ($aClean['sSubject'] && $aClean['sMessage']) { + $sSubjectRe = $aClean['sSubject']; + if(substr($sSubjectRe, 0, 4) != "Re: ") + $sSubjectRe = "Re: $sSubjectRe"; + + $sSubjectRe = urlencode($sSubjectRe); + $sMsg = "The following message was sent to you from $oUser->sRealname "; $sMsg .= "through the Wine AppDB contact form.\nTo Reply, visit "; - $sMsg .= APPDB_ROOT."contact.php?iRecipientId=$oUser->iUserId\n\n"; + $sMsg .= APPDB_ROOT."contact.php?iRecipientId=$oUser->iUserId&sSubject="; + $sMsg .= $sSubjectRe."\n\n"; $sMsg .= $aClean['sMessage'];
mail_appdb($oRecipient->sEmail, $aClean['sSubject'], $sMsg);