Commit b8256b910c53311513259c8912e73e3f1ced15c2
1 parent
a3272e1a
Consistently use form variables prefixed with 'f' for passing values.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3187 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
7 additions
and
5 deletions
presentation/lookAndFeel/knowledgeTree/discussions/addCommentUI.inc
| ... | ... | @@ -58,11 +58,11 @@ function getAddComment($iDocumentID, $sSubject, $sBody, $iCommentID, $iNewCommen |
| 58 | 58 | $sToRender .= "<input onmouseover=\"this.style.cursor='hand'\" type=\"image\" src=\"" . KTHtml::getSubmitButton() . "\" border=0></td>"; |
| 59 | 59 | if ($iNewComment>0) { // If user is creating a new comment |
| 60 | 60 | $sToRender .= "<td width=\"10\" valign=top><a href=\"" . generateControllerLink("viewDiscussion", "fForDiscussion=1&fDocumentID=$iDocumentID") . "\"><img src=\"" . KTHtml::getCancelButton() . "\" border=0 ></a></td></tr>\n"; |
| 61 | - $sToRender .= "<input type=\"hidden\" name=\"iNewComment\" value=\"1\"/>"; | |
| 61 | + $sToRender .= "<input type=\"hidden\" name=\"fNewComment\" value=\"1\"/>"; | |
| 62 | 62 | } else { // If the user is replying to a comment |
| 63 | 63 | $sToRender .= "<input type=\"hidden\" name=\"fInReplyTo\" value=\"$iCommentID\"/>"; |
| 64 | 64 | $sToRender .= "<input type=\"hidden\" name=\"fThreadID\" value=\"". $iThreadID . "\"/>"; |
| 65 | - $sToRender .= "<td width=\"10\" valign=top><a href=\"" . generateControllerLink("viewComment", "fViewComment=1&iDocumentID=$iDocumentID&iCommentID=$iCommentID") . "\"><img src=\"" . KTHtml::getCancelButton() . "\" border=0 ></a></td></tr>\n"; | |
| 65 | + $sToRender .= "<td width=\"10\" valign=top><a href=\"" . generateControllerLink("viewComment", "fViewComment=1&fDocumentID=$iDocumentID&fCommentID=$iCommentID") . "\"><img src=\"" . KTHtml::getCancelButton() . "\" border=0 ></a></td></tr>\n"; | |
| 66 | 66 | } |
| 67 | 67 | $sToRender .= "<br><tr><td valign=\"top\" width=10><b>Subject</b></td><td colspan=2>\n"; |
| 68 | 68 | $sToRender .= "<input type=\"text\" style=\"width:385\" name=\"fSubject\" value=\"$sSubject\"></td></tr>\n"; | ... | ... |
presentation/lookAndFeel/knowledgeTree/discussions/viewCommentBL.php
| ... | ... | @@ -35,17 +35,19 @@ require_once("$default->fileSystemRoot/lib/discussions/DiscussionThread.inc"); |
| 35 | 35 | require_once("$default->fileSystemRoot/lib/discussions/DiscussionComment.inc"); |
| 36 | 36 | require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc"); |
| 37 | 37 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 38 | + | |
| 39 | +KTUtil::extractGPC('fCommentID', 'fDocumentID', 'fThreadID'); | |
| 38 | 40 | |
| 39 | 41 | if (checkSession()) { |
| 40 | 42 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| 41 | 43 | $oPatternCustom = & new PatternCustom(); |
| 42 | 44 | |
| 43 | 45 | // validate input parameters |
| 44 | - if (isset($iCommentID) && isset($iDocumentID)) { | |
| 45 | - $oComment = DiscussionComment::get($iCommentID); | |
| 46 | + if (isset($fCommentID) && isset($fDocumentID)) { | |
| 47 | + $oComment = DiscussionComment::get($fCommentID); | |
| 46 | 48 | $oUser = User::get($oComment->getUserID()); |
| 47 | 49 | $main->setFormAction("$default->rootUrl/presentation/lookAndFeel/knowledgeTree/discussions/addCommentBL.php?fDocumentID=$iDocumentID&fCommentID=$iCommentID&fReplyComment=1"); |
| 48 | - $oPatternCustom->setHtml(getCommentBody($oComment,$iDocumentID,$oUser,$iThreadID)); | |
| 50 | + $oPatternCustom->setHtml(getCommentBody($oComment,$fDocumentID,$oUser,$fThreadID)); | |
| 49 | 51 | } else { |
| 50 | 52 | $main->setErrorMessage(_("You didn't specify a comment to view")); |
| 51 | 53 | } | ... | ... |