MDL-22252 "couple of typos causing errors when importing glossary contents"

This commit is contained in:
Jamie Pratt 2010-04-30 06:20:19 +00:00
parent 03e9a12279
commit c7a2b2c84f

View file

@ -227,7 +227,7 @@ if ($xml = glossary_read_imported_file($file['tmp_name']) ) {
if ( $newentry->casesensitive ) { if ( $newentry->casesensitive ) {
$dupentry = $DB->get_record("glossary_entries", array("concept"=>$newentry->concept, "glossaryid"=>$glossary->id)); $dupentry = $DB->get_record("glossary_entries", array("concept"=>$newentry->concept, "glossaryid"=>$glossary->id));
} else { } else {
$dupentry = $DB->get_record("glossary_entries", array("lower(concept)"=>moodle_strtolower($newentry->concept)), array("glossaryid"=>$glossary->id)); $dupentry = $DB->get_record("glossary_entries", array("lower(concept)"=>moodle_strtolower($newentry->concept), "glossaryid"=>$glossary->id));
} }
if ($dupentry) { if ($dupentry) {
$permissiongranted = 0; $permissiongranted = 0;
@ -294,7 +294,7 @@ if ($xml = glossary_read_imported_file($file['tmp_name']) ) {
} }
if ( $category ) { if ( $category ) {
// inserting the new relation // inserting the new relation
$entrycat = new opbject(); $entrycat = new object();
$entrycat->entryid = $newentry->id; $entrycat->entryid = $newentry->id;
$entrycat->categoryid = $category->id; $entrycat->categoryid = $category->id;
$DB->insert_record("glossary_entries_categories",$entrycat); $DB->insert_record("glossary_entries_categories",$entrycat);