Skip to content
Snippets Groups Projects
Commit f6aa3668 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Make sure there is a calendar after delete.

parent 3c75ac5f
No related branches found
No related tags found
No related merge requests found
......@@ -198,6 +198,10 @@ class OC_Calendar_Calendar{
$stmt = OCP\DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE calendarid = ?' );
$stmt->execute(array($id));
if(count(self::allCalendars()) == 0) {
self::addCalendar(OCP\USER::getUser(),'Default calendar');
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment