summaryrefslogtreecommitdiffstats
path: root/app/class/globals.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-06-27 01:39:02 -0400
committerMalf Furious <m@lfurio.us>2017-06-27 01:39:02 -0400
commita607d74c3080cff5a9a9f4362f6da491982e8a6e (patch)
tree6e08aa499e465c9aa65632d16edfbedb1a9e2ff2 /app/class/globals.php
parent4a9908d9aa3d0f50d4907eb25e6fc1d317061484 (diff)
downloadscrott-a607d74c3080cff5a9a9f4362f6da491982e8a6e.tar.gz
scrott-a607d74c3080cff5a9a9f4362f6da491982e8a6e.zip
Add function isAction()
Diffstat (limited to 'app/class/globals.php')
-rw-r--r--app/class/globals.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/class/globals.php b/app/class/globals.php
index 615efa6..94df716 100644
--- a/app/class/globals.php
+++ b/app/class/globals.php
@@ -77,6 +77,17 @@ function require_https() : void
}
/*
+ * Check whether an action string was submitted by the user agent
+ */
+function isAction(string $action) : bool
+{
+ if (!isset($_REQUEST['action']))
+ return false;
+
+ return $_REQUEST['action'] == $action;
+}
+
+/*
* Check for errors, warnings, or notices
*/
function isError(string $level) : bool