[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [BP][FIX] PluginCategory: restore language filtering behavior for lang parameter

"Bruno Kambere \(@kambereBr\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69bc4ccb12ce7_3b18d23821c1@gitlab-sidekiq-low-urgency-cpu-bound-v2-5689cb5bc9-97rt9.mail>

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


Commits:
cb3aa0e6 by Bruno Kambere at 2026-03-19T21:14:19+02:00
[BP][FIX] PluginCategory: restore language filtering behavior for lang parameter
---
* [FIX] PluginCategory: restore language filtering behavior for lang parameter
---
* [FIX] PluginCategory: restore language filtering behavior for lang parameter

See merge request tikiwiki/tiki!9790

See merge request tikiwiki/tiki!9797

- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_category.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_category.php
=====================================
@@ -221,7 +221,6 @@ function wikiplugin_category_info()
                 ),
                 'since' => '8.0',
                 'filter' => 'lang',
-                'default' => '',
             ],
         ],
     ];
@@ -242,7 +241,14 @@ function wikiplugin_category($data, $params)
     $split = strtolower($split) == 'y';
     $sub = strtolower($sub) == 'y';
     $and = strtolower($and) == 'y';
-    $filter['language'] = $lang ?: Language::getCurrentLanguage();
+
+    if (! empty($lang)) {
+        $filter['language'] = $lang;
+    } elseif (isset($params['lang'])) {
+        $filter['language'] = Language::getCurrentLanguage();
+    } else {
+        $filter = null;
+    }
 
     if (! empty($sort)) {
         $list = explode(',', $sort);



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

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