mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:50:11 +00:00
Merge pull request #8142 from nupplaphil/task/di_config
CleanUp Config namespace
This commit is contained in:
commit
04d620fc2f
207 changed files with 1276 additions and 1439 deletions
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
namespace Friendica\Worker;
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -87,7 +86,7 @@ class OnePoll
|
|||
}
|
||||
|
||||
// Don't poll if polling is deactivated (But we poll feeds and mails anyway)
|
||||
if (!in_array($protocol, [Protocol::FEED, Protocol::MAIL]) && Config::get('system', 'disable_polling')) {
|
||||
if (!in_array($protocol, [Protocol::FEED, Protocol::MAIL]) && DI::config()->get('system', 'disable_polling')) {
|
||||
Logger::log('Polling is disabled');
|
||||
|
||||
// set the last-update so we don't keep polling
|
||||
|
@ -118,7 +117,7 @@ class OnePoll
|
|||
$xml = false;
|
||||
|
||||
if ($contact['subhub']) {
|
||||
$poll_interval = Config::get('system', 'pushpoll_frequency', 3);
|
||||
$poll_interval = DI::config()->get('system', 'pushpoll_frequency', 3);
|
||||
$contact['priority'] = intval($poll_interval);
|
||||
$hub_update = false;
|
||||
|
||||
|
@ -447,7 +446,7 @@ class OnePoll
|
|||
{
|
||||
Logger::log("Mail: Fetching for ".$contact['addr'], Logger::DEBUG);
|
||||
|
||||
$mail_disabled = ((function_exists('imap_open') && !Config::get('system', 'imap_disabled')) ? 0 : 1);
|
||||
$mail_disabled = ((function_exists('imap_open') && !DI::config()->get('system', 'imap_disabled')) ? 0 : 1);
|
||||
if ($mail_disabled) {
|
||||
// set the last-update so we don't keep polling
|
||||
self::updateContact($contact, ['last-update' => $updated]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue