Changeset 83449 in spip-zone


Ignore:
Timestamp:
Jun 24, 2014, 8:52:31 AM (5 years ago)
Author:
arno@…
Message:

Bug: ne pas faire de file_exists sur un texte trop long (sinon erreur PHP)

Location:
_plugins_/image_responsive
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/image_responsive/image_responsive.js

    r81301 r83449  
    100100
    101101function charger_image_responsive () {
    102        
    103102        // Calculer le "top" des images lazy
    104103        $(".lazy").each(function() {
     
    128127$(window).on("scroll touchmove", function() {
    129128        charger_image_lazy();
    130         });
     129});
     130       
  • _plugins_/image_responsive/image_responsive_fonctions.php

    r82218 r83449  
    8787function image_responsive($texte, $taille=120, $lazy=0, $vertical=0) {
    8888        if (!preg_match("/^<img /i", $texte)) {
    89                 if (file_exists($texte)) $texte = "<img src='$texte'>";
     89                if (strlen($texte) < 256 && file_exists($texte)) $texte = "<img src='$texte'>";
    9090                else return $texte;
    9191        }
  • _plugins_/image_responsive/paquet.xml

    r82218 r83449  
    22        prefix="image_responsive"
    33        categorie="outil"
    4         version="1.7.0"
     4        version="1.7.1"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.1.*]"
Note: See TracChangeset for help on using the changeset viewer.