diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-23 10:29:43 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-23 10:29:43 +0000 |
commit | abf321f2fb25d1750c96a67807bcda84a63ba497 (patch) | |
tree | b5adddfd4456b707a35b8c35acb3782ecfe5bce0 /views/default/input | |
parent | ba23d8e106d4652e229d1839ec2dd13cf4daaad9 (diff) | |
download | elgg-abf321f2fb25d1750c96a67807bcda84a63ba497.tar.gz elgg-abf321f2fb25d1750c96a67807bcda84a63ba497.tar.bz2 |
Added site default access permissions. Refs #744
git-svn-id: https://code.elgg.org/elgg/trunk@2885 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input')
-rw-r--r-- | views/default/input/access.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php index db938111e..e08eca13a 100644 --- a/views/default/input/access.php +++ b/views/default/input/access.php @@ -15,15 +15,19 @@ * @uses $vars['js'] Any Javascript to enter into the input tag
* @uses $vars['internalname'] The name of the input field
*
- */ - - if (isset($vars['class'])) $class = $vars['class']; + */
+
+ if (isset($vars['class'])) $class = $vars['class'];
if (!$class) $class = "input-access";
- - if ((!isset($vars['options'])) || (!is_array($vars['options']))) +
+ if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
+ $vars['value'] = get_default_access();
+
+
+ if ((!isset($vars['options'])) || (!is_array($vars['options'])))
{
$vars['options'] = array();
- $vars['options'] = get_write_access_array(); + $vars['options'] = get_write_access_array();
}
if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
|