Changeset 96281 in spip-zone


Ignore:
Timestamp:
Mar 28, 2016, 10:52:43 PM (5 years ago)
Author:
teddy.spip@…
Message:

Oups…………………

Location:
_plugins_/medias_dereferencer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/medias_dereferencer/trunk/inclure/medias_htaccess.html

    r96279 r96281  
    11# Généré le #ENV{date}
    22<BOUCLE_disallow (DOCUMENTS) {statut='prepa'} {extension?} {par fichier}>
    3 <Files [(#ENV{extension}|?{[(#FICHIER**|replace{#ENV{extension}/,''})],[(#FICHIER**)]})]>
    4 [(#CONFIG{medias_dereferencer/apache}|=={oui}|?{
     3<Files [(#ENV{extension}|?{[(#FICHIER**|replace{#ENV{extension}/,''})],[(#FICHIER**)]})]>[(#CONFIG{medias_dereferencer/apache}|=={oui}|?{
     4    Require all denied[
     5(#VAL|md_adresses_allow)],"
    56    Order Deny,Allow
    6     Deny from all[
    7 (#VAL|md_adresses_allow)],
    8     Require all denied[
    9 (#VAL|md_adresses_allow)]
     7    Deny from all"[
     8    (#VAL|md_adresses_allow)]
    109})]
    1110</Files>
  • _plugins_/medias_dereferencer/trunk/medias_dereferencer_fonctions.php

    r96280 r96281  
    358358        include_spip('inc/config');
    359359        $config_md = lire_config('medias_dereferencer');
    360         $config_md = $config_md['adresse_ip'];
    361360        $directive = 'Allow from';
    362         if (empty($config_md)) {
     361        if (isset($config_md['adresse_ip']) and empty($config_md['adresse_ip'])) {
    363362                return false;
    364363        }
    365         if (!is_array($config_md)) {
    366                 $config_md = explode(';', $config_md);
     364        if (!is_array($config_md['adresse_ip'])) {
     365                $config_md['adresse_ip'] = explode(';', $config_md['adresse_ip']);
    367366        }
    368367        if (isset($config_md['apache']) and $config_md['apache'] === 'oui') {
    369368                $directive = 'Require not ip';
    370369        }
    371         $config_md = array_filter($config_md);
    372         $string = "    $directive " . implode("\n    $directive ", $config_md);
     370        $config_md['adresse_ip'] = array_filter($config_md['adresse_ip']);
     371        $string = "    $directive " . implode("\n    $directive ", $config_md['adresse_ip']);
    373372
    374373        return $string;
Note: See TracChangeset for help on using the changeset viewer.