diff --git a/public/include/classes/transaction.class.php b/public/include/classes/transaction.class.php index a7f48be2..4251269a 100644 --- a/public/include/classes/transaction.class.php +++ b/public/include/classes/transaction.class.php @@ -335,6 +335,7 @@ class Transaction extends Base { } private function createDebitRecord($account_id, $coin_address, $amount, $type) { $type == 'Debit_MP' ? $txfee = $this->config['txfee_manual'] : $txfee = $this->config['txfee_auto']; + $amount = $amount - $txfee; // Add Debit record if (!$this->addTransaction($account_id, $amount, $type, NULL, $coin_address, NULL)) { $this->setErrorMessage('Failed to create ' . $type . ' transaction record in database'); @@ -366,7 +367,7 @@ class Transaction extends Base { // Notify user via mail $aMailData['email'] = $this->user->getUserEmailById($account_id); $aMailData['subject'] = $type . ' Completed'; - $aMailData['amount'] = $amount - $txfee; + $aMailData['amount'] = $amount; if (!$this->notification->sendNotification($account_id, 'payout', $aMailData)) { $this->setErrorMessage('Failed to send notification email to users address: ' . $aMailData['email'] . 'ERROR: ' . $this->notification->getCronError()); } diff --git a/public/include/pages/api/getnavbardata.inc.php b/public/include/pages/api/getnavbardata.inc.php index f043a7c1..24ab357e 100644 --- a/public/include/pages/api/getnavbardata.inc.php +++ b/public/include/pages/api/getnavbardata.inc.php @@ -37,6 +37,9 @@ $dPoolHashrate = $statistics->getCurrentHashrate($interval); if ($dPoolHashrate > $dNetworkHashrate) $dNetworkHashrate = $dPoolHashrate; $statistics->setGetCache(true); +// Small helper +$aHashunits = array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s' ); + // Apply pool modifiers $dPoolHashrateAdjusted = $dPoolHashrate * $dPoolHashrateModifier; $dNetworkHashrateAdjusted = $dNetworkHashrate / 1000 * $dNetworkHashrateModifier; @@ -64,7 +67,7 @@ if ($iEstShares > 0 && $aRoundShares['valid'] > 0) { $data = array( 'raw' => array( 'workers' => $worker->getCountAllActiveWorkers(), 'pool' => array( 'hashrate' => $dPoolHashrate ) ), 'pool' => array( 'workers' => $worker->getCountAllActiveWorkers(), 'hashrate' => $dPoolHashrateAdjusted, 'estimated' => $iEstShares, 'progress' => $dEstPercent ), - 'network' => array( 'hashrate' => $dNetworkHashrateAdjusted, 'difficulty' => $dDifficulty, 'block' => $iBlock ), + 'network' => array( 'hashrate' => $dNetworkHashrateAdjusted, 'difficulty' => $dDifficulty, 'block' => $iBlock ) ); echo $api->get_json($data); diff --git a/public/include/pages/contactform/contactform.inc.php b/public/include/pages/contactform/contactform.inc.php index 2eda088b..9c273803 100644 --- a/public/include/pages/contactform/contactform.inc.php +++ b/public/include/pages/contactform/contactform.inc.php @@ -2,7 +2,7 @@ $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; // ReCaptcha handling if enabled -if ($setting->getValue('recaptcha_enabled') && $setting->getValue('acl_contactform') != 2) { +if ($setting->getValue('recaptcha_enabled') && $setting->getValue('recaptcha_enabled_contactform') && $setting->getValue('acl_contactform') != 2) { require_once(INCLUDE_DIR . '/lib/recaptchalib.php'); // Load re-captcha specific data $rsp = recaptcha_check_answer (