summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-08-22 11:13:04 +0000
committerDries Buytaert <dries@buytaert.net>2006-08-22 11:13:04 +0000
commitc4f1e4ba13905004fdcef814bdba949ec842ce6b (patch)
treec5590b4a059ff7c758d01dd2b6a39e5f3d558aa2 /includes/common.inc
parenta8de1e92d73a673dc7404e5aa82de1df35f834be (diff)
downloadbrdo-c4f1e4ba13905004fdcef814bdba949ec842ce6b.tar.gz
brdo-c4f1e4ba13905004fdcef814bdba949ec842ce6b.tar.bz2
- Patch #76444 by chx, moshe, eaton, angie et al: make it possible to control access to form elements.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index cbdb54f73..79bf69b0e 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1692,9 +1692,10 @@ function drupal_cron_run() {
* The rendered HTML.
*/
function drupal_render(&$elements) {
- if (!isset($elements)) {
+ if (!isset($elements) || (isset($elements['#access']) && !$elements['#access'])) {
return NULL;
}
+
$content = '';
uasort($elements, "_element_sort");
if (!isset($elements['#children'])) {
@@ -1792,4 +1793,4 @@ function element_child($key) {
*/
function element_children($element) {
return array_filter(array_keys((array) $element), 'element_child');
-} \ No newline at end of file
+}