Remove useless NewInstance

Bugfix: BodyStructure->SearchCharset return value
This commit is contained in:
djmaze 2020-05-08 11:49:18 +02:00
parent 82e560bc53
commit 693e0f4c10
61 changed files with 802 additions and 1345 deletions

View file

@ -5,7 +5,7 @@ namespace RainLoop;
class Api
{
private function __construct()
function __construct()
{
}
@ -33,13 +33,13 @@ class Api
static $oActions = null;
if (null === $oActions)
{
$oActions = \RainLoop\Actions::NewInstance();
$oActions = new Actions();
}
return $oActions;
}
public static function Config() : \RainLoop\Config\Application
public static function Config() : Config\Application
{
return static::Actions()->Config();
}
@ -81,10 +81,10 @@ class Api
$sSslCafile = static::Config()->Get('ssl', 'cafile', '');
$sSslCapath = static::Config()->Get('ssl', 'capath', '');
\RainLoop\Utils::$CookieDefaultPath = static::Config()->Get('labs', 'cookie_default_path', '');
Utils::$CookieDefaultPath = static::Config()->Get('labs', 'cookie_default_path', '');
if (static::Config()->Get('labs', 'cookie_default_secure', false))
{
\RainLoop\Utils::$CookieDefaultSecure = true;
Utils::$CookieDefaultSecure = true;
}
if (!empty($sSslCafile) || !empty($sSslCapath))
@ -164,8 +164,8 @@ class Api
{
$sSsoHash = \MailSo\Base\Utils::Sha1Rand(\md5($sEmail).\md5($sPassword));
return static::Actions()->Cacher()->Set(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash),
\RainLoop\Utils::EncodeKeyValuesQ(array(
return static::Actions()->Cacher()->Set(KeyPathHelper::SsoCacherKey($sSsoHash),
Utils::EncodeKeyValuesQ(array(
'Email' => $sEmail,
'Password' => $sPassword,
'AdditionalOptions' => $aAdditionalOptions,
@ -175,7 +175,7 @@ class Api
public static function ClearUserSsoHash(string $sSsoHash) : bool
{
return static::Actions()->Cacher()->Delete(\RainLoop\KeyPathHelper::SsoCacherKey($sSsoHash));
return static::Actions()->Cacher()->Delete(KeyPathHelper::SsoCacherKey($sSsoHash));
}
public static function ClearUserData(string $sEmail) : bool
@ -204,7 +204,7 @@ class Api
public static function LogoutCurrentLogginedUser() : bool
{
\RainLoop\Utils::ClearCookie('rlsession');
Utils::ClearCookie('rlsession');
return true;
}