comment: Set default subject when replying
This commit is contained in:
committed by
Chris Morgan
parent
b7189e4f59
commit
d5b029fc61
@@ -232,19 +232,13 @@ class Comment {
|
|||||||
// body
|
// body
|
||||||
echo htmlify_urls($this->sBody), "<br /><br />\n";
|
echo htmlify_urls($this->sBody), "<br /><br />\n";
|
||||||
|
|
||||||
// only add RE: once
|
|
||||||
if(eregi("RE:", $this->sSubject))
|
|
||||||
$sSubject = $this->sSubject;
|
|
||||||
else
|
|
||||||
$sSubject = "RE: ".$this->sSubject;
|
|
||||||
|
|
||||||
$oVersion = new version($this->iVersionId);
|
$oVersion = new version($this->iVersionId);
|
||||||
$oM = new objectManager("comment", "Post new ocmment");
|
$oM = new objectManager("comment", "Post new ocmment");
|
||||||
$oM->setReturnTo($oVersion->objectMakeUrl());
|
$oM->setReturnTo($oVersion->objectMakeUrl());
|
||||||
// reply post buttons
|
// reply post buttons
|
||||||
echo " [<a href=\"".$oM->makeUrl("add")."&iVersionId=$this->iVersionId\"><small>post new</small></a>] \n";
|
echo " [<a href=\"".$oM->makeUrl("add")."&iVersionId=$this->iVersionId\"><small>post new</small></a>] \n";
|
||||||
echo " [<a href=\"".$oM->makeUrl("add")."&iVersionId=$this->iVersionId&sSubject=".
|
echo " [<a href=\"".$oM->makeUrl("add")."&iVersionId=$this->iVersionId".
|
||||||
urlencode("$sSubject")."&iThread=$this->iCommentId\"><small>reply to this</small></a>] \n";
|
"&iThread=$this->iCommentId\"><small>reply to this</small></a>] \n";
|
||||||
|
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
@@ -605,6 +599,17 @@ class Comment {
|
|||||||
echo html_frame_start($oRow->subject,500);
|
echo html_frame_start($oRow->subject,500);
|
||||||
echo htmlify_urls($oRow->body), "<br /><br />\n";
|
echo htmlify_urls($oRow->body), "<br /><br />\n";
|
||||||
echo html_frame_end();
|
echo html_frame_end();
|
||||||
|
|
||||||
|
/* Set default reply subject */
|
||||||
|
if(!$this->sSubject)
|
||||||
|
{
|
||||||
|
// Only add RE: once
|
||||||
|
if(eregi("RE:", $oRow->subject))
|
||||||
|
$this->sSubject = $oRow->subject;
|
||||||
|
else
|
||||||
|
$this->sSubject = "RE: ".$oRow->subject;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user