[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] User Assigned Modules: Remove unused function params when adding a...

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68a7ca5c7f4f8_2cd6eac429b4@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f6d84f9cc-96wdm.mail>

ushindi bienvenu pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
a8f71ece by ushindi bienvenu at 2025-08-22T01:31:55+00:00
[BP][FIX] User Assigned Modules: Remove unused function params when adding a...
---
* [FIX] User Assigned Modules: Remove unused function params when adding a module + fix the "Truncated incorrect DOUBLE value" system error
---
* [FIX] Add module: Remove unused function params

* [FIX] Add module: Truncated incorrect DOUBLE value

See merge request tikiwiki/tiki!8286

See merge request tikiwiki/tiki!8361

- - - - -


2 changed files:

- lib/modules/modlib.php
- lib/usermodules/usermoduleslib.php


Changes:

=====================================
lib/modules/modlib.php
=====================================
@@ -136,7 +136,7 @@ class ModLib extends TikiLib
         }
         if ($type == "D" || $type == "P") {
             $usermoduleslib = TikiLib::lib('usermodules');
-            $usermoduleslib->add_module_users($moduleId, $name, $title, $position, $order, $cache_time, $rows, $groups, $params, $type);
+            $usermoduleslib->add_module_users($moduleId, $name, $position, $order, $type);
         }
         return $moduleId;
     }


=====================================
lib/usermodules/usermoduleslib.php
=====================================
@@ -302,10 +302,10 @@ class UserModulesLib extends TikiLib
         return $this->set_column_user_module($moduleId, $user, ($res['position'] == 'right' ? 'left' : 'right'));
     }
     /// Add a module to all the user who have assigned module and who don't have already this module
-    public function add_module_users($moduleId, $name, $title, $position, $order, $cache_time, $rows, $groups, $params, $type)
+    public function add_module_users($moduleId, $name, $position, $order, $type)
     {
         // for the user who already has this module, update only the type
-        $this->query('update `tiki_user_assigned_modules` set `type`=? where `moduleId`=?', [$type,$name]);
+        $this->query('update `tiki_user_assigned_modules` set `type`=? where `moduleId`=?', [$type,$moduleId]);
         // for the user who doesn't have this module
         $query = "select distinct t1.`user` from `tiki_user_assigned_modules` as t1 left join `tiki_user_assigned_modules` as t2 on t1.`user`=t2.`user` and t2.`moduleId`=? where t2.`moduleId` is null";
         $result = $this->query($query, [$moduleId]);



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a8f71ece70062c4e6ac13dd8def407f56b24edaa
You're receiving this email because of your account on gitlab.com.

_______________________________________________
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.