Loader for cache files renamed to avoid a lot naming conflicts
authorRoland Häder <roland@mxchange.org>
Thu, 6 Jan 2011 05:24:22 +0000 (05:24 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 6 Jan 2011 05:24:22 +0000 (05:24 +0000)
26 files changed:
.gitattributes
DOCS/TODOs.txt
inc/functions.php
inc/load_cache.php
inc/loader/load- [new file with mode: 0644]
inc/loader/load-admins.php [new file with mode: 0644]
inc/loader/load-config.php [new file with mode: 0644]
inc/loader/load-extensions.php [new file with mode: 0644]
inc/loader/load-filter.php [new file with mode: 0644]
inc/loader/load-imprint.php [new file with mode: 0644]
inc/loader/load-modules.php [new file with mode: 0644]
inc/loader/load-refdepths.php [new file with mode: 0644]
inc/loader/load-refsystem.php [new file with mode: 0644]
inc/loader/load-revision.php [new file with mode: 0644]
inc/loader/load-themes.php [new file with mode: 0644]
inc/loader/load_cache-
inc/loader/load_cache-admin.php
inc/loader/load_cache-config.php
inc/loader/load_cache-extension.php
inc/loader/load_cache-filter.php
inc/loader/load_cache-impressum.php
inc/loader/load_cache-modules.php
inc/loader/load_cache-refdepths.php
inc/loader/load_cache-refsystem.php
inc/loader/load_cache-revision.php
inc/loader/load_cache-them.php

index 83b912b6c677078d1e13a2808170f52a54c1c2ee..fe44c7ec96f593bee73131101f99bca0345763e3 100644 (file)
@@ -330,6 +330,17 @@ inc/libs/yoomedia_functions.php -text svneol=unset#text/plain
 inc/load_cache.php -text svneol=unset#text/plain
 inc/load_config.php -text svneol=unset#text/plain
 inc/loader/.htaccess -text svneol=unset#text/plain
+inc/loader/load- -text svneol=unset#text/plain
+inc/loader/load-admins.php -text svneol=unset#text/plain
+inc/loader/load-config.php -text svneol=unset#text/plain
+inc/loader/load-extensions.php -text svneol=unset#text/plain
+inc/loader/load-filter.php -text svneol=unset#text/plain
+inc/loader/load-imprint.php -text svneol=unset#text/plain
+inc/loader/load-modules.php -text svneol=unset#text/plain
+inc/loader/load-refdepths.php -text svneol=unset#text/plain
+inc/loader/load-refsystem.php -text svneol=unset#text/plain
+inc/loader/load-revision.php svneol=native#text/plain
+inc/loader/load-themes.php -text svneol=unset#text/plain
 inc/loader/load_cache- -text svneol=unset#text/plain
 inc/loader/load_cache-admin.php -text svneol=unset#text/plain
 inc/loader/load_cache-config.php -text svneol=unset#text/plain
index 0144fdb0dfdf9f0eb2a1e9e95e1a036865fefa8c..0964cc015a905770a82347d068951ee69b0ec27b 100644 (file)
@@ -92,7 +92,7 @@
 ./inc/libs/user_functions.php:611:                                     // @TODO Try to rewrite the following unset()
 ./inc/libs/yoomedia_functions.php:114: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
 ./inc/load_config.php:75:      // @TODO Rewrite them to avoid this else block
-./inc/loader/load_cache-extension.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php           *
+./inc/loader/load-extensions.php:13: * @TODO Rewrite this whole file                                        *
 ./inc/module-functions.php:267:                        // @TODO Nothing helped???
 ./inc/module-functions.php:308:                        // @TODO Rewrite this to a filter
 ./inc/modules/admin/admin-inc.php:170:         // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
 ./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:11:           <!-- @TODO Nothing to say here? //-->
 ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5:             <!-- @TODO These are static lines and should be replaced by a filter (see ext-sponsor) //-->
 ### ### DEPRECATION FOLLOWS: ### ###
+./inc/loader/load_cache-admin.php:2:// @DEPRECATED
+./inc/loader/load_cache-config.php:2:// @DEPRECATED
+./inc/loader/load_cache-extension.php:2:// @DEPRECATED
+./inc/loader/load_cache-filter.php:2:// @DEPRECATED
+./inc/loader/load_cache-impressum.php:2:// @DEPRECATED
+./inc/loader/load_cache-modules.php:2:// @DEPRECATED
+./inc/loader/load_cache-refdepths.php:2:// @DEPRECATED
+./inc/loader/load_cache-refsystem.php:2:// @DEPRECATED
+./inc/loader/load_cache-revision.php:2:// @DEPRECATED
+./inc/loader/load_cache-them.php:2:// @DEPRECATED
 ./inc/modules/admin/admin-inc.php:437:// @DEPRECATED
 ### ### template-warnings.log follows: ### ###
 Warning: Not parsing JavaScript templates/de/html/js/js_order_send.tpl.
index f045a8c5a92f0230d3d6ec4f45f907fb77a7d39c..60e7da54cba9d06801063315da892061956032f3 100644 (file)
@@ -1847,7 +1847,7 @@ function rebuildCache ($cache, $inc = '', $force = false) {
                // Include file given?
                if (!empty($inc)) {
                        // Construct FQFN
-                       $inc = sprintf("inc/loader/load_cache-%s.php", $inc);
+                       $inc = sprintf("inc/loader/load-%s.php", $inc);
 
                        // Is the include there?
                        if (isIncludeReadable($inc)) {
index b1a4e71ad7c0010f0b016c56d4f43dce2ab2f2c0..9cb09371d949939df7961a155c8252182af46be3 100644 (file)
@@ -54,13 +54,13 @@ $GLOBALS['cache_array']['always_active'] = array();
 
 // Init & set the INC_POOL
 initIncludePool('cache');
-setIncludePool('cache', getArrayFromDirectory('inc/loader/', 'load_cache-'));
+setIncludePool('cache', getArrayFromDirectory('inc/loader/', 'load-'));
 
 // Pre-load filter cacher
-loadIncludeOnce('inc/loader/load_cache-filter.php');
+loadIncludeOnce('inc/loader/load-filter.php');
 
 // Pre-load extensions cacher
-loadIncludeOnce('inc/loader/load_cache-extension.php');
+loadIncludeOnce('inc/loader/load-extension.php');
 
 // Load all includes
 loadIncludePool('cache');
diff --git a/inc/loader/load- b/inc/loader/load-
new file mode 100644 (file)
index 0000000..e8ce403
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
+ * ===================                          Last change: 10/24/2009 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load_cache-                                      *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Use this code if you don't want to run this cache loader on installation phase
+//if (isInstallationPhase()) return;
+
+// Let's start with the admins table...
+if (($GLOBALS['cache_instance']->loadCacheFile('foo')) && ($GLOBALS['cache_instance']->extensionVersionMatches('foo'))) {
+       // Load cache
+       $GLOBALS['cache_array']['foo'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif (isHtmlMode()) {
+       // Create cache file
+       $GLOBALS['cache_instance']->init();
+
+       // Load every data from DB to cache file
+       $add = runFilterChain('sql_admin_extra_data');
+
+       // Query the database about this
+       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_foos` ORDER BY `some_bar` ASC', __FILE__, __LINE__);
+       while ($dummy = SQL_FETCHARRAY($result)) {
+               // Save row
+               $GLOBALS['cache_instance']->addRow($dummy);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('foo');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-admins.php b/inc/loader/load-admins.php
new file mode 100644 (file)
index 0000000..32d73ee
--- /dev/null
@@ -0,0 +1,140 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
+ * ===================                          Last change: 09/09/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-config.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Let's start with the admins table...
+if (($GLOBALS['cache_instance']->loadCacheFile('admin')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
+       // Load cache
+       $GLOBALS['cache_array']['admin'] = $GLOBALS['cache_instance']->getArrayFromCache();
+
+       // Check if valid
+       if ((isset($GLOBALS['cache_array']['admin']['login'])) && (is_array($GLOBALS['cache_array']['admin']['login'])) && (is_array($GLOBALS['cache_array']['admin']['admin_id']))) {
+               // Check count
+               if (count($GLOBALS['cache_array']['admin']['login']) == count($GLOBALS['cache_array']['admin']['admin_id'])) {
+                       // Rewrite the cache
+                       $admins = array();
+                       foreach ($GLOBALS['cache_array']['admin']['login'] as $idx => $admin) {
+                               // Rewrite all entries
+                               foreach ($GLOBALS['cache_array']['admin'] as $key => $entry) {
+                                       // Do we have login or regular entries?
+                                       if ($key == 'admin_id') {
+                                               // Admin id, so use login
+                                               $admins[$key][$GLOBALS['cache_array']['admin']['login'][$idx]] = $entry[$idx];
+                                       } else {
+                                               // Regular entry so use id
+                                               $admins[$key][$GLOBALS['cache_array']['admin']['admin_id'][$idx]] = $entry[$idx];
+                                       }
+                               } // END - foreach
+                       } // END - foreach
+
+                       // Transfer back to cache array and remove dummy
+                       $GLOBALS['cache_array']['admin'] = $admins;
+                       unset($admins);
+               } else {
+                       // Nope, cache file is corrupted!
+                       $GLOBALS['cache_instance']->removeCacheFile();
+                       unset($GLOBALS['cache_array']['admin']);
+               }
+       } else {
+               // Nope, cache file is corrupted!
+               $GLOBALS['cache_instance']->removeCacheFile();
+               unset($GLOBALS['cache_array']['admin']);
+       }
+} elseif (isHtmlOutputMode()) {
+       // Create cache file
+       $GLOBALS['cache_instance']->init();
+
+       // Load every data from DB to cache file
+       $add = runFilterChain('sql_admin_extra_data');
+
+       // Query the database about this
+       $result_admins = SQL_QUERY('SELECT
+       `id` AS admin_id, `login`, `password`, `email`' . $add . '
+FROM
+       `{?_MYSQL_PREFIX?}_admins`
+ORDER BY
+       `login` ASC', __FILE__, __LINE__);
+       while ($dummy = SQL_FETCHARRAY($result_admins)) {
+               // Save row
+               $GLOBALS['cache_instance']->addRow($dummy);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result_admins);
+
+       // Close cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('admins');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// Next cached table are the admins_acls...
+if (isExtensionInstalledAndNewer('admins', '0.3')) {
+       // Check for cache file
+       if (($GLOBALS['cache_instance']->loadCacheFile('admin_acls')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
+               // Load referal system from cache
+               $GLOBALS['cache_array']['admin_acls'] = $GLOBALS['cache_instance']->getArrayFromCache();
+       } elseif (isHtmlOutputMode()) {
+               // Create cache file here
+               $GLOBALS['cache_instance']->init();
+
+               // Load all modules and their data (column 'id' is no longer required)
+               $result = SQL_QUERY('SELECT `admin_id`, `action_menu`, `what_menu`, `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` ORDER BY `admin_id` ASC, `action_menu` ASC, `what_menu` ASC', __FILE__, __LINE__);
+
+               // Add all rows
+               while ($content = SQL_FETCHARRAY($result)) {
+                       // Add row to cache file
+                       $GLOBALS['cache_instance']->addRow($content);
+               } // END - while
+
+               // Free memory
+               SQL_FREERESULT($result);
+
+               // Close cache
+               $GLOBALS['cache_instance']->storeExtensionVersion('admins');
+               $GLOBALS['cache_instance']->finalize();
+       }
+} // END - if
+
+// [EOF]
+?>
diff --git a/inc/loader/load-config.php b/inc/loader/load-config.php
new file mode 100644 (file)
index 0000000..169b9a3
--- /dev/null
@@ -0,0 +1,81 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
+ * ===================                          Last change: 09/09/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-config.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+}
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Next cached table is the configuration (config)...
+if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+       // Load config from cache
+       $config = $GLOBALS['cache_instance']->getArrayFromCache();
+
+       // Swap cache
+       foreach ($config as $entry => $array) {
+               // All config levels
+               foreach ($array as $key => $value) {
+                       $GLOBALS['cache_array']['config'][$key][$entry] = $value;
+               } // END - foreach
+       } // END - foreach
+
+       // Remove dummy array
+       unset($config);
+} elseif (isHtmlOutputMode()) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // Load all modules and their data
+       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_config` ORDER BY `config` ASC', __FILE__, __LINE__);
+       while ($content = SQL_FETCHARRAY($result)) {
+               // Add row to cache file
+               $GLOBALS['cache_instance']->addRow($content);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close the cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-extensions.php b/inc/loader/load-extensions.php
new file mode 100644 (file)
index 0000000..ed6443d
--- /dev/null
@@ -0,0 +1,187 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 06/26/2004 *
+ * ===================                          Last change: 07/01/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-extensions.php                              *
+ * -------------------------------------------------------------------- *
+ * Short description : Load all extensions                              *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Alle Erweiterungen laden                         *
+ * -------------------------------------------------------------------- *
+ * @TODO Rewrite this whole file                                        *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Next cached table is the extension
+if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+       // Load extension from cache
+       $EXT_DUMMY = $GLOBALS['cache_instance']->getArrayFromCache();
+
+       // Init extension inc-pool
+       $EXT_POOL = array();
+
+       // Do we have entries?
+       if (count($EXT_DUMMY) > 0) {
+               // Init arrays
+               $EXT_NAMES = array();
+
+               // Loop through all
+               foreach ($EXT_DUMMY['ext_name'] as $k => $name) {
+                       // Load CSS file
+                       if ($EXT_DUMMY['ext_css'][$k] == 'Y') addExtensionCssFile($name . '.css');
+
+                       // Load extension file itself
+                       if (($EXT_DUMMY['ext_active'][$k] == 'Y') || ($EXT_DUMMY['ext_keep'][$k] == 'Y')) {
+                               $EXT_POOL[] = $name;
+                       } // END - if
+
+                       // Version number
+                       $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k];
+                       unset($EXT_DUMMY['ext_version'][$k]);
+
+                       // Extension is active
+                       $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k];
+                       unset($EXT_DUMMY['ext_active'][$k]);
+
+                       // Ext menu
+                       $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k];
+                       unset($EXT_DUMMY['ext_menu'][$k]);
+
+                       // Language file
+                       $EXT_DUMMY['ext_lang'][$name] = $EXT_DUMMY['ext_lang'][$k];
+                       unset($EXT_DUMMY['ext_lang'][$k]);
+
+                       // Functions file
+                       $EXT_DUMMY['ext_func'][$name] = $EXT_DUMMY['ext_func'][$k];
+                       unset($EXT_DUMMY['ext_func'][$k]);
+
+                       // Extension id
+                       $EXT_DUMMY['ext_id'][$name] = $EXT_DUMMY['ext_id'][$k];
+                       $id = $EXT_DUMMY['ext_id'][$name];
+                       unset($EXT_DUMMY['ext_id'][$k]);
+
+                       // Add ext name
+                       $EXT_NAMES[$id] = $name;
+
+                       // Add deprecated flag (defaults to 'not deprecated')
+                       $EXT_DUMMY['ext_deprecated'][$name] = 'N';
+
+                       // Mark it as active extension
+                       $GLOBALS['cache_array']['always_active'][$name] = $EXT_DUMMY['ext_keep'][$k];
+                       unset($EXT_DUMMY['ext_keep'][$k]);
+
+                       // Remove unneccessary data from memory
+                       unset($EXT_DUMMY['ext_css'][$k]);
+               } // END - foreach
+
+               // Write dummy array back
+               $EXT_DUMMY['ext_name'] = $EXT_NAMES;
+               unset($EXT_NAMES);
+
+               // Loading cache is done so let's free some memory!
+               unset($EXT_DUMMY['ext_keep']);
+               unset($EXT_DUMMY['ext_css']);
+       } // END - if
+
+       // Transfer dummy array
+       $GLOBALS['cache_array']['extension'] = $EXT_DUMMY;
+       unset($EXT_DUMMY);
+
+       // No database load needed
+       $res_ext_crt = false;
+
+       // Load all extension files in test-mode (we initialize them later)
+       foreach ($EXT_POOL as $ext) {
+               loadExtension($ext, 'test');
+       } // END - foreach
+
+       // Remove array and mark cache as loaded
+       unset($EXT_POOL);
+} elseif (isHtmlOutputMode()) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // Add more if sql_patches is recent enougth
+       $add = '';
+       if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) $add = ", `ext_has_css` AS ext_css";
+
+       // Load all modules and their data
+       $result = SQL_QUERY('SELECT `id` AS ext_id, `ext_name`, `ext_active`, `ext_version`'.$add.' FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `ext_name` ASC', __FILE__, __LINE__);
+       while ($content = SQL_FETCHARRAY($result)) {
+               // Load extension
+               loadExtension($content['ext_name'], 'test');
+
+               // Get menu entry
+               $content['ext_menu'] = 'N';
+               if (ifModuleHasMenu($content['ext_name'], true)) {
+                       // Extension is a module and has menu... pew!
+                       $content['ext_menu'] = 'Y';
+               } // END - if
+
+               // Get language entry
+               $content['ext_lang'] = 'N';
+               if (isLanguageIncludeReadable($content['ext_name'])) {
+                       // Readable
+                       $content['ext_lang'] = 'Y';
+               } // END - if
+
+               // Get function entry
+               $content['ext_func'] = 'N';
+               if (isExtensionFunctionFileReadable($content['ext_name'])) {
+                       // Readable
+                       $content['ext_func'] = 'Y';
+               } // END - if
+
+               // Transfer EXT_ALWAYS_ACTIVE flag
+               $content['ext_keep'] = getExtensionAlwaysActive();
+
+               // Fix missing ext_css
+               if (!isset($content['ext_css'])) $content['ext_css'] = 'N';
+
+               // Add row to cache file
+               $GLOBALS['cache_instance']->addRow($content);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close the cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-filter.php b/inc/loader/load-filter.php
new file mode 100644 (file)
index 0000000..476f5f7
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 08/26/2008 *
+ * ===================                          Last change: 08/26/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-filter.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Next cached table is the filteruration (filter)...
+if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+       // Load filter from cache
+       $GLOBALS['cache_array']['filter'] = $GLOBALS['cache_instance']->getArrayFromCache();
+
+       // Prepare the array here
+       prepareFilterArray();
+} elseif ((isHtmlOutputMode()) && (isExtensionInstalled('sql_patches'))) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // Load all modules and their data
+       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_filters` ORDER BY `filter_name` ASC, `filter_id` ASC', __FILE__, __LINE__);
+       while ($content = SQL_FETCHARRAY($result)) {
+               // Add row to cache file
+               $GLOBALS['cache_instance']->addRow($content);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close the cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-imprint.php b/inc/loader/load-imprint.php
new file mode 100644 (file)
index 0000000..afe48ef
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
+ * ===================                          Last change: 10/24/2009 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-imprint.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} elseif (!isExtensionInstalled('imprint')) {
+       // Not not cache if not installed!
+       return;
+}
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Let's start with the admins table...
+if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) {
+       // Load cache
+       $GLOBALS['cache_array']['imprint'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif (isHtmlOutputMode()) {
+       // Create cache file
+       $GLOBALS['cache_instance']->init();
+
+       // Load every data from DB to cache file
+       $add = runFilterChain('sql_admin_extra_data');
+
+       // Query the database about this
+       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_imprint_data` ORDER BY `imprint_id` ASC', __FILE__, __LINE__);
+       while ($dummy = SQL_FETCHARRAY($result)) {
+               // Save row
+               $GLOBALS['cache_instance']->addRow($dummy);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('imprint');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-modules.php b/inc/loader/load-modules.php
new file mode 100644 (file)
index 0000000..2cb56fa
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
+ * ===================                          Last change: 09/09/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-modules.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Next cached table is the module registry (mod_reg)...
+if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+       // Load cache
+       $GLOBALS['cache_array']['modules'] = $GLOBALS['cache_instance']->getArrayFromCache();
+
+       // Rewrite module cache
+       $modArray = $GLOBALS['cache_array']['modules'];
+
+       // Do only process valid arrays
+       if (!isset($modArray['module'])) {
+               // We should fix this!
+               debug_report_bug(__FILE__, __LINE__, 'modArray=<pre>'.print_r($modArray, true).'</pre>');
+       } // END - if
+
+       // Rewrite some parts
+       foreach ($modArray['module'] as $key => $mod) {
+               // Default without sql_patches
+               $entries = array('id','title','locked','hidden','admin_only','mem_only');
+
+               // Is ext-sql_patches newer or equal 0.3.6?
+               if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
+                       // Add 'has_menu'
+                       $entries[] = 'has_menu';
+               } // END - if
+
+               // Add all
+               foreach ($entries as $entry) {
+                       // Is the entry set?
+                       if (isset($GLOBALS['cache_array']['modules'][$entry][$key])) {
+                               // Transfer it
+                               $GLOBALS['cache_array']['modules'][$entry][$mod] = $modArray[$entry][$key];
+
+                               // And delete cache
+                               unset($GLOBALS['cache_array']['modules'][$entry][$key]);
+                       } else {
+                               // Log this for debug purposes
+                               logDebugMessage(basename(__FILE__), __LINE__, 'Entry not found. module=' . $mod . ',key=' . $key . ',entry=' . $entry);
+                       }
+               } // END - foreach
+       } // END - foreach
+       unset($modArray);
+} elseif (isHtmlOutputMode()) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // Load all modules and their data
+       if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
+               // Load has_menu
+               $result = SQL_QUERY('SELECT
+       `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`, `has_menu`
+FROM
+       `{?_MYSQL_PREFIX?}_mod_reg`
+ORDER BY
+       `module` ASC', __FILE__, __LINE__);
+       } else {
+               // Don't load has_menu
+               $result = SQL_QUERY('SELECT
+       `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`
+FROM
+       `{?_MYSQL_PREFIX?}_mod_reg`
+ORDER BY
+       `module` ASC', __FILE__, __LINE__);
+       }
+
+       // Cache all data
+       while ($content = SQL_FETCHARRAY($result)) {
+               // Add row to cache file
+               $GLOBALS['cache_instance']->addRow($content);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close the cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-refdepths.php b/inc/loader/load-refdepths.php
new file mode 100644 (file)
index 0000000..fe4154c
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
+ * ===================                          Last change: 09/09/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-config.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+}
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Next cached table is the referal system (refdepths)...
+if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+       // Load referal system from cache
+       $GLOBALS['cache_array']['refdepths'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif (isHtmlOutputMode()) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // Load all modules and their data
+       $result = SQL_QUERY('SELECT id, level, percents FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level', __FILE__, __LINE__);
+       while ($content = SQL_FETCHARRAY($result)) {
+               // Add row to cache file
+               $GLOBALS['cache_instance']->addRow($content);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close the cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-refsystem.php b/inc/loader/load-refsystem.php
new file mode 100644 (file)
index 0000000..ef1b798
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
+ * ===================                          Last change: 09/09/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-config.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+}
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Next cached table is the referal system (refsystem)...
+if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+       // Load referal system from cache
+       $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif (isHtmlOutputMode()) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // Load all modules and their data
+       $result = SQL_QUERY('SELECT `id`, `userid`, `level`, `counter` FROM `{?_MYSQL_PREFIX?}_refsystem` ORDER BY `userid` ASC, `level` ASC', __FILE__, __LINE__);
+       while ($content = SQL_FETCHARRAY($result)) {
+               // Add row to cache file
+               $GLOBALS['cache_instance']->addRow($content);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close the cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-revision.php b/inc/loader/load-revision.php
new file mode 100644 (file)
index 0000000..58ad516
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
+ * ===================                          Last change: 09/09/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-revision.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// Next cached table is the revision...
+if ($GLOBALS['cache_instance']->loadCacheFile('revision')) {
+       // Load revision from cache
+       $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif ((isHtmlOutputMode())) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // add the new RevInfos in and saves it to the cache
+       $GLOBALS['cache_instance']->addRow(getArrayFromRepositoryData());
+
+       // Close the cache
+       $GLOBALS['cache_instance']->finalize();
+
+       // Generate FQFN for old revision file
+       $FQFN = sprintf("%s/.revision", getCachePath());
+
+       // Is it there?
+       if (isFileReadable($FQFN)) {
+               // Then remove it
+               removeFile($FQFN);
+       } // END - if
+}
+
+// [EOF]
+?>
diff --git a/inc/loader/load-themes.php b/inc/loader/load-themes.php
new file mode 100644 (file)
index 0000000..033b686
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/15/2008 *
+ * ===================                          Last change: 09/15/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : load-themes.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Load more cache files                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} elseif (!isExtensionActive('theme')) {
+       // Skip this loader
+       return false;
+}
+
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// Next cached table is the referal system (themes)...
+if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_instance']->extensionVersionMatches('theme'))) {
+       // Load referal system from cache
+       $cache = $GLOBALS['cache_instance']->getArrayFromCache();
+
+       // Restructure the array
+       $GLOBALS['cache_array']['themes'] = array();
+       foreach ($cache as $key => $content) {
+               // Skip 'theme_path' because we don't need to rebuild it
+               if ($key == 'theme_path') {
+                       // Add entries with id
+                       foreach ($content as $id => $entry) {
+                               $GLOBALS['cache_array']['themes']['theme_path'][$cache['id'][$id]] = $entry;
+                       } // END - foreach
+               } else {
+                       // Add all themes with theme name as array index
+                       foreach ($content as $id => $entry) {
+                               $GLOBALS['cache_array']['themes'][$key][$cache['theme_path'][$id]] = $entry;
+                       } // END - foreach
+               }
+       } // END - foreach
+
+       // Remove dummy array
+       unset($cache);
+} elseif (isHtmlOutputMode()) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init();
+
+       // Load all themes and their data
+       if (isExtensionInstalledAndNewer('theme', '0.0.7')) {
+               $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__);
+       } else {
+               $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__);
+       }
+       while ($content = SQL_FETCHARRAY($result)) {
+               // Add row to cache file
+               $GLOBALS['cache_instance']->addRow($content);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Close the cache
+       $GLOBALS['cache_instance']->storeExtensionVersion('theme');
+       $GLOBALS['cache_instance']->finalize();
+}
+
+// [EOF]
+?>
index e8ce4032e5b57cb5f644ee6d42dab7720271380e..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,73 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
- * ===================                          Last change: 10/24/2009 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-                                      *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-//if (isInstallationPhase()) return;
-
-// Let's start with the admins table...
-if (($GLOBALS['cache_instance']->loadCacheFile('foo')) && ($GLOBALS['cache_instance']->extensionVersionMatches('foo'))) {
-       // Load cache
-       $GLOBALS['cache_array']['foo'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (isHtmlMode()) {
-       // Create cache file
-       $GLOBALS['cache_instance']->init();
-
-       // Load every data from DB to cache file
-       $add = runFilterChain('sql_admin_extra_data');
-
-       // Query the database about this
-       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_foos` ORDER BY `some_bar` ASC', __FILE__, __LINE__);
-       while ($dummy = SQL_FETCHARRAY($result)) {
-               // Save row
-               $GLOBALS['cache_instance']->addRow($dummy);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('foo');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index 5c94bb3ca652df33f380f20c18868d1d9b9b3108..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,140 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-config.php                            *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Let's start with the admins table...
-if (($GLOBALS['cache_instance']->loadCacheFile('admin')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
-       // Load cache
-       $GLOBALS['cache_array']['admin'] = $GLOBALS['cache_instance']->getArrayFromCache();
-
-       // Check if valid
-       if ((isset($GLOBALS['cache_array']['admin']['login'])) && (is_array($GLOBALS['cache_array']['admin']['login'])) && (is_array($GLOBALS['cache_array']['admin']['admin_id']))) {
-               // Check count
-               if (count($GLOBALS['cache_array']['admin']['login']) == count($GLOBALS['cache_array']['admin']['admin_id'])) {
-                       // Rewrite the cache
-                       $admins = array();
-                       foreach ($GLOBALS['cache_array']['admin']['login'] as $idx => $admin) {
-                               // Rewrite all entries
-                               foreach ($GLOBALS['cache_array']['admin'] as $key => $entry) {
-                                       // Do we have login or regular entries?
-                                       if ($key == 'admin_id') {
-                                               // Admin id, so use login
-                                               $admins[$key][$GLOBALS['cache_array']['admin']['login'][$idx]] = $entry[$idx];
-                                       } else {
-                                               // Regular entry so use id
-                                               $admins[$key][$GLOBALS['cache_array']['admin']['admin_id'][$idx]] = $entry[$idx];
-                                       }
-                               } // END - foreach
-                       } // END - foreach
-
-                       // Transfer back to cache array and remove dummy
-                       $GLOBALS['cache_array']['admin'] = $admins;
-                       unset($admins);
-               } else {
-                       // Nope, cache file is corrupted!
-                       $GLOBALS['cache_instance']->removeCacheFile();
-                       unset($GLOBALS['cache_array']['admin']);
-               }
-       } else {
-               // Nope, cache file is corrupted!
-               $GLOBALS['cache_instance']->removeCacheFile();
-               unset($GLOBALS['cache_array']['admin']);
-       }
-} elseif (isHtmlOutputMode()) {
-       // Create cache file
-       $GLOBALS['cache_instance']->init();
-
-       // Load every data from DB to cache file
-       $add = runFilterChain('sql_admin_extra_data');
-
-       // Query the database about this
-       $result_admins = SQL_QUERY('SELECT
-       `id` AS admin_id, `login`, `password`, `email`' . $add . '
-FROM
-       `{?_MYSQL_PREFIX?}_admins`
-ORDER BY
-       `login` ASC', __FILE__, __LINE__);
-       while ($dummy = SQL_FETCHARRAY($result_admins)) {
-               // Save row
-               $GLOBALS['cache_instance']->addRow($dummy);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result_admins);
-
-       // Close cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('admins');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// Next cached table are the admins_acls...
-if (isExtensionInstalledAndNewer('admins', '0.3')) {
-       // Check for cache file
-       if (($GLOBALS['cache_instance']->loadCacheFile('admin_acls')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
-               // Load referal system from cache
-               $GLOBALS['cache_array']['admin_acls'] = $GLOBALS['cache_instance']->getArrayFromCache();
-       } elseif (isHtmlOutputMode()) {
-               // Create cache file here
-               $GLOBALS['cache_instance']->init();
-
-               // Load all modules and their data (column 'id' is no longer required)
-               $result = SQL_QUERY('SELECT `admin_id`, `action_menu`, `what_menu`, `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` ORDER BY `admin_id` ASC, `action_menu` ASC, `what_menu` ASC', __FILE__, __LINE__);
-
-               // Add all rows
-               while ($content = SQL_FETCHARRAY($result)) {
-                       // Add row to cache file
-                       $GLOBALS['cache_instance']->addRow($content);
-               } // END - while
-
-               // Free memory
-               SQL_FREERESULT($result);
-
-               // Close cache
-               $GLOBALS['cache_instance']->storeExtensionVersion('admins');
-               $GLOBALS['cache_instance']->finalize();
-       }
-} // END - if
-
-// [EOF]
+// @DEPRECATED
 ?>
index 1bf71bbc64fdccbd6935d22e712d681ecb22170f..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,81 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-config.php                            *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-}
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Next cached table is the configuration (config)...
-if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
-       // Load config from cache
-       $config = $GLOBALS['cache_instance']->getArrayFromCache();
-
-       // Swap cache
-       foreach ($config as $entry => $array) {
-               // All config levels
-               foreach ($array as $key => $value) {
-                       $GLOBALS['cache_array']['config'][$key][$entry] = $value;
-               } // END - foreach
-       } // END - foreach
-
-       // Remove dummy array
-       unset($config);
-} elseif (isHtmlOutputMode()) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // Load all modules and their data
-       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_config` ORDER BY `config` ASC', __FILE__, __LINE__);
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Add row to cache file
-               $GLOBALS['cache_instance']->addRow($content);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close the cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index d288f7827d0039b30328db004b42a52f2526b07d..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,187 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 06/26/2004 *
- * ===================                          Last change: 07/01/2005 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-extensions.php                        *
- * -------------------------------------------------------------------- *
- * Short description : Load all extensions                              *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Alle Erweiterungen laden                         *
- * -------------------------------------------------------------------- *
- * @TODO Rewrite this whole file to load_cache-extensions.php           *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Next cached table is the extension
-if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
-       // Load extension from cache
-       $EXT_DUMMY = $GLOBALS['cache_instance']->getArrayFromCache();
-
-       // Init extension inc-pool
-       $EXT_POOL = array();
-
-       // Do we have entries?
-       if (count($EXT_DUMMY) > 0) {
-               // Init arrays
-               $EXT_NAMES = array();
-
-               // Loop through all
-               foreach ($EXT_DUMMY['ext_name'] as $k => $name) {
-                       // Load CSS file
-                       if ($EXT_DUMMY['ext_css'][$k] == 'Y') addExtensionCssFile($name . '.css');
-
-                       // Load extension file itself
-                       if (($EXT_DUMMY['ext_active'][$k] == 'Y') || ($EXT_DUMMY['ext_keep'][$k] == 'Y')) {
-                               $EXT_POOL[] = $name;
-                       } // END - if
-
-                       // Version number
-                       $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k];
-                       unset($EXT_DUMMY['ext_version'][$k]);
-
-                       // Extension is active
-                       $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k];
-                       unset($EXT_DUMMY['ext_active'][$k]);
-
-                       // Ext menu
-                       $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k];
-                       unset($EXT_DUMMY['ext_menu'][$k]);
-
-                       // Language file
-                       $EXT_DUMMY['ext_lang'][$name] = $EXT_DUMMY['ext_lang'][$k];
-                       unset($EXT_DUMMY['ext_lang'][$k]);
-
-                       // Functions file
-                       $EXT_DUMMY['ext_func'][$name] = $EXT_DUMMY['ext_func'][$k];
-                       unset($EXT_DUMMY['ext_func'][$k]);
-
-                       // Extension id
-                       $EXT_DUMMY['ext_id'][$name] = $EXT_DUMMY['ext_id'][$k];
-                       $id = $EXT_DUMMY['ext_id'][$name];
-                       unset($EXT_DUMMY['ext_id'][$k]);
-
-                       // Add ext name
-                       $EXT_NAMES[$id] = $name;
-
-                       // Add deprecated flag (defaults to 'not deprecated')
-                       $EXT_DUMMY['ext_deprecated'][$name] = 'N';
-
-                       // Mark it as active extension
-                       $GLOBALS['cache_array']['always_active'][$name] = $EXT_DUMMY['ext_keep'][$k];
-                       unset($EXT_DUMMY['ext_keep'][$k]);
-
-                       // Remove unneccessary data from memory
-                       unset($EXT_DUMMY['ext_css'][$k]);
-               } // END - foreach
-
-               // Write dummy array back
-               $EXT_DUMMY['ext_name'] = $EXT_NAMES;
-               unset($EXT_NAMES);
-
-               // Loading cache is done so let's free some memory!
-               unset($EXT_DUMMY['ext_keep']);
-               unset($EXT_DUMMY['ext_css']);
-       } // END - if
-
-       // Transfer dummy array
-       $GLOBALS['cache_array']['extension'] = $EXT_DUMMY;
-       unset($EXT_DUMMY);
-
-       // No database load needed
-       $res_ext_crt = false;
-
-       // Load all extension files in test-mode (we initialize them later)
-       foreach ($EXT_POOL as $ext) {
-               loadExtension($ext, 'test');
-       } // END - foreach
-
-       // Remove array and mark cache as loaded
-       unset($EXT_POOL);
-} elseif (isHtmlOutputMode()) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // Add more if sql_patches is recent enougth
-       $add = '';
-       if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) $add = ", `ext_has_css` AS ext_css";
-
-       // Load all modules and their data
-       $result = SQL_QUERY('SELECT `id` AS ext_id, `ext_name`, `ext_active`, `ext_version`'.$add.' FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `ext_name` ASC', __FILE__, __LINE__);
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Load extension
-               loadExtension($content['ext_name'], 'test');
-
-               // Get menu entry
-               $content['ext_menu'] = 'N';
-               if (ifModuleHasMenu($content['ext_name'], true)) {
-                       // Extension is a module and has menu... pew!
-                       $content['ext_menu'] = 'Y';
-               } // END - if
-
-               // Get language entry
-               $content['ext_lang'] = 'N';
-               if (isLanguageIncludeReadable($content['ext_name'])) {
-                       // Readable
-                       $content['ext_lang'] = 'Y';
-               } // END - if
-
-               // Get function entry
-               $content['ext_func'] = 'N';
-               if (isExtensionFunctionFileReadable($content['ext_name'])) {
-                       // Readable
-                       $content['ext_func'] = 'Y';
-               } // END - if
-
-               // Transfer EXT_ALWAYS_ACTIVE flag
-               $content['ext_keep'] = getExtensionAlwaysActive();
-
-               // Fix missing ext_css
-               if (!isset($content['ext_css'])) $content['ext_css'] = 'N';
-
-               // Add row to cache file
-               $GLOBALS['cache_instance']->addRow($content);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close the cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index bbc358114a47b033432d908c6e2559b5e767372e..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,73 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 08/26/2008 *
- * ===================                          Last change: 08/26/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-filter.php                            *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Next cached table is the filteruration (filter)...
-if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
-       // Load filter from cache
-       $GLOBALS['cache_array']['filter'] = $GLOBALS['cache_instance']->getArrayFromCache();
-
-       // Prepare the array here
-       prepareFilterArray();
-} elseif ((isHtmlOutputMode()) && (isExtensionInstalled('sql_patches'))) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // Load all modules and their data
-       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_filters` ORDER BY `filter_name` ASC, `filter_id` ASC', __FILE__, __LINE__);
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Add row to cache file
-               $GLOBALS['cache_instance']->addRow($content);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close the cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index 34e9cb046d7a535bc188dbba54d47edf3f70edcc..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,76 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
- * ===================                          Last change: 10/24/2009 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-                                      *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} elseif (!isExtensionInstalled('imprint')) {
-       // Not not cache if not installed!
-       return;
-}
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Let's start with the admins table...
-if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) {
-       // Load cache
-       $GLOBALS['cache_array']['imprint'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (isHtmlOutputMode()) {
-       // Create cache file
-       $GLOBALS['cache_instance']->init();
-
-       // Load every data from DB to cache file
-       $add = runFilterChain('sql_admin_extra_data');
-
-       // Query the database about this
-       $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_imprint_data` ORDER BY `imprint_id` ASC', __FILE__, __LINE__);
-       while ($dummy = SQL_FETCHARRAY($result)) {
-               // Save row
-               $GLOBALS['cache_instance']->addRow($dummy);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('imprint');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index 64a99d3f8bb9f82fcf6446952396e1679edc7aab..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,125 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-modules.php                           *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Next cached table is the module registry (mod_reg)...
-if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
-       // Load cache
-       $GLOBALS['cache_array']['modules'] = $GLOBALS['cache_instance']->getArrayFromCache();
-
-       // Rewrite module cache
-       $modArray = $GLOBALS['cache_array']['modules'];
-
-       // Do only process valid arrays
-       if (!isset($modArray['module'])) {
-               // We should fix this!
-               debug_report_bug(__FILE__, __LINE__, 'modArray=<pre>'.print_r($modArray, true).'</pre>');
-       } // END - if
-
-       // Rewrite some parts
-       foreach ($modArray['module'] as $key => $mod) {
-               // Default without sql_patches
-               $entries = array('id','title','locked','hidden','admin_only','mem_only');
-
-               // Is ext-sql_patches newer or equal 0.3.6?
-               if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
-                       // Add 'has_menu'
-                       $entries[] = 'has_menu';
-               } // END - if
-
-               // Add all
-               foreach ($entries as $entry) {
-                       // Is the entry set?
-                       if (isset($GLOBALS['cache_array']['modules'][$entry][$key])) {
-                               // Transfer it
-                               $GLOBALS['cache_array']['modules'][$entry][$mod] = $modArray[$entry][$key];
-
-                               // And delete cache
-                               unset($GLOBALS['cache_array']['modules'][$entry][$key]);
-                       } else {
-                               // Log this for debug purposes
-                               logDebugMessage(basename(__FILE__), __LINE__, 'Entry not found. module=' . $mod . ',key=' . $key . ',entry=' . $entry);
-                       }
-               } // END - foreach
-       } // END - foreach
-       unset($modArray);
-} elseif (isHtmlOutputMode()) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // Load all modules and their data
-       if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
-               // Load has_menu
-               $result = SQL_QUERY('SELECT
-       `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`, `has_menu`
-FROM
-       `{?_MYSQL_PREFIX?}_mod_reg`
-ORDER BY
-       `module` ASC', __FILE__, __LINE__);
-       } else {
-               // Don't load has_menu
-               $result = SQL_QUERY('SELECT
-       `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`
-FROM
-       `{?_MYSQL_PREFIX?}_mod_reg`
-ORDER BY
-       `module` ASC', __FILE__, __LINE__);
-       }
-
-       // Cache all data
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Add row to cache file
-               $GLOBALS['cache_instance']->addRow($content);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close the cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index d13995f2df112c8fe83b06ba5e130c31350a408f..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,70 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-config.php                            *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-}
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Next cached table is the referal system (refdepths)...
-if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
-       // Load referal system from cache
-       $GLOBALS['cache_array']['refdepths'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (isHtmlOutputMode()) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // Load all modules and their data
-       $result = SQL_QUERY('SELECT id, level, percents FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level', __FILE__, __LINE__);
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Add row to cache file
-               $GLOBALS['cache_instance']->addRow($content);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close the cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index b73baceca39316d8ba124ddad3f75849a3f7a3fd..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,70 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-config.php                            *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-}
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Next cached table is the referal system (refsystem)...
-if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
-       // Load referal system from cache
-       $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (isHtmlOutputMode()) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // Load all modules and their data
-       $result = SQL_QUERY('SELECT `id`, `userid`, `level`, `counter` FROM `{?_MYSQL_PREFIX?}_refsystem` ORDER BY `userid` ASC, `level` ASC', __FILE__, __LINE__);
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Add row to cache file
-               $GLOBALS['cache_instance']->addRow($content);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close the cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index d15d410c30a41aae86a776ab6d0582f1c6dbbcfa..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,68 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-revision.php                          *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} // END - if
-
-// Next cached table is the revision...
-if ($GLOBALS['cache_instance']->loadCacheFile('revision')) {
-       // Load revision from cache
-       $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((isHtmlOutputMode())) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // add the new RevInfos in and saves it to the cache
-       $GLOBALS['cache_instance']->addRow(getArrayFromRepositoryData());
-
-       // Close the cache
-       $GLOBALS['cache_instance']->finalize();
-
-       // Generate FQFN for old revision file
-       $FQFN = sprintf("%s/.revision", getCachePath());
-
-       // Is it there?
-       if (isFileReadable($FQFN)) {
-               // Then remove it
-               removeFile($FQFN);
-       } // END - if
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index a6eb3cb4a734e6f924a105a86c990d9f42ab4846..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,97 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/15/2008 *
- * ===================                          Last change: 09/15/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : load_cache-them.php                              *
- * -------------------------------------------------------------------- *
- * Short description : Load more cache files                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Mehr Cache-Dateien nachladen                     *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-} elseif (!isExtensionActive('theme')) {
-       // Skip this loader
-       return false;
-}
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
-// Next cached table is the referal system (themes)...
-if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_instance']->extensionVersionMatches('theme'))) {
-       // Load referal system from cache
-       $cache = $GLOBALS['cache_instance']->getArrayFromCache();
-
-       // Restructure the array
-       $GLOBALS['cache_array']['themes'] = array();
-       foreach ($cache as $key => $content) {
-               // Skip 'theme_path' because we don't need to rebuild it
-               if ($key == 'theme_path') {
-                       // Add entries with id
-                       foreach ($content as $id => $entry) {
-                               $GLOBALS['cache_array']['themes']['theme_path'][$cache['id'][$id]] = $entry;
-                       } // END - foreach
-               } else {
-                       // Add all themes with theme name as array index
-                       foreach ($content as $id => $entry) {
-                               $GLOBALS['cache_array']['themes'][$key][$cache['theme_path'][$id]] = $entry;
-                       } // END - foreach
-               }
-       } // END - foreach
-
-       // Remove dummy array
-       unset($cache);
-} elseif (isHtmlOutputMode()) {
-       // Create cache file here
-       $GLOBALS['cache_instance']->init();
-
-       // Load all themes and their data
-       if (isExtensionInstalledAndNewer('theme', '0.0.7')) {
-               $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__);
-       } else {
-               $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__);
-       }
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Add row to cache file
-               $GLOBALS['cache_instance']->addRow($content);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // Close the cache
-       $GLOBALS['cache_instance']->storeExtensionVersion('theme');
-       $GLOBALS['cache_instance']->finalize();
-}
-
-// [EOF]
+// @DEPRECATED
 ?>