diff --git a/ecrire/balise/formulaire_admin.php b/ecrire/balise/formulaire_admin.php index e4cf51842238ae6758a1dd3fb7090e63d0966a9a..1bd5a155ad263dd53442185a13d31c129abdbe2a 100644 --- a/ecrire/balise/formulaire_admin.php +++ b/ecrire/balise/formulaire_admin.php @@ -82,7 +82,7 @@ function balise_FORMULAIRE_ADMIN_dyn($float='', $debug='') { $statistiques = str_replace('&', '&', generer_url_ecrire_statistiques($id_article)); } } - + $statut = isset($GLOBALS['auteur_session']) ? $GLOBALS['auteur_session']['statut'] : ''; // Bouton de debug $debug = ( @@ -93,7 +93,7 @@ function balise_FORMULAIRE_ADMIN_dyn($float='', $debug='') { AND $GLOBALS['_COOKIE']['spip_debug'] ) ) AND ( - $GLOBALS['auteur_session']['statut'] == '0minirezo' + $statut == '0minirezo' ) AND ( !$var_preview ) @@ -117,9 +117,9 @@ function balise_FORMULAIRE_ADMIN_dyn($float='', $debug='') { if (!$GLOBALS['var_preview'] AND ( (($GLOBALS['meta']['preview']=='1comite' - AND $GLOBALS['auteur_session']['statut'] =='1comite') + AND $statut =='1comite') OR ($GLOBALS['meta']['preview']<>'' - AND $GLOBALS['auteur_session']['statut'] =='0minirezo')) + AND $statut =='0minirezo')) )) { $p = ($objet_affiche == 'article' AND $GLOBALS['meta']['post_dates'] != 'oui'); @@ -154,7 +154,7 @@ function balise_FORMULAIRE_ADMIN_dyn($float='', $debug='') { 'use_cache' => ($use_cache ? '' : ' *'), 'divclass' => $float, 'analyser' => $analyser, - 'xhtml_error' => $GLOBALS['xhtml_error'] + 'xhtml_error' => isset($GLOBALS['xhtml_error']) ? $GLOBALS['xhtml_error'] : '' ) ); } diff --git a/ecrire/public/assembler.php b/ecrire/public/assembler.php index 2602c0c9a6eab59e165e2f21b6e52987ca977b1d..b05fe813b83007502320d4324657cd875be6288b 100644 --- a/ecrire/public/assembler.php +++ b/ecrire/public/assembler.php @@ -116,9 +116,9 @@ function assembler_page ($fond) { $page['entetes']["Connection"] = "close"; $page['texte'] = ""; } else { - if (!$use_cache && isset($page['contexte']) && is_array($page['contexte'])) { + if (!$use_cache && isset($page['contexte'])) { // Remplir les globals pour les boutons d'admin - foreach ($contexte as $var=>$val) + foreach ($page['contexte'] as $var=>$val) $GLOBALS[$var] = $val; } else { $f = charger_fonction('parametrer', 'public');