Changeset View
Changeset View
Standalone View
Standalone View
src/include/rcube_imap_generic.php
Show First 20 Lines • Show All 3,175 Lines • ▼ Show 20 Lines | public function getQuota($mailbox = null) | ||||
if (!empty($result)) { | if (!empty($result)) { | ||||
$result['all'] = $all; | $result['all'] = $all; | ||||
} | } | ||||
return $result; | return $result; | ||||
} | } | ||||
/** | /** | ||||
* Send the SETQUOTA command (RFC9208) | |||||
* | |||||
* @param string $root Quota root | |||||
* @param array $quota Quota limits e.g. ['storage' => 1024000'] | |||||
* | |||||
* @return boolean True on success, False on failure | |||||
*/ | |||||
public function setQuota($root, $quota) | |||||
{ | |||||
$fn = function ($key, $value) { | |||||
return strtoupper($key) . ' ' . $value; | |||||
}; | |||||
$quota = implode(' ', array_map($fn, array_keys($quota), $quota)); | |||||
$result = $this->execute('SETQUOTA', [$this->escape($root), "({$quota})"], | |||||
self::COMMAND_NORESPONSE); | |||||
return ($result == self::ERROR_OK); | |||||
} | |||||
/** | |||||
* Send the SETACL command (RFC4314) | * Send the SETACL command (RFC4314) | ||||
* | * | ||||
* @param string $mailbox Mailbox name | * @param string $mailbox Mailbox name | ||||
* @param string $user User name | * @param string $user User name | ||||
* @param mixed $acl ACL string or array | * @param mixed $acl ACL string or array | ||||
* | * | ||||
* @return boolean True on success, False on failure | * @return boolean True on success, False on failure | ||||
* | * | ||||
▲ Show 20 Lines • Show All 915 Lines • Show Last 20 Lines |