Hi,

        I have got 3 patches against the trunk of mod_mbox:

* mod_mbox.c.patch:
  A directive like 'MboxAntiSpam Off' was ever picked up, cause it was
  initially set to 1 and could never be overwritten, I used the code
  from the mod_mime module to get the expected behavior
* archives.js.patch:
  The non-AJAX had a footer, so I thought, it's better to have it in the
  AJAX one as well
* styles.css.patch:
  Have footer layout to be the same as the header layout of the table

Best regards,
/Rick
-- 
http://rickvanderzwet.nl
Index: archives.js
===================================================================
--- archives.js (revision 595428)
+++ archives.js (working copy)
@@ -131,15 +131,15 @@
   return short_months[num-1];
 }
 
-/* Returns the message list table header, including page selector and
+/* Returns the message list table header or footer, including page selector and
  * sort links */
-function getMsgListHeader ()
+function getMsgListNav (location)
 {
   /* Fetch current page and page count */
   var current_page = parseInt(_msglist.getAttribute('page'));
   var pages = parseInt(_msglist.getAttribute('pages'));
 
-  var str = '<thead><tr><th class="title"><a href="' + _sort + '?' + _page +
+  var str = '<' + location + '><tr><th class="title"><a href="' + _sort + '?' 
+ _page +
     '" title="Switch to flat view">Message list</a></th>';
 
   /* Page selector */
@@ -194,11 +194,25 @@
       ' &middot; Date';
   }
 
-  str += '</th></tr></thead>';
+  str += '</th></tr></' + location + '>';
 
   return str;
 }
 
+/* Returns the message list table header, including page selector and
+ * sort links */
+function getMsgListHeader()
+{
+    return getMsgListNav('thead');
+}
+
+/* Returns the message list table footer, including page selector and
+ * sort links */
+function getMsgListFooter()
+{
+    return getMsgListNav('tfoot');
+}
+
 /* Returns a table-formatted message list entry */
 function buildMessageListEntry (msg, msg_num)
 {
@@ -271,6 +285,7 @@
   }
 
   str += '</tbody>';
+  str += getMsgListFooter ();
   msglist.innerHTML = str;
 
   if (document.getElementById('msglist')) {
@@ -496,7 +511,9 @@
     }
   }
 
-  str += '</tbody></table>';
+  str += '</tbody>';
+  str += getMsgListFooter();
+  str += '</table>';
   msglist.innerHTML = str;
   body.appendChild(msglist);
   document.getElementById('msg-' + msg_num).setAttribute('class', 'msgactive');

Index: style.css
===================================================================
--- style.css   (revision 595428)
+++ style.css   (working copy)
@@ -155,9 +155,12 @@
   width: 82%;
 }
 
-table#msglist thead th.title { text-align: left; white-space: nowrap; }
-table#msglist thead th.pages { text-align: right; }
-table#msglist thead th.sort  { text-align: right; padding-right: 0.3em;
+table#msglist thead th.title,
+table#msglist tfoot th.title { text-align: left; white-space: nowrap; }
+table#msglist thead th.pages,
+table#msglist tfoot th.pages { text-align: right; }
+table#msglist thead th.sort,
+table#msglist tfoot th.sort  { text-align: right; padding-right: 0.3em;
                                white-space: nowrap; }
 
 table#msglist tr td.author  { background: #ddd; width: 20%; }

Index: mod_mbox.c
===================================================================
--- mod_mbox.c  (revision 592049)
+++ mod_mbox.c  (working copy)
@@ -56,8 +56,8 @@
     conf = apr_pcalloc(p, sizeof(mbox_dir_cfg_t));
 
     conf->enabled = 0;
-    conf->hide_empty = 1;
-    conf->antispam = 1;
+    conf->hide_empty = 2;
+    conf->antispam = 2;
     conf->root_path = NULL;
     conf->search_path = NULL;
     conf->style_path = NULL;
@@ -83,16 +83,16 @@
     }
 
     /* Update 'hide_empty' */
-    if (merge->hide_empty == 1) {
-        to->hide_empty = 1;
+    if ((merge->hide_empty & 2) == 0) {
+        to->hide_empty = merge->hide_empty;
     }
     else {
         to->hide_empty = from->hide_empty;
     }
 
     /* Update 'antispam' */
-    if (merge->antispam == 1) {
-        to->antispam = 1;
+    if ((merge->antispam & 2) == 0) {
+        to->antispam = merge->antispam;;
     }
     else {
         to->antispam = from->antispam;

Reply via email to