aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/ws_functions.inc.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 849ff949e..5807a4cc1 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -1450,6 +1450,19 @@ SELECT id, name, permalink
$url_params['category'] = $category;
}
+ // update metadata from the uploaded file (exif/iptc), even if the sync
+ // was already performed by add_uploaded_file().
+ $query = '
+SELECT
+ path
+ FROM '.IMAGES_TABLE.'
+ WHERE id = '.$image_id.'
+;';
+ list($file_path) = pwg_db_fetch_row(pwg_query($query));
+
+ require_once(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php');
+ update_metadata(array($image_id=>$file_path));
+
return array(
'image_id' => $image_id,
'url' => make_picture_url($url_params),