From 1a0c039a493f1af8090c58bb7209c92c01bf716e Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 24 Feb 2009 19:42:25 +0000 Subject: Removing an infinite loop in groups. git-svn-id: https://code.elgg.org/elgg/trunk@2937 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/groupprofile.php | 2 +- mod/groups/views/default/groups/groupprofile.php | 124 +++++++++++++++-------- 2 files changed, 81 insertions(+), 45 deletions(-) diff --git a/mod/groups/groupprofile.php b/mod/groups/groupprofile.php index 8945e6cc6..7d84f5d25 100644 --- a/mod/groups/groupprofile.php +++ b/mod/groups/groupprofile.php @@ -50,7 +50,7 @@ $title = elgg_echo('groups:notfound'); $area2 = elgg_view_title($title); - $area2 .= elgg_echo('groups:notfound:details'); + $area2 .= "
" . elgg_echo('groups:notfound:details') . "
"; $body = elgg_view_layout('two_column_left_sidebar', "", $area2,""); } diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php index e26ecf1fd..f1fc9823d 100644 --- a/mod/groups/views/default/groups/groupprofile.php +++ b/mod/groups/views/default/groups/groupprofile.php @@ -1,58 +1,94 @@ name; - - // Hide some items from closed groups when the user is not logged in. - $view_all = true; - - $groupaccess = group_gatekeeper(false); - if (!$groupaccess) - $view_all = false; - - - $area2 = elgg_view_title($title); - $area2 .= elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true)); - - if ($view_all) { - //group profile 'items' - these are not real widgets, just contents to display - $area2 .= elgg_view('groups/profileitems',array('entity' => $group)); - - //group members - $area3 = elgg_view('groups/members',array('entity' => $group)); - } - else - { - $area2 .= elgg_view('groups/closedmembership', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true)); +?> +
+
+ + $vars['entity'], + //'align' => "left", + 'size' => $iconsize, + ) + ); + ?> + +
+
+ " . elgg_echo("groups:owner") . ": owner_guid)->getURL() . "\">" . get_user($vars['entity']->owner_guid)->name . "

"; + + ?> +

guid, true, 'user', '', 0, '', 9999, 0, true); ?>

+
+
+ +
+ group) && sizeof($vars['config']->group) > 0){ + + foreach($vars['config']->group as $shortname => $valtype) { + if ($shortname != "name") { + $value = $vars['entity']->$shortname; + + if (!empty($value)) { + //This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + } + + echo "

"; + echo ""; + echo elgg_echo("groups:{$shortname}"); + echo ": "; + + echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname)); + + echo "

"; + } + } + } } + ?> +
+ +
+ +

+ +canEdit()) + { + +?> + + - $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2, $area3); - } else { - $title = elgg_echo('groups:notfound'); - - $area2 = elgg_view_title($title); - $area2 .= "

" . elgg_echo('groups:notfound:details') . "
"; - - $body = elgg_view_layout('two_column_left_sidebar', "", $area2,""); + + \ No newline at end of file + +?> + +

+
+
\ No newline at end of file -- cgit v1.2.3