Commit bc42b595 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

fixing bug where users are unable to give logged in users, friends, public or...

fixing bug where users are unable to give logged in users, friends, public or groups access to views
problem caused by me changing what I thought were just language strings, which messed everything up
parent 40bbc552
......@@ -77,16 +77,16 @@ $string['viewsubmittedtogroup'] = 'This view has been submitted to <a href="' .
$string['nobodycanseethisview'] = 'Nobody can see this view';
// access levels
$string['Public'] = 'Public';
$string['loggedinusers'] = 'Logged In Users';
$string['Friends'] = 'Friends';
$string['Groups'] = 'Groups';
$string['Users'] = 'Users';
$string['friends'] = 'friends';
$string['group'] = 'group';
$string['public'] = 'Public';
$string['loggedin'] = 'Logged In Users';
$string['friends'] = 'Friends';
$string['groups'] = 'Groups';
$string['users'] = 'Users';
$string['friendslower'] = 'friends';
$string['grouplower'] = 'group';
$string['tutors'] = 'tutors';
$string['loggedin'] = 'logged in users';
$string['public'] = 'public';
$string['loggedinlower'] = 'logged in users';
$string['publiclower'] = 'public';
// view user
$string['inviteusertojoingroup'] = 'Invite this user to join a group';
......
......@@ -41,10 +41,10 @@ function pieform_element_viewacl(Pieform $form, $element) {
// Look for the presets and split them into two groups
$presets = array();
if (get_config('allowpublicviews') == '1') {
$presets = array('Public', 'loggedinusers', 'Friends');
$presets = array('public', 'loggedin', 'friends');
}
else {
$presets = array('loggedinusers', 'Friends');
$presets = array('loggedinu', 'friends');
}
if ($value) {
foreach ($value as $key => &$item) {
......
......@@ -44,9 +44,9 @@
{foreach from=$view.accessgroups item=accessgroup name=artefacts}
{* this is messy, but is like this so there aren't spaces between links and commas *}
{if $accessgroup.accesstype == 'loggedin'}
{str tag="loggedin" section="view"}{elseif $accessgroup.accesstype == 'public'}
{str tag="public" section="view"}{elseif $accessgroup.accesstype == 'friends'}
<a href="{$WWWROOT}user/">{str tag="friends" section="view"}</a>{elseif $accessgroup.accesstype == 'group'}
{str tag="loggedinlower" section="view"}{elseif $accessgroup.accesstype == 'public'}
{str tag="publiclower" section="view"}{elseif $accessgroup.accesstype == 'friends'}
<a href="{$WWWROOT}user/">{str tag="friendslower" section="view"}</a>{elseif $accessgroup.accesstype == 'group'}
<a href="{$WWWROOT}group/view.php?id={$accessgroup.id}">{$accessgroup.name|escape}</a>{elseif $accessgroup.accesstype == 'tutorgroup'}
<a href="{$WWWROOT}group/view.php?id={$accessgroup.id}">{$accessgroup.name|escape}</a> ({str tag="tutors" section="view"}){elseif $accessgroup.accesstype == 'user'}
<a href="{$WWWROOT}user/view.php?id={$accessgroup.id}">{$accessgroup.id|display_name|escape}</a>{/if}{if !$smarty.foreach.artefacts.last},{/if}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment