From 299dbbfe9be06effc3f5d28b758d8bb0c601a987 Mon Sep 17 00:00:00 2001 From: Banana Date: Sat, 28 May 2022 19:13:06 +0200 Subject: [PATCH] fixed #13 --- ChangeLog | 2 ++ webroot/view/editcategories.inc.php | 4 ++++ webroot/view/edittags.inc.php | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index bc3bf7e..44f3dd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ version 2.7 - Sacred Grove () + Added random link page + New syntax in config file. See update.txt for more details + Fixed #13 + + Fixed #15 + # Fixed #14 version 2.6 - Hypostyle (2021-03-21) diff --git a/webroot/view/editcategories.inc.php b/webroot/view/editcategories.inc.php index dbeeef8..f38b240 100644 --- a/webroot/view/editcategories.inc.php +++ b/webroot/view/editcategories.inc.php @@ -63,6 +63,10 @@ if(isset($_POST['category']) && !empty($_POST['category']) && isset($_POST['upda $catObjAlternative = new Category($DB); $do = $catObjAlternative->initbystring($v,true); if($do === 1) { # existing + if($k == $catObjAlternative->getData('id')) { + // Rename to the same. Do nothing + continue; + } // the target cat should not be removed! $catDoNotDeleteFromUpdate[$catObjAlternative->getData('id')] = $catObjAlternative->getData('id'); $catObjOld = new Category($DB); diff --git a/webroot/view/edittags.inc.php b/webroot/view/edittags.inc.php index 03a60ad..eb40228 100644 --- a/webroot/view/edittags.inc.php +++ b/webroot/view/edittags.inc.php @@ -63,6 +63,10 @@ if(isset($_POST['tag']) && !empty($_POST['tag']) && isset($_POST['updateTags'])) $tagObjAlternative = new Tag($DB); $do = $tagObjAlternative->initbystring($v,true); if($do === 1) { # existing + if($k == $tagObjAlternative->getData('id')) { + // Rename to the same. Do nothing + continue; + } // the target tag should not be removed! $tagDoNotDeleteFromUpdate[$tagObjAlternative->getData('id')] = $tagObjAlternative->getData('id'); $tagObjOld = new Tag($DB); -- 2.39.5