Move holidays.php out of inc subdirectory, add a failure check

This commit is contained in:
nathangray 2017-01-04 08:21:59 -07:00
parent 4d88ec8445
commit 153dde2200
2 changed files with 6 additions and 3 deletions

View File

@ -26,7 +26,7 @@ $GLOBALS['egw_info'] = array(
) )
); );
include '../../header.inc.php'; include '../header.inc.php';
$GLOBALS['egw_info']['flags']['currentapp'] = 'calendar'; $GLOBALS['egw_info']['flags']['currentapp'] = 'calendar';

View File

@ -633,7 +633,7 @@ jQuery.extend(et2_calendar_view,
// one widget listening for the response by the time it gets back, // one widget listening for the response by the time it gets back,
// and we can't do that when it's queued. // and we can't do that when it's queued.
view.holiday_cache[year] = jQuery.getJSON( 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]; cache = view.holiday_cache[year];
@ -650,7 +650,10 @@ jQuery.extend(et2_calendar_view,
this.widget.day_class_holiday(); this.widget.day_class_holiday();
} }
},this),1); },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 {}; return {};
} }
else else