Rob Church wrote:
Leaving the fact that I don't support this behaviour in categories aside, I'm starting to think about whether or not we need to be storing this information elsewhere. A page with a bunch of regular expressions on it[1] that is evaluated in the manner the bad image list is...doesn't scale well if the administrators start adding several hundred/thousand odd images to it. It might be more effective to look at migrating this information to the database somewhere.
Actually, I rather agree. The bad image list, as currently implemented, is a hack that doesn't scale. The only question is, does it need to? As it stands, the limited usefulness of the feature rather deters anyone from adding too many images to the list. The patch I wrote, which allows page-specific exceptions to the list, would likely make it a more attractive solution, but it _still_ is only useful for a rather narrow set of images: ones that are "good" enough that we do want to keep them, and maybe use them on a page or two, but still nasty or shocking enough that they can be used for massive vandalism that can cause significant outrage before it is cleaned up. As long as the list remains (or is kept) short enough that the parsing time isn't significant, a database solution isn't likely to make it any faster.
I'm not actually even convinced the list is useful at all. The only reason I wrote that patch, besides the fact that it has been repeatedly requested on-wiki, was in an attempt to make the list at least somewhat more useful given that it does exist.
(You seem to be missing a footnote up there, so I'll supply one: [1] They're not actually regexps, just a list of image names that are read into a hash.)
- Similar to option two, but do it through an extension; don't make
it part of the core code; expose the check via hooks in wfIsBadImage()
This would be my personal favorite, assuming we think the bad image feature is worth spending the effort on. I doubt most wikis really find it useful, so making it an optional extension sounds good. If I was confident I could implement something like that cleanly in a reasonable timeframe, I might've done that myself, but I still consider myself a newcomer to the wonderful world of MediaWiki source code.