]> git.mxchange.org Git - mailer.git/blobdiff - inc/config-functions.php
Fixes for isAdmin() rewrite of latest commits.
[mailer.git] / inc / config-functions.php
index 310fc6bae363d073db062de3c10cf1497e5ae6a7..035f169d7864b68de7f3311fe313314d23ec6eec 100644 (file)
@@ -86,6 +86,18 @@ function getConfig ($configEntry) {
 function setConfigEntry ($configEntry, $value) {
        // Just set it (unsecured won't hurt?)
        $GLOBALS['config'][$configEntry] = $value;
+
+       // Remove cache
+       removeGlobalCache($configEntry);
+}
+
+// Removes entry in $GLOBALS
+function removeGlobalCache ($configEntry) {
+       // Generate key
+       $key = 'get' . capitalizeUnderscoreString($configEntry);
+
+       // Remove it
+       unset($GLOBALS[$key]);
 }
 
 // Checks whether the given config entry is set