Better support for malformed/absent dates and headerlines ending in only "\n".
[squirrelmail.git] / plugins / calendar / calendar.php
index a0fcc4e9335cb4bd5768303aae455ea7c9f1386c..edfacbef8de6a29f21b76c281ca77c112489770d 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * calendar.php
  *
- * Copyright (c) 2002 The SquirrelMail Project Team
+ * Copyright (c) 2002-2004 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Originally contrubuted by Michal Szczotka <michal@tuxy.org>
  * Displays the main calendar page (month view).
  *
  * $Id$
+ * @package plugins
+ * @subpackage calendar
  */
+
+/**
+*/
 define('SM_PATH','../../');
 
 /* Calender plugin required files. */
@@ -116,7 +121,8 @@ function drawmonthview() {
                 $i=0;
                 while ($calfoo = each($calendardata[$cdate])) {
                     $calbar = $calendardata[$cdate][$calfoo['key']];
-                    echo ($calbar['priority']==1) ? "<FONT COLOR=\"$color[1]\">$calbar[title]</FONT><br>\n" : "$calbar[title]<br>\n";
+                    $title = '['. $calfoo['key']. '] ' .$calbar['message'];
+                    echo ($calbar['priority']==1) ? "<a href=\"#\" style=\"text-decoration:none; color: $color[1]\" title=\"$title\">$calbar[title]</a><br>\n" : "<a href=\"#\" style=\"text-decoration:none; color: $color[6]\" title=\"$title\">$calbar[title]</a><br>\n";
                     $i=$i+1;
                     if($i==2){
                         break;