mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-25227 glossary - fix delete_instance() and clean orphaned entries
This commit is contained in:
parent
f3cc571af2
commit
3b953472ac
3 changed files with 12 additions and 1 deletions
|
@ -194,6 +194,7 @@ function glossary_delete_instance($id) {
|
|||
$category_select = "SELECT id FROM {glossary_categories} WHERE glossaryid = ?";
|
||||
$DB->delete_records_select('glossary_entries_categories', "categoryid IN ($category_select)", array($id));
|
||||
$DB->delete_records('glossary_categories', array('glossaryid'=>$id));
|
||||
$DB->delete_records('glossary_entries', array('glossaryid'=>$id));
|
||||
|
||||
// delete all files
|
||||
$fs->delete_area_files($context->id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue