diff --git a/mod/glossary/editcategories.php b/mod/glossary/editcategories.php index e78c149cd13..87a562aa033 100644 --- a/mod/glossary/editcategories.php +++ b/mod/glossary/editcategories.php @@ -130,7 +130,8 @@ } elseif ( $action == "add" ) { if ( $confirm ) { - $dupcategory = get_record("glossary_categories",lower(name),strtolower($name),"glossaryid",$glossary->id); + $ILIKE = sql_ilike(); + $dupcategory = get_records_sql("SELECT * FROM {$CFG->prefix}glossary_categories WHERE name $ILIKE '$name'"); if ( $dupcategory ) { echo "
" . get_string("add"). " " . get_string("category","glossary") . ""; @@ -139,8 +140,6 @@ echo ""; print_simple_box_end(); - print_footer($course); - redirect("editcategories.php?id=$cm->id&action=add&&name=$name"); } else {