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

"UshindiG \(@GedeonTS\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a04241448299_381935ac570f6@gitlab-sidekiq-low-urgency-cpu-bound-v2-bcd446944-7785h.mail>

UshindiG pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
40613179 by UshindiG at 2026-05-13T10:04:51+03:00
[FIX] Blog importer: prevent duplicate category addition
---
* [FIX] Blog importer: prevent duplicate category addition
---
* [FIX] Blog importer: prevent duplicate category addition

See merge request tikiwiki/tiki!10130

(cherry picked from commit 226e00b088b395e2fc5bb090fd872049c82f2ae1)

See merge request tikiwiki/tiki!10163

- - - - -


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/40613179d734f7d5bee49e907ad8543c77c4fcfb

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/40613179d734f7d5bee49e907ad8543c77c4fcfb
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.