[m-dev.] diff: fix w3 mailing list problem

Peter Ross petdr at cs.mu.OZ.AU
Thu Dec 2 13:19:37 AEDT 1999


Hi,


===================================================================


Estimated hours taken: 0.25

mailing-lists/include/list.inc:
    If the current month doesn't have any email messages, don't output a
    link to it.


Index: mailing-lists/include/list.inc
===================================================================
RCS file: /home/staff/zs/imp/w3/mailing-lists/include/list.inc,v
retrieving revision 1.2
diff -u -r1.2 list.inc
--- list.inc	1998/09/16 23:14:54	1.2
+++ list.inc	1999/12/02 01:52:20
@@ -12,7 +12,15 @@
 
 $yrmo=sprintf("%02d%02d", $current_year, $current_month);
 $dir="$list.$yrmo/index.html";
-echo "<A HREF=\"$dir\">Current Month</A>";
+
+if (file_exists($dir))
+{
+    echo "<A HREF=\"$dir\">Current Month</A>";
+}
+else
+{
+    echo "Current Month (no mail messages)";
+}
 
 while ($yr >= $year)
 {

----
 +----------------------------------------------------------------------+
 | Peter Ross      M Sci/Eng Melbourne Uni                              |
 | petdr at cs.mu.oz.au  WWW: www.cs.mu.oz.au/~petdr/ ph: +61 3 9344 9158  |
 +----------------------------------------------------------------------+
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list