aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-12-03 22:55:17 +0000
committerplegall <plg@piwigo.org>2008-12-03 22:55:17 +0000
commit4fc7acc18bbb6294629e4209872fa3f449f85ce7 (patch)
tree2a1797bf31f7015e0bb3910f63c1cf745e168d59 /tools
parent0ffd66ca946401bfae6db763bacf016bd14fde36 (diff)
merge r2722 from branch 2.0 to trunk
feature 892 added: pwg.images.setInfo added so that once we have discovered the photo was already in the database (thanks to pwg.images.exist), we can only set the photo metadata. git-svn-id: http://piwigo.org/svn/trunk@2919 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--tools/piwigo_remote.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl
index 3e3031c82..a0e876fac 100644
--- a/tools/piwigo_remote.pl
+++ b/tools/piwigo_remote.pl
@@ -192,6 +192,25 @@ if ($opt{action} eq 'pwg.images.exist') {
# print Dumper($response);
}
+if ($opt{action} eq 'pwg.images.setInfo') {
+ $form = {
+ method => $opt{action},
+ };
+
+ foreach my $key (keys %{ $opt{define} }) {
+ $form->{$key} = $opt{define}{$key};
+ }
+
+ my $response = $ua->post(
+ $conf{base_url}.'/ws.php?format=json',
+ $form
+ );
+
+ use Data::Dumper;
+ # print Dumper(from_json($response->content)->{result});
+ print Dumper($response);
+}
+
$query = pwg_ws_get_query(
method => 'pwg.session.logout'
);