diff options
author | Malf Furious <m@lfurio.us> | 2019-01-12 22:42:41 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2019-01-12 22:42:41 -0500 |
commit | d2e4330557e02af6dc4ff133d2586730e94d6959 (patch) | |
tree | 45c1c577dba69cd520b3787dd0300a15fb4cf7ca /app/class/globals.php | |
parent | f3165d28fff6468fca44ff2ec3b6cfb3fb82ee90 (diff) | |
parent | d71c72ba57abee645daf658bbdb74f296406171d (diff) | |
download | scrott-d2e4330557e02af6dc4ff133d2586730e94d6959.tar.gz scrott-d2e4330557e02af6dc4ff133d2586730e94d6959.zip |
Merge branch 'rel/v0.3'v0.3
Diffstat (limited to 'app/class/globals.php')
-rw-r--r-- | app/class/globals.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/app/class/globals.php b/app/class/globals.php index 8a6efd7..468ad6d 100644 --- a/app/class/globals.php +++ b/app/class/globals.php @@ -19,7 +19,7 @@ require_once "class/obj.class.php"; * These are utility functions and constants for the Scrott application. */ -define("__VERSION__", "v0.2"); +define("__VERSION__", "v0.3"); /* * These global variables are arrays of strings logged by Scrott business @@ -50,6 +50,12 @@ $_SCROTT['PAGE_OBJECT'] = NULL; $_SCROTT['PAGE_NAME'] = ""; /* + * The auto modal variable holds the name (DOM ID) of a modal to automatically + * open on page load. The `stdpage` footer will reference this. + */ +$_SCROTT['AUTO_MODAL'] = ""; + +/* * Get the application root path. This is an absolute path on the server. */ function ar() : string @@ -182,6 +188,24 @@ function getPageName() : string } /* + * Set the auto modal. + */ +function setAutoModal(string $autoModal) : void +{ + global $_SCROTT; + $_SCROTT['AUTO_MODAL'] = $autoModal; +} + +/* + * Get the auto modal. + */ +function getAutoModal() : string +{ + global $_SCROTT; + return $_SCROTT['AUTO_MODAL']; +} + +/* * Produce a string, but only once. This function is useful * when dealing with some variable collection of markup and * you want to affect only the first one with a modifier. |