diff options
author | plegall <plg@piwigo.org> | 2011-12-16 09:10:00 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2011-12-16 09:10:00 +0000 |
commit | 6bc0ec4e28e12ab77ba2590d628e07fcbb273751 (patch) | |
tree | c19e629908292f941b5245b55b5110fce6bf5b80 /include/ws_functions.inc.php | |
parent | ae9d066d3ab139e9ab242d6c7e93afda080f852d (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | include/ws_functions.inc.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index a89c2f9ff..47b94da12 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -2445,7 +2445,6 @@ SELECT * $update = array(); $info_columns = array( - 'file', 'name', 'author', '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) { $update['id'] = $params['image_id']; |