Martineznovo has uploaded a new change for review. Change subject: (bug 40120) New api module for Special:NewFiles ......................................................................
(bug 40120) New api module for Special:NewFiles A new api query module with similar functionality of Special:NewFiles. There's currently no api module that could handle a list of recently uploaded files: * list=allimages lists images in alphabetically order. * list=logevents&leaction=upload gives not-usable results when files are deleted or moved This one query the image table, as list=allimages, but the sorting is done using timestamp. It's also capable of filter by username, since there's an index on that table which includes username and timestamp The new class was based on ApiQueryAllimages and the logic of SpecialNewFiles. It reuses public functions provided by ApiQueryImageInfo, same as ApiQueryAllimages does. It includes a parameter to exclude bot uploads, similar to Special:NewFiles, but not used by default, since I think it returning bot uploads or not is not relevant in most cases and excluding them may cause a bit of extra load to the query, so only people that really needs to exclude them would request it. Filtering by mime is also included, as ApiQueryAllimages. It may be useful somewhere? Maybe more useful to get only "images", excluding other unrelated files like documents, zip archives, etc, but I haven't found a list of MIME types already defined that would suit this criteria. Disabled in Miser Mode. And that's all. This is my first commit, hoping not to be the last :) Change-Id: Ie00e9eaeb57b0ae61d68fc68f80aabab126dfdef --- M includes/AutoLoader.php M includes/api/ApiQuery.php A includes/api/ApiQueryNewFiles.php 3 files changed, 249 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/08/23408/1 -- To view, visit https://gerrit.wikimedia.org/r/23408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie00e9eaeb57b0ae61d68fc68f80aabab126dfdef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Martineznovo <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
