Dotclear

Changeset 923:171d086f9f7e


Ignore:
Timestamp:
10/27/12 16:08:43 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Cope with windows directory separator, should fixes #1094, thanks adjaya

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/public/lib.tpl.context.php

    r914 r923  
    368368                    foreach ($m[1] as $i => $img) { 
    369369                         if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) { 
    370                               $src = $p_url.(dirname($img) != '/' ? dirname($img) : '').'/'.$src; 
     370                              $dirname = str_replace('\\', '/', dirname($img));  
     371                              $src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src; 
    371372                              if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) { 
    372373                                   $alt = $malt[1]; 
     
    385386                    foreach ($m[1] as $i => $img) { 
    386387                         if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) { 
    387                               $src = $p_url.(dirname($img) != '/' ? dirname($img) : '').'/'.$src; 
     388                              $dirname = str_replace('\\', '/', dirname($img));  
     389                              $src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src; 
    388390                              if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) { 
    389391                                   $alt = $malt[1]; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map