diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-14 02:14:20 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-14 02:14:20 +0000 |
commit | 6ccf524f48df49ed97a2c0c051f0276a377b9f48 (patch) | |
tree | 5016040ef327c29523774471ec52acd7b4644eb9 /mod/groups/lib/discussion.php | |
parent | 5dfb9a97cd5d99479610339f1c613f1468b96687 (diff) | |
download | elgg-6ccf524f48df49ed97a2c0c051f0276a377b9f48.tar.gz elgg-6ccf524f48df49ed97a2c0c051f0276a377b9f48.tar.bz2 |
finished discussion rewrite to use new html/css
git-svn-id: http://code.elgg.org/elgg/trunk@7881 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/lib/discussion.php')
-rw-r--r-- | mod/groups/lib/discussion.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 92ee94013..4a3cd989a 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -165,7 +165,15 @@ function discussion_handle_view_page($guid) { elgg_push_breadcrumb($group->name, "pg/discussion/owner/$group->guid"); elgg_push_breadcrumb($topic->title); - $content = elgg_view('forum/viewposts', array('entity' => $topic)); + $content = elgg_view_entity($topic, true); + if ($topic->status == 'closed') { + $content .= elgg_view_comments($topic, false); + $content .= elgg_view('discussion/closed'); + } elseif ($group->isMember() || isadminloggedin()) { + $content .= elgg_view_comments($topic); + } else { + $content .= elgg_view_comments($topic, false); + } $params = array( 'content' => $content, @@ -178,6 +186,12 @@ function discussion_handle_view_page($guid) { echo elgg_view_page($title, $body); } +/** + * Prepare discussion topic form variables + * + * @param ElggObject $topic Topic object if editing + * @return array + */ function discussion_prepare_form_vars($topic = NULL) { // input names => defaults $values = array( |