Index: notifications.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/notifications/notifications.admin.inc,v
retrieving revision 1.5.2.15
diff -u -p -r1.5.2.15 notifications.admin.inc
--- notifications.admin.inc	13 Nov 2008 21:01:20 -0000	1.5.2.15
+++ notifications.admin.inc	5 Jun 2009 21:05:27 -0000
@@ -182,7 +182,7 @@ function notifications_send_intervals_fo
       }
       
     }
-    ksort($intervals);
+    uksort($intervals, '_notification_send_intervals_sort');
     variable_set('notifications_send_intervals', $intervals);
     variable_set('notifications_digest_methods', $digest);
   }
@@ -190,6 +190,21 @@ function notifications_send_intervals_fo
 }
 
 /**
+ * Sort by notification interval, but put negative intervals (which mean
+ * "never") at the end.
+ */
+function _notification_send_intervals_sort($a, $b) {
+  if (($a >= 0 && $b >= 0)  || ($a < 0 && $b < 0)) {
+    // Peform normal sorting.
+    return $a < $b ? -1 : ($a > $b ? 1 : 0);
+  }
+  else {
+    // Force negative numbers to come after positive ones.
+    return $a < 0 ? 1 : -1;
+  }
+}
+
+/**
  * Build a table with send intervals
  */
 function theme_notifications_send_intervals($element) {
@@ -690,4 +705,4 @@ function notifications_form_unsubscribe_
       break;
   }
   return 'user/'. $subscription->uid .'/notifications';   
-}
\ No newline at end of file
+}
Index: notifications.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/notifications/notifications.module,v
retrieving revision 1.6.2.26
diff -u -p -r1.6.2.26 notifications.module
--- notifications.module	2 May 2009 13:56:29 -0000	1.6.2.26
+++ notifications.module	5 Jun 2009 21:05:27 -0000
@@ -1008,12 +1008,12 @@ function notifications_notifications($op
 function _notifications_send_intervals() {
   return variable_get('notifications_send_intervals',
     array(
-      -1 => t('Never'),
       0 => t('Immediately'),
       3600 => t('Every hour'),
       43200 => t('Twice a day'),
       86400 => t('Daily'),
       604800 => t('Weekly'),      
+      -1 => t('Never'),
     )
   );
 }
@@ -1162,4 +1162,4 @@ if (!function_exists('array_diff_key')) 
     }
     return $result;
   }
-}
\ No newline at end of file
+}
