From 5fb995f5f678bb63398ce7c6640dcccc70c863a5 Mon Sep 17 00:00:00 2001 From: pricetx Date: Mon, 28 Dec 2015 01:09:57 +0000 Subject: [PATCH 1/2] Adjusted rank algorithm to match in-game "rank" command --- web/includes/functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 2ff597b..ad32f89 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -89,7 +89,7 @@ function getFlag($flag, $type='url') */ function valid_request($str, $numeric = false) { - $search_pattern = array("/[^A-Za-z0-9\[\]*.,=()!\"$%&^`´':;ß²³#+~_\-|<>\/\\\\@{}äöüÄÖÜ ]/"); + $search_pattern = array("/[^A-Za-z0-9\[\]*.,=()!\"$%&^`�':;߲�#+~_\-|<>\/\\\\@{}������ ]/"); $replace_pattern = array(''); $str = preg_replace($search_pattern, $replace_pattern, $str); if ( $numeric == false ) @@ -511,7 +511,6 @@ function get_player_rank($playerdata) { WHERE game='".$playerdata['game']."' AND hideranking = 0 - AND kills >= 1 AND ( (".$g_options['rankingtype']." > '".$playerdata[$g_options['rankingtype']]."') OR ( (".$g_options['rankingtype']." = '".$playerdata[$g_options['rankingtype']]."') AND (kills/IF(deaths=0,1,deaths) > ".($playerdata['kills']/$tempdeaths).") From e3524b36b084d55dfa4e4c4ff4edbc532fdda82f Mon Sep 17 00:00:00 2001 From: pricetx Date: Mon, 28 Dec 2015 21:47:14 +0000 Subject: [PATCH 2/2] Re-entered special characters that were removed in previous commit --- web/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index ad32f89..2433c67 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -89,7 +89,7 @@ function getFlag($flag, $type='url') */ function valid_request($str, $numeric = false) { - $search_pattern = array("/[^A-Za-z0-9\[\]*.,=()!\"$%&^`�':;߲�#+~_\-|<>\/\\\\@{}������ ]/"); + $search_pattern = array("/[^A-Za-z0-9\[\]*.,=()!\"$%&^`´':;߲ł#+~_\-|<>\/\\\\@{}äöüÄÖÜ ]/"); $replace_pattern = array(''); $str = preg_replace($search_pattern, $replace_pattern, $str); if ( $numeric == false )