Changed balance notifican min value, updated licenses
This commit is contained in:
parent
ab50c3c6a6
commit
77cd4c2c96
2 changed files with 11 additions and 10 deletions
|
@ -209,13 +209,13 @@ class LBRY_Admin
|
||||||
/**
|
/**
|
||||||
* Checks at most once an hour to see if the wallet balance is too low
|
* Checks at most once an hour to see if the wallet balance is too low
|
||||||
*/
|
*/
|
||||||
// COMBAK: Check user permissions possibly
|
// IDEA: Check user permissions possibly
|
||||||
public static function wallet_balance_warning()
|
public static function wallet_balance_warning()
|
||||||
{
|
{
|
||||||
// See if we've checked in the past two hours
|
// See if we've checked in the past two hours
|
||||||
if (!get_transient('lbry_wallet_check')) {
|
if (!get_transient('lbry_wallet_check')) {
|
||||||
$balance = LBRY()->daemon->wallet_balance();
|
$balance = LBRY()->daemon->wallet_balance();
|
||||||
if ($balance < LBRY_MIN_BALANCE) {
|
if ($balance < get_option(LBRY_SETTINGS)[LBRY_LBC_PUBLISH] * 20) {
|
||||||
// If LBRY Balance is low, send email, but only once per day
|
// If LBRY Balance is low, send email, but only once per day
|
||||||
if (!get_transient('lbry_wallet_warning_email')) {
|
if (!get_transient('lbry_wallet_warning_email')) {
|
||||||
$email = get_option('admin_email');
|
$email = get_option('admin_email');
|
||||||
|
|
|
@ -104,11 +104,15 @@ class LBRYPress
|
||||||
$this->define('LBRY_WILL_PUBLISH', 'lbry_will_publish'); // The meta key for if to publish to LBRY Network or not
|
$this->define('LBRY_WILL_PUBLISH', 'lbry_will_publish'); // The meta key for if to publish to LBRY Network or not
|
||||||
$this->define('LBRY_POST_CHANNEL', 'lbry_channel'); // The meta key for which channel to publish
|
$this->define('LBRY_POST_CHANNEL', 'lbry_channel'); // The meta key for which channel to publish
|
||||||
$this->define('LBRY_AVAILABLE_LICENSES', array(
|
$this->define('LBRY_AVAILABLE_LICENSES', array(
|
||||||
'mit' => 'MIT',
|
'Creative Commons Attribution 4.0 International' => 'Creative Commons Attribution 4.0 International',
|
||||||
'license2' => 'License 2',
|
'Creative Commons Attribution-ShareAlike 4.0 International' => 'Creative Commons Attribution-ShareAlike 4.0 International',
|
||||||
'license3' => 'License 3'
|
'Creative Commons Attribution-NoDerivatives 4.0 International' => 'Creative Commons Attribution-NoDerivatives 4.0 International',
|
||||||
|
'Creative Commons Attribution-NonCommercial 4.0 International' => 'Creative Commons Attribution-NonCommercial 4.0 International',
|
||||||
|
'Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International' => 'Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International',
|
||||||
|
'Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International' => 'Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International',
|
||||||
|
'Copyrighted' => 'Copyrighted',
|
||||||
|
'Public Domain' => 'Public Domain'
|
||||||
));
|
));
|
||||||
$this->define('LBRY_MIN_BALANCE', 2000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -137,8 +141,6 @@ class LBRYPress
|
||||||
$this->admin = new LBRY_Admin();
|
$this->admin = new LBRY_Admin();
|
||||||
$this->notice = new LBRY_Admin_Notice();
|
$this->notice = new LBRY_Admin_Notice();
|
||||||
$this->network = new LBRY_Network();
|
$this->network = new LBRY_Network();
|
||||||
} else {
|
|
||||||
// $this->speech->maybe_rewrite_urls();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,8 +194,7 @@ class LBRYPress
|
||||||
*/
|
*/
|
||||||
public function deactivate()
|
public function deactivate()
|
||||||
{
|
{
|
||||||
// Deactivate Wallet Balance cron job
|
// TODO: Stop the daemon
|
||||||
$this->admin->wallet_balance_deactivate();
|
|
||||||
error_log('Deactivated');
|
error_log('Deactivated');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue