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)