fix a typo in emailadmin_sieve; create a wrapperfunction for setVacationUser in defaultimap to make sure we control the connect as emailadmin

This commit is contained in:
Klaus Leithoff 2010-08-26 07:45:39 +00:00
parent a99ae11549
commit cfa5711233
2 changed files with 13 additions and 2 deletions

View File

@ -591,6 +591,7 @@ class defaultimap extends Net_IMAP
*/
public function __call($name,array $params=null)
{
error_log(__METHOD__.'->'.$name.' with params:'.array2string($params));
switch($name)
{
case 'installScript':
@ -603,7 +604,6 @@ class defaultimap extends Net_IMAP
case 'retrieveRules':
case 'getVacation':
case 'setVacation':
case 'setVacationUser':
if (is_null($this->sieve))
{
$this->sieve = new emailadmin_sieve($this);
@ -616,4 +616,15 @@ class defaultimap extends Net_IMAP
}
throw new egw_exception_wrong_parameter("No method '$name' implemented!");
}
public function setVacationUser($_euser, $_scriptName, $_vacation)
{
if (is_null($this->sieve))
{
$this->sieve = new emailadmin_sieve();
$this->scriptName =& $this->sieve->scriptName;
$this->error =& $this->sieve->error;
}
return $this->sieve->setVacationUser($_euser, $_scriptName, $_vacation);
}
}

View File

@ -158,7 +158,7 @@ class emailadmin_sieve extends Net_Sieve
* @param string $_vaction
* @return boolean true on success false otherwise
*/
function setVactionUser($_euser, $_scriptName, $_vaction)
function setVacationUser($_euser, $_scriptName, $_vacation)
{
if (!$_scriptName) $_scriptName = $this->scriptName;
if ($this->_connect($this->icServer,$_euser) === true) {