Page MenuHomePhabricator

change behavior of Special:Unusedimages for the commons
Closed, ResolvedPublic

Description

This patch causes Special:Unusedimages not to list images that have been put
into a category. This is usefull for the commons, where images don't have to be
on a article page, it's enough if they are categorized. For that reason, the
current behavior of Unusedimages is useless on the commons - it lists a lot of
images that are categorized and therefore do not require attention.

The patched Unusedimages still lists images that are categorized indirectly
through a template (this is due to the way the table categorylinks is build).
This is actually The Right Thing in most cases, as it causes images to be listed
which are only in copyright-categories. But it does lead to some false positives.

Note that it's safe for all wikis to apply this patch, as it has no effect
unless $wgCountCategorizedImagesAsUsed is set in LocalSettings.php; This patch
has been tested with MediaWiki 1.4.1 (CVS-Branch REL1_4), it does not use the
new database schema. Also note that unlike the current version of Unusedimages,
it queries the cur table - there my be performance issues with that, I don't know.

(hm, where do I add the patch? After I submitted the report I guess... we'll see)


Version: 1.4.x
Severity: enhancement

Details

Reference
bz1849

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:19 PM
bzimport set Reference to bz1849.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 408
patched version of SpecialUnusedimages.php; Only getSQL is changed.

attachment SpecialUnusedimages.php ignored as obsolete

jeluf wrote:

Please provide a CVS diff or the exact version number of the file that you
started with.

avarab wrote:

This could also make Special:Unusedimages practically useless on other wikis
that use it to look for images that are in articles.

plugwash wrote:

Ævar thats why he made it a configuration option

mind you the current system of using a normal page does have the advantage of
making it easy to leave comments on avenues of investigation that you have tried
and failed

Created attachment 415
real patch created using cvs diff -u SpecialUnusedimages.php

Attached:

(In reply to comment #4)

Ævar thats why he made it a configuration option

exactly

mind you the current system of using a normal page does have the advantage of
making it easy to leave comments on avenues of investigation that you have tried
and failed

yes, i'm aware of that. Nothing stops us of still using real pages, i'll upload
the updated list in a few days. But keep in mind that the "real" page has the
disadvantage that it can only be updated after a new dump has been released -
the special page is always up to date. So my point it: why not have both?

jeluf wrote:

revoked patch, was erroneously committed to HEAD instead of REL1_4.

jeluf wrote:

Patched in CVS HEAD, SpecialUnusedimages.php, rev 1.24
Patched in CVS REL1_4, SpecialUnusedimages.php, rev 1.18.2.1