r73997 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73996‎ | r73997 | r73998 >
Date:22:46, 29 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r73986
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php
@@ -75,13 +75,13 @@
7676 global $wgRequest, $smwgQMaxInlineLimit;
7777
7878 // First make all inputs into a simple parameter list that can again be parsed into components later.
79 -
8079 if ( $wgRequest->getCheck( 'q' ) ) { // called by own Special, ignore full param string in that case
8180 $query_values = $wgRequest->getArray( 'p' );
8281 $query_val = $wgRequest->getVal( 'p' );
8382
84 - if ( ! empty( $query_val ) )
85 - $rawparams = SMWInfolink::decodeParameters( $query_val, false ); // p is used for any additional parameters in certain links
 83+ if ( !empty( $query_val ) )
 84+ // p is used for any additional parameters in certain links.
 85+ $rawparams = SMWInfolink::decodeParameters( $query_val, false );
8686 else {
8787 $query_values = $wgRequest->getArray( 'p' );
8888
@@ -89,7 +89,8 @@
9090 if ( empty( $val ) ) unset( $query_values[$key] );
9191 }
9292
93 - $rawparams = SMWInfolink::decodeParameters( $query_values, false ); // p is used for any additional parameters in certain links
 93+ // p is used for any additional parameters in certain links.
 94+ $rawparams = SMWInfolink::decodeParameters( $query_values, false );
9495 }
9596 } else { // called from wiki, get all parameters
9697 $rawparams = SMWInfolink::decodeParameters( $p, true );
@@ -118,16 +119,12 @@
119120 }
120121 }
121122
122 - // Now parse parameters and rebuilt the param strings for URLs
 123+ // Now parse parameters and rebuilt the param strings for URLs.
123124 SMWQueryProcessor::processFunctionParams( $rawparams, $this->m_querystring, $this->m_params, $this->m_printouts );
124125
125 - // Try to complete undefined parameter values from dedicated URL params
 126+ // Try to complete undefined parameter values from dedicated URL params.
126127 if ( !array_key_exists( 'format', $this->m_params ) ) {
127 - if ( array_key_exists( 'rss', $this->m_params ) ) { // backwards compatibility (SMW<=1.1 used this)
128 - $this->m_params['format'] = 'rss';
129 - } else { // default
130 - $this->m_params['format'] = 'broadtable';
131 - }
 128+ $this->m_params['format'] = 'broadtable';
132129 }
133130
134131 if ( !array_key_exists( 'order', $this->m_params ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73986Changes for 1.5.3 - fixing a whole bunch of style failsjeroendedauw21:39, 29 September 2010

Status & tagging log