diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-06-18 19:56:33 -0400 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-06-18 19:56:33 -0400 |
commit | ec7b94a64aef23b85866ecdac8e8acc712d29bb6 (patch) | |
tree | a108205c3fa0b694d8ce0ebaafd259480d6b530a /views/default/input/access.php | |
parent | c80ba5aa03264dd64c20ed8ae222e87f9371a44d (diff) | |
parent | 2b68a4d217c35a5587c462620789493cf2804ba2 (diff) | |
download | elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.gz elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.bz2 |
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'views/default/input/access.php')
-rw-r--r-- | views/default/input/access.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php index 7fa2323bf..40a93aaa4 100644 --- a/views/default/input/access.php +++ b/views/default/input/access.php @@ -3,12 +3,10 @@ * Elgg access level input * Displays a dropdown input field * - * @package Elgg - * @subpackage Core - * * @uses $vars['value'] The current value, if any * @uses $vars['options_values'] * @uses $vars['name'] The name of the input field + * @uses $vars['entity'] Optional. The entity for this access control (uses access_id) */ $defaults = array( @@ -18,6 +16,11 @@ $defaults = array( 'options_values' => get_write_access_array(), ); +if (isset($vars['entity'])) { + $defaults['value'] = $vars['entity']->access_id; + unset($vars['entity']); +} + $vars = array_merge($defaults, $vars); if ($vars['value'] == ACCESS_DEFAULT) { @@ -26,4 +29,4 @@ if ($vars['value'] == ACCESS_DEFAULT) { if (is_array($vars['options_values']) && sizeof($vars['options_values']) > 0) { echo elgg_view('input/dropdown', $vars); -}
\ No newline at end of file +} |