Happy New Year
[squirrelmail.git] / plugins / calendar / calendar.php
index 6fade9858c1d8805f6595b1c58b110fd4359e0fe..d7147dd5690f474099873e62de90971759e77af3 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Displays the main calendar page (month view).
  *
- * @copyright 2002-2016 The SquirrelMail Project Team
+ * @copyright 2002-2021 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -110,10 +110,10 @@ function drawmonthview() {
             }
             if (isset($calendardata[$cdate])){
                 $i=0;
-                while ($calfoo = each($calendardata[$cdate])) {
-                    $calbar = $calendardata[$cdate][$calfoo['key']];
+                foreach ($calendardata[$cdate] as $key => $value) {
+                    $calbar = $calendardata[$cdate][$key];
                     // FIXME: how to display multiline task
-                    $title = '['. $calfoo['key']. '] ' .
+                    $title = '['. $key. '] ' .
                         str_replace(array("\r","\n"),array(' ',' '),sm_encode_html_special_chars($calbar['message']));
                     // FIXME: link to nowhere
                     echo "<a href=\"#\" style=\"text-decoration:none; color: "