From 5d422d42845cbeeed0f87b23e814611213c02133 Mon Sep 17 00:00:00 2001 From: willcast Date: Thu, 27 Nov 2003 05:25:26 +0000 Subject: [PATCH] - Fixing bug regarding the aliases (pointed out by Sho Fukamachi also) --- mod/glossary/edit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/glossary/edit.php b/mod/glossary/edit.php index 88d8b72594..21945d8597 100644 --- a/mod/glossary/edit.php +++ b/mod/glossary/edit.php @@ -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; -- 2.39.5