Ignore:
Timestamp:
Feb 17, 2010, 4:06:47 PM (15 years ago)
Author:
plg
Message:

bug 1422 fixed: pwg.images.add (and sub methods) can create recursive
directories for windows.

add trace in ws_logfile for add_file + ws_images_add_chunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/include/ws_functions.inc.php

    r4883 r4899  
    897897function ws_images_add_chunk($params, &$service)
    898898{
     899  ws_logfile('[ws_images_add_chunk] welcome');
    899900  // data
    900901  // original_sum
     
    910911  {
    911912    return new PwgError(405, "This method requires HTTP POST");
     913  }
     914
     915  foreach ($params as $param_key => $param_value) {
     916    if ('data' == $param_key) {
     917      continue;
     918    }
     919   
     920    ws_logfile(
     921      sprintf(
     922        '[ws_images_add_chunk] input param "%s" : "%s"',
     923        $param_key,
     924        is_null($param_value) ? 'NULL' : $param_value
     925        )
     926      );
    912927  }
    913928
     
    10301045
    10311046  $upload_dir = dirname($file_path);
    1032 
     1047  if (substr(PHP_OS, 0, 3) == 'WIN')
     1048  {
     1049    $upload_dir = str_replace('/', DIRECTORY_SEPARATOR, $upload_dir);
     1050  }
     1051
     1052  ws_logfile('[add_file] file_path  : '.$file_path);
     1053  ws_logfile('[add_file] upload_dir : '.$upload_dir);
     1054 
    10331055  if (!is_dir($upload_dir)) {
    10341056    umask(0000);
Note: See TracChangeset for help on using the changeset viewer.