Last modified: 2011-11-22 08:31:15 UTC
Currently the rc_cur_id is not being populated, nor is there a old_id filled. This makes it impossible tricky to properly work with uploads. On the toolserver and in extensions, listing recent uploads is complicated as the file could've been renamed in the mean time and the redirect deleted. In order to build a working link from the recent changes with normal edits I use rc_cur_id and the link-format <a href="/w/index.php?curid= (rc_cur_id)">(namespaces[rc_namespace]) . rc_title</a> But with uploads this fails. A join to the page table is posible to retrieve the page id but that's a bit expensive to just get an id. And if the redirect is deleted it's no longer in the page table either and the entry in the recentchangges table is basically a ghost. And no other working entry for that upload action is to be found.
http://commons.wikimedia.org/w/api.php?action=query&list=recentchanges&rclimit=5000&rcprop=comment|title|ids|timestamp|loginfo&rctype=log A quick grep shows that the entries that now have rc_cur_id filled in are all generated by Flickr upload bot... yay for the bot but it would be nice if we got regular entries fixed up too. Here's a specific image with just one revision and except for rc it looks normal: http://commons.wikimedia.org/w/index.php?title=File:Gunther_Von-Bultzingslowen-met-het-.jpg&action=history but here's the rc entry, rc_cur_id = 0. <rc type="log" ns="6" title="File:Gunther Von-Bultzingslowen-met-het-.jpg" rcid="64034030" pageid="0" revid="0" old_revid="0" timestamp="2011-11-21T18:13:12Z" comment="{{Informa... <snipped for the bug report> " logid="31812295" logtype="upload" logaction="upload">
(In reply to comment #1) > http://commons.wikimedia.org/w/api.php?action=query&list=recentchanges&rclimit=5000&rcprop=comment|title|ids|timestamp|loginfo&rctype=log > > A quick grep shows that the entries that now have rc_cur_id filled in are all > generated by Flickr upload bot... yay for the bot but it would be nice if we > got regular entries fixed up too. > Ariel, that is because of the way the uploading process works: first the users creates a page in the File: namespace, and then the bot uploads an image to that page. So essentially the file already has a page id when the file is being uploaded.