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' diff --git a/public/include/classes/tools.class.php b/public/include/classes/tools.class.php index a272761e..210e27e0 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; @@ -87,7 +89,10 @@ 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']; break; } } else { 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 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 @@