From 5558ebad45a67b93669f5eaf9e12acd0a29257df Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 22 Jul 2016 08:48:19 -0400 Subject: [PATCH] - Updates the name of the setting const --- lib/Config/Populator.php | 4 ++-- lib/Cron/CronTrigger.php | 2 +- lib/Mailer/MailerLog.php | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index 4325c0fa36..537c674632 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -75,9 +75,9 @@ class Populator { private function createDefaultSettings() { $current_user = wp_get_current_user(); - if(!Setting::getValue(CronTrigger::SETTING_VALUE)) { + if(!Setting::getValue(CronTrigger::SETTING_NAME)) { // disable task scheduler (cron) be default - Setting::setValue(CronTrigger::SETTING_VALUE, array( + Setting::setValue(CronTrigger::SETTING_NAME, array( 'method' => CronTrigger::METHOD_WORDPRESS )); } diff --git a/lib/Cron/CronTrigger.php b/lib/Cron/CronTrigger.php index 11bd4b63d7..75afc47167 100644 --- a/lib/Cron/CronTrigger.php +++ b/lib/Cron/CronTrigger.php @@ -11,7 +11,7 @@ if(!defined('ABSPATH')) exit; class CronTrigger { const METHOD_WORDPRESS = 'WordPress'; const METHOD_MAILPOET = 'MailPoet'; - const SETTING_VALUE = 'cron_trigger'; + const SETTING_NAME = 'cron_trigger'; function __construct() { $this->method = self::getCurrentMethod(); diff --git a/lib/Mailer/MailerLog.php b/lib/Mailer/MailerLog.php index 3b332b50a6..8a5291bffc 100644 --- a/lib/Mailer/MailerLog.php +++ b/lib/Mailer/MailerLog.php @@ -6,10 +6,10 @@ use MailPoet\Models\Setting; if(!defined('ABSPATH')) exit; class MailerLog { - const SETTING_VALUE = 'mta_log'; + const SETTING_NAME = 'mta_log'; static function getMailerLog() { - $mailer_log = Setting::getValue(self::SETTING_VALUE); + $mailer_log = Setting::getValue(self::SETTING_NAME); if(!$mailer_log) { $mailer_log = self::createOrResetMailerLog(); } @@ -21,12 +21,12 @@ class MailerLog { 'sent' => 0, 'started' => time() ); - Setting::setValue(self::SETTING_VALUE, $mailer_log); + Setting::setValue(self::SETTING_NAME, $mailer_log); return $mailer_log; } static function updateMailerLog($mailer_log) { - Setting::setValue(self::SETTING_VALUE, $mailer_log); + Setting::setValue(self::SETTING_NAME, $mailer_log); return $mailer_log; }