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

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68a3012773ba6_2dd6c686633@gitlab-sidekiq-low-urgency-cpu-bound-v2-5b8f9fb769-mg8fl.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
34d3178f by ushindi bienvenu at 2025-08-18T10:24:22+00:00
[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

- - - - -


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/34d3178f0be49b83e83aa9d3b112d3e1c9aae89a

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