feature 2489 updated: photos added by synchronization can't update their "file" field
git-svn-id: http://piwigo.org/svn/branches/2.3@12738 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
ae9d066d3a
commit
6bc0ec4e28
1 changed files with 11 additions and 1 deletions
|
@ -2445,7 +2445,6 @@ SELECT *
|
||||||
$update = array();
|
$update = array();
|
||||||
|
|
||||||
$info_columns = array(
|
$info_columns = array(
|
||||||
'file',
|
|
||||||
'name',
|
'name',
|
||||||
'author',
|
'author',
|
||||||
'comment',
|
'comment',
|
||||||
|
@ -2481,6 +2480,17 @@ SELECT *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($params['file']))
|
||||||
|
{
|
||||||
|
if (!empty($image_row['storage_category_id']))
|
||||||
|
{
|
||||||
|
new PwgError(500, '[ws_images_setInfo] updating "file" is forbidden on photos added by synchronization');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$update['file'] = $params['file'];
|
||||||
|
}
|
||||||
|
|
||||||
if (count(array_keys($update)) > 0)
|
if (count(array_keys($update)) > 0)
|
||||||
{
|
{
|
||||||
$update['id'] = $params['image_id'];
|
$update['id'] = $params['image_id'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue