[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Blog importer: prevent duplicate category addition

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69f8920ad9062_3818fc906197f@gitlab-sidekiq-low-urgency-cpu-bound-v2-5547bb5d96-rlzqn.mail>

ushindi bienvenu pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
226e00b0 by UshindiG at 2026-05-04T12:13:25+00:00
[FIX] Blog importer: prevent duplicate category addition
---
* [FIX] Blog importer: prevent duplicate category addition

See merge request tikiwiki/tiki!10130

- - - - -


1 changed file:

- lib/Importer/Blog.php


Changes:

=====================================
lib/Importer/Blog.php
=====================================
@@ -324,7 +324,9 @@ class Blog extends Base
                 $categ['parentId'] = 0;
             }
 
-            $categlib->add_category($categ['parentId'], $categ['name'], $categ['description']);
+            if (! $categlib->get_category_by_name($categ['name'], $categ['parentId'])) {
+                $categlib->add_category($categ['parentId'], $categ['name'], $categ['description']);
+            }
         }
     }
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/226e00b088b395e2fc5bb090fd872049c82f2ae1

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/226e00b088b395e2fc5bb090fd872049c82f2ae1
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.