More fixes for installation and extension registration
[mailer.git] / inc / classes / cachesystem.class.php
index 4ee0cb0d22f5a46897f38773e9c9667b9458570f..571721e63df27a0ce329c36a866abd22d4fc49b7 100644 (file)
@@ -231,7 +231,7 @@ class CacheSystem {
                // Is the cache file there?
                if ($this->isCacheReadable()) {
                        // Load cache file
-                       require($this->fqfn);
+                       include($this->fqfn);
 
                        // Is there an array?
                        if (isset($this->data[$this->name])) {
@@ -257,7 +257,7 @@ class CacheSystem {
                } else {
                        // Cache file not found or not readable
                        debug_report_bug($this->name);
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_LOAD'), $this->fqfn));
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMaskedMessage('CACHE_CANNOT_LOAD', $this->fqfn));
 
                        // Try to remove it
                        $this->removeCacheFile();
@@ -312,7 +312,7 @@ class CacheSystem {
                                $this->rebuilt[$this->name] = true;
                        } else {
                                // Not removed!
-                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_UNLINK'), $this->fqfn));
+                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMaskedMessage('CACHE_CANNOT_UNLINK', $this->fqfn));
                        }
                } // END - if
        }
@@ -417,11 +417,11 @@ class CacheSystem {
                                // Get extension version
                                $ext_ver = getExtensionVersion($ext_name);
 
-                               // Write cache line to file
-                               fwrite($this->pointer, $this->rewriteEntry($ext_name, $ext_ver, 'version', true));
-
                                // Add the extension version to object (DO NOT REMOVE IT! Endless loop...)
                                $this->version[$this->name][$ext_name] = $ext_ver;
+
+                               // Write cache line to file
+                               fwrite($this->pointer, $this->rewriteEntry($ext_name, $ext_ver, 'version', true));
                        } // END - if
                        //* DEBUG: */ outputHtml(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />");
                } else {