From fcfba5a71417b51823be0ec564ce8e2fb8de7189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sun, 29 Mar 2009 21:54:35 +0200 Subject: [PATCH] Show app names on 'Admin comments' page --- admin/adminCommentView.php | 2 +- include/comment.php | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/admin/adminCommentView.php b/admin/adminCommentView.php index 05edd8a..13f5929 100644 --- a/admin/adminCommentView.php +++ b/admin/adminCommentView.php @@ -60,7 +60,7 @@ while ($oRow = query_fetch_object($commentIds)) $hResult = query_parameters($sQuery, $oRow->commentId); /* call view_app_comment to display the comment */ $oComment_row = query_fetch_object($hResult); - Comment::view_app_comment($oComment_row); + Comment::view_app_comment($oComment_row, true); } /* display page selection links */ diff --git a/include/comment.php b/include/comment.php index c47c158..c637aa3 100644 --- a/include/comment.php +++ b/include/comment.php @@ -240,13 +240,13 @@ class Comment { /** * display a single comment (in $oRow) */ - function view_app_comment($oRow) + function view_app_comment($oRow, $bShowAppName = false) { $oComment = new comment(null, $oRow); - $oComment->display(); + $oComment->output_comment($bShowAppName); } - function display() + private function output_comment($bShowAppName = false) { echo html_frame_start('','98%'); echo '',"\n"; @@ -254,6 +254,10 @@ class Comment { // message header echo "\n"; @@ -290,6 +294,11 @@ class Comment { echo html_frame_end(); } + function display() + { + $this->output_comment(); + } + /** * grab single comment for commentId */
iCommentId.">\n"; echo " ".$this->sSubject."
\n"; + + if($bShowAppName) + echo 'Application: ' . version::fullNameLink($this->iVersionId) . "
\n"; + echo " by ".forum_lookup_user($this->oOwner->iUserId)." on ".$this->sDateCreated."
\n"; echo "
\n"; @@ -264,8 +268,8 @@ class Comment { $oM = new objectManager("comment", "Post new comment"); $oM->setReturnTo($oVersion->objectMakeUrl()); // reply post buttons - echo " [makeUrl("add")."&iVersionId=$this->iVersionId\">post new] \n"; - echo " [makeUrl("add")."&iVersionId=$this->iVersionId". + echo " [makeUrl("add")."&iVersionId=$this->iVersionId\">post new] \n"; + echo " [makeUrl("add")."&iVersionId=$this->iVersionId". "&iThread=$this->iCommentId\">reply to this] \n"; echo "