From 060a60dc449c91a4c5be93e1410fcc2f411ff0a9 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Wed, 14 Oct 2009 21:07:33 +0000
Subject: [PATCH] supprimer le cache du bandeau stocke en meta : ca fait un
 trop gros volume d'info charge a chaque hit, et en plus il n'etait pas
 utilise par la faute d'un bug. On revient a du code simple, et on cachera en
 fichier dans tmp/ si necessaire

---
 ecrire/inc/bandeau.php | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/ecrire/inc/bandeau.php b/ecrire/inc/bandeau.php
index a6f1d96d9c..392fbd36c5 100644
--- a/ecrire/inc/bandeau.php
+++ b/ecrire/inc/bandeau.php
@@ -65,17 +65,15 @@ function boutons_parse($arbre){
  *
  */
 function boutons_core($type='bouton'){
+	static $ret=null;
 	if (!in_array($type,array('bouton','onglet')))
 		return array();
-	if (!is_array($GLOBALS['meta']['bando_navigation'])
-		OR !$ret = unserialize($GLOBALS['meta']['bando_navigation'])
-	  OR !isset($ret[$type])
-		OR $GLOBALS['var_mode']='recalcul'){
+	if (
+		!is_array($ret)
+		/*OR $GLOBALS['var_mode']='recalcul'*/){
 		include_spip('inc/xml');
 		$xml = spip_xml_load(find_in_path("prive/navigation.xml"));
 		$ret = boutons_parse($xml);
-		include_spip('inc/meta');
-		ecrire_meta('bando_navigation',serialize($ret),'non');
 	}
 
 	return $ret[$type];
-- 
GitLab