more clever
authorx2000habouzit <x2000habouzit>
Sat, 9 Oct 2004 10:51:49 +0000 (10:51 +0000)
committerx2000habouzit <x2000habouzit>
Sat, 9 Oct 2004 10:51:49 +0000 (10:51 +0000)
htdocs/clear_all_cache.php

index ff8c848..8b1867d 100644 (file)
  *  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");