Merge pull request #8130 from nupplaphil/task/di_pconfig

Move PConfig to DI::pConfig()
This commit is contained in:
Hypolite Petovan 2020-01-18 13:57:57 -05:00 committed by GitHub
commit 58f69481e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 269 additions and 398 deletions

View file

@ -7,7 +7,6 @@ namespace Friendica\Util;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Protocol\Email;
/**
@ -44,7 +43,7 @@ class Emailer
$email_textonly = false;
if (!empty($params['uid'])) {
$email_textonly = PConfig::get($params['uid'], "system", "email_textonly");
$email_textonly = DI::pConfig()->get($params['uid'], "system", "email_textonly");
}
$fromName = Email::encodeHeader(html_entity_decode($params['fromName'], ENT_QUOTES, 'UTF-8'), 'UTF-8');

View file

@ -35,7 +35,6 @@
namespace Friendica\Util;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\User;
@ -234,7 +233,7 @@ class ExAuth
}
if ($Error) {
$this->writeLog(LOG_INFO, 'check against alternate password for ' . $sUser . '@' . $aCommand[2]);
$sPassword = PConfig::get($uid, 'xmpp', 'password', null, true);
$sPassword = DI::pConfig()->get($uid, 'xmpp', 'password', null, true);
$Error = ($aCommand[3] != $sPassword);
}
} else {

View file

@ -9,7 +9,6 @@ namespace Friendica\Util;
use DateTime;
use DateTimeZone;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
@ -218,7 +217,7 @@ class Temporal
$required = false)
{
// First day of the week (0 = Sunday)
$firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0);
$firstDay = DI::pConfig()->get(local_user(), 'system', 'first_day_of_week', 0);
$lang = substr(L10n::getCurrentLang(), 0, 2);