From 77cd4c2c96508f423c9233d34978937706d0ee61 Mon Sep 17 00:00:00 2001 From: Paul Kirby Date: Wed, 31 Oct 2018 19:29:49 -0500 Subject: [PATCH] Changed balance notifican min value, updated licenses --- classes/LBRY_Admin.php | 4 ++-- classes/lbrypress.php | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/classes/LBRY_Admin.php b/classes/LBRY_Admin.php index 9c14f3f..fa888f8 100644 --- a/classes/LBRY_Admin.php +++ b/classes/LBRY_Admin.php @@ -209,13 +209,13 @@ class LBRY_Admin /** * 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() { // See if we've checked in the past two hours if (!get_transient('lbry_wallet_check')) { $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 (!get_transient('lbry_wallet_warning_email')) { $email = get_option('admin_email'); diff --git a/classes/lbrypress.php b/classes/lbrypress.php index 068731f..8247212 100644 --- a/classes/lbrypress.php +++ b/classes/lbrypress.php @@ -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_POST_CHANNEL', 'lbry_channel'); // The meta key for which channel to publish $this->define('LBRY_AVAILABLE_LICENSES', array( - 'mit' => 'MIT', - 'license2' => 'License 2', - 'license3' => 'License 3' + 'Creative Commons Attribution 4.0 International' => 'Creative Commons Attribution 4.0 International', + 'Creative Commons Attribution-ShareAlike 4.0 International' => 'Creative Commons Attribution-ShareAlike 4.0 International', + '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->notice = new LBRY_Admin_Notice(); $this->network = new LBRY_Network(); - } else { - // $this->speech->maybe_rewrite_urls(); } } @@ -192,8 +194,7 @@ class LBRYPress */ public function deactivate() { - // Deactivate Wallet Balance cron job - $this->admin->wallet_balance_deactivate(); + // TODO: Stop the daemon error_log('Deactivated'); }