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
This commit is contained in:
Sebastian Grewe 2014-03-19 17:02:54 +01:00
commit b2d8c18def
4 changed files with 15 additions and 10 deletions

View File

@ -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'

View File

@ -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 {

View File

@ -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

View File

@ -55,7 +55,7 @@
<li class="icon-pencil"><a href="{$smarty.server.SCRIPT_NAME}?page=register">Sign Up</a></li>
{/if}
{acl_check icon='icon-mail' page='contactform' action='' name='Contact' acl=$GLOBAL.acl.contactform}
<li class="icon-doc"><a href="{$smarty.server.SCRIPT_NAME}?page=tac">Terms and Conditions</a></li>
<li class="icon-doc"><a href="{$smarty.server.SCRIPT_NAME}?page=tac">Terms & Conditions</a></li>
</ul>
<ul>
<hr/>