Index: rsvp.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/rsvp.admin.inc,v
retrieving revision 1.3.2.9
diff -u -p -r1.3.2.9 rsvp.admin.inc
--- rsvp.admin.inc	23 Dec 2009 23:07:00 -0000	1.3.2.9
+++ rsvp.admin.inc	5 Nov 2010 06:04:48 -0000
@@ -279,6 +279,7 @@ function rsvp_admin_settings_default(&$f
   $form['rsvp_field_2']['text_yes'] = rsvp_form_element_text_yes($rsvp);
   $form['rsvp_field_2']['text_no'] = rsvp_form_element_text_no($rsvp);
   $form['rsvp_field_2']['text_maybe'] = rsvp_form_element_text_maybe($rsvp);
+  $form['rsvp_field_2']['show_empty_statuses'] = rsvp_form_element_show_empty_statuses($rsvp);
   
   
   $form['rsvp_field_3'] = array(
@@ -337,6 +338,7 @@ function rsvp_admin_settings_default_sub
   _rsvp_function_setbit($option_enabled, RSVP_OPTION_SEND_PRIVATEMSG, $form_state['values']['send_privatemsg']);
   _rsvp_function_setbit($option_enabled, RSVP_OPTION_SEND_CONF_OWNER, $form_state['values']['send_conf_owner']);
   _rsvp_function_setbit($option_enabled, RSVP_OPTION_SEND_CONF_GUEST, $form_state['values']['send_conf_guest']);
+  _rsvp_function_setbit($option_enabled, RSVP_OPTION_SHOW_EMPTY_STATUSES, $form_state['values']['show_empty_statuses']);
     
   variable_set('rsvp_default_option_enabled', $option_enabled);
   
Index: rsvp.form.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/rsvp.form.inc,v
retrieving revision 1.3.2.7
diff -u -p -r1.3.2.7 rsvp.form.inc
--- rsvp.form.inc	5 Nov 2009 22:36:47 -0000	1.3.2.7
+++ rsvp.form.inc	5 Nov 2010 06:04:50 -0000
@@ -682,6 +682,34 @@ function rsvp_form_element_reply_enddate
 
 }  
 
+/**
+ * 
+ *
+ * @ingroup rsvp_form
+ * @param $rsvp The rsvp instance to display.
+ *  
+ * @return $form array.
+ */
+function rsvp_form_element_show_empty_statuses_option($rsvp, $field_attr = array()) {
+  return array_merge($field_attr, rsvp_form_element_show_empty_statuses($rsvp, $field_attr));
+}
+
+/**
+ * 
+ *
+ * @ingroup rsvp_form
+ * @param $rsvp The rsvp instance to display.
+ *  
+ * @return $form array.
+ */
+function rsvp_form_element_show_empty_statuses($rsvp, $field_attr = array()) {
+  return array_merge($field_attr, array(
+    '#type' => 'checkbox',
+    '#title' => t('Show empty statuses'),
+    '#default_value' => (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_SHOW_EMPTY_STATUSES) == RSVP_OPTION_YES) ? 1 : 0,
+    '#description' => t(''),
+  ));
+}
 
 /**
  * AJAX callback to replace the stylesheet select options.
Index: rsvp.functions.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/rsvp.functions.inc,v
retrieving revision 1.3.2.17
diff -u -p -r1.3.2.17 rsvp.functions.inc
--- rsvp.functions.inc	29 Mar 2010 20:02:52 -0000	1.3.2.17
+++ rsvp.functions.inc	5 Nov 2010 06:04:53 -0000
@@ -153,6 +153,7 @@ define('RSVP_OPTION_REPLY_ENDDATE_ENABLE
 define('RSVP_OPTION_SEND_PRIVATEMSG',          0x00000010); //Send emails by privatemsg for registered users.
 define('RSVP_OPTION_SEND_CONF_OWNER',          0x00000020); //Send confirmation emails to owner when guest replies.
 define('RSVP_OPTION_SEND_CONF_GUEST',          0x00000040); //Send confirmation emails to guest when he replies.
+define('RSVP_OPTION_SHOW_EMPTY_STATUSES',      0x00000100); //Show empty statuses.
 
 
 /**
@@ -1742,6 +1743,21 @@ function rsvp_function_is_replypermitted
 }
 
 /**
+ * Verifies whether to show empty statuses.
+ * @ingroup rsvp_functions
+ *  
+ * @param $rsvp The rsvp object or NULL.
+ * @return TRUE or FALSE. 
+ */
+function rsvp_function_is_showemptystatuses($rsvp) {
+  if (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_SHOW_EMPTY_STATUSES) == RSVP_OPTION_YES) {
+    return TRUE;
+  }
+  
+  return FALSE;
+}
+
+/**
  * Verifies if a user (by role) is entitled to view an invitation or not.
  *
  * @ingroup rsvp_functions
Index: rsvp.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/rsvp.module,v
retrieving revision 1.22.2.43
diff -u -p -r1.22.2.43 rsvp.module
--- rsvp.module	17 Mar 2010 17:58:14 -0000	1.22.2.43
+++ rsvp.module	5 Nov 2010 06:04:59 -0000
@@ -1751,6 +1751,7 @@ function rsvp_show_guestlist($rsvp, $inv
 
     $show_header = true;
     $show_whoiscoming = true;
+    $show_empty_statuses = (_rsvp_function_checkbit($rsvp->option_enabled, RSVP_OPTION_SHOW_EMPTY_STATUSES) == RSVP_OPTION_YES);
 
     $guestlist = array();
     if ($are_responses_visible == true) {
@@ -1883,7 +1884,7 @@ function rsvp_show_guestlist($rsvp, $inv
       foreach($guestlist as $type => $values) {
         $section_guests = count($values['guests']);
         //show section only if there are at least guests in to begin with.
-        if ($section_guests > 0) {
+        if ($show_empty_statuses || $section_guests > 0) {
 
           if ($show_part == true) {
             if ($totalguests < $max_guests) {
@@ -1919,7 +1920,7 @@ function rsvp_show_guestlist($rsvp, $inv
       $guestlistarray = array();
       foreach($guestlist as $type => $values) {
         $section_guests = $values['count'];
-        if ($section_guests > 0) {
+        if ($show_empty_statuses || $section_guests > 0) {
           $guestlistarray[$type] = $values;
         }
       }
@@ -3233,6 +3234,7 @@ function rsvp_addedit_form(&$form_state,
     $form['rsvp_addedit_form']['rsvp_field_2']['text_yes'] = rsvp_form_element_text_yes($rsvp, $inside_fieldset);
     $form['rsvp_addedit_form']['rsvp_field_2']['text_no'] = rsvp_form_element_text_no($rsvp, $inside_fieldset);
     $form['rsvp_addedit_form']['rsvp_field_2']['text_maybe'] = rsvp_form_element_text_maybe($rsvp, $inside_fieldset);
+    $form['rsvp_addedit_form']['rsvp_field_2']['show_empty_statuses'] = rsvp_form_element_show_empty_statuses($rsvp, $inside_fieldset);
   
   
     $form['rsvp_addedit_form']['rsvp_field_3'] = array(
@@ -3410,6 +3412,8 @@ function rsvp_addedit_form_submit($form,
     if (isset($form_state['values']['send_conf_guest']))
       _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_SEND_CONF_GUEST, $form_state['values']['send_conf_guest']);
     
+    if (isset($form_state['values']['show_empty_statuses']))
+      _rsvp_function_setbit($rsvp->option_enabled, RSVP_OPTION_SHOW_EMPTY_STATUSES, $form_state['values']['show_empty_statuses']);
     
     foreach (array('name', 'nid', 'startdate', 'theme', 'stylesheet', 'iconset', 'backgroundimage', 'image', 
                    'response_blind', 'response_blind_node', 'reply_blind_node', 'attendees_visible', 'list_email', 
Index: themes/default/rsvp-guestlist-block.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/themes/default/rsvp-guestlist-block.tpl.php,v
retrieving revision 1.2.2.3
diff -u -p -r1.2.2.3 rsvp-guestlist-block.tpl.php
--- themes/default/rsvp-guestlist-block.tpl.php	5 Nov 2009 22:36:47 -0000	1.2.2.3
+++ themes/default/rsvp-guestlist-block.tpl.php	5 Nov 2010 06:04:59 -0000
@@ -88,15 +88,17 @@
           </div>
         </div>
   
-        <div class="rsvp_guestlist_block_answer_block_content <?php print "rsvp_guestlist_block_answer_block_content_$type" ?>">
-          <ul>
-            <?php foreach ($typearray['guests'] as $guest) { ?>
-              <li>
-                <?php print $guest['username'] ?>
-              </li>
-            <?php } ?>
-          </ul>
-        </div>
+        <?php if (!empty($typearray['guests'])): ?>
+          <div class="rsvp_guestlist_block_answer_block_content <?php print "rsvp_guestlist_block_answer_block_content_$type" ?>">
+            <ul>
+              <?php foreach ($typearray['guests'] as $guest) { ?>
+                <li>
+                  <?php print $guest['username'] ?>
+                </li>
+              <?php } ?>
+            </ul>
+          </div>
+        <?php endif; ?>
       <?php } ?>
     </div>
   </div>
Index: themes/default/rsvp-guestlist.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rsvp/themes/default/rsvp-guestlist.tpl.php,v
retrieving revision 1.2.2.6
diff -u -p -r1.2.2.6 rsvp-guestlist.tpl.php
--- themes/default/rsvp-guestlist.tpl.php	5 Nov 2009 22:36:47 -0000	1.2.2.6
+++ themes/default/rsvp-guestlist.tpl.php	5 Nov 2010 06:05:00 -0000
@@ -93,59 +93,61 @@
             </div>
           </div>
 
-          <div class="rsvp_form_content rsvp_guestlist_answer_block_content rsvp_color_inner <?php print "rsvp_guestlist_answer_block_content_$type" ?>">
-            <ul>
-              <?php foreach ($typearray['guests'] as $guest) { ?>
-                <li>
-                  <?php if ($guest['is_currentuser']) {
-                          $active = theme('image', $icon_path . 'current.gif', t('Active user'), t('Active user'), array('width' => 17, 'height' => 17));
-                          if ($guest['is_guest']) {
-                            $active = l($active, 'rsvp/email/'. $guest['userhash'] .'/realname', array('html' => true, 'attributes' => array('title' => t('Change your name that is being displayed in the guest list.'))));
+          <?php if (!empty($typearray['guests'])): ?>
+            <div class="rsvp_form_content rsvp_guestlist_answer_block_content rsvp_color_inner <?php print "rsvp_guestlist_answer_block_content_$type" ?>">
+              <ul>
+                <?php foreach ($typearray['guests'] as $guest) { ?>
+                  <li>
+                    <?php if ($guest['is_currentuser']) {
+                            $active = theme('image', $icon_path . 'current.gif', t('Active user'), t('Active user'), array('width' => 17, 'height' => 17));
+                            if ($guest['is_guest']) {
+                              $active = l($active, 'rsvp/email/'. $guest['userhash'] .'/realname', array('html' => true, 'attributes' => array('title' => t('Change your name that is being displayed in the guest list.'))));
+                            }
+                            print $active;  
+                          } 
+                    ?>
+                    <?php if ($guest['user_link']) {
+                            print $guest['user_link'];
                           }
-                          print $active;  
-                        } 
-                  ?>
-                  <?php if ($guest['user_link']) {
-                          print $guest['user_link'];
-                        }
-                        else {
-                          print $guest['username'];
-                        } 
-                  ?>
-                  <?php if ($guest['is_host']) : ?>
-                          <b><?php print t('(The organizer)  ') ?></b>
-                  <?php endif; ?>
-
-                  <?php if ($guest['is_viral']) : ?>
-                    <?php print theme('image', $icon_path . 'viral.gif', t('Invited by a guest'), t('Invited by a guest'), array('width' => 17, 'height' => 17)) ?>
-                  <?php endif; ?>
-
-                  <?php if ($guest['is_opensignup']) : ?>
-                    <?php print theme('image', $icon_path . 'openinvitation.gif', t('Self registration'), t('Open invitation'), array('width' => 17, 'height' => 17)) ?>
-                  <?php endif; ?>
-
-                  <?php if ($is_moderator) : ?>
-                    <?php print l(theme('image', $icon_path . 'view.gif', 'view', '', array('width' => 17, 'height' => 17)), 'rsvp/email/'. $guest['userhash'] .'/view', array('html' => true, 'attributes' => array('title' => t('View invitation like the guest would see it.')))) ?>
-                    <?php print l(theme('image', $icon_path . 'profile.gif', 'status', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/attendees/status/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('View status of invitation')))) ?>
-                    <?php print l(theme('image', $icon_path . 'delete.gif', 'remove', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/attendees/remove/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('Remove attendee from invitation list')))) ?>
-                    <?php print l(theme('image', $icon_path . 'message.gif', 'send message', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/message/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('Send message to guest')))) ?>
-                    <?php print l(theme('image', $icon_path . 'invitation.gif', 'send invitation', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/attendees/send/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('Send invitation message to guest')))) ?>
-                    <?php print $guest['lastaccess'] ?>              
-                  <?php endif; ?>
+                          else {
+                            print $guest['username'];
+                          } 
+                    ?>
+                    <?php if ($guest['is_host']) : ?>
+                            <b><?php print t('(The organizer)  ') ?></b>
+                    <?php endif; ?>
+
+                    <?php if ($guest['is_viral']) : ?>
+                      <?php print theme('image', $icon_path . 'viral.gif', t('Invited by a guest'), t('Invited by a guest'), array('width' => 17, 'height' => 17)) ?>
+                    <?php endif; ?>
+
+                    <?php if ($guest['is_opensignup']) : ?>
+                      <?php print theme('image', $icon_path . 'openinvitation.gif', t('Self registration'), t('Open invitation'), array('width' => 17, 'height' => 17)) ?>
+                    <?php endif; ?>
+
+                    <?php if ($is_moderator) : ?>
+                      <?php print l(theme('image', $icon_path . 'view.gif', 'view', '', array('width' => 17, 'height' => 17)), 'rsvp/email/'. $guest['userhash'] .'/view', array('html' => true, 'attributes' => array('title' => t('View invitation like the guest would see it.')))) ?>
+                      <?php print l(theme('image', $icon_path . 'profile.gif', 'status', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/attendees/status/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('View status of invitation')))) ?>
+                      <?php print l(theme('image', $icon_path . 'delete.gif', 'remove', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/attendees/remove/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('Remove attendee from invitation list')))) ?>
+                      <?php print l(theme('image', $icon_path . 'message.gif', 'send message', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/message/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('Send message to guest')))) ?>
+                      <?php print l(theme('image', $icon_path . 'invitation.gif', 'send invitation', '', array('width' => 17, 'height' => 17)), 'rsvp/' . $rid . '/attendees/send/'. $guest['userhash'], array('html' => true, 'attributes' => array('title' => t('Send invitation message to guest')))) ?>
+                      <?php print $guest['lastaccess'] ?>              
+                    <?php endif; ?>
                           
-                  <?php if ($typearray['show_comment']) : ?>
-                    <br /><?php print $guest['usercomment'] ?>
-                  <?php endif; ?>
-
-                </li>
-              <?php } ?>
-              <?php if ($typearray['cut_off']) : ?>
-                <li>
-                . . . .
-                </li>
-              <?php endif; ?>
-            </ul>
-          </div>
+                    <?php if ($typearray['show_comment']) : ?>
+                      <br /><?php print $guest['usercomment'] ?>
+                    <?php endif; ?>
+
+                  </li>
+                <?php } ?>
+                <?php if ($typearray['cut_off']) : ?>
+                  <li>
+                  . . . .
+                  </li>
+                <?php endif; ?>
+              </ul>
+            </div>
+          <?php endif; ?>
         <?php } ?>
       </div>
 
