Improve mail messages on version description changes and include the note description when sending a
node added email
This commit is contained in:
@@ -54,7 +54,8 @@ class Note {
|
|||||||
if(query_appdb("INSERT INTO appNotes $sFields VALUES $sValues", "Error while creating a new note."))
|
if(query_appdb("INSERT INTO appNotes $sFields VALUES $sValues", "Error while creating a new note."))
|
||||||
{
|
{
|
||||||
$this->note(mysql_insert_id());
|
$this->note(mysql_insert_id());
|
||||||
$this->mailMaintainers("add");
|
$sWhatChanged = "Description is:\n".$sDescription.".\n\n";
|
||||||
|
$this->mailMaintainers("add", $sWhatChanged);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -123,7 +124,7 @@ class Note {
|
|||||||
{
|
{
|
||||||
case "add":
|
case "add":
|
||||||
$sSubject = "Note ".$this->sTitle." for ".lookup_app_name($this->iAppId)." ".lookup_version_name($this->iVersionId)." added by ".$_SESSION['current']->sRealname;
|
$sSubject = "Note ".$this->sTitle." for ".lookup_app_name($this->iAppId)." ".lookup_version_name($this->iVersionId)." added by ".$_SESSION['current']->sRealname;
|
||||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||||
addmsg("The note was successfully added into the database.", "green");
|
addmsg("The note was successfully added into the database.", "green");
|
||||||
break;
|
break;
|
||||||
case "edit":
|
case "edit":
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ class Version {
|
|||||||
$sUpdate = compile_update_string(array('versionName' => $sName));
|
$sUpdate = compile_update_string(array('versionName' => $sName));
|
||||||
if (!query_appdb("UPDATE appVersion SET ".$sUpdate." WHERE versionId = ".$this->iVersionId))
|
if (!query_appdb("UPDATE appVersion SET ".$sUpdate." WHERE versionId = ".$this->iVersionId))
|
||||||
return false;
|
return false;
|
||||||
$sWhatChanged .= "Name was changed from ".$this->sName." to ".$sName.".\n\n";
|
$sWhatChanged .= "Name was changed from:\n\t'".$this->sName."'\nto:\n\t'".$sName."'\n\n";
|
||||||
$this->sName = $sName;
|
$this->sName = $sName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user