Hi, When deleting a file attachment via the Mediawiki::API->edit, how to get the revision number at that moment? For example, when i upload a file, i can find it by the query: *# Find the number of revision of the page which has the id="$id"* * my $query = { action => 'query', prop => 'revisions', rvprop => 'ids', pageids => $id, }; my $result = $mediawiki->api($query); ..........................................................................
*But, when deleting a file, we can't use this mechanism. I wonder if the API support a function to get this number of revision? Thanks.
On 04/06/12 15:50, nguyenkim thuat wrote:
Hi, When deleting a file attachment via the Mediawiki::API->edit, how to get the revision number at that moment? For example, when i upload a file, i can find it by the query: *# Find the number of revision of the page which has the id="$id"*
- /my $query = { action => 'query', prop => 'revisions', rvprop => 'ids', pageids => $id, }; my $result = $mediawiki->api($query); ..........................................................................
/ *But, when deleting a file, we can't use this mechanism. I wonder if the API support a function to get this number of revision? Thanks.
Files don't have a revision number. You seem to be checking the revision of the description page of a file.
Or by "deleting a file attachment" you mean "edit the page to change text"? (which incidentally happens to remove an image from it)
On Mon, Jun 4, 2012 at 5:45 PM, Platonides platonides@gmail.com wrote:
On 04/06/12 15:50, nguyenkim thuat wrote:
Hi, When deleting a file attachment via the Mediawiki::API->edit, how to get the revision number at that moment? For example, when i upload a file, i can find it by the query: *# Find the number of revision of the page which has the id="$id"*
- /my $query = { action => 'query', prop => 'revisions', rvprop => 'ids', pageids => $id, }; my $result = $mediawiki->api($query);
..........................................................................
/ *But, when deleting a file, we can't use this mechanism. I wonder if the API support a function to get this number of revision? Thanks.
Files don't have a revision number. You seem to be checking the revision of the description page of a file.
Yeah, i know that file doesn't have the revision number but when we delete a file attachment. we have also a revision number for it. My question is how to get this number via the API.
Or by "deleting a file attachment" you mean "edit the page to change text"? (which incidentally happens to remove an image from it
No, i mean deleting a file in the list of file uploads.
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org