Index: navigate/navigate.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/navigate/navigate.module,v
retrieving revision 1.7
diff -u -p -r1.7 navigate.module
--- navigate/navigate.module	6 Nov 2008 01:46:43 -0000	1.7
+++ navigate/navigate.module	7 Nov 2008 06:36:34 -0000
@@ -31,14 +31,14 @@ function navigate_menu() {
     'callback' => 'navigate_process',
     'access' => user_access('navigate view'),
     'type' => MENU_CALLBACK,
-  ); 
+  );
   $items[]= array(
     'path' => 'navigate/clear',
     'callback' => 'navigate_clear_user_cache_and_back',
     'access' => user_access('navigate view'),
     'type' => MENU_CALLBACK,
-  ); 
-  
+  );
+
   return $items;
 }
 
@@ -62,7 +62,7 @@ function navigate_init() {
  * Render help page
  */
 function navigate_help_page() {
-  
+
 
 }
 
@@ -130,7 +130,7 @@ function navigate_admin_settings() {
     '#type' => 'textarea',
     '#rows' => '7',
     '#default_value' => variable_get('navigate_help_text', navigate_HELP_TEXT),
-  );  
+  );
   return $settings;
 }
 
@@ -139,27 +139,27 @@ function navigate_admin_settings() {
  * Implementation of hook_footer()
  */
 function navigate_footer() {
-  
+
   if (user_access('navigate view')) {
     // Build navigate
     $output = navigate_build();
     $on = navigate_variable_get('on');
-    
+
     // Default to on
     if ($on == '') {
       $on = 0;
     }
-    
+
     // If off, set navigate outside of the current view
     if ($on == 0) {
       $style = 'body { padding-left:0px;} .navigate { margin-left:-550px;} #navigate-switch { margin-left:-230px; margin-top:-30px;} .navigate-loading { margin-left:-550px;}';
-      
+
     // If on, add some padding to the body
     }
     else {
       $style = 'body { padding-left:210px;}';
     }
-    
+
     // Theme navigate
     $output = theme('navigate_outer', $output, $hidden);
     $output .= '
@@ -168,8 +168,8 @@ function navigate_footer() {
       <style>'. $style .'</style>
       <script>var navigate_on = '. $on .';</script>';
   }
-  
-  navigate_acknowledgetment(&$output);
+
+  navigate_acknowledgement($output);
   return $output;
 }
 
@@ -177,11 +177,11 @@ function navigate_footer() {
 /**
  * Add acknowledgement
  */
-function navigate_acknowledgetment(&$output) {
+function navigate_acknowledgement(&$output) {
   return $output;
 
    /*
-    
+
   $last = variable_get('navigate_last', '0');
   //if (time() - $last > 60*60*24*14) {
     if (variable_get('navigate_ackowledgement', '') == '') {
@@ -249,7 +249,7 @@ function navigate_process() {
     case 'widget_delete':
       navigate_widget_delete();
       break;
-    
+
     default:
       if (module_exists($_POST['module'])) {
         $function = $_POST['module'] .'_navigate_widget_process';
@@ -271,7 +271,7 @@ function navigate_clear_user_cache() {
  * Clears the cache table
  */
 function navigate_clear_cache() {
-  db_query("TRUNCATE TABLE {navigate_cache}");  
+  db_query("TRUNCATE TABLE {navigate_cache}");
 }
 
 
@@ -317,7 +317,7 @@ function navigate_widget_sort() {
 function navigate_widget_add($output=TRUE, $type='', $module='') {
   global $user;
   $wid = db_next_id('{navigate_widgets}_wid');
-  
+
   if ($type == '') {
     $type = $_POST['type'];
   }
@@ -330,7 +330,7 @@ function navigate_widget_add($output=TRU
   // Get next weight
   $weight = db_result(db_query_range("SELECT weight FROM {navigate_widgets} WHERE uid = '%d' ORDER BY weight DESC", $user->uid, 0, 1));
   $weight++;
-  
+
   db_query("INSERT INTO {navigate_widgets} SET wid = '%d', uid = '%d', type = '%s', module='%s', weight='%d'", $wid, $user->uid, $type, $module, $weight);
   if ($output) {
     $row = db_fetch_array(db_query("SELECT * FROM {navigate_widgets} WHERE wid = '%d'", $wid));
@@ -424,7 +424,7 @@ function navigate_variable_get($name, $w
  */
 function navigate_build() {
   global $user;
-  
+
   // Return from cache if cache is not disabled
   if (NAVIGATE_DISABLE_CACHE != 1) {
     $result = db_query("SELECT * FROM {navigate_cache} WHERE uid = '%d'", $user->uid);
@@ -432,19 +432,19 @@ function navigate_build() {
       return trim($row['content']);
     }
   }
-  
+
   // Build default widget set, if there are no widgets
   $count = db_result(db_query("SELECT COUNT(wid) FROM {navigate_widgets} WHERE uid = '%d'", $user->uid));
   if ($count < 1) {
     navigate_add_default_widgets();
   }
-  
+
   // Build widgets
   $result = db_query("SELECT * FROM {navigate_widgets} WHERE uid = '%d' ORDER BY weight ASC", $user->uid);
   while ($row = db_fetch_array($result)) {
     $output .= navigate_output_widget($row);
   }
-  
+
   // Clear cache button
    $settings = array(
     'help' => 'Click this to clear the cache',
@@ -453,14 +453,14 @@ function navigate_build() {
   );
   $help = navigate_help_helper($settings);
   $content['cache_button'] = '<div class="navigate-clear-cache'. $help['class'] .'"'. $help['rel'] .'></div>'. $help['output'];
-  
+
   $output = theme('navigate_all_widgets', $output);
   //$output .= navigate_help_helper(NULL, TRUE);
   $content['navigate'] = $output;
-  
+
   $output = theme('navigate', $content);
   navigate_cache_save($output);
-  
+
   return $output;
 }
 
@@ -531,7 +531,7 @@ function navigate_add_widget_link($conte
  * Theme the navigate bar
  */
 function theme_navigate($content) {
-  
+
   //$title_help =navigate_help_helper(array('help' => t('Double-click this title to hide parts of widgets you might not need all the time.'), 'class' => 'navigate-title'));
   $help = navigate_help_helper('<p><strong>'. t('Add / Remove Widgets') .'</strong></p><p>'. t('Click this to display a list of widgets to add. When clicked, this will also add close buttons to visible widgets.') .'</p>');
   $output = '
@@ -630,7 +630,7 @@ function navigate_button($button_setting
     }
   }
   $settings = navigate_widget_settings_get($button_settings['wid']);
-  
+
   // If the setting hasn't set before, set it to the default
   if (is_null($settings[$button_settings['name']]) && $button_settings['default'] != '') {
     $settings = array(
@@ -641,7 +641,7 @@ function navigate_button($button_setting
     navigate_variable_set($settings);
     $settings = navigate_widget_settings_get($button_settings['wid'], TRUE);
   }
-  
+
   if ($settings[$button_settings['name']] == $button_settings['on']) {
     $on_class = ' navigate-button-on ';
   }
