--- 4.7.x-1.2/subscriptions.module	2007-02-02 17:13:00.000000000 -0500
+++ dkg-revision/subscriptions.module	2007-02-27 23:12:27.000000000 -0500
@@ -35,7 +35,7 @@
         <p>"<b>Display watchdog entries for successful mailings</b>" should also probably be disabled for high volume sites,
         as a large number of mailings could completely fill the log.</p>
         <p>"<b>Test held posts prior to sending</b>" tells Subscriptions to test if a node or comment
-        is still active\published prior toi sending a notification.  This is mainly to avoid sending
+        is still active/published prior to sending a notification.  This is mainly to avoid sending
         notifications for for posts that have been deleted.  This will result in a small performance
         hit, and only makes sense if you are delaying the notifications with "Use cron for notifications".</p>
         <p>"<b>Show Subscriptions users menu on main menu</b>" tells Subscriptions to display the
@@ -44,10 +44,9 @@
         <p>"<b>Show Subscriptions users menu under \'my account\'</b>" tells Subscriptions to display the
         Subscriptions user menu, used to manage one\'s own subscriptions, under the \'My Account\' menu.  The default
         setting is ON.</p>
-        <p>"<b>Set all users to \'autosubscribe\' by default</b>" set\'s the default value of the \'autosubscribe\'
-        option in each user\'s account to ON.  This value will not be set, however, until the user saves their
-        account preferences.  This, essentially, pre-checks the option associated with \'autosubscribe\'. The
-        default value is OFF.</p>
+        <p>"<b>Set all users to \'autosubscribe\' by default</b>" sets the default value of the \'autosubscribe\'
+        option in each user\'s account to ON.  This essentially, pre-checks the option associated 
+        with \'autosubscribe\'. The default value is OFF.</p>
 
         ');
     case 'admin/modules#description':
@@ -449,8 +448,10 @@
  */
 function subscriptions_autosubscribe($uid, $nid) {
   global $user;
+  // FIXME: this should probably check for the presence of the 'manage subscriptions' permission.
   // if user has auto subscribe enabled
-  if ($user->subscriptions_auto) {
+  if ((isset($user->subscriptions_auto) && $user->subscriptions_auto) ||
+      (!isset($user->subscriptions_auto) && variable_get('subscriptions_autoset', 0))) {
     // check to see if already subscribed
     $result = db_query('SELECT sid FROM {subscriptions} WHERE sid = %d AND stype = \'node\' AND uid = %d', $nid, $uid);
     if (!db_num_rows($result)) {
@@ -739,7 +740,10 @@
 function subscriptions_form_alter($form_id, &$form) {
   global $user;
   $node = $form['#node'];
-  if ($user->uid && !$user->subscriptions_auto
+  // FIXME: this should probably test that the user has the "maintain
+  // subscriptions" privilege before offering the choice to subscribe:
+  if ($user->uid && ((isset($user->subscriptions_auto) && !$user->subscriptions_auto) 
+		     || (!isset($user->subscriptions_auto) && !variable_get('subscriptions_autoset', 0)))
       && isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id
       && $form['#node']->comment == COMMENT_NODE_READ_WRITE) {
 		$form['subscriptions'] = array(
@@ -1237,3 +1241,129 @@
   // $channel['description'] = ;
   node_feed($result, $channel);
 }
