? code_style_notices.patch
Index: page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/rootcandy/page.tpl.php,v
retrieving revision 1.6
diff -u -p -r1.6 page.tpl.php
--- page.tpl.php	26 Feb 2008 09:18:40 -0000	1.6
+++ page.tpl.php	27 Feb 2008 20:39:25 -0000
@@ -41,16 +41,16 @@
     <?php if (arg(0) == 'admin' AND (arg(2))) { ?>
     <div id ="sidebar-right">
       <?php
-      $menu = menu_navigation_links('navigation',2);
-      print theme('links',$menu,array('id' => 'rootcandy-menu'));
+      $menu = menu_navigation_links('navigation', 2);
+      print theme('links', $menu, array('id' => 'rootcandy-menu'));
       $extclass = ' extended';
       ?>
     </div>
     <?php } ?>
 
  <div class="t<?php print $extclass ?>"><div class="b"><div class="l"><div class="r"><div class="bl"><div class="br"><div class="tl"><div class="tr"><div class="content-in">
-          <?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul>'; endif; ?>
-          <?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
+    <?php if (isset($$tabs) && $tabs): print '<ul class="tabs primary">'. $tabs .'</ul>'; endif; ?>
+          <?php if (isset($tabs2) && $tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
           <?php print $help ?>
           <?php print $messages ?>
         <?php print $content ?>
Index: template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/rootcandy/template.php,v
retrieving revision 1.7
diff -u -p -r1.7 template.php
--- template.php	26 Feb 2008 09:18:40 -0000	1.7
+++ template.php	27 Feb 2008 20:39:25 -0000
@@ -1,32 +1,35 @@
 <?php
 // $Id: template.php,v 1.7 2008/02/26 09:18:40 sign Exp $
 drupal_rebuild_theme_registry();
-function _rootcandy_admin_links(){
+function _rootcandy_admin_links() {
   global $user;
-  $links[] = '<a href="'.url('user').'" class="user-name">'.$user->name.'</a>';
-  $links[] = '<a href="'.url('user/logout').'" class="user-logout"><span>Logout</span></a>';
+  $links[] = '<a href="'. url('user') .'" class="user-name">'. $user->name .'</a>';
+  $links[] = '<a href="'. url('user/logout') .'" class="user-logout"><span>Logout</span></a>';
 
   $links = implode(' ', $links);
 
   return $links;
 }
 
-function _rootcandy_admin_navigation(){
+function _rootcandy_admin_navigation() {
+  $path = base_path() . path_to_theme();
   $menu_tree = array(
-    array('url' => 'admin', 'title' => 'Dashboard', 'icon' => base_path().path_to_theme().'/images/oxygen/navigation/all.png'),
-    array('url' => 'admin/content', 'title' => 'Content', 'icon' => base_path().path_to_theme().'/images/oxygen/navigation/content.png'),
-    array('url' => 'admin/build', 'title' => 'Building', 'icon' => base_path().path_to_theme().'/images/oxygen/navigation/build.png'),
-    array('url' => 'admin/settings', 'title' => 'Configuration', 'icon' => base_path().path_to_theme().'/images/oxygen/navigation/config.png'),
-    array('url' => 'admin/user', 'title' => 'Users', 'icon' => base_path().path_to_theme().'/images/oxygen/navigation/users.png'),
-    array('url' => 'admin/reports', 'title' => 'Reports', 'icon' => base_path().path_to_theme().'/images/oxygen/navigation/reports.png'),
+    array('url' => 'admin', 'title' => 'Dashboard', 'icon' => $path .'/images/oxygen/navigation/all.png'),
+    array('url' => 'admin/content', 'title' => 'Content', 'icon' => $path .'/images/oxygen/navigation/content.png'),
+    array('url' => 'admin/build', 'title' => 'Building', 'icon' => $path .'/images/oxygen/navigation/build.png'),
+    array('url' => 'admin/settings', 'title' => 'Configuration', 'icon' => $path .'/images/oxygen/navigation/config.png'),
+    array('url' => 'admin/user', 'title' => 'Users', 'icon' => $path .'/images/oxygen/navigation/users.png'),
+    array('url' => 'admin/reports', 'title' => 'Reports', 'icon' => $path .'/images/oxygen/navigation/reports.png'),
   );
 
   $output = '<ul>';
-  foreach ($menu_tree as $item){
+  foreach ($menu_tree as $item) {
     $class='class="rootcandy"';
-    $arg = explode('/',$item['url']);
-    if (arg(0) == $arg[0] AND arg(1) == $arg[1]) $class=' class="rootcandy active"';
-    $output .= '<li><a href="'.url($item['url']).'"'.$class.'><span><img src="'.$item['icon'].'" alt="'.$item['title'].'" /><br /><div class="rootcandyspan">'.$item['title'].'</div></span></a></li>';
+    $arg = explode('/', $item['url']);
+    if (arg(0) == $arg[0] AND isset($arg[1]) && arg(1) == $arg[1]) { 
+      $class=' class="rootcandy active"'; 
+    }
+    $output .= '<li><a href="'. url($item['url']) .'"'. $class .'><span><img src="'. $item['icon'] .'" alt="'. $item['title'] .'" /><br /><div class="rootcandyspan">'. $item['title'] .'</div></span></a></li>';
   }
   $output .= '</ul>';
 
@@ -37,13 +40,13 @@ function rootcandy_button($element) {
   // its not working... :/
   // Make sure not to overwrite classes.
   if (isset($element['#attributes']['class'])) {
-    $element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '. $element['#attributes']['class'] . ' submitBtn';
+    $element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '. $element['#attributes']['class'] .' submitBtn';
   }
   else {
-    $element['#attributes']['class'] = 'form-'. $element['#button_type'] . ' submitBtn';
+    $element['#attributes']['class'] = 'form-'. $element['#button_type'] .' submitBtn';
   }
 
-  return '<button value="'. check_plain($element['#value']) .'" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'id="'. $element['#id'] .'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ."<span>".$element['#value']."</span></button>\n";
+  return '<button value="'. check_plain($element['#value']) .'" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'id="'. $element['#id'] .'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ."<span>". $element['#value'] ."</span></button>\n";
 }
 
 /**
