http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89984
Revision: 89984
Author: jeroendedauw
Date: 2011-06-13 18:02:14 +0000 (Mon, 13 Jun 2011)
Log Message:
-----------
minor style tweaks
Modified Paths:
--------------
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php
Modified:
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php
===================================================================
---
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php
2011-06-13 17:58:44 UTC (rev 89983)
+++
trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php
2011-06-13 18:02:14 UTC (rev 89984)
@@ -97,13 +97,16 @@
}
}
- if ( $finalvalues != '' )
$valuestack[] = '"' . str_replace( ' ', '_', strtolower( $pr->getLabel() ) ) .
'": ' . $finalvalues . '';
+ if ( $finalvalues != '' ) {
+ $valuestack[] = '"' .
str_replace( ' ', '_', strtolower( $pr->getLabel() ) ) . '": ' . $finalvalues .
'';
+ }
}
}
if ( $rowsubject !== false ) { // stuff in the
page URI and some category data
$valuestack[] = '"uri" : "' . $wgServer
. $wgScriptPath . '/index.php?title=' . $rowsubject->getPrefixedText() . '"';
$page_cats =
smwfGetStore()->getPropertyValues( $rowsubject, new SMWDIProperty( '_INST' ) );
// TODO: set limit to 1 here
+
if ( count( $page_cats ) > 0 ) {
$valuestack[] = '"type" : "' .
reset($page_cats)->getShortHTMLText() . '"';
}
@@ -145,7 +148,9 @@
$link->setParameter( 'json', 'format' );
$result = $link->getText( $outputmode, $this->mLinker );
- $this->isHTML = ( $outputmode == SMW_OUTPUT_HTML ); //
yes, our code can be viewed as HTML if requested, no more parsing needed
+
+ // yes, our code can be viewed as HTML if requested, no
more parsing needed
+ $this->isHTML = $outputmode == SMW_OUTPUT_HTML;
}
return $result;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs