mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
* Mail/Sieve: check capability if VACATION is supported by SIEVE Server before trying to set an serverside vacation absent notice
code clean up in hooks and conditional debug for sendMDN
This commit is contained in:
parent
303b10377f
commit
2e02b05d4e
@ -337,39 +337,6 @@ class mail_hooks
|
||||
'default'=> 0,
|
||||
'admin' => False,
|
||||
),
|
||||
/*
|
||||
// option requested by customer, removed for the new client
|
||||
'prefaskformultipleforward' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Confirm attach message',
|
||||
'help' => 'Do you want to be asked for confirmation before attaching selected messages to new mail?',
|
||||
'name' => 'prefaskformultipleforward',
|
||||
'values' => $no_yes,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'forced' => '1',
|
||||
),
|
||||
*/
|
||||
/*
|
||||
'mainscreen_showmail' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'show new messages on home page',
|
||||
'help' => 'Should new messages show up on the Home page',
|
||||
'name' => 'mainscreen_showmail',
|
||||
'values' => $selectOptions,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
),
|
||||
'mainscreen_showfolders' => array(
|
||||
'type' => 'multiselect',
|
||||
'label' => 'home page folders',
|
||||
'help' => 'if shown, which folders should appear on the Home page',
|
||||
'name' => 'mainscreen_showfolders',
|
||||
'values' => $folderList,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
),
|
||||
*/
|
||||
array(
|
||||
'type' => 'section',
|
||||
'title' => lang('Configuration settings'),
|
||||
@ -417,57 +384,6 @@ class mail_hooks
|
||||
'default'=> 0,
|
||||
'admin' => False,
|
||||
),
|
||||
/*'prefpreventmanagefolders' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Prevent managing folders',
|
||||
'help' => 'Do you want to prevent the managing of folders (creation, accessrights AND subscribtion)?',
|
||||
'name' => 'prefpreventmanagefolders',
|
||||
'values' => $prefAllowManageFolders,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'forced' => '0',
|
||||
),
|
||||
'prefpreventforwarding' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Prevent managing forwards',
|
||||
'help' => 'Do you want to prevent the editing/setup for forwarding of mails via settings (, even if SIEVE is enabled)?',
|
||||
'name' => 'prefpreventforwarding',
|
||||
'values' => $no_yes,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'forced' => '0',
|
||||
),
|
||||
'prefpreventnotificationformailviaemail' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Prevent managing notifications',
|
||||
'help' => 'Do you want to prevent the editing/setup of notification by mail to other emailadresses if emails arrive (, even if SIEVE is enabled)?',
|
||||
'name' => 'prefpreventnotificationformailviaemail',
|
||||
'values' => $no_yes,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'forced' => '1',
|
||||
),
|
||||
'prefpreventeditfilterrules' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Prevent managing filters',
|
||||
'help' => 'Do you want to prevent the editing/setup of filter rules (, even if SIEVE is enabled)?',
|
||||
'name' => 'prefpreventeditfilterrules',
|
||||
'values' => $no_yes,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'forced' => '0',
|
||||
),
|
||||
'prefpreventabsentnotice' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Prevent managing vacation notice',
|
||||
'help' => 'Do you want to prevent the editing/setup of the absent/vacation notice (, even if SIEVE is enabled)?',
|
||||
'name' => 'prefpreventabsentnotice',
|
||||
'values' => $no_yes,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'forced' => '0',
|
||||
),
|
||||
*/
|
||||
'prefaskformove' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Confirm move to folder',
|
||||
|
@ -69,6 +69,8 @@ class mail_sieve
|
||||
if ($acc_id > 0)
|
||||
{
|
||||
$this->account = emailadmin_account::read($acc_id);
|
||||
$identity = emailadmin_account::read_identity($acc_id,true);
|
||||
$this->currentIdentity = mail_bo::generateIdentityString($identity,false);
|
||||
}
|
||||
|
||||
$this->restoreSessionData();
|
||||
@ -111,7 +113,7 @@ class mail_sieve
|
||||
}
|
||||
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.',$this->currentIdentity['identity_string'],$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,$this->account->acc_id);
|
||||
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
||||
}
|
||||
$tmpl->exec('mail.mail_sieve.index',$content,$sel_options,array());
|
||||
@ -208,7 +210,7 @@ class mail_sieve
|
||||
}
|
||||
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.',$this->currentIdentity['identity_string'],$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,$this->account->acc_id);
|
||||
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
||||
}
|
||||
$eNotitmpl->exec('mail.mail_sieve.editEmailNotification', $content,$sel_options);
|
||||
@ -524,7 +526,14 @@ class mail_sieve
|
||||
if ($icServer->acc_sieve_enabled)
|
||||
{
|
||||
$vacRules = $this->getVacation($account_id);
|
||||
|
||||
if ($vacRules['vacation']===false)
|
||||
{
|
||||
$content['msg'] = lang('error').':'.lang('Serverside Vacationnotice (via Sieve) are not activated').'. '.
|
||||
lang('Please contact your Administrator to validate if your Server supports Serverside Vacationmessages, and how to enable them in EGroupware for your active Account (%1) with ID:%2.',$this->currentIdentity,$icServer->ImapServerId);
|
||||
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($icServer->acc_imap_administration)
|
||||
{
|
||||
$ByDate = array('by_date' => lang('By date'));
|
||||
@ -643,7 +652,7 @@ class mail_sieve
|
||||
}
|
||||
// refresh vacationNotice on index
|
||||
$response = egw_json_response::get();
|
||||
$response->call('app.mail.mail_callRefreshVacationNotice',$this->mailbo->profileID);
|
||||
$response->call('app.mail.mail_callRefreshVacationNotice',$icServer->ImapServerId);
|
||||
egw_framework::refresh_opener($msg, 'mail');
|
||||
if ($button === 'apply' || $icServer->error !=="")
|
||||
{
|
||||
@ -682,9 +691,10 @@ class mail_sieve
|
||||
}
|
||||
$content['msg'] = $msg;
|
||||
}
|
||||
}
|
||||
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.',$this->currentIdentity['identity_string'],$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,$icServer->ImapServerId);
|
||||
$content['hideIfSieveDisabled']='mail_DisplayNone';
|
||||
}
|
||||
$vtmpl->exec('mail.mail_sieve.editVacation',$content,$sel_options,$readonlys,$preserv,2);
|
||||
|
Loading…
Reference in New Issue
Block a user