]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/cache_functions.php
handling of boolean constants improved (not fully)
[mailer.git] / inc / libs / cache_functions.php
index 2e42b1dd9537a8e8b94efbeb0cd33422213e0659..cfb4cd4cae6e0e23812ef2a5cb2287ddbdadc609 100644 (file)
@@ -61,31 +61,25 @@ 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";
 
                                        // 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";