diff --git a/ecrire/inc/boutons.php b/ecrire/inc/boutons.php index e2f5b3b1fb93c7fdef5cb1ca0c85bbeaefd4663f..1d61bcda61bf12fc4d8ac24c0a6e4b8bdbee65a6 100644 --- a/ecrire/inc/boutons.php +++ b/ecrire/inc/boutons.php @@ -424,7 +424,7 @@ function bandeau_principal2($rubrique, $sous_rubrique, $largeur) { $largitem_moy = 85; foreach($GLOBALS['boutons_admin'] as $page => $detail) { - if (($rubrique == $page) AND (_SPIP_AJAX === -1)) { + if (($rubrique == $page) AND (!_SPIP_AJAX)) { $class = "visible_au_chargement"; } else { $class = "invisible_au_chargement"; diff --git a/ecrire/inc/gadgets.php b/ecrire/inc/gadgets.php index ce9b04ee1857fdf2a274aafd63e5dd61d0a4e723..43309006af42fa1c815ed08bab530c9cc023a753 100644 --- a/ecrire/inc/gadgets.php +++ b/ecrire/inc/gadgets.php @@ -480,7 +480,7 @@ function gadget_messagerie() { // http://doc.spip.org/@repercuter_gadgets function repercuter_gadgets($id_rubrique) { - if (_SPIP_AJAX === -1) return ''; + if (!_SPIP_AJAX) return ''; $rub = $id_rubrique ? "\\x26id_rubrique=$id_rubrique" : ''; diff --git a/ecrire/inc/layer.php b/ecrire/inc/layer.php index 9064bedf9f4d41573dcd11ecaf204023f1581306..99fd45dd640d6c388aac542d8c2242c1947641b7 100644 --- a/ecrire/inc/layer.php +++ b/ecrire/inc/layer.php @@ -32,7 +32,7 @@ function block_parfois_visible($nom, $invite, $masque, $style='', $visible=false $nom = 'Layer' . renomme_block($nom); // initialement invisible, seulement si on sait rendre visible - if (!$visible AND (_SPIP_AJAX !== -1)) + if (!$visible AND (!_SPIP_AJAX)) $visible = 'display:none;'; else $visible = 'display:block;'; @@ -72,7 +72,7 @@ function debut_block_invisible($nom_block){ if (!$browser_layer) return ''; // si on n'accepte pas js, ne pas fermer - if (_SPIP_AJAX === -1) + if (!_SPIP_AJAX) return debut_block_visible($nom_block); return "<div id='Layer".renomme_block($nom_block)."' style='display: none;'>"; @@ -135,7 +135,7 @@ function produire_acceder_couche($couches, $nom, $icone) { global $spip_lang_rtl; // ne rien afficher si js desactive - if (_SPIP_AJAX === -1) + if (!_SPIP_AJAX) return ''; $onclick = array(); diff --git a/ecrire/inc/presentation.php b/ecrire/inc/presentation.php index 2a0ef06753481cba23b2e0bf98afc41b82019134..54ecc632c35485046d513ff52572ca384814ff5d 100644 --- a/ecrire/inc/presentation.php +++ b/ecrire/inc/presentation.php @@ -1334,7 +1334,9 @@ function debut_javascript($admin, $stat) // envoi le fichier JS de config si browser ok. $GLOBALS['browser_layer'] . http_script( - (_SPIP_AJAX ? '' : "ajah('GET', '$testeur')") . + (isset($_COOKIE['spip_accepte_ajax']) >= 1 + ? '' + : "ajah('GET', '$testeur')") . "\nvar ajax_image_searching = \n'<div style=\"float: ".$GLOBALS['spip_lang_right'].";\"><img src=\"".url_absolue(_DIR_IMG_PACK."searching.gif")."\" /></div>';" . "\nvar stat = " . ($stat ? 1 : 0) . "\nvar largeur_icone = " .