Last modified: 2011-03-13 18:06:17 UTC
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
Created attachment 3432 [details] patch
You'll need to provide default values for the setting so existing behaviour is not affected, and document the new variable.
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.