Index: xmlsitemap.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap.info,v
retrieving revision 1.1
diff -u -p -r1.1 xmlsitemap.info
--- xmlsitemap.info	9 Nov 2007 17:56:04 -0000	1.1
+++ xmlsitemap.info	1 Apr 2008 04:02:00 -0000
@@ -2,4 +2,5 @@
 name = XML Sitemap
 description = Creates an XML site map in accordance with the sitemaps.org specification.
 package = XML Sitemap
-
+core = 6.x
+version = 6.x-1.x-dev
Index: xmlsitemap.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap.install,v
retrieving revision 1.4
diff -u -p -r1.4 xmlsitemap.install
--- xmlsitemap.install	11 Dec 2007 22:57:45 -0000	1.4
+++ xmlsitemap.install	1 Apr 2008 04:02:01 -0000
@@ -2,33 +2,61 @@
 // $Id: xmlsitemap.install,v 1.4 2007/12/11 22:57:45 darrenoh Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function xmlsitemap_schema() {
+  $schema['xmlsitemap_additional'] = array(
+    'description' => t('The base table for xmlsitemap.'),
+    'fields' => array(
+      'path' => array(
+        'description' => t('The path of this node.'),
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'pid' => array(
+        'description' => t('The id of the path.'),
+        'type' => 'int',
+      ),
+      'last_changed' => array(
+        'description' => t('Keeps track of new changes.'),
+        'type' => 'int',
+      ),
+      'previously_changed' => array(
+        'description' => t('Keeps track of old changes.'),
+        'type' => 'int',
+      ),
+      'priority' => array(
+        'description' => t('Stores the index value.'),
+        'type' => 'float',
+      ),
+    ),
+    'primary key' => array('path'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function xmlsitemap_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query("CREATE TABLE {xmlsitemap_additional} (
-        path varchar(128) NOT NULL default '',
-        pid int,
-        last_changed int(11),
-        previously_changed int(11),
-        priority float,
-        PRIMARY KEY (path)
-      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      break;
-    case 'pgsql':
-      db_query("CREATE TABLE {xmlsitemap_additional} (
-        path varchar(128) NOT NULL default '',
-        pid integer,
-        last_changed integer,
-        previously_changed integer,
-        priority real,
-        PRIMARY KEY (path)
-      );");
-      break;
-  }
+  // Create my tables.
   db_query("DELETE FROM {url_alias} WHERE dst LIKE 'sitemap%.xml'");
+  drupal_install_schema('xmlsitemap');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function xmlsitemap_uninstall() {
+  // Drop my tables.
+  $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'xmlsitemap\_%'");
+  while ($variable = db_fetch_object($settings)) {
+    variable_del($variable->name);
+  }
+  drupal_uninstall_schema('xmlsitemap');
 }
 
 /**
@@ -66,15 +94,3 @@ function xmlsitemap_disable() {
     rmdir($path);
   }
 }
-
-/**
- * Implementation of hook_uninstall().
- */
-function xmlsitemap_uninstall() {
-  db_query("DROP TABLE {xmlsitemap_additional}");
-  $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'xmlsitemap\_%'");
-  while ($variable = db_fetch_object($settings)) {
-    variable_del($variable->name);
-  }
-}
-
Index: xmlsitemap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap.module,v
retrieving revision 1.16
diff -u -p -r1.16 xmlsitemap.module
--- xmlsitemap.module	18 Dec 2007 22:54:51 -0000	1.16
+++ xmlsitemap.module	1 Apr 2008 04:02:01 -0000
@@ -8,8 +8,8 @@
 /**
  * Implementation of hook_help().
  */
-function xmlsitemap_help($section) {
-  switch ($section) {
+function xmlsitemap_help($path, $arg) {
+  switch ($path) {
     case 'admin/settings/xmlsitemap':
     case 'admin/settings/xmlsitemap/settings':
       return t('Configure the site map. Your site map is at !url.', array('!url' => '<a href="'. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE) .'">'. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE) .'</a>'));
@@ -23,64 +23,55 @@ function xmlsitemap_help($section) {
 /**
  * Implementation of hook_menu().
  */
-function xmlsitemap_menu($may_cache) {
+function xmlsitemap_menu() {
   $items = array();
-  $access_config = user_access('administer site configuration');
-  $access_content = user_access('access content');
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'admin/settings/xmlsitemap',
-      'title' => t('XML Sitemap'),
-      'description' => t('Configure site map.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('xmlsitemap_settings_sitemap'),
-      'access' => $access_config,
-    );
-    $items[] = array(
-      'path' => 'admin/settings/xmlsitemap/settings',
-      'title' => t('Site map'),
-      'description' => t('Configure site map.'),
-      'type' => MENU_DEFAULT_LOCAL_TASK,
-      'weight' => -1,
-    );
-    $items[] = array(
-      'path' => 'admin/settings/xmlsitemap/engines',
-      'title' => t('Search engines'),
-      'description' => t('Configure search engines.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('xmlsitemap_settings_engines'),
-      'type' => MENU_LOCAL_TASK,
-    );
-    $items[] = array(
-      'path' => 'admin/settings/xmlsitemap/additional',
-      'title' => t('Additional'),
-      'description' => t('Configure additional links.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('xmlsitemap_settings_additional'),
-      'type' => MENU_LOCAL_TASK,
-      'weight' => 1,
-    );
-    $items[] = array(
-      'path' => 'sitemap.xml',
-      'title' => t('Site map index'),
-      'callback' => '_xmlsitemap_output',
+  $access_config = array('administer site configuration');
+  $access_content = array('access content');
+  $items['admin/settings/xmlsitemap'] = array(
+    'title' => 'XML Sitemap',
+    'description' => 'Configure site map.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('xmlsitemap_settings_sitemap'),
+    'access arguments' => $access_config,
+  );
+  $items['admin/settings/xmlsitemap/settings'] = array(
+    'title' => 'Site map',
+    'description' => 'Configure site map.',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => -1,
+  );
+  $items['admin/settings/xmlsitemap/engines'] = array(
+    'title' => 'Search engines',
+    'description' => 'Configure search engines.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('xmlsitemap_settings_engines'),
+    'type' => MENU_LOCAL_TASK,
+  );
+  $items['admin/settings/xmlsitemap/additional'] = array(
+    'title' => 'Additional',
+    'description' => 'Configure additional links.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('xmlsitemap_settings_additional'),
+    'type' => MENU_LOCAL_TASK,
+    'weight' => 1,
+  );
+  $items['sitemap.xml'] = array(
+    'title' => 'Site map index',
+    'page callback' => '_xmlsitemap_output',
+    'type' => MENU_CALLBACK,
+    'access arguments' => $access_content
+  );
+  $chunk_count = variable_get('xmlsitemap_chunk_count', 0);
+  for ($chunk = 0; $chunk < $chunk_count; ++$chunk) {
+    $items["sitemap$chunk.xml"] = array(
+      'title' => 'Site map !number', array('!number' => $chunk),
+      'page callback' => '_xmlsitemap_output',
+      'page arguments' => array($chunk),
       'type' => MENU_CALLBACK,
-      'access' => $access_content,
+      'access arguments' => $access_content
     );
   }
-  else {
-    $chunk_count = variable_get('xmlsitemap_chunk_count', 0);
-    for ($chunk = 0; $chunk < $chunk_count; ++$chunk) {
-      $items[] = array(
-        'path' => "sitemap$chunk.xml",
-        'title' => t('Site map !number', array('!number' => $chunk)),
-        'callback' => '_xmlsitemap_output',
-        'callback arguments' => array($chunk),
-        'type' => MENU_CALLBACK,
-        'access' => $access_content,
-      );
-    }
-  }
+
   return $items;
 }
 
@@ -111,8 +102,8 @@ function xmlsitemap_settings_sitemap() {
 /**
  * Validate site map settings form.
  */
-function xmlsitemap_settings_sitemap_validate($form_id, $form_values) {
-  if ($form_values['xmlsitemap_chunk_size'] > 50000) {
+function xmlsitemap_settings_sitemap_validate($form, &$form_state) {
+  if ($form_state['values']['xmlsitemap_chunk_size'] > 50000) {
     form_set_error('xmlsitemap_chunk_size', t('Cannot send more than 50,000 links at one time.'));
   }
 }
@@ -120,8 +111,8 @@ function xmlsitemap_settings_sitemap_val
 /**
  * Submit site map settings form.
  */
-function xmlsitemap_settings_sitemap_submit($form_id, $form_values) {
-  system_settings_form_submit($form_id, $form_values);
+function xmlsitemap_settings_sitemap_submit($form, &$form_state) {
+  system_settings_form_submit($form, $form_state['values']);
   xmlsitemap_update_sitemap();
 }
 
@@ -159,12 +150,12 @@ function xmlsitemap_settings_engines() {
 /**
  * Submit search engine settings form.
  */
-function xmlsitemap_settings_engines_submit($form_id, $form_values) {
-  if ($form_values['xmlsitemap_root']) {
-    $form_values['xmlsitemap_submit'] = FALSE;
-    $form_values['xmlsitemap_log_access'] = FALSE;
+function xmlsitemap_settings_engines_submit($form, &$form_state) {
+  if ($form_state['values']['xmlsitemap_root']) {
+    $form_state['values']['xmlsitemap_submit'] = FALSE;
+    $form_state['values']['xmlsitemap_log_access'] = FALSE;
   }
-  system_settings_form_submit($form_id, $form_values);
+  system_settings_form_submit($form, $form_state);
 }
 
 /**
@@ -210,6 +201,16 @@ function xmlsitemap_settings_additional(
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function xmlsitemap_theme() {
+  return array(
+    'xmlsitemap_settings_additional' => array(
+    ),
+  );
+}
+
+/**
  * Theme additional links form.
  * @ingroup themeable
  */
@@ -232,56 +233,57 @@ function theme_xmlsitemap_settings_addit
   return $output;
 }
 
+
 /**
  * Submit additional links form.
  */
-function xmlsitemap_settings_additional_submit($form_id, $form_values) {
+function xmlsitemap_settings_additional_submit($form, &$form_state) {
   $update = FALSE;
-  if ($form_values['op'] == t('Save configuration')) {
-    if ($form_values['xmlsitemap_additional_links_priority'] != variable_get('xmlsitemap_additional_links_priority', 0.1)) {
+  if ($form_state['values']['op'] == t('Save configuration')) {
+    if ($form_state['values']['xmlsitemap_additional_links_priority'] != variable_get('xmlsitemap_additional_links_priority', 0.1)) {
       $update = TRUE;
     }
-    if (!empty($form_values['delete'])) {
-      foreach ($form_values['delete'] as $id => $delete) {
-        if ($delete || $form_values['path'][$id] == trim($form_values['link']['new'])) {
-          db_query("DELETE FROM {xmlsitemap_additional} WHERE path = '%s'", $form_values['path'][$id]);
-          unset($form_values['priority'][$id]);
+    if (!empty($form_state['values']['delete'])) {
+      foreach ($form_state['values']['delete'] as $id => $delete) {
+        if ($delete || $form_state['values']['path'][$id] == trim($form_state['values']['link']['new'])) {
+          db_query("DELETE FROM {xmlsitemap_additional} WHERE path = '%s'", $form_state['values']['path'][$id]);
+          unset($form_state['values']['priority'][$id]);
           $update = TRUE;
         }
       }
-      unset($form_values['delete']);
+      unset($form_state['values']['delete']);
     }
-    $path = trim($form_values['link']['new']);
+    $path = trim($form_state['values']['link']['new']);
     $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", $path));
     if (!empty($path)) {
       db_query("
         INSERT INTO {xmlsitemap_additional} (path, pid, last_changed, priority) VALUES ('%s', %s, %d, %s)
-      ", $path, empty($pid) ? 'NULL' : $pid, time(), $form_values['priority']['new']);
-      unset($form_values['link'], $form_values['priority']['new']);
+      ", $path, empty($pid) ? 'NULL' : $pid, time(), $form_state['values']['priority']['new']);
+      unset($form_state['values']['link'], $form_state['values']['priority']['new']);
       $update = TRUE;
     }
-    if (!empty($form_values['priority'])) {
-      foreach ($form_values['priority'] as $id => $priority) {
-        if ($priority != $form_values['old_priority'][$id]) {
-          $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", $form_values['path'][$id]));
+    if (!empty($form_state['values']['priority'])) {
+      foreach ($form_state['values']['priority'] as $id => $priority) {
+        if ($priority != $form_state['values']['old_priority'][$id]) {
+          $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", $form_state['values']['path'][$id]));
           db_query("
             UPDATE {xmlsitemap_additional}
             SET pid = %s, previously_changed = last_changed, last_changed = %d, priority = %s
             WHERE path = '%s'
-          ", empty($pid) ? 'NULL' : $pid, time(), $priority, $form_values['path'][$id]);
+          ", empty($pid) ? 'NULL' : $pid, time(), $priority, $form_state['values']['path'][$id]);
           $update = TRUE;
         }
       }
-      unset($form_values['path'], $form_values['priority'], $form_values['old_priority']);
+      unset($form_state['values']['path'], $form_state['values']['priority'], $form_state['values']['old_priority']);
     }
   }
   elseif (variable_get('xmlsitemap_additional_links_priority', 0.1) != 0.1) {
-    if (in_array('NULL', $form_values['old_priority'])) {
+    if (in_array('NULL', $form_state['values']['old_priority'])) {
       $update = TRUE;
     }
-    unset($form_values['delete'], $form_values['path'], $form_values['link'], $form_values['old_priority'], $form_values['priority']);
+    unset($form_state['values']['delete'], $form_state['values']['path'], $form_state['values']['link'], $form_state['values']['old_priority'], $form_state['values']['priority']);
   }
-  system_settings_form_submit($form_id, $form_values);
+  system_settings_form_submit($form, $form_state);
   if ($update) {
     xmlsitemap_update_sitemap();
   }
@@ -360,7 +362,7 @@ function _xmlsitemap_output($chunk = NUL
       $message = isset($message) ? $message : t('!sitemap downloaded by @user-agent at @address.', array(
         '!sitemap' => $type,
         '@user-agent' => $_SERVER['HTTP_USER_AGENT'],
-        '@address' => $_SERVER['REMOTE_ADDR'],
+        '@address' => ip_address(),
       ));
       watchdog('xmlsitemap', $message);
     }
@@ -706,9 +708,11 @@ function xmlsitemap_url($path = NULL, $a
   $script = isset($script) ? $script : strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === FALSE ? 'index.php' : '';
   $clean_url = isset($clean_url) ? $clean_url : variable_get('clean_url', FALSE);
   $base = ($absolute ? $base_url .'/' : base_path());
+
   if (!empty($path) && $path != '<front>') {
     $path = _xmlsitemap_get_path_alias($path, $alias);
     $path = drupal_urlencode($path);
+
     if (!$clean_url) {
       if (isset($query)) {
         return $base . $script .'?q='. $path .'&'. $query . $fragment;
@@ -747,12 +751,13 @@ function _xmlsitemap_get_path_alias($pat
   if (!empty($alias)) {
     $result = $alias;
   }
-  if (function_exists('custom_url_rewrite')) {
-    $result = custom_url_rewrite('alias', $result, $path);
-  }
-  if (module_exists('i18n')) {
-    i18n_get_lang_prefix($result, TRUE);
-  }
+  if (function_exists('custom_url_rewrite_outbound')) {
+    custom_url_rewrite_outbound($path, array('query' => $alias, 'absolute' => $path_language));
+    $result = $path;
+  }
+#  if (module_exists('i18n')) {
+#    i18n_get_lang_prefix($result, TRUE);
+#  }
   return $result;
 }
 
Index: docs/xmlsitemap.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/docs/xmlsitemap.php,v
retrieving revision 1.4
diff -u -p -r1.4 xmlsitemap.php
--- docs/xmlsitemap.php	6 Dec 2007 17:41:14 -0000	1.4
+++ docs/xmlsitemap.php	1 Apr 2008 04:02:01 -0000
@@ -173,10 +173,10 @@ function hook_xmlsitemap_engines($op, $t
       if (variable_get('xmlsitemap_engines_google_submit', TRUE)) {
         $result = drupal_http_request(variable_get('xmlsitemap_engines_google_url', 'http://www.google.com/webmasters/tools/ping?sitemap='. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)));
         if ($result->code == 200) {
-          watchdog('xmlsitemap', t('Sitemap successfully submitted to Google.'));
+          watchdog('xmlsitemap', 'Sitemap successfully submitted to Google.');
         }
         else {
-          watchdog('xmlsitemap', t('Error occurred submitting sitemap to Google: @code', array('@code' => $result->code)), WATCHDOG_ERROR);
+          watchdog('xmlsitemap', 'Error occurred submitting sitemap to Google: @code', array('@code' => $result->code), WATCHDOG_ERROR);
         }
       }
       break;
Index: gss/gss.xsl
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/gss/gss.xsl,v
retrieving revision 1.2
diff -u -p -r1.2 gss.xsl
--- gss/gss.xsl	9 Dec 2007 19:04:58 -0000	1.2
+++ gss/gss.xsl	1 Apr 2008 04:02:01 -0000
@@ -1,97 +1,97 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsl:stylesheet version="2.0"
-                xmlns:html="http://www.w3.org/TR/REC-html40"
-                xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-  <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/>
-
-  <!-- Root template -->
-  <xsl:template match="/">
-    <html>
-      <head>
-        <title>Site map file</title>
-        <link href="/sites/all/modules/xmlsitemap/gss/gss.css" type="text/css" rel="stylesheet"/>
-        <script src="/sites/all/modules/xmlsitemap/gss/gss.js"></script>
-      </head>
-
-      <!-- Store in $fileType if we are in a sitemap or in a siteindex -->
-      <xsl:variable name="fileType">
-        <xsl:choose>
-		  <xsl:when test="//sitemap:url">sitemap</xsl:when>
-		  <xsl:otherwise>siteindex</xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-
-      <!-- Body -->
-      <body onLoad="initXsl('table0','{$fileType}');">
-
-        <!-- Text and table -->
-        <h1 id="head1">Site map file:</h1>
-          <xsl:choose>
-	      <xsl:when test="$fileType='sitemap'"><xsl:call-template name="sitemapTable"/></xsl:when>
-	      <xsl:otherwise><xsl:call-template name="siteindexTable"/></xsl:otherwise>
-          </xsl:choose>
-      </body>
-    </html>
-  </xsl:template>
-
-  <!-- siteindexTable template -->
-  <xsl:template name="siteindexTable">
-    <h2>Number of site maps in this index: <xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"></xsl:value-of></h2>
-    <p class="sml">Click on the table headers to change sorting.</p>
-    <table border="1" width="100%" class="data" id="table0">
-      <tr class="header">
-        <td>Site map URL</td>
-        <td>Last modification date</td>
-      </tr>
-      <xsl:apply-templates select="sitemap:sitemapindex/sitemap:sitemap">
-        <xsl:sort select="sitemap:lastmod" order="descending"/>
-      </xsl:apply-templates>
-    </table>
-  </xsl:template>
-
-  <!-- sitemapTable template -->
-  <xsl:template name="sitemapTable">
-    <h2>Number of URLs in this site map: <xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of></h2>
-    <p class="sml">Click on the table headers to change sorting.</p>
-    <table border="1" width="100%" class="data" id="table0">
-      <tr class="header">
-        <td>Site map URL</td>
-        <td>Last modification date</td>
-        <td>Change freq.</td>
-        <td>Priority</td>
-      </tr>
-      <xsl:apply-templates select="sitemap:urlset/sitemap:url">
-        <xsl:sort select="sitemap:priority" order="descending"/>
-      </xsl:apply-templates>
-    </table>
-  </xsl:template>
-
-  <!-- sitemap:url template -->
-  <xsl:template match="sitemap:url">
-    <tr>
-      <td>
-        <xsl:variable name="sitemapURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
-        <a href="{$sitemapURL}" target="_blank" ref="nofollow"><xsl:value-of select="$sitemapURL"></xsl:value-of></a>
-      </td>
-      <td><xsl:value-of select="sitemap:lastmod"/></td>
-      <td><xsl:value-of select="sitemap:changefreq"/></td>
-      <td><xsl:value-of select="sitemap:priority"/></td>
-    </tr>
-  </xsl:template>
-
-  <!-- sitemap:sitemap template -->
-  <xsl:template match="sitemap:sitemap">
-    <tr>
-      <td>
-        <xsl:variable name="sitemapURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
-        <a href="{$sitemapURL}"><xsl:value-of select="$sitemapURL"></xsl:value-of></a>
-      </td>
-      <td><xsl:value-of select="sitemap:lastmod"/></td>
-    </tr>
-  </xsl:template>
-
-</xsl:stylesheet>
-
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="2.0"
+                xmlns:html="http://www.w3.org/TR/REC-html40"
+                xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/>
+
+  <!-- Root template -->
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>Site map file</title>
+        <link href="/sites/all/modules/xmlsitemap/gss/gss.css" type="text/css" rel="stylesheet"/>
+        <script src="/sites/all/modules/xmlsitemap/gss/gss.js"></script>
+      </head>
+
+      <!-- Store in $fileType if we are in a sitemap or in a siteindex -->
+      <xsl:variable name="fileType">
+        <xsl:choose>
+      <xsl:when test="//sitemap:url">sitemap</xsl:when>
+      <xsl:otherwise>siteindex</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <!-- Body -->
+      <body onLoad="initXsl('table0','{$fileType}');">
+
+        <!-- Text and table -->
+        <h1 id="head1">Site map file:</h1>
+          <xsl:choose>
+        <xsl:when test="$fileType='sitemap'"><xsl:call-template name="sitemapTable"/></xsl:when>
+        <xsl:otherwise><xsl:call-template name="siteindexTable"/></xsl:otherwise>
+          </xsl:choose>
+      </body>
+    </html>
+  </xsl:template>
+
+  <!-- siteindexTable template -->
+  <xsl:template name="siteindexTable">
+    <h2>Number of site maps in this index: <xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"></xsl:value-of></h2>
+    <p class="sml">Click on the table headers to change sorting.</p>
+    <table border="1" width="100%" class="data" id="table0">
+      <tr class="header">
+        <td>Site map URL</td>
+        <td>Last modification date</td>
+      </tr>
+      <xsl:apply-templates select="sitemap:sitemapindex/sitemap:sitemap">
+        <xsl:sort select="sitemap:lastmod" order="descending"/>
+      </xsl:apply-templates>
+    </table>
+  </xsl:template>
+
+  <!-- sitemapTable template -->
+  <xsl:template name="sitemapTable">
+    <h2>Number of URLs in this site map: <xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of></h2>
+    <p class="sml">Click on the table headers to change sorting.</p>
+    <table border="1" width="100%" class="data" id="table0">
+      <tr class="header">
+        <td>Site map URL</td>
+        <td>Last modification date</td>
+        <td>Change freq.</td>
+        <td>Priority</td>
+      </tr>
+      <xsl:apply-templates select="sitemap:urlset/sitemap:url">
+        <xsl:sort select="sitemap:priority" order="descending"/>
+      </xsl:apply-templates>
+    </table>
+  </xsl:template>
+
+  <!-- sitemap:url template -->
+  <xsl:template match="sitemap:url">
+    <tr>
+      <td>
+        <xsl:variable name="sitemapURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
+        <a href="{$sitemapURL}" target="_blank" ref="nofollow"><xsl:value-of select="$sitemapURL"></xsl:value-of></a>
+      </td>
+      <td><xsl:value-of select="sitemap:lastmod"/></td>
+      <td><xsl:value-of select="sitemap:changefreq"/></td>
+      <td><xsl:value-of select="sitemap:priority"/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- sitemap:sitemap template -->
+  <xsl:template match="sitemap:sitemap">
+    <tr>
+      <td>
+        <xsl:variable name="sitemapURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
+        <a href="{$sitemapURL}"><xsl:value-of select="$sitemapURL"></xsl:value-of></a>
+      </td>
+      <td><xsl:value-of select="sitemap:lastmod"/></td>
+    </tr>
+  </xsl:template>
+
+</xsl:stylesheet>
+
Index: xmlsitemap_engines/xmlsitemap_engines.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info,v
retrieving revision 1.1
diff -u -p -r1.1 xmlsitemap_engines.info
--- xmlsitemap_engines/xmlsitemap_engines.info	9 Nov 2007 17:56:05 -0000	1.1
+++ xmlsitemap_engines/xmlsitemap_engines.info	1 Apr 2008 04:02:01 -0000
@@ -2,5 +2,6 @@
 name = XML Sitemap: Engines
 description = Submits site map to search engines.
 package = XML Sitemap
-dependencies = xmlsitemap
-
+dependencies[] = xmlsitemap
+core = 6.x
+version = 6.x-1.x-dev
Index: xmlsitemap_engines/xmlsitemap_engines.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module,v
retrieving revision 1.4
diff -u -p -r1.4 xmlsitemap_engines.module
--- xmlsitemap_engines/xmlsitemap_engines.module	13 Dec 2007 02:48:02 -0000	1.4
+++ xmlsitemap_engines/xmlsitemap_engines.module	1 Apr 2008 04:02:01 -0000
@@ -64,10 +64,10 @@ function _xmlsitemap_engines_google($op,
       if (variable_get('xmlsitemap_engines_google_submit', FALSE)) {
         $result = drupal_http_request(variable_get('xmlsitemap_engines_google_url', 'http://www.google.com/webmasters/tools/ping?sitemap='. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)));
         if ($result->code == 200) {
-          watchdog('xmlsitemap', t('Sitemap successfully submitted to Google.'));
+          watchdog('xmlsitemap', 'Sitemap successfully submitted to Google.');
         }
         else {
-          watchdog('xmlsitemap', t('Error occurred submitting sitemap to Google: @code', array('@code' => $result->code)), WATCHDOG_ERROR);
+          watchdog('xmlsitemap', 'Error occurred submitting sitemap to Google: @code', array('@code' => $result->code), WATCHDOG_ERROR);
         }
       }
       break;
@@ -116,10 +116,10 @@ function _xmlsitemap_engines_yahoo($op) 
       if (variable_get('xmlsitemap_engines_yahoo_submit', FALSE)) {
         $result = drupal_http_request(variable_get('xmlsitemap_engines_yahoo_url', 'http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap='. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)));
         if ($result->code == 200) {
-          watchdog('xmlsitemap', t('Site map successfully submitted to Yahoo!.'));
+          watchdog('xmlsitemap', 'Site map successfully submitted to Yahoo!.');
         }
         else {
-          watchdog('xmlsitemap', t('Error occurred submitting site map to Yahoo!: @code', array('@code' => $result->code)), WATCHDOG_ERROR);
+          watchdog('xmlsitemap', 'Error occurred submitting site map to Yahoo!: @code', array('@code' => $result->code), WATCHDOG_ERROR);
         }
       }
       break;
@@ -154,10 +154,10 @@ function _xmlsitemap_engines_ask($op) {
       if (variable_get('xmlsitemap_engines_ask_submit', FALSE)) {
         $result = drupal_http_request(variable_get('xmlsitemap_engines_ask_url', 'http://submissions.ask.com/ping?sitemap='. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)));
         if ($result->code == 200) {
-          watchdog('xmlsitemap', t('Site map successfully submitted to Ask.com.'));
+          watchdog('xmlsitemap', 'Site map successfully submitted to Ask.com.');
         }
         else {
-          watchdog('xmlsitemap', t('Error occurred submitting site map to Ask.com: @code', array('@code' => $result->code)), WATCHDOG_ERROR);
+          watchdog('xmlsitemap', 'Error occurred submitting site map to Ask.com: @code', array('@code' => $result->code), WATCHDOG_ERROR);
         }
       }
       break;
@@ -204,10 +204,10 @@ function _xmlsitemap_engines_live($op) {
       if (variable_get('xmlsitemap_engines_live_submit', FALSE)) {
         $result = drupal_http_request(variable_get('xmlsitemap_engines_live_url', 'http://webmaster.live.com/ping.aspx?siteMap='. xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)));
         if ($result->code == 200) {
-          watchdog('xmlsitemap', t('Site map successfully submitted to Windows Live.'));
+          watchdog('xmlsitemap', 'Site map successfully submitted to Windows Live.');
         }
         else {
-          watchdog('xmlsitemap', t('Error occurred submitting site map to Windows Live: @code', array('@code' => $result->code)), WATCHDOG_ERROR);
+          watchdog('xmlsitemap', 'Error occurred submitting site map to Windows Live: @code', array('@code' => $result->code), WATCHDOG_ERROR);
         }
       }
       break;
@@ -217,41 +217,37 @@ function _xmlsitemap_engines_live($op) {
 /**
  * Implementation of hook_menu().
  */
-function xmlsitemap_engines_menu($may_cache) {
+function xmlsitemap_engines_menu() {
   $items = array();
-  $access_content = user_access('access content');
-  if ($may_cache) {
-    if ($verify = variable_get('xmlsitemap_engines_google_verify', '')) {
-      $items[] = array(
-        'path' => $verify,
-        'title' => t('Google verification page'),
-        'callback' => '_xmlsitemap_engines_verify',
-        'callback arguments' => array('google'),
-        'type' => MENU_CALLBACK,
-        'access' => $access_content,
-      );
-    }
-    if (($verify = variable_get('xmlsitemap_engines_yahoo_verify', '')) != '') {
-      $items[] = array(
-        'path' => $verify,
-        'title' => t('Yahoo! verification page'),
-        'callback' => '_xmlsitemap_engines_verify',
-        'callback arguments' => array('yahoo'),
-        'type' => MENU_CALLBACK,
-        'access' => $access_content,
-      );
-    }
-    if (($verify = variable_get('xmlsitemap_engines_live_verify', 'LiveSearchSiteAuth.xml')) != '') {
-      $items[] = array(
-        'path' => $verify,
-        'title' => t('Windows Live verification page'),
-        'callback' => '_xmlsitemap_engines_verify',
-        'callback arguments' => array('live'),
-        'type' => MENU_CALLBACK,
-        'access' => $access_content,
-      );
-    }
+  $access_content = array('access content');
+  if ($verify = variable_get('xmlsitemap_engines_google_verify', '')) {
+    $items[$verify] = array(
+      'title' => 'Google verification page',
+      'page callback' => '_xmlsitemap_engines_verify',
+      'page arguments' => array('google'),
+      'type' => MENU_CALLBACK,
+      'access arguments' => $access_content,
+    );
+  }
+  if (($verify = variable_get('xmlsitemap_engines_yahoo_verify', '')) != '') {
+    $items[$verify] = array(
+      'title' => 'Yahoo! verification page',
+      'page callback' => '_xmlsitemap_engines_verify',
+      'page arguments' => array('yahoo'),
+      'type' => MENU_CALLBACK,
+      'access arguments' => $access_content,
+    );
+  }
+  if (($verify = variable_get('xmlsitemap_engines_live_verify', 'LiveSearchSiteAuth.xml')) != '') {
+    $items[$verify] = array(
+      'title' => 'Windows Live verification page',
+      'page callback' => '_xmlsitemap_engines_verify',
+      'page arguments' => array('live'),
+      'type' => MENU_CALLBACK,
+      'access arguments' => $access_content,
+    );
   }
+
   return $items;
 }
 
Index: xmlsitemap_node/xmlsitemap_node.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.info,v
retrieving revision 1.1
diff -u -p -r1.1 xmlsitemap_node.info
--- xmlsitemap_node/xmlsitemap_node.info	9 Nov 2007 17:56:05 -0000	1.1
+++ xmlsitemap_node/xmlsitemap_node.info	1 Apr 2008 04:02:01 -0000
@@ -2,5 +2,6 @@
 name = XML Sitemap: Node
 description = Adds nodes to the site map.
 package = XML Sitemap
-dependencies = xmlsitemap
-
+dependencies[] = xmlsitemap
+core = 6.x
+version = 6.x-1.x-dev
Index: xmlsitemap_node/xmlsitemap_node.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install,v
retrieving revision 1.7
diff -u -p -r1.7 xmlsitemap_node.install
--- xmlsitemap_node/xmlsitemap_node.install	8 Jan 2008 05:13:35 -0000	1.7
+++ xmlsitemap_node/xmlsitemap_node.install	1 Apr 2008 04:02:01 -0000
@@ -2,36 +2,65 @@
 // $Id: xmlsitemap_node.install,v 1.7 2008/01/08 05:13:35 darrenoh Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function xmlsitemap_node_schema() {
+  $schema['xmlsitemap_node'] = array(
+    'description' => t('The base table for xmlsitemap.'),
+    'fields' => array(
+      'nid' => array(
+        'description' => t('The path of this node.'),
+        'type' => 'int',
+      ),
+      'pid' => array(
+        'description' => t('The id of the path.'),
+        'type' => 'int',
+      ),
+      'last_changed' => array(
+        'description' => t('Keeps track of new changes.'),
+        'type' => 'int',
+      ),
+      'previously_changed' => array(
+        'description' => t('Keeps track of old changes.'),
+        'type' => 'int',
+      ),
+      'last_comment' => array(
+        'description' => t('Link to last comment.'),
+        'type' => 'int',
+      ),
+      'previous_comment' => array(
+        'description' => t('Link to previous comment.'),
+        'type' => 'int',
+      ),
+      'priority_override' => array(
+        'description' => t('Stores the index value.'),
+        'type' => 'float',
+      ),
+    ),
+    'primary key' => array('nid'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
-function xmlsitemap_node_install() {           
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query("CREATE TABLE {xmlsitemap_node} (
-        nid int,
-        pid int,
-        last_changed int(11),
-        previously_changed int(11),
-        last_comment int(11),
-        previous_comment int(11),
-        priority_override float,
-        PRIMARY KEY (nid)
-      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      break;
-    case 'pgsql':
-      db_query("CREATE TABLE {xmlsitemap_node} (
-        nid integer,
-        pid integer,
-        last_changed integer,
-        previously_changed integer,
-        last_comment integer,
-        previous_comment integer,
-        priority_override real,
-        PRIMARY KEY (nid)
-      );");
-      break;
+function xmlsitemap_node_install() {
+  // Create my tables.
+  drupal_install_schema('xmlsitemap_node');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function xmlsitemap_node_uninstall() {
+  // Drop my tables.
+  $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'xmlsitemap\_node\_%'");
+  while ($variable = db_fetch_array($settings)) {
+    variable_del($variable->name);
   }
+  drupal_uninstall_schema('xmlsitemap_node');
 }
 
 /**
@@ -98,15 +127,3 @@ function _xmlsitemap_node_insert_query()
 function xmlsitemap_node_disable() {
   xmlsitemap_update_sitemap();
 }
-
-/**
- * Implementation of hook_uninstall().
- */
-function xmlsitemap_node_uninstall() {
-  db_query("DROP TABLE {xmlsitemap_node}");
-  $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'xmlsitemap\_node\_%'");
-  while ($variable = db_fetch_array($settings)) {
-    variable_del($variable->name);
-  }
-}
-
Index: xmlsitemap_node/xmlsitemap_node.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module,v
retrieving revision 1.17
diff -u -p -r1.17 xmlsitemap_node.module
--- xmlsitemap_node/xmlsitemap_node.module	8 Jan 2008 05:13:35 -0000	1.17
+++ xmlsitemap_node/xmlsitemap_node.module	1 Apr 2008 04:02:01 -0000
@@ -161,86 +161,88 @@ function xmlsitemap_node_perm() {
 /**
  * Implementation of hook_form_alter().
  */
-function xmlsitemap_node_form_alter($form_id, &$form) {
-  switch ($form_id) {
-    case $form['type']['#value'] .'_node_form':
-      if (isset($form['type'])) {
-        $node = $form['#node'];
-        if (user_access('override node priority')) {
+function xmlsitemap_node_form_alter(&$form, &$form_state, $form_id) {
+  if (!empty($form['type']['#value'])) {
+    if (isset($form['type'])) {
+      $node = $form['#node'];
+      if (user_access('override node priority')) {
+        $form['xmlsitemap_node'] = array(
+          '#type' => 'fieldset',
+          '#title' => t('Site map settings'),
+          '#collapsible' => TRUE,
+          '#collapsed' => TRUE,
+          '#weight' => 30,
+        );
+        $options = xmlsitemap_priority_options('both');
+        $default = variable_get("xmlsitemap_node_type_priority_$node->type", '0.1');
+        $form['xmlsitemap_node']['priority_override'] = array(
+          '#type' => 'select',
+          '#title' => t('Site map priority'),
+          '#default_value' => $node->priority_override,
+          '#options' => $options,
+          '#description' => t('The default priority is %priority.', array('%priority' => $options[$default])),
+        );
+      }
+      else {
+        $form['priority_override'] = array('#type' => 'value', '#value' => $node->priority_override);
+      }
+      $form['xmlsitemap_node_status'] = array('#type' => 'value', '#value' => $node->status);
+    }
+  }
+  else {
+    switch ($form_id) {
+      case 'node_type_form':
+        if (isset($form['identity']['type'])) {
           $form['xmlsitemap_node'] = array(
             '#type' => 'fieldset',
-            '#title' => t('Site map settings'),
+            '#title' => t('Site map'),
             '#collapsible' => TRUE,
             '#collapsed' => TRUE,
-            '#weight' => 30,
           );
-          $options = xmlsitemap_priority_options('both');
-          $default = variable_get("xmlsitemap_node_type_priority_$node->type", '0.1');
-          $form['xmlsitemap_node']['priority_override'] = array(
+          $form['xmlsitemap_node']['xmlsitemap_node_type_priority'] = array(
             '#type' => 'select',
-            '#title' => t('Site map priority'),
-            '#default_value' => $node->priority_override,
-            '#options' => $options,
-            '#description' => t('The default priority is %priority.', array('%priority' => $options[$default])),
+            '#title' => t('Priority adjustment'),
+            '#default_value' => variable_get("xmlsitemap_node_type_priority_{$form['#node_type']->type}", 0.1),
+            '#options' => xmlsitemap_priority_options('exclude'),
+            '#description' => t('This number will be added to the priority of this content type.'),
           );
+          $form['xmlsitemap_old_priority'] = array('#type' => 'value', '#value' => variable_get("xmlsitemap_node_type_priority_{$form['#node_type']->type}", 0.1));
+          $form['#submit'][] = '_xmlsitemap_node_submit';
+          $form['submit']['#weight'] = 1;
+          $form['reset']['#weight'] = 1;
         }
-        else {
-          $form['priority_override'] = array('#type' => 'value', '#value' => $node->priority_override);
-        }
-        $form['xmlsitemap_node_status'] = array('#type' => 'value', '#value' => $node->status);
-      }
-      break;
-    case 'node_type_form':
-      if (isset($form['identity']['type'])) {
+        break;
+      case 'xmlsitemap_settings_sitemap':
         $form['xmlsitemap_node'] = array(
           '#type' => 'fieldset',
-          '#title' => t('Site map'),
-          '#collapsible' => TRUE,
-          '#collapsed' => TRUE,
+          '#title' => t('Content priority'),
+          '#description' => t('The default priority for specific content types can be set on the !link pages.', array(
+           '!link' => l(t('content type settings'), 'admin/content/types'),
+          )),
         );
-        $form['xmlsitemap_node']['xmlsitemap_node_type_priority'] = array(
+        $form['xmlsitemap_node']['xmlsitemap_node_promote_priority'] = array(
           '#type' => 'select',
-          '#title' => t('Priority adjustment'),
-          '#default_value' => variable_get("xmlsitemap_node_type_priority_{$form['#node_type']->type}", 0.1),
-          '#options' => xmlsitemap_priority_options('exclude'),
-          '#description' => t('This number will be added to the priority of this content type.'),
-        );
-        $form['xmlsitemap_old_priority'] = array('#type' => 'value', '#value' => variable_get("xmlsitemap_node_type_priority_{$form['#node_type']->type}", 0.1));
-        $form['#submit']['_xmlsitemap_node_submit'] = array();
-        $form['submit']['#weight'] = 1;
-        $form['reset']['#weight'] = 1;
-      }
-      break;
-    case 'xmlsitemap_settings_sitemap':
-      $form['xmlsitemap_node'] = array(
-        '#type' => 'fieldset',
-        '#title' => t('Content priority'),
-        '#description' => t('The default priority for specific content types can be set on the !link pages.', array(
-          '!link' => l(t('content type settings'), 'admin/content/types'),
-        )),
-      );
-      $form['xmlsitemap_node']['xmlsitemap_node_promote_priority'] = array(
-        '#type' => 'select',
-        '#title' => t('Promotion adjustment'),
-        '#default_value' => variable_get('xmlsitemap_node_promote_priority', 0.3),
-        '#options' => xmlsitemap_priority_options(),
-        '#description' => t('This number will be added to the priority of each post that is promoted to the front page.'),
-      );
-      $form['xmlsitemap_node']['xmlsitemap_node_comment_priority'] = array(
-        '#type' => 'select',
-        '#title' => t('Comment ratio weight'),
-        '#default_value' => variable_get('xmlsitemap_node_comment_priority', 0.5),
-        '#options' => xmlsitemap_priority_options(),
-        '#description' => t('This number will be multiplied by the ratio of the number of comments on a post to the highest number of comments on any post&#8212;that is, this number will be added to the priority of the post with the most comments.'),
-      );
-      $form['xmlsitemap_node']['xmlsitemap_node_count_comments'] = array(
-        '#type' => 'checkbox',
-        '#title' => t('Count comments in change date and frequency'),
-        '#default_value' => variable_get('xmlsitemap_node_count_comments', TRUE),
-        '#description' => t('If enabled, the frequency of comments on a post will affect its change frequency and last modification date.'),
-      );
-      $form['buttons']['#weight'] = 1;
-      break;
+          '#title' => t('Promotion adjustment'),
+          '#default_value' => variable_get('xmlsitemap_node_promote_priority', 0.3),
+          '#options' => xmlsitemap_priority_options(),
+          '#description' => t('This number will be added to the priority of each post that is promoted to the front page.'),
+        );
+        $form['xmlsitemap_node']['xmlsitemap_node_comment_priority'] = array(
+          '#type' => 'select',
+          '#title' => t('Comment ratio weight'),
+          '#default_value' => variable_get('xmlsitemap_node_comment_priority', 0.5),
+          '#options' => xmlsitemap_priority_options(),
+          '#description' => t('This number will be multiplied by the ratio of the number of comments on a post to the highest number of comments on any post&#8212;that is, this number will be added to the priority of the post with the most comments.'),
+        );
+        $form['xmlsitemap_node']['xmlsitemap_node_count_comments'] = array(
+          '#type' => 'checkbox',
+          '#title' => t('Count comments in change date and frequency'),
+          '#default_value' => variable_get('xmlsitemap_node_count_comments', TRUE),
+          '#description' => t('If enabled, the frequency of comments on a post will affect its change frequency and last modification date.'),
+        );
+        $form['buttons']['#weight'] = 1;
+        break;
+    }
   }
 }
 
@@ -335,13 +337,13 @@ function xmlsitemap_node_comment($op, $c
  * Add submit actions to forms.
  * @return None
  */
-function _xmlsitemap_node_submit($form_id, $form_values) {
+function _xmlsitemap_node_submit($form, &$form_state) {
   switch ($form_id) {
     case 'node_type_form':
-      $op = isset($form_values['op']) ? $form_values['op'] : '';
-      $type = isset($form_values['old_type']) ? $form_values['old_type'] : trim($form_values['type']);
-      $priority = $form_values['xmlsitemap_node_type_priority'];
-      $old_priority = $form_values['xmlsitemap_old_priority'];
+      $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
+      $type = isset($form_state['values']['old_type']) ? $form_state['values']['old_type'] : trim($form_state['values']['type']);
+      $priority = $form_state['values']['xmlsitemap_node_type_priority'];
+      $old_priority = $form_state['values']['xmlsitemap_old_priority'];
       if ($op == t('Save content type') && $priority != $old_priority || $op == t('Reset to defaults') && $old_priority != 0.1) {
         xmlsitemap_update_sitemap();
       }
Index: xmlsitemap_term/xmlsitemap_term.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_term/xmlsitemap_term.info,v
retrieving revision 1.1
diff -u -p -r1.1 xmlsitemap_term.info
--- xmlsitemap_term/xmlsitemap_term.info	9 Nov 2007 17:56:05 -0000	1.1
+++ xmlsitemap_term/xmlsitemap_term.info	1 Apr 2008 04:02:01 -0000
@@ -2,5 +2,6 @@
 name = XML Sitemap: Term
 description = Adds taxonomy terms to the site map.
 package = XML Sitemap
-dependencies = xmlsitemap
-
+dependencies[] = xmlsitemap
+core = 6.x
+version = 6.x-1.x-dev
Index: xmlsitemap_term/xmlsitemap_term.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_term/xmlsitemap_term.install,v
retrieving revision 1.3
diff -u -p -r1.3 xmlsitemap_term.install
--- xmlsitemap_term/xmlsitemap_term.install	6 Dec 2007 17:41:15 -0000	1.3
+++ xmlsitemap_term/xmlsitemap_term.install	1 Apr 2008 04:02:01 -0000
@@ -2,32 +2,37 @@
 // $Id: xmlsitemap_term.install,v 1.3 2007/12/06 17:41:15 darrenoh Exp $
 
 /**
- * Implementation of hook_install().
+ * Implementation of hook_schema().
  */
-function xmlsitemap_term_install() {           
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query("CREATE TABLE {xmlsitemap_term} (
-        tid int,
-        pid int,
-        last_changed int(11),
-        previously_changed int(11),
-        priority_override float,
-        PRIMARY KEY (tid)
-      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      break;
-    case 'pgsql':
-      db_query("CREATE TABLE {xmlsitemap_term} (
-        tid integer,
-        pid integer,
-        last_changed integer,
-        previously_changed integer,
-        priority_override real,
-        PRIMARY KEY (tid)
-      );");
-      break;
-  }
+function xmlsitemap_term_schema() {
+  $schema['xmlsitemap_term'] = array(
+    'description' => t('The base table for xmlsitemap.'),
+    'fields' => array(
+      'tid' => array(
+        'description' => t('The id of the term.'),
+        'type' => 'int',
+      ),
+      'pid' => array(
+        'description' => t('The id of the path.'),
+        'type' => 'int',
+      ),
+      'last_changed' => array(
+        'description' => t('Keeps track of new changes.'),
+        'type' => 'int',
+      ),
+      'previously_changed' => array(
+        'description' => t('Keeps track of old changes.'),
+        'type' => 'int',
+      ),
+      'priority_override' => array(
+        'description' => t('Stores the index value.'),
+        'type' => 'float',
+      ),
+    ),
+    'primary key' => array('tid'),
+  );
+
+  return $schema;
 }
 
 /**
@@ -67,14 +72,22 @@ function xmlsitemap_term_disable() {
   xmlsitemap_update_sitemap();
 }
 
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function xmlsitemap_term_install() {
+  drupal_install_schema('xmlsitemap_term');
+}
+
 /**
  * Implementation of hook_uninstall().
  */
 function xmlsitemap_term_uninstall() {
-  db_query("DROP TABLE {xmlsitemap_term}");
   $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'xmlsitemap\_term\_%'");
   while ($variable = db_fetch_object($settings)) {
     variable_del($variable->name);
   }
+  drupal_uninstall_schema('xmlsitemap_term');
 }
 
Index: xmlsitemap_term/xmlsitemap_term.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_term/xmlsitemap_term.module,v
retrieving revision 1.10
diff -u -p -r1.10 xmlsitemap_term.module
--- xmlsitemap_term/xmlsitemap_term.module	13 Dec 2007 02:18:30 -0000	1.10
+++ xmlsitemap_term/xmlsitemap_term.module	1 Apr 2008 04:02:01 -0000
@@ -129,7 +129,7 @@ function xmlsitemap_term_perm() {
 /**
  * Implementation of hook_form_alter().
  */
-function xmlsitemap_term_form_alter($form_id, &$form) {
+function xmlsitemap_term_form_alter(&$form, &$form_state, $form_id) {
   switch ($form_id) {
     case 'taxonomy_form_term':
       $priority = db_result(db_query("SELECT priority_override FROM {xmlsitemap_term} WHERE tid = %d", $form['tid']['#value']));
@@ -188,13 +188,13 @@ function xmlsitemap_term_taxonomy($op, $
     if ($op != 'delete') {
       $module = db_result(db_query("SELECT module FROM {vocabulary} WHERE vid = %d", $array['vid']));
       if ($module == 'forum') {
-        $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "forum/$array[tid]"));
+        $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "forum/". $array['tid']));
       }
       elseif ($module != 'taxonomy' && $path = module_invoke($module, 'term_path', (object) $array)) {
         $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", $path));
       }
       else {
-        $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "taxonomy/term/$array[tid]"));
+        $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "taxonomy/term/". $array['tid']));
       }
       $pid = empty($pid) ? 'NULL' : $pid;
     }
Index: xmlsitemap_user/xmlsitemap_user.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.info,v
retrieving revision 1.1
diff -u -p -r1.1 xmlsitemap_user.info
--- xmlsitemap_user/xmlsitemap_user.info	9 Nov 2007 17:56:05 -0000	1.1
+++ xmlsitemap_user/xmlsitemap_user.info	1 Apr 2008 04:02:01 -0000
@@ -2,5 +2,6 @@
 name = XML Sitemap: User
 description = Adds user profiles to the site map.
 package = XML Sitemap
-dependencies = xmlsitemap
-
+dependencies[] = xmlsitemap
+core = 6.x
+version = 6.x-1.x-dev
Index: xmlsitemap_user/xmlsitemap_user.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.install,v
retrieving revision 1.4
diff -u -p -r1.4 xmlsitemap_user.install
--- xmlsitemap_user/xmlsitemap_user.install	6 Dec 2007 17:41:15 -0000	1.4
+++ xmlsitemap_user/xmlsitemap_user.install	1 Apr 2008 04:02:02 -0000
@@ -2,42 +2,54 @@
 // $Id: xmlsitemap_user.install,v 1.4 2007/12/06 17:41:15 darrenoh Exp $
 
 /**
- * Implementation of hook_install().
+ * Implementation of hook_schema().
  */
-function xmlsitemap_user_install() {           
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query("CREATE TABLE {xmlsitemap_user} (
-        uid int,
-        pid int,
-        last_changed int(11),
-        previously_changed int(11),
-        priority_override float,
-        PRIMARY KEY (uid)
-      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      db_query("CREATE TABLE {xmlsitemap_user_role} (
-        rid int,
-        priority float NOT NULL DEFAULT 0,
-        PRIMARY KEY (rid)
-      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      break;
-    case 'pgsql':
-      db_query("CREATE TABLE {xmlsitemap_user} (
-        uid integer,
-        pid integer,
-        last_changed integer,
-        previously_changed integer,
-        priority_override real,
-        PRIMARY KEY (uid)
-      );");
-      db_query("CREATE TABLE {xmlsitemap_user_role} (
-        rid integer,
-        priority real NOT NULL DEFAULT 0,
-        PRIMARY KEY (rid)
-      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      break;
-  }
+function xmlsitemap_user_schema() {
+  $schema['xmlsitemap_user'] = array(
+    'description' => t('The base table for xmlsitemap.'),
+    'fields' => array(
+      'uid' => array(
+        'description' => t('The id of the user.'),
+        'type' => 'int',
+      ),
+      'pid' => array(
+        'description' => t('The id of the path.'),
+        'type' => 'int',
+      ),
+      'last_changed' => array(
+        'description' => t('Keeps track of new changes.'),
+        'type' => 'int',
+      ),
+      'previously_changed' => array(
+        'description' => t('Keeps track of old changes.'),
+        'type' => 'int',
+      ),
+      'priority_override' => array(
+        'description' => t('Stores the index value.'),
+        'type' => 'float',
+      ),
+    ),
+    'primary key' => array('uid'),
+  );
+
+  $schema['xmlsitemap_user_role'] = array(
+    'description' => t('The base table for xmlsitemap.'),
+    'fields' => array(
+      'rid' => array(
+        'description' => t('The id of the path.'),
+        'type' => 'int',
+      ),
+      'priority' => array(
+        'description' => t('Stores the index value.'),
+        'type' => 'float',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('rid'),
+  );
+
+  return $schema;
 }
 
 /**
@@ -84,10 +96,16 @@ function xmlsitemap_user_disable() {
 }
 
 /**
+ * Implementation of hook_install().
+ */
+function xmlsitemap_user_install() {
+  drupal_install_schema('xmlsitemap_user');
+}
+
+/**
  * Implementation of hook_uninstall().
  */
 function xmlsitemap_user_uninstall() {
-  db_query("DROP TABLE {xmlsitemap_user}");
-  db_query("DROP TABLE {xmlsitemap_user_role}");
+  drupal_uninstall_schema('xmlsitemap_user');
 }
 
Index: xmlsitemap_user/xmlsitemap_user.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module,v
retrieving revision 1.11
diff -u -p -r1.11 xmlsitemap_user.module
--- xmlsitemap_user/xmlsitemap_user.module	10 Dec 2007 03:15:19 -0000	1.11
+++ xmlsitemap_user/xmlsitemap_user.module	1 Apr 2008 04:02:02 -0000
@@ -90,7 +90,7 @@ function _xmlsitemap_user_priority($user
 /**
  * Implementation of hook_form_alter().
  */
-function xmlsitemap_user_form_alter($form_id, &$form) {
+function xmlsitemap_user_form_alter(&$form, &$form_state, $form_id) {
   switch ($form_id) {
     case 'user_admin_settings':
       $form['xmlsitemap'] = array(
@@ -107,7 +107,7 @@ function xmlsitemap_user_form_alter($for
         '#description' => t('Choose the default priority for users who have only the authenticated user role.'),
       );
       $form['buttons']['#weight'] = 1;
-      $form['#submit']['_xmlsitemap_user_submit'] = array();
+      $form['#submit'][] = '_xmlsitemap_user_submit';
       break;
     case 'user_admin_role':
       $form['xmlsitemap_user_role_priority'] = array(
@@ -119,7 +119,7 @@ function xmlsitemap_user_form_alter($for
       );
       $form['submit']['#weight'] = 1;
       $form['delete']['#weight'] = 1;
-      $form['#submit']['_xmlsitemap_user_submit'] = array();
+      $form['#submit'][] = '_xmlsitemap_user_submit';
       break;
   }
 }
@@ -128,23 +128,23 @@ function xmlsitemap_user_form_alter($for
  * Add submit actions to forms.
  * @return None
  */
-function _xmlsitemap_user_submit($form_id, $form_values) {
+function _xmlsitemap_user_submit(&$form, &$form_state) {
   switch ($form_id) {
     case 'user_admin_settings':
-      if ($form_values['xmlsitemap_user_default_priority'] != $form_values['xmlsitemap_user_old_default_priority']) {
+      if ($form_state['values']['xmlsitemap_user_default_priority'] != $form_state['values']['xmlsitemap_user_old_default_priority']) {
         xmlsitemap_update_sitemap();
       }
       break;
     case 'user_admin_role':
-      $priority = db_result(db_query("SELECT priority FROM {xmlsitemap_user_role} WHERE rid = %d", $form_values['rid']));
-      if ($form_values['op'] == t('Delete role')) {
-        db_query("DELETE FROM {xmlsitemap_user_role} WHERE rid = %d", $form_values['rid']);
+      $priority = db_result(db_query("SELECT priority FROM {xmlsitemap_user_role} WHERE rid = %d", $form_state['values']['rid']));
+      if ($form_state['values']['op'] == t('Delete role')) {
+        db_query("DELETE FROM {xmlsitemap_user_role} WHERE rid = %d", $form_state['values']['rid']);
         if ($priority > 0 || $priority < 0) {
           xmlsitemap_update_sitemap();
         }
       }
-      elseif ($form_values['xmlsitemap_user_role_priority'] != $priority) {
-        db_query("UPDATE {xmlsitemap_user_role} SET priority = %f WHERE rid = %d", $form_values['xmlsitemap_user_role_priority'], $form_values['rid']);
+      elseif ($form_state['values']['xmlsitemap_user_role_priority'] != $priority) {
+        db_query("UPDATE {xmlsitemap_user_role} SET priority = %f WHERE rid = %d", $form_state['values']['xmlsitemap_user_role_priority'], $form_state['values']['rid']);
         xmlsitemap_update_sitemap();
       }
       break;
@@ -192,7 +192,7 @@ function xmlsitemap_user_user($op, &$edi
       }
       return $form;
     case 'insert':
-      $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "user/$account->uid"));
+      $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "user/". $account->uid));
       $pid = empty($pid) ? 'NULL' : $pid;
       if (isset($edit['xmlsitemap_user_priority'])) {
         $priority = $edit['xmlsitemap_user_priority'];
@@ -208,7 +208,7 @@ function xmlsitemap_user_user($op, &$edi
       xmlsitemap_update_sitemap();
       break;
     case 'update':
-      $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "user/$account->uid"));
+      $pid = db_result(db_query("SELECT pid FROM {url_alias} WHERE src = '%s'", "user/". $account->uid));
       $pid = empty($pid) ? 'NULL' : $pid;
       if (isset($edit['xmlsitemap_user_priority'])) {
         $priority = $edit['xmlsitemap_user_priority'];
