]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load_cache-filter.php
Renamed function so it might be more understandable
[mailer.git] / inc / loader / load_cache-filter.php
index b158b05f9929c47aa7aef93d58513e6782baa658..bbc358114a47b033432d908c6e2559b5e767372e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 08/26/2008 *
- * ===============                              Last change: 08/26/2008 *
+ * Mailer v0.2.1-FINAL                                Start: 08/26/2008 *
+ * ===================                          Last change: 08/26/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : load_cache-filter.php                            *
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * 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 *
@@ -41,13 +40,19 @@ 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();
-} elseif ((getOutputMode() != '1') && (isExtensionInstalled('sql_patches'))) {
+
+       // Prepare the array here
+       prepareFilterArray();
+} elseif ((isHtmlOutputMode()) && (isExtensionInstalled('sql_patches'))) {
        // Create cache file here
-       $GLOBALS['cache_instance']->init('FILTER');
+       $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__);
@@ -62,9 +67,6 @@ if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_in
        // Close the cache
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
        $GLOBALS['cache_instance']->finalize();
-
-       // Include loader again
-       loadInclude('inc/loader/'.basename(__FILE__));
 }
 
 // [EOF]