mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Changed Quota() to QuotaRoot(string $sFolderName = 'INBOX')
After reading RainLoop#2086 and looking in the source i noticed the incorrect naming
This commit is contained in:
parent
5f73b721e6
commit
ee7d06fbfd
4 changed files with 40 additions and 6 deletions
|
|
@ -594,14 +594,33 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
}
|
||||
|
||||
/**
|
||||
* https://datatracker.ietf.org/doc/html/rfc2087#section-4.2
|
||||
*
|
||||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function Quota() : ?array
|
||||
* /
|
||||
public function Quota(string $sRootName = '') : ?array
|
||||
{
|
||||
if ($this->IsSupported('QUOTA'))
|
||||
{
|
||||
return $this->SendRequestGetResponse('GETQUOTAROOT "INBOX"')->getQuotaResult();
|
||||
return $this->SendRequestGetResponse("GETQUOTA {$this->EscapeString($sRootName)}")->getQuotaResult();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* https://datatracker.ietf.org/doc/html/rfc2087#section-4.3
|
||||
*
|
||||
* @throws \MailSo\Net\Exceptions\Exception
|
||||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function QuotaRoot(string $sFolderName = 'INBOX') : ?array
|
||||
{
|
||||
if ($this->IsSupported('QUOTA'))
|
||||
{
|
||||
return $this->SendRequestGetResponse("GETQUOTAROOT {$this->EscapeString($sFolderName)}")->getQuotaResult();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -1808,9 +1808,9 @@ class MailClient
|
|||
return $oMessageCollection;
|
||||
}
|
||||
|
||||
public function Quota() : ?array
|
||||
public function QuotaRoot(string $sFolderName = 'INBOX') : ?array
|
||||
{
|
||||
return $this->oImapClient->Quota();
|
||||
return $this->oImapClient->QuotaRoot($sFolderName);
|
||||
}
|
||||
|
||||
public function FindMessageUidByMessageId(string $sFolderName, string $sMessageId) : ?int
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ trait User
|
|||
|
||||
try
|
||||
{
|
||||
$aQuota = $this->MailClient()->Quota();
|
||||
$aQuota = $this->MailClient()->QuotaRoot();
|
||||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,13 @@ abstract class L10n
|
|||
$aList[] = \basename($dir);
|
||||
}
|
||||
}
|
||||
/*
|
||||
foreach (\glob(APP_PLUGINS_PATH . 'language-*', GLOB_ONLYDIR) as $dir) {
|
||||
if (\is_file($dir . ($bAdmin ? '/admin' : '/user') . '.json')) {
|
||||
$aList[] = \substr(\basename($dir), 9);
|
||||
}
|
||||
}
|
||||
*/
|
||||
\sort($aList);
|
||||
$aCache[$bAdmin] = $aList;
|
||||
return $aCache[$bAdmin];
|
||||
|
|
@ -29,6 +36,7 @@ abstract class L10n
|
|||
|
||||
/**
|
||||
* When $sLanguage is like 'sv-SE', it tries to load and merge (in order): en, sv and sv-SE
|
||||
* $sFile is either 'admin', 'static' or 'user'
|
||||
*/
|
||||
public static function load(string $sLanguage, string $sFile) : array
|
||||
{
|
||||
|
|
@ -40,6 +48,13 @@ abstract class L10n
|
|||
if (\is_file($file)) {
|
||||
$aLang = \array_replace_recursive($aLang, \json_decode(\file_get_contents($file), true));
|
||||
}
|
||||
/* else {
|
||||
$file = APP_PLUGINS_PATH."language-{$sLanguage}/{$sFile}.json";
|
||||
if (\is_file($file)) {
|
||||
$aLang = \array_replace_recursive($aLang, \json_decode(\file_get_contents($file), true));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
return $aLang;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue