mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Small fixes
This commit is contained in:
parent
d3f8fa4308
commit
0e9cffd657
10 changed files with 150 additions and 89 deletions
|
|
@ -225,13 +225,14 @@ class MailClient
|
|||
* @param string $sMessageFlag
|
||||
* @param bool $bSetAction = true
|
||||
* @param bool $sSkipUnsupportedFlag = false
|
||||
* @param array $aCustomUids = null
|
||||
*
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
* @throws \MailSo\Mail\Exceptions\Exception
|
||||
*/
|
||||
public function MessageSetFlagToAll($sFolderName, $sMessageFlag, $bSetAction = true, $sSkipUnsupportedFlag = false)
|
||||
public function MessageSetFlagToAll($sFolderName, $sMessageFlag, $bSetAction = true, $sSkipUnsupportedFlag = false, $aCustomUids = null)
|
||||
{
|
||||
$this->oImapClient->FolderSelect($sFolderName);
|
||||
|
||||
|
|
@ -251,7 +252,17 @@ class MailClient
|
|||
: \MailSo\Imap\Enumerations\StoreAction::REMOVE_FLAGS_SILENT
|
||||
;
|
||||
|
||||
$this->oImapClient->MessageStoreFlag('1:*', false, array($sMessageFlag), $sStoreAction);
|
||||
if (is_array($aCustomUids))
|
||||
{
|
||||
if (0 < count($aCustomUids))
|
||||
{
|
||||
$this->oImapClient->MessageStoreFlag(implode(',', $aCustomUids), true, array($sMessageFlag), $sStoreAction);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->oImapClient->MessageStoreFlag('1:*', false, array($sMessageFlag), $sStoreAction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -312,14 +323,15 @@ class MailClient
|
|||
/**
|
||||
* @param string $sFolderName
|
||||
* @param bool $bSetAction = true
|
||||
* @param array $aCustomUids = null
|
||||
*
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function MessageSetSeenToAll($sFolderName, $bSetAction = true)
|
||||
public function MessageSetSeenToAll($sFolderName, $bSetAction = true, $aCustomUids = null)
|
||||
{
|
||||
$this->MessageSetFlagToAll($sFolderName, \MailSo\Imap\Enumerations\MessageFlag::SEEN, $bSetAction, true);
|
||||
$this->MessageSetFlagToAll($sFolderName, \MailSo\Imap\Enumerations\MessageFlag::SEEN, $bSetAction, true, $aCustomUids);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7211,10 +7211,12 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
|
||||
$sFolder = $this->GetActionParam('Folder', '');
|
||||
$bSetAction = '1' === (string) $this->GetActionParam('SetAction', '0');
|
||||
$sThreadUids = \trim($this->GetActionParam('ThreadUids', ''));
|
||||
|
||||
try
|
||||
{
|
||||
$this->MailClient()->MessageSetSeenToAll($sFolder, $bSetAction);
|
||||
$this->MailClient()->MessageSetSeenToAll($sFolder, $bSetAction,
|
||||
!empty($sThreadUids) ? explode(',', $sThreadUids) : null);
|
||||
}
|
||||
catch (\Exception $oException)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<label class="i18n control-label" data-i18n="LOGIN/LABEL_EMAIL"></label>
|
||||
<div class="controls">
|
||||
<label style="margin-top: 5px;" data-bind="visible: !isNew()"><strong data-bind="text: email"></strong></label>
|
||||
<input type="email" class="inputEmail input-large" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
<input type="email" class="inputEmail input-xlarge" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-bind="visible: isNew, textInput: email, onEnter: addAccountCommand, hasfocus: emailFocus" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
<?php
|
||||
|
||||
if (defined('APP_VERSION'))
|
||||
{
|
||||
$aRequirements = array(
|
||||
'cURL' => function_exists('curl_init'),
|
||||
'iconv' => function_exists('iconv'),
|
||||
'json' => function_exists('json_decode'),
|
||||
'DateTime' => class_exists('DateTime') && class_exists('DateTimeZone'),
|
||||
'libxml' => function_exists('libxml_use_internal_errors'),
|
||||
'dom' => class_exists('DOMDocument'),
|
||||
'Zlib' => function_exists('gzopen') || function_exists('gzopen64'),
|
||||
'PCRE' => function_exists('preg_replace'),
|
||||
'SPL' => function_exists('spl_autoload_register')
|
||||
);
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '<'))
|
||||
{
|
||||
echo '<p style="color: red">';
|
||||
echo '[301] Your PHP version ('.PHP_VERSION.') is lower than the minimal required 5.3.0!';
|
||||
echo '</p>';
|
||||
exit(301);
|
||||
}
|
||||
|
||||
if (in_array(false, $aRequirements))
|
||||
{
|
||||
echo '<p>';
|
||||
echo '[302] The following PHP extensions are not available in your PHP configuration!';
|
||||
echo '</p><ul>';
|
||||
|
||||
foreach ($aRequirements as $sKey => $bValue)
|
||||
{
|
||||
if (!$bValue)
|
||||
{
|
||||
echo '<li>'.$sKey.'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
exit(302);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
if (defined('APP_VERSION'))
|
||||
{
|
||||
$aRequirements = array(
|
||||
'cURL' => function_exists('curl_init'),
|
||||
'iconv' => function_exists('iconv'),
|
||||
'json' => function_exists('json_decode'),
|
||||
'DateTime' => class_exists('DateTime') && class_exists('DateTimeZone'),
|
||||
'libxml' => function_exists('libxml_use_internal_errors'),
|
||||
'dom' => class_exists('DOMDocument'),
|
||||
'Zlib' => function_exists('gzopen') || function_exists('gzopen64'),
|
||||
'PCRE' => function_exists('preg_replace'),
|
||||
'SPL' => function_exists('spl_autoload_register')
|
||||
);
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '<'))
|
||||
{
|
||||
echo '<p style="color: red">';
|
||||
echo '[301] Your PHP version ('.PHP_VERSION.') is lower than the minimal required 5.4.0!';
|
||||
echo '</p>';
|
||||
exit(301);
|
||||
}
|
||||
|
||||
if (in_array(false, $aRequirements))
|
||||
{
|
||||
echo '<p>';
|
||||
echo '[302] The following PHP extensions are not available in your PHP configuration!';
|
||||
echo '</p><ul>';
|
||||
|
||||
foreach ($aRequirements as $sKey => $bValue)
|
||||
{
|
||||
if (!$bValue)
|
||||
{
|
||||
echo '<li>'.$sKey.'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
exit(302);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue