Merged in pricetx/hlstatsx-community-edition (pull request #9)
Adjusted rank algorithm to match in-game "rank" command
This commit is contained in:
		| @@ -89,7 +89,7 @@ function getFlag($flag, $type='url') | ||||
|  */ | ||||
| function valid_request($str, $numeric = false) | ||||
| { | ||||
| 	$search_pattern = array("/[^A-Za-z0-9\[\]*.,=()!\"$%&^`<EFBFBD>':;߲<EFBFBD>#+~_\-|<>\/\\\\@{}<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ]/"); | ||||
| 	$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).") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user