From f36c39eb878601e97bd44f11838f4fdb59004dfa Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 9 Oct 2004 10:51:49 +0000 Subject: [PATCH] more clever --- htdocs/clear_all_cache.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/clear_all_cache.php b/htdocs/clear_all_cache.php index ff8c848..8b1867d 100644 --- a/htdocs/clear_all_cache.php +++ b/htdocs/clear_all_cache.php @@ -18,14 +18,16 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: clear_all_cache.php,v 1.3 2004-10-08 12:45:49 x2000habouzit Exp $ + $Id: clear_all_cache.php,v 1.4 2004-10-09 10:51:49 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); new_admin_page('index.tpl'); $page->clear_all_cache(); $page->clear_compiled_tpl(); -if(isset($_SERVER['HTTP_REFERER'])) { + +$ref = $_SERVER['HTTP_REFERER']; +if(isset($ref && strpos($ref,'clear_all_cache.php')===false) { header("Location: {$_SERVER['HTTP_REFERER']}"); } else { header("Location: index.php"); -- 2.1.4