r88213 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88212‎ | r88213 | r88214 >
Date:03:28, 16 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added some helpful curly brackets for if statements
Modified paths:
  • /trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php
@@ -343,10 +343,11 @@
344344 $sql .= "JOIN $smw_atts a$i ON ids.smw_id = a$i.s_id ";
345345 }
346346 }
347 - if ( $subcategory )
 347+ if ( $subcategory ) {
348348 $actual_cat = str_replace( ' ', '_', $subcategory );
349 - else
 349+ } else {
350350 $actual_cat = str_replace( ' ', '_', $category );
 351+ }
351352 $actual_cat = str_replace( "'", "\'", $actual_cat );
352353 $sql .= "WHERE insts.o_id IN
353354 (SELECT smw_id FROM $smw_ids cat_ids
@@ -749,8 +750,9 @@
750751 $found_results_for_filter = false;
751752 if ( count( $f->allowed_values ) == 0 ) {
752753 $filter_values = $f->getAllValues();
753 - if ( count( $filter_values ) > 0 )
 754+ if ( count( $filter_values ) > 0 ) {
754755 $found_results_for_filter = true;
 756+ }
755757 } else {
756758 $filter_values = array();
757759 foreach ( $f->allowed_values as $value ) {
@@ -798,8 +800,9 @@
799801 } elseif ( $f->input_type == wfMsgForContent( 'sd_filter_daterange' ) ) {
800802 $results_line = $this->printDateRangeInput( $filter_name );
801803 $normal_filter = false;
802 - } else
 804+ } else {
803805 $results_line = $this->printUnappliedFilterValues( $cur_url, $f, $filter_values );
 806+ }
804807
805808 $text = "";
806809 $filter_label = $this->printFilterLabel( $f->name );

Status & tagging log