[TikiWiki-commits] [Git][tikiwiki/tiki][master] 2 commits: Revert "Fix plugin arg filtering on arrays"
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <698f842fc1dfd_3b18588089181@gitlab-sidekiq-low-urgency-cpu-bound-v2-7b68dd745d-5zctd.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
b659cebd by Benoit Grégoire at 2026-02-13T14:37:27-05:00
Revert "Fix plugin arg filtering on arrays"
This reverts commit 6ee9c15b177cb186ec24cd70f181b1956a4f47b1.
- - - - -
e3ab6eaf by Benoit Grégoire at 2026-02-13T14:37:27-05:00
Revert "[FIX] Tiki-register: Fix TypeError in tracker plugin when action parameter is a string"
This reverts commit e26693888585b514dedcfdfae14378417603bb89.
- - - - -
2 changed files:
- lib/parser/parserlib.php
- lib/tikilib.php
Changes:
=====================================
lib/parser/parserlib.php
=====================================
@@ -149,8 +149,6 @@ class ParserLib extends TikiDb_Bridge
$params = WikiPlugin_Helper::applyParamsDefaults($params, $info);
$missingRequired = [];
- $tikilib = TikiLib::lib('tiki');
-
if (isset($info['params'])) {
foreach ($info['params'] as $key => $param) {
if (isset($param['required']) && $param['required'] === true) {
@@ -159,14 +157,6 @@ class ParserLib extends TikiDb_Bridge
$missingRequired[] = $key;
}
}
-
- if (isset($param['separator']) && isset($params[$key])) {
- if (is_string($params[$key]) && $params[$key] !== null) {
- $params[$key] = $tikilib->multi_explode($param['separator'], $params[$key]);
- } elseif (! is_array($params[$key]) && $params[$key] !== null) {
- $params[$key] = [$params[$key]];
- }
- }
}
}
@@ -1211,21 +1201,13 @@ class ParserLib extends TikiDb_Bridge
// Preserve null values (parameters not provided by user)
if ($argValue !== null) {
- if (is_array($argValue)) {
- foreach ($argValue as &$value) {
- $value = TikiLib::htmldecode($value);
- }
- } else {
- $argValue = TikiLib::htmldecode($argValue);
- }
+ $argValue = TikiLib::htmldecode($argValue);
}
- if (isset($paramInfo['separator']) && ! is_array($argValue)) {
+ if (isset($paramInfo['separator'])) {
if ($argValue !== null) {
- $vals = $tikilib->array_apply_filter(
- $tikilib->multi_explode($paramInfo['separator'], $argValue),
- $filter
- );
+ $vals = [];
+ $vals = $tikilib->array_apply_filter($tikilib->multi_explode($paramInfo['separator'], $argValue), $filter);
$argValue = array_values($vals);
}
// If $argValue is null, leave it as null (don't process separator)
=====================================
lib/tikilib.php
=====================================
@@ -6918,7 +6918,7 @@ class TikiLib extends TikiDb_Bridge
/**
* @param $vals
* @param $filter
- * @return string|array
+ * @return string
*/
public function array_apply_filter($vals, $filter)
{
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/7f65eb8c3ae30eb0ce6823e8705514ae0d14c659...e3ab6eaf9fa9a8eb1b404bacf24d2da76c514f0f
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/7f65eb8c3ae30eb0ce6823e8705514ae0d14c659...e3ab6eaf9fa9a8eb1b404bacf24d2da76c514f0f
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