diff --git a/index b/index index c162e65..2c1d6b6 100755 --- a/index +++ b/index @@ -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+=( '
' ) (( ++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+=( '
' ) (( 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+=( '
' ) (( ++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+=( '
' ) (( 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+=( '
' ) (( ++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+=( '
' ) (( 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+=( '
' ) (( ++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+=( '
' ) (( count++ )) done diff --git a/lib/print_medal b/lib/print_medal index 0ed5c62..7ae0962 100644 --- a/lib/print_medal +++ b/lib/print_medal @@ -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&start=$start&end=$end#$stat"> $stat silver + alt="$stat $level" />  ($thisdate) EOHTML }