Fix the note deletion mail so it displays the information it is supposed to.
This commit is contained in:
committed by
WineHQ
parent
9e183eb7d9
commit
077ee450b7
@@ -22,6 +22,8 @@ class Note {
|
|||||||
var $iVersionId;
|
var $iVersionId;
|
||||||
var $sTitle;
|
var $sTitle;
|
||||||
var $sDescription;
|
var $sDescription;
|
||||||
|
var $iSubmitterId;
|
||||||
|
var $sSubmitTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@@ -44,6 +46,8 @@ class Note {
|
|||||||
$this->iVersionId = $oRow->versionId;
|
$this->iVersionId = $oRow->versionId;
|
||||||
$this->sTitle = $oRow->noteTitle;
|
$this->sTitle = $oRow->noteTitle;
|
||||||
$this->sDescription = $oRow->noteDesc;
|
$this->sDescription = $oRow->noteDesc;
|
||||||
|
$this->sSubmitTime = $oRow->submitTime;
|
||||||
|
$this->iSubmitterId = $oRow->submitterId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,9 +60,9 @@ class Note {
|
|||||||
*/
|
*/
|
||||||
function create()
|
function create()
|
||||||
{
|
{
|
||||||
$hResult = query_parameters("INSERT INTO appNotes (versionId, noteTitle, noteDesc) ".
|
$hResult = query_parameters("INSERT INTO appNotes (versionId, noteTitle, noteDesc, submitterId) ".
|
||||||
"VALUES('?', '?', '?')",
|
"VALUES('?', '?', '?', '?')",
|
||||||
$this->iVersionId, $this->sTitle, $this->sDescription);
|
$this->iVersionId, $this->sTitle, $this->sDescription, $_SESSION['current']->iUserId);
|
||||||
|
|
||||||
if($hResult)
|
if($hResult)
|
||||||
{
|
{
|
||||||
@@ -152,12 +156,14 @@ class Note {
|
|||||||
addmsg("Note modified.", "green");
|
addmsg("Note modified.", "green");
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
|
$oSubmitter = new User($this->iSubmitterId);
|
||||||
$sSubject = "Note ".$this->sTitle." for ".$sAppName." has been deleted by ".$_SESSION['current']->sRealname;
|
$sSubject = "Note ".$this->sTitle." for ".$sAppName." has been deleted by ".$_SESSION['current']->sRealname;
|
||||||
$sMsg .= "This note was made on ".substr($this->sDateCreated,0,10)." by ".$this->oOwner->sRealname."\n";
|
$sMsg .= "This note was made on ".print_date(mysqltimestamp_to_unixtimestamp($this->sSubmitTime))." by ".$oSubmitter->sRealname."\n";
|
||||||
$sMsg .= "\n";
|
$sMsg .= "\n";
|
||||||
$sMsg .= "Subject: ".$this->sTitle."\n";
|
$sMsg .= "Subject: ".$this->sTitle."\n";
|
||||||
$sMsg .= "\n";
|
$sMsg .= "\n";
|
||||||
$sMsg .= $this->sBody."\n";
|
$sMsg .= "Note contents:\n";
|
||||||
|
$sMsg .= $this->sDescription."\n";
|
||||||
$sMsg .= "\n";
|
$sMsg .= "\n";
|
||||||
$sMsg .= "Because:\n";
|
$sMsg .= "Because:\n";
|
||||||
if($aClean['sReplyText'])
|
if($aClean['sReplyText'])
|
||||||
|
|||||||
@@ -168,6 +168,8 @@ create table appNotes (
|
|||||||
noteTitle varchar(255),
|
noteTitle varchar(255),
|
||||||
noteDesc text,
|
noteDesc text,
|
||||||
versionId int not null,
|
versionId int not null,
|
||||||
|
submitterId int not null,
|
||||||
|
submitTime timestamp not null,
|
||||||
key(noteId)
|
key(noteId)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user