Changeset 81314 in spip-zone


Ignore:
Timestamp:
Mar 12, 2014, 5:55:18 PM (5 years ago)
Author:
cedric@…
Message:

Reparer yfrog qui ne se donne meme plus la peine de renseigner le type de media

+ eviter une erreur squelette : si pas de type fournit par oembed on se rabat sur link

Location:
_plugins_/oembed
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • _plugins_/oembed/inc/oembed.php

    r79140 r81314  
    159159                $type = strtolower($cache[$data_url]['type']);
    160160                // securisons le nom de la fonction (provider peut contenir n'importe quoi)
    161                 $f = preg_replace(",\W,","","posttraite_{$provider_name}_$type");
    162                 if ($oembed_provider_posttraite = charger_fonction($f,'oembed/input',true))
     161                $f1 = preg_replace(",\W,","","posttraite_{$provider_name}_$type");
     162                $f2 = preg_replace(",\W,","","posttraite_{$provider_name}");
     163                if ($oembed_provider_posttraite = charger_fonction($f1,'oembed/input',true)
     164                  OR $oembed_provider_posttraite = charger_fonction($f2,'oembed/input',true))
    163165                        $cache[$data_url] = $oembed_provider_posttraite($cache[$data_url],$url);
    164166
  • _plugins_/oembed/modeles/oembed.html

    r79140 r81314  
    33][(#GET{data}|oui)
    44<div class='spip_documents spip_documents_center ressource oembed[ oembed_(#GET{data}|table_valeur{type})]'>
    5         [(#INCLURE{fond=modeles/oembed_[(#GET{data}|table_valeur{type})],data=#GET{data},url,align})]
     5        [(#INCLURE{fond=modeles/oembed_[(#GET{data}|table_valeur{type,link})],data=#GET{data},url,align})]
    66        [<div class="spip_doc_titre oembed-source">(#ENV*{lien}|echappe_retour)</div>]
    77</div>
  • _plugins_/oembed/oembed/input/posttraite_yfrog.php

    r81308 r81314  
    88if (!defined('_ECRIRE_INC_VERSION')) return;
    99
    10 function oembed_input_posttraite_yfrog_image_dist($data){
     10function oembed_input_posttraite_yfrog_dist($data){
    1111
    1212        $data['type']='photo';
  • _plugins_/oembed/paquet.xml

    r81311 r81314  
    22        prefix="oembed"
    33        categorie="multimedia"
    4         version="1.0.9"
     4        version="1.0.10"
    55        etat="test"
    66        compatibilite="[3.0.0;3.0.*]"
Note: See TracChangeset for help on using the changeset viewer.