aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-13 14:03:40 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-13 14:03:40 +0000
commit945da1afe0b3315a289f9694311ff878b5a65a7b (patch)
tree295d7860e9806ac505a5ccfbfebc07fb035f2aff /mod/groups
parent1d023ffb53e1383d2aeb5a44fa76daae959bbe8d (diff)
downloadelgg-945da1afe0b3315a289f9694311ff878b5a65a7b.tar.gz
elgg-945da1afe0b3315a289f9694311ff878b5a65a7b.tar.bz2
Closes #761, #718: Group permissions now made much much simpler.
git-svn-id: https://code.elgg.org/elgg/trunk@2744 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/actions/edit.php10
-rw-r--r--mod/groups/languages/en.php8
-rw-r--r--mod/groups/views/default/forms/groups/edit.php9
3 files changed, 13 insertions, 14 deletions
diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php
index e30fc7fee..6b66ab9f1 100644
--- a/mod/groups/actions/edit.php
+++ b/mod/groups/actions/edit.php
@@ -57,14 +57,12 @@
// Group membership - should these be treated with same constants as access permissions?
switch (get_input('membership'))
{
- case 0: $group->membership = ACCESS_PRIVATE;
- case 1 :$group->membership = ACCESS_LOGGED_IN; break;
- case 2:
- default: $group->membership = ACCESS_PUBLIC;
+ case 2: $group->membership = ACCESS_PUBLIC; break;
+ default: $group->membership = ACCESS_PRIVATE;
}
- // Get access
- $group->access_id = get_input('access_id', ACCESS_PRIVATE);
+ // Set access - all groups are public from elgg's point of view.
+ $group->access_id = 2;
// Set group tool options
$group->files_enable = get_input('files_enable', 'yes');
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 5f216a9b8..3b678b16a 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -32,7 +32,7 @@
'groups:interests' => 'Interests',
'groups:website' => 'Website',
'groups:members' => 'Group members',
- 'groups:membership' => "Membership",
+ 'groups:membership' => "Group membership permissions",
'groups:access' => "Access permissions",
'groups:owner' => "Owner",
'groups:widget:num_display' => 'Number of groups to display',
@@ -59,6 +59,12 @@
'groupforumtopic:new' => "New forum post",
/*
+ * Access
+ */
+ 'groups:access:private' => 'Closed - Users must be invited',
+ 'groups:access:public' => 'Open - Any user may join',
+
+ /*
Group tools
*/
'groups:enablepages' => 'Enable group pages',
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
index 2841c9dfe..5a0976cc7 100644
--- a/mod/groups/views/default/forms/groups/edit.php
+++ b/mod/groups/views/default/forms/groups/edit.php
@@ -49,16 +49,11 @@
<p>
<label>
<?php echo elgg_echo('groups:membership'); ?><br />
- <?php echo elgg_view('input/access', array('internalname' => 'membership','value' => $vars['entity']->membership, 'options' => array( ACCESS_PRIVATE => elgg_echo('PRIVATE'), ACCESS_PUBLIC => elgg_echo('PUBLIC')))); ?>
+ <?php echo elgg_view('input/access', array('internalname' => 'membership','value' => $vars['entity']->membership, 'options' => array( ACCESS_PRIVATE => elgg_echo('groups:access:private'), ACCESS_PUBLIC => elgg_echo('groups:access:public')))); ?>
</label>
</p>
- <p>
- <label>
- <?php echo elgg_echo('groups:access'); ?><br />
- <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $vars['entity']->access_id )); ?>
- </label>
- </p>
+
<p>
<label>
<?php echo elgg_echo('groups:enablepages'); ?><br />