Changeset 1561


Ignore:
Timestamp:
Oct 13, 2006, 2:31:29 AM (18 years ago)
Author:
rvelices
Message:

bug 560: url issue when $confpicture_url_style='file' and filename is
numeric or numeric followed by -

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/include/functions_url.inc.php

    r1504 r1561  
    214214      break;
    215215    case 'file':
    216       if ( isset($params['image_file'])
    217            and !is_numeric($params['image_file']) )
    218       {
    219         $url .= get_filename_wo_extension($params['image_file']);
    220       }
    221       else
    222       {
    223         $url .= $params['image_id'];
    224       }
    225       break;
     216      if ( isset($params['image_file']) )
     217      {
     218        $fname_wo_ext = get_filename_wo_extension($params['image_file']);
     219        if (! preg_match('/^\d+(-|$)/', $fname_wo_ext) )
     220        {
     221          $url .= $fname_wo_ext;
     222          break;
     223        }
     224      }
    226225    default:
    227226      $url .= $params['image_id'];
Note: See TracChangeset for help on using the changeset viewer.