Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -405,6 +405,7 @@ |
406 | 406 | if ( !$smwgQSortingSupport ) return array(); |
407 | 407 | |
408 | 408 | $params = array(); |
| 409 | + //loading all values from form |
409 | 410 | $orderValues = $wgRequest->getArray( 'order' ); |
410 | 411 | $propertyValues = $wgRequest->getArray( 'property' ); |
411 | 412 | $propertyLabelValues = $wgRequest->getArray( 'prop_label' ); |
— | — | @@ -417,6 +418,7 @@ |
418 | 419 | $mainColumnLabels = $wgRequest->getArray( 'maincol_label' ); |
419 | 420 | $po = array(); |
420 | 421 | |
| 422 | + // processing params for main result column |
421 | 423 | if ( is_array( $mainColumnLabels ) ) { |
422 | 424 | foreach ( $mainColumnLabels as $key => $label ) { |
423 | 425 | if ( $label == '' ) { |
— | — | @@ -424,10 +426,9 @@ |
425 | 427 | } else { |
426 | 428 | $po[$key] = "? = $label"; |
427 | 429 | } |
428 | | - |
429 | 430 | } |
430 | 431 | } |
431 | | - |
| 432 | + // processing params for category printouts |
432 | 433 | $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY ); |
433 | 434 | if ( is_array( $categoryValues ) ) { |
434 | 435 | foreach ( $categoryValues as $key => $value ) { |
— | — | @@ -454,6 +455,7 @@ |
455 | 456 | } |
456 | 457 | } |
457 | 458 | } |
| 459 | + // processing params for property printouts |
458 | 460 | if ( is_array( $propertyValues ) ) { |
459 | 461 | $params['sort'] = ''; |
460 | 462 | $params['order'] = ''; |
— | — | @@ -491,10 +493,11 @@ |
492 | 494 | if ( is_array( $propertyLimitValues ) && // adding limit |
493 | 495 | array_key_exists( $key, $propertyLimitValues ) && |
494 | 496 | $propertyLimitValues[$key] != '' ) { |
| 497 | + // / @bug limit, when specified causes incorrect ordering of printouts |
495 | 498 | $po[] = $propertyValues[$key]; |
496 | 499 | $po[] = '+limit=' . $propertyLimitValues[$key]; |
497 | 500 | } else { |
498 | | - $po[] = $propertyValues[$key]; |
| 501 | + $po[$key] = $propertyValues[$key]; |
499 | 502 | } |
500 | 503 | } |
501 | 504 | } |