From c4f1e4ba13905004fdcef814bdba949ec842ce6b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 22 Aug 2006 11:13:04 +0000 Subject: - Patch #76444 by chx, moshe, eaton, angie et al: make it possible to control access to form elements. --- includes/common.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes/common.inc') 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 +} -- cgit v1.2.3