mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 01:12:29 +02:00
bug 912 fixed: we need an extra original_sum to pwg.images.add API method to
check photo existence. Using the file_sum was a bad idea. git-svn-id: http://piwigo.org/svn/branches/2.0@3064 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -909,7 +909,7 @@ function ws_images_add($params, &$service)
|
||||
SELECT
|
||||
COUNT(*) AS counter
|
||||
FROM '.IMAGES_TABLE.'
|
||||
WHERE md5sum = \''.$params['file_sum'].'\'
|
||||
WHERE md5sum = \''.$params['original_sum'].'\'
|
||||
;';
|
||||
list($counter) = mysql_fetch_row(pwg_query($query));
|
||||
if ($counter != 0) {
|
||||
@@ -1088,7 +1088,7 @@ SELECT
|
||||
'filesize' => floor(filesize($file_path)/1024),
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
'md5sum' => $params['file_sum'],
|
||||
'md5sum' => $params['original_sum'],
|
||||
);
|
||||
|
||||
$info_columns = array(
|
||||
|
||||
Reference in New Issue
Block a user