mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 13:39:23 +01:00
enhance error message if not allowed to access sieve
This commit is contained in:
parent
eef0abc590
commit
bf362a5dce
@ -534,10 +534,10 @@ class mail_bo
|
|||||||
// retrieve the signature accociated with the identity
|
// retrieve the signature accociated with the identity
|
||||||
$id = $this->getIdentitiesWithAccounts($_accountData);
|
$id = $this->getIdentitiesWithAccounts($_accountData);
|
||||||
$acc = emailadmin_account::read($this->profileID);
|
$acc = emailadmin_account::read($this->profileID);
|
||||||
$accountDataIT = ($_accountData[$this->profileID]?$acc->identities($this->profileID,true,'ident_id'):$acc->identities($_accountData[$id],true,'ident_id'));
|
$accountDataIT = ($_accountData[$this->profileID]?$acc->identities($this->profileID,false,'ident_id'):$acc->identities($_accountData[$id],false,'ident_id'));
|
||||||
foreach($accountDataIT as $it => $accountData)
|
foreach($accountDataIT as $it => $accountData)
|
||||||
{
|
{
|
||||||
return $accountData['ident_id'];
|
return $accountData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -565,7 +565,6 @@ class mail_bo
|
|||||||
//error_log(__METHOD__.__LINE__.' Key:'.$tmpkey.'->'.array2string($identities[$icServers->acc_id]));
|
//error_log(__METHOD__.__LINE__.' Key:'.$tmpkey.'->'.array2string($identities[$icServers->acc_id]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($selectedFound?$selectedID:$rememberFirst);
|
return ($selectedFound?$selectedID:$rememberFirst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ class mail_sieve
|
|||||||
|
|
||||||
var $extraAddr;
|
var $extraAddr;
|
||||||
|
|
||||||
|
var $currentIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -75,25 +77,12 @@ class mail_sieve
|
|||||||
$profileID = (int)$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
$profileID = (int)$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
||||||
$this->mailbo = mail_bo::getInstance(false, $profileID, false, $oldIMAPObject=true);
|
$this->mailbo = mail_bo::getInstance(false, $profileID, false, $oldIMAPObject=true);
|
||||||
|
|
||||||
/* if (is_object($this->mailbo->mailPreferences))
|
|
||||||
{
|
|
||||||
// account select box
|
|
||||||
$selectedID = $this->mailbo->getIdentitiesWithAccounts($identities);
|
|
||||||
// if nothing valid is found return to user defined account definition
|
|
||||||
if (empty($this->mailbo->icServer->host) && count($identities)==0 && $this->mailbo->mailPreferences->userDefinedAccounts)
|
|
||||||
{
|
|
||||||
// redirect to new personal account
|
|
||||||
egw::redirect_link('/index.php',array('menuaction'=>'mail.uipreferences.editAccountData',
|
|
||||||
'accountID'=>"new",
|
|
||||||
'msg' => lang("There is no IMAP Server configured.")." - ".lang("Please configure access to an existing individual IMAP account."),
|
|
||||||
));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
$this->mailPreferences =& $this->mailbo->mailPreferences;
|
$this->mailPreferences =& $this->mailbo->mailPreferences;
|
||||||
$this->mailConfig = config::read('mail');
|
$this->mailConfig = config::read('mail');
|
||||||
|
$allIdentities = $this->mailbo->getAllIdentities();
|
||||||
|
$defaultIdentity = $this->mailbo->getDefaultIdentity();
|
||||||
|
$this->currentIdentity = $allIdentities[$defaultIdentity];
|
||||||
|
$this->currentIdentity['identity_string'] = mail_bo::generateIdentityString($allIdentities[$defaultIdentity],true);
|
||||||
$this->restoreSessionData();
|
$this->restoreSessionData();
|
||||||
$icServer = $this->mailbo->icServer;
|
$icServer = $this->mailbo->icServer;
|
||||||
if(($icServer instanceof defaultimap) && $icServer->enableSieve)
|
if(($icServer instanceof defaultimap) && $icServer->enableSieve)
|
||||||
@ -143,7 +132,7 @@ class mail_sieve
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$content['msg'] = lang('error').':'.lang('Serverside Filterrules (Sieve) are not activated').'. '.lang('Please contact your Administrator to validate if your Server supports Serverside Filterrules, and how to enable them in EGroupware for your active Account (%1) with ID:%2.',mail_bo::generateIdentityString($this->mailPreferences->identities[$this->mailbo->profileID],true),$this->mailbo->profileID);
|
$content['msg'] = lang('error').':'.lang('Serverside Filterrules (Sieve) are not activated').'. '.lang('Please contact your Administrator to validate if your Server supports Serverside Filterrules, and how to enable them in EGroupware for your active Account (%1) with ID:%2.',$this->currentIdentity['identity_string'],$this->mailbo->profileID);
|
||||||
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
||||||
}
|
}
|
||||||
$tmpl->exec('mail.mail_sieve.index',$content,$sel_options,$readonlys);
|
$tmpl->exec('mail.mail_sieve.index',$content,$sel_options,$readonlys);
|
||||||
@ -238,7 +227,7 @@ class mail_sieve
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$content['msg'] = lang('error').':'.lang('Serverside Filterrules (Sieve) are not activated').'. '.lang('Please contact your Administrator to validate if your Server supports Serverside Filterrules, and how to enable them in EGroupware for your active Account (%1) with ID:%2.',mail_bo::generateIdentityString($this->mailPreferences->identities[$this->mailbo->profileID],true),$this->mailbo->profileID);
|
$content['msg'] = lang('error').':'.lang('Serverside Filterrules (Sieve) are not activated').'. '.lang('Please contact your Administrator to validate if your Server supports Serverside Filterrules, and how to enable them in EGroupware for your active Account (%1) with ID:%2.',$this->currentIdentity['identity_string'],$this->mailbo->profileID);
|
||||||
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
||||||
}
|
}
|
||||||
$eNotitmpl->exec('mail.mail_sieve.editEmailNotification', $content,$sel_options);
|
$eNotitmpl->exec('mail.mail_sieve.editEmailNotification', $content,$sel_options);
|
||||||
@ -253,7 +242,7 @@ class mail_sieve
|
|||||||
{
|
{
|
||||||
//Instantiate an etemplate_new object, representing sieve.edit template
|
//Instantiate an etemplate_new object, representing sieve.edit template
|
||||||
$etmpl = new etemplate_new('mail.sieve.edit');
|
$etmpl = new etemplate_new('mail.sieve.edit');
|
||||||
error_log(__METHOD__.'() content before the action ' .array2string($content));
|
//error_log(__METHOD__.'() content before the action ' .array2string($content));
|
||||||
if (!is_array($content))
|
if (!is_array($content))
|
||||||
{
|
{
|
||||||
if ( $this->getRules($_GET['ruleID']) && isset($_GET['ruleID']))
|
if ( $this->getRules($_GET['ruleID']) && isset($_GET['ruleID']))
|
||||||
@ -391,7 +380,7 @@ class mail_sieve
|
|||||||
|
|
||||||
);
|
);
|
||||||
//$preserv = $sel_options;
|
//$preserv = $sel_options;
|
||||||
error_log(__METHOD__.'() content'. array2string($content));
|
//error_log(__METHOD__.'() content'. array2string($content));
|
||||||
//Set the preselect_options for mail/folders as we are not allow free entry for folder taglist
|
//Set the preselect_options for mail/folders as we are not allow free entry for folder taglist
|
||||||
$mailCompose = new mail_compose();
|
$mailCompose = new mail_compose();
|
||||||
$sel_options['action_folder_text'] = $mailCompose->ajax_searchFolder(0,true);
|
$sel_options['action_folder_text'] = $mailCompose->ajax_searchFolder(0,true);
|
||||||
@ -644,7 +633,7 @@ class mail_sieve
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$content['msg'] = lang('error').':'.lang('Serverside Filterrules (Sieve) are not activated').'. '.lang('Please contact your Administrator to validate if your Server supports Serverside Filterrules, and how to enable them in EGroupware for your active Account (%1) with ID:%2.',mail_bo::generateIdentityString($this->mailPreferences->identities[$this->mailbo->profileID],true),$this->mailbo->profileID);
|
$content['msg'] = lang('error').':'.lang('Serverside Filterrules (Sieve) are not activated').'. '.lang('Please contact your Administrator to validate if your Server supports Serverside Filterrules, and how to enable them in EGroupware for your active Account (%1) with ID:%2.',$this->currentIdentity['identity_string'],$this->mailbo->profileID);
|
||||||
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
||||||
}
|
}
|
||||||
$vtmpl->exec('mail.mail_sieve.editVacation',$content,$sel_options,$preserv);
|
$vtmpl->exec('mail.mail_sieve.editVacation',$content,$sel_options,$preserv);
|
||||||
|
Loading…
Reference in New Issue
Block a user