Cannot add glossary category MDL-6713

This commit is contained in:
skodak
2006-10-01 19:35:27 +00:00
parent 1d4d2cebe0
commit 310471950e
+2 -3
View File
@@ -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 "<p align=\"center\">" . get_string("add"). " " . get_string("category","glossary") . "<font size=\"3\">";
@@ -139,8 +140,6 @@
echo "</center>";
print_simple_box_end();
print_footer($course);
redirect("editcategories.php?id=$cm->id&amp;action=add&&amp;name=$name");
} else {