From: Ben Klang Date: Sat, 2 Jan 2010 17:31:12 +0000 (-0500) Subject: Vilma: A null driver should really do nothing X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=261691240d95079712749f3f79f630d3e925c8de;p=horde.git Vilma: A null driver should really do nothing --- diff --git a/vilma/lib/MailboxDriver/null.php b/vilma/lib/MailboxDriver/null.php index 8fb14b3d3..093fb812c 100644 --- a/vilma/lib/MailboxDriver/null.php +++ b/vilma/lib/MailboxDriver/null.php @@ -1,6 +1,6 @@ _params['mail_dir_base'])) { - require_once 'PEAR.php'; - throw new Vilma_Exception(_("No 'mail_dir_base' parameter specified to maildrop driver.")); - } - $dir = $this->_params['mail_dir_base']; - $usedomain = isset($this->_params['usedomain']) ? $this->_params['usedomain'] : false; - if ($usedomain) { - $dir .= '/' . $domain; - } - - return $dir . '/' . $user; - */ - } - - function checkMailbox($user, $domain) - { - /* - static $exists; - - $dir = $this->_getMailboxDir($user, $domain); - if (is_a($dir, 'PEAR_Error')) { - return $dir; - } - - if (!isset($exists[$dir])) { - $exists[$dir] = is_dir($dir); - } - - if (!$exists[$dir]) { - require_once 'PEAR.php'; - throw new Vilma_Exception(sprintf(_("Maildrop directory \"%s\" does not exist."), $dir)); - } - */ - return true; } - function createMailbox($user, $domain) + public function createMailbox($user, $domain) { - $dir = $this->_getMailboxDir($user, $domain); - if (is_a($dir, 'PEAR_Error')) { - return $dir; - } - if (empty($this->_params['system_user'])) { - require_once 'PEAR.php'; - throw new Vilma_Exception(_("No 'system_user' parameter specified to maildrop driver.")); - } - - $create_function = sprintf('sudo -u %s maildirmake %s', - escapeshellarg($this->_params['system_user']), - escapeshellarg($dir)); - exec($create_function); return true; } - /** - * @TODO: Implement - */ - function deleteMailbox($user, $domain) + public function deleteMailbox($user, $domain) { return true; }