Ignore:
Timestamp:
Dec 4, 2010, 9:06:46 PM (13 years ago)
Author:
mistic100
Message:

minor fix : bug with © symbol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PHP_Optimisateur/plugins/create_folders_alpha.php

    r7991 r7994  
    1313        if ($file != '.' && $file != '..' && !is_dir($DIRsource.'/'.$file)) {
    1414                // Récupère le parties du nom servant à créer les dossiers
    15                 preg_match('#(.{1})([0-9A-Za-z.-]*)_(.*)#', $file, $matches);
     15                if (preg_match('#(.{1})([0-9A-Za-z.-]*)_(.*)#', $file, $matches)) {
    1616
    17                 // Crée les dossier
    18                 if (!file_exists($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2])) {
    19                         mkdir($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2], 0777, true);
     17                        // Crée les dossier
     18                        if (!file_exists($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2])) {
     19                                mkdir($DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2], 0777, true);
     20                        }
     21                       
     22                        // Déplace le fichier
     23                        rename($DIRsource.$file, $DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2].'/'.$file);
    2024                }
    21                
    22                 // Déplace le fichier
    23                 rename($DIRsource.$file, $DIRsource.strtoupper($matches[1]).'/'.$matches[1].$matches[2].'/'.$file);
    2425        }       
    2526}
Note: See TracChangeset for help on using the changeset viewer.