X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FL10n.php;h=aca57793ca9711d1208c5e60f5c37231784f4a64;hb=06284e60073f374c1bd411e0bba6474a13c14f10;hp=dc31b418325b1bd453f0194fca6703ff2c519eb6;hpb=f10c24c83a119eecce8e842bbad6e24acd1a5df3;p=friendica.git diff --git a/src/Core/L10n.php b/src/Core/L10n.php index dc31b41832..aca57793ca 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -21,8 +21,8 @@ namespace Friendica\Core; -use Friendica\Core\Config\IConfig; -use Friendica\Core\Session\ISession; +use Friendica\Core\Config\Capability\IManageConfigValues; +use Friendica\Core\Session\Capability\IHandleSessions; use Friendica\Database\Database; use Friendica\Util\Strings; use Psr\Log\LoggerInterface; @@ -62,7 +62,7 @@ class L10n */ private $logger; - public function __construct(IConfig $config, Database $dba, LoggerInterface $logger, ISession $session, array $server, array $get) + public function __construct(IManageConfigValues $config, Database $dba, LoggerInterface $logger, IHandleSessions $session, array $server, array $get) { $this->dba = $dba; $this->logger = $logger; @@ -85,7 +85,7 @@ class L10n /** * Sets the language session variable */ - private function setSessionVariable(ISession $session) + private function setSessionVariable(IHandleSessions $session) { if ($session->get('authenticated') && !$session->get('language')) { $session->set('language', $this->lang); @@ -103,7 +103,7 @@ class L10n } } - private function setLangFromSession(ISession $session) + private function setLangFromSession(IHandleSessions $session) { if ($session->get('language') !== $this->lang) { $this->loadTranslationTable($session->get('language')); @@ -314,7 +314,7 @@ class L10n if (is_null($s) && $this->stringPluralSelectDefault($count)) { $s = $plural; - } else { + } elseif (is_null($s)) { $s = $singular; }