mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
constant APP_DUMMY to \RainLoop\Actions::APP_DUMMY
This commit is contained in:
parent
7da3ba8c61
commit
4a2dcbc1f7
|
@ -42,7 +42,7 @@ class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
if (!$bAdmin && \is_array($aResult) && empty($aResult['Auth'])) {
|
||||
$aResult['DevEmail'] = $this->Config()->Get('plugin', 'email', $aResult['DevEmail']);
|
||||
$aResult['DevPassword'] = APP_DUMMY;
|
||||
$aResult['DevPassword'] = '********';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ class Actions
|
|||
const AUTH_SPEC_LOGOUT_TOKEN_KEY = 'smspeclogout';
|
||||
const AUTH_SPEC_LOGOUT_CUSTOM_MSG_KEY = 'smspeclogoutcmk';
|
||||
|
||||
const APP_DUMMY = '********';
|
||||
|
||||
/**
|
||||
* @var \MailSo\Base\Http
|
||||
*/
|
||||
|
@ -650,7 +652,7 @@ class Actions
|
|||
$aResult['ContactsPdoDsn'] = (string)$oConfig->Get('contacts', 'pdo_dsn', '');
|
||||
$aResult['ContactsPdoType'] = (string)$oConfig->Get('contacts', 'type', '');
|
||||
$aResult['ContactsPdoUser'] = (string)$oConfig->Get('contacts', 'pdo_user', '');
|
||||
$aResult['ContactsPdoPassword'] = (string)APP_DUMMY;
|
||||
$aResult['ContactsPdoPassword'] = static::APP_DUMMY;
|
||||
|
||||
$aResult['FaviconUrl'] = $oConfig->Get('webmail', 'favicon_url', '');
|
||||
|
||||
|
@ -743,7 +745,7 @@ class Actions
|
|||
$aResult['ContactsSyncMode'] = isset($mData['Mode']) ? $mData['Mode'] : 0;
|
||||
$aResult['ContactsSyncUrl'] = isset($mData['Url']) ? \trim($mData['Url']) : '';
|
||||
$aResult['ContactsSyncUser'] = isset($mData['User']) ? \trim($mData['User']) : '';
|
||||
$aResult['ContactsSyncPassword'] = APP_DUMMY;
|
||||
$aResult['ContactsSyncPassword'] = static::APP_DUMMY;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,9 @@ trait Contacts
|
|||
$bResult = $this->setContactsSyncData($oAccount, array(
|
||||
'Mode' => \intval($this->GetActionParam('Mode', '0')),
|
||||
'User' => $this->GetActionParam('User', ''),
|
||||
'Password' => APP_DUMMY === $sPassword && isset($mData['Password'])
|
||||
? $mData['Password'] : (APP_DUMMY === $sPassword ? '' : $sPassword),
|
||||
'Password' => static::APP_DUMMY === $sPassword
|
||||
? (isset($mData['Password']) ? $mData['Password'] : '')
|
||||
: $sPassword,
|
||||
'Url' => $this->GetActionParam('Url', '')
|
||||
));
|
||||
|
||||
|
|
|
@ -567,7 +567,7 @@ class ActionsAdmin extends Actions
|
|||
if ($oItem) {
|
||||
if ($oItem instanceof \RainLoop\Plugins\Property) {
|
||||
if (PluginPropertyType::PASSWORD === $oItem->Type()) {
|
||||
$oItem->SetValue(APP_DUMMY);
|
||||
$oItem->SetValue(static::APP_DUMMY);
|
||||
} else {
|
||||
$oItem->SetValue($oConfig->Get('plugin', $oItem->Name(), ''));
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ class ActionsAdmin extends Actions
|
|||
foreach ($oItem as $oSubItem) {
|
||||
if ($oSubItem && $oSubItem instanceof \RainLoop\Plugins\Property) {
|
||||
if (PluginPropertyType::PASSWORD === $oSubItem->Type()) {
|
||||
$oSubItem->SetValue(APP_DUMMY);
|
||||
$oSubItem->SetValue(static::APP_DUMMY);
|
||||
} else {
|
||||
$oSubItem->SetValue($oConfig->Get('plugin', $oSubItem->Name(), ''));
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ class ActionsAdmin extends Actions
|
|||
{
|
||||
$sKey = $oItem->Name();
|
||||
$sValue = $aSettings[$sKey] ?? $oConfig->Get('plugin', $sKey);
|
||||
if (PluginPropertyType::PASSWORD !== $oItem->Type() || APP_DUMMY !== $sValue)
|
||||
if (PluginPropertyType::PASSWORD !== $oItem->Type() || static::APP_DUMMY !== $sValue)
|
||||
{
|
||||
$mResultValue = null;
|
||||
switch ($oItem->Type()) {
|
||||
|
@ -734,8 +734,8 @@ class ActionsAdmin extends Actions
|
|||
break;
|
||||
|
||||
case 'dummy':
|
||||
$sValue = (string) $this->GetActionParam($sParamName, APP_DUMMY);
|
||||
if (APP_DUMMY !== $sValue) {
|
||||
$sValue = (string) $this->GetActionParam($sParamName, static::APP_DUMMY);
|
||||
if (static::APP_DUMMY !== $sValue) {
|
||||
$oConfig->Set($sConfigSector, $sConfigName, $sValue);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -52,8 +52,6 @@ define('APP_VERSION_ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
|||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
define('APP_DUMMY', '********');
|
||||
|
||||
$sCustomDataPath = '';
|
||||
$sCustomConfiguration = '';
|
||||
|
||||
|
|
Loading…
Reference in a new issue