Skip to content

Commit b2d8c18

Browse files
committed
Merge branch 'development'
* FIX: Cryptorush API & Wiki Updated * ADDED: mintpal API ticker & Wiki Updated * UPDATE: MPOS template updates - Thanks SamuelNZ * CLEANUP: Dynamic table references in classes - Thanks @barrybingo
2 parents c562fb9 + 457e40c commit b2d8c18

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

public/include/classes/statistics.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public function getAllUserMiningStats($interval=180) {
462462
id,
463463
IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty,
464464
username
465-
FROM shares
465+
FROM " . $this->share->getTableName() . "
466466
WHERE time > DATE_SUB(now(), INTERVAL ? SECOND) AND our_result = 'Y'
467467
UNION
468468
SELECT
@@ -533,15 +533,15 @@ public function getUserMiningStats($username, $account_id=NULL, $interval=180) {
533533
SELECT
534534
id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty
535535
FROM
536-
shares
536+
" . $this->share->getTableName() . "
537537
WHERE username LIKE ?
538538
AND time > DATE_SUB(now(), INTERVAL ? SECOND)
539539
AND our_result = 'Y'
540540
UNION
541541
SELECT
542542
share_id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty
543543
FROM
544-
shares_archive
544+
" . $this->share->getArchiveTableName() . "
545545
WHERE username LIKE ?
546546
AND time > DATE_SUB(now(), INTERVAL ? SECOND)
547547
AND our_result = 'Y'

public/include/classes/tools.class.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ private function getApiType($url) {
5757
return 'cryptsy';
5858
} else if (preg_match('/cryptorush.in/', $url)) {
5959
return 'cryptorush';
60+
} else if (preg_match('/mintpal.com/', $url)) {
61+
return 'mintpal';
6062
}
6163
$this->setErrorMessage("API URL unknown");
6264
return false;
@@ -87,7 +89,10 @@ public function getPrice() {
8789
return @$aData['return']['markets'][$strCurrency]['lasttradeprice'];
8890
break;
8991
case 'cryptorush':
90-
return @$aData["$strCurrency/" . $this->config['price']['target']]['last_trade'];
92+
return @$aData["$strCurrency/" . $this->config['price']['currency']]['last_trade'];
93+
break;
94+
case 'mintpal':
95+
return @$aData['0']['last_price'];
9196
break;
9297
}
9398
} else {

public/include/classes/transaction.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public function getTransactionSummary($account_id=NULL) {
7070
$sql = "
7171
SELECT
7272
SUM(t.amount) AS total, t.type AS type
73-
FROM transactions AS t
74-
LEFT OUTER JOIN blocks AS b
73+
FROM $this->table AS t
74+
LEFT OUTER JOIN " . $this->block->getTableName() . " AS b
7575
ON b.id = t.block_id
7676
WHERE ( b.confirmations > 0 OR b.id IS NULL )";
7777
if (!empty($account_id)) {
@@ -211,7 +211,7 @@ public function getDonations() {
211211
FROM $this->table AS t
212212
LEFT JOIN " . $this->user->getTableName() . " AS a
213213
ON t.account_id = a.id
214-
LEFT JOIN blocks AS b
214+
LEFT JOIN " . $this->block->getTableName() . " AS b
215215
ON t.block_id = b.id
216216
WHERE
217217
(
@@ -306,9 +306,9 @@ public function getAPQueue($limit=250) {
306306
), 0
307307
) AS confirmed
308308
FROM $this->table AS t
309-
LEFT JOIN blocks AS b
309+
LEFT JOIN " . $this->block->getTableName() . " AS b
310310
ON t.block_id = b.id
311-
LEFT JOIN accounts AS a
311+
LEFT JOIN " . $this->user->getTableName() . " AS a
312312
ON t.account_id = a.id
313313
WHERE t.archived = 0 AND a.ap_threshold > 0 AND a.coin_address IS NOT NULL AND a.coin_address != ''
314314
GROUP BY t.account_id

public/templates/mpos/global/navigation.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<li class="icon-pencil"><a href="{$smarty.server.SCRIPT_NAME}?page=register">Sign Up</a></li>
5656
{/if}
5757
{acl_check icon='icon-mail' page='contactform' action='' name='Contact' acl=$GLOBAL.acl.contactform}
58-
<li class="icon-doc"><a href="{$smarty.server.SCRIPT_NAME}?page=tac">Terms and Conditions</a></li>
58+
<li class="icon-doc"><a href="{$smarty.server.SCRIPT_NAME}?page=tac">Terms & Conditions</a></li>
5959
</ul>
6060
<ul>
6161
<hr/>

0 commit comments

Comments
 (0)