Page MenuHomePhabricator

[Feature-Request] Make imagelists $sortable global
Closed, DeclinedPublic

Description

Author: dabuum

Description:
The table in Special:Imagelist is sortable by columns defined in
ImageListPager->isFieldSortable which checks via in_array against "static
$sortable". Please make this variable configurable per LocalSettings. E.g. by
applying this patch against includes/SpecialImagelist.php:

  • C:/Dokumente und Einstellungen/Benedikt/Desktop/oldImagelist.txt Tue Apr 10

14:35:25 2007
+++ C:/Dokumente und Einstellungen/Benedikt/Desktop/newImagelist.txt Tue Apr 10
14:35:20 2007
@@ -64,12 +64,12 @@

		}
		return $this->mFieldNames;
	}

	function isFieldSortable( $field ) {
  • static $sortable = array( 'img_timestamp', 'img_name', 'img_size' );
  • return in_array( $field, $sortable );

+ global $wgImagelistSortable;
+ return in_array( $field, $wgImagelistSortable );

	}

	function getQueryInfo() {
		$fields = $this->getFieldNames();
		unset( $fields['links'] );

Thanks,
Bene


Version: 1.9.x
Severity: minor
URL: http://en.wikipedia.org/wiki/Special:Imagelist

Details

Reference
bz9548

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:36 PM
bzimport set Reference to bz9548.
bzimport added a subscriber: Unknown Object (MLST).

dabuum wrote:

patch

Attached:

robchur wrote:

You'll need to provide default values for the setting so existing behaviour is
not affected, and document the new variable.

robchur wrote:

Reviewing it, this function appears to be for the purposes of limiting sorting
to columns where there are appropriate indexes to support efficient sorting in
that manner, and where the supporting UI elements exist.