Browse Source

Merge branch 'master' of https://github.com/Spuds/playpen

Graeme Spence 13 years ago
parent
commit
40c75fbee0
2 changed files with 4 additions and 3 deletions
  1. 3 2
      Sources/Load.php
  2. 1 1
      other/upgrade_2-1_mysql.sql

+ 3 - 2
Sources/Load.php

@@ -2651,7 +2651,7 @@ function cache_get_data($key, $ttl = 120)
 		$st = microtime();
 	}
 
-	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
+	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':/', '-_');
 
 	switch ($cache_accelerator)
 	{
@@ -2698,7 +2698,8 @@ function cache_get_data($key, $ttl = 120)
 			// Otherwise it's SMF data!
 			if (file_exists($cachedir . '/data_' . $key . '.php') && filesize($cachedir . '/data_' . $key . '.php') > 10)
 			{
-				require($cachedir . '/data_' . $key . '.php');
+				// php will cache file_exists et all, we can't 100% depend on its results so proceed with caution
+				@include($cachedir . '/data_' . $key . '.php');
 				if (!empty($expired) && isset($value))
 				{
 					@unlink($cachedir . '/data_' . $key . '.php');

+ 1 - 1
other/upgrade_2-1_mysql.sql

@@ -150,7 +150,7 @@ CHANGE `session_id` `session_id` char(64) NOT NULL;
 ---# Adding new columns to topics ..
 ALTER TABLE {$db_prefix}topics
 ADD COLUMN redirect_expires int(10) unsigned NOT NULL default '0',
-ADD COLUMN id_redirect_topic mediumint(8) unsigned NOT NULL default '0',
+ADD COLUMN id_redirect_topic mediumint(8) unsigned NOT NULL default '0';
 ---#
 
 /******************************************************************************/