r106335 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106334‎ | r106335 | r106336 >
Date:16:46, 15 December 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
tweak, do not use remaining argument for page sort if already set
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php
@@ -186,7 +186,7 @@
187187
188188 // If more sort arguments are provided then properties, assume the first one is for the page.
189189 // TODO: we might want to add errors if there is more then one.
190 - if ( !empty( $orders ) ) {
 190+ if ( !array_key_exists( '', $sortKeys ) && !empty( $orders ) ) {
191191 $sortKeys[''] = array_shift( $orders );
192192 }
193193