r69621 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69620‎ | r69621 | r69622 >
Date:15:06, 20 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed PHP strict standards issue
Modified paths:
  • /trunk/extensions/SemanticDrilldown/includes/SD_FilterValue.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/includes/SD_FilterValue.php
@@ -65,25 +65,31 @@
6666 }
6767
6868 /*
69 - * Used in sorting, when BrowseDataPage creates a new URL
 69+ * Used in sorting, when BrowseDataPage creates a new URL.
7070 */
71 - function compare( $fv1, $fv2 ) {
 71+ public static function compare( $fv1, $fv2 ) {
7272 if ( $fv1->is_none ) return 1;
7373 if ( $fv2->is_none ) return - 1;
7474 if ( $fv1->is_other ) return 1;
7575 if ( $fv2->is_other ) return - 1;
 76+
7677 if ( $fv1->year != null && $fv2->year != null ) {
7778 if ( $fv1->year == $fv2->year ) {
7879 if ( $fv1->month == $fv1->month ) return 0;
7980 return ( $fv1->month > $fv2->month ) ? 1 : - 1;
8081 }
 82+
8183 return ( $fv1->year > $fv2->year ) ? 1 : - 1;
8284 }
 85+
8386 if ( $fv1->is_numeric ) {
8487 if ( $fv1->lower_limit == null ) return - 1;
8588 return ( $fv1->lower_limit > $fv2->lower_limit ) ? 1 : - 1;
8689 }
 90+
8791 if ( $fv1->text == $fv2->text ) return 0;
 92+
8893 return ( $fv1->text > $fv2->text ) ? 1 : - 1;
8994 }
90 -}
 95+
 96+}
\ No newline at end of file

Status & tagging log