From 4fa8d36ed5beaf7125083ec65b355f09a92621c2 Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 1 Jul 2009 20:56:41 +0000 Subject: - remove warn on unset variable - insert_user_comment expects now the comment content to be sql safe (works now exactly as update_user_comment) git-svn-id: http://piwigo.org/svn/trunk@3488 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/ws_functions.inc.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include/ws_functions.inc.php') diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 979e855ef..ad73161b3 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -523,8 +523,8 @@ SELECT DISTINCT image_id } $comm = array( - 'author' => trim( stripslashes($params['author']) ), - 'content' => trim( stripslashes($params['content']) ), + 'author' => trim($params['author']), + 'content' => trim($params['content']), 'image_id' => $params['image_id'], ); @@ -885,7 +885,7 @@ function ws_images_add_chunk($params, &$service) // original_sum // type {thumb, file, high} // position - + if (!is_admin() || is_adviser() ) { return new PwgError(401, 'Access denied'); @@ -945,7 +945,7 @@ function merge_chunks($output_filepath, $original_sum, $type) $upload_dir = PHPWG_ROOT_PATH.'upload/buffer'; $pattern = '/'.$original_sum.'-'.$type.'/'; $chunks = array(); - + if ($handle = opendir($upload_dir)) { while (false !== ($file = readdir($handle))) @@ -962,18 +962,18 @@ function merge_chunks($output_filepath, $original_sum, $type) sort($chunks); ws_logfile('[merge_chunks] memory_get_usage before loading chunks: '.memory_get_usage()); - + foreach ($chunks as $chunk) { $string = file_get_contents($chunk); - + ws_logfile('[merge_chunks] memory_get_usage on chunk '.++$i.': '.memory_get_usage()); - + if (!file_put_contents($output_filepath, $string, FILE_APPEND)) { return new PwgError(500, 'error while writting chunks for '.$output_filepath); } - + unlink($chunk); } @@ -1783,13 +1783,13 @@ function ws_categories_setInfo($params, &$service) array($update) ); } - + } function ws_logfile($string) { return true; - + file_put_contents( '/tmp/piwigo_ws.log', '['.date('c').'] '.$string."\n", -- cgit v1.2.3