Changeset 9944


Ignore:
Timestamp:
Mar 30, 2011, 11:25:32 PM (13 years ago)
Author:
plg
Message:

bug fixed: for metadata synchronization, use the same behavior in
pwg.images.addSimple as in pwg.images.add, ie the metadata mapping is
prioritary compared to values given to the web API methods (author,
description, title...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions.inc.php

    r9742 r9944  
    14501450    $url_params['category'] = $category;
    14511451  }
     1452
     1453  // update metadata from the uploaded file (exif/iptc), even if the sync
     1454  // was already performed by add_uploaded_file().
     1455  $query = '
     1456SELECT
     1457    path
     1458  FROM '.IMAGES_TABLE.'
     1459  WHERE id = '.$image_id.'
     1460;';
     1461  list($file_path) = pwg_db_fetch_row(pwg_query($query));
     1462 
     1463  require_once(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php');
     1464  update_metadata(array($image_id=>$file_path));
    14521465
    14531466  return array(
Note: See TracChangeset for help on using the changeset viewer.