* @ingroup SpecialPage
*/
+use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IDatabase;
+
/**
* Class definition for a wanted query page like
* WantedPages, WantedTemplates, etc
$label = $this->msg( 'nlinks' )->numParams( $result->value )->escaped();
return Linker::link( $wlh, $label );
}
+
+ /**
+ * Order by title for pages with the same number of links to them
+ *
+ * @return array
+ * @since 1.29
+ */
+ function getOrderFields() {
+ return [ 'value DESC', 'namespace', 'title' ];
+ }
+
+ /**
+ * Do not order descending for all order fields. We will use DESC only on one field, see
+ * getOrderFields above. This overwrites sortDescending from QueryPage::getOrderFields().
+ * Do NOT change this to true unless you remove the phrase DESC in getOrderFiels above.
+ * If you do a database error will be thrown due to double adding DESC to query!
+ *
+ * @return bool
+ * @since 1.29
+ */
+ function sortDescending() {
+ return false;
+ }
+
+ /**
+ * Also use the order fields returned by getOrderFields when fetching from the cache.
+ * @return array
+ * @since 1.29
+ */
+ function getCacheOrderFields() {
+ return $this->getOrderFields();
+ }
+
}