Skip to content

Commit 1462205

Browse files
committed
Merge pull request #2103 from MPOS/development
UPDATE : Development to Master - RC2
2 parents d895e9a + 2c642c2 commit 1462205

File tree

251 files changed

+241
-29720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+241
-29720
lines changed

public/include/classes/mail.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ public function sendMail($template, $aData, $throttle=false) {
5858
if ($transport_type == 'sendmail') {
5959
$transport = Swift_SendmailTransport::newInstance($this->config['swiftmailer'][$transport_type]['path'] . ' ' . $this->config['swiftmailer'][$transport_type]['options']);
6060
} else if ($this->config['swiftmailer']['type'] == 'smtp') {
61-
$transport = Swift_SmtpTransport::newInstance($this->config['switfmailer']['smtp']['host'], $this->config['switfmailer']['smtp']['port'], $this->config['switfmailer']['smtp']['encryption']);
62-
if (!empty($this->config['switfmailer']['smtp']['username']) && !empty($this->config['switfmailer']['smtp']['password'])) {
63-
$transport->setUsername($this->config['switfmailer']['smtp']['username']);
64-
$transport->setPassword($this->config['switfmailer']['smtp']['password']);
61+
$transport = Swift_SmtpTransport::newInstance($this->config['swiftmailer']['smtp']['host'], $this->config['swiftmailer']['smtp']['port'], $this->config['swiftmailer']['smtp']['encryption']);
62+
if (!empty($this->config['swiftmailer']['smtp']['username']) && !empty($this->config['swiftmailer']['smtp']['password'])) {
63+
$transport->setUsername($this->config['swiftmailer']['smtp']['username']);
64+
$transport->setPassword($this->config['swiftmailer']['smtp']['password']);
6565
}
6666
}
6767
$mailer = Swift_Mailer::newInstance($transport);
6868

6969
// Throttle mails to x per minute, used for newsletter for example
7070
if ($this->config['swiftmailer']['type'] == 'smtp' && $throttle) {
7171
$mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin(
72-
$this->config['switfmailer']['smtp']['throttle'], Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
72+
$this->config['swiftmailer']['smtp']['throttle'], Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
7373
));
7474
}
7575

public/include/config/global.inc.dist.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Do not edit this unless you have confirmed that your config has been updated!
66
* https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-config-version
77
**/
8-
$config['version'] = '0.0.7';
8+
$config['version'] = '0.0.8';
99

1010
/**
1111
* Unless you disable this, we'll do a quick check on your config first.
@@ -65,12 +65,12 @@
6565
$config['swiftmailer']['type'] = 'sendmail';
6666
$config['swiftmailer']['sendmail']['path'] = '/usr/sbin/sendmail';
6767
$config['swiftmailer']['sendmail']['options'] = '-bs';
68-
$config['switfmailer']['smtp']['host'] = 'your.mail-relay.com';
69-
$config['switfmailer']['smtp']['port'] = '587';
70-
$config['switfmailer']['smtp']['encryption'] = 'tls';
71-
$config['switfmailer']['smtp']['username'] = '';
72-
$config['switfmailer']['smtp']['password'] = '';
73-
$config['switfmailer']['smtp']['throttle'] = 100;
68+
$config['swiftmailer']['smtp']['host'] = 'your.mail-relay.com';
69+
$config['swiftmailer']['smtp']['port'] = '587';
70+
$config['swiftmailer']['smtp']['encryption'] = 'tls';
71+
$config['swiftmailer']['smtp']['username'] = '';
72+
$config['swiftmailer']['smtp']['password'] = '';
73+
$config['swiftmailer']['smtp']['throttle'] = 100;
7474

7575
/**
7676
* Getting Started Config
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
3+
4+
// Check user authentication status
5+
if ($user->isAuthenticated()) {
6+
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
7+
$iLimit = 30;
8+
$debug->append('No cached version available, fetching from backend', 3);
9+
if (!$setting->getValue('disable_transactionsummary')) {
10+
$aTransactionSummary = $transaction->getTransactionSummary($_SESSION['USERDATA']['id']);
11+
$aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_SESSION['USERDATA']['id']);
12+
$smarty->assign('SUMMARY', $aTransactionSummary);
13+
$smarty->assign('BYTIME', $aTransactionSummaryByTime);
14+
}
15+
} else {
16+
$debug->append('Using cached page', 3);
17+
}
18+
}
19+
20+
$smarty->assign('CONTENT', 'default.tpl');
21+
?>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
3+
4+
// Check user to ensure they are admin
5+
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
6+
header("HTTP/1.1 404 Page not found");
7+
die("404 Page not found");
8+
}
9+
10+
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
11+
$debug->append('No cached version available, fetching from backend', 3);
12+
if (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) {
13+
$aTransactionSummary = $transaction->getTransactionSummary($_REQUEST['id']);
14+
$aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_REQUEST['id']);
15+
$smarty->assign('USERNAME', $user->getUsername($_REQUEST['id']));
16+
$smarty->assign('SUMMARY', $aTransactionSummary);
17+
$smarty->assign('BYTIME', $aTransactionSummaryByTime);
18+
}
19+
} else {
20+
$debug->append('Using cached page', 3);
21+
}
22+
23+
$smarty->assign('CONTENT', 'default.tpl');
24+
?>

public/include/pages/api/getpoolinfo.inc.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@
99

1010
// Output JSON format
1111
$data = array(
12-
// coin info
13-
'currency' => $config[currency],
14-
'coinname' => $config[gettingstarted][coinname],
15-
// coin algorithm info
16-
'cointarget' => $config[cointarget],
17-
'coindiffchangetarget' => $config[coindiffchangetarget],
18-
'algorithm' => $config[algorithm],
19-
// stratum
20-
'stratumport' => $config[gettingstarted][stratumport],
21-
// payments
22-
'payout_system' => $config[payout_system],
23-
'confirmations' => $config[confirmations],
24-
'min_ap_threshold' => $config[ap_threshold][min],
25-
'max_ap_threshold' => $config[ap_threshold][max],
26-
'reward_type' => $config[payout_system] == 'pps' ? $config['pps']['reward']['type'] : $config['reward_type'],
27-
'reward' => $config[payout_system] == 'pps' ? $config['pps']['reward']['default'] : $config['reward'],
28-
// fees
29-
'txfee' => $config[txfee_manual], // make it backwards compatible
30-
'txfee_manual' => $config[txfee_manual],
31-
'txfee_auto' => $config[txfee_auto],
32-
'fees' => $config[fees]
12+
// coin info
13+
'currency' => $config['currency'],
14+
'coinname' => $config['gettingstarted']['coinname'],
15+
// coin algorithm info
16+
'cointarget' => $config['cointarget'],
17+
'coindiffchangetarget' => $config['coindiffchangetarget'],
18+
'algorithm' => $config['algorithm'],
19+
// stratum
20+
'stratumport' => $config['gettingstarted']['stratumport'],
21+
// payments
22+
'payout_system' => $config['payout_system'],
23+
'confirmations' => $config['confirmations'],
24+
'min_ap_threshold' => $config['ap_threshold']['min'],
25+
'max_ap_threshold' => $config['ap_threshold']['max'],
26+
'reward_type' => $config['payout_system'] == 'pps' ? $config['pps']['reward']['type'] : $config['reward_type'],
27+
'reward' => $config['payout_system'] == 'pps' ? $config['pps']['reward']['default'] : $config['reward'],
28+
// fees
29+
'txfee' => $config['txfee_manual'], // make it backwards compatible
30+
'txfee_manual' => $config['txfee_manual'],
31+
'txfee_auto' => $config['txfee_auto'],
32+
'fees' => $config['fees']
3333
);
3434

3535
echo $api->get_json($data);

public/include/version.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
define('MPOS_VERSION', '0.0.4');
55
define('DB_VERSION', '0.0.8');
6-
define('CONFIG_VERSION', '0.0.7');
6+
define('CONFIG_VERSION', '0.0.8');
77

88
// Fetch installed database version
99
$db_version = $setting->getValue('DB_VERSION');

public/site_assets/mpos/css/animation.css

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)