r44908 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44907‎ | r44908 | r44909 >
Date:17:52, 22 December 2008
Author:yaron
Status:deferred
Tags:
Comment:
Fix for blank filter values
Modified paths:
  • /trunk/extensions/SemanticDrilldown/includes/SD_FilterValue.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/includes/SD_FilterValue.php
@@ -38,7 +38,9 @@
3939 $originals = array('<', '>');
4040 $replacements = array('<', '>');
4141 $fv->text = str_replace($originals, $replacements, $fv->text);
42 - if ($fv->text{0} == '<') {
 42+ if ($fv->text == '') {
 43+ // do nothing
 44+ } elseif ($fv->text{0} == '<') {
4345 $possible_number = str_replace(',', '', trim(substr($fv->text, 1)));
4446 if (is_numeric($possible_number)) {
4547 $fv->upper_limit = $possible_number;

Status & tagging log