@@ -43,7 +43,7 @@
$template .= $ROOT . 'game-images/soldiers/' . $playerFavorite['army'] . '_' . $playerFavorite['kit'] . '_' . $playerFavorite['weapon'] . '.jpg';
else
$template .= $ROOT . 'game-images/soldiers/' . $playerFavorite['army'] . '_' . $playerFavorite['kit'] . '_5.jpg'; // show pistol...
- $template .= '" alt="' . $player['name'] . ' - ' . getArmyByID($playerFavorite['army']) . '" />
+ $template .= '" alt="' . esc_attr((RANKING_PIDS_AS_NAMES ? $player['id'] : $player['name'])) . ' - ' . getArmyByID($playerFavorite['army']) . '" />
@@ -719,7 +719,7 @@
Favorite Victim (Kills to) | ';
if ($victims && trim($victims[0]['victim']) != '')
- $template .= ' ' . getNickFromPID($victims[0]['victim']) . ' (' . $victims[0]['count'] . ') | ';
+ $template .= ' ' . esc_attr(RANKING_PIDS_AS_NAMES ? $victims[0]['victim'] : getNickFromPID($victims[0]['victim'])) . ' (' . $victims[0]['count'] . ') | ';
else
$template .= 'You are no one\'s worst enemy. Go bully someone. | ';
$template .= '
@@ -738,7 +738,7 @@
{
if ($written != 0) $template .= ', ';
$written++;
- $template .= ' '.getNickFromPID($victims[$i]['victim']).' ('.$victims[$i]['count'].')';
+ $template .= ' ' . esc_attr(RANKING_PIDS_AS_NAMES ? $victims[$i]['victim'] : getNickFromPID($victims[$i]['victim'])) . ' ('.$victims[$i]['count'].')';
}
}
$template .= '
@@ -747,7 +747,7 @@
Worst Enemy (Deaths by) | ';
if ($enemies)
- $template .= ' ' . getNickFromPID($enemies[0]['attacker']) . ' (' . $enemies[0]['count'] . ') | ';
+ $template .= ' ' . esc_attr(RANKING_PIDS_AS_NAMES ? $enemies[0]['attacker'] : getNickFromPID($enemies[0]['attacker'])) . ' (' . $enemies[0]['count'] . ') | ';
else
$template .= 'It seems you are invincible! | ';
$template .= '
@@ -767,7 +767,7 @@
{
if ($written != 0) $template .= ', ';
$written++;
- $template .= ' '.getNickFromPID($enemies[$i]['attacker']).' ('.$enemies[$i]['count'].')';
+ $template .= ' ' . esc_attr(RANKING_PIDS_AS_NAMES ? $enemies[$i]['attacker'] : getNickFromPID($enemies[$i]['attacker'])) . ' ('.$enemies[$i]['count'].')';
}
}
$template .= '
diff --git a/src/bf2sclone/template/search.php b/src/bf2sclone/template/search.php
index a089871..52486b7 100644
--- a/src/bf2sclone/template/search.php
+++ b/src/bf2sclone/template/search.php
@@ -78,7 +78,7 @@
$template .= '
- '.$searchresults[$i]['name'].'
+ ' . (RANKING_PIDS_AS_NAMES ? $searchresults[$i]['id'] : esc_attr($searchresults[$i]['name'])) . '
|
'.$searchresults[$i]['score'].' |
diff --git a/src/bf2sclone/template/server.php b/src/bf2sclone/template/server.php
index d410ca6..1aa77f5 100644
--- a/src/bf2sclone/template/server.php
+++ b/src/bf2sclone/template/server.php
@@ -210,7 +210,7 @@
' . ($s['data'] ? esc_attr($k+1) : '-') . ' |
' . '
- ' . esc_attr($p['name']) . '
+ ' . esc_attr(RANKING_PIDS_AS_NAMES ? $p['pid'] : $p['name']) . '
|
' . ($s['data'] ? esc_attr($p['score']) : '-') . ' |
' . ($s['data'] ? esc_attr($p['kills']) : '-') . ' |