using temporary array for sorting. linking with =& does not work
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 21 Oct 2003 10:47:00 +0000 (10:47 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 21 Oct 2003 10:47:00 +0000 (10:47 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5991 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/calendar/calendar_data.php

index 1f70258..053d489 100644 (file)
@@ -41,10 +41,12 @@ function readcalendardata() {
             }
             fclose ($fp);
             // this is to sort the events within a day on starttime
-            foreach($calendardata as $day => $data) {
+            $new_calendardata = array();
+           foreach($calendardata as $day => $data) {
                 ksort($data, SORT_NUMERIC);
-                $calendardata[$day] = $data;
+                $new_calendardata[$day] = $data;
             }
+           $calendardata = $new_calendardata;
         }
     }
 }