X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fcache_functions.php;h=619579d5377425ef1ff8926e807723d9098a12ed;hp=2e42b1dd9537a8e8b94efbeb0cd33422213e0659;hb=c45b1827a16928c65ecc1aea6a9d7a504c4874d4;hpb=52e8a0635bd0b7c653845685c55e4e5f251375fe diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 2e42b1dd95..619579d537 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -61,31 +61,24 @@ class mxchange_cache { // Check if we can create a file inside the path @touch($path."dummy.tmp", 'w'); - if (file_exists($path."dummy.tmp")) - { + if (file_exists($path."dummy.tmp")) { // Yes, we can do. So let's remove it - unlink($path."dummy.tmp"); + @unlink($path."dummy.tmp"); // Is there a .htaccess file? - if (file_exists($path.".htaccess")) - { + if (file_exists($path.".htaccess")) { // Update database that we have tested it - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET cache_tested='1' WHERE config=0 LIMIT 1", __FILE__, __LINE__); - $this->ret="done"; + UPDATE_CONFIG("cache_tested", 1); // All done! return "done"; - } - else - { + } else { // Stop! Set a .htaccess file first $this->ret="htaccess"; return "htaccess"; } } - } - elseif ($tested) - { + } elseif ($tested) { // System already tested $this->ret="done"; return "done"; @@ -268,13 +261,13 @@ class mxchange_cache foreach($v as $k2=>$v2) { // Put every array element in a row... - $LINE .= "\$cacheInstance['".$k."'][] = \"".$v2."\";\n"; + $LINE .= "\$data['".$k."'][] = \"".$v2."\";\n"; } } else { // Single line found - $LINE = "\$cacheInstance['".$k."'] = \"".$v."\";\n"; + $LINE = "\$data['".$k."'] = \"".$v."\";\n"; } // Write line(s) @@ -331,13 +324,13 @@ class mxchange_cache foreach($v as $k2=>$v2) { // Put every array element in a row... - $LINE .= "\$cacheInstance['".$k."'][] = \"".$v2."\";\n"; + $LINE .= "\$data['".$k."'][] = \"".$v2."\";\n"; } } else { // Single line found - $LINE = "\$cacheInstance['".$k."'] = \"".$v."\";\n"; + $LINE = "\$data['".$k."'] = \"".$v."\";\n"; } // Write line(s)