aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-12-16 09:10:30 +0000
committerplegall <plg@piwigo.org>2011-12-16 09:10:30 +0000
commit8796a85ab7b8656daa365453571915ece701738a (patch)
treef5ab107713b1c67d6fbc0416aad240a4765c20e5 /include
parent4dfc99ca6c97bb9fc5c3028019b934d76b292827 (diff)
merge r12738 from branch 2.3 to trunk
feature 2489 updated: photos added by synchronization can't update their "file" field git-svn-id: http://piwigo.org/svn/trunk@12739 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/ws_functions.inc.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 7d1c6431a..6c3838aa1 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -2427,7 +2427,6 @@ SELECT *
$update = array();
$info_columns = array(
- 'file',
'name',
'author',
'comment',
@@ -2463,6 +2462,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'];