Explorar el Código

add calendar demo data

CauseFX hace 4 años
padre
commit
df24a4595c
Se han modificado 2 ficheros con 13821 adiciones y 0 borrados
  1. 13817 0
      api/demo_data/calendar/calendar.json
  2. 4 0
      api/homepage/calendar.php

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 13817 - 0
api/demo_data/calendar/calendar.json


+ 4 - 0
api/homepage/calendar.php

@@ -87,6 +87,10 @@ trait CalendarHomepageItem
 	
 	public function getCalendar()
 	{
+		if ($this->demo) {
+			// for now, we will return all data - soon we will break out between all services
+			return $this->demoData('calendar/calendar.json');
+		}
 		$startDate = date('Y-m-d', strtotime("-" . $this->config['calendarStart'] . " days"));
 		$endDate = date('Y-m-d', strtotime("+" . $this->config['calendarEnd'] . " days"));
 		$icalCalendarSources = array();

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio