http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88778
Revision: 88778
Author: mkroetzsch
Date: 2011-05-25 07:35:23 +0000 (Wed, 25 May 2011)
Log Message:
-----------
minor style adjustments
Modified Paths:
--------------
trunk/extensions/SemanticMediaWiki/includes/SMW_QueryLanguage.php
Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryLanguage.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/SMW_QueryLanguage.php
2011-05-25 06:50:20 UTC (rev 88777)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_QueryLanguage.php
2011-05-25 07:35:23 UTC (rev 88778)
@@ -70,18 +70,16 @@
public static function getStringForComparator( $comparator ) {
self::initializeComparators();
static $reverseCache = false;
-
+
if ( $reverseCache === false ) {
$reverseCache = array_flip( self::$comparators );
}
if ( $comparator == SMW_CMP_EQ ) {
return '';
- }
- else if ( array_key_exists( $comparator, $reverseCache ) ) {
+ } elseif ( array_key_exists( $comparator, $reverseCache ) ) {
return $reverseCache[$comparator];
- }
- else {
+ } else {
throw new Exception( "Comparator $comparator does not
have a string representatation" );
}
}
@@ -94,7 +92,7 @@
protected static function initializeComparators() {
global $smwgQComparators, $smwStrictComparators;
static $initialized = false;
-
+
if ( $initialized ) {
return;
}
@@ -113,7 +111,7 @@
'!' => SMW_CMP_NEQ,
'~' => SMW_CMP_LIKE,
);
-
+
$allowedComparators = explode( '|', $smwgQComparators );
// Remove the comparators that are not allowed.
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs