From b878ea5e67cf47aad416aadd0e6ecae1c56da4b9 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 5 Mar 2011 20:23:35 +0000 Subject: reviewed groups plugin and added todo's git-svn-id: http://code.elgg.org/elgg/trunk@8591 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/forms/groups/search.php | 3 ++ mod/groups/views/default/groups/edit.php | 4 +- .../views/default/groups/group_sort_menu.php | 7 ++-- .../default/groups/profile/activity_module.php | 47 ++-------------------- mod/groups/views/default/groups/side_menu.php | 5 +++ .../views/default/groups/sidebar/members.php | 2 + .../river/annotation/group_topic_post/reply.php | 1 - .../default/river/relationship/member/create.php | 1 - mod/groups/views/default/settings/groups/edit.php | 4 +- 9 files changed, 23 insertions(+), 51 deletions(-) (limited to 'mod') diff --git a/mod/groups/views/default/forms/groups/search.php b/mod/groups/views/default/forms/groups/search.php index 8495fc186..ddf639b74 100644 --- a/mod/groups/views/default/forms/groups/search.php +++ b/mod/groups/views/default/forms/groups/search.php @@ -1,4 +1,7 @@ 'group', 'count' => true)); $selected = elgg_extract('selected', $vars); - //url - $url = elgg_get_site_url() . "pg/groups/all/"; +$url = elgg_get_site_url() . "pg/groups/all/"; ?>
diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php index 1c7e6daa2..78eae9cec 100644 --- a/mod/groups/views/default/groups/profile/activity_module.php +++ b/mod/groups/views/default/groups/profile/activity_module.php @@ -2,11 +2,11 @@ /** * Groups latest activity * + * @todo add people joining group to activity + * * @package Groups */ -global $CONFIG; - if ($vars['entity']->activity_enable == 'no') { return true; } @@ -16,7 +16,6 @@ if (!$group) { return true; } - $all_link = elgg_view('output/url', array( 'href' => "pg/groups/activity/$group->guid", 'text' => elgg_echo('link:view:all'), @@ -27,10 +26,11 @@ $header .= '

' . elgg_echo('groups:activity') . '

'; elgg_push_context('widgets'); +$db_prefix = elgg_get_config('dbprefix'); $content = elgg_list_river(array( 'limit' => 4, 'pagination' => false, - 'joins' => array("join {$CONFIG->dbprefix}entities e1 on e1.guid = rv.object_guid"), + 'joins' => array("join {$db_prefix}entities e1 on e1.guid = rv.object_guid"), 'wheres' => array("(e1.container_guid = $group->guid)"), )); elgg_pop_context(); @@ -40,42 +40,3 @@ if (!$content) { } echo elgg_view_module('info', '', $content, array('header' => $header)); - -return true; -?> - - "pg/groups/activity/" . elgg_get_page_owner_guid(), - 'text' => elgg_echo('link:view:all'), - )); -?> - -

-guid; - $limit = 5; - - $offset = (int) get_input('offset', 0); - - // Sanitise variables -- future proof in case they get sourced elsewhere - $limit = (int) $limit; - $offset = (int) $offset; - $group_guid = (int) $group_guid; - - //@todo Holy cow, this really needs to be a function! - $sql = "SELECT {$CONFIG->dbprefix}river.id, {$CONFIG->dbprefix}river.type, {$CONFIG->dbprefix}river.subtype, {$CONFIG->dbprefix}river.action_type, {$CONFIG->dbprefix}river.access_id, {$CONFIG->dbprefix}river.view, {$CONFIG->dbprefix}river.subject_guid, {$CONFIG->dbprefix}river.object_guid, {$CONFIG->dbprefix}river.posted FROM {$CONFIG->dbprefix}river INNER JOIN {$CONFIG->dbprefix}entities AS entities1 ON {$CONFIG->dbprefix}river.object_guid = entities1.guid INNER JOIN {$CONFIG->dbprefix}entities AS entities2 ON entities1.container_guid = entities2.guid WHERE entities2.guid = $group_guid OR {$CONFIG->dbprefix}river.object_guid = $group_guid ORDER BY posted DESC limit {$offset},{$limit}"; - - $items = get_data($sql); - - if (count($items) > 0) { - $river_items = elgg_view('river/item/list',array( - 'limit' => $limit, - 'offset' => $offset, - 'items' => $items - )); - } - echo $river_items; - -?> diff --git a/mod/groups/views/default/groups/side_menu.php b/mod/groups/views/default/groups/side_menu.php index 0ae2bef63..df2314689 100644 --- a/mod/groups/views/default/groups/side_menu.php +++ b/mod/groups/views/default/groups/side_menu.php @@ -1,3 +1,8 @@ +