### Eclipse Workspace Patch 1.0
#P drupal-contrib-cvs
Index: modules/site_map/site_map.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/site_map/site_map.module,v
retrieving revision 1.36
diff -u -r1.36 site_map.module
--- modules/site_map/site_map.module	26 Sep 2007 14:13:37 -0000	1.36
+++ modules/site_map/site_map.module	3 Jan 2008 22:55:03 -0000
@@ -40,134 +40,6 @@
 }
 
 /**
- * Menu callback; presents the sitemap settings page.
- */
-function site_map_admin_settings() {
-
-  $form['site_map_message'] = array(
-    '#type' => 'textarea',
-    '#title' => t('Site map message'),
-    '#default_value' => variable_get('site_map_message', ''),
-    '#cols' => 60,
-    '#rows' => 5,
-    '#description' => t('Define a message to be displayed above the site map.'),
-  );
-
-  $form['site_map_content'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Site map content'),
-  );
-  $form['site_map_content']['site_map_show_front'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Show front page'),
-    '#return_value' => 1,
-    '#default_value' => variable_get('site_map_show_front', 1),
-    '#description' => t('When enabled, this option will include the front page in the site map.'),
-  );
-  $form['site_map_content']['site_map_show_blogs'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Show recent blog authors'),
-    '#return_value' => 1,
-    '#default_value' => variable_get('site_map_show_blogs', 1),
-    '#description' => t('When enabled, this option will show the recent blog authors.'),
-  );
-  $book_options = array();
-  if (module_exists('book')) {
-    foreach (book_get_books() as $book) {
-      $book_options[$book['nid']] = $book['title'];
-    }
-  }
-  $form['site_map_content']['site_map_show_books'] = array(
-    '#type' => 'select',
-    '#title' => t('Books to include in the site map'),
-    '#default_value' => variable_get('site_map_show_books', array()),
-    '#options' => $book_options,
-    '#multiple' => TRUE,
-    '#description' => t('Ctrl-click (Windows) or Command-click (Mac) to select more than one value.'),
-  );
-  $menu_options = array();
-  $menu_options = menu_get_menus();
-  $form['site_map_content']['site_map_show_menus'] = array(
-    '#type' => 'select',
-    '#title' => t('Menus to include in the site map'),
-    '#default_value' => variable_get('site_map_show_menus', array()),
-    '#options' => $menu_options,
-    '#multiple' => TRUE,
-    '#description' => t('Ctrl-click (Windows) or Command-click (Mac) to select more than one value.'),
-  );
-  $form['site_map_content']['site_map_show_faq'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Show FAQ content'),
-    '#return_value' => 1,
-    '#default_value' => variable_get('site_map_show_faq', 1),
-    '#description' => t('When enabled, this option will include the content from the FAQ module in the site map.'),
-  );
-  $vocab_options = array();
-  if (module_exists('taxonomy')) {
-    foreach (taxonomy_get_vocabularies() as $vocabulary) {
-      $vocab_options[$vocabulary->vid] = $vocabulary->name;
-    }
-  }
-  $form['site_map_content']['site_map_show_vocabularies'] = array(
-    '#type' => 'select',
-    '#title' => t('Categories to include in the site map'),
-    '#default_value' => variable_get('site_map_show_vocabularies', array()),
-    '#options' => $vocab_options,
-    '#multiple' => TRUE,
-    '#description' => t('Ctrl-click (Windows) or Command-click (Mac) to select more than one value.'),
-  );
-
-  $form['site_map_content_options'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Categories settings'),
-  );
-  $form['site_map_content_options']['site_map_books_expanded'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Show books expanded'),
-    '#return_value' => 1,
-    '#default_value' => variable_get('site_map_books_expanded', 1),
-    '#description' => t('When enabled, this option will show all children pages for each book.'),
-  );
-  $form['site_map_content_options']['site_map_show_count'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Show node counts by categories'),
-    '#return_value' => 1,
-    '#default_value' => variable_get('site_map_show_count', 1),
-    '#description' => t('When enabled, this option will show the number of nodes in each taxonomy term.'),
-  );
-  $form['site_map_content_options']['site_map_categories_depth'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Categories depth'),
-    '#default_value' => variable_get('site_map_categories_depth', 'all'),
-    '#size' => 3,
-    '#maxlength' => 10,
-    '#description' => t('Specify how many subcategories should be included on the categorie page. Enter "all" to include all subcategories,"0" to include no subcategories, or "-1" not to append the depth at all.'),
-  );
-
-  $form['site_map_rss_options'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('RSS settings'),
-  );
-  $form['site_map_rss_options']['site_map_show_rss_links'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Include RSS links'),
-    '#return_value' => 1,
-    '#default_value' => variable_get('site_map_show_rss_links', 1),
-    '#description' => t('When enabled, this option will show links to the RSS feeds for each category and blog.'),
-  );
-  $form['site_map_rss_options']['site_map_rss_depth'] = array(
-    '#type' => 'textfield',
-    '#title' => t('RSS feed depth'),
-    '#default_value' => variable_get('site_map_rss_depth', 'all'),
-    '#size' => 3,
-    '#maxlength' => 10,
-    '#description' => t('Specify how many subcategories should be included in the RSS feed. Enter "all" to include all subcategories or "0" to include no subcategories.'),
-  );
-
-  return system_settings_form($form);
-}
-
-/**
  * Implementation of hook_menu().
  */
 function site_map_menu() {
@@ -176,15 +48,14 @@
     'description' => 'Control what should be displayed on the site map.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('site_map_admin_settings'),
-    'access callback' => 'user_access',
     'access arguments' => array('administer site configuration'),
+    'file' => 'site_map.admin.inc',  
     'type' => MENU_NORMAL_ITEM,
   );
   $items['sitemap'] = array(
     'title' => 'Site map',
     'description' => 'Display a site map with RSS feeds.',
     'page callback' => 'site_map_page',
-    'access callback' => 'user_access',
     'access arguments' => array('access site map'),
     'type' => MENU_SUGGESTED_ITEM,
   );
Index: modules/site_map/site_map.admin.inc
===================================================================
RCS file: modules/site_map/site_map.admin.inc
diff -N modules/site_map/site_map.admin.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/site_map/site_map.admin.inc	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,136 @@
+<?php
+// $Id: site_map.module,v 1.36 2007/09/26 14:13:37 frjo Exp $
+
+/**
+ * @file
+ * Original author: Nic Ivy
+ * Now maintained by by Fredrik Jonsson fredrik at combonet dot se
+ */
+
+/**
+ * Menu callback; presents the sitemap settings page.
+ */
+function site_map_admin_settings() {
+
+  $form['site_map_message'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Site map message'),
+    '#default_value' => variable_get('site_map_message', ''),
+    '#cols' => 60,
+    '#rows' => 5,
+    '#description' => t('Define a message to be displayed above the site map.'),
+  );
+
+  $form['site_map_content'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Site map content'),
+  );
+  $form['site_map_content']['site_map_show_front'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show front page'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('site_map_show_front', 1),
+    '#description' => t('When enabled, this option will include the front page in the site map.'),
+  );
+  $form['site_map_content']['site_map_show_blogs'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show recent blog authors'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('site_map_show_blogs', 1),
+    '#description' => t('When enabled, this option will show the recent blog authors.'),
+  );
+  $book_options = array();
+  if (module_exists('book')) {
+    foreach (book_get_books() as $book) {
+      $book_options[$book['nid']] = $book['title'];
+    }
+  }
+  $form['site_map_content']['site_map_show_books'] = array(
+    '#type' => 'select',
+    '#title' => t('Books to include in the site map'),
+    '#default_value' => variable_get('site_map_show_books', array()),
+    '#options' => $book_options,
+    '#multiple' => TRUE,
+    '#description' => t('Ctrl-click (Windows) or Command-click (Mac) to select more than one value.'),
+  );
+  $menu_options = array();
+  $menu_options = menu_get_menus();
+  $form['site_map_content']['site_map_show_menus'] = array(
+    '#type' => 'select',
+    '#title' => t('Menus to include in the site map'),
+    '#default_value' => variable_get('site_map_show_menus', array()),
+    '#options' => $menu_options,
+    '#multiple' => TRUE,
+    '#description' => t('Ctrl-click (Windows) or Command-click (Mac) to select more than one value.'),
+  );
+  $form['site_map_content']['site_map_show_faq'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show FAQ content'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('site_map_show_faq', 1),
+    '#description' => t('When enabled, this option will include the content from the FAQ module in the site map.'),
+  );
+  $vocab_options = array();
+  if (module_exists('taxonomy')) {
+    foreach (taxonomy_get_vocabularies() as $vocabulary) {
+      $vocab_options[$vocabulary->vid] = $vocabulary->name;
+    }
+  }
+  $form['site_map_content']['site_map_show_vocabularies'] = array(
+    '#type' => 'select',
+    '#title' => t('Categories to include in the site map'),
+    '#default_value' => variable_get('site_map_show_vocabularies', array()),
+    '#options' => $vocab_options,
+    '#multiple' => TRUE,
+    '#description' => t('Ctrl-click (Windows) or Command-click (Mac) to select more than one value.'),
+  );
+
+  $form['site_map_content_options'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Categories settings'),
+  );
+  $form['site_map_content_options']['site_map_books_expanded'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show books expanded'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('site_map_books_expanded', 1),
+    '#description' => t('When enabled, this option will show all children pages for each book.'),
+  );
+  $form['site_map_content_options']['site_map_show_count'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show node counts by categories'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('site_map_show_count', 1),
+    '#description' => t('When enabled, this option will show the number of nodes in each taxonomy term.'),
+  );
+  $form['site_map_content_options']['site_map_categories_depth'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Categories depth'),
+    '#default_value' => variable_get('site_map_categories_depth', 'all'),
+    '#size' => 3,
+    '#maxlength' => 10,
+    '#description' => t('Specify how many subcategories should be included on the categorie page. Enter "all" to include all subcategories,"0" to include no subcategories, or "-1" not to append the depth at all.'),
+  );
+
+  $form['site_map_rss_options'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('RSS settings'),
+  );
+  $form['site_map_rss_options']['site_map_show_rss_links'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Include RSS links'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('site_map_show_rss_links', 1),
+    '#description' => t('When enabled, this option will show links to the RSS feeds for each category and blog.'),
+  );
+  $form['site_map_rss_options']['site_map_rss_depth'] = array(
+    '#type' => 'textfield',
+    '#title' => t('RSS feed depth'),
+    '#default_value' => variable_get('site_map_rss_depth', 'all'),
+    '#size' => 3,
+    '#maxlength' => 10,
+    '#description' => t('Specify how many subcategories should be included in the RSS feed. Enter "all" to include all subcategories or "0" to include no subcategories.'),
+  );
+
+  return system_settings_form($form);
+}
