]> git.mjollnir.org Git - moodle.git/commitdiff
- Fixing bug regarding the aliases (pointed out by Sho Fukamachi also)
authorwillcast <willcast>
Thu, 27 Nov 2003 05:25:26 +0000 (05:25 +0000)
committerwillcast <willcast>
Thu, 27 Nov 2003 05:25:26 +0000 (05:25 +0000)
mod/glossary/edit.php

index 88d8b7259419c5e601c03e7efacbc55e0ac13a26..21945d859726593d71a17f40978e9a3d58e370a5 100644 (file)
@@ -135,6 +135,7 @@ if ( $confirm ) {
             if (! $newentry->id = insert_record("glossary_entries", $newentry)) {
                 error("Could not insert this new entry");
             } else {
+                $e = $newentry->id;
                 $newentry->attachment = $_FILES["attachment"];
                 if ($newfilename = glossary_add_attachment($newentry, $newentry->attachment)) {
                     $newentry->attachment = $newfilename;
@@ -153,10 +154,10 @@ if ( $confirm ) {
     delete_records("glossary_alias","entryid",$e);
 
     if ( isset($form->categories) ) {
-        $newcategory->entryid = $newentry->id;
+        $newcategory->entryid = $e;
         foreach ($form->categories as $category) {
             if ( $category > 0 ) {
-                $newcategory->categoryid =$category;
+                $newcategory->categoryid = $category;
                 insert_record("glossary_entries_categories",$newcategory);
             } else {
                 break;