浏览代码

add calendar demo data

CauseFX 4 年之前
父节点
当前提交
df24a4595c
共有 2 个文件被更改,包括 13821 次插入0 次删除
  1. 13817 0
      api/demo_data/calendar/calendar.json
  2. 4 0
      api/homepage/calendar.php

文件差异内容过多而无法显示
+ 13817 - 0
api/demo_data/calendar/calendar.json


+ 4 - 0
api/homepage/calendar.php

@@ -87,6 +87,10 @@ trait CalendarHomepageItem
 	
 	
 	public function getCalendar()
 	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"));
 		$startDate = date('Y-m-d', strtotime("-" . $this->config['calendarStart'] . " days"));
 		$endDate = date('Y-m-d', strtotime("+" . $this->config['calendarEnd'] . " days"));
 		$endDate = date('Y-m-d', strtotime("+" . $this->config['calendarEnd'] . " days"));
 		$icalCalendarSources = array();
 		$icalCalendarSources = array();

部分文件因为文件数量过多而无法显示