r89984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89983‎ | r89984 | r89985 >
Date:18:02, 13 June 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
minor style tweaks
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php
@@ -97,13 +97,16 @@
9898 }
9999 }
100100
101 - if ( $finalvalues != '' ) $valuestack[] = '"' . str_replace( ' ', '_', strtolower( $pr->getLabel() ) ) . '": ' . $finalvalues . '';
 101+ if ( $finalvalues != '' ) {
 102+ $valuestack[] = '"' . str_replace( ' ', '_', strtolower( $pr->getLabel() ) ) . '": ' . $finalvalues . '';
 103+ }
102104 }
103105 }
104106
105107 if ( $rowsubject !== false ) { // stuff in the page URI and some category data
106108 $valuestack[] = '"uri" : "' . $wgServer . $wgScriptPath . '/index.php?title=' . $rowsubject->getPrefixedText() . '"';
107109 $page_cats = smwfGetStore()->getPropertyValues( $rowsubject, new SMWDIProperty( '_INST' ) ); // TODO: set limit to 1 here
 110+
108111 if ( count( $page_cats ) > 0 ) {
109112 $valuestack[] = '"type" : "' . reset($page_cats)->getShortHTMLText() . '"';
110113 }
@@ -145,7 +148,9 @@
146149
147150 $link->setParameter( 'json', 'format' );
148151 $result = $link->getText( $outputmode, $this->mLinker );
149 - $this->isHTML = ( $outputmode == SMW_OUTPUT_HTML ); // yes, our code can be viewed as HTML if requested, no more parsing needed
 152+
 153+ // yes, our code can be viewed as HTML if requested, no more parsing needed
 154+ $this->isHTML = $outputmode == SMW_OUTPUT_HTML;
150155 }
151156
152157 return $result;