[TEP-COMMIT] CVS: catalog/catalog/includes/functions cache.php,1.12,1.13
Harald Ponce de Leon <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tep/catalog/catalog/includes/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv2827/functions
Modified Files:
cache.php
Log Message:
use the new session class
use the super global variables
Index: cache.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/functions/cache.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cache.php 25 Sep 2003 08:34:27 -0000 1.12
+++ cache.php 17 Nov 2003 18:37:38 -0000 1.13
@@ -98,14 +98,14 @@
//! Cache the categories box
// Cache the categories box
function tep_cache_categories_box($auto_expire = false, $refresh = false) {
- global $cPath, $language, $languages_id, $tree, $cPath_array, $categories_string;
+ global $osC_Session, $cPath, $tree, $cPath_array, $categories_string;
- if (($refresh == true) || !read_cache($cache_output, 'categories_box-' . $language . '.cache' . $cPath, $auto_expire)) {
+ if (($refresh == true) || !read_cache($cache_output, 'categories_box-' . $osC_Session->value('language') . '.cache' . $cPath, $auto_expire)) {
ob_start();
include(DIR_WS_BOXES . 'categories.php');
$cache_output = ob_get_contents();
ob_end_clean();
- write_cache($cache_output, 'categories_box-' . $language . '.cache' . $cPath);
+ write_cache($cache_output, 'categories_box-' . $osC_Session->value('language') . '.cache' . $cPath);
}
return $cache_output;
@@ -115,19 +115,23 @@
//! Cache the manufacturers box
// Cache the manufacturers box
function tep_cache_manufacturers_box($auto_expire = false, $refresh = false) {
- global $HTTP_GET_VARS, $language;
+ global $osC_Session;
+
+ if (PHP_VERSION < 4.1) {
+ global $_GET;
+ }
$manufacturers_id = '';
- if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
- $manufacturers_id = $HTTP_GET_VARS['manufacturers_id'];
+ if (isset($_GET['manufactuers_id']) && tep_not_null($_GET['manufacturers_id'])) {
+ $manufacturers_id = $_GET['manufacturers_id'];
}
- if (($refresh == true) || !read_cache($cache_output, 'manufacturers_box-' . $language . '.cache' . $manufacturers_id, $auto_expire)) {
+ if (($refresh == true) || !read_cache($cache_output, 'manufacturers_box-' . $osC_Session->value('language') . '.cache' . $manufacturers_id, $auto_expire)) {
ob_start();
include(DIR_WS_BOXES . 'manufacturers.php');
$cache_output = ob_get_contents();
ob_end_clean();
- write_cache($cache_output, 'manufacturers_box-' . $language . '.cache' . $manufacturers_id);
+ write_cache($cache_output, 'manufacturers_box-' . $osC_Session->value('language') . '.cache' . $manufacturers_id);
}
return $cache_output;
@@ -137,14 +141,18 @@
//! Cache the also purchased module
// Cache the also purchased module
function tep_cache_also_purchased($auto_expire = false, $refresh = false) {
- global $HTTP_GET_VARS, $language, $languages_id;
+ global $osC_Session;
- if (($refresh == true) || !read_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) {
+ if (PHP_VERSION < 4.1) {
+ global $_GET;
+ }
+
+ if (($refresh == true) || !read_cache($cache_output, 'also_purchased-' . $osC_Session->value('language') . '.cache' . $_GET['products_id'], $auto_expire)) {
ob_start();
include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
$cache_output = ob_get_contents();
ob_end_clean();
- write_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id']);
+ write_cache($cache_output, 'also_purchased-' . $osC_Session->value('language') . '.cache' . $_GET['products_id']);
}
return $cache_output;
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl