MDL-59750 core_calendar: fix minithree logic on get_view
authorSimey Lameze <simey@moodle.com>
Wed, 20 Sep 2017 05:25:19 +0000 (13:25 +0800)
committerSimey Lameze <simey@moodle.com>
Wed, 20 Sep 2017 05:25:19 +0000 (13:25 +0800)
calendar/lib.php

index d655734..d511497 100644 (file)
@@ -3095,9 +3095,9 @@ function calendar_get_view(\calendar_information $calendar, $view, $includenavig
     ];
 
     $data = [];
     ];
 
     $data = [];
-    if ($view == "month" || $view == "mini") {
+    if ($view == "month" || $view == "mini" || $view == "minithree") {
         $month = new \core_calendar\external\month_exporter($calendar, $type, $related);
         $month = new \core_calendar\external\month_exporter($calendar, $type, $related);
-       $month->set_includenavigation($includenavigation);
+        $month->set_includenavigation($includenavigation);
         $data = $month->export($renderer);
     } else if ($view == "day") {
         $daydata = $type->timestamp_to_date_array($tstart);
         $data = $month->export($renderer);
     } else if ($view == "day") {
         $daydata = $type->timestamp_to_date_array($tstart);