diff -r d13fad911955 -r 888502d761b4 plugins/SpecialLog.php --- a/plugins/SpecialLog.php Fri May 15 14:03:54 2009 -0400 +++ b/plugins/SpecialLog.php Fri May 15 14:16:22 2009 -0400 @@ -62,18 +62,21 @@ $value = strval(intval($_POST['value']['within'])) . $_POST['value']['withinunits']; else $value = $_POST['value'][$type]; - - $value = str_replace('/', '.2f', sanitize_page_id($value)); - - if ( empty($value) || ( $type == 'within' && intval($value) == 0 ) ) + + if ( !ctype_digit($value) ) + $value = str_replace('/', '.2f', sanitize_page_id($value)); + + if ( $value !== '0' && (empty($value) || ( $type == 'within' && intval($value) == 0 )) ) { $adderror = $lang->get('log_err_addfilter_field_empty'); } - - $append = ( !empty($_POST['existing_filters']) ) ? "{$_POST['existing_filters']}/" : ''; - $url = makeUrlNS('Special', "Log/{$append}{$type}={$value}"); - - redirect($url, '', '', 0); + else + { + $append = ( !empty($_POST['existing_filters']) ) ? "{$_POST['existing_filters']}/" : ''; + $url = makeUrlNS('Special', "Log/{$append}{$type}={$value}"); + + redirect($url, '', '', 0); + } } $params = explode('/', $params); foreach ( $params as $i => $param ) @@ -210,6 +213,7 @@ +