diff options
Diffstat (limited to 'includes/sys_page.php')
-rw-r--r-- | includes/sys_page.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/includes/sys_page.php b/includes/sys_page.php index 501106ff..df57d08a 100644 --- a/includes/sys_page.php +++ b/includes/sys_page.php @@ -1,4 +1,5 @@ <?php + use Engelsystem\ValidationResult; /** @@ -168,11 +169,8 @@ function strip_request_item($name, $default_value = null) */ function test_request_int($name) { - $request = request(); - if ($request->has($name)) { - return preg_match('/^\d*$/', $request->input($name)); - } - return false; + $input = request()->input($name); + return preg_match('/^\d*$/', $input); } /** @@ -186,7 +184,11 @@ function strip_request_item_nl($name, $default_value = null) { $request = request(); if ($request->has($name)) { - return preg_replace("/([^\p{L}\p{S}\p{P}\p{Z}\p{N}+\n]{1,})/ui", '', strip_tags($request->get($name))); + return preg_replace( + "/([^\p{L}\p{S}\p{P}\p{Z}\p{N}+\n]{1,})/ui", + '', + strip_tags($request->input($name)) + ); } return $default_value; } |