From e270cd093b993887142ad742a700dcc0b6b66ed6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu>
Date: Mon, 17 Sep 2007 11:11:57 +0000
Subject: [PATCH] #176084 by Stefan Nantegaal and dvessel: fix notices in
 theme.inc, when specific sidebars are not set

---
 includes/theme.inc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/includes/theme.inc b/includes/theme.inc
index 188e723cdb1f..336b121da081 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1748,17 +1748,14 @@ function template_preprocess_page(&$variables) {
     $body_classes[] = 'node-type-'. form_clean_id($variables['node']->type);
   }
   // Add information about the number of sidebars.
-  if ($variables['left'] && $variables['right']) {
+  if ($variables['layout'] == 'both') {
     $body_classes[] = 'two-sidebars';
   }
-  elseif ($variables['left']) {
-    $body_classes[] = 'one-sidebar sidebar-left';
-  }
-  elseif ($variables['right']) {
-    $body_classes[] = 'one-sidebar sidebar-right';
+  elseif ($variables['layout'] == 'none') {
+    $body_classes[] = 'no-sidebars';
   }
   else {
-    $body_classes[] = 'no-sidebars';
+    $body_classes[] = 'one-sidebar sidebar-'. $variables['layout'];
   }
   // Implode with spaces.
   $variables['body_classes'] = implode(' ', $body_classes);
-- 
GitLab