Skip to content

Commit

Permalink
MDL-42553 core_calendar: third party calendar types can now be uninst…
Browse files Browse the repository at this point in the history
…alled
  • Loading branch information
mdjnelson authored and Sam Hemelryk committed Nov 19, 2013
1 parent c7232a3 commit dd7b9d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/classes/plugininfo/calendartype.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@
defined('MOODLE_INTERNAL') || die();

/**
* Class for admin tool plugins
* Class for calendar type plugins.
*/
class calendartype extends base {

public function is_uninstall_allowed() {
// We can delete all calendar types, except Gregorian. Gregorian comes with core and was the calendar
// type used before the calendar types were introduced as plugins in Moodle. If all calendar types were
// deleted then Moodle would break completely wherever any dates are displayed.
if ($this->name !== 'gregorian') {
return true;
}

return false;
}
}

0 comments on commit dd7b9d1

Please sign in to comment.