diff --git a/include/comment.php b/include/comment.php index d26f088..e6646d7 100644 --- a/include/comment.php +++ b/include/comment.php @@ -242,8 +242,8 @@ class Comment { $oM = new objectManager("comment", "Post new ocmment"); $oM->setReturnTo($oVersion->objectMakeUrl()); // reply post buttons - echo " [makeUrl("add")."&iAppId=$this->iAppId&iVersionId=$this->iVersionId\">post new] \n"; - echo " [makeUrl("add")."&iAppId=$this->iAppId&iVersionId=$this->iVersionId&sSubject=". + echo " [makeUrl("add")."&iVersionId=$this->iVersionId\">post new] \n"; + echo " [makeUrl("add")."&iVersionId=$this->iVersionId&sSubject=". urlencode("$sSubject")."&iThread=$this->iCommentId\">reply to this] \n"; echo "\n"; @@ -570,13 +570,26 @@ class Comment { switch($sAction) { case "add": - return array("iThread", "iAppId", "iVersionId"); + return array("iThread", "iVersionId"); default: return null; } } + function checkOutputEditorInput($aClean) + { + $sErrors = ""; + + if(!$aClean['iVersionId']) + $sErrors .= "
  • No version id defined; something may have gone wrong with the URL
  • \n"; + + if(!$aClean['sBody']) + $sErrors .= "
  • You need to enter a message!
  • \n"; + + return $sErrors; + } + function outputEditor($aClean) { $sMesTitle = "Post New Comment"; @@ -612,7 +625,6 @@ class Comment { echo html_frame_end(); echo "\n"; - echo "\n"; echo "\n"; }