Changeset 31102 for trunk/include/ws_functions/pwg.images.php
- Timestamp:
- Apr 24, 2015, 4:00:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/ws_functions/pwg.images.php
r31031 r31102 183 183 function merge_chunks($output_filepath, $original_sum, $type) 184 184 { 185 global $conf ;186 187 ws_logfile('[merge_chunks] input parameter $output_filepath : '.$output_filepath);185 global $conf, $logger; 186 187 $logger->debug('[merge_chunks] input parameter $output_filepath : '.$output_filepath, 'WS'); 188 188 189 189 if (is_file($output_filepath)) … … 207 207 if (preg_match($pattern, $file)) 208 208 { 209 ws_logfile($file);209 $logger->debug($file, 'WS'); 210 210 $chunks[] = $upload_dir.'/'.$file; 211 211 } … … 217 217 218 218 if (function_exists('memory_get_usage')) { 219 ws_logfile('[merge_chunks] memory_get_usage before loading chunks: '.memory_get_usage());219 $logger->debug('[merge_chunks] memory_get_usage before loading chunks: '.memory_get_usage(), 'WS'); 220 220 } 221 221 … … 227 227 228 228 if (function_exists('memory_get_usage')) { 229 ws_logfile('[merge_chunks] memory_get_usage on chunk '.++$i.': '.memory_get_usage());229 $logger->debug('[merge_chunks] memory_get_usage on chunk '.++$i.': '.memory_get_usage(), 'WS'); 230 230 } 231 231 … … 239 239 240 240 if (function_exists('memory_get_usage')) { 241 ws_logfile('[merge_chunks] memory_get_usage after loading chunks: '.memory_get_usage());241 $logger->debug('[merge_chunks] memory_get_usage after loading chunks: '.memory_get_usage(), 'WS'); 242 242 } 243 243 } … … 825 825 function ws_images_add_chunk($params, $service) 826 826 { 827 global $conf ;827 global $conf, $logger; 828 828 829 829 foreach ($params as $param_key => $param_value) … … 833 833 continue; 834 834 } 835 ws_logfile( 836 sprintf( 837 '[ws_images_add_chunk] input param "%s" : "%s"', 838 $param_key, 839 is_null($param_value) ? 'NULL' : $param_value 840 ) 841 ); 835 836 $logger->debug(sprintf( 837 '[ws_images_add_chunk] input param "%s" : "%s"', 838 $param_key, 839 is_null($param_value) ? 'NULL' : $param_value 840 ), 'WS'); 842 841 } 843 842 … … 857 856 ); 858 857 859 ws_logfile('[ws_images_add_chunk] data length : '.strlen($params['data']));858 $logger->debug('[ws_images_add_chunk] data length : '.strlen($params['data']), 'WS'); 860 859 861 860 $bytes_written = file_put_contents( … … 882 881 function ws_images_addFile($params, $service) 883 882 { 884 ws_logfile(__FUNCTION__.', input : '.var_export($params, true));885 886 global $conf;883 global $conf, $logger; 884 885 $logger->debug(__FUNCTION__, 'WS', $params); 887 886 888 887 // what is the path and other infos about the photo? … … 975 974 function ws_images_add($params, $service) 976 975 { 977 global $conf, $user ;976 global $conf, $user, $logger; 978 977 979 978 foreach ($params as $param_key => $param_value) 980 979 { 981 ws_logfile( 982 sprintf( 983 '[pwg.images.add] input param "%s" : "%s"', 984 $param_key, 985 is_null($param_value) ? 'NULL' : $param_value 986 ) 987 ); 980 $logger->debug(sprintf( 981 '[pwg.images.add] input param "%s" : "%s"', 982 $param_key, 983 is_null($param_value) ? 'NULL' : $param_value 984 ), 'WS'); 988 985 } 989 986 … … 1399 1396 function ws_images_exist($params, $service) 1400 1397 { 1401 ws_logfile(__FUNCTION__.' '.var_export($params, true));1402 1403 global $conf;1398 global $conf, $logger; 1399 1400 $logger->debug(__FUNCTION__, 'WS', $params); 1404 1401 1405 1402 $split_pattern = '/[\s,;\|]/'; … … 1472 1469 function ws_images_checkFiles($params, $service) 1473 1470 { 1474 ws_logfile(__FUNCTION__.', input : '.var_export($params, true)); 1471 global $logger; 1472 1473 $logger->debug(__FUNCTION__, 'WS', $params); 1475 1474 1476 1475 $query = ' … … 1510 1509 if (isset($compare_type)) 1511 1510 { 1512 ws_logfile(__FUNCTION__.', md5_file($path) = '.md5_file($path));1511 $logger->debug(__FUNCTION__.', md5_file($path) = '.md5_file($path), 'WS'); 1513 1512 if (md5_file($path) != $params[$compare_type.'_sum']) 1514 1513 { … … 1521 1520 } 1522 1521 1523 ws_logfile(__FUNCTION__.', output : '.var_export($ret, true));1522 $logger->debug(__FUNCTION__, 'WS', $ret); 1524 1523 1525 1524 return $ret;
Note: See TracChangeset
for help on using the changeset viewer.