From c36a3d5adc899f866a66ab7fe8740c67df8bc12e Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 19 Feb 2010 09:19:21 +0000 Subject: feature 967: optionnaly transmit the original filename to pwg.images.add. When transmitted, it fills the images.file column. git-svn-id: http://piwigo.org/svn/branches/2.0@4910 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/ws_functions.inc.php | 2 +- ws.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 73fad605f..bad46a12e 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -1244,7 +1244,7 @@ SELECT // database registration $insert = array( - 'file' => $filename_wo_ext.'.jpg', + 'file' => !empty($params['original_filename']) ? $params['original_filename'] : $filename_wo_ext.'.jpg', 'date_available' => $dbnow, 'tn_ext' => 'jpg', 'name' => $params['name'], diff --git a/ws.php b/ws.php index fded120db..11fce7aa3 100644 --- a/ws.php +++ b/ws.php @@ -204,6 +204,7 @@ function ws_addDefaultMethods( $arr ) 'thumbnail_sum' => array(), 'high_sum' => array('default' => null), 'original_sum' => array(), + 'original_filename' => array('default' => null), 'name' => array('default' => null), 'author' => array('default' => null), 'date_creation' => array('default' => null), -- cgit v1.2.3