From fafd75d994f58cca91ec0bdaa7b8f01d36d2d9b8 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 7 Aug 2013 08:59:22 +0200 Subject: [PATCH] Honor anonymous flag on mobile template Fixes #535 --- public/templates/mobile/statistics/blocks/default.tpl | 2 +- public/templates/mobile/statistics/blocks/small_table.tpl | 2 +- .../mobile/statistics/pool/contributors_hashrate.tpl | 2 +- .../mobile/statistics/pool/contributors_shares.tpl | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/templates/mobile/statistics/blocks/default.tpl b/public/templates/mobile/statistics/blocks/default.tpl index b4f29b00..e4aa759a 100644 --- a/public/templates/mobile/statistics/blocks/default.tpl +++ b/public/templates/mobile/statistics/blocks/default.tpl @@ -53,7 +53,7 @@ target and network difficulty and assuming a zero variance scenario. {else if $BLOCKSFOUND[block].confirmations == -1} Orphan {else}{$GLOBAL.confirmations - $BLOCKSFOUND[block].confirmations} left{/if} - {$BLOCKSFOUND[block].finder|default:"unknown"} + {if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if} {$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M:%S"} {$BLOCKSFOUND[block].difficulty|number_format:"2"} {(pow(2,32 - $GLOBAL.config.targetdiff) * $BLOCKSFOUND[block].difficulty)|number_format} diff --git a/public/templates/mobile/statistics/blocks/small_table.tpl b/public/templates/mobile/statistics/blocks/small_table.tpl index 2cfac05a..9ed3ec74 100644 --- a/public/templates/mobile/statistics/blocks/small_table.tpl +++ b/public/templates/mobile/statistics/blocks/small_table.tpl @@ -13,7 +13,7 @@ {section block $BLOCKSFOUND} {$BLOCKSFOUND[block].height} - {$BLOCKSFOUND[block].finder|default:"unknown"} + {if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if} {$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M"} {$BLOCKSFOUND[block].shares|number_format} diff --git a/public/templates/mobile/statistics/pool/contributors_hashrate.tpl b/public/templates/mobile/statistics/pool/contributors_hashrate.tpl index 15fae80a..811e20a7 100644 --- a/public/templates/mobile/statistics/pool/contributors_hashrate.tpl +++ b/public/templates/mobile/statistics/pool/contributors_hashrate.tpl @@ -16,7 +16,7 @@ {if $GLOBAL.userdata.username == $CONTRIBSHARES[contrib].account}{assign var=listed value=1}{/if} {$rank++} - {$CONTRIBHASHES[contrib].account} + {if $CONTRIBHASHES[contrib].is_anonymous|default:"0" == 1}anonymous{else}{$CONTRIBHASHES[contrib].account|escape}{/if} {$CONTRIBHASHES[contrib].hashrate|number_format} {$estday|number_format:"3"} {($estday * $GLOBAL.price)|default:"n/a"|number_format:"2"} diff --git a/public/templates/mobile/statistics/pool/contributors_shares.tpl b/public/templates/mobile/statistics/pool/contributors_shares.tpl index e23b3998..1025a28f 100644 --- a/public/templates/mobile/statistics/pool/contributors_shares.tpl +++ b/public/templates/mobile/statistics/pool/contributors_shares.tpl @@ -9,12 +9,12 @@ {assign var=rank value=1} {assign var=listed value=0} -{section hashrate $CONTRIBSHARES} -{if $GLOBAL.userdata.username == $CONTRIBSHARES[hashrate].account}{assign var=listed value=1}{/if} +{section shares $CONTRIBSHARES} +{if $GLOBAL.userdata.username == $CONTRIBSHARES[shares].account}{assign var=listed value=1}{/if} {$rank++} - {$CONTRIBSHARES[hashrate].account} - {$CONTRIBSHARES[hashrate].shares|number_format} + {if $CONTRIBSHARES[shares].is_anonymous|default:"0" == 1}anonymous{else}{$CONTRIBSHARES[shares].account|escape}{/if} + {$CONTRIBSHARES[shares].shares|number_format} {/section} {if $listed != 1}