From 7f0de936082fb35d4e18fbadfe9849acdfc03ab6 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Fri, 6 Sep 2013 20:12:04 +1000 Subject: Cleaner check to make sure inc/ files aren't accessed directly. --- inc/cache.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'inc/cache.php') diff --git a/inc/cache.php b/inc/cache.php index 2f3c746c..95b1281f 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -4,10 +4,7 @@ * Copyright (c) 2010-2013 Tinyboard Development Group */ -if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) { - // You cannot request this file directly. - exit; -} +defined('TINYBOARD') or exit; class Cache { private static $cache; -- cgit v1.3 From 9ccf62bb613d00d5d86391d90b7b2410f79c3da8 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sat, 7 Sep 2013 03:09:52 +1000 Subject: yeah --- inc/cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/cache.php') diff --git a/inc/cache.php b/inc/cache.php index 95b1281f..d1200919 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -132,7 +132,7 @@ class Cache { case 'apc': return apc_clear_cache('user'); case 'php': - self::$cache[$key] = array(); + self::$cache = array(); break; case 'redis': if (!self::$cache) -- cgit v1.3