From 667528d5b927f0f284a067b0e24c9ca7f26c28a4 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 23 Nov 2024 18:23:49 +0000 Subject: Use PHP 8 'str_' functions. A few more characters in some places, but helps with readability. --- include/controls.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/controls.php') diff --git a/include/controls.php b/include/controls.php index 4443bbc55..5c6174e3d 100755 --- a/include/controls.php +++ b/include/controls.php @@ -46,7 +46,7 @@ */ function input_tag(string $name, string $value, string $type = "text", array $attributes = [], string $id = ""): string { $attributes_str = attributes_to_string($attributes); - $dojo_type = strpos($attributes_str, "dojoType") === false ? "dojoType='dijit.form.TextBox'" : ""; + $dojo_type = str_contains($attributes_str, "dojoType") ? "" : "dojoType='dijit.form.TextBox'"; return ""; @@ -86,7 +86,7 @@ */ function select_tag(string $name, mixed $value, array $values, array $attributes = [], string $id = ""): string { $attributes_str = attributes_to_string($attributes); - $dojo_type = strpos($attributes_str, "dojoType") === false ? "dojoType='fox.form.Select'" : ""; + $dojo_type = str_contains($attributes_str, "dojoType") ? "" : "dojoType='fox.form.Select'"; $rv = ""; -- cgit v1.2.3-54-g00ecf