http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94611

Revision: 94611
Author:   devayon
Date:     2011-08-16 08:27:58 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
added minor documentation

Modified Paths:
--------------
    trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php

Modified: 
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
===================================================================
--- 
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php    
    2011-08-16 08:15:17 UTC (rev 94610)
+++ 
trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php    
    2011-08-16 08:27:58 UTC (rev 94611)
@@ -405,6 +405,7 @@
                if ( !$smwgQSortingSupport ) return array();
 
                $params = array();
+               //loading all values from form
                $orderValues = $wgRequest->getArray( 'order' );
                $propertyValues = $wgRequest->getArray( 'property' );
                $propertyLabelValues = $wgRequest->getArray( 'prop_label' );
@@ -417,6 +418,7 @@
                $mainColumnLabels = $wgRequest->getArray( 'maincol_label' );
                $po = array();
 
+               // processing params for main result column
                if ( is_array( $mainColumnLabels ) ) {
                        foreach ( $mainColumnLabels as $key => $label ) {
                                if ( $label == '' ) {
@@ -424,10 +426,9 @@
                                } else {
                                        $po[$key] = "? = $label";
                                }
-
                        }
                }
-
+               // processing params for category printouts
                $categoryNamespace = $wgContLang->getNsText( NS_CATEGORY );
                if ( is_array( $categoryValues ) ) {
                        foreach ( $categoryValues as $key => $value ) {
@@ -454,6 +455,7 @@
                                }
                        }
                }
+               // processing params for property printouts
                if ( is_array( $propertyValues ) ) {
                        $params['sort'] = '';
                        $params['order'] = '';
@@ -491,10 +493,11 @@
                                                if ( is_array( 
$propertyLimitValues ) && // adding limit
                                                                
array_key_exists( $key, $propertyLimitValues ) &&
                                                                
$propertyLimitValues[$key] != '' ) {
+                                                       // / @bug limit, when 
specified causes incorrect ordering of printouts
                                                        $po[] = 
$propertyValues[$key];
                                                        $po[] = '+limit=' . 
$propertyLimitValues[$key];
                                                } else {
-                                                       $po[] = 
$propertyValues[$key];
+                                                       $po[$key] = 
$propertyValues[$key];
                                                }
                                        }
                                }


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to