jenkins-bot has submitted this change and it was merged. Change subject: Sort output of Special:UnconnectedPages by page ID (descending) ......................................................................
Sort output of Special:UnconnectedPages by page ID (descending) After the refactoring that based SpecialUnconnectedPages on QueryPage, the ORDER BY clause was already ignored and overwritten by getOrderFields(), causing the result to be sorted by page ID. However, since sortDescending() was overwritten to return false, the result was shown with ascending page ids, showing always the same (oldest) pages first. For Special:UnconnectedPages, it is more useful to see new unconnected pages first. This patch removes the redundant sortDescending() and getOrderFields() methods, as well as the obsolete ORDER BY option. Bug: T102817 Change-Id: I89692d9c0f0b76acd9b283e7276e8670929cc14d --- M client/i18n/en.json M client/includes/specials/SpecialUnconnectedPages.php 2 files changed, 2 insertions(+), 23 deletions(-) Approvals: Ladsgroup: Looks good to me, but someone else must approve Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/client/i18n/en.json b/client/i18n/en.json index 7c06e5a..2bb6798 100644 --- a/client/i18n/en.json +++ b/client/i18n/en.json @@ -63,7 +63,7 @@ "wikibase-error-serialize-error": "Failed to serialize data.", "wikibase-error-invalid-entity-id": "The ID entered is unknown to the system. Please use a valid entity ID.", "unconnectedpages": "Pages not connected to items", - "unconnectedpages-summary": "This page lists pages with no connected item. The list is limited to namespaces that support connected items.", + "unconnectedpages-summary": "This page lists pages with no connected data item (in namespaces that support connected items). The list is sorted by descending page ID, so that newer pages are listed first.", "wikibase-unconnectedpages-page": "Start result list with page:", "wikibase-unconnectedpages-submit": "Go", "wikibase-unconnectedpages-invalid-language": "\"$1\" is not a valid language code.", diff --git a/client/includes/specials/SpecialUnconnectedPages.php b/client/includes/specials/SpecialUnconnectedPages.php index cfec328..95c5db6 100644 --- a/client/includes/specials/SpecialUnconnectedPages.php +++ b/client/includes/specials/SpecialUnconnectedPages.php @@ -131,33 +131,12 @@ 'page_num_iwlinks' => '0', // placeholder, we'll get this from page_props in the future ), 'conds' => $conds, - 'options' => array( - 'ORDER BY' => 'page_namespace, page_title', - 'USE INDEX' => array( 'page' => 'name_title' ) - ), + 'options' => array(), // sorting is determined getOrderFields(), which returns array( 'value' ) per default. 'join_conds' => array( // TODO: also get explicit_langlink_count from page_props once that is populated. Could even filter or sort by it via pp_sortkey. 'page_props' => array( 'LEFT JOIN', array( 'page_id = pp_page', "pp_propname = 'wikibase_item'" ) ), ) ); - } - - /** - * @see QueryPage::getOrderFields - * - * @return string[] - */ - function getOrderFields() { - return array( 'value' ); - } - - /** - * @see QueryPage::sortDescending - * - * @return bool Always false for this page. - */ - function sortDescending() { - return false; } /** -- To view, visit https://gerrit.wikimedia.org/r/220106 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89692d9c0f0b76acd9b283e7276e8670929cc14d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: JanZerebecki <jan.wikime...@zerebecki.de> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits