Prechádzať zdrojové kódy

add calendar demo data

CauseFX 4 rokov pred
rodič
commit
df24a4595c
2 zmenil súbory, kde vykonal 13821 pridanie a 0 odobranie
  1. 13817 0
      api/demo_data/calendar/calendar.json
  2. 4 0
      api/homepage/calendar.php

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 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();

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov