From 54633fb9c346afb9ba0b6a1163f21bd3f2d1c798 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 30 Jul 2021 22:00:45 -0400 Subject: [PATCH] Hide REPLACE sql function from SearchKit Either way this describes the 3 params, but the new way is better understood by SearchKit, which to-date cannot handle more than one param. --- Civi/Api4/Query/SqlFunctionREPLACE.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Civi/Api4/Query/SqlFunctionREPLACE.php b/Civi/Api4/Query/SqlFunctionREPLACE.php index 75350f1a87..27c7c1b51c 100644 --- a/Civi/Api4/Query/SqlFunctionREPLACE.php +++ b/Civi/Api4/Query/SqlFunctionREPLACE.php @@ -21,14 +21,8 @@ class SqlFunctionREPLACE extends SqlFunction { protected static function params(): array { return [ [ - 'optional' => FALSE, - 'must_be' => ['SqlField', 'SqlString'], - ], - [ - 'optional' => FALSE, - 'must_be' => ['SqlField', 'SqlString'], - ], - [ + 'min_expr' => 3, + 'max_expr' => 3, 'optional' => FALSE, 'must_be' => ['SqlField', 'SqlString'], ], -- 2.25.1