Changeset 68250 in spip-zone


Ignore:
Timestamp:
Dec 8, 2012, 12:01:56 PM (7 years ago)
Author:
fil@…
Message:

ne pas provoquer de warning si on n'arrive pas a connecter a google

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/plugins_seenthis/recuperer_favicon/recuperer_favicon_fonctions.php

    r49740 r68250  
    1414
    1515        $destination = sous_repertoire(_DIR_VAR, 'cache-favicon') .$racine.md5($url).".png";
    16         if (!file_exists($destination)){               
    17                 $copie = copie_locale("http://www.google.com/s2/favicons?domain=$url");
     16        if (!file_exists($destination)
     17        AND $copie = copie_locale("http://www.google.com/s2/favicons?domain=$url")
     18        ) {
    1819                copy($copie, $destination);
    1920        }
    2021       
    2122        $destination = inserer_attribut($destination, "alt", "favicon $url");
    22         return $destination;           
    23                
    24        
     23        return $destination;
    2524}
    2625
    27 
    2826?>
Note: See TracChangeset for help on using the changeset viewer.