Changeset 6052 for trunk/admin/include


Ignore:
Timestamp:
May 3, 2010, 2:49:26 PM (15 years ago)
Author:
plg
Message:

bug 1639 fixed: the upload form now correctly uses the $confupload_dir
parameter (web API already use it).

By default, the $confupload_dir is no longer dependent to PHPWG_ROOT_PATH
because it becomes a real mess when admin/include/uploadify.php (called
directly, not from an include) tries to perform an upload.

Improvement: make clearer how $confupload_dir can be set (relative to the
Piwigo installation directory + HTTP reachable)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_upload.inc.php

    r5957 r6052  
    3232  // upload directory hierarchy
    3333  $upload_dir = sprintf(
    34     PHPWG_ROOT_PATH.'upload/%s/%s/%s',
     34    PHPWG_ROOT_PATH.$conf['upload_dir'].'/%s/%s/%s',
    3535    $year,
    3636    $month,
     
    9797    'date_available' => $dbnow,
    9898    'tn_ext' => 'jpg',
    99     'path' => preg_replace('/^.*?upload/', './upload', $file_path),
     99    'path' => preg_replace('#^'.preg_quote(PHPWG_ROOT_PATH).'#', '', $file_path),
    100100    'filesize' => $file_infos['filesize'],
    101101    'width' => $file_infos['width'],
Note: See TracChangeset for help on using the changeset viewer.