Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -487,6 +487,10 @@ |
488 | 488 | $params['sort'] = ''; |
489 | 489 | $params['order'] = ''; |
490 | 490 | foreach ( $propertyValues as $key => $propertyValue ) { |
| 491 | + $propertyValues[$key] = trim( $propertyValue ); |
| 492 | + if ( $propertyValues[$key] == '' ) { |
| 493 | + unset( $propertyValues[$key] ); |
| 494 | + } |
491 | 495 | if ( $smwgQSortingSupport |
492 | 496 | && is_array( $orderValues ) |
493 | 497 | && array_key_exists( $key, $orderValues ) |
— | — | @@ -596,16 +600,16 @@ |
597 | 601 | '</strong></span>' . |
598 | 602 | Xml::openElement( 'div', |
599 | 603 | array( 'id' => 'mainlabel-dialog', |
600 | | - 'title' => wfMsg( 'smw_qui_mainlabopts'), |
| 604 | + 'title' => wfMsg( 'smw_qui_mainlabopts' ), |
601 | 605 | 'class' => 'smwmainlabdialog' ) |
602 | | - ). |
603 | | - '<table align="center" ><tr>'. |
604 | | - '<td>'. wfMsg('smw_qui_dlabel'). '</td>'. |
605 | | - '<td><input size="25" value="' . $mainLabelText . '" id="mainlabelvis" /></td>'. |
| 606 | + ) . |
| 607 | + '<table align="center" ><tr>' . |
| 608 | + '<td>' . wfMsg( 'smw_qui_dlabel' ) . '</td>' . |
| 609 | + '<td><input size="25" value="' . $mainLabelText . '" id="mainlabelvis" /></td>' . |
606 | 610 | '</tr></table>' . |
607 | | - '</div>'. |
| 611 | + '</div>' . |
608 | 612 | '<input type="hidden" name="pmainlabel" value="' . $mainLabel . '" id="mainlabelhid" /> ' . |
609 | | - '<a class="smwq-more" href="javascript:smw_makeMainlabelDialog()">'.wfMsg( 'smw_qui_options' ).'</a> '. |
| 613 | + '<a class="smwq-more" href="javascript:smw_makeMainlabelDialog()">' . wfMsg( 'smw_qui_options' ) . '</a> ' . |
610 | 614 | '</div>'; |
611 | 615 | $urlArgs = array(); |
612 | 616 | $urlArgs['pmainlabel'] = $mainLabel; |
— | — | @@ -1059,18 +1063,18 @@ |
1060 | 1064 | '<table align="center">' . |
1061 | 1065 | '<tr><td>' . $categoryHtml[0] . '</td><td>' . $categoryHtml[1] . '</td></tr>' . |
1062 | 1066 | '<tr><td>' . $categoryLabelHtml[0] . '</td><td>' . $categoryLabelHtml[1] . '</td></tr>' . |
1063 | | - '</table><br/><table align="center">'. |
| 1067 | + '</table><br/><table align="center">' . |
1064 | 1068 | '<tr><td>' . $categoryYesHtml[0] . '</td><td>' . $categoryYesHtml[1] . '</td></tr>' . |
1065 | 1069 | '<tr><td>' . $categoryNoHtml[0] . '</td><td>' . $categoryNoHtml[1] . '</td></tr>' . |
1066 | 1070 | '</table>' . |
1067 | 1071 | Xml::closeElement( 'div' ); |
1068 | 1072 | $mainLabelDialogBox = Xml::openElement( 'div', |
1069 | 1073 | array( 'id' => 'mainlabel-dialog', |
1070 | | - 'title' => wfMsg( 'smw_qui_mainlabopts'), |
| 1074 | + 'title' => wfMsg( 'smw_qui_mainlabopts' ), |
1071 | 1075 | 'class' => 'smwmainlabdialog' ) |
1072 | | - ). |
1073 | | - Xml::inputLabel(wfMsg('smw_qui_dlabel'), '', 'd-mainlabel-label'). |
1074 | | - Xml::closeElement('div'); |
| 1076 | + ) . |
| 1077 | + Xml::inputLabel( wfMsg( 'smw_qui_dlabel' ), '', 'd-mainlabel-label' ) . |
| 1078 | + Xml::closeElement( 'div' ); |
1075 | 1079 | |
1076 | 1080 | $result .= '<div id="sorting_main"></div>' . "\n"; |
1077 | 1081 | $result .= '[<a href="javascript:smw_addPropertyInstance(\'property_starter\', \'sorting_main\')">' . wfMsg( 'smw_qui_addnprop' ) . '</a>]' . |