From 35e67b613f7e8ac84b7da02ee374ebc199016dc9 Mon Sep 17 00:00:00 2001 From: toxicwind Date: Sun, 16 Mar 2014 18:54:47 -0600 Subject: [PATCH 1/9] Fix round share percentages Not correct math. --- public/templates/mpos/statistics/round/pplns_round_shares.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/mpos/statistics/round/pplns_round_shares.tpl b/public/templates/mpos/statistics/round/pplns_round_shares.tpl index 9272a07a..207a2bd7 100644 --- a/public/templates/mpos/statistics/round/pplns_round_shares.tpl +++ b/public/templates/mpos/statistics/round/pplns_round_shares.tpl @@ -18,7 +18,7 @@ {if $PPLNSROUNDSHARES[contrib].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$PPLNSROUNDSHARES[contrib].username|default:"unknown"|escape}{/if} {$PPLNSROUNDSHARES[contrib].pplns_valid|number_format} {$PPLNSROUNDSHARES[contrib].pplns_invalid|number_format} - {if $PPLNSROUNDSHARES[contrib].pplns_invalid > 0 && $PPLNSROUNDSHARES[contrib].pplns_valid > 0}{($PPLNSROUNDSHARES[contrib].pplns_invalid / $PPLNSROUNDSHARES[contrib].pplns_valid * 100)|number_format:"2"|default:"0"}{else}0.00{/if} + {if $PPLNSROUNDSHARES[contrib].pplns_invalid > 0 && $PPLNSROUNDSHARES[contrib].pplns_valid > 0}{(($PPLNSROUNDSHARES[contrib].pplns_invalid / ($PPLNSROUNDSHARES[contrib].pplns_valid + $PPLNSROUNDSHARES[contrib].pplns_invalid)) * 100)|number_format:"2"|default:"0"}{else}0.00{/if} {/section} From 13e39f6eae1ccdb82379d31dd04b0302ece80740 Mon Sep 17 00:00:00 2001 From: toxicwind Date: Sun, 16 Mar 2014 18:56:30 -0600 Subject: [PATCH 2/9] Update round_shares.tpl --- public/templates/mpos/statistics/round/round_shares.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/mpos/statistics/round/round_shares.tpl b/public/templates/mpos/statistics/round/round_shares.tpl index a941f917..1a9a76f1 100644 --- a/public/templates/mpos/statistics/round/round_shares.tpl +++ b/public/templates/mpos/statistics/round/round_shares.tpl @@ -19,7 +19,7 @@ {if $data.is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$data.username|default:"unknown"|escape}{/if} {$data.valid|number_format} {$data.invalid|number_format} - {if $data.invalid > 0 }{($data.invalid / $data.valid * 100)|number_format:"2"|default:"0"}{else}0.00{/if} + {if $data.invalid > 0 }{(($data.invalid / ($data.valid + $data.invalid) * 100)|number_format:"2"|default:"0"}{else}0.00{/if} {/foreach} From 0e61aaa9fe58701bca0912bf499d8f2d2aa5f331 Mon Sep 17 00:00:00 2001 From: Boris Date: Mon, 17 Mar 2014 12:55:13 +0000 Subject: [PATCH 3/9] [FIX] Remove more static table references #1929 --- public/include/classes/statistics.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index 1a9e1b3c..786c00d1 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -462,7 +462,7 @@ class Statistics extends Base { id, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty, username - FROM shares + FROM " . $this->share->getTableName() . " WHERE time > DATE_SUB(now(), INTERVAL ? SECOND) AND our_result = 'Y' UNION SELECT @@ -533,7 +533,7 @@ class Statistics extends Base { SELECT id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty FROM - shares + " . $this->share->getTableName() . " WHERE username LIKE ? AND time > DATE_SUB(now(), INTERVAL ? SECOND) AND our_result = 'Y' @@ -541,7 +541,7 @@ class Statistics extends Base { SELECT share_id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty FROM - shares_archive + " . $this->share->getArchiveTableName() . " WHERE username LIKE ? AND time > DATE_SUB(now(), INTERVAL ? SECOND) AND our_result = 'Y' From bf327a23a972fb218958cc40bf3d8ab05739059c Mon Sep 17 00:00:00 2001 From: Boris Date: Mon, 17 Mar 2014 14:49:27 +0000 Subject: [PATCH 4/9] [FIX] Remove a couple more static table references --- public/include/classes/transaction.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/include/classes/transaction.class.php b/public/include/classes/transaction.class.php index fab7cf57..09023034 100644 --- a/public/include/classes/transaction.class.php +++ b/public/include/classes/transaction.class.php @@ -70,8 +70,8 @@ class Transaction extends Base { $sql = " SELECT SUM(t.amount) AS total, t.type AS type - FROM transactions AS t - LEFT OUTER JOIN blocks AS b + FROM $this->table AS t + LEFT OUTER JOIN " . $this->block->getTableName() . " AS b ON b.id = t.block_id WHERE ( b.confirmations > 0 OR b.id IS NULL )"; if (!empty($account_id)) { @@ -211,7 +211,7 @@ class Transaction extends Base { FROM $this->table AS t LEFT JOIN " . $this->user->getTableName() . " AS a ON t.account_id = a.id - LEFT JOIN blocks AS b + LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id WHERE ( @@ -306,9 +306,9 @@ class Transaction extends Base { ), 0 ) AS confirmed FROM $this->table AS t - LEFT JOIN blocks AS b + LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id - LEFT JOIN accounts AS a + LEFT JOIN " . $this->user->getTableName() . " AS a ON t.account_id = a.id WHERE t.archived = 0 AND a.ap_threshold > 0 AND a.coin_address IS NOT NULL AND a.coin_address != '' GROUP BY t.account_id From 50cae464da6f637110c0ecfe025f4b7e9d6d90c1 Mon Sep 17 00:00:00 2001 From: SamuelNZ Date: Tue, 18 Mar 2014 18:24:27 +1300 Subject: [PATCH 5/9] Update navigation.tpl More elegant, and fixes placement issue in chrome. --- public/templates/mpos/global/navigation.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/mpos/global/navigation.tpl b/public/templates/mpos/global/navigation.tpl index f6198031..27a753ef 100644 --- a/public/templates/mpos/global/navigation.tpl +++ b/public/templates/mpos/global/navigation.tpl @@ -55,7 +55,7 @@
  • Sign Up
  • {/if} {acl_check icon='icon-mail' page='contactform' action='' name='Contact' acl=$GLOBAL.acl.contactform} -
  • Terms and Conditions
  • +
  • Terms & Conditions

    • From 0d58427d7616d94d236a7ddb528012037c3c277c Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 18 Mar 2014 10:13:06 +0100 Subject: [PATCH 6/9] Revert "Fix round share percentages" This reverts commit 35e67b613f7e8ac84b7da02ee374ebc199016dc9. --- public/templates/mpos/statistics/round/pplns_round_shares.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/mpos/statistics/round/pplns_round_shares.tpl b/public/templates/mpos/statistics/round/pplns_round_shares.tpl index 207a2bd7..9272a07a 100644 --- a/public/templates/mpos/statistics/round/pplns_round_shares.tpl +++ b/public/templates/mpos/statistics/round/pplns_round_shares.tpl @@ -18,7 +18,7 @@ {if $PPLNSROUNDSHARES[contrib].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$PPLNSROUNDSHARES[contrib].username|default:"unknown"|escape}{/if} {$PPLNSROUNDSHARES[contrib].pplns_valid|number_format} {$PPLNSROUNDSHARES[contrib].pplns_invalid|number_format} - {if $PPLNSROUNDSHARES[contrib].pplns_invalid > 0 && $PPLNSROUNDSHARES[contrib].pplns_valid > 0}{(($PPLNSROUNDSHARES[contrib].pplns_invalid / ($PPLNSROUNDSHARES[contrib].pplns_valid + $PPLNSROUNDSHARES[contrib].pplns_invalid)) * 100)|number_format:"2"|default:"0"}{else}0.00{/if} + {if $PPLNSROUNDSHARES[contrib].pplns_invalid > 0 && $PPLNSROUNDSHARES[contrib].pplns_valid > 0}{($PPLNSROUNDSHARES[contrib].pplns_invalid / $PPLNSROUNDSHARES[contrib].pplns_valid * 100)|number_format:"2"|default:"0"}{else}0.00{/if} {/section} From 6860040135ff3d74846dea64f597481a8051f02f Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 18 Mar 2014 10:13:17 +0100 Subject: [PATCH 7/9] Revert "Update round_shares.tpl" This reverts commit 13e39f6eae1ccdb82379d31dd04b0302ece80740. --- public/templates/mpos/statistics/round/round_shares.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/mpos/statistics/round/round_shares.tpl b/public/templates/mpos/statistics/round/round_shares.tpl index 1a9a76f1..a941f917 100644 --- a/public/templates/mpos/statistics/round/round_shares.tpl +++ b/public/templates/mpos/statistics/round/round_shares.tpl @@ -19,7 +19,7 @@ {if $data.is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$data.username|default:"unknown"|escape}{/if} {$data.valid|number_format} {$data.invalid|number_format} - {if $data.invalid > 0 }{(($data.invalid / ($data.valid + $data.invalid) * 100)|number_format:"2"|default:"0"}{else}0.00{/if} + {if $data.invalid > 0 }{($data.invalid / $data.valid * 100)|number_format:"2"|default:"0"}{else}0.00{/if} {/foreach} From daf07038573ee6b0e2338c408403f3c00be68443 Mon Sep 17 00:00:00 2001 From: iAmShorty Date: Wed, 19 Mar 2014 13:27:06 +0100 Subject: [PATCH 8/9] [UPDATE] added mintpal ticker api --- public/include/classes/tools.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/include/classes/tools.class.php b/public/include/classes/tools.class.php index a272761e..29b03c2c 100644 --- a/public/include/classes/tools.class.php +++ b/public/include/classes/tools.class.php @@ -57,6 +57,8 @@ class Tools extends Base { return 'cryptsy'; } else if (preg_match('/cryptorush.in/', $url)) { return 'cryptorush'; + } else if (preg_match('/mintpal.com/', $url)) { + return 'mintpal'; } $this->setErrorMessage("API URL unknown"); return false; @@ -89,6 +91,9 @@ class Tools extends Base { case 'cryptorush': return @$aData["$strCurrency/" . $this->config['price']['target']]['last_trade']; break; + case 'mintpal': + return @$aData['0']['last_price']; + break; } } else { $this->setErrorMessage("Got an invalid response from ticker API"); From 457e40c24cd71a909dbedf44b08cfb66d978ddf1 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 19 Mar 2014 16:44:37 +0100 Subject: [PATCH 9/9] [FIX] Cryptorush API fix --- public/include/classes/tools.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/classes/tools.class.php b/public/include/classes/tools.class.php index 29b03c2c..210e27e0 100644 --- a/public/include/classes/tools.class.php +++ b/public/include/classes/tools.class.php @@ -89,7 +89,7 @@ class Tools extends Base { return @$aData['return']['markets'][$strCurrency]['lasttradeprice']; break; case 'cryptorush': - return @$aData["$strCurrency/" . $this->config['price']['target']]['last_trade']; + return @$aData["$strCurrency/" . $this->config['price']['currency']]['last_trade']; break; case 'mintpal': return @$aData['0']['last_price'];