summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/acl/acl.js5
-rw-r--r--plugins/acl/localization/ar_SA.inc91
-rw-r--r--plugins/acl/localization/br.inc19
-rw-r--r--plugins/acl/localization/en_CA.inc1
-rw-r--r--plugins/acl/localization/en_US.inc3
-rw-r--r--plugins/acl/localization/eo.inc1
-rw-r--r--plugins/acl/localization/et_EE.inc1
-rw-r--r--plugins/acl/localization/fi_FI.inc2
-rw-r--r--plugins/acl/localization/it_IT.inc6
-rw-r--r--plugins/acl/localization/pt_PT.inc50
-rw-r--r--plugins/filesystem_attachments/filesystem_attachments.php52
-rw-r--r--plugins/http_authentication/http_authentication.php17
-rwxr-xr-xplugins/jqueryui/themes/classic/jquery-ui-1.9.2.custom.css4
-rwxr-xr-xplugins/jqueryui/themes/larry/jquery-ui-1.9.2.custom.css54
-rw-r--r--plugins/managesieve/Changelog12
-rw-r--r--plugins/managesieve/composer.json2
-rw-r--r--plugins/managesieve/config.inc.php.dist6
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php79
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_script.php1
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php303
-rw-r--r--plugins/managesieve/localization/en_US.inc21
-rw-r--r--plugins/managesieve/managesieve.js51
-rw-r--r--plugins/managesieve/managesieve.php125
-rw-r--r--plugins/managesieve/package.xml4
-rw-r--r--plugins/managesieve/skins/classic/managesieve.css20
-rw-r--r--plugins/managesieve/skins/classic/templates/filteredit.html1
-rw-r--r--plugins/managesieve/skins/classic/templates/managesieve.html1
-rw-r--r--plugins/managesieve/skins/classic/templates/setedit.html1
-rw-r--r--plugins/managesieve/skins/classic/templates/vacation.html31
-rw-r--r--plugins/managesieve/skins/larry/images/vacation_icons.pngbin0 -> 767 bytes
-rw-r--r--plugins/managesieve/skins/larry/managesieve.css42
-rw-r--r--plugins/managesieve/skins/larry/templates/filteredit.html1
-rw-r--r--plugins/managesieve/skins/larry/templates/managesieve.html1
-rw-r--r--plugins/managesieve/skins/larry/templates/setedit.html1
-rw-r--r--plugins/managesieve/skins/larry/templates/vacation.html30
-rw-r--r--plugins/password/drivers/dbmail.php2
-rw-r--r--plugins/password/drivers/domainfactory.php2
-rw-r--r--plugins/password/helpers/chgdbmailusers.c3
-rw-r--r--plugins/password/password.php7
39 files changed, 907 insertions, 146 deletions
diff --git a/plugins/acl/acl.js b/plugins/acl/acl.js
index 7eb2653b3..acea60a4c 100644
--- a/plugins/acl/acl.js
+++ b/plugins/acl/acl.js
@@ -14,6 +14,11 @@ if (window.rcmail) {
var inst = rcmail.is_framed() ? parent.rcmail : rcmail;
inst.init_address_input_events($('#acluser'), {action:'settings/plugin.acl-autocomplete'});
+ // pass config settings and localized texts to autocomplete context
+ inst.set_env({ autocomplete_max:rcmail.env.autocomplete_max, autocomplete_min_length:rcmail.env.autocomplete_min_length });
+ inst.add_label('autocompletechars', rcmail.labels.autocompletechars);
+ inst.add_label('autocompletemore', rcmail.labels.autocompletemore);
+
// fix inserted value
inst.addEventListener('autocomplete_insert', function(e) {
if (e.field.id != 'acluser')
diff --git a/plugins/acl/localization/ar_SA.inc b/plugins/acl/localization/ar_SA.inc
new file mode 100644
index 000000000..ef6cddba6
--- /dev/null
+++ b/plugins/acl/localization/ar_SA.inc
@@ -0,0 +1,91 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/acl/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail ACL plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/
+*/
+$labels['sharing'] = 'مشاركة';
+$labels['myrights'] = 'حقوق الوصول';
+$labels['username'] = 'مستخدم:';
+$labels['advanced'] = 'وضع متقدم';
+$labels['newuser'] = 'اضافة مدخل';
+$labels['editperms'] = 'تعديل الصلاحيات';
+$labels['actions'] = 'اجراءات حقوق الوصول...';
+$labels['anyone'] = 'كل المستخدمين(اي شخص)';
+$labels['anonymous'] = 'ضيف (مجهول)';
+$labels['identifier'] = 'معرف';
+$labels['acll'] = 'بحث';
+$labels['aclr'] = 'قراءة الرسائل';
+$labels['acls'] = 'ابقاء حالة الزيارة';
+$labels['aclw'] = 'اكتب رمز';
+$labels['acli'] = 'ادخل (نسخ الى)';
+$labels['aclp'] = 'نشر';
+$labels['aclc'] = 'إنشاء مجلدات فرعية';
+$labels['aclk'] = 'إنشاء مجلدات فرعية';
+$labels['acld'] = 'حذف الرسائل';
+$labels['aclt'] = 'حذف الرسائل';
+$labels['acle'] = 'حُذف';
+$labels['aclx'] = 'حذف المجلد';
+$labels['acla'] = 'ادارة';
+$labels['aclfull'] = 'تحكم كامل';
+$labels['aclother'] = 'اخرى';
+$labels['aclread'] = 'قراءة ';
+$labels['aclwrite'] = 'كتابة';
+$labels['acldelete'] = 'حذف';
+$labels['shortacll'] = 'بحث';
+$labels['shortaclr'] = 'قراءة ';
+$labels['shortacls'] = 'ابقاء';
+$labels['shortaclw'] = 'قراءة';
+$labels['shortacli'] = 'ادراج';
+$labels['shortaclp'] = 'نشر';
+$labels['shortaclc'] = 'أنشئ';
+$labels['shortaclk'] = 'أنشئ';
+$labels['shortacld'] = 'حذف';
+$labels['shortaclt'] = 'حذف';
+$labels['shortacle'] = 'حُذف';
+$labels['shortaclx'] = 'حذف المجلد';
+$labels['shortacla'] = 'ادارة';
+$labels['shortaclother'] = 'اخرى';
+$labels['shortaclread'] = 'قراءة ';
+$labels['shortaclwrite'] = 'كتابة';
+$labels['shortacldelete'] = 'حذف';
+$labels['longacll'] = 'المجلد مرئي في القائمة وبالامكان ايضا الاشتراك';
+$labels['longaclr'] = 'من الممكن فتح المجلد للقراءة';
+$labels['longacls'] = 'وسم الزيارة في الرسائل بالامكان تغييره';
+$labels['longaclw'] = 'وسم والكلمات الرئيسية في الرسائل يمكن تغييره, ماعدا الزيارة والحذف ';
+$labels['longacli'] = 'بالامكان كتابة الرسائل ونسخها الى هذا المجلد';
+$labels['longaclp'] = 'بالامكان نشر الرسائل الى هذ المجلد';
+$labels['longaclc'] = 'بالامكان انشاء المجلدات ( او اعادة التسمية ) مباشرة تحت هذا المجلد';
+$labels['longaclk'] = 'بالامكان انشاء المجلدات ( او اعادة التسمية ) مباشرة تحت هذا المجلد';
+$labels['longacld'] = 'حذف وسم الرسائل من الممكن تغييرة';
+$labels['longaclt'] = 'حذف وسم الرسائل من الممكن تغييرة';
+$labels['longacle'] = 'بالامكان شطب الرسائل';
+$labels['longaclx'] = 'هذا المجلد بالامكان حذفة او اعادة تسميته';
+$labels['longacla'] = 'حقوق الوصول لهذا المجلد بالامكان تغييره';
+$labels['longaclfull'] = 'التحكم الكامل يتضمن ادارة المجلدات';
+$labels['longaclread'] = 'من الممكن فتح المجلد للقراءة';
+$labels['longaclwrite'] = 'لا يمكن وضع علامة على الرسائل, كتبت او نسخة الى هذا المجلد';
+$labels['longacldelete'] = 'لا يمكن حذف الرسائل';
+$messages['deleting'] = 'جاري حذف حقوق الوصول...';
+$messages['saving'] = 'جاري حفظ حقوق الوصول...';
+$messages['updatesuccess'] = 'تم تغيير حقوق الوصول بنجاح';
+$messages['deletesuccess'] = 'تم حذف حقوق الوصول بنجاح';
+$messages['createsuccess'] = 'تم اضافة حقوق الوصول بنجاح';
+$messages['updateerror'] = 'لا يمكن تحديث حقوق الوصول';
+$messages['deleteerror'] = 'لا يمكن حذف حقوق الوصول';
+$messages['createerror'] = 'لا يمكن اضافة حقوق الوصول';
+$messages['deleteconfirm'] = 'هل تريد فعلاً حذف حقوق الوصول لـ المستخدمين المحددين ؟';
+$messages['norights'] = 'لم يتم تحديد حقوق وصول!';
+$messages['nouser'] = 'لم يتم تحديد اسم مستخدم!';
+?>
diff --git a/plugins/acl/localization/br.inc b/plugins/acl/localization/br.inc
index bd2f0cbc0..b3ae1c79f 100644
--- a/plugins/acl/localization/br.inc
+++ b/plugins/acl/localization/br.inc
@@ -18,8 +18,10 @@
$labels['sharing'] = 'Rannañ';
$labels['myrights'] = 'Aotreoù mont e-barzh';
$labels['username'] = 'Implijer:';
-$labels['advanced'] = 'Doare araokaet';
+$labels['newuser'] = 'Ouzhpenan un enporzh';
+$labels['actions'] = 'Aotreoù mont e-barzh';
$labels['anyone'] = 'An holl implijerien (neb hini)';
+$labels['anonymous'] = 'pedet (dizanv)';
$labels['aclr'] = 'Kemennadoù lennet';
$labels['aclc'] = 'Krouiñ isrenkelloù';
$labels['aclk'] = 'Krouiñ isrenkelloù';
@@ -28,4 +30,19 @@ $labels['aclt'] = 'Dilemel kemennadoù';
$labels['aclx'] = 'Dilemel ar renkell';
$labels['aclread'] = 'Lennet';
$labels['aclwrite'] = 'Skrivañ';
+$labels['acldelete'] = 'Dilemel';
+$labels['shortaclr'] = 'Lenn';
+$labels['shortacls'] = 'Gwarezin';
+$labels['shortaclw'] = 'Skrivañ';
+$labels['shortacli'] = 'Enlakaat';
+$labels['shortaclc'] = 'Krouiñ';
+$labels['shortaclk'] = 'Krouiñ';
+$labels['shortacld'] = 'Dilemel';
+$labels['shortaclt'] = 'Dilemel';
+$labels['shortacle'] = 'Dilemel pep tra';
+$labels['shortaclx'] = 'Dilemel ar renkell';
+$labels['shortaclother'] = 'traoù all';
+$labels['shortaclread'] = 'Lenn';
+$labels['shortaclwrite'] = 'Skrivañ';
+$labels['shortacldelete'] = 'Dilemel';
?>
diff --git a/plugins/acl/localization/en_CA.inc b/plugins/acl/localization/en_CA.inc
index 2dd7e4ec0..53d14ff9a 100644
--- a/plugins/acl/localization/en_CA.inc
+++ b/plugins/acl/localization/en_CA.inc
@@ -18,7 +18,6 @@
$labels['sharing'] = 'Sharing';
$labels['myrights'] = 'Access Rights';
$labels['username'] = 'User:';
-$labels['advanced'] = 'advanced mode';
$labels['newuser'] = 'Add entry';
$labels['actions'] = 'Access right actions...';
$labels['anyone'] = 'All users (anyone)';
diff --git a/plugins/acl/localization/en_US.inc b/plugins/acl/localization/en_US.inc
index ce665768a..23501dafe 100644
--- a/plugins/acl/localization/en_US.inc
+++ b/plugins/acl/localization/en_US.inc
@@ -40,6 +40,7 @@ $labels['aclt'] = 'Delete messages';
$labels['acle'] = 'Expunge';
$labels['aclx'] = 'Delete folder';
$labels['acla'] = 'Administer';
+$labels['acln'] = 'Annotate messages';
$labels['aclfull'] = 'Full control';
$labels['aclother'] = 'Other';
@@ -60,6 +61,7 @@ $labels['shortaclt'] = 'Delete';
$labels['shortacle'] = 'Expunge';
$labels['shortaclx'] = 'Folder delete';
$labels['shortacla'] = 'Administer';
+$labels['shortacln'] = 'Annotate';
$labels['shortaclother'] = 'Other';
$labels['shortaclread'] = 'Read';
@@ -79,6 +81,7 @@ $labels['longaclt'] = 'Messages Delete flag can be changed';
$labels['longacle'] = 'Messages can be expunged';
$labels['longaclx'] = 'The folder can be deleted or renamed';
$labels['longacla'] = 'The folder access rights can be changed';
+$labels['longacln'] = 'Messages shared metadata (annotations) can be changed';
$labels['longaclfull'] = 'Full control including folder administration';
$labels['longaclread'] = 'The folder can be opened for reading';
diff --git a/plugins/acl/localization/eo.inc b/plugins/acl/localization/eo.inc
index 888ea4def..e06a38fff 100644
--- a/plugins/acl/localization/eo.inc
+++ b/plugins/acl/localization/eo.inc
@@ -18,7 +18,6 @@
$labels['sharing'] = 'Kunhavigado';
$labels['myrights'] = 'Atingrajtoj';
$labels['username'] = 'Uzanto:';
-$labels['advanced'] = 'progresinta reĝimo';
$labels['newuser'] = 'Aldoni eron';
$labels['actions'] = 'Agoj de atingrajtoj...';
$labels['anyone'] = 'Ĉiuj uzantoj (iu ajn)';
diff --git a/plugins/acl/localization/et_EE.inc b/plugins/acl/localization/et_EE.inc
index 5a64ac8fb..4b6f437aa 100644
--- a/plugins/acl/localization/et_EE.inc
+++ b/plugins/acl/localization/et_EE.inc
@@ -18,7 +18,6 @@
$labels['sharing'] = 'Jagamine';
$labels['myrights'] = 'Ligipääsuõigused';
$labels['username'] = 'Kasutaja:';
-$labels['advanced'] = 'laiendatud režiim';
$labels['newuser'] = 'Lisa sissekanne';
$labels['actions'] = 'Ligipääsuõiguste toimingud...';
$labels['anyone'] = 'Kõik kasutajad';
diff --git a/plugins/acl/localization/fi_FI.inc b/plugins/acl/localization/fi_FI.inc
index ab3222464..eb69eda3a 100644
--- a/plugins/acl/localization/fi_FI.inc
+++ b/plugins/acl/localization/fi_FI.inc
@@ -18,7 +18,7 @@
$labels['sharing'] = 'Jakaminen';
$labels['myrights'] = 'Käyttöoikeudet';
$labels['username'] = 'Käyttäjä:';
-$labels['advanced'] = 'edistynyt tila';
+$labels['editperms'] = 'Muokkaa oikeuksia';
$labels['anyone'] = 'Kaikki käyttäjät (kuka tahansa)';
$labels['anonymous'] = 'Vieraat (anonyymit)';
$labels['aclother'] = 'Muu';
diff --git a/plugins/acl/localization/it_IT.inc b/plugins/acl/localization/it_IT.inc
index f610ac031..36c66cda5 100644
--- a/plugins/acl/localization/it_IT.inc
+++ b/plugins/acl/localization/it_IT.inc
@@ -18,8 +18,9 @@
$labels['sharing'] = 'Condivisione';
$labels['myrights'] = 'Diritti d\'accesso';
$labels['username'] = 'Utente:';
-$labels['advanced'] = 'modalità avanzata';
+$labels['advanced'] = 'Modalità avanzata';
$labels['newuser'] = 'Aggiungi voce';
+$labels['editperms'] = 'Modifica permessi';
$labels['actions'] = 'Azioni permessi d\'accesso...';
$labels['anyone'] = 'Tutti gli utenti';
$labels['anonymous'] = 'Osptiti (anonimi)';
@@ -37,6 +38,7 @@ $labels['aclt'] = 'Elimina messaggi';
$labels['acle'] = 'Elimina';
$labels['aclx'] = 'Elimina cartella';
$labels['acla'] = 'Amministra';
+$labels['acln'] = 'Annota messaggi';
$labels['aclfull'] = 'Controllo completo';
$labels['aclother'] = 'Altro';
$labels['aclread'] = 'Lettura';
@@ -55,6 +57,7 @@ $labels['shortaclt'] = 'Elimina';
$labels['shortacle'] = 'Elimina';
$labels['shortaclx'] = 'Elimina cartella';
$labels['shortacla'] = 'Amministra';
+$labels['shortacln'] = 'Annota';
$labels['shortaclother'] = 'Altro';
$labels['shortaclread'] = 'Lettura';
$labels['shortaclwrite'] = 'Scrittura';
@@ -72,6 +75,7 @@ $labels['longaclt'] = 'Il flag Messaggio Eliminato può essere cambiato';
$labels['longacle'] = 'I messaggi possono essere cancellati';
$labels['longaclx'] = 'La cartella può essere eliminata o rinominata';
$labels['longacla'] = 'I diritti di accesso della cartella possono essere cambiati';
+$labels['longacln'] = 'I metadati (annotazioni) dei messaggi condivisi possono essere modificati';
$labels['longaclfull'] = 'Controllo completo incluso cartella di amministrazione';
$labels['longaclread'] = 'Questa cartella può essere aperta in lettura';
$labels['longaclwrite'] = 'I messaggi possono essere marcati, scritti o copiati nella cartella';
diff --git a/plugins/acl/localization/pt_PT.inc b/plugins/acl/localization/pt_PT.inc
index 3f1a8f076..77f831375 100644
--- a/plugins/acl/localization/pt_PT.inc
+++ b/plugins/acl/localization/pt_PT.inc
@@ -20,70 +20,74 @@ $labels['myrights'] = 'Permissões de acesso';
$labels['username'] = 'Utilizador:';
$labels['advanced'] = 'Modo avançado';
$labels['newuser'] = 'Adicionar entrada';
+$labels['editperms'] = 'Editar permissões';
$labels['actions'] = 'Acções de permissão de acesso...';
$labels['anyone'] = 'Todos os utilizadores (todos)';
-$labels['anonymous'] = 'Convidado (anónimo)';
+$labels['anonymous'] = 'Convidados (anónimo)';
$labels['identifier'] = 'Identificador';
$labels['acll'] = 'Pesquisar';
$labels['aclr'] = 'Ler mensagens';
-$labels['acls'] = 'Manter estado de enviado';
+$labels['acls'] = 'Manter estado Visto';
$labels['aclw'] = 'Guardar marcadores';
-$labels['acli'] = 'Inserir (cópia em)';
+$labels['acli'] = 'Inserir (Copiar para)';
$labels['aclp'] = 'Publicar';
$labels['aclc'] = 'Criar subpastas';
$labels['aclk'] = 'Criar subpastas';
$labels['acld'] = 'Eliminar mensagens';
$labels['aclt'] = 'Eliminar mensagens';
-$labels['acle'] = 'Eliminar';
+$labels['acle'] = 'Purgar';
$labels['aclx'] = 'Eliminar pasta';
$labels['acla'] = 'Administrar';
+$labels['acln'] = 'Anotar mensagens';
$labels['aclfull'] = 'Controlo total';
$labels['aclother'] = 'Outro';
$labels['aclread'] = 'Ler';
-$labels['aclwrite'] = 'Guardar';
+$labels['aclwrite'] = 'Escrever';
$labels['acldelete'] = 'Eliminar';
$labels['shortacll'] = 'Pesquisar';
$labels['shortaclr'] = 'Ler';
$labels['shortacls'] = 'Manter';
-$labels['shortaclw'] = 'Guardar';
+$labels['shortaclw'] = 'Escrever';
$labels['shortacli'] = 'Inserir';
$labels['shortaclp'] = 'Publicar';
$labels['shortaclc'] = 'Criar';
$labels['shortaclk'] = 'Criar';
$labels['shortacld'] = 'Eliminar';
$labels['shortaclt'] = 'Eliminar';
-$labels['shortacle'] = 'Eliminar';
+$labels['shortacle'] = 'Purgar';
$labels['shortaclx'] = 'Eliminar pasta';
$labels['shortacla'] = 'Administrar';
+$labels['shortacln'] = 'Anotar';
$labels['shortaclother'] = 'Outro';
$labels['shortaclread'] = 'Ler';
-$labels['shortaclwrite'] = 'Guardar';
+$labels['shortaclwrite'] = 'Escrever';
$labels['shortacldelete'] = 'Eliminar';
-$labels['longacll'] = 'A pasta está visível na lista e pode subscrita para';
+$labels['longacll'] = 'A pasta está visível em listas e pode subscrita';
$labels['longaclr'] = 'A pasta pode ser aberta para leitura';
-$labels['longacls'] = 'O marcador de mensagem enviada pode ser alterado';
-$labels['longaclw'] = 'Marcadores de mensagens e palavras-chave podem ser alterados, excepto de Enviadas e Eliminadas';
-$labels['longacli'] = 'As mensagens podem ser escritas e copiadas para a pasta';
-$labels['longaclp'] = 'As mensagens podem ser publicadas na pasta';
-$labels['longaclc'] = 'As pastas podem ser criadas (ou renomeadas) directamente nesta pasta';
-$labels['longaclk'] = 'As pastas podem ser criadas (ou renomeadas) directamente nesta pasta';
-$labels['longacld'] = 'O marcador de mensagens Eliminadas pode ser alterado';
-$labels['longaclt'] = 'O marcador de mensagens Eliminadas pode ser alterado';
-$labels['longacle'] = 'As mensagens podem ser eliminadas';
+$labels['longacls'] = 'O marcador Mensagens Vistas pode ser alterado';
+$labels['longaclw'] = 'Marcadores de mensagens e palavras-chave podem ser alterados, excepto Vistas e Eliminadas';
+$labels['longacli'] = 'As mensagens podem ser escritas ou copiadas para a pasta';
+$labels['longaclp'] = 'As mensagens podem ser publicadas para esta pasta';
+$labels['longaclc'] = 'As pastas podem ser criadas (ou renomeadas) directamente debaixo desta pasta';
+$labels['longaclk'] = 'As pastas podem ser criadas (ou renomeadas) directamente debaixo desta pasta';
+$labels['longacld'] = 'O marcador Apagar Mensagens pode ser alterado';
+$labels['longaclt'] = 'O marcador Apagar Mensagens pode ser alterado';
+$labels['longacle'] = 'As mensagens podem ser purgadas';
$labels['longaclx'] = 'A pasta pode ser eliminada ou renomeada';
$labels['longacla'] = 'As permissões de acesso da pasta podem ser alteradas';
-$labels['longaclfull'] = 'Controlo total incluindo administração da pasta';
+$labels['longacln'] = 'Mensagens partilhadas de metadados (anotações) podem ser alteradas';
+$labels['longaclfull'] = 'Controlo total incluindo administração de pastas';
$labels['longaclread'] = 'A pasta pode ser aberta para leitura';
$labels['longaclwrite'] = 'As mensagens podem ser marcadas, guardadas ou copiadas para a pasta';
$labels['longacldelete'] = 'As mensagens podem ser eliminadas';
-$messages['deleting'] = 'A eliminar as permissões de acesso...';
-$messages['saving'] = 'A guardar as permissões de acesso...';
+$messages['deleting'] = 'A eliminar permissões de acesso...';
+$messages['saving'] = 'A guardar permissões de acesso...';
$messages['updatesuccess'] = 'Permissões de acesso alteradas com sucesso';
$messages['deletesuccess'] = 'Permissões de acesso eliminadas com sucesso';
$messages['createsuccess'] = 'Permissões de acesso adicionadas com sucesso';
$messages['updateerror'] = 'Não foi possível actualizar os direitos de acesso';
-$messages['deleteerror'] = 'Não foi possível eliminar as permissões de acesso';
-$messages['createerror'] = 'Não foi possível adicionar as permissões de acesso';
+$messages['deleteerror'] = 'Não foi possível eliminar permissões de acesso';
+$messages['createerror'] = 'Não foi possível adicionar permissões de acesso';
$messages['deleteconfirm'] = 'Tem a certeza que pretende remover as permissões de acesso do(s) utilizador(es) seleccionado(s)?';
$messages['norights'] = 'Não foram especificadas quaisquer permissões!';
$messages['nouser'] = 'Não foi especificado nenhum nome de utilizador!';
diff --git a/plugins/filesystem_attachments/filesystem_attachments.php b/plugins/filesystem_attachments/filesystem_attachments.php
index 8d995ca0d..50bd62465 100644
--- a/plugins/filesystem_attachments/filesystem_attachments.php
+++ b/plugins/filesystem_attachments/filesystem_attachments.php
@@ -16,7 +16,6 @@
* @license GNU GPLv3+
* @author Ziba Scott <ziba@umich.edu>
* @author Thomas Bruederli <roundcube@gmail.com>
- *
*/
class filesystem_attachments extends rcube_plugin
{
@@ -50,7 +49,7 @@ class filesystem_attachments extends rcube_plugin
function upload($args)
{
$args['status'] = false;
- $group = $args['group'];
+ $group = $args['group'];
$rcmail = rcmail::get_instance();
// use common temp dir for file uploads
@@ -58,13 +57,13 @@ class filesystem_attachments extends rcube_plugin
$tmpfname = tempnam($temp_dir, 'rcmAttmnt');
if (move_uploaded_file($args['path'], $tmpfname) && file_exists($tmpfname)) {
- $args['id'] = $this->file_id();
- $args['path'] = $tmpfname;
+ $args['id'] = $this->file_id();
+ $args['path'] = $tmpfname;
$args['status'] = true;
@chmod($tmpfname, 0600); // set correct permissions (#1488996)
// Note the file for later cleanup
- $_SESSION['plugins']['filesystem_attachments'][$group][] = $tmpfname;
+ $_SESSION['plugins']['filesystem_attachments'][$group][$args['id']] = $tmpfname;
}
return $args;
@@ -79,7 +78,7 @@ class filesystem_attachments extends rcube_plugin
$args['status'] = false;
if (!$args['path']) {
- $rcmail = rcmail::get_instance();
+ $rcmail = rcmail::get_instance();
$temp_dir = $rcmail->config->get('temp_dir');
$tmp_path = tempnam($temp_dir, 'rcmAttmnt');
@@ -87,15 +86,17 @@ class filesystem_attachments extends rcube_plugin
fwrite($fp, $args['data']);
fclose($fp);
$args['path'] = $tmp_path;
- } else
+ }
+ else {
return $args;
+ }
}
- $args['id'] = $this->file_id();
+ $args['id'] = $this->file_id();
$args['status'] = true;
// Note the file for later cleanup
- $_SESSION['plugins']['filesystem_attachments'][$group][] = $args['path'];
+ $_SESSION['plugins']['filesystem_attachments'][$group][$args['id']] = $args['path'];
return $args;
}
@@ -139,15 +140,18 @@ class filesystem_attachments extends rcube_plugin
// $_SESSION['compose']['attachments'] is not a complete record of
// temporary files because loading a draft or starting a forward copies
// the file to disk, but does not make an entry in that array
- if (is_array($_SESSION['plugins']['filesystem_attachments'])){
+ if (is_array($_SESSION['plugins']['filesystem_attachments'])) {
foreach ($_SESSION['plugins']['filesystem_attachments'] as $group => $files) {
- if ($args['group'] && $args['group'] != $group)
+ if ($args['group'] && $args['group'] != $group) {
continue;
- foreach ((array)$files as $filename){
- if(file_exists($filename)){
+ }
+
+ foreach ((array)$files as $filename) {
+ if(file_exists($filename)) {
unlink($filename);
}
}
+
unset($_SESSION['plugins']['filesystem_attachments'][$group]);
}
}
@@ -157,7 +161,25 @@ class filesystem_attachments extends rcube_plugin
function file_id()
{
$userid = rcmail::get_instance()->user->ID;
- list($usec, $sec) = explode(' ', microtime());
- return preg_replace('/[^0-9]/', '', $userid . $sec . $usec);
+ list($usec, $sec) = explode(' ', microtime());
+ $id = preg_replace('/[^0-9]/', '', $userid . $sec . $usec);
+
+ // make sure the ID is really unique (#1489546)
+ while ($this->find_file_by_id($id)) {
+ // increment last four characters
+ $x = substr($id, -4) + 1;
+ $id = substr($id, 0, -4) . sprintf('%04d', ($x > 9999 ? $x - 9999 : $x));
+ }
+
+ return $id;
+ }
+
+ private function find_file_by_id($id)
+ {
+ foreach ((array) $_SESSION['plugins']['filesystem_attachments'] as $group => $files) {
+ if (isset($files[$id])) {
+ return true;
+ }
+ }
}
}
diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php
index 83f29c84f..39d70153a 100644
--- a/plugins/http_authentication/http_authentication.php
+++ b/plugins/http_authentication/http_authentication.php
@@ -19,12 +19,14 @@
*/
class http_authentication extends rcube_plugin
{
+ private $redirect_query;
function init()
{
$this->add_hook('startup', array($this, 'startup'));
$this->add_hook('authenticate', array($this, 'authenticate'));
$this->add_hook('logout_after', array($this, 'logout'));
+ $this->add_hook('login_after', array($this, 'login'));
}
function startup($args)
@@ -34,8 +36,9 @@ class http_authentication extends rcube_plugin
$rcmail->add_shutdown_function(array('http_authentication', 'shutdown'));
// handle login action
- if (empty($args['action']) && empty($_SESSION['user_id'])) {
- $args['action'] = 'login';
+ if (empty($_SESSION['user_id'])) {
+ $args['action'] = 'login';
+ $this->redirect_query = $_SERVER['QUERY_STRING'];
}
// Set user password in session (see shutdown() method for more info)
else if (!empty($_SESSION['user_id']) && empty($_SESSION['password'])
@@ -90,5 +93,15 @@ class http_authentication extends rcube_plugin
// We'll set it back on startup (#1486553)
rcmail::get_instance()->session->remove('password');
}
+
+ function login($args)
+ {
+ // Redirect to the previous QUERY_STRING
+ if($this->redirect_query){
+ header('Location: ./?' . $this->redirect_query);
+ exit;
+ }
+ return $args;
+ }
}
diff --git a/plugins/jqueryui/themes/classic/jquery-ui-1.9.2.custom.css b/plugins/jqueryui/themes/classic/jquery-ui-1.9.2.custom.css
index 1002a95fe..617d3e16a 100755
--- a/plugins/jqueryui/themes/classic/jquery-ui-1.9.2.custom.css
+++ b/plugins/jqueryui/themes/classic/jquery-ui-1.9.2.custom.css
@@ -431,6 +431,10 @@ input.ui-button { padding: .4em 1em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+
+.ui-button.mainaction { font-weight: bold; border: 1px solid #999; }
+
+
/*
* jQuery UI Dialog 1.8.18
*
diff --git a/plugins/jqueryui/themes/larry/jquery-ui-1.9.2.custom.css b/plugins/jqueryui/themes/larry/jquery-ui-1.9.2.custom.css
index 3062bbb62..383586091 100755
--- a/plugins/jqueryui/themes/larry/jquery-ui-1.9.2.custom.css
+++ b/plugins/jqueryui/themes/larry/jquery-ui-1.9.2.custom.css
@@ -475,13 +475,29 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
outline: none;
}
+.ui-button.mainaction {
+ color: #ededed;
+ text-shadow: 0px 1px 1px #333;
+ border-color: #1f262c;
+ background: #505050;
+ background: -moz-linear-gradient(top, #505050 0%, #2a2e31 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#505050), color-stop(100%,#2a2e31));
+ background: -o-linear-gradient(top, #505050 0%, #2a2e31 100%);
+ background: -ms-linear-gradient(top, #505050 0%, #2a2e31 100%);
+ background: linear-gradient(top, #505050 0%, #2a2e31 100%);
+ -moz-box-shadow: inset 0 1px 0 0 #777;
+ -webkit-box-shadow: inset 0 1px 0 0 #777;
+ -o-box-shadow: inset 0 1px 0 0 #777;
+ box-shadow: inset 0 1px 0 0 #777;
+}
+
.ui-button.ui-state-focus {
color: #525252;
border-color: #4fadd5;
- box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
-moz-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
-webkit-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
-o-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
+ box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
}
.ui-button.ui-state-active {
@@ -496,6 +512,35 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e6e6e6', endColorstr='#f9f9f9', GradientType=0);
}
+.ui-button.ui-state-focus.mainaction,
+.ui-button.ui-state-hover.mainaction {
+ color: #fff;
+}
+
+.ui-button.ui-state-focus.mainaction {
+ border-color: #1f262c;
+ -moz-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6), inset 0 1px 0 0 #777;
+ -webkit-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6), inset 0 1px 0 0 #777;
+ -o-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6), inset 0 1px 0 0 #777;
+ box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6), inset 0 1px 0 0 #777;
+}
+
+.ui-button.ui-state-active.mainaction {
+ color: #fff;
+ background: #515151;
+ background: -moz-linear-gradient(top, #2a2e31 0%, #505050 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2a2e31), color-stop(100%,#505050));
+ background: -o-linear-gradient(top, #2a2e31 0%, #505050 100%);
+ background: -ms-linear-gradient(top, #2a2e31 0%, #505050 100%);
+ background: linear-gradient(top, #2a2e31 0%, #505050 100%);
+}
+
+.ui-button[disabled],
+.ui-button[disabled]:hover,
+.ui-button.mainaction[disabled] {
+ color: #aaa !important;
+}
+
/*
* jQuery UI Dialog 1.8.18
*
@@ -518,6 +563,11 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
+
+.ui-dialog .uibox { background-color: #fbfbfb; -moz-box-shadow: 0 0 1px #aaa; -webkit-box-shadow: 0 0 1px #aaa; box-shadow: 0 0 1px #aaa; }
+.ui-dialog .uibox ul.proplist li, .ui-dialog .uibox table.propform td { border-bottom-color: #fbfbfb; }
+.ui-dialog .listbox { background: #d9ecf4; }
+
/*
* jQuery UI Slider 1.8.18
*
@@ -568,7 +618,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-tabs .ui-tabs-nav li.ui-tabs-active { }
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-dialog-content .tabsbar .tablink.selected a { outline:none; color: #004458; background: #efefef; background: -moz-linear-gradient(top, #fafafa 40%, #e4e4e4 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(40%,#fff), color-stop(100%,#e4e4e4)); background: -o-linear-gradient(top, #fafafa 40%, #e4e4e4 100%); background: -ms-linear-gradient(top, #fafafa 40%, #e4e4e4 100%); background: linear-gradient(top, #fafafa 40%, #e4e4e4 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#e4e4e4', GradientType=0); }
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li:last-child { background: none; }
+.ui-tabs .ui-tabs-nav li:last-child { /* background: none; */ }
.ui-tabs .ui-tabs-nav li:last-child a { border: 0; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.5em 1em; margin-top: 0.2em; background: #efefef; }
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index 825bef6fd..afdafed28 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -1,9 +1,19 @@
+- Added optional separate interface for out-of-office management (#1488266)
+
+* version 7.2 [2014-02-14]
+-----------------------------------------------------------
- Nicely handle server-side modification of script names (#1489412)
- Add Filters tab/section using plugin API hook
+- Fix issue where folder selector wasn't visible on new filter form
+- Fix issue where multi-select fields were not visible in new filter action rows (#1489600)
+- Fix issue in displaying filter form when managesieve_kolab_master=true
+ and sieve variables extension is supported by the server (#1489599)
+- Fix wrong action folder selection if managesieve_domains is not empty (#1489617)
+- Fix filter creation from an email when preview frame is disabled (#1489647)
* version 7.1 [2013-11-22]
-----------------------------------------------------------
-- lib/Net Sieve.php moved to Roundcube /lib directory
+- lib/Net_Sieve.php moved to Roundcube /lib directory
- Added managesieve_domains option to limit redirect destinations
- Fix bug where at least one additional address of vacation message was required (#1489345)
- Fix so i;ascii-numeric comparator is not forced as default for :count and :value operators
diff --git a/plugins/managesieve/composer.json b/plugins/managesieve/composer.json
index 58c70e5b9..51e76bc92 100644
--- a/plugins/managesieve/composer.json
+++ b/plugins/managesieve/composer.json
@@ -3,7 +3,7 @@
"type": "roundcube-plugin",
"description": "Adds a possibility to manage Sieve scripts (incoming mail filters). It's clickable interface which operates on text scripts and communicates with server using managesieve protocol. Adds Filters tab in Settings.",
"license": "GNU GPLv3+",
- "version": "7.0",
+ "version": "7.2",
"authors": [
{
"name": "Aleksander Machniak",
diff --git a/plugins/managesieve/config.inc.php.dist b/plugins/managesieve/config.inc.php.dist
index 52d3a9b1e..316eddd4f 100644
--- a/plugins/managesieve/config.inc.php.dist
+++ b/plugins/managesieve/config.inc.php.dist
@@ -68,4 +68,10 @@ $config['managesieve_filename_exceptions'] = array();
// If not empty, user will need to select domain from a list
$config['managesieve_domains'] = array();
+// Enables separate management interface for vacation responses (out-of-office)
+// 0 - no separate section (default),
+// 1 - add Vacation section,
+// 2 - add Vacation section, but hide Filters section
+$config['managesieve_vacation'] = 0;
+
?>
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index 4a375d353..a1bcc86ca 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -24,21 +24,21 @@
class rcube_sieve_engine
{
- private $rc;
- private $sieve;
- private $errors;
- private $form;
- private $tips = array();
- private $script = array();
- private $exts = array();
- private $list;
- private $active = array();
- private $headers = array(
+ protected $rc;
+ protected $sieve;
+ protected $errors;
+ protected $form;
+ protected $tips = array();
+ protected $script = array();
+ protected $exts = array();
+ protected $list;
+ protected $active = array();
+ protected $headers = array(
'subject' => 'Subject',
'from' => 'From',
'to' => 'To',
);
- private $addr_headers = array(
+ protected $addr_headers = array(
// Required
"from", "to", "cc", "bcc", "sender", "resent-from", "resent-to",
// Additional (RFC 822 / RFC 2822)
@@ -53,7 +53,7 @@ class rcube_sieve_engine
"x-beenthere",
);
- const VERSION = '7.1';
+ const VERSION = '8.0';
const PROGNAME = 'Roundcube (Managesieve)';
const PORT = 4190;
@@ -70,7 +70,7 @@ class rcube_sieve_engine
/**
* Loads configuration, initializes plugin (including sieve connection)
*/
- function start()
+ function start($mode = null)
{
// register UI objects
$this->rc->output->add_handlers(array(
@@ -137,13 +137,16 @@ class rcube_sieve_engine
$this->rc->session->remove('managesieve_current');
}
- if (!empty($_GET['_set']) || !empty($_POST['_set'])) {
- $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
- }
- else if (!empty($_SESSION['managesieve_current'])) {
- $script_name = $_SESSION['managesieve_current'];
+ if ($mode != 'vacation') {
+ if (!empty($_GET['_set']) || !empty($_POST['_set'])) {
+ $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
+ }
+ else if (!empty($_SESSION['managesieve_current'])) {
+ $script_name = $_SESSION['managesieve_current'];
+ }
}
- else {
+
+ if ($script_name === null || $script_name === '') {
// get (first) active script
if (!empty($this->active[0])) {
$script_name = $this->active[0];
@@ -980,7 +983,7 @@ class rcube_sieve_engine
}
if (!$this->errors && !$error) {
- // zapis skryptu
+ // save the script
if (!isset($this->script[$fid])) {
$fid = $this->sieve->script->add_rule($this->form);
$new = true;
@@ -1016,7 +1019,7 @@ class rcube_sieve_engine
$this->send();
}
- private function send()
+ protected function send()
{
// Handle form action
if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
@@ -1026,7 +1029,8 @@ class rcube_sieve_engine
else {
$this->rc->output->send('managesieve.filteredit');
}
- } else {
+ }
+ else {
$this->rc->output->set_pagetitle($this->plugin->gettext('filters'));
$this->rc->output->send('managesieve.managesieve');
}
@@ -1642,11 +1646,12 @@ class rcube_sieve_engine
$domain_select = new html_select(array('name' => "_action_target_domain[$id]", 'id' => 'action_target_domain'.$id));
$domain_select->add(array_combine($domains, $domains));
- $parts = explode('@', $action['target']);
-
- if (!empty($parts)) {
- $action['domain'] = array_pop($parts);
- $action['target'] = implode('@', $parts);
+ if ($action['type'] == 'redirect') {
+ $parts = explode('@', $action['target']);
+ if (!empty($parts)) {
+ $action['domain'] = array_pop($parts);
+ $action['target'] = implode('@', $parts);
+ }
}
}
@@ -1788,7 +1793,7 @@ class rcube_sieve_engine
'maxlength' => 100,
'id' => 'action_mailbox' . $id,
'name' => "_action_mailbox[$id]",
- 'style' => 'display:'.(!isset($action) || $action['type']=='fileinto' ? 'inline' : 'none')
+ 'style' => 'display:'.(empty($action['type']) || $action['type'] == 'fileinto' ? 'inline' : 'none')
));
$out .= $select->show($mailbox);
$out .= '</td>';
@@ -1808,12 +1813,12 @@ class rcube_sieve_engine
return $out;
}
- private function genid()
+ protected function genid()
{
return preg_replace('/[^0-9]/', '', microtime(true));
}
- private function strip_value($str, $allow_html = false, $trim = true)
+ protected function strip_value($str, $allow_html = false, $trim = true)
{
if (is_array($str)) {
foreach ($str as $idx => $val) {
@@ -1834,7 +1839,7 @@ class rcube_sieve_engine
return $trim ? trim($str) : $str;
}
- private function error_class($id, $type, $target, $elem_prefix='')
+ protected function error_class($id, $type, $target, $elem_prefix='')
{
// TODO: tooltips
if (($type == 'test' && ($str = $this->errors['tests'][$id][$target])) ||
@@ -1847,7 +1852,7 @@ class rcube_sieve_engine
return '';
}
- private function add_tip($id, $str, $error=false)
+ protected function add_tip($id, $str, $error=false)
{
if ($error)
$str = html::span('sieve error', $str);
@@ -1855,7 +1860,7 @@ class rcube_sieve_engine
$this->tips[] = array($id, $str);
}
- private function print_tips()
+ protected function print_tips()
{
if (empty($this->tips))
return;
@@ -1864,7 +1869,7 @@ class rcube_sieve_engine
$this->rc->output->add_script($script, 'foot');
}
- private function list_input($id, $name, $value, $enabled, $class, $size=null)
+ protected function list_input($id, $name, $value, $enabled, $class, $size=null)
{
$value = (array) $value;
$value = array_map(array('rcube', 'Q'), $value);
@@ -1880,7 +1885,7 @@ class rcube_sieve_engine
/**
* Validate input for date part elements
*/
- private function validate_date_part($type, $value)
+ protected function validate_date_part($type, $value)
{
// we do simple validation of date/part format
switch ($type) {
@@ -1925,7 +1930,7 @@ class rcube_sieve_engine
*
* @return string Mailbox name
*/
- private function mod_mailbox($mailbox, $mode = 'out')
+ protected function mod_mailbox($mailbox, $mode = 'out')
{
$delimiter = $_SESSION['imap_delimiter'];
$replace_delimiter = $this->rc->config->get('managesieve_replace_delimiter');
@@ -2217,7 +2222,7 @@ class rcube_sieve_engine
/**
* Initializes internal script data
*/
- private function init_script()
+ protected function init_script()
{
$this->script = $this->sieve->script->as_array();
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
index 6fbc3f89d..c6ad78add 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
@@ -585,6 +585,7 @@ class rcube_sieve_script
if ($rule[0]['type'] == 'set') {
unset($rule[0]['type']);
$this->vars[] = $rule[0];
+ unset($rule);
}
else {
$rule = array('actions' => $rule);
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php
new file mode 100644
index 000000000..636b5fcc1
--- /dev/null
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php
@@ -0,0 +1,303 @@
+<?php
+
+/**
+ * Managesieve Vacation Engine
+ *
+ * Engine part of Managesieve plugin implementing UI and backend access.
+ *
+ * Copyright (C) 2011-2014, Kolab Systems AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+class rcube_sieve_vacation extends rcube_sieve_engine
+{
+ function actions()
+ {
+ $error = $this->start('vacation');
+
+ // find current vacation rule
+ if (!$error) {
+ $this->vacation_rule();
+ $this->vacation_post();
+ }
+
+ $this->plugin->add_label('vacation.saving');
+ $this->rc->output->add_handlers(array(
+ 'vacationform' => array($this, 'vacation_form'),
+ ));
+
+ $this->rc->output->set_pagetitle($this->plugin->gettext('vacation'));
+ $this->rc->output->send('managesieve.vacation');
+ }
+
+ private function vacation_rule()
+ {
+ $this->vacation = array();
+
+ if (empty($this->active)) {
+ return;
+ }
+
+ $list = array();
+
+ // find (first) vacation rule
+ foreach ($this->script as $idx => $rule) {
+ if (empty($this->vacation) && !empty($rule['actions']) && $rule['actions'][0]['type'] == 'vacation') {
+ $this->vacation = array_merge($rule['actions'][0], array(
+ 'idx' => $idx,
+ 'disabled' => $rule['disabled'],
+ 'name' => $rule['name'],
+ 'tests' => $rule['tests'],
+ ));
+ }
+ else {
+ $list[$idx] = $rule['name'];
+ }
+ }
+
+ $this->vacation['list'] = $list;
+ }
+
+ private function vacation_post()
+ {
+ if (empty($_POST)) {
+ return;
+ }
+
+ $status = rcube_utils::get_input_value('vacation_status', rcube_utils::INPUT_POST);
+ $subject = rcube_utils::get_input_value('vacation_subject', rcube_utils::INPUT_POST, true);
+ $reason = rcube_utils::get_input_value('vacation_reason', rcube_utils::INPUT_POST, true);
+ $addresses = rcube_utils::get_input_value('vacation_addresses', rcube_utils::INPUT_POST, true);
+ $interval = rcube_utils::get_input_value('vacation_interval', rcube_utils::INPUT_POST);
+ $interval_type = rcube_utils::get_input_value('vacation_interval_type', rcube_utils::INPUT_POST);
+ $date_from = rcube_utils::get_input_value('vacation_datefrom', rcube_utils::INPUT_POST);
+ $date_to = rcube_utils::get_input_value('vacation_dateto', rcube_utils::INPUT_POST);
+ $after = rcube_utils::get_input_value('vacation_after', rcube_utils::INPUT_POST);
+
+ $interval_type = $interval_type == 'seconds' ? 'seconds' : 'days';
+ $vacation_action['type'] = 'vacation';
+ $vacation_action['reason'] = $this->strip_value(str_replace("\r\n", "\n", $reason));
+ $vacation_action['subject'] = $subject;
+ $vacation_action['addresses'] = $addresses;
+ $vacation_action[$interval_type] = $interval;
+ $vacation_tests = (array) $this->vacation['tests'];
+
+ foreach ((array) $vacation_action['addresses'] as $aidx => $address) {
+ $vacation_action['addresses'][$aidx] = $address = trim($address);
+
+ if (empty($address)) {
+ unset($vacation_action['addresses'][$aidx]);
+ }
+ else if (!rcube_utils::check_email($address)) {
+ $error = 'noemailwarning';
+ break;
+ }
+ }
+
+ if ($vacation_action['reason'] == '') {
+ $error = 'managesieve.cannotbeempty';
+ }
+ if ($vacation_action[$interval_type] && !preg_match('/^[0-9]+$/', $vacation_action[$interval_type])) {
+ $error = 'managesieve.forbiddenchars';
+ }
+
+ foreach (array('date_from', 'date_to') as $var) {
+ $date = $$var;
+
+ if ($date && ($dt = rcube_utils::anytodatetime($date))) {
+ $type = 'value-' . ($var == 'date_from' ? 'ge' : 'le');
+ $test = array(
+ 'test' => 'currentdate',
+ 'part' => 'date',
+ 'type' => $type,
+ 'arg' => $dt->format('Y-m-d'),
+ );
+
+ // find existing date rule
+ foreach ((array) $vacation_tests as $idx => $t) {
+ if ($t['test'] == 'currentdate' && $t['part'] == 'date' && $t['type'] == $type) {
+ $vacation_tests[$idx] = $test;
+ continue 2;
+ }
+ }
+
+ $vacation_tests[] = $test;
+ }
+ }
+
+ if (empty($vacation_tests)) {
+ $vacation_tests = $this->rc->config->get('managesieve_vacation_test', array(array('test' => 'true')));
+ }
+
+ // @TODO: handle situation when there's no active script
+
+ if (!$error) {
+ $rule = $this->vacation;
+ $rule['type'] = 'if';
+ $rule['name'] = $rule['name'] ?: $this->plugin->gettext('vacation');
+ $rule['disabled'] = $status == 'off';
+ $rule['actions'][0] = $vacation_action;
+ $rule['tests'] = $vacation_tests;
+ $rule['join'] = count($vacation_tests) > 1;
+
+ // reset original vacation rule
+ if (isset($this->vacation['idx'])) {
+ $this->script[$this->vacation['idx']] = null;
+ }
+
+ // re-order rules if needed
+ if (isset($after) && $after !== '') {
+ // add at target position
+ if ($after >= count($this->script) - 1) {
+ $this->script[] = $rule;
+ }
+ else {
+ $script = array();
+
+ foreach ($this->script as $idx => $r) {
+ if ($r) {
+ $script[] = $r;
+ }
+
+ if ($idx == $after) {
+ $script[] = $rule;
+ }
+ }
+
+ $this->script = $script;
+ }
+ }
+ else {
+ array_unshift($this->script, $rule);
+ }
+
+ $this->sieve->script->content = array_values(array_filter($this->script));
+
+ if ($this->save_script()) {
+ $this->rc->output->show_message('managesieve.vacationsaved', 'confirmation');
+ $this->rc->output->send();
+ }
+ }
+
+ $this->rc->output->show_message($error ? $error : 'managesieve.saveerror', 'error');
+ $this->rc->output->send();
+ }
+
+ /**
+ * Independent vacation form
+ */
+ public function vacation_form($attrib)
+ {
+ // check supported extensions
+ $date_extension = in_array('date', $this->exts);
+ $seconds_extension = in_array('vacation-seconds', $this->exts);
+
+ // build FORM tag
+ $form_id = !empty($attrib['id']) ? $attrib['id'] : 'form';
+ $out = $this->rc->output->request_form(array(
+ 'id' => $form_id,
+ 'name' => $form_id,
+ 'method' => 'post',
+ 'task' => 'settings',
+ 'action' => 'plugin.managesieve-vacation',
+ 'noclose' => true
+ ) + $attrib);
+
+ // form elements
+ $subject = new html_inputfield(array('name' => 'vacation_subject', 'size' => 50));
+ $reason = new html_textarea(array('name' => 'vacation_reason', 'cols' => 60, 'rows' => 8));
+ $interval = new html_inputfield(array('name' => 'vacation_interval', 'size' => 5));
+ $addresses = '<textarea name="vacation_addresses" data-type="list" data-size="30" style="display: none">'
+ . rcube::Q(implode("\n", (array) $this->vacation['addresses']), 'strict', false) . '</textarea>';
+ $status = new html_select(array('name' => 'vacation_status'));
+
+ $status->add($this->plugin->gettext('vacation.on'), 'on');
+ $status->add($this->plugin->gettext('vacation.off'), 'off');
+
+ if ($this->rc->config->get('managesieve_vacation') != 2 && count($this->vacation['list'])) {
+ $after = new html_select(array('name' => 'vacation_after'));
+
+ $after->add('', '');
+ foreach ($this->vacation['list'] as $idx => $rule) {
+ $after->add($rule, $idx);
+ }
+ }
+
+ $interval_txt = $interval->show(isset($this->vacation['seconds']) ? $this->vacation['seconds'] : $this->vacation['days']);
+ if ($seconds_extension) {
+ $interval_select = new html_select(array('name' => 'vacation_interval_type'));
+ $interval_select->add($this->plugin->gettext('days'), 'days');
+ $interval_select->add($this->plugin->gettext('seconds'), 'seconds');
+ $interval_txt .= '&nbsp;' . $interval_select->show(isset($this->vacation['seconds']) ? 'seconds' : 'days');
+ }
+ else {
+ $interval_txt .= '&nbsp;' . $this->plugin->gettext('days');
+ }
+
+ if ($date_extension) {
+ $date_from = new html_inputfield(array('name' => 'vacation_datefrom', 'class' => 'datepicker', 'size' => 12));
+ $date_to = new html_inputfield(array('name' => 'vacation_dateto', 'class' => 'datepicker', 'size' => 12));
+ $date_format = $this->rc->config->get('date_format', 'Y-m-d');
+
+ foreach ((array) $this->vacation['tests'] as $test) {
+ if ($test['test'] == 'currentdate' && $test['part'] == 'date') {
+ $date = $this->rc->format_date($test['arg'], $date_format, false);
+ $date_value[$test['type'] == 'value-ge' ? 'from' : 'to'] = $date;
+ }
+ }
+ }
+
+ // Message tab
+ $table = new html_table(array('cols' => 2));
+
+ $table->add('title', html::label('vacation_subject', $this->plugin->gettext('vacation.subject')));
+ $table->add(null, $subject->show($this->vacation['subject']));
+ $table->add('title', html::label('vacation_reason', $this->plugin->gettext('vacation.body')));
+ $table->add(null, $reason->show($this->vacation['reason']));
+
+ if ($date_extension) {
+ $table->add('title', html::label('vacation_datefrom', $this->plugin->gettext('vacation.dates')));
+ $table->add(null,
+ $this->plugin->gettext('vacation.from'). ' ' . $date_from->show($date_value['from'])
+ . ' ' . $this->plugin->gettext('vacation.to'). ' ' . $date_to->show($date_value['to'])
+ );
+ }
+
+ $table->add('title', html::label('vacation_status', $this->plugin->gettext('vacation.status')));
+ $table->add(null, $status->show($this->vacation['disabled'] ? 'off' : 'on'));
+
+ $out .= html::tag('fieldset', $class, html::tag('legend', null, $this->plugin->gettext('vacation.reply')) . $table->show($attrib));
+
+ // Advanced tab
+ $table = new html_table(array('cols' => 2));
+
+ $table->add('title', $this->plugin->gettext('vacation.addresses'));
+ $table->add(null, $addresses);
+ $table->add('title', $this->plugin->gettext('vacation.interval'));
+ $table->add(null, $interval_txt);
+ if ($after) {
+ $table->add('title', $this->plugin->gettext('vacation.after'));
+ $table->add(null, $after->show($this->vacation['idx'] - 1));
+ }
+
+ $out .= html::tag('fieldset', $class, html::tag('legend', null, $this->plugin->gettext('vacation.advanced')) . $table->show($attrib));
+
+ $out .= '</form>';
+
+ $this->rc->output->add_gui_object('sieveform', $form_id);
+
+ return $out;
+ }
+}
diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc
index cbe69dc9f..e732b4831 100644
--- a/plugins/managesieve/localization/en_US.inc
+++ b/plugins/managesieve/localization/en_US.inc
@@ -59,10 +59,10 @@ $labels['recipient'] = 'Recipient';
$labels['vacationaddr'] = 'My additional e-mail address(es):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
$labels['vacationreason'] = 'Message body (vacation reason):';
$labels['vacationsubject'] = 'Message subject:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
$labels['rulestop'] = 'Stop evaluating rules';
$labels['enable'] = 'Enable/Disable';
$labels['filterset'] = 'Filters set';
@@ -159,6 +159,21 @@ $labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
$labels['asciinumeric'] = 'numeric (ascii-numeric)';
$labels['index'] = 'index:';
$labels['indexlast'] = 'backwards';
+$labels['vacation'] = 'Vacation';
+$labels['vacation.reply'] = 'Reply message';
+$labels['vacation.advanced'] = 'Advanced settings';
+$labels['vacation.subject'] = 'Subject';
+$labels['vacation.body'] = 'Body';
+$labels['vacation.dates'] = 'Vacation time';
+$labels['vacation.from'] = 'From:';
+$labels['vacation.to'] = 'To:';
+$labels['vacation.status'] = 'Status';
+$labels['vacation.on'] = 'On';
+$labels['vacation.off'] = 'Off';
+$labels['vacation.addresses'] = 'My additional addresses';
+$labels['vacation.interval'] = 'Reply interval';
+$labels['vacation.after'] = 'Put vacation rule after';
+$labels['vacation.saving'] = 'Saving data...';
$messages = array();
$messages['filterunknownerror'] = 'Unknown server error.';
@@ -193,5 +208,7 @@ $messages['namereserved'] = 'Reserved name.';
$messages['setexist'] = 'Set already exists.';
$messages['nodata'] = 'At least one position must be selected!';
$messages['invaliddateformat'] = 'Invalid date or date part format';
+$messages['saveerror'] = 'Unable to save data. Server error occurred.';
+$messages['vacationsaved'] = 'Vacation data saved successfully.';
?>
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js
index 15637026e..7fcd9d9c6 100644
--- a/plugins/managesieve/managesieve.js
+++ b/plugins/managesieve/managesieve.js
@@ -50,6 +50,18 @@ if (window.rcmail) {
$('textarea[data-type="list"]', rcmail.gui_objects.sieveform).each(function() {
smart_field_init(this);
});
+
+ // enable date pickers on date fields
+ if ($.datepicker && rcmail.env.date_format) {
+ $.datepicker.setDefaults({
+ dateFormat: rcmail.env.date_format,
+ changeMonth: true,
+ showOtherMonths: true,
+ selectOtherMonths: true,
+ onSelect: function(dateText) { $(this).focus().val(dateText) }
+ });
+ $('input.datepicker').datepicker();
+ }
}
else {
rcmail.enable_command('plugin.managesieve-add', 'plugin.managesieve-setadd', !rcmail.env.sieveconnerror);
@@ -226,7 +238,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
// Delete filter row
case 'del':
- var i = 0, list = this.filters_list;
+ var id = o.id, list = this.filters_list;
list.remove_row(this.managesieve_rowid(o.id));
list.clear_selection();
@@ -241,8 +253,14 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
return;
}
- // modify ID and remove all attached events
- $(this).attr('id', 'rcmrow'+(i++)).unbind();
+ var rowid = this.id.substr(6);
+
+ // remove all attached events
+ $(this).unbind();
+
+ // update row id
+ if (rowid > id)
+ $(this).attr('id', 'rcmrow' + (rowid-1));
});
list.init();
@@ -437,6 +455,12 @@ rcube_webmail.prototype.managesieve_unfocus_filter = function(row)
// Form submition
rcube_webmail.prototype.managesieve_save = function()
{
+ if (this.env.action == 'plugin.managesieve-vacation') {
+ var data = $(this.gui_objects.sieveform).serialize();
+ this.http_post('plugin.managesieve-vacation', data, this.display_message(this.get_label('managesieve.vacation.saving'), 'loading'));
+ return;
+ }
+
if (parent.rcmail && parent.rcmail.filters_list && this.gui_objects.sieveform.name != 'filtersetform') {
var id = parent.rcmail.filters_list.get_single_selection();
if (id != null)
@@ -502,6 +526,11 @@ rcube_webmail.prototype.managesieve_actionfill = function(content, id, after)
row.setAttribute('id', 'actionrow'+id);
row.innerHTML = content;
+ // initialize smart list inputs
+ $('textarea[data-type="list"]', row).each(function() {
+ smart_field_init(this);
+ });
+
this.managesieve_formbuttons(div);
}
};
@@ -790,9 +819,17 @@ rcube_webmail.prototype.managesieve_tip_register = function(tips)
/********* Mail UI methods *********/
/*********************************************************/
-rcube_webmail.prototype.managesieve_create = function()
+rcube_webmail.prototype.managesieve_create = function(force)
{
- if (!rcmail.env.sieve_headers || !rcmail.env.sieve_headers.length)
+ if (!force && this.env.action != 'show' && !$('#'+this.env.contentframe).is(':visible')) {
+ var uid = this.message_list.get_single_selection(),
+ lock = this.set_busy(true, 'loading');
+
+ this.http_post('plugin.managesieve-action', {_uid: uid}, lock);
+ return;
+ }
+
+ if (!this.env.sieve_headers || !this.env.sieve_headers.length)
return;
var i, html, buttons = {}, dialog = $("#sievefilterform");
@@ -805,9 +842,9 @@ rcube_webmail.prototype.managesieve_create = function()
// build dialog window content
html = '<fieldset><legend>'+this.gettext('managesieve.usedata')+'</legend><ul>';
- for (i in rcmail.env.sieve_headers)
+ for (i in this.env.sieve_headers)
html += '<li><input type="checkbox" name="headers[]" id="sievehdr'+i+'" value="'+i+'" checked="checked" />'
- +'<label for="sievehdr'+i+'">'+rcmail.env.sieve_headers[i][0]+':</label> '+rcmail.env.sieve_headers[i][1]+'</li>';
+ +'<label for="sievehdr'+i+'">'+this.env.sieve_headers[i][0]+':</label> '+this.env.sieve_headers[i][1]+'</li>';
html += '</ul></fieldset>';
dialog.html(html);
diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index 7a7faee4c..aba34251c 100644
--- a/plugins/managesieve/managesieve.php
+++ b/plugins/managesieve/managesieve.php
@@ -42,6 +42,7 @@ class managesieve extends rcube_plugin
// register actions
$this->register_action('plugin.managesieve', array($this, 'managesieve_actions'));
$this->register_action('plugin.managesieve-action', array($this, 'managesieve_actions'));
+ $this->register_action('plugin.managesieve-vacation', array($this, 'managesieve_actions'));
$this->register_action('plugin.managesieve-save', array($this, 'managesieve_save'));
if ($this->rc->task == 'settings') {
@@ -69,8 +70,25 @@ class managesieve extends rcube_plugin
}
// load localization
- $this->add_texts('localization/', array('filters','managefilters'));
- $this->include_script('managesieve.js');
+ $this->add_texts('localization/');
+
+ if (strpos($this->rc->action, 'plugin.managesieve') === 0) {
+ $this->include_script('managesieve.js');
+ }
+
+ // include styles
+ $skin_path = $this->local_skin_path();
+ if ($this->rc->task == 'settings') {
+ if (is_file($this->home . "/$skin_path/managesieve.css")) {
+ $this->include_stylesheet("$skin_path/managesieve.css");
+ }
+ }
+ else {
+ if (is_file($this->home . "/$skin_path/managesieve_mail.css")) {
+ $this->include_stylesheet("$skin_path/managesieve_mail.css");
+ }
+ }
+
$this->ui_initialized = true;
}
@@ -80,8 +98,30 @@ class managesieve extends rcube_plugin
*/
function settings_actions($args)
{
- // register as settings action
- $args['actions'][] = array('action' => 'plugin.managesieve', 'class' => 'filter', 'label' => 'filters', 'domain' => 'managesieve');
+ $this->load_config();
+
+ $vacation_mode = (int) $this->rc->config->get('managesieve_vacation');
+
+ // register Filters action
+ if ($vacation_mode != 2) {
+ $args['actions'][] = array(
+ 'action' => 'plugin.managesieve',
+ 'class' => 'filter',
+ 'label' => 'filters',
+ 'domain' => 'managesieve',
+ );
+ }
+
+ // register Vacation action
+ if ($vacation_mode > 0) {
+ $args['actions'][] = array(
+ 'action' => 'plugin.managesieve-vacation',
+ 'class' => 'vacation',
+ 'label' => 'vacation',
+ 'domain' => 'managesieve',
+ );
+ }
+
return $args;
}
@@ -101,12 +141,6 @@ class managesieve extends rcube_plugin
// include js script and localization
$this->init_ui();
- // include styles
- $skin_path = $this->local_skin_path();
- if (is_file($this->home . "/$skin_path/managesieve_mail.css")) {
- $this->include_stylesheet("$skin_path/managesieve_mail.css");
- }
-
// add 'Create filter' item to message menu
$this->api->add_content(html::tag('li', null,
$this->api->output->button(array(
@@ -137,30 +171,12 @@ class managesieve extends rcube_plugin
$this->mail_headers_done = true;
- $headers = $args['headers'];
- $ret = array();
-
- if ($headers->subject)
- $ret[] = array('Subject', rcube_mime::decode_header($headers->subject));
-
- // @TODO: List-Id, others?
- foreach (array('From', 'To') as $h) {
- $hl = strtolower($h);
- if ($headers->$hl) {
- $list = rcube_mime::decode_address_list($headers->$hl);
- foreach ($list as $item) {
- if ($item['mailto']) {
- $ret[] = array($h, $item['mailto']);
- }
- }
- }
- }
+ $headers = $this->parse_headers($args['headers']);
if ($this->rc->action == 'preview')
- $this->rc->output->command('parent.set_env', array('sieve_headers' => $ret));
+ $this->rc->output->command('parent.set_env', array('sieve_headers' => $headers));
else
- $this->rc->output->set_env('sieve_headers', $ret);
-
+ $this->rc->output->set_env('sieve_headers', $headers);
return $args;
}
@@ -170,8 +186,22 @@ class managesieve extends rcube_plugin
*/
function managesieve_actions()
{
+ // handle fetching email headers for the new filter form
+ if ($uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GPC)) {
+ $mailbox = $this->rc->get_storage()->get_folder();
+ $message = new rcube_message($uid, $mailbox);
+ $headers = $this->parse_headers($message->headers);
+
+ $this->rc->output->set_env('sieve_headers', $headers);
+ $this->rc->output->command('managesieve_create', true);
+ $this->rc->output->send();
+ }
+
+ // handle other actions
+ $engine_type = $this->rc->action == 'plugin.managesieve-vacation' ? 'vacation' : '';
+ $engine = $this->get_engine($engine_type);
+
$this->init_ui();
- $engine = $this->get_engine();
$engine->actions();
}
@@ -195,7 +225,7 @@ class managesieve extends rcube_plugin
/**
* Initializes engine object
*/
- private function get_engine()
+ private function get_engine($type = null)
{
if (!$this->engine) {
$this->load_config();
@@ -205,9 +235,36 @@ class managesieve extends rcube_plugin
$include_path .= ini_get('include_path');
set_include_path($include_path);
- $this->engine = new rcube_sieve_engine($this);
+ $class_name = 'rcube_sieve_' . ($type ? $type : 'engine');
+ $this->engine = new $class_name($this);
}
return $this->engine;
}
+
+ /**
+ * Extract mail headers for new filter form
+ */
+ private function parse_headers($headers)
+ {
+ $result = array();
+
+ if ($headers->subject)
+ $result[] = array('Subject', rcube_mime::decode_header($headers->subject));
+
+ // @TODO: List-Id, others?
+ foreach (array('From', 'To') as $h) {
+ $hl = strtolower($h);
+ if ($headers->$hl) {
+ $list = rcube_mime::decode_address_list($headers->$hl);
+ foreach ($list as $item) {
+ if ($item['mailto']) {
+ $result[] = array($h, $item['mailto']);
+ }
+ }
+ }
+ }
+
+ return $result;
+ }
}
diff --git a/plugins/managesieve/package.xml b/plugins/managesieve/package.xml
index 6ae53c250..f4c4bb941 100644
--- a/plugins/managesieve/package.xml
+++ b/plugins/managesieve/package.xml
@@ -17,9 +17,9 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2013-09-09</date>
+ <date>2014-02-14</date>
<version>
- <release>7.0</release>
+ <release>7.2</release>
<api>7.0</api>
</version>
<stability>
diff --git a/plugins/managesieve/skins/classic/managesieve.css b/plugins/managesieve/skins/classic/managesieve.css
index 59d88cb46..836e16d5a 100644
--- a/plugins/managesieve/skins/classic/managesieve.css
+++ b/plugins/managesieve/skins/classic/managesieve.css
@@ -115,7 +115,7 @@ body.iframe
padding: 20px 10px 10px 10px;
}
-legend, label
+#filter-form legend, #filter-form label
{
color: #666666;
}
@@ -410,3 +410,21 @@ body.iframe.mail #filter-form
{
padding: 10px 5px 5px 5px;
}
+
+#vacationform .listarea {
+ max-height: 75px;
+}
+
+#vacationform .listelement,
+#vacationform .listelement .reset {
+ height: 18px;
+}
+
+#vacationform .listelement .reset {
+ background-position: -1px 1px;
+}
+
+#vacationform .listelement input {
+ vertical-align: top;
+ border: 0;
+}
diff --git a/plugins/managesieve/skins/classic/templates/filteredit.html b/plugins/managesieve/skins/classic/templates/filteredit.html
index 6ecb03cae..8cef81682 100644
--- a/plugins/managesieve/skins/classic/templates/filteredit.html
+++ b/plugins/managesieve/skins/classic/templates/filteredit.html
@@ -3,7 +3,6 @@
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
-<link rel="stylesheet" type="text/css" href="/this/managesieve.css" />
</head>
<body class="iframe<roundcube:exp expression="env:task != 'mail' ? '' : ' mail'" />">
diff --git a/plugins/managesieve/skins/classic/templates/managesieve.html b/plugins/managesieve/skins/classic/templates/managesieve.html
index 3d84466d8..5ed099419 100644
--- a/plugins/managesieve/skins/classic/templates/managesieve.html
+++ b/plugins/managesieve/skins/classic/templates/managesieve.html
@@ -3,7 +3,6 @@
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
-<link rel="stylesheet" type="text/css" href="/this/managesieve.css" />
<script type="text/javascript" src="/functions.js"></script>
<script type="text/javascript" src="/splitter.js"></script>
diff --git a/plugins/managesieve/skins/classic/templates/setedit.html b/plugins/managesieve/skins/classic/templates/setedit.html
index 26f7fece6..c1010cae6 100644
--- a/plugins/managesieve/skins/classic/templates/setedit.html
+++ b/plugins/managesieve/skins/classic/templates/setedit.html
@@ -3,7 +3,6 @@
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
-<link rel="stylesheet" type="text/css" href="/this/managesieve.css" />
</head>
<body class="iframe">
diff --git a/plugins/managesieve/skins/classic/templates/vacation.html b/plugins/managesieve/skins/classic/templates/vacation.html
new file mode 100644
index 000000000..bf94edb20
--- /dev/null
+++ b/plugins/managesieve/skins/classic/templates/vacation.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+<script type="text/javascript" src="/functions.js"></script>
+</head>
+<body>
+
+<roundcube:include file="/includes/taskbar.html" />
+<roundcube:include file="/includes/header.html" />
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="mainscreen">
+ <div class="box" style="height: 100%; overflow: auto">
+ <div id="prefs-title" class="boxtitle"><roundcube:label name="managesieve.vacation" /></div>
+ <roundcube:object name="vacationform" id="vacationform" style="margin: 10px 10px 0 10px" />
+ <div id="formfooter" style="padding: 0 10px">
+ <div class="footerleft">
+ <roundcube:button command="save" type="input" class="button mainaction" label="save" />
+ </div>
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
+</body>
+</html>
diff --git a/plugins/managesieve/skins/larry/images/vacation_icons.png b/plugins/managesieve/skins/larry/images/vacation_icons.png
new file mode 100644
index 000000000..f8933d487
--- /dev/null
+++ b/plugins/managesieve/skins/larry/images/vacation_icons.png
Binary files differ
diff --git a/plugins/managesieve/skins/larry/managesieve.css b/plugins/managesieve/skins/larry/managesieve.css
index 2144fe13f..1f954caf2 100644
--- a/plugins/managesieve/skins/larry/managesieve.css
+++ b/plugins/managesieve/skins/larry/managesieve.css
@@ -89,7 +89,7 @@ body.iframe
padding: 20px 10px 10px 10px;
}
-legend, label
+#filter-form legend, #filter-form label
{
color: #666666;
}
@@ -124,7 +124,7 @@ div.rulerow table, div.actionrow table
min-width: 600px;
}
-td
+#filter-form td
{
vertical-align: top;
}
@@ -414,3 +414,41 @@ body.iframe.mail #filter-form
{
padding: 10px 5px 5px 5px;
}
+
+
+/* vacation form */
+#settings-sections span.vacation a {
+ background: url(images/vacation_icons.png) no-repeat 7px 1px;
+}
+
+#settings-sections span.vacation.selected a {
+ background-position: 7px -23px;
+}
+
+#managesieve-vacation {
+ position: absolute;
+ top: 0;
+ left: 212px;
+ right: 0;
+ bottom: 0;
+ overflow: auto;
+}
+
+#vacationform .listarea {
+ max-height: 91px;
+}
+
+#vacationform .listelement,
+#vacationform .listelement .reset {
+ height: 22px;
+}
+
+#vacationform .listelement .reset {
+ background-position: -1px 3px;
+}
+
+#vacationform .listelement input {
+ vertical-align: top;
+ border: 0;
+ box-shadow: none;
+}
diff --git a/plugins/managesieve/skins/larry/templates/filteredit.html b/plugins/managesieve/skins/larry/templates/filteredit.html
index 602816af7..1933b58ae 100644
--- a/plugins/managesieve/skins/larry/templates/filteredit.html
+++ b/plugins/managesieve/skins/larry/templates/filteredit.html
@@ -3,7 +3,6 @@
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
-<link rel="stylesheet" type="text/css" href="/this/managesieve.css" />
</head>
<body class="iframe<roundcube:exp expression="env:task != 'mail' ? ' floatingbuttons' : ' mail'" />">
diff --git a/plugins/managesieve/skins/larry/templates/managesieve.html b/plugins/managesieve/skins/larry/templates/managesieve.html
index 6ef3b2d91..471bbf4d2 100644
--- a/plugins/managesieve/skins/larry/templates/managesieve.html
+++ b/plugins/managesieve/skins/larry/templates/managesieve.html
@@ -3,7 +3,6 @@
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
-<link rel="stylesheet" type="text/css" href="/this/managesieve.css" />
</head>
<body class="noscroll">
diff --git a/plugins/managesieve/skins/larry/templates/setedit.html b/plugins/managesieve/skins/larry/templates/setedit.html
index 9fc115dc7..3b8f98b36 100644
--- a/plugins/managesieve/skins/larry/templates/setedit.html
+++ b/plugins/managesieve/skins/larry/templates/setedit.html
@@ -3,7 +3,6 @@
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
-<link rel="stylesheet" type="text/css" href="/this/managesieve.css" />
</head>
<body class="iframe floatingbuttons">
diff --git a/plugins/managesieve/skins/larry/templates/vacation.html b/plugins/managesieve/skins/larry/templates/vacation.html
new file mode 100644
index 000000000..c91eb87c8
--- /dev/null
+++ b/plugins/managesieve/skins/larry/templates/vacation.html
@@ -0,0 +1,30 @@
+<roundcube:object name="doctype" value="html5" />
+<html>
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+</head>
+<body class="noscroll">
+
+<roundcube:include file="/includes/header.html" />
+
+<div id="mainscreen" class="offset">
+
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="managesieve-vacation" class="uibox contentbox">
+ <div>
+ <h2 class="boxtitle"><roundcube:label name="managesieve.vacation" /></h2>
+ <roundcube:object name="vacationform" id="vacationform" class="propform boxcontent tabbed" />
+ </div>
+ <div class="footerleft formbuttons">
+ <roundcube:button command="plugin.managesieve-save" type="input" class="button mainaction" label="save" />
+ </div>
+</div>
+
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+</body>
+</html>
diff --git a/plugins/password/drivers/dbmail.php b/plugins/password/drivers/dbmail.php
index 529027b8d..5cfe92cd7 100644
--- a/plugins/password/drivers/dbmail.php
+++ b/plugins/password/drivers/dbmail.php
@@ -17,7 +17,7 @@
class rcube_dbmail_password
{
- function password_save($currpass, $newpass)
+ function save($currpass, $newpass)
{
$curdir = RCUBE_PLUGINS_DIR . 'password/helpers';
$username = escapeshellcmd($_SESSION['username']);
diff --git a/plugins/password/drivers/domainfactory.php b/plugins/password/drivers/domainfactory.php
index 4dbf4b799..62d9bfce2 100644
--- a/plugins/password/drivers/domainfactory.php
+++ b/plugins/password/drivers/domainfactory.php
@@ -51,7 +51,7 @@ class rcube_domainfactory_password
// change password
$ch = curl_copy_handle($ch);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
if ($result = curl_exec($ch)) {
// has the password been changed?
diff --git a/plugins/password/helpers/chgdbmailusers.c b/plugins/password/helpers/chgdbmailusers.c
index 28f79c100..22793857d 100644
--- a/plugins/password/helpers/chgdbmailusers.c
+++ b/plugins/password/helpers/chgdbmailusers.c
@@ -5,7 +5,6 @@
// set the UID this script will run as (root user)
#define UID 0
#define CMD "/usr/sbin/dbmail-users"
-#define RCOK 0x100
/* INSTALLING:
gcc -o chgdbmailusers chgdbmailusers.c
@@ -38,7 +37,7 @@ main(int argc, char *argv[])
cc = setuid(UID);
rc = system(cmnd);
- if ((rc != RCOK) || (cc != 0))
+ if ((rc != 0) || (cc != 0))
{
fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc);
return 1;
diff --git a/plugins/password/password.php b/plugins/password/password.php
index e31613ab1..83f951b98 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -70,9 +70,14 @@ class password extends rcube_plugin
}
$this->add_hook('settings_actions', array($this, 'settings_actions'));
+
$this->register_action('plugin.password', array($this, 'password_init'));
$this->register_action('plugin.password-save', array($this, 'password_save'));
- $this->include_script('password.js');
+
+
+ if (strpos($rcmail->action, 'plugin.password') === 0) {
+ $this->include_script('password.js');
+ }
}
function settings_actions($args)