Changeset 89034 in spip-zone for _plugins_/gisban/gisban_pipelines.php


Ignore:
Timestamp:
May 4, 2015, 1:29:30 PM (6 years ago)
Author:
laurent@…
Message:

Suppression des surcharges GIS. Utilisation du pipeline recuperer_fond

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/gisban/gisban_pipelines.php

    r88937 r89034  
    2525    return $flux;
    2626}
     27
     28
     29/**
     30 * Ajouter le module leaflet.photon.js dans les javascripts chargés
     31 *
     32 * @param $flux
     33 * @return mixed
     34 */
     35function gisban_recuperer_fond($flux){
     36    if ($flux['args']['fond'] == 'modeles/carte_gis') {
     37        $modele = recuperer_fond('inclure/inc-carte-gisban', $flux['data']['contexte']);
     38        $flux['data']['texte'] .= "\n" . $modele;
     39    }
     40    if ($flux['args']['fond'] == 'javascript/gis.js') {
     41        $ajouts = "var filter_gisban = '". lire_config('gisban/filtre_gisban') ."';\n";
     42        $ajouts .= "\n" . spip_file_get_contents(find_in_path('lib/leaflet.photon/leaflet.photon.js'));
     43        $flux['data']['texte'] .= $ajouts;
     44    }
     45    return $flux;
     46}
    2747?>
Note: See TracChangeset for help on using the changeset viewer.