summaryrefslogtreecommitdiff
path: root/includes/sys_page.php
diff options
context:
space:
mode:
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.
*