Author: jfthomps
Date: Fri Jan 30 18:28:31 2015
New Revision: 1656082
URL: http://svn.apache.org/r1656082
Log:
VCL-655 - Manage groups - create a default or none user group
groups.php:
-modified editOrAddGroup: added check for "Default for Editable by" user group
not being in $affilusergroups, and if so, add it
-modified confirmEditOrAddGroup: modified call to getUserGroups to pass no
arguments so that non-custom user groups (i.e. Default for Editable by) are
also returned
Modified:
vcl/trunk/web/.ht-inc/groups.php
Modified: vcl/trunk/web/.ht-inc/groups.php
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/groups.php?rev=1656082&r1=1656081&r2=1656082&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/groups.php (original)
+++ vcl/trunk/web/.ht-inc/groups.php Fri Jan 30 18:28:31 2015
@@ -628,6 +628,16 @@ function editOrAddGroup($state) {
}
}
+ if($data['type'] == 'user' && ! array_key_exists($defaultusergroupid,
$affilusergroups)) {
+ if($user['showallgroups']) {
+ $affil = getAffiliationName(1);
+ $affilusergroups[$defaultusergroupid]['name'] =
"Default for Editable by@$affil";
+ }
+ else
+ $affilusergroups[$defaultusergroupid]['name'] =
'Default for Editable by';
+ uasort($affilusergroups, "sortKeepIndex");
+ }
+
$editusergroup = 0;
if($data['type'] != 'user')
print "<FORM action=\"" . BASEURL . SCRIPT . "#resources\"
method=post>\n";
@@ -1383,7 +1393,7 @@ function confirmEditOrAddGroup($state) {
}
$resourcetypes = getTypes("resources");
- $usergroups = getUserGroups(1);
+ $usergroups = getUserGroups();
$affils = getAffiliations();
$editname = getContinuationVar('editname', 1);