Index: database/database.mysql
===================================================================
RCS file: /cvs/drupal/drupal/database/database.mysql,v
retrieving revision 1.201
diff -u -r1.201 database.mysql
--- database/database.mysql	18 Oct 2005 14:41:26 -0000	1.201
+++ database/database.mysql	23 Oct 2005 01:55:21 -0000
@@ -860,3 +860,8 @@
 INSERT INTO url_alias (src, dst) VALUES ('node/feed', 'rss.xml');
 
 INSERT INTO variable (name, value) VALUES ('node_options_forum', 'a:1:{i:0;s:6:"status";}');
+
+INSERT INTO menu VALUES (2, 0, 'Primary links', '', 0, 115);
+INSERT INTO menu VALUES (3, 2, 'edit primary links', 'admin/menu', 0, 118);
+INSERT INTO variable VALUES ('menu_primary_menu', 'i:2');
+INSERT INTO variable VALUES ('menu_secondary_menu', 'i:2');
Index: database/database.pgsql
===================================================================
RCS file: /cvs/drupal/drupal/database/database.pgsql,v
retrieving revision 1.140
diff -u -r1.140 database.pgsql
--- database/database.pgsql	18 Oct 2005 14:41:26 -0000	1.140
+++ database/database.pgsql	23 Oct 2005 01:55:22 -0000
@@ -852,6 +852,11 @@
 
 INSERT INTO variable (name, value) VALUES ('node_options_forum', 'a:1:{i:0;s:6:"status";}');
 
+INSERT INTO menu VALUES (2, 0, 'Primary links', '', 0, 115);
+INSERT INTO menu VALUES (3, 2, 'edit primary links', 'admin/menu', 0, 118);
+INSERT INTO variable VALUES ('menu_primary_menu', 'i:2');
+INSERT INTO variable VALUES ('menu_secondary_menu', 'i:2');
+
 ---
 --- Alter some sequences
 ---
Index: database/updates.inc
===================================================================
RCS file: /cvs/drupal/drupal/database/updates.inc,v
retrieving revision 1.140
diff -u -r1.140 updates.inc
--- database/updates.inc	22 Oct 2005 15:14:46 -0000	1.140
+++ database/updates.inc	23 Oct 2005 01:55:22 -0000
@@ -67,7 +67,8 @@
   "2005-09-07" => "update_147",
   "2005-09-18" => "update_148",
   "2005-09-27" => "update_149",
-  "2005-10-15" => "update_150"
+  "2005-10-15" => "update_150",
+  "2005-10-23" => "update_151",
 );
 
 function update_110() {
@@ -919,6 +920,68 @@
   return $ret;
 }
 
+function update_151() {
+  $ret = array();
+
+  $ts = variable_get('theme_settings', '');
+
+  // set up data array so we can loop over both sets of links
+  $menus = array(0 => array('links_var' => 'primary_links',
+                            'toggle_var' => 'toggle_primary_links',
+                            'more_var' => 'primary_links_more',
+                            'menu_name' => t('Primary links'),
+                            'hint_text' => t('edit primary links'),
+                            'menu_var' => 'menu_primary_menu',
+                            'pid' => 0),
+                 1 => array('links_var' => 'secondary_links',
+                            'toggle_var' => 'toggle_secondary_links',
+                            'more_var' => 'secondary_links_more',
+                            'menu_name' => t('Secondary links'),
+                            'hint_text' => t('edit secondary links'),
+                            'menu_var' => 'menu_secondary_menu',
+                            'pid' => 0));
+
+  for ($loop = 0; $loop <= 1 ; $loop ++) {
+    // create new Primary and Secondary links menus
+    $menus[$loop]['pid'] = db_next_id('{menu}_mid');
+    $ret[] = update_sql("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) " .
+                         "VALUES ({$menus[$loop]['pid']}, 0, '', '{$menus[$loop]['menu_name']}', '', 0, 115)");
+  
+    // insert all entries from theme links into new menus
+    $num_inserted = 0;
+    if ($links = variable_get($menus[$loop]['links_var'], '')) {
+      for ($i = 0; $i < count($links['text']); $i++) {
+        if ($links['text'][$i] != "" && $links['link'][$i] != "") {
+          $num_inserted ++;
+          $mid = db_next_id('{menu}_mid');
+          $ret[] = update_sql("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) " .
+                               "VALUES ($mid, {$menus[$loop]['pid']}, '{$links['link'][$i]}', '{$links['text'][$i]}', '{$links['description'][$i]}', 0, 118)");
+        }
+      }
+    }
+  
+    // if no old entries then insert hint link
+    if ($num_inserted == 0) {
+      $mid = db_next_id('{menu}_mid');
+      $ret[] = update_sql("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) " .
+                          "VALUES ($mid, {$menus[$loop]['pid']}, 'admin/menu', '{$menus[$loop]['hint_text']}', '', 0, 118)");
+    }
+  
+    // set menu_primary_menu variable appropriately
+    if (!$ts[$menus[$loop]['toggle_var']] || $num_inserted == 0) {
+      variable_set($menus[$loop]['menu_var'], 0);
+    }
+    else {
+      variable_set($menus[$loop]['menu_var'], $menus[$loop]['pid']);
+    }
+    variable_del($menus[$loop]['toggle_var']);
+    variable_del($menus[$loop]['links_var']);
+    variable_del($menus[$loop]['more_var']);
+  }
+  
+  return $ret;
+}
+
 function update_sql($sql) {
   $edit = $_POST["edit"];
   $result = db_query($sql);
Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.87
diff -u -r1.87 menu.inc
--- includes/menu.inc	22 Oct 2005 15:14:46 -0000	1.87
+++ includes/menu.inc	23 Oct 2005 01:55:23 -0000
@@ -708,6 +708,190 @@
 }
 
 /**
+ * Returns the primary links menu.
+ *
+ * @param $list
+ *   If true, the menu will be rendered as an unordered list.
+ *   If false the menu will be rendered in "link | link" format.
+ */
+function menu_primary_links($list = FALSE) {
+  $mpm = variable_get('menu_primary_menu', 1);
+  if ($mpm == 0) {
+    return '';
+  }
+
+  if ($list) {
+    return theme('menu_links_list', $mpm, 1);
+  }
+  else {
+    return theme('menu_links_text', $mpm, 1);
+  }
+}
+
+/**
+ * Returns the secondary links menu.
+ *
+ * @param $list
+ *   If true, the menu will be rendered as an unordered list.
+ *   If false the menu will be rendered in "link | link" format.
+ */
+function menu_secondary_links($list = FALSE) {
+  $msm = variable_get('menu_secondary_menu', 1);
+  if ($msm == 0) {
+    return '';
+  }
+
+  if ($msm == variable_get('menu_primary_menu', 1)) {
+    $start_level = 2;
+  }
+  else {
+    $start_level = 1;
+  }
+  
+  if ($list) {
+    return theme('menu_links_list', $msm, $start_level);
+  }
+  else {
+    return theme('menu_links_text', $msm, $start_level);
+  }
+}
+
+/**
+ * Returns a rendered menu suitable for horizontal display. The menu is
+ * rendered in "link | link | link" format. This is used to display the
+ * primary and secondary links. 
+ *
+ * @param $pid
+ *   The menu ID to render. Children of this menu item will be rendered, 
+ *   but the item itself will be omitted.
+ *   Defaults to NULL, in which case it will use the menu_primary_menu setting.
+ * @param $start_level
+ *   The number of levels under the pid you want to render.
+ *   The default is 1 and will render children of $pid.
+ *   If you want to render the secondary items, set this to 2 and this 
+ *   will skip the first (primary) level and give you level 2.
+ *
+ * @ingroup themeable
+ */
+function theme_menu_links_text($pid = NULL, $start_level = 1) {
+  $output = '';
+
+  if ($links = menu_links(NULL, $pid,  $start_level, FALSE)) {
+    $output .= theme('links', $links);
+  }
+
+  return $output;
+}
+
+/**
+ * Returns a rendered menu suitable for horizontal display. The menu is
+ * rendered as an unordered list. This may be used to generate primary
+ * and secondary links. The CSS provided by default is the same as the 
+ * CSS used for local tasks. It is expected that the theme will provide 
+ * custom CSS if it wishes to make use of this feature.
+ *
+ * @param $pid
+ *   The menu ID to render. Children of this menu item will be rendered, 
+ *   but the item itself will be omitted.
+ *   Defaults to NULL, in which case it will use the menu_primary_menu setting.
+ * @param $start_level
+ *   The number of levels under the pid you want to render.
+ *   The default is 1 and will render children of $pid.
+ *   If you want to render the secondary items, set this to 2 and this 
+ *   will skip the first (primary) level and give you level 2.
+ *
+ * @ingroup themeable
+ */
+function theme_menu_links_list($pid = NULL, $start_level = 1) {
+  $output = '';
+
+  if ($links = menu_links(NULL, $pid,  $start_level, TRUE)) {
+    $output .= "<ul class=\"primary\">\n" . implode("\n", $links) . "</ul>\n";
+  }
+
+  return $output;
+}
+
+/**
+ * Returns an array containing the menu items in a specified single level
+ * of the menu tree.
+ *
+ * @param $menu
+ *   An array containing the menu items to process. Passing in this array 
+ *   allows this function to generically operate on local_tasks and visible.
+ *   Defaults to the entire visible menu tree.
+ * @param $pid
+ *   The parent menu ID from which to search for children.
+ * @param $start_level
+ *   Follow the active trail down this many levels before starting to render.
+ *   Used to generate a primary/secondary menu from different levels of a tree.
+ */
+function menu_links($menu = NULL, $pid = 1, $start_level = 1, $as_list = FALSE) {
+  $menu_items = array();
+
+  if (!$menu) {
+    $menu = menu_get_menu();
+    $menu = $menu['visible'];
+  }
+  if ($start_level < 1) {
+    $start_level = 1;
+  }
+
+  if (!$pid) {
+    $pid = variable_get('menu_primary_menu', 1);
+  }
+
+  $mid = menu_follow_active_trail($menu, $pid, $start_level - 1);
+
+  foreach ($menu[$mid]['children'] as $cid) {
+    if ($as_list) {
+      $menu_items[] = theme('menu_local_task', $cid, menu_in_active_trail($cid), TRUE);
+    }
+    else {
+      $menu_items[] = menu_item_link($cid);
+    }
+  }
+
+  return $menu_items;
+}
+
+/**
+ * Descend along the active trail through a menu tree for a number of levels.
+ * Returns the ID of the menu that deep.
+ *
+ * @param $menu
+ *   An array containing the menu items to process. Passing in this array 
+ *   allows this function to generically operate on local_tasks and visible.
+ *
+ * @param $pid
+ *   The parent menu ID from which to search.
+ *
+ * @param $levels
+ *   How many levels deep we should go.
+ */
+function menu_follow_active_trail($menu, $pid, $levels = 1) {
+
+  for ($this_level = 0; $this_level < $levels && $pid ; $this_level++) {
+    $found_active = 0;
+    foreach ($menu[$pid]['children'] as $mid) {
+      if (menu_in_active_trail($mid)) {
+        if (count($menu[$mid]['children'])) {
+          $pid = $mid;
+          $found_active = 1;
+        }
+      }
+    }
+    // Break if the active trail ends before we dig deep enough.
+    // This can happen if the tree is not deep enough or if the
+    // current node is not a child of the menu we're traversing.
+    if (!$found_active) {
+      $pid = NULL;
+    }
+  }
+
+  return $pid;
+}
+/**
  * @} End of "defgroup menu".
  */
 
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.263
diff -u -r1.263 theme.inc
--- includes/theme.inc	22 Oct 2005 15:14:46 -0000	1.263
+++ includes/theme.inc	23 Oct 2005 01:55:23 -0000
@@ -212,8 +212,6 @@
  */
 function theme_get_settings($key = NULL) {
   $defaults = array(
-    'primary_links'                 =>  array(),
-    'secondary_links'               =>  array(),
     'mission'                       =>  '',
     'default_logo'                  =>  1,
     'logo_path'                     =>  '',
@@ -225,8 +223,6 @@
     'toggle_search'                 =>  1,
     'toggle_slogan'                 =>  0,
     'toggle_mission'                =>  1,
-    'toggle_primary_links'          =>  1,
-    'toggle_secondary_links'        =>  1,
     'toggle_node_user_picture'      =>  0,
     'toggle_comment_user_picture'   =>  0,
   );
@@ -307,41 +303,6 @@
       }
     }
 
-    foreach (array('primary', 'secondary') as $type) {
-      // Get the data to populate the textfields, if the variable is not an array .. try to parse the old-style link format.
-      $value = $settings[$type . '_links'];
-
-      // Clear out existing (internal) values
-      $settings[$type .'_links'] = array();
-
-      // Get the amount of links to show, possibly expanding if there are more links defined than the count specifies.
-      $count = variable_get($type . '_link_count', 5);
-      if (isset($value['link']) && $count > sizeof($value['link'])) {
-        $count = sizeof($value['link']);
-      }
-
-      if ($settings['toggle_' . $type . '_links']) {
-        for ($i =0; $i < $count; $i++) {
-          unset($attributes);
-          if (!empty($value['text'][$i])) {
-            if (!empty($value['description'][$i])) {
-              $attributes['title'] = $value['description'][$i];
-            }
-            $text = $value['text'][$i];
-            $link = $value['link'][$i];
-            if (substr($link, 0, 7) == 'http://') {
-              $settings[$type .'_links'][] = '<a href="'. check_url($link) .'"'. drupal_attributes($attributes) .'>'. check_plain($text) .'</a>';
-            }
-            else {
-              $settings[$type .'_links'][] = l($text, $link, $attributes);
-            }
-          }
-        }
-        if ($settings[$type .'_links'] == array()) {
-          $settings[$type .'_links'] = array(l(t('edit %type links', array('%type' => $type)),'admin/themes/settings'));
-        }
-      }
-    }
   }
 
   return isset($settings[$setting_name]) ? $settings[$setting_name] : NULL;
Index: modules/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu.module,v
retrieving revision 1.40
diff -u -r1.40 menu.module
--- modules/menu.module	22 Oct 2005 15:14:46 -0000	1.40
+++ modules/menu.module	23 Oct 2005 01:55:23 -0000
@@ -47,6 +47,11 @@
       'callback' => 'menu_reset',
       'access' => user_access('administer menu'),
       'type' => MENU_LOCAL_TASK);
+
+    $items[] = array('path' => 'admin/settings/menu',
+      'title' => t('menus'),
+      'callback' => 'menu_configure',
+      'access' => user_access('administer menu'));
   }
 
   return $items;
@@ -65,9 +70,48 @@
       return t('<p>Enter the name for your new menu. Remember to enable the newly created block in the %blocks administration page.</p>', array('%blocks' => l(t('blocks'), 'admin/block')));
     case 'admin/menu/item/add':
       return t('<p>Enter the title, path, position and the weight for your new menu item.</p>');
+    case 'admin/settings/menu':
+      return t('<p>Customize the menu settings.</p>');
   }
 }
 
+
+/**
+ * Menu callback; presents menu configuration options.
+ */
+function menu_configure() {
+  $menu = menu_get_menu();
+  
+  $primary_options[0] = t('No primary links');
+  foreach ($menu['items'][0]['children'] as $mid) {
+    $primary_options[$mid] = $menu['items'][$mid]['title'];
+  }
+
+  $form['settings_links'] = array('#type' => 'fieldset', '#title' => t('Primary links settings'));
+  $form['settings_links']['menu_primary_menu'] = array(
+    '#type' => 'select',
+    '#title' => t('primary links menu'),
+    '#default_value' => variable_get('menu_primary_menu', 0),
+    '#options' => $primary_options,
+    '#description' => t('Primary links are a navigation system which typically (depending on your theme) appears at the top-right of the window. You may control which links appear in this area by choosing a menu from which the primary links will be generated and then placing your preferred links into the menu using the <a href="%menu">menu administration</a>.', array('%menu' => url('admin/menu')))
+  );
+
+  $secondary_options[0] = t('No secondary links');
+  foreach ($menu['items'][0]['children'] as $mid) {
+    $secondary_options[$mid] = $menu['items'][$mid]['title'];
+  }
+
+  $form['settings_links']['menu_secondary_menu'] = array(
+    '#type' => 'select',
+    '#title' => t('secondary links menu'),
+    '#default_value' => variable_get('menu_secondary_menu', 0),
+    '#options' => $secondary_options,
+    '#description' => t('Secondary links typically appear alongside primary links. You can choose to disable secondary links, or use a specific menu as secondary links. If you select the same menu as primary links then secondary links will automatically show the appropriate second level of your navigation hierarchy. This is the default.')
+  );
+
+  return system_settings_form('menu_configure', $form);
+}
+
 /**
  * Implementation of hook_block().
  */
Index: modules/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system.module,v
retrieving revision 1.245
diff -u -r1.245 system.module
--- modules/system.module	22 Oct 2005 15:14:46 -0000	1.245
+++ modules/system.module	23 Oct 2005 01:55:24 -0000
@@ -1020,11 +1020,6 @@
 
   // System wide only settings.
   if (!$key) {
-    // Menu settings
-
-    $form['primary_links'] = system_navigation_links_form('primary', 'Primary');
-    $form['secondary_links'] = system_navigation_links_form('secondary', 'Secondary');
-
     // Toggle node display.
     $node_types = module_invoke('node', 'get_types');
     if ($node_types) {
@@ -1043,8 +1038,6 @@
     'toggle_name'                 => t('Site name'),
     'toggle_slogan'               => t('Site slogan'),
     'toggle_mission'              => t('Mission statement'),
-    'toggle_primary_links'        => t('Primary links'),
-    'toggle_secondary_links'      => t('Secondary links'),
     'toggle_node_user_picture'    => t('User pictures in posts'),
     'toggle_comment_user_picture' => t('User pictures in comments'),
     'toggle_search'               => t('Search box'),
@@ -1094,62 +1087,6 @@
 
 }
 
-function system_navigation_links_form($type, $utype) {
-  $settings = theme_get_settings('');
-  $value = $settings[$type . '_links'];
-
-  if (!is_array($value)) {
-    $value = array();
-  }
-  // Increment the link count, if the user has requested more links.
-  if (variable_get($type . '_links_more', false)) {
-    variable_del($type . '_links_more');
-    variable_set($type . '_link_count', variable_get($type . '_link_count', 5) + 5);
-  }
-
-  // Get the amount of links to show, possibly expanding if there are more links defined than the count specifies.
-  $count = variable_get($type . '_link_count', 5);
-  $count = ($count > sizeof($value['link'])) ? $count : sizeof($value['link']);
-
-  if (variable_get($type . '_link_count', 5) != $count) {
-    variable_set($type . '_link_count', $count);
-  }
-  $form = array(
-    '#type' => 'item', '#title' => t('_TYPE_ link settings', array('_TYPE_' => $utype)), '#theme' => 'system_navigation_links_form',
-    '#description' => t('You can specify your _TYPE_ links here, one link per line.<br /> The link text field is the text you want to link.<br /> The url field is the location the link points to.<br /> The description field is an optional description of where the link points.', array('_TYPE_' => $type))
-  );
-
-  $form['#tree'] = TRUE;
-
-  for ($i = 0; $i < $count; $i++) {
-    foreach (array('text', 'link', 'description') as $field) {
-      $form[$field][$i] = array('#type' => 'textfield', '#default_value' => $value[$field][$i], '#size' => 15, '#maxlength' => 90);
-    }
-  }
-
-  $form[$type . '_links_more'] = array(
-    '#type' => 'checkbox', '#title' => t('I need more _TYPE_ links.', array('_TYPE_' => $type)), '#default_value' => FALSE,
-    '#description' => t('Checking this box will give you 5 additional _TYPE_ links.', array('_TYPE_' => $type))
-  );
-  return $form;
-}
-
-function theme_system_navigation_links_form(&$form) {
-  $header = array(t('link text'), t('url'), t('description'));
-  foreach (element_children($form['text']) as $key) {
-    $row = array();
-    $row[] = form_render($form['text'][$key]);
-    $row[] = form_render($form['link'][$key]);
-    $row[] = form_render($form['description'][$key]);
-    $rows[] = $row;
-
-  }
-  $output = theme('table', $header, $rows);
-  $output .= form_render($form);
-  return $output;
-}
-
-
 function search_box() {
   $form['#action'] = url('search');
   $form['keys'] = array('#type' => 'textfield', '#size'=> 15, '#value' => '', '#attributes' => array('alt' => t('Enter the terms you wish to search for.'), 'class' => 'form-text'));
Index: themes/bluemarine/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/bluemarine/page.tpl.php,v
retrieving revision 1.11
diff -u -r1.11 page.tpl.php
--- themes/bluemarine/page.tpl.php	7 Oct 2005 06:51:43 -0000	1.11
+++ themes/bluemarine/page.tpl.php	23 Oct 2005 01:55:24 -0000
@@ -18,8 +18,8 @@
       <?php if ($site_slogan) { ?><div class='site-slogan'><?php print $site_slogan ?></div><?php } ?>
     </td>
     <td id="menu">
-      <?php if ($secondary_links) { ?><div id="secondary"><?php print theme('links', $secondary_links) ?></div><?php } ?>
-      <?php if ($primary_links) { ?><div id="primary"><?php print theme('links', $primary_links) ?></div><?php } ?>
+      <?php if ($secondary_links) { ?><div id="secondary"><?php print $secondary_links ?></div><?php } ?>
+      <?php if ($primary_links) { ?><div id="primary"><?php print $primary_links ?></div><?php } ?>
       <?php print $search_box ?>
     </td>
   </tr>
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.33
diff -u -r1.33 chameleon.theme
--- themes/chameleon/chameleon.theme	16 Aug 2005 18:06:18 -0000	1.33
+++ themes/chameleon/chameleon.theme	23 Oct 2005 01:55:24 -0000
@@ -11,9 +11,7 @@
        'logo',
        'toggle_favicon',
        'toggle_name',
-       'toggle_slogan',
-       'toggle_primary_links',
-       'toggle_secondary_links');
+       'toggle_slogan');
 }
 
 function chameleon_regions() {
@@ -55,8 +53,6 @@
 
   $output .= "</div>\n";
 
-  $primary_links = theme('links', theme_get_setting('primary_links'));
-  $secondary_links = theme('links', theme_get_setting('secondary_links'));
   if ($primary_links || $secondary_links) {
     $output .= ' <div class="navlinks">';
     if ($primary_links) {
Index: themes/engines/phptemplate/phptemplate.engine
===================================================================
RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v
retrieving revision 1.20
diff -u -r1.20 phptemplate.engine
--- themes/engines/phptemplate/phptemplate.engine	22 Oct 2005 15:14:46 -0000	1.20
+++ themes/engines/phptemplate/phptemplate.engine	23 Oct 2005 01:55:24 -0000
@@ -130,9 +130,7 @@
     'toggle_mission',
     'toggle_name',
     'toggle_node_user_picture',
-    'toggle_primary_links',
     'toggle_search',
-    'toggle_secondary_links',
     'toggle_slogan'
   );
 }
@@ -200,11 +198,11 @@
     'messages'            => theme('status_messages'),
     'mission'             => isset($mission) ? $mission : '',
     'onload_attributes'   => theme('onload_attribute'),
-    'primary_links'       => theme_get_setting('primary_links'),
+    'primary_links'       => menu_primary_links(),
+    'secondary_links'     => menu_secondary_links(),
     'site_name'           => (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : ''),
     'site_slogan'         => (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : ''),
     'search_box'          => (theme_get_setting('toggle_search') ? search_box() : ''),
-    'secondary_links'     => theme_get_setting('secondary_links'),
     'sidebar_left'        => $sidebar_left,
     'sidebar_right'       => $sidebar_right,
     'styles'              => theme_get_styles(),
Index: themes/pushbutton/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/pushbutton/page.tpl.php,v
retrieving revision 1.6
diff -u -r1.6 page.tpl.php
--- themes/pushbutton/page.tpl.php	7 Oct 2005 06:11:12 -0000	1.6
+++ themes/pushbutton/page.tpl.php	23 Oct 2005 01:55:24 -0000
@@ -34,7 +34,7 @@
     </td>
 
     <td class="primary-links" width="70%" align="center" valign="middle">
-      <?php print theme('links', $primary_links) ?>
+      <?php print $primary_links ?>
     </td>
   </tr>
 </table>
@@ -42,7 +42,7 @@
 <table id="secondary-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%">
   <tr>
     <td class="secondary-links" width="75%"  align="center" valign="middle">
-      <?php print theme('links', $secondary_links) ?>
+      <?php print $secondary_links ?>
     </td>
     <td  width="25%"  align="center" valign="middle">
       <?php print $search_box ?>
@@ -102,18 +102,14 @@
 <table id="footer-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%">
   <tr>
     <td align="center" valign="middle">
-    <?php if (is_array($primary_links)) : ?>
+    <?php if ($primary_links != "") : ?>
       <div class="primary-links">
-        <?php foreach ($primary_links as $link): ?>
-          <?php print $link?> |
-        <?php endforeach; ?>
+        <?php print $primary_links ?>
       </div>
     <?php endif; ?>
-    <?php if (is_array($secondary_links)) : ?>
+    <?php if ($secondary_links != "") : ?>
       <div class="secondary-links">
-        <?php foreach ($secondary_links as $link): ?>
-          <?php print $link?> |
-        <?php endforeach; ?>
+        <?php print $secondary_links ?>
       </div>
     <?php endif; ?>
     </td>
