]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_cache.php
Complete rewrite of and , wrapper functions added, see bug #101
[mailer.git] / inc / modules / admin / what-config_cache.php
index 6a86a6732550049937c80fc0b63095ff775893a2..1056c3f3a61dcba898f79191e99ab99dc6a1cc79 100644 (file)
@@ -40,41 +40,46 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-if (isset($_POST['ok'])) {
+if (IS_FORM_SENT()) {
        // Cache path has been not changed by default so don't test it again
-       $_POST['cache_tested'] = "N";
+       REQUEST_SET_POST('cache_tested', "N");
 
        // Check if path has been changed
-       if ($_POST['cache_path'] != getConfig('cache_path')) {
+       if (REQUEST_POST('cache_path') != getConfig('cache_path')) {
                // Okay, cache path has been altered so we have to test it again!
-               $_POST['cache_tested'] = "Y";
+               REQUEST_SET_POST('cache_tested', "Y");
        }
 
-       // Delete deactivated cache files
-       if (($_POST['cache_admins'] == "N") && ($GLOBALS['cache_instance']->loadCacheFile("admins"))) {
+       if ((REQUEST_POST('cache_admins') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("admins"))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
        }
-       if (($_POST['cache_acls'] == "N") && ($GLOBALS['cache_instance']->loadCacheFile("acls"))) {
+
+       if ((REQUEST_POST('cache_acls') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("acls"))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
        }
-       if (($_POST['cache_exts'] == "N") && ($GLOBALS['cache_instance']->loadCacheFile("extensions", true))) {
+
+       if ((REQUEST_POST('cache_exts') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("extensions", true))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
        }
-       if (($_POST['cache_config'] == "N") && ($GLOBALS['cache_instance']->loadCacheFile("config"))) {
+
+       if ((REQUEST_POST('cache_config') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("config"))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
        }
-       if (($_POST['cache_modreg'] == "N") && ($GLOBALS['cache_instance']->loadCacheFile("modreg"))) {
+
+       if ((REQUEST_POST('cache_modreg') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("modreg"))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
        }
-       if (($_POST['cache_refdepth'] == "N") && ($GLOBALS['cache_instance']->loadCacheFile("refdepth"))) {
+
+       if ((REQUEST_POST('cache_refdepth') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("refdepth"))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
        }
-       if (($_POST['cache_refsys'] == "N") && ($GLOBALS['cache_instance']->loadCacheFile("refsys"))) {
+
+       if ((REQUEST_POST('cache_refsys') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("refsys"))) {
                $GLOBALS['cache_instance']->destroyCacheFile();
        }
 
        // Save configuration
-       ADMIN_SAVE_SETTINGS($_POST);
+       ADMIN_SAVE_SETTINGS_POST();
 } else {
        // Prepare data
        switch (getConfig('cache_admins')) {