summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-03 05:27:18 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-03 05:27:18 +0000
commitae842168f9a9b7227fe7eae8e79928b4d3b70d4e (patch)
tree4e4f648cfe4b18a7fa1a5764a3d6cb6b442ffb32 /modules/system
parenta986e349fa3676fce41f2aa02fb7b67fc24dacda (diff)
downloadbrdo-ae842168f9a9b7227fe7eae8e79928b4d3b70d4e.tar.gz
brdo-ae842168f9a9b7227fe7eae8e79928b4d3b70d4e.tar.bz2
#602522 by effulgentsia, sun, and moshe weitzman: Make links in renderable arrays and forms (e.g. 'Operations') alterable.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc9
-rw-r--r--modules/system/system.module7
2 files changed, 7 insertions, 9 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 9f13a60b4..877598119 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -240,13 +240,8 @@ function system_themes_form() {
);
$options[$theme->name] = $theme->info['name'];
- if (drupal_theme_access($theme)) {
- $form[$theme->name]['operations'] = array('#markup' => l(t('configure'), 'admin/appearance/settings/' . $theme->name) );
- }
- else {
- // Dummy element for drupal_render. Cleaner than adding a check in the theme function.
- $form[$theme->name]['operations'] = array();
- }
+ $form[$theme->name]['operations'] = drupal_theme_access($theme) ? array('#type' => 'link', '#title' => t('configure'), '#href' => 'admin/appearance/settings/' . $theme->name) : array();
+
if (!empty($theme->status)) {
$status[] = $theme->name;
}
diff --git a/modules/system/system.module b/modules/system/system.module
index 9ec9e942f..0b587db77 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -445,7 +445,7 @@ function system_element_info() {
// Form structure.
$types['item'] = array(
'#markup' => '',
- '#theme' => 'markup',
+ '#pre_render' => array('drupal_pre_render_markup'),
'#theme_wrappers' => array('form_element'),
);
$types['hidden'] = array(
@@ -458,7 +458,10 @@ function system_element_info() {
);
$types['markup'] = array(
'#markup' => '',
- '#theme' => 'markup',
+ '#pre_render' => array('drupal_pre_render_markup'),
+ );
+ $types['link'] = array(
+ '#pre_render' => array('drupal_pre_render_link', 'drupal_pre_render_markup'),
);
$types['fieldset'] = array(
'#collapsible' => FALSE,