Changeset 41901 in spip-zone


Ignore:
Timestamp:
Oct 25, 2010, 8:01:24 AM (10 years ago)
Author:
arno@…
Message:

Plusieurs bugs sur la gestion des refresh sans cookie.

Location:
_plugins_/inclure-ajaxload
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/inclure-ajaxload/action/ia_nojs.php

    r41632 r41901  
    66        setcookie("no_js", "no_js", time()+(3600*24*7));       
    77               
    8         @header("Refresh: 0; Url="._request("retour"));
     8        @header("Refresh: 0; Url=".parametre_url(urldecode(_request("retour")), "no_js","oui", "&"));
    99        echo " "; 
    1010}
  • _plugins_/inclure-ajaxload/inclure-ajaxload.php

    r41790 r41901  
    107107        // Si le visiteur est un robot de moteur de recherche,
    108108        // reconstituer les pages completes
    109         if(_IS_BOT || $_COOKIE["no_js"] == "no_js" ) {
     109        if(_IS_BOT || $_COOKIE["no_js"] == "no_js" || _request("no_js") == "oui" ) {
    110110                include_spip("inc/filtres");
    111111                include_spip("public/assembler");
     
    120120        $flux .= "\n<script src=\"".find_in_path('javascript/inclure-ajaxload.js')."\" type=\"text/javascript\"></script>";
    121121
    122 $flux = '<?php if ($_COOKIE["no_js"] != "no_js" && !_IS_BOT) { ?>
     122$flux = '<?php if ($_COOKIE["no_js"] != "no_js" && !_IS_BOT && _request("no_js") != "oui") { ?>
    123123<script type="text/javascript"><!--
    124124document.write("<\/script><script>/*");
    125125//--></script>
    126 <meta http-equiv="refresh" content="2; url=spip.php?action=ia_nojs&amp;retour=<?php echo urlencode(parametre_url(self(),\'no_js\',\'oui\'));?>" />
     126<meta http-equiv="refresh" content="2; url='.$GLOBALS["meta"]["adresse_site"].'/spip.php?action=ia_nojs&amp;retour=<?php echo urlencode(self(\'&\'));?>" />
    127127<script type="text/javascript">/* */</script>
    128128<?php } else { ?>
  • _plugins_/inclure-ajaxload/plugin.xml

    r41775 r41901  
    55        </auteur>
    66        <version>
    7         0.7
     7        0.8
    88        </version>
    99        <etat>
Note: See TracChangeset for help on using the changeset viewer.