r94611 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94610‎ | r94611 | r94612 >
Date:08:27, 16 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
added minor documentation
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -405,6 +405,7 @@
406406 if ( !$smwgQSortingSupport ) return array();
407407
408408 $params = array();
 409+ //loading all values from form
409410 $orderValues = $wgRequest->getArray( 'order' );
410411 $propertyValues = $wgRequest->getArray( 'property' );
411412 $propertyLabelValues = $wgRequest->getArray( 'prop_label' );
@@ -417,6 +418,7 @@
418419 $mainColumnLabels = $wgRequest->getArray( 'maincol_label' );
419420 $po = array();
420421
 422+ // processing params for main result column
421423 if ( is_array( $mainColumnLabels ) ) {
422424 foreach ( $mainColumnLabels as $key => $label ) {
423425 if ( $label == '' ) {
@@ -424,10 +426,9 @@
425427 } else {
426428 $po[$key] = "? = $label";
427429 }
428 -
429430 }
430431 }
431 -
 432+ // processing params for category printouts
432433 $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY );
433434 if ( is_array( $categoryValues ) ) {
434435 foreach ( $categoryValues as $key => $value ) {
@@ -454,6 +455,7 @@
455456 }
456457 }
457458 }
 459+ // processing params for property printouts
458460 if ( is_array( $propertyValues ) ) {
459461 $params['sort'] = '';
460462 $params['order'] = '';
@@ -491,10 +493,11 @@
492494 if ( is_array( $propertyLimitValues ) && // adding limit
493495 array_key_exists( $key, $propertyLimitValues ) &&
494496 $propertyLimitValues[$key] != '' ) {
 497+ // / @bug limit, when specified causes incorrect ordering of printouts
495498 $po[] = $propertyValues[$key];
496499 $po[] = '+limit=' . $propertyLimitValues[$key];
497500 } else {
498 - $po[] = $propertyValues[$key];
 501+ $po[$key] = $propertyValues[$key];
499502 }
500503 }
501504 }