? sites/all/modules/devel
? sites/default/files
? sites/default/settings.php
Index: themes/bartik/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bartik/template.php,v
retrieving revision 1.1
diff -u -p -r1.1 template.php
--- themes/bartik/template.php	6 Jul 2010 05:25:51 -0000	1.1
+++ themes/bartik/template.php	11 Jul 2010 15:43:17 -0000
@@ -45,18 +45,9 @@ function bartik_process_page(&$variables
   if (module_exists('color')) {
     _color_page_alter($variables);
   }
-  // Always print the site name and slogan, but if they are toggled off, we'll
-  // just hide them visually.
-  $variables['hide_site_name']   = theme_get_setting('toggle_name') ? FALSE : TRUE;
-  $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
-  if ($variables['hide_site_name']) {
-    // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
-    $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
-  }
-  if ($variables['hide_site_slogan']) {
-    // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
-    $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
-  }
+
+  _bartik_process_page($variables);
+
   // Since the title and the shortcut link are both block level elements,
   // positioning them next to each other is much simpler with a wrapper div.
   if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
@@ -78,18 +69,7 @@ function bartik_process_page(&$variables
  * Override or insert variables into the maintenance page template.
  */
 function bartik_process_maintenance_page(&$variables) {
-  // Always print the site name and slogan, but if they are toggled off, we'll
-  // just hide them visually.
-  $variables['hide_site_name']   = theme_get_setting('toggle_name') ? FALSE : TRUE;
-  $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
-  if ($variables['hide_site_name']) {
-    // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
-    $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
-  }
-  if ($variables['hide_site_slogan']) {
-    // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
-    $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
-  }
+  _bartik_process_page($variables);
 }
 
 /**
@@ -102,7 +82,7 @@ function bartik_preprocess_block(&$varia
     $variables['title_attributes_array']['class'][] = 'element-invisible';
   }
   // System menu blocks should get the same class as menu module blocks.
-  if (in_array($variables['block']->delta, array_keys(menu_list_system_menus()))) {
+  if (($menus = menu_list_system_menus()) && isset($menus[$variables['block']->delta])) {
     $variables['classes_array'][] = 'block-menu';
     // Also, hide the title if its in the header region.
     if ($variables['block']->region == 'header') {
@@ -144,3 +124,21 @@ function bartik_page_alter(&$page) {
     }
   }
 }
+
+/**
+ * Helper function for handling the site name and slogan.
+ */
+function _bartik_process_page(&$variables) {
+  // Always print the site name and slogan, but if they are toggled off, we'll
+  // just hide them visually.
+  $variables['show_site_name']   = theme_get_setting('toggle_name') ? TRUE : FALSE;
+  $variables['show_site_slogan'] = theme_get_setting('toggle_slogan') ? TRUE : FALSE;
+  if (!$variables['show_site_name']) {
+    // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
+     $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
+  }
+  if (!$variables['show_site_slogan']) {
+    // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
+    $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
+  }
+}
Index: themes/bartik/templates/maintenance-page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bartik/templates/maintenance-page.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 maintenance-page.tpl.php
--- themes/bartik/templates/maintenance-page.tpl.php	6 Jul 2010 05:25:51 -0000	1.1
+++ themes/bartik/templates/maintenance-page.tpl.php	11 Jul 2010 15:43:17 -0000
@@ -34,24 +34,24 @@
   <div id="header"><div class="section clearfix">
 
     <?php if ($site_name || $site_slogan): ?>
-      <div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+      <div id="name-and-slogan"<?php if (!$show_site_name && !$show_site_slogan) { print ' class="element-invisible"'; } ?>>
 
         <?php if ($site_name): ?>
           <?php if ($title): ?>
-            <div id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
+            <div id="site-name"<?php if (!$show_site_name) { print ' class="element-invisible"'; } ?>>
               <strong>
                 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
               </strong>
             </div>
           <?php else: /* Use h1 when the content title is empty */ ?>
-            <h1 id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
+            <h1 id="site-name"<?php if (!$show_site_name) { print ' class="element-invisible"'; } ?>>
               <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
             </h1>
           <?php endif; ?>
         <?php endif; ?>
 
         <?php if ($site_slogan): ?>
-          <div id="site-slogan"<?php if ($hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+          <div id="site-slogan"<?php if (!$show_site_slogan) { print ' class="element-invisible"'; } ?>>
             <?php print $site_slogan; ?>
           </div>
         <?php endif; ?>
Index: themes/bartik/templates/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bartik/templates/page.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 page.tpl.php
--- themes/bartik/templates/page.tpl.php	6 Jul 2010 05:25:51 -0000	1.1
+++ themes/bartik/templates/page.tpl.php	11 Jul 2010 15:43:17 -0000
@@ -29,10 +29,10 @@
  *   in theme settings.
  * - $site_slogan: The slogan of the site, empty when display has been disabled
  *   in theme settings.
- * - $hide_site_name: TRUE if the site name has been toggled off on the theme
+ * - !$show_site_name: TRUE if the site name has been toggled off on the theme
  *   settings page. If hidden, the "element-invisible" class is added to make
  *   the site name visually hidden, but still accessible.
- * - $hide_site_slogan: TRUE if the site slogan has been toggled off on the
+ * - !$show_site_slogan: TRUE if the site slogan has been toggled off on the
  *   theme settings page. If hidden, the "element-invisible" class is added to
  *   make the site slogan visually hidden, but still accessible.
  *
@@ -96,24 +96,24 @@
     <?php endif; ?>
 
     <?php if ($site_name || $site_slogan): ?>
-      <div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+      <div id="name-and-slogan"<?php if (!$show_site_name && !$show_site_slogan) { print ' class="element-invisible"'; } ?>>
 
         <?php if ($site_name): ?>
           <?php if ($title): ?>
-            <div id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
+            <div id="site-name"<?php if (!$show_site_name) { print ' class="element-invisible"'; } ?>>
               <strong>
                 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
               </strong>
             </div>
           <?php else: /* Use h1 when the content title is empty */ ?>
-            <h1 id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
+            <h1 id="site-name"<?php if (!$show_site_name) { print ' class="element-invisible"'; } ?>>
               <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
             </h1>
           <?php endif; ?>
         <?php endif; ?>
 
         <?php if ($site_slogan): ?>
-          <div id="site-slogan"<?php if ($hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+          <div id="site-slogan"<?php if (!$show_site_slogan) { print ' class="element-invisible"'; } ?>>
             <?php print $site_slogan; ?>
           </div>
         <?php endif; ?>
