From ed03f0313d601ac66d6e8c033a959234d8d98f5e Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Fri, 13 Mar 2015 22:15:40 -0700 Subject: [PATCH] Ensure we delete the element from the DB --- locallib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/locallib.php b/locallib.php index d9f0675..8e07982 100644 --- a/locallib.php +++ b/locallib.php @@ -322,6 +322,9 @@ function customcert_delete_page($pageid) { // Get an instance of the element class. if ($e = customcert_get_element_instance($element)) { $e->delete_element(); + } else { + // The plugin files are missing, so just remove the entry from the DB. + $DB->delete_records('customcert_elements', array('id' => $element->id)); } } }