diff --git a/includes/menu.inc b/includes/menu.inc
index 02370ac29a44..7e6104d37a35 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -2188,17 +2188,13 @@ function menu_local_tabs() {
function theme_menu_local_tasks(&$variables) {
$output = '';
- if (!empty($variables['primary'])) {
- $variables['primary']['#prefix'] = '
' . t('Primary tabs') . '
';
- $variables['primary']['#prefix'] .= '';
- $variables['primary']['#suffix'] = '
';
- $output .= drupal_render($variables['primary']);
+ if ($primary = drupal_render($variables['primary'])) {
+ $output .= '' . t('Primary tabs') . '
';
+ $output .= '';
}
- if (!empty($variables['secondary'])) {
- $variables['secondary']['#prefix'] = '' . t('Secondary tabs') . '
';
- $variables['secondary']['#prefix'] .= '';
- $variables['secondary']['#suffix'] = '
';
- $output .= drupal_render($variables['secondary']);
+ if ($secondary = drupal_render($variables['secondary'])) {
+ $output .= '' . t('Secondary tabs') . '
';
+ $output .= '';
}
return $output;
diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php
index 8ffe82aa6298..bee1a2c49fcc 100644
--- a/modules/system/page.tpl.php
+++ b/modules/system/page.tpl.php
@@ -122,7 +122,7 @@
-
+
diff --git a/themes/bartik/templates/page.tpl.php b/themes/bartik/templates/page.tpl.php
index 7b0f99097a0e..ec8062454509 100644
--- a/themes/bartik/templates/page.tpl.php
+++ b/themes/bartik/templates/page.tpl.php
@@ -192,9 +192,9 @@
-
+
-
+
diff --git a/themes/garland/page.tpl.php b/themes/garland/page.tpl.php
index 326255cd4ef8..cc72b0829242 100644
--- a/themes/garland/page.tpl.php
+++ b/themes/garland/page.tpl.php
@@ -46,7 +46,7 @@
>
-
+