r94883 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94882‎ | r94883 | r94884 >
Date:12:02, 18 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
follow-up r94770
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -487,6 +487,10 @@
488488 $params['sort'] = '';
489489 $params['order'] = '';
490490 foreach ( $propertyValues as $key => $propertyValue ) {
 491+ $propertyValues[$key] = trim( $propertyValue );
 492+ if ( $propertyValues[$key] == '' ) {
 493+ unset( $propertyValues[$key] );
 494+ }
491495 if ( $smwgQSortingSupport
492496 && is_array( $orderValues )
493497 && array_key_exists( $key, $orderValues )
@@ -596,16 +600,16 @@
597601 '</strong></span>' .
598602 Xml::openElement( 'div',
599603 array( 'id' => 'mainlabel-dialog',
600 - 'title' => wfMsg( 'smw_qui_mainlabopts'),
 604+ 'title' => wfMsg( 'smw_qui_mainlabopts' ),
601605 '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>' .
606610 '</tr></table>' .
607 - '</div>'.
 611+ '</div>' .
608612 '<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> ' .
610614 '</div>';
611615 $urlArgs = array();
612616 $urlArgs['pmainlabel'] = $mainLabel;
@@ -1059,18 +1063,18 @@
10601064 '<table align="center">' .
10611065 '<tr><td>' . $categoryHtml[0] . '</td><td>' . $categoryHtml[1] . '</td></tr>' .
10621066 '<tr><td>' . $categoryLabelHtml[0] . '</td><td>' . $categoryLabelHtml[1] . '</td></tr>' .
1063 - '</table><br/><table align="center">'.
 1067+ '</table><br/><table align="center">' .
10641068 '<tr><td>' . $categoryYesHtml[0] . '</td><td>' . $categoryYesHtml[1] . '</td></tr>' .
10651069 '<tr><td>' . $categoryNoHtml[0] . '</td><td>' . $categoryNoHtml[1] . '</td></tr>' .
10661070 '</table>' .
10671071 Xml::closeElement( 'div' );
10681072 $mainLabelDialogBox = Xml::openElement( 'div',
10691073 array( 'id' => 'mainlabel-dialog',
1070 - 'title' => wfMsg( 'smw_qui_mainlabopts'),
 1074+ 'title' => wfMsg( 'smw_qui_mainlabopts' ),
10711075 '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' );
10751079
10761080 $result .= '<div id="sorting_main"></div>' . "\n";
10771081 $result .= '[<a href="javascript:smw_addPropertyInstance(\'property_starter\', \'sorting_main\')">' . wfMsg( 'smw_qui_addnprop' ) . '</a>]' .

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94770fixed disappearing empty property printouts and smwgQSortingSupportdevayon16:20, 17 August 2011