diff options
-rw-r--r-- | include/ws_functions.inc.php | 4 | ||||
-rw-r--r-- | tools/piwigo_remote.pl | 3 | ||||
-rw-r--r-- | ws.php | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index e305016e3..fbc5d5283 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -828,6 +828,7 @@ function ws_images_add($params, &$service) // file_sum // thumbnail_content // thumbnail_sum + // rank // $fh_log = fopen('/tmp/php.log', 'w'); // fwrite($fh_log, time()."\n"); @@ -926,7 +927,8 @@ function ws_images_add($params, &$service) $insert = array( 'category_id' => $params['category_id'], - 'image_id'=> $image_id, + 'image_id' => $image_id, + 'rank' => $params['rank'], ); mass_inserts( IMAGE_CATEGORY_TABLE, diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl index 90dc528ac..582aca294 100644 --- a/tools/piwigo_remote.pl +++ b/tools/piwigo_remote.pl @@ -10,7 +10,7 @@ use Getopt::Long; my %opt = (); GetOptions( \%opt, - qw/action=s file=s thumbnail=s category_id=i name=s/ + qw/action=s file=s thumbnail=s category_id=i name=s rank=i/ ); our $ua = LWP::UserAgent->new; @@ -61,6 +61,7 @@ if ($opt{action} eq 'pwg.images.add') { thumbnail_content => $thumbnail_content, category_id => $opt{category_id}, name => $opt{name}, + rank => defined($opt{rank}) ? $opt{rank} : 1, }; my $response = $ua->post( @@ -181,7 +181,8 @@ function ws_addDefaultMethods( $arr ) 'file_content', 'file_sum', 'thumbnail_content', - 'thumbnail_sum' + 'thumbnail_sum', + 'rank', ), 'POST method only' ); |