From 1684c7a1d51a7a6821b59602d51856e295171712 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 4 Jan 2017 08:21:59 -0700 Subject: [PATCH] Move holidays.php out of inc subdirectory, add a failure check --- calendar/{inc => }/holidays.php | 2 +- calendar/js/et2_widget_view.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) rename calendar/{inc => }/holidays.php (97%) diff --git a/calendar/inc/holidays.php b/calendar/holidays.php similarity index 97% rename from calendar/inc/holidays.php rename to calendar/holidays.php index 92cd3c37cd..384ce1282a 100644 --- a/calendar/inc/holidays.php +++ b/calendar/holidays.php @@ -26,7 +26,7 @@ $GLOBALS['egw_info'] = array( ) ); -include '../../header.inc.php'; +include '../header.inc.php'; $GLOBALS['egw_info']['flags']['currentapp'] = 'calendar'; diff --git a/calendar/js/et2_widget_view.js b/calendar/js/et2_widget_view.js index acd1f7186d..6d4e90ba9f 100644 --- a/calendar/js/et2_widget_view.js +++ b/calendar/js/et2_widget_view.js @@ -633,7 +633,7 @@ jQuery.extend(et2_calendar_view, // one widget listening for the response by the time it gets back, // and we can't do that when it's queued. view.holiday_cache[year] = jQuery.getJSON( - egw.link('/calendar/inc/holidays.php', {year: year}) + egw.link('/calendar/holidays.php', {year: year}) ); } cache = view.holiday_cache[year]; @@ -650,7 +650,10 @@ jQuery.extend(et2_calendar_view, this.widget.day_class_holiday(); } },this),1); - },{widget:widget,year:year})); + },{widget:widget,year:year})) + .fail(jQuery.proxy(function() { + view.holiday_cache[this.year] = undefined; + }, {widget: widget, year: year})); return {}; } else