Merge remote-tracking branch 'origin/master' into prod

* origin/master:
  up<medal> may not be set
  show correct medal
  Show the correct medal
This commit is contained in:
Vincent Riquer 2015-02-02 11:40:40 +01:00
commit a181718b86
2 changed files with 11 additions and 10 deletions

16
index
View File

@ -179,7 +179,7 @@ then
&& maxtimestamp=$timestamp
for stat in ${nextsilver[timestamp]}
do
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]:-0} silver)" )
tableline+=( '<br />' )
(( ++count == lvlsilver[level] - silvercount )) && break 2
done
@ -189,7 +189,7 @@ then
do
(( count >= lvlsilver[level] - silvercount )) && break 1
(( count < lvlsilver[level] - silvercount )) && never=1
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]:-0} silver)" )
tableline+=( '<br />' )
(( count++ ))
done
@ -210,7 +210,7 @@ then
&& maxtimestamp=$timestamp
for stat in ${nextgold[timestamp]}
do
tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]:-0} gold)" )
tableline+=( '<br />' )
(( ++count == lvlgold[level] - goldcount )) && break 2
done
@ -220,7 +220,7 @@ then
do
(( count >= lvlgold[level] - goldcount )) && break 1
(( count < lvlgold[level] - goldcount )) && never=1
tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]:-0} gold)" )
tableline+=( '<br />' )
(( count++ ))
done
@ -241,7 +241,7 @@ then
&& maxtimestamp=$timestamp
for stat in ${nextplatinum[timestamp]}
do
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]:-0} platinum)" )
tableline+=( '<br />' )
(( ++count == lvlplatinum[level] - platinumcount )) && break 2
done
@ -251,7 +251,7 @@ then
do
(( count >= lvlplatinum[level] - platinumcount )) && break 1
(( count < lvlplatinum[level] - platinumcount )) && never=1
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]:-0} platinum)" )
tableline+=( '<br />' )
(( count++ ))
done
@ -272,7 +272,7 @@ then
&& maxtimestamp=$timestamp
for stat in ${nextblack[timestamp]}
do
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]:-0} black)" )
tableline+=( '<br />' )
(( ++count == lvlblack[level] - blackcount )) && break 2
done
@ -282,7 +282,7 @@ then
do
(( count >= lvlblack[level] - blackcount )) && break 1
(( count < lvlblack[level] - blackcount )) && never=1
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]})" )
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]:-0} black)" )
tableline+=( '<br />' )
(( count++ ))
done

View File

@ -5,6 +5,7 @@ print_medal() {
timestamp=$1 \
stat=$2 \
percent=$3 \
level=$4 \
if (( timestamp ))
then
@ -22,9 +23,9 @@ print_medal() {
href="?hist&amp;start=$start&amp;end=$end#$stat">
<img
class="badge"
src="/${img//_/-}-silver.png"
src="/${img//_/-}-$level.png"
title="$stat $percent%"
alt="$stat silver" />
alt="$stat $level" />
</a>&nbsp;($thisdate)
EOHTML
}