summaryrefslogtreecommitdiff
path: root/includes/sys_page.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-10-02 23:00:01 +0200
committermsquare <msquare@notrademark.de>2016-10-02 23:00:01 +0200
commit5e66007f0629ab5a9b4449ca6ea4070f372bd656 (patch)
tree4a2049b80748f3731ceef17fb80f318e00dfbcea /includes/sys_page.php
parent6ff5e7997a2e70178513824d8a1d1eca14622e46 (diff)
introduce ShiftsFilter
Diffstat (limited to 'includes/sys_page.php')
-rw-r--r--includes/sys_page.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/sys_page.php b/includes/sys_page.php
index e336261d..27e3e8ba 100644
--- a/includes/sys_page.php
+++ b/includes/sys_page.php
@@ -19,6 +19,19 @@ function raw_output($output) {
}
/**
+ * Returns an int[] from given request param name.
+ *
+ * @param String $name
+ * Name of the request param
+ */
+function check_request_int_array($name) {
+ if (isset($_REQUEST[$name]) && is_array($_REQUEST[$name])) {
+ return array_filter($_REQUEST[$name], 'is_numeric');
+ }
+ return [];
+}
+
+/**
* Checks if given request item (name) can be parsed to a date.
* If not parsable, given error message is put into msg() and null is returned.
*