Missing cache loader added from stelzi's branch
authorRoland Häder <roland@mxchange.org>
Sat, 7 Mar 2009 03:53:29 +0000 (03:53 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Mar 2009 03:53:29 +0000 (03:53 +0000)
DOCS/TODOs.txt
inc/loader/load_cache-config.php
inc/loader/load_cache-revision.php [new file with mode: 0644]

index 2d5c0b5..45c32b2 100644 (file)
@@ -8,16 +8,17 @@
 ./inc/functions.php:1303:      // @TODO Remove this if() block if all is working fine
 ./inc/functions.php:1603:              // @TODO This can be, somehow, rewritten
 ./inc/functions.php:2330:// @TODO Rewrite all language constants to this function.
-./inc/functions.php:2563:                      $GLOBALS['cache_instance']->destroyCacheFile(); // @TODO isn't it better to do $GLOBALS['cache_instance']->destroyCacheFile('revision')?
-./inc/functions.php:2565:                      // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')?
+./inc/functions.php:2579:                      $GLOBALS['cache_instance']->destroyCacheFile(); // @TODO isn't it better to do $GLOBALS['cache_instance']->destroyCacheFile('revision')?
+./inc/functions.php:2581:                      // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')?
 ./inc/functions.php:259:                       // @TODO Fine all templates which are using these direct variables and rewrite them.
 ./inc/functions.php:260:                       // @TODO After this step is done, this else-block is history
-./inc/functions.php:2712:              // @TODO Add a little more infos here
-./inc/functions.php:2722:      // @TODO This cannot be rewritten to mxchange_die(), try to find a solution for this.
-./inc/functions.php:2819:// @TODO Implement $compress
-./inc/functions.php:2826:// @TODO Implement $decompress
-./inc/functions.php:2929:      // @TODO We may want to switch over to UTF-8 here!
-./inc/functions.php:2937:// @TODO Rewrite this function to use READ_FILE() and WRITE_FILE()
+./inc/functions.php:2658:      // @TODO What does this loop/regex do? Document it, please.
+./inc/functions.php:2751:              // @TODO Add a little more infos here
+./inc/functions.php:2761:      // @TODO This cannot be rewritten to mxchange_die(), try to find a solution for this.
+./inc/functions.php:2858:// @TODO Implement $compress
+./inc/functions.php:2865:// @TODO Implement $decompress
+./inc/functions.php:2968:      // @TODO We may want to switch over to UTF-8 here!
+./inc/functions.php:2976:// @TODO Rewrite this function to use READ_FILE() and WRITE_FILE()
 ./inc/functions.php:475:// @TODO Rewrite this to an extension 'smtp'
 ./inc/language/rallye_de.php:110:// @TODO Rewrite following two lines to one
 ./inc/language/sponsor_de.php:124:// @TODO These three constants should be moved into a template
@@ -27,7 +28,7 @@
 ./inc/libs/nickname_functions.php:59:          // @TODO Can we replace this with GET_TOTAL_DATA() ?
 ./inc/libs/rallye_functions.php:635:   $EXPIRE = getConfig('one_day') * 3; // @TODO The hard-coded value...
 ./inc/libs/rallye_functions.php:665:                   // @TODO Rewrite this to a function
-./inc/libs/rallye_functions.php:704:           // @TODO Rewrite this to our API function
+./inc/libs/rallye_functions.php:702:           // @TODO Rewrite this to our API function
 ./inc/libs/register_functions.php:53:          // @TODO Rewrite these constants
 ./inc/libs/surfbar_functions.php:1425:         // @TODO This can be somehow rewritten
 ./inc/libs/surfbar_functions.php:917:  // @TODO Invalid salt should be refused
@@ -37,7 +38,6 @@
 ./inc/libs/user_functions.php:335:                     // @TODO Make this filter working: $URL = runFilterChain('do_login', array('uid' => $uid, 'hash' => $hash, 'addon' => $ADDON));
 ./inc/libs/user_functions.php:370:             // @TODO Can this query be merged with above query?
 ./inc/libs/yoomedia_functions.php:65:  $response = YOOMEDIA_QUERY_API("out_textmail.php", true); // @TODO Ask Yoo!Media for test script
-./inc/loader/load_cache-config.php:50: // @TODO: Do we really need to cache the config???
 ./inc/load_extensions.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php           *
 ./inc/mails/birthday_mails.php:85:                     // @TODO 4 is hard-coded here, should we move it out in config?
 ./inc/modules/admin/admin-inc.php:343:         // @TODO Rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/admin/what-usr_online.php:107:           // @TODO Rewrite this constant
 ./inc/modules/admin/what-usr_online.php:51:    // @TODO Rewrite these constants
 ./inc/modules/admin/what-usr_online.php:52:    // @TODO Add a filter for sponsor
-./inc/modules/guest/what-mediadata.php:183:// @TODO Rewrite these all if-blocks to filters
+./inc/modules/guest/what-mediadata.php:186:// @TODO Rewrite these all if-blocks to filters
+./inc/modules/guest/what-mediadata.php:49:// @TODO Rewrite all constants
+./inc/modules/guest/what-mediadata.php:69:     // @TODO Find a better formular than this one
 ./inc/modules/guest/what-register.php:201:     // @TODO Rewrite this to a single filter
 ./inc/modules/guest/what-sponsor_infos.php:67:         // @TODO Rewritings: conv->conv_rate,name->conv_name in template
 ./inc/modules/guest/what-sponsor_infos.php:87:                 // @TODO Rewritings: name->pay_name,min->pay_min_count,min->pay_min_count,curr->pay_currency
index 84af342..49402d5 100644 (file)
@@ -46,8 +46,6 @@ if (!defined('__SECURITY')) {
 if (($GLOBALS['cache_instance']->loadCacheFile("config", true)) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
        // Load config from cache
        $GLOBALS['cache_array']['config'] = $GLOBALS['cache_instance']->getArrayFromCache();
-
-       // @TODO: Do we really need to cache the config???
 } elseif ((getConfig('cache_config') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
        // Create cache file here
        $GLOBALS['cache_instance']->init("CONFIG");
diff --git a/inc/loader/load_cache-revision.php b/inc/loader/load_cache-revision.php
new file mode 100644 (file)
index 0000000..dfe402d
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    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:: 836                                                    $ *
+ * $Date:: 2009-03-06 13:07:03 +0100 (Fri, 06 Mar 2009)               $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: stelzi                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * 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')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Next cached table is the revision...
+if (($GLOBALS['cache_instance']->loadCacheFile("revision", true))) {
+       // Load revision from cache
+       $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+       // Create cache file here
+       $GLOBALS['cache_instance']->init("REVISION");
+
+       // add the new RevInfos in and saves it to the cache
+       $GLOBALS['cache_instance']->addRow(getAkt_vers());
+
+       // Close the cache
+       $GLOBALS['cache_instance']->finalize();
+
+       // Include loader again
+       require(__FILE__);
+}
+
+//
+?>