Changeset 61295 in spip-zone


Ignore:
Timestamp:
May 15, 2012, 9:16:25 AM (7 years ago)
Author:
denisb@…
Message:

inc/joindre_document : attention à posix qui lit \xxx .\

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _core_/branches/spip-3.0/plugins/medias/inc/joindre_document.php

    r51977 r61295  
    291291        $extension = '';
    292292        $name = $doc['name'];
    293         if (preg_match(',[.]([^.]+)$,', $name, $r)
     293        if (preg_match(',\.([^.]+)$,', $name, $r)
    294294         AND $t = sql_fetsel("extension", "spip_types_documents",       "extension=" . sql_quote(corriger_extension($r[1])))
    295295         ) {
    296296                $extension = $t['extension'];
    297                 $name = preg_replace(',[.][^.]*$,', '', $doc['name']).'.'.$extension;
     297                $name = preg_replace(',\.[^.]*$,', '', $doc['name']).'.'.$extension;
    298298        }
    299299        else if ($t = sql_fetsel("extension", "spip_types_documents",   "mime_type=" . sql_quote($doc['type']))) {
    300300                $extension = $t['extension'];
    301                 $name = preg_replace(',[.][^.]*$,', '', $doc['name']).'.'.$extension;
     301                $name = preg_replace(',\.[^.]*$,', '', $doc['name']).'.'.$extension;
    302302        }
    303303
Note: See TracChangeset for help on using the changeset viewer.