mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Bugfixes and more conversions to PHP 7
This commit is contained in:
parent
2cada68f41
commit
3a7ec4ecb0
100 changed files with 238 additions and 992 deletions
|
|
@ -11,9 +11,6 @@ class AddressBook extends \RainLoop\Providers\AbstractProvider
|
|||
*/
|
||||
private $oDriver;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(?\RainLoop\Providers\AddressBook\AddressBookInterface $oDriver)
|
||||
{
|
||||
$this->oDriver = $oDriver;
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ class Filters extends \RainLoop\Providers\AbstractProvider
|
|||
*/
|
||||
private $oDriver;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($oDriver)
|
||||
{
|
||||
$this->oDriver = $oDriver instanceof \RainLoop\Providers\Filters\FiltersInterface ? $oDriver : null;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
private $oPlugins;
|
||||
|
||||
/**
|
||||
* @var \RainLoop\Application
|
||||
* @var \RainLoop\Config\Application
|
||||
*/
|
||||
private $oConfig;
|
||||
|
||||
|
|
@ -29,9 +29,6 @@ class SieveStorage implements \RainLoop\Providers\Filters\FiltersInterface
|
|||
*/
|
||||
private $bUtf8FolderName;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($oPlugins, $oConfig)
|
||||
{
|
||||
$this->oLogger = null;
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace RainLoop\Providers;
|
||||
|
||||
class Prem
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($oConfig, $oLogger, $oCacher)
|
||||
{
|
||||
$this->oConfig = $oConfig;
|
||||
$this->oLogger = $oLogger;
|
||||
$this->oCacher = $oCacher;
|
||||
}
|
||||
|
||||
public function PopulateAppData(array &$aAppData)
|
||||
{
|
||||
if (\is_array($aAppData))
|
||||
{
|
||||
$aAppData['Community'] = false;
|
||||
|
||||
$oConfig = $this->oConfig;
|
||||
if ($oConfig)
|
||||
{
|
||||
$aAppData['PremType'] = true;
|
||||
$aAppData['LoginLogo'] = $oConfig->Get('branding', 'login_logo', '');
|
||||
$aAppData['LoginBackground'] = $oConfig->Get('branding', 'login_background', '');
|
||||
$aAppData['LoginCss'] = $oConfig->Get('branding', 'login_css', '');
|
||||
$aAppData['LoginDescription'] = $oConfig->Get('branding', 'login_desc', '');
|
||||
$aAppData['UserLogo'] = $oConfig->Get('branding', 'user_logo', '');
|
||||
$aAppData['UserLogoTitle'] = $oConfig->Get('branding', 'user_logo_title', '');
|
||||
$aAppData['UserLogoMessage'] = $oConfig->Get('branding', 'user_logo_message', '');
|
||||
$aAppData['UserIframeMessage'] = $oConfig->Get('branding', 'user_iframe_message', '');
|
||||
$aAppData['UserCss'] = $oConfig->Get('branding', 'user_css', '');
|
||||
$aAppData['WelcomePageUrl'] = $oConfig->Get('branding', 'welcome_page_url', '');
|
||||
$aAppData['WelcomePageDisplay'] = \strtolower($oConfig->Get('branding', 'welcome_page_display', 'none'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function PremSection(&$oActions, &$oConfig)
|
||||
{
|
||||
if ($oActions && $oActions->HasOneOfActionParams(array(
|
||||
'LoginLogo', 'LoginBackground', 'LoginDescription', 'LoginCss',
|
||||
'UserLogo', 'UserLogoTitle', 'UserLogoMessage', 'UserIframeMessage', 'UserCss',
|
||||
'WelcomePageUrl', 'WelcomePageDisplay'
|
||||
)))
|
||||
{
|
||||
$oActions->setConfigFromParams($oConfig, 'LoginLogo', 'branding', 'login_logo', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'LoginBackground', 'branding', 'login_background', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'LoginDescription', 'branding', 'login_desc', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'LoginCss', 'branding', 'login_css', 'string');
|
||||
|
||||
$oActions->setConfigFromParams($oConfig, 'UserLogo', 'branding', 'user_logo', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'UserLogoTitle', 'branding', 'user_logo_title', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'UserLogoMessage', 'branding', 'user_logo_message', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'UserIframeMessage', 'branding', 'user_iframe_message', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'UserCss', 'branding', 'user_css', 'string');
|
||||
|
||||
$oActions->setConfigFromParams($oConfig, 'WelcomePageUrl', 'branding', 'welcome_page_url', 'string');
|
||||
$oActions->setConfigFromParams($oConfig, 'WelcomePageDisplay', 'branding', 'welcome_page_display', 'string');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,8 +11,6 @@ class Settings extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param \RainLoop\Providers\Settings\ISettings $oDriver
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(\RainLoop\Providers\Settings\ISettings $oDriver)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
*/
|
||||
private $oDriver;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(\RainLoop\Providers\Storage\IStorage $oDriver)
|
||||
{
|
||||
$this->oDriver = $oDriver;
|
||||
|
|
|
|||
|
|
@ -19,9 +19,6 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
|
|||
*/
|
||||
protected $oLogger;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(string $sStoragePath, bool $bLocal = false)
|
||||
{
|
||||
$this->sDataPath = \rtrim(\trim($sStoragePath), '\\/');
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ interface IStorage
|
|||
* @param \RainLoop\Model\Account|null $oAccount
|
||||
* @param mixed $sValue
|
||||
*/
|
||||
public function Put($oAccount, int $iStorageType, int $sKey, $sValue) : bool;
|
||||
public function Put($oAccount, int $iStorageType, string $sKey, $sValue) : bool;
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|null $oAccount
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ class Suggestions extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param \RainLoop\Providers\Suggestions\ISuggestions[]|null $aDriver = null
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(?array $aDriver = null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue