summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/acl/acl.php56
-rw-r--r--plugins/acl/config.inc.php.dist16
-rw-r--r--plugins/acl/localization/az_AZ.inc2
-rw-r--r--plugins/acl/localization/be_BE.inc90
-rw-r--r--plugins/acl/localization/bg_BG.inc90
-rw-r--r--plugins/acl/localization/el_GR.inc90
-rw-r--r--plugins/acl/localization/en_US.inc4
-rw-r--r--plugins/acl/localization/es_AR.inc89
-rw-r--r--plugins/acl/localization/et_EE.inc6
-rw-r--r--plugins/acl/localization/eu_ES.inc90
-rw-r--r--plugins/acl/localization/fa_IR.inc28
-rw-r--r--plugins/acl/localization/fi_FI.inc28
-rw-r--r--plugins/acl/localization/gl_ES.inc64
-rw-r--r--plugins/acl/localization/he_IL.inc2
-rw-r--r--plugins/acl/localization/lb_LU.inc30
-rw-r--r--plugins/acl/localization/lt_LT.inc2
-rw-r--r--plugins/acl/localization/lv_LV.inc90
-rw-r--r--plugins/acl/localization/pl_PL.inc2
-rw-r--r--plugins/acl/localization/ro_RO.inc24
-rw-r--r--plugins/acl/localization/th_TH.inc50
-rw-r--r--plugins/acl/localization/ti.inc67
-rw-r--r--plugins/acl/localization/tr_TR.inc2
-rw-r--r--plugins/acl/package.xml2
-rw-r--r--plugins/acl/skins/classic/acl.css4
-rw-r--r--plugins/acl/skins/larry/acl.css24
-rw-r--r--plugins/additional_message_headers/additional_message_headers.php4
-rw-r--r--plugins/additional_message_headers/config.inc.php.dist10
-rw-r--r--plugins/archive/archive.js31
-rw-r--r--plugins/archive/archive.php146
-rw-r--r--plugins/archive/localization/ar.inc18
-rw-r--r--plugins/archive/localization/ast.inc31
-rw-r--r--plugins/archive/localization/bn_BD.inc18
-rw-r--r--plugins/archive/localization/en_US.inc11
-rw-r--r--plugins/archive/localization/eu_ES.inc31
-rw-r--r--plugins/archive/localization/fa_AF.inc26
-rw-r--r--plugins/archive/localization/fa_IR.inc6
-rw-r--r--plugins/archive/localization/fi_FI.inc18
-rw-r--r--plugins/archive/localization/fr_FR.inc6
-rw-r--r--plugins/archive/localization/hi_IN.inc18
-rw-r--r--plugins/archive/localization/ia.inc18
-rw-r--r--plugins/archive/localization/lb_LU.inc3
-rw-r--r--plugins/archive/localization/lv_LV.inc22
-rw-r--r--plugins/archive/localization/mn_MN.inc18
-rw-r--r--plugins/archive/localization/ms_MY.inc18
-rw-r--r--plugins/archive/localization/my_MM.inc18
-rw-r--r--plugins/archive/localization/nb_NB.inc21
-rw-r--r--plugins/archive/localization/nb_NO.inc2
-rw-r--r--plugins/archive/localization/nl_BE.inc18
-rw-r--r--plugins/archive/localization/nn_NO.inc2
-rw-r--r--plugins/archive/localization/nqo.inc18
-rw-r--r--plugins/archive/localization/om.inc18
-rw-r--r--plugins/archive/localization/pt_BR.inc18
-rw-r--r--plugins/archive/localization/ro_RO.inc6
-rw-r--r--plugins/archive/localization/te_IN.inc18
-rw-r--r--plugins/archive/localization/th_TH.inc18
-rw-r--r--plugins/archive/localization/ti.inc18
-rw-r--r--plugins/archive/localization/tzm.inc18
-rw-r--r--plugins/archive/localization/ur_PK.inc18
-rw-r--r--plugins/archive/localization/zh_CN.inc20
-rw-r--r--plugins/archive/package.xml42
-rw-r--r--plugins/attachment_reminder/localization/ar.inc20
-rw-r--r--plugins/attachment_reminder/localization/ar_SA.inc20
-rw-r--r--plugins/attachment_reminder/localization/az_AZ.inc20
-rw-r--r--plugins/attachment_reminder/localization/be_BE.inc20
-rw-r--r--plugins/attachment_reminder/localization/bg_BG.inc20
-rw-r--r--plugins/attachment_reminder/localization/bn_BD.inc20
-rw-r--r--plugins/attachment_reminder/localization/bs_BA.inc20
-rw-r--r--plugins/attachment_reminder/localization/ca_ES.inc20
-rw-r--r--plugins/attachment_reminder/localization/cs_CZ.inc20
-rw-r--r--plugins/attachment_reminder/localization/cy_GB.inc20
-rw-r--r--plugins/attachment_reminder/localization/da_DK.inc20
-rw-r--r--plugins/attachment_reminder/localization/de_CH.inc2
-rw-r--r--plugins/attachment_reminder/localization/de_DE.inc18
-rw-r--r--plugins/attachment_reminder/localization/el_GR.inc20
-rw-r--r--plugins/attachment_reminder/localization/eo.inc20
-rw-r--r--plugins/attachment_reminder/localization/es_AR.inc20
-rw-r--r--plugins/attachment_reminder/localization/es_ES.inc18
-rw-r--r--plugins/attachment_reminder/localization/et_EE.inc20
-rw-r--r--plugins/attachment_reminder/localization/eu_ES.inc20
-rw-r--r--plugins/attachment_reminder/localization/fa_AF.inc20
-rw-r--r--plugins/attachment_reminder/localization/fa_IR.inc20
-rw-r--r--plugins/attachment_reminder/localization/fi_FI.inc20
-rw-r--r--plugins/attachment_reminder/localization/fr_FR.inc18
-rw-r--r--plugins/attachment_reminder/localization/gl_ES.inc20
-rw-r--r--plugins/attachment_reminder/localization/he_IL.inc20
-rw-r--r--plugins/attachment_reminder/localization/hi_IN.inc20
-rw-r--r--plugins/attachment_reminder/localization/hu_HU.inc20
-rw-r--r--plugins/attachment_reminder/localization/hy_AM.inc20
-rw-r--r--plugins/attachment_reminder/localization/ia.inc20
-rw-r--r--plugins/attachment_reminder/localization/id_ID.inc20
-rw-r--r--plugins/attachment_reminder/localization/it_IT.inc18
-rw-r--r--plugins/attachment_reminder/localization/ja_JP.inc20
-rw-r--r--plugins/attachment_reminder/localization/ko_KR.inc20
-rw-r--r--plugins/attachment_reminder/localization/lb_LU.inc2
-rw-r--r--plugins/attachment_reminder/localization/lt_LT.inc20
-rw-r--r--plugins/attachment_reminder/localization/lv_LV.inc20
-rw-r--r--plugins/attachment_reminder/localization/ml_IN.inc20
-rw-r--r--plugins/attachment_reminder/localization/mn_MN.inc20
-rw-r--r--plugins/attachment_reminder/localization/ms_MY.inc20
-rw-r--r--plugins/attachment_reminder/localization/my_MM.inc20
-rw-r--r--plugins/attachment_reminder/localization/nb_NO.inc20
-rw-r--r--plugins/attachment_reminder/localization/nl_BE.inc20
-rw-r--r--plugins/attachment_reminder/localization/nl_NL.inc22
-rw-r--r--plugins/attachment_reminder/localization/nn_NO.inc20
-rw-r--r--plugins/attachment_reminder/localization/nqo.inc20
-rw-r--r--plugins/attachment_reminder/localization/om.inc20
-rw-r--r--plugins/attachment_reminder/localization/pl_PL.inc16
-rw-r--r--plugins/attachment_reminder/localization/pt_BR.inc20
-rw-r--r--plugins/attachment_reminder/localization/pt_PT.inc20
-rw-r--r--plugins/attachment_reminder/localization/ro_RO.inc20
-rw-r--r--plugins/attachment_reminder/localization/ru_RU.inc20
-rw-r--r--plugins/attachment_reminder/localization/sk_SK.inc20
-rw-r--r--plugins/attachment_reminder/localization/sl_SI.inc20
-rw-r--r--plugins/attachment_reminder/localization/sr_CS.inc20
-rw-r--r--plugins/attachment_reminder/localization/sv_SE.inc20
-rw-r--r--plugins/attachment_reminder/localization/te_IN.inc20
-rw-r--r--plugins/attachment_reminder/localization/th_TH.inc20
-rw-r--r--plugins/attachment_reminder/localization/ti.inc20
-rw-r--r--plugins/attachment_reminder/localization/tr_TR.inc20
-rw-r--r--plugins/attachment_reminder/localization/tzm.inc20
-rw-r--r--plugins/attachment_reminder/localization/uk_UA.inc20
-rw-r--r--plugins/attachment_reminder/localization/ur_PK.inc20
-rw-r--r--plugins/attachment_reminder/localization/vi_VN.inc20
-rw-r--r--plugins/attachment_reminder/localization/zh_CN.inc22
-rw-r--r--plugins/attachment_reminder/localization/zh_TW.inc18
-rw-r--r--plugins/autologon/autologon.php4
-rw-r--r--plugins/compose_addressbook/compose_addressbook.js224
-rw-r--r--plugins/compose_addressbook/compose_addressbook.php180
-rw-r--r--plugins/compose_addressbook/config.inc.php.dist21
-rw-r--r--plugins/compose_addressbook/localization/de_DE.inc11
-rw-r--r--plugins/compose_addressbook/localization/en_GB.inc10
-rw-r--r--plugins/compose_addressbook/localization/en_US.inc10
-rw-r--r--plugins/compose_addressbook/localization/es_ES.inc10
-rw-r--r--plugins/compose_addressbook/localization/fr_FR.inc10
-rw-r--r--plugins/compose_addressbook/localization/it_IT.inc10
-rw-r--r--plugins/compose_addressbook/localization/nl_NL.inc10
-rw-r--r--plugins/compose_addressbook/localization/pl_PL.inc10
-rw-r--r--plugins/compose_addressbook/localization/sv_SE.inc10
-rw-r--r--plugins/compose_addressbook/localization/zh_TW.inc10
-rw-r--r--plugins/compose_addressbook/package.xml18
-rw-r--r--plugins/compose_addressbook/skins/classic/compose_addressbook.css83
-rw-r--r--plugins/compose_addressbook/skins/classic/compose_addressbook.pngbin0 -> 4142 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/searchfield.gifbin0 -> 397 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-anim_basic_16x16.gifbin0 -> 1553 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.pngbin0 -> 180 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_75_ffffff_40x100.pngbin0 -> 178 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.pngbin0 -> 120 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_65_ffffff_1x400.pngbin0 -> 105 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_dadada_1x400.pngbin0 -> 111 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.pngbin0 -> 110 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_95_fef1ec_1x400.pngbin0 -> 119 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.pngbin0 -> 101 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_222222_256x240.pngbin0 -> 4369 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_2e83ff_256x240.pngbin0 -> 4369 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_454545_256x240.pngbin0 -> 4369 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_888888_256x240.pngbin0 -> 4369 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_cd0a0a_256x240.pngbin0 -> 4369 bytes
-rw-r--r--plugins/compose_addressbook/skins/classic/smoothness/jquery-ui-1.8.2.custom.css345
-rw-r--r--plugins/contextmenu/contextmenu.js595
-rw-r--r--plugins/contextmenu/contextmenu.php315
-rw-r--r--plugins/contextmenu/jquery.contextMenu.js21
l---------plugins/contextmenu/jquery.mousewheel.js1
-rw-r--r--plugins/contextmenu/localization/ca_ES.inc12
-rw-r--r--plugins/contextmenu/localization/cs_CZ.inc12
-rw-r--r--plugins/contextmenu/localization/da_DK.inc12
-rw-r--r--plugins/contextmenu/localization/de_CH.inc12
-rw-r--r--plugins/contextmenu/localization/de_DE.inc12
-rw-r--r--plugins/contextmenu/localization/en_GB.inc12
-rw-r--r--plugins/contextmenu/localization/en_US.inc12
-rw-r--r--plugins/contextmenu/localization/es_ES.inc12
-rw-r--r--plugins/contextmenu/localization/fr_FR.inc12
-rw-r--r--plugins/contextmenu/localization/gl_ES.inc12
-rw-r--r--plugins/contextmenu/localization/hu_HU.inc12
-rw-r--r--plugins/contextmenu/localization/it_IT.inc12
-rw-r--r--plugins/contextmenu/localization/nl_NL.inc12
-rw-r--r--plugins/contextmenu/localization/pl_PL.inc12
-rw-r--r--plugins/contextmenu/localization/pt_BR.inc12
-rw-r--r--plugins/contextmenu/localization/ro_RO.inc12
-rw-r--r--plugins/contextmenu/localization/ru_RU.inc12
-rw-r--r--plugins/contextmenu/localization/sv_SE.inc12
-rw-r--r--plugins/contextmenu/localization/tr_TR.inc12
-rw-r--r--plugins/contextmenu/localization/uk_UA.inc12
-rw-r--r--plugins/contextmenu/localization/zh_TW.inc12
-rw-r--r--plugins/contextmenu/package.xml90
-rw-r--r--plugins/contextmenu/skins/classic/contexticons.gifbin0 -> 2238 bytes
-rw-r--r--plugins/contextmenu/skins/classic/contexticons.pngbin0 -> 4261 bytes
-rw-r--r--plugins/contextmenu/skins/classic/contextmenu.css357
-rw-r--r--plugins/contextmenu/skins/classic/folders.gifbin0 -> 2430 bytes
-rw-r--r--plugins/contextmenu/skins/classic/folders.pngbin0 -> 4771 bytes
-rw-r--r--plugins/contextmenu/skins/classic/ie6hacks.css54
-rw-r--r--plugins/contextmenu/skins/classic/messageactions.gifbin0 -> 1567 bytes
-rw-r--r--plugins/contextmenu/skins/classic/messageactions.pngbin0 -> 2578 bytes
-rw-r--r--plugins/contextmenu/skins/larry/contexticons.pngbin0 -> 5728 bytes
-rw-r--r--plugins/contextmenu/skins/larry/contextmenu.css425
-rw-r--r--plugins/contextmenu/skins/larry/folders.pngbin0 -> 3901 bytes
-rw-r--r--plugins/contextmenu/skins/larry/ie6hacks.css3
-rw-r--r--plugins/contextmenu/skins/larry/messageactions.pngbin0 -> 1698 bytes
-rw-r--r--plugins/copymessage/copymessage.js40
-rw-r--r--plugins/copymessage/copymessage.php114
-rw-r--r--plugins/copymessage/localization/ca_ES.inc9
-rw-r--r--plugins/copymessage/localization/cs_CZ.inc9
-rw-r--r--plugins/copymessage/localization/da_DK.inc9
-rw-r--r--plugins/copymessage/localization/de_CH.inc9
-rw-r--r--plugins/copymessage/localization/de_DE.inc9
-rw-r--r--plugins/copymessage/localization/en_GB.inc9
-rw-r--r--plugins/copymessage/localization/en_US.inc9
-rw-r--r--plugins/copymessage/localization/es_ES.inc9
-rw-r--r--plugins/copymessage/localization/fr_FR.inc9
-rw-r--r--plugins/copymessage/localization/gl_ES.inc9
-rw-r--r--plugins/copymessage/localization/hu_HU.inc9
-rw-r--r--plugins/copymessage/localization/it_IT.inc9
-rw-r--r--plugins/copymessage/localization/nl_NL.inc9
-rw-r--r--plugins/copymessage/localization/pl_PL.inc9
-rw-r--r--plugins/copymessage/localization/pt_BR.inc9
-rw-r--r--plugins/copymessage/localization/ro_RO.inc9
-rw-r--r--plugins/copymessage/localization/ru_RU.inc9
-rw-r--r--plugins/copymessage/localization/sv_SE.inc9
-rw-r--r--plugins/copymessage/localization/tr_TR.inc9
-rw-r--r--plugins/copymessage/package.xml78
-rw-r--r--plugins/database_attachments/database_attachments.php126
-rw-r--r--plugins/database_attachments/package.xml6
-rw-r--r--plugins/debug_logger/debug_logger.php10
-rw-r--r--plugins/debug_logger/runlog/runlog.php2
-rw-r--r--plugins/dkimstatus/dkimstatus.php155
-rw-r--r--plugins/dkimstatus/images/authorsign.pngbin0 -> 699 bytes
-rw-r--r--plugins/dkimstatus/images/invalidsig.pngbin0 -> 618 bytes
-rw-r--r--plugins/dkimstatus/images/nosiginfo.pngbin0 -> 707 bytes
-rw-r--r--plugins/dkimstatus/images/thirdpty.pngbin0 -> 722 bytes
-rw-r--r--plugins/dkimstatus/localization/cs_CZ.inc16
-rw-r--r--plugins/dkimstatus/localization/de_DE.inc8
-rw-r--r--plugins/dkimstatus/localization/en_US.inc9
-rw-r--r--plugins/dkimstatus/localization/es_ES.inc9
-rw-r--r--plugins/dkimstatus/localization/fr_FR.inc10
-rw-r--r--plugins/dkimstatus/localization/it_IT.inc7
-rw-r--r--plugins/dkimstatus/localization/ja_JP.inc9
-rw-r--r--plugins/dkimstatus/localization/pl_PL.inc9
-rw-r--r--plugins/dkimstatus/localization/ro_RO.inc9
-rw-r--r--plugins/dovecot_impersonate/config.inc.php.dist10
-rw-r--r--plugins/dovecot_impersonate/dovecot_impersonate.php52
-rw-r--r--plugins/dovecot_impersonate/package.xml18
-rw-r--r--plugins/enigma/README35
-rw-r--r--plugins/enigma/config.inc.php.dist14
-rw-r--r--plugins/enigma/enigma.js206
-rw-r--r--plugins/enigma/enigma.php476
-rw-r--r--plugins/enigma/home/.htaccess2
-rw-r--r--plugins/enigma/home/aldric/pubring.gpg0
-rw-r--r--plugins/enigma/home/aldric/secring.gpg0
-rw-r--r--plugins/enigma/home/aldric/trustdb.gpgbin0 -> 40 bytes
-rw-r--r--plugins/enigma/home/hugues/pubring.gpgbin0 -> 133165 bytes
-rw-r--r--plugins/enigma/home/hugues/secring.gpgbin0 -> 1350 bytes
-rw-r--r--plugins/enigma/home/hugues/trustdb.gpgbin0 -> 1200 bytes
-rw-r--r--plugins/enigma/lib/Crypt/GPG.php2542
-rw-r--r--plugins/enigma/lib/Crypt/GPG/DecryptStatusHandler.php336
-rw-r--r--plugins/enigma/lib/Crypt/GPG/Engine.php1758
-rw-r--r--plugins/enigma/lib/Crypt/GPG/Exceptions.php473
-rw-r--r--plugins/enigma/lib/Crypt/GPG/Key.php223
-rw-r--r--plugins/enigma/lib/Crypt/GPG/Signature.php428
-rw-r--r--plugins/enigma/lib/Crypt/GPG/SubKey.php649
-rw-r--r--plugins/enigma/lib/Crypt/GPG/UserId.php373
-rw-r--r--plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php216
-rw-r--r--plugins/enigma/lib/enigma_driver.php106
-rw-r--r--plugins/enigma/lib/enigma_driver_gnupg.php305
-rw-r--r--plugins/enigma/lib/enigma_engine.php533
-rw-r--r--plugins/enigma/lib/enigma_error.php62
-rw-r--r--plugins/enigma/lib/enigma_key.php129
-rw-r--r--plugins/enigma/lib/enigma_signature.php34
-rw-r--r--plugins/enigma/lib/enigma_subkey.php57
-rw-r--r--plugins/enigma/lib/enigma_ui.php455
-rw-r--r--plugins/enigma/lib/enigma_userid.php31
-rw-r--r--plugins/enigma/localization/en_US.inc53
-rw-r--r--plugins/enigma/localization/ja_JP.inc55
-rw-r--r--plugins/enigma/localization/ru_RU.inc65
-rw-r--r--plugins/enigma/skins/classic/enigma.css182
-rw-r--r--plugins/enigma/skins/classic/enigma.pngbin1592 -> 0 bytes
-rw-r--r--plugins/enigma/skins/classic/enigma_error.pngbin1960 -> 0 bytes
-rw-r--r--plugins/enigma/skins/classic/key.pngbin1743 -> 0 bytes
-rw-r--r--plugins/enigma/skins/classic/key_add.pngbin1967 -> 0 bytes
-rw-r--r--plugins/enigma/skins/classic/keys_toolbar.pngbin14977 -> 0 bytes
-rw-r--r--plugins/enigma/skins/classic/templates/keyimport.html20
-rw-r--r--plugins/enigma/skins/classic/templates/keyinfo.html17
-rw-r--r--plugins/enigma/skins/classic/templates/keys.html80
-rw-r--r--plugins/enigma/tests/Enigma.php23
-rw-r--r--plugins/fail2ban/fail2ban.php33
-rw-r--r--plugins/filesystem_attachments/filesystem_attachments.php1
-rw-r--r--plugins/filesystem_attachments/package.xml2
-rw-r--r--plugins/help/config.inc.php.dist34
-rw-r--r--plugins/help/content/about.html27
-rw-r--r--plugins/help/content/license.html2
-rw-r--r--plugins/help/help.php69
-rw-r--r--plugins/help/localization/ar.inc18
-rw-r--r--plugins/help/localization/ast.inc21
-rw-r--r--plugins/help/localization/be_BE.inc21
-rw-r--r--plugins/help/localization/bg_BG.inc21
-rw-r--r--plugins/help/localization/bn_BD.inc18
-rw-r--r--plugins/help/localization/el_GR.inc21
-rw-r--r--plugins/help/localization/en_US.inc4
-rw-r--r--plugins/help/localization/es_AR.inc21
-rw-r--r--plugins/help/localization/eu_ES.inc21
-rw-r--r--plugins/help/localization/fa_AF.inc21
-rw-r--r--plugins/help/localization/gl_ES.inc2
-rw-r--r--plugins/help/localization/hi_IN.inc18
-rw-r--r--plugins/help/localization/ia.inc18
-rw-r--r--plugins/help/localization/lb_LU.inc3
-rw-r--r--plugins/help/localization/lv_LV.inc21
-rw-r--r--plugins/help/localization/ml_IN.inc18
-rw-r--r--plugins/help/localization/mn_MN.inc18
-rw-r--r--plugins/help/localization/ms_MY.inc18
-rw-r--r--plugins/help/localization/my_MM.inc18
-rw-r--r--plugins/help/localization/nl_BE.inc18
-rw-r--r--plugins/help/localization/nqo.inc18
-rw-r--r--plugins/help/localization/om.inc18
-rw-r--r--plugins/help/localization/ro_RO.inc21
-rw-r--r--plugins/help/localization/te_IN.inc18
-rw-r--r--plugins/help/localization/th_TH.inc18
-rw-r--r--plugins/help/localization/ti.inc21
-rw-r--r--plugins/help/localization/tzm.inc18
-rw-r--r--plugins/help/localization/uk_UA.inc21
-rw-r--r--plugins/help/localization/ur_PK.inc18
-rw-r--r--plugins/help/package.xml9
-rw-r--r--plugins/help/skins/classic/help.css16
-rw-r--r--plugins/help/skins/classic/templates/help.html17
-rw-r--r--plugins/help/skins/larry/help.css1
-rw-r--r--plugins/help/skins/larry/templates/help.html8
-rw-r--r--plugins/hide_blockquote/hide_blockquote.php4
-rw-r--r--plugins/hide_blockquote/localization/ar.inc18
-rw-r--r--plugins/hide_blockquote/localization/ar_SA.inc20
-rw-r--r--plugins/hide_blockquote/localization/be_BE.inc21
-rw-r--r--plugins/hide_blockquote/localization/bg_BG.inc21
-rw-r--r--plugins/hide_blockquote/localization/bn_BD.inc18
-rw-r--r--plugins/hide_blockquote/localization/el_GR.inc21
-rw-r--r--plugins/hide_blockquote/localization/en_US.inc4
-rw-r--r--plugins/hide_blockquote/localization/es_AR.inc21
-rw-r--r--plugins/hide_blockquote/localization/eu_ES.inc21
-rw-r--r--plugins/hide_blockquote/localization/fa_AF.inc18
-rw-r--r--plugins/hide_blockquote/localization/fi_FI.inc2
-rw-r--r--plugins/hide_blockquote/localization/hi_IN.inc18
-rw-r--r--plugins/hide_blockquote/localization/ia.inc18
-rw-r--r--plugins/hide_blockquote/localization/lb_LU.inc3
-rw-r--r--plugins/hide_blockquote/localization/lv_LV.inc21
-rw-r--r--plugins/hide_blockquote/localization/ml_IN.inc18
-rw-r--r--plugins/hide_blockquote/localization/mn_MN.inc18
-rw-r--r--plugins/hide_blockquote/localization/ms_MY.inc18
-rw-r--r--plugins/hide_blockquote/localization/my_MM.inc18
-rw-r--r--plugins/hide_blockquote/localization/nl_BE.inc18
-rw-r--r--plugins/hide_blockquote/localization/nqo.inc18
-rw-r--r--plugins/hide_blockquote/localization/om.inc18
-rw-r--r--plugins/hide_blockquote/localization/ro_RO.inc21
-rw-r--r--plugins/hide_blockquote/localization/te_IN.inc18
-rw-r--r--plugins/hide_blockquote/localization/th_TH.inc18
-rw-r--r--plugins/hide_blockquote/localization/ti.inc18
-rw-r--r--plugins/hide_blockquote/localization/tzm.inc18
-rw-r--r--plugins/hide_blockquote/localization/uk_UA.inc20
-rw-r--r--plugins/hide_blockquote/localization/ur_PK.inc18
-rw-r--r--plugins/http_authentication/config.inc.php.dist4
-rw-r--r--plugins/http_authentication/http_authentication.php6
-rw-r--r--plugins/jqueryui/config.inc.php.dist4
-rw-r--r--plugins/jqueryui/jqueryui.php1
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery-ui-i18n.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-af.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar-DZ.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-az.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-bg.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-bs.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ca.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-cs.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-cy-GB.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-da.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-de.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-el.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-AU.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-GB.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-NZ.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-eo.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-es.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-et.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-eu.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-fa.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-fi.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-fo.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr-CH.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-gl.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-he.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-hi.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-hr.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-hu.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-hy.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-id.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-is.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-it.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ja.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ka.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-kk.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-km.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ko.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-lb.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-lt.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-lv.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-mk.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ml.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ms.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl-BE.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-no.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-pl.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt-BR.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-rm.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ro.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ru.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-sk.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-sl.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-sq.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr-SR.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-sv.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-ta.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-th.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-tj.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-tr.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-uk.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-vi.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-CN.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-HK.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-TW.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-bg_flat_0_aaaaaa_40x100.pngbin180 -> 180 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-bg_flat_75_ffffff_40x100.pngbin178 -> 178 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-bg_flat_90_cc3333_40x100.pngbin212 -> 212 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-bg_glass_95_fef1ec_1x400.pngbin119 -> 119 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_a3a3a3_1x100.pngbin114 -> 114 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_e6e6e7_1x100.pngbin101 -> 101 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_f4f4f4_1x100.pngbin122 -> 122 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-icons_000000_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-icons_333333_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-icons_666666_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-icons_cc3333_256x240.pngbin5355 -> 5355 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/images/ui-icons_dddddd_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_55_b0ccd7_1x100.pngbin117 -> 117 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_65_ffffff_1x100.pngbin93 -> 93 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_eaeaea_1x100.pngbin136 -> 136 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_f8f8f8_1x100.pngbin88 -> 88 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_75_fafafa_1x100.pngbin117 -> 117 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_90_e4e4e4_1x100.pngbin111 -> 111 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-icons_004458_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/images/ui-icons_d7211e_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css0
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_flat_0_aaaaaa_40x100.pngbin180 -> 180 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_flat_55_fbec88_40x100.pngbin182 -> 182 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_glass_75_d0e5f5_1x400.pngbin162 -> 162 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_glass_85_dfeffc_1x400.pngbin123 -> 123 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_glass_95_fef1ec_1x400.pngbin119 -> 119 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.pngbin3457 -> 3457 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.pngbin104 -> 104 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.pngbin88 -> 88 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-icons_217bc0_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-icons_2e83ff_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-icons_469bdd_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-icons_6da8d5_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-icons_cd0a0a_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-icons_d8e7f3_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/images/ui-icons_f9bd01_256x240.pngbin4369 -> 4369 bytes
-rw-r--r--[-rwxr-xr-x]plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css0
-rw-r--r--plugins/keyboard_shortcuts/keyboard_shortcuts.css23
-rw-r--r--plugins/keyboard_shortcuts/keyboard_shortcuts.js139
-rw-r--r--plugins/keyboard_shortcuts/keyboard_shortcuts.php130
-rw-r--r--plugins/keyboard_shortcuts/localization/cs_CZ.inc24
-rw-r--r--plugins/keyboard_shortcuts/localization/de_DE.inc10
-rw-r--r--plugins/keyboard_shortcuts/localization/en_US.inc11
-rw-r--r--plugins/keyboard_shortcuts/localization/fr_FR.inc11
-rw-r--r--plugins/keyboard_shortcuts/localization/nl_NL.inc11
-rw-r--r--plugins/keyboard_shortcuts/localization/pl_PL.inc11
-rw-r--r--plugins/keyboard_shortcuts/localization/ru_RU.inc11
-rw-r--r--plugins/keyboard_shortcuts/localization/sv_SE.inc10
-rw-r--r--plugins/keyboard_shortcuts/localization/zh_TW.inc11
-rw-r--r--plugins/keyboard_shortcuts/package.xml18
-rw-r--r--plugins/keyboard_shortcuts/skins/classic/images/keyboard.pngbin0 -> 4157 bytes
-rw-r--r--plugins/keyboard_shortcuts/skins/larry/images/keyboard.pngbin0 -> 4157 bytes
-rw-r--r--plugins/listcommands/listcommands.php106
-rw-r--r--plugins/listcommands/localization/en_US.inc12
-rw-r--r--plugins/listcommands/localization/es_ES.inc12
-rw-r--r--plugins/listcommands/localization/fr_FR.inc13
-rw-r--r--plugins/listcommands/localization/nl_NL.inc12
-rw-r--r--plugins/listcommands/localization/pl_PL.inc12
-rw-r--r--plugins/listcommands/localization/ru_RU.inc12
-rw-r--r--plugins/listcommands/package.xml18
-rw-r--r--plugins/managesieve/Changelog37
-rw-r--r--plugins/managesieve/config.inc.php.dist30
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve.php16
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php151
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_script.php493
-rw-r--r--plugins/managesieve/localization/ar_SA.inc33
-rw-r--r--plugins/managesieve/localization/az_AZ.inc14
-rw-r--r--plugins/managesieve/localization/be_BE.inc2
-rw-r--r--plugins/managesieve/localization/bg_BG.inc8
-rw-r--r--plugins/managesieve/localization/bs_BA.inc2
-rw-r--r--plugins/managesieve/localization/ca_ES.inc8
-rw-r--r--plugins/managesieve/localization/cs_CZ.inc22
-rw-r--r--plugins/managesieve/localization/cy_GB.inc8
-rw-r--r--plugins/managesieve/localization/da_DK.inc8
-rw-r--r--plugins/managesieve/localization/de_CH.inc2
-rw-r--r--plugins/managesieve/localization/de_DE.inc8
-rw-r--r--plugins/managesieve/localization/el_GR.inc216
-rw-r--r--plugins/managesieve/localization/en_GB.inc2
-rw-r--r--plugins/managesieve/localization/en_US.inc51
-rw-r--r--plugins/managesieve/localization/eo.inc2
-rw-r--r--plugins/managesieve/localization/es_AR.inc2
-rw-r--r--plugins/managesieve/localization/es_ES.inc25
-rw-r--r--plugins/managesieve/localization/et_EE.inc29
-rw-r--r--plugins/managesieve/localization/eu_ES.inc181
-rw-r--r--plugins/managesieve/localization/fa_IR.inc7
-rw-r--r--plugins/managesieve/localization/fi_FI.inc24
-rw-r--r--plugins/managesieve/localization/fr_FR.inc26
-rw-r--r--plugins/managesieve/localization/gl_ES.inc148
-rw-r--r--plugins/managesieve/localization/he_IL.inc7
-rw-r--r--plugins/managesieve/localization/hr_HR.inc26
-rw-r--r--plugins/managesieve/localization/hu_HU.inc2
-rw-r--r--plugins/managesieve/localization/hy_AM.inc2
-rw-r--r--plugins/managesieve/localization/ia.inc2
-rw-r--r--plugins/managesieve/localization/id_ID.inc2
-rw-r--r--plugins/managesieve/localization/it_IT.inc26
-rw-r--r--plugins/managesieve/localization/ja_JP.inc2
-rw-r--r--plugins/managesieve/localization/ko_KR.inc2
-rw-r--r--plugins/managesieve/localization/lb_LU.inc147
-rw-r--r--plugins/managesieve/localization/lt_LT.inc10
-rw-r--r--plugins/managesieve/localization/lv_LV.inc163
-rw-r--r--plugins/managesieve/localization/ml_IN.inc1
-rw-r--r--plugins/managesieve/localization/mr_IN.inc2
-rw-r--r--plugins/managesieve/localization/nb_NO.inc2
-rw-r--r--plugins/managesieve/localization/nl_NL.inc2
-rw-r--r--plugins/managesieve/localization/nn_NO.inc13
-rw-r--r--plugins/managesieve/localization/pl_PL.inc25
-rw-r--r--plugins/managesieve/localization/pt_BR.inc21
-rw-r--r--plugins/managesieve/localization/pt_PT.inc2
-rw-r--r--plugins/managesieve/localization/ro_RO.inc8
-rw-r--r--plugins/managesieve/localization/ru_RU.inc21
-rw-r--r--plugins/managesieve/localization/si_LK.inc1
-rw-r--r--plugins/managesieve/localization/sk_SK.inc2
-rw-r--r--plugins/managesieve/localization/sl_SI.inc25
-rw-r--r--plugins/managesieve/localization/sv_SE.inc2
-rw-r--r--plugins/managesieve/localization/th_TH.inc45
-rw-r--r--plugins/managesieve/localization/tr_TR.inc8
-rw-r--r--plugins/managesieve/localization/uk_UA.inc2
-rw-r--r--plugins/managesieve/localization/vi_VN.inc17
-rw-r--r--plugins/managesieve/localization/zh_CN.inc2
-rw-r--r--plugins/managesieve/localization/zh_TW.inc2
-rw-r--r--plugins/managesieve/managesieve.js185
-rw-r--r--plugins/managesieve/managesieve.php1919
-rw-r--r--plugins/managesieve/package.xml18
-rw-r--r--plugins/managesieve/skins/classic/managesieve.css103
-rw-r--r--plugins/managesieve/skins/classic/managesieve_mail.css2
-rw-r--r--plugins/managesieve/skins/classic/templates/managesieve.html6
-rw-r--r--plugins/managesieve/skins/larry/managesieve.css116
-rw-r--r--plugins/managesieve/tests/src/parser.out4
-rw-r--r--plugins/managesieve/tests/src/parser_enotify_b6
-rw-r--r--plugins/managesieve/tests/src/parser_notify_b6
-rw-r--r--plugins/managesieve/tests/src/parser_relational2
-rw-r--r--plugins/managesieve/tests/src/parser_subaddress2
-rw-r--r--plugins/markasjunk/localization/ar.inc20
-rw-r--r--plugins/markasjunk/localization/bg_BG.inc21
-rw-r--r--plugins/markasjunk/localization/en_US.inc4
-rw-r--r--plugins/markasjunk/localization/eu_ES.inc21
-rw-r--r--plugins/markasjunk/localization/lb_LU.inc3
-rw-r--r--plugins/markasjunk/localization/lv_LV.inc6
-rw-r--r--plugins/markasjunk/localization/ro_RO.inc6
-rw-r--r--plugins/markasjunk/localization/ru_RU.inc4
-rw-r--r--plugins/markasjunk2/config.inc.php.dist152
-rw-r--r--plugins/markasjunk2/drivers/cmd_learn.php74
-rw-r--r--plugins/markasjunk2/drivers/dir_learn.php49
-rw-r--r--plugins/markasjunk2/drivers/edit_headers.php53
-rw-r--r--plugins/markasjunk2/drivers/email_learn.php191
-rw-r--r--plugins/markasjunk2/drivers/sa_blacklist.php103
-rw-r--r--plugins/markasjunk2/drivers/sa_detach.php47
-rw-r--r--plugins/markasjunk2/localization/ca_ES.inc14
-rw-r--r--plugins/markasjunk2/localization/cs_CZ.inc14
-rw-r--r--plugins/markasjunk2/localization/de_CH.inc15
-rw-r--r--plugins/markasjunk2/localization/de_DE.inc15
-rw-r--r--plugins/markasjunk2/localization/en_GB.inc15
-rw-r--r--plugins/markasjunk2/localization/en_US.inc15
-rw-r--r--plugins/markasjunk2/localization/es_AR.inc14
-rw-r--r--plugins/markasjunk2/localization/es_ES.inc14
-rw-r--r--plugins/markasjunk2/localization/fa_IR.inc14
-rw-r--r--plugins/markasjunk2/localization/fr_FR.inc14
-rw-r--r--plugins/markasjunk2/localization/gl_ES.inc14
-rw-r--r--plugins/markasjunk2/localization/hu_HU.inc14
-rw-r--r--plugins/markasjunk2/localization/it_IT.inc15
-rw-r--r--plugins/markasjunk2/localization/lv_LV.inc15
-rw-r--r--plugins/markasjunk2/localization/nl_NL.inc14
-rw-r--r--plugins/markasjunk2/localization/pl_PL.inc15
-rw-r--r--plugins/markasjunk2/localization/pt_BR.inc14
-rw-r--r--plugins/markasjunk2/localization/ro_RO.inc14
-rw-r--r--plugins/markasjunk2/localization/ru_RU.inc15
-rw-r--r--plugins/markasjunk2/localization/tr_TR.inc14
-rw-r--r--plugins/markasjunk2/localization/zh_TW.inc14
-rw-r--r--plugins/markasjunk2/markasjunk2.js199
-rw-r--r--plugins/markasjunk2/markasjunk2.php211
-rw-r--r--plugins/markasjunk2/package.xml92
-rw-r--r--plugins/markasjunk2/skins/classic/ie6hacks.css19
-rw-r--r--plugins/markasjunk2/skins/classic/mail_toolbar.gifbin0 -> 3434 bytes
-rw-r--r--plugins/markasjunk2/skins/classic/mail_toolbar.pngbin0 -> 7565 bytes
-rw-r--r--plugins/markasjunk2/skins/classic/markasjunk2.css52
-rw-r--r--plugins/markasjunk2/skins/classic/messageactions.gifbin0 -> 1307 bytes
-rw-r--r--plugins/markasjunk2/skins/classic/messageactions.pngbin0 -> 1798 bytes
-rw-r--r--plugins/markasjunk2/skins/larry/ie6hacks.css3
-rw-r--r--plugins/markasjunk2/skins/larry/mail_toolbar.pngbin0 -> 1924 bytes
-rw-r--r--plugins/markasjunk2/skins/larry/markasjunk2.css51
-rw-r--r--plugins/markasjunk2/skins/larry/messageactions.pngbin0 -> 1050 bytes
-rw-r--r--plugins/message_highlight/colorpicker/images/color.pngbin0 -> 892 bytes
-rw-r--r--plugins/message_highlight/colorpicker/images/colorpicker.pngbin0 -> 4739 bytes
-rw-r--r--plugins/message_highlight/colorpicker/images/graybar.jpgbin0 -> 5225 bytes
-rw-r--r--plugins/message_highlight/colorpicker/images/grid.gifbin0 -> 87 bytes
-rw-r--r--plugins/message_highlight/colorpicker/images/meta100.pngbin0 -> 828 bytes
-rw-r--r--plugins/message_highlight/colorpicker/images/transparentpixel.gifbin0 -> 43 bytes
-rw-r--r--plugins/message_highlight/colorpicker/mColorPicker.js564
-rw-r--r--plugins/message_highlight/localization/de_DE.inc15
-rw-r--r--plugins/message_highlight/localization/en_US.inc16
-rw-r--r--plugins/message_highlight/localization/fr_FR.inc16
-rw-r--r--plugins/message_highlight/localization/nl_NL.inc15
-rw-r--r--plugins/message_highlight/localization/ru_RU.inc14
-rw-r--r--plugins/message_highlight/message_highlight.css74
-rw-r--r--plugins/message_highlight/message_highlight.js58
-rw-r--r--plugins/message_highlight/message_highlight.php176
-rw-r--r--plugins/message_highlight/package.xml18
-rw-r--r--plugins/new_user_dialog/localization/ar.inc20
-rw-r--r--plugins/new_user_dialog/localization/ar_SA.inc19
-rw-r--r--plugins/new_user_dialog/localization/ast.inc20
-rw-r--r--plugins/new_user_dialog/localization/en_US.inc4
-rw-r--r--plugins/new_user_dialog/localization/es_AR.inc20
-rw-r--r--plugins/new_user_dialog/localization/eu_ES.inc20
-rw-r--r--plugins/new_user_dialog/localization/fa_AF.inc20
-rw-r--r--plugins/new_user_dialog/localization/lb_LU.inc3
-rw-r--r--plugins/new_user_dialog/localization/lv_LV.inc4
-rw-r--r--plugins/new_user_dialog/localization/ro_RO.inc4
-rw-r--r--plugins/new_user_dialog/new_user_dialog.php69
-rw-r--r--plugins/new_user_dialog/package.xml91
-rw-r--r--plugins/new_user_identity/new_user_identity.php11
-rw-r--r--plugins/new_user_identity/package.xml2
-rw-r--r--plugins/newmail_notifier/config.inc.php.dist6
-rw-r--r--plugins/newmail_notifier/localization/ast.inc28
-rw-r--r--plugins/newmail_notifier/localization/bg_BG.inc28
-rw-r--r--plugins/newmail_notifier/localization/el_GR.inc27
-rw-r--r--plugins/newmail_notifier/localization/en_US.inc2
-rw-r--r--plugins/newmail_notifier/localization/es_AR.inc27
-rw-r--r--plugins/newmail_notifier/localization/eu_ES.inc27
-rw-r--r--plugins/newmail_notifier/localization/lb_LU.inc3
-rw-r--r--plugins/newmail_notifier/localization/lv_LV.inc16
-rw-r--r--plugins/newmail_notifier/localization/ro_RO.inc4
-rw-r--r--plugins/newmail_notifier/localization/ti.inc27
-rw-r--r--plugins/newmail_notifier/newmail_notifier.js110
-rw-r--r--plugins/newmail_notifier/newmail_notifier.php85
-rw-r--r--plugins/newmail_notifier/package.xml8
-rw-r--r--plugins/newmail_notifier/sound.mp3bin0 -> 7488 bytes
-rw-r--r--plugins/password/README116
-rw-r--r--plugins/password/config.inc.php.dist143
-rw-r--r--plugins/password/drivers/chpasswd.php2
-rw-r--r--plugins/password/drivers/cpanel.php110
-rw-r--r--plugins/password/drivers/dbmail.php2
-rw-r--r--plugins/password/drivers/directadmin.php3
-rw-r--r--plugins/password/drivers/expect.php2
-rw-r--r--plugins/password/drivers/hmail.php12
-rw-r--r--plugins/password/drivers/ldap.php2
-rw-r--r--plugins/password/drivers/ldap_simple.php2
-rw-r--r--plugins/password/drivers/pam.php4
-rw-r--r--plugins/password/drivers/pw_usermod.php2
-rw-r--r--plugins/password/drivers/sasl.php2
-rw-r--r--plugins/password/drivers/smb.php14
-rw-r--r--plugins/password/drivers/sql.php19
-rw-r--r--plugins/password/drivers/virtualmin.php13
-rw-r--r--plugins/password/drivers/xmail.php16
-rw-r--r--plugins/password/localization/ar.inc32
-rw-r--r--plugins/password/localization/ar_SA.inc29
-rw-r--r--plugins/password/localization/ast.inc32
-rw-r--r--plugins/password/localization/be_BE.inc32
-rw-r--r--plugins/password/localization/el_GR.inc32
-rw-r--r--plugins/password/localization/en_US.inc2
-rw-r--r--plugins/password/localization/eu_ES.inc32
-rw-r--r--plugins/password/localization/fa_AF.inc32
-rw-r--r--plugins/password/localization/gl_ES.inc2
-rw-r--r--plugins/password/localization/lb_LU.inc5
-rw-r--r--plugins/password/localization/lv_LV.inc16
-rw-r--r--plugins/password/localization/ro_RO.inc10
-rw-r--r--plugins/password/localization/ru_RU.inc4
-rw-r--r--plugins/password/localization/ti.inc32
-rw-r--r--plugins/password/localization/uk_UA.inc32
-rw-r--r--plugins/password/package.xml40
-rw-r--r--plugins/password/password.php82
-rw-r--r--plugins/quickrules/localization/cs_CZ.inc9
-rw-r--r--plugins/quickrules/localization/de_CH.inc10
-rw-r--r--plugins/quickrules/localization/de_DE.inc10
-rw-r--r--plugins/quickrules/localization/en_GB.inc10
-rw-r--r--plugins/quickrules/localization/en_US.inc10
-rw-r--r--plugins/quickrules/localization/hu_HU.inc9
-rw-r--r--plugins/quickrules/localization/it_IT.inc10
-rw-r--r--plugins/quickrules/localization/pl_PL.inc9
-rw-r--r--plugins/quickrules/localization/pt_BR.inc9
-rw-r--r--plugins/quickrules/localization/pt_PT.inc9
-rw-r--r--plugins/quickrules/package.xml79
-rw-r--r--plugins/quickrules/quickrules.js169
-rw-r--r--plugins/quickrules/quickrules.php137
-rw-r--r--plugins/quickrules/skins/classic/ie6hacks.css14
-rw-r--r--plugins/quickrules/skins/classic/mail_toolbar.gifbin0 -> 1722 bytes
-rw-r--r--plugins/quickrules/skins/classic/mail_toolbar.pngbin0 -> 3310 bytes
-rw-r--r--plugins/quickrules/skins/classic/messageactions.gifbin0 -> 571 bytes
-rw-r--r--plugins/quickrules/skins/classic/messageactions.pngbin0 -> 842 bytes
-rw-r--r--plugins/quickrules/skins/classic/quickrules.css26
-rw-r--r--plugins/quickrules/skins/larry/ie6hacks.css3
-rw-r--r--plugins/quickrules/skins/larry/mail_toolbar.pngbin0 -> 1350 bytes
-rw-r--r--plugins/quickrules/skins/larry/messageactions.pngbin0 -> 672 bytes
-rw-r--r--plugins/quickrules/skins/larry/quickrules.css21
-rw-r--r--plugins/sauserprefs/config.inc.php.dist160
-rw-r--r--plugins/sauserprefs/include/rcube_sauserprefs_storage.php268
-rw-r--r--plugins/sauserprefs/localization/cs_CZ.inc86
-rw-r--r--plugins/sauserprefs/localization/de_CH.inc86
-rw-r--r--plugins/sauserprefs/localization/de_DE.inc86
-rw-r--r--plugins/sauserprefs/localization/en_GB.inc86
-rw-r--r--plugins/sauserprefs/localization/en_US.inc86
-rw-r--r--plugins/sauserprefs/localization/es_ES.inc85
-rw-r--r--plugins/sauserprefs/localization/fr_FR.inc86
-rw-r--r--plugins/sauserprefs/localization/gl_ES.inc85
-rw-r--r--plugins/sauserprefs/localization/hu_HU.inc61
-rw-r--r--plugins/sauserprefs/localization/it_IT.inc86
-rw-r--r--plugins/sauserprefs/localization/pl_PL.inc86
-rw-r--r--plugins/sauserprefs/localization/pt_BR.inc85
-rw-r--r--plugins/sauserprefs/localization/ro_RO.inc85
-rw-r--r--plugins/sauserprefs/localization/ru_RU.inc87
-rw-r--r--plugins/sauserprefs/localization/sk_SK.inc86
-rw-r--r--plugins/sauserprefs/localization/sv_SE.inc84
-rw-r--r--plugins/sauserprefs/package.xml91
-rw-r--r--plugins/sauserprefs/sauserprefs.js459
-rw-r--r--plugins/sauserprefs/sauserprefs.php909
-rw-r--r--plugins/sauserprefs/skins/classic/help.gifbin0 -> 1024 bytes
-rw-r--r--plugins/sauserprefs/skins/classic/icons.gifbin0 -> 1345 bytes
-rw-r--r--plugins/sauserprefs/skins/classic/icons.pngbin0 -> 2045 bytes
-rw-r--r--plugins/sauserprefs/skins/classic/ie6hacks.css9
-rw-r--r--plugins/sauserprefs/skins/classic/iehacks.css9
-rw-r--r--plugins/sauserprefs/skins/classic/safari.css6
-rw-r--r--plugins/sauserprefs/skins/classic/sauserprefs.css185
-rw-r--r--plugins/sauserprefs/skins/classic/tabstyles.css3
-rw-r--r--plugins/sauserprefs/skins/classic/templates/sauserprefs.html47
-rw-r--r--plugins/sauserprefs/skins/classic/templates/settingsedit.html33
-rw-r--r--plugins/sauserprefs/skins/larry/help.pngbin0 -> 475 bytes
-rw-r--r--plugins/sauserprefs/skins/larry/icons.pngbin0 -> 962 bytes
-rw-r--r--plugins/sauserprefs/skins/larry/iehacks.css9
-rw-r--r--plugins/sauserprefs/skins/larry/listicons.pngbin0 -> 4891 bytes
-rw-r--r--plugins/sauserprefs/skins/larry/safari.css6
-rw-r--r--plugins/sauserprefs/skins/larry/sauserprefs.css253
-rw-r--r--plugins/sauserprefs/skins/larry/tabstyles.css15
-rw-r--r--plugins/sauserprefs/skins/larry/templates/sauserprefs.html54
-rw-r--r--plugins/sauserprefs/skins/larry/templates/settingsedit.html30
-rw-r--r--plugins/show_additional_headers/package.xml2
-rw-r--r--plugins/show_additional_headers/show_additional_headers.php6
-rw-r--r--plugins/sieverules/config.inc.php.dist147
-rw-r--r--plugins/sieverules/importFilters/avelsieve.php54
-rw-r--r--plugins/sieverules/importFilters/ingo.php52
-rw-r--r--plugins/sieverules/include/rcube_sieve.php249
-rw-r--r--plugins/sieverules/include/rcube_sieve_script.php969
-rw-r--r--plugins/sieverules/jquery.maskedinput.js7
l---------plugins/sieverules/lib/Net/Sieve.php1
-rw-r--r--plugins/sieverules/localization/ca_ES.inc168
-rw-r--r--plugins/sieverules/localization/cs_CZ.inc195
-rw-r--r--plugins/sieverules/localization/de_CH.inc192
-rw-r--r--plugins/sieverules/localization/de_DE.inc192
-rw-r--r--plugins/sieverules/localization/en_GB.inc205
-rw-r--r--plugins/sieverules/localization/en_US.inc205
-rw-r--r--plugins/sieverules/localization/es_AR.inc140
-rw-r--r--plugins/sieverules/localization/es_ES.inc185
-rw-r--r--plugins/sieverules/localization/et_EE.inc79
-rw-r--r--plugins/sieverules/localization/fi_FI.inc186
-rw-r--r--plugins/sieverules/localization/fr_FR.inc185
-rw-r--r--plugins/sieverules/localization/hu_HU.inc171
-rw-r--r--plugins/sieverules/localization/it_IT.inc202
-rw-r--r--plugins/sieverules/localization/nl_NL.inc205
-rw-r--r--plugins/sieverules/localization/pl_PL.inc205
-rw-r--r--plugins/sieverules/localization/pt_BR.inc183
-rw-r--r--plugins/sieverules/localization/pt_PT.inc183
-rw-r--r--plugins/sieverules/localization/ro_RO.inc175
-rw-r--r--plugins/sieverules/localization/ru_RU.inc182
-rw-r--r--plugins/sieverules/localization/sk_SK.inc159
-rw-r--r--plugins/sieverules/localization/sl_SI.inc185
-rw-r--r--plugins/sieverules/localization/sv_SE.inc159
-rw-r--r--plugins/sieverules/localization/zh_TW.inc192
-rw-r--r--plugins/sieverules/package.xml116
-rw-r--r--plugins/sieverules/sieverules.js1480
-rw-r--r--plugins/sieverules/sieverules.php2331
-rw-r--r--plugins/sieverules/skins/classic/cross.gifbin0 -> 577 bytes
-rw-r--r--plugins/sieverules/skins/classic/help.gifbin0 -> 1024 bytes
-rw-r--r--plugins/sieverules/skins/classic/icons.gifbin0 -> 2017 bytes
-rw-r--r--plugins/sieverules/skins/classic/icons.pngbin0 -> 2748 bytes
-rw-r--r--plugins/sieverules/skins/classic/ie6hacks.css10
-rw-r--r--plugins/sieverules/skins/classic/iehacks.css53
-rw-r--r--plugins/sieverules/skins/classic/safari.css8
-rw-r--r--plugins/sieverules/skins/classic/sieverules.css406
-rw-r--r--plugins/sieverules/skins/classic/tabstyles.css3
-rw-r--r--plugins/sieverules/skins/classic/templates/advancededitor.html55
-rw-r--r--plugins/sieverules/skins/classic/templates/editsieverule.html29
-rw-r--r--plugins/sieverules/skins/classic/templates/setupsieverules.html18
-rw-r--r--plugins/sieverules/skins/classic/templates/sieverules.html93
-rw-r--r--plugins/sieverules/skins/classic/tick.gifbin0 -> 545 bytes
-rw-r--r--plugins/sieverules/skins/larry/cross.pngbin0 -> 342 bytes
-rw-r--r--plugins/sieverules/skins/larry/help.pngbin0 -> 475 bytes
-rw-r--r--plugins/sieverules/skins/larry/icons.pngbin0 -> 1773 bytes
-rw-r--r--plugins/sieverules/skins/larry/iehacks.css53
-rw-r--r--plugins/sieverules/skins/larry/listicons.pngbin0 -> 1345 bytes
-rw-r--r--plugins/sieverules/skins/larry/safari.css8
-rw-r--r--plugins/sieverules/skins/larry/sieverules.css435
-rw-r--r--plugins/sieverules/skins/larry/tabstyles.css15
-rw-r--r--plugins/sieverules/skins/larry/templates/advancededitor.html60
-rw-r--r--plugins/sieverules/skins/larry/templates/editsieverule.html30
-rw-r--r--plugins/sieverules/skins/larry/templates/setupsieverules.html27
-rw-r--r--plugins/sieverules/skins/larry/templates/sieverules.html78
-rw-r--r--plugins/sieverules/skins/larry/tick.pngbin0 -> 284 bytes
-rw-r--r--plugins/squirrelmail_usercopy/config.inc.php.dist18
-rw-r--r--plugins/squirrelmail_usercopy/squirrelmail_usercopy.php18
-rw-r--r--plugins/subscriptions_option/localization/az_AZ.inc19
-rw-r--r--plugins/subscriptions_option/localization/be_BE.inc19
-rw-r--r--plugins/subscriptions_option/localization/bg_BG.inc19
-rw-r--r--plugins/subscriptions_option/localization/el_GR.inc19
-rw-r--r--plugins/subscriptions_option/localization/en_US.inc2
-rw-r--r--plugins/subscriptions_option/localization/es_AR.inc19
-rw-r--r--plugins/subscriptions_option/localization/eu_ES.inc19
-rw-r--r--plugins/subscriptions_option/localization/fa_AF.inc19
-rw-r--r--plugins/subscriptions_option/localization/gl_ES.inc2
-rw-r--r--plugins/subscriptions_option/localization/id_ID.inc19
-rw-r--r--plugins/subscriptions_option/localization/lb_LU.inc3
-rw-r--r--plugins/subscriptions_option/localization/lv_LV.inc19
-rw-r--r--plugins/subscriptions_option/localization/nn_NO.inc19
-rw-r--r--plugins/subscriptions_option/localization/ro_RO.inc19
-rw-r--r--plugins/subscriptions_option/localization/ru_RU.inc2
-rw-r--r--plugins/subscriptions_option/package.xml2
-rw-r--r--plugins/subscriptions_option/subscriptions_option.php9
-rw-r--r--plugins/thunderbird_labels/localization/bg_BG.inc17
-rw-r--r--plugins/thunderbird_labels/localization/ca_ES.inc17
-rw-r--r--plugins/thunderbird_labels/localization/cs_CZ.inc18
-rw-r--r--plugins/thunderbird_labels/localization/de_DE.inc18
-rw-r--r--plugins/thunderbird_labels/localization/en_US.inc18
-rw-r--r--plugins/thunderbird_labels/localization/fr_FR.inc17
-rw-r--r--plugins/thunderbird_labels/localization/hu_HU.inc18
-rw-r--r--plugins/thunderbird_labels/localization/lv_LV.inc17
-rw-r--r--plugins/thunderbird_labels/localization/pl_PL.inc18
-rw-r--r--plugins/thunderbird_labels/localization/ru_RU.inc18
-rw-r--r--plugins/thunderbird_labels/skins/classic/tb_label.css183
-rw-r--r--plugins/thunderbird_labels/skins/classic/thunderbird_32.pngbin0 -> 3232 bytes
-rw-r--r--plugins/thunderbird_labels/skins/default/tb_label.css183
-rw-r--r--plugins/thunderbird_labels/skins/default/thunderbird_32.pngbin0 -> 3232 bytes
-rw-r--r--plugins/thunderbird_labels/skins/larry/tb_label.css170
-rw-r--r--plugins/thunderbird_labels/skins/larry/thunderbird_32.pngbin0 -> 2662 bytes
-rw-r--r--plugins/thunderbird_labels/tb_label.js369
-rw-r--r--plugins/thunderbird_labels/thunderbird_labels.php210
-rw-r--r--plugins/userinfo/localization/ar.inc21
-rw-r--r--plugins/userinfo/localization/ast.inc22
-rw-r--r--plugins/userinfo/localization/bg_BG.inc22
-rw-r--r--plugins/userinfo/localization/el_GR.inc22
-rw-r--r--plugins/userinfo/localization/en_US.inc2
-rw-r--r--plugins/userinfo/localization/es_AR.inc22
-rw-r--r--plugins/userinfo/localization/eu_ES.inc22
-rw-r--r--plugins/userinfo/localization/fa_AF.inc22
-rw-r--r--[-rwxr-xr-x]plugins/userinfo/localization/fr_FR.inc0
-rw-r--r--plugins/userinfo/localization/lb_LU.inc3
-rw-r--r--[-rwxr-xr-x]plugins/userinfo/localization/ro_RO.inc8
-rw-r--r--plugins/userinfo/localization/ti.inc22
-rw-r--r--plugins/userinfo/userinfo.php24
-rw-r--r--plugins/vcard_attachments/localization/ar.inc20
-rw-r--r--plugins/vcard_attachments/localization/ar_SA.inc20
-rw-r--r--plugins/vcard_attachments/localization/bg_BG.inc20
-rw-r--r--plugins/vcard_attachments/localization/el_GR.inc20
-rw-r--r--plugins/vcard_attachments/localization/en_US.inc2
-rw-r--r--plugins/vcard_attachments/localization/es_AR.inc20
-rw-r--r--plugins/vcard_attachments/localization/eu_ES.inc20
-rw-r--r--plugins/vcard_attachments/localization/gl_ES.inc4
-rw-r--r--plugins/vcard_attachments/localization/lb_LU.inc3
-rw-r--r--plugins/vcard_attachments/vcard_attachments.php15
-rw-r--r--plugins/virtuser_file/virtuser_file.php92
-rw-r--r--plugins/virtuser_query/package.xml8
-rw-r--r--plugins/virtuser_query/virtuser_query.php64
-rw-r--r--plugins/zipdownload/README2
-rw-r--r--plugins/zipdownload/config.inc.php.dist8
-rw-r--r--plugins/zipdownload/localization/ar.inc20
-rw-r--r--plugins/zipdownload/localization/ar_SA.inc20
-rw-r--r--plugins/zipdownload/localization/be_BE.inc20
-rw-r--r--plugins/zipdownload/localization/bg_BG.inc20
-rw-r--r--plugins/zipdownload/localization/el_GR.inc20
-rw-r--r--plugins/zipdownload/localization/en_US.inc2
-rw-r--r--plugins/zipdownload/localization/eo.inc20
-rw-r--r--plugins/zipdownload/localization/eu_ES.inc20
-rw-r--r--plugins/zipdownload/localization/fa_AF.inc20
-rw-r--r--plugins/zipdownload/localization/fi_FI.inc20
-rw-r--r--plugins/zipdownload/localization/id_ID.inc20
-rw-r--r--plugins/zipdownload/localization/ko_KR.inc20
-rw-r--r--plugins/zipdownload/localization/lb_LU.inc3
-rw-r--r--plugins/zipdownload/localization/lv_LV.inc20
-rw-r--r--plugins/zipdownload/localization/ro_RO.inc4
-rw-r--r--plugins/zipdownload/localization/ru_RU.inc2
-rw-r--r--plugins/zipdownload/localization/sl_SI.inc20
-rw-r--r--plugins/zipdownload/localization/uk_UA.inc20
-rw-r--r--plugins/zipdownload/localization/zh_CN.inc20
-rw-r--r--plugins/zipdownload/skins/larry/zipdownload.css4
-rw-r--r--plugins/zipdownload/zipdownload.php27
899 files changed, 32367 insertions, 12901 deletions
diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php
index a840bcd58..466185dcc 100644
--- a/plugins/acl/acl.php
+++ b/plugins/acl/acl.php
@@ -9,18 +9,18 @@
*
* Copyright (C) 2011-2012, 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 free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
*
* 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/.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
class acl extends rcube_plugin
@@ -55,7 +55,7 @@ class acl extends rcube_plugin
*/
function acl_actions()
{
- $action = trim(rcube_utils::get_input_value('_act', rcube_utils::INPUT_GPC));
+ $action = trim(get_input_value('_act', RCUBE_INPUT_GPC));
// Connect to IMAP
$this->rc->storage_init();
@@ -85,8 +85,8 @@ class acl extends rcube_plugin
{
$this->load_config();
- $search = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC, true);
- $sid = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
+ $search = get_input_value('_search', RCUBE_INPUT_GPC, true);
+ $sid = get_input_value('_id', RCUBE_INPUT_GPC);
$users = array();
if ($this->init_ldap()) {
@@ -148,7 +148,6 @@ class acl extends rcube_plugin
// Load localization and include scripts
$this->load_config();
- $this->specials = $this->rc->config->get('acl_specials', $this->specials);
$this->add_texts('localization/', array('deleteconfirm', 'norights',
'nouser', 'deleting', 'saving'));
$this->include_script('acl.js');
@@ -158,12 +157,12 @@ class acl extends rcube_plugin
// add Info fieldset if it doesn't exist
if (!isset($args['form']['props']['fieldsets']['info']))
$args['form']['props']['fieldsets']['info'] = array(
- 'name' => $this->rc->gettext('info'),
+ 'name' => rcube_label('info'),
'content' => array());
// Display folder rights to 'Info' fieldset
$args['form']['props']['fieldsets']['info']['content']['myrights'] = array(
- 'label' => rcube::Q($this->gettext('myrights')),
+ 'label' => Q($this->gettext('myrights')),
'value' => $this->acl2text($myrights)
);
@@ -187,7 +186,7 @@ class acl extends rcube_plugin
$this->rc->output->add_label('autocompletechars', 'autocompletemore');
$args['form']['sharing'] = array(
- 'name' => rcube::Q($this->gettext('sharing')),
+ 'name' => Q($this->gettext('sharing')),
'content' => $this->rc->output->parse('acl.table', false, false),
);
@@ -385,6 +384,7 @@ class acl extends rcube_plugin
$table->add_header(array('class' => 'acl'.$key, 'title' => $label), $label);
}
+ $i = 1;
$js_table = array();
foreach ($acl as $user => $rights) {
if ($this->rc->storage->conn->user == $user) {
@@ -393,14 +393,14 @@ class acl extends rcube_plugin
// filter out virtual rights (c or d) the server may return
$userrights = array_intersect($rights, $supported);
- $userid = rcube_utils::html_identifier($user);
+ $userid = html_identifier($user);
if (!empty($this->specials) && in_array($user, $this->specials)) {
$user = $this->gettext($user);
}
$table->add_row(array('id' => 'rcmrow'.$userid));
- $table->add('user', rcube::Q($user));
+ $table->add('user', Q($user));
foreach ($items as $key => $right) {
$in = $this->acl_compare($userrights, $right);
@@ -428,10 +428,10 @@ class acl extends rcube_plugin
*/
private function action_save()
{
- $mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)); // UTF7-IMAP
- $user = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_GPC));
- $acl = trim(rcube_utils::get_input_value('_acl', rcube_utils::INPUT_GPC));
- $oldid = trim(rcube_utils::get_input_value('_old', rcube_utils::INPUT_GPC));
+ $mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true)); // UTF7-IMAP
+ $user = trim(get_input_value('_user', RCUBE_INPUT_GPC));
+ $acl = trim(get_input_value('_acl', RCUBE_INPUT_GPC));
+ $oldid = trim(get_input_value('_old', RCUBE_INPUT_GPC));
$acl = array_intersect(str_split($acl), $this->rights_supported());
$users = $oldid ? array($user) : explode(',', $user);
@@ -445,7 +445,7 @@ class acl extends rcube_plugin
}
else if (!empty($user)) {
if (!strpos($user, '@') && ($realm = $this->get_realm())) {
- $user .= '@' . rcube_utils::idn_to_ascii(preg_replace('/^@/', '', $realm));
+ $user .= '@' . rcube_idn_to_ascii(preg_replace('/^@/', '', $realm));
}
$username = $user;
}
@@ -459,7 +459,7 @@ class acl extends rcube_plugin
if ($user != $_SESSION['username'] && $username != $_SESSION['username']) {
if ($this->rc->storage->set_acl($mbox, $user, $acl)) {
- $ret = array('id' => rcube_utils::html_identifier($user),
+ $ret = array('id' => html_identifier($user),
'username' => $username, 'acl' => implode($acl), 'old' => $oldid);
$this->rc->output->command('acl_update', $ret);
$result++;
@@ -480,15 +480,15 @@ class acl extends rcube_plugin
*/
private function action_delete()
{
- $mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)); //UTF7-IMAP
- $user = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_GPC));
+ $mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true)); //UTF7-IMAP
+ $user = trim(get_input_value('_user', RCUBE_INPUT_GPC));
$user = explode(',', $user);
foreach ($user as $u) {
$u = trim($u);
if ($this->rc->storage->delete_acl($mbox, $u)) {
- $this->rc->output->command('acl_remove_row', rcube_utils::html_identifier($u));
+ $this->rc->output->command('acl_remove_row', html_identifier($u));
}
else {
$error = true;
@@ -512,8 +512,8 @@ class acl extends rcube_plugin
return;
}
- $this->mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)); // UTF7-IMAP
- $advanced = trim(rcube_utils::get_input_value('_mode', rcube_utils::INPUT_GPC));
+ $this->mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true)); // UTF7-IMAP
+ $advanced = trim(get_input_value('_mode', RCUBE_INPUT_GPC));
$advanced = $advanced == 'advanced' ? true : false;
// Save state in user preferences
@@ -548,12 +548,12 @@ class acl extends rcube_plugin
foreach ($supported as $right) {
if (in_array($right, $rights)) {
- $list[] = html::tag('li', null, rcube::Q($this->gettext('acl' . $right)));
+ $list[] = html::tag('li', null, Q($this->gettext('acl' . $right)));
}
}
if (count($list) == count($supported))
- return rcube::Q($this->gettext('aclfull'));
+ return Q($this->gettext('aclfull'));
return html::tag('ul', $attrib, implode("\n", $list));
}
diff --git a/plugins/acl/config.inc.php.dist b/plugins/acl/config.inc.php.dist
index 3f0b1efb6..f957a233a 100644
--- a/plugins/acl/config.inc.php.dist
+++ b/plugins/acl/config.inc.php.dist
@@ -3,23 +3,17 @@
// Default look of access rights table
// In advanced mode all access rights are displayed separately
// In simple mode access rights are grouped into four groups: read, write, delete, full
-$config['acl_advanced_mode'] = false;
+$rcmail_config['acl_advanced_mode'] = false;
// LDAP addressbook that would be searched for user names autocomplete.
-// That should be an array refering to the $config['ldap_public'] array key
+// That should be an array refering to the $rcmail_config['ldap_public'] array key
// or complete addressbook configuration array.
-$config['acl_users_source'] = '';
+$rcmail_config['acl_users_source'] = '';
// The LDAP attribute which will be used as ACL user identifier
-$config['acl_users_field'] = 'mail';
+$rcmail_config['acl_users_field'] = 'mail';
// The LDAP search filter will be &'d with search queries
-$config['acl_users_filter'] = '';
-
-// Include the following 'special' access control subjects in the ACL dialog;
-// Defaults to array('anyone', 'anonymous') (not when set to an empty array)
-// Example: array('anyone') to exclude 'anonymous'.
-// Set to an empty array to exclude all special aci subjects.
-$config['acl_specials'] = array('anyone', 'anonymous');
+$rcmail_config['acl_users_filter'] = '';
?>
diff --git a/plugins/acl/localization/az_AZ.inc b/plugins/acl/localization/az_AZ.inc
index 5d875a2b7..d5543ddaa 100644
--- a/plugins/acl/localization/az_AZ.inc
+++ b/plugins/acl/localization/az_AZ.inc
@@ -89,7 +89,7 @@ $messages['saving'] = 'Giriş hüququnun saxlanılması...';
$messages['updatesuccess'] = 'Giriş hüququ dəyişdirildi';
$messages['deletesuccess'] = 'Giriş hüququ silindi';
$messages['createsuccess'] = 'Giriş hüququ əlavə edildi';
-$messages['updateerror'] = 'Hüquqları yeniləmək alınmadı';
+$messages['updateerror'] = 'Giriş hüququnu yeniləmək mümkün deyil';
$messages['deleteerror'] = 'Giriş hüququnu silmək mümkün deyil';
$messages['createerror'] = 'Giriş hüququnu əlavə etmək mümkün deyil';
$messages['deleteconfirm'] = 'Seçilmiş istifadəçilərin giriş hüququnu silməkdə əminsiniz?';
diff --git a/plugins/acl/localization/be_BE.inc b/plugins/acl/localization/be_BE.inc
new file mode 100644
index 000000000..bce5915f0
--- /dev/null
+++ b/plugins/acl/localization/be_BE.inc
@@ -0,0 +1,90 @@
+<?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['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/bg_BG.inc b/plugins/acl/localization/bg_BG.inc
new file mode 100644
index 000000000..2e3c57dcf
--- /dev/null
+++ b/plugins/acl/localization/bg_BG.inc
@@ -0,0 +1,90 @@
+<?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['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/el_GR.inc b/plugins/acl/localization/el_GR.inc
new file mode 100644
index 000000000..56e1081b3
--- /dev/null
+++ b/plugins/acl/localization/el_GR.inc
@@ -0,0 +1,90 @@
+<?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['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/en_US.inc b/plugins/acl/localization/en_US.inc
index 3c61266be..8eebdc60c 100644
--- a/plugins/acl/localization/en_US.inc
+++ b/plugins/acl/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/acl/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail ACL plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -89,7 +89,7 @@ $messages['saving'] = 'Saving access rights...';
$messages['updatesuccess'] = 'Successfully changed access rights';
$messages['deletesuccess'] = 'Successfully deleted access rights';
$messages['createsuccess'] = 'Successfully added access rights';
-$messages['updateerror'] = 'Unable to update access rights';
+$messages['updateerror'] = 'Ubable to update access rights';
$messages['deleteerror'] = 'Unable to delete access rights';
$messages['createerror'] = 'Unable to add access rights';
$messages['deleteconfirm'] = 'Are you sure, you want to remove access rights of selected user(s)?';
diff --git a/plugins/acl/localization/es_AR.inc b/plugins/acl/localization/es_AR.inc
new file mode 100644
index 000000000..0fa111167
--- /dev/null
+++ b/plugins/acl/localization/es_AR.inc
@@ -0,0 +1,89 @@
+<?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'] = 'Compartiendo';
+$labels['myrights'] = 'Permisos de acceso';
+$labels['username'] = 'Usuario:';
+$labels['advanced'] = 'modo avanzado';
+$labels['newuser'] = 'Agregar entrada';
+$labels['actions'] = 'Acciones para los permisos de acceso...';
+$labels['anyone'] = 'Todos los usuarios (cualquiera)';
+$labels['anonymous'] = 'Invitado (anonimo)';
+$labels['identifier'] = 'Identificacion';
+$labels['acll'] = 'Buscar';
+$labels['aclr'] = 'Leer mensajes';
+$labels['acls'] = 'Mantener como visualizado';
+$labels['aclw'] = 'Escribir marcadores';
+$labels['acli'] = 'Insertar (Copiar en)';
+$labels['aclp'] = 'Publicar';
+$labels['aclc'] = 'Crear subcarpetas';
+$labels['aclk'] = 'Crear subcarpetas';
+$labels['acld'] = 'Eliminar mensajes';
+$labels['aclt'] = 'Eliminar mensajes';
+$labels['acle'] = 'Descartar';
+$labels['aclx'] = 'Eliminar carpeta';
+$labels['acla'] = 'Administrar';
+$labels['aclfull'] = 'Control total';
+$labels['aclother'] = 'Otro';
+$labels['aclread'] = 'Leer';
+$labels['aclwrite'] = 'Escribir';
+$labels['acldelete'] = 'Eliminar';
+$labels['shortacll'] = 'Buscar';
+$labels['shortaclr'] = 'Leer';
+$labels['shortacls'] = 'Mantener';
+$labels['shortaclw'] = 'Escribir';
+$labels['shortacli'] = 'Insertar';
+$labels['shortaclp'] = 'Publicar';
+$labels['shortaclc'] = 'Crear';
+$labels['shortaclk'] = 'Crear';
+$labels['shortacld'] = 'Eliminar';
+$labels['shortaclt'] = 'Eliminar';
+$labels['shortacle'] = 'Descartar';
+$labels['shortaclx'] = 'Borrado de carpeta';
+$labels['shortacla'] = 'Administrar';
+$labels['shortaclother'] = 'Otro';
+$labels['shortaclread'] = 'Leer';
+$labels['shortaclwrite'] = 'Escribir';
+$labels['shortacldelete'] = 'Eliminar';
+$labels['longacll'] = 'La carpeta es visible en listas y es posible suscribirse a ella';
+$labels['longaclr'] = 'La carpeta se puede abirir para lectura';
+$labels['longacls'] = 'El marcador de Mensajes Vistos puede ser modificado';
+$labels['longaclw'] = 'Los marcadores de mensajes y palabras clave se pueden modificar, excepto Visto y Eliminado';
+$labels['longacli'] = 'En esta carpeta se pueden escribir o copiar mensajes';
+$labels['longaclp'] = 'En esta carpeta se pueden publicar mensajes';
+$labels['longaclc'] = 'Debajo de esta carpeta se puede crear (o renombrar) otras carpetas directamente';
+$labels['longaclk'] = 'Debajo de esta carpeta se puede crear (o renombrar) otras carpetas directamente';
+$labels['longacld'] = 'El marcador de Mensaje Eliminado puede ser modificado';
+$labels['longaclt'] = 'El marcador de Mensaje Eliminado puede ser modificado';
+$labels['longacle'] = 'Los mensajes pueden ser descartados';
+$labels['longaclx'] = 'La carpeta puede ser eliminada o renombrada';
+$labels['longacla'] = 'Los permisos de acceso de esta carpeta pueden ser modificados';
+$labels['longaclfull'] = 'Control total incluyendo la administracion de carpeta';
+$labels['longaclread'] = 'La carpeta se puede abrir para lectura';
+$labels['longaclwrite'] = 'En esta carpeta los mensajes pueden ser marcados, escritos o copiados';
+$labels['longacldelete'] = 'Los mensajes se pueden eliminar';
+$messages['deleting'] = 'Eliminando permisos de acceso...';
+$messages['saving'] = 'Salvando permisos de acceso...';
+$messages['updatesuccess'] = 'Permisos de acceso modificados satisfactoriamente';
+$messages['deletesuccess'] = 'Permisos de acceso eliminados correctamente';
+$messages['createsuccess'] = 'Permisos de acceso agregados satisfactoriamente';
+$messages['deleteerror'] = 'No se pueden eliminar los permisos de acceso';
+$messages['createerror'] = 'No se pueden agregar los permisos de acceso';
+$messages['deleteconfirm'] = 'Estas seguro que queres remover los permisos de acceso a el/los usuario(s) seleccionado/s?';
+$messages['norights'] = 'Ningun permiso ha sido especificado!';
+$messages['nouser'] = 'Ningun nombre de usuario ha sido especificado!';
+?>
diff --git a/plugins/acl/localization/et_EE.inc b/plugins/acl/localization/et_EE.inc
index ceec4cd0c..e41275a7d 100644
--- a/plugins/acl/localization/et_EE.inc
+++ b/plugins/acl/localization/et_EE.inc
@@ -73,8 +73,8 @@ $labels['longacli'] = 'Messages can be written or copied to the folder';
$labels['longaclp'] = 'Messages can be posted to this folder';
$labels['longaclc'] = 'Folders can be created (or renamed) directly under this folder';
$labels['longaclk'] = 'Folders can be created (or renamed) directly under this folder';
-$labels['longacld'] = 'Kirja kustutamis lippu saab muuta';
-$labels['longaclt'] = 'Kirja kustutamis lippu saab muuta';
+$labels['longacld'] = 'Messages Delete flag can be changed';
+$labels['longaclt'] = 'Messages Delete flag can be changed';
$labels['longacle'] = 'Kirju saab eemaldada';
$labels['longaclx'] = 'Seda kausta ei saa kustutada ega ümber nimetada';
$labels['longacla'] = 'Selle kausta ligipääsuõigusi saab muuta';
@@ -89,7 +89,7 @@ $messages['saving'] = 'Ligipääsuõiguste salvestamine...';
$messages['updatesuccess'] = 'Ligipääsuõigused on muudetud';
$messages['deletesuccess'] = 'Ligipääsuõigused on kustutatud';
$messages['createsuccess'] = 'Ligipääsuõigused on lisatud';
-$messages['updateerror'] = 'Ligipääsuõiguste uuendamine nurjus';
+$messages['updateerror'] = 'Unable to update access rights';
$messages['deleteerror'] = 'Ligipääsuõiguste kustutamine nurjus';
$messages['createerror'] = 'Ligipääsuõiguste andmine nurjus';
$messages['deleteconfirm'] = 'Oled sa kindel, et sa soovid valitudkasutaja(te) õiguseid kustutada?';
diff --git a/plugins/acl/localization/eu_ES.inc b/plugins/acl/localization/eu_ES.inc
new file mode 100644
index 000000000..4fa9f3b08
--- /dev/null
+++ b/plugins/acl/localization/eu_ES.inc
@@ -0,0 +1,90 @@
+<?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'] = 'Partekatzen';
+$labels['myrights'] = 'Sarbide-eskubideak';
+$labels['username'] = 'Erabiltzailea:';
+$labels['advanced'] = 'modu aurreratua';
+$labels['newuser'] = 'Gehitu sarrera';
+$labels['actions'] = 'Sarbide-eskubideen ekintzak...';
+$labels['anyone'] = 'Erabiltzaile guztiak (edozein)';
+$labels['anonymous'] = 'Gonbidatuak (anonimo)';
+$labels['identifier'] = 'Identifikatzailea';
+$labels['acll'] = 'Bilatu';
+$labels['aclr'] = 'Irakurri mezuak';
+$labels['acls'] = 'Mantendu ikusita egoera';
+$labels['aclw'] = 'Idatzi banderak';
+$labels['acli'] = 'Txertatu (kopiatu barnean)';
+$labels['aclp'] = 'Posta';
+$labels['aclc'] = 'Sortu azpikarpetak';
+$labels['aclk'] = 'Sortu azpikarpetak';
+$labels['acld'] = 'Ezabatu mezuak';
+$labels['aclt'] = 'Ezabatu mezuak';
+$labels['acle'] = 'Kendu';
+$labels['aclx'] = 'Ezabatu karpeta';
+$labels['acla'] = 'Administratu';
+$labels['aclfull'] = 'Kontrol osoa';
+$labels['aclother'] = 'Beste';
+$labels['aclread'] = 'Irakurri';
+$labels['aclwrite'] = 'Idatzi';
+$labels['acldelete'] = 'Ezabatu';
+$labels['shortacll'] = 'Bilatu';
+$labels['shortaclr'] = 'Irakurri';
+$labels['shortacls'] = 'Mantendu';
+$labels['shortaclw'] = 'Idatzi';
+$labels['shortacli'] = 'Txertatu';
+$labels['shortaclp'] = 'Bidali';
+$labels['shortaclc'] = 'Sortu';
+$labels['shortaclk'] = 'Sortu';
+$labels['shortacld'] = 'Ezabatu';
+$labels['shortaclt'] = 'Ezabatu';
+$labels['shortacle'] = 'Kendu';
+$labels['shortaclx'] = 'Ezabatu karpeta';
+$labels['shortacla'] = 'Administratu';
+$labels['shortaclother'] = 'Beste';
+$labels['shortaclread'] = 'Irakurri';
+$labels['shortaclwrite'] = 'Idatzi';
+$labels['shortacldelete'] = 'Ezabatu';
+$labels['longacll'] = 'Karpeta hau zerrendan ikusgai dago eta harpidetzen ahal zara';
+$labels['longaclr'] = 'Karpeta ireki daiteke irakurtzeko';
+$labels['longacls'] = 'Mezuen ikusita bandera aldatu daiteke';
+$labels['longaclw'] = 'Mezuen banderak eta gako-hitzak alda daitezke, ikusita eta ezabatuta salbu';
+$labels['longacli'] = 'Mezuak karpetara idatzi edo kopiatu daitezke';
+$labels['longaclp'] = 'Mezuak bidali daitezke karpeta honetara';
+$labels['longaclc'] = 'Karpetak sor daitezke (edo berrizendatu) zuzenean karpeta honetan';
+$labels['longaclk'] = 'Karpetak sor daitezke (edo berrizendatu) karpeta honetan';
+$labels['longacld'] = 'Mezuen ezabatu bandera alda daiteke';
+$labels['longaclt'] = 'Mezuen ezabatu bandera alda daiteke';
+$labels['longacle'] = 'Mezuak betiko ezaba daitezke';
+$labels['longaclx'] = 'Karpeta ezaba edo berrizenda daiteke';
+$labels['longacla'] = 'Karpetaren sarbide eskubideak alda daitezke';
+$labels['longaclfull'] = 'Kontrol osoa, karpetaren administrazioa barne';
+$labels['longaclread'] = 'Karpeta ireki daiteke irakurtzeko';
+$labels['longaclwrite'] = 'Mezuak marka, idatzi edo kopia daitezke karpetara';
+$labels['longacldelete'] = 'Mezuak ezaba daitezke';
+$messages['deleting'] = 'Sarbide-eskubideak ezabatzen...';
+$messages['saving'] = 'Sarbide-eskubideak gordetzen...';
+$messages['updatesuccess'] = 'Sarbide-eskubideak ongi aldatu dira';
+$messages['deletesuccess'] = 'Sarbide-eskubideak ongi ezabatu dira';
+$messages['createsuccess'] = 'Sarbide-eskubideak ongi gehitu dira';
+$messages['updateerror'] = 'Ezin dira eguneratu sarbide-eskubideak';
+$messages['deleteerror'] = 'Ezin dira ezabatu sarbide-eskubideak';
+$messages['createerror'] = 'Ezin dira gehitu sarbide-eskubideak';
+$messages['deleteconfirm'] = 'Seguru zaude hautatutako erabiltzaile(ar)en sarbide-eskubideak ezabatu nahi duzula?';
+$messages['norights'] = 'Eskubideak ez dira zehaztu!';
+$messages['nouser'] = 'Erabiltzaile-izana ez da zehaztu!';
+?>
diff --git a/plugins/acl/localization/fa_IR.inc b/plugins/acl/localization/fa_IR.inc
index 2face4fba..48fb8a225 100644
--- a/plugins/acl/localization/fa_IR.inc
+++ b/plugins/acl/localization/fa_IR.inc
@@ -22,51 +22,51 @@ $labels['username'] = 'کاربر:';
$labels['advanced'] = 'حالت پیشرفته';
$labels['newuser'] = 'افزودن مدخل';
$labels['actions'] = 'فعالیت‌های مجوز دسترسی...';
-$labels['anyone'] = 'همه‌ی کاربران (هر کسی)';
-$labels['anonymous'] = 'مهمان‌ها (ناشناس)';
+$labels['anyone'] = 'همه کاربران (هر کسی)';
+$labels['anonymous'] = 'مهمان‌ها (ناشناس‌ها)';
$labels['identifier'] = 'شناساگر';
$labels['acll'] = 'یافتن';
-$labels['aclr'] = 'پیغام‌های خوانده شده';
+$labels['aclr'] = 'پیام های خوانده شده';
$labels['acls'] = 'نگه داشتن حالت بازدید';
$labels['aclw'] = 'پرچم‌های نوشتن';
$labels['acli'] = 'وارد کردن (کپی کردن در)';
-$labels['aclp'] = 'ارسال';
+$labels['aclp'] = 'نوشته';
$labels['aclc'] = 'ایجاد زیرپوشه‌ها';
$labels['aclk'] = 'ایجاد زیرپوشه‌ها';
$labels['acld'] = 'پاک کردن پیغام‌ها';
$labels['aclt'] = 'پاک کردن پیغام‌ها';
$labels['acle'] = 'پاک کردن';
$labels['aclx'] = 'حذف پوشه';
-$labels['acla'] = 'مدیریت کردن';
+$labels['acla'] = 'مدیر';
$labels['aclfull'] = 'کنترل کامل';
$labels['aclother'] = 'دیگر';
-$labels['aclread'] = 'خواندن';
+$labels['aclread'] = 'خوانده شده';
$labels['aclwrite'] = 'نوشتن';
$labels['acldelete'] = 'حذف';
$labels['shortacll'] = 'یافتن';
-$labels['shortaclr'] = 'خواندن';
+$labels['shortaclr'] = 'خوانده شده';
$labels['shortacls'] = 'نگه داشتن';
$labels['shortaclw'] = 'نوشتن';
-$labels['shortacli'] = 'اضافه کردن';
-$labels['shortaclp'] = 'ارسال';
+$labels['shortacli'] = 'جاگذارى';
+$labels['shortaclp'] = 'نوشته';
$labels['shortaclc'] = 'ایجاد';
$labels['shortaclk'] = 'ایجاد';
$labels['shortacld'] = 'حذف';
$labels['shortaclt'] = 'حذف';
$labels['shortacle'] = 'پاک کردن';
$labels['shortaclx'] = 'حذف کردن پوشه';
-$labels['shortacla'] = 'مدیریت کردن';
+$labels['shortacla'] = 'مدیر';
$labels['shortaclother'] = 'دیگر';
-$labels['shortaclread'] = 'خواندن';
+$labels['shortaclread'] = 'خوانده شده';
$labels['shortaclwrite'] = 'نوشتن';
$labels['shortacldelete'] = 'حذف';
-$labels['longacll'] = 'پوشه را می‌توان در فهرست‌ها دید و در آن مشترک شد';
-$labels['longaclr'] = 'پوشه می‌تواند برای خوانده شدن باز شود';
+$labels['longacll'] = 'پوشه در فهرست‌ها قابل مشاهده است و می‌تواند مشترک به';
+$labels['longaclr'] = 'پوشه می‌تواند برای خواندن باز شود';
$labels['longacls'] = 'پرچم بازدید پیغام‌ها می‌تواند تغییر داده شود';
$labels['longaclw'] = 'پرچم و کلیدواژه پیغام‌ها می‌تواند تغییر داده شود، به غیر از بازدید و حذف';
$labels['longacli'] = 'پیغام‌ها می‌توانند کپی یا نوشته شوند به پوشه';
@@ -89,7 +89,7 @@ $messages['saving'] = 'ذخیره قوانین دسترسی...';
$messages['updatesuccess'] = 'قوانین دسترسی با موفقیت تغییر کردند';
$messages['deletesuccess'] = 'قوانین دسترسی با موفقیت حذف شدند';
$messages['createsuccess'] = 'قوانین دسترسی با موفقیت اضافه شدند';
-$messages['updateerror'] = 'ناتوانی در به روز کردن قوانین دسترسی';
+$messages['updateerror'] = 'ناتوانی در بروزرسانی قوانین دسترسی';
$messages['deleteerror'] = 'ناتوانی در حذف قوانین دسترسی';
$messages['createerror'] = 'ناتوانی در اضافه کردن قوانین دسترسی';
$messages['deleteconfirm'] = 'آیا شما مطمئن هستید که می‌خواهید قوانین دسترسی را برای کاربر(ان) انتخاب شده حذف نمایید؟';
diff --git a/plugins/acl/localization/fi_FI.inc b/plugins/acl/localization/fi_FI.inc
index e2b6899fa..1238b0fd3 100644
--- a/plugins/acl/localization/fi_FI.inc
+++ b/plugins/acl/localization/fi_FI.inc
@@ -41,7 +41,7 @@ $labels['aclx'] = 'Delete folder';
$labels['acla'] = 'Administer';
$labels['aclfull'] = 'Full control';
-$labels['aclother'] = 'Other';
+$labels['aclother'] = 'Muu';
$labels['aclread'] = 'Read';
$labels['aclwrite'] = 'Write';
$labels['acldelete'] = 'Delete';
@@ -66,7 +66,7 @@ $labels['shortaclwrite'] = 'Write';
$labels['shortacldelete'] = 'Delete';
$labels['longacll'] = 'The folder is visible on lists and can be subscribed to';
-$labels['longaclr'] = 'The folder can be opened for reading';
+$labels['longaclr'] = 'Kansion voi avata lukua varten';
$labels['longacls'] = 'Messages Seen flag can be changed';
$labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
$labels['longacli'] = 'Messages can be written or copied to the folder';
@@ -76,24 +76,24 @@ $labels['longaclk'] = 'Folders can be created (or renamed) directly under this f
$labels['longacld'] = 'Messages Delete flag can be changed';
$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['longaclx'] = 'Kansio voidaan poistaa tai nimetä uudelleen';
+$labels['longacla'] = 'Kansion käyttöoikeuksia voi muuttaa';
$labels['longaclfull'] = 'Full control including folder administration';
$labels['longaclread'] = 'The folder can be opened for reading';
$labels['longaclwrite'] = 'Messages can be marked, written or copied to the folder';
$labels['longacldelete'] = 'Messages can be deleted';
-$messages['deleting'] = 'Deleting access rights...';
-$messages['saving'] = 'Saving access rights...';
-$messages['updatesuccess'] = 'Successfully changed access rights';
-$messages['deletesuccess'] = 'Successfully deleted access rights';
-$messages['createsuccess'] = 'Successfully added access rights';
-$messages['updateerror'] = 'Ubable to update access rights';
-$messages['deleteerror'] = 'Unable to delete access rights';
-$messages['createerror'] = 'Unable to add access rights';
+$messages['deleting'] = 'Poistetaan käyttöoikeuksia...';
+$messages['saving'] = 'Tallennetaan käyttöoikeuksia...';
+$messages['updatesuccess'] = 'Käyttöoikeuksia muutettiin onnistuneesti';
+$messages['deletesuccess'] = 'Käyttöoikeuksia poistettiin onnistuneesti';
+$messages['createsuccess'] = 'Käyttöoikeuksia lisättiin onnistuneesti';
+$messages['updateerror'] = 'Käyttöoikeuksien päivitys epäonnistui';
+$messages['deleteerror'] = 'Käyttöoikeuksien poistaminen epäonnistui';
+$messages['createerror'] = 'Käyttöoikeuksien lisääminen epäonnistui';
$messages['deleteconfirm'] = 'Are you sure, you want to remove access rights of selected user(s)?';
-$messages['norights'] = 'No rights has been specified!';
-$messages['nouser'] = 'No username has been specified!';
+$messages['norights'] = 'Oikeuksia ei ole määritelty!';
+$messages['nouser'] = 'Käyttäjänimeä ei ole määritelty!';
?>
diff --git a/plugins/acl/localization/gl_ES.inc b/plugins/acl/localization/gl_ES.inc
index 2349975de..bb8837190 100644
--- a/plugins/acl/localization/gl_ES.inc
+++ b/plugins/acl/localization/gl_ES.inc
@@ -28,15 +28,15 @@ $labels['identifier'] = 'Identificador';
$labels['acll'] = 'Bloquear';
$labels['aclr'] = 'Ler mensaxes';
-$labels['acls'] = 'Manter o estado coma visto';
-$labels['aclw'] = 'Marcas de lectura';
-$labels['acli'] = 'Engadir (Copiar en)';
-$labels['aclp'] = 'Envío';
+$labels['acls'] = 'Keep Seen state';
+$labels['aclw'] = 'Write flags';
+$labels['acli'] = 'Insert (Copy into)';
+$labels['aclp'] = 'Post';
$labels['aclc'] = 'Crear subcartafoles';
$labels['aclk'] = 'Crear subcartafoles';
$labels['acld'] = 'Borrar mensaxes';
$labels['aclt'] = 'Borrar mensaxes';
-$labels['acle'] = 'Expurga';
+$labels['acle'] = 'Expunge';
$labels['aclx'] = 'Eliminar carpeta';
$labels['acla'] = 'Administrar';
@@ -51,12 +51,12 @@ $labels['shortaclr'] = 'Ler';
$labels['shortacls'] = 'Manter';
$labels['shortaclw'] = 'Escribir';
$labels['shortacli'] = 'Insertar';
-$labels['shortaclp'] = 'Envío';
+$labels['shortaclp'] = 'Post';
$labels['shortaclc'] = 'Crear';
$labels['shortaclk'] = 'Crear';
$labels['shortacld'] = 'Borrar';
$labels['shortaclt'] = 'Borrar';
-$labels['shortacle'] = 'Expurga';
+$labels['shortacle'] = 'Expunge';
$labels['shortaclx'] = 'Borrar cartafol';
$labels['shortacla'] = 'Administrar';
@@ -66,33 +66,33 @@ $labels['shortaclwrite'] = 'Escritura';
$labels['shortacldelete'] = 'Borrado';
$labels['longacll'] = 'O cartafol é visible e pode ser suscrito';
-$labels['longaclr'] = 'Pódese abrir o cartafol para lectura';
-$labels['longacls'] = 'Pódese mudar o marcador de Mensaxes Enviadas';
-$labels['longaclw'] = 'Pódense mudar marcadores e palabras chave agás Olladas e Borradas';
-$labels['longacli'] = 'Pódense escreber ou copiar as mensaxes a este cartafol';
-$labels['longaclp'] = 'Pódense enviar as mensaxes a este cartafol';
-$labels['longaclc'] = 'Pódense crear (ou renomear) os cartafois directamente baixo deste cartafol';
-$labels['longaclk'] = 'Pódense crear (ou renomear) os cartafois directamente baixo deste cartafol';
-$labels['longacld'] = 'Pódense mudar as mensaxes coa marca de Borrado';
-$labels['longaclt'] = 'Pódense mudar as mensaxes coa marca de Borrado';
-$labels['longacle'] = 'Pódense eliminar as mensaxes';
-$labels['longaclx'] = 'Pódese borrar ou renomear o cartafol';
-$labels['longacla'] = 'Pódense mudar os dereitos de acceso ao cartafol';
+$labels['longaclr'] = 'The folder can be opened for reading';
+$labels['longacls'] = 'Messages Seen flag can be changed';
+$labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
+$labels['longacli'] = 'Messages can be written or copied to the folder';
+$labels['longaclp'] = 'Messages can be posted to this folder';
+$labels['longaclc'] = 'Folders can be created (or renamed) directly under this folder';
+$labels['longaclk'] = 'Folders can be created (or renamed) directly under this folder';
+$labels['longacld'] = 'Messages Delete flag can be changed';
+$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['longaclfull'] = 'Control total inclúe administración de cartafois';
-$labels['longaclread'] = 'Pódese abrir o cartafol para lectura';
-$labels['longaclwrite'] = 'Pódense marcar, escribir ou copiar as mensaxes no cartafol';
-$labels['longacldelete'] = 'Pódense borrar as mensaxes';
+$labels['longaclfull'] = 'Full control including folder administration';
+$labels['longaclread'] = 'The folder can be opened for reading';
+$labels['longaclwrite'] = 'Messages can be marked, written or copied to the folder';
+$labels['longacldelete'] = 'Messages can be deleted';
-$messages['deleting'] = 'Borrando dereitos de acceso...';
-$messages['saving'] = 'Gardando dereitos de acceso...';
-$messages['updatesuccess'] = 'Mudados con éxito os dereitos de acceso';
-$messages['deletesuccess'] = 'Borrados con éxito os dereitos de acceso';
-$messages['createsuccess'] = 'Engadidos con éxito os dereitos de acceso';
-$messages['updateerror'] = 'Non se poden actualizar os dereitos de acceso';
-$messages['deleteerror'] = 'Non se poden borrar os dereitos de acceso';
-$messages['createerror'] = 'Non se poden engadir dereitos de acceso';
-$messages['deleteconfirm'] = 'De certo quere eliminar os dereitos de acceso do usuario(s) escollido?';
+$messages['deleting'] = 'Deleting access rights...';
+$messages['saving'] = 'Saving access rights...';
+$messages['updatesuccess'] = 'Successfully changed access rights';
+$messages['deletesuccess'] = 'Successfully deleted access rights';
+$messages['createsuccess'] = 'Successfully added access rights';
+$messages['updateerror'] = 'Ubable to update access rights';
+$messages['deleteerror'] = 'Unable to delete access rights';
+$messages['createerror'] = 'Unable to add access rights';
+$messages['deleteconfirm'] = 'Are you sure, you want to remove access rights of selected user(s)?';
$messages['norights'] = 'Non se especificaron permisos!';
$messages['nouser'] = 'Non se especificou o nome de usuario!';
diff --git a/plugins/acl/localization/he_IL.inc b/plugins/acl/localization/he_IL.inc
index 9ca305d32..d7b027a40 100644
--- a/plugins/acl/localization/he_IL.inc
+++ b/plugins/acl/localization/he_IL.inc
@@ -89,7 +89,7 @@ $messages['saving'] = 'זכויות גישה נשמרות...';
$messages['updatesuccess'] = 'זכויות גישה שונו בהצלחה';
$messages['deletesuccess'] = 'זכויות גישה נמחקו בהצלחה';
$messages['createsuccess'] = 'זכויות גישה נוספו בהצלחה';
-$messages['updateerror'] = 'לא ניתן לעדכן הרשאות גישה';
+$messages['updateerror'] = 'לא ניתן לעדכן זכויות גישה';
$messages['deleteerror'] = 'לא ניתן למחוק זכויות גישה';
$messages['createerror'] = 'לא ניתן להוסיף זכויות גישה';
$messages['deleteconfirm'] = 'האם ודאי שברצונך להסיר זכויות גישה של המשתמש(ים) שנבחרו?';
diff --git a/plugins/acl/localization/lb_LU.inc b/plugins/acl/localization/lb_LU.inc
index b9891931c..be03a7297 100644
--- a/plugins/acl/localization/lb_LU.inc
+++ b/plugins/acl/localization/lb_LU.inc
@@ -15,7 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/
*/
-
$labels['sharing'] = 'Sharing';
$labels['myrights'] = 'Zougrëffsrechter';
$labels['username'] = 'Benotzer:';
@@ -25,27 +24,19 @@ $labels['actions'] = 'Optioune fir d\'Zougrëffsrechter';
$labels['anyone'] = 'All d\'Benotzer (jiddwereen)';
$labels['anonymous'] = 'Gaascht (anonym)';
$labels['identifier'] = 'Identifiant';
-
$labels['acll'] = 'Noschloen';
$labels['aclr'] = 'Messagë liesen';
$labels['acls'] = 'Lies-Status behalen';
-$labels['aclw'] = 'Write flags';
-$labels['acli'] = 'Insert (Copy into)';
-$labels['aclp'] = 'Post';
-$labels['aclc'] = 'Create subfolders';
-$labels['aclk'] = 'Create subfolders';
$labels['acld'] = 'Messagë läschen';
$labels['aclt'] = 'Messagë läschen';
$labels['acle'] = 'Ausläschen';
$labels['aclx'] = 'Dossier läschen';
$labels['acla'] = 'Administréieren';
-
$labels['aclfull'] = 'Voll Kontroll';
$labels['aclother'] = 'Aner';
$labels['aclread'] = 'Liesen';
$labels['aclwrite'] = 'Schreiwen';
$labels['acldelete'] = 'Läschen';
-
$labels['shortacll'] = 'Noschloen';
$labels['shortaclr'] = 'Liesen';
$labels['shortacls'] = 'Halen';
@@ -59,31 +50,11 @@ $labels['shortaclt'] = 'Läschen';
$labels['shortacle'] = 'Ausläschen';
$labels['shortaclx'] = 'Dossier läschen';
$labels['shortacla'] = 'Administréieren';
-
$labels['shortaclother'] = 'Aner';
$labels['shortaclread'] = 'Liesen';
$labels['shortaclwrite'] = 'Schreiwen';
$labels['shortacldelete'] = 'Läschen';
-
-$labels['longacll'] = 'The folder is visible on lists and can be subscribed to';
-$labels['longaclr'] = 'The folder can be opened for reading';
-$labels['longacls'] = 'Messages Seen flag can be changed';
-$labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
-$labels['longacli'] = 'Messages can be written or copied to the folder';
-$labels['longaclp'] = 'Messages can be posted to this folder';
-$labels['longaclc'] = 'Folders can be created (or renamed) directly under this folder';
-$labels['longaclk'] = 'Folders can be created (or renamed) directly under this folder';
-$labels['longacld'] = 'Messages Delete flag can be changed';
-$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['longaclfull'] = 'Full control including folder administration';
-$labels['longaclread'] = 'The folder can be opened for reading';
-$labels['longaclwrite'] = 'Messages can be marked, written or copied to the folder';
$labels['longacldelete'] = 'Messagë kënne geläscht ginn';
-
$messages['deleting'] = 'Zougrëffsrechter gi geläscht...';
$messages['saving'] = 'Zougrëffsrechter gi gespäichert...';
$messages['updatesuccess'] = 'Rechter erfollegräich geännert';
@@ -95,5 +66,4 @@ $messages['createerror'] = 'Zougrëffsrechter kënnen net dobäigesat ginn';
$messages['deleteconfirm'] = 'Bass du dir sécher, dass du d\'Zougrëffsrechter fir déi ausgewielte Benotzer wëlls ewechhuelen?';
$messages['norights'] = 'Et goufe keng Rechter uginn! ';
$messages['nouser'] = 'Et gouf kee Benotzernumm uginn!';
-
?>
diff --git a/plugins/acl/localization/lt_LT.inc b/plugins/acl/localization/lt_LT.inc
index 39a4d1be2..59393012f 100644
--- a/plugins/acl/localization/lt_LT.inc
+++ b/plugins/acl/localization/lt_LT.inc
@@ -89,7 +89,7 @@ $messages['saving'] = 'Išsaugomos prieigos teisės';
$messages['updatesuccess'] = 'Prieigos teisės sėkmingai pakeistos';
$messages['deletesuccess'] = 'Prieigos teisės sėkmingai panaikintos';
$messages['createsuccess'] = 'Prieigos teisės sėkmingai pridėtos';
-$messages['updateerror'] = 'Nepavyko pakeisti prieigos teisių';
+$messages['updateerror'] = 'Neįmanoma atnaujinti prieigos teises';
$messages['deleteerror'] = 'Neįmanoma panaikinti prieigos teises';
$messages['createerror'] = 'Neišeina pridėti prieigos teises';
$messages['deleteconfirm'] = 'Ar jūs esate įsitikinę, jog norite panaikinti prieigos teises pažymėtiems vartotojams(-ui)?';
diff --git a/plugins/acl/localization/lv_LV.inc b/plugins/acl/localization/lv_LV.inc
new file mode 100644
index 000000000..cadb34ae2
--- /dev/null
+++ b/plugins/acl/localization/lv_LV.inc
@@ -0,0 +1,90 @@
+<?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'] = 'Dalīšanās';
+$labels['myrights'] = 'Piekļuves tiesības';
+$labels['username'] = 'Lietotājs:';
+$labels['advanced'] = 'paplašinātais režīms';
+$labels['newuser'] = 'Pievienot ierakstu';
+$labels['actions'] = 'Darbības ar piekļuves tiesībām...';
+$labels['anyone'] = 'Visi lietotāji (ikviens)';
+$labels['anonymous'] = 'Viesi (anonīmie)';
+$labels['identifier'] = 'Identifikators';
+$labels['acll'] = 'Atrast';
+$labels['aclr'] = 'Lasīt ziņojumus';
+$labels['acls'] = 'Paturēt "Redzētā" statusu';
+$labels['aclw'] = 'Saglabāt atzīmes';
+$labels['acli'] = 'Ievietot (Iekopēt)';
+$labels['aclp'] = 'Nosūtīt';
+$labels['aclc'] = 'Izveidot apakšmapes';
+$labels['aclk'] = 'Izveidot apakšmapes';
+$labels['acld'] = 'Dzēst ziņojumus';
+$labels['aclt'] = 'Dzēst ziņojumus';
+$labels['acle'] = 'Izdzēst';
+$labels['aclx'] = 'Dzēst mapi';
+$labels['acla'] = 'Pārvaldīt';
+$labels['aclfull'] = 'Pilna kontrole';
+$labels['aclother'] = 'Cits';
+$labels['aclread'] = 'Lasīt';
+$labels['aclwrite'] = 'Rakstīt';
+$labels['acldelete'] = 'Dzēst';
+$labels['shortacll'] = 'Atrast';
+$labels['shortaclr'] = 'Lasīt';
+$labels['shortacls'] = 'Paturēt';
+$labels['shortaclw'] = 'Rakstīt';
+$labels['shortacli'] = 'Ievietot';
+$labels['shortaclp'] = 'Nosūtīt';
+$labels['shortaclc'] = 'Izveidot';
+$labels['shortaclk'] = 'Izveidot';
+$labels['shortacld'] = 'Dzēst';
+$labels['shortaclt'] = 'Dzēst';
+$labels['shortacle'] = 'Izdzēst';
+$labels['shortaclx'] = 'Mapju dzēšana';
+$labels['shortacla'] = 'Pārvaldīt';
+$labels['shortaclother'] = 'Cits';
+$labels['shortaclread'] = 'Lasīt';
+$labels['shortaclwrite'] = 'Rakstīt';
+$labels['shortacldelete'] = 'Dzēst';
+$labels['longacll'] = 'Mape ir redzama kopējā mapju sarakstā un var tikt abonēta';
+$labels['longaclr'] = 'Ši mape var tikt atvērta lasīšanai';
+$labels['longacls'] = 'Ziņojumu "Redzēts" atzīme var tik mainīta';
+$labels['longaclw'] = 'Ziņojumu atzīmes, izņemot "Redzēts" un "Dzēsts", un atslēgvārdi var tik mainīti';
+$labels['longacli'] = 'Ziņojumi var tikt ierakstīti vai pārkopēti uz šo mapi';
+$labels['longaclp'] = 'Vēstules var tikt ievietotas šajā mapē';
+$labels['longaclc'] = 'Zem šīs mapes pa tiešo var tikt izveidotas (vai pārsauktas) citas mapes';
+$labels['longaclk'] = 'Zem šīs mapes pa tiešo var tikt izveidotas (vai pārsauktas) citas mapes';
+$labels['longacld'] = 'Ziņojumu "Dzēst" atzīme var tikt mainīta';
+$labels['longaclt'] = 'Ziņojumu "Dzēst" atzīme var tikt mainīta';
+$labels['longacle'] = 'Vēstules var tikt izdzēstas';
+$labels['longaclx'] = 'Mape var tikt gan dzēsta, gan pārdēvēta';
+$labels['longacla'] = 'Mapes pieejas tiesības var tikt izmainītas';
+$labels['longaclfull'] = 'Pilna kontrole, iekļaujot arī mapju administrēšanu';
+$labels['longaclread'] = 'Mape var tikt atvērta lasīšanai';
+$labels['longaclwrite'] = 'Ziņojumi mapē var tikt gan atzīmēti, gan ierakstīti vai arī pārkopēti uz mapi';
+$labels['longacldelete'] = 'Vēstules var tikt izdzēstas';
+$messages['deleting'] = 'Dzēš piekļuves tiesības...';
+$messages['saving'] = 'Saglabā piekļuves tiesības...';
+$messages['updatesuccess'] = 'Piekļuves tiesības tika veiksmīgi samainītas';
+$messages['deletesuccess'] = 'Piekļuves tiesības tika veiksmīgi izdzēstas';
+$messages['createsuccess'] = 'Piekļuves tiesības tika veiksmīgi pievienotas';
+$messages['updateerror'] = 'Pieejas tiesības nomainīt neizdevās';
+$messages['deleteerror'] = 'Piekļuves tiesības izdzēst neizdevās';
+$messages['createerror'] = 'Piekļuves tiesības pievienot neizdevās';
+$messages['deleteconfirm'] = 'Vai tiešām atzīmētajiem lietotājiem noņemt piekļuves tiesības?';
+$messages['norights'] = 'Netika norādītas tiesības!';
+$messages['nouser'] = 'Netika norādīts lietotājvārds!';
+?>
diff --git a/plugins/acl/localization/pl_PL.inc b/plugins/acl/localization/pl_PL.inc
index 69a5e0c05..73c0fc4fb 100644
--- a/plugins/acl/localization/pl_PL.inc
+++ b/plugins/acl/localization/pl_PL.inc
@@ -89,7 +89,7 @@ $messages['saving'] = 'Zapisywanie praw dostępu...';
$messages['updatesuccess'] = 'Pomyślnie zmieniono prawa dostępu';
$messages['deletesuccess'] = 'Pomyślnie usunięto prawa dostępu';
$messages['createsuccess'] = 'Pomyślnie dodano prawa dostępu';
-$messages['updateerror'] = 'Nie udało się zaktualizować praw dostępu';
+$messages['updateerror'] = 'Nie udało się zmienić praw dostępu';
$messages['deleteerror'] = 'Nie udało się usunąć praw dostępu';
$messages['createerror'] = 'Nie udało się dodać praw dostępu';
$messages['deleteconfirm'] = 'Czy na pewno chcesz usunąć prawa wybranym użytkownikom?';
diff --git a/plugins/acl/localization/ro_RO.inc b/plugins/acl/localization/ro_RO.inc
index e87524a6c..17124e48b 100644
--- a/plugins/acl/localization/ro_RO.inc
+++ b/plugins/acl/localization/ro_RO.inc
@@ -28,7 +28,7 @@ $labels['identifier'] = 'Identificator';
$labels['acll'] = 'Caută';
$labels['aclr'] = 'Citire mesaje';
-$labels['acls'] = 'Menține starea de Vâzut';
+$labels['acls'] = 'Menține starea citirii';
$labels['aclw'] = 'Indicator scriere';
$labels['acli'] = 'Inserare (copiere în)';
$labels['aclp'] = 'Postează';
@@ -65,7 +65,7 @@ $labels['shortaclread'] = 'Citeşte';
$labels['shortaclwrite'] = 'Scrie';
$labels['shortacldelete'] = 'Șterge';
-$labels['longacll'] = 'Dosarul este vizibil pe liste și se poate înscrie pe el';
+$labels['longacll'] = 'Dosarul este vizibil pe liste și se poate subscrie la acesta';
$labels['longaclr'] = 'Dosarul se poate deschide pentru citire';
$labels['longacls'] = 'Indicatorul de Văzut a fost schimbat';
$labels['longaclw'] = 'Indicatoarele și cuvintele cheie ale mesajelor se pot schimba cu excepția Văzut și Șters';
@@ -73,8 +73,8 @@ $labels['longacli'] = 'Mesajul se poate scrie sau copia într-un dosar';
$labels['longaclp'] = 'Mesajele se pot trimite către acest dosar';
$labels['longaclc'] = 'Dosarele se pot crea (sau redenumi) direct sub acest dosar';
$labels['longaclk'] = 'Dosarele se pot crea (sau redenumi) direct sub acest dosar';
-$labels['longacld'] = 'Indicatorul de Șters al mesajelor se pot modifica';
-$labels['longaclt'] = 'Indicatorul de Șters al mesajelor se pot modifica';
+$labels['longacld'] = 'Indicatorul de Șters al mesajelor se poate modifica';
+$labels['longaclt'] = 'Indicatorul de Șters al mesajelor se poate modifica';
$labels['longacle'] = 'Mesajele se pot elimina';
$labels['longaclx'] = 'Dosarul se poate șterge sau redenumi';
$labels['longacla'] = 'Drepturile de acces la dosar se pot schimba';
@@ -82,18 +82,18 @@ $labels['longacla'] = 'Drepturile de acces la dosar se pot schimba';
$labels['longaclfull'] = 'Control complet include și administrare dosar';
$labels['longaclread'] = 'Dosarul se poate deschide pentru citire';
$labels['longaclwrite'] = 'Mesajul se poate marca, scrie sau copia într-un dosar';
-$labels['longacldelete'] = 'Mesajul se poate șterge';
+$labels['longacldelete'] = 'Mesajele se pot șterge';
-$messages['deleting'] = 'Drepturile de acces la ștergere...';
-$messages['saving'] = 'Drepturile de acces la salvare...';
+$messages['deleting'] = 'Șterg drepturile de access...';
+$messages['saving'] = 'Salvez drepturi accesare...';
$messages['updatesuccess'] = 'Drepturile de acces au fost schimbate cu succes';
$messages['deletesuccess'] = 'Drepturile de acces au fost șterse cu succes';
$messages['createsuccess'] = 'Drepturile de acces au fost adăugate cu succes';
-$messages['updateerror'] = 'Nu sau putut actualiza drepturile de acces';
-$messages['deleteerror'] = 'Nu sau putut șterge drepturile de acces';
-$messages['createerror'] = 'Nu sau putut adăuga drepturi de acces';
-$messages['deleteconfirm'] = 'Sunteți sigur că doriți să ștergeți drepturile de acces la utilizatorul(i) selectați?';
+$messages['updateerror'] = 'Unable to update access rights';
+$messages['deleteerror'] = 'Nu s-au putut șterge drepturile de acces';
+$messages['createerror'] = 'Nu s-au putut adăuga drepturi de acces';
+$messages['deleteconfirm'] = 'Sunteți sigur că doriți să ștergeți drepturile de acces la utilizatorul (ii) selectați?';
$messages['norights'] = 'Nu au fost specificate drepturi!';
-$messages['nouser'] = 'Nu a fost specificat nume de utilizator!';
+$messages['nouser'] = 'Nu a fost specificat niciun utilizator!';
?>
diff --git a/plugins/acl/localization/th_TH.inc b/plugins/acl/localization/th_TH.inc
new file mode 100644
index 000000000..8eb1d279c
--- /dev/null
+++ b/plugins/acl/localization/th_TH.inc
@@ -0,0 +1,50 @@
+<?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['anyone'] = 'ผู้ใช้งานทั้งหมด (ใครก็ได้)';
+$labels['anonymous'] = 'ผู้เยี่ยมชม (คนแปลกหน้า)';
+$labels['aclr'] = 'อ่านข้อความ';
+$labels['acli'] = 'แทรก (คัดลอกไปไว้)';
+$labels['aclp'] = 'โพสต์';
+$labels['aclc'] = 'สร้างโฟลเดอร์ย่อย';
+$labels['aclk'] = 'สร้างโฟลเดอร์ย่อย';
+$labels['acld'] = 'ลบข้อความ';
+$labels['aclt'] = 'ลบข้อความ';
+$labels['aclx'] = 'ลบโฟลเดอร์';
+$labels['aclother'] = 'อื่นๆ';
+$labels['aclread'] = 'อ่าน';
+$labels['aclwrite'] = 'เขียน';
+$labels['acldelete'] = 'ลบ';
+$labels['shortaclr'] = 'อ่าน';
+$labels['shortaclw'] = 'เขียน';
+$labels['shortacli'] = 'แทรก';
+$labels['shortaclp'] = 'โพสต์';
+$labels['shortaclc'] = 'สร้าง';
+$labels['shortaclk'] = 'สร้าง';
+$labels['shortacld'] = 'ลบ';
+$labels['shortaclt'] = 'ลบ';
+$labels['shortaclx'] = 'ลบโฟลเดอร์';
+$labels['shortaclother'] = 'อื่นๆ';
+$labels['shortaclread'] = 'อ่าน';
+$labels['shortaclwrite'] = 'เขียน';
+$labels['shortacldelete'] = 'ลบ';
+?>
diff --git a/plugins/acl/localization/ti.inc b/plugins/acl/localization/ti.inc
new file mode 100644
index 000000000..751be8736
--- /dev/null
+++ b/plugins/acl/localization/ti.inc
@@ -0,0 +1,67 @@
+<?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['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['longaclr'] = 'ማህደር ተኸፊቱ ክንበብ ይኽእል';
+$labels['longacls'] = 'ተራእዩ ዝብል መልእኽቲ ዕላም ክለወጥ ይኽእል';
+$labels['longaclw'] = 'ዕላማትን መፍትሕ ቃላትን መልኽትታት ክልወጡ ይኽእሉ, ብዘይካ ዝተረኣዩን ዝጠፍኡን';
+$labels['longacli'] = 'መልእኽቲ ናብዚ ማህደር ክጽሓፍ ወይ ክቕዳሕ ይኽእል';
+$labels['longaclp'] = 'መልእኽቲ ናብዚ ማህደር ክኣቱ ይኽእል';
+?>
diff --git a/plugins/acl/localization/tr_TR.inc b/plugins/acl/localization/tr_TR.inc
index f3d60324b..1569b5926 100644
--- a/plugins/acl/localization/tr_TR.inc
+++ b/plugins/acl/localization/tr_TR.inc
@@ -89,7 +89,7 @@ $messages['saving'] = 'Erişim hakları saklanıyor...';
$messages['updatesuccess'] = 'Erişim hakları başarıyla değiştirildi';
$messages['deletesuccess'] = 'Erişim hakları başarıyla silindi';
$messages['createsuccess'] = 'Erişim hakları başarıyla eklendi';
-$messages['updateerror'] = 'Erişim hakları güncellenemedi';
+$messages['updateerror'] = 'Erişim haklarını güncellenemedi';
$messages['deleteerror'] = 'Erişim haklarını silinemedi';
$messages['createerror'] = 'Erişim hakları eklenemedi';
$messages['deleteconfirm'] = 'Seçilen kullanıcılar için erişim haklarını silmek istediğinizden emin misiniz?';
diff --git a/plugins/acl/package.xml b/plugins/acl/package.xml
index 98460e82f..52e234f37 100644
--- a/plugins/acl/package.xml
+++ b/plugins/acl/package.xml
@@ -22,7 +22,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/acl/skins/classic/acl.css b/plugins/acl/skins/classic/acl.css
index cf3391f49..0764465a0 100644
--- a/plugins/acl/skins/classic/acl.css
+++ b/plugins/acl/skins/classic/acl.css
@@ -47,12 +47,12 @@
#acltable tbody td.partial
{
- background: url(images/partial.png) center no-repeat;
+ background: url(images/partial.png?v=05d7.389) center no-repeat;
}
#acltable tbody td.enabled
{
- background: url(images/enabled.png) center no-repeat;
+ background: url(images/enabled.png?v=9d9a.674) center no-repeat;
}
#acltable tr.selected td
diff --git a/plugins/acl/skins/larry/acl.css b/plugins/acl/skins/larry/acl.css
index e392a269e..67512a619 100644
--- a/plugins/acl/skins/larry/acl.css
+++ b/plugins/acl/skins/larry/acl.css
@@ -65,14 +65,14 @@
#acltable tbody td.partial
{
- background-image: url(images/partial.png);
+ background-image: url(images/partial.png?v=05d7.389);
background-position: center;
background-repeat: no-repeat;
}
#acltable tbody td.enabled
{
- background-image: url(images/enabled.png);
+ background-image: url(images/enabled.png?v=9d9a.674);
background-position: center;
background-repeat: no-repeat;
}
@@ -80,21 +80,21 @@
#acltable tbody tr.selected td.partial
{
background-color: #019bc6;
- background-image: url(images/partial.png), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
- background-image: url(images/partial.png), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
- background-image: url(images/partial.png), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
- background-image: url(images/partial.png), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
- background-image: url(images/partial.png), linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/partial.png?v=05d7.389), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/partial.png?v=05d7.389), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
+ background-image: url(images/partial.png?v=05d7.389), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/partial.png?v=05d7.389), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/partial.png?v=05d7.389), linear-gradient(top, #019bc6 0%, #017cb4 100%);
}
#acltable tbody tr.selected td.enabled
{
background-color: #019bc6;
- background-image: url(images/enabled.png), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
- background-image: url(images/enabled.png), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
- background-image: url(images/enabled.png), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
- background-image: url(images/enabled.png), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
- background-image: url(images/enabled.png), linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/enabled.png?v=9d9a.674), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/enabled.png?v=9d9a.674), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
+ background-image: url(images/enabled.png?v=9d9a.674), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/enabled.png?v=9d9a.674), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+ background-image: url(images/enabled.png?v=9d9a.674), linear-gradient(top, #019bc6 0%, #017cb4 100%);
}
#aclform
diff --git a/plugins/additional_message_headers/additional_message_headers.php b/plugins/additional_message_headers/additional_message_headers.php
index 0d16e605e..43f9d0098 100644
--- a/plugins/additional_message_headers/additional_message_headers.php
+++ b/plugins/additional_message_headers/additional_message_headers.php
@@ -6,8 +6,8 @@
* Very simple plugin which will add additional headers
* to or remove them from outgoing messages.
*
- * Enable the plugin in config.inc.php and add your desired headers:
- * $config['additional_message_headers'] = array('User-Agent' => 'My-Very-Own-Webmail');
+ * Enable the plugin in config/main.inc.php and add your desired headers:
+ * $rcmail_config['additional_message_headers'] = array('User-Agent');
*
* @version @package_version@
* @author Ziba Scott
diff --git a/plugins/additional_message_headers/config.inc.php.dist b/plugins/additional_message_headers/config.inc.php.dist
index 72a4f1cee..83ccd869c 100644
--- a/plugins/additional_message_headers/config.inc.php.dist
+++ b/plugins/additional_message_headers/config.inc.php.dist
@@ -1,14 +1,14 @@
<?php
-// $config['additional_message_headers']['X-Remote-Browser'] = $_SERVER['HTTP_USER_AGENT'];
-// $config['additional_message_headers']['X-Originating-IP'] = $_SERVER['REMOTE_ADDR'];
-// $config['additional_message_headers']['X-RoundCube-Server'] = $_SERVER['SERVER_ADDR'];
+// $rcmail_config['additional_message_headers']['X-Remote-Browser'] = $_SERVER['HTTP_USER_AGENT'];
+// $rcmail_config['additional_message_headers']['X-Originating-IP'] = $_SERVER['REMOTE_ADDR'];
+// $rcmail_config['additional_message_headers']['X-RoundCube-Server'] = $_SERVER['SERVER_ADDR'];
// if( isset( $_SERVER['MACHINE_NAME'] )) {
-// $config['additional_message_headers']['X-RoundCube-Server'] .= ' (' . $_SERVER['MACHINE_NAME'] . ')';
+// $rcmail_config['additional_message_headers']['X-RoundCube-Server'] .= ' (' . $_SERVER['MACHINE_NAME'] . ')';
// }
// To remove (e.g. X-Sender) message header use null value
-// $config['additional_message_headers']['X-Sender'] = null;
+// $rcmail_config['additional_message_headers']['X-Sender'] = null;
?>
diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js
index 3500b9fe4..af2b0d26d 100644
--- a/plugins/archive/archive.js
+++ b/plugins/archive/archive.js
@@ -1,47 +1,34 @@
/*
* Archive plugin script
- * @version 2.0
+ * @version @package_version@
*/
function rcmail_archive(prop)
{
if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length))
return;
-
- if (rcmail.env.mailbox.indexOf(rcmail.env.archive_folder) != 0) {
- if (!rcmail.env.archive_type) {
- // simply move to archive folder (if no partition type is set)
- rcmail.command('move', rcmail.env.archive_folder);
- }
- else {
- // let the server sort the messages to the according subfolders
- var post_data = { _uid: rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox };
- rcmail.http_post('plugin.move2archive', post_data);
- }
- }
+
+ if (rcmail.env.mailbox != rcmail.env.archive_folder)
+ rcmail.command('moveto', rcmail.env.archive_folder);
}
// callback for app-onload event
if (window.rcmail) {
rcmail.addEventListener('init', function(evt) {
+
// register command (directly enable in message view mode)
rcmail.register_command('plugin.archive', rcmail_archive, (rcmail.env.uid && rcmail.env.mailbox != rcmail.env.archive_folder));
-
+
// add event-listener to message list
if (rcmail.message_list)
- rcmail.message_list.addEventListener('select', function(list) {
+ rcmail.message_list.addEventListener('select', function(list){
rcmail.enable_command('plugin.archive', (list.get_selection().length > 0 && rcmail.env.mailbox != rcmail.env.archive_folder));
});
-
+
// set css style for archive folder
var li;
if (rcmail.env.archive_folder && (li = rcmail.get_folder_li(rcmail.env.archive_folder, '', true)))
$(li).addClass('archive');
-
- // callback for server response
- rcmail.addEventListener('plugin.move2archive_response', function(result) {
- if (result.update)
- rcmail.command('checkmail'); // refresh list
- });
})
}
+
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 7a81606ab..0a298cbe3 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -6,7 +6,7 @@
* Plugin that adds a new button to the mailbox toolbar
* to move messages to a (user selectable) archive folder.
*
- * @version 2.0
+ * @version @package_version@
* @license GNU GPLv3+
* @author Andre Rodier, Thomas Bruederli
*/
@@ -41,23 +41,18 @@ class archive extends rcube_plugin
'domain' => $this->ID,
),
'toolbar');
-
+
// register hook to localize the archive folder
$this->add_hook('render_mailboxlist', array($this, 'render_mailboxlist'));
- // set env variables for client
+ // set env variable for client
$rcmail->output->set_env('archive_folder', $archive_folder);
- $rcmail->output->set_env('archive_type', $rcmail->config->get('archive_type',''));
// add archive folder to the list of default mailboxes
if (($default_folders = $rcmail->config->get('default_folders')) && !in_array($archive_folder, $default_folders)) {
$default_folders[] = $archive_folder;
$rcmail->config->set('default_folders', $default_folders);
- }
- }
- else if ($rcmail->task == 'mail') {
- // handler for ajax request
- $this->register_action('plugin.move2archive', array($this, 'move_messages'));
+ }
}
else if ($rcmail->task == 'settings') {
$dont_override = $rcmail->config->get('dont_override', array());
@@ -67,18 +62,15 @@ class archive extends rcube_plugin
}
}
}
-
- /**
- * Hook to give the archive folder a localized name in the mailbox list
- */
+
function render_mailboxlist($p)
{
$rcmail = rcmail::get_instance();
$archive_folder = $rcmail->config->get('archive_mbox');
- $show_real_name = $rcmail->config->get('show_real_foldernames');
+ $localize_name = $rcmail->config->get('archive_localize_name', true);
// set localized name for the configured archive folder
- if ($archive_folder && !$show_real_name) {
+ if ($archive_folder && $localize_name) {
if (isset($p['list'][$archive_folder]))
$p['list'][$archive_folder]['name'] = $this->gettext('archivefolder');
else // search in subfolders
@@ -88,10 +80,7 @@ class archive extends rcube_plugin
return $p;
}
- /**
- * Helper method to find the archive folder in the mailbox tree
- */
- private function _mod_folder_name(&$list, $folder, $new_name)
+ function _mod_folder_name(&$list, $folder, $new_name)
{
foreach ($list as $idx => $item) {
if ($item['id'] == $folder) {
@@ -104,100 +93,6 @@ class archive extends rcube_plugin
return false;
}
- /**
- * Plugin action to move the submitted list of messages to the archive subfolders
- * according to the user settings and their headers.
- */
- function move_messages()
- {
- $rcmail = rcmail::get_instance();
- $this->add_texts('localization');
-
- $storage = $rcmail->get_storage();
- $storage->set_folder(($current_mbox = rcube_utils::get_input_value('_mbox', RCUBE_INPUT_POST)));
-
- $delimiter = $storage->get_hierarchy_delimiter();
- $archive_folder = $rcmail->config->get('archive_mbox');
- $archive_type = $rcmail->config->get('archive_type', '');
-
- $result = array('reload' => false, 'update' => false, 'errors' => array());
-
- $uids = explode(',', rcube_utils::get_input_value('_uid', RCUBE_INPUT_POST));
- foreach ($uids as $uid) {
- if (!$archive_folder || !($message = $rcmail->storage->get_message($uid))) {
- continue;
- }
-
- $subfolder = null;
- switch ($archive_type) {
- case 'year':
- $subfolder = $rcmail->format_date($message->timestamp, 'Y');
- break;
-
- case 'month':
- $subfolder = $rcmail->format_date($message->timestamp, 'Y') . $delimiter . $rcmail->format_date($message->timestamp, 'm');
- break;
-
- case 'folder':
- $subfolder = $current_mbox;
- break;
-
- case 'sender':
- $from = $message->get('from');
- if (preg_match('/[\b<](.+@.+)[\b>]/i', $from, $m)) {
- $subfolder = $m[1];
- }
- else {
- $subfolder = $this->gettext('unkownsender');
- }
-
- // replace reserved characters in folder name
- $repl = $delimiter == '-' ? '_' : '-';
- $replacements[$delimiter] = $repl;
- $replacements['.'] = $repl; // some IMAP server do not allow . characters
- $subfolder = strtr($subfolder, $replacements);
- break;
-
- default:
- $subfolder = '';
- break;
- }
-
- // compose full folder path
- $folder = $archive_folder . ($subfolder ? $delimiter . $subfolder : '');
-
- // create archive subfolder if it doesn't yet exist
- if (!$storage->folder_exists($folder, false)) {
- if ($storage->create_folder($folder, true))
- $result['reload'] = true;
- }
-
- // move message to target folder
- if ($storage->move_message(array($uid), $folder)) {
- $result['update'] = true;
- }
- else {
- $result['errors'][] = $uid;
- }
- } // end for
-
- // send response
- if ($result['errors']) {
- $rcmail->output->show_message($this->gettext('archiveerror'), 'warning');
- }
- if ($result['reload']) {
- $rcmail->output->show_message($this->gettext('archivedreload'), 'confirmation');
- }
- else if ($result['update']) {
- $rcmail->output->show_message($this->gettext('archived'), 'confirmation');
- }
-
- $rcmail->output->command('plugin.move2archive_response', $result);
- }
-
- /**
- * Hook to inject plugin-specific user settings
- */
function prefs_table($args)
{
global $CURR_SECTION;
@@ -209,7 +104,7 @@ class archive extends rcube_plugin
// load folders list when needed
if ($CURR_SECTION)
- $select = $rcmail->folder_selector(array('noselection' => '---', 'realnames' => true,
+ $select = rcmail_mailbox_select(array('noselection' => '---', 'realnames' => true,
'maxlength' => 30, 'exceptions' => array('INBOX'), 'folder_filter' => 'mail', 'folder_rights' => 'w'));
else
$select = new html_select();
@@ -218,36 +113,15 @@ class archive extends rcube_plugin
'title' => $this->gettext('archivefolder'),
'content' => $select->show($rcmail->config->get('archive_mbox'), array('name' => "_archive_mbox"))
);
-
- // add option for structuring the archive folder
- $archive_type = new html_select(array('name' => '_archive_type', 'id' => 'ff_archive_type'));
- $archive_type->add($this->gettext('none'), '');
- $archive_type->add($this->gettext('archivetypeyear'), 'year');
- $archive_type->add($this->gettext('archivetypemonth'), 'month');
- $archive_type->add($this->gettext('archivetypesender'), 'sender');
- $archive_type->add($this->gettext('archivetypefolder'), 'folder');
-
- $args['blocks']['archive'] = array(
- 'name' => Q(rcube_label('settingstitle', 'archive')),
- 'options' => array('archive_type' => array(
- 'title' => $this->gettext('archivetype'),
- 'content' => $archive_type->show($rcmail->config->get('archive_type'))
- )
- )
- );
}
return $args;
}
- /**
- * Hook to save plugin-specific user settings
- */
function save_prefs($args)
{
if ($args['section'] == 'folders') {
- $args['prefs']['archive_mbox'] = rcube_utils::get_input_value('_archive_mbox', rcube_utils::INPUT_POST);
- $args['prefs']['archive_type'] = rcube_utils::get_input_value('_archive_type', rcube_utils::INPUT_POST);
+ $args['prefs']['archive_mbox'] = get_input_value('_archive_mbox', RCUBE_INPUT_POST);
return $args;
}
}
diff --git a/plugins/archive/localization/ar.inc b/plugins/archive/localization/ar.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/ar.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/ast.inc b/plugins/archive/localization/ast.inc
new file mode 100644
index 000000000..546c33538
--- /dev/null
+++ b/plugins/archive/localization/ast.inc
@@ -0,0 +1,31 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+$labels['buttontext'] = 'Archivu';
+$labels['buttontitle'] = 'Archivar esti mensaxe';
+$labels['archived'] = 'Mensaxe archiváu';
+$labels['archivedreload'] = 'Archiváu correchamente. Recarga la páxina pa ver les nueves carpetes d\'archivu.';
+$labels['archiveerror'] = 'Nun pudieron archivase dalgunos mensaxes';
+$labels['archivefolder'] = 'Archivu';
+$labels['settingstitle'] = 'Archivu';
+$labels['archivetype'] = 'Dividir l\'archivu por';
+$labels['archivetypeyear'] = 'Añu (p.ex. Archivu/2012)';
+$labels['archivetypemonth'] = 'Mes (p.ex. Archivu/2012/06)';
+$labels['archivetypefolder'] = 'Bandexa orixinal';
+$labels['archivetypesender'] = 'Corréu-e del remitente';
+$labels['unkownsender'] = 'desconocíu';
+?>
diff --git a/plugins/archive/localization/bn_BD.inc b/plugins/archive/localization/bn_BD.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/bn_BD.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/en_US.inc b/plugins/archive/localization/en_US.inc
index d3714c118..fade70852 100644
--- a/plugins/archive/localization/en_US.inc
+++ b/plugins/archive/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/archive/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Archive plugin |
- | Copyright (C) 2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -20,15 +20,6 @@ $labels = array();
$labels['buttontext'] = 'Archive';
$labels['buttontitle'] = 'Archive this message';
$labels['archived'] = 'Successfully archived';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
$labels['archivefolder'] = 'Archive';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
?>
diff --git a/plugins/archive/localization/eu_ES.inc b/plugins/archive/localization/eu_ES.inc
new file mode 100644
index 000000000..c4f0e7b0e
--- /dev/null
+++ b/plugins/archive/localization/eu_ES.inc
@@ -0,0 +1,31 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+$labels['buttontext'] = 'Gorde';
+$labels['buttontitle'] = 'Gorde mezu hau';
+$labels['archived'] = 'Ongi gorde da';
+$labels['archivedreload'] = 'Ongi gorde da. Freskatu orria fitxategi-karpeta berria ikusteko.';
+$labels['archiveerror'] = 'Mezu batzuk ezin dira gorde.';
+$labels['archivefolder'] = 'Gorde';
+$labels['settingstitle'] = 'Gorde';
+$labels['archivetype'] = 'Banatu honen arabera';
+$labels['archivetypeyear'] = 'Urtea (e.b. Archive/2012)';
+$labels['archivetypemonth'] = 'Hilabete (e.b. Archive/2012/06)';
+$labels['archivetypefolder'] = 'Jatorrizko karpeta';
+$labels['archivetypesender'] = 'Bidaltzailearen helbidea';
+$labels['unkownsender'] = 'ezezaguna';
+?>
diff --git a/plugins/archive/localization/fa_AF.inc b/plugins/archive/localization/fa_AF.inc
new file mode 100644
index 000000000..fafccb5b8
--- /dev/null
+++ b/plugins/archive/localization/fa_AF.inc
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+$labels['buttontext'] = 'ارشیو';
+$labels['buttontitle'] = 'ارشیو این پیام';
+$labels['archived'] = 'با موفقیت ارشیو شد';
+$labels['archivefolder'] = 'ارشیو';
+$labels['settingstitle'] = 'ارشیو';
+$labels['archivetypefolder'] = 'پوشه اصلی';
+$labels['archivetypesender'] = 'ایمیل فرستنده';
+$labels['unkownsender'] = 'نا شناس';
+?>
diff --git a/plugins/archive/localization/fa_IR.inc b/plugins/archive/localization/fa_IR.inc
index 03bf6d8bd..9df31ed31 100644
--- a/plugins/archive/localization/fa_IR.inc
+++ b/plugins/archive/localization/fa_IR.inc
@@ -20,11 +20,11 @@ $labels = array();
$labels['buttontext'] = 'بایگانی';
$labels['buttontitle'] = 'بایگانی این پیغام';
$labels['archived'] = 'با موفقیت بایگانی شد';
-$labels['archivedreload'] = 'با موفقیت بایگانی شد. برای دیدن پوشه‌های بایگانی جدید صفحه را مجددا بارگذاری نمایید.';
-$labels['archiveerror'] = 'برخی از پیغام‌ها بایگانی نشدند.';
+$labels['archivedreload'] = 'با موفقیت بایگانی شد، بارگذاری مجدد صفحه برای دیدن پوشه‌های بایگانی جدید.';
+$labels['archiveerror'] = 'برخی پیغام‌ها بایگانی نخواهند شد';
$labels['archivefolder'] = 'بایگانی';
$labels['settingstitle'] = 'بایگانی';
-$labels['archivetype'] = 'تقسیم بایگانی با';
+$labels['archivetype'] = 'جدا کردن بایگانی با';
$labels['archivetypeyear'] = 'سال (به عنوان مثال بایگانی/۲۰۱۲)';
$labels['archivetypemonth'] = 'ماه (به عنوان مثال بایگانی/۲۰۱۲/۰۶)';
$labels['archivetypefolder'] = 'پوشه اصلی';
diff --git a/plugins/archive/localization/fi_FI.inc b/plugins/archive/localization/fi_FI.inc
index 261bc19ec..9dda46ec0 100644
--- a/plugins/archive/localization/fi_FI.inc
+++ b/plugins/archive/localization/fi_FI.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arkistoi';
$labels['buttontitle'] = 'Arkistoi viesti';
$labels['archived'] = 'Arkistoitu onnistuneesti';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arkistointi onnistui. Päivitä sivu nähdäksesi uudet arkistokansiot.';
+$labels['archiveerror'] = 'Joidenkin viestien arkistointi epäonnistui';
$labels['archivefolder'] = 'Arkistoi';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Arkistoi';
+$labels['archivetype'] = 'Jaa arkisto';
+$labels['archivetypeyear'] = 'Vuodella (esim. Arkisto/2012)';
+$labels['archivetypemonth'] = 'Kuukaudella (esim. Arkisto/2012/06)';
+$labels['archivetypefolder'] = 'Alkuperäinen kansio';
+$labels['archivetypesender'] = 'Lähettäjän osoite';
+$labels['unkownsender'] = 'tuntematon';
?>
diff --git a/plugins/archive/localization/fr_FR.inc b/plugins/archive/localization/fr_FR.inc
index fbed8725b..638de3a40 100644
--- a/plugins/archive/localization/fr_FR.inc
+++ b/plugins/archive/localization/fr_FR.inc
@@ -19,16 +19,16 @@
$labels = array();
$labels['buttontext'] = 'Archive';
$labels['buttontitle'] = 'Archiver ce message';
-$labels['archived'] = 'Message archivé avec success';
+$labels['archived'] = 'Message archivé avec succès';
$labels['archivedreload'] = 'Archivé avec succès. Rechargez la page pour voir les nouveaux dossiers d\'archivage.';
$labels['archiveerror'] = 'Certains messages n\'ont pas pu être archivés.';
$labels['archivefolder'] = 'Archive';
$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Diviser l\'archive en';
+$labels['archivetype'] = 'Diviser l\'archive par';
$labels['archivetypeyear'] = 'Année (ex Archives/2012)';
$labels['archivetypemonth'] = 'Mois (ex Archives/2012/06)';
$labels['archivetypefolder'] = 'Dossier original';
-$labels['archivetypesender'] = 'Email de l\'émetteur';
+$labels['archivetypesender'] = 'Courriel de l\'émetteur';
$labels['unkownsender'] = 'inconnu';
?>
diff --git a/plugins/archive/localization/hi_IN.inc b/plugins/archive/localization/hi_IN.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/hi_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/ia.inc b/plugins/archive/localization/ia.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/ia.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/lb_LU.inc b/plugins/archive/localization/lb_LU.inc
index 6e9e6db22..ac16cfea7 100644
--- a/plugins/archive/localization/lb_LU.inc
+++ b/plugins/archive/localization/lb_LU.inc
@@ -15,8 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/
*/
-
-$labels = array();
$labels['buttontext'] = 'Archivéieren';
$labels['buttontitle'] = 'Dëse Message archivéieren';
$labels['archived'] = 'Erfollegräich archivéiert';
@@ -30,5 +28,4 @@ $labels['archivetypemonth'] = 'Mount (z.B. Archiv/2013/06)';
$labels['archivetypefolder'] = 'Original-Dossier';
$labels['archivetypesender'] = 'Sender-E-Mail';
$labels['unkownsender'] = 'onbekannt';
-
?>
diff --git a/plugins/archive/localization/lv_LV.inc b/plugins/archive/localization/lv_LV.inc
index d4c892705..ad2812fba 100644
--- a/plugins/archive/localization/lv_LV.inc
+++ b/plugins/archive/localization/lv_LV.inc
@@ -18,17 +18,17 @@
$labels = array();
$labels['buttontext'] = 'Arhīvs';
-$labels['buttontitle'] = 'Arhivēt šo vēstuli';
-$labels['archived'] = 'Vēstule veiksmīgi arhivēta';
-$labels['archivedreload'] = 'Arhīvs veiksmīgi izveidots. Lai redzētu jaunās arhīva mapes, pārlādējiet lapu.';
-$labels['archiveerror'] = 'Dažas vēstules nebija iespējams arhivēt';
+$labels['buttontitle'] = 'Arhivēt vēstuli';
+$labels['archived'] = 'Vēstule sekmīgi arhivēta';
+$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
+$labels['archiveerror'] = 'Some messages could not be archived';
$labels['archivefolder'] = 'Arhīvs';
-$labels['settingstitle'] = 'Arhīvs';
-$labels['archivetype'] = 'Sadalīt arhīvu pa';
-$labels['archivetypeyear'] = 'Gadiem (piem. Arhīvs/2012)';
-$labels['archivetypemonth'] = 'Mēnešiem (piem. Arhīvs/2012/06)';
-$labels['archivetypefolder'] = 'Sākotnējā mape';
-$labels['archivetypesender'] = 'Sūtītāja e-pasts';
-$labels['unkownsender'] = 'nezināms';
+$labels['settingstitle'] = 'Archive';
+$labels['archivetype'] = 'Divide archive by';
+$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
+$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
+$labels['archivetypefolder'] = 'Original folder';
+$labels['archivetypesender'] = 'Sender email';
+$labels['unkownsender'] = 'unknown';
?>
diff --git a/plugins/archive/localization/mn_MN.inc b/plugins/archive/localization/mn_MN.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/mn_MN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/ms_MY.inc b/plugins/archive/localization/ms_MY.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/ms_MY.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/my_MM.inc b/plugins/archive/localization/my_MM.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/my_MM.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/nb_NB.inc b/plugins/archive/localization/nb_NB.inc
new file mode 100644
index 000000000..46e49aba0
--- /dev/null
+++ b/plugins/archive/localization/nb_NB.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | localization/nb_NB/labels.inc |
+ | |
+ | Language file of the Roundcube Webmail client |
+ | Copyright (C) 2012, The Roundcube Dev Team |
+ | Licensed under the GNU General Public License |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Tobias V. Langhoff <spug@thespug.net> |
+ +-----------------------------------------------------------------------+
+*/
+
+$labels = array();
+$labels['buttontext'] = 'Arkiv';
+$labels['archivefolder'] = 'Arkiv';
+$labels['buttontitle'] = 'Arkiver meldingen';
+$labels['archived'] = 'Arkivert';
+
diff --git a/plugins/archive/localization/nb_NO.inc b/plugins/archive/localization/nb_NO.inc
index 62ea381ca..accad4efa 100644
--- a/plugins/archive/localization/nb_NO.inc
+++ b/plugins/archive/localization/nb_NO.inc
@@ -28,7 +28,7 @@ $labels['archivetype'] = 'Del arkiv etter';
$labels['archivetypeyear'] = 'År (f.eks. Arkiv/2012)';
$labels['archivetypemonth'] = 'Måned (f.eks. Arkiv/2012/06)';
$labels['archivetypefolder'] = 'Opprinnelig mappe';
-$labels['archivetypesender'] = 'Sender email';
+$labels['archivetypesender'] = 'Avsender';
$labels['unkownsender'] = 'ukjent';
?>
diff --git a/plugins/archive/localization/nl_BE.inc b/plugins/archive/localization/nl_BE.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/nl_BE.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/nn_NO.inc b/plugins/archive/localization/nn_NO.inc
index 01effaa62..4b2801688 100644
--- a/plugins/archive/localization/nn_NO.inc
+++ b/plugins/archive/localization/nn_NO.inc
@@ -28,7 +28,7 @@ $labels['archivetype'] = 'Del arkiv etter';
$labels['archivetypeyear'] = 'År (f.eks. Arkiv/2012)';
$labels['archivetypemonth'] = 'Månad (f.eks. Arkiv/2012/06)';
$labels['archivetypefolder'] = 'Opprinneleg mappe';
-$labels['archivetypesender'] = 'Sender email';
+$labels['archivetypesender'] = 'Avsendar';
$labels['unkownsender'] = 'ukjent';
?>
diff --git a/plugins/archive/localization/nqo.inc b/plugins/archive/localization/nqo.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/nqo.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/om.inc b/plugins/archive/localization/om.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/om.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/pt_BR.inc b/plugins/archive/localization/pt_BR.inc
index 05508e2e3..3df6cfdad 100644
--- a/plugins/archive/localization/pt_BR.inc
+++ b/plugins/archive/localization/pt_BR.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arquivo';
$labels['buttontitle'] = 'Arquivar esta mensagem';
$labels['archived'] = 'Arquivada com sucesso';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arquivado com sucesso. Recarregue a página para ver as novas pastas de arquivo.';
+$labels['archiveerror'] = 'Algumas mensagens não puderam ser arquivadas';
$labels['archivefolder'] = 'Arquivo';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Arquivo';
+$labels['archivetype'] = 'Dividir arquivo por';
+$labels['archivetypeyear'] = 'Ano (isto é, Arquivo/2012)';
+$labels['archivetypemonth'] = 'Mês (isto é, Arquivo/2012/06)';
+$labels['archivetypefolder'] = 'Pasta original';
+$labels['archivetypesender'] = 'E-mail do remetente';
+$labels['unkownsender'] = 'desconhecido';
?>
diff --git a/plugins/archive/localization/ro_RO.inc b/plugins/archive/localization/ro_RO.inc
index e88e918fa..6fa5cee22 100644
--- a/plugins/archive/localization/ro_RO.inc
+++ b/plugins/archive/localization/ro_RO.inc
@@ -18,13 +18,13 @@
$labels = array();
$labels['buttontext'] = 'Arhivă';
-$labels['buttontitle'] = 'Arhivează acest mesaj.';
+$labels['buttontitle'] = 'Arhivează mesajul.';
$labels['archived'] = 'Arhivare reuşită.';
$labels['archivedreload'] = 'Arhivat cu succes. Reîncărcați pagina pentru a vedea noul dosar de arhivare.';
-$labels['archiveerror'] = 'Câteva mesaje nu au putut fi arhivate';
+$labels['archiveerror'] = 'Unele mesaje nu au putut fi arhivate';
$labels['archivefolder'] = 'Arhivă';
$labels['settingstitle'] = 'Arhivă';
-$labels['archivetype'] = 'Divide arhiva pe';
+$labels['archivetype'] = 'Împarte arhiva pe';
$labels['archivetypeyear'] = 'Ani (ex. Arhiva/2013)';
$labels['archivetypemonth'] = 'Luni (ex. Arhiva/2013/06)';
$labels['archivetypefolder'] = 'Dosar original';
diff --git a/plugins/archive/localization/te_IN.inc b/plugins/archive/localization/te_IN.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/te_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/th_TH.inc b/plugins/archive/localization/th_TH.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/th_TH.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/ti.inc b/plugins/archive/localization/ti.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/ti.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/tzm.inc b/plugins/archive/localization/tzm.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/tzm.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/ur_PK.inc b/plugins/archive/localization/ur_PK.inc
new file mode 100644
index 000000000..8e95162d5
--- /dev/null
+++ b/plugins/archive/localization/ur_PK.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-archive/
+*/
+?>
diff --git a/plugins/archive/localization/zh_CN.inc b/plugins/archive/localization/zh_CN.inc
index 17af54cde..4a13d541a 100644
--- a/plugins/archive/localization/zh_CN.inc
+++ b/plugins/archive/localization/zh_CN.inc
@@ -18,17 +18,17 @@
$labels = array();
$labels['buttontext'] = '存档';
-$labels['buttontitle'] = '将该信息存档';
+$labels['buttontitle'] = '存档该信息';
$labels['archived'] = '存档成功';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = '存档成功。请刷新本页以查看新的存档文件夹。';
+$labels['archiveerror'] = '部分信息无法存档';
$labels['archivefolder'] = '存档';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = '存档';
+$labels['archivetype'] = '分类存档按';
+$labels['archivetypeyear'] = '年(例如 存档/2012)';
+$labels['archivetypemonth'] = '月(例如 存档/2012/06)';
+$labels['archivetypefolder'] = '原始文件夹';
+$labels['archivetypesender'] = '发件人邮件';
+$labels['unkownsender'] = '未知';
?>
diff --git a/plugins/archive/package.xml b/plugins/archive/package.xml
index 62a009a99..1aeffaf41 100644
--- a/plugins/archive/package.xml
+++ b/plugins/archive/package.xml
@@ -6,17 +6,17 @@
<name>archive</name>
<channel>pear.roundcube.net</channel>
<summary>Archive feature for Roundcube</summary>
- <description>This adds a button to move the selected messages to an archive folder. The folder (and the optional structure of subfolders) can be selected in the settings panel.</description>
+ <description>This adds a button to move the selected messages to an archive folder. The folder can be selected in the settings panel.</description>
<lead>
<name>Thomas Bruederli</name>
<user>thomasb</user>
<email>roundcube@gmail.com</email>
<active>yes</active>
</lead>
- <date>2013-01-20</date>
+ <date>2011-11-23</date>
<version>
- <release>2.0</release>
- <api>2.0</api>
+ <release>1.6</release>
+ <api>1.6</api>
</version>
<stability>
<release>stable</release>
@@ -34,55 +34,21 @@
<tasks:replace from="@name@" to="name" type="package-info"/>
<tasks:replace from="@package_version@" to="version" type="package-info"/>
</file>
- <file name="localization/ar_SA.inc" role="data"></file>
- <file name="localization/az_AZ.inc" role="data"></file>
- <file name="localization/be_BE.inc" role="data"></file>
- <file name="localization/bg_BG.inc" role="data"></file>
- <file name="localization/bs_BA.inc" role="data"></file>
- <file name="localization/ca_ES.inc" role="data"></file>
<file name="localization/cs_CZ.inc" role="data"></file>
- <file name="localization/cy_GB.inc" role="data"></file>
- <file name="localization/da_DK.inc" role="data"></file>
<file name="localization/de_CH.inc" role="data"></file>
<file name="localization/de_DE.inc" role="data"></file>
- <file name="localization/el_GR.inc" role="data"></file>
- <file name="localization/eb_GB.inc" role="data"></file>
<file name="localization/en_US.inc" role="data"></file>
<file name="localization/es_AR.inc" role="data"></file>
<file name="localization/es_ES.inc" role="data"></file>
<file name="localization/et_EE.inc" role="data"></file>
- <file name="localization/fa_IR.inc" role="data"></file>
- <file name="localization/fi_FI.inc" role="data"></file>
<file name="localization/fr_FR.inc" role="data"></file>
<file name="localization/gl_ES.inc" role="data"></file>
- <file name="localization/he_IL.inc" role="data"></file>
- <file name="localization/hr_HR.inc" role="data"></file>
- <file name="localization/hu_HU.inc" role="data"></file>
- <file name="localization/hy_AM.inc" role="data"></file>
- <file name="localization/id_ID.inc" role="data"></file>
- <file name="localization/it_IT.inc" role="data"></file>
<file name="localization/ja_JP.inc" role="data"></file>
- <file name="localization/km_KH.inc" role="data"></file>
- <file name="localization/ko_KR.inc" role="data"></file>
- <file name="localization/lt_LT.inc" role="data"></file>
- <file name="localization/lv_LV.inc" role="data"></file>
- <file name="localization/ml_IN.inc" role="data"></file>
- <file name="localization/nb_NO.inc" role="data"></file>
<file name="localization/nl_NL.inc" role="data"></file>
- <file name="localization/nn_NO.inc" role="data"></file>
<file name="localization/pl_PL.inc" role="data"></file>
<file name="localization/pt_BR.inc" role="data"></file>
- <file name="localization/pt_PT.inc" role="data"></file>
<file name="localization/ru_RU.inc" role="data"></file>
- <file name="localization/si_LK.inc" role="data"></file>
- <file name="localization/sk_SK.inc" role="data"></file>
- <file name="localization/sl_SI.inc" role="data"></file>
- <file name="localization/sr_CS.inc" role="data"></file>
<file name="localization/sv_SE.inc" role="data"></file>
- <file name="localization/tr_TR.inc" role="data"></file>
- <file name="localization/uk_UA.inc" role="data"></file>
- <file name="localization/vi_VN.inc" role="data"></file>
- <file name="localization/zh_CN.inc" role="data"></file>
<file name="localization/zh_TW.inc" role="data"></file>
<file name="skins/classic/archive_act.png" role="data"></file>
<file name="skins/classic/archive_pas.png" role="data"></file>
diff --git a/plugins/attachment_reminder/localization/ar.inc b/plugins/attachment_reminder/localization/ar.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ar.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/ar_SA.inc b/plugins/attachment_reminder/localization/ar_SA.inc
new file mode 100644
index 000000000..bb1ad0449
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ar_SA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "هل نسيت إرفاق ملف؟";
+$messages['reminderoption'] = "تذكير حول المرفقات المنسية";
+$messages['keywords'] = "المرفقات,الملف,ارفاق,مرفق,ارفاق,مضمون,CV,صفحة المغلف";
diff --git a/plugins/attachment_reminder/localization/az_AZ.inc b/plugins/attachment_reminder/localization/az_AZ.inc
new file mode 100644
index 000000000..5340c917e
--- /dev/null
+++ b/plugins/attachment_reminder/localization/az_AZ.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Faylı əlavə etməyi unutdunuz?";
+$messages['reminderoption'] = "Unudulmuş qoşmalardan xəbərdar et";
+$messages['keywords'] = "qoşmalar,fayl,qoşma,qoşulub,qoşulur,qapalı,CV,qoşma məktub";
diff --git a/plugins/attachment_reminder/localization/be_BE.inc b/plugins/attachment_reminder/localization/be_BE.inc
new file mode 100644
index 000000000..a920ccfa6
--- /dev/null
+++ b/plugins/attachment_reminder/localization/be_BE.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Забыліся далучыць файл?";
+$messages['reminderoption'] = "Напамінаць пра забытыя далучэнні";
+$messages['keywords'] = "далучэнне,файл,далучыць,далучаны,далучаецца,укладзены,CV,cover letter";
diff --git a/plugins/attachment_reminder/localization/bg_BG.inc b/plugins/attachment_reminder/localization/bg_BG.inc
new file mode 100644
index 000000000..a882d6c94
--- /dev/null
+++ b/plugins/attachment_reminder/localization/bg_BG.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Забравихте ли да прикрепите файл към съобщението?";
+$messages['reminderoption'] = "Напомняне за забравени прикачени файлове";
+$messages['keywords'] = "прикачен,прикрепен,прикачам,прикачвам,прикрепям,прикрепвам,файл,attachment,file,attach,attached,attaching,enclosed,CV,cover letter";
diff --git a/plugins/attachment_reminder/localization/bn_BD.inc b/plugins/attachment_reminder/localization/bn_BD.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/bn_BD.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/bs_BA.inc b/plugins/attachment_reminder/localization/bs_BA.inc
new file mode 100644
index 000000000..1ec385dfa
--- /dev/null
+++ b/plugins/attachment_reminder/localization/bs_BA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Da li ste zaboravili da dodate ovu datoteku?";
+$messages['reminderoption'] = "Napomene o zaboravljenim prilozima";
+$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter,prilog,biografija,popratno pismo,prilogu,popratnom pismu,datoteka,fajl";
diff --git a/plugins/attachment_reminder/localization/ca_ES.inc b/plugins/attachment_reminder/localization/ca_ES.inc
new file mode 100644
index 000000000..957548bfb
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ca_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Heu oblidat afegir un fitxer?";
+$messages['reminderoption'] = "Avís de fitxers adjunts oblidats";
+$messages['keywords'] = "adjunt,fitxer,adjuntar,adjuntat,adjuntant,CV,carta";
diff --git a/plugins/attachment_reminder/localization/cs_CZ.inc b/plugins/attachment_reminder/localization/cs_CZ.inc
new file mode 100644
index 000000000..3d2166478
--- /dev/null
+++ b/plugins/attachment_reminder/localization/cs_CZ.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Nezapomněli jste připojit přílohu?";
+$messages['reminderoption'] = "Upozorňovat na zapomenuté přílohy";
+$messages['keywords'] = "příloha,přílohy,příloze,přílohu,přiloženém,připojeném,CV,životopis";
diff --git a/plugins/attachment_reminder/localization/cy_GB.inc b/plugins/attachment_reminder/localization/cy_GB.inc
new file mode 100644
index 000000000..0ce8a9991
--- /dev/null
+++ b/plugins/attachment_reminder/localization/cy_GB.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Wedi anghofio atodi ffeil?";
+$messages['reminderoption'] = "Atgoffa am atodiadau ar goll";
+$messages['keywords'] = "atodiad,atodi,atodaf,atodwyd,atodir,amgaedig,dogfen,llythyr,ffeil,attachment,file,attach,attached,attaching,enclosed,CV,cover letter,";
diff --git a/plugins/attachment_reminder/localization/da_DK.inc b/plugins/attachment_reminder/localization/da_DK.inc
new file mode 100644
index 000000000..e41eafb36
--- /dev/null
+++ b/plugins/attachment_reminder/localization/da_DK.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Glemte du at vedhæfte en fil?";
+$messages['reminderoption'] = "Påmind om glemt vedhæftning af filer";
+$messages['keywords'] = "vedhæftet fil,fil,vedhæft,vedhæftet,vedhæfter,lukket,CV,følgebrev";
diff --git a/plugins/attachment_reminder/localization/de_CH.inc b/plugins/attachment_reminder/localization/de_CH.inc
index ad9f8d4f4..9aca61e68 100644
--- a/plugins/attachment_reminder/localization/de_CH.inc
+++ b/plugins/attachment_reminder/localization/de_CH.inc
@@ -15,8 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/
*/
-
-$messages = array();
$messages['forgotattachment'] = "Haben Sie möglicherweise vergessen eine Datei anzuhängen?";
$messages['reminderoption'] = "Vor vergessenen Anhängen warnen";
$messages['keywords'] = "anbei,anhang,angehängt,angefügt,beigefügt,beliegend";
diff --git a/plugins/attachment_reminder/localization/de_DE.inc b/plugins/attachment_reminder/localization/de_DE.inc
index 7de41d1fc..0422e2de2 100644
--- a/plugins/attachment_reminder/localization/de_DE.inc
+++ b/plugins/attachment_reminder/localization/de_DE.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
$messages['forgotattachment'] = "Haben Sie möglicherweise vergessen eine Datei anzuhängen?";
-$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['reminderoption'] = "Erinnern an vergessene Anhänge ";
$messages['keywords'] = "anbei,im anhang,angehängt,angefügt,beigefügt,beliegend";
diff --git a/plugins/attachment_reminder/localization/el_GR.inc b/plugins/attachment_reminder/localization/el_GR.inc
new file mode 100644
index 000000000..e47995f3a
--- /dev/null
+++ b/plugins/attachment_reminder/localization/el_GR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Μήπως ξεχάσετε να επισυνάψετε ένα αρχείο; ";
+$messages['reminderoption'] = "Υπενθύμιση ξεχάσmena συνημμένα ";
+$messages['keywords'] = "συνημμένο, αρχείο, συννημενο, επισυναψη, επισυνάπτοντας, κλειστό, βιογραφικό σημείωμα, συνοδευτική επιστολή";
diff --git a/plugins/attachment_reminder/localization/eo.inc b/plugins/attachment_reminder/localization/eo.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/eo.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/es_AR.inc b/plugins/attachment_reminder/localization/es_AR.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/es_AR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/es_ES.inc b/plugins/attachment_reminder/localization/es_ES.inc
index 79225d77e..7f6f29e6e 100644
--- a/plugins/attachment_reminder/localization/es_ES.inc
+++ b/plugins/attachment_reminder/localization/es_ES.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
$messages['forgotattachment'] = "¿Olvidó adjuntar un fichero al mensaje?";
-$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['reminderoption'] = "Recordatorio sobre adjuntos olvidados";
$messages['keywords'] = "adjunto";
diff --git a/plugins/attachment_reminder/localization/et_EE.inc b/plugins/attachment_reminder/localization/et_EE.inc
new file mode 100644
index 000000000..c8be2af6d
--- /dev/null
+++ b/plugins/attachment_reminder/localization/et_EE.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Unustasid faili lisada?";
+$messages['reminderoption'] = "Tuleta mulle meelde kui unustasin manuse lisada";
+$messages['keywords'] = "manus,manuses,lisatud,lisasin,fail,file,failis,attachment,file,attach,attached,attaching,enclosed,CV,cover letter";
diff --git a/plugins/attachment_reminder/localization/eu_ES.inc b/plugins/attachment_reminder/localization/eu_ES.inc
new file mode 100644
index 000000000..f658990e5
--- /dev/null
+++ b/plugins/attachment_reminder/localization/eu_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Ahaztu zaizu fitxategia eranstea?";
+$messages['reminderoption'] = "Ohartarazi ahaztutako erankinez";
+$messages['keywords'] = "eranskin,fitxategia,erantzi,erantzita,eransten,atxikita";
diff --git a/plugins/attachment_reminder/localization/fa_AF.inc b/plugins/attachment_reminder/localization/fa_AF.inc
new file mode 100644
index 000000000..1c47737f1
--- /dev/null
+++ b/plugins/attachment_reminder/localization/fa_AF.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "آیا فراموش کردید که فایل را الصاق کرده اید؟";
+$messages['reminderoption'] = "یاد آوری درمورد ضمایم فراموش شده";
+$messages['keywords'] = "ضمیمه،فایل،ضمیمه کردن،ضمیمه شده،در حال ضمیمه کردن، الصاق شده،CV، عنوان نامه";
diff --git a/plugins/attachment_reminder/localization/fa_IR.inc b/plugins/attachment_reminder/localization/fa_IR.inc
new file mode 100644
index 000000000..fd1c40117
--- /dev/null
+++ b/plugins/attachment_reminder/localization/fa_IR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "آیا شما پیوست کردن پرونده را فراموش کرده‌اید؟";
+$messages['reminderoption'] = "یادآوری فراموشی پیوست‌ها";
+$messages['keywords'] = "پیوست،پرونده،پیوست کردن، پیوست شده، CV";
diff --git a/plugins/attachment_reminder/localization/fi_FI.inc b/plugins/attachment_reminder/localization/fi_FI.inc
new file mode 100644
index 000000000..53d2a9abb
--- /dev/null
+++ b/plugins/attachment_reminder/localization/fi_FI.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Unohditko liittää tiedoston?";
+$messages['reminderoption'] = "Muistuta mahdollisesti unohtuneista liitteistä";
+$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter,liite,tiedosto,liitteenä,liitetiedosto";
diff --git a/plugins/attachment_reminder/localization/fr_FR.inc b/plugins/attachment_reminder/localization/fr_FR.inc
index 78522c2e1..bda3eba90 100644
--- a/plugins/attachment_reminder/localization/fr_FR.inc
+++ b/plugins/attachment_reminder/localization/fr_FR.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
$messages['forgotattachment'] = "Avez vous oublié d'attacher un fichier ?";
-$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['reminderoption'] = "Rappel à propos des pièces jointes oubliées";
$messages['keywords'] = "joins,joint,attaché,CV";
diff --git a/plugins/attachment_reminder/localization/gl_ES.inc b/plugins/attachment_reminder/localization/gl_ES.inc
new file mode 100644
index 000000000..bd126b2af
--- /dev/null
+++ b/plugins/attachment_reminder/localization/gl_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Esqueceches adxuntar un ficheiro?";
+$messages['reminderoption'] = "Lembrete de adxuntos esquecidos";
+$messages['keywords'] = "adxunto,ficheiro,engádega, engadido,engadindo,anexo,CV,cuberta,carta";
diff --git a/plugins/attachment_reminder/localization/he_IL.inc b/plugins/attachment_reminder/localization/he_IL.inc
new file mode 100644
index 000000000..2c348afb6
--- /dev/null
+++ b/plugins/attachment_reminder/localization/he_IL.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "האם שכחת לצרף קובץ?";
+$messages['reminderoption'] = "להזכיר לצרף נספח";
+$messages['keywords'] = "נספח,קובץ,לצרף,מצורף,מצרף,מצרפת,רצ\"ב,קו\"ח,קורות חיים";
diff --git a/plugins/attachment_reminder/localization/hi_IN.inc b/plugins/attachment_reminder/localization/hi_IN.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/hi_IN.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/hu_HU.inc b/plugins/attachment_reminder/localization/hu_HU.inc
new file mode 100644
index 000000000..b76a8cf9b
--- /dev/null
+++ b/plugins/attachment_reminder/localization/hu_HU.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Nem felejtetted el a csatolandó file-t?";
+$messages['reminderoption'] = "Emlékeztessen a csatolandó csatolmányra";
+$messages['keywords'] = "csatolmány, file, csatolás, csatolt, csatolni, közrezárt, CV, kisérőlevél";
diff --git a/plugins/attachment_reminder/localization/hy_AM.inc b/plugins/attachment_reminder/localization/hy_AM.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/hy_AM.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/ia.inc b/plugins/attachment_reminder/localization/ia.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ia.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/id_ID.inc b/plugins/attachment_reminder/localization/id_ID.inc
new file mode 100644
index 000000000..1f0b0bb7a
--- /dev/null
+++ b/plugins/attachment_reminder/localization/id_ID.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Apakah anda lupa menambahkan attachment?";
+$messages['reminderoption'] = "Pengingat attachment yang terlupakan";
+$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter";
diff --git a/plugins/attachment_reminder/localization/it_IT.inc b/plugins/attachment_reminder/localization/it_IT.inc
index d326a6065..2a9772dcb 100644
--- a/plugins/attachment_reminder/localization/it_IT.inc
+++ b/plugins/attachment_reminder/localization/it_IT.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
$messages['forgotattachment'] = "Sembra che tu abbia dimenticato di allegare un file!\nPremere Annulla per inviare lo stesso.\nOK per tornare al messaggio senza inviare.";
-$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['reminderoption'] = "Ricorda per gli allegati dimenticati";
$messages['keywords'] = "allegato,allegati,allegata,allegate,allega,allego,alleghi,attaccato,file,attachment,attach";
diff --git a/plugins/attachment_reminder/localization/ja_JP.inc b/plugins/attachment_reminder/localization/ja_JP.inc
new file mode 100644
index 000000000..5ba55d446
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ja_JP.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "ファイルの添付を忘れていませんか?";
+$messages['reminderoption'] = "添付ファイルの付け忘れを確認";
+$messages['keywords'] = "添付,ファイル,添付ファイル,同封,添え状";
diff --git a/plugins/attachment_reminder/localization/ko_KR.inc b/plugins/attachment_reminder/localization/ko_KR.inc
new file mode 100644
index 000000000..c80dcc4c8
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ko_KR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "파일을 첨부하는 것을 잊으셨습니까?";
+$messages['reminderoption'] = "잊었던 첨부파일에 대해 알리기";
+$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter";
diff --git a/plugins/attachment_reminder/localization/lb_LU.inc b/plugins/attachment_reminder/localization/lb_LU.inc
index cdfe031d1..f91f3d129 100644
--- a/plugins/attachment_reminder/localization/lb_LU.inc
+++ b/plugins/attachment_reminder/localization/lb_LU.inc
@@ -15,8 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/
*/
-
-$messages = array();
$messages['forgotattachment'] = "Hues du vergiess e Fichier drunzehänken?";
$messages['reminderoption'] = "U vergiessen Unhäng erënneren";
$messages['keywords'] = "Attachment,Fichier,Unhank,Unhang,Unhäng,ugehaangen,unhänken,attachment,file,attach,attached,attaching,enclosed,CV,cover letter,fichier joint";
diff --git a/plugins/attachment_reminder/localization/lt_LT.inc b/plugins/attachment_reminder/localization/lt_LT.inc
new file mode 100644
index 000000000..a8ba0b883
--- /dev/null
+++ b/plugins/attachment_reminder/localization/lt_LT.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Ar nepamiršote prisegti priedo?";
+$messages['reminderoption'] = "Priminti apie neprisegtus priedus";
+$messages['keywords'] = "priedas, byla, prisegti, prisegta, prisegama, uždaras, CV, laiškas";
diff --git a/plugins/attachment_reminder/localization/lv_LV.inc b/plugins/attachment_reminder/localization/lv_LV.inc
new file mode 100644
index 000000000..ee4feeb24
--- /dev/null
+++ b/plugins/attachment_reminder/localization/lv_LV.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Vai Jūs nepiemirsāt pievienot failu?";
+$messages['reminderoption'] = "Atgādināt par nepievienotajiem pielikumiem";
+$messages['keywords'] = "pielikums,fails,pievienot,pielikt,pievienots,pielikts,ievietot,ievietots,CV";
diff --git a/plugins/attachment_reminder/localization/ml_IN.inc b/plugins/attachment_reminder/localization/ml_IN.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ml_IN.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/mn_MN.inc b/plugins/attachment_reminder/localization/mn_MN.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/mn_MN.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/ms_MY.inc b/plugins/attachment_reminder/localization/ms_MY.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ms_MY.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/my_MM.inc b/plugins/attachment_reminder/localization/my_MM.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/my_MM.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/nb_NO.inc b/plugins/attachment_reminder/localization/nb_NO.inc
new file mode 100644
index 000000000..1462837d5
--- /dev/null
+++ b/plugins/attachment_reminder/localization/nb_NO.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Glemte du å legge ved en fil?";
+$messages['reminderoption'] = "Gi meg en påminnelse om glemte vedlegg";
+$messages['keywords'] = "vedlegg, fil, legg ved, lagt ved, legger ved, lukket, CV, følgebrev";
diff --git a/plugins/attachment_reminder/localization/nl_BE.inc b/plugins/attachment_reminder/localization/nl_BE.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/nl_BE.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/nl_NL.inc b/plugins/attachment_reminder/localization/nl_NL.inc
index d80bfe9a9..293ad174f 100644
--- a/plugins/attachment_reminder/localization/nl_NL.inc
+++ b/plugins/attachment_reminder/localization/nl_NL.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
-$messages['forgotattachment'] = "Ben je vergeten het bestand bij te voegen?";
-$messages['reminderoption'] = "Remind about forgotten attachments";
-$messages['keywords'] = "attachment,bestand,bijgaand,bijgaande,brief,bijgevoegd,bijgesloten,CV";
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Bent u vergeten het bestand bij te voegen?";
+$messages['reminderoption'] = "Herinner mij aan vergeten bijlagen";
+$messages['keywords'] = "attachment,bestand,bijgaand,bijgaande,brief,bijgevoegd,bijgesloten,CV,document,bijgesloten";
diff --git a/plugins/attachment_reminder/localization/nn_NO.inc b/plugins/attachment_reminder/localization/nn_NO.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/nn_NO.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/nqo.inc b/plugins/attachment_reminder/localization/nqo.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/nqo.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/om.inc b/plugins/attachment_reminder/localization/om.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/om.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/pl_PL.inc b/plugins/attachment_reminder/localization/pl_PL.inc
index 96f4f4989..06cede5d9 100644
--- a/plugins/attachment_reminder/localization/pl_PL.inc
+++ b/plugins/attachment_reminder/localization/pl_PL.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
$messages['forgotattachment'] = "Czy nie zapomniałeś załączyć pliku?";
$messages['reminderoption'] = "Włącz przypominanie o brakującym załączniku";
$messages['keywords'] = "załącznik,plik,załącz,CV";
diff --git a/plugins/attachment_reminder/localization/pt_BR.inc b/plugins/attachment_reminder/localization/pt_BR.inc
new file mode 100644
index 000000000..4b61e951c
--- /dev/null
+++ b/plugins/attachment_reminder/localization/pt_BR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Você esqueceu-se de anexar um arquivo?";
+$messages['reminderoption'] = "Alertar sobre o possível esquecimento de anexos";
+$messages['keywords'] = "anexo,arquivo,anexar,anexado,anexando,incluso,CV,currículo";
diff --git a/plugins/attachment_reminder/localization/pt_PT.inc b/plugins/attachment_reminder/localization/pt_PT.inc
new file mode 100644
index 000000000..de2d04efd
--- /dev/null
+++ b/plugins/attachment_reminder/localization/pt_PT.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Você esqueceu-se de anexar um ficheiro?";
+$messages['reminderoption'] = "Lembrar sobre anexos esquecidos";
+$messages['keywords'] = "anexo,ficheiro,anexar,anexado,a anexar,em anexo,currículo,carta de apresentação";
diff --git a/plugins/attachment_reminder/localization/ro_RO.inc b/plugins/attachment_reminder/localization/ro_RO.inc
new file mode 100644
index 000000000..ff1153908
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ro_RO.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Ați uitat să atașati ?";
+$messages['reminderoption'] = "Adu-mi aminte de atașamente";
+$messages['keywords'] = "atașament,atasament,atas,atasat,ataș,attach,fisier,fișier,attach,atach,attache";
diff --git a/plugins/attachment_reminder/localization/ru_RU.inc b/plugins/attachment_reminder/localization/ru_RU.inc
new file mode 100644
index 000000000..d592b1e30
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ru_RU.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Вы не забыли прикрепить файл?";
+$messages['reminderoption'] = "Напоминать о забытых вложениях";
+$messages['keywords'] = "вложение,файл, вложенный, прикрепленный,резюме,документ";
diff --git a/plugins/attachment_reminder/localization/sk_SK.inc b/plugins/attachment_reminder/localization/sk_SK.inc
new file mode 100644
index 000000000..344d1e6a7
--- /dev/null
+++ b/plugins/attachment_reminder/localization/sk_SK.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Nezabudli ste pridať prílohu?";
+$messages['reminderoption'] = "Pripomenúť zabudnuté prílohy";
+$messages['keywords'] = "príloha,súbor,pripojiť,priložená,priložený,priložené,v prílohe,životopis,sprievodný list";
diff --git a/plugins/attachment_reminder/localization/sl_SI.inc b/plugins/attachment_reminder/localization/sl_SI.inc
new file mode 100644
index 000000000..9531f8ed0
--- /dev/null
+++ b/plugins/attachment_reminder/localization/sl_SI.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Ste pozabili pripeti datoteko?";
+$messages['reminderoption'] = "Opozorilo za dodajanje priponk";
+$messages['keywords'] = "priponka,datoteka,pripeti,pripeta,pripenjati,priložen,priložiti,CV,spremno pismo";
diff --git a/plugins/attachment_reminder/localization/sr_CS.inc b/plugins/attachment_reminder/localization/sr_CS.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/sr_CS.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/sv_SE.inc b/plugins/attachment_reminder/localization/sv_SE.inc
new file mode 100644
index 000000000..744a9618e
--- /dev/null
+++ b/plugins/attachment_reminder/localization/sv_SE.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Glömde du att bifoga en fil?";
+$messages['reminderoption'] = "Påminn om glömda bilagor";
+$messages['keywords'] = "bilaga,fil,bifoga,bifogad,bifogar,infogad,CV,personligt brev";
diff --git a/plugins/attachment_reminder/localization/te_IN.inc b/plugins/attachment_reminder/localization/te_IN.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/te_IN.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/th_TH.inc b/plugins/attachment_reminder/localization/th_TH.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/th_TH.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/ti.inc b/plugins/attachment_reminder/localization/ti.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ti.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/tr_TR.inc b/plugins/attachment_reminder/localization/tr_TR.inc
new file mode 100644
index 000000000..f03587d97
--- /dev/null
+++ b/plugins/attachment_reminder/localization/tr_TR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Bir dosya eklemeyi unuttunuz mu?";
+$messages['reminderoption'] = "Unutulan dosya eklemelerini hatırlat";
+$messages['keywords'] = "ekleme,dosya,ek,eklenildi,ekleniliyor,konuldu,CV,kapak mektubu";
diff --git a/plugins/attachment_reminder/localization/tzm.inc b/plugins/attachment_reminder/localization/tzm.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/tzm.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/uk_UA.inc b/plugins/attachment_reminder/localization/uk_UA.inc
new file mode 100644
index 000000000..122fb2bee
--- /dev/null
+++ b/plugins/attachment_reminder/localization/uk_UA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "Ви забули прикріпити файл?";
+$messages['reminderoption'] = "Нагадати про забуте вкладення";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/ur_PK.inc b/plugins/attachment_reminder/localization/ur_PK.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/ur_PK.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/vi_VN.inc b/plugins/attachment_reminder/localization/vi_VN.inc
new file mode 100644
index 000000000..c3b4aaa02
--- /dev/null
+++ b/plugins/attachment_reminder/localization/vi_VN.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "";
+$messages['reminderoption'] = "";
+$messages['keywords'] = "";
diff --git a/plugins/attachment_reminder/localization/zh_CN.inc b/plugins/attachment_reminder/localization/zh_CN.inc
index 367191ffb..6c44fe948 100644
--- a/plugins/attachment_reminder/localization/zh_CN.inc
+++ b/plugins/attachment_reminder/localization/zh_CN.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
-$messages['forgotattachment'] = "您似乎忘記加入附件了,你確定要寄出?";
-$messages['reminderoption'] = "Remind about forgotten attachments";
-$messages['keywords'] = "附件,附加,附檔,附上,附加檔案";
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
+$messages['forgotattachment'] = "您似乎忘记添加附件了,是否继续发送?";
+$messages['reminderoption'] = "忘记添加附件提醒";
+$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter";
diff --git a/plugins/attachment_reminder/localization/zh_TW.inc b/plugins/attachment_reminder/localization/zh_TW.inc
index 367191ffb..aaa91cd24 100644
--- a/plugins/attachment_reminder/localization/zh_TW.inc
+++ b/plugins/attachment_reminder/localization/zh_TW.inc
@@ -1,6 +1,20 @@
<?php
-$messages = array();
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 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-attachment_reminder/
+*/
$messages['forgotattachment'] = "您似乎忘記加入附件了,你確定要寄出?";
-$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['reminderoption'] = "提醒加入附件";
$messages['keywords'] = "附件,附加,附檔,附上,附加檔案";
diff --git a/plugins/autologon/autologon.php b/plugins/autologon/autologon.php
index 9c7d5b6fc..63ffb943e 100644
--- a/plugins/autologon/autologon.php
+++ b/plugins/autologon/autologon.php
@@ -19,6 +19,8 @@ class autologon extends rcube_plugin
function startup($args)
{
+ $rcmail = rcmail::get_instance();
+
// change action to login
if (empty($_SESSION['user_id']) && !empty($_GET['_autologin']) && $this->is_localhost())
$args['action'] = 'login';
@@ -35,7 +37,7 @@ class autologon extends rcube_plugin
$args['cookiecheck'] = false;
$args['valid'] = true;
}
-
+
return $args;
}
diff --git a/plugins/compose_addressbook/compose_addressbook.js b/plugins/compose_addressbook/compose_addressbook.js
new file mode 100644
index 000000000..de5d95276
--- /dev/null
+++ b/plugins/compose_addressbook/compose_addressbook.js
@@ -0,0 +1,224 @@
+var compose_addressbook_fetched = false;
+
+if(window.rcmail) {
+ rcmail.addEventListener('init', function(evt) {
+
+ // mode of operation. configure this in config.php
+ var mode = rcmail.env.compose_addressbook_mode;
+
+ // to be able to have translated buttons, we need to predefine the buttons array
+ var cab_to = rcmail.gettext('to');
+ var cab_cc = rcmail.gettext('cc');
+ var cab_bcc = rcmail.gettext('bcc');
+
+ var buttons = {};
+ buttons[cab_bcc] = function() {
+ compose_addressbook_add_recipients('_bcc');
+ $('.ui-dialog-buttonpane button').removeClass('ui-state-focus');
+ }
+ buttons[cab_cc] = function() {
+ compose_addressbook_add_recipients('_cc');
+ $('.ui-dialog-buttonpane button').removeClass('ui-state-focus');
+ }
+ buttons[cab_to] = function() {
+ compose_addressbook_add_recipients('_to');
+ $('.ui-dialog-buttonpane button').removeClass('ui-state-focus');
+ }
+
+ // bind the dialog functionality to the dialog div
+ $("#compose_addressbook_dialog").dialog({
+ autoOpen: false,
+ modal: false,
+ resizable: false,
+ width: 285,
+ height: 500,
+ minHeight: 400,
+ buttons: buttons,
+ position: [$(window).width()-400,50]
+ });
+
+ // register the command associated with the toolbar button
+ rcmail.register_command('plugin.compose_addressbook', compose_addressbook_start , true);
+
+ // add the command to the list of compose commands
+ rcmail.env.compose_commands.push('plugin.compose_addressbook');
+
+ // register the callback function
+ rcmail.addEventListener('plugin.compose_addressbook_receive', compose_addressbook_receive);
+
+ // register the callback function for the group expander
+ rcmail.addEventListener('plugin.compose_addressbook_receive_expand', compose_addressbook_receive_expand);
+
+ // create an rc list object
+ if(rcmail.gui_objects.compose_addressbook_list) {
+ rcmail.compose_addressbook_list = new rcube_list_widget(rcmail.gui_objects.compose_addressbook_list, {multiselect:true, draggable:false, keyboard:false});
+
+ // add a listener for double click
+ rcmail.compose_addressbook_list.addEventListener('dblclick', function(o){ compose_address_dblclick(o); });
+
+ // initialize the list
+ rcmail.compose_addressbook_list.init();
+ }
+
+ // each mode of operation has a different key handler
+ if(mode == 'full') {
+ // bind keyevent handler to the search box
+ $('#compose_addressbook_filter').bind('keyup', function(evt) {
+ var search = $('#compose_addressbook_filter').val();
+ var regexp = new RegExp(search, 'i');
+ $('#compose_addressbook_table').find('td').each(function() {
+ var content = $(this).attr('title');
+ if(regexp.test(content)) {
+ $(this).parent().show();
+ } else {
+ $(this).parent().hide();
+ }
+ });
+ });
+ } else {
+ $('#compose_addressbook_filter').bind((bw.safari || bw.ie ? 'keydown' : 'keypress'), function(evt) {
+ var key = rcube_event.get_keycode(evt);
+ if(key == 13) {
+ var search = $('#compose_addressbook_filter').val();
+ $('#compose_addressbook_filter').val('');
+ compose_addressbook_search(search);
+ return false;
+ }
+ });
+ }
+
+ // bind click event to clear function
+ $("#compose_addressbook_searchreset").bind('click', function(e) {
+ $('#compose_addressbook_filter').val('');
+ $('#compose_addressbook_filter').focus();
+ $('#compose_addressbook_table').find('tr').each(function() {
+ $(this).show();
+ });
+ });
+ });
+}
+
+function compose_addressbook_start()
+{
+ compose_addressbook_fetch();
+ $('#compose_addressbook_dialog').dialog('open');
+}
+
+function compose_addressbook_fetch()
+{
+ if(!compose_addressbook_fetched) {
+ lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_post('plugin.get_addressbook', '', lock);
+ compose_addressbook_fetched = true;
+ }
+}
+
+function compose_addressbook_search(search)
+{
+ rcmail.compose_addressbook_list.clear();
+ lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_post('plugin.get_addressbook', '_search='+urlencode(search), lock);
+}
+
+function compose_addressbook_receive(data)
+{
+ var addresses = data.addresses;
+ var name;
+ var email;
+
+ // save the addresses for later use
+ rcmail.compose_addressbook_addresses = addresses;
+
+ for(var j=0; j<addresses.length; j++) {
+ var name = addresses[j].name;
+
+ if(addresses[j].id) {
+ email = 'address group';
+ } else {
+ email = addresses[j].email;
+ }
+ // add address to the row
+ compose_addressbook_add(name,email,j);
+ }
+}
+
+function compose_addressbook_add(address,email,id) {
+ var row = document.createElement('tr');
+ row.id = 'rcmrow'+id;
+ td = document.createElement('td');
+ td.innerHTML = address;
+ td.setAttribute('title', email);
+ td.style.cursor='pointer';
+ row.appendChild(td);
+
+ // add element to the list
+ rcmail.compose_addressbook_list.insert_row(row,0);
+}
+
+function compose_address_dblclick(list) {
+ var group_ids = [];
+ var group_sources = [];
+
+ var id = list.get_single_selection();
+ if(id == null) return;
+
+ var uid = list.rows[id].uid;
+ if(rcmail.compose_addressbook_addresses[uid].id) {
+ group_ids[0] = rcmail.compose_addressbook_addresses[uid].id;
+ group_sources[0] = rcmail.compose_addressbook_addresses[uid].source;
+ compose_addressbook_expand(group_ids, group_sources, '_to');
+ } else {
+ $("[name='_to']").attr('value', $("[name='_to']").val() + rcmail.compose_addressbook_addresses[uid].email+", ");
+ }
+ rcmail.compose_addressbook_list.clear_selection();
+}
+
+function compose_addressbook_add_recipients(target) {
+ var group_ids = [];
+ var group_sources = [];
+
+ if(rcmail.compose_addressbook_list.selection.length == 0) {
+ rcmail.display_message(rcmail.gettext('compose_addressbook_noselect', 'compose_addressbook'), 'error');
+ return;
+ }
+ rcmail.compose_addressbook_list.focused = false;
+ switch(target) {
+ case '_cc':
+ rcmail_ui.show_header_form('cc');
+ break;
+ case '_bcc':
+ rcmail_ui.show_header_form('bcc');
+ break;
+ }
+
+ for (var n=0; n<rcmail.compose_addressbook_list.selection.length; n++) {
+ var id = rcmail.compose_addressbook_list.selection[n];
+ var uid = rcmail.compose_addressbook_list.rows[id].uid;
+ var form = '[name="'+target+'"]';
+
+ if(rcmail.compose_addressbook_addresses[uid].id) {
+ group_ids[group_ids.length] = rcmail.compose_addressbook_addresses[uid].id;
+ group_sources[group_sources.length] = rcmail.compose_addressbook_addresses[uid].source;
+ } else {
+ $('#'+target).attr('value', $('#'+target).val() + rcmail.compose_addressbook_addresses[uid].email+", ");
+ }
+ }
+ compose_addressbook_expand(group_ids, group_sources,target);
+ rcmail.compose_addressbook_list.clear_selection();
+ rcmail.display_message(rcmail.gettext('compose_addressbook_added', 'compose_addressbook'), 'confirmation');
+}
+
+function compose_addressbook_expand(group_ids, group_sources,target) {
+ if(group_ids.length > 0) {
+ lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_request('plugin.expand_groups', '_groupids='+urlencode(group_ids.join(','))+'&_groupsources='+urlencode(group_sources.join(','))+'&_target='+target, lock);
+ }
+}
+
+function compose_addressbook_receive_expand(data) {
+ var form = '[name="'+data.target+'"]';
+
+ for(var j in data.members) {
+ $(form).attr('value', $(form).val() + data.members[j]+", ");
+ }
+}
diff --git a/plugins/compose_addressbook/compose_addressbook.php b/plugins/compose_addressbook/compose_addressbook.php
new file mode 100644
index 000000000..b97be7b75
--- /dev/null
+++ b/plugins/compose_addressbook/compose_addressbook.php
@@ -0,0 +1,180 @@
+<?php
+
+/**
+ * This plugin lets you add addressbook entries from the compose window using the mouse
+ *
+ * @author Cor Bosman (roundcube@wa.ter.net)
+ */
+
+class compose_addressbook extends rcube_plugin
+{
+ public $task = 'mail';
+
+ public function init()
+ {
+ $rcmail = rcmail::get_instance();
+
+ // only run this plugin if the skin is set to classic
+ $skin = $rcmail->config->get('skin');
+ if($skin != 'classic') return;
+
+ $this->require_plugin('jqueryui');
+
+ $this->register_action('plugin.get_addressbook', array($this, 'get_address'));
+ $this->register_action('plugin.expand_groups', array($this, 'expand_groups'));
+
+ if($rcmail->action == 'compose') {
+ $this->compose_addressbook_init();
+ }
+ }
+
+ public function compose_addressbook_init()
+ {
+ $this->add_texts('localization', true);
+
+ $rcmail = rcmail::get_instance();
+
+ $skin_path = $this->local_skin_path();
+
+ // add javascript and stylesheets
+ $this->include_script('compose_addressbook.js?v=2');
+ $this->include_stylesheet("$skin_path/compose_addressbook.css");
+
+ // html for dialog window
+ $table = new html_table(array('id' => 'compose_addressbook_table', 'class' => 'records-table', 'cols' => 1, 'cellspacing' => 0));
+
+ // create div for dialog window
+ $rcmail->output->add_footer(html::div(array('id' => "compose_addressbook_dialog", 'title' => Q($this->gettext('compose_addressbook_title'))),
+ html::div(array('id' => "compose_addressbook_quicksearchbar"),
+ html::img(array('id'=>'compose_addressbook_searchmod','src'=>'/images/icons/glass.png')) .
+ html::tag('input', array('type' => "text", 'class' => 'compose_addressbook_filter','id'=>'compose_addressbook_filter')).
+ html::a(array('id' => 'compose_addressbook_searchreset', 'href'=>'#'),
+ html::img(array('src'=>'/images/icons/reset.gif')))
+ ) .
+ html::div(array('id' => "compose_addressbook_container"),
+ $table->show()
+ )
+ ));
+
+ // add the addressbook button
+ $this->add_button(array(
+ 'command' => 'plugin.compose_addressbook',
+ 'imagepas' => $skin_path.'/compose_addressbook.png',
+ 'imageact' => $skin_path.'/compose_addressbook.png',
+ 'title' => 'compose_addressbook.compose_addressbook_buttontitle',
+ 'id' => 'rcmbtn_compose_addressbook'), 'toolbar');
+
+ $this->load_config();
+ $rcmail->output->set_env('compose_addressbook_mode', $rcmail->config->get('compose_addressbook_mode', 'full'));
+ $rcmail->output->add_gui_object('compose_addressbook_list', 'compose_addressbook_table');
+
+ // add some labels
+ $rcmail->output->add_label('cc', 'bcc', 'to');
+
+ // add list functions
+ $rcmail->output->include_script('list.js');
+
+ }
+
+ // get the addressbook entries and return them to the UI.
+ function get_address() {
+ $contacts = array();
+ $this->load_config();
+ $rcmail = rcmail::get_instance();
+
+ $mode = $rcmail->config->get('compose_addressbook_mode', 'full');
+ $search_mode = $rcmail->config->get('addressbook_search_mode');
+
+ // get the addressbooks, or default to all address sources
+ $book_types = (array) $rcmail->config->get('compose_addressbooks', $rcmail->config->get('autocomplete_addressbooks', array_keys($rcmail->get_address_sources())));
+
+ foreach ($book_types as $id) {
+ $abook = $rcmail->get_address_book($id);
+ $abook->set_pagesize(50000);
+
+ if($mode == 'full') {
+ $result = $abook->list_records();
+ while ($sql_arr = $result->iterate()) {
+ foreach ((array)$abook->get_col_values('email', $sql_arr, true) as $email) {
+ $contact = format_email_recipient($email, $sql_arr['name']);
+ $contacts[] = array('name' => $sql_arr['name'] , 'email' => format_email_recipient($email, $sql_arr['name']));
+ }
+ }
+ $search = null;
+ if($abook->groups) {
+ foreach($abook->list_groups($search) as $group) {
+ $abook->reset();
+ $abook->set_group($group['ID']);
+ $result = $abook->count();
+ if ($result->count) {
+ $contacts[] = array('name' => $group['name'] . ' (' . intval($result->count) . ')', 'id' => $group['ID'], 'source' => $id);
+ }
+ }
+ }
+ } else {
+ $search=trim(get_input_value('_search', RCUBE_INPUT_POST));
+
+ if(!empty($search)) {
+ $result = $abook->search(array('name','email'),$search, $search_mode, true, true, 'email');
+ while ($sql_arr = $result->iterate()) {
+ foreach ((array)$abook->get_col_values('email', $sql_arr, true) as $email) {
+ $contact = format_email_recipient($email, $sql_arr['name']);
+ $contacts[] = array('name' => $sql_arr['name'] , 'email' => format_email_recipient($email, $sql_arr['name']));
+ }
+ }
+ if($abook->groups) {
+ foreach($abook->list_groups($search) as $group) {
+ $abook->reset();
+ $abook->set_group($group['ID']);
+ $result = $abook->count();
+ if ($result->count) {
+ $contacts[] = array('name' => $group['name'] . ' (' . intval($result->count) . ')', 'id' => $group['ID'], 'source' => $id);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ sort($contacts);
+
+ // send the addressbook back to javascript
+ $rcmail->output->command('plugin.compose_addressbook_receive', array('addresses' => $contacts));
+ }
+
+ // expand all the groups that we added
+ function expand_groups() {
+ $rcmail = rcmail::get_instance();
+
+ $group_ids_input=trim(get_input_value('_groupids', RCUBE_INPUT_GET));
+ $group_sources_input=trim(get_input_value('_groupsources', RCUBE_INPUT_GET));
+ $target = trim(get_input_value('_target', RCUBE_INPUT_GET));
+
+ if($group_ids_input == '' || $group_sources_input == '') exit;
+
+ $group_ids = explode(',', $group_ids_input);
+ $group_sources = explode(',', $group_sources_input);
+
+ // create a list of ids per address source
+ for($i=0; $i<count($group_sources);$i++) {
+ $address_sources[$group_sources[$i]][] = $group_ids[$i];
+ }
+
+ // iterate over each address source and get the expanded groups
+ $members = array();
+ foreach($address_sources as $source => $groups) {
+ $abook = $rcmail->get_address_book($source);
+ foreach($groups as $group) {
+ $abook->set_group($group);
+ $abook->set_pagesize(1000);
+ $result = $abook->list_records(array('email','name'));
+ while ($result && ($sql_arr = $result->iterate())) {
+ $email = (array)$sql_arr['email'];
+ $members[] = format_email_recipient($email[0], $sql_arr['name']);
+ }
+ }
+ }
+ $rcmail->output->command('plugin.compose_addressbook_receive_expand', array('members' => array_unique($members), 'target' => $target));
+ }
+}
+?>
diff --git a/plugins/compose_addressbook/config.inc.php.dist b/plugins/compose_addressbook/config.inc.php.dist
new file mode 100644
index 000000000..b2ba8f9c8
--- /dev/null
+++ b/plugins/compose_addressbook/config.inc.php.dist
@@ -0,0 +1,21 @@
+<?php
+
+// which addressbook do we show. this can contain any addressbooks you use, including those set by plugins.
+// by default it's the same as the autocomplete_addressbooks setting.
+
+// $rcmail_config['compose_addressbooks'] = array('ldap');
+// $rcmail_config['compose_addressbooks'] = array('sql', 'static');
+// $rcmail_config['compose_addressbooks'] = array('sql');
+
+// which mode of operation do we use.
+//
+// full - show the full addressbook in the popup window. this should work
+// with most users, and is the default
+//
+// search - popup window starts up empty, and you can search for specific
+// addresses. This is recommended for extremely large addressbooks
+// containing thousands of addresses, and in most LDAP environments.
+
+$rcmail_config['compose_addressbook_mode'] = 'full';
+
+?>
diff --git a/plugins/compose_addressbook/localization/de_DE.inc b/plugins/compose_addressbook/localization/de_DE.inc
new file mode 100644
index 000000000..929a6493d
--- /dev/null
+++ b/plugins/compose_addressbook/localization/de_DE.inc
@@ -0,0 +1,11 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Adressbuch anzeigen';
+$labels['compose_addressbook_title'] = 'Adressbuch';
+$labels['compose_addressbook_close'] = 'Schließen';
+$labels['compose_addressbook_noselect'] = 'Sie haben keine Adresse ausgewählt';
+$labels['compose_addressbook_added'] = 'Adresse wurde hinzugefügt';
+
+
+?> \ No newline at end of file
diff --git a/plugins/compose_addressbook/localization/en_GB.inc b/plugins/compose_addressbook/localization/en_GB.inc
new file mode 100644
index 000000000..a8078f469
--- /dev/null
+++ b/plugins/compose_addressbook/localization/en_GB.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Show Address Book';
+$labels['compose_addressbook_title'] = 'Address Book';
+$labels['compose_addressbook_close'] = 'Close';
+$labels['compose_addressbook_noselect'] = 'You did not select an address';
+$labels['compose_addressbook_added'] = 'Addresses added';
+
+?>
diff --git a/plugins/compose_addressbook/localization/en_US.inc b/plugins/compose_addressbook/localization/en_US.inc
new file mode 100644
index 000000000..a8078f469
--- /dev/null
+++ b/plugins/compose_addressbook/localization/en_US.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Show Address Book';
+$labels['compose_addressbook_title'] = 'Address Book';
+$labels['compose_addressbook_close'] = 'Close';
+$labels['compose_addressbook_noselect'] = 'You did not select an address';
+$labels['compose_addressbook_added'] = 'Addresses added';
+
+?>
diff --git a/plugins/compose_addressbook/localization/es_ES.inc b/plugins/compose_addressbook/localization/es_ES.inc
new file mode 100644
index 000000000..2a000f2fa
--- /dev/null
+++ b/plugins/compose_addressbook/localization/es_ES.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Mostrar Direcciones';
+$labels['compose_addressbook_title'] = 'Libreta de Direcciones';
+$labels['compose_addressbook_close'] = 'Cerrar';
+$labels['compose_addressbook_noselect'] = 'No has seleccionado ninguna dirección!';
+$labels['compose_addressbook_added'] = 'Dirección añadida';
+
+?>
diff --git a/plugins/compose_addressbook/localization/fr_FR.inc b/plugins/compose_addressbook/localization/fr_FR.inc
new file mode 100644
index 000000000..1f52ffeae
--- /dev/null
+++ b/plugins/compose_addressbook/localization/fr_FR.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Afficher le carnet d\'adresse';
+$labels['compose_addressbook_title'] = 'Carnet d\'adresse';
+$labels['compose_addressbook_close'] = 'Fermer';
+$labels['compose_addressbook_noselect'] = 'Vous n\'avez pas sélectionné d\'adresse';
+$labels['compose_addressbook_added'] = 'Adresses ajoutées';
+
+?>
diff --git a/plugins/compose_addressbook/localization/it_IT.inc b/plugins/compose_addressbook/localization/it_IT.inc
new file mode 100644
index 000000000..d1b0c46af
--- /dev/null
+++ b/plugins/compose_addressbook/localization/it_IT.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Mostra la rubrica';
+$labels['compose_addressbook_title'] = 'Rubrica';
+$labels['compose_addressbook_close'] = 'Chiudi';
+$labels['compose_addressbook_noselect'] = 'Non hai selezionato nessun indirizzo';
+$labels['compose_addressbook_added'] = 'L\'indirizzo è stato aggiunto';
+
+?>
diff --git a/plugins/compose_addressbook/localization/nl_NL.inc b/plugins/compose_addressbook/localization/nl_NL.inc
new file mode 100644
index 000000000..f5de52ac9
--- /dev/null
+++ b/plugins/compose_addressbook/localization/nl_NL.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Voeg adres uit adresboek toe';
+$labels['compose_addressbook_title'] = 'Adres boek';
+$labels['compose_addressbook_close'] = 'Sluiten';
+$labels['compose_addressbook_noselect'] = 'Er is geen contact adres geselecteerd';
+$labels['compose_addressbook_added'] = 'Adressen zijn toegevoegd';
+
+?>
diff --git a/plugins/compose_addressbook/localization/pl_PL.inc b/plugins/compose_addressbook/localization/pl_PL.inc
new file mode 100644
index 000000000..eb95e4225
--- /dev/null
+++ b/plugins/compose_addressbook/localization/pl_PL.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Zobacz książkę adresową';
+$labels['compose_addressbook_title'] = 'Książka adresowa';
+$labels['compose_addressbook_close'] = 'Zamknij';
+$labels['compose_addressbook_noselect'] = 'Zaznacz jakiś adres';
+$labels['compose_addressbook_added'] = 'Adres został dodany';
+
+?>
diff --git a/plugins/compose_addressbook/localization/sv_SE.inc b/plugins/compose_addressbook/localization/sv_SE.inc
new file mode 100644
index 000000000..6e6d49f36
--- /dev/null
+++ b/plugins/compose_addressbook/localization/sv_SE.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = 'Visa adressbok';
+$labels['compose_addressbook_title'] = 'Adressbok';
+$labels['compose_addressbook_close'] = 'Stäng';
+$labels['compose_addressbook_noselect'] = 'Ingen adress valdes';
+$labels['compose_addressbook_added'] = 'Adress tillagd';
+
+?>
diff --git a/plugins/compose_addressbook/localization/zh_TW.inc b/plugins/compose_addressbook/localization/zh_TW.inc
new file mode 100644
index 000000000..1be7b614d
--- /dev/null
+++ b/plugins/compose_addressbook/localization/zh_TW.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['compose_addressbook_buttontitle'] = '顯示地址簿';
+$labels['compose_addressbook_title'] = '地址簿';
+$labels['compose_addressbook_close'] = '關閉';
+$labels['compose_addressbook_noselect'] = '沒有選擇電郵地址';
+$labels['compose_addressbook_added'] = '已加入電郵地址';
+
+?> \ No newline at end of file
diff --git a/plugins/compose_addressbook/package.xml b/plugins/compose_addressbook/package.xml
new file mode 100644
index 000000000..cc22b4c9b
--- /dev/null
+++ b/plugins/compose_addressbook/package.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>compose_addressbook</name>
+ <lead>
+ <name>Cor Bosman</name>
+ <user>cor</user>
+ <email>cor@roundcu.be</email>
+ <active>yes</active>
+ </lead>
+ <uri>https://github.com/corbosman/compose_addressbook</uri>
+ <version>
+ <release>8.0</release>
+ </version>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+</package>
diff --git a/plugins/compose_addressbook/skins/classic/compose_addressbook.css b/plugins/compose_addressbook/skins/classic/compose_addressbook.css
new file mode 100644
index 000000000..f8ec665d1
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/compose_addressbook.css
@@ -0,0 +1,83 @@
+#compose_addressbook_dialog {
+ display: none;
+ background-color: #FAFAFA;
+ color: #333;
+ padding: 5px 0 0 0;
+ overflow: hidden;
+}
+
+#compose_addressbook_dialog .ui-dialog {
+ padding: 0;
+}
+
+#compose_addressbook_container {
+ height: 376px;
+ overflow: auto;
+ overflow-x: hidden;
+ border-top: 1px solid #AAAAAA;
+ position: relative;
+ top: 30px;
+}
+
+#compose_addressbook_dialog table {
+ width: 100%;
+ overflow: hidden;
+}
+
+#compose_addressbook_quicksearchbar
+{
+ position: absolute;
+ left: 60px;
+ width: 182px;
+ height: 20px;
+ text-align: right;
+ background: url('searchfield.gif') top left no-repeat;
+}
+
+#compose_addressbook_searchreset
+{
+ position: absolute;
+ top: 3px;
+ right: 4px;
+ text-decoration: none;
+}
+
+#compose_addressbook_searchmod
+{
+ position: absolute;
+ top: 3px;
+ right: 160px;
+}
+
+#compose_addressbook_quicksearchbar img
+{
+ vertical-align: middle;
+}
+
+#compose_addressbook_filter
+{
+ margin-right: 4px;
+ margin-bottom: 5px;
+ position: absolute;
+ top: 2px;
+ left: 24px;
+ width: 140px;
+ height: 15px;
+ font-size: 11px;
+ padding: 0px;
+ border: none;
+}
+
+#compose_addressbook_dialog input {
+ outline: none;
+ border: none !important;
+}
+
+#compose_addressbook_filter[type=text]:focus {
+ outline: 0 none;
+}
+
+.ui-dialog-buttonpane button {
+ font-size: 10px !important;
+ width: 85px !important;
+} \ No newline at end of file
diff --git a/plugins/compose_addressbook/skins/classic/compose_addressbook.png b/plugins/compose_addressbook/skins/classic/compose_addressbook.png
new file mode 100644
index 000000000..e58e4dddc
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/compose_addressbook.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/searchfield.gif b/plugins/compose_addressbook/skins/classic/searchfield.gif
new file mode 100644
index 000000000..756a17e47
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/searchfield.gif
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-anim_basic_16x16.gif b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-anim_basic_16x16.gif
new file mode 100644
index 000000000..085ccaeca
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-anim_basic_16x16.gif
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 000000000..5b5dab2ab
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644
index 000000000..ac8b229af
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 000000000..ad3d6346e
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 000000000..42ccba269
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 000000000..5a46b47cb
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_dadada_1x400.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 000000000..86c2baa65
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 000000000..4443fdc1a
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 000000000..7c9fa6c6e
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_222222_256x240.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_222222_256x240.png
new file mode 100644
index 000000000..b273ff111
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_222222_256x240.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_2e83ff_256x240.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 000000000..09d1cdc85
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_454545_256x240.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_454545_256x240.png
new file mode 100644
index 000000000..59bd45b90
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_454545_256x240.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_888888_256x240.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_888888_256x240.png
new file mode 100644
index 000000000..6d02426c1
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_888888_256x240.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_cd0a0a_256x240.png b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 000000000..2ab019b73
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_cd0a0a_256x240.png
Binary files differ
diff --git a/plugins/compose_addressbook/skins/classic/smoothness/jquery-ui-1.8.2.custom.css b/plugins/compose_addressbook/skins/classic/smoothness/jquery-ui-1.8.2.custom.css
new file mode 100644
index 000000000..401eb1d15
--- /dev/null
+++ b/plugins/compose_addressbook/skins/classic/smoothness/jquery-ui-1.8.2.custom.css
@@ -0,0 +1,345 @@
+/*
+* jQuery UI CSS Framework
+* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+*/
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+* jQuery UI CSS Framework
+* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+*/
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
+.ui-widget-content a { color: #222222; }
+.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Resizable
+----------------------------------*/
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Button
+----------------------------------*/
+
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+
+
+
+
+
+/* Dialog
+----------------------------------*/
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
diff --git a/plugins/contextmenu/contextmenu.js b/plugins/contextmenu/contextmenu.js
new file mode 100644
index 000000000..6d83f1fbe
--- /dev/null
+++ b/plugins/contextmenu/contextmenu.js
@@ -0,0 +1,595 @@
+/**
+ * ContextMenu plugin script
+ */
+
+rcube_webmail.prototype.contextmenu_command_handlers = new Object();
+rcube_webmail.prototype.contextmenu_disable_multi = new Array('#reply','#reply-all','#reply-list','#forward-inline','#print','#edit','#viewsource','#download','#open','#edit');
+
+function rcm_contextmenu_update() {
+ //if (!rcmail.env.flag_for_deletion && rcmail.env.trash_mailbox && rcmail.env.mailbox != rcmail.env.trash_mailbox)
+ // $("#rcm_delete").html('<span>' + rcmail.gettext('movemessagetotrash') + '</span>');
+ //else
+ // $("#rcm_delete").html('<span>' + rcmail.gettext('deletemessage') + '</span>');
+}
+
+function rcm_contextmenu_init(row) {
+ $("#" + row).contextMenu({
+ menu: 'rcmContextMenu',
+ submenu_delay: 400
+ },
+ function(command, el, pos) {
+ var matches = String($(el).attr('id')).match(/rcmrow([a-z0-9\-_=]+)/i);
+ if ($(el) && matches) {
+ var prev_uid = rcmail.env.uid;
+ if (rcmail.message_list.selection.length <= 1 || !rcmail.message_list.in_selection(matches[1]))
+ rcmail.env.uid = matches[1];
+
+ // fix command string in IE
+ if (command.indexOf("#") > 0)
+ command = command.substr(command.indexOf("#") + 1);
+
+ // enable the required command
+ cmd = (command == 'read' || command == 'unread' || command == 'flagged' || command == 'unflagged') ? 'mark' : command;
+ var prev_command = rcmail.commands[cmd];
+ rcmail.enable_command(cmd, true);
+
+ // process external commands
+ if (typeof rcmail.contextmenu_command_handlers[command] == 'function') {
+ rcmail.contextmenu_command_handlers[command](command, el, pos);
+ }
+ else if (typeof rcmail.contextmenu_command_handlers[command] == 'string') {
+ window[rcmail.contextmenu_command_handlers[command]](command, el, pos);
+ }
+ else {
+ switch (command) {
+ case 'read':
+ case 'unread':
+ case 'flagged':
+ case 'unflagged':
+ rcmail.command('mark', command, $(el));
+ break;
+ case 'reply':
+ case 'reply-all':
+ case 'reply-list':
+ case 'forward-inline':
+ case 'forward-attachment':
+ case 'print':
+ case 'download':
+ case 'viewsource':
+ rcmail.command(command, '', $(el));
+ break;
+ case 'edit':
+ rcmail.command(command, 'new', $(el));
+ break;
+ case 'open':
+ rcmail.command(command, '', rcube_find_object('rcm_open'));
+ rcmail.sourcewin = window.open(rcube_find_object('rcm_open').href);
+ if (rcmail.sourcewin)
+ window.setTimeout(function() { rcmail.sourcewin.focus(); }, 20);
+
+ rcube_find_object('rcm_open').href = '#open';
+ break;
+ case 'delete':
+ case 'moveto':
+ if (command == 'moveto' && rcmail.env.rcm_destfolder == rcmail.env.mailbox)
+ return;
+
+ var prev_sel = null;
+
+ // also select childs of (collapsed) threads
+ if (rcmail.env.uid) {
+ if (!rcmail.message_list.in_selection(rcmail.env.uid)) {
+ prev_sel = rcmail.message_list.get_selection();
+ rcmail.message_list.select_row(rcmail.env.uid);
+ }
+
+ if (rcmail.message_list.rows[rcmail.env.uid].has_children && !rcmail.message_list.rows[rcmail.env.uid].expanded)
+ rcmail.message_list.select_childs(rcmail.env.uid);
+
+ rcmail.env.uid = null;
+ }
+
+ rcmail.command(command, rcmail.env.rcm_destfolder, $(el));
+
+ if (prev_sel) {
+ rcmail.message_list.clear_selection();
+
+ for (var i in prev_sel)
+ rcmail.message_list.select_row(prev_sel[i], CONTROL_KEY);
+ }
+
+ delete rcmail.env.rcm_destfolder;
+ break;
+ }
+ }
+
+ rcmail.enable_command(cmd, prev_command);
+ rcmail.env.uid = prev_uid;
+ }
+ });
+}
+
+function rcm_set_dest_folder(folder) {
+ rcmail.env.rcm_destfolder = folder;
+}
+
+function rcm_contextmenu_register_command(command, callback, label, pos, sep, multi, newSub, menu, liclass) {
+ if (!menu)
+ menu = $('#rcmContextMenu');
+
+ if (!liclass)
+ liclass = command;
+
+ if (typeof label != 'string') {
+ var menuItem = label.children('li');
+ }
+ else {
+ var menuItem = $('<li>').addClass(liclass);
+ $('<a>').attr('href', '#' + command).addClass('active').html('<span>' + rcmail.gettext(label) + '</span>').appendTo(menuItem);
+ }
+
+ rcmail.contextmenu_command_handlers[command] = callback;
+
+ if (pos && menu.children('li.' + pos) && newSub) {
+ subMenu = menu.children('li.' + pos);
+ subMenu.addClass('submenu');
+
+ var mainLink = null;
+ if (subMenu.children('a') && !subMenu.hasClass('sublink')) {
+ subMenu.addClass('sublink');
+
+ var mainLink = $('<li>').addClass(pos);
+ subMenu.children('a').clone().appendTo(mainLink)
+ subMenu.children('a').addClass('mainlink');
+ }
+
+ var newMenu = $('<ul>').addClass('toolbarmenu').appendTo(subMenu);
+
+ if (mainLink)
+ newMenu.append(mainLink);
+
+ newMenu.append(menuItem);
+ }
+ else if (pos && menu.children('li.' + pos)) {
+ menu.children('li.' + pos).before(menuItem);
+ }
+ else {
+ menu.append(menuItem);
+ }
+
+ if (sep == 'before')
+ menuItem.addClass('separator_above');
+ else if (sep == 'after')
+ menuItem.addClass('separator_below');
+
+ if (!multi)
+ rcmail.contextmenu_disable_multi[rcmail.contextmenu_disable_multi.length] = '#' + command;
+}
+
+function rcm_foldermenu_init() {
+ $("#mailboxlist li").contextMenu({
+ menu: 'rcmFolderMenu'
+ },
+ function(command, el, pos) {
+ var matches = String($(el).children('a').attr('onclick')).match(/.*rcmail.command\(["']list["'],\s*["']([^"']*)["'],\s*this\).*/i);
+ if ($(el) && matches) {
+ var mailbox = matches[1];
+ var messagecount = 0;
+
+ if (command == 'readfolder' || command == 'expunge' || command == 'purge') {
+ if (mailbox == rcmail.env.mailbox) {
+ messagecount = rcmail.env.messagecount;
+ }
+ else if (rcmail.env.unread_counts[mailbox] == 0) {
+ var lock = rcmail.set_busy(true, 'loading');
+
+ querystring = '_mbox=' + urlencode(mailbox);
+ querystring += (querystring ? '&' : '') + '_remote=1';
+ var url = rcmail.env.comm_path + '&_action=' + 'plugin.contextmenu.messagecount' + '&' + querystring
+
+ // send request
+ console.log('HTTP POST: ' + url);
+
+ jQuery.ajax({
+ url: url,
+ dataType: "json",
+ success: function(response) { messagecount = response.env.messagecount; },
+ async: false
+ });
+
+ rcmail.set_busy(false, null, lock);
+ }
+
+ if (rcmail.env.unread_counts[mailbox] == 0 && messagecount == 0) {
+ rcmail.display_message(rcmail.get_label('nomessagesfound'), 'notice');
+ return false;
+ }
+ }
+
+ // fix command string in IE
+ if (command.indexOf("#") > 0)
+ command = command.substr(command.indexOf("#") + 1);
+
+ // enable the required command
+ var prev_command = rcmail.commands[command];
+ rcmail.enable_command(command, true);
+
+ // process external commands
+ if (typeof rcmail.contextmenu_command_handlers[command] == 'function') {
+ rcmail.contextmenu_command_handlers[command](command, el, pos);
+ }
+ else if (typeof rcmail.contextmenu_command_handlers[command] == 'string') {
+ window[rcmail.contextmenu_command_handlers[command]](command, el, pos);
+ }
+ else {
+ switch (command) {
+ case 'readfolder':
+ var lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_request('plugin.contextmenu.readfolder', '_mbox=' + urlencode(mailbox) + '&_cur=' + rcmail.env.mailbox + '&_oact=' + rcmail.env.action, lock);
+ break;
+ case 'expunge':
+ rcmail.expunge_mailbox(mailbox);
+ break;
+ case 'purge':
+ rcmail.purge_mailbox(mailbox);
+ break;
+ case 'collapseall':
+ case 'expandall':
+ targetdiv = (command == 'collapseall') ? 'expanded' : 'collapsed';
+ $("#mailboxlist div." + targetdiv).each( function() {
+ var el = $(this);
+ var matches = String($(el).attr('onclick')).match(/.*rcmail.command\(["']collapse-folder["'],\s*["']([^"']*)["']\).*/i);
+ rcmail.collapse_folder(matches[1]);
+ });
+ break;
+ case 'openfolder':
+ rcube_find_object('rcm_openfolder').href = '?_task=mail&_mbox='+urlencode(mailbox);
+ rcmail.sourcewin = window.open(rcube_find_object('rcm_openfolder').href);
+ if (rcmail.sourcewin)
+ window.setTimeout(function() { rcmail.sourcewin.focus(); }, 20);
+
+ rcube_find_object('rcm_openfolder').href = '#openfolder';
+ break;
+ }
+ }
+
+ rcmail.enable_command(command, prev_command);
+ }
+ });
+}
+
+function rcm_update_options(el) {
+ if (el.hasClass('message')) {
+ $('#rcmContextMenu').disableContextMenuItems('#reply-list');
+ var matches = String($(el).attr('id')).match(/rcmrow([a-z0-9\-_=]+)/i);
+ if ($(el) && matches) {
+ if (rcmail.message_list.selection.length > 1 && rcmail.message_list.in_selection(matches[1])) {
+ $('#rcmContextMenu').disableContextMenuItems(rcmail.contextmenu_disable_multi.join(','));
+ }
+ else {
+ $('#rcmContextMenu').enableContextMenuItems(rcmail.contextmenu_disable_multi.join(','));
+
+ var msg = rcmail.env.messages[matches[1]];
+ if (!msg.ml)
+ $('#rcmContextMenu').disableContextMenuItems('#reply-list');
+ }
+ }
+ }
+ else if (el.hasClass('mailbox')) {
+ $('#rcmFolderMenu').disableContextMenuItems('#readfolder,#purge,#collapseall,#expandall');
+ var matches = String($(el).children('a').attr('onclick')).match(/.*rcmail.command\(["']list["'],\s*["']([^"']*)["'],\s*this\).*/i);
+ if ($(el) && matches) {
+ var mailbox = matches[1];
+
+ if (rcmail.env.unread_counts[mailbox] > 0)
+ $('#rcmFolderMenu').enableContextMenuItems('#readfolder');
+
+ if (mailbox == rcmail.env.trash_mailbox || mailbox == rcmail.env.junk_mailbox
+ || mailbox.match('^' + RegExp.escape(rcmail.env.trash_mailbox) + RegExp.escape(rcmail.env.delimiter))
+ || mailbox.match('^' + RegExp.escape(rcmail.env.junk_mailbox) + RegExp.escape(rcmail.env.delimiter)))
+ $('#rcmFolderMenu').enableContextMenuItems('#purge');
+
+ if ($("#mailboxlist div.expanded").length > 0)
+ $('#rcmFolderMenu').enableContextMenuItems('#collapseall');
+
+ if ($("#mailboxlist div.collapsed").length > 0)
+ $('#rcmFolderMenu').enableContextMenuItems('#expandall');
+ }
+ }
+ else if (el.hasClass('addressbook') || el.hasClass('contactgroup')) {
+ $('#rcmGroupMenu').disableContextMenuItems('#group-create,#group-rename,#group-delete');
+
+ if ($(el).hasClass('contactgroup') && $(el).children('a').attr('rel')) {
+ var matches = $(el).children('a').attr('rel').match(/([A-Z0-9\-_]+):?([A-Z0-9\-_]+)?/i);
+
+ if (!rcmail.env.address_sources[matches[1]].readonly) {
+ if (!rcmail.name_input)
+ $('#rcmGroupMenu').enableContextMenuItems('#group-rename');
+
+ $('#rcmGroupMenu').enableContextMenuItems('#group-delete');
+ }
+ }
+ else if ($(el).hasClass('addressbook')) {
+ var source = $(el).children('a').attr('rel');
+
+ if (!rcmail.env.address_sources[source].readonly)
+ $('#rcmGroupMenu').enableContextMenuItems('#group-create')
+ }
+ }
+ else if (rcmail.env.task == 'addressbook') {
+ var matches = String($(el).attr('id')).match(/rcmrow([a-z0-9\-_=]+)/i);
+ if ($(el) && matches) {
+ if (rcmail.contact_list.selection.length > 1 && rcmail.contact_list.in_selection(matches[1]))
+ $('#rcmAddressMenu').disableContextMenuItems(rcmail.contextmenu_disable_multi.join(','));
+ else
+ $('#rcmAddressMenu').enableContextMenuItems(rcmail.contextmenu_disable_multi.join(','));
+
+ if (rcmail.env.group && rcmail.contact_list.in_selection(matches[1]))
+ $('#rcmAddressMenu').enableContextMenuItems('#group-remove-selected');
+ else
+ $('#rcmAddressMenu').disableContextMenuItems('#group-remove-selected');
+
+ var ab_src = rcmail.env.source ? rcmail.env.source : matches[1].split('-', 2)[1];
+
+ if (rcmail.env.address_sources[ab_src].readonly)
+ $('#rcmAddressMenu').disableContextMenuItems('#edit,#delete,#group-remove-selected');
+ }
+ }
+}
+
+function rcm_addressmenu_init(row) {
+ $("tr[id=" + row + "]").contextMenu({
+ menu: 'rcmAddressMenu'
+ },
+ function(command, el, pos) {
+ var matches = String($(el).attr('id')).match(/rcmrow([a-z0-9\-_=]+)/i);
+ if ($(el) && matches) {
+ var prev_cid = rcmail.env.cid;
+ if (rcmail.contact_list.selection.length <= 1 || !rcmail.contact_list.in_selection(matches[1]))
+ rcmail.env.cid = matches[1];
+
+ // fix command string in IE
+ if (command.indexOf("#") > 0)
+ command = command.substr(command.indexOf("#") + 1);
+
+ // enable the required command
+ cmd = command;
+ var prev_command = rcmail.commands[cmd];
+ rcmail.enable_command(cmd, true);
+
+ // process external commands
+ if (typeof rcmail.contextmenu_command_handlers[command] == 'function') {
+ rcmail.contextmenu_command_handlers[command](command, el, pos);
+ }
+ else if (typeof rcmail.contextmenu_command_handlers[command] == 'string') {
+ window[rcmail.contextmenu_command_handlers[command]](command, el, pos);
+ }
+ else {
+ switch (command) {
+ case 'edit':
+ rcmail.contact_list.select(rcmail.env.cid);
+ clearTimeout(rcmail.preview_timer)
+ rcmail.command(command, '', $(el));
+ break;
+ case 'compose':
+ case 'delete':
+ case 'moveto':
+ case 'group-remove-selected':
+ var ab_src = rcmail.env.source ? rcmail.env.source : matches[1].split('-', 2)[1];
+
+ if (command == 'moveto') {
+ // check for valid taget
+ if (rcmail.env.rcm_destbook == ab_src || (rcmail.env.rcm_destgroup && rcmail.env.contactfolders['G' + rcmail.env.rcm_destsource + rcmail.env.rcm_destgroup].id == rcmail.env.group))
+ return;
+ }
+
+ var prev_sel = null;
+
+ if (rcmail.env.cid) {
+ if (!rcmail.contact_list.in_selection(rcmail.env.cid)) {
+ prev_sel = rcmail.contact_list.get_selection();
+ rcmail.contact_list.select(rcmail.env.cid);
+ }
+ else if (rcmail.contact_list.get_single_selection() == rcmail.env.cid) {
+ rcmail.env.cid = null;
+ }
+ else {
+ prev_sel = rcmail.contact_list.get_selection();
+ rcmail.contact_list.select(rcmail.env.cid);
+ }
+ }
+
+ if (command == 'delete')
+ rcmail.env.cid = null;
+
+ rcmail.drag_active = true;
+ if (rcmail.env.rcm_destgroup)
+ rcmail.command(command, rcmail.env.contactfolders['G' + rcmail.env.rcm_destsource + rcmail.env.rcm_destgroup], $(el));
+ else
+ rcmail.command(command, rcmail.env.contactfolders[rcmail.env.rcm_destsource], $(el));
+ rcmail.drag_active = false;
+
+ if (prev_sel) {
+ rcmail.contact_list.clear_selection();
+
+ for (var i in prev_sel)
+ rcmail.contact_list.select_row(prev_sel[i], CONTROL_KEY);
+ }
+
+ rcmail.env.rcm_destbook = null;
+ rcmail.env.rcm_destsource = null;
+ rcmail.env.rcm_destgroup = null;
+ break;
+ }
+ }
+
+ rcmail.enable_command(cmd, prev_command);
+ rcmail.env.cid = prev_cid;
+ }
+ });
+}
+
+function rcm_set_dest_book(obj, source, group) {
+ rcmail.env.rcm_destbook = obj;
+ rcmail.env.rcm_destsource = source;
+ rcmail.env.rcm_destgroup = group;
+}
+
+function rcm_groupmenu_init(li) {
+ $(li).contextMenu({
+ menu: 'rcmGroupMenu'
+ },
+ function(command, el, pos) {
+ var matches = $(el).children('a').attr('rel').match(/([A-Z0-9\-_]+):?([A-Z0-9\-_]+)?/i);
+ if ($(el) && matches) {
+ prev_group = rcmail.env.group;
+ prev_source = rcmail.env.source;
+
+ cur_source = matches[1];
+ if (matches[2])
+ cur_id = matches[2];
+ else
+ cur_id = rcmail.env.group;
+
+ rcmail.env.group = cur_id
+ rcmail.env.source = cur_source;
+
+ // fix command string in IE
+ if (command.indexOf("#") > 0)
+ command = command.substr(command.indexOf("#") + 1);
+
+ // enable the required command
+ var prev_command = rcmail.commands[command];
+ rcmail.enable_command(command, true);
+
+ // process external commands
+ if (typeof rcmail.contextmenu_command_handlers[command] == 'function') {
+ rcmail.contextmenu_command_handlers[command](command, el, pos);
+ }
+ else if (typeof rcmail.contextmenu_command_handlers[command] == 'string') {
+ window[rcmail.contextmenu_command_handlers[command]](command, el, pos);
+ }
+ else {
+ switch (command) {
+ case 'group-create':
+ rcmail.command(command, '', $(el).children('a'));
+ break;
+ case 'group-rename':
+ rcmail.command(command, '', $(el).children('a'));
+
+ // callback requires target is selected
+ rcmail.enable_command('listgroup', true);
+ rcmail.env.group = prev_group;
+ rcmail.env.source = prev_source
+ prev_group = cur_id;
+ prev_source = cur_source;
+ rcmail.command('listgroup', {'source': prev_source,'id': prev_group}, $(el).children('a'));
+ rcmail.enable_command('listgroup', false);
+ break;
+ case 'group-delete':
+ rcmail.command(command, '', $(el).children('a'));
+ break;
+ }
+ }
+
+ rcmail.enable_command(command, prev_command);
+ rcmail.env.group = prev_group;
+ rcmail.env.source = prev_source;
+ }
+ });
+}
+
+function rcm_groupmenu_update(action, props) {
+ var gid = props.source + props.id;
+ gid = gid.replace(rcmail.identifier_expr, '_');
+
+ switch (action) {
+ case 'insert':
+ var link = $('<a>')
+ .attr('id', 'rcm_contextgrps_G' + gid)
+ .attr('href', '#moveto')
+ .addClass('active')
+ .attr('onclick', "rcm_set_dest_book('G" + gid + "', '" + props.source + "','" + props.id + "')")
+ .html('<span>' + props.name + '</span>');
+
+ var li = $('<li>').addClass('contactgroup').append(link);
+
+ var sibling = $('#rcm_contextaddr_' + props.source);
+ $('a[id^="rcm_contextgrps_G"]').each(function(i, elem) {
+ if (props.name.toUpperCase().trim() >= $(this).text().toUpperCase().trim())
+ sibling = $(elem).parent();
+ else
+ return false;
+ });
+
+ $(li).insertAfter($(sibling));
+
+ rcm_groupmenu_init(props.li);
+ break;
+ case 'update':
+ if ($('#rcm_contextgrps_G' + gid).length) {
+ if (props.newid) {
+ var new_gid = props.source + props.newid;
+ new_gid = new_gid.replace(rcmail.identifier_expr, '_');
+
+ var link = $('<a>')
+ .attr('id', 'rcm_contextgrps_G' + new_gid)
+ .attr('href', '#moveto')
+ .addClass('active')
+ .attr('onclick', "rcm_set_dest_book('G" + new_gid + "', '" + props.source + "','" + props.newid + "')")
+ .html('<span>' + props.name + '</span>');
+
+ $('#rcm_contextgrps_G' + gid).replaceWith(link);
+ }
+ else {
+ $('#rcm_contextgrps_G' + gid).html('<span>' + props.name + '</span>');
+ }
+
+ row = $('#rcm_contextgrps_G' + gid).parent().clone(true);
+ $('#rcm_contextgrps_G' + gid).parent().remove();
+
+ var sibling = $('#rcm_contextaddr_' + props.source);
+ $('a[id^="rcm_contextgrps_G"]').each(function(i, elem) {
+ if (props.name.toUpperCase().trim() >= $(this).text().toUpperCase().trim())
+ sibling = $(elem).parent();
+ else
+ return false;
+ });
+
+ $(row).insertAfter($(sibling));
+ }
+
+ break;
+ case 'remove':
+ if ($('#rcm_contextgrps_G' + gid).length)
+ $('#rcm_contextgrps_G' + gid).remove();
+
+ break;
+ }
+}
+
+$(document).ready(function() {
+ if (window.rcmail) {
+ // init message list menu
+ if ($('#rcmContextMenu').length > 0) {
+ rcmail.addEventListener('listupdate', function(props) { rcm_contextmenu_update(); } );
+ rcmail.addEventListener('insertrow', function(props) { rcm_contextmenu_init(props.row.id); } );
+ }
+
+ // init folder list menu
+ if ($('#rcmFolderMenu').length > 0)
+ rcmail.add_onload('rcm_foldermenu_init();');
+
+ // init contact list menu
+ if ($('#rcmAddressMenu').length > 0)
+ rcmail.addEventListener('insertrow', function(props) { rcm_addressmenu_init(props.row.id); } );
+
+ // init group list menu
+ if ($('#rcmGroupMenu').length > 0) {
+ rcmail.add_onload('rcm_groupmenu_init("#directorylist li");');
+ rcmail.addEventListener('group_insert', function(props) { rcm_groupmenu_update('insert', props); } );
+ rcmail.addEventListener('group_update', function(props) { rcm_groupmenu_update('update', props); } );
+ rcmail.addEventListener('group_delete', function(props) { rcm_groupmenu_update('remove', props); } );
+ }
+ }
+}); \ No newline at end of file
diff --git a/plugins/contextmenu/contextmenu.php b/plugins/contextmenu/contextmenu.php
new file mode 100644
index 000000000..aa29aa8d5
--- /dev/null
+++ b/plugins/contextmenu/contextmenu.php
@@ -0,0 +1,315 @@
+<?php
+
+/**
+ * ContextMenu
+ *
+ * Plugin to add a context menu to the message list
+ *
+ * @version @package_version@
+ * @author Philip Weir
+ */
+class contextmenu extends rcube_plugin
+{
+ public $task = 'mail|addressbook';
+
+ function init()
+ {
+ $rcmail = rcube::get_instance();
+ if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show'))
+ $this->add_hook('render_mailboxlist', array($this, 'show_mailbox_menu'));
+ elseif ($rcmail->task == 'addressbook' && $rcmail->action == '')
+ $this->add_hook('addressbooks_list', array($this, 'show_addressbook_menu'));
+
+ $this->register_action('plugin.contextmenu.messagecount', array($this, 'messagecount'));
+ $this->register_action('plugin.contextmenu.readfolder', array($this, 'readfolder'));
+ }
+
+ public function messagecount()
+ {
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GET);
+ $this->api->output->set_env('messagecount', rcube::get_instance()->storage->count($mbox));
+ $this->api->output->send();
+ }
+
+ public function readfolder()
+ {
+ $storage = rcube::get_instance()->storage;
+ $cbox = rcube_utils::get_input_value('_cur', rcube_utils::INPUT_GET);
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GET);
+ $oact = rcube_utils::get_input_value('_oact', rcube_utils::INPUT_GET);
+
+ $uids = $storage->search_once($mbox, 'ALL UNSEEN', true);
+
+ if ($uids->is_empty())
+ return false;
+
+ $storage->set_flag($uids->get(), 'SEEN', $mbox);
+
+ if ($cbox == $mbox && $oact == '')
+ $this->api->output->command('toggle_read_status', 'read', $uids->get());
+
+ rcmail_send_unread_count($mbox, true);
+ $this->api->output->send();
+ }
+
+ public function show_mailbox_menu($args)
+ {
+ $rcmail = rcube::get_instance();
+ $this->add_texts('localization/');
+ $rcmail->output->add_label('nomessagesfound');
+ $this->include_script('jquery.contextMenu.js');
+ $this->include_script('jquery.mousewheel.js');
+ $this->include_script('contextmenu.js');
+
+ $this->include_stylesheet($this->local_skin_path() . '/contextmenu.css');
+ if ($rcmail->output->browser->ie && $rcmail->output->browser->ver == 6)
+ $this->include_stylesheet($this->local_skin_path() . '/ie6hacks.css');
+
+ $out = '';
+
+ // message list menu
+ if ($rcmail->action == '') {
+ $li = '';
+
+ $li .= html::tag('li', array('class' => 'conmentitle'), html::span(null, rcmail::Q($this->gettext('markmessages'))));
+ $li .= html::tag('li', array('class' => 'markmessage read'), html::a(array('href' => "#read", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('markread')))));
+ $li .= html::tag('li', array('class' => 'markmessage unread'), html::a(array('href' => "#unread", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('markunread')))));
+ $li .= html::tag('li', array('class' => 'markmessage flagged'), html::a(array('href' => "#flagged", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('markflagged')))));
+ $li .= html::tag('li', array('class' => 'markmessage unflagged separator_below'), html::a(array('href' => "#unflagged", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('markunflagged')))));
+ $li .= html::tag('li', array('class' => 'reply'), html::a(array('href' => "#reply", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('replytomessage')))));
+
+ $lis = '';
+ $lis .= html::tag('li', array('class' => 'replyall'), html::a(array('href' => "#reply-all", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('replytoallmessage')))));
+ $lis .= html::tag('li', array('class' => 'replylist'), html::a(array('href' => "#reply-list", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('replylist')))));
+ $li .= html::tag('li', array('class' => 'submenu replyacts'), html::a(array('href' => "#reply-all", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('replyall')))) . html::tag('ul', array('class' => 'popupmenu toolbarmenu replyacts'), $lis));
+
+ $lis = '';
+ $lis .= html::tag('li', array('class' => 'forwardinline'), html::a(array('href' => "#forward-inline", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('forwardinline')))));
+ $lis .= html::tag('li', array('class' => 'forwardattachment'), html::a(array('href' => "#forward-attachment", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('forwardattachment')))));
+ $li .= html::tag('li', array('class' => 'submenu forwardacts'), html::a(array('href' => "#forward-inline", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('forward')))) . html::tag('ul', array('class' => 'popupmenu toolbarmenu forwardacts'), $lis));
+
+ //$rcmail = rcmail::get_instance();
+ //if (!$rcmail->config->get('flag_for_deletion', false) && $rcmail->config->get('trash_mbox') && $_SESSION['mbox'] != $rcmail->config->get('trash_mbox'))
+ // $li .= html::tag('li', array('class' => 'delete separator_below'), html::a(array('href' => "#delete", 'id' => 'rcm_delete', 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('movemessagetotrash')))));
+ //else
+ $li .= html::tag('li', array('class' => 'delete separator_below'), html::a(array('href' => "#delete", 'id' => 'rcm_delete', 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('deletemessage')))));
+
+ $li .= html::tag('li', array('class' => 'submenu moveto'), html::span(null, rcmail::Q($this->gettext('moveto'))) . $this->_gen_folder_list($args['list'], '#moveto'));
+
+ $lis = '';
+ $lis .= html::tag('li', array('class' => 'print'), html::a(array('href' => "#print", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('printmessage')))));
+ $lis .= html::tag('li', array('class' => 'save'), html::a(array('href' => "#download", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('emlsave')))));
+ $lis .= html::tag('li', array('class' => 'edit'), html::a(array('href' => "#edit", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('editasnew')))));
+ $lis .= html::tag('li', array('class' => 'source separator_below'), html::a(array('href' => "#viewsource", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('viewsource')))));
+ $lis .= html::tag('li', array('class' => 'open'), html::a(array('href' => "#open", 'id' => 'rcm_open', 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('openinextwin')))));
+ $li .= html::tag('li', array('class' => 'submenu moreacts'), html::span(null, rcmail::Q($this->gettext('moreactions'))) . html::tag('ul', array('class' => 'popupmenu toolbarmenu moreacts'), $lis));
+
+ $out .= html::tag('ul', array('id' => 'rcmContextMenu', 'class' => 'popupmenu toolbarmenu'), $li);
+ }
+
+ // folder list menu
+ $li = '';
+
+ $li .= html::tag('li', array('class' => 'readfolder separator_below'), html::a(array('href' => "#readfolder", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('markreadfolder')))));
+
+ $li .= html::tag('li', array('class' => 'expunge'), html::a(array('href' => "#expunge", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('compact')))));
+ $li .= html::tag('li', array('class' => 'purge separator_below'), html::a(array('href' => "#purge", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('empty')))));
+
+ $li .= html::tag('li', array('class' => 'collapseall'), html::a(array('href' => "#collapseall", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('collapseall')))));
+ $li .= html::tag('li', array('class' => 'expandall separator_below'), html::a(array('href' => "#expandall", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('expandall')))));
+
+ $li .= html::tag('li', array('class' => 'openfolder'), html::a(array('href' => "#openfolder", 'id' => 'rcm_openfolder', 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('openinextwin')))));
+
+ $out .= html::tag('ul', array('id' => 'rcmFolderMenu', 'class' => 'popupmenu toolbarmenu'), $li);
+
+ $this->api->output->add_footer(html::div(null , $out));
+
+ if ($rcmail->action == 'show')
+ $this->api->output->set_env('delimiter', $rcmail->storage->get_hierarchy_delimiter());
+ }
+
+ public function show_addressbook_menu($args)
+ {
+ $rcmail = rcube::get_instance();
+ $this->add_texts('localization/');
+ $this->include_script('jquery.contextMenu.js');
+ $this->include_script('jquery.mousewheel.js');
+ $this->include_stylesheet($this->local_skin_path() . '/contextmenu.css');
+ $this->include_script('contextmenu.js');
+ $out = '';
+
+ // contact list menu
+ $li = '';
+
+ $li .= html::tag('li', array('class' => 'composeto separator_below'), html::a(array('href' => "#compose", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('composeto')))));
+
+ $li .= html::tag('li', array('class' => 'editcontact'), html::a(array('href' => "#edit", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('editcontact')))));
+ $li .= html::tag('li', array('class' => 'deletecontact'), html::a(array('href' => "#delete", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('deletecontact')))));
+ $li .= html::tag('li', array('class' => 'removefromgroup'), html::a(array('href' => "#group-remove-selected", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('groupremoveselected')))));
+
+ if ($lis = $this->_gen_addressbooks_list($args['sources'], '#moveto'))
+ $li .= html::tag('li', array('class' => 'submenu separator_above'), html::span(null, rcmail::Q($this->gettext('copyto'))) . $lis);
+
+ $out .= html::tag('ul', array('id' => 'rcmAddressMenu', 'class' => 'popupmenu toolbarmenu'), $li);
+
+ // contact group menu
+ $li = '';
+
+ $li .= html::tag('li', array('class' => 'groupcreate'), html::a(array('href' => "#group-create", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('newcontactgroup')))));
+ $li .= html::tag('li', array('class' => 'grouprename'), html::a(array('href' => "#group-rename", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('grouprename')))));
+ $li .= html::tag('li', array('class' => 'groupdelete'), html::a(array('href' => "#group-delete", 'class' => 'active'), html::span(null, rcmail::Q($this->gettext('groupdelete')))));
+
+ $out .= html::tag('ul', array('id' => 'rcmGroupMenu', 'class' => 'popupmenu toolbarmenu'), $li);
+
+ $this->api->output->add_footer(html::div(null , $out));
+ }
+
+ // based on rcmail->render_folder_tree_html()
+ private function _gen_folder_list($arrFolders, $command, $nestLevel = 0, &$folderTotal = 0)
+ {
+ $rcmail = rcube::get_instance();
+
+ $maxlength = 35;
+ $realnames = false;
+
+ $out = '';
+ foreach ($arrFolders as $key => $folder) {
+ $title = null;
+
+ if (($folder_class = $rcmail->folder_classname($folder['id'])) && !$realnames) {
+ $foldername = $rcmail->gettext($folder_class);
+ }
+ else {
+ $foldername = $folder['name'];
+
+ // shorten the folder name to a given length
+ if ($maxlength && $maxlength > 1) {
+ $fname = abbreviate_string($foldername, $maxlength);
+
+ if ($fname != $foldername)
+ $title = $foldername;
+
+ $foldername = $fname;
+ }
+ }
+
+ // make folder name safe for ids and class names
+ $folder_id = asciiwords($folder['id'], true, '_');
+ $classes = array();
+
+ // set special class for Sent, Drafts, Trash and Junk
+ if ($folder['id'] == $rcmail->config->get('sent_mbox'))
+ $classes[] = 'sent';
+ else if ($folder['id'] == $rcmail->config->get('drafts_mbox'))
+ $classes[] = 'drafts';
+ else if ($folder['id'] == $rcmail->config->get('trash_mbox'))
+ $classes[] = 'trash';
+ else if ($folder['id'] == $rcmail->config->get('junk_mbox'))
+ $classes[] = 'junk';
+ else if ($folder['id'] == 'INBOX')
+ $classes[] = 'inbox';
+ else
+ $classes[] = '_'.asciiwords($folder_class ? $folder_class : strtolower($folder['id']), true);
+
+ if ($folder['virtual'])
+ $classes[] = 'virtual';
+
+ if ($nestLevel > 0)
+ $classes[] = 'subfolder';
+
+ $out .= html::tag('li', array('class' => join(' ', $classes)), html::a(array('href' => $command, 'onclick' => "rcm_set_dest_folder('". rcmail::JQ($folder['id']) ."')", 'class' => 'active', 'title' => $title), html::span(null, str_repeat('&nbsp;&nbsp;', $nestLevel) . rcmail::Q($foldername))));
+
+ if (!empty($folder['folders']))
+ $out .= $this->_gen_folder_list($folder['folders'], $command, $nestLevel+1, $folderTotal);
+
+ $folderTotal++;
+ }
+
+ if ($nestLevel == 0) {
+ if ($folderTotal > 5) {
+ $out = html::tag('ul', array('class' => 'toolbarmenu folders scrollable'), $out);
+ $out = html::tag('div', array('class' => 'scroll_up_pas'), '') . $out . html::tag('div', array('class' => 'scroll_down_act'), '');
+ $out = html::tag('div', array('class' => 'popupmenu'), $out);
+ }
+ else {
+ $out = html::tag('ul', array('class' => 'popupmenu toolbarmenu folders'), $out);
+ }
+ }
+
+ return $out;
+ }
+
+ // based on rcmail_directory_list()
+ private function _gen_addressbooks_list($arrBooks, $command)
+ {
+ $rcmail = rcube::get_instance();
+ $groupTotal = 0;
+ $maxlength = 35;
+ $maxlength_grp = 33;
+ $out = '';
+
+ // address books
+ foreach ($arrBooks as $j => $source) {
+ $title = null;
+ $id = $source['id'] ? $source['id'] : $j;
+ $bookname = !empty($source['name']) ? rcmail::Q($source['name']) : rcmail::Q($id);
+
+ // shorten the address book name to a given length
+ if ($maxlength && $maxlength > 1) {
+ $bname = abbreviate_string($bookname, $maxlength);
+
+ if ($bname != $bookname)
+ $title = $bookname;
+
+ $bookname = $bname;
+ }
+
+ if ($source['readonly'])
+ $out .= html::tag('li', array('id' => 'rcm_contextaddr_' . $id, 'class' => 'addressbook disabled'), html::a(array('href' => $command, 'id' => 'rcm_contextgrps_'. rcmail::JQ($id), 'onclick' => "rcm_set_dest_book('" . rcmail::JQ($id) ."', '" . rcmail::JQ($id) ."', null)", 'class' => 'active', 'title' => $title), html::span(null, rcmail::Q($bookname))));
+ else
+ $out .= html::tag('li', array('id' => 'rcm_contextaddr_' . $id, 'class' => 'addressbook'), html::a(array('href' => $command, 'id' => 'rcm_contextgrps_'. rcmail::JQ($id), 'onclick' => "rcm_set_dest_book('" . rcmail::JQ($id) ."', '" . rcmail::JQ($id) ."', null)", 'class' => 'active', 'title' => $title), html::span(null, rcmail::Q($bookname))));
+
+ // contact groups
+ if ($source['groups']) {
+ $groups = $rcmail->get_address_book($source['id'])->list_groups();
+ foreach ($groups as $group) {
+ $title = null;
+ $gid = 'G' . rcube_utils::html_identifier($id . $group['ID']);
+ $groupname = !empty($group['name']) ? rcmail::Q($group['name']) : rcmail::Q($gid);
+
+ // shorten the address book name to a given length
+ if ($maxlength_grp && $maxlength_grp > 1) {
+ $gname = abbreviate_string($groupname, $maxlength_grp);
+
+ if ($gname != $groupname)
+ $title = $groupname;
+
+ $groupname = $gname;
+ }
+
+ if ($source['readonly'])
+ $out .= html::tag('li', array('class' => 'contactgroup disabled'), html::a(array('href' => $command, 'id' => 'rcm_contextgrps_'. rcmail::JQ($gid), 'onclick' => "rcm_set_dest_book('" . rcmail::JQ($gid) . "', '" . rcmail::JQ($id) . "', '" . rcmail::JQ($group['ID']) ."')", 'class' => 'active', 'title' => $title), html::span(null, rcmail::Q($groupname))));
+ else
+ $out .= html::tag('li', array('class' => 'contactgroup'), html::a(array('href' => $command, 'id' => 'rcm_contextgrps_'. rcmail::JQ($gid), 'onclick' => "rcm_set_dest_book('" . rcmail::JQ($gid) . "', '" . rcmail::JQ($id) . "', '" . rcmail::JQ($group['ID']) ."')", 'class' => 'active', 'title' => $title), html::span(null, rcmail::Q($groupname))));
+
+ $groupTotal++;
+ }
+ }
+
+ $groupTotal++;
+ }
+
+ if ($groupTotal > 5) {
+ $out = html::tag('ul', array('id' => 'rcm_contextgrps', 'class' => 'toolbarmenu folders scrollable'), $out);
+ $out = html::tag('div', array('class' => 'scroll_up_pas'), '') . $out . html::tag('div', array('class' => 'scroll_down_act'), '');
+ $out = html::tag('div', array('class' => 'popupmenu'), $out);
+ }
+ else {
+ $out = html::tag('ul', array('id' => 'rcm_contextgrps', 'class' => 'popupmenu toolbarmenu folders'), $out);
+ }
+
+ return $out;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/jquery.contextMenu.js b/plugins/contextmenu/jquery.contextMenu.js
new file mode 100644
index 000000000..eaf33e5af
--- /dev/null
+++ b/plugins/contextmenu/jquery.contextMenu.js
@@ -0,0 +1,21 @@
+// jQuery Context Menu Plugin
+//
+// Version 1.01
+//
+// Cory S.N. LaViska
+// A Beautiful Site (http://abeautifulsite.net/)
+//
+// More info: http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/
+//
+// Terms of Use
+//
+// This plugin is dual-licensed under the GNU General Public License
+// and the MIT License and is copyright A Beautiful Site, LLC.
+//
+// Modified by Philip Weir:
+// Added highlighting of selected row and submenu support
+// Added sub menu functions
+// Added bind to contextmenu event
+// Adjust menu position for screen boundaries
+// Shrunk with Google Closure Compiler (Simple Optimizations)
+jQuery&&function(){$.extend($.fn,{contextMenu:function(a,e){if(void 0==a.menu)return!1;void 0==a.inSpeed&&(a.inSpeed=150);void 0==a.outSpeed&&(a.outSpeed=75);0==a.inSpeed&&(a.inSpeed=-1);0==a.outSpeed&&(a.outSpeed=-1);$(this).each(function(){var b=$(this),l=$(b).offset();$("#"+a.menu).addClass("contextMenu");$(this).mousedown(function(m){$(this).mouseup(function(g){var d=$(this);$(this).unbind("mouseup");if(2==m.button){$(".contextRow").removeClass("contextRow");$(".contextMenu").hide();d.addClass("contextRow"); rcm_update_options(d);var f=$("#"+a.menu);$(this).submenu_render(f);if($(b).hasClass("disabled"))return!1;var c={},h,j;self.innerHeight?(c.pageYOffset=self.pageYOffset,c.pageXOffset=self.pageXOffset,c.innerHeight=self.innerHeight,c.innerWidth=self.innerWidth):document.documentElement&&document.documentElement.clientHeight?(c.pageYOffset=document.documentElement.scrollTop,c.pageXOffset=document.documentElement.scrollLeft,c.innerHeight=document.documentElement.clientHeight,c.innerWidth=document.documentElement.clientWidth): document.body&&(c.pageYOffset=document.body.scrollTop,c.pageXOffset=document.body.scrollLeft,c.innerHeight=document.body.clientHeight,c.innerWidth=document.body.clientWidth);g.pageX?h=g.pageX:h=g.clientX+c.scrollLeft;g.pageY?j=g.pageY:j=g.clientY+c.scrollTop;h+$(f).width()+10>$(document).width()&&0<$(document).width()-$(f).width()-10&&(h=$(document).width()-$(f).width()-10);j+$(f).height()+10>$(document).height()&&0<$(document).height()-$(f).height()-10&&(j=$(document).height()-$(f).height()-10); $(document).unbind("click",$(this).document_click);$("#"+a.menu+" li ul").hide();$("#"+a.menu+" li div").hide();$(f).css({top:j,left:h}).fadeIn(a.inSpeed);$(document).bind("keypress",{menu:f},$(this).menu_keypress);$("#"+a.menu).find("a").unbind("click");$("#"+a.menu).find("li a:not(.disabled)").click(function(){$(document).unbind("click",$(this).document_click).unbind("keypress",$(this).menu_keypress);$(".contextMenu").hide();d.removeClass("contextRow");e&&e($(this).attr("href").substr(1),$(d),{x:h- l.left,y:j-l.top,docX:h,docY:j});return!1});setTimeout(function(){$(document).bind("click",{menu:f,o:a},$(this).document_click);$("iframe").load(function(){(this.contentDocument?this.contentDocument:this.contentWindow?this.contentWindow.document:null).onclick=function(){$(document).click()}});$("iframe").contents().mouseup(function(){$(document).click()})},0)}rcmail.drag_active||(g.cancelBubble=!0,g.stopPropagation&&g.stopPropagation())})});var d,k;$("#"+a.menu).children("li").mouseenter(function(){if($(this).hasClass("submenu")){if($(this).hasClass("submenu")&& !d&&!$(this).children("*:not(a, span)").is(":visible")){window.clearTimeout(k);k=null;var b=this;d=window.setTimeout(function(){$("#"+a.menu).children("li.submenu").children("div.popupmenu").children("ul.scrollable").scrollTop(0);$("#"+a.menu).children("li.submenu").children("div.popupmenu").children("div.scroll_up_act").addClass("scroll_up_pas").removeClass("scroll_up_act");$("#"+a.menu).children("li.submenu").children("div.popupmenu").children("div.scroll_down_pas").addClass("scroll_down_act").removeClass("scroll_down_pas"); $("#"+a.menu).children("li.submenu").children("*:not(a, span)").hide();doc_height=$(document).height();$(b).children("*:not(a, span)").css({left:$("#"+a.menu).width()-2,top:0});$(b).children("*:not(a, span)").show();$(b).children("*:not(a, span)").offset().left+$(b).children("*:not(a, span)").width()+10>$(document).width()&&0<$(document).width()-$(b).children("*:not(a, span)").width()-$("#"+a.menu).width()&&$(b).children("*:not(a, span)").css({left:-1*$(b).children("*:not(a, span)").width()});y=-1* ($(b).children("*:not(a, span)").offset().top+$(b).children("*:not(a, span)").height()+10-doc_height);0>y&&0<$(b).children("*:not(a, span)").offset().top+y&&$(b).children("*:not(a, span)").css({top:y});$(b).children("div.popupmenu").length&&$(b).children("div.popupmenu").children().show();d=null},a.submenu_delay)}}else k=window.setTimeout(function(){$("#"+a.menu).children("li.submenu").children("*:not(a, span)").hide();k=null},a.submenu_delay)});$("#"+a.menu).children("li.submenu").mouseleave(function(){window.clearTimeout(d); d=null});$(this).mouseleave(function(){window.clearTimeout(d);d=null});$("#"+a.menu).each(function(){$(this).attr("unselectable","on");$(this).css("user-select","none");$(this).on("selectstart",!1)});$(b).add($("ul.contextMenu")).bind("contextmenu",function(){return!1})});return $(this)},disableContextMenuItems:function(a){if(void 0==a)return $(this).find("a").addClass("disabled"),$(this);$(this).each(function(){if(void 0!=a)for(var e=a.split(","),b=0;b<e.length;b++)$(this).find('a[href="'+e[b]+'"]').addClass("disabled")}); return $(this)},enableContextMenuItems:function(a){if(void 0==a)return $(this).find("a.disabled").removeClass("disabled"),$(this);$(this).each(function(){if(void 0!=a)for(var e=a.split(","),b=0;b<e.length;b++)$(this).find('a[href="'+e[b]+'"]').removeClass("disabled")});return $(this)},disableContextMenu:function(){$(this).each(function(){$(this).addClass("disabled")});return $(this)},enableContextMenu:function(){$(this).each(function(){$(this).removeClass("disabled")});return $(this)},destroyContextMenu:function(){$(this).each(function(){$(this).unbind("mousedown").unbind("mouseup")}); return $(this)},submenu_render:function(a){$(a).show();$(a).children("li.submenu").children().show();$(a).children("li.submenu").children("div.popupmenu").each(function(){ul_overflow=$(this).children("ul").css("overflow");$(this).children("ul").css({overflow:"visible"});$(this).children("div").css({width:$(this).children("ul").width()+"px"});$(this).css({width:$(this).children("ul").width()+"px"});$(this).children("ul").css({overflow:ul_overflow});$(this).children("div").click(function(a){var b=$(this).parent().children("ul"); $(this).hasClass("scroll_up_act")?($(b).scrollTop($(b).scrollTop()-18),$(this).parent().children("div.scroll_down_pas").addClass("scroll_down_act"),$(this).parent().children("div.scroll_down_pas").removeClass("scroll_down_pas"),0==$(b).scrollTop()&&($(this).removeClass("scroll_up_act"),$(this).addClass("scroll_up_pas"))):$(this).hasClass("scroll_down_act")&&($(b).scrollTop($(b).scrollTop()+18),$(this).parent().children("div.scroll_up_pas").addClass("scroll_up_act"),$(this).parent().children("div.scroll_up_pas").removeClass("scroll_up_pas"), $(b).prop("scrollHeight")-$(b).scrollTop()==$(b).outerHeight()&&($(this).removeClass("scroll_down_act"),$(this).addClass("scroll_down_pas")));a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation()});$(this).children("ul").mousewheel($(this).submenu_mousewheel)});$(a).children("li.submenu").children("*:not(a, span)").hide();$(a).hide()},submenu_mousewheel:function(a,e){0<e?$(this).parent().children("div.scroll_up_act").click():0>e&&$(this).parent().children("div.scroll_down_act").click()},menu_keypress:function(a){switch(a.keyCode){case 13:$(a.data.menu).find("li a.hover").trigger("click"); break;case 27:$(document).trigger("click")}},document_click:function(a){$(document).unbind("click",$(this).document_click).unbind("keypress",$(this).menu_keypress);$(".contextRow").removeClass("contextRow");$(a.data.menu).fadeOut(a.data.o.outSpeed);return!1}})}(jQuery); \ No newline at end of file
diff --git a/plugins/contextmenu/jquery.mousewheel.js b/plugins/contextmenu/jquery.mousewheel.js
new file mode 120000
index 000000000..d86864a6a
--- /dev/null
+++ b/plugins/contextmenu/jquery.mousewheel.js
@@ -0,0 +1 @@
+../../../javascript/jquery-mousewheel/jquery.mousewheel.min.js \ No newline at end of file
diff --git a/plugins/contextmenu/localization/ca_ES.inc b/plugins/contextmenu/localization/ca_ES.inc
new file mode 100644
index 000000000..61081b6c8
--- /dev/null
+++ b/plugins/contextmenu/localization/ca_ES.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Daniel López */
+
+$labels = array();
+$labels['markreadfolder'] = 'Marca tot com a llegit';
+$labels['collapseall'] = 'Compacta totes les carpetes';
+$labels['expandall'] = 'Expandeix totes les carpetes';
+$labels['copyto'] = 'Copia a ...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/cs_CZ.inc b/plugins/contextmenu/localization/cs_CZ.inc
new file mode 100644
index 000000000..1dc4400db
--- /dev/null
+++ b/plugins/contextmenu/localization/cs_CZ.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Martin Frajdl */
+
+$labels = array();
+$labels['markreadfolder'] = 'Oznacit vše jako přečtené';
+$labels['collapseall'] = 'Sbalit všechny složky';
+$labels['expandall'] = 'Rozbalit všechny složky';
+$labels['copyto'] = 'Kopírovat do...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/da_DK.inc b/plugins/contextmenu/localization/da_DK.inc
new file mode 100644
index 000000000..5b9c04f39
--- /dev/null
+++ b/plugins/contextmenu/localization/da_DK.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Johannes Hessellund */
+
+$labels = array();
+$labels['markreadfolder'] = 'Markér alle som læst';
+$labels['collapseall'] = 'Fold alle mapper sammen';
+$labels['expandall'] = 'Udfold alle mapper';
+$labels['copyto'] = 'Kopier til...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/de_CH.inc b/plugins/contextmenu/localization/de_CH.inc
new file mode 100644
index 000000000..fbfa57078
--- /dev/null
+++ b/plugins/contextmenu/localization/de_CH.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Mike Constabel */
+
+$labels = array();
+$labels['markreadfolder'] = 'Alle als gelesen markieren';
+$labels['collapseall'] = 'Alle Unterordner einklappen';
+$labels['expandall'] = 'Alle Unterordner ausklappen';
+$labels['copyto'] = 'Kopieren nach ...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/de_DE.inc b/plugins/contextmenu/localization/de_DE.inc
new file mode 100644
index 000000000..fbfa57078
--- /dev/null
+++ b/plugins/contextmenu/localization/de_DE.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Mike Constabel */
+
+$labels = array();
+$labels['markreadfolder'] = 'Alle als gelesen markieren';
+$labels['collapseall'] = 'Alle Unterordner einklappen';
+$labels['expandall'] = 'Alle Unterordner ausklappen';
+$labels['copyto'] = 'Kopieren nach ...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/en_GB.inc b/plugins/contextmenu/localization/en_GB.inc
new file mode 100644
index 000000000..d9cc7f9d7
--- /dev/null
+++ b/plugins/contextmenu/localization/en_GB.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['markreadfolder'] = 'Mark all as read';
+$labels['collapseall'] = 'Collapse all folders';
+$labels['expandall'] = 'Expand all folders';
+$labels['copyto'] = 'Copy to...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/en_US.inc b/plugins/contextmenu/localization/en_US.inc
new file mode 100644
index 000000000..d9cc7f9d7
--- /dev/null
+++ b/plugins/contextmenu/localization/en_US.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['markreadfolder'] = 'Mark all as read';
+$labels['collapseall'] = 'Collapse all folders';
+$labels['expandall'] = 'Expand all folders';
+$labels['copyto'] = 'Copy to...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/es_ES.inc b/plugins/contextmenu/localization/es_ES.inc
new file mode 100644
index 000000000..253106be6
--- /dev/null
+++ b/plugins/contextmenu/localization/es_ES.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Daniel López */
+
+$labels = array();
+$labels['markreadfolder'] = 'Marcar todo como leído';
+$labels['collapseall'] = 'Compactar todas las carpetas';
+$labels['expandall'] = 'Expandir todas las carpetas';
+$labels['copyto'] = 'Copiar a...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/fr_FR.inc b/plugins/contextmenu/localization/fr_FR.inc
new file mode 100644
index 000000000..6da00f498
--- /dev/null
+++ b/plugins/contextmenu/localization/fr_FR.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: */
+
+$labels = array();
+$labels['markreadfolder'] = 'Marquer tout comme lu';
+$labels['collapseall'] = 'Reduire les dossiers';
+$labels['expandall'] = 'Developper les dossiers';
+$labels['copyto'] = 'Copier vers...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/gl_ES.inc b/plugins/contextmenu/localization/gl_ES.inc
new file mode 100644
index 000000000..33f2de1d6
--- /dev/null
+++ b/plugins/contextmenu/localization/gl_ES.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: David Garabana Barro */
+
+$labels = array();
+$labels['markreadfolder'] = 'Marcar todas coma lidas';
+$labels['collapseall'] = 'Pechar tódolos cartafoles';
+$labels['expandall'] = 'Abrir tódolos cartafoles';
+$labels['copyto'] = 'Copiar a...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/hu_HU.inc b/plugins/contextmenu/localization/hu_HU.inc
new file mode 100644
index 000000000..699aa8df9
--- /dev/null
+++ b/plugins/contextmenu/localization/hu_HU.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Németh János */
+
+$labels = array();
+$labels['markreadfolder'] = 'Összes megjelölése olvasottként';
+$labels['collapseall'] = 'Összes összecsukása';
+$labels['expandall'] = 'Összes kibontása';
+$labels['copyto'] = 'Másolás...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/it_IT.inc b/plugins/contextmenu/localization/it_IT.inc
new file mode 100644
index 000000000..7e68214c5
--- /dev/null
+++ b/plugins/contextmenu/localization/it_IT.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Massimiliano Adamo */
+
+$labels = array();
+$labels['markreadfolder'] = 'Marca tutto come letto';
+$labels['collapseall'] = 'Compatta tutte le cartelle';
+$labels['expandall'] = 'Espandi tutte le cartelle';
+$labels['copyto'] = 'Copia su...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/nl_NL.inc b/plugins/contextmenu/localization/nl_NL.inc
new file mode 100644
index 000000000..57f3562d0
--- /dev/null
+++ b/plugins/contextmenu/localization/nl_NL.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Wouter Kevenaar */
+
+$labels = array();
+$labels['markreadfolder'] = 'Alles markeren als gelezen';
+$labels['collapseall'] = 'Alle mappen inklappen';
+$labels['expandall'] = 'Alle mappen uitklappen';
+$labels['copyto'] = 'Kopiëren naar...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/pl_PL.inc b/plugins/contextmenu/localization/pl_PL.inc
new file mode 100644
index 000000000..7cc2cd4b9
--- /dev/null
+++ b/plugins/contextmenu/localization/pl_PL.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Michał Jałocha */
+
+$labels = array();
+$labels['markreadfolder'] = 'Oznacz wszystkie jako przeczytane';
+$labels['collapseall'] = 'Zwiń wszystkie foldery';
+$labels['expandall'] = 'Rozwiń wszystkie foldery';
+$labels['copyto'] = 'Kopiuj do...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/pt_BR.inc b/plugins/contextmenu/localization/pt_BR.inc
new file mode 100644
index 000000000..60b0e7284
--- /dev/null
+++ b/plugins/contextmenu/localization/pt_BR.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Alexandre Gorges */
+
+$labels = array();
+$labels['markreadfolder'] = 'Marcar todas como lidas';
+$labels['collapseall'] = 'Recolher todas as pastas';
+$labels['expandall'] = 'Expandir todas as pastas';
+$labels['copyto'] = 'Copiar para...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/ro_RO.inc b/plugins/contextmenu/localization/ro_RO.inc
new file mode 100644
index 000000000..3ac7559ab
--- /dev/null
+++ b/plugins/contextmenu/localization/ro_RO.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Ovidiu Bica */
+
+$labels = array();
+$labels['markreadfolder'] = 'Marchează mesajele ca citite';
+$labels['collapseall'] = 'Ascunde toate folderele';
+$labels['expandall'] = 'Afişează toate folderele';
+$labels['copyto'] = 'Copiaza in';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/ru_RU.inc b/plugins/contextmenu/localization/ru_RU.inc
new file mode 100644
index 000000000..3a3d85df6
--- /dev/null
+++ b/plugins/contextmenu/localization/ru_RU.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Sergey Basov */
+
+$labels = array();
+$labels['markreadfolder'] = 'Отметить все как прочитанные';
+$labels['collapseall'] = 'Свернуть все папки';
+$labels['expandall'] = 'Развернуть все папки';
+$labels['copyto'] = 'Копировать в...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/sv_SE.inc b/plugins/contextmenu/localization/sv_SE.inc
new file mode 100644
index 000000000..92f3c13a0
--- /dev/null
+++ b/plugins/contextmenu/localization/sv_SE.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Jonas Nasholm */
+
+$labels = array();
+$labels['markreadfolder'] = 'Märk allt som läst';
+$labels['collapseall'] = 'Dölj alla kataloger';
+$labels['expandall'] = 'Visa alla kataloger';
+$labels['copyto'] = 'Kopiera till...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/tr_TR.inc b/plugins/contextmenu/localization/tr_TR.inc
new file mode 100644
index 000000000..62f7acf93
--- /dev/null
+++ b/plugins/contextmenu/localization/tr_TR.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Mustafa Icer */
+
+$labels = array();
+$labels['markreadfolder'] = 'Tüm mesajları okunumuş olarak işaretle';
+$labels['collapseall'] = 'Tüm alt klasörleri kapat';
+$labels['expandall'] = 'Tüm alt klasörleri aç';
+$labels['copyto'] = '... kopyala';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/uk_UA.inc b/plugins/contextmenu/localization/uk_UA.inc
new file mode 100644
index 000000000..67ddb234c
--- /dev/null
+++ b/plugins/contextmenu/localization/uk_UA.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: Sergey Basov */
+
+$labels = array();
+$labels['markreadfolder'] = 'Відмітити все як прочитане';
+$labels['collapseall'] = 'Згорнути усі папки';
+$labels['expandall'] = 'Розгорнути усі папки';
+$labels['copyto'] = 'Копіювати до...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/localization/zh_TW.inc b/plugins/contextmenu/localization/zh_TW.inc
new file mode 100644
index 000000000..bd33d27b8
--- /dev/null
+++ b/plugins/contextmenu/localization/zh_TW.inc
@@ -0,0 +1,12 @@
+<?php
+/* Author: thomasysliu */
+
+$labels = array();
+$labels['markreadfolder'] = '標示為已讀取';
+$labels['collapseall'] = '全部收起';
+$labels['expandall'] = '全部展開';
+$labels['copyto'] = '複製到...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/contextmenu/package.xml b/plugins/contextmenu/package.xml
new file mode 100644
index 000000000..c65375ae9
--- /dev/null
+++ b/plugins/contextmenu/package.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>contextmenu</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-Context-Menu/</uri>
+ <summary>Adds context menus with common tasks to various parts of Roundcube</summary>
+ <description>Adds context menus to the message list, folder list and address book. Menu includes the abilities mark messages as read/unread, delete, reply and forward.</description>
+ <lead>
+ <name>Philip Weir</name>
+ <user>JohnDoh</user>
+ <email>roundcube@tehinterweb.co.uk</email>
+ <active>yes</active>
+ </lead>
+ <date>2013-02-24</date>
+ <time>10:50:37</time>
+ <version>
+ <release>1.10</release>
+ <api>1.10</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>-</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="contextmenu.php" role="php">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="contextmenu.js" role="data">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="CHANGELOG" role="data"/>
+ <file name="README.md" role="data"/>
+ <file name="jquery.contextMenu.js" role="data"/>
+ <file name="jquery.mousewheel.js" role="data"/>
+ <file name="localization/ca_ES.inc" role="data"/>
+ <file name="localization/cs_CZ.inc" role="data"/>
+ <file name="localization/da_DK.inc" role="data"/>
+ <file name="localization/de_CH.inc" role="data"/>
+ <file name="localization/de_DE.inc" role="data"/>
+ <file name="localization/en_GB.inc" role="data"/>
+ <file name="localization/en_US.inc" role="data"/>
+ <file name="localization/es_ES.inc" role="data"/>
+ <file name="localization/fr_FR.inc" role="data"/>
+ <file name="localization/gl_ES.inc" role="data"/>
+ <file name="localization/hu_HU.inc" role="data"/>
+ <file name="localization/it_IT.inc" role="data"/>
+ <file name="localization/nl_NL.inc" role="data"/>
+ <file name="localization/pl_PL.inc" role="data"/>
+ <file name="localization/pt_BR.inc" role="data"/>
+ <file name="localization/ro_RO.inc" role="data"/>
+ <file name="localization/ru_RU.inc" role="data"/>
+ <file name="localization/sv_SE.inc" role="data"/>
+ <file name="localization/tr_TR.inc" role="data"/>
+ <file name="localization/uk_UA.inc" role="data"/>
+ <file name="localization/zh_TW.inc" role="data"/>
+ <file name="skins/classic/contexticons.gif" role="data"/>
+ <file name="skins/classic/contexticons.png" role="data"/>
+ <file name="skins/classic/contextmenu.css" role="data"/>
+ <file name="skins/classic/folders.gif" role="data"/>
+ <file name="skins/classic/folders.png" role="data"/>
+ <file name="skins/classic/ie6hacks.css" role="data"/>
+ <file name="skins/classic/messageactions.gif" role="data"/>
+ <file name="skins/classic/messageactions.png" role="data"/>
+ <file name="skins/larry/contexticons.png" role="data"/>
+ <file name="skins/larry/contextmenu.css" role="data"/>
+ <file name="skins/larry/folders.png" role="data"/>
+ <file name="skins/larry/ie6hacks.css" role="data"/>
+ <file name="skins/larry/messageactions.png" role="data"/>
+ </dir>
+ <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.1</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>
diff --git a/plugins/contextmenu/skins/classic/contexticons.gif b/plugins/contextmenu/skins/classic/contexticons.gif
new file mode 100644
index 000000000..e1a77ea28
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/contexticons.gif
Binary files differ
diff --git a/plugins/contextmenu/skins/classic/contexticons.png b/plugins/contextmenu/skins/classic/contexticons.png
new file mode 100644
index 000000000..fb0a7299c
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/contexticons.png
Binary files differ
diff --git a/plugins/contextmenu/skins/classic/contextmenu.css b/plugins/contextmenu/skins/classic/contextmenu.css
new file mode 100644
index 000000000..704878818
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/contextmenu.css
@@ -0,0 +1,357 @@
+/**
+ * ContextMenu plugin styles
+ */
+
+.contextRow td,
+#mailboxlist li.contextRow,
+#directorylistbox li.contextRow
+{
+ background-color: #EEEEEE;
+}
+
+#mailboxlist li.selected,
+#directorylistbox li.selected
+{
+ background-color: #929292;
+}
+
+#rcmContextMenu,
+#rcmFolderMenu,
+#rcmAddressMenu,
+#rcmGroupMenu
+{
+ padding-top: 3px;
+ min-width: 220px;
+}
+
+#rcmContextMenu li,
+#rcmFolderMenu li,
+#rcmAddressMenu li,
+#rcmGroupMenu li
+{
+ margin: 0;
+}
+
+#rcmContextMenu li ul,
+#rcmContextMenu li div,
+#rcmFolderMenu li ul,
+#rcmFolderMenu li div,
+#rcmAddressMenu li ul,
+#rcmAddressMenu li div,
+#rcmGroupMenu li ul,
+#rcmGroupMenu li div
+{
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: auto;
+ display: none;
+ background-color: #F9F9F9;
+ border: 1px solid #CCC;
+ padding: 1px;
+ z-index: 901;
+}
+
+#rcmContextMenu li.conmentitle,
+#rcmContextMenu li.submenu,
+#rcmFolderMenu li.conmentitle,
+#rcmFolderMenu li.submenu,
+#rcmAddressMenu li.conmentitle,
+#rcmAddressMenu li.submenu,
+#rcmGroupMenu li.conmentitle,
+#rcmGroupMenu li.submenu
+{
+ padding: 2px 8px 3px 27px;
+ cursor: default;
+}
+
+#rcmContextMenu li.sublink,
+#rcmFolderMenu li.sublink,
+#rcmAddressMenu li.sublink,
+#rcmGroupMenu li.sublink
+{
+ padding: 0;
+}
+
+#rcmContextMenu li.submenu,
+#rcmFolderMenu li.submenu,
+#rcmAddressMenu li.submenu,
+#rcmGroupMenu li.submenu
+{
+ position: relative;
+ cursor: pointer;
+ background: url(contexticons.png) no-repeat right 0;
+ padding-right: 15px;
+}
+
+#rcmContextMenu li.replyacts,
+#rcmContextMenu li.forwardacts,
+#rcmAddressMenu li.exportacts
+{
+ padding: 0 8px 0 0;
+}
+
+#rcmContextMenu li.markmessage a,
+#rcmAddressMenu li.contactgroup a
+{
+ text-indent: 8px;
+}
+
+#rcmContextMenu li.submenu:hover,
+#rcmContextMenu li.sublink:hover a.mainlink,
+#rcmFolderMenu li.submenu:hover,
+#rcmFolderMenu li.sublink:hover a.mainlink,
+#rcmAddressMenu li.submenu:hover,
+#rcmAddressMenu li.sublink:hover a.mainlink,
+#rcmGroupMenu li.submenu:hover,
+#rcmGroupMenu li.sublink:hover a.mainlink
+{
+ color: #fff;
+ background-color: #CC0000;
+}
+
+#rcmContextMenu li a,
+#rcmFolderMenu li a,
+#rcmAddressMenu li a,
+#rcmGroupMenu li a
+{
+ background: url(contexticons.png) no-repeat 7px 20px;
+}
+
+#rcmContextMenu li a.active:hover,
+#rcmFolderMenu li a.active:hover,
+#rcmAddressMenu li a.active:hover,
+#rcmGroupMenu li a.active:hover
+{
+ color: #fff;
+ background-color: #CC0000;
+}
+
+#rcmContextMenu a.disabled,
+#rcmFolderMenu a.disabled,
+#rcmAddressMenu a.disabled,
+#rcmGroupMenu a.disabled
+{
+ color: #AAA;
+ cursor: default;
+}
+
+#rcmContextMenu a.disabled:hover,
+#rcmFolderMenu a.disabled:hover,
+#rcmAddressMenu a.disabled:hover,
+#rcmGroupMenu a.disabled:hover
+{
+ color: #AAA;
+ background-color: transparent
+}
+
+#rcmContextMenu .read a
+{
+ background-position: 7px -85px;
+}
+
+#rcmFolderMenu .readfolder a
+{
+ background-position: 7px -85px;
+}
+
+#rcmContextMenu .unread a
+{
+ background-position: 7px -136px;
+}
+#rcmContextMenu .flagged a
+{
+ background-position: 7px -170px;
+}
+
+#rcmContextMenu .unflagged a
+{
+ background-position: 7px -153px;
+}
+
+#rcmContextMenu .reply a, #rcmContextMenu .replyall a, #rcmContextMenu .replylist a
+{
+ background-position: 7px -119px;
+}
+
+#rcmContextMenu .forwardinline a, #rcmContextMenu .forwardattachment a
+{
+ background-position: 7px -102px;
+}
+
+#rcmContextMenu .delete a,
+#rcmAddressMenu .deletecontact a
+{
+ background-position: 7px -187px;
+}
+
+#rcmFolderMenu .expunge a
+{
+ background-position: 7px -255px;
+}
+
+#rcmFolderMenu .purge a
+{
+ background-position: 7px -272px;
+}
+
+#rcmFolderMenu .collapseall a
+{
+ background-position: 7px -204px;
+}
+
+#rcmFolderMenu .expandall a
+{
+ background-position: 7px -220px;
+}
+
+#rcmContextMenu ul.moreacts li a
+{
+ background: url(messageactions.png) no-repeat 5px 20px;
+}
+
+#rcmContextMenu ul.moreacts li.print a
+{
+ background-position: 5px 1px;
+}
+
+#rcmContextMenu ul.moreacts li.source a
+{
+ background-position: 5px -35px;
+}
+
+#rcmContextMenu ul.moreacts li.save a
+{
+ background-position: 5px -17px;
+}
+
+#rcmContextMenu ul.moreacts li.open a
+{
+ background-position: 5px -53px;
+}
+
+#rcmFolderMenu .openfolder a
+{
+ background: url(messageactions.png) no-repeat 6px -53px;
+}
+
+#rcmContextMenu ul.moreacts li.edit a
+{
+ background-position: 5px -71px;
+}
+
+#rcmAddressMenu .editcontact a
+{
+ background: url(messageactions.png) no-repeat 6px -71px;
+}
+
+#rcmAddressMenu .composeto a
+{
+ background-position: 8px -238px;
+}
+
+#rcmContextMenu ul.folders li a,
+#rcmAddressMenu ul.folders li a
+{
+ background: url(folders.png) 5px 1px no-repeat;
+}
+
+#rcmContextMenu ul.folders li.inbox a
+{
+ background-position: 5px -17px;
+}
+
+#rcmContextMenu ul.folders li.drafts a
+{
+ background-position: 5px -36px;
+}
+
+#rcmContextMenu ul.folders li.sent a
+{
+ background-position: 5px -54px;
+}
+
+#rcmContextMenu ul.folders li.junk a
+{
+ background-position: 5px -73px;
+}
+
+#rcmContextMenu ul.folders li.trash a
+{
+ background-position: 5px -90px;
+}
+
+#rcmAddressMenu ul.folders li.addressbook a
+{
+ background-position: 5px -108px;
+}
+
+#rcmAddressMenu ul.folders li.contactgroup a
+{
+ background-position: 5px -144px;
+}
+
+#rcmContextMenu div.popupmenu,
+#rcmFolderMenu div.popupmenu,
+#rcmAddressMenu div.popupmenu
+{
+ height: 129px;
+ padding: 0;
+}
+
+#rcmContextMenu ul.scrollable,
+#rcmFolderMenu ul.scrollable,
+#rcmAddressMenu ul.scrollable
+{
+ top: 15px;
+ height: 100px;
+ overflow: hidden;
+ border-top: 0;
+ border-bottom: 0;
+ margin: 0;
+}
+
+#rcmContextMenu li div,
+#rcmFolderMenu li div,
+#rcmAddressMenu li div
+{
+ height: 12px;
+ overflow: hidden;
+ background: url(contexticons.png) #F9F9F9 no-repeat center 20px;
+}
+
+#rcmContextMenu li div.scroll_up_act,
+#rcmFolderMenu li div.scroll_up_act,
+#rcmAddressMenu li div.scroll_up_act
+{
+ background-position: center -17px;
+ border-bottom: 0;
+}
+
+#rcmContextMenu li div.scroll_up_pas,
+#rcmFolderMenu li div.scroll_up_pas,
+#rcmAddressMenu li div.scroll_up_pas
+{
+ background-position: center -34px;
+ border-bottom: 0;
+ cursor: default;
+}
+
+#rcmContextMenu li div.scroll_down_act,
+#rcmFolderMenu li div.scroll_down_act,
+#rcmAddressMenu li div.scroll_down_act
+{
+ top: 117px;
+ background-position: center -51px;
+ border-top: 0;
+}
+
+#rcmContextMenu li div.scroll_down_pas,
+#rcmFolderMenu li div.scroll_down_pas,
+#rcmAddressMenu li div.scroll_down_pas
+{
+ top: 117px;
+ background-position: center -68px;
+ border-top: 0;
+ cursor: default;
+} \ No newline at end of file
diff --git a/plugins/contextmenu/skins/classic/folders.gif b/plugins/contextmenu/skins/classic/folders.gif
new file mode 100644
index 000000000..0fccb2c18
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/folders.gif
Binary files differ
diff --git a/plugins/contextmenu/skins/classic/folders.png b/plugins/contextmenu/skins/classic/folders.png
new file mode 100644
index 000000000..5013318f8
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/folders.png
Binary files differ
diff --git a/plugins/contextmenu/skins/classic/ie6hacks.css b/plugins/contextmenu/skins/classic/ie6hacks.css
new file mode 100644
index 000000000..909915176
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/ie6hacks.css
@@ -0,0 +1,54 @@
+/**
+ * ContextMenu plugin styles (IE6 hacks)
+ */
+
+#rcmContextMenu,
+#rcmFolderMenu,
+#rcmAddressMenu,
+#rcmGroupMenu
+{
+ width: 220px;
+}
+
+#rcmContextMenu li.submenu,
+#rcmFolderMenu li.submenu,
+#rcmAddressMenu li.submenu,
+#rcmGroupMenu li.submenu
+{
+ background-image: url(contexticons.gif);
+}
+
+#rcmContextMenu li a,
+#rcmFolderMenu li a,
+#rcmAddressMenu li a,
+#rcmGroupMenu li a
+{
+ background-image: url(contexticons.gif);
+}
+
+#rcmContextMenu ul.moreacts li a
+{
+ background-image: url(messageactions.gif);
+}
+
+#rcmFolderMenu .openfolder a
+{
+ background-image: url(messageactions.gif);
+}
+
+#rcmAddressMenu .editcontact a
+{
+ background-image: url(messageactions.gif);
+}
+
+#rcmContextMenu ul.folders li a,
+#rcmAddressMenu ul.folders li a
+{
+ background-image: url(folders.gif);
+}
+
+#rcmContextMenu li div,
+#rcmAddressMenu li div
+{
+ background-image: url(contexticons.gif);
+} \ No newline at end of file
diff --git a/plugins/contextmenu/skins/classic/messageactions.gif b/plugins/contextmenu/skins/classic/messageactions.gif
new file mode 100644
index 000000000..d2d647bed
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/messageactions.gif
Binary files differ
diff --git a/plugins/contextmenu/skins/classic/messageactions.png b/plugins/contextmenu/skins/classic/messageactions.png
new file mode 100644
index 000000000..e9447f211
--- /dev/null
+++ b/plugins/contextmenu/skins/classic/messageactions.png
Binary files differ
diff --git a/plugins/contextmenu/skins/larry/contexticons.png b/plugins/contextmenu/skins/larry/contexticons.png
new file mode 100644
index 000000000..dbbfa4de1
--- /dev/null
+++ b/plugins/contextmenu/skins/larry/contexticons.png
Binary files differ
diff --git a/plugins/contextmenu/skins/larry/contextmenu.css b/plugins/contextmenu/skins/larry/contextmenu.css
new file mode 100644
index 000000000..d0b84ded3
--- /dev/null
+++ b/plugins/contextmenu/skins/larry/contextmenu.css
@@ -0,0 +1,425 @@
+/**
+ * ContextMenu plugin styles
+ */
+
+.records-table tbody tr.contextRow td
+{
+ background-color: #F2F2F2;
+}
+
+#mailboxlist li.contextRow,
+#directorylist li.contextRow,
+#addresslist .contextRow
+{
+ background-color: #C7E3EF;
+}
+
+#rcmContextMenu,
+#rcmFolderMenu,
+#rcmAddressMenu,
+#rcmGroupMenu
+{
+ padding-top: 3px;
+ min-width: 220px;
+}
+
+#rcmContextMenu li,
+#rcmFolderMenu li,
+#rcmAddressMenu li,
+#rcmGroupMenu li
+{
+ margin: 0;
+}
+
+#rcmContextMenu li ul,
+#rcmContextMenu li div,
+#rcmFolderMenu li ul,
+#rcmFolderMenu li div,
+#rcmAddressMenu li ul,
+#rcmAddressMenu li div,
+#rcmGroupMenu li ul,
+#rcmGroupMenu li div
+{
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: auto;
+ display: none;
+ background-color: #444;
+ border: 1px solid #999;
+ padding: 1px;
+ z-index: 901;
+ border-radius: 4px;
+ box-shadow: 0 2px 6px 0 #333;
+ -moz-box-shadow: 0 2px 6px 0 #333;
+ -webkit-box-shadow: 0 2px 6px 0 #333;
+ -o-box-shadow: 0 2px 6px 0 #333;
+}
+
+#rcmContextMenu li.conmentitle,
+#rcmContextMenu li.submenu,
+#rcmFolderMenu li.conmentitle,
+#rcmFolderMenu li.submenu,
+#rcmAddressMenu li.conmentitle,
+#rcmAddressMenu li.submenu,
+#rcmGroupMenu li.conmentitle,
+#rcmGroupMenu li.submenu
+{
+ padding: 0;
+ cursor: default;
+}
+
+#rcmContextMenu li.conmentitle span,
+#rcmContextMenu li.submenu span,
+#rcmFolderMenu li.conmentitle span,
+#rcmFolderMenu li.submenu span,
+#rcmAddressMenu li.conmentitle span,
+#rcmAddressMenu li.submenu span,
+#rcmGroupMenu li.conmentitle span,
+#rcmGroupMenu li.submenu span
+{
+ display: block;
+ padding: 6px 10px 6px 29px;
+}
+
+#rcmContextMenu li.sublink,
+#rcmFolderMenu li.sublink,
+#rcmAddressMenu li.sublink,
+#rcmGroupMenu li.sublink
+{
+ padding: 0;
+}
+
+#rcmContextMenu li.submenu,
+#rcmFolderMenu li.submenu,
+#rcmAddressMenu li.submenu,
+#rcmGroupMenu li.submenu
+{
+ position: relative;
+}
+
+#rcmContextMenu li.submenu span,
+#rcmFolderMenu li.submenu span,
+#rcmAddressMenu li.submenu span,
+#rcmGroupMenu li.submenu span
+{
+ cursor: pointer;
+ background: url(contexticons.png) no-repeat right -188px;
+ padding-right: 18px;
+}
+
+#rcmContextMenu li.markmessage a span,
+#rcmAddressMenu li.contactgroup a span
+{
+ text-indent: 15px;
+}
+
+#rcmContextMenu li.submenu:hover,
+#rcmContextMenu li.sublink:hover a.mainlink,
+#rcmFolderMenu li.submenu:hover,
+#rcmFolderMenu li.sublink:hover a.mainlink,
+#rcmAddressMenu li.submenu:hover,
+#rcmAddressMenu li.sublink:hover a.mainlink,
+#rcmGroupMenu li.submenu:hover,
+#rcmGroupMenu li.sublink:hover a.mainlink
+{
+ background-color: #00aad6;
+ background: -moz-linear-gradient(top, #00aad6 0%, #008fc9 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00aad6), color-stop(100%,#008fc9));
+ background: -o-linear-gradient(top, #00aad6 0%, #008fc9 100%);
+ background: -ms-linear-gradient(top, #00aad6 0%, #008fc9 100%);
+ background: linear-gradient(top, #00aad6 0%, #008fc9 100%);
+}
+
+#rcmContextMenu li a,
+#rcmFolderMenu li a,
+#rcmAddressMenu li a,
+#rcmGroupMenu li a
+{
+ padding: 0;
+ margin-left: 0;
+}
+
+
+#rcmContextMenu li a span,
+#rcmFolderMenu li a span,
+#rcmAddressMenu li a span,
+#rcmGroupMenu li a span
+{
+ display: block;
+ background: url(contexticons.png) no-repeat 7px 20px;
+ padding: 6px 10px 6px 29px;
+ cursor: pointer;
+}
+
+#rcmContextMenu li a.active:hover,
+#rcmFolderMenu li a.active:hover,
+#rcmAddressMenu li a.active:hover,
+#rcmGroupMenu li a.active:hover
+{
+ background-color: #00aad6;
+ background: -moz-linear-gradient(top, #00aad6 0%, #008fc9 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00aad6), color-stop(100%,#008fc9));
+ background: -o-linear-gradient(top, #00aad6 0%, #008fc9 100%);
+ background: -ms-linear-gradient(top, #00aad6 0%, #008fc9 100%);
+ background: linear-gradient(top, #00aad6 0%, #008fc9 100%);
+}
+
+#rcmContextMenu a.disabled,
+#rcmFolderMenu a.disabled,
+#rcmAddressMenu a.disabled,
+#rcmGroupMenu a.disabled
+{
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+
+#rcmContextMenu li a.disabled span,
+#rcmFolderMenu li a.disabled span,
+#rcmAddressMenu li a.disabled span,
+#rcmGroupMenu li a.disabled span
+{
+ cursor: default;
+}
+
+#rcmContextMenu li a.disabled:hover,
+#rcmFolderMenu li a.disabled:hover,
+#rcmAddressMenu li a.disabled:hover,
+#rcmGroupMenu li a.disabled:hover
+{
+ background-color: #444444;
+ background: -moz-linear-gradient(top, #444444 0%, #444444 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#444444), color-stop(100%,#444444));
+ background: -o-linear-gradient(top, #444444 0%, #444444 100%);
+ background: -ms-linear-gradient(top, #444444 0%, #444444 100%);
+ background: linear-gradient(top, #444444 0%, #444444 100%);
+}
+
+#rcmContextMenu .read a span
+{
+ background-position: 5px -24px;
+}
+
+#rcmFolderMenu .readfolder a span
+{
+ background-position: 5px -24px;
+}
+
+#rcmContextMenu .unread a span
+{
+ background-position: 5px 0px;
+}
+#rcmContextMenu .flagged a span
+{
+ background-position: 5px -46px;
+}
+
+#rcmContextMenu .unflagged a span
+{
+ background-position: 5px -72px;
+}
+
+#rcmContextMenu .reply a span
+{
+ background-position: 5px -120px;
+}
+
+#rcmContextMenu .replyall a span, #rcmContextMenu .replylist a span
+{
+ background-position: 5px -144px;
+}
+
+#rcmContextMenu .forwardinline a span, #rcmContextMenu .forwardattachment a span
+{
+ background-position: 5px -167px;
+}
+
+#rcmContextMenu .delete a span,
+#rcmAddressMenu .deletecontact a span
+{
+ background-position: 5px -94px;
+}
+
+#rcmFolderMenu .expunge a span
+{
+ background-position: 5px 66px;
+}
+
+#rcmFolderMenu .purge a span
+{
+ background-position: 5px 66px;
+}
+
+#rcmFolderMenu .collapseall a span
+{
+ background-position: 5px -323px;
+}
+
+#rcmFolderMenu .expandall a span
+{
+ background-position: 5px -302px;
+}
+
+#rcmContextMenu ul.moreacts li a span
+{
+ background: url(messageactions.png) no-repeat 5px 30px;
+}
+
+#rcmContextMenu ul.moreacts li.print a span
+{
+ background-position: 5px -48px;
+}
+
+#rcmContextMenu ul.moreacts li.source a span
+{
+ background-position: 5px -72px;
+}
+
+#rcmContextMenu ul.moreacts li.save a span
+{
+ background-position: 5px -24px;
+}
+
+#rcmContextMenu ul.moreacts li.open a span
+{
+ background-position: 5px -96px;
+}
+
+#rcmFolderMenu .openfolder a span
+{
+ background: url(messageactions.png) no-repeat 5px -96px;
+}
+
+#rcmContextMenu ul.moreacts li.edit a span
+{
+ background-position: 5px 0px;
+}
+
+#rcmAddressMenu .editcontact a span
+{
+ background: url(messageactions.png) no-repeat 5px 0px;
+}
+
+#rcmAddressMenu .composeto a span
+{
+ background-position: 5px -279px;
+}
+
+#rcmAddressMenu .removefromgroup a span
+{
+ background-position: 5px -344px;
+}
+
+#rcmContextMenu ul.folders li a span,
+#rcmAddressMenu ul.folders li a span
+{
+ background: url(folders.png) 5px 3px no-repeat;
+}
+
+#rcmContextMenu ul.folders li.subfolder a span
+{
+ background-position: 5px -39px;
+}
+
+
+#rcmContextMenu ul.folders li.inbox a span
+{
+ background-position: 5px -61px;
+}
+
+#rcmContextMenu ul.folders li.drafts a span
+{
+ background-position: 5px -84px;
+}
+
+#rcmContextMenu ul.folders li.sent a span
+{
+ background-position: 5px -106px;
+}
+
+#rcmContextMenu ul.folders li.junk a span
+{
+ background-position: 5px -132px;
+}
+
+#rcmContextMenu ul.folders li.trash a span
+{
+ background-position: 5px -159px;
+}
+
+#rcmAddressMenu ul.folders li.addressbook a span
+{
+ background-position: 5px -183px;
+}
+
+#rcmAddressMenu ul.folders li.contactgroup a span
+{
+ background-position: 5px -209px;
+}
+
+#rcmContextMenu div.popupmenu,
+#rcmFolderMenu div.popupmenu,
+#rcmAddressMenu div.popupmenu
+{
+ height: 129px;
+ padding: 0;
+}
+
+#rcmContextMenu ul.scrollable,
+#rcmFolderMenu ul.scrollable,
+#rcmAddressMenu ul.scrollable
+{
+ top: 15px;
+ height: 100px;
+ overflow: hidden;
+ border-top: 0;
+ border-bottom: 0;
+ margin: 0;
+}
+
+#rcmContextMenu li div,
+#rcmFolderMenu li div,
+#rcmAddressMenu li div
+{
+ height: 12px;
+ overflow: hidden;
+ background: url(contexticons.png) #444 no-repeat center 20px;
+}
+
+#rcmContextMenu li div.scroll_up_act,
+#rcmFolderMenu li div.scroll_up_act,
+#rcmAddressMenu li div.scroll_up_act
+{
+ background-position: center -216px;
+ border-bottom: 0;
+ cursor: pointer;
+}
+
+#rcmContextMenu li div.scroll_up_pas,
+#rcmFolderMenu li div.scroll_up_pas,
+#rcmAddressMenu li div.scroll_up_pas
+{
+ background-position: center -233px;
+ border-bottom: 0;
+ cursor: default;
+}
+
+#rcmContextMenu li div.scroll_down_act,
+#rcmFolderMenu li div.scroll_down_act,
+#rcmAddressMenu li div.scroll_down_act
+{
+ top: 117px;
+ background-position: center -251px;
+ border-top: 0;
+ cursor: pointer;
+}
+
+#rcmContextMenu li div.scroll_down_pas,
+#rcmFolderMenu li div.scroll_down_pas,
+#rcmAddressMenu li div.scroll_down_pas
+{
+ top: 117px;
+ background-position: center -270px;
+ border-top: 0;
+ cursor: default;
+} \ No newline at end of file
diff --git a/plugins/contextmenu/skins/larry/folders.png b/plugins/contextmenu/skins/larry/folders.png
new file mode 100644
index 000000000..ce6f3e3db
--- /dev/null
+++ b/plugins/contextmenu/skins/larry/folders.png
Binary files differ
diff --git a/plugins/contextmenu/skins/larry/ie6hacks.css b/plugins/contextmenu/skins/larry/ie6hacks.css
new file mode 100644
index 000000000..effc427f9
--- /dev/null
+++ b/plugins/contextmenu/skins/larry/ie6hacks.css
@@ -0,0 +1,3 @@
+/**
+ * ContextMenu plugin styles (IE6 hacks)
+ */
diff --git a/plugins/contextmenu/skins/larry/messageactions.png b/plugins/contextmenu/skins/larry/messageactions.png
new file mode 100644
index 000000000..156c23970
--- /dev/null
+++ b/plugins/contextmenu/skins/larry/messageactions.png
Binary files differ
diff --git a/plugins/copymessage/copymessage.js b/plugins/copymessage/copymessage.js
new file mode 100644
index 000000000..046edc073
--- /dev/null
+++ b/plugins/copymessage/copymessage.js
@@ -0,0 +1,40 @@
+/**
+ * CopyMessage plugin script
+ */
+
+function rcmail_copyto(command, el, pos) {
+ if (rcmail.env.rcm_destfolder == rcmail.env.mailbox)
+ return;
+
+ var prev_sel = null;
+
+ // also select childs of (collapsed) threads
+ if (rcmail.env.uid) {
+ if (!rcmail.message_list.in_selection(rcmail.env.uid)) {
+ prev_sel = rcmail.message_list.get_selection();
+ rcmail.message_list.select_row(rcmail.env.uid);
+ }
+
+ if (rcmail.message_list.rows[rcmail.env.uid].has_children && !rcmail.message_list.rows[rcmail.env.uid].expanded)
+ rcmail.message_list.select_childs(rcmail.env.uid);
+
+ rcmail.env.uid = null;
+ }
+
+ rcmail.command('copy', rcmail.env.rcm_destfolder, $(el));
+
+ if (prev_sel) {
+ rcmail.message_list.clear_selection();
+
+ for (var i in prev_sel)
+ rcmail.message_list.select_row(prev_sel[i], CONTROL_KEY);
+ }
+
+ delete rcmail.env.rcm_destfolder;
+}
+
+$(document).ready(function(){
+ if (window.rcm_contextmenu_register_command) {
+ rcm_contextmenu_register_command('copy', 'rcmail_copyto', $('#rcmContextCopy'), 'moreacts', 'after', true);
+ }
+}); \ No newline at end of file
diff --git a/plugins/copymessage/copymessage.php b/plugins/copymessage/copymessage.php
new file mode 100644
index 000000000..a8658734c
--- /dev/null
+++ b/plugins/copymessage/copymessage.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * CopyMessage
+ *
+ * Plugin to allow message to be copied to different folders
+ *
+ * @version @package_version@
+ * @requires ContextMenu plugin
+ * @author Philip Weir
+ */
+class copymessage extends rcube_plugin
+{
+ public $task = 'mail';
+
+ function init()
+ {
+ // load required plugin
+ $this->require_plugin('contextmenu');
+
+ $rcmail = rcube::get_instance();
+ if ($rcmail->action == '')
+ $this->add_hook('render_mailboxlist', array($this, 'show_copy_contextmenu'));
+ }
+
+ public function show_copy_contextmenu($args)
+ {
+ $rcmail = rcube::get_instance();
+ $this->add_texts('localization/');
+ $this->api->output->add_label('copymessage.copyingmessage');
+ $this->include_script('copymessage.js');
+
+ $li = html::tag('li', array('class' => 'submenu copyto'), html::span(null, rcmail::Q($this->gettext('copyto'))) . $this->_gen_folder_list($args['list'], '#copy'));
+ $out .= html::tag('ul', array('id' => 'rcmContextCopy'), $li);
+ $this->api->output->add_footer(html::div(array('style' => 'display: none;'), $out));
+ }
+
+ // based on rcmail->render_folder_tree_html()
+ private function _gen_folder_list($arrFolders, $command, $nestLevel = 0, &$folderTotal = 0)
+ {
+ $rcmail = rcube::get_instance();
+
+ $maxlength = 35;
+ $realnames = false;
+
+ $out = '';
+ foreach ($arrFolders as $key => $folder) {
+ $title = null;
+
+ if (($folder_class = $rcmail->folder_classname($folder['id'])) && !$realnames) {
+ $foldername = $rcmail->gettext($folder_class);
+ }
+ else {
+ $foldername = $folder['name'];
+
+ // shorten the folder name to a given length
+ if ($maxlength && $maxlength > 1) {
+ $fname = abbreviate_string($foldername, $maxlength);
+
+ if ($fname != $foldername)
+ $title = $foldername;
+
+ $foldername = $fname;
+ }
+ }
+
+ // make folder name safe for ids and class names
+ $folder_id = asciiwords($folder['id'], true, '_');
+ $classes = array();
+
+ // set special class for Sent, Drafts, Trash and Junk
+ if ($folder['id'] == $rcmail->config->get('sent_mbox'))
+ $classes[] = 'sent';
+ else if ($folder['id'] == $rcmail->config->get('drafts_mbox'))
+ $classes[] = 'drafts';
+ else if ($folder['id'] == $rcmail->config->get('trash_mbox'))
+ $classes[] = 'trash';
+ else if ($folder['id'] == $rcmail->config->get('junk_mbox'))
+ $classes[] = 'junk';
+ else if ($folder['id'] == 'INBOX')
+ $classes[] = 'inbox';
+ else
+ $classes[] = '_'.asciiwords($folder_class ? $folder_class : strtolower($folder['id']), true);
+
+ if ($folder['virtual'])
+ $classes[] = 'virtual';
+
+ if ($nestLevel > 0)
+ $classes[] = 'subfolder';
+
+ $out .= html::tag('li', array('class' => join(' ', $classes)), html::a(array('href' => $command, 'onclick' => "rcm_set_dest_folder('" . rcmail::JQ($folder['id']) ."')", 'class' => 'active', 'title' => $title), html::span(null, str_repeat('&nbsp;&nbsp;', $nestLevel) . rcmail::Q($foldername))));
+
+ if (!empty($folder['folders']))
+ $out .= $this->_gen_folder_list($folder['folders'], $command, $nestLevel+1, $folderTotal);
+
+ $folderTotal++;
+ }
+
+ if ($nestLevel == 0) {
+ if ($folderTotal > 5) {
+ $out = html::tag('ul', array('class' => 'toolbarmenu folders scrollable'), $out);
+ $out = html::tag('div', array('class' => 'scroll_up_pas'), '') . $out . html::tag('div', array('class' => 'scroll_down_act'), '');
+ $out = html::tag('div', array('class' => 'popupmenu'), $out);
+ }
+ else {
+ $out = html::tag('ul', array('class' => 'popupmenu toolbarmenu folders'), $out);
+ }
+ }
+
+ return $out;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/ca_ES.inc b/plugins/copymessage/localization/ca_ES.inc
new file mode 100644
index 000000000..f5fdf3005
--- /dev/null
+++ b/plugins/copymessage/localization/ca_ES.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Daniel López */
+
+$labels = array();
+$labels['copyto'] = 'Copia a ...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/cs_CZ.inc b/plugins/copymessage/localization/cs_CZ.inc
new file mode 100644
index 000000000..713bda6ee
--- /dev/null
+++ b/plugins/copymessage/localization/cs_CZ.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Ales Pospichal */
+
+$labels = array();
+$labels['copyto'] = 'Kopírovat do...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/da_DK.inc b/plugins/copymessage/localization/da_DK.inc
new file mode 100644
index 000000000..fa635135c
--- /dev/null
+++ b/plugins/copymessage/localization/da_DK.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: John Loft Christiansen */
+
+$labels = array();
+$labels['copyto'] = 'Kopier til...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/de_CH.inc b/plugins/copymessage/localization/de_CH.inc
new file mode 100644
index 000000000..b0bba791a
--- /dev/null
+++ b/plugins/copymessage/localization/de_CH.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Roland Liebl */
+
+$labels = array();
+$labels['copyto'] = 'Kopieren nach...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/de_DE.inc b/plugins/copymessage/localization/de_DE.inc
new file mode 100644
index 000000000..b0bba791a
--- /dev/null
+++ b/plugins/copymessage/localization/de_DE.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Roland Liebl */
+
+$labels = array();
+$labels['copyto'] = 'Kopieren nach...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/en_GB.inc b/plugins/copymessage/localization/en_GB.inc
new file mode 100644
index 000000000..43e15c37d
--- /dev/null
+++ b/plugins/copymessage/localization/en_GB.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['copyto'] = 'Copy to...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/en_US.inc b/plugins/copymessage/localization/en_US.inc
new file mode 100644
index 000000000..43e15c37d
--- /dev/null
+++ b/plugins/copymessage/localization/en_US.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['copyto'] = 'Copy to...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/es_ES.inc b/plugins/copymessage/localization/es_ES.inc
new file mode 100644
index 000000000..00893bf8b
--- /dev/null
+++ b/plugins/copymessage/localization/es_ES.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Daniel López */
+
+$labels = array();
+$labels['copyto'] = 'Copiar a...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/fr_FR.inc b/plugins/copymessage/localization/fr_FR.inc
new file mode 100644
index 000000000..6f03d47c8
--- /dev/null
+++ b/plugins/copymessage/localization/fr_FR.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: */
+
+$labels = array();
+$labels['copyto'] = 'Copier vers...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/gl_ES.inc b/plugins/copymessage/localization/gl_ES.inc
new file mode 100644
index 000000000..4f1050805
--- /dev/null
+++ b/plugins/copymessage/localization/gl_ES.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: David Garabana Barro */
+
+$labels = array();
+$labels['copyto'] = 'Copiar a...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/hu_HU.inc b/plugins/copymessage/localization/hu_HU.inc
new file mode 100644
index 000000000..937b34196
--- /dev/null
+++ b/plugins/copymessage/localization/hu_HU.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Németh János */
+
+$labels = array();
+$labels['copyto'] = 'Másolás...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/it_IT.inc b/plugins/copymessage/localization/it_IT.inc
new file mode 100644
index 000000000..ca2248dd6
--- /dev/null
+++ b/plugins/copymessage/localization/it_IT.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Alessio Cecchi */
+
+$labels = array();
+$labels['copyto'] = 'Copia in...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/nl_NL.inc b/plugins/copymessage/localization/nl_NL.inc
new file mode 100644
index 000000000..bf7c4e510
--- /dev/null
+++ b/plugins/copymessage/localization/nl_NL.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Wouter Kevenaar */
+
+$labels = array();
+$labels['copyto'] = 'Kopiëren naar...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/pl_PL.inc b/plugins/copymessage/localization/pl_PL.inc
new file mode 100644
index 000000000..803b4d0d0
--- /dev/null
+++ b/plugins/copymessage/localization/pl_PL.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Michał Jałocha */
+
+$labels = array();
+$labels['copyto'] = 'Kopiuj do...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/pt_BR.inc b/plugins/copymessage/localization/pt_BR.inc
new file mode 100644
index 000000000..f5ba8c67d
--- /dev/null
+++ b/plugins/copymessage/localization/pt_BR.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Alexandre Gorges */
+
+$labels = array();
+$labels['copyto'] = 'Copiar para...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/ro_RO.inc b/plugins/copymessage/localization/ro_RO.inc
new file mode 100644
index 000000000..82ebd71f7
--- /dev/null
+++ b/plugins/copymessage/localization/ro_RO.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Ovidiu Bica */
+
+$labels = array();
+$labels['copyto'] = 'Copiaza in';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/ru_RU.inc b/plugins/copymessage/localization/ru_RU.inc
new file mode 100644
index 000000000..040d7d544
--- /dev/null
+++ b/plugins/copymessage/localization/ru_RU.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Peter Zotov */
+
+$labels = array();
+$labels['copyto'] = 'Скопировать в...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/sv_SE.inc b/plugins/copymessage/localization/sv_SE.inc
new file mode 100644
index 000000000..e7b203a18
--- /dev/null
+++ b/plugins/copymessage/localization/sv_SE.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Jonas Nasholm */
+
+$labels = array();
+$labels['copyto'] = 'Kopiera till...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/localization/tr_TR.inc b/plugins/copymessage/localization/tr_TR.inc
new file mode 100644
index 000000000..c64145d07
--- /dev/null
+++ b/plugins/copymessage/localization/tr_TR.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Mustafa Icer */
+
+$labels = array();
+$labels['copyto'] = '... kopyala';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/copymessage/package.xml b/plugins/copymessage/package.xml
new file mode 100644
index 000000000..0b699220d
--- /dev/null
+++ b/plugins/copymessage/package.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>copymessage</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-Copy-Message/</uri>
+ <summary>Adds a copy message option to the context menu</summary>
+ <description>Adds a copy message option to the context menu, allowing messages to be copied to another folder.</description>
+ <lead>
+ <name>Philip Weir</name>
+ <user>JohnDoh</user>
+ <email>roundcube@tehinterweb.co.uk</email>
+ <active>yes</active>
+ </lead>
+ <date>2013-02-24</date>
+ <time>10:16:53</time>
+ <version>
+ <release>1.3</release>
+ <api>1.3</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>Repo only</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="copymessage.php" role="php">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="copymessage.js" role="data">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="CHANGELOG" role="data"/>
+ <file name="README.md" role="data"/>
+ <file name="localization/ca_ES.inc" role="data"/>
+ <file name="localization/cs_CZ.inc" role="data"/>
+ <file name="localization/da_DK.inc" role="data"/>
+ <file name="localization/de_CH.inc" role="data"/>
+ <file name="localization/de_DE.inc" role="data"/>
+ <file name="localization/en_GB.inc" role="data"/>
+ <file name="localization/en_US.inc" role="data"/>
+ <file name="localization/es_ES.inc" role="data"/>
+ <file name="localization/fr_FR.inc" role="data"/>
+ <file name="localization/gl_ES.inc" role="data"/>
+ <file name="localization/hu_HU.inc" role="data"/>
+ <file name="localization/it_IT.inc" role="data"/>
+ <file name="localization/nl_NL.inc" role="data"/>
+ <file name="localization/pl_PL.inc" role="data"/>
+ <file name="localization/pt_BR.inc" role="data"/>
+ <file name="localization/ro_RO.inc" role="data"/>
+ <file name="localization/ru_RU.inc" role="data"/>
+ <file name="localization/sv_SE.inc" role="data"/>
+ <file name="localization/tr_TR.inc" role="data"/>
+ </dir>
+ <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.1</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ <package>
+ <name>contextmenu</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-Context-Menu/</uri>
+ <min>1.9</min>
+ </package>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>
diff --git a/plugins/database_attachments/database_attachments.php b/plugins/database_attachments/database_attachments.php
index 5ec351404..079f4e567 100644
--- a/plugins/database_attachments/database_attachments.php
+++ b/plugins/database_attachments/database_attachments.php
@@ -1,6 +1,6 @@
<?php
/**
- * Database Attachments
+ * Filesystem Attachments
*
* This plugin which provides database backed storage for temporary
* attachment file handling. The primary advantage of this plugin
@@ -13,16 +13,21 @@
* @author Aleksander Machniak <alec@alec.pl>
* @version @package_version@
*/
-
-require_once INSTALL_PATH . 'plugins/filesystem_attachments/filesystem_attachments.php';
-
+require_once('plugins/filesystem_attachments/filesystem_attachments.php');
class database_attachments extends filesystem_attachments
{
- // Cache object
- protected $cache;
// A prefix for the cache key used in the session and in the key field of the cache table
- protected $prefix = "db_attach";
+ private $cache_prefix = "db_attach";
+
+ /**
+ * Helper method to generate a unique key for the given attachment file
+ */
+ private function _key($args)
+ {
+ $uname = $args['path'] ? $args['path'] : $args['name'];
+ return $this->cache_prefix . $args['group'] . md5(mktime() . $uname . $_SESSION['user_id']);
+ }
/**
* Save a newly uploaded attachment
@@ -30,17 +35,23 @@ class database_attachments extends filesystem_attachments
function upload($args)
{
$args['status'] = false;
+ $rcmail = rcmail::get_instance();
+ $key = $this->_key($args);
- $cache = $this->get_cache();
- $key = $this->_key($args);
- $data = file_get_contents($args['path']);
+ $data = file_get_contents($args['path']);
- if ($data === false) {
+ if ($data === false)
return $args;
- }
- $data = base64_encode($data);
- $status = $cache->write($key, $data);
+ $data = base64_encode($data);
+
+ $status = $rcmail->db->query(
+ "INSERT INTO ".get_table_name('cache')
+ ." (created, user_id, cache_key, data)"
+ ." VALUES (".$rcmail->db->now().", ?, ?, ?)",
+ $_SESSION['user_id'],
+ $key,
+ $data);
if ($status) {
$args['id'] = $key;
@@ -57,20 +68,26 @@ class database_attachments extends filesystem_attachments
function save($args)
{
$args['status'] = false;
+ $rcmail = rcmail::get_instance();
- $cache = $this->get_cache();
- $key = $this->_key($args);
+ $key = $this->_key($args);
if ($args['path']) {
$args['data'] = file_get_contents($args['path']);
- if ($args['data'] === false) {
+ if ($args['data'] === false)
return $args;
- }
}
- $data = base64_encode($args['data']);
- $status = $cache->write($key, $data);
+ $data = base64_encode($args['data']);
+
+ $status = $rcmail->db->query(
+ "INSERT INTO ".get_table_name('cache')
+ ." (created, user_id, cache_key, data)"
+ ." VALUES (".$rcmail->db->now().", ?, ?, ?)",
+ $_SESSION['user_id'],
+ $key,
+ $data);
if ($status) {
$args['id'] = $key;
@@ -86,10 +103,18 @@ class database_attachments extends filesystem_attachments
*/
function remove($args)
{
- $cache = $this->get_cache();
- $status = $cache->remove($args['id']);
+ $args['status'] = false;
+ $rcmail = rcmail::get_instance();
+ $status = $rcmail->db->query(
+ "DELETE FROM ".get_table_name('cache')
+ ." WHERE user_id = ?"
+ ." AND cache_key = ?",
+ $_SESSION['user_id'],
+ $args['id']);
- $args['status'] = true;
+ if ($status) {
+ $args['status'] = true;
+ }
return $args;
}
@@ -110,11 +135,18 @@ class database_attachments extends filesystem_attachments
*/
function get($args)
{
- $cache = $this->get_cache();
- $data = $cache->read($args['id']);
-
- if ($data) {
- $args['data'] = base64_decode($data);
+ $rcmail = rcmail::get_instance();
+
+ $sql_result = $rcmail->db->query(
+ "SELECT data"
+ ." FROM ".get_table_name('cache')
+ ." WHERE user_id=?"
+ ." AND cache_key=?",
+ $_SESSION['user_id'],
+ $args['id']);
+
+ if ($sql_arr = $rcmail->db->fetch_assoc($sql_result)) {
+ $args['data'] = base64_decode($sql_arr['data']);
$args['status'] = true;
}
@@ -126,36 +158,12 @@ class database_attachments extends filesystem_attachments
*/
function cleanup($args)
{
- $cache = $this->get_cache();
- $cache->remove($args['group'], true);
- }
-
- /**
- * Helper method to generate a unique key for the given attachment file
- */
- protected function _key($args)
- {
- $uname = $args['path'] ? $args['path'] : $args['name'];
- return $args['group'] . md5(mktime() . $uname . $_SESSION['user_id']);
- }
-
- /**
- * Initialize and return cache object
- */
- protected function get_cache()
- {
- if (!$this->cache) {
- $this->load_config();
-
- $rcmail = rcube::get_instance();
- $ttl = 12 * 60 * 60; // default: 12 hours
- $ttl = $rcmail->config->get('database_attachments_cache_ttl', $ttl);
- $type = $rcmail->config->get('database_attachments_cache', 'db');
-
- // Init SQL cache (disable cache data serialization)
- $this->cache = $rcmail->get_cache($this->prefix, 'db', $ttl, false);
- }
-
- return $this->cache;
+ $prefix = $this->cache_prefix . $args['group'];
+ $rcmail = rcmail::get_instance();
+ $rcmail->db->query(
+ "DELETE FROM ".get_table_name('cache')
+ ." WHERE user_id = ?"
+ ." AND cache_key LIKE '{$prefix}%'",
+ $_SESSION['user_id']);
}
}
diff --git a/plugins/database_attachments/package.xml b/plugins/database_attachments/package.xml
index 44adc219e..40db858a4 100644
--- a/plugins/database_attachments/package.xml
+++ b/plugins/database_attachments/package.xml
@@ -5,7 +5,7 @@
http://pear.php.net/dtd/package-2.0.xsd">
<name>database_attachments</name>
<channel>pear.roundcube.net</channel>
- <summary>Database storage for uploaded attachments</summary>
+ <summary>SQL database storage for uploaded attachments</summary>
<description>
This plugin which provides database backed storage for temporary
attachment file handling. The primary advantage of this plugin
@@ -24,9 +24,9 @@
<email>ziba@umich.edu</email>
<active>yes</active>
</developer>
- <date>2013-06-13</date>
+ <date>2011-11-21</date>
<version>
- <release>1.1</release>
+ <release>1.0</release>
<api>1.0</api>
</version>
<stability>
diff --git a/plugins/debug_logger/debug_logger.php b/plugins/debug_logger/debug_logger.php
index 88237d767..87a163785 100644
--- a/plugins/debug_logger/debug_logger.php
+++ b/plugins/debug_logger/debug_logger.php
@@ -12,7 +12,7 @@
* which can redirect messages to files. The resulting log files
* provide timing and tag quantity results.
*
- * Enable the plugin in config.inc.php and add your desired
+ * Enable the plugin in config/main.inc.php and add your desired
* log types and files.
*
* @version @package_version@
@@ -21,13 +21,13 @@
*
* Example:
*
- * config.inc.php:
+ * config/main.inc.php:
*
- * // $config['debug_logger'][type of logging] = name of file in log_dir
+ * // $rcmail_config['debug_logger'][type of logging] = name of file in log_dir
* // The 'master' log includes timing information
- * $config['debug_logger']['master'] = 'master';
+ * $rcmail_config['debug_logger']['master'] = 'master';
* // If you want sql messages to also go into a separate file
- * $config['debug_logger']['sql'] = 'sql';
+ * $rcmail_config['debug_logger']['sql'] = 'sql';
*
* index.php (just after $RCMAIL->plugins->init()):
*
diff --git a/plugins/debug_logger/runlog/runlog.php b/plugins/debug_logger/runlog/runlog.php
index 0c766a13c..c9f672615 100644
--- a/plugins/debug_logger/runlog/runlog.php
+++ b/plugins/debug_logger/runlog/runlog.php
@@ -194,7 +194,7 @@ class runlog {
public function print_totals(){
$totals = array();
- foreach ($this->run_log as $entry) {
+ foreach ( $this->run_log as $k => $entry ) {
if ( $entry['type'] == 'start' && $entry['ended'] == true) {
$totals[$entry['value']]['duration'] += $entry['duration'];
$totals[$entry['value']]['count'] += 1;
diff --git a/plugins/dkimstatus/dkimstatus.php b/plugins/dkimstatus/dkimstatus.php
new file mode 100644
index 000000000..a26fac4af
--- /dev/null
+++ b/plugins/dkimstatus/dkimstatus.php
@@ -0,0 +1,155 @@
+<?php
+
+/**
+ * This plugin displays an icon showing the status
+ * of dkim verification of the message
+ *
+ * @version 0.4.7
+ * @author Julien vehent
+ * @mail julien@linuxwall.info
+ *
+ * original plugin from Vladimir Mach - wladik@gmail.com
+ * http://www.wladik.net
+ *
+ * Changelog:
+ * 20110912 - Added X-Spam-Status for spamassassin (thanks Ashish Shukla for the patch)
+ * 20110619 - Added License information for GPLv2
+ * 20110406 - added italian translation from Roberto Puzzanghera
+ * 20110128 - updated german translation by Simon
+ * 20101118 - japanese translation from Taka
+ * 20100811 - from Sergio Cambra: SPF fix, image function and spanish translation
+ * 20100202 - fix for amavis and add cz translation
+ * 20100201 - add control of header.i and header.from to detect third party signature, change icons
+ * 20100115 - add 'no information' status with image using x-dkim-authentication-results
+ * 20090920 - fixed space in matching status (thanks Pim Pronk for suggestion)
+ */
+class dkimstatus extends rcube_plugin
+{
+ public $task = 'mail';
+ function init()
+ {
+ $rcmail = rcmail::get_instance();
+ if ($rcmail->action == 'show' || $rcmail->action == 'preview') {
+ $this->add_hook('imap_init', array($this, 'imap_init'));
+ $this->add_hook('message_headers_output', array($this, 'message_headers'));
+ } else if ($rcmail->action == '') {
+ // with enabled_caching we're fetching additional headers before show/preview
+ $this->add_hook('imap_init', array($this, 'imap_init'));
+ }
+ }
+
+ function imap_init($p)
+ {
+ $rcmail = rcmail::get_instance();
+ $p['fetch_headers'] = trim($p['fetch_headers'].' ' . strtoupper('Authentication-Results').' '. strtoupper('X-DKIM-Authentication-Results').' ' .strtoupper('X-Spam-Status'));
+ return $p;
+ }
+
+ function image($image, $alt, $title)
+ {
+ return '<img src="plugins/dkimstatus/images/'.$image.'" alt="'.$this->gettext($alt).'" title="'.$this->gettext($alt).$title.'" /> ';
+ }
+
+ function message_headers($p)
+ {
+ $this->add_texts('localization');
+
+ /* First, if dkimproxy did not find a signature, stop here
+ */
+ if($p['headers']->others['x-dkim-authentication-results'] || $p['headers']->others['authentication-results'] || $p['headers']->others['x-spam-status']){
+
+ $results = $p['headers']->others['x-dkim-authentication-results'];
+
+ if(preg_match("/none/", $results)) {
+ $image = 'nosiginfo.png';
+ $alt = 'nosignature';
+ } else {
+ /* Second, check the authentication-results header
+ */
+ if($p['headers']->others['authentication-results']) {
+
+ $results = $p['headers']->others['authentication-results'];
+
+ if(preg_match("/dkim=([a-zA-Z0-9]*)/", $results, $m)) {
+ $status = ($m[1]);
+ }
+
+ if(preg_match("/domainkeys=([a-zA-Z0-9]*)/", $results, $m)) {
+ $status = ($m[1]);
+ }
+
+
+ if($status == 'pass') {
+
+ /* Verify if its an author's domain signature or a third party
+ */
+
+ if(preg_match("/[@][a-zA-Z0-9]+([.][a-zA-Z0-9]+)?\.[a-zA-Z]{2,4}/", $p['headers']->from, $m)) {
+ $authordomain = $m[0];
+ if(preg_match("/header\.i=(([a-zA-Z0-9]+[_\.\-]?)+)?($authordomain)/", $results) ||
+ preg_match("/header\.from=(([a-zA-Z0-9]+[_\.\-]?)+)?($authordomain)/", $results)) {
+ $image = 'authorsign.png';
+ $alt = 'verifiedsender';
+ $title = $results;
+ } else {
+ $image = 'thirdpty.png';
+ $alt = 'thirdpartysig';
+ $title = $results;
+ }
+ }
+
+ }
+ /* If signature proves invalid, show appropriate warning
+ */
+ else if ($status) {
+ $image = 'invalidsig.png';
+ $alt = 'invalidsignature';
+ $title = $results;
+ }
+ /* If no status it can be a spf verification
+ */
+ else {
+ $image = 'nosiginfo.png';
+ $alt = 'nosignature';
+ }
+
+ /* Third, check for spamassassin's X-Spam-Status
+ */
+ } else if ($p['headers']->others['x-spam-status']) {
+
+ $image = 'nosiginfo.png';
+ $alt = 'nosignature';
+
+ /* DKIM_* are defined at: http://search.cpan.org/~kmcgrail/Mail-SpamAssassin-3.3.2/lib/Mail/SpamAssassin/Plugin/DKIM.pm */
+ $results = $p['headers']->others['x-spam-status'];
+ if(preg_match_all('/DKIM_[^,]+/', $results, $m)) {
+ if(array_search('DKIM_SIGNED', $m[0]) !== FALSE) {
+ if(array_search('DKIM_VALID', $m[0]) !== FALSE) {
+ if(array_search('DKIM_VALID_AU', $m[0])) {
+ $image = 'authorsign.png';
+ $alt = 'verifiedsender';
+ $title = 'DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU';
+ } else {
+ $image = 'thirdpty.png';
+ $alt = 'thirdpartysig';
+ $title = 'DKIM_SIGNED, DKIM_VALID';
+ }
+ } else {
+ $image = 'invalidsig.png';
+ $alt = 'invalidsignature';
+ $title = 'DKIM_SIGNED';
+ }
+ }
+ }
+ }
+ }
+ } else {
+ $image = 'nosiginfo.png';
+ $alt = 'nosignature';
+ }
+ if ($image && $alt) {
+ $p['output']['from']['value'] = $this->image($image, $alt, $title) . $p['output']['from']['value'];
+ }
+ return $p;
+ }
+}
diff --git a/plugins/dkimstatus/images/authorsign.png b/plugins/dkimstatus/images/authorsign.png
new file mode 100644
index 000000000..b43bf66b7
--- /dev/null
+++ b/plugins/dkimstatus/images/authorsign.png
Binary files differ
diff --git a/plugins/dkimstatus/images/invalidsig.png b/plugins/dkimstatus/images/invalidsig.png
new file mode 100644
index 000000000..ee42c1183
--- /dev/null
+++ b/plugins/dkimstatus/images/invalidsig.png
Binary files differ
diff --git a/plugins/dkimstatus/images/nosiginfo.png b/plugins/dkimstatus/images/nosiginfo.png
new file mode 100644
index 000000000..4701919cd
--- /dev/null
+++ b/plugins/dkimstatus/images/nosiginfo.png
Binary files differ
diff --git a/plugins/dkimstatus/images/thirdpty.png b/plugins/dkimstatus/images/thirdpty.png
new file mode 100644
index 000000000..a2928859f
--- /dev/null
+++ b/plugins/dkimstatus/images/thirdpty.png
Binary files differ
diff --git a/plugins/dkimstatus/localization/cs_CZ.inc b/plugins/dkimstatus/localization/cs_CZ.inc
new file mode 100644
index 000000000..1017148e8
--- /dev/null
+++ b/plugins/dkimstatus/localization/cs_CZ.inc
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Czech translation
+ *
+ * @version 0.4
+ * @author Vladimír Mach
+ * @mail wladik@gmail.com
+ *
+ */
+$labels = array();
+$labels['verifiedsender'] = 'Platný podpis z domény odesílatele. Ověřil: ';
+$labels['invalidsignature'] = 'Neplatný podpis! Ověřil: ';
+$labels['nosignature'] = 'Podpis není k dospozici.';
+$labels['thirdpartysig'] = 'Podpis odesílatele není k dispozici, ale je tu podpis třetí strany. Ověřil: ';
+
+?>
diff --git a/plugins/dkimstatus/localization/de_DE.inc b/plugins/dkimstatus/localization/de_DE.inc
new file mode 100644
index 000000000..4d52ddcdd
--- /dev/null
+++ b/plugins/dkimstatus/localization/de_DE.inc
@@ -0,0 +1,8 @@
+<?php
+
+$labels = array();
+$labels['verifiedsender'] = 'Die Absenderdomain besitzt eine g&uuml;ltige Unterschrift! &Uuml;berpr&uuml;ft von ';
+$labels['invalidsignature'] = 'Die Unterschrift ist nicht g&uuml;ltig! &Uuml;berpr&uuml;ft von ';
+$labels['nosignature'] = 'Keine Informationen &uuml;ber die Unterschrift vorhanden.';
+$labels['thirdpartysig'] = 'Die Absenderdomain besitzt keine Unterschrift. Es gibt jedoch eine Unterschrift die bestätigt wurde durch ';
+?>
diff --git a/plugins/dkimstatus/localization/en_US.inc b/plugins/dkimstatus/localization/en_US.inc
new file mode 100644
index 000000000..ff20a6874
--- /dev/null
+++ b/plugins/dkimstatus/localization/en_US.inc
@@ -0,0 +1,9 @@
+<?php
+
+$labels = array();
+$labels['verifiedsender'] = 'Valid signature from the author\'s domain. verified by ';
+$labels['invalidsignature'] = 'Signature is not valid ! verified by ';
+$labels['nosignature'] = 'No signature information';
+$labels['thirdpartysig'] = 'No author\'s domain signature but a third party signature is present. verified by ';
+
+?>
diff --git a/plugins/dkimstatus/localization/es_ES.inc b/plugins/dkimstatus/localization/es_ES.inc
new file mode 100644
index 000000000..e7b518dff
--- /dev/null
+++ b/plugins/dkimstatus/localization/es_ES.inc
@@ -0,0 +1,9 @@
+<?php
+
+$labels = array();
+$labels['verifiedsender'] = 'Firma válida del dominio del autor. Verificada por ';
+$labels['invalidsignature'] = '¡La firma no es válida! Verificada por ';
+$labels['nosignature'] = 'Sin información de firma';
+$labels['thirdpartysig'] = 'No hay firma del dominio del autor pero hay una firma de terceros. Verificada por ';
+
+?>
diff --git a/plugins/dkimstatus/localization/fr_FR.inc b/plugins/dkimstatus/localization/fr_FR.inc
new file mode 100644
index 000000000..28fa05145
--- /dev/null
+++ b/plugins/dkimstatus/localization/fr_FR.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['verifiedsender'] = 'Signature valide provenant du domaine de l\'auteur. verifie par ';
+$labels['invalidsignature'] = 'Signature invalide ! verifie par ';
+$labels['nosignature'] = 'Pas d\'information de signature';
+$labels['thirdpartysig'] = 'Pas de signature du domaine de l\'auteur, mais une signature tierce partie est presente. verifie par ';
+
+
+?>
diff --git a/plugins/dkimstatus/localization/it_IT.inc b/plugins/dkimstatus/localization/it_IT.inc
new file mode 100644
index 000000000..0bd68a124
--- /dev/null
+++ b/plugins/dkimstatus/localization/it_IT.inc
@@ -0,0 +1,7 @@
+<?php
+$labels = array();
+$labels['verifiedsender'] = 'Firma valida dal dominio del mittente. verificato da ';
+$labels['invalidsignature'] = 'La firma non valida! verificato da ';
+$labels['nosignature'] = 'Nessuna informazione sulla firma';
+$labels['thirdpartysig'] = 'Nessuna firma da parte del dominio del mittente ma presente una firma di terza parti. verificato da ';
+?> \ No newline at end of file
diff --git a/plugins/dkimstatus/localization/ja_JP.inc b/plugins/dkimstatus/localization/ja_JP.inc
new file mode 100644
index 000000000..f16829aa6
--- /dev/null
+++ b/plugins/dkimstatus/localization/ja_JP.inc
@@ -0,0 +1,9 @@
+<?php
+
+$labels = array();
+$labels['verifiedsender'] = '送信者のドメインによる正当な署名です。検証内容: ';
+$labels['invalidsignature'] = '不正な署名です! 検証内容: ';
+$labels['nosignature'] = '署名されていません';
+$labels['thirdpartysig'] = '送信者のドメインによる署名はありませんが、第三者による署名があります。検証内容: ';
+
+?>
diff --git a/plugins/dkimstatus/localization/pl_PL.inc b/plugins/dkimstatus/localization/pl_PL.inc
new file mode 100644
index 000000000..a237eb4e5
--- /dev/null
+++ b/plugins/dkimstatus/localization/pl_PL.inc
@@ -0,0 +1,9 @@
+<?php
+
+$labels = array();
+$labels['verifiedsender'] = 'Poprawna sygnatura domeny nadawczej. zweryfikowane przez ';
+$labels['invalidsignature'] = 'Sygnatura nie jest poprawna! zweryfikowane przez ';
+$labels['nosignature'] = 'Brak sygnatury';
+$labels['thirdpartysig'] = 'Brak sygnatury domeny nadawczej. Obecna inny typ sygnatury. zweryfikowane przez ';
+
+?>
diff --git a/plugins/dkimstatus/localization/ro_RO.inc b/plugins/dkimstatus/localization/ro_RO.inc
new file mode 100644
index 000000000..7842492fd
--- /dev/null
+++ b/plugins/dkimstatus/localization/ro_RO.inc
@@ -0,0 +1,9 @@
+<?php
+
+$labels = array();
+$labels['verifiedsender'] = 'Semnat in domeniul autorului. Semnatura comparata si validata de catre ';
+$labels['invalidsignature'] = 'Semnatura falsa! Comparata si invalidata de catre ';
+$labels['nosignature'] = 'Imposibil de comparat si validat semnatura de catre ';
+$labels['thirdpartysig'] = 'Nesemnat in domeniul autorului. O semnatura este prezenta intr-o terta pozitie. Comparat si validat cu aceasta semnatura de catre ';
+
+?>
diff --git a/plugins/dovecot_impersonate/config.inc.php.dist b/plugins/dovecot_impersonate/config.inc.php.dist
new file mode 100644
index 000000000..a631d365f
--- /dev/null
+++ b/plugins/dovecot_impersonate/config.inc.php.dist
@@ -0,0 +1,10 @@
+<?php
+
+// set the dovecot seperator character. Check your dovecot config file for 'auth_master_user_separator'
+//
+// to read about this dovecot feature go to: http://wiki.dovecot.org/Authentication/MasterUsers
+//
+
+$rcmail_config['dovecot_impersonate_seperator'] = '*';
+
+?>
diff --git a/plugins/dovecot_impersonate/dovecot_impersonate.php b/plugins/dovecot_impersonate/dovecot_impersonate.php
new file mode 100644
index 000000000..48165fb4e
--- /dev/null
+++ b/plugins/dovecot_impersonate/dovecot_impersonate.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * This plugin lets you impersonate another user using a master login. Only works with dovecot.
+ *
+ * http://wiki.dovecot.org/Authentication/MasterUsers
+ *
+ * @author Cor Bosman (roundcube@wa.ter.net)
+ */
+
+class dovecot_impersonate extends rcube_plugin {
+
+ public function init()
+ {
+ $this->add_hook('imap_connect', array($this, 'impersonate'));
+ $this->add_hook('managesieve_connect', array($this, 'impersonate'));
+ $this->add_hook('sieverules_connect', array($this, 'impersonate_sieverules'));
+ $this->add_hook('authenticate', array($this, 'login'));
+ }
+
+ function login($data) {
+ // find the seperator character
+ $rcmail = rcmail::get_instance();
+ $this->load_config();
+
+ $seperator = $rcmail->config->get('dovecot_impersonate_seperator', '*');
+
+ if(strpos($data['user'], $seperator)) {
+ $arr = explode($seperator, $data['user']);
+ if(count($arr) == 2) {
+ $data['user'] = $arr[0];
+ $_SESSION['plugin.dovecot_impersonate_master'] = $seperator . $arr[1];
+ }
+ }
+ return($data);
+ }
+
+ function impersonate($data) {
+ if(isset($_SESSION['plugin.dovecot_impersonate_master'])) {
+ $data['user'] = $data['user'] . $_SESSION['plugin.dovecot_impersonate_master'];
+ }
+ return($data);
+ }
+
+ function impersonate_sieverules($data) {
+ if(isset($_SESSION['plugin.dovecot_impersonate_master'])) {
+ $data['username'] = $data['username'] . $_SESSION['plugin.dovecot_impersonate_master'];
+ }
+ return($data);
+ }
+}
+?>
diff --git a/plugins/dovecot_impersonate/package.xml b/plugins/dovecot_impersonate/package.xml
new file mode 100644
index 000000000..3ed45cad8
--- /dev/null
+++ b/plugins/dovecot_impersonate/package.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>dovecot_impersonate</name>
+ <lead>
+ <name>Cor Bosman</name>
+ <user>cor</user>
+ <email>cor@roundcu.be</email>
+ <active>yes</active>
+ </lead>
+ <uri>https://github.com/corbosman/dovecot_impersonate</uri>
+ <version>
+ <release>2.0</release>
+ </version>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+</package>
diff --git a/plugins/enigma/README b/plugins/enigma/README
deleted file mode 100644
index 22d6e513a..000000000
--- a/plugins/enigma/README
+++ /dev/null
@@ -1,35 +0,0 @@
-------------------------------------------------------------------
-THIS IS NOT EVEN AN "ALPHA" STATE. USE ONLY FOR DEVELOPMENT!!!!!!!
-------------------------------------------------------------------
-
-WARNING: Don't use with gnupg-2.x!
-
-Enigma Plugin Status:
-
-* DONE:
-
-- PGP signed messages verification
-- Handling of PGP keys files attached to incoming messages
-- PGP encrypted messages decryption (started)
-- PGP keys management UI (started)
-
-* TODO (must have):
-
-- Parsing of decrypted messages into array (see rcube_mime_struct) and then into rcube_message_part structure
- (create core class rcube_mime_parser or take over PEAR::Mail_mimeDecode package and improve it)
-- Sending encrypted/signed messages (probably some changes in core will be needed)
-- Per-Identity settings (including keys/certs)
-- Handling big messages with temp files (including changes in Roundcube core)
-- Performance improvements (some caching, code review)
-- better (and more) icons
-
-* TODO (later):
-
-- Keys generation
-- Certs generation
-- Keys/Certs info in Contacts details page (+ split Contact details page into tabs)
-- Key server support
-- S/MIME signed messages verification
-- S/MIME encrypted messages decryption
-- Handling of S/MIME certs files attached to incoming messages
-- SSL (S/MIME) Certs management
diff --git a/plugins/enigma/config.inc.php.dist b/plugins/enigma/config.inc.php.dist
deleted file mode 100644
index 2adb4d9f6..000000000
--- a/plugins/enigma/config.inc.php.dist
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-// Enigma Plugin options
-// --------------------
-
-// A driver to use for PGP. Default: "gnupg".
-$config['enigma_pgp_driver'] = 'gnupg';
-
-// A driver to use for S/MIME. Default: "phpssl".
-$config['enigma_smime_driver'] = 'phpssl';
-
-// Keys directory for all users. Default 'enigma/home'.
-// Must be writeable by PHP process
-$config['enigma_pgp_homedir'] = null;
diff --git a/plugins/enigma/enigma.js b/plugins/enigma/enigma.js
deleted file mode 100644
index 29c648224..000000000
--- a/plugins/enigma/enigma.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Enigma Plugin */
-
-if (window.rcmail)
-{
- rcmail.addEventListener('init', function(evt)
- {
- if (rcmail.env.task == 'settings') {
- rcmail.register_command('plugin.enigma', function() { rcmail.goto_url('plugin.enigma') }, true);
- rcmail.register_command('plugin.enigma-key-import', function() { rcmail.enigma_key_import() }, true);
- rcmail.register_command('plugin.enigma-key-export', function() { rcmail.enigma_key_export() }, true);
-
- if (rcmail.gui_objects.keyslist)
- {
- var p = rcmail;
- rcmail.keys_list = new rcube_list_widget(rcmail.gui_objects.keyslist,
- {multiselect:false, draggable:false, keyboard:false});
- rcmail.keys_list.addEventListener('select', function(o){ p.enigma_key_select(o); });
- rcmail.keys_list.init();
- rcmail.keys_list.focus();
-
- rcmail.enigma_list();
-
- rcmail.register_command('firstpage', function(props) {return rcmail.enigma_list_page('first'); });
- rcmail.register_command('previouspage', function(props) {return rcmail.enigma_list_page('previous'); });
- rcmail.register_command('nextpage', function(props) {return rcmail.enigma_list_page('next'); });
- rcmail.register_command('lastpage', function(props) {return rcmail.enigma_list_page('last'); });
- }
-
- if (rcmail.env.action == 'edit-prefs') {
- rcmail.register_command('search', function(props) {return rcmail.enigma_search(props); }, true);
- rcmail.register_command('reset-search', function(props) {return rcmail.enigma_search_reset(props); }, true);
- }
- else if (rcmail.env.action == 'plugin.enigma') {
- rcmail.register_command('plugin.enigma-import', function() { rcmail.enigma_import() }, true);
- rcmail.register_command('plugin.enigma-export', function() { rcmail.enigma_export() }, true);
- }
- }
- });
-}
-
-/*********************************************************/
-/********* Enigma Settings/Keys/Certs UI *********/
-/*********************************************************/
-
-// Display key(s) import form
-rcube_webmail.prototype.enigma_key_import = function()
-{
- this.enigma_loadframe(null, '&_a=keyimport');
-};
-
-// Submit key(s) form
-rcube_webmail.prototype.enigma_import = function()
-{
- var form, file;
- if (form = this.gui_objects.importform) {
- file = document.getElementById('rcmimportfile');
- if (file && !file.value) {
- alert(this.get_label('selectimportfile'));
- return;
- }
- form.submit();
- this.set_busy(true, 'importwait');
- this.lock_form(form, true);
- }
-};
-
-// list row selection handler
-rcube_webmail.prototype.enigma_key_select = function(list)
-{
- var id;
- if (id = list.get_single_selection())
- this.enigma_loadframe(id);
-};
-
-// load key frame
-rcube_webmail.prototype.enigma_loadframe = function(id, url)
-{
- var frm, win;
- if (this.env.contentframe && window.frames && (frm = window.frames[this.env.contentframe])) {
- if (!id && !url && (win = window.frames[this.env.contentframe])) {
- if (win.location && win.location.href.indexOf(this.env.blankpage)<0)
- win.location.href = this.env.blankpage;
- return;
- }
- this.set_busy(true);
- if (!url)
- url = '&_a=keyinfo&_id='+id;
- frm.location.href = this.env.comm_path+'&_action=plugin.enigma&_framed=1' + url;
- }
-};
-
-// Search keys/certs
-rcube_webmail.prototype.enigma_search = function(props)
-{
- if (!props && this.gui_objects.qsearchbox)
- props = this.gui_objects.qsearchbox.value;
-
- if (props || this.env.search_request) {
- var params = {'_a': 'keysearch', '_q': urlencode(props)},
- lock = this.set_busy(true, 'searching');
-// if (this.gui_objects.search_filter)
- // addurl += '&_filter=' + this.gui_objects.search_filter.value;
- this.env.current_page = 1;
- this.enigma_loadframe();
- this.enigma_clear_list();
- this.http_post('plugin.enigma', params, lock);
- }
-
- return false;
-}
-
-// Reset search filter and the list
-rcube_webmail.prototype.enigma_search_reset = function(props)
-{
- var s = this.env.search_request;
- this.reset_qsearch();
-
- if (s) {
- this.enigma_loadframe();
- this.enigma_clear_list();
-
- // refresh the list
- this.enigma_list();
- }
-
- return false;
-}
-
-// Keys/certs listing
-rcube_webmail.prototype.enigma_list = function(page)
-{
- var params = {'_a': 'keylist'},
- lock = this.set_busy(true, 'loading');
-
- this.env.current_page = page ? page : 1;
-
- if (this.env.search_request)
- params._q = this.env.search_request;
- if (page)
- params._p = page;
-
- this.enigma_clear_list();
- this.http_post('plugin.enigma', params, lock);
-}
-
-// Change list page
-rcube_webmail.prototype.enigma_list_page = function(page)
-{
- if (page == 'next')
- page = this.env.current_page + 1;
- else if (page == 'last')
- page = this.env.pagecount;
- else if (page == 'prev' && this.env.current_page > 1)
- page = this.env.current_page - 1;
- else if (page == 'first' && this.env.current_page > 1)
- page = 1;
-
- this.enigma_list(page);
-}
-
-// Remove list rows
-rcube_webmail.prototype.enigma_clear_list = function()
-{
- this.enigma_loadframe();
- if (this.keys_list)
- this.keys_list.clear(true);
-}
-
-// Adds a row to the list
-rcube_webmail.prototype.enigma_add_list_row = function(r)
-{
- if (!this.gui_objects.keyslist || !this.keys_list)
- return false;
-
- var list = this.keys_list,
- tbody = this.gui_objects.keyslist.tBodies[0],
- rowcount = tbody.rows.length,
- even = rowcount%2,
- css_class = 'message'
- + (even ? ' even' : ' odd'),
- // for performance use DOM instead of jQuery here
- row = document.createElement('tr'),
- col = document.createElement('td');
-
- row.id = 'rcmrow' + r.id;
- row.className = css_class;
-
- col.innerHTML = r.name;
- row.appendChild(col);
- list.insert_row(row);
-}
-
-/*********************************************************/
-/********* Enigma Message methods *********/
-/*********************************************************/
-
-// Import attached keys/certs file
-rcube_webmail.prototype.enigma_import_attachment = function(mime_id)
-{
- var lock = this.set_busy(true, 'loading');
- this.http_post('plugin.enigmaimport', '_uid='+this.env.uid+'&_mbox='
- +urlencode(this.env.mailbox)+'&_part='+urlencode(mime_id), lock);
-
- return false;
-};
-
diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php
deleted file mode 100644
index 25520a27d..000000000
--- a/plugins/enigma/enigma.php
+++ /dev/null
@@ -1,476 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | Enigma Plugin for Roundcube |
- | Version 0.1 |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-/*
- This class contains only hooks and action handlers.
- Most plugin logic is placed in enigma_engine and enigma_ui classes.
-*/
-
-class enigma extends rcube_plugin
-{
- public $task = 'mail|settings';
- public $rc;
- public $engine;
-
- private $env_loaded;
- private $message;
- private $keys_parts = array();
- private $keys_bodies = array();
-
-
- /**
- * Plugin initialization.
- */
- function init()
- {
- $rcmail = rcmail::get_instance();
- $this->rc = $rcmail;
-
- $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET);
-
- if ($this->rc->task == 'mail') {
- // message parse/display hooks
- $this->add_hook('message_part_structure', array($this, 'parse_structure'));
- $this->add_hook('message_body_prefix', array($this, 'status_message'));
-
- // message displaying
- if ($rcmail->action == 'show' || $rcmail->action == 'preview') {
- $this->add_hook('message_load', array($this, 'message_load'));
- $this->add_hook('template_object_messagebody', array($this, 'message_output'));
- $this->register_action('plugin.enigmaimport', array($this, 'import_file'));
- }
- // message composing
- else if ($rcmail->action == 'compose') {
- $this->load_ui();
- $this->ui->init($section);
- }
- // message sending (and draft storing)
- else if ($rcmail->action == 'sendmail') {
- //$this->add_hook('outgoing_message_body', array($this, 'msg_encode'));
- //$this->add_hook('outgoing_message_body', array($this, 'msg_sign'));
- }
- }
- else if ($this->rc->task == 'settings') {
- // add hooks for Enigma settings
- $this->add_hook('preferences_sections_list', array($this, 'preferences_section'));
- $this->add_hook('preferences_list', array($this, 'preferences_list'));
- $this->add_hook('preferences_save', array($this, 'preferences_save'));
-
- // register handler for keys/certs management
- $this->register_action('plugin.enigma', array($this, 'preferences_ui'));
-
- // grab keys/certs management iframe requests
- if ($this->rc->action == 'edit-prefs' && preg_match('/^enigma(certs|keys)/', $section)) {
- $this->load_ui();
- $this->ui->init($section);
- }
- }
- }
-
- /**
- * Plugin environment initialization.
- */
- function load_env()
- {
- if ($this->env_loaded)
- return;
-
- $this->env_loaded = true;
-
- // Add include path for Enigma classes and drivers
- $include_path = $this->home . '/lib' . PATH_SEPARATOR;
- $include_path .= ini_get('include_path');
- set_include_path($include_path);
-
- // load the Enigma plugin configuration
- $this->load_config();
-
- // include localization (if wasn't included before)
- $this->add_texts('localization/');
- }
-
- /**
- * Plugin UI initialization.
- */
- function load_ui()
- {
- if ($this->ui)
- return;
-
- // load config/localization
- $this->load_env();
-
- // Load UI
- $this->ui = new enigma_ui($this, $this->home);
- }
-
- /**
- * Plugin engine initialization.
- */
- function load_engine()
- {
- if ($this->engine)
- return;
-
- // load config/localization
- $this->load_env();
-
- $this->engine = new enigma_engine($this);
- }
-
- /**
- * Handler for message_part_structure hook.
- * Called for every part of the message.
- *
- * @param array Original parameters
- *
- * @return array Modified parameters
- */
- function parse_structure($p)
- {
-// $struct = $p['structure'];
-
- if ($p['mimetype'] == 'text/plain' || $p['mimetype'] == 'application/pgp') {
- $this->parse_plain($p);
- }
- else if ($p['mimetype'] == 'multipart/signed') {
- $this->parse_signed($p);
- }
- else if ($p['mimetype'] == 'multipart/encrypted') {
- $this->parse_encrypted($p);
- }
- else if ($p['mimetype'] == 'application/pkcs7-mime') {
- $this->parse_encrypted($p);
- }
-
- return $p;
- }
-
- /**
- * Handler for preferences_sections_list hook.
- * Adds Enigma settings sections into preferences sections list.
- *
- * @param array Original parameters
- *
- * @return array Modified parameters
- */
- function preferences_section($p)
- {
- // add labels
- $this->add_texts('localization/');
-
- $p['list']['enigmasettings'] = array(
- 'id' => 'enigmasettings', 'section' => $this->gettext('enigmasettings'),
- );
- $p['list']['enigmacerts'] = array(
- 'id' => 'enigmacerts', 'section' => $this->gettext('enigmacerts'),
- );
- $p['list']['enigmakeys'] = array(
- 'id' => 'enigmakeys', 'section' => $this->gettext('enigmakeys'),
- );
-
- return $p;
- }
-
- /**
- * Handler for preferences_list hook.
- * Adds options blocks into Enigma settings sections in Preferences.
- *
- * @param array Original parameters
- *
- * @return array Modified parameters
- */
- function preferences_list($p)
- {
- if ($p['section'] == 'enigmasettings') {
- // This makes that section is not removed from the list
- $p['blocks']['dummy']['options']['dummy'] = array();
- }
- else if ($p['section'] == 'enigmacerts') {
- // This makes that section is not removed from the list
- $p['blocks']['dummy']['options']['dummy'] = array();
- }
- else if ($p['section'] == 'enigmakeys') {
- // This makes that section is not removed from the list
- $p['blocks']['dummy']['options']['dummy'] = array();
- }
-
- return $p;
- }
-
- /**
- * Handler for preferences_save hook.
- * Executed on Enigma settings form submit.
- *
- * @param array Original parameters
- *
- * @return array Modified parameters
- */
- function preferences_save($p)
- {
- if ($p['section'] == 'enigmasettings') {
- $a['prefs'] = array(
-// 'dummy' => rcube_utils::get_input_value('_dummy', rcube_utils::INPUT_POST),
- );
- }
-
- return $p;
- }
-
- /**
- * Handler for keys/certs management UI template.
- */
- function preferences_ui()
- {
- $this->load_ui();
- $this->ui->init();
- }
-
- /**
- * Handler for message_body_prefix hook.
- * Called for every displayed (content) part of the message.
- * Adds infobox about signature verification and/or decryption
- * status above the body.
- *
- * @param array Original parameters
- *
- * @return array Modified parameters
- */
- function status_message($p)
- {
- $part_id = $p['part']->mime_id;
-
- // skip: not a message part
- if ($p['part'] instanceof rcube_message)
- return $p;
-
- // skip: message has no signed/encoded content
- if (!$this->engine)
- return $p;
-
- // Decryption status
- if (isset($this->engine->decryptions[$part_id])) {
-
- // get decryption status
- $status = $this->engine->decryptions[$part_id];
-
- // Load UI and add css script
- $this->load_ui();
- $this->ui->add_css();
-
- // display status info
- $attrib['id'] = 'enigma-message';
-
- if ($status instanceof enigma_error) {
- $attrib['class'] = 'enigmaerror';
- $code = $status->getCode();
- if ($code == enigma_error::E_KEYNOTFOUND)
- $msg = rcube::Q(str_replace('$keyid', enigma_key::format_id($status->getData('id')),
- $this->gettext('decryptnokey')));
- else if ($code == enigma_error::E_BADPASS)
- $msg = rcube::Q($this->gettext('decryptbadpass'));
- else
- $msg = rcube::Q($this->gettext('decrypterror'));
- }
- else {
- $attrib['class'] = 'enigmanotice';
- $msg = rcube::Q($this->gettext('decryptok'));
- }
-
- $p['prefix'] .= html::div($attrib, $msg);
- }
-
- // Signature verification status
- if (isset($this->engine->signed_parts[$part_id])
- && ($sig = $this->engine->signatures[$this->engine->signed_parts[$part_id]])
- ) {
- // add css script
- $this->load_ui();
- $this->ui->add_css();
-
- // display status info
- $attrib['id'] = 'enigma-message';
-
- if ($sig instanceof enigma_signature) {
- if ($sig->valid) {
- $attrib['class'] = 'enigmanotice';
- $sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>';
- $msg = rcube::Q(str_replace('$sender', $sender, $this->gettext('sigvalid')));
- }
- else {
- $attrib['class'] = 'enigmawarning';
- $sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>';
- $msg = rcube::Q(str_replace('$sender', $sender, $this->gettext('siginvalid')));
- }
- }
- else if ($sig->getCode() == enigma_error::E_KEYNOTFOUND) {
- $attrib['class'] = 'enigmawarning';
- $msg = rcube::Q(str_replace('$keyid', enigma_key::format_id($sig->getData('id')),
- $this->gettext('signokey')));
- }
- else {
- $attrib['class'] = 'enigmaerror';
- $msg = rcube::Q($this->gettext('sigerror'));
- }
-/*
- $msg .= '&nbsp;' . html::a(array('href' => "#sigdetails",
- 'onclick' => rcmail_output::JS_OBJECT_NAME.".command('enigma-sig-details')"),
- rcube::Q($this->gettext('showdetails')));
-*/
- // test
-// $msg .= '<br /><pre>'.$sig->body.'</pre>';
-
- $p['prefix'] .= html::div($attrib, $msg);
-
- // Display each signature message only once
- unset($this->engine->signatures[$this->engine->signed_parts[$part_id]]);
- }
-
- return $p;
- }
-
- /**
- * Handler for plain/text message.
- *
- * @param array Reference to hook's parameters (see enigma::parse_structure())
- */
- private function parse_plain(&$p)
- {
- $this->load_engine();
- $this->engine->parse_plain($p);
- }
-
- /**
- * Handler for multipart/signed message.
- * Verifies signature.
- *
- * @param array Reference to hook's parameters (see enigma::parse_structure())
- */
- private function parse_signed(&$p)
- {
- $this->load_engine();
- $this->engine->parse_signed($p);
- }
-
- /**
- * Handler for multipart/encrypted and application/pkcs7-mime message.
- *
- * @param array Reference to hook's parameters (see enigma::parse_structure())
- */
- private function parse_encrypted(&$p)
- {
- $this->load_engine();
- $this->engine->parse_encrypted($p);
- }
-
- /**
- * Handler for message_load hook.
- * Check message bodies and attachments for keys/certs.
- */
- function message_load($p)
- {
- $this->message = $p['object'];
-
- // handle attachments vcard attachments
- foreach ((array)$this->message->attachments as $attachment) {
- if ($this->is_keys_part($attachment)) {
- $this->keys_parts[] = $attachment->mime_id;
- }
- }
- // the same with message bodies
- foreach ((array)$this->message->parts as $part) {
- if ($this->is_keys_part($part)) {
- $this->keys_parts[] = $part->mime_id;
- $this->keys_bodies[] = $part->mime_id;
- }
- }
- // @TODO: inline PGP keys
-
- if ($this->keys_parts) {
- $this->add_texts('localization');
- }
- }
-
- /**
- * Handler for template_object_messagebody hook.
- * This callback function adds a box below the message content
- * if there is a key/cert attachment available
- */
- function message_output($p)
- {
- $attach_script = false;
-
- foreach ($this->keys_parts as $part) {
-
- // remove part's body
- if (in_array($part, $this->keys_bodies))
- $p['content'] = '';
-
- $style = "margin:0 1em; padding:0.2em 0.5em; border:1px solid #999; width: auto"
- ." border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px";
-
- // add box below message body
- $p['content'] .= html::p(array('style' => $style),
- html::a(array(
- 'href' => "#",
- 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".enigma_import_attachment('".rcube::JQ($part)."')",
- 'title' => $this->gettext('keyattimport')),
- html::img(array('src' => $this->url('skins/classic/key_add.png'), 'style' => "vertical-align:middle")))
- . ' ' . html::span(null, $this->gettext('keyattfound')));
-
- $attach_script = true;
- }
-
- if ($attach_script) {
- $this->include_script('enigma.js');
- }
-
- return $p;
- }
-
- /**
- * Handler for attached keys/certs import
- */
- function import_file()
- {
- $this->load_engine();
- $this->engine->import_file();
- }
-
- /**
- * Checks if specified message part is a PGP-key or S/MIME cert data
- *
- * @param rcube_message_part Part object
- *
- * @return boolean True if part is a key/cert
- */
- private function is_keys_part($part)
- {
- // @TODO: S/MIME
- return (
- // Content-Type: application/pgp-keys
- $part->mimetype == 'application/pgp-keys'
- );
- }
-}
diff --git a/plugins/enigma/home/.htaccess b/plugins/enigma/home/.htaccess
deleted file mode 100644
index 8e6a345dc..000000000
--- a/plugins/enigma/home/.htaccess
+++ /dev/null
@@ -1,2 +0,0 @@
-Order allow,deny
-Deny from all \ No newline at end of file
diff --git a/plugins/enigma/home/aldric/pubring.gpg b/plugins/enigma/home/aldric/pubring.gpg
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/plugins/enigma/home/aldric/pubring.gpg
diff --git a/plugins/enigma/home/aldric/secring.gpg b/plugins/enigma/home/aldric/secring.gpg
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/plugins/enigma/home/aldric/secring.gpg
diff --git a/plugins/enigma/home/aldric/trustdb.gpg b/plugins/enigma/home/aldric/trustdb.gpg
new file mode 100644
index 000000000..c7fb1d524
--- /dev/null
+++ b/plugins/enigma/home/aldric/trustdb.gpg
Binary files differ
diff --git a/plugins/enigma/home/hugues/pubring.gpg b/plugins/enigma/home/hugues/pubring.gpg
new file mode 100644
index 000000000..1cef241de
--- /dev/null
+++ b/plugins/enigma/home/hugues/pubring.gpg
Binary files differ
diff --git a/plugins/enigma/home/hugues/secring.gpg b/plugins/enigma/home/hugues/secring.gpg
new file mode 100644
index 000000000..f9725b338
--- /dev/null
+++ b/plugins/enigma/home/hugues/secring.gpg
Binary files differ
diff --git a/plugins/enigma/home/hugues/trustdb.gpg b/plugins/enigma/home/hugues/trustdb.gpg
new file mode 100644
index 000000000..3bf84308a
--- /dev/null
+++ b/plugins/enigma/home/hugues/trustdb.gpg
Binary files differ
diff --git a/plugins/enigma/lib/Crypt/GPG.php b/plugins/enigma/lib/Crypt/GPG.php
deleted file mode 100644
index 6e8e717e8..000000000
--- a/plugins/enigma/lib/Crypt/GPG.php
+++ /dev/null
@@ -1,2542 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Crypt_GPG is a package to use GPG from PHP
- *
- * This package provides an object oriented interface to GNU Privacy
- * Guard (GPG). It requires the GPG executable to be on the system.
- *
- * Though GPG can support symmetric-key cryptography, this package is intended
- * only to facilitate public-key cryptography.
- *
- * This file contains the main GPG class. The class in this file lets you
- * encrypt, decrypt, sign and verify data; import and delete keys; and perform
- * other useful GPG tasks.
- *
- * Example usage:
- * <code>
- * <?php
- * // encrypt some data
- * $gpg = new Crypt_GPG();
- * $gpg->addEncryptKey($mySecretKeyId);
- * $encryptedData = $gpg->encrypt($data);
- * ?>
- * </code>
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: GPG.php 302814 2010-08-26 15:43:07Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://pear.php.net/manual/en/package.encryption.crypt-gpg.php
- * @link http://www.gnupg.org/
- */
-
-/**
- * Signature handler class
- */
-require_once 'Crypt/GPG/VerifyStatusHandler.php';
-
-/**
- * Decryption handler class
- */
-require_once 'Crypt/GPG/DecryptStatusHandler.php';
-
-/**
- * GPG key class
- */
-require_once 'Crypt/GPG/Key.php';
-
-/**
- * GPG sub-key class
- */
-require_once 'Crypt/GPG/SubKey.php';
-
-/**
- * GPG user id class
- */
-require_once 'Crypt/GPG/UserId.php';
-
-/**
- * GPG process and I/O engine class
- */
-require_once 'Crypt/GPG/Engine.php';
-
-/**
- * GPG exception classes
- */
-require_once 'Crypt/GPG/Exceptions.php';
-
-// {{{ class Crypt_GPG
-
-/**
- * A class to use GPG from PHP
- *
- * This class provides an object oriented interface to GNU Privacy Guard (GPG).
- *
- * Though GPG can support symmetric-key cryptography, this class is intended
- * only to facilitate public-key cryptography.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://www.gnupg.org/
- */
-class Crypt_GPG
-{
- // {{{ class error constants
-
- /**
- * Error code returned when there is no error.
- */
- const ERROR_NONE = 0;
-
- /**
- * Error code returned when an unknown or unhandled error occurs.
- */
- const ERROR_UNKNOWN = 1;
-
- /**
- * Error code returned when a bad passphrase is used.
- */
- const ERROR_BAD_PASSPHRASE = 2;
-
- /**
- * Error code returned when a required passphrase is missing.
- */
- const ERROR_MISSING_PASSPHRASE = 3;
-
- /**
- * Error code returned when a key that is already in the keyring is
- * imported.
- */
- const ERROR_DUPLICATE_KEY = 4;
-
- /**
- * Error code returned the required data is missing for an operation.
- *
- * This could be missing key data, missing encrypted data or missing
- * signature data.
- */
- const ERROR_NO_DATA = 5;
-
- /**
- * Error code returned when an unsigned key is used.
- */
- const ERROR_UNSIGNED_KEY = 6;
-
- /**
- * Error code returned when a key that is not self-signed is used.
- */
- const ERROR_NOT_SELF_SIGNED = 7;
-
- /**
- * Error code returned when a public or private key that is not in the
- * keyring is used.
- */
- const ERROR_KEY_NOT_FOUND = 8;
-
- /**
- * Error code returned when an attempt to delete public key having a
- * private key is made.
- */
- const ERROR_DELETE_PRIVATE_KEY = 9;
-
- /**
- * Error code returned when one or more bad signatures are detected.
- */
- const ERROR_BAD_SIGNATURE = 10;
-
- /**
- * Error code returned when there is a problem reading GnuPG data files.
- */
- const ERROR_FILE_PERMISSIONS = 11;
-
- // }}}
- // {{{ class constants for data signing modes
-
- /**
- * Signing mode for normal signing of data. The signed message will not
- * be readable without special software.
- *
- * This is the default signing mode.
- *
- * @see Crypt_GPG::sign()
- * @see Crypt_GPG::signFile()
- */
- const SIGN_MODE_NORMAL = 1;
-
- /**
- * Signing mode for clearsigning data. Clearsigned signatures are ASCII
- * armored data and are readable without special software. If the signed
- * message is unencrypted, the message will still be readable. The message
- * text will be in the original encoding.
- *
- * @see Crypt_GPG::sign()
- * @see Crypt_GPG::signFile()
- */
- const SIGN_MODE_CLEAR = 2;
-
- /**
- * Signing mode for creating a detached signature. When using detached
- * signatures, only the signature data is returned. The original message
- * text may be distributed separately from the signature data. This is
- * useful for miltipart/signed email messages as per
- * {@link http://www.ietf.org/rfc/rfc3156.txt RFC 3156}.
- *
- * @see Crypt_GPG::sign()
- * @see Crypt_GPG::signFile()
- */
- const SIGN_MODE_DETACHED = 3;
-
- // }}}
- // {{{ class constants for fingerprint formats
-
- /**
- * No formatting is performed.
- *
- * Example: C3BC615AD9C766E5A85C1F2716D27458B1BBA1C4
- *
- * @see Crypt_GPG::getFingerprint()
- */
- const FORMAT_NONE = 1;
-
- /**
- * Fingerprint is formatted in the format used by the GnuPG gpg command's
- * default output.
- *
- * Example: C3BC 615A D9C7 66E5 A85C 1F27 16D2 7458 B1BB A1C4
- *
- * @see Crypt_GPG::getFingerprint()
- */
- const FORMAT_CANONICAL = 2;
-
- /**
- * Fingerprint is formatted in the format used when displaying X.509
- * certificates
- *
- * Example: C3:BC:61:5A:D9:C7:66:E5:A8:5C:1F:27:16:D2:74:58:B1:BB:A1:C4
- *
- * @see Crypt_GPG::getFingerprint()
- */
- const FORMAT_X509 = 3;
-
- // }}}
- // {{{ other class constants
-
- /**
- * URI at which package bugs may be reported.
- */
- const BUG_URI = 'http://pear.php.net/bugs/report.php?package=Crypt_GPG';
-
- // }}}
- // {{{ protected class properties
-
- /**
- * Engine used to control the GPG subprocess
- *
- * @var Crypt_GPG_Engine
- *
- * @see Crypt_GPG::setEngine()
- */
- protected $engine = null;
-
- /**
- * Keys used to encrypt
- *
- * The array is of the form:
- * <code>
- * array(
- * $key_id => array(
- * 'fingerprint' => $fingerprint,
- * 'passphrase' => null
- * )
- * );
- * </code>
- *
- * @var array
- * @see Crypt_GPG::addEncryptKey()
- * @see Crypt_GPG::clearEncryptKeys()
- */
- protected $encryptKeys = array();
-
- /**
- * Keys used to decrypt
- *
- * The array is of the form:
- * <code>
- * array(
- * $key_id => array(
- * 'fingerprint' => $fingerprint,
- * 'passphrase' => $passphrase
- * )
- * );
- * </code>
- *
- * @var array
- * @see Crypt_GPG::addSignKey()
- * @see Crypt_GPG::clearSignKeys()
- */
- protected $signKeys = array();
-
- /**
- * Keys used to sign
- *
- * The array is of the form:
- * <code>
- * array(
- * $key_id => array(
- * 'fingerprint' => $fingerprint,
- * 'passphrase' => $passphrase
- * )
- * );
- * </code>
- *
- * @var array
- * @see Crypt_GPG::addDecryptKey()
- * @see Crypt_GPG::clearDecryptKeys()
- */
- protected $decryptKeys = array();
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new GPG object
- *
- * Available options are:
- *
- * - <kbd>string homedir</kbd> - the directory where the GPG
- * keyring files are stored. If not
- * specified, Crypt_GPG uses the
- * default of <kbd>~/.gnupg</kbd>.
- * - <kbd>string publicKeyring</kbd> - the file path of the public
- * keyring. Use this if the public
- * keyring is not in the homedir, or
- * if the keyring is in a directory
- * not writable by the process
- * invoking GPG (like Apache). Then
- * you can specify the path to the
- * keyring with this option
- * (/foo/bar/pubring.gpg), and specify
- * a writable directory (like /tmp)
- * using the <i>homedir</i> option.
- * - <kbd>string privateKeyring</kbd> - the file path of the private
- * keyring. Use this if the private
- * keyring is not in the homedir, or
- * if the keyring is in a directory
- * not writable by the process
- * invoking GPG (like Apache). Then
- * you can specify the path to the
- * keyring with this option
- * (/foo/bar/secring.gpg), and specify
- * a writable directory (like /tmp)
- * using the <i>homedir</i> option.
- * - <kbd>string trustDb</kbd> - the file path of the web-of-trust
- * database. Use this if the trust
- * database is not in the homedir, or
- * if the database is in a directory
- * not writable by the process
- * invoking GPG (like Apache). Then
- * you can specify the path to the
- * trust database with this option
- * (/foo/bar/trustdb.gpg), and specify
- * a writable directory (like /tmp)
- * using the <i>homedir</i> option.
- * - <kbd>string binary</kbd> - the location of the GPG binary. If
- * not specified, the driver attempts
- * to auto-detect the GPG binary
- * location using a list of known
- * default locations for the current
- * operating system. The option
- * <kbd>gpgBinary</kbd> is a
- * deprecated alias for this option.
- * - <kbd>boolean debug</kbd> - whether or not to use debug mode.
- * When debug mode is on, all
- * communication to and from the GPG
- * subprocess is logged. This can be
- *
- * @param array $options optional. An array of options used to create the
- * GPG object. All options are optional and are
- * represented as key-value pairs.
- *
- * @throws Crypt_GPG_FileException if the <kbd>homedir</kbd> does not exist
- * and cannot be created. This can happen if <kbd>homedir</kbd> is
- * not specified, Crypt_GPG is run as the web user, and the web
- * user has no home directory. This exception is also thrown if any
- * of the options <kbd>publicKeyring</kbd>,
- * <kbd>privateKeyring</kbd> or <kbd>trustDb</kbd> options are
- * specified but the files do not exist or are are not readable.
- * This can happen if the user running the Crypt_GPG process (for
- * example, the Apache user) does not have permission to read the
- * files.
- *
- * @throws PEAR_Exception if the provided <kbd>binary</kbd> is invalid, or
- * if no <kbd>binary</kbd> is provided and no suitable binary could
- * be found.
- */
- public function __construct(array $options = array())
- {
- $this->setEngine(new Crypt_GPG_Engine($options));
- }
-
- // }}}
- // {{{ importKey()
-
- /**
- * Imports a public or private key into the keyring
- *
- * Keys may be removed from the keyring using
- * {@link Crypt_GPG::deletePublicKey()} or
- * {@link Crypt_GPG::deletePrivateKey()}.
- *
- * @param string $data the key data to be imported.
- *
- * @return array an associative array containing the following elements:
- * - <kbd>fingerprint</kbd> - the fingerprint of the
- * imported key,
- * - <kbd>public_imported</kbd> - the number of public
- * keys imported,
- * - <kbd>public_unchanged</kbd> - the number of unchanged
- * public keys,
- * - <kbd>private_imported</kbd> - the number of private
- * keys imported,
- * - <kbd>private_unchanged</kbd> - the number of unchanged
- * private keys.
- *
- * @throws Crypt_GPG_NoDataException if the key data is missing or if the
- * data is is not valid key data.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function importKey($data)
- {
- return $this->_importKey($data, false);
- }
-
- // }}}
- // {{{ importKeyFile()
-
- /**
- * Imports a public or private key file into the keyring
- *
- * Keys may be removed from the keyring using
- * {@link Crypt_GPG::deletePublicKey()} or
- * {@link Crypt_GPG::deletePrivateKey()}.
- *
- * @param string $filename the key file to be imported.
- *
- * @return array an associative array containing the following elements:
- * - <kbd>fingerprint</kbd> - the fingerprint of the
- * imported key,
- * - <kbd>public_imported</kbd> - the number of public
- * keys imported,
- * - <kbd>public_unchanged</kbd> - the number of unchanged
- * public keys,
- * - <kbd>private_imported</kbd> - the number of private
- * keys imported,
- * - <kbd>private_unchanged</kbd> - the number of unchanged
- * private keys.
- * private keys.
- *
- * @throws Crypt_GPG_NoDataException if the key data is missing or if the
- * data is is not valid key data.
- *
- * @throws Crypt_GPG_FileException if the key file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function importKeyFile($filename)
- {
- return $this->_importKey($filename, true);
- }
-
- // }}}
- // {{{ exportPublicKey()
-
- /**
- * Exports a public key from the keyring
- *
- * The exported key remains on the keyring. To delete the public key, use
- * {@link Crypt_GPG::deletePublicKey()}.
- *
- * If more than one key fingerprint is available for the specified
- * <kbd>$keyId</kbd> (for example, if you use a non-unique uid) only the
- * first public key is exported.
- *
- * @param string $keyId either the full uid of the public key, the email
- * part of the uid of the public key or the key id of
- * the public key. For example,
- * "Test User (example) <test@example.com>",
- * "test@example.com" or a hexadecimal string.
- * @param boolean $armor optional. If true, ASCII armored data is returned;
- * otherwise, binary data is returned. Defaults to
- * true.
- *
- * @return string the public key data.
- *
- * @throws Crypt_GPG_KeyNotFoundException if a public key with the given
- * <kbd>$keyId</kbd> is not found.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function exportPublicKey($keyId, $armor = true)
- {
- $fingerprint = $this->getFingerprint($keyId);
-
- if ($fingerprint === null) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'Public key not found: ' . $keyId,
- Crypt_GPG::ERROR_KEY_NOT_FOUND, $keyId);
- }
-
- $keyData = '';
- $operation = '--export ' . escapeshellarg($fingerprint);
- $arguments = ($armor) ? array('--armor') : array();
-
- $this->engine->reset();
- $this->engine->setOutput($keyData);
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- $code = $this->engine->getErrorCode();
-
- if ($code !== Crypt_GPG::ERROR_NONE) {
- throw new Crypt_GPG_Exception(
- 'Unknown error exporting public key. Please use the ' .
- '\'debug\' option when creating the Crypt_GPG object, and ' .
- 'file a bug report at ' . self::BUG_URI, $code);
- }
-
- return $keyData;
- }
-
- // }}}
- // {{{ deletePublicKey()
-
- /**
- * Deletes a public key from the keyring
- *
- * If more than one key fingerprint is available for the specified
- * <kbd>$keyId</kbd> (for example, if you use a non-unique uid) only the
- * first public key is deleted.
- *
- * The private key must be deleted first or an exception will be thrown.
- * See {@link Crypt_GPG::deletePrivateKey()}.
- *
- * @param string $keyId either the full uid of the public key, the email
- * part of the uid of the public key or the key id of
- * the public key. For example,
- * "Test User (example) <test@example.com>",
- * "test@example.com" or a hexadecimal string.
- *
- * @return void
- *
- * @throws Crypt_GPG_KeyNotFoundException if a public key with the given
- * <kbd>$keyId</kbd> is not found.
- *
- * @throws Crypt_GPG_DeletePrivateKeyException if the specified public key
- * has an associated private key on the keyring. The private key
- * must be deleted first.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function deletePublicKey($keyId)
- {
- $fingerprint = $this->getFingerprint($keyId);
-
- if ($fingerprint === null) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'Public key not found: ' . $keyId,
- Crypt_GPG::ERROR_KEY_NOT_FOUND, $keyId);
- }
-
- $operation = '--delete-key ' . escapeshellarg($fingerprint);
- $arguments = array(
- '--batch',
- '--yes'
- );
-
- $this->engine->reset();
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- break;
- case Crypt_GPG::ERROR_DELETE_PRIVATE_KEY:
- throw new Crypt_GPG_DeletePrivateKeyException(
- 'Private key must be deleted before public key can be ' .
- 'deleted.', $code, $keyId);
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error deleting public key. Please use the ' .
- '\'debug\' option when creating the Crypt_GPG object, and ' .
- 'file a bug report at ' . self::BUG_URI, $code);
- }
- }
-
- // }}}
- // {{{ deletePrivateKey()
-
- /**
- * Deletes a private key from the keyring
- *
- * If more than one key fingerprint is available for the specified
- * <kbd>$keyId</kbd> (for example, if you use a non-unique uid) only the
- * first private key is deleted.
- *
- * Calls GPG with the <kbd>--delete-secret-key</kbd> command.
- *
- * @param string $keyId either the full uid of the private key, the email
- * part of the uid of the private key or the key id of
- * the private key. For example,
- * "Test User (example) <test@example.com>",
- * "test@example.com" or a hexadecimal string.
- *
- * @return void
- *
- * @throws Crypt_GPG_KeyNotFoundException if a private key with the given
- * <kbd>$keyId</kbd> is not found.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function deletePrivateKey($keyId)
- {
- $fingerprint = $this->getFingerprint($keyId);
-
- if ($fingerprint === null) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'Private key not found: ' . $keyId,
- Crypt_GPG::ERROR_KEY_NOT_FOUND, $keyId);
- }
-
- $operation = '--delete-secret-key ' . escapeshellarg($fingerprint);
- $arguments = array(
- '--batch',
- '--yes'
- );
-
- $this->engine->reset();
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- break;
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- throw new Crypt_GPG_KeyNotFoundException(
- 'Private key not found: ' . $keyId,
- $code, $keyId);
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error deleting private key. Please use the ' .
- '\'debug\' option when creating the Crypt_GPG object, and ' .
- 'file a bug report at ' . self::BUG_URI, $code);
- }
- }
-
- // }}}
- // {{{ getKeys()
-
- /**
- * Gets the available keys in the keyring
- *
- * Calls GPG with the <kbd>--list-keys</kbd> command and grabs keys. See
- * the first section of <b>doc/DETAILS</b> in the
- * {@link http://www.gnupg.org/download/ GPG package} for a detailed
- * description of how the GPG command output is parsed.
- *
- * @param string $keyId optional. Only keys with that match the specified
- * pattern are returned. The pattern may be part of
- * a user id, a key id or a key fingerprint. If not
- * specified, all keys are returned.
- *
- * @return array an array of {@link Crypt_GPG_Key} objects. If no keys
- * match the specified <kbd>$keyId</kbd> an empty array is
- * returned.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @see Crypt_GPG_Key
- */
- public function getKeys($keyId = '')
- {
- // get private key fingerprints
- if ($keyId == '') {
- $operation = '--list-secret-keys';
- } else {
- $operation = '--list-secret-keys ' . escapeshellarg($keyId);
- }
-
- // According to The file 'doc/DETAILS' in the GnuPG distribution, using
- // double '--with-fingerprint' also prints the fingerprint for subkeys.
- $arguments = array(
- '--with-colons',
- '--with-fingerprint',
- '--with-fingerprint',
- '--fixed-list-mode'
- );
-
- $output = '';
-
- $this->engine->reset();
- $this->engine->setOutput($output);
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- // ignore not found key errors
- break;
- case Crypt_GPG::ERROR_FILE_PERMISSIONS:
- $filename = $this->engine->getErrorFilename();
- if ($filename) {
- throw new Crypt_GPG_FileException(sprintf(
- 'Error reading GnuPG data file \'%s\'. Check to make ' .
- 'sure it is readable by the current user.', $filename),
- $code, $filename);
- }
- throw new Crypt_GPG_FileException(
- 'Error reading GnuPG data file. Check to make GnuPG data ' .
- 'files are readable by the current user.', $code);
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error getting keys. Please use the \'debug\' option ' .
- 'when creating the Crypt_GPG object, and file a bug report ' .
- 'at ' . self::BUG_URI, $code);
- }
-
- $privateKeyFingerprints = array();
-
- $lines = explode(PHP_EOL, $output);
- foreach ($lines as $line) {
- $lineExp = explode(':', $line);
- if ($lineExp[0] == 'fpr') {
- $privateKeyFingerprints[] = $lineExp[9];
- }
- }
-
- // get public keys
- if ($keyId == '') {
- $operation = '--list-public-keys';
- } else {
- $operation = '--list-public-keys ' . escapeshellarg($keyId);
- }
-
- $output = '';
-
- $this->engine->reset();
- $this->engine->setOutput($output);
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- // ignore not found key errors
- break;
- case Crypt_GPG::ERROR_FILE_PERMISSIONS:
- $filename = $this->engine->getErrorFilename();
- if ($filename) {
- throw new Crypt_GPG_FileException(sprintf(
- 'Error reading GnuPG data file \'%s\'. Check to make ' .
- 'sure it is readable by the current user.', $filename),
- $code, $filename);
- }
- throw new Crypt_GPG_FileException(
- 'Error reading GnuPG data file. Check to make GnuPG data ' .
- 'files are readable by the current user.', $code);
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error getting keys. Please use the \'debug\' option ' .
- 'when creating the Crypt_GPG object, and file a bug report ' .
- 'at ' . self::BUG_URI, $code);
- }
-
- $keys = array();
-
- $key = null; // current key
- $subKey = null; // current sub-key
-
- $lines = explode(PHP_EOL, $output);
- foreach ($lines as $line) {
- $lineExp = explode(':', $line);
-
- if ($lineExp[0] == 'pub') {
-
- // new primary key means last key should be added to the array
- if ($key !== null) {
- $keys[] = $key;
- }
-
- $key = new Crypt_GPG_Key();
-
- $subKey = Crypt_GPG_SubKey::parse($line);
- $key->addSubKey($subKey);
-
- } elseif ($lineExp[0] == 'sub') {
-
- $subKey = Crypt_GPG_SubKey::parse($line);
- $key->addSubKey($subKey);
-
- } elseif ($lineExp[0] == 'fpr') {
-
- $fingerprint = $lineExp[9];
-
- // set current sub-key fingerprint
- $subKey->setFingerprint($fingerprint);
-
- // if private key exists, set has private to true
- if (in_array($fingerprint, $privateKeyFingerprints)) {
- $subKey->setHasPrivate(true);
- }
-
- } elseif ($lineExp[0] == 'uid') {
-
- $string = stripcslashes($lineExp[9]); // as per documentation
- $userId = new Crypt_GPG_UserId($string);
-
- if ($lineExp[1] == 'r') {
- $userId->setRevoked(true);
- }
-
- $key->addUserId($userId);
-
- }
- }
-
- // add last key
- if ($key !== null) {
- $keys[] = $key;
- }
-
- return $keys;
- }
-
- // }}}
- // {{{ getFingerprint()
-
- /**
- * Gets a key fingerprint from the keyring
- *
- * If more than one key fingerprint is available (for example, if you use
- * a non-unique user id) only the first key fingerprint is returned.
- *
- * Calls the GPG <kbd>--list-keys</kbd> command with the
- * <kbd>--with-fingerprint</kbd> option to retrieve a public key
- * fingerprint.
- *
- * @param string $keyId either the full user id of the key, the email
- * part of the user id of the key, or the key id of
- * the key. For example,
- * "Test User (example) <test@example.com>",
- * "test@example.com" or a hexadecimal string.
- * @param integer $format optional. How the fingerprint should be formatted.
- * Use {@link Crypt_GPG::FORMAT_X509} for X.509
- * certificate format,
- * {@link Crypt_GPG::FORMAT_CANONICAL} for the format
- * used by GnuPG output and
- * {@link Crypt_GPG::FORMAT_NONE} for no formatting.
- * Defaults to <code>Crypt_GPG::FORMAT_NONE</code>.
- *
- * @return string the fingerprint of the key, or null if no fingerprint
- * is found for the given <kbd>$keyId</kbd>.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function getFingerprint($keyId, $format = Crypt_GPG::FORMAT_NONE)
- {
- $output = '';
- $operation = '--list-keys ' . escapeshellarg($keyId);
- $arguments = array(
- '--with-colons',
- '--with-fingerprint'
- );
-
- $this->engine->reset();
- $this->engine->setOutput($output);
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- // ignore not found key errors
- break;
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error getting key fingerprint. Please use the ' .
- '\'debug\' option when creating the Crypt_GPG object, and ' .
- 'file a bug report at ' . self::BUG_URI, $code);
- }
-
- $fingerprint = null;
-
- $lines = explode(PHP_EOL, $output);
- foreach ($lines as $line) {
- if (substr($line, 0, 3) == 'fpr') {
- $lineExp = explode(':', $line);
- $fingerprint = $lineExp[9];
-
- switch ($format) {
- case Crypt_GPG::FORMAT_CANONICAL:
- $fingerprintExp = str_split($fingerprint, 4);
- $format = '%s %s %s %s %s %s %s %s %s %s';
- $fingerprint = vsprintf($format, $fingerprintExp);
- break;
-
- case Crypt_GPG::FORMAT_X509:
- $fingerprintExp = str_split($fingerprint, 2);
- $fingerprint = implode(':', $fingerprintExp);
- break;
- }
-
- break;
- }
- }
-
- return $fingerprint;
- }
-
- // }}}
- // {{{ encrypt()
-
- /**
- * Encrypts string data
- *
- * Data is ASCII armored by default but may optionally be returned as
- * binary.
- *
- * @param string $data the data to be encrypted.
- * @param boolean $armor optional. If true, ASCII armored data is returned;
- * otherwise, binary data is returned. Defaults to
- * true.
- *
- * @return string the encrypted data.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no encryption key is specified.
- * See {@link Crypt_GPG::addEncryptKey()}.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @sensitive $data
- */
- public function encrypt($data, $armor = true)
- {
- return $this->_encrypt($data, false, null, $armor);
- }
-
- // }}}
- // {{{ encryptFile()
-
- /**
- * Encrypts a file
- *
- * Encrypted data is ASCII armored by default but may optionally be saved
- * as binary.
- *
- * @param string $filename the filename of the file to encrypt.
- * @param string $encryptedFile optional. The filename of the file in
- * which to store the encrypted data. If null
- * or unspecified, the encrypted data is
- * returned as a string.
- * @param boolean $armor optional. If true, ASCII armored data is
- * returned; otherwise, binary data is
- * returned. Defaults to true.
- *
- * @return void|string if the <kbd>$encryptedFile</kbd> parameter is null,
- * a string containing the encrypted data is returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no encryption key is specified.
- * See {@link Crypt_GPG::addEncryptKey()}.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function encryptFile($filename, $encryptedFile = null, $armor = true)
- {
- return $this->_encrypt($filename, true, $encryptedFile, $armor);
- }
-
- // }}}
- // {{{ encryptAndSign()
-
- /**
- * Encrypts and signs data
- *
- * Data is encrypted and signed in a single pass.
- *
- * NOTE: Until GnuPG version 1.4.10, it was not possible to verify
- * encrypted-signed data without decrypting it at the same time. If you try
- * to use {@link Crypt_GPG::verify()} method on encrypted-signed data with
- * earlier GnuPG versions, you will get an error. Please use
- * {@link Crypt_GPG::decryptAndVerify()} to verify encrypted-signed data.
- *
- * @param string $data the data to be encrypted and signed.
- * @param boolean $armor optional. If true, ASCII armored data is returned;
- * otherwise, binary data is returned. Defaults to
- * true.
- *
- * @return string the encrypted signed data.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no encryption key is specified
- * or if no signing key is specified. See
- * {@link Crypt_GPG::addEncryptKey()} and
- * {@link Crypt_GPG::addSignKey()}.
- *
- * @throws Crypt_GPG_BadPassphraseException if a specified passphrase is
- * incorrect or if a required passphrase is not specified.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @see Crypt_GPG::decryptAndVerify()
- */
- public function encryptAndSign($data, $armor = true)
- {
- return $this->_encryptAndSign($data, false, null, $armor);
- }
-
- // }}}
- // {{{ encryptAndSignFile()
-
- /**
- * Encrypts and signs a file
- *
- * The file is encrypted and signed in a single pass.
- *
- * NOTE: Until GnuPG version 1.4.10, it was not possible to verify
- * encrypted-signed files without decrypting them at the same time. If you
- * try to use {@link Crypt_GPG::verify()} method on encrypted-signed files
- * with earlier GnuPG versions, you will get an error. Please use
- * {@link Crypt_GPG::decryptAndVerifyFile()} to verify encrypted-signed
- * files.
- *
- * @param string $filename the name of the file containing the data to
- * be encrypted and signed.
- * @param string $signedFile optional. The name of the file in which the
- * encrypted, signed data should be stored. If
- * null or unspecified, the encrypted, signed
- * data is returned as a string.
- * @param boolean $armor optional. If true, ASCII armored data is
- * returned; otherwise, binary data is returned.
- * Defaults to true.
- *
- * @return void|string if the <kbd>$signedFile</kbd> parameter is null, a
- * string containing the encrypted, signed data is
- * returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no encryption key is specified
- * or if no signing key is specified. See
- * {@link Crypt_GPG::addEncryptKey()} and
- * {@link Crypt_GPG::addSignKey()}.
- *
- * @throws Crypt_GPG_BadPassphraseException if a specified passphrase is
- * incorrect or if a required passphrase is not specified.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @see Crypt_GPG::decryptAndVerifyFile()
- */
- public function encryptAndSignFile($filename, $signedFile = null,
- $armor = true
- ) {
- return $this->_encryptAndSign($filename, true, $signedFile, $armor);
- }
-
- // }}}
- // {{{ decrypt()
-
- /**
- * Decrypts string data
- *
- * This method assumes the required private key is available in the keyring
- * and throws an exception if the private key is not available. To add a
- * private key to the keyring, use the {@link Crypt_GPG::importKey()} or
- * {@link Crypt_GPG::importKeyFile()} methods.
- *
- * @param string $encryptedData the data to be decrypted.
- *
- * @return string the decrypted data.
- *
- * @throws Crypt_GPG_KeyNotFoundException if the private key needed to
- * decrypt the data is not in the user's keyring.
- *
- * @throws Crypt_GPG_NoDataException if specified data does not contain
- * GPG encrypted data.
- *
- * @throws Crypt_GPG_BadPassphraseException if a required passphrase is
- * incorrect or if a required passphrase is not specified. See
- * {@link Crypt_GPG::addDecryptKey()}.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function decrypt($encryptedData)
- {
- return $this->_decrypt($encryptedData, false, null);
- }
-
- // }}}
- // {{{ decryptFile()
-
- /**
- * Decrypts a file
- *
- * This method assumes the required private key is available in the keyring
- * and throws an exception if the private key is not available. To add a
- * private key to the keyring, use the {@link Crypt_GPG::importKey()} or
- * {@link Crypt_GPG::importKeyFile()} methods.
- *
- * @param string $encryptedFile the name of the encrypted file data to
- * decrypt.
- * @param string $decryptedFile optional. The name of the file to which the
- * decrypted data should be written. If null
- * or unspecified, the decrypted data is
- * returned as a string.
- *
- * @return void|string if the <kbd>$decryptedFile</kbd> parameter is null,
- * a string containing the decrypted data is returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if the private key needed to
- * decrypt the data is not in the user's keyring.
- *
- * @throws Crypt_GPG_NoDataException if specified data does not contain
- * GPG encrypted data.
- *
- * @throws Crypt_GPG_BadPassphraseException if a required passphrase is
- * incorrect or if a required passphrase is not specified. See
- * {@link Crypt_GPG::addDecryptKey()}.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function decryptFile($encryptedFile, $decryptedFile = null)
- {
- return $this->_decrypt($encryptedFile, true, $decryptedFile);
- }
-
- // }}}
- // {{{ decryptAndVerify()
-
- /**
- * Decrypts and verifies string data
- *
- * This method assumes the required private key is available in the keyring
- * and throws an exception if the private key is not available. To add a
- * private key to the keyring, use the {@link Crypt_GPG::importKey()} or
- * {@link Crypt_GPG::importKeyFile()} methods.
- *
- * @param string $encryptedData the encrypted, signed data to be decrypted
- * and verified.
- *
- * @return array two element array. The array has an element 'data'
- * containing the decrypted data and an element
- * 'signatures' containing an array of
- * {@link Crypt_GPG_Signature} objects for the signed data.
- *
- * @throws Crypt_GPG_KeyNotFoundException if the private key needed to
- * decrypt the data is not in the user's keyring.
- *
- * @throws Crypt_GPG_NoDataException if specified data does not contain
- * GPG encrypted data.
- *
- * @throws Crypt_GPG_BadPassphraseException if a required passphrase is
- * incorrect or if a required passphrase is not specified. See
- * {@link Crypt_GPG::addDecryptKey()}.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function decryptAndVerify($encryptedData)
- {
- return $this->_decryptAndVerify($encryptedData, false, null);
- }
-
- // }}}
- // {{{ decryptAndVerifyFile()
-
- /**
- * Decrypts and verifies a signed, encrypted file
- *
- * This method assumes the required private key is available in the keyring
- * and throws an exception if the private key is not available. To add a
- * private key to the keyring, use the {@link Crypt_GPG::importKey()} or
- * {@link Crypt_GPG::importKeyFile()} methods.
- *
- * @param string $encryptedFile the name of the signed, encrypted file to
- * to decrypt and verify.
- * @param string $decryptedFile optional. The name of the file to which the
- * decrypted data should be written. If null
- * or unspecified, the decrypted data is
- * returned in the results array.
- *
- * @return array two element array. The array has an element 'data'
- * containing the decrypted data and an element
- * 'signatures' containing an array of
- * {@link Crypt_GPG_Signature} objects for the signed data.
- * If the decrypted data is written to a file, the 'data'
- * element is null.
- *
- * @throws Crypt_GPG_KeyNotFoundException if the private key needed to
- * decrypt the data is not in the user's keyring.
- *
- * @throws Crypt_GPG_NoDataException if specified data does not contain
- * GPG encrypted data.
- *
- * @throws Crypt_GPG_BadPassphraseException if a required passphrase is
- * incorrect or if a required passphrase is not specified. See
- * {@link Crypt_GPG::addDecryptKey()}.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function decryptAndVerifyFile($encryptedFile, $decryptedFile = null)
- {
- return $this->_decryptAndVerify($encryptedFile, true, $decryptedFile);
- }
-
- // }}}
- // {{{ sign()
-
- /**
- * Signs data
- *
- * Data may be signed using any one of the three available signing modes:
- * - {@link Crypt_GPG::SIGN_MODE_NORMAL}
- * - {@link Crypt_GPG::SIGN_MODE_CLEAR}
- * - {@link Crypt_GPG::SIGN_MODE_DETACHED}
- *
- * @param string $data the data to be signed.
- * @param boolean $mode optional. The data signing mode to use. Should
- * be one of {@link Crypt_GPG::SIGN_MODE_NORMAL},
- * {@link Crypt_GPG::SIGN_MODE_CLEAR} or
- * {@link Crypt_GPG::SIGN_MODE_DETACHED}. If not
- * specified, defaults to
- * <kbd>Crypt_GPG::SIGN_MODE_NORMAL</kbd>.
- * @param boolean $armor optional. If true, ASCII armored data is
- * returned; otherwise, binary data is returned.
- * Defaults to true. This has no effect if the
- * mode <kbd>Crypt_GPG::SIGN_MODE_CLEAR</kbd> is
- * used.
- * @param boolean $textmode optional. If true, line-breaks in signed data
- * are normalized. Use this option when signing
- * e-mail, or for greater compatibility between
- * systems with different line-break formats.
- * Defaults to false. This has no effect if the
- * mode <kbd>Crypt_GPG::SIGN_MODE_CLEAR</kbd> is
- * used as clear-signing always uses textmode.
- *
- * @return string the signed data, or the signature data if a detached
- * signature is requested.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no signing key is specified.
- * See {@link Crypt_GPG::addSignKey()}.
- *
- * @throws Crypt_GPG_BadPassphraseException if a specified passphrase is
- * incorrect or if a required passphrase is not specified.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function sign($data, $mode = Crypt_GPG::SIGN_MODE_NORMAL,
- $armor = true, $textmode = false
- ) {
- return $this->_sign($data, false, null, $mode, $armor, $textmode);
- }
-
- // }}}
- // {{{ signFile()
-
- /**
- * Signs a file
- *
- * The file may be signed using any one of the three available signing
- * modes:
- * - {@link Crypt_GPG::SIGN_MODE_NORMAL}
- * - {@link Crypt_GPG::SIGN_MODE_CLEAR}
- * - {@link Crypt_GPG::SIGN_MODE_DETACHED}
- *
- * @param string $filename the name of the file containing the data to
- * be signed.
- * @param string $signedFile optional. The name of the file in which the
- * signed data should be stored. If null or
- * unspecified, the signed data is returned as a
- * string.
- * @param boolean $mode optional. The data signing mode to use. Should
- * be one of {@link Crypt_GPG::SIGN_MODE_NORMAL},
- * {@link Crypt_GPG::SIGN_MODE_CLEAR} or
- * {@link Crypt_GPG::SIGN_MODE_DETACHED}. If not
- * specified, defaults to
- * <kbd>Crypt_GPG::SIGN_MODE_NORMAL</kbd>.
- * @param boolean $armor optional. If true, ASCII armored data is
- * returned; otherwise, binary data is returned.
- * Defaults to true. This has no effect if the
- * mode <kbd>Crypt_GPG::SIGN_MODE_CLEAR</kbd> is
- * used.
- * @param boolean $textmode optional. If true, line-breaks in signed data
- * are normalized. Use this option when signing
- * e-mail, or for greater compatibility between
- * systems with different line-break formats.
- * Defaults to false. This has no effect if the
- * mode <kbd>Crypt_GPG::SIGN_MODE_CLEAR</kbd> is
- * used as clear-signing always uses textmode.
- *
- * @return void|string if the <kbd>$signedFile</kbd> parameter is null, a
- * string containing the signed data (or the signature
- * data if a detached signature is requested) is
- * returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no signing key is specified.
- * See {@link Crypt_GPG::addSignKey()}.
- *
- * @throws Crypt_GPG_BadPassphraseException if a specified passphrase is
- * incorrect or if a required passphrase is not specified.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- public function signFile($filename, $signedFile = null,
- $mode = Crypt_GPG::SIGN_MODE_NORMAL, $armor = true, $textmode = false
- ) {
- return $this->_sign(
- $filename,
- true,
- $signedFile,
- $mode,
- $armor,
- $textmode
- );
- }
-
- // }}}
- // {{{ verify()
-
- /**
- * Verifies signed data
- *
- * The {@link Crypt_GPG::decrypt()} method may be used to get the original
- * message if the signed data is not clearsigned and does not use a
- * detached signature.
- *
- * @param string $signedData the signed data to be verified.
- * @param string $signature optional. If verifying data signed using a
- * detached signature, this must be the detached
- * signature data. The data that was signed is
- * specified in <kbd>$signedData</kbd>.
- *
- * @return array an array of {@link Crypt_GPG_Signature} objects for the
- * signed data. For each signature that is valid, the
- * {@link Crypt_GPG_Signature::isValid()} will return true.
- *
- * @throws Crypt_GPG_NoDataException if the provided data is not signed
- * data.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @see Crypt_GPG_Signature
- */
- public function verify($signedData, $signature = '')
- {
- return $this->_verify($signedData, false, $signature);
- }
-
- // }}}
- // {{{ verifyFile()
-
- /**
- * Verifies a signed file
- *
- * The {@link Crypt_GPG::decryptFile()} method may be used to get the
- * original message if the signed data is not clearsigned and does not use
- * a detached signature.
- *
- * @param string $filename the signed file to be verified.
- * @param string $signature optional. If verifying a file signed using a
- * detached signature, this must be the detached
- * signature data. The file that was signed is
- * specified in <kbd>$filename</kbd>.
- *
- * @return array an array of {@link Crypt_GPG_Signature} objects for the
- * signed data. For each signature that is valid, the
- * {@link Crypt_GPG_Signature::isValid()} will return true.
- *
- * @throws Crypt_GPG_NoDataException if the provided data is not signed
- * data.
- *
- * @throws Crypt_GPG_FileException if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @see Crypt_GPG_Signature
- */
- public function verifyFile($filename, $signature = '')
- {
- return $this->_verify($filename, true, $signature);
- }
-
- // }}}
- // {{{ addDecryptKey()
-
- /**
- * Adds a key to use for decryption
- *
- * @param mixed $key the key to use. This may be a key identifier,
- * user id, fingerprint, {@link Crypt_GPG_Key} or
- * {@link Crypt_GPG_SubKey}. The key must be able
- * to encrypt.
- * @param string $passphrase optional. The passphrase of the key required
- * for decryption.
- *
- * @return void
- *
- * @see Crypt_GPG::decrypt()
- * @see Crypt_GPG::decryptFile()
- * @see Crypt_GPG::clearDecryptKeys()
- * @see Crypt_GPG::_addKey()
- * @see Crypt_GPG_DecryptStatusHandler
- *
- * @sensitive $passphrase
- */
- public function addDecryptKey($key, $passphrase = null)
- {
- $this->_addKey($this->decryptKeys, true, false, $key, $passphrase);
- }
-
- // }}}
- // {{{ addEncryptKey()
-
- /**
- * Adds a key to use for encryption
- *
- * @param mixed $key the key to use. This may be a key identifier, user id
- * user id, fingerprint, {@link Crypt_GPG_Key} or
- * {@link Crypt_GPG_SubKey}. The key must be able to
- * encrypt.
- *
- * @return void
- *
- * @see Crypt_GPG::encrypt()
- * @see Crypt_GPG::encryptFile()
- * @see Crypt_GPG::clearEncryptKeys()
- * @see Crypt_GPG::_addKey()
- */
- public function addEncryptKey($key)
- {
- $this->_addKey($this->encryptKeys, true, false, $key);
- }
-
- // }}}
- // {{{ addSignKey()
-
- /**
- * Adds a key to use for signing
- *
- * @param mixed $key the key to use. This may be a key identifier,
- * user id, fingerprint, {@link Crypt_GPG_Key} or
- * {@link Crypt_GPG_SubKey}. The key must be able
- * to sign.
- * @param string $passphrase optional. The passphrase of the key required
- * for signing.
- *
- * @return void
- *
- * @see Crypt_GPG::sign()
- * @see Crypt_GPG::signFile()
- * @see Crypt_GPG::clearSignKeys()
- * @see Crypt_GPG::handleSignStatus()
- * @see Crypt_GPG::_addKey()
- *
- * @sensitive $passphrase
- */
- public function addSignKey($key, $passphrase = null)
- {
- $this->_addKey($this->signKeys, false, true, $key, $passphrase);
- }
-
- // }}}
- // {{{ clearDecryptKeys()
-
- /**
- * Clears all decryption keys
- *
- * @return void
- *
- * @see Crypt_GPG::decrypt()
- * @see Crypt_GPG::addDecryptKey()
- */
- public function clearDecryptKeys()
- {
- $this->decryptKeys = array();
- }
-
- // }}}
- // {{{ clearEncryptKeys()
-
- /**
- * Clears all encryption keys
- *
- * @return void
- *
- * @see Crypt_GPG::encrypt()
- * @see Crypt_GPG::addEncryptKey()
- */
- public function clearEncryptKeys()
- {
- $this->encryptKeys = array();
- }
-
- // }}}
- // {{{ clearSignKeys()
-
- /**
- * Clears all signing keys
- *
- * @return void
- *
- * @see Crypt_GPG::sign()
- * @see Crypt_GPG::addSignKey()
- */
- public function clearSignKeys()
- {
- $this->signKeys = array();
- }
-
- // }}}
- // {{{ handleSignStatus()
-
- /**
- * Handles the status output from GPG for the sign operation
- *
- * This method is responsible for sending the passphrase commands when
- * required by the {@link Crypt_GPG::sign()} method. See <b>doc/DETAILS</b>
- * in the {@link http://www.gnupg.org/download/ GPG distribution} for
- * detailed information on GPG's status output.
- *
- * @param string $line the status line to handle.
- *
- * @return void
- *
- * @see Crypt_GPG::sign()
- */
- public function handleSignStatus($line)
- {
- $tokens = explode(' ', $line);
- switch ($tokens[0]) {
- case 'NEED_PASSPHRASE':
- $subKeyId = $tokens[1];
- if (array_key_exists($subKeyId, $this->signKeys)) {
- $passphrase = $this->signKeys[$subKeyId]['passphrase'];
- $this->engine->sendCommand($passphrase);
- } else {
- $this->engine->sendCommand('');
- }
- break;
- }
- }
-
- // }}}
- // {{{ handleImportKeyStatus()
-
- /**
- * Handles the status output from GPG for the import operation
- *
- * This method is responsible for building the result array that is
- * returned from the {@link Crypt_GPG::importKey()} method. See
- * <b>doc/DETAILS</b> in the
- * {@link http://www.gnupg.org/download/ GPG distribution} for detailed
- * information on GPG's status output.
- *
- * @param string $line the status line to handle.
- * @param array &$result the current result array being processed.
- *
- * @return void
- *
- * @see Crypt_GPG::importKey()
- * @see Crypt_GPG::importKeyFile()
- * @see Crypt_GPG_Engine::addStatusHandler()
- */
- public function handleImportKeyStatus($line, array &$result)
- {
- $tokens = explode(' ', $line);
- switch ($tokens[0]) {
- case 'IMPORT_OK':
- $result['fingerprint'] = $tokens[2];
- break;
-
- case 'IMPORT_RES':
- $result['public_imported'] = intval($tokens[3]);
- $result['public_unchanged'] = intval($tokens[5]);
- $result['private_imported'] = intval($tokens[11]);
- $result['private_unchanged'] = intval($tokens[12]);
- break;
- }
- }
-
- // }}}
- // {{{ setEngine()
-
- /**
- * Sets the I/O engine to use for GnuPG operations
- *
- * Normally this method does not need to be used. It provides a means for
- * dependency injection.
- *
- * @param Crypt_GPG_Engine $engine the engine to use.
- *
- * @return void
- */
- public function setEngine(Crypt_GPG_Engine $engine)
- {
- $this->engine = $engine;
- }
-
- // }}}
- // {{{ _addKey()
-
- /**
- * Adds a key to one of the internal key arrays
- *
- * This handles resolving full key objects from the provided
- * <kbd>$key</kbd> value.
- *
- * @param array &$array the array to which the key should be added.
- * @param boolean $encrypt whether or not the key must be able to
- * encrypt.
- * @param boolean $sign whether or not the key must be able to sign.
- * @param mixed $key the key to add. This may be a key identifier,
- * user id, fingerprint, {@link Crypt_GPG_Key} or
- * {@link Crypt_GPG_SubKey}.
- * @param string $passphrase optional. The passphrase associated with the
- * key.
- *
- * @return void
- *
- * @sensitive $passphrase
- */
- private function _addKey(array &$array, $encrypt, $sign, $key,
- $passphrase = null
- ) {
- $subKeys = array();
-
- if (is_scalar($key)) {
- $keys = $this->getKeys($key);
- if (count($keys) == 0) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'Key "' . $key . '" not found.', 0, $key);
- }
- $key = $keys[0];
- }
-
- if ($key instanceof Crypt_GPG_Key) {
- if ($encrypt && !$key->canEncrypt()) {
- throw new InvalidArgumentException(
- 'Key "' . $key . '" cannot encrypt.');
- }
-
- if ($sign && !$key->canSign()) {
- throw new InvalidArgumentException(
- 'Key "' . $key . '" cannot sign.');
- }
-
- foreach ($key->getSubKeys() as $subKey) {
- $canEncrypt = $subKey->canEncrypt();
- $canSign = $subKey->canSign();
- if ( ($encrypt && $sign && $canEncrypt && $canSign)
- || ($encrypt && !$sign && $canEncrypt)
- || (!$encrypt && $sign && $canSign)
- ) {
- // We add all subkeys that meet the requirements because we
- // were not told which subkey is required.
- $subKeys[] = $subKey;
- }
- }
- } elseif ($key instanceof Crypt_GPG_SubKey) {
- $subKeys[] = $key;
- }
-
- if (count($subKeys) === 0) {
- throw new InvalidArgumentException(
- 'Key "' . $key . '" is not in a recognized format.');
- }
-
- foreach ($subKeys as $subKey) {
- if ($encrypt && !$subKey->canEncrypt()) {
- throw new InvalidArgumentException(
- 'Key "' . $key . '" cannot encrypt.');
- }
-
- if ($sign && !$subKey->canSign()) {
- throw new InvalidArgumentException(
- 'Key "' . $key . '" cannot sign.');
- }
-
- $array[$subKey->getId()] = array(
- 'fingerprint' => $subKey->getFingerprint(),
- 'passphrase' => $passphrase
- );
- }
- }
-
- // }}}
- // {{{ _importKey()
-
- /**
- * Imports a public or private key into the keyring
- *
- * @param string $key the key to be imported.
- * @param boolean $isFile whether or not the input is a filename.
- *
- * @return array an associative array containing the following elements:
- * - <kbd>fingerprint</kbd> - the fingerprint of the
- * imported key,
- * - <kbd>public_imported</kbd> - the number of public
- * keys imported,
- * - <kbd>public_unchanged</kbd> - the number of unchanged
- * public keys,
- * - <kbd>private_imported</kbd> - the number of private
- * keys imported,
- * - <kbd>private_unchanged</kbd> - the number of unchanged
- * private keys.
- *
- * @throws Crypt_GPG_NoDataException if the key data is missing or if the
- * data is is not valid key data.
- *
- * @throws Crypt_GPG_FileException if the key file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- private function _importKey($key, $isFile)
- {
- $result = array();
-
- if ($isFile) {
- $input = @fopen($key, 'rb');
- if ($input === false) {
- throw new Crypt_GPG_FileException('Could not open key file "' .
- $key . '" for importing.', 0, $key);
- }
- } else {
- $input = strval($key);
- if ($input == '') {
- throw new Crypt_GPG_NoDataException(
- 'No valid GPG key data found.', Crypt_GPG::ERROR_NO_DATA);
- }
- }
-
- $arguments = array();
- $version = $this->engine->getVersion();
-
- if ( version_compare($version, '1.0.5', 'ge')
- && version_compare($version, '1.0.7', 'lt')
- ) {
- $arguments[] = '--allow-secret-key-import';
- }
-
- $this->engine->reset();
- $this->engine->addStatusHandler(
- array($this, 'handleImportKeyStatus'),
- array(&$result)
- );
-
- $this->engine->setOperation('--import', $arguments);
- $this->engine->setInput($input);
- $this->engine->run();
-
- if ($isFile) {
- fclose($input);
- }
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_DUPLICATE_KEY:
- case Crypt_GPG::ERROR_NONE:
- // ignore duplicate key import errors
- break;
- case Crypt_GPG::ERROR_NO_DATA:
- throw new Crypt_GPG_NoDataException(
- 'No valid GPG key data found.', $code);
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error importing GPG key. Please use the \'debug\' ' .
- 'option when creating the Crypt_GPG object, and file a bug ' .
- 'report at ' . self::BUG_URI, $code);
- }
-
- return $result;
- }
-
- // }}}
- // {{{ _encrypt()
-
- /**
- * Encrypts data
- *
- * @param string $data the data to encrypt.
- * @param boolean $isFile whether or not the data is a filename.
- * @param string $outputFile the filename of the file in which to store
- * the encrypted data. If null, the encrypted
- * data is returned as a string.
- * @param boolean $armor if true, ASCII armored data is returned;
- * otherwise, binary data is returned.
- *
- * @return void|string if the <kbd>$outputFile</kbd> parameter is null, a
- * string containing the encrypted data is returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no encryption key is specified.
- * See {@link Crypt_GPG::addEncryptKey()}.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- private function _encrypt($data, $isFile, $outputFile, $armor)
- {
- if (count($this->encryptKeys) === 0) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'No encryption keys specified.');
- }
-
- if ($isFile) {
- $input = @fopen($data, 'rb');
- if ($input === false) {
- throw new Crypt_GPG_FileException('Could not open input file "' .
- $data . '" for encryption.', 0, $data);
- }
- } else {
- $input = strval($data);
- }
-
- if ($outputFile === null) {
- $output = '';
- } else {
- $output = @fopen($outputFile, 'wb');
- if ($output === false) {
- if ($isFile) {
- fclose($input);
- }
- throw new Crypt_GPG_FileException('Could not open output ' .
- 'file "' . $outputFile . '" for storing encrypted data.',
- 0, $outputFile);
- }
- }
-
- $arguments = ($armor) ? array('--armor') : array();
- foreach ($this->encryptKeys as $key) {
- $arguments[] = '--recipient ' . escapeshellarg($key['fingerprint']);
- }
-
- $this->engine->reset();
- $this->engine->setInput($input);
- $this->engine->setOutput($output);
- $this->engine->setOperation('--encrypt', $arguments);
- $this->engine->run();
-
- if ($isFile) {
- fclose($input);
- }
-
- if ($outputFile !== null) {
- fclose($output);
- }
-
- $code = $this->engine->getErrorCode();
-
- if ($code !== Crypt_GPG::ERROR_NONE) {
- throw new Crypt_GPG_Exception(
- 'Unknown error encrypting data. Please use the \'debug\' ' .
- 'option when creating the Crypt_GPG object, and file a bug ' .
- 'report at ' . self::BUG_URI, $code);
- }
-
- if ($outputFile === null) {
- return $output;
- }
- }
-
- // }}}
- // {{{ _decrypt()
-
- /**
- * Decrypts data
- *
- * @param string $data the data to be decrypted.
- * @param boolean $isFile whether or not the data is a filename.
- * @param string $outputFile the name of the file to which the decrypted
- * data should be written. If null, the decrypted
- * data is returned as a string.
- *
- * @return void|string if the <kbd>$outputFile</kbd> parameter is null, a
- * string containing the decrypted data is returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if the private key needed to
- * decrypt the data is not in the user's keyring.
- *
- * @throws Crypt_GPG_NoDataException if specified data does not contain
- * GPG encrypted data.
- *
- * @throws Crypt_GPG_BadPassphraseException if a required passphrase is
- * incorrect or if a required passphrase is not specified. See
- * {@link Crypt_GPG::addDecryptKey()}.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- private function _decrypt($data, $isFile, $outputFile)
- {
- if ($isFile) {
- $input = @fopen($data, 'rb');
- if ($input === false) {
- throw new Crypt_GPG_FileException('Could not open input file "' .
- $data . '" for decryption.', 0, $data);
- }
- } else {
- $input = strval($data);
- if ($input == '') {
- throw new Crypt_GPG_NoDataException(
- 'Cannot decrypt data. No PGP encrypted data was found in '.
- 'the provided data.', Crypt_GPG::ERROR_NO_DATA);
- }
- }
-
- if ($outputFile === null) {
- $output = '';
- } else {
- $output = @fopen($outputFile, 'wb');
- if ($output === false) {
- if ($isFile) {
- fclose($input);
- }
- throw new Crypt_GPG_FileException('Could not open output ' .
- 'file "' . $outputFile . '" for storing decrypted data.',
- 0, $outputFile);
- }
- }
-
- $handler = new Crypt_GPG_DecryptStatusHandler($this->engine,
- $this->decryptKeys);
-
- $this->engine->reset();
- $this->engine->addStatusHandler(array($handler, 'handle'));
- $this->engine->setOperation('--decrypt');
- $this->engine->setInput($input);
- $this->engine->setOutput($output);
- $this->engine->run();
-
- if ($isFile) {
- fclose($input);
- }
-
- if ($outputFile !== null) {
- fclose($output);
- }
-
- // if there was any problem decrypting the data, the handler will
- // deal with it here.
- $handler->throwException();
-
- if ($outputFile === null) {
- return $output;
- }
- }
-
- // }}}
- // {{{ _sign()
-
- /**
- * Signs data
- *
- * @param string $data the data to be signed.
- * @param boolean $isFile whether or not the data is a filename.
- * @param string $outputFile the name of the file in which the signed data
- * should be stored. If null, the signed data is
- * returned as a string.
- * @param boolean $mode the data signing mode to use. Should be one of
- * {@link Crypt_GPG::SIGN_MODE_NORMAL},
- * {@link Crypt_GPG::SIGN_MODE_CLEAR} or
- * {@link Crypt_GPG::SIGN_MODE_DETACHED}.
- * @param boolean $armor if true, ASCII armored data is returned;
- * otherwise, binary data is returned. This has
- * no effect if the mode
- * <kbd>Crypt_GPG::SIGN_MODE_CLEAR</kbd> is
- * used.
- * @param boolean $textmode if true, line-breaks in signed data be
- * normalized. Use this option when signing
- * e-mail, or for greater compatibility between
- * systems with different line-break formats.
- * Defaults to false. This has no effect if the
- * mode <kbd>Crypt_GPG::SIGN_MODE_CLEAR</kbd> is
- * used as clear-signing always uses textmode.
- *
- * @return void|string if the <kbd>$outputFile</kbd> parameter is null, a
- * string containing the signed data (or the signature
- * data if a detached signature is requested) is
- * returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no signing key is specified.
- * See {@link Crypt_GPG::addSignKey()}.
- *
- * @throws Crypt_GPG_BadPassphraseException if a specified passphrase is
- * incorrect or if a required passphrase is not specified.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- private function _sign($data, $isFile, $outputFile, $mode, $armor,
- $textmode
- ) {
- if (count($this->signKeys) === 0) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'No signing keys specified.');
- }
-
- if ($isFile) {
- $input = @fopen($data, 'rb');
- if ($input === false) {
- throw new Crypt_GPG_FileException('Could not open input ' .
- 'file "' . $data . '" for signing.', 0, $data);
- }
- } else {
- $input = strval($data);
- }
-
- if ($outputFile === null) {
- $output = '';
- } else {
- $output = @fopen($outputFile, 'wb');
- if ($output === false) {
- if ($isFile) {
- fclose($input);
- }
- throw new Crypt_GPG_FileException('Could not open output ' .
- 'file "' . $outputFile . '" for storing signed ' .
- 'data.', 0, $outputFile);
- }
- }
-
- switch ($mode) {
- case Crypt_GPG::SIGN_MODE_DETACHED:
- $operation = '--detach-sign';
- break;
- case Crypt_GPG::SIGN_MODE_CLEAR:
- $operation = '--clearsign';
- break;
- case Crypt_GPG::SIGN_MODE_NORMAL:
- default:
- $operation = '--sign';
- break;
- }
-
- $arguments = array();
-
- if ($armor) {
- $arguments[] = '--armor';
- }
- if ($textmode) {
- $arguments[] = '--textmode';
- }
-
- foreach ($this->signKeys as $key) {
- $arguments[] = '--local-user ' .
- escapeshellarg($key['fingerprint']);
- }
-
- $this->engine->reset();
- $this->engine->addStatusHandler(array($this, 'handleSignStatus'));
- $this->engine->setInput($input);
- $this->engine->setOutput($output);
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- if ($isFile) {
- fclose($input);
- }
-
- if ($outputFile !== null) {
- fclose($output);
- }
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- break;
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- throw new Crypt_GPG_KeyNotFoundException(
- 'Cannot sign data. Private key not found. Import the '.
- 'private key before trying to sign data.', $code,
- $this->engine->getErrorKeyId());
- case Crypt_GPG::ERROR_BAD_PASSPHRASE:
- throw new Crypt_GPG_BadPassphraseException(
- 'Cannot sign data. Incorrect passphrase provided.', $code);
- case Crypt_GPG::ERROR_MISSING_PASSPHRASE:
- throw new Crypt_GPG_BadPassphraseException(
- 'Cannot sign data. No passphrase provided.', $code);
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error signing data. Please use the \'debug\' option ' .
- 'when creating the Crypt_GPG object, and file a bug report ' .
- 'at ' . self::BUG_URI, $code);
- }
-
- if ($outputFile === null) {
- return $output;
- }
- }
-
- // }}}
- // {{{ _encryptAndSign()
-
- /**
- * Encrypts and signs data
- *
- * @param string $data the data to be encrypted and signed.
- * @param boolean $isFile whether or not the data is a filename.
- * @param string $outputFile the name of the file in which the encrypted,
- * signed data should be stored. If null, the
- * encrypted, signed data is returned as a
- * string.
- * @param boolean $armor if true, ASCII armored data is returned;
- * otherwise, binary data is returned.
- *
- * @return void|string if the <kbd>$outputFile</kbd> parameter is null, a
- * string containing the encrypted, signed data is
- * returned.
- *
- * @throws Crypt_GPG_KeyNotFoundException if no encryption key is specified
- * or if no signing key is specified. See
- * {@link Crypt_GPG::addEncryptKey()} and
- * {@link Crypt_GPG::addSignKey()}.
- *
- * @throws Crypt_GPG_BadPassphraseException if a specified passphrase is
- * incorrect or if a required passphrase is not specified.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- */
- private function _encryptAndSign($data, $isFile, $outputFile, $armor)
- {
- if (count($this->signKeys) === 0) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'No signing keys specified.');
- }
-
- if (count($this->encryptKeys) === 0) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'No encryption keys specified.');
- }
-
-
- if ($isFile) {
- $input = @fopen($data, 'rb');
- if ($input === false) {
- throw new Crypt_GPG_FileException('Could not open input ' .
- 'file "' . $data . '" for encrypting and signing.', 0,
- $data);
- }
- } else {
- $input = strval($data);
- }
-
- if ($outputFile === null) {
- $output = '';
- } else {
- $output = @fopen($outputFile, 'wb');
- if ($output === false) {
- if ($isFile) {
- fclose($input);
- }
- throw new Crypt_GPG_FileException('Could not open output ' .
- 'file "' . $outputFile . '" for storing encrypted, ' .
- 'signed data.', 0, $outputFile);
- }
- }
-
- $arguments = ($armor) ? array('--armor') : array();
-
- foreach ($this->signKeys as $key) {
- $arguments[] = '--local-user ' .
- escapeshellarg($key['fingerprint']);
- }
-
- foreach ($this->encryptKeys as $key) {
- $arguments[] = '--recipient ' . escapeshellarg($key['fingerprint']);
- }
-
- $this->engine->reset();
- $this->engine->addStatusHandler(array($this, 'handleSignStatus'));
- $this->engine->setInput($input);
- $this->engine->setOutput($output);
- $this->engine->setOperation('--encrypt --sign', $arguments);
- $this->engine->run();
-
- if ($isFile) {
- fclose($input);
- }
-
- if ($outputFile !== null) {
- fclose($output);
- }
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- break;
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- throw new Crypt_GPG_KeyNotFoundException(
- 'Cannot sign encrypted data. Private key not found. Import '.
- 'the private key before trying to sign the encrypted data.',
- $code, $this->engine->getErrorKeyId());
- case Crypt_GPG::ERROR_BAD_PASSPHRASE:
- throw new Crypt_GPG_BadPassphraseException(
- 'Cannot sign encrypted data. Incorrect passphrase provided.',
- $code);
- case Crypt_GPG::ERROR_MISSING_PASSPHRASE:
- throw new Crypt_GPG_BadPassphraseException(
- 'Cannot sign encrypted data. No passphrase provided.', $code);
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error encrypting and signing data. Please use the ' .
- '\'debug\' option when creating the Crypt_GPG object, and ' .
- 'file a bug report at ' . self::BUG_URI, $code);
- }
-
- if ($outputFile === null) {
- return $output;
- }
- }
-
- // }}}
- // {{{ _verify()
-
- /**
- * Verifies data
- *
- * @param string $data the signed data to be verified.
- * @param boolean $isFile whether or not the data is a filename.
- * @param string $signature if verifying a file signed using a detached
- * signature, this must be the detached signature
- * data. Otherwise, specify ''.
- *
- * @return array an array of {@link Crypt_GPG_Signature} objects for the
- * signed data.
- *
- * @throws Crypt_GPG_NoDataException if the provided data is not signed
- * data.
- *
- * @throws Crypt_GPG_FileException if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @see Crypt_GPG_Signature
- */
- private function _verify($data, $isFile, $signature)
- {
- if ($signature == '') {
- $operation = '--verify';
- $arguments = array();
- } else {
- // Signed data goes in FD_MESSAGE, detached signature data goes in
- // FD_INPUT.
- $operation = '--verify - "-&' . Crypt_GPG_Engine::FD_MESSAGE. '"';
- $arguments = array('--enable-special-filenames');
- }
-
- $handler = new Crypt_GPG_VerifyStatusHandler();
-
- if ($isFile) {
- $input = @fopen($data, 'rb');
- if ($input === false) {
- throw new Crypt_GPG_FileException('Could not open input ' .
- 'file "' . $data . '" for verifying.', 0, $data);
- }
- } else {
- $input = strval($data);
- if ($input == '') {
- throw new Crypt_GPG_NoDataException(
- 'No valid signature data found.', Crypt_GPG::ERROR_NO_DATA);
- }
- }
-
- $this->engine->reset();
- $this->engine->addStatusHandler(array($handler, 'handle'));
-
- if ($signature == '') {
- // signed or clearsigned data
- $this->engine->setInput($input);
- } else {
- // detached signature
- $this->engine->setInput($signature);
- $this->engine->setMessage($input);
- }
-
- $this->engine->setOperation($operation, $arguments);
- $this->engine->run();
-
- if ($isFile) {
- fclose($input);
- }
-
- $code = $this->engine->getErrorCode();
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- case Crypt_GPG::ERROR_BAD_SIGNATURE:
- break;
- case Crypt_GPG::ERROR_NO_DATA:
- throw new Crypt_GPG_NoDataException(
- 'No valid signature data found.', $code);
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- throw new Crypt_GPG_KeyNotFoundException(
- 'Public key required for data verification not in keyring.',
- $code, $this->engine->getErrorKeyId());
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error validating signature details. Please use the ' .
- '\'debug\' option when creating the Crypt_GPG object, and ' .
- 'file a bug report at ' . self::BUG_URI, $code);
- }
-
- return $handler->getSignatures();
- }
-
- // }}}
- // {{{ _decryptAndVerify()
-
- /**
- * Decrypts and verifies encrypted, signed data
- *
- * @param string $data the encrypted signed data to be decrypted and
- * verified.
- * @param boolean $isFile whether or not the data is a filename.
- * @param string $outputFile the name of the file to which the decrypted
- * data should be written. If null, the decrypted
- * data is returned in the results array.
- *
- * @return array two element array. The array has an element 'data'
- * containing the decrypted data and an element
- * 'signatures' containing an array of
- * {@link Crypt_GPG_Signature} objects for the signed data.
- * If the decrypted data is written to a file, the 'data'
- * element is null.
- *
- * @throws Crypt_GPG_KeyNotFoundException if the private key needed to
- * decrypt the data is not in the user's keyring or it the public
- * key needed for verification is not in the user's keyring.
- *
- * @throws Crypt_GPG_NoDataException if specified data does not contain
- * GPG signed, encrypted data.
- *
- * @throws Crypt_GPG_BadPassphraseException if a required passphrase is
- * incorrect or if a required passphrase is not specified. See
- * {@link Crypt_GPG::addDecryptKey()}.
- *
- * @throws Crypt_GPG_FileException if the output file is not writeable or
- * if the input file is not readable.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @see Crypt_GPG_Signature
- */
- private function _decryptAndVerify($data, $isFile, $outputFile)
- {
- if ($isFile) {
- $input = @fopen($data, 'rb');
- if ($input === false) {
- throw new Crypt_GPG_FileException('Could not open input ' .
- 'file "' . $data . '" for decrypting and verifying.', 0,
- $data);
- }
- } else {
- $input = strval($data);
- if ($input == '') {
- throw new Crypt_GPG_NoDataException(
- 'No valid encrypted signed data found.',
- Crypt_GPG::ERROR_NO_DATA);
- }
- }
-
- if ($outputFile === null) {
- $output = '';
- } else {
- $output = @fopen($outputFile, 'wb');
- if ($output === false) {
- if ($isFile) {
- fclose($input);
- }
- throw new Crypt_GPG_FileException('Could not open output ' .
- 'file "' . $outputFile . '" for storing decrypted data.',
- 0, $outputFile);
- }
- }
-
- $verifyHandler = new Crypt_GPG_VerifyStatusHandler();
-
- $decryptHandler = new Crypt_GPG_DecryptStatusHandler($this->engine,
- $this->decryptKeys);
-
- $this->engine->reset();
- $this->engine->addStatusHandler(array($verifyHandler, 'handle'));
- $this->engine->addStatusHandler(array($decryptHandler, 'handle'));
- $this->engine->setInput($input);
- $this->engine->setOutput($output);
- $this->engine->setOperation('--decrypt');
- $this->engine->run();
-
- if ($isFile) {
- fclose($input);
- }
-
- if ($outputFile !== null) {
- fclose($output);
- }
-
- $return = array(
- 'data' => null,
- 'signatures' => $verifyHandler->getSignatures()
- );
-
- // if there was any problem decrypting the data, the handler will
- // deal with it here.
- try {
- $decryptHandler->throwException();
- } catch (Exception $e) {
- if ($e instanceof Crypt_GPG_KeyNotFoundException) {
- throw new Crypt_GPG_KeyNotFoundException(
- 'Public key required for data verification not in ',
- 'the keyring. Either no suitable private decryption key ' .
- 'is in the keyring or the public key required for data ' .
- 'verification is not in the keyring. Import a suitable ' .
- 'key before trying to decrypt and verify this data.',
- self::ERROR_KEY_NOT_FOUND, $this->engine->getErrorKeyId());
- }
-
- if ($e instanceof Crypt_GPG_NoDataException) {
- throw new Crypt_GPG_NoDataException(
- 'Cannot decrypt and verify data. No PGP encrypted data ' .
- 'was found in the provided data.', self::ERROR_NO_DATA);
- }
-
- throw $e;
- }
-
- if ($outputFile === null) {
- $return['data'] = $output;
- }
-
- return $return;
- }
-
- // }}}
-}
-
-// }}}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/DecryptStatusHandler.php b/plugins/enigma/lib/Crypt/GPG/DecryptStatusHandler.php
deleted file mode 100644
index 40e8d50ed..000000000
--- a/plugins/enigma/lib/Crypt/GPG/DecryptStatusHandler.php
+++ /dev/null
@@ -1,336 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Crypt_GPG is a package to use GPG from PHP
- *
- * This file contains an object that handles GPG's status output for the
- * decrypt operation.
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008-2009 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: DecryptStatusHandler.php 302814 2010-08-26 15:43:07Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://www.gnupg.org/
- */
-
-/**
- * Crypt_GPG base class
- */
-require_once 'Crypt/GPG.php';
-
-/**
- * GPG exception classes
- */
-require_once 'Crypt/GPG/Exceptions.php';
-
-
-/**
- * Status line handler for the decrypt operation
- *
- * This class is used internally by Crypt_GPG and does not need be used
- * directly. See the {@link Crypt_GPG} class for end-user API.
- *
- * This class is responsible for sending the passphrase commands when required
- * by the {@link Crypt_GPG::decrypt()} method. See <b>doc/DETAILS</b> in the
- * {@link http://www.gnupg.org/download/ GPG distribution} for detailed
- * information on GPG's status output for the decrypt operation.
- *
- * This class is also responsible for parsing error status and throwing a
- * meaningful exception in the event that decryption fails.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://www.gnupg.org/
- */
-class Crypt_GPG_DecryptStatusHandler
-{
- // {{{ protected properties
-
- /**
- * Keys used to decrypt
- *
- * The array is of the form:
- * <code>
- * array(
- * $key_id => array(
- * 'fingerprint' => $fingerprint,
- * 'passphrase' => $passphrase
- * )
- * );
- * </code>
- *
- * @var array
- */
- protected $keys = array();
-
- /**
- * Engine used to which passphrases are passed
- *
- * @var Crypt_GPG_Engine
- */
- protected $engine = null;
-
- /**
- * The id of the current sub-key used for decryption
- *
- * @var string
- */
- protected $currentSubKey = '';
-
- /**
- * Whether or not decryption succeeded
- *
- * If the message is only signed (compressed) and not encrypted, this is
- * always true. If the message is encrypted, this flag is set to false
- * until we know the decryption succeeded.
- *
- * @var boolean
- */
- protected $decryptionOkay = true;
-
- /**
- * Whether or not there was no data for decryption
- *
- * @var boolean
- */
- protected $noData = false;
-
- /**
- * Keys for which the passhprase is missing
- *
- * This contains primary user ids indexed by sub-key id and is used to
- * create helpful exception messages.
- *
- * @var array
- */
- protected $missingPassphrases = array();
-
- /**
- * Keys for which the passhprase is incorrect
- *
- * This contains primary user ids indexed by sub-key id and is used to
- * create helpful exception messages.
- *
- * @var array
- */
- protected $badPassphrases = array();
-
- /**
- * Keys that can be used to decrypt the data but are missing from the
- * keychain
- *
- * This is an array with both the key and value being the sub-key id of
- * the missing keys.
- *
- * @var array
- */
- protected $missingKeys = array();
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new decryption status handler
- *
- * @param Crypt_GPG_Engine $engine the GPG engine to which passphrases are
- * passed.
- * @param array $keys the decryption keys to use.
- */
- public function __construct(Crypt_GPG_Engine $engine, array $keys)
- {
- $this->engine = $engine;
- $this->keys = $keys;
- }
-
- // }}}
- // {{{ handle()
-
- /**
- * Handles a status line
- *
- * @param string $line the status line to handle.
- *
- * @return void
- */
- public function handle($line)
- {
- $tokens = explode(' ', $line);
- switch ($tokens[0]) {
- case 'ENC_TO':
- // Now we know the message is encrypted. Set flag to check if
- // decryption succeeded.
- $this->decryptionOkay = false;
-
- // this is the new key message
- $this->currentSubKeyId = $tokens[1];
- break;
-
- case 'NEED_PASSPHRASE':
- // send passphrase to the GPG engine
- $subKeyId = $tokens[1];
- if (array_key_exists($subKeyId, $this->keys)) {
- $passphrase = $this->keys[$subKeyId]['passphrase'];
- $this->engine->sendCommand($passphrase);
- } else {
- $this->engine->sendCommand('');
- }
- break;
-
- case 'USERID_HINT':
- // remember the user id for pretty exception messages
- $this->badPassphrases[$tokens[1]]
- = implode(' ', array_splice($tokens, 2));
-
- break;
-
- case 'GOOD_PASSPHRASE':
- // if we got a good passphrase, remove the key from the list of
- // bad passphrases.
- unset($this->badPassphrases[$this->currentSubKeyId]);
- break;
-
- case 'MISSING_PASSPHRASE':
- $this->missingPassphrases[$this->currentSubKeyId]
- = $this->currentSubKeyId;
-
- break;
-
- case 'NO_SECKEY':
- // note: this message is also received if there are multiple
- // recipients and a previous key had a correct passphrase.
- $this->missingKeys[$tokens[1]] = $tokens[1];
- break;
-
- case 'NODATA':
- $this->noData = true;
- break;
-
- case 'DECRYPTION_OKAY':
- // If the message is encrypted, this is the all-clear signal.
- $this->decryptionOkay = true;
- break;
- }
- }
-
- // }}}
- // {{{ throwException()
-
- /**
- * Takes the final status of the decrypt operation and throws an
- * appropriate exception
- *
- * If decryption was successful, no exception is thrown.
- *
- * @return void
- *
- * @throws Crypt_GPG_KeyNotFoundException if the private key needed to
- * decrypt the data is not in the user's keyring.
- *
- * @throws Crypt_GPG_NoDataException if specified data does not contain
- * GPG encrypted data.
- *
- * @throws Crypt_GPG_BadPassphraseException if a required passphrase is
- * incorrect or if a required passphrase is not specified. See
- * {@link Crypt_GPG::addDecryptKey()}.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <i>debug</i> option and file a bug report if these
- * exceptions occur.
- */
- public function throwException()
- {
- $code = Crypt_GPG::ERROR_NONE;
-
- if (!$this->decryptionOkay) {
- if (count($this->badPassphrases) > 0) {
- $code = Crypt_GPG::ERROR_BAD_PASSPHRASE;
- } elseif (count($this->missingKeys) > 0) {
- $code = Crypt_GPG::ERROR_KEY_NOT_FOUND;
- } else {
- $code = Crypt_GPG::ERROR_UNKNOWN;
- }
- } elseif ($this->noData) {
- $code = Crypt_GPG::ERROR_NO_DATA;
- }
-
- switch ($code) {
- case Crypt_GPG::ERROR_NONE:
- break;
-
- case Crypt_GPG::ERROR_KEY_NOT_FOUND:
- if (count($this->missingKeys) > 0) {
- $keyId = reset($this->missingKeys);
- } else {
- $keyId = '';
- }
- throw new Crypt_GPG_KeyNotFoundException(
- 'Cannot decrypt data. No suitable private key is in the ' .
- 'keyring. Import a suitable private key before trying to ' .
- 'decrypt this data.', $code, $keyId);
-
- case Crypt_GPG::ERROR_BAD_PASSPHRASE:
- $badPassphrases = array_diff_key(
- $this->badPassphrases,
- $this->missingPassphrases
- );
-
- $missingPassphrases = array_intersect_key(
- $this->badPassphrases,
- $this->missingPassphrases
- );
-
- $message = 'Cannot decrypt data.';
- if (count($badPassphrases) > 0) {
- $message = ' Incorrect passphrase provided for keys: "' .
- implode('", "', $badPassphrases) . '".';
- }
- if (count($missingPassphrases) > 0) {
- $message = ' No passphrase provided for keys: "' .
- implode('", "', $badPassphrases) . '".';
- }
-
- throw new Crypt_GPG_BadPassphraseException($message, $code,
- $badPassphrases, $missingPassphrases);
-
- case Crypt_GPG::ERROR_NO_DATA:
- throw new Crypt_GPG_NoDataException(
- 'Cannot decrypt data. No PGP encrypted data was found in '.
- 'the provided data.', $code);
-
- default:
- throw new Crypt_GPG_Exception(
- 'Unknown error decrypting data.', $code);
- }
- }
-
- // }}}
-}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/Engine.php b/plugins/enigma/lib/Crypt/GPG/Engine.php
deleted file mode 100644
index 081be8e21..000000000
--- a/plugins/enigma/lib/Crypt/GPG/Engine.php
+++ /dev/null
@@ -1,1758 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Crypt_GPG is a package to use GPG from PHP
- *
- * This file contains an engine that handles GPG subprocess control and I/O.
- * PHP's process manipulation functions are used to handle the GPG subprocess.
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: Engine.php 302822 2010-08-26 17:30:57Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://www.gnupg.org/
- */
-
-/**
- * Crypt_GPG base class.
- */
-require_once 'Crypt/GPG.php';
-
-/**
- * GPG exception classes.
- */
-require_once 'Crypt/GPG/Exceptions.php';
-
-/**
- * Standard PEAR exception is used if GPG binary is not found.
- */
-require_once 'PEAR/Exception.php';
-
-// {{{ class Crypt_GPG_Engine
-
-/**
- * Native PHP Crypt_GPG I/O engine
- *
- * This class is used internally by Crypt_GPG and does not need be used
- * directly. See the {@link Crypt_GPG} class for end-user API.
- *
- * This engine uses PHP's native process control functions to directly control
- * the GPG process. The GPG executable is required to be on the system.
- *
- * All data is passed to the GPG subprocess using file descriptors. This is the
- * most secure method of passing data to the GPG subprocess.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://www.gnupg.org/
- */
-class Crypt_GPG_Engine
-{
- // {{{ constants
-
- /**
- * Size of data chunks that are sent to and retrieved from the IPC pipes.
- *
- * PHP reads 8192 bytes. If this is set to less than 8192, PHP reads 8192
- * and buffers the rest so we might as well just read 8192.
- *
- * Using values other than 8192 also triggers PHP bugs.
- *
- * @see http://bugs.php.net/bug.php?id=35224
- */
- const CHUNK_SIZE = 8192;
-
- /**
- * Standard input file descriptor. This is used to pass data to the GPG
- * process.
- */
- const FD_INPUT = 0;
-
- /**
- * Standard output file descriptor. This is used to receive normal output
- * from the GPG process.
- */
- const FD_OUTPUT = 1;
-
- /**
- * Standard output file descriptor. This is used to receive error output
- * from the GPG process.
- */
- const FD_ERROR = 2;
-
- /**
- * GPG status output file descriptor. The status file descriptor outputs
- * detailed information for many GPG commands. See the second section of
- * the file <b>doc/DETAILS</b> in the
- * {@link http://www.gnupg.org/download/ GPG package} for a detailed
- * description of GPG's status output.
- */
- const FD_STATUS = 3;
-
- /**
- * Command input file descriptor. This is used for methods requiring
- * passphrases.
- */
- const FD_COMMAND = 4;
-
- /**
- * Extra message input file descriptor. This is used for passing signed
- * data when verifying a detached signature.
- */
- const FD_MESSAGE = 5;
-
- /**
- * Minimum version of GnuPG that is supported.
- */
- const MIN_VERSION = '1.0.2';
-
- // }}}
- // {{{ private class properties
-
- /**
- * Whether or not to use debugging mode
- *
- * When set to true, every GPG command is echoed before it is run. Sensitive
- * data is always handled using pipes and is not specified as part of the
- * command. As a result, sensitive data is never displayed when debug is
- * enabled. Sensitive data includes private key data and passphrases.
- *
- * Debugging is off by default.
- *
- * @var boolean
- * @see Crypt_GPG_Engine::__construct()
- */
- private $_debug = false;
-
- /**
- * Location of GPG binary
- *
- * @var string
- * @see Crypt_GPG_Engine::__construct()
- * @see Crypt_GPG_Engine::_getBinary()
- */
- private $_binary = '';
-
- /**
- * Directory containing the GPG key files
- *
- * This property only contains the path when the <i>homedir</i> option
- * is specified in the constructor.
- *
- * @var string
- * @see Crypt_GPG_Engine::__construct()
- */
- private $_homedir = '';
-
- /**
- * File path of the public keyring
- *
- * This property only contains the file path when the <i>public_keyring</i>
- * option is specified in the constructor.
- *
- * If the specified file path starts with <kbd>~/</kbd>, the path is
- * relative to the <i>homedir</i> if specified, otherwise to
- * <kbd>~/.gnupg</kbd>.
- *
- * @var string
- * @see Crypt_GPG_Engine::__construct()
- */
- private $_publicKeyring = '';
-
- /**
- * File path of the private (secret) keyring
- *
- * This property only contains the file path when the <i>private_keyring</i>
- * option is specified in the constructor.
- *
- * If the specified file path starts with <kbd>~/</kbd>, the path is
- * relative to the <i>homedir</i> if specified, otherwise to
- * <kbd>~/.gnupg</kbd>.
- *
- * @var string
- * @see Crypt_GPG_Engine::__construct()
- */
- private $_privateKeyring = '';
-
- /**
- * File path of the trust database
- *
- * This property only contains the file path when the <i>trust_db</i>
- * option is specified in the constructor.
- *
- * If the specified file path starts with <kbd>~/</kbd>, the path is
- * relative to the <i>homedir</i> if specified, otherwise to
- * <kbd>~/.gnupg</kbd>.
- *
- * @var string
- * @see Crypt_GPG_Engine::__construct()
- */
- private $_trustDb = '';
-
- /**
- * Array of pipes used for communication with the GPG binary
- *
- * This is an array of file descriptor resources.
- *
- * @var array
- */
- private $_pipes = array();
-
- /**
- * Array of currently opened pipes
- *
- * This array is used to keep track of remaining opened pipes so they can
- * be closed when the GPG subprocess is finished. This array is a subset of
- * the {@link Crypt_GPG_Engine::$_pipes} array and contains opened file
- * descriptor resources.
- *
- * @var array
- * @see Crypt_GPG_Engine::_closePipe()
- */
- private $_openPipes = array();
-
- /**
- * A handle for the GPG process
- *
- * @var resource
- */
- private $_process = null;
-
- /**
- * Whether or not the operating system is Darwin (OS X)
- *
- * @var boolean
- */
- private $_isDarwin = false;
-
- /**
- * Commands to be sent to GPG's command input stream
- *
- * @var string
- * @see Crypt_GPG_Engine::sendCommand()
- */
- private $_commandBuffer = '';
-
- /**
- * Array of status line handlers
- *
- * @var array
- * @see Crypt_GPG_Engine::addStatusHandler()
- */
- private $_statusHandlers = array();
-
- /**
- * Array of error line handlers
- *
- * @var array
- * @see Crypt_GPG_Engine::addErrorHandler()
- */
- private $_errorHandlers = array();
-
- /**
- * The error code of the current operation
- *
- * @var integer
- * @see Crypt_GPG_Engine::getErrorCode()
- */
- private $_errorCode = Crypt_GPG::ERROR_NONE;
-
- /**
- * File related to the error code of the current operation
- *
- * @var string
- * @see Crypt_GPG_Engine::getErrorFilename()
- */
- private $_errorFilename = '';
-
- /**
- * Key id related to the error code of the current operation
- *
- * @var string
- * @see Crypt_GPG_Engine::getErrorKeyId()
- */
- private $_errorkeyId = '';
-
- /**
- * The number of currently needed passphrases
- *
- * If this is not zero when the GPG command is completed, the error code is
- * set to {@link Crypt_GPG::ERROR_MISSING_PASSPHRASE}.
- *
- * @var integer
- */
- private $_needPassphrase = 0;
-
- /**
- * The input source
- *
- * This is data to send to GPG. Either a string or a stream resource.
- *
- * @var string|resource
- * @see Crypt_GPG_Engine::setInput()
- */
- private $_input = null;
-
- /**
- * The extra message input source
- *
- * Either a string or a stream resource.
- *
- * @var string|resource
- * @see Crypt_GPG_Engine::setMessage()
- */
- private $_message = null;
-
- /**
- * The output location
- *
- * This is where the output from GPG is sent. Either a string or a stream
- * resource.
- *
- * @var string|resource
- * @see Crypt_GPG_Engine::setOutput()
- */
- private $_output = '';
-
- /**
- * The GPG operation to execute
- *
- * @var string
- * @see Crypt_GPG_Engine::setOperation()
- */
- private $_operation;
-
- /**
- * Arguments for the current operation
- *
- * @var array
- * @see Crypt_GPG_Engine::setOperation()
- */
- private $_arguments = array();
-
- /**
- * The version number of the GPG binary
- *
- * @var string
- * @see Crypt_GPG_Engine::getVersion()
- */
- private $_version = '';
-
- /**
- * Cached value indicating whether or not mbstring function overloading is
- * on for strlen
- *
- * This is cached for optimal performance inside the I/O loop.
- *
- * @var boolean
- * @see Crypt_GPG_Engine::_byteLength()
- * @see Crypt_GPG_Engine::_byteSubstring()
- */
- private static $_mbStringOverload = null;
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new GPG engine
- *
- * Available options are:
- *
- * - <kbd>string homedir</kbd> - the directory where the GPG
- * keyring files are stored. If not
- * specified, Crypt_GPG uses the
- * default of <kbd>~/.gnupg</kbd>.
- * - <kbd>string publicKeyring</kbd> - the file path of the public
- * keyring. Use this if the public
- * keyring is not in the homedir, or
- * if the keyring is in a directory
- * not writable by the process
- * invoking GPG (like Apache). Then
- * you can specify the path to the
- * keyring with this option
- * (/foo/bar/pubring.gpg), and specify
- * a writable directory (like /tmp)
- * using the <i>homedir</i> option.
- * - <kbd>string privateKeyring</kbd> - the file path of the private
- * keyring. Use this if the private
- * keyring is not in the homedir, or
- * if the keyring is in a directory
- * not writable by the process
- * invoking GPG (like Apache). Then
- * you can specify the path to the
- * keyring with this option
- * (/foo/bar/secring.gpg), and specify
- * a writable directory (like /tmp)
- * using the <i>homedir</i> option.
- * - <kbd>string trustDb</kbd> - the file path of the web-of-trust
- * database. Use this if the trust
- * database is not in the homedir, or
- * if the database is in a directory
- * not writable by the process
- * invoking GPG (like Apache). Then
- * you can specify the path to the
- * trust database with this option
- * (/foo/bar/trustdb.gpg), and specify
- * a writable directory (like /tmp)
- * using the <i>homedir</i> option.
- * - <kbd>string binary</kbd> - the location of the GPG binary. If
- * not specified, the driver attempts
- * to auto-detect the GPG binary
- * location using a list of known
- * default locations for the current
- * operating system. The option
- * <kbd>gpgBinary</kbd> is a
- * deprecated alias for this option.
- * - <kbd>boolean debug</kbd> - whether or not to use debug mode.
- * When debug mode is on, all
- * communication to and from the GPG
- * subprocess is logged. This can be
- * useful to diagnose errors when
- * using Crypt_GPG.
- *
- * @param array $options optional. An array of options used to create the
- * GPG object. All options are optional and are
- * represented as key-value pairs.
- *
- * @throws Crypt_GPG_FileException if the <kbd>homedir</kbd> does not exist
- * and cannot be created. This can happen if <kbd>homedir</kbd> is
- * not specified, Crypt_GPG is run as the web user, and the web
- * user has no home directory. This exception is also thrown if any
- * of the options <kbd>publicKeyring</kbd>,
- * <kbd>privateKeyring</kbd> or <kbd>trustDb</kbd> options are
- * specified but the files do not exist or are are not readable.
- * This can happen if the user running the Crypt_GPG process (for
- * example, the Apache user) does not have permission to read the
- * files.
- *
- * @throws PEAR_Exception if the provided <kbd>binary</kbd> is invalid, or
- * if no <kbd>binary</kbd> is provided and no suitable binary could
- * be found.
- */
- public function __construct(array $options = array())
- {
- $this->_isDarwin = (strncmp(strtoupper(PHP_OS), 'DARWIN', 6) === 0);
-
- // populate mbstring overloading cache if not set
- if (self::$_mbStringOverload === null) {
- self::$_mbStringOverload = (extension_loaded('mbstring')
- && (ini_get('mbstring.func_overload') & 0x02) === 0x02);
- }
-
- // get homedir
- if (array_key_exists('homedir', $options)) {
- $this->_homedir = (string)$options['homedir'];
- } else {
- // note: this requires the package OS dep exclude 'windows'
- $info = posix_getpwuid(posix_getuid());
- $this->_homedir = $info['dir'].'/.gnupg';
- }
-
- // attempt to create homedir if it does not exist
- if (!is_dir($this->_homedir)) {
- if (@mkdir($this->_homedir, 0777, true)) {
- // Set permissions on homedir. Parent directories are created
- // with 0777, homedir is set to 0700.
- chmod($this->_homedir, 0700);
- } else {
- throw new Crypt_GPG_FileException('The \'homedir\' "' .
- $this->_homedir . '" is not readable or does not exist '.
- 'and cannot be created. This can happen if \'homedir\' '.
- 'is not specified in the Crypt_GPG options, Crypt_GPG is '.
- 'run as the web user, and the web user has no home '.
- 'directory.',
- 0, $this->_homedir);
- }
- }
-
- // get binary
- if (array_key_exists('binary', $options)) {
- $this->_binary = (string)$options['binary'];
- } elseif (array_key_exists('gpgBinary', $options)) {
- // deprecated alias
- $this->_binary = (string)$options['gpgBinary'];
- } else {
- $this->_binary = $this->_getBinary();
- }
-
- if ($this->_binary == '' || !is_executable($this->_binary)) {
- throw new PEAR_Exception('GPG binary not found. If you are sure '.
- 'the GPG binary is installed, please specify the location of '.
- 'the GPG binary using the \'binary\' driver option.');
- }
-
- /*
- * Note:
- *
- * Normally, GnuPG expects keyrings to be in the homedir and expects
- * to be able to write temporary files in the homedir. Sometimes,
- * keyrings are not in the homedir, or location of the keyrings does
- * not allow writing temporary files. In this case, the <i>homedir</i>
- * option by itself is not enough to specify the keyrings because GnuPG
- * can not write required temporary files. Additional options are
- * provided so you can specify the location of the keyrings separately
- * from the homedir.
- */
-
- // get public keyring
- if (array_key_exists('publicKeyring', $options)) {
- $this->_publicKeyring = (string)$options['publicKeyring'];
- if (!is_readable($this->_publicKeyring)) {
- throw new Crypt_GPG_FileException('The \'publicKeyring\' "' .
- $this->_publicKeyring . '" does not exist or is ' .
- 'not readable. Check the location and ensure the file ' .
- 'permissions are correct.', 0, $this->_publicKeyring);
- }
- }
-
- // get private keyring
- if (array_key_exists('privateKeyring', $options)) {
- $this->_privateKeyring = (string)$options['privateKeyring'];
- if (!is_readable($this->_privateKeyring)) {
- throw new Crypt_GPG_FileException('The \'privateKeyring\' "' .
- $this->_privateKeyring . '" does not exist or is ' .
- 'not readable. Check the location and ensure the file ' .
- 'permissions are correct.', 0, $this->_privateKeyring);
- }
- }
-
- // get trust database
- if (array_key_exists('trustDb', $options)) {
- $this->_trustDb = (string)$options['trustDb'];
- if (!is_readable($this->_trustDb)) {
- throw new Crypt_GPG_FileException('The \'trustDb\' "' .
- $this->_trustDb . '" does not exist or is not readable. ' .
- 'Check the location and ensure the file permissions are ' .
- 'correct.', 0, $this->_trustDb);
- }
- }
-
- if (array_key_exists('debug', $options)) {
- $this->_debug = (boolean)$options['debug'];
- }
- }
-
- // }}}
- // {{{ __destruct()
-
- /**
- * Closes open GPG subprocesses when this object is destroyed
- *
- * Subprocesses should never be left open by this class unless there is
- * an unknown error and unexpected script termination occurs.
- */
- public function __destruct()
- {
- $this->_closeSubprocess();
- }
-
- // }}}
- // {{{ addErrorHandler()
-
- /**
- * Adds an error handler method
- *
- * The method is run every time a new error line is received from the GPG
- * subprocess. The handler method must accept the error line to be handled
- * as its first parameter.
- *
- * @param callback $callback the callback method to use.
- * @param array $args optional. Additional arguments to pass as
- * parameters to the callback method.
- *
- * @return void
- */
- public function addErrorHandler($callback, array $args = array())
- {
- $this->_errorHandlers[] = array(
- 'callback' => $callback,
- 'args' => $args
- );
- }
-
- // }}}
- // {{{ addStatusHandler()
-
- /**
- * Adds a status handler method
- *
- * The method is run every time a new status line is received from the
- * GPG subprocess. The handler method must accept the status line to be
- * handled as its first parameter.
- *
- * @param callback $callback the callback method to use.
- * @param array $args optional. Additional arguments to pass as
- * parameters to the callback method.
- *
- * @return void
- */
- public function addStatusHandler($callback, array $args = array())
- {
- $this->_statusHandlers[] = array(
- 'callback' => $callback,
- 'args' => $args
- );
- }
-
- // }}}
- // {{{ sendCommand()
-
- /**
- * Sends a command to the GPG subprocess over the command file-descriptor
- * pipe
- *
- * @param string $command the command to send.
- *
- * @return void
- *
- * @sensitive $command
- */
- public function sendCommand($command)
- {
- if (array_key_exists(self::FD_COMMAND, $this->_openPipes)) {
- $this->_commandBuffer .= $command . PHP_EOL;
- }
- }
-
- // }}}
- // {{{ reset()
-
- /**
- * Resets the GPG engine, preparing it for a new operation
- *
- * @return void
- *
- * @see Crypt_GPG_Engine::run()
- * @see Crypt_GPG_Engine::setOperation()
- */
- public function reset()
- {
- $this->_operation = '';
- $this->_arguments = array();
- $this->_input = null;
- $this->_message = null;
- $this->_output = '';
- $this->_errorCode = Crypt_GPG::ERROR_NONE;
- $this->_needPassphrase = 0;
- $this->_commandBuffer = '';
-
- $this->_statusHandlers = array();
- $this->_errorHandlers = array();
-
- $this->addStatusHandler(array($this, '_handleErrorStatus'));
- $this->addErrorHandler(array($this, '_handleErrorError'));
-
- if ($this->_debug) {
- $this->addStatusHandler(array($this, '_handleDebugStatus'));
- $this->addErrorHandler(array($this, '_handleDebugError'));
- }
- }
-
- // }}}
- // {{{ run()
-
- /**
- * Runs the current GPG operation
- *
- * This creates and manages the GPG subprocess.
- *
- * The operation must be set with {@link Crypt_GPG_Engine::setOperation()}
- * before this method is called.
- *
- * @return void
- *
- * @throws Crypt_GPG_InvalidOperationException if no operation is specified.
- *
- * @see Crypt_GPG_Engine::reset()
- * @see Crypt_GPG_Engine::setOperation()
- */
- public function run()
- {
- if ($this->_operation === '') {
- throw new Crypt_GPG_InvalidOperationException('No GPG operation ' .
- 'specified. Use Crypt_GPG_Engine::setOperation() before ' .
- 'calling Crypt_GPG_Engine::run().');
- }
-
- $this->_openSubprocess();
- $this->_process();
- $this->_closeSubprocess();
- }
-
- // }}}
- // {{{ getErrorCode()
-
- /**
- * Gets the error code of the last executed operation
- *
- * This value is only meaningful after {@link Crypt_GPG_Engine::run()} has
- * been executed.
- *
- * @return integer the error code of the last executed operation.
- */
- public function getErrorCode()
- {
- return $this->_errorCode;
- }
-
- // }}}
- // {{{ getErrorFilename()
-
- /**
- * Gets the file related to the error code of the last executed operation
- *
- * This value is only meaningful after {@link Crypt_GPG_Engine::run()} has
- * been executed. If there is no file related to the error, an empty string
- * is returned.
- *
- * @return string the file related to the error code of the last executed
- * operation.
- */
- public function getErrorFilename()
- {
- return $this->_errorFilename;
- }
-
- // }}}
- // {{{ getErrorKeyId()
-
- /**
- * Gets the key id related to the error code of the last executed operation
- *
- * This value is only meaningful after {@link Crypt_GPG_Engine::run()} has
- * been executed. If there is no key id related to the error, an empty
- * string is returned.
- *
- * @return string the key id related to the error code of the last executed
- * operation.
- */
- public function getErrorKeyId()
- {
- return $this->_errorKeyId;
- }
-
- // }}}
- // {{{ setInput()
-
- /**
- * Sets the input source for the current GPG operation
- *
- * @param string|resource &$input either a reference to the string
- * containing the input data or an open
- * stream resource containing the input
- * data.
- *
- * @return void
- */
- public function setInput(&$input)
- {
- $this->_input =& $input;
- }
-
- // }}}
- // {{{ setMessage()
-
- /**
- * Sets the message source for the current GPG operation
- *
- * Detached signature data should be specified here.
- *
- * @param string|resource &$message either a reference to the string
- * containing the message data or an open
- * stream resource containing the message
- * data.
- *
- * @return void
- */
- public function setMessage(&$message)
- {
- $this->_message =& $message;
- }
-
- // }}}
- // {{{ setOutput()
-
- /**
- * Sets the output destination for the current GPG operation
- *
- * @param string|resource &$output either a reference to the string in
- * which to store GPG output or an open
- * stream resource to which the output data
- * should be written.
- *
- * @return void
- */
- public function setOutput(&$output)
- {
- $this->_output =& $output;
- }
-
- // }}}
- // {{{ setOperation()
-
- /**
- * Sets the operation to perform
- *
- * @param string $operation the operation to perform. This should be one
- * of GPG's operations. For example,
- * <kbd>--encrypt</kbd>, <kbd>--decrypt</kbd>,
- * <kbd>--sign</kbd>, etc.
- * @param array $arguments optional. Additional arguments for the GPG
- * subprocess. See the GPG manual for specific
- * values.
- *
- * @return void
- *
- * @see Crypt_GPG_Engine::reset()
- * @see Crypt_GPG_Engine::run()
- */
- public function setOperation($operation, array $arguments = array())
- {
- $this->_operation = $operation;
- $this->_arguments = $arguments;
- }
-
- // }}}
- // {{{ getVersion()
-
- /**
- * Gets the version of the GnuPG binary
- *
- * @return string a version number string containing the version of GnuPG
- * being used. This value is suitable to use with PHP's
- * version_compare() function.
- *
- * @throws Crypt_GPG_Exception if an unknown or unexpected error occurs.
- * Use the <kbd>debug</kbd> option and file a bug report if these
- * exceptions occur.
- *
- * @throws Crypt_GPG_UnsupportedException if the provided binary is not
- * GnuPG or if the GnuPG version is less than 1.0.2.
- */
- public function getVersion()
- {
- if ($this->_version == '') {
-
- $options = array(
- 'homedir' => $this->_homedir,
- 'binary' => $this->_binary,
- 'debug' => $this->_debug
- );
-
- $engine = new self($options);
- $info = '';
-
- // Set a garbage version so we do not end up looking up the version
- // recursively.
- $engine->_version = '1.0.0';
-
- $engine->reset();
- $engine->setOutput($info);
- $engine->setOperation('--version');
- $engine->run();
-
- $code = $this->getErrorCode();
-
- if ($code !== Crypt_GPG::ERROR_NONE) {
- throw new Crypt_GPG_Exception(
- 'Unknown error getting GnuPG version information. Please ' .
- 'use the \'debug\' option when creating the Crypt_GPG ' .
- 'object, and file a bug report at ' . Crypt_GPG::BUG_URI,
- $code);
- }
-
- $matches = array();
- $expression = '/gpg \(GnuPG\) (\S+)/';
-
- if (preg_match($expression, $info, $matches) === 1) {
- $this->_version = $matches[1];
- } else {
- throw new Crypt_GPG_Exception(
- 'No GnuPG version information provided by the binary "' .
- $this->_binary . '". Are you sure it is GnuPG?');
- }
-
- if (version_compare($this->_version, self::MIN_VERSION, 'lt')) {
- throw new Crypt_GPG_Exception(
- 'The version of GnuPG being used (' . $this->_version .
- ') is not supported by Crypt_GPG. The minimum version ' .
- 'required by Crypt_GPG is ' . self::MIN_VERSION);
- }
- }
-
-
- return $this->_version;
- }
-
- // }}}
- // {{{ _handleErrorStatus()
-
- /**
- * Handles error values in the status output from GPG
- *
- * This method is responsible for setting the
- * {@link Crypt_GPG_Engine::$_errorCode}. See <b>doc/DETAILS</b> in the
- * {@link http://www.gnupg.org/download/ GPG distribution} for detailed
- * information on GPG's status output.
- *
- * @param string $line the status line to handle.
- *
- * @return void
- */
- private function _handleErrorStatus($line)
- {
- $tokens = explode(' ', $line);
- switch ($tokens[0]) {
- case 'BAD_PASSPHRASE':
- $this->_errorCode = Crypt_GPG::ERROR_BAD_PASSPHRASE;
- break;
-
- case 'MISSING_PASSPHRASE':
- $this->_errorCode = Crypt_GPG::ERROR_MISSING_PASSPHRASE;
- break;
-
- case 'NODATA':
- $this->_errorCode = Crypt_GPG::ERROR_NO_DATA;
- break;
-
- case 'DELETE_PROBLEM':
- if ($tokens[1] == '1') {
- $this->_errorCode = Crypt_GPG::ERROR_KEY_NOT_FOUND;
- break;
- } elseif ($tokens[1] == '2') {
- $this->_errorCode = Crypt_GPG::ERROR_DELETE_PRIVATE_KEY;
- break;
- }
- break;
-
- case 'IMPORT_RES':
- if ($tokens[12] > 0) {
- $this->_errorCode = Crypt_GPG::ERROR_DUPLICATE_KEY;
- }
- break;
-
- case 'NO_PUBKEY':
- case 'NO_SECKEY':
- $this->_errorKeyId = $tokens[1];
- $this->_errorCode = Crypt_GPG::ERROR_KEY_NOT_FOUND;
- break;
-
- case 'NEED_PASSPHRASE':
- $this->_needPassphrase++;
- break;
-
- case 'GOOD_PASSPHRASE':
- $this->_needPassphrase--;
- break;
-
- case 'EXPSIG':
- case 'EXPKEYSIG':
- case 'REVKEYSIG':
- case 'BADSIG':
- $this->_errorCode = Crypt_GPG::ERROR_BAD_SIGNATURE;
- break;
-
- }
- }
-
- // }}}
- // {{{ _handleErrorError()
-
- /**
- * Handles error values in the error output from GPG
- *
- * This method is responsible for setting the
- * {@link Crypt_GPG_Engine::$_errorCode}.
- *
- * @param string $line the error line to handle.
- *
- * @return void
- */
- private function _handleErrorError($line)
- {
- if ($this->_errorCode === Crypt_GPG::ERROR_NONE) {
- $pattern = '/no valid OpenPGP data found/';
- if (preg_match($pattern, $line) === 1) {
- $this->_errorCode = Crypt_GPG::ERROR_NO_DATA;
- }
- }
-
- if ($this->_errorCode === Crypt_GPG::ERROR_NONE) {
- $pattern = '/No secret key|secret key not available/';
- if (preg_match($pattern, $line) === 1) {
- $this->_errorCode = Crypt_GPG::ERROR_KEY_NOT_FOUND;
- }
- }
-
- if ($this->_errorCode === Crypt_GPG::ERROR_NONE) {
- $pattern = '/No public key|public key not found/';
- if (preg_match($pattern, $line) === 1) {
- $this->_errorCode = Crypt_GPG::ERROR_KEY_NOT_FOUND;
- }
- }
-
- if ($this->_errorCode === Crypt_GPG::ERROR_NONE) {
- $matches = array();
- $pattern = '/can\'t (?:access|open) `(.*?)\'/';
- if (preg_match($pattern, $line, $matches) === 1) {
- $this->_errorFilename = $matches[1];
- $this->_errorCode = Crypt_GPG::ERROR_FILE_PERMISSIONS;
- }
- }
- }
-
- // }}}
- // {{{ _handleDebugStatus()
-
- /**
- * Displays debug output for status lines
- *
- * @param string $line the status line to handle.
- *
- * @return void
- */
- private function _handleDebugStatus($line)
- {
- $this->_debug('STATUS: ' . $line);
- }
-
- // }}}
- // {{{ _handleDebugError()
-
- /**
- * Displays debug output for error lines
- *
- * @param string $line the error line to handle.
- *
- * @return void
- */
- private function _handleDebugError($line)
- {
- $this->_debug('ERROR: ' . $line);
- }
-
- // }}}
- // {{{ _process()
-
- /**
- * Performs internal streaming operations for the subprocess using either
- * strings or streams as input / output points
- *
- * This is the main I/O loop for streaming to and from the GPG subprocess.
- *
- * The implementation of this method is verbose mainly for performance
- * reasons. Adding streams to a lookup array and looping the array inside
- * the main I/O loop would be siginficantly slower for large streams.
- *
- * @return void
- *
- * @throws Crypt_GPG_Exception if there is an error selecting streams for
- * reading or writing. If this occurs, please file a bug report at
- * http://pear.php.net/bugs/report.php?package=Crypt_GPG.
- */
- private function _process()
- {
- $this->_debug('BEGIN PROCESSING');
-
- $this->_commandBuffer = ''; // buffers input to GPG
- $messageBuffer = ''; // buffers input to GPG
- $inputBuffer = ''; // buffers input to GPG
- $outputBuffer = ''; // buffers output from GPG
- $statusBuffer = ''; // buffers output from GPG
- $errorBuffer = ''; // buffers output from GPG
- $inputComplete = false; // input stream is completely buffered
- $messageComplete = false; // message stream is completely buffered
-
- if (is_string($this->_input)) {
- $inputBuffer = $this->_input;
- $inputComplete = true;
- }
-
- if (is_string($this->_message)) {
- $messageBuffer = $this->_message;
- $messageComplete = true;
- }
-
- if (is_string($this->_output)) {
- $outputBuffer =& $this->_output;
- }
-
- // convenience variables
- $fdInput = $this->_pipes[self::FD_INPUT];
- $fdOutput = $this->_pipes[self::FD_OUTPUT];
- $fdError = $this->_pipes[self::FD_ERROR];
- $fdStatus = $this->_pipes[self::FD_STATUS];
- $fdCommand = $this->_pipes[self::FD_COMMAND];
- $fdMessage = $this->_pipes[self::FD_MESSAGE];
-
- while (true) {
-
- $inputStreams = array();
- $outputStreams = array();
- $exceptionStreams = array();
-
- // set up input streams
- if (is_resource($this->_input) && !$inputComplete) {
- if (feof($this->_input)) {
- $inputComplete = true;
- } else {
- $inputStreams[] = $this->_input;
- }
- }
-
- // close GPG input pipe if there is no more data
- if ($inputBuffer == '' && $inputComplete) {
- $this->_debug('=> closing GPG input pipe');
- $this->_closePipe(self::FD_INPUT);
- }
-
- if (is_resource($this->_message) && !$messageComplete) {
- if (feof($this->_message)) {
- $messageComplete = true;
- } else {
- $inputStreams[] = $this->_message;
- }
- }
-
- // close GPG message pipe if there is no more data
- if ($messageBuffer == '' && $messageComplete) {
- $this->_debug('=> closing GPG message pipe');
- $this->_closePipe(self::FD_MESSAGE);
- }
-
- if (!feof($fdOutput)) {
- $inputStreams[] = $fdOutput;
- }
-
- if (!feof($fdStatus)) {
- $inputStreams[] = $fdStatus;
- }
-
- if (!feof($fdError)) {
- $inputStreams[] = $fdError;
- }
-
- // set up output streams
- if ($outputBuffer != '' && is_resource($this->_output)) {
- $outputStreams[] = $this->_output;
- }
-
- if ($this->_commandBuffer != '') {
- $outputStreams[] = $fdCommand;
- }
-
- if ($messageBuffer != '') {
- $outputStreams[] = $fdMessage;
- }
-
- if ($inputBuffer != '') {
- $outputStreams[] = $fdInput;
- }
-
- // no streams left to read or write, we're all done
- if (count($inputStreams) === 0 && count($outputStreams) === 0) {
- break;
- }
-
- $this->_debug('selecting streams');
-
- $ready = stream_select(
- $inputStreams,
- $outputStreams,
- $exceptionStreams,
- null
- );
-
- $this->_debug('=> got ' . $ready);
-
- if ($ready === false) {
- throw new Crypt_GPG_Exception(
- 'Error selecting stream for communication with GPG ' .
- 'subprocess. Please file a bug report at: ' .
- 'http://pear.php.net/bugs/report.php?package=Crypt_GPG');
- }
-
- if ($ready === 0) {
- throw new Crypt_GPG_Exception(
- 'stream_select() returned 0. This can not happen! Please ' .
- 'file a bug report at: ' .
- 'http://pear.php.net/bugs/report.php?package=Crypt_GPG');
- }
-
- // write input (to GPG)
- if (in_array($fdInput, $outputStreams)) {
- $this->_debug('GPG is ready for input');
-
- $chunk = self::_byteSubstring(
- $inputBuffer,
- 0,
- self::CHUNK_SIZE
- );
-
- $length = self::_byteLength($chunk);
-
- $this->_debug(
- '=> about to write ' . $length . ' bytes to GPG input'
- );
-
- $length = fwrite($fdInput, $chunk, $length);
-
- $this->_debug('=> wrote ' . $length . ' bytes');
-
- $inputBuffer = self::_byteSubstring(
- $inputBuffer,
- $length
- );
- }
-
- // read input (from PHP stream)
- if (in_array($this->_input, $inputStreams)) {
- $this->_debug('input stream is ready for reading');
- $this->_debug(
- '=> about to read ' . self::CHUNK_SIZE .
- ' bytes from input stream'
- );
-
- $chunk = fread($this->_input, self::CHUNK_SIZE);
- $length = self::_byteLength($chunk);
- $inputBuffer .= $chunk;
-
- $this->_debug('=> read ' . $length . ' bytes');
- }
-
- // write message (to GPG)
- if (in_array($fdMessage, $outputStreams)) {
- $this->_debug('GPG is ready for message data');
-
- $chunk = self::_byteSubstring(
- $messageBuffer,
- 0,
- self::CHUNK_SIZE
- );
-
- $length = self::_byteLength($chunk);
-
- $this->_debug(
- '=> about to write ' . $length . ' bytes to GPG message'
- );
-
- $length = fwrite($fdMessage, $chunk, $length);
- $this->_debug('=> wrote ' . $length . ' bytes');
-
- $messageBuffer = self::_byteSubstring($messageBuffer, $length);
- }
-
- // read message (from PHP stream)
- if (in_array($this->_message, $inputStreams)) {
- $this->_debug('message stream is ready for reading');
- $this->_debug(
- '=> about to read ' . self::CHUNK_SIZE .
- ' bytes from message stream'
- );
-
- $chunk = fread($this->_message, self::CHUNK_SIZE);
- $length = self::_byteLength($chunk);
- $messageBuffer .= $chunk;
-
- $this->_debug('=> read ' . $length . ' bytes');
- }
-
- // read output (from GPG)
- if (in_array($fdOutput, $inputStreams)) {
- $this->_debug('GPG output stream ready for reading');
- $this->_debug(
- '=> about to read ' . self::CHUNK_SIZE .
- ' bytes from GPG output'
- );
-
- $chunk = fread($fdOutput, self::CHUNK_SIZE);
- $length = self::_byteLength($chunk);
- $outputBuffer .= $chunk;
-
- $this->_debug('=> read ' . $length . ' bytes');
- }
-
- // write output (to PHP stream)
- if (in_array($this->_output, $outputStreams)) {
- $this->_debug('output stream is ready for data');
-
- $chunk = self::_byteSubstring(
- $outputBuffer,
- 0,
- self::CHUNK_SIZE
- );
-
- $length = self::_byteLength($chunk);
-
- $this->_debug(
- '=> about to write ' . $length . ' bytes to output stream'
- );
-
- $length = fwrite($this->_output, $chunk, $length);
-
- $this->_debug('=> wrote ' . $length . ' bytes');
-
- $outputBuffer = self::_byteSubstring($outputBuffer, $length);
- }
-
- // read error (from GPG)
- if (in_array($fdError, $inputStreams)) {
- $this->_debug('GPG error stream ready for reading');
- $this->_debug(
- '=> about to read ' . self::CHUNK_SIZE .
- ' bytes from GPG error'
- );
-
- $chunk = fread($fdError, self::CHUNK_SIZE);
- $length = self::_byteLength($chunk);
- $errorBuffer .= $chunk;
-
- $this->_debug('=> read ' . $length . ' bytes');
-
- // pass lines to error handlers
- while (($pos = strpos($errorBuffer, PHP_EOL)) !== false) {
- $line = self::_byteSubstring($errorBuffer, 0, $pos);
- foreach ($this->_errorHandlers as $handler) {
- array_unshift($handler['args'], $line);
- call_user_func_array(
- $handler['callback'],
- $handler['args']
- );
-
- array_shift($handler['args']);
- }
- $errorBuffer = self::_byteSubString(
- $errorBuffer,
- $pos + self::_byteLength(PHP_EOL)
- );
- }
- }
-
- // read status (from GPG)
- if (in_array($fdStatus, $inputStreams)) {
- $this->_debug('GPG status stream ready for reading');
- $this->_debug(
- '=> about to read ' . self::CHUNK_SIZE .
- ' bytes from GPG status'
- );
-
- $chunk = fread($fdStatus, self::CHUNK_SIZE);
- $length = self::_byteLength($chunk);
- $statusBuffer .= $chunk;
-
- $this->_debug('=> read ' . $length . ' bytes');
-
- // pass lines to status handlers
- while (($pos = strpos($statusBuffer, PHP_EOL)) !== false) {
- $line = self::_byteSubstring($statusBuffer, 0, $pos);
- // only pass lines beginning with magic prefix
- if (self::_byteSubstring($line, 0, 9) == '[GNUPG:] ') {
- $line = self::_byteSubstring($line, 9);
- foreach ($this->_statusHandlers as $handler) {
- array_unshift($handler['args'], $line);
- call_user_func_array(
- $handler['callback'],
- $handler['args']
- );
-
- array_shift($handler['args']);
- }
- }
- $statusBuffer = self::_byteSubString(
- $statusBuffer,
- $pos + self::_byteLength(PHP_EOL)
- );
- }
- }
-
- // write command (to GPG)
- if (in_array($fdCommand, $outputStreams)) {
- $this->_debug('GPG is ready for command data');
-
- // send commands
- $chunk = self::_byteSubstring(
- $this->_commandBuffer,
- 0,
- self::CHUNK_SIZE
- );
-
- $length = self::_byteLength($chunk);
-
- $this->_debug(
- '=> about to write ' . $length . ' bytes to GPG command'
- );
-
- $length = fwrite($fdCommand, $chunk, $length);
-
- $this->_debug('=> wrote ' . $length);
-
- $this->_commandBuffer = self::_byteSubstring(
- $this->_commandBuffer,
- $length
- );
- }
-
- } // end loop while streams are open
-
- $this->_debug('END PROCESSING');
- }
-
- // }}}
- // {{{ _openSubprocess()
-
- /**
- * Opens an internal GPG subprocess for the current operation
- *
- * Opens a GPG subprocess, then connects the subprocess to some pipes. Sets
- * the private class property {@link Crypt_GPG_Engine::$_process} to
- * the new subprocess.
- *
- * @return void
- *
- * @throws Crypt_GPG_OpenSubprocessException if the subprocess could not be
- * opened.
- *
- * @see Crypt_GPG_Engine::setOperation()
- * @see Crypt_GPG_Engine::_closeSubprocess()
- * @see Crypt_GPG_Engine::$_process
- */
- private function _openSubprocess()
- {
- $version = $this->getVersion();
-
- $env = $_ENV;
-
- // Newer versions of GnuPG return localized results. Crypt_GPG only
- // works with English, so set the locale to 'C' for the subprocess.
- $env['LC_ALL'] = 'C';
-
- $commandLine = $this->_binary;
-
- $defaultArguments = array(
- '--status-fd ' . escapeshellarg(self::FD_STATUS),
- '--command-fd ' . escapeshellarg(self::FD_COMMAND),
- '--no-secmem-warning',
- '--no-tty',
- '--no-default-keyring', // ignored if keying files are not specified
- '--no-options' // prevent creation of ~/.gnupg directory
- );
-
- if (version_compare($version, '1.0.7', 'ge')) {
- if (version_compare($version, '2.0.0', 'lt')) {
- $defaultArguments[] = '--no-use-agent';
- }
- $defaultArguments[] = '--no-permission-warning';
- }
-
- if (version_compare($version, '1.4.2', 'ge')) {
- $defaultArguments[] = '--exit-on-status-write-error';
- }
-
- if (version_compare($version, '1.3.2', 'ge')) {
- $defaultArguments[] = '--trust-model always';
- } else {
- $defaultArguments[] = '--always-trust';
- }
-
- $arguments = array_merge($defaultArguments, $this->_arguments);
-
- if ($this->_homedir) {
- $arguments[] = '--homedir ' . escapeshellarg($this->_homedir);
-
- // the random seed file makes subsequent actions faster so only
- // disable it if we have to.
- if (!is_writeable($this->_homedir)) {
- $arguments[] = '--no-random-seed-file';
- }
- }
-
- if ($this->_publicKeyring) {
- $arguments[] = '--keyring ' . escapeshellarg($this->_publicKeyring);
- }
-
- if ($this->_privateKeyring) {
- $arguments[] = '--secret-keyring ' .
- escapeshellarg($this->_privateKeyring);
- }
-
- if ($this->_trustDb) {
- $arguments[] = '--trustdb-name ' . escapeshellarg($this->_trustDb);
- }
-
- $commandLine .= ' ' . implode(' ', $arguments) . ' ' .
- $this->_operation;
-
- // Binary operations will not work on Windows with PHP < 5.2.6. This is
- // in case stream_select() ever works on Windows.
- $rb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'r' : 'rb';
- $wb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'w' : 'wb';
-
- $descriptorSpec = array(
- self::FD_INPUT => array('pipe', $rb), // stdin
- self::FD_OUTPUT => array('pipe', $wb), // stdout
- self::FD_ERROR => array('pipe', $wb), // stderr
- self::FD_STATUS => array('pipe', $wb), // status
- self::FD_COMMAND => array('pipe', $rb), // command
- self::FD_MESSAGE => array('pipe', $rb) // message
- );
-
- $this->_debug('OPENING SUBPROCESS WITH THE FOLLOWING COMMAND:');
- $this->_debug($commandLine);
-
- $this->_process = proc_open(
- $commandLine,
- $descriptorSpec,
- $this->_pipes,
- null,
- $env,
- array('binary_pipes' => true)
- );
-
- if (!is_resource($this->_process)) {
- throw new Crypt_GPG_OpenSubprocessException(
- 'Unable to open GPG subprocess.', 0, $commandLine);
- }
-
- $this->_openPipes = $this->_pipes;
- $this->_errorCode = Crypt_GPG::ERROR_NONE;
- }
-
- // }}}
- // {{{ _closeSubprocess()
-
- /**
- * Closes a the internal GPG subprocess
- *
- * Closes the internal GPG subprocess. Sets the private class property
- * {@link Crypt_GPG_Engine::$_process} to null.
- *
- * @return void
- *
- * @see Crypt_GPG_Engine::_openSubprocess()
- * @see Crypt_GPG_Engine::$_process
- */
- private function _closeSubprocess()
- {
- if (is_resource($this->_process)) {
- $this->_debug('CLOSING SUBPROCESS');
-
- // close remaining open pipes
- foreach (array_keys($this->_openPipes) as $pipeNumber) {
- $this->_closePipe($pipeNumber);
- }
-
- $exitCode = proc_close($this->_process);
-
- if ($exitCode != 0) {
- $this->_debug(
- '=> subprocess returned an unexpected exit code: ' .
- $exitCode
- );
-
- if ($this->_errorCode === Crypt_GPG::ERROR_NONE) {
- if ($this->_needPassphrase > 0) {
- $this->_errorCode = Crypt_GPG::ERROR_MISSING_PASSPHRASE;
- } else {
- $this->_errorCode = Crypt_GPG::ERROR_UNKNOWN;
- }
- }
- }
-
- $this->_process = null;
- $this->_pipes = array();
- }
- }
-
- // }}}
- // {{{ _closePipe()
-
- /**
- * Closes an opened pipe used to communicate with the GPG subprocess
- *
- * If the pipe is already closed, it is ignored. If the pipe is open, it
- * is flushed and then closed.
- *
- * @param integer $pipeNumber the file descriptor number of the pipe to
- * close.
- *
- * @return void
- */
- private function _closePipe($pipeNumber)
- {
- $pipeNumber = intval($pipeNumber);
- if (array_key_exists($pipeNumber, $this->_openPipes)) {
- fflush($this->_openPipes[$pipeNumber]);
- fclose($this->_openPipes[$pipeNumber]);
- unset($this->_openPipes[$pipeNumber]);
- }
- }
-
- // }}}
- // {{{ _getBinary()
-
- /**
- * Gets the name of the GPG binary for the current operating system
- *
- * This method is called if the '<kbd>binary</kbd>' option is <i>not</i>
- * specified when creating this driver.
- *
- * @return string the name of the GPG binary for the current operating
- * system. If no suitable binary could be found, an empty
- * string is returned.
- */
- private function _getBinary()
- {
- $binary = '';
-
- if ($this->_isDarwin) {
- $binaryFiles = array(
- '/opt/local/bin/gpg', // MacPorts
- '/usr/local/bin/gpg', // Mac GPG
- '/sw/bin/gpg', // Fink
- '/usr/bin/gpg'
- );
- } else {
- $binaryFiles = array(
- '/usr/bin/gpg',
- '/usr/local/bin/gpg'
- );
- }
-
- foreach ($binaryFiles as $binaryFile) {
- if (is_executable($binaryFile)) {
- $binary = $binaryFile;
- break;
- }
- }
-
- return $binary;
- }
-
- // }}}
- // {{{ _debug()
-
- /**
- * Displays debug text if debugging is turned on
- *
- * Debugging text is prepended with a debug identifier and echoed to stdout.
- *
- * @param string $text the debugging text to display.
- *
- * @return void
- */
- private function _debug($text)
- {
- if ($this->_debug) {
- if (array_key_exists('SHELL', $_ENV)) {
- foreach (explode(PHP_EOL, $text) as $line) {
- echo "Crypt_GPG DEBUG: ", $line, PHP_EOL;
- }
- } else {
- // running on a web server, format debug output nicely
- foreach (explode(PHP_EOL, $text) as $line) {
- echo "Crypt_GPG DEBUG: <strong>", $line,
- '</strong><br />', PHP_EOL;
- }
- }
- }
- }
-
- // }}}
- // {{{ _byteLength()
-
- /**
- * Gets the length of a string in bytes even if mbstring function
- * overloading is turned on
- *
- * This is used for stream-based communication with the GPG subprocess.
- *
- * @param string $string the string for which to get the length.
- *
- * @return integer the length of the string in bytes.
- *
- * @see Crypt_GPG_Engine::$_mbStringOverload
- */
- private static function _byteLength($string)
- {
- if (self::$_mbStringOverload) {
- return mb_strlen($string, '8bit');
- }
-
- return strlen((binary)$string);
- }
-
- // }}}
- // {{{ _byteSubstring()
-
- /**
- * Gets the substring of a string in bytes even if mbstring function
- * overloading is turned on
- *
- * This is used for stream-based communication with the GPG subprocess.
- *
- * @param string $string the input string.
- * @param integer $start the starting point at which to get the substring.
- * @param integer $length optional. The length of the substring.
- *
- * @return string the extracted part of the string. Unlike the default PHP
- * <kbd>substr()</kbd> function, the returned value is
- * always a string and never false.
- *
- * @see Crypt_GPG_Engine::$_mbStringOverload
- */
- private static function _byteSubstring($string, $start, $length = null)
- {
- if (self::$_mbStringOverload) {
- if ($length === null) {
- return mb_substr(
- $string,
- $start,
- self::_byteLength($string) - $start, '8bit'
- );
- }
-
- return mb_substr($string, $start, $length, '8bit');
- }
-
- if ($length === null) {
- return (string)substr((binary)$string, $start);
- }
-
- return (string)substr((binary)$string, $start, $length);
- }
-
- // }}}
-}
-
-// }}}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/Exceptions.php b/plugins/enigma/lib/Crypt/GPG/Exceptions.php
deleted file mode 100644
index 744acf5d4..000000000
--- a/plugins/enigma/lib/Crypt/GPG/Exceptions.php
+++ /dev/null
@@ -1,473 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Various exception handling classes for Crypt_GPG
- *
- * Crypt_GPG provides an object oriented interface to GNU Privacy
- * Guard (GPG). It requires the GPG executable to be on the system.
- *
- * This file contains various exception classes used by the Crypt_GPG package.
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: Exceptions.php 273745 2009-01-18 05:24:25Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- */
-
-/**
- * PEAR Exception handler and base class
- */
-require_once 'PEAR/Exception.php';
-
-// {{{ class Crypt_GPG_Exception
-
-/**
- * An exception thrown by the Crypt_GPG package
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_Exception extends PEAR_Exception
-{
-}
-
-// }}}
-// {{{ class Crypt_GPG_FileException
-
-/**
- * An exception thrown when a file is used in ways it cannot be used
- *
- * For example, if an output file is specified and the file is not writeable, or
- * if an input file is specified and the file is not readable, this exception
- * is thrown.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2007-2008 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_FileException extends Crypt_GPG_Exception
-{
- // {{{ private class properties
-
- /**
- * The name of the file that caused this exception
- *
- * @var string
- */
- private $_filename = '';
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new Crypt_GPG_FileException
- *
- * @param string $message an error message.
- * @param integer $code a user defined error code.
- * @param string $filename the name of the file that caused this exception.
- */
- public function __construct($message, $code = 0, $filename = '')
- {
- $this->_filename = $filename;
- parent::__construct($message, $code);
- }
-
- // }}}
- // {{{ getFilename()
-
- /**
- * Returns the filename of the file that caused this exception
- *
- * @return string the filename of the file that caused this exception.
- *
- * @see Crypt_GPG_FileException::$_filename
- */
- public function getFilename()
- {
- return $this->_filename;
- }
-
- // }}}
-}
-
-// }}}
-// {{{ class Crypt_GPG_OpenSubprocessException
-
-/**
- * An exception thrown when the GPG subprocess cannot be opened
- *
- * This exception is thrown when the {@link Crypt_GPG_Engine} tries to open a
- * new subprocess and fails.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_OpenSubprocessException extends Crypt_GPG_Exception
-{
- // {{{ private class properties
-
- /**
- * The command used to try to open the subprocess
- *
- * @var string
- */
- private $_command = '';
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new Crypt_GPG_OpenSubprocessException
- *
- * @param string $message an error message.
- * @param integer $code a user defined error code.
- * @param string $command the command that was called to open the
- * new subprocess.
- *
- * @see Crypt_GPG::_openSubprocess()
- */
- public function __construct($message, $code = 0, $command = '')
- {
- $this->_command = $command;
- parent::__construct($message, $code);
- }
-
- // }}}
- // {{{ getCommand()
-
- /**
- * Returns the contents of the internal _command property
- *
- * @return string the command used to open the subprocess.
- *
- * @see Crypt_GPG_OpenSubprocessException::$_command
- */
- public function getCommand()
- {
- return $this->_command;
- }
-
- // }}}
-}
-
-// }}}
-// {{{ class Crypt_GPG_InvalidOperationException
-
-/**
- * An exception thrown when an invalid GPG operation is attempted
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_InvalidOperationException extends Crypt_GPG_Exception
-{
- // {{{ private class properties
-
- /**
- * The attempted operation
- *
- * @var string
- */
- private $_operation = '';
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new Crypt_GPG_OpenSubprocessException
- *
- * @param string $message an error message.
- * @param integer $code a user defined error code.
- * @param string $operation the operation.
- */
- public function __construct($message, $code = 0, $operation = '')
- {
- $this->_operation = $operation;
- parent::__construct($message, $code);
- }
-
- // }}}
- // {{{ getOperation()
-
- /**
- * Returns the contents of the internal _operation property
- *
- * @return string the attempted operation.
- *
- * @see Crypt_GPG_InvalidOperationException::$_operation
- */
- public function getOperation()
- {
- return $this->_operation;
- }
-
- // }}}
-}
-
-// }}}
-// {{{ class Crypt_GPG_KeyNotFoundException
-
-/**
- * An exception thrown when Crypt_GPG fails to find the key for various
- * operations
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_KeyNotFoundException extends Crypt_GPG_Exception
-{
- // {{{ private class properties
-
- /**
- * The key identifier that was searched for
- *
- * @var string
- */
- private $_keyId = '';
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new Crypt_GPG_KeyNotFoundException
- *
- * @param string $message an error message.
- * @param integer $code a user defined error code.
- * @param string $keyId the key identifier of the key.
- */
- public function __construct($message, $code = 0, $keyId= '')
- {
- $this->_keyId = $keyId;
- parent::__construct($message, $code);
- }
-
- // }}}
- // {{{ getKeyId()
-
- /**
- * Gets the key identifier of the key that was not found
- *
- * @return string the key identifier of the key that was not found.
- */
- public function getKeyId()
- {
- return $this->_keyId;
- }
-
- // }}}
-}
-
-// }}}
-// {{{ class Crypt_GPG_NoDataException
-
-/**
- * An exception thrown when Crypt_GPG cannot find valid data for various
- * operations
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2006 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_NoDataException extends Crypt_GPG_Exception
-{
-}
-
-// }}}
-// {{{ class Crypt_GPG_BadPassphraseException
-
-/**
- * An exception thrown when a required passphrase is incorrect or missing
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2006-2008 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_BadPassphraseException extends Crypt_GPG_Exception
-{
- // {{{ private class properties
-
- /**
- * Keys for which the passhprase is missing
- *
- * This contains primary user ids indexed by sub-key id.
- *
- * @var array
- */
- private $_missingPassphrases = array();
-
- /**
- * Keys for which the passhprase is incorrect
- *
- * This contains primary user ids indexed by sub-key id.
- *
- * @var array
- */
- private $_badPassphrases = array();
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new Crypt_GPG_BadPassphraseException
- *
- * @param string $message an error message.
- * @param integer $code a user defined error code.
- * @param string $badPassphrases an array containing user ids of keys
- * for which the passphrase is incorrect.
- * @param string $missingPassphrases an array containing user ids of keys
- * for which the passphrase is missing.
- */
- public function __construct($message, $code = 0,
- array $badPassphrases = array(), array $missingPassphrases = array()
- ) {
- $this->_badPassphrases = $badPassphrases;
- $this->_missingPassphrases = $missingPassphrases;
-
- parent::__construct($message, $code);
- }
-
- // }}}
- // {{{ getBadPassphrases()
-
- /**
- * Gets keys for which the passhprase is incorrect
- *
- * @return array an array of keys for which the passphrase is incorrect.
- * The array contains primary user ids indexed by the sub-key
- * id.
- */
- public function getBadPassphrases()
- {
- return $this->_badPassphrases;
- }
-
- // }}}
- // {{{ getMissingPassphrases()
-
- /**
- * Gets keys for which the passhprase is missing
- *
- * @return array an array of keys for which the passphrase is missing.
- * The array contains primary user ids indexed by the sub-key
- * id.
- */
- public function getMissingPassphrases()
- {
- return $this->_missingPassphrases;
- }
-
- // }}}
-}
-
-// }}}
-// {{{ class Crypt_GPG_DeletePrivateKeyException
-
-/**
- * An exception thrown when an attempt is made to delete public key that has an
- * associated private key on the keyring
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- */
-class Crypt_GPG_DeletePrivateKeyException extends Crypt_GPG_Exception
-{
- // {{{ private class properties
-
- /**
- * The key identifier the deletion attempt was made upon
- *
- * @var string
- */
- private $_keyId = '';
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new Crypt_GPG_DeletePrivateKeyException
- *
- * @param string $message an error message.
- * @param integer $code a user defined error code.
- * @param string $keyId the key identifier of the public key that was
- * attempted to delete.
- *
- * @see Crypt_GPG::deletePublicKey()
- */
- public function __construct($message, $code = 0, $keyId = '')
- {
- $this->_keyId = $keyId;
- parent::__construct($message, $code);
- }
-
- // }}}
- // {{{ getKeyId()
-
- /**
- * Gets the key identifier of the key that was not found
- *
- * @return string the key identifier of the key that was not found.
- */
- public function getKeyId()
- {
- return $this->_keyId;
- }
-
- // }}}
-}
-
-// }}}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/Key.php b/plugins/enigma/lib/Crypt/GPG/Key.php
deleted file mode 100644
index 67a4b9c7d..000000000
--- a/plugins/enigma/lib/Crypt/GPG/Key.php
+++ /dev/null
@@ -1,223 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Contains a class representing GPG keys
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: Key.php 295621 2010-03-01 04:18:54Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- */
-
-/**
- * Sub-key class definition
- */
-require_once 'Crypt/GPG/SubKey.php';
-
-/**
- * User id class definition
- */
-require_once 'Crypt/GPG/UserId.php';
-
-// {{{ class Crypt_GPG_Key
-
-/**
- * A data class for GPG key information
- *
- * This class is used to store the results of the {@link Crypt_GPG::getKeys()}
- * method.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @see Crypt_GPG::getKeys()
- */
-class Crypt_GPG_Key
-{
- // {{{ class properties
-
- /**
- * The user ids associated with this key
- *
- * This is an array of {@link Crypt_GPG_UserId} objects.
- *
- * @var array
- *
- * @see Crypt_GPG_Key::addUserId()
- * @see Crypt_GPG_Key::getUserIds()
- */
- private $_userIds = array();
-
- /**
- * The subkeys of this key
- *
- * This is an array of {@link Crypt_GPG_SubKey} objects.
- *
- * @var array
- *
- * @see Crypt_GPG_Key::addSubKey()
- * @see Crypt_GPG_Key::getSubKeys()
- */
- private $_subKeys = array();
-
- // }}}
- // {{{ getSubKeys()
-
- /**
- * Gets the sub-keys of this key
- *
- * @return array the sub-keys of this key.
- *
- * @see Crypt_GPG_Key::addSubKey()
- */
- public function getSubKeys()
- {
- return $this->_subKeys;
- }
-
- // }}}
- // {{{ getUserIds()
-
- /**
- * Gets the user ids of this key
- *
- * @return array the user ids of this key.
- *
- * @see Crypt_GPG_Key::addUserId()
- */
- public function getUserIds()
- {
- return $this->_userIds;
- }
-
- // }}}
- // {{{ getPrimaryKey()
-
- /**
- * Gets the primary sub-key of this key
- *
- * The primary key is the first added sub-key.
- *
- * @return Crypt_GPG_SubKey the primary sub-key of this key.
- */
- public function getPrimaryKey()
- {
- $primary_key = null;
- if (count($this->_subKeys) > 0) {
- $primary_key = $this->_subKeys[0];
- }
- return $primary_key;
- }
-
- // }}}
- // {{{ canSign()
-
- /**
- * Gets whether or not this key can sign data
- *
- * This key can sign data if any sub-key of this key can sign data.
- *
- * @return boolean true if this key can sign data and false if this key
- * cannot sign data.
- */
- public function canSign()
- {
- $canSign = false;
- foreach ($this->_subKeys as $subKey) {
- if ($subKey->canSign()) {
- $canSign = true;
- break;
- }
- }
- return $canSign;
- }
-
- // }}}
- // {{{ canEncrypt()
-
- /**
- * Gets whether or not this key can encrypt data
- *
- * This key can encrypt data if any sub-key of this key can encrypt data.
- *
- * @return boolean true if this key can encrypt data and false if this
- * key cannot encrypt data.
- */
- public function canEncrypt()
- {
- $canEncrypt = false;
- foreach ($this->_subKeys as $subKey) {
- if ($subKey->canEncrypt()) {
- $canEncrypt = true;
- break;
- }
- }
- return $canEncrypt;
- }
-
- // }}}
- // {{{ addSubKey()
-
- /**
- * Adds a sub-key to this key
- *
- * The first added sub-key will be the primary key of this key.
- *
- * @param Crypt_GPG_SubKey $subKey the sub-key to add.
- *
- * @return Crypt_GPG_Key the current object, for fluent interface.
- */
- public function addSubKey(Crypt_GPG_SubKey $subKey)
- {
- $this->_subKeys[] = $subKey;
- return $this;
- }
-
- // }}}
- // {{{ addUserId()
-
- /**
- * Adds a user id to this key
- *
- * @param Crypt_GPG_UserId $userId the user id to add.
- *
- * @return Crypt_GPG_Key the current object, for fluent interface.
- */
- public function addUserId(Crypt_GPG_UserId $userId)
- {
- $this->_userIds[] = $userId;
- return $this;
- }
-
- // }}}
-}
-
-// }}}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/Signature.php b/plugins/enigma/lib/Crypt/GPG/Signature.php
deleted file mode 100644
index 03ab44c53..000000000
--- a/plugins/enigma/lib/Crypt/GPG/Signature.php
+++ /dev/null
@@ -1,428 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * A class representing GPG signatures
- *
- * This file contains a data class representing a GPG signature.
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: Signature.php 302773 2010-08-25 14:16:28Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- */
-
-/**
- * User id class definition
- */
-require_once 'Crypt/GPG/UserId.php';
-
-// {{{ class Crypt_GPG_Signature
-
-/**
- * A class for GPG signature information
- *
- * This class is used to store the results of the Crypt_GPG::verify() method.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @see Crypt_GPG::verify()
- */
-class Crypt_GPG_Signature
-{
- // {{{ class properties
-
- /**
- * A base64-encoded string containing a unique id for this signature if
- * this signature has been verified as ok
- *
- * This id is used to prevent replay attacks and is not present for all
- * types of signatures.
- *
- * @var string
- */
- private $_id = '';
-
- /**
- * The fingerprint of the key used to create the signature
- *
- * @var string
- */
- private $_keyFingerprint = '';
-
- /**
- * The id of the key used to create the signature
- *
- * @var string
- */
- private $_keyId = '';
-
- /**
- * The creation date of this signature
- *
- * This is a Unix timestamp.
- *
- * @var integer
- */
- private $_creationDate = 0;
-
- /**
- * The expiration date of the signature
- *
- * This is a Unix timestamp. If this signature does not expire, this will
- * be zero.
- *
- * @var integer
- */
- private $_expirationDate = 0;
-
- /**
- * The user id associated with this signature
- *
- * @var Crypt_GPG_UserId
- */
- private $_userId = null;
-
- /**
- * Whether or not this signature is valid
- *
- * @var boolean
- */
- private $_isValid = false;
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new signature
- *
- * Signatures can be initialized from an array of named values. Available
- * names are:
- *
- * - <kbd>string id</kbd> - the unique id of this signature.
- * - <kbd>string fingerprint</kbd> - the fingerprint of the key used to
- * create the signature. The fingerprint
- * should not contain formatting
- * characters.
- * - <kbd>string keyId</kbd> - the id of the key used to create the
- * the signature.
- * - <kbd>integer creation</kbd> - the date the signature was created.
- * This is a UNIX timestamp.
- * - <kbd>integer expiration</kbd> - the date the signature expired. This
- * is a UNIX timestamp. If the signature
- * does not expire, use 0.
- * - <kbd>boolean valid</kbd> - whether or not the signature is valid.
- * - <kbd>string userId</kbd> - the user id associated with the
- * signature. This may also be a
- * {@link Crypt_GPG_UserId} object.
- *
- * @param Crypt_GPG_Signature|array $signature optional. Either an existing
- * signature object, which is copied; or an array of initial values.
- */
- public function __construct($signature = null)
- {
- // copy from object
- if ($signature instanceof Crypt_GPG_Signature) {
- $this->_id = $signature->_id;
- $this->_keyFingerprint = $signature->_keyFingerprint;
- $this->_keyId = $signature->_keyId;
- $this->_creationDate = $signature->_creationDate;
- $this->_expirationDate = $signature->_expirationDate;
- $this->_isValid = $signature->_isValid;
-
- if ($signature->_userId instanceof Crypt_GPG_UserId) {
- $this->_userId = clone $signature->_userId;
- } else {
- $this->_userId = $signature->_userId;
- }
- }
-
- // initialize from array
- if (is_array($signature)) {
- if (array_key_exists('id', $signature)) {
- $this->setId($signature['id']);
- }
-
- if (array_key_exists('fingerprint', $signature)) {
- $this->setKeyFingerprint($signature['fingerprint']);
- }
-
- if (array_key_exists('keyId', $signature)) {
- $this->setKeyId($signature['keyId']);
- }
-
- if (array_key_exists('creation', $signature)) {
- $this->setCreationDate($signature['creation']);
- }
-
- if (array_key_exists('expiration', $signature)) {
- $this->setExpirationDate($signature['expiration']);
- }
-
- if (array_key_exists('valid', $signature)) {
- $this->setValid($signature['valid']);
- }
-
- if (array_key_exists('userId', $signature)) {
- $userId = new Crypt_GPG_UserId($signature['userId']);
- $this->setUserId($userId);
- }
- }
- }
-
- // }}}
- // {{{ getId()
-
- /**
- * Gets the id of this signature
- *
- * @return string a base64-encoded string containing a unique id for this
- * signature. This id is used to prevent replay attacks and
- * is not present for all types of signatures.
- */
- public function getId()
- {
- return $this->_id;
- }
-
- // }}}
- // {{{ getKeyFingerprint()
-
- /**
- * Gets the fingerprint of the key used to create this signature
- *
- * @return string the fingerprint of the key used to create this signature.
- */
- public function getKeyFingerprint()
- {
- return $this->_keyFingerprint;
- }
-
- // }}}
- // {{{ getKeyId()
-
- /**
- * Gets the id of the key used to create this signature
- *
- * Whereas the fingerprint of the signing key may not always be available
- * (for example if the signature is bad), the id should always be
- * available.
- *
- * @return string the id of the key used to create this signature.
- */
- public function getKeyId()
- {
- return $this->_keyId;
- }
-
- // }}}
- // {{{ getCreationDate()
-
- /**
- * Gets the creation date of this signature
- *
- * @return integer the creation date of this signature. This is a Unix
- * timestamp.
- */
- public function getCreationDate()
- {
- return $this->_creationDate;
- }
-
- // }}}
- // {{{ getExpirationDate()
-
- /**
- * Gets the expiration date of the signature
- *
- * @return integer the expiration date of this signature. This is a Unix
- * timestamp. If this signature does not expire, this will
- * be zero.
- */
- public function getExpirationDate()
- {
- return $this->_expirationDate;
- }
-
- // }}}
- // {{{ getUserId()
-
- /**
- * Gets the user id associated with this signature
- *
- * @return Crypt_GPG_UserId the user id associated with this signature.
- */
- public function getUserId()
- {
- return $this->_userId;
- }
-
- // }}}
- // {{{ isValid()
-
- /**
- * Gets whether or no this signature is valid
- *
- * @return boolean true if this signature is valid and false if it is not.
- */
- public function isValid()
- {
- return $this->_isValid;
- }
-
- // }}}
- // {{{ setId()
-
- /**
- * Sets the id of this signature
- *
- * @param string $id a base64-encoded string containing a unique id for
- * this signature.
- *
- * @return Crypt_GPG_Signature the current object, for fluent interface.
- *
- * @see Crypt_GPG_Signature::getId()
- */
- public function setId($id)
- {
- $this->_id = strval($id);
- return $this;
- }
-
- // }}}
- // {{{ setKeyFingerprint()
-
- /**
- * Sets the key fingerprint of this signature
- *
- * @param string $fingerprint the key fingerprint of this signature. This
- * is the fingerprint of the primary key used to
- * create this signature.
- *
- * @return Crypt_GPG_Signature the current object, for fluent interface.
- */
- public function setKeyFingerprint($fingerprint)
- {
- $this->_keyFingerprint = strval($fingerprint);
- return $this;
- }
-
- // }}}
- // {{{ setKeyId()
-
- /**
- * Sets the key id of this signature
- *
- * @param string $id the key id of this signature. This is the id of the
- * primary key used to create this signature.
- *
- * @return Crypt_GPG_Signature the current object, for fluent interface.
- */
- public function setKeyId($id)
- {
- $this->_keyId = strval($id);
- return $this;
- }
-
- // }}}
- // {{{ setCreationDate()
-
- /**
- * Sets the creation date of this signature
- *
- * @param integer $creationDate the creation date of this signature. This
- * is a Unix timestamp.
- *
- * @return Crypt_GPG_Signature the current object, for fluent interface.
- */
- public function setCreationDate($creationDate)
- {
- $this->_creationDate = intval($creationDate);
- return $this;
- }
-
- // }}}
- // {{{ setExpirationDate()
-
- /**
- * Sets the expiration date of this signature
- *
- * @param integer $expirationDate the expiration date of this signature.
- * This is a Unix timestamp. Specify zero if
- * this signature does not expire.
- *
- * @return Crypt_GPG_Signature the current object, for fluent interface.
- */
- public function setExpirationDate($expirationDate)
- {
- $this->_expirationDate = intval($expirationDate);
- return $this;
- }
-
- // }}}
- // {{{ setUserId()
-
- /**
- * Sets the user id associated with this signature
- *
- * @param Crypt_GPG_UserId $userId the user id associated with this
- * signature.
- *
- * @return Crypt_GPG_Signature the current object, for fluent interface.
- */
- public function setUserId(Crypt_GPG_UserId $userId)
- {
- $this->_userId = $userId;
- return $this;
- }
-
- // }}}
- // {{{ setValid()
-
- /**
- * Sets whether or not this signature is valid
- *
- * @param boolean $isValid true if this signature is valid and false if it
- * is not.
- *
- * @return Crypt_GPG_Signature the current object, for fluent interface.
- */
- public function setValid($isValid)
- {
- $this->_isValid = ($isValid) ? true : false;
- return $this;
- }
-
- // }}}
-}
-
-// }}}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/SubKey.php b/plugins/enigma/lib/Crypt/GPG/SubKey.php
deleted file mode 100644
index b6316e99f..000000000
--- a/plugins/enigma/lib/Crypt/GPG/SubKey.php
+++ /dev/null
@@ -1,649 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Contains a class representing GPG sub-keys and constants for GPG algorithms
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: SubKey.php 302768 2010-08-25 13:45:52Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- */
-
-// {{{ class Crypt_GPG_SubKey
-
-/**
- * A class for GPG sub-key information
- *
- * This class is used to store the results of the {@link Crypt_GPG::getKeys()}
- * method. Sub-key objects are members of a {@link Crypt_GPG_Key} object.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @author Nathan Fredrickson <nathan@silverorange.com>
- * @copyright 2005-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @see Crypt_GPG::getKeys()
- * @see Crypt_GPG_Key::getSubKeys()
- */
-class Crypt_GPG_SubKey
-{
- // {{{ class constants
-
- /**
- * RSA encryption algorithm.
- */
- const ALGORITHM_RSA = 1;
-
- /**
- * Elgamal encryption algorithm (encryption only).
- */
- const ALGORITHM_ELGAMAL_ENC = 16;
-
- /**
- * DSA encryption algorithm (sometimes called DH, sign only).
- */
- const ALGORITHM_DSA = 17;
-
- /**
- * Elgamal encryption algorithm (signage and encryption - should not be
- * used).
- */
- const ALGORITHM_ELGAMAL_ENC_SGN = 20;
-
- // }}}
- // {{{ class properties
-
- /**
- * The id of this sub-key
- *
- * @var string
- */
- private $_id = '';
-
- /**
- * The algorithm used to create this sub-key
- *
- * The value is one of the Crypt_GPG_SubKey::ALGORITHM_* constants.
- *
- * @var integer
- */
- private $_algorithm = 0;
-
- /**
- * The fingerprint of this sub-key
- *
- * @var string
- */
- private $_fingerprint = '';
-
- /**
- * Length of this sub-key in bits
- *
- * @var integer
- */
- private $_length = 0;
-
- /**
- * Date this sub-key was created
- *
- * This is a Unix timestamp.
- *
- * @var integer
- */
- private $_creationDate = 0;
-
- /**
- * Date this sub-key expires
- *
- * This is a Unix timestamp. If this sub-key does not expire, this will be
- * zero.
- *
- * @var integer
- */
- private $_expirationDate = 0;
-
- /**
- * Whether or not this sub-key can sign data
- *
- * @var boolean
- */
- private $_canSign = false;
-
- /**
- * Whether or not this sub-key can encrypt data
- *
- * @var boolean
- */
- private $_canEncrypt = false;
-
- /**
- * Whether or not the private key for this sub-key exists in the keyring
- *
- * @var boolean
- */
- private $_hasPrivate = false;
-
- /**
- * Whether or not this sub-key is revoked
- *
- * @var boolean
- */
- private $_isRevoked = false;
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new sub-key object
- *
- * Sub-keys can be initialized from an array of named values. Available
- * names are:
- *
- * - <kbd>string id</kbd> - the key id of the sub-key.
- * - <kbd>integer algorithm</kbd> - the encryption algorithm of the
- * sub-key.
- * - <kbd>string fingerprint</kbd> - the fingerprint of the sub-key. The
- * fingerprint should not contain
- * formatting characters.
- * - <kbd>integer length</kbd> - the length of the sub-key in bits.
- * - <kbd>integer creation</kbd> - the date the sub-key was created.
- * This is a UNIX timestamp.
- * - <kbd>integer expiration</kbd> - the date the sub-key expires. This
- * is a UNIX timestamp. If the sub-key
- * does not expire, use 0.
- * - <kbd>boolean canSign</kbd> - whether or not the sub-key can be
- * used to sign data.
- * - <kbd>boolean canEncrypt</kbd> - whether or not the sub-key can be
- * used to encrypt data.
- * - <kbd>boolean hasPrivate</kbd> - whether or not the private key for
- * the sub-key exists in the keyring.
- * - <kbd>boolean isRevoked</kbd> - whether or not this sub-key is
- * revoked.
- *
- * @param Crypt_GPG_SubKey|string|array $key optional. Either an existing
- * sub-key object, which is copied; a sub-key string, which is
- * parsed; or an array of initial values.
- */
- public function __construct($key = null)
- {
- // parse from string
- if (is_string($key)) {
- $key = self::parse($key);
- }
-
- // copy from object
- if ($key instanceof Crypt_GPG_SubKey) {
- $this->_id = $key->_id;
- $this->_algorithm = $key->_algorithm;
- $this->_fingerprint = $key->_fingerprint;
- $this->_length = $key->_length;
- $this->_creationDate = $key->_creationDate;
- $this->_expirationDate = $key->_expirationDate;
- $this->_canSign = $key->_canSign;
- $this->_canEncrypt = $key->_canEncrypt;
- $this->_hasPrivate = $key->_hasPrivate;
- $this->_isRevoked = $key->_isRevoked;
- }
-
- // initialize from array
- if (is_array($key)) {
- if (array_key_exists('id', $key)) {
- $this->setId($key['id']);
- }
-
- if (array_key_exists('algorithm', $key)) {
- $this->setAlgorithm($key['algorithm']);
- }
-
- if (array_key_exists('fingerprint', $key)) {
- $this->setFingerprint($key['fingerprint']);
- }
-
- if (array_key_exists('length', $key)) {
- $this->setLength($key['length']);
- }
-
- if (array_key_exists('creation', $key)) {
- $this->setCreationDate($key['creation']);
- }
-
- if (array_key_exists('expiration', $key)) {
- $this->setExpirationDate($key['expiration']);
- }
-
- if (array_key_exists('canSign', $key)) {
- $this->setCanSign($key['canSign']);
- }
-
- if (array_key_exists('canEncrypt', $key)) {
- $this->setCanEncrypt($key['canEncrypt']);
- }
-
- if (array_key_exists('hasPrivate', $key)) {
- $this->setHasPrivate($key['hasPrivate']);
- }
-
- if (array_key_exists('isRevoked', $key)) {
- $this->setRevoked($key['isRevoked']);
- }
- }
- }
-
- // }}}
- // {{{ getId()
-
- /**
- * Gets the id of this sub-key
- *
- * @return string the id of this sub-key.
- */
- public function getId()
- {
- return $this->_id;
- }
-
- // }}}
- // {{{ getAlgorithm()
-
- /**
- * Gets the algorithm used by this sub-key
- *
- * The algorithm should be one of the Crypt_GPG_SubKey::ALGORITHM_*
- * constants.
- *
- * @return integer the algorithm used by this sub-key.
- */
- public function getAlgorithm()
- {
- return $this->_algorithm;
- }
-
- // }}}
- // {{{ getCreationDate()
-
- /**
- * Gets the creation date of this sub-key
- *
- * This is a Unix timestamp.
- *
- * @return integer the creation date of this sub-key.
- */
- public function getCreationDate()
- {
- return $this->_creationDate;
- }
-
- // }}}
- // {{{ getExpirationDate()
-
- /**
- * Gets the date this sub-key expires
- *
- * This is a Unix timestamp. If this sub-key does not expire, this will be
- * zero.
- *
- * @return integer the date this sub-key expires.
- */
- public function getExpirationDate()
- {
- return $this->_expirationDate;
- }
-
- // }}}
- // {{{ getFingerprint()
-
- /**
- * Gets the fingerprint of this sub-key
- *
- * @return string the fingerprint of this sub-key.
- */
- public function getFingerprint()
- {
- return $this->_fingerprint;
- }
-
- // }}}
- // {{{ getLength()
-
- /**
- * Gets the length of this sub-key in bits
- *
- * @return integer the length of this sub-key in bits.
- */
- public function getLength()
- {
- return $this->_length;
- }
-
- // }}}
- // {{{ canSign()
-
- /**
- * Gets whether or not this sub-key can sign data
- *
- * @return boolean true if this sub-key can sign data and false if this
- * sub-key can not sign data.
- */
- public function canSign()
- {
- return $this->_canSign;
- }
-
- // }}}
- // {{{ canEncrypt()
-
- /**
- * Gets whether or not this sub-key can encrypt data
- *
- * @return boolean true if this sub-key can encrypt data and false if this
- * sub-key can not encrypt data.
- */
- public function canEncrypt()
- {
- return $this->_canEncrypt;
- }
-
- // }}}
- // {{{ hasPrivate()
-
- /**
- * Gets whether or not the private key for this sub-key exists in the
- * keyring
- *
- * @return boolean true the private key for this sub-key exists in the
- * keyring and false if it does not.
- */
- public function hasPrivate()
- {
- return $this->_hasPrivate;
- }
-
- // }}}
- // {{{ isRevoked()
-
- /**
- * Gets whether or not this sub-key is revoked
- *
- * @return boolean true if this sub-key is revoked and false if it is not.
- */
- public function isRevoked()
- {
- return $this->_isRevoked;
- }
-
- // }}}
- // {{{ setCreationDate()
-
- /**
- * Sets the creation date of this sub-key
- *
- * The creation date is a Unix timestamp.
- *
- * @param integer $creationDate the creation date of this sub-key.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setCreationDate($creationDate)
- {
- $this->_creationDate = intval($creationDate);
- return $this;
- }
-
- // }}}
- // {{{ setExpirationDate()
-
- /**
- * Sets the expiration date of this sub-key
- *
- * The expiration date is a Unix timestamp. Specify zero if this sub-key
- * does not expire.
- *
- * @param integer $expirationDate the expiration date of this sub-key.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setExpirationDate($expirationDate)
- {
- $this->_expirationDate = intval($expirationDate);
- return $this;
- }
-
- // }}}
- // {{{ setId()
-
- /**
- * Sets the id of this sub-key
- *
- * @param string $id the id of this sub-key.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setId($id)
- {
- $this->_id = strval($id);
- return $this;
- }
-
- // }}}
- // {{{ setAlgorithm()
-
- /**
- * Sets the algorithm used by this sub-key
- *
- * @param integer $algorithm the algorithm used by this sub-key.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setAlgorithm($algorithm)
- {
- $this->_algorithm = intval($algorithm);
- return $this;
- }
-
- // }}}
- // {{{ setFingerprint()
-
- /**
- * Sets the fingerprint of this sub-key
- *
- * @param string $fingerprint the fingerprint of this sub-key.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setFingerprint($fingerprint)
- {
- $this->_fingerprint = strval($fingerprint);
- return $this;
- }
-
- // }}}
- // {{{ setLength()
-
- /**
- * Sets the length of this sub-key in bits
- *
- * @param integer $length the length of this sub-key in bits.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setLength($length)
- {
- $this->_length = intval($length);
- return $this;
- }
-
- // }}}
- // {{{ setCanSign()
-
- /**
- * Sets whether of not this sub-key can sign data
- *
- * @param boolean $canSign true if this sub-key can sign data and false if
- * it can not.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setCanSign($canSign)
- {
- $this->_canSign = ($canSign) ? true : false;
- return $this;
- }
-
- // }}}
- // {{{ setCanEncrypt()
-
- /**
- * Sets whether of not this sub-key can encrypt data
- *
- * @param boolean $canEncrypt true if this sub-key can encrypt data and
- * false if it can not.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setCanEncrypt($canEncrypt)
- {
- $this->_canEncrypt = ($canEncrypt) ? true : false;
- return $this;
- }
-
- // }}}
- // {{{ setHasPrivate()
-
- /**
- * Sets whether of not the private key for this sub-key exists in the
- * keyring
- *
- * @param boolean $hasPrivate true if the private key for this sub-key
- * exists in the keyring and false if it does
- * not.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setHasPrivate($hasPrivate)
- {
- $this->_hasPrivate = ($hasPrivate) ? true : false;
- return $this;
- }
-
- // }}}
- // {{{ setRevoked()
-
- /**
- * Sets whether or not this sub-key is revoked
- *
- * @param boolean $isRevoked whether or not this sub-key is revoked.
- *
- * @return Crypt_GPG_SubKey the current object, for fluent interface.
- */
- public function setRevoked($isRevoked)
- {
- $this->_isRevoked = ($isRevoked) ? true : false;
- return $this;
- }
-
- // }}}
- // {{{ parse()
-
- /**
- * Parses a sub-key object from a sub-key string
- *
- * See <b>doc/DETAILS</b> in the
- * {@link http://www.gnupg.org/download/ GPG distribution} for information
- * on how the sub-key string is parsed.
- *
- * @param string $string the string containing the sub-key.
- *
- * @return Crypt_GPG_SubKey the sub-key object parsed from the string.
- */
- public static function parse($string)
- {
- $tokens = explode(':', $string);
-
- $subKey = new Crypt_GPG_SubKey();
-
- $subKey->setId($tokens[4]);
- $subKey->setLength($tokens[2]);
- $subKey->setAlgorithm($tokens[3]);
- $subKey->setCreationDate(self::_parseDate($tokens[5]));
- $subKey->setExpirationDate(self::_parseDate($tokens[6]));
-
- if ($tokens[1] == 'r') {
- $subKey->setRevoked(true);
- }
-
- if (strpos($tokens[11], 's') !== false) {
- $subKey->setCanSign(true);
- }
-
- if (strpos($tokens[11], 'e') !== false) {
- $subKey->setCanEncrypt(true);
- }
-
- return $subKey;
- }
-
- // }}}
- // {{{ _parseDate()
-
- /**
- * Parses a date string as provided by GPG into a UNIX timestamp
- *
- * @param string $string the date string.
- *
- * @return integer the UNIX timestamp corresponding to the provided date
- * string.
- */
- private static function _parseDate($string)
- {
- if ($string == '') {
- $timestamp = 0;
- } else {
- // all times are in UTC according to GPG documentation
- $timeZone = new DateTimeZone('UTC');
-
- if (strpos($string, 'T') === false) {
- // interpret as UNIX timestamp
- $string = '@' . $string;
- }
-
- $date = new DateTime($string, $timeZone);
-
- // convert to UNIX timestamp
- $timestamp = intval($date->format('U'));
- }
-
- return $timestamp;
- }
-
- // }}}
-}
-
-// }}}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/UserId.php b/plugins/enigma/lib/Crypt/GPG/UserId.php
deleted file mode 100644
index 04435708c..000000000
--- a/plugins/enigma/lib/Crypt/GPG/UserId.php
+++ /dev/null
@@ -1,373 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Contains a data class representing a GPG user id
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: UserId.php 295621 2010-03-01 04:18:54Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- */
-
-// {{{ class Crypt_GPG_UserId
-
-/**
- * A class for GPG user id information
- *
- * This class is used to store the results of the {@link Crypt_GPG::getKeys()}
- * method. User id objects are members of a {@link Crypt_GPG_Key} object.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008-2010 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @see Crypt_GPG::getKeys()
- * @see Crypt_GPG_Key::getUserIds()
- */
-class Crypt_GPG_UserId
-{
- // {{{ class properties
-
- /**
- * The name field of this user id
- *
- * @var string
- */
- private $_name = '';
-
- /**
- * The comment field of this user id
- *
- * @var string
- */
- private $_comment = '';
-
- /**
- * The email field of this user id
- *
- * @var string
- */
- private $_email = '';
-
- /**
- * Whether or not this user id is revoked
- *
- * @var boolean
- */
- private $_isRevoked = false;
-
- /**
- * Whether or not this user id is valid
- *
- * @var boolean
- */
- private $_isValid = true;
-
- // }}}
- // {{{ __construct()
-
- /**
- * Creates a new user id
- *
- * User ids can be initialized from an array of named values. Available
- * names are:
- *
- * - <kbd>string name</kbd> - the name field of the user id.
- * - <kbd>string comment</kbd> - the comment field of the user id.
- * - <kbd>string email</kbd> - the email field of the user id.
- * - <kbd>boolean valid</kbd> - whether or not the user id is valid.
- * - <kbd>boolean revoked</kbd> - whether or not the user id is revoked.
- *
- * @param Crypt_GPG_UserId|string|array $userId optional. Either an
- * existing user id object, which is copied; a user id string, which
- * is parsed; or an array of initial values.
- */
- public function __construct($userId = null)
- {
- // parse from string
- if (is_string($userId)) {
- $userId = self::parse($userId);
- }
-
- // copy from object
- if ($userId instanceof Crypt_GPG_UserId) {
- $this->_name = $userId->_name;
- $this->_comment = $userId->_comment;
- $this->_email = $userId->_email;
- $this->_isRevoked = $userId->_isRevoked;
- $this->_isValid = $userId->_isValid;
- }
-
- // initialize from array
- if (is_array($userId)) {
- if (array_key_exists('name', $userId)) {
- $this->setName($userId['name']);
- }
-
- if (array_key_exists('comment', $userId)) {
- $this->setComment($userId['comment']);
- }
-
- if (array_key_exists('email', $userId)) {
- $this->setEmail($userId['email']);
- }
-
- if (array_key_exists('revoked', $userId)) {
- $this->setRevoked($userId['revoked']);
- }
-
- if (array_key_exists('valid', $userId)) {
- $this->setValid($userId['valid']);
- }
- }
- }
-
- // }}}
- // {{{ getName()
-
- /**
- * Gets the name field of this user id
- *
- * @return string the name field of this user id.
- */
- public function getName()
- {
- return $this->_name;
- }
-
- // }}}
- // {{{ getComment()
-
- /**
- * Gets the comments field of this user id
- *
- * @return string the comments field of this user id.
- */
- public function getComment()
- {
- return $this->_comment;
- }
-
- // }}}
- // {{{ getEmail()
-
- /**
- * Gets the email field of this user id
- *
- * @return string the email field of this user id.
- */
- public function getEmail()
- {
- return $this->_email;
- }
-
- // }}}
- // {{{ isRevoked()
-
- /**
- * Gets whether or not this user id is revoked
- *
- * @return boolean true if this user id is revoked and false if it is not.
- */
- public function isRevoked()
- {
- return $this->_isRevoked;
- }
-
- // }}}
- // {{{ isValid()
-
- /**
- * Gets whether or not this user id is valid
- *
- * @return boolean true if this user id is valid and false if it is not.
- */
- public function isValid()
- {
- return $this->_isValid;
- }
-
- // }}}
- // {{{ __toString()
-
- /**
- * Gets a string representation of this user id
- *
- * The string is formatted as:
- * <b><kbd>name (comment) <email-address></kbd></b>.
- *
- * @return string a string representation of this user id.
- */
- public function __toString()
- {
- $components = array();
-
- if (strlen($this->_name) > 0) {
- $components[] = $this->_name;
- }
-
- if (strlen($this->_comment) > 0) {
- $components[] = '(' . $this->_comment . ')';
- }
-
- if (strlen($this->_email) > 0) {
- $components[] = '<' . $this->_email. '>';
- }
-
- return implode(' ', $components);
- }
-
- // }}}
- // {{{ setName()
-
- /**
- * Sets the name field of this user id
- *
- * @param string $name the name field of this user id.
- *
- * @return Crypt_GPG_UserId the current object, for fluent interface.
- */
- public function setName($name)
- {
- $this->_name = strval($name);
- return $this;
- }
-
- // }}}
- // {{{ setComment()
-
- /**
- * Sets the comment field of this user id
- *
- * @param string $comment the comment field of this user id.
- *
- * @return Crypt_GPG_UserId the current object, for fluent interface.
- */
- public function setComment($comment)
- {
- $this->_comment = strval($comment);
- return $this;
- }
-
- // }}}
- // {{{ setEmail()
-
- /**
- * Sets the email field of this user id
- *
- * @param string $email the email field of this user id.
- *
- * @return Crypt_GPG_UserId the current object, for fluent interface.
- */
- public function setEmail($email)
- {
- $this->_email = strval($email);
- return $this;
- }
-
- // }}}
- // {{{ setRevoked()
-
- /**
- * Sets whether or not this user id is revoked
- *
- * @param boolean $isRevoked whether or not this user id is revoked.
- *
- * @return Crypt_GPG_UserId the current object, for fluent interface.
- */
- public function setRevoked($isRevoked)
- {
- $this->_isRevoked = ($isRevoked) ? true : false;
- return $this;
- }
-
- // }}}
- // {{{ setValid()
-
- /**
- * Sets whether or not this user id is valid
- *
- * @param boolean $isValid whether or not this user id is valid.
- *
- * @return Crypt_GPG_UserId the current object, for fluent interface.
- */
- public function setValid($isValid)
- {
- $this->_isValid = ($isValid) ? true : false;
- return $this;
- }
-
- // }}}
- // {{{ parse()
-
- /**
- * Parses a user id object from a user id string
- *
- * A user id string is of the form:
- * <b><kbd>name (comment) <email-address></kbd></b> with the <i>comment</i>
- * and <i>email-address</i> fields being optional.
- *
- * @param string $string the user id string to parse.
- *
- * @return Crypt_GPG_UserId the user id object parsed from the string.
- */
- public static function parse($string)
- {
- $userId = new Crypt_GPG_UserId();
- $email = '';
- $comment = '';
-
- // get email address from end of string if it exists
- $matches = array();
- if (preg_match('/^(.+?) <([^>]+)>$/', $string, $matches) === 1) {
- $string = $matches[1];
- $email = $matches[2];
- }
-
- // get comment from end of string if it exists
- $matches = array();
- if (preg_match('/^(.+?) \(([^\)]+)\)$/', $string, $matches) === 1) {
- $string = $matches[1];
- $comment = $matches[2];
- }
-
- $name = $string;
-
- $userId->setName($name);
- $userId->setComment($comment);
- $userId->setEmail($email);
-
- return $userId;
- }
-
- // }}}
-}
-
-// }}}
-
-?>
diff --git a/plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php b/plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php
deleted file mode 100644
index 083bd3012..000000000
--- a/plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php
+++ /dev/null
@@ -1,216 +0,0 @@
-<?php
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Crypt_GPG is a package to use GPG from PHP
- *
- * This file contains an object that handles GPG's status output for the verify
- * operation.
- *
- * PHP version 5
- *
- * LICENSE:
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of the
- * License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version CVS: $Id: VerifyStatusHandler.php 302908 2010-08-31 03:56:54Z gauthierm $
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://www.gnupg.org/
- */
-
-/**
- * Signature object class definition
- */
-require_once 'Crypt/GPG/Signature.php';
-
-/**
- * Status line handler for the verify operation
- *
- * This class is used internally by Crypt_GPG and does not need be used
- * directly. See the {@link Crypt_GPG} class for end-user API.
- *
- * This class is responsible for building signature objects that are returned
- * by the {@link Crypt_GPG::verify()} method. See <b>doc/DETAILS</b> in the
- * {@link http://www.gnupg.org/download/ GPG distribution} for detailed
- * information on GPG's status output for the verify operation.
- *
- * @category Encryption
- * @package Crypt_GPG
- * @author Michael Gauthier <mike@silverorange.com>
- * @copyright 2008 silverorange
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @link http://pear.php.net/package/Crypt_GPG
- * @link http://www.gnupg.org/
- */
-class Crypt_GPG_VerifyStatusHandler
-{
- // {{{ protected properties
-
- /**
- * The current signature id
- *
- * Ths signature id is emitted by GPG before the new signature line so we
- * must remember it temporarily.
- *
- * @var string
- */
- protected $signatureId = '';
-
- /**
- * List of parsed {@link Crypt_GPG_Signature} objects
- *
- * @var array
- */
- protected $signatures = array();
-
- /**
- * Array index of the current signature
- *
- * @var integer
- */
- protected $index = -1;
-
- // }}}
- // {{{ handle()
-
- /**
- * Handles a status line
- *
- * @param string $line the status line to handle.
- *
- * @return void
- */
- public function handle($line)
- {
- $tokens = explode(' ', $line);
- switch ($tokens[0]) {
- case 'GOODSIG':
- case 'EXPSIG':
- case 'EXPKEYSIG':
- case 'REVKEYSIG':
- case 'BADSIG':
- $signature = new Crypt_GPG_Signature();
-
- // if there was a signature id, set it on the new signature
- if ($this->signatureId != '') {
- $signature->setId($this->signatureId);
- $this->signatureId = '';
- }
-
- // Detect whether fingerprint or key id was returned and set
- // signature values appropriately. Key ids are strings of either
- // 16 or 8 hexadecimal characters. Fingerprints are strings of 40
- // hexadecimal characters. The key id is the last 16 characters of
- // the key fingerprint.
- if (strlen($tokens[1]) > 16) {
- $signature->setKeyFingerprint($tokens[1]);
- $signature->setKeyId(substr($tokens[1], -16));
- } else {
- $signature->setKeyId($tokens[1]);
- }
-
- // get user id string
- $string = implode(' ', array_splice($tokens, 2));
- $string = rawurldecode($string);
-
- $signature->setUserId(Crypt_GPG_UserId::parse($string));
-
- $this->index++;
- $this->signatures[$this->index] = $signature;
- break;
-
- case 'ERRSIG':
- $signature = new Crypt_GPG_Signature();
-
- // if there was a signature id, set it on the new signature
- if ($this->signatureId != '') {
- $signature->setId($this->signatureId);
- $this->signatureId = '';
- }
-
- // Detect whether fingerprint or key id was returned and set
- // signature values appropriately. Key ids are strings of either
- // 16 or 8 hexadecimal characters. Fingerprints are strings of 40
- // hexadecimal characters. The key id is the last 16 characters of
- // the key fingerprint.
- if (strlen($tokens[1]) > 16) {
- $signature->setKeyFingerprint($tokens[1]);
- $signature->setKeyId(substr($tokens[1], -16));
- } else {
- $signature->setKeyId($tokens[1]);
- }
-
- $this->index++;
- $this->signatures[$this->index] = $signature;
-
- break;
-
- case 'VALIDSIG':
- if (!array_key_exists($this->index, $this->signatures)) {
- break;
- }
-
- $signature = $this->signatures[$this->index];
-
- $signature->setValid(true);
- $signature->setKeyFingerprint($tokens[1]);
-
- if (strpos($tokens[3], 'T') === false) {
- $signature->setCreationDate($tokens[3]);
- } else {
- $signature->setCreationDate(strtotime($tokens[3]));
- }
-
- if (array_key_exists(4, $tokens)) {
- if (strpos($tokens[4], 'T') === false) {
- $signature->setExpirationDate($tokens[4]);
- } else {
- $signature->setExpirationDate(strtotime($tokens[4]));
- }
- }
-
- break;
-
- case 'SIG_ID':
- // note: signature id comes before new signature line and may not
- // exist for some signature types
- $this->signatureId = $tokens[1];
- break;
- }
- }
-
- // }}}
- // {{{ getSignatures()
-
- /**
- * Gets the {@link Crypt_GPG_Signature} objects parsed by this handler
- *
- * @return array the signature objects parsed by this handler.
- */
- public function getSignatures()
- {
- return $this->signatures;
- }
-
- // }}}
-}
-
-?>
diff --git a/plugins/enigma/lib/enigma_driver.php b/plugins/enigma/lib/enigma_driver.php
deleted file mode 100644
index a9a3e4715..000000000
--- a/plugins/enigma/lib/enigma_driver.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | Abstract driver for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-abstract class enigma_driver
-{
- /**
- * Class constructor.
- *
- * @param string User name (email address)
- */
- abstract function __construct($user);
-
- /**
- * Driver initialization.
- *
- * @return mixed NULL on success, enigma_error on failure
- */
- abstract function init();
-
- /**
- * Encryption.
- */
- abstract function encrypt($text, $keys);
-
- /**
- * Decryption..
- */
- abstract function decrypt($text, $key, $passwd);
-
- /**
- * Signing.
- */
- abstract function sign($text, $key, $passwd);
-
- /**
- * Signature verification.
- *
- * @param string Message body
- * @param string Signature, if message is of type PGP/MIME and body doesn't contain it
- *
- * @return mixed Signature information (enigma_signature) or enigma_error
- */
- abstract function verify($text, $signature);
-
- /**
- * Key/Cert file import.
- *
- * @param string File name or file content
- * @param bollean True if first argument is a filename
- *
- * @return mixed Import status array or enigma_error
- */
- abstract function import($content, $isfile=false);
-
- /**
- * Keys listing.
- *
- * @param string Optional pattern for key ID, user ID or fingerprint
- *
- * @return mixed Array of enigma_key objects or enigma_error
- */
- abstract function list_keys($pattern='');
-
- /**
- * Single key information.
- *
- * @param string Key ID, user ID or fingerprint
- *
- * @return mixed Key (enigma_key) object or enigma_error
- */
- abstract function get_key($keyid);
-
- /**
- * Key pair generation.
- *
- * @param array Key/User data
- *
- * @return mixed Key (enigma_key) object or enigma_error
- */
- abstract function gen_key($data);
-
- /**
- * Key deletion.
- */
- abstract function del_key($keyid);
-}
diff --git a/plugins/enigma/lib/enigma_driver_gnupg.php b/plugins/enigma/lib/enigma_driver_gnupg.php
deleted file mode 100644
index 5aa32217e..000000000
--- a/plugins/enigma/lib/enigma_driver_gnupg.php
+++ /dev/null
@@ -1,305 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | GnuPG (PGP) driver for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-require_once 'Crypt/GPG.php';
-
-class enigma_driver_gnupg extends enigma_driver
-{
- private $rc;
- private $gpg;
- private $homedir;
- private $user;
-
- function __construct($user)
- {
- $rcmail = rcmail::get_instance();
- $this->rc = $rcmail;
- $this->user = $user;
- }
-
- /**
- * Driver initialization and environment checking.
- * Should only return critical errors.
- *
- * @return mixed NULL on success, enigma_error on failure
- */
- function init()
- {
- $homedir = $this->rc->config->get('enigma_pgp_homedir', INSTALL_PATH . '/plugins/enigma/home');
-
- if (!$homedir)
- return new enigma_error(enigma_error::E_INTERNAL,
- "Option 'enigma_pgp_homedir' not specified");
-
- // check if homedir exists (create it if not) and is readable
- if (!file_exists($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
- "Keys directory doesn't exists: $homedir");
- if (!is_writable($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
- "Keys directory isn't writeable: $homedir");
-
- $homedir = $homedir . '/' . $this->user;
-
- // check if user's homedir exists (create it if not) and is readable
- if (!file_exists($homedir))
- mkdir($homedir, 0700);
-
- if (!file_exists($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
- "Unable to create keys directory: $homedir");
- if (!is_writable($homedir))
- return new enigma_error(enigma_error::E_INTERNAL,
- "Unable to write to keys directory: $homedir");
-
- $this->homedir = $homedir;
-
- // Create Crypt_GPG object
- try {
- $this->gpg = new Crypt_GPG(array(
- 'homedir' => $this->homedir,
-// 'debug' => true,
- ));
- }
- catch (Exception $e) {
- return $this->get_error_from_exception($e);
- }
- }
-
- function encrypt($text, $keys)
- {
-/*
- foreach ($keys as $key) {
- $this->gpg->addEncryptKey($key);
- }
- $enc = $this->gpg->encrypt($text);
- return $enc;
-*/
- }
-
- function decrypt($text, $key, $passwd)
- {
-// $this->gpg->addDecryptKey($key, $passwd);
- try {
- $dec = $this->gpg->decrypt($text);
- return $dec;
- }
- catch (Exception $e) {
- return $this->get_error_from_exception($e);
- }
- }
-
- function sign($text, $key, $passwd)
- {
-/*
- $this->gpg->addSignKey($key, $passwd);
- $signed = $this->gpg->sign($text, Crypt_GPG::SIGN_MODE_DETACHED);
- return $signed;
-*/
- }
-
- function verify($text, $signature)
- {
- try {
- $verified = $this->gpg->verify($text, $signature);
- return $this->parse_signature($verified[0]);
- }
- catch (Exception $e) {
- return $this->get_error_from_exception($e);
- }
- }
-
- public function import($content, $isfile=false)
- {
- try {
- if ($isfile)
- return $this->gpg->importKeyFile($content);
- else
- return $this->gpg->importKey($content);
- }
- catch (Exception $e) {
- return $this->get_error_from_exception($e);
- }
- }
-
- public function list_keys($pattern='')
- {
- try {
- $keys = $this->gpg->getKeys($pattern);
- $result = array();
-//print_r($keys);
- foreach ($keys as $idx => $key) {
- $result[] = $this->parse_key($key);
- unset($keys[$idx]);
- }
-//print_r($result);
- return $result;
- }
- catch (Exception $e) {
- return $this->get_error_from_exception($e);
- }
- }
-
- public function get_key($keyid)
- {
- $list = $this->list_keys($keyid);
-
- if (is_array($list))
- return array_shift($list);
-
- // error
- return $list;
- }
-
- public function gen_key($data)
- {
- }
-
- public function del_key($keyid)
- {
-// $this->get_key($keyid);
-
-
- }
-
- public function del_privkey($keyid)
- {
- try {
- $this->gpg->deletePrivateKey($keyid);
- return true;
- }
- catch (Exception $e) {
- return $this->get_error_from_exception($e);
- }
- }
-
- public function del_pubkey($keyid)
- {
- try {
- $this->gpg->deletePublicKey($keyid);
- return true;
- }
- catch (Exception $e) {
- return $this->get_error_from_exception($e);
- }
- }
-
- /**
- * Converts Crypt_GPG exception into Enigma's error object
- *
- * @param mixed Exception object
- *
- * @return enigma_error Error object
- */
- private function get_error_from_exception($e)
- {
- $data = array();
-
- if ($e instanceof Crypt_GPG_KeyNotFoundException) {
- $error = enigma_error::E_KEYNOTFOUND;
- $data['id'] = $e->getKeyId();
- }
- else if ($e instanceof Crypt_GPG_BadPassphraseException) {
- $error = enigma_error::E_BADPASS;
- $data['bad'] = $e->getBadPassphrases();
- $data['missing'] = $e->getMissingPassphrases();
- }
- else if ($e instanceof Crypt_GPG_NoDataException)
- $error = enigma_error::E_NODATA;
- else if ($e instanceof Crypt_GPG_DeletePrivateKeyException)
- $error = enigma_error::E_DELKEY;
- else
- $error = enigma_error::E_INTERNAL;
-
- $msg = $e->getMessage();
-
- return new enigma_error($error, $msg, $data);
- }
-
- /**
- * Converts Crypt_GPG_Signature object into Enigma's signature object
- *
- * @param Crypt_GPG_Signature Signature object
- *
- * @return enigma_signature Signature object
- */
- private function parse_signature($sig)
- {
- $user = $sig->getUserId();
-
- $data = new enigma_signature();
- $data->id = $sig->getId();
- $data->valid = $sig->isValid();
- $data->fingerprint = $sig->getKeyFingerprint();
- $data->created = $sig->getCreationDate();
- $data->expires = $sig->getExpirationDate();
- $data->name = $user->getName();
- $data->comment = $user->getComment();
- $data->email = $user->getEmail();
-
- return $data;
- }
-
- /**
- * Converts Crypt_GPG_Key object into Enigma's key object
- *
- * @param Crypt_GPG_Key Key object
- *
- * @return enigma_key Key object
- */
- private function parse_key($key)
- {
- $ekey = new enigma_key();
-
- foreach ($key->getUserIds() as $idx => $user) {
- $id = new enigma_userid();
- $id->name = $user->getName();
- $id->comment = $user->getComment();
- $id->email = $user->getEmail();
- $id->valid = $user->isValid();
- $id->revoked = $user->isRevoked();
-
- $ekey->users[$idx] = $id;
- }
-
- $ekey->name = trim($ekey->users[0]->name . ' <' . $ekey->users[0]->email . '>');
-
- foreach ($key->getSubKeys() as $idx => $subkey) {
- $skey = new enigma_subkey();
- $skey->id = $subkey->getId();
- $skey->revoked = $subkey->isRevoked();
- $skey->created = $subkey->getCreationDate();
- $skey->expires = $subkey->getExpirationDate();
- $skey->fingerprint = $subkey->getFingerprint();
- $skey->has_private = $subkey->hasPrivate();
- $skey->can_sign = $subkey->canSign();
- $skey->can_encrypt = $subkey->canEncrypt();
-
- $ekey->subkeys[$idx] = $skey;
- };
-
- $ekey->id = $ekey->subkeys[0]->id;
-
- return $ekey;
- }
-}
diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php
deleted file mode 100644
index 8a64c07ff..000000000
--- a/plugins/enigma/lib/enigma_engine.php
+++ /dev/null
@@ -1,533 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | Engine of the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-
-*/
-
-/*
- RFC2440: OpenPGP Message Format
- RFC3156: MIME Security with OpenPGP
- RFC3851: S/MIME
-*/
-
-class enigma_engine
-{
- private $rc;
- private $enigma;
- private $pgp_driver;
- private $smime_driver;
-
- public $decryptions = array();
- public $signatures = array();
- public $signed_parts = array();
-
-
- /**
- * Plugin initialization.
- */
- function __construct($enigma)
- {
- $rcmail = rcmail::get_instance();
- $this->rc = $rcmail;
- $this->enigma = $enigma;
- }
-
- /**
- * PGP driver initialization.
- */
- function load_pgp_driver()
- {
- if ($this->pgp_driver)
- return;
-
- $driver = 'enigma_driver_' . $this->rc->config->get('enigma_pgp_driver', 'gnupg');
- $username = $this->rc->user->get_username();
-
- // Load driver
- $this->pgp_driver = new $driver($username);
-
- if (!$this->pgp_driver) {
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: Unable to load PGP driver: $driver"
- ), true, true);
- }
-
- // Initialise driver
- $result = $this->pgp_driver->init();
-
- if ($result instanceof enigma_error) {
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: ".$result->getMessage()
- ), true, true);
- }
- }
-
- /**
- * S/MIME driver initialization.
- */
- function load_smime_driver()
- {
- if ($this->smime_driver)
- return;
-
- // NOT IMPLEMENTED!
- return;
-
- $driver = 'enigma_driver_' . $this->rc->config->get('enigma_smime_driver', 'phpssl');
- $username = $this->rc->user->get_username();
-
- // Load driver
- $this->smime_driver = new $driver($username);
-
- if (!$this->smime_driver) {
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: Unable to load S/MIME driver: $driver"
- ), true, true);
- }
-
- // Initialise driver
- $result = $this->smime_driver->init();
-
- if ($result instanceof enigma_error) {
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: ".$result->getMessage()
- ), true, true);
- }
- }
-
- /**
- * Handler for plain/text message.
- *
- * @param array Reference to hook's parameters
- */
- function parse_plain(&$p)
- {
- $part = $p['structure'];
-
- // Get message body from IMAP server
- $this->set_part_body($part, $p['object']->uid);
-
- // @TODO: big message body can be a file resource
- // PGP signed message
- if (preg_match('/^-----BEGIN PGP SIGNED MESSAGE-----/', $part->body)) {
- $this->parse_plain_signed($p);
- }
- // PGP encrypted message
- else if (preg_match('/^-----BEGIN PGP MESSAGE-----/', $part->body)) {
- $this->parse_plain_encrypted($p);
- }
- }
-
- /**
- * Handler for multipart/signed message.
- *
- * @param array Reference to hook's parameters
- */
- function parse_signed(&$p)
- {
- $struct = $p['structure'];
-
- // S/MIME
- if ($struct->parts[1] && $struct->parts[1]->mimetype == 'application/pkcs7-signature') {
- $this->parse_smime_signed($p);
- }
- // PGP/MIME:
- // The multipart/signed body MUST consist of exactly two parts.
- // The first part contains the signed data in MIME canonical format,
- // including a set of appropriate content headers describing the data.
- // The second body MUST contain the PGP digital signature. It MUST be
- // labeled with a content type of "application/pgp-signature".
- else if ($struct->parts[1] && $struct->parts[1]->mimetype == 'application/pgp-signature') {
- $this->parse_pgp_signed($p);
- }
- }
-
- /**
- * Handler for multipart/encrypted message.
- *
- * @param array Reference to hook's parameters
- */
- function parse_encrypted(&$p)
- {
- $struct = $p['structure'];
-
- // S/MIME
- if ($struct->mimetype == 'application/pkcs7-mime') {
- $this->parse_smime_encrypted($p);
- }
- // PGP/MIME:
- // The multipart/encrypted MUST consist of exactly two parts. The first
- // MIME body part must have a content type of "application/pgp-encrypted".
- // This body contains the control information.
- // The second MIME body part MUST contain the actual encrypted data. It
- // must be labeled with a content type of "application/octet-stream".
- else if ($struct->parts[0] && $struct->parts[0]->mimetype == 'application/pgp-encrypted' &&
- $struct->parts[1] && $struct->parts[1]->mimetype == 'application/octet-stream'
- ) {
- $this->parse_pgp_encrypted($p);
- }
- }
-
- /**
- * Handler for plain signed message.
- * Excludes message and signature bodies and verifies signature.
- *
- * @param array Reference to hook's parameters
- */
- private function parse_plain_signed(&$p)
- {
- $this->load_pgp_driver();
- $part = $p['structure'];
-
- // Verify signature
- if ($this->rc->action == 'show' || $this->rc->action == 'preview') {
- $sig = $this->pgp_verify($part->body);
- }
-
- // @TODO: Handle big bodies using (temp) files
-
- // In this way we can use fgets on string as on file handle
- $fh = fopen('php://memory', 'br+');
- // @TODO: fopen/fwrite errors handling
- if ($fh) {
- fwrite($fh, $part->body);
- rewind($fh);
- }
- $part->body = null;
-
- // Extract body (and signature?)
- while (!feof($fh)) {
- $line = fgets($fh, 1024);
-
- if ($part->body === null)
- $part->body = '';
- else if (preg_match('/^-----BEGIN PGP SIGNATURE-----/', $line))
- break;
- else
- $part->body .= $line;
- }
-
- // Remove "Hash" Armor Headers
- $part->body = preg_replace('/^.*\r*\n\r*\n/', '', $part->body);
- // de-Dash-Escape (RFC2440)
- $part->body = preg_replace('/(^|\n)- -/', '\\1-', $part->body);
-
- // Store signature data for display
- if (!empty($sig)) {
- $this->signed_parts[$part->mime_id] = $part->mime_id;
- $this->signatures[$part->mime_id] = $sig;
- }
-
- fclose($fh);
- }
-
- /**
- * Handler for PGP/MIME signed message.
- * Verifies signature.
- *
- * @param array Reference to hook's parameters
- */
- private function parse_pgp_signed(&$p)
- {
- $this->load_pgp_driver();
- $struct = $p['structure'];
-
- // Verify signature
- if ($this->rc->action == 'show' || $this->rc->action == 'preview') {
- $msg_part = $struct->parts[0];
- $sig_part = $struct->parts[1];
-
- // Get bodies
- $this->set_part_body($msg_part, $p['object']->uid);
- $this->set_part_body($sig_part, $p['object']->uid);
-
- // Verify
- $sig = $this->pgp_verify($msg_part->body, $sig_part->body);
-
- // Store signature data for display
- $this->signatures[$struct->mime_id] = $sig;
-
- // Message can be multipart (assign signature to each subpart)
- if (!empty($msg_part->parts)) {
- foreach ($msg_part->parts as $part)
- $this->signed_parts[$part->mime_id] = $struct->mime_id;
- }
- else
- $this->signed_parts[$msg_part->mime_id] = $struct->mime_id;
-
- // Remove signature file from attachments list
- unset($struct->parts[1]);
- }
- }
-
- /**
- * Handler for S/MIME signed message.
- * Verifies signature.
- *
- * @param array Reference to hook's parameters
- */
- private function parse_smime_signed(&$p)
- {
- $this->load_smime_driver();
- }
-
- /**
- * Handler for plain encrypted message.
- *
- * @param array Reference to hook's parameters
- */
- private function parse_plain_encrypted(&$p)
- {
- $this->load_pgp_driver();
- $part = $p['structure'];
-
- // Get body
- $this->set_part_body($part, $p['object']->uid);
-
- // Decrypt
- $result = $this->pgp_decrypt($part->body);
-
- // Store decryption status
- $this->decryptions[$part->mime_id] = $result;
-
- // Parse decrypted message
- if ($result === true) {
- // @TODO
- }
- }
-
- /**
- * Handler for PGP/MIME encrypted message.
- *
- * @param array Reference to hook's parameters
- */
- private function parse_pgp_encrypted(&$p)
- {
- $this->load_pgp_driver();
- $struct = $p['structure'];
- $part = $struct->parts[1];
-
- // Get body
- $this->set_part_body($part, $p['object']->uid);
-
- // Decrypt
- $result = $this->pgp_decrypt($part->body);
-
- $this->decryptions[$part->mime_id] = $result;
-//print_r($part);
- // Parse decrypted message
- if ($result === true) {
- // @TODO
- }
- else {
- // Make sure decryption status message will be displayed
- $part->type = 'content';
- $p['object']->parts[] = $part;
- }
- }
-
- /**
- * Handler for S/MIME encrypted message.
- *
- * @param array Reference to hook's parameters
- */
- private function parse_smime_encrypted(&$p)
- {
- $this->load_smime_driver();
- }
-
- /**
- * PGP signature verification.
- *
- * @param mixed Message body
- * @param mixed Signature body (for MIME messages)
- *
- * @return mixed enigma_signature or enigma_error
- */
- private function pgp_verify(&$msg_body, $sig_body=null)
- {
- // @TODO: Handle big bodies using (temp) files
- // @TODO: caching of verification result
- $sig = $this->pgp_driver->verify($msg_body, $sig_body);
-
- if (($sig instanceof enigma_error) && $sig->getCode() != enigma_error::E_KEYNOTFOUND)
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: " . $sig->getMessage()
- ), true, false);
-
- return $sig;
- }
-
- /**
- * PGP message decryption.
- *
- * @param mixed Message body
- *
- * @return mixed True or enigma_error
- */
- private function pgp_decrypt(&$msg_body)
- {
- // @TODO: Handle big bodies using (temp) files
- // @TODO: caching of verification result
- $key = ''; $pass = ''; // @TODO
- $result = $this->pgp_driver->decrypt($msg_body, $key, $pass);
-
- if ($result instanceof enigma_error) {
- $err_code = $result->getCode();
- if (!in_array($err_code, array(enigma_error::E_KEYNOTFOUND, enigma_error::E_BADPASS)))
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: " . $result->getMessage()
- ), true, false);
- return $result;
- }
-
-// $msg_body = $result;
- return true;
- }
-
- /**
- * PGP keys listing.
- *
- * @param mixed Key ID/Name pattern
- *
- * @return mixed Array of keys or enigma_error
- */
- function list_keys($pattern='')
- {
- $this->load_pgp_driver();
- $result = $this->pgp_driver->list_keys($pattern);
-
- if ($result instanceof enigma_error) {
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: " . $result->getMessage()
- ), true, false);
- }
-
- return $result;
- }
-
- /**
- * PGP key details.
- *
- * @param mixed Key ID
- *
- * @return mixed enigma_key or enigma_error
- */
- function get_key($keyid)
- {
- $this->load_pgp_driver();
- $result = $this->pgp_driver->get_key($keyid);
-
- if ($result instanceof enigma_error) {
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: " . $result->getMessage()
- ), true, false);
- }
-
- return $result;
- }
-
- /**
- * PGP keys/certs importing.
- *
- * @param mixed Import file name or content
- * @param boolean True if first argument is a filename
- *
- * @return mixed Import status data array or enigma_error
- */
- function import_key($content, $isfile=false)
- {
- $this->load_pgp_driver();
- $result = $this->pgp_driver->import($content, $isfile);
-
- if ($result instanceof enigma_error) {
- rcube::raise_error(array(
- 'code' => 600, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: " . $result->getMessage()
- ), true, false);
- }
- else {
- $result['imported'] = $result['public_imported'] + $result['private_imported'];
- $result['unchanged'] = $result['public_unchanged'] + $result['private_unchanged'];
- }
-
- return $result;
- }
-
- /**
- * Handler for keys/certs import request action
- */
- function import_file()
- {
- $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
- $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
- $mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST);
- $storage = $this->rc->get_storage();
-
- if ($uid && $mime_id) {
- $storage->set_folder($mbox);
- $part = $storage->get_message_part($uid, $mime_id);
- }
-
- if ($part && is_array($result = $this->import_key($part))) {
- $this->rc->output->show_message('enigma.keysimportsuccess', 'confirmation',
- array('new' => $result['imported'], 'old' => $result['unchanged']));
- }
- else
- $this->rc->output->show_message('enigma.keysimportfailed', 'error');
-
- $this->rc->output->send();
- }
-
- /**
- * Checks if specified message part contains body data.
- * If body is not set it will be fetched from IMAP server.
- *
- * @param rcube_message_part Message part object
- * @param integer Message UID
- */
- private function set_part_body($part, $uid)
- {
- // @TODO: Create such function in core
- // @TODO: Handle big bodies using file handles
- if (!isset($part->body)) {
- $part->body = $this->rc->storage->get_message_part(
- $uid, $part->mime_id, $part);
- }
- }
-}
diff --git a/plugins/enigma/lib/enigma_error.php b/plugins/enigma/lib/enigma_error.php
deleted file mode 100644
index 9f424dc2b..000000000
--- a/plugins/enigma/lib/enigma_error.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | Error class for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-class enigma_error
-{
- private $code;
- private $message;
- private $data = array();
-
- // error codes
- const E_OK = 0;
- const E_INTERNAL = 1;
- const E_NODATA = 2;
- const E_KEYNOTFOUND = 3;
- const E_DELKEY = 4;
- const E_BADPASS = 5;
-
- function __construct($code = null, $message = '', $data = array())
- {
- $this->code = $code;
- $this->message = $message;
- $this->data = $data;
- }
-
- function getCode()
- {
- return $this->code;
- }
-
- function getMessage()
- {
- return $this->message;
- }
-
- function getData($name)
- {
- if ($name)
- return $this->data[$name];
- else
- return $this->data;
- }
-}
diff --git a/plugins/enigma/lib/enigma_key.php b/plugins/enigma/lib/enigma_key.php
deleted file mode 100644
index 520c36b0b..000000000
--- a/plugins/enigma/lib/enigma_key.php
+++ /dev/null
@@ -1,129 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | Key class for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-class enigma_key
-{
- public $id;
- public $name;
- public $users = array();
- public $subkeys = array();
-
- const TYPE_UNKNOWN = 0;
- const TYPE_KEYPAIR = 1;
- const TYPE_PUBLIC = 2;
-
- /**
- * Keys list sorting callback for usort()
- */
- static function cmp($a, $b)
- {
- return strcmp($a->name, $b->name);
- }
-
- /**
- * Returns key type
- */
- function get_type()
- {
- if ($this->subkeys[0]->has_private)
- return enigma_key::TYPE_KEYPAIR;
- else if (!empty($this->subkeys[0]))
- return enigma_key::TYPE_PUBLIC;
-
- return enigma_key::TYPE_UNKNOWN;
- }
-
- /**
- * Returns true if all user IDs are revoked
- */
- function is_revoked()
- {
- foreach ($this->subkeys as $subkey)
- if (!$subkey->revoked)
- return false;
-
- return true;
- }
-
- /**
- * Returns true if any user ID is valid
- */
- function is_valid()
- {
- foreach ($this->users as $user)
- if ($user->valid)
- return true;
-
- return false;
- }
-
- /**
- * Returns true if any of subkeys is not expired
- */
- function is_expired()
- {
- $now = time();
-
- foreach ($this->subkeys as $subkey)
- if (!$subkey->expires || $subkey->expires > $now)
- return true;
-
- return false;
- }
-
- /**
- * Converts long ID or Fingerprint to short ID
- * Crypt_GPG uses internal, but e.g. Thunderbird's Enigmail displays short ID
- *
- * @param string Key ID or fingerprint
- * @return string Key short ID
- */
- static function format_id($id)
- {
- // E.g. 04622F2089E037A5 => 89E037A5
-
- return substr($id, -8);
- }
-
- /**
- * Formats fingerprint string
- *
- * @param string Key fingerprint
- *
- * @return string Formatted fingerprint (with spaces)
- */
- static function format_fingerprint($fingerprint)
- {
- if (!$fingerprint)
- return '';
-
- $result = '';
- for ($i=0; $i<40; $i++) {
- if ($i % 4 == 0)
- $result .= ' ';
- $result .= $fingerprint[$i];
- }
- return $result;
- }
-
-}
diff --git a/plugins/enigma/lib/enigma_signature.php b/plugins/enigma/lib/enigma_signature.php
deleted file mode 100644
index 65990903b..000000000
--- a/plugins/enigma/lib/enigma_signature.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | Signature class for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-class enigma_signature
-{
- public $id;
- public $valid;
- public $fingerprint;
- public $created;
- public $expires;
- public $name;
- public $comment;
- public $email;
-}
diff --git a/plugins/enigma/lib/enigma_subkey.php b/plugins/enigma/lib/enigma_subkey.php
deleted file mode 100644
index 1b9fb95ad..000000000
--- a/plugins/enigma/lib/enigma_subkey.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | SubKey class for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-class enigma_subkey
-{
- public $id;
- public $fingerprint;
- public $expires;
- public $created;
- public $revoked;
- public $has_private;
- public $can_sign;
- public $can_encrypt;
-
- /**
- * Converts internal ID to short ID
- * Crypt_GPG uses internal, but e.g. Thunderbird's Enigmail displays short ID
- *
- * @return string Key ID
- */
- function get_short_id()
- {
- // E.g. 04622F2089E037A5 => 89E037A5
- return enigma_key::format_id($this->id);
- }
-
- /**
- * Getter for formatted fingerprint
- *
- * @return string Formatted fingerprint
- */
- function get_fingerprint()
- {
- return enigma_key::format_fingerprint($this->fingerprint);
- }
-
-}
diff --git a/plugins/enigma/lib/enigma_ui.php b/plugins/enigma/lib/enigma_ui.php
deleted file mode 100644
index adb619d0c..000000000
--- a/plugins/enigma/lib/enigma_ui.php
+++ /dev/null
@@ -1,455 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | User Interface for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-class enigma_ui
-{
- private $rc;
- private $enigma;
- private $home;
- private $css_added;
- private $data;
-
-
- function __construct($enigma_plugin, $home='')
- {
- $this->enigma = $enigma_plugin;
- $this->rc = $enigma_plugin->rc;
- // we cannot use $enigma_plugin->home here
- $this->home = $home;
- }
-
- /**
- * UI initialization and requests handlers.
- *
- * @param string Preferences section
- */
- function init($section='')
- {
- $this->enigma->include_script('enigma.js');
-
- // Enigma actions
- if ($this->rc->action == 'plugin.enigma') {
- $action = rcube_utils::get_input_value('_a', rcube_utils::INPUT_GPC);
-
- switch ($action) {
- case 'keyedit':
- $this->key_edit();
- break;
- case 'keyimport':
- $this->key_import();
- break;
- case 'keysearch':
- case 'keylist':
- $this->key_list();
- break;
- case 'keyinfo':
- default:
- $this->key_info();
- }
- }
- // Message composing UI
- else if ($this->rc->action == 'compose') {
- $this->compose_ui();
- }
- // Preferences UI
- else { // if ($this->rc->action == 'edit-prefs') {
- if ($section == 'enigmacerts') {
- $this->rc->output->add_handlers(array(
- 'keyslist' => array($this, 'tpl_certs_list'),
- 'keyframe' => array($this, 'tpl_cert_frame'),
- 'countdisplay' => array($this, 'tpl_certs_rowcount'),
- 'searchform' => array($this->rc->output, 'search_form'),
- ));
- $this->rc->output->set_pagetitle($this->enigma->gettext('enigmacerts'));
- $this->rc->output->send('enigma.certs');
- }
- else {
- $this->rc->output->add_handlers(array(
- 'keyslist' => array($this, 'tpl_keys_list'),
- 'keyframe' => array($this, 'tpl_key_frame'),
- 'countdisplay' => array($this, 'tpl_keys_rowcount'),
- 'searchform' => array($this->rc->output, 'search_form'),
- ));
- $this->rc->output->set_pagetitle($this->enigma->gettext('enigmakeys'));
- $this->rc->output->send('enigma.keys');
- }
- }
- }
-
- /**
- * Adds CSS style file to the page header.
- */
- function add_css()
- {
- if ($this->css_loaded)
- return;
-
- $skin = $this->rc->config->get('skin');
- if (!file_exists($this->home . "/skins/$skin/enigma.css"))
- $skin = 'default';
-
- $this->enigma->include_stylesheet("skins/$skin/enigma.css");
- $this->css_added = true;
- }
-
- /**
- * Template object for key info/edit frame.
- *
- * @param array Object attributes
- *
- * @return string HTML output
- */
- function tpl_key_frame($attrib)
- {
- if (!$attrib['id']) {
- $attrib['id'] = 'rcmkeysframe';
- }
-
- $attrib['name'] = $attrib['id'];
-
- $this->rc->output->set_env('contentframe', $attrib['name']);
- $this->rc->output->set_env('blankpage', $attrib['src'] ?
- $this->rc->output->abs_url($attrib['src']) : 'program/resources/blank.gif');
-
- return $this->rc->output->frame($attrib);
- }
-
- /**
- * Template object for list of keys.
- *
- * @param array Object attributes
- *
- * @return string HTML content
- */
- function tpl_keys_list($attrib)
- {
- // add id to message list table if not specified
- if (!strlen($attrib['id'])) {
- $attrib['id'] = 'rcmenigmakeyslist';
- }
-
- // define list of cols to be displayed
- $a_show_cols = array('name');
-
- // create XHTML table
- $out = $this->rc->table_output($attrib, array(), $a_show_cols, 'id');
-
- // set client env
- $this->rc->output->add_gui_object('keyslist', $attrib['id']);
- $this->rc->output->include_script('list.js');
-
- // add some labels to client
- $this->rc->output->add_label('enigma.keyconfirmdelete');
-
- return $out;
- }
-
- /**
- * Key listing (and searching) request handler
- */
- private function key_list()
- {
- $this->enigma->load_engine();
-
- $pagesize = $this->rc->config->get('pagesize', 100);
- $page = max(intval(rcube_utils::get_input_value('_p', rcube_utils::INPUT_GPC)), 1);
- $search = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GPC);
-
- // define list of cols to be displayed
-// $a_show_cols = array('name');
-
- // Get the list
- $list = $this->enigma->engine->list_keys($search);
-
- if ($list && ($list instanceof enigma_error))
- $this->rc->output->show_message('enigma.keylisterror', 'error');
- else if (empty($list))
- $this->rc->output->show_message('enigma.nokeysfound', 'notice');
- else {
- if (is_array($list)) {
- // Save the size
- $listsize = count($list);
-
- // Sort the list by key (user) name
- usort($list, array('enigma_key', 'cmp'));
-
- // Slice current page
- $list = array_slice($list, ($page - 1) * $pagesize, $pagesize);
-
- $size = count($list);
-
- // Add rows
- foreach ($list as $key) {
- $this->rc->output->command('enigma_add_list_row',
- array('name' => rcube::Q($key->name), 'id' => $key->id));
- }
- }
- }
-
- $this->rc->output->set_env('search_request', $search);
- $this->rc->output->set_env('pagecount', ceil($listsize/$pagesize));
- $this->rc->output->set_env('current_page', $page);
- $this->rc->output->command('set_rowcount',
- $this->get_rowcount_text($listsize, $size, $page));
-
- $this->rc->output->send();
- }
-
- /**
- * Template object for list records counter.
- *
- * @param array Object attributes
- *
- * @return string HTML output
- */
- function tpl_keys_rowcount($attrib)
- {
- if (!$attrib['id'])
- $attrib['id'] = 'rcmcountdisplay';
-
- $this->rc->output->add_gui_object('countdisplay', $attrib['id']);
-
- return html::span($attrib, $this->get_rowcount_text());
- }
-
- /**
- * Returns text representation of list records counter
- */
- private function get_rowcount_text($all=0, $curr_count=0, $page=1)
- {
- if (!$curr_count)
- $out = $this->enigma->gettext('nokeysfound');
- else {
- $pagesize = $this->rc->config->get('pagesize', 100);
- $first = ($page - 1) * $pagesize;
-
- $out = $this->enigma->gettext(array(
- 'name' => 'keysfromto',
- 'vars' => array(
- 'from' => $first + 1,
- 'to' => $first + $curr_count,
- 'count' => $all)
- ));
- }
-
- return $out;
- }
-
- /**
- * Key information page handler
- */
- private function key_info()
- {
- $id = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GET);
-
- $this->enigma->load_engine();
- $res = $this->enigma->engine->get_key($id);
-
- if ($res instanceof enigma_key)
- $this->data = $res;
- else { // error
- $this->rc->output->show_message('enigma.keyopenerror', 'error');
- $this->rc->output->command('parent.enigma_loadframe');
- $this->rc->output->send('iframe');
- }
-
- $this->rc->output->add_handlers(array(
- 'keyname' => array($this, 'tpl_key_name'),
- 'keydata' => array($this, 'tpl_key_data'),
- ));
-
- $this->rc->output->set_pagetitle($this->enigma->gettext('keyinfo'));
- $this->rc->output->send('enigma.keyinfo');
- }
-
- /**
- * Template object for key name
- */
- function tpl_key_name($attrib)
- {
- return rcube::Q($this->data->name);
- }
-
- /**
- * Template object for key information page content
- */
- function tpl_key_data($attrib)
- {
- $out = '';
- $table = new html_table(array('cols' => 2));
-
- // Key user ID
- $table->add('title', $this->enigma->gettext('keyuserid'));
- $table->add(null, rcube::Q($this->data->name));
- // Key ID
- $table->add('title', $this->enigma->gettext('keyid'));
- $table->add(null, $this->data->subkeys[0]->get_short_id());
- // Key type
- $keytype = $this->data->get_type();
- if ($keytype == enigma_key::TYPE_KEYPAIR)
- $type = $this->enigma->gettext('typekeypair');
- else if ($keytype == enigma_key::TYPE_PUBLIC)
- $type = $this->enigma->gettext('typepublickey');
- $table->add('title', $this->enigma->gettext('keytype'));
- $table->add(null, $type);
- // Key fingerprint
- $table->add('title', $this->enigma->gettext('fingerprint'));
- $table->add(null, $this->data->subkeys[0]->get_fingerprint());
-
- $out .= html::tag('fieldset', null,
- html::tag('legend', null,
- $this->enigma->gettext('basicinfo')) . $table->show($attrib));
-
- // Subkeys
- $table = new html_table(array('cols' => 6));
- // Columns: Type, ID, Algorithm, Size, Created, Expires
-
- $out .= html::tag('fieldset', null,
- html::tag('legend', null,
- $this->enigma->gettext('subkeys')) . $table->show($attrib));
-
- // Additional user IDs
- $table = new html_table(array('cols' => 2));
- // Columns: User ID, Validity
-
- $out .= html::tag('fieldset', null,
- html::tag('legend', null,
- $this->enigma->gettext('userids')) . $table->show($attrib));
-
- return $out;
- }
-
- /**
- * Key import page handler
- */
- private function key_import()
- {
- // Import process
- if ($_FILES['_file']['tmp_name'] && is_uploaded_file($_FILES['_file']['tmp_name'])) {
- $this->enigma->load_engine();
- $result = $this->enigma->engine->import_key($_FILES['_file']['tmp_name'], true);
-
- if (is_array($result)) {
- // reload list if any keys has been added
- if ($result['imported']) {
- $this->rc->output->command('parent.enigma_list', 1);
- }
- else
- $this->rc->output->command('parent.enigma_loadframe');
-
- $this->rc->output->show_message('enigma.keysimportsuccess', 'confirmation',
- array('new' => $result['imported'], 'old' => $result['unchanged']));
-
- $this->rc->output->send('iframe');
- }
- else
- $this->rc->output->show_message('enigma.keysimportfailed', 'error');
- }
- else if ($err = $_FILES['_file']['error']) {
- if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
- $this->rc->output->show_message('filesizeerror', 'error',
- array('size' => $this->rc->show_bytes(parse_bytes(ini_get('upload_max_filesize')))));
- } else {
- $this->rc->output->show_message('fileuploaderror', 'error');
- }
- }
-
- $this->rc->output->add_handlers(array(
- 'importform' => array($this, 'tpl_key_import_form'),
- ));
-
- $this->rc->output->set_pagetitle($this->enigma->gettext('keyimport'));
- $this->rc->output->send('enigma.keyimport');
- }
-
- /**
- * Template object for key import (upload) form
- */
- function tpl_key_import_form($attrib)
- {
- $attrib += array('id' => 'rcmKeyImportForm');
-
- $upload = new html_inputfield(array('type' => 'file', 'name' => '_file',
- 'id' => 'rcmimportfile', 'size' => 30));
-
- $form = html::p(null,
- rcube::Q($this->enigma->gettext('keyimporttext'), 'show')
- . html::br() . html::br() . $upload->show()
- );
-
- $this->rc->output->add_label('selectimportfile', 'importwait');
- $this->rc->output->add_gui_object('importform', $attrib['id']);
-
- $out = $this->rc->output->form_tag(array(
- 'action' => $this->rc->url(array('action' => 'plugin.enigma', 'a' => 'keyimport')),
- 'method' => 'post',
- 'enctype' => 'multipart/form-data') + $attrib,
- $form);
-
- return $out;
- }
-
- private function compose_ui()
- {
- // Options menu button
- // @TODO: make this work with non-default skins
- $this->enigma->add_button(array(
- 'name' => 'enigmamenu',
- 'imagepas' => 'skins/default/enigma.png',
- 'imageact' => 'skins/default/enigma.png',
- 'onclick' => "rcmail_ui.show_popup('enigmamenu', true); return false",
- 'title' => 'securityoptions',
- 'domain' => 'enigma',
- ), 'toolbar');
-
- // Options menu contents
- $this->enigma->add_hook('render_page', array($this, 'compose_menu'));
- }
-
- function compose_menu($p)
- {
- $menu = new html_table(array('cols' => 2));
- $chbox = new html_checkbox(array('value' => 1));
-
- $menu->add(null, html::label(array('for' => 'enigmadefaultopt'),
- rcube::Q($this->enigma->gettext('identdefault'))));
- $menu->add(null, $chbox->show(1, array('name' => '_enigma_default', 'id' => 'enigmadefaultopt')));
-
- $menu->add(null, html::label(array('for' => 'enigmasignopt'),
- rcube::Q($this->enigma->gettext('signmsg'))));
- $menu->add(null, $chbox->show(1, array('name' => '_enigma_sign', 'id' => 'enigmasignopt')));
-
- $menu->add(null, html::label(array('for' => 'enigmacryptopt'),
- rcube::Q($this->enigma->gettext('encryptmsg'))));
- $menu->add(null, $chbox->show(1, array('name' => '_enigma_crypt', 'id' => 'enigmacryptopt')));
-
- $menu = html::div(array('id' => 'enigmamenu', 'class' => 'popupmenu'),
- $menu->show());
-
- $p['content'] = preg_replace('/(<form name="form"[^>]+>)/i', '\\1'."\n$menu", $p['content']);
-
- return $p;
-
- }
-
-}
diff --git a/plugins/enigma/lib/enigma_userid.php b/plugins/enigma/lib/enigma_userid.php
deleted file mode 100644
index 36185e718..000000000
--- a/plugins/enigma/lib/enigma_userid.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/*
- +-------------------------------------------------------------------------+
- | User ID class for the Enigma Plugin |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | 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, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-*/
-
-class enigma_userid
-{
- public $revoked;
- public $valid;
- public $name;
- public $comment;
- public $email;
-}
diff --git a/plugins/enigma/localization/en_US.inc b/plugins/enigma/localization/en_US.inc
deleted file mode 100644
index e0f03d9a0..000000000
--- a/plugins/enigma/localization/en_US.inc
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-$labels = array();
-$labels['enigmasettings'] = 'Enigma: Settings';
-$labels['enigmacerts'] = 'Enigma: Certificates (S/MIME)';
-$labels['enigmakeys'] = 'Enigma: Keys (PGP)';
-$labels['keysfromto'] = 'Keys $from to $to of $count';
-$labels['keyname'] = 'Name';
-$labels['keyid'] = 'Key ID';
-$labels['keyuserid'] = 'User ID';
-$labels['keytype'] = 'Key type';
-$labels['fingerprint'] = 'Fingerprint';
-$labels['subkeys'] = 'Subkeys';
-$labels['basicinfo'] = 'Basic Information';
-$labels['userids'] = 'Additional User IDs';
-$labels['typepublickey'] = 'public key';
-$labels['typekeypair'] = 'key pair';
-$labels['keyattfound'] = 'This message contains attached PGP key(s).';
-$labels['keyattimport'] = 'Import key(s)';
-
-$labels['createkeys'] = 'Create a new key pair';
-$labels['importkeys'] = 'Import key(s)';
-$labels['exportkeys'] = 'Export key(s)';
-$labels['deletekeys'] = 'Delete key(s)';
-$labels['keyactions'] = 'Key actions...';
-$labels['keydisable'] = 'Disable key';
-$labels['keyrevoke'] = 'Revoke key';
-$labels['keysend'] = 'Send public key in a message';
-$labels['keychpass'] = 'Change password';
-
-$labels['securityoptions'] = 'Message security options...';
-$labels['identdefault'] = 'Use settings of selected identity';
-$labels['encryptmsg'] = 'Encrypt this message';
-$labels['signmsg'] = 'Digitally sign this message';
-
-$messages = array();
-$messages['sigvalid'] = 'Verified signature from $sender.';
-$messages['siginvalid'] = 'Invalid signature from $sender.';
-$messages['signokey'] = 'Unverified signature. Public key not found. Key ID: $keyid.';
-$messages['sigerror'] = 'Unverified signature. Internal error.';
-$messages['decryptok'] = 'Message decrypted.';
-$messages['decrypterror'] = 'Decryption failed.';
-$messages['decryptnokey'] = 'Decryption failed. Private key not found. Key ID: $keyid.';
-$messages['decryptbadpass'] = 'Decryption failed. Bad password.';
-$messages['nokeysfound'] = 'No keys found';
-$messages['keyopenerror'] = 'Unable to get key information! Internal error.';
-$messages['keylisterror'] = 'Unable to list keys! Internal error.';
-$messages['keysimportfailed'] = 'Unable to import key(s)! Internal error.';
-$messages['keysimportsuccess'] = 'Key(s) imported successfully. Imported: $new, unchanged: $old.';
-$messages['keyconfirmdelete'] = 'Are you sure, you want to delete selected key(s)?';
-$messages['keyimporttext'] = 'You can import private and public key(s) or revocation signatures in ASCII-Armor format.';
-
-?>
diff --git a/plugins/enigma/localization/ja_JP.inc b/plugins/enigma/localization/ja_JP.inc
deleted file mode 100644
index 882014440..000000000
--- a/plugins/enigma/localization/ja_JP.inc
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-// EN-Revision: 4203
-
-$labels = array();
-$labels['enigmasettings'] = 'Enigma: 設定';
-$labels['enigmacerts'] = 'Enigma: 証明書 (S/MIME)';
-$labels['enigmakeys'] = 'Enigma: 鍵 (PGP)';
-$labels['keysfromto'] = '鍵の一覧 $from ~ $to (合計: $count )';
-$labels['keyname'] = '名前';
-$labels['keyid'] = '鍵 ID';
-$labels['keyuserid'] = 'ユーザー ID';
-$labels['keytype'] = '鍵の種類';
-$labels['fingerprint'] = '指紋';
-$labels['subkeys'] = 'Subkeys';
-$labels['basicinfo'] = '基本情報';
-$labels['userids'] = '追加のユーザー ID';
-$labels['typepublickey'] = '公開鍵';
-$labels['typekeypair'] = '鍵のペア';
-$labels['keyattfound'] = 'このメールは PGP 鍵の添付があります。';
-$labels['keyattimport'] = '鍵のインポート';
-
-$labels['createkeys'] = '新しい鍵のペアを作成する';
-$labels['importkeys'] = '鍵のインポート';
-$labels['exportkeys'] = '鍵のエクスポート';
-$labels['deletekeys'] = '鍵の削除';
-$labels['keyactions'] = '鍵の操作...';
-$labels['keydisable'] = '鍵を無効にする';
-$labels['keyrevoke'] = '鍵を取り消す';
-$labels['keysend'] = 'メッセージに公開鍵を含んで送信する';
-$labels['keychpass'] = 'パスワードの変更';
-
-$labels['securityoptions'] = 'メールのセキュリティ オプション...';
-$labels['identdefault'] = '選択した識別子の設定を使う';
-$labels['encryptmsg'] = 'このメールの暗号化';
-$labels['signmsg'] = 'このメールのデジタル署名';
-
-$messages = array();
-$messages['sigvalid'] = '$sender からの署名を検証しました。';
-$messages['siginvalid'] = '$sender からの署名が正しくありません。';
-$messages['signokey'] = '署名は未検証です。公開鍵が見つかりません。鍵 ID: $keyid';
-$messages['sigerror'] = '署名は未検証です。内部エラーです。';
-$messages['decryptok'] = 'メールを復号しました。';
-$messages['decrypterror'] = '復号に失敗しました。';
-$messages['decryptnokey'] = '復号に失敗しました。秘密鍵が見つかりません。鍵 ID: $keyid.';
-$messages['decryptbadpass'] = '復号に失敗しました。パスワードが正しくありません。';
-$messages['nokeysfound'] = '鍵が見つかりません。';
-$messages['keyopenerror'] = '鍵情報の取得に失敗しました! 内部エラーです。';
-$messages['keylisterror'] = '鍵情報のリストに失敗しました! 内部エラーです。';
-$messages['keysimportfailed'] = '鍵のインポートに失敗しました! 内部エラーです。';
-$messages['keysimportsuccess'] = '鍵をインポートしました。インポート: $new, 未変更: $old';
-$messages['keyconfirmdelete'] = '選択した鍵を本当に削除しますか?';
-$messages['keyimporttext'] = '秘密鍵と公開鍵のインポート、または ASCII 形式の署名を無効にできます。';
-
-?>
diff --git a/plugins/enigma/localization/ru_RU.inc b/plugins/enigma/localization/ru_RU.inc
deleted file mode 100644
index 3033d002c..000000000
--- a/plugins/enigma/localization/ru_RU.inc
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-/*
-
-+-----------------------------------------------------------------------+
-| plugins/enigma/localization/ru_RU.inc |
-| |
-| Russian translation for roundcube/enigma plugin |
-| Copyright (C) 2010 |
-| Licensed under the GNU GPL |
-| |
-+-----------------------------------------------------------------------+
-| Author: Sergey Dukachev <iam@dukess.ru> |
-| Updates: |
-+-----------------------------------------------------------------------+
-
-@version 2010-12-23
-
-*/
-
-$labels = array();
-$labels['enigmasettings'] = 'Enigma: Настройки';
-$labels['enigmacerts'] = 'Enigma: Сертификаты (S/MIME)';
-$labels['enigmakeys'] = 'Enigma: Ключи (PGP)';
-$labels['keysfromto'] = 'Ключи от $from к $to в количестве $count';
-$labels['keyname'] = 'Имя';
-$labels['keyid'] = 'Идентификатор ключа';
-$labels['keyuserid'] = 'Идентификатор пользователя';
-$labels['keytype'] = 'Тип ключа';
-$labels['fingerprint'] = 'Отпечаток (хэш) ключа';
-$labels['subkeys'] = 'Подразделы';
-$labels['basicinfo'] = 'Основные сведения';
-$labels['userids'] = 'Дополнительные идентификаторы пользователя';
-$labels['typepublickey'] = 'Открытый ключ';
-$labels['typekeypair'] = 'пара ключей';
-$labels['keyattfound'] = 'Это сообщение содержит один или несколько ключей PGP.';
-$labels['keyattimport'] = 'Импортировать ключи';
-
-$labels['createkeys'] = 'Создать новую пару ключей';
-$labels['importkeys'] = 'Импортировать ключ(и)';
-$labels['exportkeys'] = 'Экспортировать ключ(и)';
-$labels['deletekeys'] = 'Удалить ключ(и)';
-$labels['keyactions'] = 'Действия с ключами...';
-$labels['keydisable'] = 'Отключить ключ';
-$labels['keyrevoke'] = 'Отозвать ключ';
-$labels['keysend'] = 'Отправить публичный ключ в собщении';
-$labels['keychpass'] = 'Изменить пароль';
-
-$messages = array();
-$messages['sigvalid'] = 'Проверенная подпись у $sender.';
-$messages['siginvalid'] = 'Неверная подпись у $sender.';
-$messages['signokey'] = 'Непроверяемая подпись. Открытый ключ не найден. Идентификатор ключа: $keyid.';
-$messages['sigerror'] = 'Непроверяемая подпись. Внутренняя ошибка.';
-$messages['decryptok'] = 'Сообщение расшифровано.';
-$messages['decrypterror'] = 'Расшифровка не удалась.';
-$messages['decryptnokey'] = 'Расшифровка не удалась. Секретный ключ не найден. Идентификатор ключа: $keyid.';
-$messages['decryptbadpass'] = 'Расшифровка не удалась. Неправильный пароль.';
-$messages['nokeysfound'] = 'Ключи не найдены';
-$messages['keyopenerror'] = 'Невозможно получить информацию о ключе! Внутренняя ошибка.';
-$messages['keylisterror'] = 'Невозможно сделать список ключей! Внутренняя ошибка.';
-$messages['keysimportfailed'] = 'Невозможно импортировать ключ(и)! Внутренняя ошибка.';
-$messages['keysimportsuccess'] = 'Ключи успешно импортированы. Импортировано: $new, без изменений: $old.';
-$messages['keyconfirmdelete'] = 'Вы точно хотите удалить выбранные ключи?';
-$messages['keyimporttext'] = 'Вы можете импортировать открытые и секретные ключи или сообщения об отзыве ключей в формате ASCII-Armor.';
-
-?>
diff --git a/plugins/enigma/skins/classic/enigma.css b/plugins/enigma/skins/classic/enigma.css
deleted file mode 100644
index b1c656f82..000000000
--- a/plugins/enigma/skins/classic/enigma.css
+++ /dev/null
@@ -1,182 +0,0 @@
-/*** Style for Enigma plugin ***/
-
-/***** Messages displaying *****/
-
-#enigma-message,
-/* fixes border-top */
-#messagebody div #enigma-message
-{
- margin: 0;
- margin-bottom: 5px;
- min-height: 20px;
- padding: 10px 10px 6px 46px;
-}
-
-div.enigmaerror,
-/* fixes border-top */
-#messagebody div.enigmaerror
-{
- background: url(enigma_error.png) 6px 1px no-repeat;
- background-color: #EF9398;
- border: 1px solid #DC5757;
-}
-
-div.enigmanotice,
-/* fixes border-top */
-#messagebody div.enigmanotice
-{
- background: url(enigma.png) 6px 1px no-repeat;
- background-color: #A6EF7B;
- border: 1px solid #76C83F;
-}
-
-div.enigmawarning,
-/* fixes border-top */
-#messagebody div.enigmawarning
-{
- background: url(enigma.png) 6px 1px no-repeat;
- background-color: #F7FDCB;
- border: 1px solid #C2D071;
-}
-
-#enigma-message a
-{
- color: #666666;
- padding-left: 10px;
-}
-
-#enigma-message a:hover
-{
- color: #333333;
-}
-
-/***** Keys/Certs Management *****/
-
-div.enigmascreen
-{
- position: absolute;
- top: 65px;
- right: 10px;
- bottom: 10px;
- left: 10px;
-}
-
-#enigmacontent-box
-{
- position: absolute;
- top: 0px;
- left: 290px;
- right: 0px;
- bottom: 0px;
- border: 1px solid #999999;
- overflow: hidden;
-}
-
-#enigmakeyslist
-{
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- border: 1px solid #999999;
- background-color: #F9F9F9;
- overflow: hidden;
-}
-
-#keylistcountbar
-{
- margin-top: 4px;
- margin-left: 4px;
-}
-
-#keys-table
-{
- width: 100%;
- table-layout: fixed;
-}
-
-#keys-table td
-{
- cursor: default;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
-}
-
-#key-details table td.title
-{
- font-weight: bold;
- text-align: right;
-}
-
-#keystoolbar
-{
- position: absolute;
- top: 30px;
- left: 10px;
- height: 35px;
-}
-
-#keystoolbar a
-{
- padding-right: 10px;
-}
-
-#keystoolbar a.button,
-#keystoolbar a.buttonPas,
-#keystoolbar span.separator {
- display: block;
- float: left;
- width: 32px;
- height: 32px;
- padding: 0;
- margin-right: 10px;
- overflow: hidden;
- background: url(keys_toolbar.png) 0 0 no-repeat transparent;
- opacity: 0.99; /* this is needed to make buttons appear correctly in Chrome */
-}
-
-#keystoolbar a.buttonPas {
- opacity: 0.35;
-}
-
-#keystoolbar a.createSel {
- background-position: 0 -32px;
-}
-
-#keystoolbar a.create {
- background-position: 0 0;
-}
-
-#keystoolbar a.deleteSel {
- background-position: -32px -32px;
-}
-
-#keystoolbar a.delete {
- background-position: -32px 0;
-}
-
-#keystoolbar a.importSel {
- background-position: -64px -32px;
-}
-
-#keystoolbar a.import {
- background-position: -64px 0;
-}
-
-#keystoolbar a.exportSel {
- background-position: -96px -32px;
-}
-
-#keystoolbar a.export {
- background-position: -96px 0;
-}
-
-#keystoolbar a.keymenu {
- background-position: -128px 0;
- width: 36px;
-}
-
-#keystoolbar span.separator {
- width: 5px;
- background-position: -166px 0;
-}
diff --git a/plugins/enigma/skins/classic/enigma.png b/plugins/enigma/skins/classic/enigma.png
deleted file mode 100644
index 3ef106e2a..000000000
--- a/plugins/enigma/skins/classic/enigma.png
+++ /dev/null
Binary files differ
diff --git a/plugins/enigma/skins/classic/enigma_error.png b/plugins/enigma/skins/classic/enigma_error.png
deleted file mode 100644
index 9bf100efd..000000000
--- a/plugins/enigma/skins/classic/enigma_error.png
+++ /dev/null
Binary files differ
diff --git a/plugins/enigma/skins/classic/key.png b/plugins/enigma/skins/classic/key.png
deleted file mode 100644
index ea1cbd11c..000000000
--- a/plugins/enigma/skins/classic/key.png
+++ /dev/null
Binary files differ
diff --git a/plugins/enigma/skins/classic/key_add.png b/plugins/enigma/skins/classic/key_add.png
deleted file mode 100644
index f22cc870a..000000000
--- a/plugins/enigma/skins/classic/key_add.png
+++ /dev/null
Binary files differ
diff --git a/plugins/enigma/skins/classic/keys_toolbar.png b/plugins/enigma/skins/classic/keys_toolbar.png
deleted file mode 100644
index 7cc258cc8..000000000
--- a/plugins/enigma/skins/classic/keys_toolbar.png
+++ /dev/null
Binary files differ
diff --git a/plugins/enigma/skins/classic/templates/keyimport.html b/plugins/enigma/skins/classic/templates/keyimport.html
deleted file mode 100644
index 4e0b304a5..000000000
--- a/plugins/enigma/skins/classic/templates/keyimport.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!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" />
-<link rel="stylesheet" type="text/css" href="/this/enigma.css" />
-</head>
-<body class="iframe">
-
-<div id="keyimport-title" class="boxtitle"><roundcube:label name="enigma.importkeys" /></div>
-
-<div id="import-form" class="boxcontent">
- <roundcube:object name="importform" />
- <p>
- <br /><roundcube:button command="plugin.enigma-import" type="input" class="button mainaction" label="import" />
- </p>
-</div>
-
-</body>
-</html>
diff --git a/plugins/enigma/skins/classic/templates/keyinfo.html b/plugins/enigma/skins/classic/templates/keyinfo.html
deleted file mode 100644
index 2e8ed61db..000000000
--- a/plugins/enigma/skins/classic/templates/keyinfo.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!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" />
-<link rel="stylesheet" type="text/css" href="/this/enigma.css" />
-</head>
-<body class="iframe">
-
-<div id="keyinfo-title" class="boxtitle"><roundcube:object name="keyname" part="name" /></div>
-
-<div id="key-details" class="boxcontent">
- <roundcube:object name="keydata" />
-</div>
-
-</body>
-</html>
diff --git a/plugins/enigma/skins/classic/templates/keys.html b/plugins/enigma/skins/classic/templates/keys.html
deleted file mode 100644
index f581c457b..000000000
--- a/plugins/enigma/skins/classic/templates/keys.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!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" />
-<link rel="stylesheet" type="text/css" href="/this/enigma.css" />
-<script type="text/javascript" src="/functions.js"></script>
-<script type="text/javascript" src="/splitter.js"></script>
-<style type="text/css">
-#enigmakeyslist { width: <roundcube:exp expression="!empty(cookie:enigmaviewsplitter) ? cookie:enigmaviewsplitter-5 : 210" />px; }
-#enigmacontent-box { left: <roundcube:exp expression="!empty(cookie:enigmaviewsplitter) ? cookie:enigmaviewsplitter+5 : 220" />px;
-<roundcube:exp expression="browser:ie ? ('width:expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:enigmaeviewsplitter) ? cookie:enigmaviewsplitter+5 : 220).')+\\'px\\');') : ''" />
-}
-</style>
-</head>
-<body class="iframe">
-
-<div id="prefs-title" class="boxtitle"><roundcube:label name="enigma.enigmakeys" /></div>
-<div id="prefs-details" class="boxcontent">
-
-<div id="keystoolbar">
- <roundcube:button command="plugin.enigma-key-create" type="link" class="buttonPas create" classAct="button create" classSel="button createSel" title="enigma.createkeys" content=" " />
- <roundcube:button command="plugin.enigma-key-delete" type="link" class="buttonPas delete" classAct="button delete" classSel="button deleteSel" title="enigma.deletekeys" content=" " />
- <span class="separator">&nbsp;</span>
- <roundcube:button command="plugin.enigma-key-import" type="link" class="buttonPas import" classAct="button import" classSel="button importSel" title="enigma.importkeys" content=" " />
- <roundcube:button command="plugin.enigma-key-export" type="link" class="buttonPas export" classAct="button export" classSel="button exportSel" title="enigma.exportkeys" content=" " />
- <roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button keymenu" title="enigma.keyactions" onclick="rcmail_ui.show_popup('messagemenu');return false" content=" " />
-</div>
-
-<div id="quicksearchbar" style="top: 35px; right: 10px;">
- <roundcube:button name="searchmenulink" id="searchmenulink" image="/images/icons/glass.png" />
- <roundcube:object name="searchform" id="quicksearchbox" />
- <roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" />
-</div>
-
-<div class="enigmascreen">
-
-<div id="enigmakeyslist">
-<div class="boxtitle"><roundcube:label name="enigma.keyname" /></div>
-<div class="boxlistcontent">
- <roundcube:object name="keyslist" id="keys-table" class="records-table" cellspacing="0" noheader="true" />
-</div>
-<div class="boxfooter">
-<div id="keylistcountbar" class="pagenav">
- <roundcube:button command="firstpage" type="link" class="buttonPas firstpage" classAct="button firstpage" classSel="button firstpageSel" title="firstpage" content=" " />
- <roundcube:button command="previouspage" type="link" class="buttonPas prevpage" classAct="button prevpage" classSel="button prevpageSel" title="previouspage" content=" " />
- <roundcube:object name="countdisplay" style="padding:0 .5em; float:left" />
- <roundcube:button command="nextpage" type="link" class="buttonPas nextpage" classAct="button nextpage" classSel="button nextpageSel" title="nextpage" content=" " />
- <roundcube:button command="lastpage" type="link" class="buttonPas lastpage" classAct="button lastpage" classSel="button lastpageSel" title="lastpage" content=" " />
-</div>
-</div>
-</div>
-
-<script type="text/javascript">
- var enigmaviewsplit = new rcube_splitter({id:'enigmaviewsplitter', p1: 'enigmakeyslist', p2: 'enigmacontent-box', orientation: 'v', relative: true, start: 215});
- rcmail.add_onload('enigmaviewsplit.init()');
-</script>
-
-<div id="enigmacontent-box">
- <roundcube:object name="keyframe" id="keyframe" width="100%" height="100%" frameborder="0" src="/watermark.html" />
-</div>
-
-</div>
-</div>
-
-<div id="messagemenu" class="popupmenu">
- <ul class="toolbarmenu">
- <li><roundcube:button class="disablelink" command="enigma.key-disable" label="enigma.keydisable" target="_blank" classAct="disablelink active" /></li>
- <li><roundcube:button class="revokelink" command="enigma.key-revoke" label="enigma.keyrevoke" classAct="revokelink active" /></li>
- <li class="separator_below"><roundcube:button class="sendlink" command="enigma.key-send" label="enigma.keysend" classAct="sendlink active" /></li>
- <li><roundcube:button class="chpasslink" command="enigma.key-chpass" label="enigma.keychpass" classAct="chpasslink active" /></li>
- </ul>
-</div>
-
-<script type="text/javascript">
-rcube_init_mail_ui();
-</script>
-
-</body>
-</html>
diff --git a/plugins/enigma/tests/Enigma.php b/plugins/enigma/tests/Enigma.php
deleted file mode 100644
index 0d0d8f8ae..000000000
--- a/plugins/enigma/tests/Enigma.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-class Enigma_Plugin extends PHPUnit_Framework_TestCase
-{
-
- function setUp()
- {
- include_once dirname(__FILE__) . '/../enigma.php';
- }
-
- /**
- * Plugin object construction test
- */
- function test_constructor()
- {
- $rcube = rcube::get_instance();
- $plugin = new enigma($rcube->api);
-
- $this->assertInstanceOf('enigma', $plugin);
- $this->assertInstanceOf('rcube_plugin', $plugin);
- }
-}
-
diff --git a/plugins/fail2ban/fail2ban.php b/plugins/fail2ban/fail2ban.php
new file mode 100644
index 000000000..c877e5c98
--- /dev/null
+++ b/plugins/fail2ban/fail2ban.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * RoundCube Fail2Ban Plugin
+ *
+ * @version 1.1
+ * @author Matt Rude [m@mattrude.com]
+ * @url http://mattrude.com/plugins/roundcube-fail2ban-plugin/
+ * @license GPLv3
+ */
+class fail2ban extends rcube_plugin
+{
+ function init()
+ {
+ $this->add_hook('login_failed', array($this, 'log'));
+ }
+
+ function log($args)
+ {
+ $log_entry = 'FAILED login for ' .$args['user']. ' from ' .getenv('REMOTE_ADDR');
+ $log_config = rcmail::get_instance()->config->get('log_driver');
+
+ if ($log_config == 'syslog'){
+ syslog(LOG_WARNING, $log_entry);
+ } elseif ($log_config == 'file'){
+ error_log('['.date('d-M-Y H:i:s O')."]: ".$log_entry."\n", 3, "logs/userlogins");
+ } else {
+ echo 'WARNING!! The RoundCube Fail2Ban Plugin was unable to retrieve the log driver from the config, please check your config file for log_driver.';
+ }
+ }
+
+}
+
+?>
diff --git a/plugins/filesystem_attachments/filesystem_attachments.php b/plugins/filesystem_attachments/filesystem_attachments.php
index 8d995ca0d..d952e5a75 100644
--- a/plugins/filesystem_attachments/filesystem_attachments.php
+++ b/plugins/filesystem_attachments/filesystem_attachments.php
@@ -13,7 +13,6 @@
* require_once('plugins/filesystem_attachments/filesystem_attachments.php');
* class myCustom_attachments extends filesystem_attachments
*
- * @license GNU GPLv3+
* @author Ziba Scott <ziba@umich.edu>
* @author Thomas Bruederli <roundcube@gmail.com>
*
diff --git a/plugins/filesystem_attachments/package.xml b/plugins/filesystem_attachments/package.xml
index 49ec51934..031a74297 100644
--- a/plugins/filesystem_attachments/package.xml
+++ b/plugins/filesystem_attachments/package.xml
@@ -34,7 +34,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/help/config.inc.php.dist b/plugins/help/config.inc.php.dist
index 7cc8d5f00..d440dbbcc 100644
--- a/plugins/help/config.inc.php.dist
+++ b/plugins/help/config.inc.php.dist
@@ -1,35 +1,5 @@
<?php
// Help content iframe source
-// %l will be replaced by the language code resolved using the 'help_language_map' option
-$config['help_source'] = 'http://roundcube.net/doc/help/0.9/%l/';
-
-// Map task/action combinations to deep-links
-// Use '<task>/<action>' or only '<task>' strings as keys
-// The values will be appended to the 'help_source' URL
-$config['help_index_map'] = array(
- 'login' => 'login.html',
- 'mail' => 'mail/index.html',
- 'mail/compose' => 'mail/compose.html',
- 'addressbook' => 'addressbook/index.html',
- 'settings' => 'settings/index.html',
- 'settings/preferences' => 'settings/preferences.html',
- 'settings/folders' => 'settings/folders.html',
- 'settings/identities' => 'settings/identities.html',
-);
-
-// Map to translate Roundcube language codes into help document languages
-// The '*' entry will be used as default
-$config['help_language_map'] = array('*' => 'en_US');
-
-// Enter an absolute URL to a page displaying information about this webmail
-// Alternatively, create a HTML file under <this-plugin-dir>/content/about.html
-$config['help_about_url'] = null;
-
-// Enter an absolute URL to a page displaying information about this webmail
-// Alternatively, put your license text to <this-plugin-dir>/content/license.html
-$config['help_license_url'] = null;
-
-// Determine whether to open the help in a new window
-$config['help_open_extwin'] = false;
-
+// $rcmail_config['help_source'] = 'http://trac.roundcube.net/wiki';
+$rcmail_config['help_source'] = '';
diff --git a/plugins/help/content/about.html b/plugins/help/content/about.html
new file mode 100644
index 000000000..6e9632bec
--- /dev/null
+++ b/plugins/help/content/about.html
@@ -0,0 +1,27 @@
+<div id="helpabout" class="readtext">
+<h2 align="center">Copyright &copy; 2005-2012, The Roundcube Dev Team</h2>
+
+<p>
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License (with exceptions
+for skins &amp; plugins) as published by the Free Software Foundation,
+either version 3 of the License, or (at your option) any later version.
+</p>
+<p>
+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.
+</p>
+<p>
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a>.
+</p>
+
+<p>
+For more details about licensing and the expections for skins and plugins
+see <a href="http://roundcube.net/license">roundcube.net/license</a>.
+</p>
+
+<p><br/>Website: <a href="http://roundcube.net">roundcube.net</a></p>
+</div>
diff --git a/plugins/help/content/license.html b/plugins/help/content/license.html
index 9034d46f8..371dbffe1 100644
--- a/plugins/help/content/license.html
+++ b/plugins/help/content/license.html
@@ -655,7 +655,7 @@ the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found
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 &lt;http://www.gnu.org/licenses/&gt;.
+ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
</pre>
<p>Also add information on how to contact you by electronic and paper mail.</p>
diff --git a/plugins/help/help.php b/plugins/help/help.php
index 37fd908a3..4b11dceb3 100644
--- a/plugins/help/help.php
+++ b/plugins/help/help.php
@@ -1,10 +1,9 @@
<?php
/**
- * Roundcube Help Plugin
+ * Help Plugin
*
* @author Aleksander 'A.L.E.C' Machniak
- * @author Thomas Bruederli <thomas@roundcube.net>
* @license GNU GPLv3+
*
* Configuration (see config.inc.php.dist)
@@ -22,7 +21,8 @@ class help extends rcube_plugin
function init()
{
- $this->load_config();
+ $rcmail = rcmail::get_instance();
+
$this->add_texts('localization/', false);
// register task
@@ -33,8 +33,6 @@ class help extends rcube_plugin
$this->register_action('about', array($this, 'action'));
$this->register_action('license', array($this, 'action'));
- $rcmail = rcmail::get_instance();
-
// add taskbar button
$this->add_button(array(
'command' => 'help',
@@ -44,9 +42,6 @@ class help extends rcube_plugin
'label' => 'help.help',
), 'taskbar');
- $this->include_script('help.js');
- $rcmail->output->set_env('help_open_extwin', $rcmail->config->get('help_open_extwin', false), true);
-
// add style for taskbar button (must be here) and Help UI
$skin_path = $this->local_skin_path();
if (is_file($this->home . "/$skin_path/help.css")) {
@@ -58,10 +53,11 @@ class help extends rcube_plugin
{
$rcmail = rcmail::get_instance();
+ $this->load_config();
+
// register UI objects
$rcmail->output->add_handlers(array(
'helpcontent' => array($this, 'content'),
- 'tablink' => array($this, 'tablink'),
));
if ($rcmail->action == 'about')
@@ -74,52 +70,20 @@ class help extends rcube_plugin
$rcmail->output->send('help.help');
}
- function tablink($attrib)
- {
- $rcmail = rcmail::get_instance();
- $attrib['name'] = 'helplink' . $attrib['action'];
- $attrib['href'] = $rcmail->url(array('_action' => $attrib['action'], '_extwin' => !empty($_REQUEST['_extwin']) ? 1 : null));
- return $rcmail->output->button($attrib);
- }
-
function content($attrib)
{
$rcmail = rcmail::get_instance();
- switch ($rcmail->action) {
- case 'about':
- if (is_readable($this->home . '/content/about.html')) {
- return @file_get_contents($this->home . '/content/about.html');
- }
- $default = $rcmail->url(array('_task' => 'settings', '_action' => 'about', '_framed' => 1));
- $src = $rcmail->config->get('help_about_url', $default);
- break;
-
- case 'license':
- if (is_readable($this->home . '/content/license.html')) {
- return @file_get_contents($this->home . '/content/license.html');
- }
- $src = $rcmail->config->get('help_license_url', 'http://www.gnu.org/licenses/gpl-3.0-standalone.html');
- break;
-
- default:
- $src = $rcmail->config->get('help_source');
-
- // resolve task/action for depp linking
- $index_map = $rcmail->config->get('help_index_map', array());
- $rel = $_REQUEST['_rel'];
- list($task,$action) = explode('/', $rel);
- if ($add = $index_map[$rel])
- $src .= $add;
- else if ($add = $index_map[$task])
- $src .= $add;
- break;
+ if ($rcmail->action == 'about') {
+ return @file_get_contents($this->home.'/content/about.html');
+ }
+ else if ($rcmail->action == 'license') {
+ return @file_get_contents($this->home.'/content/license.html');
}
// default content: iframe
- if (!empty($src)) {
- $attrib['src'] = $this->resolve_language($src);
- }
+ if ($src = $rcmail->config->get('help_source'))
+ $attrib['src'] = $src;
if (empty($attrib['id']))
$attrib['id'] = 'rcmailhelpcontent';
@@ -129,13 +93,4 @@ class help extends rcube_plugin
return $rcmail->output->frame($attrib);
}
-
- private function resolve_language($path)
- {
- // resolve language placeholder
- $rcmail = rcmail::get_instance();
- $langmap = $rcmail->config->get('help_language_map', array('*' => 'en_US'));
- $lang = !empty($langmap[$_SESSION['language']]) ? $langmap[$_SESSION['language']] : $langmap['*'];
- return str_replace('%l', $lang, $path);
- }
}
diff --git a/plugins/help/localization/ar.inc b/plugins/help/localization/ar.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/ar.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/ast.inc b/plugins/help/localization/ast.inc
new file mode 100644
index 000000000..7e5e2874a
--- /dev/null
+++ b/plugins/help/localization/ast.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Ayuda';
+$labels['about'] = 'Tocante a';
+$labels['license'] = 'Llicencia';
+?>
diff --git a/plugins/help/localization/be_BE.inc b/plugins/help/localization/be_BE.inc
new file mode 100644
index 000000000..3bbb1db32
--- /dev/null
+++ b/plugins/help/localization/be_BE.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Дапамога';
+$labels['about'] = 'Апісанне';
+$labels['license'] = 'Ліцэнзія';
+?>
diff --git a/plugins/help/localization/bg_BG.inc b/plugins/help/localization/bg_BG.inc
new file mode 100644
index 000000000..05a0aafab
--- /dev/null
+++ b/plugins/help/localization/bg_BG.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Помощ';
+$labels['about'] = 'Относно';
+$labels['license'] = 'Лиценз';
+?>
diff --git a/plugins/help/localization/bn_BD.inc b/plugins/help/localization/bn_BD.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/bn_BD.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/el_GR.inc b/plugins/help/localization/el_GR.inc
new file mode 100644
index 000000000..74be22bf1
--- /dev/null
+++ b/plugins/help/localization/el_GR.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Βοηθεια';
+$labels['about'] = 'Σχετικά';
+$labels['license'] = 'Άδεια χρήσης';
+?>
diff --git a/plugins/help/localization/en_US.inc b/plugins/help/localization/en_US.inc
index b81f02fb9..cf6c0aaaf 100644
--- a/plugins/help/localization/en_US.inc
+++ b/plugins/help/localization/en_US.inc
@@ -2,10 +2,10 @@
/*
+-----------------------------------------------------------------------+
- | plugins/help/localization/<lang>.inc |
+ | plugins/help/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Help plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/help/localization/es_AR.inc b/plugins/help/localization/es_AR.inc
new file mode 100644
index 000000000..5425367f4
--- /dev/null
+++ b/plugins/help/localization/es_AR.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Ayuda';
+$labels['about'] = 'Acerca de';
+$labels['license'] = 'Licencia';
+?>
diff --git a/plugins/help/localization/eu_ES.inc b/plugins/help/localization/eu_ES.inc
new file mode 100644
index 000000000..d6547c7da
--- /dev/null
+++ b/plugins/help/localization/eu_ES.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Laguntza';
+$labels['about'] = 'Honi buruz';
+$labels['license'] = 'Lizentzia';
+?>
diff --git a/plugins/help/localization/fa_AF.inc b/plugins/help/localization/fa_AF.inc
new file mode 100644
index 000000000..e9fac20c1
--- /dev/null
+++ b/plugins/help/localization/fa_AF.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'راهنما';
+$labels['about'] = 'درباره نرم افزار';
+$labels['license'] = 'حق نشر';
+?>
diff --git a/plugins/help/localization/gl_ES.inc b/plugins/help/localization/gl_ES.inc
index e3e9e36ca..432623751 100644
--- a/plugins/help/localization/gl_ES.inc
+++ b/plugins/help/localization/gl_ES.inc
@@ -19,6 +19,6 @@
$labels = array();
$labels['help'] = 'Axuda';
$labels['about'] = 'Acerca de';
-$labels['license'] = 'Licenza';
+$labels['license'] = 'Licencia';
?>
diff --git a/plugins/help/localization/hi_IN.inc b/plugins/help/localization/hi_IN.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/hi_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/ia.inc b/plugins/help/localization/ia.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/ia.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/lb_LU.inc b/plugins/help/localization/lb_LU.inc
index 0a7ec6eef..63d6aebdc 100644
--- a/plugins/help/localization/lb_LU.inc
+++ b/plugins/help/localization/lb_LU.inc
@@ -15,10 +15,7 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/
*/
-
-$labels = array();
$labels['help'] = 'Hëllef';
$labels['about'] = 'Iwwert';
$labels['license'] = 'Lizenz';
-
?>
diff --git a/plugins/help/localization/lv_LV.inc b/plugins/help/localization/lv_LV.inc
new file mode 100644
index 000000000..c3b15f0bc
--- /dev/null
+++ b/plugins/help/localization/lv_LV.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Palīdzība';
+$labels['about'] = 'Par';
+$labels['license'] = 'Licence';
+?>
diff --git a/plugins/help/localization/ml_IN.inc b/plugins/help/localization/ml_IN.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/ml_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/mn_MN.inc b/plugins/help/localization/mn_MN.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/mn_MN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/ms_MY.inc b/plugins/help/localization/ms_MY.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/ms_MY.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/my_MM.inc b/plugins/help/localization/my_MM.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/my_MM.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/nl_BE.inc b/plugins/help/localization/nl_BE.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/nl_BE.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/nqo.inc b/plugins/help/localization/nqo.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/nqo.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/om.inc b/plugins/help/localization/om.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/om.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/ro_RO.inc b/plugins/help/localization/ro_RO.inc
new file mode 100644
index 000000000..1706d0cea
--- /dev/null
+++ b/plugins/help/localization/ro_RO.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Ajutor';
+$labels['about'] = 'Despre';
+$labels['license'] = 'Licența';
+?>
diff --git a/plugins/help/localization/te_IN.inc b/plugins/help/localization/te_IN.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/te_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/th_TH.inc b/plugins/help/localization/th_TH.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/th_TH.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/ti.inc b/plugins/help/localization/ti.inc
new file mode 100644
index 000000000..5eccd5075
--- /dev/null
+++ b/plugins/help/localization/ti.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'መምሃሪ';
+$labels['about'] = 'ብዛዕባ';
+$labels['license'] = 'ፍቓድ';
+?>
diff --git a/plugins/help/localization/tzm.inc b/plugins/help/localization/tzm.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/tzm.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/localization/uk_UA.inc b/plugins/help/localization/uk_UA.inc
new file mode 100644
index 000000000..8d2f76c3c
--- /dev/null
+++ b/plugins/help/localization/uk_UA.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+$labels['help'] = 'Допомога';
+$labels['about'] = 'Про програму';
+$labels['license'] = 'Ліцензія';
+?>
diff --git a/plugins/help/localization/ur_PK.inc b/plugins/help/localization/ur_PK.inc
new file mode 100644
index 000000000..46160477e
--- /dev/null
+++ b/plugins/help/localization/ur_PK.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help 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-help/
+*/
+?>
diff --git a/plugins/help/package.xml b/plugins/help/package.xml
index d39143ba1..889efd17d 100644
--- a/plugins/help/package.xml
+++ b/plugins/help/package.xml
@@ -5,7 +5,7 @@
http://pear.php.net/dtd/package-2.0.xsd">
<name>help</name>
<channel>pear.roundcube.net</channel>
- <summary>Online Help for Roundcube</summary>
+ <summary>Help for Roundcube</summary>
<description>Plugin adds a new item (Help) in taskbar.</description>
<lead>
<name>Aleksander Machniak</name>
@@ -13,10 +13,10 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2013-07-03</date>
+ <date>2012-11-11</date>
<version>
- <release>1.4</release>
- <api>1.4</api>
+ <release>1.3</release>
+ <api>1.2</api>
</version>
<stability>
<release>stable</release>
@@ -31,6 +31,7 @@
<tasks:replace from="@package_version@" to="version" type="package-info"/>
</file>
<file name="config.inc.php.dist" role="data"></file>
+ <file name="content/about.html" role="data"></file>
<file name="content/license.html" role="data"></file>
<file name="localization/bs_BA.inc" role="data"></file>
<file name="localization/ca_ES.inc" role="data"></file>
diff --git a/plugins/help/skins/classic/help.css b/plugins/help/skins/classic/help.css
index c45b8f0b0..8f67f111e 100644
--- a/plugins/help/skins/classic/help.css
+++ b/plugins/help/skins/classic/help.css
@@ -5,23 +5,9 @@
background-image: url('help.gif');
}
-.extwin #tabsbar
-{
- top: 21px;
- left: 20px;
- right: 100px;
- border-bottom: 0;
-}
-
-.closelink {
- position: absolute;
- top: 20px;
- right: 20px;
-}
-
.help-box
{
- overflow: auto;
+ overflow: auto;
background-color: #F2F2F2;
}
diff --git a/plugins/help/skins/classic/templates/help.html b/plugins/help/skins/classic/templates/help.html
index 3d5b22869..2e430ecf3 100644
--- a/plugins/help/skins/classic/templates/help.html
+++ b/plugins/help/skins/classic/templates/help.html
@@ -7,28 +7,23 @@
<script type="text/javascript">
function help_init_settings_tabs()
{
- var action, tab = '#helptabindex';
+ var action, tab = '#helptabdefault';
if (window.rcmail && (action = rcmail.env.action)) {
- tab = '#helptab' + (action ? action : 'index');
+ tab = '#helptab' + (action ? action : 'default');
}
$(tab).addClass('tablink-selected');
}
</script>
</head>
-<roundcube:if condition="env:extwin" />
-<body class="extwin">
-<roundcube:object name="message" id="message" />
-<roundcube:button name="close" type="link" label="close" class="closelink" onclick="self.close()" />
-<roundcube:else />
<body>
+
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
-<roundcube:endif />
<div id="tabsbar">
-<span id="helptabindex" class="tablink"><roundcube:object name="tablink" action="index" type="link" label="help.help" title="help.help" /></span>
-<span id="helptababout" class="tablink"><roundcube:object name="tablink" action="about" type="link" label="help.about" title="help.about" class="tablink" /></span>
-<span id="helptablicense" class="tablink"><roundcube:object name="tablink" action="license" type="link" label="help.license" title="help.license" class="tablink" /></span>
+<span id="helptabdefault" class="tablink"><roundcube:button name="helpdefault" href="?_task=help" type="link" label="help.help" title="help.help" /></span>
+<span id="helptababout" class="tablink"><roundcube:button name="helpabout" href="?_task=help&_action=about" type="link" label="help.about" title="help.about" class="tablink" /></span>
+<span id="helptablicense" class="tablink"><roundcube:button name="helplicense" href="?_task=help&_action=license" type="link" label="help.license" title="help.license" class="tablink" /></span>
<roundcube:container name="helptabs" id="helptabsbar" />
<script type="text/javascript"> if (window.rcmail) rcmail.add_onload(help_init_settings_tabs);</script>
</div>
diff --git a/plugins/help/skins/larry/help.css b/plugins/help/skins/larry/help.css
index d9af6e15e..c2e369af6 100644
--- a/plugins/help/skins/larry/help.css
+++ b/plugins/help/skins/larry/help.css
@@ -39,6 +39,7 @@
background: url(help.png) center -130px no-repeat;
}
+.iframebox.help_about,
.iframebox.help_license {
overflow: auto;
}
diff --git a/plugins/help/skins/larry/templates/help.html b/plugins/help/skins/larry/templates/help.html
index bfd3f1141..39caaa62f 100644
--- a/plugins/help/skins/larry/templates/help.html
+++ b/plugins/help/skins/larry/templates/help.html
@@ -4,16 +4,16 @@
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
</head>
-<roundcube:if condition="env:extwin" /><body class="extwin"><roundcube:else /><body><roundcube:endif />
+<body>
<roundcube:include file="/includes/header.html" />
<div id="mainscreen">
<div id="helptoolbar" class="toolbar">
-<roundcube:object name="tablink" action="index" type="link" label="help.help" title="help.help" class="button help" />
-<roundcube:object name="tablink" action="about" type="link" label="help.about" title="help.about" class="button about" />
-<roundcube:object name="tablink" action="license" type="link" label="help.license" title="help.license" class="button license" />
+<roundcube:button name="helpdefault" href="?_task=help" type="link" label="help.help" title="help.help" class="button help" />
+<roundcube:button name="helpabout" href="?_task=help&amp;_action=about" type="link" label="help.about" title="help.about" class="button about" />
+<roundcube:button name="helplicense" href="?_task=help&amp;_action=license" type="link" label="help.license" title="help.license" class="button license" />
<roundcube:container name="helptabs" id="helptabsbar" />
</div>
diff --git a/plugins/hide_blockquote/hide_blockquote.php b/plugins/hide_blockquote/hide_blockquote.php
index 2ad5dd8ac..7af163dcd 100644
--- a/plugins/hide_blockquote/hide_blockquote.php
+++ b/plugins/hide_blockquote/hide_blockquote.php
@@ -8,7 +8,7 @@
* Configuration:
* // Minimum number of citation lines. Longer citation blocks will be hidden.
* // 0 - no limit (no hidding).
- * $config['hide_blockquote_limit'] = 0;
+ * $rcmail_config['hide_blockquote_limit'] = 0;
*
* @version @package_version@
* @license GNU GPLv3+
@@ -69,7 +69,7 @@ class hide_blockquote extends rcube_plugin
function save_prefs($args)
{
if ($args['section'] == 'mailview') {
- $args['prefs']['hide_blockquote_limit'] = (int) rcube_utils::get_input_value('_hide_blockquote_limit', rcube_utils::INPUT_POST);
+ $args['prefs']['hide_blockquote_limit'] = (int) get_input_value('_hide_blockquote_limit', RCUBE_INPUT_POST);
}
return $args;
diff --git a/plugins/hide_blockquote/localization/ar.inc b/plugins/hide_blockquote/localization/ar.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ar.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/ar_SA.inc b/plugins/hide_blockquote/localization/ar_SA.inc
new file mode 100644
index 000000000..30ade1397
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ar_SA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'إخفاء';
+$labels['show'] = 'إظهار';
+?>
diff --git a/plugins/hide_blockquote/localization/be_BE.inc b/plugins/hide_blockquote/localization/be_BE.inc
new file mode 100644
index 000000000..28248adf0
--- /dev/null
+++ b/plugins/hide_blockquote/localization/be_BE.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Схаваць';
+$labels['show'] = 'Паказаць';
+$labels['quotelimit'] = 'Хаваць цытаванне, калі колькасць радкоў пераўзыходзіць';
+?>
diff --git a/plugins/hide_blockquote/localization/bg_BG.inc b/plugins/hide_blockquote/localization/bg_BG.inc
new file mode 100644
index 000000000..ec64513a8
--- /dev/null
+++ b/plugins/hide_blockquote/localization/bg_BG.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Скрий';
+$labels['show'] = 'Покажи';
+$labels['quotelimit'] = 'Скрива цитатите когато броя редове е по-голям от';
+?>
diff --git a/plugins/hide_blockquote/localization/bn_BD.inc b/plugins/hide_blockquote/localization/bn_BD.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/bn_BD.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/el_GR.inc b/plugins/hide_blockquote/localization/el_GR.inc
new file mode 100644
index 000000000..a5572957a
--- /dev/null
+++ b/plugins/hide_blockquote/localization/el_GR.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Αποκρυψη';
+$labels['show'] = 'Εμφάνιση';
+$labels['quotelimit'] = 'Απόκρυψη παραπομπων όταν οι γραμμές μέτρησης είναι μεγαλύτερες από';
+?>
diff --git a/plugins/hide_blockquote/localization/en_US.inc b/plugins/hide_blockquote/localization/en_US.inc
index 90dd28955..c3a5ca019 100644
--- a/plugins/hide_blockquote/localization/en_US.inc
+++ b/plugins/hide_blockquote/localization/en_US.inc
@@ -2,10 +2,10 @@
/*
+-----------------------------------------------------------------------+
- | plugins/hide_blockquote/localization/<lang>.inc |
+ | plugins/hide_blockquote/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Hide-Blockquote plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/hide_blockquote/localization/es_AR.inc b/plugins/hide_blockquote/localization/es_AR.inc
new file mode 100644
index 000000000..5046eaf69
--- /dev/null
+++ b/plugins/hide_blockquote/localization/es_AR.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Ocultar';
+$labels['show'] = 'Mostrar';
+$labels['quotelimit'] = 'Ocultar el mail citado cuando el número de líneas sea mayor que';
+?>
diff --git a/plugins/hide_blockquote/localization/eu_ES.inc b/plugins/hide_blockquote/localization/eu_ES.inc
new file mode 100644
index 000000000..f7adf6e00
--- /dev/null
+++ b/plugins/hide_blockquote/localization/eu_ES.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Ezkutatu';
+$labels['show'] = 'Erakutsi';
+$labels['quotelimit'] = 'Ezkutatu aipamena lerroen kopurua hau baino handiagoa denean';
+?>
diff --git a/plugins/hide_blockquote/localization/fa_AF.inc b/plugins/hide_blockquote/localization/fa_AF.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/fa_AF.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/fi_FI.inc b/plugins/hide_blockquote/localization/fi_FI.inc
index cb7c8aaa4..952149858 100644
--- a/plugins/hide_blockquote/localization/fi_FI.inc
+++ b/plugins/hide_blockquote/localization/fi_FI.inc
@@ -19,6 +19,6 @@
$labels = array();
$labels['hide'] = 'Piilota';
$labels['show'] = 'Näytä';
-$labels['quotelimit'] = 'Hide citation when lines count is greater than';
+$labels['quotelimit'] = 'Piilota lainaus rivejä ollessa enemmän kuin';
?>
diff --git a/plugins/hide_blockquote/localization/hi_IN.inc b/plugins/hide_blockquote/localization/hi_IN.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/hi_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/ia.inc b/plugins/hide_blockquote/localization/ia.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ia.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/lb_LU.inc b/plugins/hide_blockquote/localization/lb_LU.inc
index 98e0f6936..8f5a07df9 100644
--- a/plugins/hide_blockquote/localization/lb_LU.inc
+++ b/plugins/hide_blockquote/localization/lb_LU.inc
@@ -15,10 +15,7 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/
*/
-
-$labels = array();
$labels['hide'] = 'Verstoppen';
$labels['show'] = 'Weisen';
$labels['quotelimit'] = 'Zitat verstoppe wann d\'Zeilenunzuel méi grouss ass ewéi';
-
?>
diff --git a/plugins/hide_blockquote/localization/lv_LV.inc b/plugins/hide_blockquote/localization/lv_LV.inc
new file mode 100644
index 000000000..162deda8b
--- /dev/null
+++ b/plugins/hide_blockquote/localization/lv_LV.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Slēpt';
+$labels['show'] = 'Rādīt';
+$labels['quotelimit'] = 'Slēpt citātu kad līniju skaits ir lielāks kā';
+?>
diff --git a/plugins/hide_blockquote/localization/ml_IN.inc b/plugins/hide_blockquote/localization/ml_IN.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ml_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/mn_MN.inc b/plugins/hide_blockquote/localization/mn_MN.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/mn_MN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/ms_MY.inc b/plugins/hide_blockquote/localization/ms_MY.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ms_MY.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/my_MM.inc b/plugins/hide_blockquote/localization/my_MM.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/my_MM.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/nl_BE.inc b/plugins/hide_blockquote/localization/nl_BE.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/nl_BE.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/nqo.inc b/plugins/hide_blockquote/localization/nqo.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/nqo.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/om.inc b/plugins/hide_blockquote/localization/om.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/om.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/ro_RO.inc b/plugins/hide_blockquote/localization/ro_RO.inc
new file mode 100644
index 000000000..978b84a90
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ro_RO.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Ascunde';
+$labels['show'] = 'Afișează';
+$labels['quotelimit'] = 'Ascunde citațiile dacă numărul de linii este mai mare ca';
+?>
diff --git a/plugins/hide_blockquote/localization/te_IN.inc b/plugins/hide_blockquote/localization/te_IN.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/te_IN.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/th_TH.inc b/plugins/hide_blockquote/localization/th_TH.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/th_TH.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/ti.inc b/plugins/hide_blockquote/localization/ti.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ti.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/tzm.inc b/plugins/hide_blockquote/localization/tzm.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/tzm.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/hide_blockquote/localization/uk_UA.inc b/plugins/hide_blockquote/localization/uk_UA.inc
new file mode 100644
index 000000000..a8dd54144
--- /dev/null
+++ b/plugins/hide_blockquote/localization/uk_UA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+$labels['hide'] = 'Приховати';
+$labels['show'] = 'Показати';
+?>
diff --git a/plugins/hide_blockquote/localization/ur_PK.inc b/plugins/hide_blockquote/localization/ur_PK.inc
new file mode 100644
index 000000000..83c0e3cb6
--- /dev/null
+++ b/plugins/hide_blockquote/localization/ur_PK.inc
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote 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-hide_blockquote/
+*/
+?>
diff --git a/plugins/http_authentication/config.inc.php.dist b/plugins/http_authentication/config.inc.php.dist
index 0940dee1f..0d798a586 100644
--- a/plugins/http_authentication/config.inc.php.dist
+++ b/plugins/http_authentication/config.inc.php.dist
@@ -5,5 +5,5 @@
// Default mail host to log-in using user/password from HTTP Authentication.
// This is useful if the users are free to choose arbitrary mail hosts (or
// from a list), but have one host they usually want to log into.
-// Unlike $config['default_host'] this must be a string!
-$config['http_authentication_host'] = '';
+// Unlike $rcmail_config['default_host'] this must be a string!
+$rcmail_config['http_authentication_host'] = '';
diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php
index d86e1791c..a94b6121a 100644
--- a/plugins/http_authentication/http_authentication.php
+++ b/plugins/http_authentication/http_authentication.php
@@ -7,7 +7,7 @@
*
* Configuration:
* // redirect the client to this URL after logout. This page is then responsible to clear HTTP auth
- * $config['logout_url'] = 'http://server.tld/logout.html';
+ * $rcmail_config['logout_url'] = 'http://server.tld/logout.html';
*
* See logout.html (in this directory) for an example how HTTP auth can be cleared.
*
@@ -52,8 +52,8 @@ class http_authentication extends rcube_plugin
$this->load_config();
$host = rcmail::get_instance()->config->get('http_authentication_host');
- if (is_string($host) && trim($host) !== '' && empty($args['host']))
- $args['host'] = rcube_utils::idn_to_ascii(rcube_utils::parse_host($host));
+ if (is_string($host) && trim($host) !== '')
+ $args['host'] = rcube_idn_to_ascii(rcube_parse_host($host));
// Allow entering other user data in login form,
// e.g. after log out (#1487953)
diff --git a/plugins/jqueryui/config.inc.php.dist b/plugins/jqueryui/config.inc.php.dist
index 8e111e0e1..a3c3f75a0 100644
--- a/plugins/jqueryui/config.inc.php.dist
+++ b/plugins/jqueryui/config.inc.php.dist
@@ -1,10 +1,10 @@
<?php
// if you want to load localization strings for specific sub-libraries of jquery-ui, configure them here
-$config['jquery_ui_i18n'] = array('datepicker');
+$rcmail_config['jquery_ui_i18n'] = array('datepicker');
// map Roundcube skins with jquery-ui themes here
-$config['jquery_ui_skin_map'] = array(
+$rcmail_config['jquery_ui_skin_map'] = array(
'larry' => 'larry',
'default' => 'larry',
'groupvice4' => 'redmond',
diff --git a/plugins/jqueryui/jqueryui.php b/plugins/jqueryui/jqueryui.php
index e9b3c215e..db640d1aa 100644
--- a/plugins/jqueryui/jqueryui.php
+++ b/plugins/jqueryui/jqueryui.php
@@ -8,7 +8,6 @@
* @version 1.9.1
* @author Cor Bosman <roundcube@wa.ter.net>
* @author Thomas Bruederli <roundcube@gmail.com>
- * @license GNU GPLv3+
*/
class jqueryui extends rcube_plugin
{
diff --git a/plugins/jqueryui/js/i18n/jquery-ui-i18n.js b/plugins/jqueryui/js/i18n/jquery-ui-i18n.js
index e8acb16ea..e8acb16ea 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery-ui-i18n.js
+++ b/plugins/jqueryui/js/i18n/jquery-ui-i18n.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-af.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-af.js
index 0922ef7a1..0922ef7a1 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-af.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-af.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar-DZ.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar-DZ.js
index 7b175af40..7b175af40 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar-DZ.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar-DZ.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar.js
index cef0f08fd..cef0f08fd 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-az.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-az.js
index a133a9eb2..a133a9eb2 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-az.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-az.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bg.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bg.js
index 86ab88582..86ab88582 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bg.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bg.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bs.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bs.js
index f08870ffe..f08870ffe 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bs.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-bs.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ca.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ca.js
index a10b549c2..a10b549c2 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ca.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ca.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cs.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cs.js
index b96b1a51c..b96b1a51c 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cs.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cs.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cy-GB.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cy-GB.js
index cf3a38e6c..cf3a38e6c 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cy-GB.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-cy-GB.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-da.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-da.js
index 7e42948b3..7e42948b3 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-da.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-da.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-de.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-de.js
index cfe91759b..cfe91759b 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-de.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-de.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-el.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-el.js
index 1ac47561a..1ac47561a 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-el.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-el.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-AU.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-AU.js
index c1a1020a1..c1a1020a1 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-AU.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-AU.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-GB.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-GB.js
index 16a096e75..16a096e75 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-GB.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-GB.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-NZ.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-NZ.js
index 7819df052..7819df052 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-NZ.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-NZ.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eo.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eo.js
index 39e44fc57..39e44fc57 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eo.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eo.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-es.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-es.js
index 97a2d6ead..97a2d6ead 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-es.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-es.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-et.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-et.js
index 62cbea8fa..62cbea8fa 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-et.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-et.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eu.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eu.js
index a71db2c72..a71db2c72 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eu.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-eu.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fa.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fa.js
index bb957f6d8..bb957f6d8 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fa.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fa.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fi.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fi.js
index bd6d99498..bd6d99498 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fi.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fi.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fo.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fo.js
index 9c848a04b..9c848a04b 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fo.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fo.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr-CH.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr-CH.js
index e574537b0..e574537b0 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr-CH.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr-CH.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr.js
index 934afd1d0..934afd1d0 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-gl.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-gl.js
index 59b989a6d..59b989a6d 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-gl.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-gl.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-he.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-he.js
index b9e8deec5..b9e8deec5 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-he.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-he.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hi.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hi.js
index 6c563b997..6c563b997 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hi.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hi.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hr.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hr.js
index 2fe37b64b..2fe37b64b 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hr.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hr.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hu.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hu.js
index b28c268c1..b28c268c1 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hu.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hu.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hy.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hy.js
index 6d4eca555..6d4eca555 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hy.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-hy.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-id.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-id.js
index 6327fa60c..6327fa60c 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-id.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-id.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-is.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-is.js
index 925341a7a..925341a7a 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-is.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-is.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-it.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-it.js
index a01f043f8..a01f043f8 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-it.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-it.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ja.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ja.js
index 4d0b63c77..4d0b63c77 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ja.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ja.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ka.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ka.js
index c10658d79..c10658d79 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ka.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ka.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-kk.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-kk.js
index dcd6a65df..dcd6a65df 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-kk.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-kk.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-km.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-km.js
index f9c4e3a02..f9c4e3a02 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-km.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-km.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ko.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ko.js
index af36f3d6b..af36f3d6b 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ko.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ko.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lb.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lb.js
index 87c79d594..87c79d594 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lb.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lb.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lt.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lt.js
index 1afaaac5d..1afaaac5d 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lt.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lt.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lv.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lv.js
index 28cc102fc..28cc102fc 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lv.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-lv.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-mk.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-mk.js
index 028532551..028532551 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-mk.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-mk.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ml.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ml.js
index 9b8f460db..9b8f460db 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ml.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ml.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ms.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ms.js
index e70de7299..e70de7299 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ms.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ms.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl-BE.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl-BE.js
index 7b3cdf425..7b3cdf425 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl-BE.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl-BE.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl.js
index 203f16069..203f16069 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-no.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-no.js
index d36e430be..d36e430be 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-no.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-no.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pl.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pl.js
index 0ffc515b9..0ffc515b9 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pl.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pl.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt-BR.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt-BR.js
index 521967ec3..521967ec3 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt-BR.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt-BR.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt.js
index 999f20e3e..999f20e3e 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-rm.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-rm.js
index 22ed21685..22ed21685 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-rm.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-rm.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ro.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ro.js
index a988270d7..a988270d7 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ro.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ro.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ru.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ru.js
index a51971405..a51971405 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ru.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ru.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sk.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sk.js
index 83ae8e811..83ae8e811 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sk.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sk.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sl.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sl.js
index 048a47af7..048a47af7 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sl.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sl.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sq.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sq.js
index d6086a789..d6086a789 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sq.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sq.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr-SR.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr-SR.js
index 6d5d04211..6d5d04211 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr-SR.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr-SR.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr.js
index d4e1d9af0..d4e1d9af0 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sv.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sv.js
index cbb5ad135..cbb5ad135 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sv.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-sv.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ta.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ta.js
index 40431ed8e..40431ed8e 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ta.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-ta.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-th.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-th.js
index aecfd27cc..aecfd27cc 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-th.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-th.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tj.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tj.js
index 9a20e4d37..9a20e4d37 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tj.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tj.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tr.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tr.js
index 75b583a77..75b583a77 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tr.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-tr.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-uk.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-uk.js
index 2bdc82ff7..2bdc82ff7 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-uk.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-uk.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-vi.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-vi.js
index b49e7eb13..b49e7eb13 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-vi.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-vi.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-CN.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-CN.js
index d337e4a99..d337e4a99 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-CN.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-CN.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-HK.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-HK.js
index ef6f4e715..ef6f4e715 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-HK.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-HK.js
diff --git a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-TW.js b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-TW.js
index b9105ea50..b9105ea50 100755..100644
--- a/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-TW.js
+++ b/plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-TW.js
diff --git a/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js b/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js
index aa7a923e7..aa7a923e7 100755..100644
--- a/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js
+++ b/plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js
diff --git a/plugins/jqueryui/themes/classic/images/ui-bg_flat_0_aaaaaa_40x100.png b/plugins/jqueryui/themes/classic/images/ui-bg_flat_0_aaaaaa_40x100.png
index 5b5dab2ab..5b5dab2ab 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-bg_flat_0_aaaaaa_40x100.png
+++ b/plugins/jqueryui/themes/classic/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-bg_flat_75_ffffff_40x100.png b/plugins/jqueryui/themes/classic/images/ui-bg_flat_75_ffffff_40x100.png
index ac8b229af..ac8b229af 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-bg_flat_75_ffffff_40x100.png
+++ b/plugins/jqueryui/themes/classic/images/ui-bg_flat_75_ffffff_40x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-bg_flat_90_cc3333_40x100.png b/plugins/jqueryui/themes/classic/images/ui-bg_flat_90_cc3333_40x100.png
index 6a5d37d65..6a5d37d65 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-bg_flat_90_cc3333_40x100.png
+++ b/plugins/jqueryui/themes/classic/images/ui-bg_flat_90_cc3333_40x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-bg_glass_95_fef1ec_1x400.png b/plugins/jqueryui/themes/classic/images/ui-bg_glass_95_fef1ec_1x400.png
index 4443fdc1a..4443fdc1a 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-bg_glass_95_fef1ec_1x400.png
+++ b/plugins/jqueryui/themes/classic/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_a3a3a3_1x100.png b/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_a3a3a3_1x100.png
index b3533aafe..b3533aafe 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_a3a3a3_1x100.png
+++ b/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_a3a3a3_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_e6e6e7_1x100.png b/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_e6e6e7_1x100.png
index d0a127f4d..d0a127f4d 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_e6e6e7_1x100.png
+++ b/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_e6e6e7_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_f4f4f4_1x100.png b/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_f4f4f4_1x100.png
index ecc0ac16a..ecc0ac16a 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_f4f4f4_1x100.png
+++ b/plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_f4f4f4_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-icons_000000_256x240.png b/plugins/jqueryui/themes/classic/images/ui-icons_000000_256x240.png
index 7c211aa08..7c211aa08 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-icons_000000_256x240.png
+++ b/plugins/jqueryui/themes/classic/images/ui-icons_000000_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-icons_333333_256x240.png b/plugins/jqueryui/themes/classic/images/ui-icons_333333_256x240.png
index fe079a595..fe079a595 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-icons_333333_256x240.png
+++ b/plugins/jqueryui/themes/classic/images/ui-icons_333333_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-icons_666666_256x240.png b/plugins/jqueryui/themes/classic/images/ui-icons_666666_256x240.png
index f87de1ca1..f87de1ca1 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-icons_666666_256x240.png
+++ b/plugins/jqueryui/themes/classic/images/ui-icons_666666_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-icons_cc3333_256x240.png b/plugins/jqueryui/themes/classic/images/ui-icons_cc3333_256x240.png
index b2fe02927..b2fe02927 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-icons_cc3333_256x240.png
+++ b/plugins/jqueryui/themes/classic/images/ui-icons_cc3333_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/images/ui-icons_dddddd_256x240.png b/plugins/jqueryui/themes/classic/images/ui-icons_dddddd_256x240.png
index 91aada0ab..91aada0ab 100755..100644
--- a/plugins/jqueryui/themes/classic/images/ui-icons_dddddd_256x240.png
+++ b/plugins/jqueryui/themes/classic/images/ui-icons_dddddd_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css b/plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css
index 1002a95fe..1002a95fe 100755..100644
--- a/plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css
+++ b/plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css
diff --git a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_55_b0ccd7_1x100.png b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_55_b0ccd7_1x100.png
index 04f19af52..04f19af52 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_55_b0ccd7_1x100.png
+++ b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_55_b0ccd7_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_65_ffffff_1x100.png b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_65_ffffff_1x100.png
index eaa8cfa3c..eaa8cfa3c 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_65_ffffff_1x100.png
+++ b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_65_ffffff_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_eaeaea_1x100.png b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_eaeaea_1x100.png
index 3231591bd..3231591bd 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_eaeaea_1x100.png
+++ b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_eaeaea_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_f8f8f8_1x100.png b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_f8f8f8_1x100.png
index e2286450a..e2286450a 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_f8f8f8_1x100.png
+++ b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_f8f8f8_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_75_fafafa_1x100.png b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_75_fafafa_1x100.png
index a13a9720f..a13a9720f 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_75_fafafa_1x100.png
+++ b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_75_fafafa_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_90_e4e4e4_1x100.png b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_90_e4e4e4_1x100.png
index 675c05118..675c05118 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_90_e4e4e4_1x100.png
+++ b/plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_90_e4e4e4_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/images/ui-icons_004458_256x240.png b/plugins/jqueryui/themes/larry/images/ui-icons_004458_256x240.png
index 083a564f0..083a564f0 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-icons_004458_256x240.png
+++ b/plugins/jqueryui/themes/larry/images/ui-icons_004458_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/images/ui-icons_d7211e_256x240.png b/plugins/jqueryui/themes/larry/images/ui-icons_d7211e_256x240.png
index fdc2c494f..fdc2c494f 100755..100644
--- a/plugins/jqueryui/themes/larry/images/ui-icons_d7211e_256x240.png
+++ b/plugins/jqueryui/themes/larry/images/ui-icons_d7211e_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css b/plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css
index 01afcac0d..01afcac0d 100755..100644
--- a/plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css
+++ b/plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png b/plugins/jqueryui/themes/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png
index 5b5dab2ab..5b5dab2ab 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_flat_55_fbec88_40x100.png b/plugins/jqueryui/themes/redmond/images/ui-bg_flat_55_fbec88_40x100.png
index 47acaadd7..47acaadd7 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_flat_55_fbec88_40x100.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_flat_55_fbec88_40x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png b/plugins/jqueryui/themes/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png
index 9d149b1c6..9d149b1c6 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_glass_85_dfeffc_1x400.png b/plugins/jqueryui/themes/redmond/images/ui-bg_glass_85_dfeffc_1x400.png
index 014951529..014951529 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_glass_85_dfeffc_1x400.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_glass_85_dfeffc_1x400.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_glass_95_fef1ec_1x400.png b/plugins/jqueryui/themes/redmond/images/ui-bg_glass_95_fef1ec_1x400.png
index 4443fdc1a..4443fdc1a 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_glass_95_fef1ec_1x400.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png b/plugins/jqueryui/themes/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png
index 81ecc362d..81ecc362d 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png b/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png
index 4f3faf8aa..4f3faf8aa 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png b/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
index 38c38335d..38c38335d 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-icons_217bc0_256x240.png b/plugins/jqueryui/themes/redmond/images/ui-icons_217bc0_256x240.png
index 6f4bd87c0..6f4bd87c0 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-icons_217bc0_256x240.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-icons_217bc0_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-icons_2e83ff_256x240.png b/plugins/jqueryui/themes/redmond/images/ui-icons_2e83ff_256x240.png
index 09d1cdc85..09d1cdc85 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-icons_2e83ff_256x240.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-icons_469bdd_256x240.png b/plugins/jqueryui/themes/redmond/images/ui-icons_469bdd_256x240.png
index bd2cf079a..bd2cf079a 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-icons_469bdd_256x240.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-icons_469bdd_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-icons_6da8d5_256x240.png b/plugins/jqueryui/themes/redmond/images/ui-icons_6da8d5_256x240.png
index 9f3eafaab..9f3eafaab 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-icons_6da8d5_256x240.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-icons_6da8d5_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-icons_cd0a0a_256x240.png b/plugins/jqueryui/themes/redmond/images/ui-icons_cd0a0a_256x240.png
index 2ab019b73..2ab019b73 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-icons_cd0a0a_256x240.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-icons_cd0a0a_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-icons_d8e7f3_256x240.png b/plugins/jqueryui/themes/redmond/images/ui-icons_d8e7f3_256x240.png
index ad2dc6f9d..ad2dc6f9d 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-icons_d8e7f3_256x240.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-icons_d8e7f3_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/images/ui-icons_f9bd01_256x240.png b/plugins/jqueryui/themes/redmond/images/ui-icons_f9bd01_256x240.png
index 78625024d..78625024d 100755..100644
--- a/plugins/jqueryui/themes/redmond/images/ui-icons_f9bd01_256x240.png
+++ b/plugins/jqueryui/themes/redmond/images/ui-icons_f9bd01_256x240.png
Binary files differ
diff --git a/plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css b/plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css
index 614420add..614420add 100755..100644
--- a/plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css
+++ b/plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css
diff --git a/plugins/keyboard_shortcuts/keyboard_shortcuts.css b/plugins/keyboard_shortcuts/keyboard_shortcuts.css
new file mode 100644
index 000000000..cf29e6628
--- /dev/null
+++ b/plugins/keyboard_shortcuts/keyboard_shortcuts.css
@@ -0,0 +1,23 @@
+#keyboard_shortcuts_help {
+ display: none;
+}
+
+#keyboard_shortcuts_help div {
+ float: left;
+ width: 350px;
+}
+
+#keyboard_shortcuts_help div div.shortcut_key {
+ width: 30px;
+ float: left;
+ font-weight: bold;
+ text-align: center;
+}
+
+#keyboard_shortcuts_title {
+ margin-left: 12px;
+}
+
+#keyboard_shortcuts_link {
+ width: 31px !important;
+} \ No newline at end of file
diff --git a/plugins/keyboard_shortcuts/keyboard_shortcuts.js b/plugins/keyboard_shortcuts/keyboard_shortcuts.js
new file mode 100644
index 000000000..440c543e6
--- /dev/null
+++ b/plugins/keyboard_shortcuts/keyboard_shortcuts.js
@@ -0,0 +1,139 @@
+function keyboard_shortcuts_show_help() {
+ $('#keyboard_shortcuts_help').dialog('open');
+}
+
+$(function() {
+ rcmail.env.keyboard_shortcuts = true;
+
+ // initialize a dialog window
+ $('#keyboard_shortcuts_help').dialog({
+ autoOpen: false,
+ draggable: true,
+ modal: false,
+ resizable: false,
+ width: 750,
+ title: rcmail.gettext("keyboard_shortcuts.keyboard_shortcuts")
+ });
+
+ // if we're in an input or textarea form, skip this plugin
+ $('input,textarea').focus(function (e) {
+ rcmail.env.keyboard_shortcuts = false;
+ });
+
+ // if we move out of an input or textarea form, enable this plugin
+ $('input,textarea').blur(function (e) {
+ rcmail.env.keyboard_shortcuts = true;
+ });
+
+ // fire up the keypress event listener
+ $(document).keypress(function (e) {
+ key_pressed(e);
+ });
+
+
+ function key_pressed (e) {
+ if (!rcmail.env.keyboard_shortcuts || rcmail.env.action == 'compose' || rcmail.env.task == 'login' || e.ctrlKey || e.metaKey)
+ return true;
+
+ if (rcmail.env.action == '') { // list mailbox
+
+ if(rcmail.env.ks_functions[e.which]) {
+ this[rcmail.env.ks_functions[e.which]]();
+ return false;
+ }
+
+ switch (e.which) {
+ case 63: // ? = help
+ //keyboard_shortcuts_show_help();
+ var ks_function = rcmail.env.ks_functions[e.which];
+ this[ks_function]();
+
+ return false;
+ case 65: // A = mark all as read
+ rcmail.command('select-all');
+ rcmail.command('mark', 'read');
+ return false;
+ case 67: // C = collapse-all
+ rcmail.command('collapse-all');
+ return false;
+ case 69: // E = expand-all
+ rcmail.command('expand-all');
+ return false;
+ case 82: // R = reply-all
+ if (rcmail.message_list.selection.length == 1)
+ rcmail.command('reply-all');
+ return false;
+ case 85: // U = expand-unread
+ rcmail.command('expand-unread');
+ return false;
+ case 97: // a = select all
+ rcmail.command('select-all');
+ return false;
+ case 99: // c = compose
+ rcmail.command('compose');
+ return false;
+ case 100: // d = delete
+ rcmail.command('delete', '', rcmail);
+ return false;
+ case 102: // f = forward
+ if (rcmail.message_list.selection.length == 1)
+ rcmail.command('forward');
+ return false;
+ case 106: // j = previous page (similar to Gmail)
+ rcmail.command('previouspage');
+ return false;
+ case 107: // k = next page (similar to Gmail)
+ rcmail.command('nextpage');
+ return false;
+ case 112: // p = print
+ if (rcmail.message_list.selection.length == 1)
+ rcmail.command('print');
+ return false;
+ case 114: // r = reply
+ if (rcmail.message_list.selection.length == 1)
+ rcmail.command('reply');
+ return false;
+ case 115: // s = search
+ $('#quicksearchbox').focus();
+ $('#quicksearchbox').select();
+ return false;
+ case 117: // u = update (check for mail)
+ rcmail.command('checkmail');
+ return false;
+ }
+ } else if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
+ switch (e.which) {
+ case 82: // R = reply-all
+ rcmail.command('reply-all');
+ return false;
+ case 99: // c = compose
+ rcmail.command('compose');
+ return false;
+ case 100: // d = delete
+ rcmail.command('delete');
+ return false;
+ case 102: // f = forward
+ rcmail.command('forward');
+ return false;
+ case 106: // j = previous message (similar to Gmail)
+ rcmail.command('previousmessage');
+ return false;
+ case 107: // k = next message (similar to Gmail)
+ rcmail.command('nextmessage');
+ return false;
+ case 112: // p = print
+ rcmail.command('print');
+ return false;
+ case 114: // r = reply
+ rcmail.command('reply');
+ return false;
+
+ }
+ }
+ }
+});
+
+// support functions for each function we support
+function ks_help() {
+ keyboard_shortcuts_show_help();
+}
diff --git a/plugins/keyboard_shortcuts/keyboard_shortcuts.php b/plugins/keyboard_shortcuts/keyboard_shortcuts.php
new file mode 100644
index 000000000..3599c7b2f
--- /dev/null
+++ b/plugins/keyboard_shortcuts/keyboard_shortcuts.php
@@ -0,0 +1,130 @@
+<?php
+/**
+ * keyboard_shortcuts
+ *
+ * Enables some common tasks to be executed with keyboard shortcuts
+ *
+ * @version 1.4 - 07.07.2010
+ * @author Patrik Kullman / Roland 'rosali' Liebl / Cor Bosman <roundcube@wa.ter.net>
+ * @licence GNU GPL
+ *
+ **/
+ /** *
+ **/
+
+/**
+ * Shortcuts, list view:
+ * ?: Show shortcut help
+ * a: Select all visible messages
+ * A: Mark all as read (as Google Reader)
+ * c: Compose new message
+ * d: Delete message
+ * f: Forward message
+ * j: Go to previous page of messages (as Gmail)
+ * k: Go to next page of messages (as Gmail)
+ * p: Print message
+ * r: Reply to message
+ * R: Reply to all of message
+ * s: Jump to quicksearch
+ * u: Check for new mail (update)
+ *
+ * Shortcuts, threads view:
+ * E: Expand all
+ * C: Collapse all
+ * U: Expand Unread
+ *
+ * Shortcuts, mail view:
+ * d: Delete message
+ * f: Forward message
+ * j: Go to previous message (as Gmail)
+ * k: Go to next message (as Gmail)
+ * p: Print message
+ * r: Reply to message
+ * R: Reply to all of message
+ */
+
+class keyboard_shortcuts extends rcube_plugin
+{
+ public $task = 'mail';
+
+ function init()
+ {
+ // only init in authenticated state and if newuserdialog is finished
+ // do not init on compose (css incompatibility with compose_addressbook plugin
+ $rcmail = rcmail::get_instance();
+ $this->require_plugin('jqueryui');
+
+ if($_SESSION['username'] && empty($_SESSION['plugin.newuserdialog']) && $rcmail->action != 'compose'){
+ $this->include_stylesheet('keyboard_shortcuts.css');
+ $this->include_script('keyboard_shortcuts.js');
+ $this->add_hook('template_container', array($this, 'html_output'));
+ $this->add_texts('localization', true);
+ }
+ }
+
+ function html_output($p) {
+ if ($p['name'] == "listcontrols") {
+ $rcmail = rcmail::get_instance();
+ $skin = $rcmail->config->get('skin');
+
+ if(!file_exists('plugins/keyboard_shortcuts/skins/' . $skin . '/images/keyboard.png')){
+ $skin = "default";
+ }
+
+ $this->load_config();
+ $keyboard_shortcuts = $rcmail->config->get('keyboard_shortcuts_extras', array());
+
+ $c = "";
+ $c .= '<span id="keyboard_shortcuts_title">' . $this->gettext("title") . ":&nbsp;</span><a id='keyboard_shortcuts_link' href='#' class='button' title='".$this->gettext("show_keyboard_shortcuts")."' onclick='return keyboard_shortcuts_show_help()'><img align='top' src='plugins/keyboard_shortcuts/skins/".$skin."/images/keyboard.png' alt='".$this->gettext("keyboard_shortcuts")." ".$this->gettext("show")."' /></a>\n";
+ $c .= "<div id='keyboard_shortcuts_help'>";
+ $c .= "<div><h4>".$this->gettext("mailboxview")."</h4>";
+ $c .= "<div class='shortcut_key'>?</div> ".$this->gettext('help')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>a</div> ".$this->gettext('selectallvisiblemessages')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>A</div> ".$this->gettext('markallvisiblemessagesasread')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>c</div> ".$this->gettext('compose')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>d</div> ".$this->gettext('deletemessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>f</div> ".$this->gettext('forwardmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>j</div> ".$this->gettext('previouspage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>k</div> ".$this->gettext('nextpage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>p</div> ".$this->gettext('printmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>r</div> ".$this->gettext('replytomessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>R</div> ".$this->gettext('replytoallmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>s</div> ".$this->gettext('quicksearch')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>u</div> ".$this->gettext('checkmail')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'> </div> <br class='clear' />";
+ $c .= "</div>";
+
+ if(!is_object($rcmail->imap)){
+ $rcmail->imap_connect();
+ }
+ $threading_supported = $rcmail->imap->get_capability('thread=references')
+ || $rcmail->imap->get_capability('thread=orderedsubject')
+ || $rcmail->imap->get_capability('thread=refs');
+
+ if ($threading_supported) {
+ $c .= "<div><h4>".$this->gettext("threads")."</h4>";
+ $c .= "<div class='shortcut_key'>E</div> ".$this->gettext('expand-all')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>C</div> ".$this->gettext('collapse-all')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>U</div> ".$this->gettext('expand-unread')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'> </div> <br class='clear' />";
+ $c .= "</div>";
+ }
+ $c .= "<div><h4>".$this->gettext("messagesdisplaying")."</h4>";
+ $c .= "<div class='shortcut_key'>d</div> ".$this->gettext('deletemessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>c</div> ".$this->gettext('compose')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>f</div> ".$this->gettext('forwardmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>j</div> ".$this->gettext('previousmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>k</div> ".$this->gettext('nextmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>p</div> ".$this->gettext('printmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>r</div> ".$this->gettext('replytomessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'>R</div> ".$this->gettext('replytoallmessage')."<br class='clear' />";
+ $c .= "<div class='shortcut_key'> </div> <br class='clear' />";
+ $c .= "</div></div>";
+
+ $rcmail->output->set_env('ks_functions', array('63' => 'ks_help'));
+
+ $p['content'] = $c . $p['content'];
+ }
+ return $p;
+ }
+}
diff --git a/plugins/keyboard_shortcuts/localization/cs_CZ.inc b/plugins/keyboard_shortcuts/localization/cs_CZ.inc
new file mode 100644
index 000000000..edaa05d96
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/cs_CZ.inc
@@ -0,0 +1,24 @@
+<?php
+
+/*
++-----------------------------------------------------------------------+
+| language/cs_CZ/labels.inc |
+| |
+| Language file of the RoundCube Webmail client |
+| Copyright (C) 2008-2009, RoundQube Dev. - Switzerland |
+| Licensed under the GNU GPL |
+| |
++-----------------------------------------------------------------------+
+| Author: Ales Pospichal <ales@pospichalales.info> |
++-----------------------------------------------------------------------+
+
+*/
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Klávesnicové zkratky';
+$labels['show_keyboard_shortcuts'] = 'Zobrazit klávesnicové zkratky';
+$labels['help'] = 'Nápověda';
+$labels['selectallvisiblemessages'] = 'Vybrat všechny viditelné zprávy';
+$labels['markallvisiblemessagesasread'] = 'Označit všechny viditelné zprávy jako přečtené';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/de_DE.inc b/plugins/keyboard_shortcuts/localization/de_DE.inc
new file mode 100644
index 000000000..c7c489514
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/de_DE.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Tastatur Shortcuts';
+$labels['show_keyboard_shortcuts'] = 'Anzeigen Tastatur Shortcuts';
+$labels['help'] = 'Hilfe';
+$labels['selectallvisiblemessages'] = 'Alle Nachrichten auswählen';
+$labels['markallvisiblemessagesasread'] = 'Alle Nachrichten als gelesen markieren';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/en_US.inc b/plugins/keyboard_shortcuts/localization/en_US.inc
new file mode 100644
index 000000000..fcd549f88
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/en_US.inc
@@ -0,0 +1,11 @@
+<?php
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Keyboard shortcuts';
+$labels['show_keyboard_shortcuts'] = 'Show keyboard shortcuts';
+$labels['help'] = 'Help';
+$labels['selectallvisiblemessages'] = 'Select all visible messages';
+$labels['markallvisiblemessagesasread'] = 'Mark all visible messages as read';
+$labels['title'] = 'Shortcuts';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/fr_FR.inc b/plugins/keyboard_shortcuts/localization/fr_FR.inc
new file mode 100644
index 000000000..4ffe7878f
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/fr_FR.inc
@@ -0,0 +1,11 @@
+<?php
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Raccourcis clavier';
+$labels['show_keyboard_shortcuts'] = 'Voir les raccourcis clavier';
+$labels['help'] = 'Aide';
+$labels['selectallvisiblemessages'] = 'Sélectionner tous les messages visibles';
+$labels['markallvisiblemessagesasread'] = 'Marquer tous les messages visibles comme lus';
+$labels['title'] = 'Raccourcis';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/nl_NL.inc b/plugins/keyboard_shortcuts/localization/nl_NL.inc
new file mode 100644
index 000000000..718a1be7f
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/nl_NL.inc
@@ -0,0 +1,11 @@
+<?php
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Sneltoetsen';
+$labels['show_keyboard_shortcuts'] = 'Show sneltoetsen';
+$labels['help'] = 'Help';
+$labels['selectallvisiblemessages'] = 'Selecteer alle berichten op deze pagina';
+$labels['markallvisiblemessagesasread'] = 'Markeer alle berichten op deze pagina als gelezen';
+$labels['title'] = 'Sneltoetsen';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/pl_PL.inc b/plugins/keyboard_shortcuts/localization/pl_PL.inc
new file mode 100644
index 000000000..eafbe7ab8
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/pl_PL.inc
@@ -0,0 +1,11 @@
+<?php
+/* Author: DZIOBAK */
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Skróty klawiszowe';
+$labels['show_keyboard_shortcuts'] = 'Pokaż skróty klawiszowe';
+$labels['help'] = 'Pomoc';
+$labels['selectallvisiblemessages'] = 'Zaznacz wszystkie widoczne wiadomości';
+$labels['markallvisiblemessagesasread'] = 'Zaznacz wszystkie widoczne wiadomości jako przeczytane';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/ru_RU.inc b/plugins/keyboard_shortcuts/localization/ru_RU.inc
new file mode 100644
index 000000000..45f70d84f
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/ru_RU.inc
@@ -0,0 +1,11 @@
+<?php
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Горячие клавиши';
+$labels['show_keyboard_shortcuts'] = 'Показать Горячие клавиши';
+$labels['help'] = 'Помощь';
+$labels['selectallvisiblemessages'] = 'Выделить все видимые сообщения';
+$labels['markallvisiblemessagesasread'] = 'Пометить все видимые сообщения как прочитанные';
+$labels['title'] = 'Горячие клавиши';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/sv_SE.inc b/plugins/keyboard_shortcuts/localization/sv_SE.inc
new file mode 100644
index 000000000..e858e1221
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/sv_SE.inc
@@ -0,0 +1,10 @@
+<?php
+
+$labels = array();
+$labels['keyboard_shortcuts'] = 'Kortkommandon';
+$labels['show_keyboard_shortcuts'] = 'Visa kortkommandon';
+$labels['help'] = 'Hj&auml;lp';
+$labels['selectallvisiblemessages'] = 'Markera alla synliga meddelanden';
+$labels['markallvisiblemessagesasread'] = 'Markera alla synliga meddelanden som l&auml;sta';
+
+?>
diff --git a/plugins/keyboard_shortcuts/localization/zh_TW.inc b/plugins/keyboard_shortcuts/localization/zh_TW.inc
new file mode 100644
index 000000000..a198dea38
--- /dev/null
+++ b/plugins/keyboard_shortcuts/localization/zh_TW.inc
@@ -0,0 +1,11 @@
+<?php
+
+$labels = array();
+$labels['keyboard_shortcuts'] = '快速鍵';
+$labels['show_keyboard_shortcuts'] = '顯示快速鍵';
+$labels['help'] = '說明';
+$labels['selectallvisiblemessages'] = '選擇所有此頁的訊息';
+$labels['markallvisiblemessagesasread'] = '標示所有此頁訊息以閱讀';
+$labels['title'] = '快速鍵';
+
+?>
diff --git a/plugins/keyboard_shortcuts/package.xml b/plugins/keyboard_shortcuts/package.xml
new file mode 100644
index 000000000..aa39b0dd9
--- /dev/null
+++ b/plugins/keyboard_shortcuts/package.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>keyboard_shortcuts</name>
+ <lead>
+ <name>Cor Bosman</name>
+ <user>cor</user>
+ <email>cor@roundcu.be</email>
+ <active>yes</active>
+ </lead>
+ <uri>https://github.com/corbosman/keyboard_shortcuts</uri>
+ <version>
+ <release>2.0.2</release>
+ </version>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+</package>
diff --git a/plugins/keyboard_shortcuts/skins/classic/images/keyboard.png b/plugins/keyboard_shortcuts/skins/classic/images/keyboard.png
new file mode 100644
index 000000000..5719b76b2
--- /dev/null
+++ b/plugins/keyboard_shortcuts/skins/classic/images/keyboard.png
Binary files differ
diff --git a/plugins/keyboard_shortcuts/skins/larry/images/keyboard.png b/plugins/keyboard_shortcuts/skins/larry/images/keyboard.png
new file mode 100644
index 000000000..5719b76b2
--- /dev/null
+++ b/plugins/keyboard_shortcuts/skins/larry/images/keyboard.png
Binary files differ
diff --git a/plugins/listcommands/listcommands.php b/plugins/listcommands/listcommands.php
new file mode 100644
index 000000000..7a7948fd6
--- /dev/null
+++ b/plugins/listcommands/listcommands.php
@@ -0,0 +1,106 @@
+<?php
+
+/**
+ * This plugin parses email headers looking for mailinglist specific
+ * information. If headers are found, it uses them to create an additional
+ * header in the header box to easily perform certain mailinglist commands
+ * like subscribing, unsubscribing, asking for help, and sending a new mail.
+ *
+ * @version 2.1
+ * @author Cor Bosman
+ *
+ */
+
+class listcommands extends rcube_plugin
+{
+ public $task = 'mail';
+
+ function init()
+ {
+ $rcmail = rcmail::get_instance();
+ if (!$rcmail->action || in_array($rcmail->action, array('list', 'show', 'preview'))) {
+ $this->add_hook('storage_init', array($this, 'storage_init'));
+ $this->add_hook('message_headers_output', array($this, 'listcommands_output'));
+ }
+ }
+
+ function storage_init($p)
+ {
+ $rcmail = rcmail::get_instance();
+ $mailinglist_headers = array_keys($this->get_list_headers());
+ $p['fetch_headers'] .= trim($p['fetch_headers']. ' ' . strtoupper(join(' ', $mailinglist_headers)));
+ return($p);
+ }
+
+ function listcommands_output($p)
+ {
+ $list_output = "";
+ $rcmail = rcmail::get_instance();
+ $this->add_texts('localization/', false);
+ $mailinglist_headers = $this->get_list_headers();
+
+ foreach ($mailinglist_headers as $header => $title) {
+ $key = strtolower($header);
+
+ if($value = $p['headers']->others[$key]) {
+ if(is_string($value)){
+ $list_output .= $this->create_link($key, $value, $title) . '&nbsp;&nbsp;';
+ }
+ else{
+ $list_output .= $this->create_link($key, $value[0], $title) . '&nbsp;&nbsp;';
+ }
+ }
+ }
+ if($list_output != "")
+ $p['output']['Mailinglist'] = array(
+ 'title' => $this->gettext('listcommands_mailinglist'), 'value' => $list_output);
+ return($p);
+ }
+
+ private function get_list_headers()
+ {
+ $mailinglist_headers = array(
+ 'List-Help' => $this->gettext('listcommands_help'),
+ 'List-Subscribe' => $this->gettext('listcommands_subscribe'),
+ 'List-Unsubscribe' => $this->gettext('listcommands_unsubscribe'),
+ 'List-Post' => $this->gettext('listcommands_post'),
+ 'List-Owner' => $this->gettext('listcommands_admin'),
+ 'List-Archive' => $this->gettext('listcommands_archive')
+ );
+ return($mailinglist_headers);
+ }
+
+ private function create_link($key, $value, $title)
+ {
+ $proto = "";
+
+ // some headers have multiple targets
+ $targets = explode(',', $value);
+
+ // only use 1 of the targets
+ $target = strip_quotes($targets[0]);
+
+ // first strip angle brackets
+ $link = trim($target, "<>");
+
+ if(preg_match('/^(mailto|http|https)(:\/\/|:)(.*)$/', $link, $matches)) {
+ $proto = $matches[1];
+ $target = $matches[3];
+ }
+
+ // use RC for emailing instead of relying on the mailto header
+ if($proto == "mailto") {
+ $onclick = "return rcmail.command('compose','$target',this)";
+ } else {
+ $onclick = "";
+ }
+
+ $a = html::a(array('href' => $link ,
+ 'target' => '_blank',
+ 'onclick' => $onclick
+ ), $title);
+
+ return($a);
+ }
+}
+?>
diff --git a/plugins/listcommands/localization/en_US.inc b/plugins/listcommands/localization/en_US.inc
new file mode 100644
index 000000000..8af9bdc78
--- /dev/null
+++ b/plugins/listcommands/localization/en_US.inc
@@ -0,0 +1,12 @@
+<?php
+
+$labels = array();
+$labels['listcommands_mailinglist'] = 'Mailing List';
+$labels['listcommands_help'] = 'Help';
+$labels['listcommands_subscribe'] = 'Subscribe';
+$labels['listcommands_unsubscribe'] = 'Unsubscribe';
+$labels['listcommands_post'] = 'Post';
+$labels['listcommands_admin'] = 'Contact Administrator';
+$labels['listcommands_archive'] = 'List Archive';
+
+?>
diff --git a/plugins/listcommands/localization/es_ES.inc b/plugins/listcommands/localization/es_ES.inc
new file mode 100644
index 000000000..e27cb8774
--- /dev/null
+++ b/plugins/listcommands/localization/es_ES.inc
@@ -0,0 +1,12 @@
+<?php
+
+$labels = array();
+$labels['listcommands_mailinglist'] = 'Lista de correo';
+$labels['listcommands_help'] = 'Ayuda';
+$labels['listcommands_subscribe'] = 'Darse de alta';
+$labels['listcommands_unsubscribe'] = 'Darse de baja';
+$labels['listcommands_post'] = 'Publicar';
+$labels['listcommands_admin'] = 'Contactar con el administrador';
+$labels['listcommands_archive'] = 'Archivo de la lista';
+
+?>
diff --git a/plugins/listcommands/localization/fr_FR.inc b/plugins/listcommands/localization/fr_FR.inc
new file mode 100644
index 000000000..1a08a1a7b
--- /dev/null
+++ b/plugins/listcommands/localization/fr_FR.inc
@@ -0,0 +1,13 @@
+<?php
+
+$labels = array();
+
+$labels['listcommands_mailinglist'] = 'Mailing List';
+$labels['listcommands_help'] = 'Aide';
+$labels['listcommands_subscribe'] = 'S\'abonner';
+$labels['listcommands_unsubscribe'] = 'Se désabonner';
+$labels['listcommands_post'] = 'Envoyer';
+$labels['listcommands_admin'] = 'Contactez l\'administrateur';
+$labels['listcommands_archive'] = 'Archives de la liste';
+
+?> \ No newline at end of file
diff --git a/plugins/listcommands/localization/nl_NL.inc b/plugins/listcommands/localization/nl_NL.inc
new file mode 100644
index 000000000..373870a83
--- /dev/null
+++ b/plugins/listcommands/localization/nl_NL.inc
@@ -0,0 +1,12 @@
+<?php
+
+$labels = array();
+$labels['listcommands_mailinglist'] = 'Email Lijst';
+$labels['listcommands_help'] = 'Hulp';
+$labels['listcommands_subscribe'] = 'Aanmelden';
+$labels['listcommands_unsubscribe'] = 'Afmelden';
+$labels['listcommands_post'] = 'Nieuw Bericht';
+$labels['listcommands_admin'] = 'Email Beheerder';
+$labels['listcommands_archive'] = 'Lijst Archief';
+
+?>
diff --git a/plugins/listcommands/localization/pl_PL.inc b/plugins/listcommands/localization/pl_PL.inc
new file mode 100644
index 000000000..faefae7ba
--- /dev/null
+++ b/plugins/listcommands/localization/pl_PL.inc
@@ -0,0 +1,12 @@
+<?php
+
+$labels = array();
+$labels['listcommands_mailinglist'] = 'Lista';
+$labels['listcommands_help'] = 'Pomoc';
+$labels['listcommands_subscribe'] = 'Subskrybuj';
+$labels['listcommands_unsubscribe'] = 'Odsubskrybuj';
+$labels['listcommands_post'] = 'Wyślij';
+$labels['listcommands_admin'] = 'Kontakt z administratorem';
+$labels['listcommands_archive'] = 'Archiwum listy';
+
+?>
diff --git a/plugins/listcommands/localization/ru_RU.inc b/plugins/listcommands/localization/ru_RU.inc
new file mode 100644
index 000000000..3565d6cb5
--- /dev/null
+++ b/plugins/listcommands/localization/ru_RU.inc
@@ -0,0 +1,12 @@
+<?php
+
+$labels = array();
+$labels['listcommands_mailinglist'] = 'Рассылка';
+$labels['listcommands_help'] = 'Помощь';
+$labels['listcommands_subscribe'] = 'Подписаться';
+$labels['listcommands_unsubscribe'] = 'Отписаться';
+$labels['listcommands_post'] = 'Ответить в рассылку';
+$labels['listcommands_admin'] = 'Связаться с администратором';
+$labels['listcommands_archive'] = 'Просмотреть Архив';
+
+?> \ No newline at end of file
diff --git a/plugins/listcommands/package.xml b/plugins/listcommands/package.xml
new file mode 100644
index 000000000..6c18bbc1f
--- /dev/null
+++ b/plugins/listcommands/package.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>listcommands</name>
+ <lead>
+ <name>Cor Bosman</name>
+ <user>cor</user>
+ <email>cor@roundcu.be</email>
+ <active>yes</active>
+ </lead>
+ <uri>https://github.com/corbosman/listcommands</uri>
+ <version>
+ <release>2.0</release>
+ </version>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+</package>
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index e660ee1ee..159cc3ef9 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -1,13 +1,4 @@
-* version 7.0 [2013-09-09]
------------------------------------------------------------
-- Add vacation-seconds extension support (RFC 6131)
-- Several script parser code improvements
-- Support string list arguments in filter form (#1489018)
-- Support date, currendate and index tests - RFC5260 (#1488120)
-- Split plugin file into two files
- Fix handling of &, <, > characters in scripts/filter names (#1489208)
-- Support 'keep' action (#1489226)
-- Add common headers to header selector (#1489271)
* version 6.2 [2013-02-17]
-----------------------------------------------------------
@@ -214,18 +205,18 @@
- Added it_IT localization
* version 1.1 [2009-05-27]
------------------------------------------------------------
+-----------------------------------------------------------
- Added new icons
- Added support for headers lists (coma-separated) in rules
- Added de_CH localization
* version 1.0 [2009-05-21]
------------------------------------------------------------
+-----------------------------------------------------------
- Rewritten using plugin API
- Added hu_HU localization (Tamas Tevesz)
* version beta7 (svn-r2300) [2009-03-01]
------------------------------------------------------------
+-----------------------------------------------------------
- Added SquirrelMail script auto-import (Jonathan Ernst)
- Added 'vacation' support (Jonathan Ernst & alec)
- Added 'stop' support (Jonathan Ernst)
@@ -234,47 +225,47 @@
- Small style fixes
* version 0.2-stable1 (svn-r2205) [2009-01-03]
------------------------------------------------------------
+-----------------------------------------------------------
- Fix moving down filter row
- Fixes for compressed js files in stable release package
- Created patch for svn version r2205
* version 0.2-stable [2008-12-31]
------------------------------------------------------------
+-----------------------------------------------------------
- Added ru_RU, fr_FR, zh_CN translation
- Fixes for Roundcube 0.2-stable
-* version 0.2-beta [2008-09-21]
------------------------------------------------------------
+* version rc0.2beta [2008-09-21]
+-----------------------------------------------------------
- Small css fixes for IE
- Fixes for Roundcube 0.2-beta
* version beta6 [2008-08-08]
------------------------------------------------------------
+-----------------------------------------------------------
- Added de_DE translation
- Fix for Roundcube r1634
* version beta5 [2008-06-10]
------------------------------------------------------------
+-----------------------------------------------------------
- Fixed 'exists' operators
- Fixed 'not*' operators for custom headers
- Fixed filters deleting
* version beta4 [2008-06-09]
------------------------------------------------------------
+-----------------------------------------------------------
- Fix for Roundcube r1490
* version beta3 [2008-05-22]
------------------------------------------------------------
+-----------------------------------------------------------
- Fixed textarea error class setting
- Added pagetitle setting
- Added option 'managesieve_replace_delimiter'
- Fixed errors on IE (still need some css fixes)
-
+
* version beta2 [2008-05-20]
------------------------------------------------------------
+-----------------------------------------------------------
- Use 'if' only for first filter and 'elsif' for the rest
* version beta1 [2008-05-15]
------------------------------------------------------------
+-----------------------------------------------------------
- Initial version for Roundcube r1388.
diff --git a/plugins/managesieve/config.inc.php.dist b/plugins/managesieve/config.inc.php.dist
index cb56a0efd..65dbcfc4e 100644
--- a/plugins/managesieve/config.inc.php.dist
+++ b/plugins/managesieve/config.inc.php.dist
@@ -2,7 +2,7 @@
// managesieve server port. When empty the port will be determined automatically
// using getservbyname() function, with 4190 as a fallback.
-$config['managesieve_port'] = null;
+$rcmail_config['managesieve_port'] = null;
// managesieve server address, default is localhost.
// Replacement variables supported in host name:
@@ -10,58 +10,58 @@ $config['managesieve_port'] = null;
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld
-$config['managesieve_host'] = 'localhost';
+$rcmail_config['managesieve_host'] = 'localhost';
// authentication method. Can be CRAM-MD5, DIGEST-MD5, PLAIN, LOGIN, EXTERNAL
// or none. Optional, defaults to best method supported by server.
-$config['managesieve_auth_type'] = null;
+$rcmail_config['managesieve_auth_type'] = null;
// Optional managesieve authentication identifier to be used as authorization proxy.
// Authenticate as a different user but act on behalf of the logged in user.
// Works with PLAIN and DIGEST-MD5 auth.
-$config['managesieve_auth_cid'] = null;
+$rcmail_config['managesieve_auth_cid'] = null;
// Optional managesieve authentication password to be used for imap_auth_cid
-$config['managesieve_auth_pw'] = null;
+$rcmail_config['managesieve_auth_pw'] = null;
// use or not TLS for managesieve server connection
// Note: tls:// prefix in managesieve_host is also supported
-$config['managesieve_usetls'] = false;
+$rcmail_config['managesieve_usetls'] = false;
// default contents of filters script (eg. default spam filter)
-$config['managesieve_default'] = '/etc/dovecot/sieve/global';
+$rcmail_config['managesieve_default'] = '/etc/dovecot/sieve/global';
// The name of the script which will be used when there's no user script
-$config['managesieve_script_name'] = 'managesieve';
+$rcmail_config['managesieve_script_name'] = 'managesieve';
// Sieve RFC says that we should use UTF-8 endcoding for mailbox names,
// but some implementations does not covert UTF-8 to modified UTF-7.
// Defaults to UTF7-IMAP
-$config['managesieve_mbox_encoding'] = 'UTF-8';
+$rcmail_config['managesieve_mbox_encoding'] = 'UTF-8';
// I need this because my dovecot (with listescape plugin) uses
// ':' delimiter, but creates folders with dot delimiter
-$config['managesieve_replace_delimiter'] = '';
+$rcmail_config['managesieve_replace_delimiter'] = '';
// disabled sieve extensions (body, copy, date, editheader, encoded-character,
// envelope, environment, ereject, fileinto, ihave, imap4flags, index,
// mailbox, mboxmetadata, regex, reject, relational, servermetadata,
// spamtest, spamtestplus, subaddress, vacation, variables, virustest, etc.
// Note: not all extensions are implemented
-$config['managesieve_disabled_extensions'] = array();
+$rcmail_config['managesieve_disabled_extensions'] = array();
// Enables debugging of conversation with sieve server. Logs it into <log_dir>/sieve
-$config['managesieve_debug'] = false;
+$rcmail_config['managesieve_debug'] = false;
// Enables features described in http://wiki.kolab.org/KEP:14
-$config['managesieve_kolab_master'] = false;
+$rcmail_config['managesieve_kolab_master'] = false;
// Script name extension used for scripts including. Dovecot uses '.sieve',
// Cyrus uses '.siv'. Doesn't matter if you have managesieve_kolab_master disabled.
-$config['managesieve_filename_extension'] = '.sieve';
+$rcmail_config['managesieve_filename_extension'] = '.sieve';
// List of reserved script names (without extension).
// Scripts listed here will be not presented to the user.
-$config['managesieve_filename_exceptions'] = array();
+$rcmail_config['managesieve_filename_exceptions'] = array();
?>
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve.php b/plugins/managesieve/lib/Roundcube/rcube_sieve.php
index 3bd2978da..4f66bf029 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve.php
@@ -6,18 +6,18 @@
* Copyright (C) 2008-2011, The Roundcube Dev Team
* Copyright (C) 2011, 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 free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
*
* 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/.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
// Managesieve Protocol: RFC5804
@@ -84,7 +84,7 @@ class rcube_sieve
return $this->_set_error(SIEVE_ERROR_LOGIN);
}
- $this->exts = $this->get_extensions();
+ $this->exts = $this->get_extensions();
// disable features by config
if (!empty($disabled)) {
@@ -379,6 +379,6 @@ class rcube_sieve
*/
public function debug_handler(&$sieve, $message)
{
- rcube::write_log('sieve', preg_replace('/\r\n$/', '', $message));
+ write_log('sieve', preg_replace('/\r\n$/', '', $message));
}
}
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index e4efef5b3..6c9f8048a 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -535,6 +535,7 @@ class rcube_sieve_engine
$act_types = rcube_utils::get_input_value('_action_type', rcube_utils::INPUT_POST, true);
$mailboxes = rcube_utils::get_input_value('_action_mailbox', rcube_utils::INPUT_POST, true);
$act_targets = rcube_utils::get_input_value('_action_target', rcube_utils::INPUT_POST, true);
+ $domain_targets = rcube_utils::get_input_value('_action_target_domain', rcube_utils::INPUT_POST);
$area_targets = rcube_utils::get_input_value('_action_target_area', rcube_utils::INPUT_POST, true);
$reasons = rcube_utils::get_input_value('_action_reason', rcube_utils::INPUT_POST, true);
$addresses = rcube_utils::get_input_value('_action_addresses', rcube_utils::INPUT_POST, true);
@@ -622,7 +623,21 @@ class rcube_sieve_engine
if (!count($target)) {
$this->errors['tests'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
}
- else if ($type != 'regex' && $type != 'matches') {
+ else if (strpos($type, 'count-') === 0) {
+ foreach ($target as $arg) {
+ if (preg_match('/[^0-9]/', $arg)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('forbiddenchars');
+ }
+ }
+ }
+ else if (strpos($type, 'value-') === 0) {
+ // Some date/time formats do not support i;ascii-numeric comparator
+ if ($comparator == 'i;ascii-numeric' && in_array($datepart, array('date', 'time', 'iso8601', 'std11'))) {
+ $comparator = '';
+ }
+ }
+
+ if (!preg_match('/^(regex|matches|count-)/', $type) && count($target)) {
foreach ($target as $arg) {
if (!$this->validate_date_part($datepart, $arg)) {
$this->errors['tests'][$i]['target'] = $this->plugin->gettext('invaliddateformat');
@@ -668,7 +683,21 @@ class rcube_sieve_engine
if (!count($target)) {
$this->errors['tests'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
}
- else if ($type != 'regex' && $type != 'matches') {
+ else if (strpos($type, 'count-') === 0) {
+ foreach ($target as $arg) {
+ if (preg_match('/[^0-9]/', $arg)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('forbiddenchars');
+ }
+ }
+ }
+ else if (strpos($type, 'value-') === 0) {
+ // Some date/time formats do not support i;ascii-numeric comparator
+ if ($comparator == 'i;ascii-numeric' && in_array($datepart, array('date', 'time', 'iso8601', 'std11'))) {
+ $comparator = '';
+ }
+ }
+
+ if (count($target) && !preg_match('/^(regex|matches|count-)/', $type)) {
foreach ($target as $arg) {
if (!$this->validate_date_part($datepart, $arg)) {
$this->errors['tests'][$i]['target'] = $this->plugin->gettext('invaliddateformat');
@@ -699,7 +728,7 @@ class rcube_sieve_engine
}
else if (preg_match('/^(value|count)-/', $type)) {
foreach ($target as $target_value) {
- if (!preg_match('/[0-9]+/', $target_value)) {
+ if (preg_match('/[^0-9]/', $target_value)) {
$this->errors['tests'][$i]['target'] = $this->plugin->gettext('forbiddenchars');
}
}
@@ -781,7 +810,7 @@ class rcube_sieve_engine
}
else if (preg_match('/^(value|count)-/', $type)) {
foreach ($target as $target_value) {
- if (!preg_match('/[0-9]+/', $target_value)) {
+ if (preg_match('/[^0-9]/', $target_value)) {
$this->errors['tests'][$i]['target'] = $this->plugin->gettext('forbiddenchars');
}
}
@@ -794,9 +823,6 @@ class rcube_sieve_engine
}
if ($header != 'size' && $comparator) {
- if (preg_match('/^(value|count)/', $this->form['tests'][$i]['type']))
- $comparator = 'i;ascii-numeric';
-
$this->form['tests'][$i]['comparator'] = $comparator;
}
@@ -806,16 +832,15 @@ class rcube_sieve_engine
$i = 0;
// actions
- foreach($act_types as $idx => $type) {
- $type = $this->strip_value($type);
- $target = $this->strip_value($act_targets[$idx]);
+ foreach ($act_types as $idx => $type) {
+ $type = $this->strip_value($type);
switch ($type) {
-
case 'fileinto':
case 'fileinto_copy':
$mailbox = $this->strip_value($mailboxes[$idx], false, false);
$this->form['actions'][$i]['target'] = $this->mod_mailbox($mailbox, 'in');
+
if ($type == 'fileinto_copy') {
$type = 'fileinto';
$this->form['actions'][$i]['copy'] = true;
@@ -833,17 +858,31 @@ class rcube_sieve_engine
case 'redirect':
case 'redirect_copy':
+ $target = $this->strip_value($act_targets[$idx]);
+ $domain = $this->strip_value($domain_targets[$idx]);
+
+ // force one of the configured domains
+ $domains = (array) $this->rc->config->get('managesieve_domains');
+ if (!empty($domains) && !empty($target)) {
+ if (!$domain || !in_array($domain, $domains)) {
+ $domain = $domains[0];
+ }
+
+ $target .= '@' . $domain;
+ }
+
$this->form['actions'][$i]['target'] = $target;
- if ($this->form['actions'][$i]['target'] == '')
+ if ($target == '')
$this->errors['actions'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
- else if (!rcube_utils::check_email($this->form['actions'][$i]['target']))
- $this->errors['actions'][$i]['target'] = $this->plugin->gettext('noemailwarning');
+ else if (!rcube_utils::check_email($target))
+ $this->errors['actions'][$i]['target'] = $this->plugin->gettext(!empty($domains) ? 'forbiddenchars' : 'noemailwarning');
if ($type == 'redirect_copy') {
$type = 'redirect';
$this->form['actions'][$i]['copy'] = true;
}
+
break;
case 'addflag':
@@ -864,6 +903,7 @@ class rcube_sieve_engine
case 'vacation':
$reason = $this->strip_value($reasons[$idx]);
$interval_type = $interval_types[$idx] == 'seconds' ? 'seconds' : 'days';
+
$this->form['actions'][$i]['reason'] = str_replace("\r\n", "\n", $reason);
$this->form['actions'][$i]['subject'] = $subject[$idx];
$this->form['actions'][$i]['addresses'] = array_shift($addresses);
@@ -871,7 +911,12 @@ class rcube_sieve_engine
// @TODO: vacation :mime, :from, :handle
foreach ((array)$this->form['actions'][$i]['addresses'] as $aidx => $address) {
- if (!rcube_utils::check_email($address)) {
+ $this->form['actions'][$i]['addresses'][$aidx] = $address = trim($address);
+
+ if (empty($address)) {
+ unset($this->form['actions'][$i]['addresses'][$aidx]);
+ }
+ else if (!rcube_utils::check_email($address)) {
$this->errors['actions'][$i]['addresses'] = $this->plugin->gettext('noemailwarning');
break;
}
@@ -1354,22 +1399,6 @@ class rcube_sieve_engine
$select_op->add(rcube::Q($this->plugin->gettext('valuenotequals')), 'value-ne');
}
- // (current)date part select
- if (in_array('date', $this->exts) || in_array('currentdate', $this->exts)) {
- $date_parts = array('date', 'iso8601', 'std11', 'julian', 'time',
- 'year', 'month', 'day', 'hour', 'minute', 'second', 'weekday', 'zone');
- $select_dp = new html_select(array('name' => "_rule_date_part[]", 'id' => 'rule_date_part'.$id,
- 'style' => $rule['test'] == 'currentdate' || $rule['test'] == 'date' ? '' : 'display:none',
- 'class' => 'datepart_selector',
- ));
-
- foreach ($date_parts as $part) {
- $select_dp->add(rcube::Q($this->plugin->gettext($part)), $part);
- }
-
- $tout .= $select_dp->show($rule['test'] == 'currentdate' || $rule['test'] == 'date' ? $rule['part'] : '');
- }
-
// target(s) input
if (in_array($rule['test'], array('header', 'address', 'envelope'))) {
$test = ($rule['not'] ? 'not' : '').($rule['type'] ? $rule['type'] : 'is');
@@ -1396,6 +1425,22 @@ class rcube_sieve_engine
$target = '';
}
+ // (current)date part select
+ if (in_array('date', $this->exts) || in_array('currentdate', $this->exts)) {
+ $date_parts = array('date', 'iso8601', 'std11', 'julian', 'time',
+ 'year', 'month', 'day', 'hour', 'minute', 'second', 'weekday', 'zone');
+ $select_dp = new html_select(array('name' => "_rule_date_part[]", 'id' => 'rule_date_part'.$id,
+ 'style' => in_array($rule['test'], array('currentdate', 'date')) && !preg_match('/^(notcount|count)-/', $test) ? '' : 'display:none',
+ 'class' => 'datepart_selector',
+ ));
+
+ foreach ($date_parts as $part) {
+ $select_dp->add(rcube::Q($this->plugin->gettext($part)), $part);
+ }
+
+ $tout .= $select_dp->show($rule['test'] == 'currentdate' || $rule['test'] == 'date' ? $rule['part'] : '');
+ }
+
$tout .= $select_op->show($test);
$tout .= $this->list_input($id, 'rule_target', $target,
$rule['test'] != 'size' && $rule['test'] != 'exists',
@@ -1436,7 +1481,7 @@ class rcube_sieve_engine
$select_type->add(rcube::Q($this->plugin->gettext('detail')), 'detail');
}
- $need_mod = $rule['test'] != 'size' && $rule['test'] != 'body';
+ $need_mod = !in_array($rule['test'], array('size', 'body', 'date', 'currentdate'));
$mout = '<div id="rule_mod' .$id. '" class="adv"' . (!$need_mod ? ' style="display:none"' : '') . '>';
$mout .= ' <span class="label">' . rcube::Q($this->plugin->gettext('modifier')) . ' </span>';
$mout .= $select_mod->show($rule['test']);
@@ -1578,11 +1623,34 @@ class rcube_sieve_engine
// actions target inputs
$out .= '<td class="rowtargets">';
- // shared targets
- $out .= '<input type="text" name="_action_target['.$id.']" id="action_target' .$id. '" '
- .'value="' .($action['type']=='redirect' ? rcube::Q($action['target'], 'strict', false) : ''). '" size="35" '
- .'style="display:' .($action['type']=='redirect' ? 'inline' : 'none') .'" '
- . $this->error_class($id, 'action', 'target', 'action_target') .' />';
+
+ // force domain selection in redirect email input
+ $domains = (array) $this->rc->config->get('managesieve_domains');
+ if (!empty($domains)) {
+ sort($domains);
+
+ $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);
+ }
+ }
+
+ // redirect target
+ $out .= '<span id="redirect_target' . $id . '" style="white-space:nowrap;'
+ . ' display:' . ($action['type'] == 'redirect' ? 'inline' : 'none') . '">'
+ . '<input type="text" name="_action_target['.$id.']" id="action_target' .$id. '"'
+ . ' value="' .($action['type'] == 'redirect' ? rcube::Q($action['target'], 'strict', false) : '') . '"'
+ . (!empty($domains) ? ' size="20"' : ' size="35"')
+ . $this->error_class($id, 'action', 'target', 'action_target') .' />'
+ . (!empty($domains) ? ' @ ' . $domain_select->show($action['domain']) : '')
+ . '</span>';
+
+ // (e)reject target
$out .= '<textarea name="_action_target_area['.$id.']" id="action_target_area' .$id. '" '
.'rows="3" cols="35" '. $this->error_class($id, 'action', 'targetarea', 'action_target_area')
.'style="display:' .(in_array($action['type'], array('reject', 'ereject')) ? 'inline' : 'none') .'">'
@@ -2147,7 +2215,8 @@ class rcube_sieve_engine
return;
}
- $headers = array();
+ $headers = array();
+ $exceptions = array('date', 'currentdate', 'size', 'body');
// find common headers used in script, will be added to the list
// of available (predefined) headers (#1489271)
@@ -2156,6 +2225,12 @@ class rcube_sieve_engine
if ($test['test'] == 'header') {
foreach ((array) $test['arg1'] as $header) {
$lc_header = strtolower($header);
+
+ // skip special names to not confuse UI
+ if (in_array($lc_header, $exceptions)) {
+ continue;
+ }
+
if (!isset($this->headers[$lc_header]) && !isset($headers[$lc_header])) {
$headers[$lc_header] = $header;
}
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
index 371b45d84..36eb1bcf8 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
@@ -6,18 +6,18 @@
* Copyright (C) 2008-2011, The Roundcube Dev Team
* Copyright (C) 2011, 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 free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
*
* 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/.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
class rcube_sieve_script
@@ -27,26 +27,23 @@ class rcube_sieve_script
private $vars = array(); // "global" variables
private $prefix = ''; // script header (comments)
private $supported = array( // Sieve extensions supported by class
- 'body', // RFC5173
- 'copy', // RFC3894
- 'date', // RFC5260
- 'enotify', // RFC5435
+ 'fileinto', // RFC5228
'envelope', // RFC5228
+ 'reject', // RFC5429
'ereject', // RFC5429
- 'fileinto', // RFC5228
+ 'copy', // RFC3894
+ 'vacation', // RFC5230
+ 'relational', // RFC3431
+ 'regex', // draft-ietf-sieve-regex-01
'imapflags', // draft-melnikov-sieve-imapflags-06
'imap4flags', // RFC5232
'include', // draft-ietf-sieve-include-12
- 'index', // RFC5260
- 'notify', // draft-ietf-sieve-notify-00
- 'regex', // draft-ietf-sieve-regex-01
- 'reject', // RFC5429
- 'relational', // RFC3431
- 'subaddress', // RFC5233
- 'vacation', // RFC5230
- 'vacation-seconds', // RFC6131
'variables', // RFC5229
- // @TODO: spamtest+virustest, mailbox
+ 'body', // RFC5173
+ 'subaddress', // RFC5233
+ 'enotify', // RFC5435
+ 'notify', // draft-ietf-sieve-notify-00
+ // @TODO: spamtest+virustest, mailbox, date
);
/**
@@ -208,6 +205,7 @@ class rcube_sieve_script
// rules
foreach ($this->content as $rule) {
+ $extension = '';
$script = '';
$tests = array();
$i = 0;
@@ -240,8 +238,24 @@ class rcube_sieve_script
$tests[$i] .= ($test['not'] ? 'not ' : '');
$tests[$i] .= 'header';
- $this->add_index($test, $tests[$i], $exts);
- $this->add_operator($test, $tests[$i], $exts);
+ if (!empty($test['type'])) {
+ // relational operator + comparator
+ if (preg_match('/^(value|count)-([gteqnl]{2})/', $test['type'], $m)) {
+ array_push($exts, 'relational');
+ array_push($exts, 'comparator-i;ascii-numeric');
+
+ $tests[$i] .= ' :' . $m[1] . ' "' . $m[2] . '" :comparator "i;ascii-numeric"';
+ }
+ else {
+ $this->add_comparator($test, $tests[$i], $exts);
+
+ if ($test['type'] == 'regex') {
+ array_push($exts, 'regex');
+ }
+
+ $tests[$i] .= ' :' . $test['type'];
+ }
+ }
$tests[$i] .= ' ' . self::escape_string($test['arg1']);
$tests[$i] .= ' ' . self::escape_string($test['arg2']);
@@ -256,19 +270,21 @@ class rcube_sieve_script
$tests[$i] .= ($test['not'] ? 'not ' : '');
$tests[$i] .= $test['test'];
- if ($test['test'] != 'envelope') {
- $this->add_index($test, $tests[$i], $exts);
- }
-
- // :all address-part is optional, skip it
- if (!empty($test['part']) && $test['part'] != 'all') {
+ if (!empty($test['part'])) {
$tests[$i] .= ' :' . $test['part'];
if ($test['part'] == 'user' || $test['part'] == 'detail') {
array_push($exts, 'subaddress');
}
}
- $this->add_operator($test, $tests[$i], $exts);
+ $this->add_comparator($test, $tests[$i], $exts);
+
+ if (!empty($test['type'])) {
+ if ($test['type'] == 'regex') {
+ array_push($exts, 'regex');
+ }
+ $tests[$i] .= ' :' . $test['type'];
+ }
$tests[$i] .= ' ' . self::escape_string($test['arg1']);
$tests[$i] .= ' ' . self::escape_string($test['arg2']);
@@ -279,6 +295,8 @@ class rcube_sieve_script
$tests[$i] .= ($test['not'] ? 'not ' : '') . 'body';
+ $this->add_comparator($test, $tests[$i], $exts);
+
if (!empty($test['part'])) {
$tests[$i] .= ' :' . $test['part'];
@@ -287,35 +305,14 @@ class rcube_sieve_script
}
}
- $this->add_operator($test, $tests[$i], $exts);
-
- $tests[$i] .= ' ' . self::escape_string($test['arg']);
- break;
-
- case 'date':
- case 'currentdate':
- array_push($exts, 'date');
-
- $tests[$i] .= ($test['not'] ? 'not ' : '') . $test['test'];
-
- $this->add_index($test, $tests[$i], $exts);
-
- if (!empty($test['originalzone']) && $test['test'] == 'date') {
- $tests[$i] .= ' :originalzone';
- }
- else if (!empty($test['zone'])) {
- $tests[$i] .= ' :zone ' . self::escape_string($test['zone']);
- }
-
- $this->add_operator($test, $tests[$i], $exts);
-
- if ($test['test'] == 'date') {
- $tests[$i] .= ' ' . self::escape_string($test['header']);
+ if (!empty($test['type'])) {
+ if ($test['type'] == 'regex') {
+ array_push($exts, 'regex');
+ }
+ $tests[$i] .= ' :' . $test['type'];
}
- $tests[$i] .= ' ' . self::escape_string($test['part']);
$tests[$i] .= ' ' . self::escape_string($test['arg']);
-
break;
}
$i++;
@@ -450,13 +447,8 @@ class rcube_sieve_script
case 'vacation':
array_push($exts, 'vacation');
$action_script .= 'vacation';
- if (isset($action['seconds'])) {
- array_push($exts, 'vacation-seconds');
- $action_script .= " :seconds " . intval($action['seconds']);
- }
- else if (!empty($action['days'])) {
- $action_script .= " :days " . intval($action['days']);
- }
+ if (!empty($action['days']))
+ $action_script .= " :days " . $action['days'];
if (!empty($action['addresses']))
$action_script .= " :addresses " . self::escape_string($action['addresses']);
if (!empty($action['subject']))
@@ -485,17 +477,8 @@ class rcube_sieve_script
}
// requires
- if (!empty($exts)) {
- $exts = array_unique($exts);
-
- if (in_array('vacation-seconds', $exts) && ($key = array_search('vacation', $exts)) !== false) {
- unset($exts[$key]);
- }
-
- sort($exts); // for convenience use always the same order
-
- $output = 'require ["' . implode('","', $exts) . "\"];\n" . $output;
- }
+ if (!empty($exts))
+ $output = 'require ["' . implode('","', array_unique($exts)) . "\"];\n" . $output;
if (!empty($this->prefix)) {
$output = $this->prefix . "\n\n" . $output;
@@ -657,85 +640,86 @@ class rcube_sieve_script
break;
case 'size':
- $test = array('test' => 'size', 'not' => $not);
-
- $test['arg'] = array_pop($tokens);
-
+ $size = array('test' => 'size', 'not' => $not);
for ($i=0, $len=count($tokens); $i<$len; $i++) {
if (!is_array($tokens[$i])
&& preg_match('/^:(under|over)$/i', $tokens[$i])
) {
- $test['type'] = strtolower(substr($tokens[$i], 1));
+ $size['type'] = strtolower(substr($tokens[$i], 1));
+ }
+ else {
+ $size['arg'] = $tokens[$i];
}
}
- $tests[] = $test;
+ $tests[] = $size;
break;
case 'header':
- case 'address':
- case 'envelope':
- $test = array('test' => $token, 'not' => $not);
-
- $test['arg2'] = array_pop($tokens);
- $test['arg1'] = array_pop($tokens);
-
- $test += $this->test_tokens($tokens);
-
- if ($token != 'header' && !empty($tokens)) {
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (!is_array($tokens[$i]) && preg_match('/^:(localpart|domain|all|user|detail)$/i', $tokens[$i])) {
- $test['part'] = strtolower(substr($tokens[$i], 1));
- }
+ $header = array('test' => 'header', 'not' => $not, 'arg1' => '', 'arg2' => '');
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
+ $header['comparator'] = $tokens[++$i];
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:(count|value)$/i', $tokens[$i])) {
+ $header['type'] = strtolower(substr($tokens[$i], 1)) . '-' . $tokens[++$i];
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
+ $header['type'] = strtolower(substr($tokens[$i], 1));
+ }
+ else {
+ $header['arg1'] = $header['arg2'];
+ $header['arg2'] = $tokens[$i];
}
}
- $tests[] = $test;
+ $tests[] = $header;
break;
- case 'body':
- $test = array('test' => 'body', 'not' => $not);
-
- $test['arg'] = array_pop($tokens);
-
- $test += $this->test_tokens($tokens);
-
+ case 'address':
+ case 'envelope':
+ $header = array('test' => $token, 'not' => $not, 'arg1' => '', 'arg2' => '');
for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (!is_array($tokens[$i]) && preg_match('/^:(raw|content|text)$/i', $tokens[$i])) {
- $test['part'] = strtolower(substr($tokens[$i], 1));
-
- if ($test['part'] == 'content') {
- $test['content'] = $tokens[++$i];
- }
+ if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
+ $header['comparator'] = $tokens[++$i];
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
+ $header['type'] = strtolower(substr($tokens[$i], 1));
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:(localpart|domain|all|user|detail)$/i', $tokens[$i])) {
+ $header['part'] = strtolower(substr($tokens[$i], 1));
+ }
+ else {
+ $header['arg1'] = $header['arg2'];
+ $header['arg2'] = $tokens[$i];
}
}
- $tests[] = $test;
+ $tests[] = $header;
break;
- case 'date':
- case 'currentdate':
- $test = array('test' => $token, 'not' => $not);
-
- $test['arg'] = array_pop($tokens);
- $test['part'] = array_pop($tokens);
-
- if ($token == 'date') {
- $test['header'] = array_pop($tokens);
- }
-
- $test += $this->test_tokens($tokens);
-
+ case 'body':
+ $header = array('test' => 'body', 'not' => $not, 'arg' => '');
for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (!is_array($tokens[$i]) && preg_match('/^:zone$/i', $tokens[$i])) {
- $test['zone'] = $tokens[++$i];
+ if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
+ $header['comparator'] = $tokens[++$i];
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
+ $header['type'] = strtolower(substr($tokens[$i], 1));
}
- else if (!is_array($tokens[$i]) && preg_match('/^:originalzone$/i', $tokens[$i])) {
- $test['originalzone'] = true;
+ else if (!is_array($tokens[$i]) && preg_match('/^:(raw|content|text)$/i', $tokens[$i])) {
+ $header['part'] = strtolower(substr($tokens[$i], 1));
+
+ if ($header['part'] == 'content') {
+ $header['content'] = $tokens[++$i];
+ }
+ }
+ else {
+ $header['arg'] = $tokens[$i];
}
}
- $tests[] = $test;
+ $tests[] = $header;
break;
case 'exists':
@@ -787,9 +771,15 @@ class rcube_sieve_script
$result = null;
while (strlen($content)) {
- $tokens = self::tokenize($content, true);
+ $tokens = self::tokenize($content, true);
$separator = array_pop($tokens);
- $token = !empty($tokens) ? array_shift($tokens) : $separator;
+
+ if (!empty($tokens)) {
+ $token = array_shift($tokens);
+ }
+ else {
+ $token = $separator;
+ }
switch ($token) {
case 'discard':
@@ -800,78 +790,125 @@ class rcube_sieve_script
case 'fileinto':
case 'redirect':
- $action = array('type' => $token, 'target' => array_pop($tokens));
- $args = array('copy');
- $action += $this->action_arguments($tokens, $args);
+ $copy = false;
+ $target = '';
- $result[] = $action;
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ if (strtolower($tokens[$i]) == ':copy') {
+ $copy = true;
+ }
+ else {
+ $target = $tokens[$i];
+ }
+ }
+
+ $result[] = array('type' => $token, 'copy' => $copy,
+ 'target' => $target);
+ break;
+
+ case 'reject':
+ case 'ereject':
+ $result[] = array('type' => $token, 'target' => array_pop($tokens));
break;
case 'vacation':
- $action = array('type' => 'vacation', 'reason' => array_pop($tokens));
- $args = array('mime');
- $vargs = array('seconds', 'days', 'addresses', 'subject', 'handle', 'from');
- $action += $this->action_arguments($tokens, $args, $vargs);
+ $vacation = array('type' => 'vacation', 'reason' => array_pop($tokens));
- $result[] = $action;
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ $tok = strtolower($tokens[$i]);
+ if ($tok == ':days') {
+ $vacation['days'] = $tokens[++$i];
+ }
+ else if ($tok == ':subject') {
+ $vacation['subject'] = $tokens[++$i];
+ }
+ else if ($tok == ':addresses') {
+ $vacation['addresses'] = $tokens[++$i];
+ }
+ else if ($tok == ':handle') {
+ $vacation['handle'] = $tokens[++$i];
+ }
+ else if ($tok == ':from') {
+ $vacation['from'] = $tokens[++$i];
+ }
+ else if ($tok == ':mime') {
+ $vacation['mime'] = true;
+ }
+ }
+
+ $result[] = $vacation;
break;
- case 'reject':
- case 'ereject':
case 'setflag':
case 'addflag':
case 'removeflag':
- $result[] = array('type' => $token, 'target' => array_pop($tokens));
+ $result[] = array('type' => $token,
+ // Flags list: last token (skip optional variable)
+ 'target' => $tokens[count($tokens)-1]
+ );
break;
case 'include':
- $action = array('type' => 'include', 'target' => array_pop($tokens));
- $args = array('once', 'optional', 'global', 'personal');
- $action += $this->action_arguments($tokens, $args);
+ $include = array('type' => 'include', 'target' => array_pop($tokens));
- $result[] = $action;
+ // Parameters: :once, :optional, :global, :personal
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ $tok = strtolower($tokens[$i]);
+ if ($tok[0] == ':') {
+ $include[substr($tok, 1)] = true;
+ }
+ }
+
+ $result[] = $include;
break;
case 'set':
- $action = array('type' => 'set', 'value' => array_pop($tokens), 'name' => array_pop($tokens));
- $args = array('lower', 'upper', 'lowerfirst', 'upperfirst', 'quotewildcard', 'length');
- $action += $this->action_arguments($tokens, $args);
+ $set = array('type' => 'set', 'value' => array_pop($tokens), 'name' => array_pop($tokens));
+
+ // Parameters: :lower :upper :lowerfirst :upperfirst :quotewildcard :length
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ $tok = strtolower($tokens[$i]);
+ if ($tok[0] == ':') {
+ $set[substr($tok, 1)] = true;
+ }
+ }
- $result[] = $action;
+ $result[] = $set;
break;
case 'require':
// skip, will be build according to used commands
- // $result[] = array('type' => 'require', 'target' => array_pop($tokens));
+ // $result[] = array('type' => 'require', 'target' => $tokens);
break;
case 'notify':
- $action = array('type' => 'notify');
- $priorities = array('high' => 1, 'normal' => 2, 'low' => 3);
- $vargs = array('from', 'importance', 'options', 'message', 'method');
- $args = array_keys($priorities);
- $action += $this->action_arguments($tokens, $args, $vargs);
-
- // Here we support only 00 version of notify draft, there
- // were a couple regressions in 00 to 04 changelog, we use
- // the version used by Cyrus
- if (!isset($action['importance'])) {
- foreach ($priorities as $key => $val) {
- if (isset($action[$key])) {
- $action['importance'] = $val;
- unset($action[$key]);
+ $notify = array('type' => 'notify');
+ $priorities = array(':high' => 1, ':normal' => 2, ':low' => 3);
+
+ // Parameters: :from, :importance, :options, :message
+ // additional (optional) :method parameter for notify extension
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ $tok = strtolower($tokens[$i]);
+ if ($tok[0] == ':') {
+ // Here we support only 00 version of notify draft, there
+ // were a couple regressions in 00 to 04 changelog, we use
+ // the version used by Cyrus
+ if (isset($priorities[$tok])) {
+ $notify['importance'] = $priorities[$tok];
+ }
+ else {
+ $notify[substr($tok, 1)] = $tokens[++$i];
}
}
+ else {
+ // unnamed parameter is a :method in enotify extension
+ $notify['method'] = $tokens[$i];
+ }
}
- // unnamed parameter is a :method in enotify extension
- if (!isset($action['method'])) {
- $action['method'] = array_pop($tokens);
- }
-
- $method_components = parse_url($action['method']);
+ $method_components = parse_url($notify['method']);
if ($method_components['scheme'] == 'mailto') {
- $action['address'] = $method_components['path'];
+ $notify['address'] = $method_components['path'];
$method_params = array();
if (array_key_exists('query', $method_components)) {
parse_str($method_components['query'], $method_params);
@@ -881,10 +918,10 @@ class rcube_sieve_script
if (ini_get('magic_quotes_gpc') || ini_get('magic_quotes_sybase')) {
array_map('stripslashes', $method_params);
}
- $action['body'] = (array_key_exists('body', $method_params)) ? $method_params['body'] : '';
+ $notify['body'] = (array_key_exists('body', $method_params)) ? $method_params['body'] : '';
}
- $result[] = $action;
+ $result[] = $notify;
break;
}
@@ -897,7 +934,7 @@ class rcube_sieve_script
}
/**
- * Add comparator to the test
+ *
*/
private function add_comparator($test, &$out, &$exts)
{
@@ -920,111 +957,6 @@ class rcube_sieve_script
}
/**
- * Add index argument to the test
- */
- private function add_index($test, &$out, &$exts)
- {
- if (!empty($test['index'])) {
- array_push($exts, 'index');
- $out .= ' :index ' . intval($test['index']) . ($test['last'] ? ' :last' : '');
- }
- }
-
- /**
- * Add operators to the test
- */
- private function add_operator($test, &$out, &$exts)
- {
- if (empty($test['type'])) {
- return;
- }
-
- // relational operator + comparator
- if (preg_match('/^(value|count)-([gteqnl]{2})/', $test['type'], $m)) {
- array_push($exts, 'relational');
- array_push($exts, 'comparator-i;ascii-numeric');
-
- $out .= ' :' . $m[1] . ' "' . $m[2] . '" :comparator "i;ascii-numeric"';
- }
- else {
- $this->add_comparator($test, $out, $exts);
-
- if ($test['type'] == 'regex') {
- array_push($exts, 'regex');
- }
-
- $out .= ' :' . $test['type'];
- }
- }
-
- /**
- * Extract test tokens
- */
- private function test_tokens(&$tokens)
- {
- $test = array();
- $result = array();
-
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
- $test['comparator'] = $tokens[++$i];
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(count|value)$/i', $tokens[$i])) {
- $test['type'] = strtolower(substr($tokens[$i], 1)) . '-' . $tokens[++$i];
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
- $test['type'] = strtolower(substr($tokens[$i], 1));
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:index$/i', $tokens[$i])) {
- $test['index'] = intval($tokens[++$i]);
- if ($tokens[$i+1] && preg_match('/^:last$/i', $tokens[$i+1])) {
- $test['last'] = true;
- $i++;
- }
- }
- else {
- $result[] = $tokens[$i];
- }
- }
-
- $tokens = $result;
-
- return $test;
- }
-
- /**
- * Extract action arguments
- */
- private function action_arguments(&$tokens, $bool_args, $val_args = array())
- {
- $action = array();
- $result = array();
-
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- $tok = $tokens[$i];
- if (!is_array($tok) && $tok[0] == ':') {
- $tok = strtolower(substr($tok, 1));
- if (in_array($tok, $bool_args)) {
- $action[$tok] = true;
- }
- else if (in_array($tok, $val_args)) {
- $action[$tok] = $tokens[++$i];
- }
- else {
- $result[] = $tok;
- }
- }
- else {
- $result[] = $tok;
- }
- }
-
- $tokens = $result;
-
- return $action;
- }
-
- /**
* Escape special chars into quoted string value or multi-line string
* or list of strings
*
@@ -1082,10 +1014,11 @@ class rcube_sieve_script
* @param mixed $num Number of tokens to return, 0 for all
* or True for all tokens until separator is found.
* Separator will be returned as last token.
+ * @param int $in_list Enable to call recursively inside a list
*
* @return mixed Tokens array or string if $num=1
*/
- static function tokenize(&$str, $num=0)
+ static function tokenize(&$str, $num=0, $in_list=false)
{
$result = array();
@@ -1120,7 +1053,7 @@ class rcube_sieve_script
// Parenthesized list
case '[':
$str = substr($str, 1);
- $result[] = self::tokenize($str, 0);
+ $result[] = self::tokenize($str, 0, true);
break;
case ']':
$str = substr($str, 1);
diff --git a/plugins/managesieve/localization/ar_SA.inc b/plugins/managesieve/localization/ar_SA.inc
new file mode 100644
index 000000000..8e6d8414a
--- /dev/null
+++ b/plugins/managesieve/localization/ar_SA.inc
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/managesieve/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Managesieve 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-managesieve/
+*/
+$labels['messagedelete'] = 'حذف الرسالة';
+$labels['add'] = 'إضافة';
+$labels['del'] = 'حذف';
+$labels['recipient'] = 'مستلم';
+$labels['active'] = 'نشط';
+$labels['flagdeleted'] = 'محذوف';
+$labels['flagflagged'] = 'موسوم';
+$labels['flagdraft'] = 'مسودة';
+$labels['notifyimportancelow'] = 'منخفض';
+$labels['notifyimportancenormal'] = 'عادي';
+$labels['notifyimportancehigh'] = 'مرتفع';
+$labels['advancedopts'] = 'خيارات متقدّمة';
+$labels['address'] = 'العنوان';
+$labels['allparts'] = 'الكل';
+$labels['domain'] = 'المجال';
+?>
diff --git a/plugins/managesieve/localization/az_AZ.inc b/plugins/managesieve/localization/az_AZ.inc
index 670162552..f272df7b0 100644
--- a/plugins/managesieve/localization/az_AZ.inc
+++ b/plugins/managesieve/localization/az_AZ.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Əlavə et';
$labels['del'] = 'Sil';
$labels['sender'] = 'Göndərən';
$labels['recipient'] = 'Qəbul edən';
-$labels['vacationaddr'] = 'Əlavə ünvanlarım üçün siyahı:';
+$labels['vacationaddresses'] = 'Əlavə ünvanlarım üçün siyahı (vergüllər ilə ayrılmış):';
$labels['vacationdays'] = 'Məktub neçə müddətdən bir göndərilsin (gündə):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Məktublar nə qədər sıx göndərilsin:';
+$labels['days'] = 'günlər';
+$labels['seconds'] = 'saniyələr';
$labels['vacationreason'] = 'Məktubun mətni (səbəb yoxdur):';
$labels['vacationsubject'] = 'Məktubun mövzusu:';
$labels['rulestop'] = 'Yerinə yetirməyi dayandır';
@@ -98,9 +98,9 @@ $labels['flagdeleted'] = 'Silindi';
$labels['flaganswered'] = 'Cavab verilmiş';
$labels['flagflagged'] = 'İşarəlilər';
$labels['flagdraft'] = 'Qaralama';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
+$labels['setvariable'] = 'Dəyişəni təyin et';
+$labels['setvarname'] = 'Dəyişənin adı:';
+$labels['setvarvalue'] = 'Dəyişənin dəyəri:';
$labels['setvarmodifiers'] = 'Modifikatorlar';
$labels['varlower'] = 'aşağı registr';
$labels['varupper'] = 'yuxarı registr';
diff --git a/plugins/managesieve/localization/be_BE.inc b/plugins/managesieve/localization/be_BE.inc
index ff54c0546..64f81599e 100644
--- a/plugins/managesieve/localization/be_BE.inc
+++ b/plugins/managesieve/localization/be_BE.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Дадаць';
$labels['del'] = 'Выдаліць';
$labels['sender'] = 'Ад каго';
$labels['recipient'] = 'Каму';
-$labels['vacationaddr'] = 'Дадатковы спіс атрымальнікаў:';
+$labels['vacationaddresses'] = 'Дадатковы спіс атрымальнікаў (праз коску):';
$labels['vacationdays'] = 'Як часта дасылаць паведамленні (ў днях):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/bg_BG.inc b/plugins/managesieve/localization/bg_BG.inc
index e22290cff..28f2ddb99 100644
--- a/plugins/managesieve/localization/bg_BG.inc
+++ b/plugins/managesieve/localization/bg_BG.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Добавяне';
$labels['del'] = 'Изтриване';
$labels['sender'] = 'Подател';
$labels['recipient'] = 'Получател';
-$labels['vacationaddr'] = 'Допълнителни e-mail адреси:';
+$labels['vacationaddresses'] = 'Допълнителни e-mail адреси (разделени със запетая):';
$labels['vacationdays'] = 'Колко често пращате съобщения (в дни):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Колко често да праща съобщения:';
+$labels['days'] = 'дни';
+$labels['seconds'] = 'секунди';
$labels['vacationreason'] = 'Текст на съобщението (причина за ваканцията)';
$labels['vacationsubject'] = 'Тема на съобщението';
$labels['rulestop'] = 'Правила за спиране';
diff --git a/plugins/managesieve/localization/bs_BA.inc b/plugins/managesieve/localization/bs_BA.inc
index df9083129..7d21dbd9f 100644
--- a/plugins/managesieve/localization/bs_BA.inc
+++ b/plugins/managesieve/localization/bs_BA.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Dodaj';
$labels['del'] = 'Obriši';
$labels['sender'] = 'Pošiljaoc';
$labels['recipient'] = 'Primaoc';
-$labels['vacationaddr'] = 'Moje dodatne email adrese:';
+$labels['vacationaddresses'] = 'Moje dodatne email adrese (odvojite zarezima):';
$labels['vacationdays'] = 'Frekvencija slanja poruka (u danima):';
$labels['vacationinterval'] = 'Frekvencija slanja poruka:';
$labels['days'] = 'dana';
diff --git a/plugins/managesieve/localization/ca_ES.inc b/plugins/managesieve/localization/ca_ES.inc
index 7ebd2c049..e721fcce3 100644
--- a/plugins/managesieve/localization/ca_ES.inc
+++ b/plugins/managesieve/localization/ca_ES.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Afegeix';
$labels['del'] = 'Suprimeix';
$labels['sender'] = 'Remitent';
$labels['recipient'] = 'Destinatari/a';
-$labels['vacationaddr'] = 'Altres adreces electròniques meves:';
+$labels['vacationaddresses'] = 'Altres adreces electròniques meves (separades per coma)';
$labels['vacationdays'] = 'Cada quan enviar un missatge (en dies):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Amb quina freqüència enviar missatges:';
+$labels['days'] = 'dies';
+$labels['seconds'] = 'segons';
$labels['vacationreason'] = 'Cos del missatge (raó de les vacances):';
$labels['vacationsubject'] = 'Assumpte del missatge:';
$labels['rulestop'] = 'Deixa d\'avaluar regles';
diff --git a/plugins/managesieve/localization/cs_CZ.inc b/plugins/managesieve/localization/cs_CZ.inc
index 758316b3f..26baeff2b 100644
--- a/plugins/managesieve/localization/cs_CZ.inc
+++ b/plugins/managesieve/localization/cs_CZ.inc
@@ -49,14 +49,13 @@ $labels['messagesendcopy'] = 'Odeslat kopii zprávy na';
$labels['messagereply'] = 'Odpovědět se zprávou';
$labels['messagedelete'] = 'Smazat zprávu';
$labels['messagediscard'] = 'Smazat se zprávou';
-$labels['messagekeep'] = 'Ponechat zprávu v doručené poště';
$labels['messagesrules'] = 'Pravidla pro příchozí zprávu:';
$labels['messagesactions'] = '...vykonej následující akce:';
$labels['add'] = 'Přidej';
$labels['del'] = 'Smaž';
$labels['sender'] = 'Odesílatel';
$labels['recipient'] = 'Příjemce';
-$labels['vacationaddr'] = 'Moje další e-mailová adresa(y):';
+$labels['vacationaddresses'] = 'Moje další e-mailové adresy (aliasy) spojené s tímto účtem (oddělené čárkou):';
$labels['vacationdays'] = 'Počet dnů mezi automatickými odpověďmi:';
$labels['vacationinterval'] = 'Prodleva mezi automatickými odpověďmi:';
$labels['days'] = 'dnů';
@@ -122,22 +121,6 @@ $labels['filtercreate'] = 'Vytvořit filtr';
$labels['usedata'] = 'Použít následující údaje ve filtru:';
$labels['nextstep'] = 'Další krok';
$labels['...'] = '...';
-$labels['currdate'] = 'Aktuální datum';
-$labels['datetest'] = 'Datum';
-$labels['dateheader'] = 'hlavička:';
-$labels['year'] = 'rok';
-$labels['month'] = 'měsíc';
-$labels['day'] = 'den';
-$labels['date'] = 'datum (rrrr-mm-dd)';
-$labels['julian'] = 'datum (juliánské)';
-$labels['hour'] = 'hodina';
-$labels['minute'] = 'minuta';
-$labels['second'] = 'sekunda';
-$labels['time'] = 'čas (hh:mm:ss)';
-$labels['iso8601'] = 'datum (ISO8601)';
-$labels['std11'] = 'datum (RFC2822)';
-$labels['zone'] = 'časová zóna';
-$labels['weekday'] = 'všední den (0-6)';
$labels['advancedopts'] = 'Pokročilá nastavení';
$labels['body'] = 'Tělo';
$labels['address'] = 'adresa';
@@ -157,8 +140,6 @@ $labels['default'] = 'výchozí';
$labels['octet'] = 'striktní (oktet)';
$labels['asciicasemap'] = 'necitlivé na velikost písmen (ascii-casemap)';
$labels['asciinumeric'] = 'číslené (ascii-numeric)';
-$labels['index'] = 'index:';
-$labels['indexlast'] = 'pozpátku';
$messages = array();
$messages['filterunknownerror'] = 'Neznámá chyba serveru';
@@ -192,6 +173,5 @@ $messages['nametoolong'] = 'Příliš dlouhý název.';
$messages['namereserved'] = 'Vyhrazený název.';
$messages['setexist'] = 'Sada již existuje.';
$messages['nodata'] = 'Musí být vybrána minimálně jedna pozice!';
-$messages['invaliddateformat'] = 'Neplatné datum nebo část data';
?>
diff --git a/plugins/managesieve/localization/cy_GB.inc b/plugins/managesieve/localization/cy_GB.inc
index 63d2e7100..52fafe770 100644
--- a/plugins/managesieve/localization/cy_GB.inc
+++ b/plugins/managesieve/localization/cy_GB.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Ychwanegu';
$labels['del'] = 'Dileu';
$labels['sender'] = 'Anfonwr';
$labels['recipient'] = 'Derbynnwr';
-$labels['vacationaddr'] = 'Fy chyfeiriadau ebost ychwanegol:';
+$labels['vacationaddresses'] = 'Fy chyfeiriadau ebost ychwanegol (gwahanir gyda coma):';
$labels['vacationdays'] = 'Pa mor aml i ddanfon negeseuon (mewn dyddiau):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Pa mor aml i ddanfon negeseuon:';
+$labels['days'] = 'dyddiau';
+$labels['seconds'] = 'eiliadau';
$labels['vacationreason'] = 'Corff neges (rheswm ar wyliau):';
$labels['vacationsubject'] = 'Pwnc neges:';
$labels['rulestop'] = 'Stopio gwerthuso rheolau';
diff --git a/plugins/managesieve/localization/da_DK.inc b/plugins/managesieve/localization/da_DK.inc
index 058481031..cd3deaf40 100644
--- a/plugins/managesieve/localization/da_DK.inc
+++ b/plugins/managesieve/localization/da_DK.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Tilføje';
$labels['del'] = 'Fjern';
$labels['sender'] = 'Afsender';
$labels['recipient'] = 'Modtager';
-$labels['vacationaddr'] = 'Mine alternative e-mailadresser:';
+$labels['vacationaddresses'] = 'Mine alternative e-mailadresser (kommasepareret):';
$labels['vacationdays'] = 'Hvor tit skal besked sendes (i dage):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Hvor tit skal besked sendes:';
+$labels['days'] = 'dage';
+$labels['seconds'] = 'sekunder';
$labels['vacationreason'] = 'Besked (ved ferie):';
$labels['vacationsubject'] = 'Besked emne:';
$labels['rulestop'] = 'Stop behandling af regler';
diff --git a/plugins/managesieve/localization/de_CH.inc b/plugins/managesieve/localization/de_CH.inc
index 19a9b9de3..b30625fe9 100644
--- a/plugins/managesieve/localization/de_CH.inc
+++ b/plugins/managesieve/localization/de_CH.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Hinzufügen';
$labels['del'] = 'Löschen';
$labels['sender'] = 'Absender';
$labels['recipient'] = 'Empfänger';
-$labels['vacationaddr'] = 'Zusätzliche Liste von Empfängern:';
+$labels['vacationaddresses'] = 'Zusätzliche Liste von Empfängern (Komma getrennt):';
$labels['vacationdays'] = 'Antwort wird erneut gesendet nach (in Tagen):';
$labels['vacationinterval'] = 'Wie oft senden:';
$labels['days'] = 'Tage';
diff --git a/plugins/managesieve/localization/de_DE.inc b/plugins/managesieve/localization/de_DE.inc
index 4894904d6..d0cba28db 100644
--- a/plugins/managesieve/localization/de_DE.inc
+++ b/plugins/managesieve/localization/de_DE.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Hinzufügen';
$labels['del'] = 'Löschen';
$labels['sender'] = 'Absender';
$labels['recipient'] = 'Empfänger';
-$labels['vacationaddr'] = 'Zusätzliche Liste von E-Mail Empfängern:';
+$labels['vacationaddresses'] = 'Zusätzliche Liste von E-Mail Empfängern (Komma getrennt):';
$labels['vacationdays'] = 'Wie oft sollen Nachrichten gesendet werden (in Tagen):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Wie oft sollen Nachrichten gesendet werden:';
+$labels['days'] = 'Tage';
+$labels['seconds'] = 'Sekunden';
$labels['vacationreason'] = 'Nachrichteninhalt (Abwesenheitsgrund):';
$labels['vacationsubject'] = 'Nachrichtenbetreff';
$labels['rulestop'] = 'Regelauswertung anhalten';
diff --git a/plugins/managesieve/localization/el_GR.inc b/plugins/managesieve/localization/el_GR.inc
index e5a1b792d..5ef9916ad 100644
--- a/plugins/managesieve/localization/el_GR.inc
+++ b/plugins/managesieve/localization/el_GR.inc
@@ -34,18 +34,18 @@ $labels['filteris'] = 'είναι ίσο με';
$labels['filterisnot'] = 'δεν είναι ίσο με';
$labels['filterexists'] = 'υπάρχει';
$labels['filternotexists'] = 'δεν υπάρχει';
-$labels['filtermatches'] = 'matches expression';
-$labels['filternotmatches'] = 'not matches expression';
-$labels['filterregex'] = 'matches regular expression';
-$labels['filternotregex'] = 'not matches regular expression';
+$labels['filtermatches'] = 'ταιριάζει με την έκφραση ';
+$labels['filternotmatches'] = 'Δεν ταιριάζει με την έκφραση';
+$labels['filterregex'] = 'ταιριάζει με κανονική έκφραση';
+$labels['filternotregex'] = 'δεν ταιριάζει με κανονική έκφραση';
$labels['filterunder'] = 'κάτω';
$labels['filterover'] = 'πάνω';
$labels['addrule'] = 'Προσθήκη κανόνα';
$labels['delrule'] = 'Διαγραφή κανόνα';
$labels['messagemoveto'] = 'Μετακίνηση μηνύματος στο';
$labels['messageredirect'] = 'Προώθηση μηνύματος στο';
-$labels['messagecopyto'] = 'Copy message to';
-$labels['messagesendcopy'] = 'Send message copy to';
+$labels['messagecopyto'] = 'Αντιγραφη μυνηματος σε';
+$labels['messagesendcopy'] = 'Αποστολη της αντιγραφης μυνηματος σε';
$labels['messagereply'] = 'Απάντηση με μήνυμα';
$labels['messagedelete'] = 'Διαγραφή μηνύματος';
$labels['messagediscard'] = 'Απόρριψη με μήνυμα';
@@ -55,91 +55,91 @@ $labels['add'] = 'Προσθήκη';
$labels['del'] = 'Διαγραφή';
$labels['sender'] = 'Αποστολέας';
$labels['recipient'] = 'Παραλήπτης';
-$labels['vacationaddr'] = 'Πρόσθετη λίστα email παραληπτών:';
+$labels['vacationaddresses'] = 'Πρόσθετη λίστα email παραληπτών (διαχωρισμένη με κόμματα):';
$labels['vacationdays'] = 'Συχνότητα αποστολής μηνυμάτων (σε ημέρες):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Συχνότητα αποστολής μηνυμάτων:';
+$labels['days'] = 'ημερες';
+$labels['seconds'] = 'δευτερόλεπτα';
$labels['vacationreason'] = 'Σώμα μηνύματος (λόγος απουσίας):';
-$labels['vacationsubject'] = 'Message subject:';
+$labels['vacationsubject'] = 'Θέμα μηνύματος: ';
$labels['rulestop'] = 'Παύση επαλήθευσης κανόνων';
-$labels['enable'] = 'Enable/Disable';
-$labels['filterset'] = 'Filters set';
-$labels['filtersets'] = 'Filter sets';
-$labels['filtersetadd'] = 'Add filters set';
-$labels['filtersetdel'] = 'Delete current filters set';
-$labels['filtersetact'] = 'Activate current filters set';
-$labels['filtersetdeact'] = 'Deactivate current filters set';
-$labels['filterdef'] = 'Filter definition';
-$labels['filtersetname'] = 'Filters set name';
-$labels['newfilterset'] = 'New filters set';
-$labels['active'] = 'active';
-$labels['none'] = 'none';
-$labels['fromset'] = 'from set';
-$labels['fromfile'] = 'from file';
-$labels['filterdisabled'] = 'Filter disabled';
-$labels['countisgreaterthan'] = 'count is greater than';
-$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
-$labels['countislessthan'] = 'count is less than';
-$labels['countislessthanequal'] = 'count is less than or equal to';
-$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count does not equal';
-$labels['valueisgreaterthan'] = 'value is greater than';
-$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
-$labels['valueislessthan'] = 'value is less than';
-$labels['valueislessthanequal'] = 'value is less than or equal to';
-$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value does not equal';
-$labels['setflags'] = 'Set flags to the message';
-$labels['addflags'] = 'Add flags to the message';
-$labels['removeflags'] = 'Remove flags from the message';
-$labels['flagread'] = 'Read';
-$labels['flagdeleted'] = 'Deleted';
-$labels['flaganswered'] = 'Answered';
-$labels['flagflagged'] = 'Flagged';
-$labels['flagdraft'] = 'Draft';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
-$labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
-$labels['filtercreate'] = 'Create filter';
-$labels['usedata'] = 'Use following data in the filter:';
-$labels['nextstep'] = 'Next Step';
+$labels['enable'] = 'Ενεργοποιηση/Απενεργοποιηση';
+$labels['filterset'] = 'Φίλτρα';
+$labels['filtersets'] = 'Φίλτρο';
+$labels['filtersetadd'] = 'Προσθήκη φίλτρων';
+$labels['filtersetdel'] = 'Διαγραφή φίλτρων';
+$labels['filtersetact'] = 'Ενεργοποιηση φιλτρων';
+$labels['filtersetdeact'] = 'Απενεργοποιηση φιλτρων';
+$labels['filterdef'] = 'Ορισμος φιλτρου';
+$labels['filtersetname'] = 'Ονομασία φίλτρων';
+$labels['newfilterset'] = 'Νεα φιλτρα';
+$labels['active'] = 'ενεργο';
+$labels['none'] = 'κανένα';
+$labels['fromset'] = 'από το σύνολο ';
+$labels['fromfile'] = 'απο αρχειο';
+$labels['filterdisabled'] = 'Απενεργοποιημενο φιλτρο';
+$labels['countisgreaterthan'] = 'αρίθμηση είναι μεγαλύτερη από';
+$labels['countisgreaterthanequal'] = 'η μετρηση είναι μεγαλύτερη ή ίση προς';
+$labels['countislessthan'] = 'η μετρηση είναι μικρότερη απο';
+$labels['countislessthanequal'] = 'η μετρηση είναι μικρότερη ή ίση προς';
+$labels['countequals'] = 'η μέτρηση είναι ίση προς ';
+$labels['countnotequals'] = 'η μέτρηση δεν είναι ίση προς ';
+$labels['valueisgreaterthan'] = 'η τιμη είναι μεγαλύτερη από';
+$labels['valueisgreaterthanequal'] = 'η τιμη είναι μεγαλύτερη ή ίση προς';
+$labels['valueislessthan'] = 'η τιμη είναι μικρότερη απο';
+$labels['valueislessthanequal'] = 'η τιμη είναι μικρότερη ή ίση προς';
+$labels['valueequals'] = 'η τιμη είναι ίση με';
+$labels['valuenotequals'] = 'η τιμη δεν είναι ίση με';
+$labels['setflags'] = 'Ορισμός σημαίων στο μήνυμα';
+$labels['addflags'] = 'Προσθήκη σημαίων στο μήνυμα';
+$labels['removeflags'] = 'Αφαιρέση σημαίων από το μήνυμα';
+$labels['flagread'] = 'Αναγνωση';
+$labels['flagdeleted'] = 'Διεγραμμένο';
+$labels['flaganswered'] = 'Απαντήθηκε ';
+$labels['flagflagged'] = 'Σημειωμένο';
+$labels['flagdraft'] = 'Πρόχειρα';
+$labels['setvariable'] = 'Ορισμός μεταβλητής';
+$labels['setvarname'] = 'Όνομα μεταβλητης:';
+$labels['setvarvalue'] = 'Τιμη μεταβλητης:';
+$labels['setvarmodifiers'] = 'Τροποποιητές: ';
+$labels['varlower'] = 'Μικρογράμματη γραφή';
+$labels['varupper'] = 'κεφαλαία γράμματα ';
+$labels['varlowerfirst'] = 'πρώτος χαρακτήρας πεζός ';
+$labels['varupperfirst'] = 'πρώτος χαρακτήρας κεφαλαία γράμματα';
+$labels['varquotewildcard'] = 'παραθέση ειδικων χαρακτήρων';
+$labels['varlength'] = 'Μήκος';
+$labels['notify'] = 'Αποστολή ειδοποίησης ';
+$labels['notifyaddress'] = 'Σε διεύθυνση email:';
+$labels['notifybody'] = 'Οργανισμός ειδοποιησης:';
+$labels['notifysubject'] = 'Θεμα ειδοποιησης:';
+$labels['notifyfrom'] = 'Αποστολεας ειδοποιησης:';
+$labels['notifyimportance'] = 'Σημασία: ';
+$labels['notifyimportancelow'] = 'Χαμηλή';
+$labels['notifyimportancenormal'] = 'Κανονική';
+$labels['notifyimportancehigh'] = 'Υψηλή';
+$labels['filtercreate'] = 'Δημιουργία φίλτρου';
+$labels['usedata'] = 'Χρησιμοποιηση ακολουθων δεδομενων στο φιλτρο:';
+$labels['nextstep'] = 'Επομενο βημα';
$labels['...'] = '...';
-$labels['advancedopts'] = 'Advanced options';
-$labels['body'] = 'Body';
-$labels['address'] = 'address';
-$labels['envelope'] = 'envelope';
-$labels['modifier'] = 'modifier:';
-$labels['text'] = 'text';
-$labels['undecoded'] = 'undecoded (raw)';
-$labels['contenttype'] = 'content type';
-$labels['modtype'] = 'type:';
-$labels['allparts'] = 'all';
-$labels['domain'] = 'domain';
-$labels['localpart'] = 'local part';
-$labels['user'] = 'user';
-$labels['detail'] = 'detail';
-$labels['comparator'] = 'comparator:';
-$labels['default'] = 'default';
-$labels['octet'] = 'strict (octet)';
-$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
-$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['advancedopts'] = 'Προχωρημένες ρυθμίσεις';
+$labels['body'] = 'Σώμα';
+$labels['address'] = 'Διεύθυνση';
+$labels['envelope'] = 'φάκελος';
+$labels['modifier'] = 'Τροποποιηση: ';
+$labels['text'] = 'κειμενο';
+$labels['undecoded'] = 'αποκωδικοποιημένο (raw)';
+$labels['contenttype'] = 'Τύπος περιεχομένου ';
+$labels['modtype'] = 'τυπος:';
+$labels['allparts'] = 'Όλα';
+$labels['domain'] = 'τομέας';
+$labels['localpart'] = 'τοπικό τμήμα ';
+$labels['user'] = 'χρηστης';
+$labels['detail'] = 'λεπτομερειες';
+$labels['comparator'] = 'σύγκριση:';
+$labels['default'] = 'προεπιλογή';
+$labels['octet'] = 'αυστηρή (οκτάδα) ';
+$labels['asciicasemap'] = 'πεζά ή κεφαλαία (ascii-casemap)';
+$labels['asciinumeric'] = 'αριθμητικό (ascii-αριθμητικο)';
$messages = array();
$messages['filterunknownerror'] = 'Άγνωστο σφάλμα διακομιστή';
@@ -148,30 +148,30 @@ $messages['filterdeleteerror'] = 'Αδυναμία διαγραφής φίλτρ
$messages['filterdeleted'] = 'Το φίλτρο διαγράφηκε επιτυχώς';
$messages['filtersaved'] = 'Το φίλτρο αποθηκεύτηκε επιτυχώς';
$messages['filtersaveerror'] = 'Αδυναμία αποθήκευσης φίλτρου. Προέκυψε σφάλμα στον διακομιστή';
-$messages['filterdeleteconfirm'] = 'Do you really want to delete selected filter?';
+$messages['filterdeleteconfirm'] = 'Είστε σίγουροι ότι θέλετε να διαγράψετε το επιλεγμένο φίλτρο? ';
$messages['ruledeleteconfirm'] = 'Θέλετε όντως να διαγράψετε τον επιλεγμένο κανόνα;';
$messages['actiondeleteconfirm'] = 'Θέλετε όντως να διαγράψετε την επιλεγμένη ενέργεια;';
$messages['forbiddenchars'] = 'Μη επιτρεπτοί χαρακτήρες στο πεδίο';
$messages['cannotbeempty'] = 'Το πεδίο δεν μπορεί να είναι κενό';
-$messages['ruleexist'] = 'Filter with specified name already exists.';
-$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occured.';
-$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occured.';
-$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occured.';
-$messages['setactivated'] = 'Filters set activated successfully.';
-$messages['setdeactivated'] = 'Filters set deactivated successfully.';
-$messages['setdeleted'] = 'Filters set deleted successfully.';
-$messages['setdeleteconfirm'] = 'Are you sure, you want to delete selected filters set?';
-$messages['setcreateerror'] = 'Unable to create filters set. Server error occured.';
-$messages['setcreated'] = 'Filters set created successfully.';
-$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
-$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
-$messages['deactivated'] = 'Filter(s) disabled successfully.';
-$messages['activated'] = 'Filter(s) enabled successfully.';
-$messages['moved'] = 'Filter moved successfully.';
-$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
-$messages['nametoolong'] = 'Name too long.';
-$messages['namereserved'] = 'Reserved name.';
-$messages['setexist'] = 'Set already exists.';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['ruleexist'] = 'Φιλτρο με αυτο το όνομα υπάρχει ήδη. ';
+$messages['setactivateerror'] = 'Αδυναμία ενεργοποιησης επιλεγμενων φιλτρων. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['setdeactivateerror'] = 'Αδυναμία απενεργοποιησης επιλεγμενων φιλτρων. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['setdeleteerror'] = 'Αδυναμία διαγραφής φίλτρων. Προέκυψε σφάλμα στον διακομιστή';
+$messages['setactivated'] = 'Φίλτρα ενεργοποιήθηκαν με επιτυχία.';
+$messages['setdeactivated'] = 'Φίλτρα απενεργοποιήθηκαν με επιτυχία.';
+$messages['setdeleted'] = 'Τα φίλτρα διαγράφηκαν επιτυχώς.';
+$messages['setdeleteconfirm'] = 'Θέλετε όντως να διαγράψετε τα επιλεγμένα φιλτρα?';
+$messages['setcreateerror'] = 'Αδυναμία δημιουργιας φιλτρων. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['setcreated'] = 'Τα φιλτρα δημιουργηθηκαν επιτυχως.';
+$messages['activateerror'] = 'Αδυναμία ενεργοποιησης επιλεγμενου φίλτρου(ων). Προέκυψε σφάλμα στον διακομιστή.';
+$messages['deactivateerror'] = 'Αδυναμία απενεργοποιησης επιλεγμενου φίλτρου(ων). Προέκυψε σφάλμα στον διακομιστή.';
+$messages['deactivated'] = 'Το φιλτρο(α) απενεργοποιηθηκαν επιτυχως.';
+$messages['activated'] = 'Το φίλτρο(α) ενεργοποιηθηκαν επιτυχώς.';
+$messages['moved'] = 'Το φίλτρο μετακινηθηκε επιτυχώς.';
+$messages['moveerror'] = 'Αδυναμία μετακινησης επιλεγμενου φίλτρου. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['nametoolong'] = 'Το όνομα είναι πολύ μεγάλο.';
+$messages['namereserved'] = 'Δεσμευμένο όνομα. ';
+$messages['setexist'] = 'Set υπάρχει ήδη. ';
+$messages['nodata'] = 'Τουλάχιστον μία θέση πρέπει να επιλεγεί!';
?>
diff --git a/plugins/managesieve/localization/en_GB.inc b/plugins/managesieve/localization/en_GB.inc
index ff4965ca0..4dd4f7d8b 100644
--- a/plugins/managesieve/localization/en_GB.inc
+++ b/plugins/managesieve/localization/en_GB.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Add';
$labels['del'] = 'Delete';
$labels['sender'] = 'Sender';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddr'] = 'Additional list of recipient e-mails:';
+$labels['vacationaddresses'] = 'Additional list of recipient e-mails (comma separated):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc
index a37ea7db9..eea764c48 100644
--- a/plugins/managesieve/localization/en_US.inc
+++ b/plugins/managesieve/localization/en_US.inc
@@ -2,10 +2,10 @@
/*
+-----------------------------------------------------------------------+
- | plugins/managesieve/localization/<lang>.inc |
+ | plugins/managesieve/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Managesieve plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -49,18 +49,14 @@ $labels['messagesendcopy'] = 'Send message copy to';
$labels['messagereply'] = 'Reply with message';
$labels['messagedelete'] = 'Delete message';
$labels['messagediscard'] = 'Discard with message';
-$labels['messagekeep'] = 'Keep message in Inbox';
$labels['messagesrules'] = 'For incoming mail:';
$labels['messagesactions'] = '...execute the following actions:';
$labels['add'] = 'Add';
$labels['del'] = 'Delete';
$labels['sender'] = 'Sender';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
+$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
$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['rulestop'] = 'Stop evaluating rules';
@@ -84,13 +80,13 @@ $labels['countisgreaterthanequal'] = 'count is greater than or equal to';
$labels['countislessthan'] = 'count is less than';
$labels['countislessthanequal'] = 'count is less than or equal to';
$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count is not equal to';
+$labels['countnotequals'] = 'count does not equal';
$labels['valueisgreaterthan'] = 'value is greater than';
$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
$labels['valueislessthan'] = 'value is less than';
$labels['valueislessthanequal'] = 'value is less than or equal to';
$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value is not equal to';
+$labels['valuenotequals'] = 'value does not equal';
$labels['setflags'] = 'Set flags to the message';
$labels['addflags'] = 'Add flags to the message';
$labels['removeflags'] = 'Remove flags from the message';
@@ -122,22 +118,6 @@ $labels['filtercreate'] = 'Create filter';
$labels['usedata'] = 'Use following data in the filter:';
$labels['nextstep'] = 'Next Step';
$labels['...'] = '...';
-$labels['currdate'] = 'Current date';
-$labels['datetest'] = 'Date';
-$labels['dateheader'] = 'header:';
-$labels['year'] = 'year';
-$labels['month'] = 'month';
-$labels['day'] = 'day';
-$labels['date'] = 'date (yyyy-mm-dd)';
-$labels['julian'] = 'date (julian)';
-$labels['hour'] = 'hour';
-$labels['minute'] = 'minute';
-$labels['second'] = 'second';
-$labels['time'] = 'time (hh:mm:ss)';
-$labels['iso8601'] = 'date (ISO8601)';
-$labels['std11'] = 'date (RFC2822)';
-$labels['zone'] = 'time-zone';
-$labels['weekday'] = 'weekday (0-6)';
$labels['advancedopts'] = 'Advanced options';
$labels['body'] = 'Body';
$labels['address'] = 'address';
@@ -157,41 +137,38 @@ $labels['default'] = 'default';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
$labels['asciinumeric'] = 'numeric (ascii-numeric)';
-$labels['index'] = 'index:';
-$labels['indexlast'] = 'backwards';
$messages = array();
$messages['filterunknownerror'] = 'Unknown server error.';
$messages['filterconnerror'] = 'Unable to connect to server.';
-$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occured.';
+$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occurred.';
$messages['filterdeleted'] = 'Filter deleted successfully.';
$messages['filtersaved'] = 'Filter saved successfully.';
-$messages['filtersaveerror'] = 'Unable to save filter. Server error occured.';
+$messages['filtersaveerror'] = 'Unable to save filter. Server error occurred.';
$messages['filterdeleteconfirm'] = 'Do you really want to delete selected filter?';
$messages['ruledeleteconfirm'] = 'Are you sure, you want to delete selected rule?';
$messages['actiondeleteconfirm'] = 'Are you sure, you want to delete selected action?';
$messages['forbiddenchars'] = 'Forbidden characters in field.';
$messages['cannotbeempty'] = 'Field cannot be empty.';
$messages['ruleexist'] = 'Filter with specified name already exists.';
-$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occured.';
-$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occured.';
-$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occured.';
+$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occurred.';
+$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occurred.';
+$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occurred.';
$messages['setactivated'] = 'Filters set activated successfully.';
$messages['setdeactivated'] = 'Filters set deactivated successfully.';
$messages['setdeleted'] = 'Filters set deleted successfully.';
$messages['setdeleteconfirm'] = 'Are you sure, you want to delete selected filters set?';
-$messages['setcreateerror'] = 'Unable to create filters set. Server error occured.';
+$messages['setcreateerror'] = 'Unable to create filters set. Server error occurred.';
$messages['setcreated'] = 'Filters set created successfully.';
-$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
-$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
+$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occurred.';
+$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occurred.';
$messages['deactivated'] = 'Filter(s) disabled successfully.';
$messages['activated'] = 'Filter(s) enabled successfully.';
$messages['moved'] = 'Filter moved successfully.';
-$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
+$messages['moveerror'] = 'Unable to move selected filter. Server error occurred.';
$messages['nametoolong'] = 'Name too long.';
$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';
?>
diff --git a/plugins/managesieve/localization/eo.inc b/plugins/managesieve/localization/eo.inc
index 3f54e2391..3ce49ddb2 100644
--- a/plugins/managesieve/localization/eo.inc
+++ b/plugins/managesieve/localization/eo.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Aldoni';
$labels['del'] = 'Forigi';
$labels['sender'] = 'Sendanto';
$labels['recipient'] = 'Ricevanto';
-$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
+$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/es_AR.inc b/plugins/managesieve/localization/es_AR.inc
index e8d90efcf..c9c6e70f8 100644
--- a/plugins/managesieve/localization/es_AR.inc
+++ b/plugins/managesieve/localization/es_AR.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Agregar';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remitente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddr'] = 'Lista de direcciones de correo de destinatarios adicionales:';
+$labels['vacationaddresses'] = 'Lista de direcciones de correo de destinatarios adicionales (separados por comas):';
$labels['vacationdays'] = 'Cada cuanto enviar mensajes (en días):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/es_ES.inc b/plugins/managesieve/localization/es_ES.inc
index 65ed461c4..69ad9ce8a 100644
--- a/plugins/managesieve/localization/es_ES.inc
+++ b/plugins/managesieve/localization/es_ES.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Agregar';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remitente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddr'] = 'Mis direcciones de correo electrónico adicionales:';
+$labels['vacationaddresses'] = 'Lista de direcciones de correo de destinatarios adicionales (separados por comas):';
$labels['vacationdays'] = 'Cada cuánto enviar mensajes (en días):';
$labels['vacationinterval'] = 'Cada cuánto enviar mensajes:';
$labels['days'] = 'días';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'contiene más o igual que';
$labels['countislessthan'] = 'contiene menos que';
$labels['countislessthanequal'] = 'contiene menos o igual que';
$labels['countequals'] = 'contiene igual que';
-$labels['countnotequals'] = 'la cuenta no es igual a';
+$labels['countnotequals'] = 'contiene distinto que';
$labels['valueisgreaterthan'] = 'el valor es mayor que';
$labels['valueisgreaterthanequal'] = 'el valor es mayor o igual que';
$labels['valueislessthan'] = 'el valor es menor que';
$labels['valueislessthanequal'] = 'el valor es menor o igual que';
$labels['valueequals'] = 'el valor es igual que';
-$labels['valuenotequals'] = 'el valor no es igual a';
+$labels['valuenotequals'] = 'el valor es distinto que';
$labels['setflags'] = 'Etiquetar el mensaje';
$labels['addflags'] = 'Agregar etiquetas al mensaje';
$labels['removeflags'] = 'Eliminar etiquetas al mensaje';
@@ -121,22 +121,6 @@ $labels['filtercreate'] = 'Crear Filtro';
$labels['usedata'] = 'Usar los siguientes datos en el filtro:';
$labels['nextstep'] = 'Siguiente paso';
$labels['...'] = '...';
-$labels['currdate'] = 'Fecha actual';
-$labels['datetest'] = 'Fecha';
-$labels['dateheader'] = 'cabecera:';
-$labels['year'] = 'año';
-$labels['month'] = 'mes';
-$labels['day'] = 'día';
-$labels['date'] = 'fecha (aaaa-mm-dd)';
-$labels['julian'] = 'fecha (juliano)';
-$labels['hour'] = 'hora';
-$labels['minute'] = 'minuto';
-$labels['second'] = 'segundo';
-$labels['time'] = 'hora (hh:mm:ss)';
-$labels['iso8601'] = 'fecha (ISO8601)';
-$labels['std11'] = 'fecha (RFC2822)';
-$labels['zone'] = 'zona horaria';
-$labels['weekday'] = 'día de la semana (0-6)';
$labels['advancedopts'] = 'Opciones avanzadas';
$labels['body'] = 'Cuerpo del mensaje';
$labels['address'] = 'dirección';
@@ -156,8 +140,6 @@ $labels['default'] = 'predeterminado';
$labels['octet'] = 'estricto (octeto)';
$labels['asciicasemap'] = 'no sensible a mayúsculas (ascii-casemap)';
$labels['asciinumeric'] = 'numerico (ascii-numeric)';
-$labels['index'] = 'índice:';
-$labels['indexlast'] = 'hacia atrás';
$messages = array();
$messages['filterunknownerror'] = 'Error desconocido de servidor.';
@@ -191,6 +173,5 @@ $messages['nametoolong'] = 'Imposible crear el conjunto de filtros. Nombre demas
$messages['namereserved'] = 'Nombre reservado.';
$messages['setexist'] = 'El conjunto ya existe.';
$messages['nodata'] = '¡Al menos una posición debe ser seleccionada!';
-$messages['invaliddateformat'] = 'Fecha o formato de parte de la fecha no válido';
?>
diff --git a/plugins/managesieve/localization/et_EE.inc b/plugins/managesieve/localization/et_EE.inc
index dff15dfb4..5688e08e1 100644
--- a/plugins/managesieve/localization/et_EE.inc
+++ b/plugins/managesieve/localization/et_EE.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Lisa';
$labels['del'] = 'Kustuta';
$labels['sender'] = 'Saatja';
$labels['recipient'] = 'Saaja';
-$labels['vacationaddr'] = 'Minu teised e-posti aadress(id):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'Kui tihti kirju saata (päevades):';
-$labels['vacationinterval'] = 'Kui tihti kirju saata:';
-$labels['days'] = 'päeva';
-$labels['seconds'] = 'sekundit';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
$labels['vacationreason'] = 'Kirja sisu (puhkuse põhjus):';
$labels['vacationsubject'] = 'Kirja teema:';
$labels['rulestop'] = 'Peata reeglite otsimine';
@@ -83,7 +83,7 @@ $labels['countisgreaterthanequal'] = 'koguarv on suurem kui või võrdne';
$labels['countislessthan'] = 'koguarv on väiksem';
$labels['countislessthanequal'] = 'koguarv on väiksem kui või võrdne';
$labels['countequals'] = 'koguarv on võrdne';
-$labels['countnotequals'] = 'summa ei ole võrdne';
+$labels['countnotequals'] = 'koguarv ei ole võrdne';
$labels['valueisgreaterthan'] = 'väärtus on suurem kui';
$labels['valueisgreaterthanequal'] = 'väärtus on suurem kui või võrdne';
$labels['valueislessthan'] = 'väärtus on väiksem kui';
@@ -121,22 +121,6 @@ $labels['filtercreate'] = 'Loo filter';
$labels['usedata'] = 'Kasuta filtris järgmisi andmeid:';
$labels['nextstep'] = 'Järgmine samm';
$labels['...'] = '…';
-$labels['currdate'] = 'Praegune kuupäev';
-$labels['datetest'] = 'Kuupäev';
-$labels['dateheader'] = 'päis:';
-$labels['year'] = 'aasta';
-$labels['month'] = 'kuu';
-$labels['day'] = 'päev';
-$labels['date'] = 'kuupäev (aaaa-kk-pp)';
-$labels['julian'] = 'kuupäev (Juliuse)';
-$labels['hour'] = 'tund';
-$labels['minute'] = 'minut';
-$labels['second'] = 'sekund';
-$labels['time'] = 'aeg (tt:mm:ss)';
-$labels['iso8601'] = 'kuupäev (ISO8601)';
-$labels['std11'] = 'kuupäev (RCF2822)';
-$labels['zone'] = 'ajatsoon';
-$labels['weekday'] = 'nädalapäev (0-6)';
$labels['advancedopts'] = 'Lisaseadistused';
$labels['body'] = 'Põhitekst';
$labels['address'] = 'aadress';
@@ -156,8 +140,6 @@ $labels['default'] = 'vaikimisi';
$labels['octet'] = 'range (octet)';
$labels['asciicasemap'] = 'tõstutundetu (ascii-casemap)';
$labels['asciinumeric'] = 'numbriline (ascii-numeric)';
-$labels['index'] = 'indeks:';
-$labels['indexlast'] = 'tagasisuunas';
$messages = array();
$messages['filterunknownerror'] = 'Tundmatu serveri tõrge';
@@ -191,6 +173,5 @@ $messages['nametoolong'] = 'Nimi on liiga pikk.';
$messages['namereserved'] = 'Nimi on reserveeritud.';
$messages['setexist'] = 'Kogum on juba olemas.';
$messages['nodata'] = 'Valitud peab olema vähemalt üks asukoht!';
-$messages['invaliddateformat'] = 'Vigane kuupäev või kuupäeva formaat';
?>
diff --git a/plugins/managesieve/localization/eu_ES.inc b/plugins/managesieve/localization/eu_ES.inc
new file mode 100644
index 000000000..fde8f919d
--- /dev/null
+++ b/plugins/managesieve/localization/eu_ES.inc
@@ -0,0 +1,181 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/managesieve/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Managesieve 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-managesieve/
+*/
+$labels['filters'] = 'Iragazkiak';
+$labels['managefilters'] = 'Administratu postaren sarrera-iragazkiak';
+$labels['filtername'] = 'Iragazkiaren izena';
+$labels['newfilter'] = 'Iragazki berria';
+$labels['filteradd'] = 'Gehitu iragazkia';
+$labels['filterdel'] = 'Ezabatu iragazkia';
+$labels['moveup'] = 'Mugitu gora';
+$labels['movedown'] = 'Mugitu behera';
+$labels['filterallof'] = 'alderatu datozen arau guztiak';
+$labels['filteranyof'] = 'alderatu datozen arauetako batzuk';
+$labels['filterany'] = 'mezu guztiak';
+$labels['filtercontains'] = 'badu';
+$labels['filternotcontains'] = 'ez du';
+$labels['filteris'] = 'honen berdina da';
+$labels['filterisnot'] = 'ez da honen berdina';
+$labels['filterexists'] = 'badago';
+$labels['filternotexists'] = 'ez dago';
+$labels['filtermatches'] = 'bat datozen adierazpenak';
+$labels['filternotmatches'] = 'bat ez datozen adierazpenak';
+$labels['filterregex'] = 'bat datozen adierazpen erregularrak';
+$labels['filternotregex'] = 'bat ez datozen adierazpen erregularrak';
+$labels['filterunder'] = 'azpian';
+$labels['filterover'] = 'gainean';
+$labels['addrule'] = 'Gehitu araua';
+$labels['delrule'] = 'Ezabatu araua';
+$labels['messagemoveto'] = 'Mugitu mezua hona';
+$labels['messageredirect'] = 'Birbideratu mezua hona ';
+$labels['messagecopyto'] = 'Kopiatu mezua hona';
+$labels['messagesendcopy'] = 'Bidali mezuaren kopia hona';
+$labels['messagereply'] = 'Erantzun mezuarekin';
+$labels['messagedelete'] = 'Ezabatu mezua';
+$labels['messagediscard'] = 'Baztertu mezuarekin';
+$labels['messagesrules'] = 'Sarrerako postarako:';
+$labels['messagesactions'] = '...exekutatu datozen ekintzak:';
+$labels['add'] = 'Gehitu';
+$labels['del'] = 'Ezabatu';
+$labels['sender'] = 'Bidaltzailea';
+$labels['recipient'] = 'Hartzailea';
+$labels['vacationdays'] = 'Zer maiztasunarekin bidaltzen ditu mezuak (egunak)';
+$labels['vacationinterval'] = 'Zenbatero bidali mezuak:';
+$labels['days'] = 'egun';
+$labels['seconds'] = 'segundo';
+$labels['vacationreason'] = 'Mezuaren gorputza (oporrak direla medio):';
+$labels['vacationsubject'] = 'Mezuaren izenburua:';
+$labels['rulestop'] = 'Gelditu arauak ebaluatzen';
+$labels['enable'] = 'Gaitu/Ezgaitu';
+$labels['filterset'] = 'Iragazki-paketea';
+$labels['filtersets'] = 'Iragazki paketeak';
+$labels['filtersetadd'] = 'Gehitu iragazki-paketea';
+$labels['filtersetdel'] = 'Ezabatu uneko iragazki-paketea';
+$labels['filtersetact'] = 'Gaitu uneko iragazki-paketea';
+$labels['filtersetdeact'] = 'Ezgaitu uneko iragazki-paketea';
+$labels['filterdef'] = 'Iragazkiaren definizioa';
+$labels['filtersetname'] = 'Iragazki-paketearen izena';
+$labels['newfilterset'] = 'Iragazki-pakete berria';
+$labels['active'] = 'gaitua';
+$labels['none'] = 'Bat ere ez';
+$labels['fromset'] = 'paketetik';
+$labels['fromfile'] = 'fitxategitik';
+$labels['filterdisabled'] = 'Iragazki ezgaitua';
+$labels['countisgreaterthan'] = 'kopurua handiagoa da hau baino';
+$labels['countisgreaterthanequal'] = 'kopurua hau baino handiagoa edo berdina da';
+$labels['countislessthan'] = 'kopurua hau baino txikiagoa da';
+$labels['countislessthanequal'] = 'kopurua hau baino txikiagoa edo berdina da';
+$labels['countequals'] = 'kopurua honen berdina da';
+$labels['countnotequals'] = 'kopurua ez da honen berdina';
+$labels['valueisgreaterthan'] = 'balioa hau baino handiagoa da';
+$labels['valueisgreaterthanequal'] = 'balioa hau baino handiagoa edo berdina da';
+$labels['valueislessthan'] = 'balioa hau baino txikiagoa da';
+$labels['valueislessthanequal'] = 'balioa hau baino txikiagoa edo berdina da';
+$labels['valueequals'] = 'balioa honen berdina da';
+$labels['valuenotequals'] = 'balioa ez da honen berdina';
+$labels['setflags'] = 'Jarri banderak mezuarik';
+$labels['addflags'] = 'Gehitu banderak mezuari';
+$labels['removeflags'] = 'Ezabatu banderak mezutik';
+$labels['flagread'] = 'Irakurri';
+$labels['flagdeleted'] = 'Ezabatuta';
+$labels['flaganswered'] = 'Erantzunda';
+$labels['flagflagged'] = 'Bandera jarrita';
+$labels['flagdraft'] = 'Ziriborroa';
+$labels['setvariable'] = 'Ezarri aldagaia';
+$labels['setvarname'] = 'Aldagaiaren izena:';
+$labels['setvarvalue'] = 'Aldagaiaren balioa:';
+$labels['setvarmodifiers'] = 'Modifikatzaileak:';
+$labels['varlower'] = 'minuskulan';
+$labels['varupper'] = 'maiuskulan';
+$labels['varlowerfirst'] = 'lehenengo karakterea minuskulan';
+$labels['varupperfirst'] = 'lehenengo karakterea maiuskulan';
+$labels['varquotewildcard'] = 'aipatu karaktere bereziak';
+$labels['varlength'] = 'luzera';
+$labels['notify'] = 'Bidali jakinarazpena';
+$labels['notifyaddress'] = 'e-posta helbidera:';
+$labels['notifybody'] = 'Jakinarazpenaren gorputza:';
+$labels['notifysubject'] = 'Jakinarazpenaren subjektua:';
+$labels['notifyfrom'] = 'Jakinarazpenaren bidaltzailea:';
+$labels['notifyimportance'] = 'Garrantzia:';
+$labels['notifyimportancelow'] = 'baxua';
+$labels['notifyimportancenormal'] = 'normala';
+$labels['notifyimportancehigh'] = 'altua';
+$labels['filtercreate'] = 'Sortu iragazkia';
+$labels['usedata'] = 'Erabili datorren data iragazkian:';
+$labels['nextstep'] = 'Hurrengo urratsa';
+$labels['...'] = '...';
+$labels['currdate'] = 'Uneko data';
+$labels['datetest'] = 'Data';
+$labels['dateheader'] = 'goiburua:';
+$labels['year'] = 'urte';
+$labels['month'] = 'hilabete';
+$labels['day'] = 'egun';
+$labels['date'] = 'data (yyyy-mm-dd)';
+$labels['julian'] = 'data (juliarra)';
+$labels['hour'] = 'ordu';
+$labels['minute'] = 'minutu';
+$labels['second'] = 'segundo';
+$labels['time'] = 'ordua (hh:mm:ss)';
+$labels['iso8601'] = 'data (ISO8601)';
+$labels['std11'] = 'data (RFC2822)';
+$labels['zone'] = 'ordu-zona';
+$labels['weekday'] = 'asteguna (0-6)';
+$labels['advancedopts'] = 'Aukera aurreratuak';
+$labels['body'] = 'Gorputza';
+$labels['address'] = 'helbidea';
+$labels['envelope'] = 'gutun-azala';
+$labels['modifier'] = 'modifikatzailea:';
+$labels['text'] = 'testua';
+$labels['undecoded'] = 'kodetu gabe (gordina)';
+$labels['contenttype'] = 'eduki mota';
+$labels['modtype'] = 'mota:';
+$labels['allparts'] = 'denak';
+$labels['domain'] = 'domeinua';
+$labels['localpart'] = 'zati lokala';
+$labels['user'] = 'erabiltzailea';
+$labels['detail'] = 'xehetasuna';
+$labels['comparator'] = 'alderatzailea:';
+$labels['default'] = 'lehenetsia';
+$labels['octet'] = 'zorrotza (zortzikotea)';
+$labels['asciicasemap'] = 'minuskulak eta maiuskulak (ascii-casemap)';
+$labels['asciinumeric'] = 'numerikoa (ascii-numeric)';
+$labels['index'] = 'indexatu:';
+$labels['indexlast'] = 'atzeraka';
+$messages['filterunknownerror'] = 'Zerbitzari ezezaguna errorea';
+$messages['filterconnerror'] = 'Ezin da konektatu zerbitzariarekin.';
+$messages['filterdeleted'] = 'Iragazkia ongi ezabatu da.';
+$messages['filtersaved'] = 'Iragazkia ongi ezabatu da.';
+$messages['filterdeleteconfirm'] = 'Seguru zaude hautatutako iragazkiak ezabatu nahi dituzula?';
+$messages['ruledeleteconfirm'] = 'Seguru zaude hautatutako arauak ezabatu nahi dituzula?';
+$messages['actiondeleteconfirm'] = 'Seguru zaude hautatutako ekintzak ezabatu nahi dituzula?';
+$messages['forbiddenchars'] = 'Debekatutako karaktereak eremuan.';
+$messages['cannotbeempty'] = 'Eremua ezin da hutsik egon.';
+$messages['ruleexist'] = 'Lehendik badago izen hori duen iragazki bat.';
+$messages['setactivated'] = 'Iragazki paketea ongi aktibatu da.';
+$messages['setdeactivated'] = 'Iragazki paketea ongi desaktibatu da.';
+$messages['setdeleted'] = 'Iragazki paketea ongi ezabatu da.';
+$messages['setdeleteconfirm'] = 'Seguru zaude hautatutako iragazki paketea ezabatu nahi duzula?';
+$messages['setcreated'] = 'Iragazki paketea ongi sortu da.';
+$messages['deactivated'] = 'Iragazkia(k) ongi ezgaitu da.';
+$messages['activated'] = 'Iragazkia(k) ongi gaitu da.';
+$messages['moved'] = 'Iragazkia ongi mugitu da.';
+$messages['nametoolong'] = 'Izen luzeegia.';
+$messages['namereserved'] = 'Izen erreserbatua.';
+$messages['setexist'] = 'Lehendik badago pakete hori.';
+$messages['nodata'] = 'Gutxienez posizio bat hautatu behar da!';
+$messages['invaliddateformat'] = 'Dataren edo dataren zati baten formatua ez da baliozkoa ';
+?>
diff --git a/plugins/managesieve/localization/fa_IR.inc b/plugins/managesieve/localization/fa_IR.inc
index 1c8eace27..ebdc4531d 100644
--- a/plugins/managesieve/localization/fa_IR.inc
+++ b/plugins/managesieve/localization/fa_IR.inc
@@ -55,10 +55,11 @@ $labels['add'] = 'افزودن';
$labels['del'] = 'حذف';
$labels['sender'] = 'فرستنده';
$labels['recipient'] = 'گیرنده';
+$labels['vacationaddresses'] = 'آدرس‌های ایمیل دیگر من (جدا شده با ویرگول):';
$labels['vacationdays'] = 'پیغام ها در چه مواقعی فرستاده شدند (در روزهای):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'مواقعی که پیغام‌ها ارسال می‌شوند:';
+$labels['days'] = 'روزها';
+$labels['seconds'] = 'ثانیه‌ها';
$labels['vacationreason'] = 'بدنه پیغام (علت مسافرت):';
$labels['vacationsubject'] = 'موضوع پیغام:';
$labels['rulestop'] = 'توقف قوانین ارزیابی';
diff --git a/plugins/managesieve/localization/fi_FI.inc b/plugins/managesieve/localization/fi_FI.inc
index 67c819106..f006f6d23 100644
--- a/plugins/managesieve/localization/fi_FI.inc
+++ b/plugins/managesieve/localization/fi_FI.inc
@@ -49,7 +49,6 @@ $labels['messagesendcopy'] = 'Send message copy to';
$labels['messagereply'] = 'Reply with message';
$labels['messagedelete'] = 'Delete message';
$labels['messagediscard'] = 'Discard with message';
-$labels['messagekeep'] = 'Keep message in Inbox';
$labels['messagesrules'] = 'For incoming mail:';
$labels['messagesactions'] = '...execute the following actions:';
$labels['add'] = 'Lisää';
@@ -84,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'count is greater than or equal to';
$labels['countislessthan'] = 'count is less than';
$labels['countislessthanequal'] = 'count is less than or equal to';
$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count is not equal to';
+$labels['countnotequals'] = 'count does not equal';
$labels['valueisgreaterthan'] = 'value is greater than';
$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
$labels['valueislessthan'] = 'value is less than';
$labels['valueislessthanequal'] = 'value is less than or equal to';
$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value is not equal to';
+$labels['valuenotequals'] = 'value does not equal';
$labels['setflags'] = 'Aseta liput viestiin';
$labels['addflags'] = 'Lisää liput viestiin';
$labels['removeflags'] = 'Poista liput viestistä';
@@ -122,22 +121,6 @@ $labels['filtercreate'] = 'Luo suodatin';
$labels['usedata'] = 'Use following data in the filter:';
$labels['nextstep'] = 'Next Step';
$labels['...'] = '...';
-$labels['currdate'] = 'Current date';
-$labels['datetest'] = 'Date';
-$labels['dateheader'] = 'header:';
-$labels['year'] = 'year';
-$labels['month'] = 'month';
-$labels['day'] = 'day';
-$labels['date'] = 'date (yyyy-mm-dd)';
-$labels['julian'] = 'date (julian)';
-$labels['hour'] = 'hour';
-$labels['minute'] = 'minute';
-$labels['second'] = 'second';
-$labels['time'] = 'time (hh:mm:ss)';
-$labels['iso8601'] = 'date (ISO8601)';
-$labels['std11'] = 'date (RFC2822)';
-$labels['zone'] = 'time-zone';
-$labels['weekday'] = 'weekday (0-6)';
$labels['advancedopts'] = 'Lisävalinnat';
$labels['body'] = 'Body';
$labels['address'] = 'address';
@@ -157,8 +140,6 @@ $labels['default'] = 'oletus';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
$labels['asciinumeric'] = 'numeric (ascii-numeric)';
-$labels['index'] = 'index:';
-$labels['indexlast'] = 'backwards';
$messages = array();
$messages['filterunknownerror'] = 'Tuntematon palvelinvirhe.';
@@ -192,6 +173,5 @@ $messages['nametoolong'] = 'Nimi on liian pitkä.';
$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';
?>
diff --git a/plugins/managesieve/localization/fr_FR.inc b/plugins/managesieve/localization/fr_FR.inc
index 3defe9f12..b3f9ec9df 100644
--- a/plugins/managesieve/localization/fr_FR.inc
+++ b/plugins/managesieve/localization/fr_FR.inc
@@ -49,14 +49,13 @@ $labels['messagesendcopy'] = 'Envoyer une copie du message à';
$labels['messagereply'] = 'Répondre avec le message';
$labels['messagedelete'] = 'Supprimer le message';
$labels['messagediscard'] = 'Rejeter avec le message';
-$labels['messagekeep'] = 'Conserver le message dans la boîte de réception';
$labels['messagesrules'] = 'Pour les courriels entrants :';
$labels['messagesactions'] = '...exécuter les actions suivantes:';
$labels['add'] = 'Ajouter';
$labels['del'] = 'Supprimer';
$labels['sender'] = 'Expéditeur';
$labels['recipient'] = 'Destinataire';
-$labels['vacationaddr'] = 'Mon/Mes adresse(s) de courriel additionnelle(s):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'Ne pas renvoyer un message avant (jours) :';
$labels['vacationinterval'] = 'Comment envoyer les messages :';
$labels['days'] = 'jours';
@@ -84,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'total supérieur ou égal à';
$labels['countislessthan'] = 'total inférieur à';
$labels['countislessthanequal'] = 'total inférieur à';
$labels['countequals'] = 'total égal à';
-$labels['countnotequals'] = 'le comptage n\'est pas égal à';
+$labels['countnotequals'] = 'total différent de';
$labels['valueisgreaterthan'] = 'valeur supérieure à';
$labels['valueisgreaterthanequal'] = 'valeur supérieure ou égale à';
$labels['valueislessthan'] = 'valeur inférieure à';
$labels['valueislessthanequal'] = 'valeur inférieure ou égale à';
$labels['valueequals'] = 'valeur égale à';
-$labels['valuenotequals'] = 'la valeur n\'est pas égale à';
+$labels['valuenotequals'] = 'valeur différente de';
$labels['setflags'] = 'Mettre les marqueurs au message';
$labels['addflags'] = 'Ajouter les marqueurs au message';
$labels['removeflags'] = 'Supprimer les marqueurs du message';
@@ -122,22 +121,6 @@ $labels['filtercreate'] = 'Créer un filtre';
$labels['usedata'] = 'Utiliser les informations suivantes dans le filtre';
$labels['nextstep'] = 'Étape suivante';
$labels['...'] = '...';
-$labels['currdate'] = 'Date actuelle';
-$labels['datetest'] = 'Date';
-$labels['dateheader'] = 'header:';
-$labels['year'] = 'année';
-$labels['month'] = 'mois';
-$labels['day'] = 'jour';
-$labels['date'] = 'date (yyyy-mm-dd)';
-$labels['julian'] = 'date (julien)';
-$labels['hour'] = 'heure';
-$labels['minute'] = 'minute';
-$labels['second'] = 'seconde';
-$labels['time'] = 'heure (hh:mm:ss)';
-$labels['iso8601'] = 'date (ISO8601)';
-$labels['std11'] = 'date (RFC2822)';
-$labels['zone'] = 'fuseau horaire';
-$labels['weekday'] = 'jour de la semaine (0-6)';
$labels['advancedopts'] = 'Options avancées';
$labels['body'] = 'Corps du message';
$labels['address'] = 'adresse';
@@ -157,8 +140,6 @@ $labels['default'] = 'par défaut';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'insensible à la casse (ascii-casemap)';
$labels['asciinumeric'] = 'numérique (ascii-numeric)';
-$labels['index'] = 'index:';
-$labels['indexlast'] = 'retour arrière';
$messages = array();
$messages['filterunknownerror'] = 'Erreur du serveur inconnue';
@@ -192,6 +173,5 @@ $messages['nametoolong'] = 'Nom trop long.';
$messages['namereserved'] = 'Nom réservé.';
$messages['setexist'] = 'Ce groupe existe déjà.';
$messages['nodata'] = 'Au moins un élément doit être selectionné !';
-$messages['invaliddateformat'] = 'Date non valide ou format d\'une partie de la date';
?>
diff --git a/plugins/managesieve/localization/gl_ES.inc b/plugins/managesieve/localization/gl_ES.inc
index 185490a94..fef5ed718 100644
--- a/plugins/managesieve/localization/gl_ES.inc
+++ b/plugins/managesieve/localization/gl_ES.inc
@@ -34,10 +34,10 @@ $labels['filteris'] = 'é igual a';
$labels['filterisnot'] = 'non é igual a';
$labels['filterexists'] = 'existe';
$labels['filternotexists'] = 'non existe';
-$labels['filtermatches'] = 'matches expression';
-$labels['filternotmatches'] = 'not matches expression';
-$labels['filterregex'] = 'matches regular expression';
-$labels['filternotregex'] = 'not matches regular expression';
+$labels['filtermatches'] = 'casa coa expresión';
+$labels['filternotmatches'] = 'non casa coa expresión';
+$labels['filterregex'] = 'casa coa expresión regular';
+$labels['filternotregex'] = 'non casa coa expresión regular';
$labels['filterunder'] = 'baixo';
$labels['filterover'] = 'sobre';
$labels['addrule'] = 'Engadir regra';
@@ -55,17 +55,17 @@ $labels['add'] = 'Engadir';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remitente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddr'] = 'Lista de enderezos de correo de destinatarios adicionais:';
+$labels['vacationaddresses'] = 'Lista de enderezos de correo de destinatarios adicionais (separados por comas):';
$labels['vacationdays'] = 'Cada canto enviar mensaxes (en días):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Con qué frecuencia vanse enviar mensaxes:';
+$labels['days'] = 'días';
+$labels['seconds'] = 'segundos';
$labels['vacationreason'] = 'Corpo da mensaxe (razón de vacacións):';
-$labels['vacationsubject'] = 'Message subject:';
+$labels['vacationsubject'] = 'Asunto da mensaxe:';
$labels['rulestop'] = 'Parar de avaliar regras';
$labels['enable'] = 'Activar/Desactivar';
$labels['filterset'] = 'Conxunto de filtros';
-$labels['filtersets'] = 'Filter sets';
+$labels['filtersets'] = 'Conxunto de filtros';
$labels['filtersetadd'] = 'Engadir un conxunto de filtros';
$labels['filtersetdel'] = 'Eliminar o conxunto de filtros actual';
$labels['filtersetact'] = 'Activar o conxunto de filtros actual';
@@ -78,68 +78,68 @@ $labels['none'] = 'ningún';
$labels['fromset'] = 'de conxunto';
$labels['fromfile'] = 'de arquivo';
$labels['filterdisabled'] = 'Filtro desactivado';
-$labels['countisgreaterthan'] = 'count is greater than';
-$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
-$labels['countislessthan'] = 'count is less than';
-$labels['countislessthanequal'] = 'count is less than or equal to';
-$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count does not equal';
-$labels['valueisgreaterthan'] = 'value is greater than';
-$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
-$labels['valueislessthan'] = 'value is less than';
-$labels['valueislessthanequal'] = 'value is less than or equal to';
-$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value does not equal';
+$labels['countisgreaterthan'] = 'a conta é meirande que';
+$labels['countisgreaterthanequal'] = 'a conta é meirande ou igual a';
+$labels['countislessthan'] = 'a conta é menor que';
+$labels['countislessthanequal'] = 'a conta é menor ou igual a';
+$labels['countequals'] = 'a conta é igual a';
+$labels['countnotequals'] = 'a conta non é igual a';
+$labels['valueisgreaterthan'] = 'o valor é meirande que ';
+$labels['valueisgreaterthanequal'] = 'o valor é meirande ou igual a';
+$labels['valueislessthan'] = 'o valor é menor que';
+$labels['valueislessthanequal'] = 'o valor é menor ou igual a';
+$labels['valueequals'] = 'o valor é igual a';
+$labels['valuenotequals'] = 'o valor non é igual a';
$labels['setflags'] = 'Set flags to the message';
$labels['addflags'] = 'Add flags to the message';
$labels['removeflags'] = 'Remove flags from the message';
-$labels['flagread'] = 'Read';
-$labels['flagdeleted'] = 'Deleted';
-$labels['flaganswered'] = 'Answered';
-$labels['flagflagged'] = 'Flagged';
-$labels['flagdraft'] = 'Draft';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
+$labels['flagread'] = 'Lidas';
+$labels['flagdeleted'] = 'Eliminadas';
+$labels['flaganswered'] = 'Respostadas';
+$labels['flagflagged'] = 'Marcadas';
+$labels['flagdraft'] = 'Borrador';
+$labels['setvariable'] = 'Establecer variable';
+$labels['setvarname'] = 'Nome da variable:';
+$labels['setvarvalue'] = 'Valor da variable:';
+$labels['setvarmodifiers'] = 'Modificadores:';
+$labels['varlower'] = 'minúscula';
+$labels['varupper'] = 'maiúscula';
+$labels['varlowerfirst'] = 'primeira letra minúscula';
+$labels['varupperfirst'] = 'primeira letra maiúscula';
$labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
+$labels['varlength'] = 'lonxitude';
+$labels['notify'] = 'Enviar notificación';
+$labels['notifyaddress'] = 'Destinatario:';
+$labels['notifybody'] = 'Corpo da notificación:';
+$labels['notifysubject'] = 'Asunto da notificación:';
+$labels['notifyfrom'] = 'Remitente da notificación:';
+$labels['notifyimportance'] = 'Importancia:';
+$labels['notifyimportancelow'] = 'baixa';
$labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
-$labels['filtercreate'] = 'Create filter';
-$labels['usedata'] = 'Use following data in the filter:';
-$labels['nextstep'] = 'Next Step';
+$labels['notifyimportancehigh'] = 'alta';
+$labels['filtercreate'] = 'Crear filtro';
+$labels['usedata'] = 'Usar os seguintes datos no filtro:';
+$labels['nextstep'] = 'Seguinte paso';
$labels['...'] = '...';
-$labels['advancedopts'] = 'Advanced options';
-$labels['body'] = 'Body';
-$labels['address'] = 'address';
+$labels['advancedopts'] = 'Opcións avanzadas';
+$labels['body'] = 'Corpo';
+$labels['address'] = 'enderezo';
$labels['envelope'] = 'envelope';
-$labels['modifier'] = 'modifier:';
-$labels['text'] = 'text';
-$labels['undecoded'] = 'undecoded (raw)';
-$labels['contenttype'] = 'content type';
-$labels['modtype'] = 'type:';
-$labels['allparts'] = 'all';
-$labels['domain'] = 'domain';
-$labels['localpart'] = 'local part';
-$labels['user'] = 'user';
-$labels['detail'] = 'detail';
-$labels['comparator'] = 'comparator:';
-$labels['default'] = 'default';
-$labels['octet'] = 'strict (octet)';
-$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
-$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['modifier'] = 'modificador:';
+$labels['text'] = 'texto';
+$labels['undecoded'] = 'sen codificar (en bruto)';
+$labels['contenttype'] = 'tipo de contido';
+$labels['modtype'] = 'tipo:';
+$labels['allparts'] = 'todos';
+$labels['domain'] = 'dominio';
+$labels['localpart'] = 'parte local';
+$labels['user'] = 'usuario';
+$labels['detail'] = 'detalle';
+$labels['comparator'] = 'comparador';
+$labels['default'] = 'defecto';
+$labels['octet'] = 'estricto (octeto)';
+$labels['asciicasemap'] = 'non sensible a maiúsculas/minúsculas (ascii-casemap)';
+$labels['asciinumeric'] = 'numérico (ascii-numerico)';
$messages = array();
$messages['filterunknownerror'] = 'Erro descoñecido servidor';
@@ -153,7 +153,7 @@ $messages['ruledeleteconfirm'] = 'Está seguro de que desexa eliminar a regra se
$messages['actiondeleteconfirm'] = 'Está seguro de que desexa eliminar a acción seleccionada?';
$messages['forbiddenchars'] = 'Caracteres non permitidos no campo';
$messages['cannotbeempty'] = 'O campo non pode estar baleiro';
-$messages['ruleexist'] = 'Filter with specified name already exists.';
+$messages['ruleexist'] = 'Xa existe un filtro con nome especificado.';
$messages['setactivateerror'] = 'Imposible activar o conxunto de filtros seleccionado. Ocurriu un erro no servidor';
$messages['setdeactivateerror'] = 'Imposible desactivar o conxunto de filtros seleccionado. Ocurriu un error no servidor';
$messages['setdeleteerror'] = 'Imposible eliminar o conxunto de filtros seleccionado. Ocurriu un error no servidor';
@@ -163,15 +163,15 @@ $messages['setdeleted'] = 'O Conxunto de filtros borrouse con éxito';
$messages['setdeleteconfirm'] = 'Está seguro de que desexa eliminar o conxunto de filtros seleccionado?';
$messages['setcreateerror'] = 'Imposible crear o conxunto de filtros. Ocurriu un error no servidor';
$messages['setcreated'] = 'Conxunto de filtros creado con éxito';
-$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
-$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
-$messages['deactivated'] = 'Filter(s) disabled successfully.';
-$messages['activated'] = 'Filter(s) enabled successfully.';
-$messages['moved'] = 'Filter moved successfully.';
-$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
+$messages['activateerror'] = 'Non foi posible activar o(s) filtro(s) seleccionado(s). Ocurriu un erro no servidor.';
+$messages['deactivateerror'] = 'Non foi posible desactivar o(s) filtro(s) seleccionado(s). Ocurriu un erro no servidor.';
+$messages['deactivated'] = 'Desactiváronse os filtros correctamente.';
+$messages['activated'] = 'Activáronse os filtros correctamente';
+$messages['moved'] = 'Moveuse correctamente o filtro.';
+$messages['moveerror'] = 'Non foi posible mover o(s) filtro(s) seleccionado(s). Ocurriu un erro no servidor.';
$messages['nametoolong'] = 'Imposible crear o conxunto de filtros. O nome é longo de máis';
-$messages['namereserved'] = 'Reserved name.';
+$messages['namereserved'] = 'Nome reservado';
$messages['setexist'] = 'Set already exists.';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['nodata'] = 'É preciso seleccionar polo menos unha posición!';
?>
diff --git a/plugins/managesieve/localization/he_IL.inc b/plugins/managesieve/localization/he_IL.inc
index 932d4e5d6..aa736ac87 100644
--- a/plugins/managesieve/localization/he_IL.inc
+++ b/plugins/managesieve/localization/he_IL.inc
@@ -55,10 +55,11 @@ $labels['add'] = 'הוספה';
$labels['del'] = 'מחיקה';
$labels['sender'] = 'השולח';
$labels['recipient'] = 'הנמען';
+$labels['vacationaddresses'] = 'כתובות דוא"ל נוספות שלי (מופרדות ע"י פסיקים)';
$labels['vacationdays'] = 'באיזו תדירות ( בימים ) לשלוח הודעות:';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'באיזו תדירות לשלוח ההודעה';
+$labels['days'] = 'ימים';
+$labels['seconds'] = 'שניות';
$labels['vacationreason'] = 'גוף ההודעה (סיבת החופשה):';
$labels['vacationsubject'] = 'נושא ההודעה:';
$labels['rulestop'] = 'עצירה של בחינת הכללים';
diff --git a/plugins/managesieve/localization/hr_HR.inc b/plugins/managesieve/localization/hr_HR.inc
index 77b664b5f..64b9bef62 100644
--- a/plugins/managesieve/localization/hr_HR.inc
+++ b/plugins/managesieve/localization/hr_HR.inc
@@ -49,14 +49,13 @@ $labels['messagesendcopy'] = 'Pošalji kopiju poruke na';
$labels['messagereply'] = 'Odgovori sa porukom';
$labels['messagedelete'] = 'Obriši poruku';
$labels['messagediscard'] = 'Otkaži sa porukom';
-$labels['messagekeep'] = 'Keep message in Inbox';
$labels['messagesrules'] = 'Za pristigle poruke:';
$labels['messagesactions'] = '...primijeni sljedeće akcije:';
$labels['add'] = 'Dodaj';
$labels['del'] = 'Obriši';
$labels['sender'] = 'Pošiljatelj';
$labels['recipient'] = 'Primatelj';
-$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
+$labels['vacationaddresses'] = 'Dodatna lista primatelja (odvojenih zarezom):';
$labels['vacationdays'] = 'Koliko često slati poruku (u danima):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
@@ -84,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'brojač je veći ili jednak od';
$labels['countislessthan'] = 'brojač je manji od';
$labels['countislessthanequal'] = 'brojač je manji ili jednak od';
$labels['countequals'] = 'brojač je jednak';
-$labels['countnotequals'] = 'count is not equal to';
+$labels['countnotequals'] = 'brojač nije jednak';
$labels['valueisgreaterthan'] = 'vrijednost je veća od';
$labels['valueisgreaterthanequal'] = 'vrijednost je veća ili jednaka od';
$labels['valueislessthan'] = 'vrijednost je manja od';
$labels['valueislessthanequal'] = 'vrijednost je manja ili jednaka od';
$labels['valueequals'] = 'vrijednost je jednaka';
-$labels['valuenotequals'] = 'value is not equal to';
+$labels['valuenotequals'] = 'vrijednost nije jednaka';
$labels['setflags'] = 'Postavi oznake na poruku';
$labels['addflags'] = 'Dodaj oznake na poruku';
$labels['removeflags'] = 'Ukloni oznake sa poruke';
@@ -122,22 +121,6 @@ $labels['filtercreate'] = 'Stvori filter';
$labels['usedata'] = 'Koristi podatke za filter:';
$labels['nextstep'] = 'Idući korak';
$labels['...'] = '…';
-$labels['currdate'] = 'Current date';
-$labels['datetest'] = 'Date';
-$labels['dateheader'] = 'header:';
-$labels['year'] = 'year';
-$labels['month'] = 'month';
-$labels['day'] = 'day';
-$labels['date'] = 'date (yyyy-mm-dd)';
-$labels['julian'] = 'date (julian)';
-$labels['hour'] = 'hour';
-$labels['minute'] = 'minute';
-$labels['second'] = 'second';
-$labels['time'] = 'time (hh:mm:ss)';
-$labels['iso8601'] = 'date (ISO8601)';
-$labels['std11'] = 'date (RFC2822)';
-$labels['zone'] = 'time-zone';
-$labels['weekday'] = 'weekday (0-6)';
$labels['advancedopts'] = 'Napredne postavke';
$labels['body'] = 'Tijelo poruke';
$labels['address'] = 'adresa';
@@ -157,8 +140,6 @@ $labels['default'] = 'preddefinirano';
$labels['octet'] = 'strogo (oktet)';
$labels['asciicasemap'] = 'neosjetljivo na veličinu slova (ascii-casemap)';
$labels['asciinumeric'] = 'numerički (ascii-numeric)';
-$labels['index'] = 'index:';
-$labels['indexlast'] = 'backwards';
$messages = array();
$messages['filterunknownerror'] = 'Nepoznata greška na poslužitelju';
@@ -192,6 +173,5 @@ $messages['nametoolong'] = 'Nemoguće napraviti grupu filtera. Naziv je preduga
$messages['namereserved'] = 'Rezervirano ime.';
$messages['setexist'] = 'Skup već postoji.';
$messages['nodata'] = 'Barem jedan pozicija mora biti odabrana!';
-$messages['invaliddateformat'] = 'Invalid date or date part format';
?>
diff --git a/plugins/managesieve/localization/hu_HU.inc b/plugins/managesieve/localization/hu_HU.inc
index ea59fa717..9d39ffac3 100644
--- a/plugins/managesieve/localization/hu_HU.inc
+++ b/plugins/managesieve/localization/hu_HU.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Hozzáadás';
$labels['del'] = 'Törlés';
$labels['sender'] = 'Feladó';
$labels['recipient'] = 'Címzett';
-$labels['vacationaddr'] = 'További címzettek:';
+$labels['vacationaddresses'] = 'További címzettek (vesszővel elválasztva):';
$labels['vacationdays'] = 'Válaszüzenet küldése ennyi naponként:';
$labels['vacationinterval'] = 'Milyen gyakran küld üzeneteket:';
$labels['days'] = 'napok';
diff --git a/plugins/managesieve/localization/hy_AM.inc b/plugins/managesieve/localization/hy_AM.inc
index 68837b065..908175f1d 100644
--- a/plugins/managesieve/localization/hy_AM.inc
+++ b/plugins/managesieve/localization/hy_AM.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Ավելացնել';
$labels['del'] = 'Ջնջել';
$labels['sender'] = 'Ուղարկող';
$labels['recipient'] = 'Ստացող';
-$labels['vacationaddr'] = 'Իմ հավելյալ էլփոստի հասցեներ.';
+$labels['vacationaddresses'] = 'Իմ հավելյալ էլփոստի հասցեներ (բաժանված ստորակետներով).';
$labels['vacationdays'] = 'Ինչ հաճախությամբ ուղարկել հաղորդագրությունները (օրեր)`';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/ia.inc b/plugins/managesieve/localization/ia.inc
index 945de27d8..45f6e5263 100644
--- a/plugins/managesieve/localization/ia.inc
+++ b/plugins/managesieve/localization/ia.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Add';
$labels['del'] = 'Delete';
$labels['sender'] = 'Sender';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
+$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/id_ID.inc b/plugins/managesieve/localization/id_ID.inc
index d98a326c1..a30c2a0b0 100644
--- a/plugins/managesieve/localization/id_ID.inc
+++ b/plugins/managesieve/localization/id_ID.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Tambah';
$labels['del'] = 'Hapus';
$labels['sender'] = 'Pengirim';
$labels['recipient'] = 'Penerima';
-$labels['vacationaddr'] = 'Alamat email tambahan saya:';
+$labels['vacationaddresses'] = 'Alamat email tambahan saya (dipisahkan koma):';
$labels['vacationdays'] = 'Seberapa sering mengirim pesan (dalam hari):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/it_IT.inc b/plugins/managesieve/localization/it_IT.inc
index 9fc7dc570..0ac4f293a 100644
--- a/plugins/managesieve/localization/it_IT.inc
+++ b/plugins/managesieve/localization/it_IT.inc
@@ -49,14 +49,13 @@ $labels['messagesendcopy'] = 'Invia copia a';
$labels['messagereply'] = 'Rispondi con il messaggio';
$labels['messagedelete'] = 'Elimina il messaggio';
$labels['messagediscard'] = 'Rifiuta con messaggio';
-$labels['messagekeep'] = 'Mantieni il messaggio in Posta ricevuta';
$labels['messagesrules'] = 'Per la posta in arrivo';
$labels['messagesactions'] = '...esegui le seguenti azioni:';
$labels['add'] = 'Aggiungi';
$labels['del'] = 'Elimina';
$labels['sender'] = 'Mittente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddr'] = 'Account email aggiuntivo(i):';
+$labels['vacationaddresses'] = 'Lista di indirizzi e-mail di destinatari addizionali (separati da virgola):';
$labels['vacationdays'] = 'Ogni quanti giorni ribadire il messaggio allo stesso mittente';
$labels['vacationinterval'] = 'Ogni quanto tempo inviare i messaggi:';
$labels['days'] = 'giorni';
@@ -84,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'somma maggiore uguale a';
$labels['countislessthan'] = 'somma minore di';
$labels['countislessthanequal'] = 'somma minore o uguale a';
$labels['countequals'] = 'somma uguale a';
-$labels['countnotequals'] = 'il conteggio non è uguale a';
+$labels['countnotequals'] = 'somma diversa da';
$labels['valueisgreaterthan'] = 'valore maggiore di';
$labels['valueisgreaterthanequal'] = 'valore maggiore uguale a';
$labels['valueislessthan'] = 'valore minore di';
$labels['valueislessthanequal'] = 'valore minore uguale di';
$labels['valueequals'] = 'valore uguale a';
-$labels['valuenotequals'] = 'il valore non è uguale a';
+$labels['valuenotequals'] = 'valore diverso da';
$labels['setflags'] = 'Contrassegna il messaggio';
$labels['addflags'] = 'aggiungi flag al messaggio';
$labels['removeflags'] = 'togli flag dal messaggio';
@@ -122,22 +121,6 @@ $labels['filtercreate'] = 'Crea filtro';
$labels['usedata'] = 'utilizza i seguenti dati nel filtro';
$labels['nextstep'] = 'passo successivo';
$labels['...'] = '...';
-$labels['currdate'] = 'Data attuale';
-$labels['datetest'] = 'Data';
-$labels['dateheader'] = 'intestazione:';
-$labels['year'] = 'anno';
-$labels['month'] = 'mese';
-$labels['day'] = 'giorno';
-$labels['date'] = 'data (aaaa-mm-gg)';
-$labels['julian'] = 'data (Giuliana)';
-$labels['hour'] = 'ora';
-$labels['minute'] = 'minuto';
-$labels['second'] = 'secondo';
-$labels['time'] = 'tempo (hh:mm:ss)';
-$labels['iso8601'] = 'data (ISO8601)';
-$labels['std11'] = 'data (RFC2822)';
-$labels['zone'] = 'fuso orario';
-$labels['weekday'] = 'giorno della settimana (0-6)';
$labels['advancedopts'] = 'Opzioni avanzate';
$labels['body'] = 'Corpo';
$labels['address'] = 'indirizzo';
@@ -157,8 +140,6 @@ $labels['default'] = 'predefinito';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'non differenziare maiuscole/minuscole (ascii-casemap)';
$labels['asciinumeric'] = 'numerico';
-$labels['index'] = 'indice:';
-$labels['indexlast'] = 'indietro';
$messages = array();
$messages['filterunknownerror'] = 'Errore sconosciuto del server';
@@ -192,6 +173,5 @@ $messages['nametoolong'] = 'Impossibile creare il gruppo: Nome troppo lungo';
$messages['namereserved'] = 'nome riservato';
$messages['setexist'] = 'Il gruppo esiste già';
$messages['nodata'] = 'selezionare almeno una posizione';
-$messages['invaliddateformat'] = 'Formato della data non valido';
?>
diff --git a/plugins/managesieve/localization/ja_JP.inc b/plugins/managesieve/localization/ja_JP.inc
index c8927d3f2..0cd4f44b9 100644
--- a/plugins/managesieve/localization/ja_JP.inc
+++ b/plugins/managesieve/localization/ja_JP.inc
@@ -55,7 +55,7 @@ $labels['add'] = '追加';
$labels['del'] = '削除';
$labels['sender'] = '送信者';
$labels['recipient'] = '宛先';
-$labels['vacationaddr'] = '電子メールの宛先の追加のリスト:';
+$labels['vacationaddresses'] = '電子メールの宛先の(コンマ区切った)追加のリスト:';
$labels['vacationdays'] = 'メッセージを(1日に)送信する頻度:';
$labels['vacationinterval'] = 'メッセージを送信する頻度:';
$labels['days'] = '日';
diff --git a/plugins/managesieve/localization/ko_KR.inc b/plugins/managesieve/localization/ko_KR.inc
index 1085f624d..5ab4fc220 100644
--- a/plugins/managesieve/localization/ko_KR.inc
+++ b/plugins/managesieve/localization/ko_KR.inc
@@ -55,7 +55,7 @@ $labels['add'] = '추가';
$labels['del'] = '삭제';
$labels['sender'] = '발신인';
$labels['recipient'] = '수신인';
-$labels['vacationaddr'] = '나의 추가 이메일 주소:';
+$labels['vacationaddresses'] = '나의 추가 이메일 주소 (쉼표로 구분됨):';
$labels['vacationdays'] = '메시지 발신 주기 (일):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/lb_LU.inc b/plugins/managesieve/localization/lb_LU.inc
index 7494c0eb5..621fff831 100644
--- a/plugins/managesieve/localization/lb_LU.inc
+++ b/plugins/managesieve/localization/lb_LU.inc
@@ -15,8 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/
*/
-
-
$labels['filters'] = 'Filteren';
$labels['managefilters'] = 'Filtere geréieren fir Mailen déi erakommen';
$labels['filtername'] = 'Numm vum Filter';
@@ -34,10 +32,6 @@ $labels['filteris'] = 'ass gläich';
$labels['filterisnot'] = 'ass net gläich';
$labels['filterexists'] = 'existéiert';
$labels['filternotexists'] = 'existéiert net';
-$labels['filtermatches'] = 'matches expression';
-$labels['filternotmatches'] = 'not matches expression';
-$labels['filterregex'] = 'matches regular expression';
-$labels['filternotregex'] = 'not matches regular expression';
$labels['filterunder'] = 'ënner';
$labels['filterover'] = 'iwwer';
$labels['addrule'] = 'Reegel dobäisetzen';
@@ -48,149 +42,8 @@ $labels['messagecopyto'] = 'Message kopéieren an';
$labels['messagesendcopy'] = 'Kopie vum Message schécken un';
$labels['messagereply'] = 'Mat dësem Message äntweren';
$labels['messagedelete'] = 'Message läschen';
-$labels['messagediscard'] = 'Discard with message';
-$labels['messagesrules'] = 'For incoming mail:';
-$labels['messagesactions'] = '...execute the following actions:';
$labels['add'] = 'Dobäisetzen';
$labels['del'] = 'Läschen';
$labels['sender'] = 'Ofsender';
$labels['recipient'] = 'Empfänger';
-$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
-$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['rulestop'] = 'Stop evaluating rules';
-$labels['enable'] = 'Enable/Disable';
-$labels['filterset'] = 'Filters set';
-$labels['filtersets'] = 'Filter sets';
-$labels['filtersetadd'] = 'Add filters set';
-$labels['filtersetdel'] = 'Delete current filters set';
-$labels['filtersetact'] = 'Activate current filters set';
-$labels['filtersetdeact'] = 'Deactivate current filters set';
-$labels['filterdef'] = 'Filter definition';
-$labels['filtersetname'] = 'Filters set name';
-$labels['newfilterset'] = 'New filters set';
-$labels['active'] = 'active';
-$labels['none'] = 'none';
-$labels['fromset'] = 'from set';
-$labels['fromfile'] = 'from file';
-$labels['filterdisabled'] = 'Filter disabled';
-$labels['countisgreaterthan'] = 'count is greater than';
-$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
-$labels['countislessthan'] = 'count is less than';
-$labels['countislessthanequal'] = 'count is less than or equal to';
-$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count is not equal to';
-$labels['valueisgreaterthan'] = 'value is greater than';
-$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
-$labels['valueislessthan'] = 'value is less than';
-$labels['valueislessthanequal'] = 'value is less than or equal to';
-$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value is not equal to';
-$labels['setflags'] = 'Set flags to the message';
-$labels['addflags'] = 'Add flags to the message';
-$labels['removeflags'] = 'Remove flags from the message';
-$labels['flagread'] = 'Read';
-$labels['flagdeleted'] = 'Deleted';
-$labels['flaganswered'] = 'Answered';
-$labels['flagflagged'] = 'Flagged';
-$labels['flagdraft'] = 'Draft';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
-$labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
-$labels['filtercreate'] = 'Create filter';
-$labels['usedata'] = 'Use following data in the filter:';
-$labels['nextstep'] = 'Next Step';
-$labels['...'] = '...';
-$labels['currdate'] = 'Current date';
-$labels['datetest'] = 'Date';
-$labels['dateheader'] = 'header:';
-$labels['year'] = 'year';
-$labels['month'] = 'month';
-$labels['day'] = 'day';
-$labels['date'] = 'date (yyyy-mm-dd)';
-$labels['julian'] = 'date (julian)';
-$labels['hour'] = 'hour';
-$labels['minute'] = 'minute';
-$labels['second'] = 'second';
-$labels['time'] = 'time (hh:mm:ss)';
-$labels['iso8601'] = 'date (ISO8601)';
-$labels['std11'] = 'date (RFC2822)';
-$labels['zone'] = 'time-zone';
-$labels['weekday'] = 'weekday (0-6)';
-$labels['advancedopts'] = 'Advanced options';
-$labels['body'] = 'Body';
-$labels['address'] = 'address';
-$labels['envelope'] = 'envelope';
-$labels['modifier'] = 'modifier:';
-$labels['text'] = 'text';
-$labels['undecoded'] = 'undecoded (raw)';
-$labels['contenttype'] = 'content type';
-$labels['modtype'] = 'type:';
-$labels['allparts'] = 'all';
-$labels['domain'] = 'domain';
-$labels['localpart'] = 'local part';
-$labels['user'] = 'user';
-$labels['detail'] = 'detail';
-$labels['comparator'] = 'comparator:';
-$labels['default'] = 'default';
-$labels['octet'] = 'strict (octet)';
-$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
-$labels['asciinumeric'] = 'numeric (ascii-numeric)';
-$labels['index'] = 'index:';
-$labels['indexlast'] = 'backwards';
-
-$messages = array();
-$messages['filterunknownerror'] = 'Unknown server error.';
-$messages['filterconnerror'] = 'Unable to connect to server.';
-$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occured.';
-$messages['filterdeleted'] = 'Filter deleted successfully.';
-$messages['filtersaved'] = 'Filter saved successfully.';
-$messages['filtersaveerror'] = 'Unable to save filter. Server error occured.';
-$messages['filterdeleteconfirm'] = 'Do you really want to delete selected filter?';
-$messages['ruledeleteconfirm'] = 'Are you sure, you want to delete selected rule?';
-$messages['actiondeleteconfirm'] = 'Are you sure, you want to delete selected action?';
-$messages['forbiddenchars'] = 'Forbidden characters in field.';
-$messages['cannotbeempty'] = 'Field cannot be empty.';
-$messages['ruleexist'] = 'Filter with specified name already exists.';
-$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occured.';
-$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occured.';
-$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occured.';
-$messages['setactivated'] = 'Filters set activated successfully.';
-$messages['setdeactivated'] = 'Filters set deactivated successfully.';
-$messages['setdeleted'] = 'Filters set deleted successfully.';
-$messages['setdeleteconfirm'] = 'Are you sure, you want to delete selected filters set?';
-$messages['setcreateerror'] = 'Unable to create filters set. Server error occured.';
-$messages['setcreated'] = 'Filters set created successfully.';
-$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
-$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
-$messages['deactivated'] = 'Filter(s) disabled successfully.';
-$messages['activated'] = 'Filter(s) enabled successfully.';
-$messages['moved'] = 'Filter moved successfully.';
-$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
-$messages['nametoolong'] = 'Name too long.';
-$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';
-
?>
diff --git a/plugins/managesieve/localization/lt_LT.inc b/plugins/managesieve/localization/lt_LT.inc
index 3b6f4eec4..8fafb6d8d 100644
--- a/plugins/managesieve/localization/lt_LT.inc
+++ b/plugins/managesieve/localization/lt_LT.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Pridėti';
$labels['del'] = 'Pašalinti';
$labels['sender'] = 'Siuntėjas';
$labels['recipient'] = 'Gavėjas';
-$labels['vacationaddr'] = 'Papildomas gavėjų adresų sąrašas:';
+$labels['vacationaddresses'] = 'Papildomas gavėjų adresų sąrašas (skirti kableliais):';
$labels['vacationdays'] = 'Kaip dažnai išsiųsti laiškus (dienomis):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Kaip dažnai siųsti laiškus:';
+$labels['days'] = 'd.';
+$labels['seconds'] = 'sek.';
$labels['vacationreason'] = 'Laiško tekstas';
$labels['vacationsubject'] = 'Laiško tema:';
$labels['rulestop'] = 'Nutraukti taisyklių vykdymą';
@@ -172,6 +172,6 @@ $messages['moveerror'] = 'Pasirinkto filtro perkelti neįmanoma. Įvyko serverio
$messages['nametoolong'] = 'Vardas per ilgas.';
$messages['namereserved'] = 'Rezervuotas vardas.';
$messages['setexist'] = 'Rinkinys jau yra sukurtas.';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['nodata'] = 'Būtina pasirinkti bent vieną poziciją!';
?>
diff --git a/plugins/managesieve/localization/lv_LV.inc b/plugins/managesieve/localization/lv_LV.inc
index 02b4eeffa..f1f85c2e0 100644
--- a/plugins/managesieve/localization/lv_LV.inc
+++ b/plugins/managesieve/localization/lv_LV.inc
@@ -30,7 +30,7 @@ $labels['filteranyof'] = 'jāatbilst jebkuram no sekojošajiem nosacījumiem';
$labels['filterany'] = 'visām vēstulēm';
$labels['filtercontains'] = 'satur';
$labels['filternotcontains'] = 'nesatur';
-$labels['filteris'] = 'ir vienāds ar';
+$labels['filteris'] = 'vienāds ar';
$labels['filterisnot'] = 'nav vienāds ar';
$labels['filterexists'] = 'eksistē';
$labels['filternotexists'] = 'neeksistē';
@@ -46,20 +46,20 @@ $labels['messagemoveto'] = 'Pārvietot vēstuli uz';
$labels['messageredirect'] = 'Pāradresēt vēstuli uz';
$labels['messagecopyto'] = 'Kopēt vēstuli uz';
$labels['messagesendcopy'] = 'Pārsūtīt vēstules kopiju uz';
-$labels['messagereply'] = 'Atbildēt ar vēstuli';
+$labels['messagereply'] = 'Atbildēt ar';
$labels['messagedelete'] = 'Dzēst vēstuli';
$labels['messagediscard'] = 'Dzēst vēstuli un atbildēt';
$labels['messagesrules'] = 'Ienākošajām vēstulēm:';
-$labels['messagesactions'] = '...izpildīt sekojošās darbības:';
+$labels['messagesactions'] = 'Izpildīt sekojošās darbības:';
$labels['add'] = 'Pievienot';
$labels['del'] = 'Dzēst';
$labels['sender'] = 'Sūtītājs';
$labels['recipient'] = 'Saņēmējs';
-$labels['vacationaddr'] = 'Mana(s) papildus e-pasta adrese(s):';
+$labels['vacationaddresses'] = 'Ievadiet vienu vai vairākus e-pastu(s), atdalot tos komatu:';
$labels['vacationdays'] = 'Cik dienu laikā vienam un tam pašam sūtītājam neatbildēt atkārtoti (piem., 7):';
-$labels['vacationinterval'] = 'Cik bieži sūtīt vēstules:';
-$labels['days'] = 'dienas';
-$labels['seconds'] = 'sekundes';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
$labels['vacationreason'] = 'Atvaļinājuma paziņojuma teksts:';
$labels['vacationsubject'] = 'Vēstules tēma:';
$labels['rulestop'] = 'Apturēt nosacījumu pārbaudi';
@@ -78,16 +78,16 @@ $labels['none'] = 'nav';
$labels['fromset'] = 'no kopas';
$labels['fromfile'] = 'no faila';
$labels['filterdisabled'] = 'Filtrs atslēgts';
-$labels['countisgreaterthan'] = 'skaits ir lielāks kā';
-$labels['countisgreaterthanequal'] = 'skaits ir vienāds vai lielāks kā';
-$labels['countislessthan'] = 'skaits ir mazāks kā';
-$labels['countislessthanequal'] = 'skaits ir vienāds vai mazāks kā';
+$labels['countisgreaterthan'] = 'skaits ir lielāks nekā';
+$labels['countisgreaterthanequal'] = 'skaits ir vienāds vai lielāks nekā';
+$labels['countislessthan'] = 'skaits ir mazāks nekā';
+$labels['countislessthanequal'] = 'skaits ir vienāds vai mazāks nekā';
$labels['countequals'] = 'skaits ir vienāds ar';
$labels['countnotequals'] = 'skaits nav vienāds ar';
-$labels['valueisgreaterthan'] = 'vērtība ir lielāka kā';
-$labels['valueisgreaterthanequal'] = 'vērtība ir vienāda vai lielāka kā';
-$labels['valueislessthan'] = 'vērtība ir mazāka kā';
-$labels['valueislessthanequal'] = 'vērtība ir vienāda vai mazāka kā';
+$labels['valueisgreaterthan'] = 'vērtība ir lielāka nekā';
+$labels['valueisgreaterthanequal'] = 'vērtība ir vienāda vai lielāka nekā';
+$labels['valueislessthan'] = 'vērtība ir mazāka nekā';
+$labels['valueislessthanequal'] = 'vērtība ir vienāda vai mazāka nekā';
$labels['valueequals'] = 'vērtība ir vienāda ar';
$labels['valuenotequals'] = 'vērtība nav vienāda ar';
$labels['setflags'] = 'Marķēt vēstuli';
@@ -96,101 +96,82 @@ $labels['removeflags'] = 'Noņemt vēstulei marķierus';
$labels['flagread'] = 'Lasītas';
$labels['flagdeleted'] = 'Dzēstas';
$labels['flaganswered'] = 'Atbildētas';
-$labels['flagflagged'] = 'Marķētas';
+$labels['flagflagged'] = 'Iezīmētās';
$labels['flagdraft'] = 'Melnraksts';
-$labels['setvariable'] = 'Iestatīt mainīgo';
-$labels['setvarname'] = 'Mainīgā nosaukums:';
-$labels['setvarvalue'] = 'Mainīgā vērtība:';
-$labels['setvarmodifiers'] = 'Modifikatori:';
-$labels['varlower'] = 'mazie burti';
-$labels['varupper'] = 'lielie burti';
-$labels['varlowerfirst'] = 'pirmais burts kā mazais burts';
-$labels['varupperfirst'] = 'pirmais burts kā lielais burts';
-$labels['varquotewildcard'] = '"citēt" speciālās rakstzīmes';
-$labels['varlength'] = 'garums';
-$labels['notify'] = 'Sūtīt paziņojumus';
-$labels['notifyaddress'] = 'Uz e-pasta adresi:';
-$labels['notifybody'] = 'Paziņojuma teksts:';
-$labels['notifysubject'] = 'Paziņojuma tēma:';
-$labels['notifyfrom'] = 'Paziņojuma sūtītājs:';
-$labels['notifyimportance'] = 'Svarīgums:';
-$labels['notifyimportancelow'] = 'zems';
-$labels['notifyimportancenormal'] = 'parasts';
-$labels['notifyimportancehigh'] = 'augsts';
+$labels['setvariable'] = 'Set variable';
+$labels['setvarname'] = 'Variable name:';
+$labels['setvarvalue'] = 'Variable value:';
+$labels['setvarmodifiers'] = 'Modifiers:';
+$labels['varlower'] = 'lower-case';
+$labels['varupper'] = 'upper-case';
+$labels['varlowerfirst'] = 'first character lower-case';
+$labels['varupperfirst'] = 'first character upper-case';
+$labels['varquotewildcard'] = 'quote special characters';
+$labels['varlength'] = 'length';
+$labels['notify'] = 'Send notification';
+$labels['notifyaddress'] = 'To e-mail address:';
+$labels['notifybody'] = 'Notification body:';
+$labels['notifysubject'] = 'Notification subject:';
+$labels['notifyfrom'] = 'Notification sender:';
+$labels['notifyimportance'] = 'Importance:';
+$labels['notifyimportancelow'] = 'low';
+$labels['notifyimportancenormal'] = 'normal';
+$labels['notifyimportancehigh'] = 'high';
$labels['filtercreate'] = 'Izveidot filtru';
$labels['usedata'] = 'Filtrā izmantot sekojošus datus';
$labels['nextstep'] = 'Nākamais solis';
$labels['...'] = '...';
-$labels['currdate'] = 'Pašreizējais datums';
-$labels['datetest'] = 'Datums';
-$labels['dateheader'] = 'galvene:';
-$labels['year'] = 'gads';
-$labels['month'] = 'mēnesis';
-$labels['day'] = 'diena';
-$labels['date'] = 'datums (gggg-mm-dd)';
-$labels['julian'] = 'datums (Jūlija kalendārs)';
-$labels['hour'] = 'stunda';
-$labels['minute'] = 'minūte';
-$labels['second'] = 'sekunde';
-$labels['time'] = 'laiks (hh:mm:ss)';
-$labels['iso8601'] = 'datums (ISO8601)';
-$labels['std11'] = 'datums (RFC2822)';
-$labels['zone'] = 'laikajosla';
-$labels['weekday'] = 'nedēļas diena (0-6)';
-$labels['advancedopts'] = 'Paplašinātie iestatījumi';
+$labels['advancedopts'] = 'Paplašināti iestatījumi';
$labels['body'] = 'Pamatteksts';
$labels['address'] = 'adresāts';
$labels['envelope'] = 'aploksne';
$labels['modifier'] = 'modifikators:';
$labels['text'] = 'teksts';
-$labels['undecoded'] = 'neatkodēts (neapstrādāti dati)';
+$labels['undecoded'] = 'neatkodēts (jēldati)';
$labels['contenttype'] = 'satura tips';
$labels['modtype'] = 'tips:';
$labels['allparts'] = 'viss';
$labels['domain'] = 'domēns';
-$labels['localpart'] = 'lokālā daļa';
+$labels['localpart'] = 'vietējā daļa';
$labels['user'] = 'lietotājs';
$labels['detail'] = 'detaļas';
-$labels['comparator'] = 'salīdzinātājs';
-$labels['default'] = 'noklusētā vērtība';
-$labels['octet'] = 'precīzs (oktets)';
+$labels['comparator'] = 'komparators';
+$labels['default'] = 'noklusējums';
+$labels['octet'] = 'strikti (oktets)';
$labels['asciicasemap'] = 'reģistrnejutīgs (ascii tabula)';
$labels['asciinumeric'] = 'skaitļu (ascii skaitļu)';
-$labels['index'] = 'indekss:';
-$labels['indexlast'] = '"backwards"';
$messages = array();
-$messages['filterunknownerror'] = 'Nezināma servera kļūda.';
-$messages['filterconnerror'] = 'Neizdevās pieslēgties ManageSieve serverim.';
-$messages['filterdeleteerror'] = 'Neizdevās izdzēst filtru - servera kļūda.';
-$messages['filterdeleted'] = 'Filtrs veiksmīgi izdzēsts.';
-$messages['filtersaved'] = 'Filtrs veiksmīgi saglabāts.';
-$messages['filtersaveerror'] = 'Neizdevās saglabāt filtru - servera kļūda.';
-$messages['filterdeleteconfirm'] = 'Vai Jūs tiešām vēlaties dzēst atzīmēto filtru?';
-$messages['ruledeleteconfirm'] = 'Vai Jūs tiešām vēlaties dzēst atzīmēto nosacījumu?';
-$messages['actiondeleteconfirm'] = 'Vai Jūs tiešām vēlaties dzēst atzīmēto darbību?';
-$messages['forbiddenchars'] = 'Lauks satur aizliegtus simbolus.';
-$messages['cannotbeempty'] = 'Lauks nedrīkst būt tukšs.';
-$messages['ruleexist'] = 'Filtrs ar tādu nosaukumu jau pastāv.';
-$messages['setactivateerror'] = 'Neizdevās aktivizēt atzīmēto filtru kopu - servera kļūda.';
-$messages['setdeactivateerror'] = 'Neizdevās deaktivizēt atzīmēto filtru kopu - servera kļūda.';
-$messages['setdeleteerror'] = 'Neizdevās izdzēst atzīmēto filtru kopu - servera kļūda.';
-$messages['setactivated'] = 'Filtru kopa veiksmīgi aktivizēta.';
-$messages['setdeactivated'] = 'Filtru kopa veiksmīgi deaktivizēta.';
-$messages['setdeleted'] = 'Filtru kopa veiksmīgi izdzēsta.';
-$messages['setdeleteconfirm'] = 'Vai tiešām Jūs vēlaties dzēst atzīmēto filtru kopu?';
-$messages['setcreateerror'] = 'Neizdevās izveidot filtru kopu - servera kļūda.';
-$messages['setcreated'] = 'Filtru kopa veiksmīgi izveidota.';
-$messages['activateerror'] = 'Nav iespējams ieslēgt izvēlēto(s) filtru(s) - servera kļūda.';
-$messages['deactivateerror'] = 'Nav iespējams atslēgt izvēlēto(s) filtru(s) - servera kļūda.';
-$messages['deactivated'] = 'Filtrs(i) veiksmīgi atslēgts(i).';
-$messages['activated'] = 'Filtrs(i) veiksmīgi ieslēgts(i).';
-$messages['moved'] = 'Filtrs veiksmīgi pārvietots.';
-$messages['moveerror'] = 'Nav iespējams pārvietot izvēlēto filtru - servera kļūda.';
-$messages['nametoolong'] = 'Neizdevās izveidot filtru kopu. Pārāk garš kopas nosaukums.';
-$messages['namereserved'] = 'Rezervētais nosaukums.';
-$messages['setexist'] = 'Kopa jau eksistē.';
-$messages['nodata'] = 'Ir jābūt atzīmētai vismaz vienai pozīcijai!';
-$messages['invaliddateformat'] = 'Nederīgs datums vai datuma formāts';
+$messages['filterunknownerror'] = 'Nezināma servera kļūda';
+$messages['filterconnerror'] = 'Neizdevās pieslēgties ManageSieve serverim';
+$messages['filterdeleteerror'] = 'Neizdevās dzēst filtru. Servera iekšējā kļūda';
+$messages['filterdeleted'] = 'Filtrs veiksmīgi izdzēsts';
+$messages['filtersaved'] = 'Filtrs veiksmīgi saglabāts';
+$messages['filtersaveerror'] = 'Neizdevās saglabāt filtru. Servera iekšējā kļūda';
+$messages['filterdeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto filtru?';
+$messages['ruledeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto nosacījumu?';
+$messages['actiondeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto darbību?';
+$messages['forbiddenchars'] = 'Lauks satur aizliegtus simbolus';
+$messages['cannotbeempty'] = 'Lauks nedrīkst būt tukšs';
+$messages['ruleexist'] = 'Filter with specified name already exists.';
+$messages['setactivateerror'] = 'Neizdevās aktivizēt atzīmēto filtru kopu. Servera iekšējā kļūda';
+$messages['setdeactivateerror'] = 'Neizdevās deaktivizēt atzīmēto filtru kopu. Servera iekšējā kļūda';
+$messages['setdeleteerror'] = 'Neizdevās izdzēst atzīmēto filtru kopu. Servera iekšējā kļūda';
+$messages['setactivated'] = 'Filtru kopa veiksmīgi aktivizēta';
+$messages['setdeactivated'] = 'Filtru kopa veiksmīgi deaktivizēta';
+$messages['setdeleted'] = 'Filtru kopa veiksmīgi izdzēsta';
+$messages['setdeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto filtru kopu?';
+$messages['setcreateerror'] = 'Neizdevās izveidot filtru kopu. Servera iekšējā kļūda';
+$messages['setcreated'] = 'Filtru kopa veiksmīgi izveidota';
+$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
+$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
+$messages['deactivated'] = 'Filter(s) disabled successfully.';
+$messages['activated'] = 'Filter(s) enabled successfully.';
+$messages['moved'] = 'Filter moved successfully.';
+$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
+$messages['nametoolong'] = 'Neizdevās izveidot filtru kopu. Pārāk garš kopas nosaukums';
+$messages['namereserved'] = 'Reserved name.';
+$messages['setexist'] = 'Set already exists.';
+$messages['nodata'] = 'At least one position must be selected!';
?>
diff --git a/plugins/managesieve/localization/ml_IN.inc b/plugins/managesieve/localization/ml_IN.inc
index 761b4305b..67cd6829f 100644
--- a/plugins/managesieve/localization/ml_IN.inc
+++ b/plugins/managesieve/localization/ml_IN.inc
@@ -55,6 +55,7 @@ $labels['add'] = 'ചേര്‍ക്കു';
$labels['del'] = 'നീക്കം ചെയ്യുക';
$labels['sender'] = 'അയചയാള്‍';
$labels['recipient'] = 'സ്വീകര്‍ത്താവ്';
+$labels['vacationaddresses'] = 'സ്വീകര്‍ത്താവിന്റെ ഇമെയില്‍ വിലാസങ്ങളുടെ അധികമുള്ള പട്ടിക (കോമയിട്ട് തിരിച്ച)';
$labels['vacationdays'] = 'എത്ര ഭിവസം കൂടുമ്പോള്‍ സന്ദേശം അയക്കണം:';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/mr_IN.inc b/plugins/managesieve/localization/mr_IN.inc
index 082ea9bc6..3339737e0 100644
--- a/plugins/managesieve/localization/mr_IN.inc
+++ b/plugins/managesieve/localization/mr_IN.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'समावेश करा';
$labels['del'] = 'नष्ट करा';
$labels['sender'] = 'प्रेषक';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
+$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/nb_NO.inc b/plugins/managesieve/localization/nb_NO.inc
index c3bf98f8b..c2c17b23c 100644
--- a/plugins/managesieve/localization/nb_NO.inc
+++ b/plugins/managesieve/localization/nb_NO.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Legg til';
$labels['del'] = 'Slett';
$labels['sender'] = 'Avsender';
$labels['recipient'] = 'Mottaker';
-$labels['vacationaddr'] = 'Liste med mottakeradresser:';
+$labels['vacationaddresses'] = 'Liste med mottakeradresser (adskilt med komma):';
$labels['vacationdays'] = 'Periode mellom meldinger (i dager):';
$labels['vacationinterval'] = 'Periode mellom meldinger:';
$labels['days'] = 'dager';
diff --git a/plugins/managesieve/localization/nl_NL.inc b/plugins/managesieve/localization/nl_NL.inc
index 80c2274b1..1fd6eee4e 100644
--- a/plugins/managesieve/localization/nl_NL.inc
+++ b/plugins/managesieve/localization/nl_NL.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Toevoegen';
$labels['del'] = 'Verwijderen';
$labels['sender'] = 'Afzender';
$labels['recipient'] = 'Ontvanger';
-$labels['vacationaddr'] = 'Aanvullende lijst van geadresseerden:';
+$labels['vacationaddresses'] = 'Aanvullende lijst van geadresseerden (gescheiden met komma\'s):';
$labels['vacationdays'] = 'Hoe vaak moet een bericht verstuurd worden (in dagen):';
$labels['vacationinterval'] = 'Hoe vaak moet een bericht verstuurd worden:';
$labels['days'] = 'dagen';
diff --git a/plugins/managesieve/localization/nn_NO.inc b/plugins/managesieve/localization/nn_NO.inc
index 03563a72b..18bf8b987 100644
--- a/plugins/managesieve/localization/nn_NO.inc
+++ b/plugins/managesieve/localization/nn_NO.inc
@@ -55,8 +55,11 @@ $labels['add'] = 'Legg til';
$labels['del'] = 'Slett';
$labels['sender'] = 'Avsendar';
$labels['recipient'] = 'Mottakar';
-$labels['vacationaddr'] = 'Liste med mottakaradresser:';
+$labels['vacationaddresses'] = 'Liste med mottakaradresser (komma-separert):';
$labels['vacationdays'] = 'Periode mellom meldingar (i dagar):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
$labels['vacationreason'] = 'Innhald (grunngjeving for fråvær)';
$labels['vacationsubject'] = 'Meldingsemne:';
$labels['rulestop'] = 'Stopp evaluering av regler';
@@ -98,7 +101,7 @@ $labels['flagdraft'] = 'Skisse';
$labels['setvariable'] = 'Sett variabel:';
$labels['setvarname'] = 'Variabelnamn:';
$labels['setvarvalue'] = 'Variabelverdi:';
-$labels['setvarmodifiers'] = 'Modifiers:';
+$labels['setvarmodifiers'] = 'Modifikator:';
$labels['varlower'] = 'med små bokstavar';
$labels['varupper'] = 'med store bokstavar';
$labels['varlowerfirst'] = 'med liten forbokstav';
@@ -107,9 +110,9 @@ $labels['varquotewildcard'] = 'quote special characters';
$labels['varlength'] = 'lengde';
$labels['notify'] = 'Send varsel';
$labels['notifyaddress'] = 'Til e-postadresse:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
+$labels['notifybody'] = 'Varseltekst:';
+$labels['notifysubject'] = 'Varselemne:';
+$labels['notifyfrom'] = 'Varselavsendar:';
$labels['notifyimportance'] = 'Betyding:';
$labels['notifyimportancelow'] = 'låg';
$labels['notifyimportancenormal'] = 'normal';
diff --git a/plugins/managesieve/localization/pl_PL.inc b/plugins/managesieve/localization/pl_PL.inc
index 799f0fb54..9a6b70d8a 100644
--- a/plugins/managesieve/localization/pl_PL.inc
+++ b/plugins/managesieve/localization/pl_PL.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Dodaj';
$labels['del'] = 'Usuń';
$labels['sender'] = 'Nadawca';
$labels['recipient'] = 'Odbiorca';
-$labels['vacationaddr'] = 'Dodatkowy/e adres(y) e-mail:';
+$labels['vacationaddresses'] = 'Lista dodatkowych adresów odbiorców (oddzielonych przecinkami):';
$labels['vacationdays'] = 'Częstotliwość wysyłania wiadomości (w dniach):';
$labels['vacationinterval'] = 'Jak często wysyłać wiadomości:';
$labels['days'] = 'dni';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'ilość jest równa lub większa od';
$labels['countislessthan'] = 'ilość jest mniejsza od';
$labels['countislessthanequal'] = 'ilość jest równa lub mniejsza od';
$labels['countequals'] = 'ilość jest równa';
-$labels['countnotequals'] = 'ilość nie jest równa';
+$labels['countnotequals'] = 'ilość jest różna od';
$labels['valueisgreaterthan'] = 'wartość jest większa od';
$labels['valueisgreaterthanequal'] = 'wartość jest równa lub większa od';
$labels['valueislessthan'] = 'wartość jest mniejsza od';
$labels['valueislessthanequal'] = 'wartość jest równa lub mniejsza od';
$labels['valueequals'] = 'wartość jest równa';
-$labels['valuenotequals'] = 'wartość nie jest równa';
+$labels['valuenotequals'] = 'wartość jest różna od';
$labels['setflags'] = 'Ustaw flagi wiadomości';
$labels['addflags'] = 'Dodaj flagi do wiadomości';
$labels['removeflags'] = 'Usuń flagi wiadomości';
@@ -121,22 +121,6 @@ $labels['filtercreate'] = 'Utwórz filtr';
$labels['usedata'] = 'Użyj następujących danych do utworzenia filtra:';
$labels['nextstep'] = 'Następny krok';
$labels['...'] = '...';
-$labels['currdate'] = 'Bieżąca data';
-$labels['datetest'] = 'Data';
-$labels['dateheader'] = 'nagłówek:';
-$labels['year'] = 'rok';
-$labels['month'] = 'miesiąc';
-$labels['day'] = 'dzień';
-$labels['date'] = 'data (rrrr-mm-dd)';
-$labels['julian'] = 'data (kalendarz juliański)';
-$labels['hour'] = 'godzina';
-$labels['minute'] = 'minuta';
-$labels['second'] = 'sekunda';
-$labels['time'] = 'czas (gg:mm:ss)';
-$labels['iso8601'] = 'data (ISO8601)';
-$labels['std11'] = 'data (RFC2822)';
-$labels['zone'] = 'Strefa czasowa';
-$labels['weekday'] = 'dzień tygodnia (0-6)';
$labels['advancedopts'] = 'Zaawansowane opcje';
$labels['body'] = 'Treść';
$labels['address'] = 'adres';
@@ -156,8 +140,6 @@ $labels['default'] = 'domyślny';
$labels['octet'] = 'dokładny (octet)';
$labels['asciicasemap'] = 'nierozróżniający wielkości liter (ascii-casemap)';
$labels['asciinumeric'] = 'numeryczny (ascii-numeric)';
-$labels['index'] = 'indeks:';
-$labels['indexlast'] = 'wstecz';
$messages = array();
$messages['filterunknownerror'] = 'Nieznany błąd serwera.';
@@ -191,6 +173,5 @@ $messages['nametoolong'] = 'Zbyt długa nazwa.';
$messages['namereserved'] = 'Nazwa zarezerwowana.';
$messages['setexist'] = 'Zbiór już istnieje.';
$messages['nodata'] = 'Należy wybrać co najmniej jedną pozycję!';
-$messages['invaliddateformat'] = 'Nieprawidłowy format daty lub fragmentu daty';
?>
diff --git a/plugins/managesieve/localization/pt_BR.inc b/plugins/managesieve/localization/pt_BR.inc
index cd96c49ca..941119335 100644
--- a/plugins/managesieve/localization/pt_BR.inc
+++ b/plugins/managesieve/localization/pt_BR.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Adicionar';
$labels['del'] = 'Excluir';
$labels['sender'] = 'Remetente';
$labels['recipient'] = 'Destinatário';
-$labels['vacationaddr'] = 'Meus endereços de e-mail adicionais:';
+$labels['vacationaddresses'] = 'Lista adicional de e-mails destinatários (separado por vírgula):';
$labels['vacationdays'] = 'Enviar mensagens com que frequência (em dias):';
$labels['vacationinterval'] = 'Como geralmente enviam mensagens:';
$labels['days'] = 'dias';
@@ -121,22 +121,6 @@ $labels['filtercreate'] = 'Criar filtro';
$labels['usedata'] = 'Usar os seguintes dados no filtro:';
$labels['nextstep'] = 'Próximo Passo';
$labels['...'] = '...';
-$labels['currdate'] = 'Data atual';
-$labels['datetest'] = 'Data';
-$labels['dateheader'] = 'cabeçalho:';
-$labels['year'] = 'ano';
-$labels['month'] = 'mês';
-$labels['day'] = 'dia';
-$labels['date'] = 'data (aaaa-mm-dd)';
-$labels['julian'] = 'data (calendário juliano)';
-$labels['hour'] = 'hora';
-$labels['minute'] = 'minuto';
-$labels['second'] = 'segundo';
-$labels['time'] = 'hora (hh:mm:ss)';
-$labels['iso8601'] = 'data (ISO8601)';
-$labels['std11'] = 'data (RFC2822)';
-$labels['zone'] = 'fuso horário';
-$labels['weekday'] = 'dia da semana (0-6)';
$labels['advancedopts'] = 'Opções avançadas';
$labels['body'] = 'Corpo';
$labels['address'] = 'endereço';
@@ -156,8 +140,6 @@ $labels['default'] = 'padrão';
$labels['octet'] = 'estrito (octeto)';
$labels['asciicasemap'] = 'caso insensível (mapa de caracteres ascii)';
$labels['asciinumeric'] = 'numérico (ascii-numeric)';
-$labels['index'] = 'índice:';
-$labels['indexlast'] = 'retroceder';
$messages = array();
$messages['filterunknownerror'] = 'Erro desconhecido de servidor';
@@ -191,6 +173,5 @@ $messages['nametoolong'] = 'Nome muito longo.';
$messages['namereserved'] = 'Nome reservado.';
$messages['setexist'] = 'Conjunto já existe.';
$messages['nodata'] = 'Pelo menos uma posição precisa ser selecionada!';
-$messages['invaliddateformat'] = 'Data inválida';
?>
diff --git a/plugins/managesieve/localization/pt_PT.inc b/plugins/managesieve/localization/pt_PT.inc
index f51e8bf5e..bfb3f296a 100644
--- a/plugins/managesieve/localization/pt_PT.inc
+++ b/plugins/managesieve/localization/pt_PT.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Adicionar';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remetente';
$labels['recipient'] = 'Destinatário';
-$labels['vacationaddr'] = 'Lista adicional de destinatários de e-mails:';
+$labels['vacationaddresses'] = 'Lista adicional de destinatários de e-mails (separados por vírgula):';
$labels['vacationdays'] = 'Enviar mensagens com que frequência (em dias):';
$labels['vacationinterval'] = 'Com que frequência envia mensagens:';
$labels['days'] = 'dias';
diff --git a/plugins/managesieve/localization/ro_RO.inc b/plugins/managesieve/localization/ro_RO.inc
index 8d6e9c96f..5eb7186dd 100644
--- a/plugins/managesieve/localization/ro_RO.inc
+++ b/plugins/managesieve/localization/ro_RO.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Adaugă';
$labels['del'] = 'Șterge';
$labels['sender'] = 'Expeditor';
$labels['recipient'] = 'Destinatar';
-$labels['vacationaddr'] = 'Adresele mele de e-mail adiționale:';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'Cât de des să trimit mesajele (în zile):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Cât de des să trimit mesaje:';
+$labels['days'] = 'zile';
+$labels['seconds'] = 'secunde';
$labels['vacationreason'] = 'Corpul mesajului (motivul vacanţei):';
$labels['vacationsubject'] = 'Subiectul mesajului:';
$labels['rulestop'] = 'Nu mai evalua reguli';
diff --git a/plugins/managesieve/localization/ru_RU.inc b/plugins/managesieve/localization/ru_RU.inc
index f922bcf22..fb3f113c3 100644
--- a/plugins/managesieve/localization/ru_RU.inc
+++ b/plugins/managesieve/localization/ru_RU.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Добавить';
$labels['del'] = 'Удалить';
$labels['sender'] = 'Отправитель';
$labels['recipient'] = 'Получатель';
-$labels['vacationaddr'] = 'Мои дополнительные адреса:';
+$labels['vacationaddresses'] = 'Список моих дополнительных адресов (разделённых запятыми):';
$labels['vacationdays'] = 'Как часто отправлять сообщения (в днях):';
$labels['vacationinterval'] = 'Как часто отправлять сообщения:';
$labels['days'] = 'дней';
@@ -121,22 +121,6 @@ $labels['filtercreate'] = 'Создать фильтр';
$labels['usedata'] = 'Использовать следующие данные в фильтре:';
$labels['nextstep'] = 'Далее';
$labels['...'] = '...';
-$labels['currdate'] = 'Текущая дата';
-$labels['datetest'] = 'Дата';
-$labels['dateheader'] = 'заголовок:';
-$labels['year'] = 'год';
-$labels['month'] = 'месяц';
-$labels['day'] = 'день';
-$labels['date'] = 'дата (гггг-мм-дд)';
-$labels['julian'] = 'дата (юлианская)';
-$labels['hour'] = 'час';
-$labels['minute'] = 'минута';
-$labels['second'] = 'секунда';
-$labels['time'] = 'время (чч:мм:сс)';
-$labels['iso8601'] = 'дата (ISO8601)';
-$labels['std11'] = 'дата (RFC2822)';
-$labels['zone'] = 'часовой пояс';
-$labels['weekday'] = 'день недели (0-6)';
$labels['advancedopts'] = 'Дополнительные параметры';
$labels['body'] = 'Тело письма';
$labels['address'] = 'адрес';
@@ -156,8 +140,6 @@ $labels['default'] = 'по умолчанию';
$labels['octet'] = 'Строгий (octet)';
$labels['asciicasemap'] = 'Регистронезависимый (ascii-casemap)';
$labels['asciinumeric'] = 'Числовой (ascii-numeric)';
-$labels['index'] = 'индекс:';
-$labels['indexlast'] = 'наоборот';
$messages = array();
$messages['filterunknownerror'] = 'Неизвестная ошибка сервера';
@@ -191,6 +173,5 @@ $messages['nametoolong'] = 'Невозможно создать набор фи
$messages['namereserved'] = 'Зарезервированное имя.';
$messages['setexist'] = 'Набор уже существует.';
$messages['nodata'] = 'Нужно выбрать хотя бы одну позицию!';
-$messages['invaliddateformat'] = 'Неверная дата или формат части даты';
?>
diff --git a/plugins/managesieve/localization/si_LK.inc b/plugins/managesieve/localization/si_LK.inc
index 378fcf15d..afc2e3851 100644
--- a/plugins/managesieve/localization/si_LK.inc
+++ b/plugins/managesieve/localization/si_LK.inc
@@ -55,6 +55,7 @@ $labels['add'] = 'එක් කරන්න';
$labels['del'] = 'මකන්න';
$labels['sender'] = 'යවන්නා';
$labels['recipient'] = 'ලබන්නා';
+$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/sk_SK.inc b/plugins/managesieve/localization/sk_SK.inc
index 9bfb2ef8f..f336cf2c5 100644
--- a/plugins/managesieve/localization/sk_SK.inc
+++ b/plugins/managesieve/localization/sk_SK.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Pridaj';
$labels['del'] = 'Zmaž';
$labels['sender'] = 'Odosielateľ';
$labels['recipient'] = 'Adresát';
-$labels['vacationaddr'] = 'Dodatoční príjemcovia správy:';
+$labels['vacationaddresses'] = 'Dodatoční príjemcovia správy (oddelení čiarkami):';
$labels['vacationdays'] = 'Počet dní medzi odoslaním správy:';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/sl_SI.inc b/plugins/managesieve/localization/sl_SI.inc
index aa82078f1..d9da8ab60 100644
--- a/plugins/managesieve/localization/sl_SI.inc
+++ b/plugins/managesieve/localization/sl_SI.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Dodaj';
$labels['del'] = 'Izbriši';
$labels['sender'] = 'Pošiljatelj';
$labels['recipient'] = 'Prejemnik';
-$labels['vacationaddr'] = 'Moji dodatni e-naslovi';
+$labels['vacationaddresses'] = 'Dodaten seznam naslovov prejemnikov (ločenih z vejico):';
$labels['vacationdays'] = 'Kako pogosto naj bodo sporočila poslana (v dnevih):';
$labels['vacationinterval'] = 'Sporočila pošlji na:';
$labels['days'] = 'dni';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'seštevek je večji ali enak';
$labels['countislessthan'] = 'seštevek je manjši od';
$labels['countislessthanequal'] = 'seštevel je manjši ali enak';
$labels['countequals'] = 'seštevek je enak';
-$labels['countnotequals'] = 'vsota ne ustreza';
+$labels['countnotequals'] = 'seštevek ni enak';
$labels['valueisgreaterthan'] = 'vrednost je večja od';
$labels['valueisgreaterthanequal'] = 'vrednost je večja ali enaka';
$labels['valueislessthan'] = 'vrednost je manjša od';
$labels['valueislessthanequal'] = 'vrednost je manjša ali enaka';
$labels['valueequals'] = 'vrednost je enaka';
-$labels['valuenotequals'] = 'vrednost ni enaka';
+$labels['valuenotequals'] = 'vrednost je neenaka';
$labels['setflags'] = 'Označi sporočilo';
$labels['addflags'] = 'Označi sporočilo';
$labels['removeflags'] = 'Odstrani zaznamke s sporočil';
@@ -121,22 +121,6 @@ $labels['filtercreate'] = 'Ustvari filter';
$labels['usedata'] = 'Pri stvarjanju filtra uporabi naslednje podatke';
$labels['nextstep'] = 'Naslednji korak';
$labels['...'] = '...';
-$labels['currdate'] = 'Današnji datum';
-$labels['datetest'] = 'Datum';
-$labels['dateheader'] = 'glava:';
-$labels['year'] = 'leto';
-$labels['month'] = 'mesec';
-$labels['day'] = 'dan';
-$labels['date'] = 'datum(yyyy-mm-dd)';
-$labels['julian'] = 'datum (julijanski)';
-$labels['hour'] = 'ura';
-$labels['minute'] = 'minuta';
-$labels['second'] = 'sekunda';
-$labels['time'] = 'čas';
-$labels['iso8601'] = 'datum (ISO8601)';
-$labels['std11'] = 'datum (RFC2822)';
-$labels['zone'] = 'časovni pas';
-$labels['weekday'] = 'dan v tednu (0-6)';
$labels['advancedopts'] = 'Dodatne možnosti';
$labels['body'] = 'Vsebina';
$labels['address'] = 'naslov';
@@ -156,8 +140,6 @@ $labels['default'] = 'privzeto';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'ni občutljiv na velike/male črke (ascii-casemap)';
$labels['asciinumeric'] = 'numerično (ascii-numeric)';
-$labels['index'] = 'indeks:';
-$labels['indexlast'] = 'obraten vrstni red';
$messages = array();
$messages['filterunknownerror'] = 'Prišlo je do neznane napake.';
@@ -191,6 +173,5 @@ $messages['nametoolong'] = 'Ime je predolgo.';
$messages['namereserved'] = 'Rezervirano ime.';
$messages['setexist'] = 'Nastavitev filtra že obstaja.';
$messages['nodata'] = 'Izbrana mora biti vsaj ena nastavitev!';
-$messages['invaliddateformat'] = 'Neveljaven datum ali oblika zapisa datuma';
?>
diff --git a/plugins/managesieve/localization/sv_SE.inc b/plugins/managesieve/localization/sv_SE.inc
index f2aeddd9f..49d5b1222 100644
--- a/plugins/managesieve/localization/sv_SE.inc
+++ b/plugins/managesieve/localization/sv_SE.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Lägg till';
$labels['del'] = 'Ta bort';
$labels['sender'] = 'Avsändare';
$labels['recipient'] = 'Mottagare';
-$labels['vacationaddr'] = 'Ytterligare mottagaradresser:';
+$labels['vacationaddresses'] = 'Ytterligare mottagaradresser (avdelade med kommatecken)';
$labels['vacationdays'] = 'Antal dagar mellan auto-svar:';
$labels['vacationinterval'] = 'Tid mellan auto-svar:';
$labels['days'] = 'Dagar';
diff --git a/plugins/managesieve/localization/th_TH.inc b/plugins/managesieve/localization/th_TH.inc
new file mode 100644
index 000000000..c2d041cfe
--- /dev/null
+++ b/plugins/managesieve/localization/th_TH.inc
@@ -0,0 +1,45 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/managesieve/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Managesieve 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-managesieve/
+*/
+$labels['filters'] = 'ตัวกรองข้อมูล';
+$labels['filtername'] = 'ชื่อตัวกรองข้อมูล';
+$labels['newfilter'] = 'สร้างตัวกรองข้อมูลใหม่';
+$labels['filteradd'] = 'เพิ่มตัวกรองข้อมูล';
+$labels['filterdel'] = 'ลบตัวกรองข้อมูล';
+$labels['moveup'] = 'เลื่อนขึ้น';
+$labels['movedown'] = 'เลื่อนลง';
+$labels['filterany'] = 'ข้อความทั้งหมด';
+$labels['filtercontains'] = 'ที่มีคำว่า';
+$labels['filternotcontains'] = 'ไม่มีคำว่า';
+$labels['filteris'] = 'ที่มีค่าเท่ากับ';
+$labels['filterisnot'] = 'ที่มีค่าไม่เท่ากับ';
+$labels['addrule'] = 'เพิ่มกฏ';
+$labels['delrule'] = 'ลบกฏ';
+$labels['messagemoveto'] = 'ย้ายข้อความไปที่';
+$labels['messageredirect'] = 'เปลียนเส้นทางข้อความไปที่';
+$labels['messagecopyto'] = 'คัดลอกข้อความไปที่';
+$labels['messagesendcopy'] = 'ส่งข้อความคัดลอกไปที่';
+$labels['messagedelete'] = 'ลบข้อความ';
+$labels['messagediscard'] = 'ยกเลิกข้อความ';
+$labels['messagesrules'] = 'สำหรับอีเมลขาเข้า:';
+$labels['add'] = 'เพิ่ม';
+$labels['del'] = 'ลบ';
+$labels['sender'] = 'ผู้ส่ง';
+$labels['recipient'] = 'ผู้รับ';
+$labels['vacationsubject'] = 'หัวเรื่องข้อความ:';
+$labels['enable'] = 'เปิดใช้งาน/ปิดใช้งาน';
+?>
diff --git a/plugins/managesieve/localization/tr_TR.inc b/plugins/managesieve/localization/tr_TR.inc
index 19bbb2e8e..c36869d29 100644
--- a/plugins/managesieve/localization/tr_TR.inc
+++ b/plugins/managesieve/localization/tr_TR.inc
@@ -55,8 +55,8 @@ $labels['add'] = 'Ekle';
$labels['del'] = 'Sil';
$labels['sender'] = 'Gönderici';
$labels['recipient'] = 'Alıcı';
-$labels['vacationaddr'] = 'İlave e-posta adreslerim:';
-$labels['vacationdays'] = 'Ne sıklıkla mesajlar gönderilir(gün):';
+$labels['vacationaddresses'] = 'İlave e-posta adreslerim(virgül ile ayrılmış)';
+$labels['vacationdays'] = 'Ne sıklıkla mesajlar gönderilir(gün)';
$labels['vacationinterval'] = 'Ne kadar sıklıkla mesaj gönderirsiniz:';
$labels['days'] = 'günler';
$labels['seconds'] = 'saniyeler';
@@ -165,8 +165,8 @@ $messages['setcreateerror'] = 'Filtre setleri oluşturulamadı. Sunucuda hata ol
$messages['setcreated'] = 'Filtre setleri başarıyla oluşturuldu.';
$messages['activateerror'] = 'Seçilen filtre(ler) etkinleştirilemedi. Sunucuda hata oluştu.';
$messages['deactivateerror'] = 'Seçilen filtre(ler) pasifleştirilemedi. Sunucuda hata oluştu.';
-$messages['deactivated'] = 'Filtre(ler) başarıyla iptal edildi.';
-$messages['activated'] = 'Filtre(ler) başarıyla etkinleştirildi.';
+$messages['deactivated'] = 'Filtre(ler) başarıyla etkinleştirildi.';
+$messages['activated'] = 'Filtre(ler) başarıyla iptal edildi.';
$messages['moved'] = 'Filtre başarıyla taşındı.';
$messages['moveerror'] = 'Seçilen filtre(ler) taşınamadı. Sunucuda hata oluştu.';
$messages['nametoolong'] = 'İsim çok uzun.';
diff --git a/plugins/managesieve/localization/uk_UA.inc b/plugins/managesieve/localization/uk_UA.inc
index 57cab9ea5..41623df35 100644
--- a/plugins/managesieve/localization/uk_UA.inc
+++ b/plugins/managesieve/localization/uk_UA.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Додати';
$labels['del'] = 'Видалити';
$labels['sender'] = 'Відправник';
$labels['recipient'] = 'Отримувач';
-$labels['vacationaddr'] = 'Додатковий список адрес отримувачів:';
+$labels['vacationaddresses'] = 'Додатковий список адрес отримувачів (розділених комою)';
$labels['vacationdays'] = 'Як часто повторювати (у днях):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/vi_VN.inc b/plugins/managesieve/localization/vi_VN.inc
index 6e65cccf5..0a4ce6e82 100644
--- a/plugins/managesieve/localization/vi_VN.inc
+++ b/plugins/managesieve/localization/vi_VN.inc
@@ -55,8 +55,11 @@ $labels['add'] = 'Thêm';
$labels['del'] = 'Xoá';
$labels['sender'] = 'Người gửi';
$labels['recipient'] = 'Người nhận';
-$labels['vacationaddr'] = 'Địa chỉ email bổ sung của tôi';
+$labels['vacationaddresses'] = 'Địa chỉ email bổ sung của tôi ( phân cách bằng dấu phẩy)';
$labels['vacationdays'] = 'Số lần gửi thư (trong ngày)';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
$labels['vacationreason'] = 'Nội dung chính';
$labels['vacationsubject'] = 'Tiêu đề thư';
$labels['rulestop'] = 'Ngừng đánh giá qui luật';
@@ -95,17 +98,17 @@ $labels['flagdeleted'] = 'Đã được xóa';
$labels['flaganswered'] = 'Đã trả lời';
$labels['flagflagged'] = 'Đã đánh dấu';
$labels['flagdraft'] = 'Nháp';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
+$labels['setvariable'] = 'Đặt biến';
+$labels['setvarname'] = 'Tên biến:';
+$labels['setvarvalue'] = 'Giá trị biến:';
+$labels['setvarmodifiers'] = 'Bộ chia:';
$labels['varlower'] = 'viết thường';
$labels['varupper'] = 'viết hoa';
$labels['varlowerfirst'] = 'chữ cái đầu viết thường';
$labels['varupperfirst'] = 'chữ cái đầu viết hoa';
-$labels['varquotewildcard'] = 'quote special characters';
+$labels['varquotewildcard'] = 'trích dẫn ký tự đặc biệt';
$labels['varlength'] = 'độ dài';
-$labels['notify'] = 'Send notification';
+$labels['notify'] = 'Gửi thông báo';
$labels['notifyaddress'] = 'Gửi đến địa chỉ email:';
$labels['notifybody'] = 'Notification body:';
$labels['notifysubject'] = 'Notification subject:';
diff --git a/plugins/managesieve/localization/zh_CN.inc b/plugins/managesieve/localization/zh_CN.inc
index 106fb40fc..79b705c54 100644
--- a/plugins/managesieve/localization/zh_CN.inc
+++ b/plugins/managesieve/localization/zh_CN.inc
@@ -55,7 +55,7 @@ $labels['add'] = '添加';
$labels['del'] = '删除';
$labels['sender'] = '发件人';
$labels['recipient'] = '收件人';
-$labels['vacationaddr'] = '收件人地址的附加名单';
+$labels['vacationaddresses'] = '收件人地址的附加名单(以半角逗号分隔)';
$labels['vacationdays'] = '发送邮件频率(单位:天):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/zh_TW.inc b/plugins/managesieve/localization/zh_TW.inc
index 047ebcccc..3f3fc1313 100644
--- a/plugins/managesieve/localization/zh_TW.inc
+++ b/plugins/managesieve/localization/zh_TW.inc
@@ -55,7 +55,7 @@ $labels['add'] = '新增';
$labels['del'] = '刪除';
$labels['sender'] = '寄件者';
$labels['recipient'] = '收件者';
-$labels['vacationaddr'] = '其他收件者:';
+$labels['vacationaddresses'] = '其他收件者(用半形逗號隔開):';
$labels['vacationdays'] = '多久回覆一次(單位:天):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js
index 156bce6f0..035ed7bec 100644
--- a/plugins/managesieve/managesieve.js
+++ b/plugins/managesieve/managesieve.js
@@ -55,11 +55,6 @@ if (window.rcmail) {
}
$('input[type="text"]:first', rcmail.gui_objects.sieveform).focus();
-
- // initialize smart list inputs
- $('textarea[data-type="list"]', rcmail.gui_objects.sieveform).each(function() {
- smart_field_init(this);
- });
}
else {
rcmail.enable_command('plugin.managesieve-add', 'plugin.managesieve-setadd', !rcmail.env.sieveconnerror);
@@ -474,11 +469,6 @@ rcube_webmail.prototype.managesieve_rulefill = function(content, id, after)
row.className = 'rulerow';
row.innerHTML = content;
- // initialize smart list inputs
- $('textarea[data-type="list"]', row).each(function() {
- smart_field_init(this);
- });
-
this.managesieve_formbuttons(div);
}
};
@@ -575,45 +565,40 @@ function rule_header_select(id)
var obj = document.getElementById('header' + id),
size = document.getElementById('rule_size' + id),
op = document.getElementById('rule_op' + id),
- header = document.getElementById('custom_header' + id + '_list'),
+ target = document.getElementById('rule_target' + id),
+ header = document.getElementById('custom_header' + id),
mod = document.getElementById('rule_mod' + id),
trans = document.getElementById('rule_trans' + id),
- comp = document.getElementById('rule_comp' + id),
- datepart = document.getElementById('rule_date_part' + id),
- dateheader = document.getElementById('rule_date_header_div' + id),
- h = obj.value;
+ comp = document.getElementById('rule_comp' + id);
- if (h == 'size') {
+ if (obj.value == 'size') {
size.style.display = 'inline';
- $.each([op, header, mod, trans, comp], function() { this.style.display = 'none'; });
+ op.style.display = 'none';
+ target.style.display = 'none';
+ header.style.display = 'none';
+ mod.style.display = 'none';
+ trans.style.display = 'none';
+ comp.style.display = 'none';
}
else {
- header.style.display = h != '...' ? 'none' : 'inline-block';
+ header.style.display = obj.value != '...' ? 'none' : 'inline';
size.style.display = 'none';
op.style.display = 'inline';
comp.style.display = '';
- mod.style.display = h == 'body' || h == 'currentdate' || h == 'date' ? 'none' : 'block';
- trans.style.display = h == 'body' ? 'block' : 'none';
+ rule_op_select(id);
+ mod.style.display = obj.value == 'body' ? 'none' : 'block';
+ trans.style.display = obj.value == 'body' ? 'block' : 'none';
}
- if (datepart)
- datepart.style.display = h == 'currentdate' || h == 'date' ? 'inline' : 'none';
- if (dateheader)
- dateheader.style.display = h == 'date' ? '' : 'none';
-
- rule_op_select(op, id, h);
- rule_mod_select(id, h);
- obj.style.width = h == '...' ? '40px' : '';
+ obj.style.width = obj.value == '...' ? '40px' : '';
};
-function rule_op_select(obj, id, header)
+function rule_op_select(id)
{
- var target = document.getElementById('rule_target' + id + '_list');
+ var obj = document.getElementById('rule_op' + id),
+ target = document.getElementById('rule_target' + id);
- if (!header)
- header = document.getElementById('header' + id).value;
-
- target.style.display = obj.value == 'exists' || obj.value == 'notexists' || header == 'size' ? 'none' : 'inline-block';
+ target.style.display = obj.value == 'exists' || obj.value == 'notexists' ? 'none' : 'inline';
};
function rule_trans_select(id)
@@ -624,19 +609,12 @@ function rule_trans_select(id)
target.style.display = obj.value != 'content' ? 'none' : 'inline';
};
-function rule_mod_select(id, header)
+function rule_mod_select(id)
{
var obj = document.getElementById('rule_mod_op' + id),
- target = document.getElementById('rule_mod_type' + id),
- index = document.getElementById('rule_index_div' + id);
-
- if (!header)
- header = document.getElementById('header' + id).value;
+ target = document.getElementById('rule_mod_type' + id);
target.style.display = obj.value != 'address' && obj.value != 'envelope' ? 'none' : 'inline';
-
- if (index)
- index.style.display = header != 'body' && header != 'currentdate' && header != 'size' && obj.value != 'envelope' ? '' : 'none';
};
function rule_join_radio(value)
@@ -661,7 +639,7 @@ function rule_adv_switch(id, elem)
function action_type_select(id)
{
var obj = document.getElementById('action_type' + id),
- v = obj.value, enabled = {},
+ enabled = {},
elems = {
mailbox: document.getElementById('action_mailbox' + id),
target: document.getElementById('action_target' + id),
@@ -672,25 +650,25 @@ function action_type_select(id)
notify: document.getElementById('action_notify' + id)
};
- if (v == 'fileinto' || v == 'fileinto_copy') {
+ if (obj.value == 'fileinto' || obj.value == 'fileinto_copy') {
enabled.mailbox = 1;
}
- else if (v == 'redirect' || v == 'redirect_copy') {
+ else if (obj.value == 'redirect' || obj.value == 'redirect_copy') {
enabled.target = 1;
}
- else if (v.match(/^reject|ereject$/)) {
+ else if (obj.value.match(/^reject|ereject$/)) {
enabled.target_area = 1;
}
- else if (v.match(/^(add|set|remove)flag$/)) {
+ else if (obj.value.match(/^(add|set|remove)flag$/)) {
enabled.flags = 1;
}
- else if (v == 'vacation') {
+ else if (obj.value == 'vacation') {
enabled.vacation = 1;
}
- else if (v == 'set') {
+ else if (obj.value == 'set') {
enabled.set = 1;
}
- else if (v == 'notify') {
+ else if (obj.value == 'notify') {
enabled.notify = 1;
}
@@ -699,72 +677,6 @@ function action_type_select(id)
}
};
-// Inititalizes smart list input
-function smart_field_init(field)
-{
- var id = field.id + '_list',
- area = $('<span class="listarea"></span>'),
- list = field.value ? field.value.split("\n") : [''];
-
- if ($('#'+id).length)
- return;
-
- // add input rows
- $.each(list, function(i, v) {
- area.append(smart_field_row(v, field.name, i, $(field).data('size')));
- });
-
- area.attr('id', id);
- field = $(field);
-
- if (field.attr('disabled'))
- area.hide();
-
- field.after(area);
-
- if (field.hasClass('error')) {
- area.addClass('error');
- rcmail.managesieve_tip_register([[id, field.data('tip')]]);
- }
-};
-
-function smart_field_row(value, name, idx, size)
-{
- // build row element content
- var input, content = '<span class="listelement">'
- + '<span class="reset"></span><input type="text"></span>',
- elem = $(content),
- attrs = {value: value, name: name + '[]'};
-
- if (size)
- attrs.size = size;
-
- input = $('input', elem).attr(attrs).keydown(function(e) {
- var input = $(this);
- // element creation event (on Enter)
- if (e.which == 13) {
- var name = input.attr('name').replace(/\[\]$/, ''),
- dt = (new Date()).getTime(),
- elem = smart_field_row('', name, dt, size);
-
- input.parent().after(elem);
- $('input', elem).focus();
- }
- });
-
- // element deletion event
- $('span[class="reset"]', elem).click(function() {
- var span = $(this.parentNode);
-
- if (span.parent().children().length > 1)
- span.remove();
- else
- $('input', span).val('').focus();
- });
-
- return elem;
-}
-
// Register onmouse(leave/enter) events for tips on specified form element
rcube_webmail.prototype.managesieve_tip_register = function(tips)
{
@@ -773,26 +685,25 @@ rcube_webmail.prototype.managesieve_tip_register = function(tips)
for (var n in tips) {
$('#'+tips[n][0])
- .data('tip', tips[n][1])
- .bind('mouseenter', function(e) {
- var elem = $(this),
- offset = elem.offset(),
- left = offset.left,
- top = offset.top - 12,
- minwidth = elem.width();
-
- if (framed) {
- offset = $((rcmail.env.task == 'mail' ? '#sievefilterform > iframe' : '#filter-box'), parent.document).offset();
- top += offset.top;
- left += offset.left;
- }
-
- tip.html(elem.data('tip'));
- top -= tip.height();
-
- tip.css({left: left, top: top, minWidth: (minwidth-2) + 'px'}).show();
- })
- .bind('mouseleave', function(e) { tip.hide(); });
+ .bind('mouseenter', {str: tips[n][1]},
+ function(e) {
+ var offset = $(this).offset(),
+ left = offset.left,
+ top = offset.top - 12,
+ minwidth = $(this).width();
+
+ if (framed) {
+ offset = $((rcmail.env.task == 'mail' ? '#sievefilterform > iframe' : '#filter-box'), parent.document).offset();
+ top += offset.top;
+ left += offset.left;
+ }
+
+ tip.html(e.data.str)
+ top -= tip.height();
+
+ tip.css({left: left, top: top, minWidth: (minwidth-2) + 'px'}).show();
+ })
+ .bind('mouseleave', function(e) { tip.hide(); });
}
};
diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index 6970193c2..80face70a 100644
--- a/plugins/managesieve/managesieve.php
+++ b/plugins/managesieve/managesieve.php
@@ -12,28 +12,60 @@
*
* Configuration (see config.inc.php.dist)
*
- * Copyright (C) 2008-2013, The Roundcube Dev Team
- * Copyright (C) 2011-2013, Kolab Systems AG
+ * Copyright (C) 2008-2012, The Roundcube Dev Team
+ * Copyright (C) 2011-2012, 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 free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
*
* 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/.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
class managesieve extends rcube_plugin
{
public $task = 'mail|settings';
+
private $rc;
- private $engine;
+ private $sieve;
+ private $errors;
+ private $form;
+ private $tips = array();
+ private $script = array();
+ private $exts = array();
+ private $list;
+ private $active = array();
+ private $headers = array(
+ 'subject' => 'Subject',
+ 'from' => 'From',
+ 'to' => 'To',
+ );
+ private $addr_headers = array(
+ // Required
+ "from", "to", "cc", "bcc", "sender", "resent-from", "resent-to",
+ // Additional (RFC 822 / RFC 2822)
+ "reply-to", "resent-reply-to", "resent-sender", "resent-cc", "resent-bcc",
+ // Non-standard (RFC 2076, draft-palme-mailext-headers-08.txt)
+ "for-approval", "for-handling", "for-comment", "apparently-to", "errors-to",
+ "delivered-to", "return-receipt-to", "x-admin", "read-receipt-to",
+ "x-confirm-reading-to", "return-receipt-requested",
+ "registered-mail-reply-requested-by", "mail-followup-to", "mail-reply-to",
+ "abuse-reports-to", "x-complaints-to", "x-report-abuse-to",
+ // Undocumented
+ "x-beenthere",
+ );
+
+ const VERSION = '6.2';
+ const PROGNAME = 'Roundcube (Managesieve)';
+ const PORT = 4190;
+
function init()
{
@@ -60,11 +92,10 @@ class managesieve extends rcube_plugin
/**
* Initializes plugin's UI (localization, js script)
*/
- function init_ui()
+ private function init_ui()
{
- if ($this->ui_initialized) {
+ if ($this->ui_initialized)
return;
- }
// load localization
$this->add_texts('localization/', array('filters','managefilters'));
@@ -78,11 +109,6 @@ class managesieve extends rcube_plugin
*/
function mail_task_handler()
{
- // make sure we're not in ajax request
- if ($this->rc->output->type != 'html') {
- return;
- }
-
// use jQuery for popup window
$this->require_plugin('jqueryui');
@@ -154,18 +180,352 @@ class managesieve extends rcube_plugin
}
/**
- * Plugin action handler
+ * Loads configuration, initializes plugin (including sieve connection)
*/
+ function managesieve_start()
+ {
+ $this->load_config();
+
+ // register UI objects
+ $this->rc->output->add_handlers(array(
+ 'filterslist' => array($this, 'filters_list'),
+ 'filtersetslist' => array($this, 'filtersets_list'),
+ 'filterframe' => array($this, 'filter_frame'),
+ 'filterform' => array($this, 'filter_form'),
+ 'filtersetform' => array($this, 'filterset_form'),
+ ));
+
+ // Add include path for internal classes
+ $include_path = $this->home . '/lib' . PATH_SEPARATOR;
+ $include_path .= ini_get('include_path');
+ set_include_path($include_path);
+
+ // Get connection parameters
+ $host = $this->rc->config->get('managesieve_host', 'localhost');
+ $port = $this->rc->config->get('managesieve_port');
+ $tls = $this->rc->config->get('managesieve_usetls', false);
+
+ $host = rcube_parse_host($host);
+ $host = rcube_idn_to_ascii($host);
+
+ // remove tls:// prefix, set TLS flag
+ if (($host = preg_replace('|^tls://|i', '', $host, 1, $cnt)) && $cnt) {
+ $tls = true;
+ }
+
+ if (empty($port)) {
+ $port = getservbyname('sieve', 'tcp');
+ if (empty($port)) {
+ $port = self::PORT;
+ }
+ }
+
+ $plugin = $this->rc->plugins->exec_hook('managesieve_connect', array(
+ 'user' => $_SESSION['username'],
+ 'password' => $this->rc->decrypt($_SESSION['password']),
+ 'host' => $host,
+ 'port' => $port,
+ 'usetls' => $tls,
+ 'auth_type' => $this->rc->config->get('managesieve_auth_type'),
+ 'disabled' => $this->rc->config->get('managesieve_disabled_extensions'),
+ 'debug' => $this->rc->config->get('managesieve_debug', false),
+ 'auth_cid' => $this->rc->config->get('managesieve_auth_cid'),
+ 'auth_pw' => $this->rc->config->get('managesieve_auth_pw'),
+ ));
+
+ // try to connect to managesieve server and to fetch the script
+ $this->sieve = new rcube_sieve(
+ $plugin['user'],
+ $plugin['password'],
+ $plugin['host'],
+ $plugin['port'],
+ $plugin['auth_type'],
+ $plugin['usetls'],
+ $plugin['disabled'],
+ $plugin['debug'],
+ $plugin['auth_cid'],
+ $plugin['auth_pw']
+ );
+
+ if (!($error = $this->sieve->error())) {
+ // Get list of scripts
+ $list = $this->list_scripts();
+
+ if (!empty($_GET['_set']) || !empty($_POST['_set'])) {
+ $script_name = get_input_value('_set', RCUBE_INPUT_GPC, true);
+ }
+ else if (!empty($_SESSION['managesieve_current'])) {
+ $script_name = $_SESSION['managesieve_current'];
+ }
+ else {
+ // get (first) active script
+ if (!empty($this->active[0])) {
+ $script_name = $this->active[0];
+ }
+ else if ($list) {
+ $script_name = $list[0];
+ }
+ // create a new (initial) script
+ else {
+ // if script not exists build default script contents
+ $script_file = $this->rc->config->get('managesieve_default');
+ $script_name = $this->rc->config->get('managesieve_script_name');
+
+ if (empty($script_name))
+ $script_name = 'roundcube';
+
+ if ($script_file && is_readable($script_file))
+ $content = file_get_contents($script_file);
+
+ // add script and set it active
+ if ($this->sieve->save_script($script_name, $content)) {
+ $this->activate_script($script_name);
+ $this->list[] = $script_name;
+ }
+ }
+ }
+
+ if ($script_name) {
+ $this->sieve->load($script_name);
+ }
+
+ $error = $this->sieve->error();
+ }
+
+ // finally set script objects
+ if ($error) {
+ switch ($error) {
+ case SIEVE_ERROR_CONNECTION:
+ case SIEVE_ERROR_LOGIN:
+ $this->rc->output->show_message('managesieve.filterconnerror', 'error');
+ break;
+ default:
+ $this->rc->output->show_message('managesieve.filterunknownerror', 'error');
+ break;
+ }
+
+ raise_error(array('code' => 403, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Unable to connect to managesieve on $host:$port"), true, false);
+
+ // to disable 'Add filter' button set env variable
+ $this->rc->output->set_env('filterconnerror', true);
+ $this->script = array();
+ }
+ else {
+ $this->exts = $this->sieve->get_extensions();
+ $this->script = $this->sieve->script->as_array();
+ $this->rc->output->set_env('currentset', $this->sieve->current);
+ $_SESSION['managesieve_current'] = $this->sieve->current;
+ }
+
+ return $error;
+ }
+
function managesieve_actions()
{
$this->init_ui();
- $engine = $this->get_engine();
- $engine->actions();
+
+ $error = $this->managesieve_start();
+
+ // Handle user requests
+ if ($action = get_input_value('_act', RCUBE_INPUT_GPC)) {
+ $fid = (int) get_input_value('_fid', RCUBE_INPUT_POST);
+
+ if ($action == 'delete' && !$error) {
+ if (isset($this->script[$fid])) {
+ if ($this->sieve->script->delete_rule($fid))
+ $result = $this->save_script();
+
+ if ($result === true) {
+ $this->rc->output->show_message('managesieve.filterdeleted', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'del', array('id' => $fid));
+ } else {
+ $this->rc->output->show_message('managesieve.filterdeleteerror', 'error');
+ }
+ }
+ }
+ else if ($action == 'move' && !$error) {
+ if (isset($this->script[$fid])) {
+ $to = (int) get_input_value('_to', RCUBE_INPUT_POST);
+ $rule = $this->script[$fid];
+
+ // remove rule
+ unset($this->script[$fid]);
+ $this->script = array_values($this->script);
+
+ // add at target position
+ if ($to >= count($this->script)) {
+ $this->script[] = $rule;
+ }
+ else {
+ $script = array();
+ foreach ($this->script as $idx => $r) {
+ if ($idx == $to)
+ $script[] = $rule;
+ $script[] = $r;
+ }
+ $this->script = $script;
+ }
+
+ $this->sieve->script->content = $this->script;
+ $result = $this->save_script();
+
+ if ($result === true) {
+ $result = $this->list_rules();
+
+ $this->rc->output->show_message('managesieve.moved', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'list',
+ array('list' => $result, 'clear' => true, 'set' => $to));
+ } else {
+ $this->rc->output->show_message('managesieve.moveerror', 'error');
+ }
+ }
+ }
+ else if ($action == 'act' && !$error) {
+ if (isset($this->script[$fid])) {
+ $rule = $this->script[$fid];
+ $disabled = $rule['disabled'] ? true : false;
+ $rule['disabled'] = !$disabled;
+ $result = $this->sieve->script->update_rule($fid, $rule);
+
+ if ($result !== false)
+ $result = $this->save_script();
+
+ if ($result === true) {
+ if ($rule['disabled'])
+ $this->rc->output->show_message('managesieve.deactivated', 'confirmation');
+ else
+ $this->rc->output->show_message('managesieve.activated', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'update',
+ array('id' => $fid, 'disabled' => $rule['disabled']));
+ } else {
+ if ($rule['disabled'])
+ $this->rc->output->show_message('managesieve.deactivateerror', 'error');
+ else
+ $this->rc->output->show_message('managesieve.activateerror', 'error');
+ }
+ }
+ }
+ else if ($action == 'setact' && !$error) {
+ $script_name = get_input_value('_set', RCUBE_INPUT_GPC, true);
+ $result = $this->activate_script($script_name);
+ $kep14 = $this->rc->config->get('managesieve_kolab_master');
+
+ if ($result === true) {
+ $this->rc->output->set_env('active_sets', $this->active);
+ $this->rc->output->show_message('managesieve.setactivated', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'setact',
+ array('name' => $script_name, 'active' => true, 'all' => !$kep14));
+ } else {
+ $this->rc->output->show_message('managesieve.setactivateerror', 'error');
+ }
+ }
+ else if ($action == 'deact' && !$error) {
+ $script_name = get_input_value('_set', RCUBE_INPUT_GPC, true);
+ $result = $this->deactivate_script($script_name);
+
+ if ($result === true) {
+ $this->rc->output->set_env('active_sets', $this->active);
+ $this->rc->output->show_message('managesieve.setdeactivated', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'setact',
+ array('name' => $script_name, 'active' => false));
+ } else {
+ $this->rc->output->show_message('managesieve.setdeactivateerror', 'error');
+ }
+ }
+ else if ($action == 'setdel' && !$error) {
+ $script_name = get_input_value('_set', RCUBE_INPUT_GPC, true);
+ $result = $this->remove_script($script_name);
+
+ if ($result === true) {
+ $this->rc->output->show_message('managesieve.setdeleted', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'setdel',
+ array('name' => $script_name));
+ $this->rc->session->remove('managesieve_current');
+ } else {
+ $this->rc->output->show_message('managesieve.setdeleteerror', 'error');
+ }
+ }
+ else if ($action == 'setget') {
+ $script_name = get_input_value('_set', RCUBE_INPUT_GPC, true);
+ $script = $this->sieve->get_script($script_name);
+
+ if (PEAR::isError($script))
+ exit;
+
+ $browser = new rcube_browser;
+
+ // send download headers
+ header("Content-Type: application/octet-stream");
+ header("Content-Length: ".strlen($script));
+
+ if ($browser->ie)
+ header("Content-Type: application/force-download");
+ if ($browser->ie && $browser->ver < 7)
+ $filename = rawurlencode(abbreviate_string($script_name, 55));
+ else if ($browser->ie)
+ $filename = rawurlencode($script_name);
+ else
+ $filename = addcslashes($script_name, '\\"');
+
+ header("Content-Disposition: attachment; filename=\"$filename.txt\"");
+ echo $script;
+ exit;
+ }
+ else if ($action == 'list') {
+ $result = $this->list_rules();
+
+ $this->rc->output->command('managesieve_updatelist', 'list', array('list' => $result));
+ }
+ else if ($action == 'ruleadd') {
+ $rid = get_input_value('_rid', RCUBE_INPUT_GPC);
+ $id = $this->genid();
+ $content = $this->rule_div($fid, $id, false);
+
+ $this->rc->output->command('managesieve_rulefill', $content, $id, $rid);
+ }
+ else if ($action == 'actionadd') {
+ $aid = get_input_value('_aid', RCUBE_INPUT_GPC);
+ $id = $this->genid();
+ $content = $this->action_div($fid, $id, false);
+
+ $this->rc->output->command('managesieve_actionfill', $content, $id, $aid);
+ }
+
+ $this->rc->output->send();
+ }
+ else if ($this->rc->task == 'mail') {
+ // Initialize the form
+ $rules = get_input_value('r', RCUBE_INPUT_GET);
+ if (!empty($rules)) {
+ $i = 0;
+ foreach ($rules as $rule) {
+ list($header, $value) = explode(':', $rule, 2);
+ $tests[$i] = array(
+ 'type' => 'contains',
+ 'test' => 'header',
+ 'arg1' => $header,
+ 'arg2' => $value,
+ );
+ $i++;
+ }
+
+ $this->form = array(
+ 'join' => count($tests) > 1 ? 'allof' : 'anyof',
+ 'name' => '',
+ 'tests' => $tests,
+ 'actions' => array(
+ 0 => array('type' => 'fileinto'),
+ 1 => array('type' => 'stop'),
+ ),
+ );
+ }
+ }
+
+ $this->managesieve_send();
}
- /**
- * Forms save action handler
- */
function managesieve_save()
{
// load localization
@@ -176,26 +536,1515 @@ class managesieve extends rcube_plugin
$this->include_script('managesieve.js');
}
- $engine = $this->get_engine();
- $engine->save();
+ // Init plugin and handle managesieve connection
+ $error = $this->managesieve_start();
+
+ // get request size limits (#1488648)
+ $max_post = max(array(
+ ini_get('max_input_vars'),
+ ini_get('suhosin.request.max_vars'),
+ ini_get('suhosin.post.max_vars'),
+ ));
+ $max_depth = max(array(
+ ini_get('suhosin.request.max_array_depth'),
+ ini_get('suhosin.post.max_array_depth'),
+ ));
+
+ // check request size limit
+ if ($max_post && count($_POST, COUNT_RECURSIVE) >= $max_post) {
+ rcube::raise_error(array(
+ 'code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Request size limit exceeded (one of max_input_vars/suhosin.request.max_vars/suhosin.post.max_vars)"
+ ), true, false);
+ $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
+ }
+ // check request depth limits
+ else if ($max_depth && count($_POST['_header']) > $max_depth) {
+ rcube::raise_error(array(
+ 'code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Request size limit exceeded (one of suhosin.request.max_array_depth/suhosin.post.max_array_depth)"
+ ), true, false);
+ $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
+ }
+ // filters set add action
+ else if (!empty($_POST['_newset'])) {
+ $name = get_input_value('_name', RCUBE_INPUT_POST, true);
+ $copy = get_input_value('_copy', RCUBE_INPUT_POST, true);
+ $from = get_input_value('_from', RCUBE_INPUT_POST);
+ $exceptions = $this->rc->config->get('managesieve_filename_exceptions');
+ $kolab = $this->rc->config->get('managesieve_kolab_master');
+ $name_uc = mb_strtolower($name);
+ $list = $this->list_scripts();
+
+ if (!$name) {
+ $this->errors['name'] = $this->gettext('cannotbeempty');
+ }
+ else if (mb_strlen($name) > 128) {
+ $this->errors['name'] = $this->gettext('nametoolong');
+ }
+ else if (!empty($exceptions) && in_array($name, (array)$exceptions)) {
+ $this->errors['name'] = $this->gettext('namereserved');
+ }
+ else if (!empty($kolab) && in_array($name_uc, array('MASTER', 'USER', 'MANAGEMENT'))) {
+ $this->errors['name'] = $this->gettext('namereserved');
+ }
+ else if (in_array($name, $list)) {
+ $this->errors['name'] = $this->gettext('setexist');
+ }
+ else if ($from == 'file') {
+ // from file
+ if (is_uploaded_file($_FILES['_file']['tmp_name'])) {
+ $file = file_get_contents($_FILES['_file']['tmp_name']);
+ $file = preg_replace('/\r/', '', $file);
+ // for security don't save script directly
+ // check syntax before, like this...
+ $this->sieve->load_script($file);
+ if (!$this->save_script($name)) {
+ $this->errors['file'] = $this->gettext('setcreateerror');
+ }
+ }
+ else { // upload failed
+ $err = $_FILES['_file']['error'];
+
+ if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
+ $msg = rcube_label(array('name' => 'filesizeerror',
+ 'vars' => array('size' =>
+ show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
+ }
+ else {
+ $this->errors['file'] = $this->gettext('fileuploaderror');
+ }
+ }
+ }
+ else if (!$this->sieve->copy($name, $from == 'set' ? $copy : '')) {
+ $error = 'managesieve.setcreateerror';
+ }
+
+ if (!$error && empty($this->errors)) {
+ // Find position of the new script on the list
+ $list[] = $name;
+ asort($list, SORT_LOCALE_STRING);
+ $list = array_values($list);
+ $index = array_search($name, $list);
+
+ $this->rc->output->show_message('managesieve.setcreated', 'confirmation');
+ $this->rc->output->command('parent.managesieve_updatelist', 'setadd',
+ array('name' => $name, 'index' => $index));
+ } else if ($msg) {
+ $this->rc->output->command('display_message', $msg, 'error');
+ } else if ($error) {
+ $this->rc->output->show_message($error, 'error');
+ }
+ }
+ // filter add/edit action
+ else if (isset($_POST['_name'])) {
+ $name = trim(get_input_value('_name', RCUBE_INPUT_POST, true));
+ $fid = trim(get_input_value('_fid', RCUBE_INPUT_POST));
+ $join = trim(get_input_value('_join', RCUBE_INPUT_POST));
+
+ // and arrays
+ $headers = get_input_value('_header', RCUBE_INPUT_POST);
+ $cust_headers = get_input_value('_custom_header', RCUBE_INPUT_POST);
+ $ops = get_input_value('_rule_op', RCUBE_INPUT_POST);
+ $sizeops = get_input_value('_rule_size_op', RCUBE_INPUT_POST);
+ $sizeitems = get_input_value('_rule_size_item', RCUBE_INPUT_POST);
+ $sizetargets = get_input_value('_rule_size_target', RCUBE_INPUT_POST);
+ $targets = get_input_value('_rule_target', RCUBE_INPUT_POST, true);
+ $mods = get_input_value('_rule_mod', RCUBE_INPUT_POST);
+ $mod_types = get_input_value('_rule_mod_type', RCUBE_INPUT_POST);
+ $body_trans = get_input_value('_rule_trans', RCUBE_INPUT_POST);
+ $body_types = get_input_value('_rule_trans_type', RCUBE_INPUT_POST, true);
+ $comparators = get_input_value('_rule_comp', RCUBE_INPUT_POST);
+ $act_types = get_input_value('_action_type', RCUBE_INPUT_POST, true);
+ $mailboxes = get_input_value('_action_mailbox', RCUBE_INPUT_POST, true);
+ $act_targets = get_input_value('_action_target', RCUBE_INPUT_POST, true);
+ $area_targets = get_input_value('_action_target_area', RCUBE_INPUT_POST, true);
+ $reasons = get_input_value('_action_reason', RCUBE_INPUT_POST, true);
+ $addresses = get_input_value('_action_addresses', RCUBE_INPUT_POST, true);
+ $days = get_input_value('_action_days', RCUBE_INPUT_POST);
+ $subject = get_input_value('_action_subject', RCUBE_INPUT_POST, true);
+ $flags = get_input_value('_action_flags', RCUBE_INPUT_POST);
+ $varnames = get_input_value('_action_varname', RCUBE_INPUT_POST);
+ $varvalues = get_input_value('_action_varvalue', RCUBE_INPUT_POST);
+ $varmods = get_input_value('_action_varmods', RCUBE_INPUT_POST);
+ $notifyaddrs = get_input_value('_action_notifyaddress', RCUBE_INPUT_POST);
+ $notifybodies = get_input_value('_action_notifybody', RCUBE_INPUT_POST);
+ $notifymessages = get_input_value('_action_notifymessage', RCUBE_INPUT_POST);
+ $notifyfrom = get_input_value('_action_notifyfrom', RCUBE_INPUT_POST);
+ $notifyimp = get_input_value('_action_notifyimportance', RCUBE_INPUT_POST);
+
+ // we need a "hack" for radiobuttons
+ foreach ($sizeitems as $item)
+ $items[] = $item;
+
+ $this->form['disabled'] = $_POST['_disabled'] ? true : false;
+ $this->form['join'] = $join=='allof' ? true : false;
+ $this->form['name'] = $name;
+ $this->form['tests'] = array();
+ $this->form['actions'] = array();
+
+ if ($name == '')
+ $this->errors['name'] = $this->gettext('cannotbeempty');
+ else {
+ foreach($this->script as $idx => $rule)
+ if($rule['name'] == $name && $idx != $fid) {
+ $this->errors['name'] = $this->gettext('ruleexist');
+ break;
+ }
+ }
+
+ $i = 0;
+ // rules
+ if ($join == 'any') {
+ $this->form['tests'][0]['test'] = 'true';
+ }
+ else {
+ foreach ($headers as $idx => $header) {
+ $header = $this->strip_value($header);
+ $target = $this->strip_value($targets[$idx], true);
+ $operator = $this->strip_value($ops[$idx]);
+ $comparator = $this->strip_value($comparators[$idx]);
+
+ if ($header == 'size') {
+ $sizeop = $this->strip_value($sizeops[$idx]);
+ $sizeitem = $this->strip_value($items[$idx]);
+ $sizetarget = $this->strip_value($sizetargets[$idx]);
+
+ $this->form['tests'][$i]['test'] = 'size';
+ $this->form['tests'][$i]['type'] = $sizeop;
+ $this->form['tests'][$i]['arg'] = $sizetarget;
+
+ if ($sizetarget == '')
+ $this->errors['tests'][$i]['sizetarget'] = $this->gettext('cannotbeempty');
+ else if (!preg_match('/^[0-9]+(K|M|G)?$/i', $sizetarget.$sizeitem, $m)) {
+ $this->errors['tests'][$i]['sizetarget'] = $this->gettext('forbiddenchars');
+ $this->form['tests'][$i]['item'] = $sizeitem;
+ }
+ else
+ $this->form['tests'][$i]['arg'] .= $m[1];
+ }
+ else if ($header == 'body') {
+ $trans = $this->strip_value($body_trans[$idx]);
+ $trans_type = $this->strip_value($body_types[$idx], true);
+
+ if (preg_match('/^not/', $operator))
+ $this->form['tests'][$i]['not'] = true;
+ $type = preg_replace('/^not/', '', $operator);
+
+ if ($type == 'exists') {
+ $this->errors['tests'][$i]['op'] = true;
+ }
+
+ $this->form['tests'][$i]['test'] = 'body';
+ $this->form['tests'][$i]['type'] = $type;
+ $this->form['tests'][$i]['arg'] = $target;
+
+ if ($target == '' && $type != 'exists')
+ $this->errors['tests'][$i]['target'] = $this->gettext('cannotbeempty');
+ else if (preg_match('/^(value|count)-/', $type) && !preg_match('/[0-9]+/', $target))
+ $this->errors['tests'][$i]['target'] = $this->gettext('forbiddenchars');
+
+ $this->form['tests'][$i]['part'] = $trans;
+ if ($trans == 'content') {
+ $this->form['tests'][$i]['content'] = $trans_type;
+ }
+ }
+ else {
+ $cust_header = $headers = $this->strip_value($cust_headers[$idx]);
+ $mod = $this->strip_value($mods[$idx]);
+ $mod_type = $this->strip_value($mod_types[$idx]);
+
+ if (preg_match('/^not/', $operator))
+ $this->form['tests'][$i]['not'] = true;
+ $type = preg_replace('/^not/', '', $operator);
+
+ if ($header == '...') {
+ $headers = preg_split('/[\s,]+/', $cust_header, -1, PREG_SPLIT_NO_EMPTY);
+
+ if (!count($headers))
+ $this->errors['tests'][$i]['header'] = $this->gettext('cannotbeempty');
+ else {
+ foreach ($headers as $hr) {
+ // RFC2822: printable ASCII except colon
+ if (!preg_match('/^[\x21-\x39\x41-\x7E]+$/i', $hr)) {
+ $this->errors['tests'][$i]['header'] = $this->gettext('forbiddenchars');
+ }
+ }
+ }
+
+ if (empty($this->errors['tests'][$i]['header']))
+ $cust_header = (is_array($headers) && count($headers) == 1) ? $headers[0] : $headers;
+ }
+
+ if ($type == 'exists') {
+ $this->form['tests'][$i]['test'] = 'exists';
+ $this->form['tests'][$i]['arg'] = $header == '...' ? $cust_header : $header;
+ }
+ else {
+ $test = 'header';
+ $header = $header == '...' ? $cust_header : $header;
+
+ if ($mod == 'address' || $mod == 'envelope') {
+ $found = false;
+ if (empty($this->errors['tests'][$i]['header'])) {
+ foreach ((array)$header as $hdr) {
+ if (!in_array(strtolower(trim($hdr)), $this->addr_headers))
+ $found = true;
+ }
+ }
+ if (!$found)
+ $test = $mod;
+ }
+
+ $this->form['tests'][$i]['type'] = $type;
+ $this->form['tests'][$i]['test'] = $test;
+ $this->form['tests'][$i]['arg1'] = $header;
+ $this->form['tests'][$i]['arg2'] = $target;
+
+ if ($target == '')
+ $this->errors['tests'][$i]['target'] = $this->gettext('cannotbeempty');
+ else if (preg_match('/^(value|count)-/', $type) && !preg_match('/[0-9]+/', $target))
+ $this->errors['tests'][$i]['target'] = $this->gettext('forbiddenchars');
+
+ if ($mod) {
+ $this->form['tests'][$i]['part'] = $mod_type;
+ }
+ }
+ }
+
+ if ($header != 'size' && $comparator) {
+ if (preg_match('/^(value|count)/', $this->form['tests'][$i]['type']))
+ $comparator = 'i;ascii-numeric';
+
+ $this->form['tests'][$i]['comparator'] = $comparator;
+ }
+
+ $i++;
+ }
+ }
+
+ $i = 0;
+ // actions
+ foreach($act_types as $idx => $type) {
+ $type = $this->strip_value($type);
+ $target = $this->strip_value($act_targets[$idx]);
+
+ switch ($type) {
+
+ case 'fileinto':
+ case 'fileinto_copy':
+ $mailbox = $this->strip_value($mailboxes[$idx], false, false);
+ $this->form['actions'][$i]['target'] = $this->mod_mailbox($mailbox, 'in');
+ if ($type == 'fileinto_copy') {
+ $type = 'fileinto';
+ $this->form['actions'][$i]['copy'] = true;
+ }
+ break;
+
+ case 'reject':
+ case 'ereject':
+ $target = $this->strip_value($area_targets[$idx]);
+ $this->form['actions'][$i]['target'] = str_replace("\r\n", "\n", $target);
+
+ // if ($target == '')
+// $this->errors['actions'][$i]['targetarea'] = $this->gettext('cannotbeempty');
+ break;
+
+ case 'redirect':
+ case 'redirect_copy':
+ $this->form['actions'][$i]['target'] = $target;
+
+ if ($this->form['actions'][$i]['target'] == '')
+ $this->errors['actions'][$i]['target'] = $this->gettext('cannotbeempty');
+ else if (!check_email($this->form['actions'][$i]['target']))
+ $this->errors['actions'][$i]['target'] = $this->gettext('noemailwarning');
+
+ if ($type == 'redirect_copy') {
+ $type = 'redirect';
+ $this->form['actions'][$i]['copy'] = true;
+ }
+ break;
+
+ case 'addflag':
+ case 'setflag':
+ case 'removeflag':
+ $_target = array();
+ if (empty($flags[$idx])) {
+ $this->errors['actions'][$i]['target'] = $this->gettext('noflagset');
+ }
+ else {
+ foreach ($flags[$idx] as $flag) {
+ $_target[] = $this->strip_value($flag);
+ }
+ }
+ $this->form['actions'][$i]['target'] = $_target;
+ break;
+
+ case 'vacation':
+ $reason = $this->strip_value($reasons[$idx]);
+ $this->form['actions'][$i]['reason'] = str_replace("\r\n", "\n", $reason);
+ $this->form['actions'][$i]['days'] = $days[$idx];
+ $this->form['actions'][$i]['subject'] = $subject[$idx];
+ $this->form['actions'][$i]['addresses'] = explode(',', $addresses[$idx]);
+// @TODO: vacation :mime, :from, :handle
+
+ if ($this->form['actions'][$i]['addresses']) {
+ foreach($this->form['actions'][$i]['addresses'] as $aidx => $address) {
+ $address = trim($address);
+ if (!$address)
+ unset($this->form['actions'][$i]['addresses'][$aidx]);
+ else if(!check_email($address)) {
+ $this->errors['actions'][$i]['addresses'] = $this->gettext('noemailwarning');
+ break;
+ } else
+ $this->form['actions'][$i]['addresses'][$aidx] = $address;
+ }
+ }
+
+ if ($this->form['actions'][$i]['reason'] == '')
+ $this->errors['actions'][$i]['reason'] = $this->gettext('cannotbeempty');
+ if ($this->form['actions'][$i]['days'] && !preg_match('/^[0-9]+$/', $this->form['actions'][$i]['days']))
+ $this->errors['actions'][$i]['days'] = $this->gettext('forbiddenchars');
+ break;
+
+ case 'set':
+ $this->form['actions'][$i]['name'] = $varnames[$idx];
+ $this->form['actions'][$i]['value'] = $varvalues[$idx];
+ foreach ((array)$varmods[$idx] as $v_m) {
+ $this->form['actions'][$i][$v_m] = true;
+ }
+
+ if (empty($varnames[$idx])) {
+ $this->errors['actions'][$i]['name'] = $this->gettext('cannotbeempty');
+ }
+ else if (!preg_match('/^[0-9a-z_]+$/i', $varnames[$idx])) {
+ $this->errors['actions'][$i]['name'] = $this->gettext('forbiddenchars');
+ }
+
+ if (!isset($varvalues[$idx]) || $varvalues[$idx] === '') {
+ $this->errors['actions'][$i]['value'] = $this->gettext('cannotbeempty');
+ }
+ break;
+
+ case 'notify':
+ if (empty($notifyaddrs[$idx])) {
+ $this->errors['actions'][$i]['address'] = $this->gettext('cannotbeempty');
+ }
+ else if (!check_email($notifyaddrs[$idx])) {
+ $this->errors['actions'][$i]['address'] = $this->gettext('noemailwarning');
+ }
+ if (!empty($notifyfrom[$idx]) && !check_email($notifyfrom[$idx])) {
+ $this->errors['actions'][$i]['from'] = $this->gettext('noemailwarning');
+ }
+ $this->form['actions'][$i]['address'] = $notifyaddrs[$idx];
+ $this->form['actions'][$i]['body'] = $notifybodies[$idx];
+ $this->form['actions'][$i]['message'] = $notifymessages[$idx];
+ $this->form['actions'][$i]['from'] = $notifyfrom[$idx];
+ $this->form['actions'][$i]['importance'] = $notifyimp[$idx];
+ break;
+ }
+
+ $this->form['actions'][$i]['type'] = $type;
+ $i++;
+ }
+
+ if (!$this->errors && !$error) {
+ // zapis skryptu
+ if (!isset($this->script[$fid])) {
+ $fid = $this->sieve->script->add_rule($this->form);
+ $new = true;
+ } else
+ $fid = $this->sieve->script->update_rule($fid, $this->form);
+
+ if ($fid !== false)
+ $save = $this->save_script();
+
+ if ($save && $fid !== false) {
+ $this->rc->output->show_message('managesieve.filtersaved', 'confirmation');
+ if ($this->rc->task != 'mail') {
+ $this->rc->output->command('parent.managesieve_updatelist',
+ isset($new) ? 'add' : 'update',
+ array(
+ 'name' => $this->form['name'],
+ 'id' => $fid,
+ 'disabled' => $this->form['disabled']
+ ));
+ }
+ else {
+ $this->rc->output->command('managesieve_dialog_close');
+ $this->rc->output->send('iframe');
+ }
+ }
+ else {
+ $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
+// $this->rc->output->send();
+ }
+ }
+ }
+
+ $this->managesieve_send();
+ }
+
+ private function managesieve_send()
+ {
+ // Handle form action
+ if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
+ if (isset($_GET['_newset']) || isset($_POST['_newset'])) {
+ $this->rc->output->send('managesieve.setedit');
+ }
+ else {
+ $this->rc->output->send('managesieve.filteredit');
+ }
+ } else {
+ $this->rc->output->set_pagetitle($this->gettext('filters'));
+ $this->rc->output->send('managesieve.managesieve');
+ }
+ }
+
+ // return the filters list as HTML table
+ function filters_list($attrib)
+ {
+ // add id to message list table if not specified
+ if (!strlen($attrib['id']))
+ $attrib['id'] = 'rcmfilterslist';
+
+ // define list of cols to be displayed
+ $a_show_cols = array('name');
+
+ $result = $this->list_rules();
+
+ // create XHTML table
+ $out = rcube_table_output($attrib, $result, $a_show_cols, 'id');
+
+ // set client env
+ $this->rc->output->add_gui_object('filterslist', $attrib['id']);
+ $this->rc->output->include_script('list.js');
+
+ // add some labels to client
+ $this->rc->output->add_label('managesieve.filterdeleteconfirm');
+
+ return $out;
+ }
+
+ // return the filters list as <SELECT>
+ function filtersets_list($attrib, $no_env = false)
+ {
+ // add id to message list table if not specified
+ if (!strlen($attrib['id']))
+ $attrib['id'] = 'rcmfiltersetslist';
+
+ $list = $this->list_scripts();
+
+ if ($list) {
+ asort($list, SORT_LOCALE_STRING);
+ }
+
+ if (!empty($attrib['type']) && $attrib['type'] == 'list') {
+ // define list of cols to be displayed
+ $a_show_cols = array('name');
+
+ if ($list) {
+ foreach ($list as $idx => $set) {
+ $scripts['S'.$idx] = $set;
+ $result[] = array(
+ 'name' => $set,
+ 'id' => 'S'.$idx,
+ 'class' => !in_array($set, $this->active) ? 'disabled' : '',
+ );
+ }
+ }
+
+ // create XHTML table
+ $out = rcube_table_output($attrib, $result, $a_show_cols, 'id');
+
+ $this->rc->output->set_env('filtersets', $scripts);
+ $this->rc->output->include_script('list.js');
+ }
+ else {
+ $select = new html_select(array('name' => '_set', 'id' => $attrib['id'],
+ 'onchange' => $this->rc->task != 'mail' ? 'rcmail.managesieve_set()' : ''));
+
+ if ($list) {
+ foreach ($list as $set)
+ $select->add($set, $set);
+ }
+
+ $out = $select->show($this->sieve->current);
+ }
+
+ // set client env
+ if (!$no_env) {
+ $this->rc->output->add_gui_object('filtersetslist', $attrib['id']);
+ $this->rc->output->add_label('managesieve.setdeleteconfirm');
+ }
+
+ return $out;
+ }
+
+ function filter_frame($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmfilterframe';
+
+ $attrib['name'] = $attrib['id'];
+
+ $this->rc->output->set_env('contentframe', $attrib['name']);
+ $this->rc->output->set_env('blankpage', $attrib['src'] ?
+ $this->rc->output->abs_url($attrib['src']) : 'program/resources/blank.gif');
+
+ return $this->rc->output->frame($attrib);
+ }
+
+ function filterset_form($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmfiltersetform';
+
+ $out = '<form name="filtersetform" action="./" method="post" enctype="multipart/form-data">'."\n";
+
+ $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $this->rc->task));
+ $hiddenfields->add(array('name' => '_action', 'value' => 'plugin.managesieve-save'));
+ $hiddenfields->add(array('name' => '_framed', 'value' => ($_POST['_framed'] || $_GET['_framed'] ? 1 : 0)));
+ $hiddenfields->add(array('name' => '_newset', 'value' => 1));
+
+ $out .= $hiddenfields->show();
+
+ $name = get_input_value('_name', RCUBE_INPUT_POST);
+ $copy = get_input_value('_copy', RCUBE_INPUT_POST);
+ $selected = get_input_value('_from', RCUBE_INPUT_POST);
+
+ // filter set name input
+ $input_name = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30,
+ 'class' => ($this->errors['name'] ? 'error' : '')));
+
+ $out .= sprintf('<label for="%s"><b>%s:</b></label> %s<br /><br />',
+ '_name', Q($this->gettext('filtersetname')), $input_name->show($name));
+
+ $out .="\n<fieldset class=\"itemlist\"><legend>" . $this->gettext('filters') . ":</legend>\n";
+ $out .= '<input type="radio" id="from_none" name="_from" value="none"'
+ .(!$selected || $selected=='none' ? ' checked="checked"' : '').'></input>';
+ $out .= sprintf('<label for="%s">%s</label> ', 'from_none', Q($this->gettext('none')));
+
+ // filters set list
+ $list = $this->list_scripts();
+ $select = new html_select(array('name' => '_copy', 'id' => '_copy'));
+
+ if (is_array($list)) {
+ asort($list, SORT_LOCALE_STRING);
+
+ if (!$copy)
+ $copy = $_SESSION['managesieve_current'];
+
+ foreach ($list as $set) {
+ $select->add($set, $set);
+ }
+
+ $out .= '<br /><input type="radio" id="from_set" name="_from" value="set"'
+ .($selected=='set' ? ' checked="checked"' : '').'></input>';
+ $out .= sprintf('<label for="%s">%s:</label> ', 'from_set', Q($this->gettext('fromset')));
+ $out .= $select->show($copy);
+ }
+
+ // script upload box
+ $upload = new html_inputfield(array('name' => '_file', 'id' => '_file', 'size' => 30,
+ 'type' => 'file', 'class' => ($this->errors['file'] ? 'error' : '')));
+
+ $out .= '<br /><input type="radio" id="from_file" name="_from" value="file"'
+ .($selected=='file' ? ' checked="checked"' : '').'></input>';
+ $out .= sprintf('<label for="%s">%s:</label> ', 'from_file', Q($this->gettext('fromfile')));
+ $out .= $upload->show();
+ $out .= '</fieldset>';
+
+ $this->rc->output->add_gui_object('sieveform', 'filtersetform');
+
+ if ($this->errors['name'])
+ $this->add_tip('_name', $this->errors['name'], true);
+ if ($this->errors['file'])
+ $this->add_tip('_file', $this->errors['file'], true);
+
+ $this->print_tips();
+
+ return $out;
+ }
+
+
+ function filter_form($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmfilterform';
+
+ $fid = get_input_value('_fid', RCUBE_INPUT_GPC);
+ $scr = isset($this->form) ? $this->form : $this->script[$fid];
+
+ $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $this->rc->task));
+ $hiddenfields->add(array('name' => '_action', 'value' => 'plugin.managesieve-save'));
+ $hiddenfields->add(array('name' => '_framed', 'value' => ($_POST['_framed'] || $_GET['_framed'] ? 1 : 0)));
+ $hiddenfields->add(array('name' => '_fid', 'value' => $fid));
+
+ $out = '<form name="filterform" action="./" method="post">'."\n";
+ $out .= $hiddenfields->show();
+
+ // 'any' flag
+ if (sizeof($scr['tests']) == 1 && $scr['tests'][0]['test'] == 'true' && !$scr['tests'][0]['not'])
+ $any = true;
+
+ // filter name input
+ $field_id = '_name';
+ $input_name = new html_inputfield(array('name' => '_name', 'id' => $field_id, 'size' => 30,
+ 'class' => ($this->errors['name'] ? 'error' : '')));
+
+ if ($this->errors['name'])
+ $this->add_tip($field_id, $this->errors['name'], true);
+
+ if (isset($scr))
+ $input_name = $input_name->show($scr['name']);
+ else
+ $input_name = $input_name->show();
+
+ $out .= sprintf("\n<label for=\"%s\"><b>%s:</b></label> %s\n",
+ $field_id, Q($this->gettext('filtername')), $input_name);
+
+ // filter set selector
+ if ($this->rc->task == 'mail') {
+ $out .= sprintf("\n&nbsp;<label for=\"%s\"><b>%s:</b></label> %s\n",
+ $field_id, Q($this->gettext('filterset')),
+ $this->filtersets_list(array('id' => 'sievescriptname'), true));
+ }
+
+ $out .= '<br /><br /><fieldset><legend>' . Q($this->gettext('messagesrules')) . "</legend>\n";
+
+ // any, allof, anyof radio buttons
+ $field_id = '_allof';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'allof',
+ 'onclick' => 'rule_join_radio(\'allof\')', 'class' => 'radio'));
+
+ if (isset($scr) && !$any)
+ $input_join = $input_join->show($scr['join'] ? 'allof' : '');
+ else
+ $input_join = $input_join->show();
+
+ $out .= sprintf("%s<label for=\"%s\">%s</label>&nbsp;\n",
+ $input_join, $field_id, Q($this->gettext('filterallof')));
+
+ $field_id = '_anyof';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'anyof',
+ 'onclick' => 'rule_join_radio(\'anyof\')', 'class' => 'radio'));
+
+ if (isset($scr) && !$any)
+ $input_join = $input_join->show($scr['join'] ? '' : 'anyof');
+ else
+ $input_join = $input_join->show('anyof'); // default
+
+ $out .= sprintf("%s<label for=\"%s\">%s</label>\n",
+ $input_join, $field_id, Q($this->gettext('filteranyof')));
+
+ $field_id = '_any';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'any',
+ 'onclick' => 'rule_join_radio(\'any\')', 'class' => 'radio'));
+
+ $input_join = $input_join->show($any ? 'any' : '');
+
+ $out .= sprintf("%s<label for=\"%s\">%s</label>\n",
+ $input_join, $field_id, Q($this->gettext('filterany')));
+
+ $rows_num = isset($scr) ? sizeof($scr['tests']) : 1;
+
+ $out .= '<div id="rules"'.($any ? ' style="display: none"' : '').'>';
+ for ($x=0; $x<$rows_num; $x++)
+ $out .= $this->rule_div($fid, $x);
+ $out .= "</div>\n";
+
+ $out .= "</fieldset>\n";
+
+ // actions
+ $out .= '<fieldset><legend>' . Q($this->gettext('messagesactions')) . "</legend>\n";
+
+ $rows_num = isset($scr) ? sizeof($scr['actions']) : 1;
+
+ $out .= '<div id="actions">';
+ for ($x=0; $x<$rows_num; $x++)
+ $out .= $this->action_div($fid, $x);
+ $out .= "</div>\n";
+
+ $out .= "</fieldset>\n";
+
+ $this->print_tips();
+
+ if ($scr['disabled']) {
+ $this->rc->output->set_env('rule_disabled', true);
+ }
+ $this->rc->output->add_label(
+ 'managesieve.ruledeleteconfirm',
+ 'managesieve.actiondeleteconfirm'
+ );
+ $this->rc->output->add_gui_object('sieveform', 'filterform');
+
+ return $out;
+ }
+
+ function rule_div($fid, $id, $div=true)
+ {
+ $rule = isset($this->form) ? $this->form['tests'][$id] : $this->script[$fid]['tests'][$id];
+ $rows_num = isset($this->form) ? sizeof($this->form['tests']) : sizeof($this->script[$fid]['tests']);
+
+ // headers select
+ $select_header = new html_select(array('name' => "_header[]", 'id' => 'header'.$id,
+ 'onchange' => 'rule_header_select(' .$id .')'));
+ foreach($this->headers as $name => $val)
+ $select_header->add(Q($this->gettext($name)), Q($val));
+ if (in_array('body', $this->exts))
+ $select_header->add(Q($this->gettext('body')), 'body');
+ $select_header->add(Q($this->gettext('size')), 'size');
+ $select_header->add(Q($this->gettext('...')), '...');
+
+ // TODO: list arguments
+ $aout = '';
+
+ if ((isset($rule['test']) && in_array($rule['test'], array('header', 'address', 'envelope')))
+ && !is_array($rule['arg1']) && in_array($rule['arg1'], $this->headers)
+ ) {
+ $aout .= $select_header->show($rule['arg1']);
+ }
+ else if ((isset($rule['test']) && $rule['test'] == 'exists')
+ && !is_array($rule['arg']) && in_array($rule['arg'], $this->headers)
+ ) {
+ $aout .= $select_header->show($rule['arg']);
+ }
+ else if (isset($rule['test']) && $rule['test'] == 'size')
+ $aout .= $select_header->show('size');
+ else if (isset($rule['test']) && $rule['test'] == 'body')
+ $aout .= $select_header->show('body');
+ else if (isset($rule['test']) && $rule['test'] != 'true')
+ $aout .= $select_header->show('...');
+ else
+ $aout .= $select_header->show();
+
+ if (isset($rule['test']) && in_array($rule['test'], array('header', 'address', 'envelope'))) {
+ if (is_array($rule['arg1']))
+ $custom = implode(', ', $rule['arg1']);
+ else if (!in_array($rule['arg1'], $this->headers))
+ $custom = $rule['arg1'];
+ }
+ else if (isset($rule['test']) && $rule['test'] == 'exists') {
+ if (is_array($rule['arg']))
+ $custom = implode(', ', $rule['arg']);
+ else if (!in_array($rule['arg'], $this->headers))
+ $custom = $rule['arg'];
+ }
+
+ $tout = '<div id="custom_header' .$id. '" style="display:' .(isset($custom) ? 'inline' : 'none'). '">
+ <input type="text" name="_custom_header[]" id="custom_header_i'.$id.'" '
+ . $this->error_class($id, 'test', 'header', 'custom_header_i')
+ .' value="' .Q($custom). '" size="15" />&nbsp;</div>' . "\n";
+
+ // matching type select (operator)
+ $select_op = new html_select(array('name' => "_rule_op[]", 'id' => 'rule_op'.$id,
+ 'style' => 'display:' .($rule['test']!='size' ? 'inline' : 'none'),
+ 'class' => 'operator_selector',
+ 'onchange' => 'rule_op_select('.$id.')'));
+ $select_op->add(Q($this->gettext('filtercontains')), 'contains');
+ $select_op->add(Q($this->gettext('filternotcontains')), 'notcontains');
+ $select_op->add(Q($this->gettext('filteris')), 'is');
+ $select_op->add(Q($this->gettext('filterisnot')), 'notis');
+ $select_op->add(Q($this->gettext('filterexists')), 'exists');
+ $select_op->add(Q($this->gettext('filternotexists')), 'notexists');
+ $select_op->add(Q($this->gettext('filtermatches')), 'matches');
+ $select_op->add(Q($this->gettext('filternotmatches')), 'notmatches');
+ if (in_array('regex', $this->exts)) {
+ $select_op->add(Q($this->gettext('filterregex')), 'regex');
+ $select_op->add(Q($this->gettext('filternotregex')), 'notregex');
+ }
+ if (in_array('relational', $this->exts)) {
+ $select_op->add(Q($this->gettext('countisgreaterthan')), 'count-gt');
+ $select_op->add(Q($this->gettext('countisgreaterthanequal')), 'count-ge');
+ $select_op->add(Q($this->gettext('countislessthan')), 'count-lt');
+ $select_op->add(Q($this->gettext('countislessthanequal')), 'count-le');
+ $select_op->add(Q($this->gettext('countequals')), 'count-eq');
+ $select_op->add(Q($this->gettext('countnotequals')), 'count-ne');
+ $select_op->add(Q($this->gettext('valueisgreaterthan')), 'value-gt');
+ $select_op->add(Q($this->gettext('valueisgreaterthanequal')), 'value-ge');
+ $select_op->add(Q($this->gettext('valueislessthan')), 'value-lt');
+ $select_op->add(Q($this->gettext('valueislessthanequal')), 'value-le');
+ $select_op->add(Q($this->gettext('valueequals')), 'value-eq');
+ $select_op->add(Q($this->gettext('valuenotequals')), 'value-ne');
+ }
+
+ // target input (TODO: lists)
+
+ if (in_array($rule['test'], array('header', 'address', 'envelope'))) {
+ $test = ($rule['not'] ? 'not' : '').($rule['type'] ? $rule['type'] : 'is');
+ $target = $rule['arg2'];
+ }
+ else if ($rule['test'] == 'body') {
+ $test = ($rule['not'] ? 'not' : '').($rule['type'] ? $rule['type'] : 'is');
+ $target = $rule['arg'];
+ }
+ else if ($rule['test'] == 'size') {
+ $test = '';
+ $target = '';
+ if (preg_match('/^([0-9]+)(K|M|G)?$/', $rule['arg'], $matches)) {
+ $sizetarget = $matches[1];
+ $sizeitem = $matches[2];
+ }
+ else {
+ $sizetarget = $rule['arg'];
+ $sizeitem = $rule['item'];
+ }
+ }
+ else {
+ $test = ($rule['not'] ? 'not' : '').$rule['test'];
+ $target = '';
+ }
+
+ $tout .= $select_op->show($test);
+ $tout .= '<input type="text" name="_rule_target[]" id="rule_target' .$id. '"
+ value="' .Q($target). '" size="20" ' . $this->error_class($id, 'test', 'target', 'rule_target')
+ . ' style="display:' . ($rule['test']!='size' && $rule['test'] != 'exists' ? 'inline' : 'none') . '" />'."\n";
+
+ $select_size_op = new html_select(array('name' => "_rule_size_op[]", 'id' => 'rule_size_op'.$id));
+ $select_size_op->add(Q($this->gettext('filterover')), 'over');
+ $select_size_op->add(Q($this->gettext('filterunder')), 'under');
+
+ $tout .= '<div id="rule_size' .$id. '" style="display:' . ($rule['test']=='size' ? 'inline' : 'none') .'">';
+ $tout .= $select_size_op->show($rule['test']=='size' ? $rule['type'] : '');
+ $tout .= '<input type="text" name="_rule_size_target[]" id="rule_size_i'.$id.'" value="'.$sizetarget.'" size="10" '
+ . $this->error_class($id, 'test', 'sizetarget', 'rule_size_i') .' />
+ <input type="radio" name="_rule_size_item['.$id.']" value=""'
+ . (!$sizeitem ? ' checked="checked"' : '') .' class="radio" />'.rcube_label('B').'
+ <input type="radio" name="_rule_size_item['.$id.']" value="K"'
+ . ($sizeitem=='K' ? ' checked="checked"' : '') .' class="radio" />'.rcube_label('KB').'
+ <input type="radio" name="_rule_size_item['.$id.']" value="M"'
+ . ($sizeitem=='M' ? ' checked="checked"' : '') .' class="radio" />'.rcube_label('MB').'
+ <input type="radio" name="_rule_size_item['.$id.']" value="G"'
+ . ($sizeitem=='G' ? ' checked="checked"' : '') .' class="radio" />'.rcube_label('GB');
+ $tout .= '</div>';
+
+ // Advanced modifiers (address, envelope)
+ $select_mod = new html_select(array('name' => "_rule_mod[]", 'id' => 'rule_mod_op'.$id,
+ 'onchange' => 'rule_mod_select(' .$id .')'));
+ $select_mod->add(Q($this->gettext('none')), '');
+ $select_mod->add(Q($this->gettext('address')), 'address');
+ if (in_array('envelope', $this->exts))
+ $select_mod->add(Q($this->gettext('envelope')), 'envelope');
+
+ $select_type = new html_select(array('name' => "_rule_mod_type[]", 'id' => 'rule_mod_type'.$id));
+ $select_type->add(Q($this->gettext('allparts')), 'all');
+ $select_type->add(Q($this->gettext('domain')), 'domain');
+ $select_type->add(Q($this->gettext('localpart')), 'localpart');
+ if (in_array('subaddress', $this->exts)) {
+ $select_type->add(Q($this->gettext('user')), 'user');
+ $select_type->add(Q($this->gettext('detail')), 'detail');
+ }
+
+ $need_mod = $rule['test'] != 'size' && $rule['test'] != 'body';
+ $mout = '<div id="rule_mod' .$id. '" class="adv" style="display:' . ($need_mod ? 'block' : 'none') .'">';
+ $mout .= ' <span>';
+ $mout .= Q($this->gettext('modifier')) . ' ';
+ $mout .= $select_mod->show($rule['test']);
+ $mout .= '</span>';
+ $mout .= ' <span id="rule_mod_type' . $id . '"';
+ $mout .= ' style="display:' . (in_array($rule['test'], array('address', 'envelope')) ? 'inline' : 'none') .'">';
+ $mout .= Q($this->gettext('modtype')) . ' ';
+ $mout .= $select_type->show($rule['part']);
+ $mout .= '</span>';
+ $mout .= '</div>';
+
+ // Advanced modifiers (body transformations)
+ $select_mod = new html_select(array('name' => "_rule_trans[]", 'id' => 'rule_trans_op'.$id,
+ 'onchange' => 'rule_trans_select(' .$id .')'));
+ $select_mod->add(Q($this->gettext('text')), 'text');
+ $select_mod->add(Q($this->gettext('undecoded')), 'raw');
+ $select_mod->add(Q($this->gettext('contenttype')), 'content');
+
+ $mout .= '<div id="rule_trans' .$id. '" class="adv" style="display:' . ($rule['test'] == 'body' ? 'block' : 'none') .'">';
+ $mout .= ' <span>';
+ $mout .= Q($this->gettext('modifier')) . ' ';
+ $mout .= $select_mod->show($rule['part']);
+ $mout .= '<input type="text" name="_rule_trans_type[]" id="rule_trans_type'.$id
+ . '" value="'.(is_array($rule['content']) ? implode(',', $rule['content']) : $rule['content'])
+ .'" size="20" style="display:' . ($rule['part'] == 'content' ? 'inline' : 'none') .'"'
+ . $this->error_class($id, 'test', 'part', 'rule_trans_type') .' />';
+ $mout .= '</span>';
+ $mout .= '</div>';
+
+ // Advanced modifiers (body transformations)
+ $select_comp = new html_select(array('name' => "_rule_comp[]", 'id' => 'rule_comp_op'.$id));
+ $select_comp->add(Q($this->gettext('default')), '');
+ $select_comp->add(Q($this->gettext('octet')), 'i;octet');
+ $select_comp->add(Q($this->gettext('asciicasemap')), 'i;ascii-casemap');
+ if (in_array('comparator-i;ascii-numeric', $this->exts)) {
+ $select_comp->add(Q($this->gettext('asciinumeric')), 'i;ascii-numeric');
+ }
+
+ $mout .= '<div id="rule_comp' .$id. '" class="adv" style="display:' . ($rule['test'] != 'size' ? 'block' : 'none') .'">';
+ $mout .= ' <span>';
+ $mout .= Q($this->gettext('comparator')) . ' ';
+ $mout .= $select_comp->show($rule['comparator']);
+ $mout .= '</span>';
+ $mout .= '</div>';
+
+ // Build output table
+ $out = $div ? '<div class="rulerow" id="rulerow' .$id .'">'."\n" : '';
+ $out .= '<table><tr>';
+ $out .= '<td class="advbutton">';
+ $out .= '<a href="#" id="ruleadv' . $id .'" title="'. Q($this->gettext('advancedopts')). '"
+ onclick="rule_adv_switch(' . $id .', this)" class="show">&nbsp;&nbsp;</a>';
+ $out .= '</td>';
+ $out .= '<td class="rowactions">' . $aout . '</td>';
+ $out .= '<td class="rowtargets">' . $tout . "\n";
+ $out .= '<div id="rule_advanced' .$id. '" style="display:none">' . $mout . '</div>';
+ $out .= '</td>';
+
+ // add/del buttons
+ $out .= '<td class="rowbuttons">';
+ $out .= '<a href="#" id="ruleadd' . $id .'" title="'. Q($this->gettext('add')). '"
+ onclick="rcmail.managesieve_ruleadd(' . $id .')" class="button add"></a>';
+ $out .= '<a href="#" id="ruledel' . $id .'" title="'. Q($this->gettext('del')). '"
+ onclick="rcmail.managesieve_ruledel(' . $id .')" class="button del' . ($rows_num<2 ? ' disabled' : '') .'"></a>';
+ $out .= '</td>';
+ $out .= '</tr></table>';
+
+ $out .= $div ? "</div>\n" : '';
+
+ return $out;
+ }
+
+ function action_div($fid, $id, $div=true)
+ {
+ $action = isset($this->form) ? $this->form['actions'][$id] : $this->script[$fid]['actions'][$id];
+ $rows_num = isset($this->form) ? sizeof($this->form['actions']) : sizeof($this->script[$fid]['actions']);
+
+ $out = $div ? '<div class="actionrow" id="actionrow' .$id .'">'."\n" : '';
+
+ $out .= '<table><tr><td class="rowactions">';
+
+ // action select
+ $select_action = new html_select(array('name' => "_action_type[$id]", 'id' => 'action_type'.$id,
+ 'onchange' => 'action_type_select(' .$id .')'));
+ if (in_array('fileinto', $this->exts))
+ $select_action->add(Q($this->gettext('messagemoveto')), 'fileinto');
+ if (in_array('fileinto', $this->exts) && in_array('copy', $this->exts))
+ $select_action->add(Q($this->gettext('messagecopyto')), 'fileinto_copy');
+ $select_action->add(Q($this->gettext('messageredirect')), 'redirect');
+ if (in_array('copy', $this->exts))
+ $select_action->add(Q($this->gettext('messagesendcopy')), 'redirect_copy');
+ if (in_array('reject', $this->exts))
+ $select_action->add(Q($this->gettext('messagediscard')), 'reject');
+ else if (in_array('ereject', $this->exts))
+ $select_action->add(Q($this->gettext('messagediscard')), 'ereject');
+ if (in_array('vacation', $this->exts))
+ $select_action->add(Q($this->gettext('messagereply')), 'vacation');
+ $select_action->add(Q($this->gettext('messagedelete')), 'discard');
+ if (in_array('imapflags', $this->exts) || in_array('imap4flags', $this->exts)) {
+ $select_action->add(Q($this->gettext('setflags')), 'setflag');
+ $select_action->add(Q($this->gettext('addflags')), 'addflag');
+ $select_action->add(Q($this->gettext('removeflags')), 'removeflag');
+ }
+ if (in_array('variables', $this->exts)) {
+ $select_action->add(Q($this->gettext('setvariable')), 'set');
+ }
+ if (in_array('enotify', $this->exts) || in_array('notify', $this->exts)) {
+ $select_action->add(Q($this->gettext('notify')), 'notify');
+ }
+ $select_action->add(Q($this->gettext('rulestop')), 'stop');
+
+ $select_type = $action['type'];
+ if (in_array($action['type'], array('fileinto', 'redirect')) && $action['copy']) {
+ $select_type .= '_copy';
+ }
+
+ $out .= $select_action->show($select_type);
+ $out .= '</td>';
+
+ // actions target inputs
+ $out .= '<td class="rowtargets">';
+ // shared targets
+ $out .= '<input type="text" name="_action_target['.$id.']" id="action_target' .$id. '" '
+ .'value="' .($action['type']=='redirect' ? Q($action['target'], 'strict', false) : ''). '" size="35" '
+ .'style="display:' .($action['type']=='redirect' ? 'inline' : 'none') .'" '
+ . $this->error_class($id, 'action', 'target', 'action_target') .' />';
+ $out .= '<textarea name="_action_target_area['.$id.']" id="action_target_area' .$id. '" '
+ .'rows="3" cols="35" '. $this->error_class($id, 'action', 'targetarea', 'action_target_area')
+ .'style="display:' .(in_array($action['type'], array('reject', 'ereject')) ? 'inline' : 'none') .'">'
+ . (in_array($action['type'], array('reject', 'ereject')) ? Q($action['target'], 'strict', false) : '')
+ . "</textarea>\n";
+
+ // vacation
+ $out .= '<div id="action_vacation' .$id.'" style="display:' .($action['type']=='vacation' ? 'inline' : 'none') .'">';
+ $out .= '<span class="label">'. Q($this->gettext('vacationreason')) .'</span><br />'
+ .'<textarea name="_action_reason['.$id.']" id="action_reason' .$id. '" '
+ .'rows="3" cols="35" '. $this->error_class($id, 'action', 'reason', 'action_reason') . '>'
+ . Q($action['reason'], 'strict', false) . "</textarea>\n";
+ $out .= '<br /><span class="label">' .Q($this->gettext('vacationsubject')) . '</span><br />'
+ .'<input type="text" name="_action_subject['.$id.']" id="action_subject'.$id.'" '
+ .'value="' . (is_array($action['subject']) ? Q(implode(', ', $action['subject']), 'strict', false) : $action['subject']) . '" size="35" '
+ . $this->error_class($id, 'action', 'subject', 'action_subject') .' />';
+ $out .= '<br /><span class="label">' .Q($this->gettext('vacationaddresses')) . '</span><br />'
+ .'<input type="text" name="_action_addresses['.$id.']" id="action_addr'.$id.'" '
+ .'value="' . (is_array($action['addresses']) ? Q(implode(', ', $action['addresses']), 'strict', false) : $action['addresses']) . '" size="35" '
+ . $this->error_class($id, 'action', 'addresses', 'action_addr') .' />';
+ $out .= '<br /><span class="label">' . Q($this->gettext('vacationdays')) . '</span><br />'
+ .'<input type="text" name="_action_days['.$id.']" id="action_days'.$id.'" '
+ .'value="' .Q($action['days'], 'strict', false) . '" size="2" '
+ . $this->error_class($id, 'action', 'days', 'action_days') .' />';
+ $out .= '</div>';
+
+ // flags
+ $flags = array(
+ 'read' => '\\Seen',
+ 'answered' => '\\Answered',
+ 'flagged' => '\\Flagged',
+ 'deleted' => '\\Deleted',
+ 'draft' => '\\Draft',
+ );
+ $flags_target = (array)$action['target'];
+
+ $out .= '<div id="action_flags' .$id.'" style="display:'
+ . (preg_match('/^(set|add|remove)flag$/', $action['type']) ? 'inline' : 'none') . '"'
+ . $this->error_class($id, 'action', 'flags', 'action_flags') . '>';
+ foreach ($flags as $fidx => $flag) {
+ $out .= '<input type="checkbox" name="_action_flags[' .$id .'][]" value="' . $flag . '"'
+ . (in_array_nocase($flag, $flags_target) ? 'checked="checked"' : '') . ' />'
+ . Q($this->gettext('flag'.$fidx)) .'<br>';
+ }
+ $out .= '</div>';
+
+ // set variable
+ $set_modifiers = array(
+ 'lower',
+ 'upper',
+ 'lowerfirst',
+ 'upperfirst',
+ 'quotewildcard',
+ 'length'
+ );
+
+ $out .= '<div id="action_set' .$id.'" style="display:' .($action['type']=='set' ? 'inline' : 'none') .'">';
+ $out .= '<span class="label">' .Q($this->gettext('setvarname')) . '</span><br />'
+ .'<input type="text" name="_action_varname['.$id.']" id="action_varname'.$id.'" '
+ .'value="' . Q($action['name']) . '" size="35" '
+ . $this->error_class($id, 'action', 'name', 'action_varname') .' />';
+ $out .= '<br /><span class="label">' .Q($this->gettext('setvarvalue')) . '</span><br />'
+ .'<input type="text" name="_action_varvalue['.$id.']" id="action_varvalue'.$id.'" '
+ .'value="' . Q($action['value']) . '" size="35" '
+ . $this->error_class($id, 'action', 'value', 'action_varvalue') .' />';
+ $out .= '<br /><span class="label">' .Q($this->gettext('setvarmodifiers')) . '</span><br />';
+ foreach ($set_modifiers as $j => $s_m) {
+ $s_m_id = 'action_varmods' . $id . $s_m;
+ $out .= sprintf('<input type="checkbox" name="_action_varmods[%s][]" value="%s" id="%s"%s />%s<br>',
+ $id, $s_m, $s_m_id,
+ (array_key_exists($s_m, (array)$action) && $action[$s_m] ? ' checked="checked"' : ''),
+ Q($this->gettext('var' . $s_m)));
+ }
+ $out .= '</div>';
+
+ // notify
+ // skip :options tag - not used by the mailto method
+ $out .= '<div id="action_notify' .$id.'" style="display:' .($action['type']=='notify' ? 'inline' : 'none') .'">';
+ $out .= '<span class="label">' .Q($this->gettext('notifyaddress')) . '</span><br />'
+ .'<input type="text" name="_action_notifyaddress['.$id.']" id="action_notifyaddress'.$id.'" '
+ .'value="' . Q($action['address']) . '" size="35" '
+ . $this->error_class($id, 'action', 'address', 'action_notifyaddress') .' />';
+ $out .= '<br /><span class="label">'. Q($this->gettext('notifybody')) .'</span><br />'
+ .'<textarea name="_action_notifybody['.$id.']" id="action_notifybody' .$id. '" '
+ .'rows="3" cols="35" '. $this->error_class($id, 'action', 'method', 'action_notifybody') . '>'
+ . Q($action['body'], 'strict', false) . "</textarea>\n";
+ $out .= '<br /><span class="label">' .Q($this->gettext('notifysubject')) . '</span><br />'
+ .'<input type="text" name="_action_notifymessage['.$id.']" id="action_notifymessage'.$id.'" '
+ .'value="' . Q($action['message']) . '" size="35" '
+ . $this->error_class($id, 'action', 'message', 'action_notifymessage') .' />';
+ $out .= '<br /><span class="label">' .Q($this->gettext('notifyfrom')) . '</span><br />'
+ .'<input type="text" name="_action_notifyfrom['.$id.']" id="action_notifyfrom'.$id.'" '
+ .'value="' . Q($action['from']) . '" size="35" '
+ . $this->error_class($id, 'action', 'from', 'action_notifyfrom') .' />';
+ $importance_options = array(
+ 3 => 'notifyimportancelow',
+ 2 => 'notifyimportancenormal',
+ 1 => 'notifyimportancehigh'
+ );
+ $select_importance = new html_select(array(
+ 'name' => '_action_notifyimportance[' . $id . ']',
+ 'id' => '_action_notifyimportance' . $id,
+ 'class' => $this->error_class($id, 'action', 'importance', 'action_notifyimportance')));
+ foreach ($importance_options as $io_v => $io_n) {
+ $select_importance->add(Q($this->gettext($io_n)), $io_v);
+ }
+ $out .= '<br /><span class="label">' . Q($this->gettext('notifyimportance')) . '</span><br />';
+ $out .= $select_importance->show($action['importance'] ? $action['importance'] : 2);
+ $out .= '</div>';
+
+ // mailbox select
+ if ($action['type'] == 'fileinto')
+ $mailbox = $this->mod_mailbox($action['target'], 'out');
+ else
+ $mailbox = '';
+
+ $select = rcmail_mailbox_select(array(
+ 'realnames' => false,
+ 'maxlength' => 100,
+ 'id' => 'action_mailbox' . $id,
+ 'name' => "_action_mailbox[$id]",
+ 'style' => 'display:'.(!isset($action) || $action['type']=='fileinto' ? 'inline' : 'none')
+ ));
+ $out .= $select->show($mailbox);
+ $out .= '</td>';
+
+ // add/del buttons
+ $out .= '<td class="rowbuttons">';
+ $out .= '<a href="#" id="actionadd' . $id .'" title="'. Q($this->gettext('add')). '"
+ onclick="rcmail.managesieve_actionadd(' . $id .')" class="button add"></a>';
+ $out .= '<a href="#" id="actiondel' . $id .'" title="'. Q($this->gettext('del')). '"
+ onclick="rcmail.managesieve_actiondel(' . $id .')" class="button del' . ($rows_num<2 ? ' disabled' : '') .'"></a>';
+ $out .= '</td>';
+
+ $out .= '</tr></table>';
+
+ $out .= $div ? "</div>\n" : '';
+
+ return $out;
+ }
+
+ private function genid()
+ {
+ return preg_replace('/[^0-9]/', '', microtime(true));
+ }
+
+ private function strip_value($str, $allow_html = false, $trim = true)
+ {
+ if (!$allow_html) {
+ $str = strip_tags($str);
+ }
+
+ return $trim ? trim($str) : $str;
+ }
+
+ private function error_class($id, $type, $target, $elem_prefix='')
+ {
+ // TODO: tooltips
+ if (($type == 'test' && ($str = $this->errors['tests'][$id][$target])) ||
+ ($type == 'action' && ($str = $this->errors['actions'][$id][$target]))
+ ) {
+ $this->add_tip($elem_prefix.$id, $str, true);
+ return ' class="error"';
+ }
+
+ return '';
+ }
+
+ private function add_tip($id, $str, $error=false)
+ {
+ if ($error)
+ $str = html::span('sieve error', $str);
+
+ $this->tips[] = array($id, $str);
+ }
+
+ private function print_tips()
+ {
+ if (empty($this->tips))
+ return;
+
+ $script = JS_OBJECT_NAME.'.managesieve_tip_register('.json_encode($this->tips).');';
+ $this->rc->output->add_script($script, 'foot');
}
/**
- * Initializes engine object
+ * Converts mailbox name from/to UTF7-IMAP from/to internal Sieve encoding
+ * with delimiter replacement.
+ *
+ * @param string $mailbox Mailbox name
+ * @param string $mode Conversion direction ('in'|'out')
+ *
+ * @return string Mailbox name
*/
- private function get_engine()
+ private function mod_mailbox($mailbox, $mode = 'out')
{
- if (!$this->engine) {
- $this->load_config();
+ $delimiter = $_SESSION['imap_delimiter'];
+ $replace_delimiter = $this->rc->config->get('managesieve_replace_delimiter');
+ $mbox_encoding = $this->rc->config->get('managesieve_mbox_encoding', 'UTF7-IMAP');
+
+ if ($mode == 'out') {
+ $mailbox = rcube_charset_convert($mailbox, $mbox_encoding, 'UTF7-IMAP');
+ if ($replace_delimiter && $replace_delimiter != $delimiter)
+ $mailbox = str_replace($replace_delimiter, $delimiter, $mailbox);
+ }
+ else {
+ $mailbox = rcube_charset_convert($mailbox, 'UTF7-IMAP', $mbox_encoding);
+ if ($replace_delimiter && $replace_delimiter != $delimiter)
+ $mailbox = str_replace($delimiter, $replace_delimiter, $mailbox);
+ }
+
+ return $mailbox;
+ }
+
+ /**
+ * List sieve scripts
+ *
+ * @return array Scripts list
+ */
+ public function list_scripts()
+ {
+ if ($this->list !== null) {
+ return $this->list;
+ }
+
+ $this->list = $this->sieve->get_scripts();
+
+ // Handle active script(s) and list of scripts according to Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
- // Add include path for internal classes
- $include_path = $this->home . '/lib' . PATH_SEPARATOR;
- $include_path .= ini_get('include_path');
- set_include_path($include_path);
+ // Skip protected names
+ foreach ((array)$this->list as $idx => $name) {
+ $_name = strtoupper($name);
+ if ($_name == 'MASTER')
+ $master_script = $name;
+ else if ($_name == 'MANAGEMENT')
+ $management_script = $name;
+ else if($_name == 'USER')
+ $user_script = $name;
+ else
+ continue;
- $this->engine = new rcube_sieve_engine($this);
+ unset($this->list[$idx]);
+ }
+
+ // get active script(s), read USER script
+ if ($user_script) {
+ $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
+ $filename_regex = '/'.preg_quote($extension, '/').'$/';
+ $_SESSION['managesieve_user_script'] = $user_script;
+
+ $this->sieve->load($user_script);
+
+ foreach ($this->sieve->script->as_array() as $rules) {
+ foreach ($rules['actions'] as $action) {
+ if ($action['type'] == 'include' && empty($action['global'])) {
+ $name = preg_replace($filename_regex, '', $action['target']);
+ $this->active[] = $name;
+ }
+ }
+ }
+ }
+ // create USER script if it doesn't exist
+ else {
+ $content = "# USER Management Script\n"
+ ."#\n"
+ ."# This script includes the various active sieve scripts\n"
+ ."# it is AUTOMATICALLY GENERATED. DO NOT EDIT MANUALLY!\n"
+ ."#\n"
+ ."# For more information, see http://wiki.kolab.org/KEP:14#USER\n"
+ ."#\n";
+ if ($this->sieve->save_script('USER', $content)) {
+ $_SESSION['managesieve_user_script'] = 'USER';
+ if (empty($this->master_file))
+ $this->sieve->activate('USER');
+ }
+ }
+ }
+ else if (!empty($this->list)) {
+ // Get active script name
+ if ($active = $this->sieve->get_active()) {
+ $this->active = array($active);
+ }
+
+ // Hide scripts from config
+ $exceptions = $this->rc->config->get('managesieve_filename_exceptions');
+ if (!empty($exceptions)) {
+ $this->list = array_diff($this->list, (array)$exceptions);
+ }
+ }
+
+ return $this->list;
+ }
+
+ /**
+ * Removes sieve script
+ *
+ * @param string $name Script name
+ *
+ * @return bool True on success, False on failure
+ */
+ public function remove_script($name)
+ {
+ $result = $this->sieve->remove($name);
+
+ // Kolab's KEP:14
+ if ($result && $this->rc->config->get('managesieve_kolab_master')) {
+ $this->deactivate_script($name);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Activates sieve script
+ *
+ * @param string $name Script name
+ *
+ * @return bool True on success, False on failure
+ */
+ public function activate_script($name)
+ {
+ // Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
+ $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
+ $user_script = $_SESSION['managesieve_user_script'];
+
+ // if the script is not active...
+ if ($user_script && ($key = array_search($name, $this->active)) === false) {
+ // ...rewrite USER file adding appropriate include command
+ if ($this->sieve->load($user_script)) {
+ $script = $this->sieve->script->as_array();
+ $list = array();
+ $regexp = '/' . preg_quote($extension, '/') . '$/';
+
+ // Create new include entry
+ $rule = array(
+ 'actions' => array(
+ 0 => array(
+ 'target' => $name.$extension,
+ 'type' => 'include',
+ 'personal' => true,
+ )));
+
+ // get all active scripts for sorting
+ foreach ($script as $rid => $rules) {
+ foreach ($rules['actions'] as $aid => $action) {
+ if ($action['type'] == 'include' && empty($action['global'])) {
+ $target = $extension ? preg_replace($regexp, '', $action['target']) : $action['target'];
+ $list[] = $target;
+ }
+ }
+ }
+ $list[] = $name;
+
+ // Sort and find current script position
+ asort($list, SORT_LOCALE_STRING);
+ $list = array_values($list);
+ $index = array_search($name, $list);
+
+ // add rule at the end of the script
+ if ($index === false || $index == count($list)-1) {
+ $this->sieve->script->add_rule($rule);
+ }
+ // add rule at index position
+ else {
+ $script2 = array();
+ foreach ($script as $rid => $rules) {
+ if ($rid == $index) {
+ $script2[] = $rule;
+ }
+ $script2[] = $rules;
+ }
+ $this->sieve->script->content = $script2;
+ }
+
+ $result = $this->sieve->save();
+ if ($result) {
+ $this->active[] = $name;
+ }
+ }
+ }
+ }
+ else {
+ $result = $this->sieve->activate($name);
+ if ($result)
+ $this->active = array($name);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Deactivates sieve script
+ *
+ * @param string $name Script name
+ *
+ * @return bool True on success, False on failure
+ */
+ public function deactivate_script($name)
+ {
+ // Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
+ $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
+ $user_script = $_SESSION['managesieve_user_script'];
+
+ // if the script is active...
+ if ($user_script && ($key = array_search($name, $this->active)) !== false) {
+ // ...rewrite USER file removing appropriate include command
+ if ($this->sieve->load($user_script)) {
+ $script = $this->sieve->script->as_array();
+ $name = $name.$extension;
+
+ foreach ($script as $rid => $rules) {
+ foreach ($rules['actions'] as $aid => $action) {
+ if ($action['type'] == 'include' && empty($action['global'])
+ && $action['target'] == $name
+ ) {
+ break 2;
+ }
+ }
+ }
+
+ // Entry found
+ if ($rid < count($script)) {
+ $this->sieve->script->delete_rule($rid);
+ $result = $this->sieve->save();
+ if ($result) {
+ unset($this->active[$key]);
+ }
+ }
+ }
+ }
+ }
+ else {
+ $result = $this->sieve->deactivate();
+ if ($result)
+ $this->active = array();
+ }
+
+ return $result;
+ }
+
+ /**
+ * Saves current script (adding some variables)
+ */
+ public function save_script($name = null)
+ {
+ // Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
+ $this->sieve->script->set_var('EDITOR', self::PROGNAME);
+ $this->sieve->script->set_var('EDITOR_VERSION', self::VERSION);
+ }
+
+ return $this->sieve->save($name);
+ }
+
+ /**
+ * Returns list of rules from the current script
+ *
+ * @return array List of rules
+ */
+ public function list_rules()
+ {
+ $result = array();
+ $i = 1;
+
+ foreach ($this->script as $idx => $filter) {
+ if ($filter['type'] != 'if') {
+ continue;
+ }
+ $fname = $filter['name'] ? $filter['name'] : "#$i";
+ $result[] = array(
+ 'id' => $idx,
+ 'name' => $fname,
+ 'class' => $filter['disabled'] ? 'disabled' : '',
+ );
+ $i++;
}
- return $this->engine;
+ return $result;
}
}
diff --git a/plugins/managesieve/package.xml b/plugins/managesieve/package.xml
index 6ae53c250..a0c38b82d 100644
--- a/plugins/managesieve/package.xml
+++ b/plugins/managesieve/package.xml
@@ -17,16 +17,16 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2013-09-09</date>
+ <date>2013-02-17</date>
<version>
- <release>7.0</release>
- <api>7.0</api>
+ <release>6.2</release>
+ <api>6.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -38,10 +38,6 @@
<tasks:replace from="@name@" to="name" type="package-info"/>
<tasks:replace from="@package_version@" to="version" type="package-info"/>
</file>
- <file name="lib/Roundcube/rcube_sieve.php" role="php"></file>
- <file name="lib/Roundcube/rcube_sieve_engine.php" role="php"></file>
- <file name="lib/Roundcube/rcube_sieve_script.php" role="php"></file>
- <file name="lib/Net/Sieve.php" role="php"></file>
<file name="localization/be_BE.inc" role="data"></file>
<file name="localization/bg_BG.inc" role="data"></file>
<file name="localization/bs_BA.inc" role="data"></file>
@@ -97,7 +93,6 @@
<file name="skins/classic/images/add.png" role="data"></file>
<file name="skins/classic/images/del.png" role="data"></file>
<file name="skins/classic/images/down_small.gif" role="data"></file>
- <file name="skins/classic/images/erase.png" role="data"></file>
<file name="skins/classic/images/filter.png" role="data"></file>
<file name="skins/classic/images/up_small.gif" role="data"></file>
<file name="skins/larry/managesieve.css" role="data"></file>
@@ -108,8 +103,11 @@
<file name="skins/larry/images/add.png" role="data"></file>
<file name="skins/larry/images/del.png" role="data"></file>
<file name="skins/larry/images/down_small.gif" role="data"></file>
- <file name="skins/larry/images/erase.png" role="data"></file>
<file name="skins/larry/images/up_small.gif" role="data"></file>
+ <file name="managesieve.php" role="php"></file>
+ <file name="lib/rcube_sieve.php" role="php"></file>
+ <file name="lib/rcube_sieve_script.php" role="php"></file>
+ <file name="lib/Net/Sieve.php" role="php"></file>
<file name="config.inc.php.dist" role="data"></file>
</dir>
<!-- / -->
diff --git a/plugins/managesieve/skins/classic/managesieve.css b/plugins/managesieve/skins/classic/managesieve.css
index 59d88cb46..b7c6f5d06 100644
--- a/plugins/managesieve/skins/classic/managesieve.css
+++ b/plugins/managesieve/skins/classic/managesieve.css
@@ -171,12 +171,12 @@ td.advbutton a
td.advbutton a.show
{
- background: url(images/down_small.gif) center no-repeat;
+ background: url(images/down_small.gif?v=8629.106) center no-repeat;
}
td.advbutton a.hide
{
- background: url(images/up_small.gif) center no-repeat;
+ background: url(images/up_small.gif?v=c56c.106) center no-repeat;
}
td.rowbuttons
@@ -201,30 +201,11 @@ td.rowtargets
padding-top: 2px;
}
-td.rowtargets > div
-{
- vertical-align: top;
- margin-top: 2px;
-}
-
td.rowtargets div.adv
{
padding-top: 3px;
}
-td.rowtargets div.adv span.label
-{
- display: inline-block;
- padding-right: 10px;
- min-width: 65px;
-}
-
-html.mozilla #filter-form select
-{
- padding-top: 3px;
- padding-bottom: 3px;
-}
-
input.disabled, input.disabled:hover
{
color: #999999;
@@ -245,7 +226,6 @@ input.radio
select.operator_selector
{
width: 200px;
- vertical-align: top;
}
td.rowtargets span,
@@ -256,11 +236,6 @@ span.label
white-space: nowrap;
}
-td.rowtargets label
-{
- color: black;
-}
-
#footer
{
padding-top: 5px;
@@ -299,7 +274,7 @@ span.sieve.error
a.button.add
{
- background: url(images/add.png) no-repeat;
+ background: url(images/add.png?v=a165.280) no-repeat;
width: 30px;
height: 20px;
margin-right: 4px;
@@ -308,7 +283,7 @@ a.button.add
a.button.del
{
- background: url(images/del.png) no-repeat;
+ background: url(images/del.png?v=3c27.247) no-repeat;
width: 30px;
height: 20px;
display: inline-block;
@@ -326,78 +301,8 @@ a.button.disabled
#filter-form textarea
{
font-size: 11px;
- vertical-align: middle;
}
-/* smart multi-row input field */
-.listarea
-{
- border: 1px solid #666;
- margin: 0;
- padding: 1px;
- display: inline-block;
- max-height: 67px;
- overflow-y: auto;
-}
-
-td.rowtargets > span.listarea
-{
- vertical-align: top;
- margin-top: 2px;
-}
-
-.listelement
-{
- display: block;
- white-space: nowrap;
- background-color: #fff;
- border-top: 1px solid #e2e2e2;
- height: 16px;
- padding: 0;
- margin: 0;
- overflow: hidden;
- line-height: 16px;
-}
-
-.listarea.error .listelement
-{
- background-color: #FFFFC4;
-}
-
-.listelement:first-child
-{
- border-top: none;
-}
-
-#filter-form .listelement input
-{
- border: none;
- border-radius: 0;
- box-shadow: none;
- outline: none;
- vertical-align: top;
- height: 16px;
- padding-top: 0;
- padding-bottom: 0;
- line-height: 16px;
- background-color: transparent;
-}
-
-.listelement input:focus
-{
- box-shadow: none;
-}
-
-.listelement .reset
-{
- display: inline-block;
- width: 16px;
- height: 16px;
- background: url(images/erase.png) -1px 0 no-repeat #eee;
- cursor: pointer;
-}
-
-
/* fixes for popup window */
body.iframe.mail
diff --git a/plugins/managesieve/skins/classic/managesieve_mail.css b/plugins/managesieve/skins/classic/managesieve_mail.css
index 87a11cc92..73cc47ba2 100644
--- a/plugins/managesieve/skins/classic/managesieve_mail.css
+++ b/plugins/managesieve/skins/classic/managesieve_mail.css
@@ -1,5 +1,5 @@
#messagemenu li a.filterlink {
- background-image: url(images/filter.png);
+ background-image: url(images/filter.png?v=b0fe.547);
background-position: 7px 0;
}
diff --git a/plugins/managesieve/skins/classic/templates/managesieve.html b/plugins/managesieve/skins/classic/templates/managesieve.html
index 869e3ac36..71eebe105 100644
--- a/plugins/managesieve/skins/classic/templates/managesieve.html
+++ b/plugins/managesieve/skins/classic/templates/managesieve.html
@@ -19,7 +19,7 @@
</style>
</head>
-<body>
+<body onload="rcube_init_mail_ui()">
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -83,9 +83,5 @@
</ul>
</div>
-<script type="text/javascript">
-rcube_init_mail_ui();
-</script>
-
</body>
</html>
diff --git a/plugins/managesieve/skins/larry/managesieve.css b/plugins/managesieve/skins/larry/managesieve.css
index 2144fe13f..bf5910edc 100644
--- a/plugins/managesieve/skins/larry/managesieve.css
+++ b/plugins/managesieve/skins/larry/managesieve.css
@@ -43,7 +43,7 @@
#filtersetslist
{
width: 100%;
- table-layout: fixed;
+ table-layout: fixed;
}
#filterslist tbody td,
@@ -145,12 +145,12 @@ td.advbutton a
td.advbutton a.show
{
- background: url(images/down_small.gif) center no-repeat;
+ background: url(images/down_small.gif?v=8629.106) center no-repeat;
}
td.advbutton a.hide
{
- background: url(images/up_small.gif) center no-repeat;
+ background: url(images/up_small.gif?v=c56c.106) center no-repeat;
}
td.rowbuttons
@@ -175,23 +175,9 @@ td.rowtargets
padding-top: 2px;
}
-td.rowtargets > div
-{
- vertical-align: top;
- margin-top: 2px;
-}
-
td.rowtargets div.adv
{
padding-top: 3px;
- font-size: 10px;
-}
-
-td.rowtargets div.adv span.label
-{
- display: inline-block;
- padding-right: 5px;
- min-width: 70px;
}
input.disabled, input.disabled:hover
@@ -211,15 +197,9 @@ input.radio
margin-top: 0;
}
-input.radio
-{
- vertical-align: middle;
-}
-
select.operator_selector
{
width: 200px;
- vertical-align: top;
}
td.rowtargets span,
@@ -230,11 +210,6 @@ span.label
white-space: nowrap;
}
-td.rowtargets label
-{
- color: black;
-}
-
#footer
{
padding-top: 5px;
@@ -277,7 +252,7 @@ a.button
a.button.add
{
- background: url(images/add.png) no-repeat;
+ background: url(images/add.png?v=a165.280) no-repeat;
width: 30px;
height: 20px;
margin-right: 4px;
@@ -286,7 +261,7 @@ a.button.add
a.button.del
{
- background: url(images/del.png) no-repeat;
+ background: url(images/del.png?v=3c27.247) no-repeat;
width: 30px;
height: 20px;
display: inline-block;
@@ -305,13 +280,6 @@ a.button.disabled
{
font-size: 11px;
padding: 1px;
- vertical-align: middle;
-}
-
-html.mozilla #filter-form select
-{
- padding-top: 3px;
- padding-bottom: 3px;
}
/* revert larry style button */
@@ -328,80 +296,6 @@ fieldset
border-radius: 4px;
}
-/* smart multi-row input field */
-.listarea
-{
- border: 1px solid #B2B2B2;
- border-radius: 4px;
- box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1);
- -moz-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1);
- -webkit-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1);
- -o-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1);
- margin: 0;
- padding: 2px;
- display: inline-block;
- max-height: 59px;
- overflow-y: auto;
-}
-
-td.rowtargets > span.listarea
-{
- vertical-align: top;
- margin-top: 2px;
-}
-
-.listelement
-{
- display: block;
- white-space: nowrap;
- background-color: #fff;
- border-top: 1px solid #e2e2e2;
- height: 14px;
- padding: 0;
- margin: 0;
- overflow: hidden;
- line-height: 14px;
-}
-
-.listarea.error .listelement
-{
- background-color: #FFFFC4;
-}
-
-.listelement:first-child
-{
- border-top: none;
-}
-
-#filter-form .listelement input
-{
- border: none;
- border-radius: 0;
- box-shadow: none;
- outline: none;
- vertical-align: top;
- height: 14px;
- padding-top: 0;
- padding-bottom: 0;
- line-height: 14px;
- background-color: transparent;
-}
-
-.listelement input:focus
-{
- box-shadow: none;
-}
-
-.listelement .reset
-{
- display: inline-block;
- width: 16px;
- height: 16px;
- background: url(images/erase.png) -1px -1px no-repeat #eee;
- cursor: pointer;
-}
-
-
/* fixes for popup window */
body.iframe.mail
diff --git a/plugins/managesieve/tests/src/parser.out b/plugins/managesieve/tests/src/parser.out
index cb0bad5e7..385c8890d 100644
--- a/plugins/managesieve/tests/src/parser.out
+++ b/plugins/managesieve/tests/src/parser.out
@@ -1,4 +1,4 @@
-require ["envelope","fileinto","reject"];
+require ["fileinto","reject","envelope"];
# rule:[spam]
if header :contains "X-DSPAM-Result" "Spam"
{
@@ -39,7 +39,7 @@ if true
}
fileinto "Test";
# rule:[address test]
-if address :is "From" "nagios@domain.tld"
+if address :all :is "From" "nagios@domain.tld"
{
fileinto "domain.tld";
stop;
diff --git a/plugins/managesieve/tests/src/parser_enotify_b b/plugins/managesieve/tests/src/parser_enotify_b
index a3011bac2..8854658f4 100644
--- a/plugins/managesieve/tests/src/parser_enotify_b
+++ b/plugins/managesieve/tests/src/parser_enotify_b
@@ -1,6 +1,6 @@
-require ["enotify","envelope","variables"];
+require ["envelope","variables","enotify"];
# rule:[from]
-if envelope :matches "from" "*"
+if envelope :all :matches "from" "*"
{
set "env_from" " [really: ${1}]";
}
@@ -10,7 +10,7 @@ if header :matches "Subject" "*"
set "subject" "${1}";
}
# rule:[from notify]
-if address :matches "from" "*"
+if address :all :matches "from" "*"
{
set "from_addr" "${1}";
notify :message "${from_addr}${env_from}: ${subject}" "mailto:alm@example.com";
diff --git a/plugins/managesieve/tests/src/parser_notify_b b/plugins/managesieve/tests/src/parser_notify_b
index ab90ed48c..cf80a9701 100644
--- a/plugins/managesieve/tests/src/parser_notify_b
+++ b/plugins/managesieve/tests/src/parser_notify_b
@@ -1,6 +1,6 @@
-require ["envelope","notify","variables"];
+require ["envelope","variables","notify"];
# rule:[from]
-if envelope :matches "from" "*"
+if envelope :all :matches "from" "*"
{
set "env_from" " [really: ${1}]";
}
@@ -10,7 +10,7 @@ if header :matches "Subject" "*"
set "subject" "${1}";
}
# rule:[from notify]
-if address :matches "from" "*"
+if address :all :matches "from" "*"
{
set "from_addr" "${1}";
notify :message "${from_addr}${env_from}: ${subject}" :method "sms:1234567890";
diff --git a/plugins/managesieve/tests/src/parser_relational b/plugins/managesieve/tests/src/parser_relational
index 92c5e1a8e..0a92fde54 100644
--- a/plugins/managesieve/tests/src/parser_relational
+++ b/plugins/managesieve/tests/src/parser_relational
@@ -1,4 +1,4 @@
-require ["comparator-i;ascii-numeric","relational"];
+require ["relational","comparator-i;ascii-numeric"];
# rule:[redirect]
if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14"
{
diff --git a/plugins/managesieve/tests/src/parser_subaddress b/plugins/managesieve/tests/src/parser_subaddress
index e44555096..f106b796e 100644
--- a/plugins/managesieve/tests/src/parser_subaddress
+++ b/plugins/managesieve/tests/src/parser_subaddress
@@ -1,4 +1,4 @@
-require ["envelope","fileinto","subaddress"];
+require ["envelope","subaddress","fileinto"];
if envelope :user "To" "postmaster"
{
fileinto "postmaster";
diff --git a/plugins/markasjunk/localization/ar.inc b/plugins/markasjunk/localization/ar.inc
new file mode 100644
index 000000000..1915e97fb
--- /dev/null
+++ b/plugins/markasjunk/localization/ar.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/markasjunk/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Mark-As-Junk 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-markasjunk/
+*/
+$labels['buttontext'] = 'غير المرغوب';
+$labels['buttontitle'] = 'حدد كغير مرغوب';
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/bg_BG.inc b/plugins/markasjunk/localization/bg_BG.inc
new file mode 100644
index 000000000..c49bafaab
--- /dev/null
+++ b/plugins/markasjunk/localization/bg_BG.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/markasjunk/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Mark-As-Junk 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-markasjunk/
+*/
+$labels['buttontext'] = 'Спам';
+$labels['buttontitle'] = 'Маркирай като спам';
+$labels['reportedasjunk'] = 'Писмото е маркирано като спам успешно';
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/en_US.inc b/plugins/markasjunk/localization/en_US.inc
index aaa3c91ac..0cc212f22 100644
--- a/plugins/markasjunk/localization/en_US.inc
+++ b/plugins/markasjunk/localization/en_US.inc
@@ -2,10 +2,10 @@
/*
+-----------------------------------------------------------------------+
- | plugins/markasjunk/localization/<lang>.inc |
+ | plugins/markasjunk/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Mark-As-Junk plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/markasjunk/localization/eu_ES.inc b/plugins/markasjunk/localization/eu_ES.inc
new file mode 100644
index 000000000..ade169b70
--- /dev/null
+++ b/plugins/markasjunk/localization/eu_ES.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/markasjunk/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Mark-As-Junk 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-markasjunk/
+*/
+$labels['buttontext'] = 'Zabor-mezua';
+$labels['buttontitle'] = 'Markatu zabor-mezu bezala';
+$labels['reportedasjunk'] = 'Zabor bezala markatu da';
+?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/lb_LU.inc b/plugins/markasjunk/localization/lb_LU.inc
index eb211d66c..c6f1081e2 100644
--- a/plugins/markasjunk/localization/lb_LU.inc
+++ b/plugins/markasjunk/localization/lb_LU.inc
@@ -15,10 +15,7 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/
*/
-
-$labels = array();
$labels['buttontext'] = 'Spam';
$labels['buttontitle'] = 'Als Spam markéieren';
$labels['reportedasjunk'] = 'Erfollegräich als Spam gemellt';
-
?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/lv_LV.inc b/plugins/markasjunk/localization/lv_LV.inc
index 5389ae399..f0ea921ba 100644
--- a/plugins/markasjunk/localization/lv_LV.inc
+++ b/plugins/markasjunk/localization/lv_LV.inc
@@ -17,8 +17,8 @@
*/
$labels = array();
-$labels['buttontext'] = 'Mēstules';
-$labels['buttontitle'] = 'Atzīmēt kā mēstuli';
-$labels['reportedasjunk'] = 'Sekmīgi iatzīmēta kā mēstule';
+$labels['buttontext'] = 'Junk';
+$labels['buttontitle'] = 'Iezīmēt kā mēstuli';
+$labels['reportedasjunk'] = 'Sekmīgi iezīmēta kā mēstule';
?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/ro_RO.inc b/plugins/markasjunk/localization/ro_RO.inc
index 03e5824c2..1186aab73 100644
--- a/plugins/markasjunk/localization/ro_RO.inc
+++ b/plugins/markasjunk/localization/ro_RO.inc
@@ -17,8 +17,8 @@
*/
$labels = array();
-$labels['buttontext'] = 'Vechituri';
-$labels['buttontitle'] = 'Marchează ca SPAM';
-$labels['reportedasjunk'] = 'Raportat cu succes ca SPAM';
+$labels['buttontext'] = 'Spam';
+$labels['buttontitle'] = 'Marchează ca Spam';
+$labels['reportedasjunk'] = 'Raportat cu succes ca Spam';
?> \ No newline at end of file
diff --git a/plugins/markasjunk/localization/ru_RU.inc b/plugins/markasjunk/localization/ru_RU.inc
index d2b6abd40..cbf99d253 100644
--- a/plugins/markasjunk/localization/ru_RU.inc
+++ b/plugins/markasjunk/localization/ru_RU.inc
@@ -18,7 +18,7 @@
$labels = array();
$labels['buttontext'] = 'СПАМ';
-$labels['buttontitle'] = 'Переместить в СПАМ';
-$labels['reportedasjunk'] = 'Перемещено в СПАМ';
+$labels['buttontitle'] = 'Переместить в "СПАМ';
+$labels['reportedasjunk'] = 'Перемещено в "СПАМ';
?> \ No newline at end of file
diff --git a/plugins/markasjunk2/config.inc.php.dist b/plugins/markasjunk2/config.inc.php.dist
new file mode 100644
index 000000000..7cfcfd5ea
--- /dev/null
+++ b/plugins/markasjunk2/config.inc.php.dist
@@ -0,0 +1,152 @@
+<?php
+
+/**
+ * MarkAsJunk2 configuration file
+ */
+
+// Learning driver
+// Use an external process such as sa-learn to learn from spam/ham messages. Default: null.
+// Please see the README for more information
+$rcmail_config['markasjunk2_learning_driver'] = null;
+
+// Ham mailbox
+// Mailbox messages should be moved to when they are marked as ham. null = INBOX
+// set to FALSE to disable message moving
+$rcmail_config['markasjunk2_ham_mbox'] = null;
+
+// Spam mailbox
+// Mailbox messages should be moved to when they are marked as spam.
+// null = the mailbox assigned as the spam folder in Roundcube settings
+// set to FALSE to disable message moving
+$rcmail_config['markasjunk2_spam_mbox'] = null;
+
+// Mark messages as read when reporting them as spam
+$rcmail_config['markasjunk2_read_spam'] = true;
+
+// Mark messages as unread when reporting them as ham
+$rcmail_config['markasjunk2_unread_ham'] = false;
+
+// Add flag to messages marked as spam (flag will be removed when marking as ham)
+// If you do not want to use message flags set this to null
+$rcmail_config['markasjunk2_spam_flag'] = 'Junk';
+
+// Add flag to messages marked as ham (flag will be removed when marking as spam)
+// If you do not want to use message flags set this to null
+$rcmail_config['markasjunk2_ham_flag'] = null;
+
+// Write output from spam/ham commands to the log for debug
+$rcmail_config['markasjunk2_debug'] = false;
+
+// Show icon on mailbox toolbar
+// The mark as spam/ham icon can either be displayed on the toolbar or as part of the mark messages menu
+$rcmail_config['markasjunk2_mb_toolbar'] = true;
+
+// Show icon on compose toolbar
+// The mark as spam/ham icon can either be displayed on the toolbar or as part of the mark messages menu
+$rcmail_config['markasjunk2_cp_toolbar'] = true;
+
+// Learn any message moved to the spam mailbox as spam (not just when the button is pressed)
+$rcmail_config['markasjunk2_move_spam'] = false;
+
+// Learn any message moved from the spam mailbox to the ham mailbox as ham (not just when the button is pressed)
+$rcmail_config['markasjunk2_move_ham'] = false;
+
+// cmd_learn Driver options
+// ------------------------
+// The command used to learn that a message is spam
+// The command can contain the following macros that will be expanded as follows:
+// %u is replaced with the username (from the session info)
+// %l is replaced with the local part of the username (if the username is an email address)
+// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
+// %i is replaced with the email address from the user's default identity
+// %xds is replaced with the X-DSPAM-Signature header
+// %f is replaced with the path to the message file
+// If you do not want run the command set this to null
+$rcmail_config['markasjunk2_spam_cmd'] = null;
+
+// The command used to learn that a message is ham
+// The command can contain the following macros that will be expanded as follows:
+// %u is replaced with the username (from the session info)
+// %l is replaced with the local part of the username (if the username is an email address)
+// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
+// %i is replaced with the email address from the user's default identity
+// %xds is replaced with the X-DSPAM-Signature header
+// %f is replaced with the path to the message file
+// If you do not want run the command set this to null
+$rcmail_config['markasjunk2_ham_cmd'] = null;
+
+// dir_learn Driver options
+// ------------------------
+// The full path of the directory used to store spam (must be writable by webserver)
+$rcmail_config['markasjunk2_spam_dir'] = null;
+
+// The full path of the directory used to store ham (must be writable by webserver)
+$rcmail_config['markasjunk2_ham_dir'] = null;
+
+// The filename prefix
+// The filename can contain the following macros that will be expanded as follows:
+// %u is replaced with the username (from the session info)
+// %l is replaced with the local part of the username (if the username is an email address)
+// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
+// %t is replaced with the type of message (spam/ham)
+$rcmail_config['markasjunk2_filename'] = null;
+
+// email_learn Driver options
+// --------------------------
+// The email address that spam messages will be sent to
+// The address can contain the following macros that will be expanded as follows:
+// %u is replaced with the username (from the session info)
+// %l is replaced with the local part of the username (if the username is an email address)
+// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
+// %i is replaced with the email address from the user's default identity
+// If you do not want to send an email set this to null
+$rcmail_config['markasjunk2_email_spam'] = null;
+
+// The email address that ham messages will be sent to
+// The address can contain the following macros that will be expanded as follows:
+// %u is replaced with the username (from the session info)
+// %l is replaced with the local part of the username (if the username is an email address)
+// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
+// %i is replaced with the email address from the user's default identity
+// If you do not want to send an email set this to null
+$rcmail_config['markasjunk2_email_ham'] = null;
+
+// Should the spam/ham message be sent as an attachment
+$rcmail_config['markasjunk2_email_attach'] = true;
+
+// The email subject (when sending as attachment)
+// The subject can contain the following macros that will be expanded as follows:
+// %u is replaced with the username (from the session info)
+// %l is replaced with the local part of the username (if the username is an email address)
+// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
+// %t is replaced with the type of message (spam/ham)
+$rcmail_config['markasjunk2_email_subject'] = 'learn this message as %t';
+
+// sa_blacklist Driver options
+// ---------------------------
+// Path to SAUserPrefs config file
+$rcmail_config['markasjunk2_sauserprefs_config'] = '../sauserprefs/config.inc.php';
+
+// edit_headers Driver options
+// ---------------------------
+// Patterns to match and replace headers for spam messages
+// Replacement method uses preg_replace - http://www.php.net/manual/function.preg-replace.php
+// WARNING: Be sure to match the entire header line, including the name of the header, also use ^ and $ and the 'm' flag
+// see the README for an example
+// TEST CAREFULLY BEFORE USE ON REAL MESSAGES
+$rcmail_config['markasjunk2_spam_patterns'] = array(
+ 'patterns' => array(),
+ 'replacements' => array()
+ );
+
+// Patterns to match and replace headers for spam messages
+// Replacement method uses preg_replace - http://www.php.net/manual/function.preg-replace.php
+// WARNING: Be sure to match the entire header line, including the name of the header, also use ^ and $ and the 'm' flag
+// see the README for an example
+// TEST CAREFULLY BEFORE USE ON REAL MESSAGES
+$rcmail_config['markasjunk2_ham_patterns'] = array(
+ 'patterns' => array(),
+ 'replacements' => array()
+ );
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/drivers/cmd_learn.php b/plugins/markasjunk2/drivers/cmd_learn.php
new file mode 100644
index 000000000..f27adc1d1
--- /dev/null
+++ b/plugins/markasjunk2/drivers/cmd_learn.php
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * Command line learn driver
+ * @version 2.0
+ * @author Philip Weir
+ * Patched by Julien Vehent to support DSPAM
+ * Enhanced support for DSPAM by Stevan Bajic <stevan@bajic.ch>
+ */
+
+class markasjunk2_cmd_learn
+{
+ public function spam($uids)
+ {
+ $this->_do_salearn($uids, true);
+ }
+
+ public function ham($uids)
+ {
+ $this->_do_salearn($uids, false);
+ }
+
+ private function _do_salearn($uids, $spam)
+ {
+ $rcmail = rcube::get_instance();
+ $temp_dir = realpath($rcmail->config->get('temp_dir'));
+
+ if ($spam)
+ $command = $rcmail->config->get('markasjunk2_spam_cmd');
+ else
+ $command = $rcmail->config->get('markasjunk2_ham_cmd');
+
+ if (!$command)
+ return;
+
+ $command = str_replace('%u', $_SESSION['username'], $command);
+ $command = str_replace('%l', $rcmail->user->get_username('local'), $command);
+ $command = str_replace('%d', $rcmail->user->get_username('domain'), $command);
+ if (preg_match('/%i/', $command)) {
+ $identity_arr = $rcmail->user->get_identity();
+ $command = str_replace('%i', $identity_arr['email'], $command);
+ }
+
+ foreach (explode(",", $uids) as $uid) {
+ // get DSPAM signature from header (if %xds macro is used)
+ if (preg_match('/%xds/', $command)) {
+ if (preg_match('/^X\-DSPAM\-Signature:\s+((\d+,)?([a-f\d]+))\s*$/im', $rcmail->storage->get_raw_headers($uid), $dspam_signature))
+ $tmp_command = str_replace('%xds', $dspam_signature[1], $command);
+ else
+ continue; // no DSPAM signature found in headers -> continue with next uid/message
+ }
+
+ if (preg_match('/%f/', $command)) {
+ $tmpfname = tempnam($temp_dir, 'rcmSALearn');
+ file_put_contents($tmpfname, $rcmail->storage->get_raw_body($uid));
+ $tmp_command = str_replace('%f', $tmpfname, $command);
+ }
+
+ exec($tmp_command, $output);
+
+ if ($rcmail->config->get('markasjunk2_debug')) {
+ rcube::write_log('markasjunk2', $tmp_command);
+ rcube::write_log('markasjunk2', $output);
+ }
+
+ if (preg_match('/%f/', $command))
+ unlink($tmpfname);
+
+ $output = '';
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/drivers/dir_learn.php b/plugins/markasjunk2/drivers/dir_learn.php
new file mode 100644
index 000000000..88dc7e4eb
--- /dev/null
+++ b/plugins/markasjunk2/drivers/dir_learn.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * Copy spam/ham messages to a direcotry for learning later
+ * @version 2.0
+ * @author Philip Weir
+ */
+
+class markasjunk2_dir_learn
+{
+ public function spam($uids)
+ {
+ $this->_do_messagemove($uids, true);
+ }
+
+ public function ham($uids)
+ {
+ $this->_do_messagemove($uids, false);
+ }
+
+ private function _do_messagemove($uids, $spam)
+ {
+ $rcmail = rcube::get_instance();
+
+ if ($spam)
+ $dest_dir = unslashify($rcmail->config->get('markasjunk2_spam_dir'));
+ else
+ $dest_dir = unslashify($rcmail->config->get('markasjunk2_ham_dir'));
+
+ if (!$dest_dir)
+ return;
+
+ $filename = $rcmail->config->get('markasjunk2_filename');
+ $filename = str_replace('%u', $_SESSION['username'], $filename);
+ $filename = str_replace('%t', ($spam) ? 'spam' : 'ham', $filename);
+ $filename = str_replace('%l', $rcmail->user->get_username('local'), $filename);
+ $filename = str_replace('%d', $rcmail->user->get_username('domain'), $filename);
+
+ foreach (explode(",", $uids) as $uid) {
+ $tmpfname = tempnam($dest_dir, $filename);
+ file_put_contents($tmpfname, $rcmail->storage->get_raw_body($uid));
+
+ if ($rcmail->config->get('markasjunk2_debug'))
+ rcube::write_log('markasjunk2', $tmpfname);
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/drivers/edit_headers.php b/plugins/markasjunk2/drivers/edit_headers.php
new file mode 100644
index 000000000..9ee71ff79
--- /dev/null
+++ b/plugins/markasjunk2/drivers/edit_headers.php
@@ -0,0 +1,53 @@
+<?php
+
+/**
+ * Edit headers
+ * @version 1.0
+ * @author Philip Weir
+ */
+
+class markasjunk2_edit_headers
+{
+ public function spam(&$uids)
+ {
+ $this->_edit_headers($uids, true);
+ }
+
+ public function ham(&$uids)
+ {
+ $this->_edit_headers($uids, false);
+ }
+
+ private function _edit_headers(&$uids, $spam)
+ {
+ $rcmail = rcube::get_instance();
+ $args = $spam ? $rcmail->config->get('markasjunk2_spam_patterns') : $rcmail->config->get('markasjunk2_ham_patterns');
+
+ if (sizeof($args['patterns']) == 0)
+ return;
+
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
+
+ $new_uids = array();
+ foreach (explode(",", $uids) as $uid) {
+ $raw_message = $rcmail->storage->get_raw_body($uid);
+ $raw_headers = $rcmail->storage->get_raw_headers($uid);
+
+ $updated_headers = preg_replace($args['patterns'], $args['replacements'], $raw_headers);
+ $raw_message = str_replace($raw_headers, $updated_headers, $raw_message);
+
+ $saved = $rcmail->storage->save_message($mbox, $raw_message);
+
+ if ($saved !== false) {
+ $rcmail->output->command('rcmail_markasjunk2_move', null, $uid);
+ array_push($new_uids, $saved);
+ }
+
+ }
+
+ if (sizeof($new_uids) > 0)
+ $uids = implode(',', $new_uids);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/drivers/email_learn.php b/plugins/markasjunk2/drivers/email_learn.php
new file mode 100644
index 000000000..b7f9f87ea
--- /dev/null
+++ b/plugins/markasjunk2/drivers/email_learn.php
@@ -0,0 +1,191 @@
+<?php
+
+/**
+ * Email learn driver
+ * @version 2.0
+ * @author Philip Weir
+ */
+
+class markasjunk2_email_learn
+{
+ public function spam($uids)
+ {
+ $this->_do_emaillearn($uids, true);
+ }
+
+ public function ham($uids)
+ {
+ $this->_do_emaillearn($uids, false);
+ }
+
+ private function _do_emaillearn($uids, $spam)
+ {
+ $rcmail = rcube::get_instance();
+ $identity_arr = $rcmail->user->get_identity();
+ $from = $identity_arr['email'];
+
+ if ($spam)
+ $mailto = $rcmail->config->get('markasjunk2_email_spam');
+ else
+ $mailto = $rcmail->config->get('markasjunk2_email_ham');
+
+ $mailto = str_replace('%u', $_SESSION['username'], $mailto);
+ $mailto = str_replace('%l', $rcmail->user->get_username('local'), $mailto);
+ $mailto = str_replace('%d', $rcmail->user->get_username('domain'), $mailto);
+ $mailto = str_replace('%i', $from, $mailto);
+
+ if (!$mailto)
+ return;
+
+ $message_charset = $rcmail->output->get_charset();
+ // chose transfer encoding
+ $charset_7bit = array('ASCII', 'ISO-2022-JP', 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-15');
+ $transfer_encoding = in_array(strtoupper($message_charset), $charset_7bit) ? '7bit' : '8bit';
+
+ $temp_dir = realpath($rcmail->config->get('temp_dir'));
+
+ $subject = $rcmail->config->get('markasjunk2_email_subject');
+ $subject = str_replace('%u', $_SESSION['username'], $subject);
+ $subject = str_replace('%t', ($spam) ? 'spam' : 'ham', $subject);
+ $subject = str_replace('%l', $rcmail->user->get_username('local'), $subject);
+ $subject = str_replace('%d', $rcmail->user->get_username('domain'), $subject);
+
+ // compose headers array
+ $headers = array();
+ $headers['Date'] = date('r');
+ $headers['From'] = format_email_recipient($identity_arr['email'], $identity_arr['name']);
+ $headers['To'] = $mailto;
+ $headers['Subject'] = $subject;
+
+ foreach (explode(",", $uids) as $uid) {
+ $MESSAGE = new rcube_message($uid);
+
+ // set message charset as default
+ if (!empty($MESSAGE->headers->charset))
+ $rcmail->storage->set_charset($MESSAGE->headers->charset);
+
+ $MAIL_MIME = new Mail_mime($rcmail->config->header_delimiter());
+
+ if ($rcmail->config->get('markasjunk2_email_attach', false)) {
+ $tmpPath = tempnam($temp_dir, 'rcmMarkASJunk2');
+
+ // send mail as attachment
+ $MAIL_MIME->setTXTBody(($spam ? 'Spam' : 'Ham'). ' report from ' . $rcmail->config->get('product_name'), false, true);
+
+ $raw_message = $rcmail->storage->get_raw_body($uid);
+ $subject = $MESSAGE->get_header('subject');
+
+ if (isset($subject) && $subject !="")
+ $disp_name = $subject . ".eml";
+ else
+ $disp_name = "message_rfc822.eml";
+
+ if (file_put_contents($tmpPath, $raw_message)) {
+ $MAIL_MIME->addAttachment($tmpPath, "message/rfc822", $disp_name, true,
+ $transfer_encoding, 'attachment', '', '', '',
+ $rcmail->config->get('mime_param_folding') ? 'quoted-printable' : NULL,
+ $rcmail->config->get('mime_param_folding') == 2 ? 'quoted-printable' : NULL,
+ '', RCUBE_CHARSET
+ );
+ }
+
+ // encoding settings for mail composing
+ $MAIL_MIME->setParam('text_encoding', $transfer_encoding);
+ $MAIL_MIME->setParam('html_encoding', 'quoted-printable');
+ $MAIL_MIME->setParam('head_encoding', 'quoted-printable');
+ $MAIL_MIME->setParam('head_charset', $message_charset);
+ $MAIL_MIME->setParam('html_charset', $message_charset);
+ $MAIL_MIME->setParam('text_charset', $message_charset);
+
+ // pass headers to message object
+ $MAIL_MIME->headers($headers);
+ }
+ else {
+ $headers['Resent-From'] = $headers['From'];
+ $headers['Resent-Date'] = $headers['Date'];
+ $headers['Date'] = $MESSAGE->headers->date;
+ $headers['From'] = $MESSAGE->headers->from;
+ $headers['Subject'] = $MESSAGE->headers->subject;
+ $MAIL_MIME->headers($headers);
+
+ if ($MESSAGE->has_html_part()) {
+ $body = $MESSAGE->first_html_part();
+ $MAIL_MIME->setHTMLBody($body);
+ }
+
+ $body = $MESSAGE->first_text_part();
+ $MAIL_MIME->setTXTBody($body, false, true);
+
+ foreach ($MESSAGE->attachments as $attachment) {
+ $MAIL_MIME->addAttachment(
+ $MESSAGE->get_part_content($attachment->mime_id),
+ $attachment->mimetype,
+ $attachment->filename,
+ false,
+ $attachment->encoding,
+ $attachment->disposition,
+ '', $attachment->charset
+ );
+ }
+
+ foreach ($MESSAGE->mime_parts as $attachment) {
+ if (!empty($attachment->content_id)) {
+ // covert CID to Mail_MIME format
+ $attachment->content_id = str_replace('<', '', $attachment->content_id);
+ $attachment->content_id = str_replace('>', '', $attachment->content_id);
+
+ if (empty($attachment->filename))
+ $attachment->filename = $attachment->content_id;
+
+ $message_body = $MAIL_MIME->getHTMLBody();
+ $dispurl = 'cid:' . $attachment->content_id;
+ $message_body = str_replace($dispurl, $attachment->filename, $message_body);
+ $MAIL_MIME->setHTMLBody($message_body);
+
+ $MAIL_MIME->addHTMLImage(
+ $MESSAGE->get_part_content($attachment->mime_id),
+ $attachment->mimetype,
+ $attachment->filename,
+ false
+ );
+ }
+ }
+
+ // encoding settings for mail composing
+ $MAIL_MIME->setParam('head_encoding', $MESSAGE->headers->encoding);
+ $MAIL_MIME->setParam('head_charset', $MESSAGE->headers->charset);
+
+ foreach ($MESSAGE->mime_parts as $mime_id => $part) {
+ $mimetype = strtolower($part->ctype_primary . '/' . $part->ctype_secondary);
+
+ if ($mimetype == 'text/html') {
+ $MAIL_MIME->setParam('text_encoding', $part->encoding);
+ $MAIL_MIME->setParam('html_charset', $part->charset);
+ }
+ else if ($mimetype == 'text/plain') {
+ $MAIL_MIME->setParam('html_encoding', $part->encoding);
+ $MAIL_MIME->setParam('text_charset', $part->charset);
+ }
+ }
+ }
+
+ $rcmail->rcmail_deliver_message($MAIL_MIME, $from, $mailto, $smtp_error, $body_file);
+
+ // clean up
+ if (file_exists($tmpPath))
+ unlink($tmpPath);
+
+ if ($rcmail->config->get('markasjunk2_debug')) {
+ if ($spam)
+ rcube::write_log('markasjunk2', $uid . ' SPAM ' . $mailto . ' (' . $subject . ')');
+ else
+ rcube::write_log('markasjunk2', $uid . ' HAM ' . $mailto . ' (' . $subject . ')');
+
+ if ($smtp_error['vars'])
+ rcube::write_log('markasjunk2', $smtp_error['vars']);
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/drivers/sa_blacklist.php b/plugins/markasjunk2/drivers/sa_blacklist.php
new file mode 100644
index 000000000..dd2ce6bc7
--- /dev/null
+++ b/plugins/markasjunk2/drivers/sa_blacklist.php
@@ -0,0 +1,103 @@
+<?php
+
+/**
+ * SpamAssassin Blacklist driver
+ * @version 2.0
+ * @requires SAUserPrefs plugin
+ * @author Philip Weir
+ */
+
+class markasjunk2_sa_blacklist
+{
+ public function spam($uids)
+ {
+ $this->_do_list($uids, true);
+ }
+
+ public function ham($uids)
+ {
+ $this->_do_list($uids, false);
+ }
+
+ private function _do_list($uids, $spam)
+ {
+ $rcmail = rcube::get_instance();
+ if (is_file($rcmail->config->get('markasjunk2_sauserprefs_config')) && !$rcmail->config->load_from_file($rcmail->config->get('markasjunk2_sauserprefs_config'))) {
+ rcube::raise_error(array('code' => 527, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Failed to load config from " . $rcmail->config->get('markasjunk2_sauserprefs_config')), true, false);
+ return false;
+ }
+
+ $db = rcube_db::factory($rcmail->config->get('sauserprefs_db_dsnw'), $rcmail->config->get('sauserprefs_db_dsnr'), $rcmail->config->get('sauserprefs_db_persistent'));
+ $db->db_connect('w');
+
+ // check DB connections and exit on failure
+ if ($err_str = $db->is_error()) {
+ rcube::raise_error(array(
+ 'code' => 603,
+ 'type' => 'db',
+ 'message' => $err_str), FALSE, TRUE);
+ }
+
+ foreach (explode(",", $uids) as $uid) {
+ $message = new rcube_message($uid);
+ $email = $message->sender['mailto'];
+
+ if ($spam) {
+ // delete any whitelisting for this address
+ $db->query(
+ "DELETE FROM ". $rcmail->config->get('sauserprefs_sql_table_name') ." WHERE ". $rcmail->config->get('sauserprefs_sql_username_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_preference_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_value_field') ." = ?;",
+ $_SESSION['username'],
+ 'whitelist_from',
+ $email);
+
+ // check address is not already blacklisted
+ $sql_result = $db->query(
+ "SELECT value FROM ". $rcmail->config->get('sauserprefs_sql_table_name') ." WHERE ". $rcmail->config->get('sauserprefs_sql_username_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_preference_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_value_field') ." = ?;",
+ $_SESSION['username'],
+ 'blacklist_from',
+ $email);
+
+ if (!$db->fetch_array($sql_result)) {
+ $db->query(
+ "INSERT INTO ". $rcmail->config->get('sauserprefs_sql_table_name') ." (". $rcmail->config->get('sauserprefs_sql_username_field') .", ". $rcmail->config->get('sauserprefs_sql_preference_field') .", ". $rcmail->config->get('sauserprefs_sql_value_field') .") VALUES (?, ?, ?);",
+ $_SESSION['username'],
+ 'blacklist_from',
+ $email);
+
+ if ($rcmail->config->get('markasjunk2_debug'))
+ rcube::write_log('markasjunk2', $_SESSION['username'] . ' blacklist ' . $email);
+ }
+ }
+ else {
+ // delete any blacklisting for this address
+ $db->query(
+ "DELETE FROM ". $rcmail->config->get('sauserprefs_sql_table_name') ." WHERE ". $rcmail->config->get('sauserprefs_sql_username_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_preference_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_value_field') ." = ?;",
+ $_SESSION['username'],
+ 'blacklist_from',
+ $email);
+
+ // check address is not already whitelisted
+ $sql_result = $db->query(
+ "SELECT value FROM ". $rcmail->config->get('sauserprefs_sql_table_name') ." WHERE ". $rcmail->config->get('sauserprefs_sql_username_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_preference_field') ." = ? AND ". $rcmail->config->get('sauserprefs_sql_value_field') ." = ?;",
+ $_SESSION['username'],
+ 'whitelist_from',
+ $email);
+
+ if (!$db->fetch_array($sql_result)) {
+ $db->query(
+ "INSERT INTO ". $rcmail->config->get('sauserprefs_sql_table_name') ." (". $rcmail->config->get('sauserprefs_sql_username_field') .", ". $rcmail->config->get('sauserprefs_sql_preference_field') .", ". $rcmail->config->get('sauserprefs_sql_value_field') .") VALUES (?, ?, ?);",
+ $_SESSION['username'],
+ 'whitelist_from',
+ $email);
+
+ if ($rcmail->config->get('markasjunk2_debug'))
+ rcube::write_log('markasjunk2', $_SESSION['username'] . ' whitelist ' . $email);
+ }
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/drivers/sa_detach.php b/plugins/markasjunk2/drivers/sa_detach.php
new file mode 100644
index 000000000..947b4b8a7
--- /dev/null
+++ b/plugins/markasjunk2/drivers/sa_detach.php
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * SpamAssassin detach ham driver
+ * @version 2.0
+ * @author Philip Weir
+ */
+
+class markasjunk2_sa_detach
+{
+ public function spam($uids)
+ {
+ // do nothing
+ }
+
+ public function ham(&$uids)
+ {
+ $rcmail = rcube::get_instance();
+ $storage = $rcmail->storage;
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
+
+ $new_uids = array();
+ foreach (explode(",", $uids) as $uid) {
+ $saved = false;
+ $message = new rcube_message($uid);
+
+ if (sizeof($message->attachments) > 0) {
+ foreach ($message->attachments as $part) {
+ if ($part->ctype_primary == 'message' && $part->ctype_secondary == 'rfc822') {
+ $orig_message_raw = $storage->get_message_part($message->uid, $part->mime_id, $part);
+ $saved = $storage->save_message($mbox, $orig_message_raw);
+
+ if ($saved !== false) {
+ $rcmail->output->command('rcmail_markasjunk2_move', null, $uid);
+ array_push($new_uids, $saved);
+ }
+ }
+ }
+ }
+ }
+
+ if (sizeof($new_uids) > 0)
+ $uids = implode(',', $new_uids);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/ca_ES.inc b/plugins/markasjunk2/localization/ca_ES.inc
new file mode 100644
index 000000000..2268cf76a
--- /dev/null
+++ b/plugins/markasjunk2/localization/ca_ES.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Daniel López */
+
+$labels = array();
+$labels['buttonjunk'] = 'Marca com a Spam';
+$labels['markasjunk'] = 'És Spam';
+$labels['buttonnotjunk'] = 'Aquest missatge no és Spam';
+$labels['markasnotjunk'] = 'No és Spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Reportat conrrectament com spam.';
+$messages['reportedasnotjunk'] = 'Missatge mogut a la safata d\'Entrada';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/cs_CZ.inc b/plugins/markasjunk2/localization/cs_CZ.inc
new file mode 100644
index 000000000..e9564a855
--- /dev/null
+++ b/plugins/markasjunk2/localization/cs_CZ.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Martin Frajdl */
+
+$labels = array();
+$labels['buttonjunk'] = 'Oznacit jako spam';
+$labels['markasjunk'] = 'Jako spam';
+$labels['buttonnotjunk'] = 'Tato zpráva není spam';
+$labels['markasnotjunk'] = 'Nemí spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Úspešne hlášeny jako spam';
+$messages['reportedasnotjunk'] = 'Úspešne hlášeny jako spam';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/de_CH.inc b/plugins/markasjunk2/localization/de_CH.inc
new file mode 100644
index 000000000..71492b481
--- /dev/null
+++ b/plugins/markasjunk2/localization/de_CH.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Rrainer Rhalbmann */
+
+$labels = array();
+$labels['buttonjunk'] = 'als Spam markieren';
+$labels['markasjunk'] = 'als Spam';
+$labels['buttonnotjunk'] = 'Diese Nachricht ist kein Spam';
+$labels['markasnotjunk'] = 'kein Spam';
+$labels['notjunk'] = 'kein Spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Erfolgreich als Spam gekennzeichnet';
+$messages['reportedasnotjunk'] = 'Nachricht in Posteingang verschoben';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/de_DE.inc b/plugins/markasjunk2/localization/de_DE.inc
new file mode 100644
index 000000000..71492b481
--- /dev/null
+++ b/plugins/markasjunk2/localization/de_DE.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Rrainer Rhalbmann */
+
+$labels = array();
+$labels['buttonjunk'] = 'als Spam markieren';
+$labels['markasjunk'] = 'als Spam';
+$labels['buttonnotjunk'] = 'Diese Nachricht ist kein Spam';
+$labels['markasnotjunk'] = 'kein Spam';
+$labels['notjunk'] = 'kein Spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Erfolgreich als Spam gekennzeichnet';
+$messages['reportedasnotjunk'] = 'Nachricht in Posteingang verschoben';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/en_GB.inc b/plugins/markasjunk2/localization/en_GB.inc
new file mode 100644
index 000000000..e63548094
--- /dev/null
+++ b/plugins/markasjunk2/localization/en_GB.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['buttonjunk'] = 'Mark as spam';
+$labels['markasjunk'] = 'As spam';
+$labels['buttonnotjunk'] = 'This message is not spam';
+$labels['markasnotjunk'] = 'As not spam';
+$labels['notjunk'] = 'Not spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Successfully reported as spam';
+$messages['reportedasnotjunk'] = 'Successfully reported as not spam';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/en_US.inc b/plugins/markasjunk2/localization/en_US.inc
new file mode 100644
index 000000000..b67fbedfb
--- /dev/null
+++ b/plugins/markasjunk2/localization/en_US.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['buttonjunk'] = 'Mark as junk';
+$labels['markasjunk'] = 'As junk';
+$labels['buttonnotjunk'] = 'This message is not junk';
+$labels['markasnotjunk'] = 'As not junk';
+$labels['notjunk'] = 'Not junk';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Successfully reported as junk';
+$messages['reportedasnotjunk'] = 'Successfully reported as not junk';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/es_AR.inc b/plugins/markasjunk2/localization/es_AR.inc
new file mode 100644
index 000000000..2095b0721
--- /dev/null
+++ b/plugins/markasjunk2/localization/es_AR.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Guillermo Asernitzky */
+
+$labels = array();
+$labels['buttonjunk'] = 'Marcar como Spam';
+$labels['markasjunk'] = 'Como Spam';
+$labels['buttonnotjunk'] = 'Este mensaje no es Spam';
+$labels['markasnotjunk'] = 'No es Spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Reportado como Spam';
+$messages['reportedasnotjunk'] = 'Mensaje movido a la bandeja de entrada';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/es_ES.inc b/plugins/markasjunk2/localization/es_ES.inc
new file mode 100644
index 000000000..58388f227
--- /dev/null
+++ b/plugins/markasjunk2/localization/es_ES.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: David Garabana Barro */
+
+$labels = array();
+$labels['buttonjunk'] = 'Marcar como spam';
+$labels['markasjunk'] = 'Es spam';
+$labels['buttonnotjunk'] = 'Este mensaje no es spam';
+$labels['markasnotjunk'] = 'No es spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Reportado correctamente como spam.';
+$messages['reportedasnotjunk'] = 'Movido a la bandeja de entrada.';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/fa_IR.inc b/plugins/markasjunk2/localization/fa_IR.inc
new file mode 100644
index 000000000..1fd7b82ae
--- /dev/null
+++ b/plugins/markasjunk2/localization/fa_IR.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: KiarasH Mozafari */
+
+$labels = array();
+$labels['buttonjunk'] = 'بنجل کن';
+$labels['markasjunk'] = 'بنجل';
+$labels['buttonnotjunk'] = 'این نامه بنجل نیست';
+$labels['markasnotjunk'] = 'بنجل نیست';
+
+$messages = array();
+$messages['reportedasjunk'] = 'این نامه با موفقیت به صورت بنجل گزارش داده شد';
+$messages['reportedasnotjunk'] = 'نامه به صندق منتقل شد';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/fr_FR.inc b/plugins/markasjunk2/localization/fr_FR.inc
new file mode 100644
index 000000000..843f01242
--- /dev/null
+++ b/plugins/markasjunk2/localization/fr_FR.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: */
+
+$labels = array();
+$labels['buttonjunk'] = 'Marquer comme spam';
+$labels['markasjunk'] = 'Comme spam';
+$labels['buttonnotjunk'] = 'Ceci n\'est pas un spam';
+$labels['markasnotjunk'] = 'Comme acceptable';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Message classé en spam';
+$messages['reportedasnotjunk'] = 'Message déplacé dans Inbox';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/gl_ES.inc b/plugins/markasjunk2/localization/gl_ES.inc
new file mode 100644
index 000000000..b2b65e5d6
--- /dev/null
+++ b/plugins/markasjunk2/localization/gl_ES.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: David Garabana Barro */
+
+$labels = array();
+$labels['buttonjunk'] = 'Marcar coma correo lixo';
+$labels['markasjunk'] = 'É correo lixo';
+$labels['buttonnotjunk'] = 'Esta mensaxe non é correo lixo';
+$labels['markasnotjunk'] = 'Non é correo lixo';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Marcouse correctamente coma correo lixo ';
+$messages['reportedasnotjunk'] = 'A mensaxe moveuse a caixa de entrada';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/hu_HU.inc b/plugins/markasjunk2/localization/hu_HU.inc
new file mode 100644
index 000000000..9f8ef1bbe
--- /dev/null
+++ b/plugins/markasjunk2/localization/hu_HU.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Attila Sipos */
+
+$labels = array();
+$labels['buttonjunk'] = 'Megkelölés levélszemétként';
+$labels['markasjunk'] = 'Levélszemétként';
+$labels['buttonnotjunk'] = 'Ez az üzenet nem levélszemét';
+$labels['markasnotjunk'] = 'Nem levélszemét';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Sikeresen jelentve, mint levélszemét';
+$messages['reportedasnotjunk'] = 'Az üzenet visszakerült a Érkezett levelekbe';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/it_IT.inc b/plugins/markasjunk2/localization/it_IT.inc
new file mode 100644
index 000000000..c7760d05e
--- /dev/null
+++ b/plugins/markasjunk2/localization/it_IT.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Alessio Cecchi */
+
+$labels = array();
+$labels['buttonjunk'] = 'Segnala come Spam';
+$labels['markasjunk'] = 'Spam';
+$labels['buttonnotjunk'] = 'Questo messaggiono non è Spam';
+$labels['markasnotjunk'] = 'Non Spam';
+$labels['notjunk'] = 'Non Spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Segnalato con successo come Spam';
+$messages['reportedasnotjunk'] = 'Messaggio spostato in Posta in arrivo';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/lv_LV.inc b/plugins/markasjunk2/localization/lv_LV.inc
new file mode 100644
index 000000000..738de15b1
--- /dev/null
+++ b/plugins/markasjunk2/localization/lv_LV.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Mārtiņš Dzērve */
+
+$labels = array();
+$labels['buttonjunk'] = 'Atzīmēt mēstules';
+$labels['markasjunk'] = 'Kā mēstuli';
+$labels['buttonnotjunk'] = 'Atzīmēt ne-mēstules';
+$labels['markasnotjunk'] = 'Kā ne-mēstule';
+$labels['notjunk'] = 'Ne-mēstules';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Veiksmīgi ziņots par mēstuli';
+$messages['reportedasnotjunk'] = 'Veiksmīgi ziņots par ne-mēstuli';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/nl_NL.inc b/plugins/markasjunk2/localization/nl_NL.inc
new file mode 100644
index 000000000..4eb572901
--- /dev/null
+++ b/plugins/markasjunk2/localization/nl_NL.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Hans Spaans */
+
+$labels = array();
+$labels['buttonjunk'] = 'Markeer als spam';
+$labels['markasjunk'] = 'Is spam';
+$labels['buttonnotjunk'] = 'Dit bericht is geen spam';
+$labels['markasnotjunk'] = 'Geen spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Bericht gemarkeerd als spam';
+$messages['reportedasnotjunk'] = 'Bericht verplaatst naar Inbox';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/pl_PL.inc b/plugins/markasjunk2/localization/pl_PL.inc
new file mode 100644
index 000000000..7cbe359c7
--- /dev/null
+++ b/plugins/markasjunk2/localization/pl_PL.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Bartosz Mierzwiak */
+
+$labels = array();
+$labels['buttonjunk'] = 'Oznacz jako Spam';
+$labels['markasjunk'] = 'Jako Spam';
+$labels['buttonnotjunk'] = 'Ta wiadomość nie jest Spamem';
+$labels['markasnotjunk'] = 'Jako nie Spam';
+$labels['notjunk'] = 'Nie Spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Pomyślnie oznaczono jako Spam';
+$messages['reportedasnotjunk'] = 'Wiadomość przeniesiona do Odebranych';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/pt_BR.inc b/plugins/markasjunk2/localization/pt_BR.inc
new file mode 100644
index 000000000..cf62fc6c9
--- /dev/null
+++ b/plugins/markasjunk2/localization/pt_BR.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Arthur Furlan */
+
+$labels = array();
+$labels['buttonjunk'] = 'Marcar como Spam';
+$labels['markasjunk'] = 'Spam';
+$labels['buttonnotjunk'] = 'Esta mensagem não é Spam';
+$labels['markasnotjunk'] = 'Não Spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Mensagem marcada como Spam com sucesso';
+$messages['reportedasnotjunk'] = 'Mensagem movida para a Caixa da Entrada';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/ro_RO.inc b/plugins/markasjunk2/localization/ro_RO.inc
new file mode 100644
index 000000000..13567a8b2
--- /dev/null
+++ b/plugins/markasjunk2/localization/ro_RO.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Ovidiu Bica */
+
+$labels = array();
+$labels['buttonjunk'] = 'Marcheaza ca spam';
+$labels['markasjunk'] = 'Este Spam';
+$labels['buttonnotjunk'] = 'Acest mesaj nu este spam';
+$labels['markasnotjunk'] = 'Nu este spam';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Raportat cu succes ca Spam';
+$messages['reportedasnotjunk'] = 'Mesajul a fost mutat in Inbox';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/ru_RU.inc b/plugins/markasjunk2/localization/ru_RU.inc
new file mode 100644
index 000000000..e91f6a454
--- /dev/null
+++ b/plugins/markasjunk2/localization/ru_RU.inc
@@ -0,0 +1,15 @@
+<?php
+/* Author: Peter Zotov */
+
+$labels = array();
+$labels['buttonjunk'] = 'Пометить как спам';
+$labels['markasjunk'] = 'Как спам';
+$labels['buttonnotjunk'] = 'Это сообщение не спам';
+$labels['markasnotjunk'] = 'Не спам';
+$labels['notjunk'] = 'Не спам';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Помечено как спам';
+$messages['reportedasnotjunk'] = 'Сообщение перемещено во Входящие';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/tr_TR.inc b/plugins/markasjunk2/localization/tr_TR.inc
new file mode 100644
index 000000000..7da3f0a40
--- /dev/null
+++ b/plugins/markasjunk2/localization/tr_TR.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Mustafa Icer */
+
+$labels = array();
+$labels['buttonjunk'] = 'Spam olarak işaretle';
+$labels['markasjunk'] = 'Spam olarak';
+$labels['buttonnotjunk'] = 'Bu mesaj Spam değildir';
+$labels['markasnotjunk'] = 'Spam değildir';
+
+$messages = array();
+$messages['reportedasjunk'] = 'Başarıyla spam olarak bildirildi';
+$messages['reportedasnotjunk'] = 'Mesaj, gelen klasörüne taşındı';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/localization/zh_TW.inc b/plugins/markasjunk2/localization/zh_TW.inc
new file mode 100644
index 000000000..9d9d4a541
--- /dev/null
+++ b/plugins/markasjunk2/localization/zh_TW.inc
@@ -0,0 +1,14 @@
+<?php
+/* Author: Denny Lin */
+
+$labels = array();
+$labels['buttonjunk'] = '標為垃圾郵件';
+$labels['markasjunk'] = '標為垃圾郵件';
+$labels['buttonnotjunk'] = '非垃圾郵件';
+$labels['markasnotjunk'] = '非垃圾郵件';
+
+$messages = array();
+$messages['reportedasjunk'] = '已標為垃圾郵件';
+$messages['reportedasnotjunk'] = '已移至收件匣';
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/markasjunk2.js b/plugins/markasjunk2/markasjunk2.js
new file mode 100644
index 000000000..5dc141f6a
--- /dev/null
+++ b/plugins/markasjunk2/markasjunk2.js
@@ -0,0 +1,199 @@
+/**
+ * MarkAsJunk2 plugin script
+ */
+
+function rcmail_markasjunk2(prop) {
+ if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length))
+ return;
+
+ if (!prop || prop == 'markasjunk2')
+ prop = 'junk';
+
+ var prev_sel = null;
+
+ // also select childs of (collapsed) threads
+ if (rcmail.message_list) {
+ if (rcmail.env.uid) {
+ if (rcmail.message_list.rows[rcmail.env.uid].has_children && !rcmail.message_list.rows[rcmail.env.uid].expanded) {
+ if (!rcmail.message_list.in_selection(rcmail.env.uid)) {
+ prev_sel = rcmail.message_list.get_selection();
+ rcmail.message_list.select_row(rcmail.env.uid);
+ }
+
+ rcmail.message_list.select_childs(rcmail.env.uid);
+ rcmail.env.uid = null;
+ }
+ else if (rcmail.message_list.get_single_selection() == rcmail.env.uid) {
+ rcmail.env.uid = null;
+ }
+ }
+ else {
+ selection = rcmail.message_list.get_selection();
+ for (var i in selection) {
+ if (rcmail.message_list.rows[selection[i]].has_children && !rcmail.message_list.rows[selection[i]].expanded)
+ rcmail.message_list.select_childs(selection[i]);
+ }
+ }
+ }
+
+ var uids = rcmail.env.uid ? rcmail.env.uid : rcmail.message_list.get_selection().join(',');
+
+ var lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_post('plugin.markasjunk2.' + prop, '_uid='+uids+'&_mbox='+urlencode(rcmail.env.mailbox), lock);
+
+ if (prev_sel) {
+ rcmail.message_list.clear_selection();
+
+ for (var i in prev_sel)
+ rcmail.message_list.select_row(prev_sel[i], CONTROL_KEY);
+ }
+}
+
+function rcmail_markasjunk2_notjunk(prop) {
+ rcmail_markasjunk2('not_junk');
+}
+
+rcube_webmail.prototype.rcmail_markasjunk2_move = function(mbox, uid) {
+ var prev_uid = rcmail.env.uid;
+ var prev_sel = null;
+ var a_uids = uid.split(",");
+
+ if (rcmail.message_list && a_uids.length == 1 && !rcmail.message_list.rows[a_uids[0]]) {
+ rcmail.env.uid = a_uids[0];
+ }
+ else if (rcmail.message_list && a_uids.length == 1 && !rcmail.message_list.in_selection(a_uids[0]) && !rcmail.env.threading) {
+ rcmail.env.uid = a_uids[0];
+ rcmail.message_list.remove_row(rcmail.env.uid, false);
+ }
+ else if (rcmail.message_list && (!rcmail.message_list.in_selection(a_uids[0]) || a_uids.length != rcmail.message_list.selection.length)) {
+ prev_sel = rcmail.message_list.get_selection();
+ rcmail.message_list.clear_selection();
+
+ for (var i in a_uids)
+ rcmail.message_list.select_row(a_uids[i], CONTROL_KEY);
+ }
+
+ if (mbox)
+ rcmail.move_messages(mbox);
+ else
+ rcmail.delete_messages();
+
+ rcmail.env.uid = prev_uid;
+
+ if (prev_sel) {
+ rcmail.message_list.clear_selection();
+
+ for (var i in prev_sel) {
+ if (prev_sel[i] != uid)
+ rcmail.message_list.select_row(prev_sel[i], CONTROL_KEY);
+ }
+ }
+}
+
+function rcmail_markasjunk2_init() {
+ if (window.rcm_contextmenu_register_command) {
+ rcm_contextmenu_register_command('markasjunk2', 'rcmail_markasjunk2', rcmail.gettext('markasjunk2.markasjunk'), 'reply', null, true, null, null, 'markmessage markasjunk2');
+ rcm_contextmenu_register_command('markasnotjunk2', 'rcmail_markasjunk2_notjunk', rcmail.gettext('markasjunk2.markasnotjunk'), 'reply', null, true, null, null, 'markmessage markasnotjunk2');
+ $('#rcmContextMenu li.unflagged').removeClass('separator_below');
+ $('#rcmContextMenu li.reply').addClass('separator_above');
+ }
+}
+
+function rcmail_markasjunk2_update() {
+ var spamobj = $('#' + rcmail.buttons['plugin.markasjunk2.junk'][0].id);
+ var hamobj = $('#' + rcmail.buttons['plugin.markasjunk2.not_junk'][0].id);
+
+ if (spamobj.parent('li').length > 0) {
+ spamobj = spamobj.parent();
+ hamobj = hamobj.parent();
+ }
+
+ if (!rcmail.env.markasjunk2_override && rcmail.env.markasjunk2_spam_mailbox && rcmail.env.mailbox != rcmail.env.markasjunk2_spam_mailbox) {
+ $('#rcmContextMenu li.markasjunk2').show();
+ $('#rcmContextMenu li.markasnotjunk2').hide();
+ spamobj.show();
+ hamobj.hide();
+ }
+ else if (!rcmail.env.markasjunk2_override) {
+ $('#rcmContextMenu li.markasjunk2').hide();
+ $('#rcmContextMenu li.markasnotjunk2').show();
+ spamobj.hide();
+ hamobj.show();
+ }
+}
+
+function rcmail_markasjunk2_status(command) {
+ switch (command) {
+ case 'beforedelete':
+ if (!rcmail.env.flag_for_deletion && rcmail.env.trash_mailbox &&
+ rcmail.env.mailbox != rcmail.env.trash_mailbox &&
+ (rcmail.message_list && !rcmail.message_list.shiftkey))
+ rcmail.enable_command('plugin.markasjunk2.junk', 'plugin.markasjunk2.not_junk', false);
+
+ break;
+ case 'beforemove':
+ case 'beforemoveto':
+ rcmail.enable_command('plugin.markasjunk2.junk', 'plugin.markasjunk2.not_junk', false);
+ break;
+ case 'aftermove':
+ case 'aftermoveto':
+ if (rcmail.env.action == 'show')
+ rcmail.enable_command('plugin.markasjunk2.junk', 'plugin.markasjunk2.not_junk', true);
+
+ break;
+ case 'afterpurge':
+ case 'afterexpunge':
+ if (!rcmail.env.messagecount && rcmail.task == 'mail')
+ rcmail.enable_command('plugin.markasjunk2.junk', 'plugin.markasjunk2.not_junk', false);
+
+ break;
+ }
+}
+
+$(document).ready(function() {
+ if (window.rcmail) {
+ rcmail.addEventListener('init', function(evt) {
+ // register command (directly enable in message view mode)
+ rcmail.register_command('plugin.markasjunk2.junk', rcmail_markasjunk2, rcmail.env.uid);
+ rcmail.register_command('plugin.markasjunk2.not_junk', rcmail_markasjunk2_notjunk, rcmail.env.uid);
+
+ if (rcmail.message_list) {
+ rcmail.message_list.addEventListener('select', function(list) {
+ rcmail.enable_command('plugin.markasjunk2.junk', list.get_selection().length > 0);
+ rcmail.enable_command('plugin.markasjunk2.not_junk', list.get_selection().length > 0);
+ });
+ }
+ });
+
+ rcmail.add_onload('rcmail_markasjunk2_init()');
+ rcmail.addEventListener('listupdate', function(props) { rcmail_markasjunk2_update(); } );
+
+ rcmail.addEventListener('beforemoveto', function(mbox) {
+ if (mbox && typeof mbox === 'object')
+ mbox = mbox.id;
+
+ // check if destination mbox equals junk box (and we're not already in the junk box)
+ if (rcmail.env.markasjunk2_move_spam && mbox && mbox == rcmail.env.markasjunk2_spam_mailbox && mbox != rcmail.env.mailbox) {
+ rcmail_markasjunk2();
+ return false;
+
+ }
+ // or if destination mbox equals ham box and we are in the junk box
+ else if (rcmail.env.markasjunk2_move_ham && mbox && mbox == rcmail.env.markasjunk2_ham_mailbox && rcmail.env.mailbox == rcmail.env.markasjunk2_spam_mailbox) {
+ rcmail_markasjunk2_notjunk();
+ return false;
+ }
+
+ return;
+ } );
+
+ // update button activation after external events
+ rcmail.addEventListener('beforedelete', function(props) { rcmail_markasjunk2_status('beforedelete'); } );
+ rcmail.addEventListener('beforemove', function(props) { rcmail_markasjunk2_status('beforemove'); } );
+ rcmail.addEventListener('beforemoveto', function(props) { rcmail_markasjunk2_status('beforemoveto'); } );
+ rcmail.addEventListener('aftermove', function(props) { rcmail_markasjunk2_status('aftermove'); } );
+ rcmail.addEventListener('aftermoveto', function(props) { rcmail_markasjunk2_status('aftermoveto'); } );
+ rcmail.addEventListener('afterpurge', function(props) { rcmail_markasjunk2_status('afterpurge'); } );
+ rcmail.addEventListener('afterexpunge', function(props) { rcmail_markasjunk2_status('afterexpunge'); } );
+ }
+}); \ No newline at end of file
diff --git a/plugins/markasjunk2/markasjunk2.php b/plugins/markasjunk2/markasjunk2.php
new file mode 100644
index 000000000..313798685
--- /dev/null
+++ b/plugins/markasjunk2/markasjunk2.php
@@ -0,0 +1,211 @@
+<?php
+
+/**
+ * MarkAsJunk2
+ *
+ * Sample plugin that adds a new button to the mailbox toolbar
+ * to mark the selected messages as Junk and move them to the Junk folder
+ * or to move messages in the Junk folder to the inbox - moving only the
+ * attachment if it is a Spamassassin spam report email
+ *
+ * @version @package_version@
+ * @author Philip Weir
+ * Based on the Markasjunk plugin by Thomas Bruederli
+ */
+class markasjunk2 extends rcube_plugin
+{
+ public $task = 'mail';
+ private $spam_mbox = null;
+ private $ham_mbox = null;
+ private $spam_flag = 'JUNK';
+ private $ham_flag = 'NOTJUNK';
+ private $toolbar = true;
+
+ function init()
+ {
+ $this->register_action('plugin.markasjunk2.junk', array($this, 'mark_junk'));
+ $this->register_action('plugin.markasjunk2.not_junk', array($this, 'mark_notjunk'));
+
+ $rcmail = rcube::get_instance();
+ $this->load_config();
+ $this->ham_mbox = $rcmail->config->get('markasjunk2_ham_mbox', 'INBOX');
+ $this->spam_mbox = $rcmail->config->get('markasjunk2_spam_mbox', $rcmail->config->get('junk_mbox', null));
+ $this->toolbar = $rcmail->action == 'show' ? $rcmail->config->get('markasjunk2_cp_toolbar', true) : $rcmail->config->get('markasjunk2_mb_toolbar', true);
+
+ if ($rcmail->action == '' || $rcmail->action == 'show') {
+ $this->include_script('markasjunk2.js');
+ $this->add_texts('localization', true);
+ $this->include_stylesheet($this->local_skin_path() .'/markasjunk2.css');
+ if ($rcmail->output->browser->ie && $rcmail->output->browser->ver == 6)
+ $this->include_stylesheet($this->local_skin_path() . '/ie6hacks.css');
+
+ $mb_override = ($this->spam_mbox) ? false : true;
+ $display_junk = $display_not_junk = '';
+ if ($_SESSION['mbox'] == $this->spam_mbox)
+ $display_junk = 'display: none;';
+ elseif (!$mb_override)
+ $display_not_junk = 'display: none;';
+
+ if ($this->toolbar) {
+ $this->add_button(array('command' => 'plugin.markasjunk2.junk', 'type' => 'link', 'class' => 'button buttonPas markasjunk2 disabled', 'classact' => 'button markasjunk2', 'classsel' => 'button markasjunk2Sel', 'title' => 'markasjunk2.buttonjunk', 'label' => 'junk', 'style' => $display_junk), 'toolbar');
+ $this->add_button(array('command' => 'plugin.markasjunk2.not_junk', 'type' => 'link', 'class' => 'button buttonPas markasnotjunk2 disabled', 'classact' => 'button markasnotjunk2', 'classsel' => 'button markasnotjunk2Sel', 'title' => 'markasjunk2.buttonnotjunk', 'label' => 'markasjunk2.notjunk', 'style' => $display_not_junk), 'toolbar');
+ }
+ else {
+ $markjunk = $this->api->output->button(array('command' => 'plugin.markasjunk2.junk', 'label' => 'markasjunk2.markasjunk', 'id' => 'markasjunk2', 'class' => 'icon markasjunk2', 'classact' => 'icon markasjunk2 active', 'innerclass' => 'icon markasjunk2'));
+ $marknotjunk = $this->api->output->button(array('command' => 'plugin.markasjunk2.not_junk', 'label' => 'markasjunk2.markasnotjunk', 'id' => 'markasnotjunk2', 'class' => 'icon markasnotjunk2', 'classact' => 'icon markasnotjunk2 active', 'innerclass' => 'icon markasnotjunk2'));
+ $this->api->add_content(html::tag('li', array('style' => $display_junk), $markjunk), 'markmenu');
+ $this->api->add_content(html::tag('li', array('style' => $display_not_junk), $marknotjunk), 'markmenu');
+ }
+
+ $this->api->output->set_env('markasjunk2_override', $mb_override);
+ $this->api->output->set_env('markasjunk2_ham_mailbox', $this->ham_mbox);
+ $this->api->output->set_env('markasjunk2_spam_mailbox', $this->spam_mbox);
+
+ $this->api->output->set_env('markasjunk2_move_spam', $rcmail->config->get('markasjunk2_move_spam', false));
+ $this->api->output->set_env('markasjunk2_move_ham', $rcmail->config->get('markasjunk2_move_ham', false));
+ }
+ }
+
+ function mark_junk()
+ {
+ $this->add_texts('localization');
+ $this->_set_flags();
+
+ $uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
+
+ if ($this->_spam($uids, $mbox, $this->spam_mbox))
+ $this->api->output->command('display_message', $this->gettext('reportedasjunk'), 'confirmation');
+
+ $this->api->output->send();
+ }
+
+ function mark_notjunk()
+ {
+ $this->add_texts('localization');
+ $this->_set_flags();
+
+ $uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
+
+ if ($this->_ham($uids, $mbox, $this->ham_mbox))
+ $this->api->output->command('display_message', $this->gettext('reportedasnotjunk'), 'confirmation');
+
+ $this->api->output->send();
+ }
+
+ private function _spam($uids, $mbox_name = NULL, $dest_mbox = NULL)
+ {
+ $rcmail = rcube::get_instance();
+ $storage = $rcmail->storage;
+
+ if ($rcmail->config->get('markasjunk2_learning_driver', false)) {
+ $result = $this->_call_driver($uids, true);
+
+ if (!$result)
+ return false;
+ }
+
+ if ($rcmail->config->get('markasjunk2_read_spam', false))
+ $storage->set_flag($uids, 'SEEN', $mbox_name);
+
+ if ($rcmail->config->get('markasjunk2_spam_flag', false))
+ $storage->set_flag($uids, $this->spam_flag, $mbox_name);
+
+ if ($rcmail->config->get('markasjunk2_ham_flag', false))
+ $storage->unset_flag($uids, $this->ham_flag, $mbox_name);
+
+ if ($dest_mbox && $mbox_name != $dest_mbox)
+ $this->api->output->command('rcmail_markasjunk2_move', $dest_mbox, $uids);
+ else
+ $this->api->output->command('command', 'list', $mbox_name);
+
+ return true;
+ }
+
+ private function _ham($uids, $mbox_name = NULL, $dest_mbox = NULL)
+ {
+ $rcmail = rcube::get_instance();
+ $storage = $rcmail->storage;
+
+ if ($rcmail->config->get('markasjunk2_learning_driver', false)) {
+ $result = $this->_call_driver($uids, false);
+
+ if (!$result)
+ return false;
+ }
+
+ if ($rcmail->config->get('markasjunk2_unread_ham', false))
+ $storage->unset_flag($uids, 'SEEN', $mbox_name);
+
+ if ($rcmail->config->get('markasjunk2_spam_flag', false))
+ $storage->unset_flag($uids, $this->spam_flag, $mbox_name);
+
+ if ($rcmail->config->get('markasjunk2_ham_flag', false))
+ $storage->set_flag($uids, $this->ham_flag, $mbox_name);
+
+ if ($dest_mbox && $mbox_name != $dest_mbox)
+ $this->api->output->command('rcmail_markasjunk2_move', $dest_mbox, $uids);
+ else
+ $this->api->output->command('command', 'list', $mbox_name);
+
+ return true;
+ }
+
+ private function _call_driver(&$uids, $spam)
+ {
+ $driver = $this->home.'/drivers/'. rcube::get_instance()->config->get('markasjunk2_learning_driver', 'cmd_learn') .'.php';
+ $class = 'markasjunk2_' . rcube::get_instance()->config->get('markasjunk2_learning_driver', 'cmd_learn');
+
+ if (!is_readable($driver)) {
+ rcube::raise_error(array(
+ 'code' => 600,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "MarkasJunk2 plugin: Unable to open driver file $driver"
+ ), true, false);
+ }
+
+ include_once $driver;
+
+ if (!class_exists($class, false) || !method_exists($class, 'spam') || !method_exists($class, 'ham')) {
+ rcube::raise_error(array(
+ 'code' => 600,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "MarkasJunk2 plugin: Broken driver: $driver"
+ ), true, false);
+ }
+
+ $object = new $class;
+ if ($spam)
+ $object->spam($uids);
+ else
+ $object->ham($uids);
+
+ return $object->is_error ? false : true;
+ }
+
+ private function _set_flags()
+ {
+ $rcmail = rcube::get_instance();
+
+ if ($rcmail->config->get('markasjunk2_spam_flag', false)) {
+ if ($flag = array_search($rcmail->config->get('markasjunk2_spam_flag'), $rcmail->storage->conn->flags))
+ $this->spam_flag = $flag;
+ else
+ $rcmail->storage->conn->flags[$this->spam_flag] = $rcmail->config->get('markasjunk2_spam_flag');
+ }
+
+ if ($rcmail->config->get('markasjunk2_ham_flag', false)) {
+ if ($flag = array_search($rcmail->config->get('markasjunk2_ham_flag'), $rcmail->storage->conn->flags))
+ $this->ham_flag = $flag;
+ else
+ $rcmail->storage->conn->flags[$this->ham_flag] = $rcmail->config->get('markasjunk2_ham_flag');
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/markasjunk2/package.xml b/plugins/markasjunk2/package.xml
new file mode 100644
index 000000000..3b16ed13a
--- /dev/null
+++ b/plugins/markasjunk2/package.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>markasjunk2</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-Mark-as-Junk-2/</uri>
+ <summary>Learn messages as Junk/Not Junk</summary>
+ <description>Adds a new button to the mailbox toolbar to mark the selected messages as Junk/Not Junk, optionally detaching original messages from spam reports if the message is not junk and learning junk/not junk using various methods (sa-learn, etc.).</description>
+ <lead>
+ <name>Philip Weir</name>
+ <user>JohnDoh</user>
+ <email>roundcube@tehinterweb.co.uk</email>
+ <active>yes</active>
+ </lead>
+ <date>2013-02-24</date>
+ <time>10:16:53</time>
+ <version>
+ <release>1.6</release>
+ <api>1.6</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>-</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="markasjunk2.php" role="php">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="markasjunk2.js" role="data">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="config.inc.php.dist" role="data"/>
+ <file name="CHANGELOG" role="data"/>
+ <file name="README.md" role="data"/>
+ <file name="drivers/cmd_learn.php" role="php"/>
+ <file name="drivers/dir_learn.php" role="php"/>
+ <file name="drivers/edit_headers.php" role="php"/>
+ <file name="drivers/email_learn.php" role="php"/>
+ <file name="drivers/sa_blacklist.php" role="php"/>
+ <file name="drivers/sa_detach.php" role="php"/>
+ <file name="localization/ca_ES.inc" role="data"/>
+ <file name="localization/cs_CZ.inc" role="data"/>
+ <file name="localization/de_CH.inc" role="data"/>
+ <file name="localization/de_DE.inc" role="data"/>
+ <file name="localization/en_GB.inc" role="data"/>
+ <file name="localization/en_US.inc" role="data"/>
+ <file name="localization/es_AR.inc" role="data"/>
+ <file name="localization/es_ES.inc" role="data"/>
+ <file name="localization/fa_IR.inc" role="data"/>
+ <file name="localization/fr_FR.inc" role="data"/>
+ <file name="localization/gl_ES.inc" role="data"/>
+ <file name="localization/hu_HU.inc" role="data"/>
+ <file name="localization/it_IT.inc" role="data"/>
+ <file name="localization/lv_LV.inc" role="data"/>
+ <file name="localization/nl_NL.inc" role="data"/>
+ <file name="localization/pl_PL.inc" role="data"/>
+ <file name="localization/pt_BR.inc" role="data"/>
+ <file name="localization/ro_RO.inc" role="data"/>
+ <file name="localization/ru_RU.inc" role="data"/>
+ <file name="localization/tr_TR.inc" role="data"/>
+ <file name="localization/zh_TW.inc" role="data"/>
+ <file name="skins/classic/ie6hacks.css" role="data"/>
+ <file name="skins/classic/mail_toolbar.gif" role="data"/>
+ <file name="skins/classic/mail_toolbar.png" role="data"/>
+ <file name="skins/classic/markasjunk2.css" role="data"/>
+ <file name="skins/classic/messageactions.gif" role="data"/>
+ <file name="skins/classic/messageactions.png" role="data"/>
+ <file name="skins/larry/ie6hacks.css" role="data"/>
+ <file name="skins/larry/mail_toolbar.png" role="data"/>
+ <file name="skins/larry/markasjunk2.css" role="data"/>
+ <file name="skins/larry/messageactions.png" role="data"/>
+ </dir>
+ <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.1</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>
diff --git a/plugins/markasjunk2/skins/classic/ie6hacks.css b/plugins/markasjunk2/skins/classic/ie6hacks.css
new file mode 100644
index 000000000..3b61721e3
--- /dev/null
+++ b/plugins/markasjunk2/skins/classic/ie6hacks.css
@@ -0,0 +1,19 @@
+/**
+ * MarkAsJunk2 plugin styles (IE6 hacks)
+ */
+
+#messagetoolbar a.markasjunk2,
+#messagetoolbar a.markasjunk2Sel,
+#messagetoolbar a.markasnotjunk2,
+#messagetoolbar a.markasnotjunk2Sel
+{
+ background-image: url(mail_toolbar.gif);
+}
+
+#rcmContextMenu .markasjunk2 a,
+#rcmContextMenu .markasnotjunk2 a,
+#markmessagemenu a.markasjunk2,
+#markmessagemenu a.markasnotjunk2
+{
+ background-image: url(messageactions.gif);
+} \ No newline at end of file
diff --git a/plugins/markasjunk2/skins/classic/mail_toolbar.gif b/plugins/markasjunk2/skins/classic/mail_toolbar.gif
new file mode 100644
index 000000000..d1cdff0f2
--- /dev/null
+++ b/plugins/markasjunk2/skins/classic/mail_toolbar.gif
Binary files differ
diff --git a/plugins/markasjunk2/skins/classic/mail_toolbar.png b/plugins/markasjunk2/skins/classic/mail_toolbar.png
new file mode 100644
index 000000000..aad0e9ebc
--- /dev/null
+++ b/plugins/markasjunk2/skins/classic/mail_toolbar.png
Binary files differ
diff --git a/plugins/markasjunk2/skins/classic/markasjunk2.css b/plugins/markasjunk2/skins/classic/markasjunk2.css
new file mode 100644
index 000000000..311a45083
--- /dev/null
+++ b/plugins/markasjunk2/skins/classic/markasjunk2.css
@@ -0,0 +1,52 @@
+/**
+ * MarkAsJunk2 plugin styles
+ */
+
+#messagetoolbar a.markasjunk2,
+#messagetoolbar a.markasjunk2Sel,
+#messagetoolbar a.markasnotjunk2,
+#messagetoolbar a.markasnotjunk2Sel
+{
+ text-indent: -5000px;
+ background-image: url(mail_toolbar.png);
+}
+
+#messagetoolbar a.markasjunk2
+{
+ background-position: -32px 0;
+}
+
+#messagetoolbar a.markasjunk2Sel
+{
+ background-position: -32px -32px;
+}
+
+#messagetoolbar a.markasnotjunk2
+{
+ background-position: 0 0;
+}
+
+#messagetoolbar a.markasnotjunk2Sel
+{
+ background-position: 0 -32px;
+}
+
+#rcmContextMenu .markasjunk2 a,
+#rcmContextMenu .markasnotjunk2 a,
+#markmessagemenu a.markasjunk2,
+#markmessagemenu a.markasnotjunk2
+{
+ background-image: url(messageactions.png);
+}
+
+#rcmContextMenu .markasjunk2 a,
+#markmessagemenu a.markasjunk2
+{
+ background-position: 7px -17px;
+}
+
+#rcmContextMenu .markasnotjunk2 a,
+#markmessagemenu a.markasnotjunk2
+{
+ background-position: 7px 0;
+} \ No newline at end of file
diff --git a/plugins/markasjunk2/skins/classic/messageactions.gif b/plugins/markasjunk2/skins/classic/messageactions.gif
new file mode 100644
index 000000000..255ae3606
--- /dev/null
+++ b/plugins/markasjunk2/skins/classic/messageactions.gif
Binary files differ
diff --git a/plugins/markasjunk2/skins/classic/messageactions.png b/plugins/markasjunk2/skins/classic/messageactions.png
new file mode 100644
index 000000000..11a7f7f51
--- /dev/null
+++ b/plugins/markasjunk2/skins/classic/messageactions.png
Binary files differ
diff --git a/plugins/markasjunk2/skins/larry/ie6hacks.css b/plugins/markasjunk2/skins/larry/ie6hacks.css
new file mode 100644
index 000000000..cd33694ae
--- /dev/null
+++ b/plugins/markasjunk2/skins/larry/ie6hacks.css
@@ -0,0 +1,3 @@
+/**
+ * MarkAsJunk2 plugin styles (IE6 hacks)
+ */
diff --git a/plugins/markasjunk2/skins/larry/mail_toolbar.png b/plugins/markasjunk2/skins/larry/mail_toolbar.png
new file mode 100644
index 000000000..3d5981482
--- /dev/null
+++ b/plugins/markasjunk2/skins/larry/mail_toolbar.png
Binary files differ
diff --git a/plugins/markasjunk2/skins/larry/markasjunk2.css b/plugins/markasjunk2/skins/larry/markasjunk2.css
new file mode 100644
index 000000000..90362ed2a
--- /dev/null
+++ b/plugins/markasjunk2/skins/larry/markasjunk2.css
@@ -0,0 +1,51 @@
+/**
+ * MarkAsJunk2 plugin styles
+ */
+
+#messagetoolbar a.markasjunk2,
+#messagetoolbar a.markasjunk2Sel,
+#messagetoolbar a.markasnotjunk2,
+#messagetoolbar a.markasnotjunk2Sel
+{
+ background-image: url(mail_toolbar.png);
+}
+
+#messagetoolbar a.markasjunk2,
+#messagetoolbar a.markasjunk2Sel
+{
+ background-position: center -14px;
+}
+
+#messagetoolbar a.markasnotjunk2,
+#messagetoolbar a.markasnotjunk2Sel
+{
+ background-position: center -61px;
+}
+
+#rcmContextMenu .markasjunk2 a span,
+#rcmContextMenu .markasnotjunk2 a span,
+#markmessagemenu a.markasjunk2 span,
+#markmessagemenu a.markasnotjunk2 span
+{
+ background-image: url(messageactions.png);
+}
+
+#markmessagemenu a.markasjunk2 span
+{
+ background-position: 1px -17px;
+}
+
+#markmessagemenu a.markasnotjunk2 span
+{
+ background-position: 1px 5px;
+}
+
+#rcmContextMenu .markasjunk2 a span
+{
+ background-position: 7px -14px;
+}
+
+#rcmContextMenu .markasnotjunk2 a span
+{
+ background-position: 7px 7px;
+} \ No newline at end of file
diff --git a/plugins/markasjunk2/skins/larry/messageactions.png b/plugins/markasjunk2/skins/larry/messageactions.png
new file mode 100644
index 000000000..15f5d56ac
--- /dev/null
+++ b/plugins/markasjunk2/skins/larry/messageactions.png
Binary files differ
diff --git a/plugins/message_highlight/colorpicker/images/color.png b/plugins/message_highlight/colorpicker/images/color.png
new file mode 100644
index 000000000..809fb00e5
--- /dev/null
+++ b/plugins/message_highlight/colorpicker/images/color.png
Binary files differ
diff --git a/plugins/message_highlight/colorpicker/images/colorpicker.png b/plugins/message_highlight/colorpicker/images/colorpicker.png
new file mode 100644
index 000000000..3701eb1c1
--- /dev/null
+++ b/plugins/message_highlight/colorpicker/images/colorpicker.png
Binary files differ
diff --git a/plugins/message_highlight/colorpicker/images/graybar.jpg b/plugins/message_highlight/colorpicker/images/graybar.jpg
new file mode 100644
index 000000000..f807d24bb
--- /dev/null
+++ b/plugins/message_highlight/colorpicker/images/graybar.jpg
Binary files differ
diff --git a/plugins/message_highlight/colorpicker/images/grid.gif b/plugins/message_highlight/colorpicker/images/grid.gif
new file mode 100644
index 000000000..78b54c0f6
--- /dev/null
+++ b/plugins/message_highlight/colorpicker/images/grid.gif
Binary files differ
diff --git a/plugins/message_highlight/colorpicker/images/meta100.png b/plugins/message_highlight/colorpicker/images/meta100.png
new file mode 100644
index 000000000..72bea40e8
--- /dev/null
+++ b/plugins/message_highlight/colorpicker/images/meta100.png
Binary files differ
diff --git a/plugins/message_highlight/colorpicker/images/transparentpixel.gif b/plugins/message_highlight/colorpicker/images/transparentpixel.gif
new file mode 100644
index 000000000..b7406476a
--- /dev/null
+++ b/plugins/message_highlight/colorpicker/images/transparentpixel.gif
Binary files differ
diff --git a/plugins/message_highlight/colorpicker/mColorPicker.js b/plugins/message_highlight/colorpicker/mColorPicker.js
new file mode 100644
index 000000000..6b5d6c381
--- /dev/null
+++ b/plugins/message_highlight/colorpicker/mColorPicker.js
@@ -0,0 +1,564 @@
+/*
+ mColorPicker
+ Version: 1.0 r34
+
+ Copyright (c) 2010 Meta100 LLC.
+ http://www.meta100.com/
+
+ Licensed under the MIT license
+ http://www.opensource.org/licenses/mit-license.php
+*/
+
+// After this script loads set:
+// $.fn.mColorPicker.init.replace = '.myclass'
+// to have this script apply to input.myclass,
+// instead of the default input[type=color]
+// To turn of automatic operation and run manually set:
+// $.fn.mColorPicker.init.replace = false
+// To use manually call like any other jQuery plugin
+// $('input.foo').mColorPicker({options})
+// options:
+// imageFolder - Change to move image location.
+// swatches - Initial colors in the swatch, must an array of 10 colors.
+// init:
+// $.fn.mColorPicker.init.enhancedSwatches - Turn of saving and loading of swatch to cookies.
+// $.fn.mColorPicker.init.allowTransparency - Turn off transperancy as a color option.
+// $.fn.mColorPicker.init.showLogo - Turn on/off the meta100 logo (You don't really want to turn it off, do you?).
+
+(function($){
+
+ var $o;
+
+ $.fn.mColorPicker = function(options) {
+
+ $o = $.extend($.fn.mColorPicker.defaults, options);
+
+ if ($o.swatches.length < 10) $o.swatches = $.fn.mColorPicker.defaults.swatches
+ if ($("div#mColorPicker").length < 1) $.fn.mColorPicker.drawPicker();
+
+ if ($('#css_disabled_color_picker').length < 1) $('head').prepend('<style id="css_disabled_color_picker" type="text/css">.mColorPicker[disabled] + span, .mColorPicker[disabled="disabled"] + span, .mColorPicker[disabled="true"] + span {filter:alpha(opacity=50);-moz-opacity:0.5;-webkit-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;}</style>');
+
+ $('.mColorPicker').live('keyup', function () {
+
+ try {
+
+ $(this).css({
+ 'background-color': $(this).val()
+ }).css({
+ 'color': $.fn.mColorPicker.textColor($(this).css('background-color'))
+ }).trigger('change');
+ } catch (r) {}
+ });
+
+ $('.mColorPickerTrigger').live('click', function () {
+
+ $.fn.mColorPicker.colorShow($(this).attr('id').replace('icp_', ''));
+ });
+
+ this.each(function () {
+
+ $.fn.mColorPicker.drawPickerTriggers($(this));
+ });
+
+ return this;
+ };
+
+ $.fn.mColorPicker.currentColor = false;
+ $.fn.mColorPicker.currentValue = false;
+ $.fn.mColorPicker.color = false;
+
+ $.fn.mColorPicker.init = {
+ replace: '[type=color]',
+ index: 0,
+ enhancedSwatches: true,
+ allowTransparency: true,
+ checkRedraw: 'DOMUpdated', // Change to 'ajaxSuccess' for ajax only or false if not needed
+ liveEvents: false,
+ showLogo: false
+ };
+
+ $.fn.mColorPicker.defaults = {
+ imageFolder: 'images/',
+ swatches: [
+ "#ffffff",
+ "#ffff00",
+ "#00ff00",
+ "#00ffff",
+ "#0000ff",
+ "#ff00ff",
+ "#ff0000",
+ "#4c2b11",
+ "#3b3b3b",
+ "#000000"
+ ]
+ };
+
+ $.fn.mColorPicker.liveEvents = function() {
+
+ $.fn.mColorPicker.init.liveEvents = true;
+
+ if ($.fn.mColorPicker.init.checkRedraw && $.fn.mColorPicker.init.replace) {
+
+ $(document).bind($.fn.mColorPicker.init.checkRedraw + '.mColorPicker', function () {
+
+ $('input[data-mcolorpicker!="true"]').filter(function() {
+
+ return ($.fn.mColorPicker.init.replace == '[type=color]')? this.getAttribute("type") == 'color': $(this).is($.fn.mColorPicker.init.replace);
+ }).mColorPicker();
+ });
+ }
+ };
+
+ $.fn.mColorPicker.drawPickerTriggers = function ($t) {
+
+ if ($t[0].nodeName.toLowerCase() != 'input') return false;
+
+ var id = $t.attr('id') || 'color_' + $.fn.mColorPicker.init.index++,
+ hidden = false;
+
+ $t.attr('id', id);
+
+ if ($t.attr('text') == 'hidden' || $t.attr('data-text') == 'hidden') hidden = true;
+
+ var color = $t.val(),
+ width = ($t.width() > 0)? $t.width(): parseInt($t.css('width'), 10),
+ height = ($t.height())? $t.height(): parseInt($t.css('height'), 10),
+ flt = $t.css('float'),
+ image = (color == 'transparent')? "url('" + $o.imageFolder + "/grid.gif')": '',
+ colorPicker = '';
+
+ $('body').append('<span id="color_work_area"></span>');
+ $('span#color_work_area').append($t.clone(true));
+ colorPicker = $('span#color_work_area').html().replace(/type="color"/gi, '').replace(/input /gi, (hidden)? 'input type="hidden"': 'input type="text"');
+ $('span#color_work_area').html('').remove();
+ $t.after(
+ (hidden)? '<span style="cursor:pointer;border:1px solid black;float:' + flt + ';width:' + width + 'px;height:' + height + 'px;" id="icp_' + id + '">&nbsp;</span>': ''
+ ).after(colorPicker).remove();
+
+ if (hidden) {
+
+ $('#icp_' + id).css({
+ 'background-color': color,
+ 'background-image': image,
+ 'display': 'inline-block'
+ }).attr(
+ 'class', $('#' + id).attr('class')
+ ).addClass(
+ 'mColorPickerTrigger'
+ );
+ } else {
+
+ $('#' + id).css({
+ 'background-color': color,
+ 'background-image': image
+ }).css({
+ 'color': $.fn.mColorPicker.textColor($('#' + id).css('background-color'))
+ }).after(
+ '<span style="cursor:pointer;" id="icp_' + id + '" class="mColorPickerTrigger"><img src="' + $o.imageFolder + 'color.png" style="border:0;margin:0 0 0 3px" align="absmiddle"></span>'
+ ).addClass('mColorPickerInput');
+ }
+
+ $('#icp_' + id).attr('data-mcolorpicker', 'true');
+
+ $('#' + id).addClass('mColorPicker');
+
+ return $('#' + id);
+ };
+
+ $.fn.mColorPicker.drawPicker = function () {
+
+ $(document.createElement("div")).attr(
+ "id","mColorPicker"
+ ).css(
+ 'display','none'
+ ).html(
+ '<div id="mColorPickerWrapper"><div id="mColorPickerImg" class="mColor"></div><div id="mColorPickerImgGray" class="mColor"></div><div id="mColorPickerSwatches"><div class="mClear"></div></div><div id="mColorPickerFooter"><input type="text" size="8" id="mColorPickerInput"/></div></div>'
+ ).appendTo("body");
+
+ $(document.createElement("div")).attr("id","mColorPickerBg").css({
+ 'display': 'none'
+ }).appendTo("body");
+
+ for (n = 9; n > -1; n--) {
+
+ $(document.createElement("div")).attr({
+ 'id': 'cell' + n,
+ 'class': "mPastColor" + ((n > 0)? ' mNoLeftBorder': '')
+ }).html(
+ '&nbsp;'
+ ).prependTo("#mColorPickerSwatches");
+ }
+
+ $('#mColorPicker').css({
+ 'border':'1px solid #ccc',
+ 'color':'#fff',
+ 'z-index':999998,
+ 'width':'194px',
+ 'height':'184px',
+ 'font-size':'12px',
+ 'font-family':'times'
+ });
+
+ $('.mPastColor').css({
+ 'height':'18px',
+ 'width':'18px',
+ 'border':'1px solid #000',
+ 'float':'left'
+ });
+
+ $('#colorPreview').css({
+ 'height':'50px'
+ });
+
+ $('.mNoLeftBorder').css({
+ 'border-left':0
+ });
+
+ $('.mClear').css({
+ 'clear':'both'
+ });
+
+ $('#mColorPickerWrapper').css({
+ 'position':'relative',
+ 'border':'solid 1px gray',
+ 'z-index':999999
+ });
+
+ $('#mColorPickerImg').css({
+ 'height':'128px',
+ 'width':'192px',
+ 'border':0,
+ 'cursor':'crosshair',
+ 'background-image':"url('" + $o.imageFolder + "colorpicker.png')"
+ });
+
+ $('#mColorPickerImgGray').css({
+ 'height':'8px',
+ 'width':'192px',
+ 'border':0,
+ 'cursor':'crosshair',
+ 'background-image':"url('" + $o.imageFolder + "graybar.jpg')"
+ });
+
+ $('#mColorPickerInput').css({
+ 'border':'solid 1px gray',
+ 'font-size':'10pt',
+ 'margin':'3px',
+ 'width':'80px'
+ });
+
+ $('#mColorPickerImgGrid').css({
+ 'border':0,
+ 'height':'20px',
+ 'width':'20px',
+ 'vertical-align':'text-bottom'
+ });
+
+ $('#mColorPickerSwatches').css({
+ 'border-right':'1px solid #000'
+ });
+
+
+ if ($.fn.mColorPicker.init.allowTransparency) $('#mColorPickerFooter').prepend('<span id="mColorPickerTransparent" class="mColor" style="font-size:16px;color:#000;padding-right:30px;padding-top:3px;cursor:pointer;overflow:hidden;float:right;">transparent</span>');
+ if ($.fn.mColorPicker.init.showLogo) $('#mColorPickerFooter').prepend('<a href="http://meta100.com/" title="Meta100 - Designing Fun" alt="Meta100 - Designing Fun" style="float:right;" target="_blank"><img src="' + $o.imageFolder + 'meta100.png" title="Meta100 - Designing Fun" alt="Meta100 - Designing Fun" style="border:0;border-left:1px solid #aaa;right:0;position:absolute;"/></a>');
+
+ $("#mColorPickerBg").click($.fn.mColorPicker.closePicker);
+
+ var swatch = $.fn.mColorPicker.getCookie('swatches'),
+ i = 0;
+
+ if (typeof swatch == 'string') swatch = swatch.split('||');
+ if (swatch == null || $.fn.mColorPicker.init.enhancedSwatches || swatch.length < 10) swatch = $o.swatches;
+
+ $(".mPastColor").each(function() {
+
+ $(this).css('background-color', swatch[i++].toLowerCase());
+ });
+ };
+
+ $.fn.mColorPicker.closePicker = function () {
+
+ $(".mColor, .mPastColor, #mColorPickerInput, #mColorPickerWrapper").unbind();
+ $("#mColorPickerBg").hide();
+ $("#mColorPicker").fadeOut()
+ };
+
+ $.fn.mColorPicker.colorShow = function (id) {
+
+ var $e = $("#icp_" + id);
+ pos = $e.offset(),
+ $i = $("#" + id);
+ hex = $i.attr('data-hex') || $i.attr('hex'),
+ pickerTop = pos.top + $e.outerHeight(),
+ pickerLeft = pos.left,
+ $d = $(document),
+ $m = $("#mColorPicker");
+
+ if ($i.attr('disabled')) return false;
+
+ // KEEP COLOR PICKER IN VIEWPORT
+ if (pickerTop + $m.height() > $d.height()) pickerTop = pos.top - $m.height();
+ if (pickerLeft + $m.width() > $d.width()) pickerLeft = pos.left - $m.width() + $e.outerWidth();
+
+ $m.css({
+ 'top':(pickerTop) + "px",
+ 'left':(pickerLeft) + "px",
+ 'position':'absolute'
+ }).fadeIn("fast");
+
+ $("#mColorPickerBg").css({
+ 'z-index':999990,
+ 'background':'black',
+ 'opacity': .01,
+ 'position':'absolute',
+ 'top':0,
+ 'left':0,
+ 'width': parseInt($d.width(), 10) + 'px',
+ 'height': parseInt($d.height(), 10) + 'px'
+ }).show();
+
+ var def = $i.val();
+
+ $('#colorPreview span').text(def);
+ $('#colorPreview').css('background', def);
+ $('#color').val(def);
+
+ if ($('#' + id).attr('data-text')) $.fn.mColorPicker.currentColor = $e.css('background-color');
+ else $.fn.mColorPicker.currentColor = $i.css('background-color');
+
+ if (hex == 'true') $.fn.mColorPicker.currentColor = $.fn.mColorPicker.RGBtoHex($.fn.mColorPicker.currentColor);
+
+ $("#mColorPickerInput").val($.fn.mColorPicker.currentColor);
+
+ $('.mColor, .mPastColor').bind('mousemove', function(e) {
+
+ var offset = $(this).offset();
+
+ $.fn.mColorPicker.color = $(this).css("background-color");
+
+ if ($(this).hasClass('mPastColor') && hex == 'true') $.fn.mColorPicker.color = $.fn.mColorPicker.RGBtoHex($.fn.mColorPicker.color);
+ else if ($(this).hasClass('mPastColor') && hex != 'true') $.fn.mColorPicker.color = $.fn.mColorPicker.hexToRGB($.fn.mColorPicker.color);
+ else if ($(this).attr('id') == 'mColorPickerTransparent') $.fn.mColorPicker.color = 'transparent';
+ else if (!$(this).hasClass('mPastColor')) $.fn.mColorPicker.color = $.fn.mColorPicker.whichColor(e.pageX - offset.left, e.pageY - offset.top + (($(this).attr('id') == 'mColorPickerImgGray')? 128: 0), hex);
+
+ $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.color);
+ }).click(function() {
+
+ $.fn.mColorPicker.colorPicked(id);
+ });
+
+ $('#mColorPickerInput').bind('keyup', function (e) {
+
+ try {
+
+ $.fn.mColorPicker.color = $('#mColorPickerInput').val();
+ $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.color);
+
+ if (e.which == 13) $.fn.mColorPicker.colorPicked(id);
+ } catch (r) {}
+
+ }).bind('blur', function () {
+
+ $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.currentColor);
+ });
+
+ $('#mColorPickerWrapper').bind('mouseleave', function () {
+
+ $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.currentColor);
+ });
+ };
+
+ $.fn.mColorPicker.setInputColor = function (id, color) {
+
+ var image = (color == 'transparent')? "url('" + $o.imageFolder + "grid.gif')": '',
+ textColor = $.fn.mColorPicker.textColor(color);
+
+ if ($('#' + id).attr('data-text') || $('#' + id).attr('text')) $("#icp_" + id).css({'background-color': color, 'background-image': image});
+ $("#" + id).val(color).css({'background-color': color, 'background-image': image, 'color' : textColor}).trigger('change');
+ $("#mColorPickerInput").val(color);
+ };
+
+ $.fn.mColorPicker.textColor = function (val) {
+
+ if (typeof val == 'undefined' || val == 'transparent') return "black";
+ val = $.fn.mColorPicker.RGBtoHex(val);
+ return (parseInt(val.substr(1, 2), 16) + parseInt(val.substr(3, 2), 16) + parseInt(val.substr(5, 2), 16) < 400)? 'white': 'black';
+ };
+
+ $.fn.mColorPicker.setCookie = function (name, value, days) {
+
+ var cookie_string = name + "=" + escape(value),
+ expires = new Date();
+ expires.setDate(expires.getDate() + days);
+ cookie_string += "; expires=" + expires.toGMTString();
+
+ document.cookie = cookie_string;
+ };
+
+ $.fn.mColorPicker.getCookie = function (name) {
+
+ var results = document.cookie.match ( '(^|;) ?' + name + '=([^;]*)(;|$)' );
+
+ if (results) return (unescape(results[2]));
+ else return null;
+ };
+
+ $.fn.mColorPicker.colorPicked = function (id) {
+
+ $.fn.mColorPicker.closePicker();
+
+ if ($.fn.mColorPicker.init.enhancedSwatches) $.fn.mColorPicker.addToSwatch();
+
+ $("#" + id).trigger('colorpicked');
+ };
+
+ $.fn.mColorPicker.addToSwatch = function (color) {
+
+ var swatch = []
+ i = 0;
+
+ if (typeof color == 'string') $.fn.mColorPicker.color = color.toLowerCase();
+
+ $.fn.mColorPicker.currentValue = $.fn.mColorPicker.currentColor = $.fn.mColorPicker.color;
+
+ if ($.fn.mColorPicker.color != 'transparent') swatch[0] = $.fn.mColorPicker.color.toLowerCase();
+
+ $('.mPastColor').each(function() {
+
+ $.fn.mColorPicker.color = $(this).css('background-color').toLowerCase();
+
+ if ($.fn.mColorPicker.color != swatch[0] && $.fn.mColorPicker.RGBtoHex($.fn.mColorPicker.color) != swatch[0] && $.fn.mColorPicker.hexToRGB($.fn.mColorPicker.color) != swatch[0] && swatch.length < 10) swatch[swatch.length] = $.fn.mColorPicker.color;
+
+ $(this).css('background-color', swatch[i++])
+ });
+
+ if ($.fn.mColorPicker.init.enhancedSwatches) $.fn.mColorPicker.setCookie('swatches', swatch.join('||'), 365);
+ };
+
+ $.fn.mColorPicker.whichColor = function (x, y, hex) {
+
+ var colorR = colorG = colorB = 255;
+
+ if (x < 32) {
+
+ colorG = x * 8;
+ colorB = 0;
+ } else if (x < 64) {
+
+ colorR = 256 - (x - 32 ) * 8;
+ colorB = 0;
+ } else if (x < 96) {
+
+ colorR = 0;
+ colorB = (x - 64) * 8;
+ } else if (x < 128) {
+
+ colorR = 0;
+ colorG = 256 - (x - 96) * 8;
+ } else if (x < 160) {
+
+ colorR = (x - 128) * 8;
+ colorG = 0;
+ } else {
+
+ colorG = 0;
+ colorB = 256 - (x - 160) * 8;
+ }
+
+ if (y < 64) {
+
+ colorR += (256 - colorR) * (64 - y) / 64;
+ colorG += (256 - colorG) * (64 - y) / 64;
+ colorB += (256 - colorB) * (64 - y) / 64;
+ } else if (y <= 128) {
+
+ colorR -= colorR * (y - 64) / 64;
+ colorG -= colorG * (y - 64) / 64;
+ colorB -= colorB * (y - 64) / 64;
+ } else if (y > 128) {
+
+ colorR = colorG = colorB = 256 - ( x / 192 * 256 );
+ }
+
+ colorR = Math.round(Math.min(colorR, 255));
+ colorG = Math.round(Math.min(colorG, 255));
+ colorB = Math.round(Math.min(colorB, 255));
+
+ if (hex == 'true') {
+
+ colorR = colorR.toString(16);
+ colorG = colorG.toString(16);
+ colorB = colorB.toString(16);
+
+ if (colorR.length < 2) colorR = 0 + colorR;
+ if (colorG.length < 2) colorG = 0 + colorG;
+ if (colorB.length < 2) colorB = 0 + colorB;
+
+ return "#" + colorR + colorG + colorB;
+ }
+
+ return "rgb(" + colorR + ', ' + colorG + ', ' + colorB + ')';
+ };
+
+ $.fn.mColorPicker.RGBtoHex = function (color) {
+
+ color = color.toLowerCase();
+
+ if (typeof color == 'undefined') return '';
+ if (color.indexOf('#') > -1 && color.length > 6) return color;
+ if (color.indexOf('rgb') < 0) return color;
+
+ if (color.indexOf('#') > -1) {
+
+ return '#' + color.substr(1, 1) + color.substr(1, 1) + color.substr(2, 1) + color.substr(2, 1) + color.substr(3, 1) + color.substr(3, 1);
+ }
+
+ var hexArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"],
+ decToHex = "#",
+ code1 = 0;
+
+ color = color.replace(/[^0-9,]/g, '').split(",");
+
+ for (var n = 0; n < color.length; n++) {
+
+ code1 = Math.floor(color[n] / 16);
+ decToHex += hexArray[code1] + hexArray[color[n] - code1 * 16];
+ }
+
+ return decToHex;
+ };
+
+ $.fn.mColorPicker.hexToRGB = function (color) {
+
+ color = color.toLowerCase();
+
+ if (typeof color == 'undefined') return '';
+ if (color.indexOf('rgb') > -1) return color;
+ if (color.indexOf('#') < 0) return color;
+
+ var c = color.replace('#', '');
+
+ if (c.length < 6) c = c.substr(0, 1) + c.substr(0, 1) + c.substr(1, 1) + c.substr(1, 1) + c.substr(2, 1) + c.substr(2, 1);
+
+ return 'rgb(' + parseInt(c.substr(0, 2), 16) + ', ' + parseInt(c.substr(2, 2), 16) + ', ' + parseInt(c.substr(4, 2), 16) + ')';
+ };
+
+ $(document).ready(function () {
+
+ if ($.fn.mColorPicker.init.replace) {
+
+ $('input[data-mcolorpicker!="true"]').filter(function() {
+
+ return ($.fn.mColorPicker.init.replace == '[type=color]')? this.getAttribute("type") == 'color': $(this).is($.fn.mColorPicker.init.replace);
+ }).mColorPicker({
+ imageFolder: 'plugins/message_highlight/colorpicker/images/',
+ allowTransparency: false,
+ showLogo: false,
+ liveEvents: false,
+ checkRedraw: 'ajaxSuccess'
+ });
+
+ $.fn.mColorPicker.liveEvents();
+ }
+ });
+})(jQuery);
diff --git a/plugins/message_highlight/localization/de_DE.inc b/plugins/message_highlight/localization/de_DE.inc
new file mode 100644
index 000000000..a8aecafc9
--- /dev/null
+++ b/plugins/message_highlight/localization/de_DE.inc
@@ -0,0 +1,15 @@
+<?php
+$labels['mh_title'] = 'Nachrichtenmarkierung';
+$labels['mh_matches'] = 'enthält';
+$labels['mh_color'] = 'Farbe';
+$labels['mh_delete'] = 'löschen';
+$labels['mh_delete_description'] = 'Diese Regel löschen';
+$labels['mh_add'] = 'hinzufügen';
+$labels['mh_add_description'] = 'Eine Regel hinzufügen';
+$labels['deleteconfirm'] = 'Möchten Sie diese Regel wirklich löschen?';
+
+// these should never happen, but add anyways
+$labels['headererror'] = 'Diese Regel ist fehlerhaft';
+$labels['inputempty'] = 'Ein oder mehrere Treffer sind leer';
+$labels['invalidcolor'] = 'Ungültige Farbauswahl';
+?>
diff --git a/plugins/message_highlight/localization/en_US.inc b/plugins/message_highlight/localization/en_US.inc
new file mode 100644
index 000000000..4768aba17
--- /dev/null
+++ b/plugins/message_highlight/localization/en_US.inc
@@ -0,0 +1,16 @@
+<?php
+$labels['mh_title'] = 'Message Highlights';
+$labels['mh_matches'] = 'matches';
+$labels['mh_color'] = 'color';
+$labels['mh_delete'] = 'delete';
+$labels['mh_delete_description'] = 'Delete this line';
+$labels['mh_add'] = 'add row';
+$labels['mh_add_description'] = 'Add an extra row beneath this row';
+$labels['deleteconfirm'] = 'Do you really want to delete this rule?';
+
+// these should never happen, but add anyways
+$labels['headererror'] = 'Error in message rule';
+$labels['inputempty'] = 'One or more of your matches are empty';
+$labels['invalidcolor'] = 'Invalid color';
+
+?> \ No newline at end of file
diff --git a/plugins/message_highlight/localization/fr_FR.inc b/plugins/message_highlight/localization/fr_FR.inc
new file mode 100644
index 000000000..fc342c22e
--- /dev/null
+++ b/plugins/message_highlight/localization/fr_FR.inc
@@ -0,0 +1,16 @@
+<?php
+$labels['mh_title'] = 'Mise en valeur des messages';
+$labels['mh_matches'] = 'Correspondance';
+$labels['mh_color'] = 'Couleur';
+$labels['mh_delete'] = 'Supprimer';
+$labels['mh_delete_description'] = 'Supprimer cette ligne';
+$labels['mh_add'] = 'Ajouter une ligne';
+$labels['mh_add_description'] = 'Ajouter une ligne supplémentaire sous cette ligne';
+$labels['deleteconfirm'] = 'Voulez-vous réellement supprimer cette règle ?';
+
+// Cela ne devrait jamais arriver, mais on ne sait jamais
+$labels['headererror'] = 'Erreur dans la règle sur les messages';
+$labels['inputempty'] = 'Une ou plusieurs de vos correspondances sont vides';
+$labels['invalidcolor'] = 'Couleur invalide';
+
+?> \ No newline at end of file
diff --git a/plugins/message_highlight/localization/nl_NL.inc b/plugins/message_highlight/localization/nl_NL.inc
new file mode 100644
index 000000000..b4d29c54a
--- /dev/null
+++ b/plugins/message_highlight/localization/nl_NL.inc
@@ -0,0 +1,15 @@
+<?php
+$labels['mh_title'] = 'Berichten markeren';
+$labels['mh_matches'] = 'bevat';
+$labels['mh_color'] = 'kleur';
+$labels['mh_delete'] = 'verwijderen';
+$labels['mh_delete_description'] = 'Verwijder deze regel';
+$labels['mh_add'] = 'regel toevoegen';
+$labels['mh_add_description'] = 'Voeg een extra regel toe onder deze regel';
+$labels['deleteconfirm'] = 'Wilt u deze regel echt verwijderen?';
+
+// these should never happen, but add anyways
+$labels['headererror'] = 'Fout in configuratie';
+$labels['invalidcolor'] = 'Onjuiste kleur';
+
+?> \ No newline at end of file
diff --git a/plugins/message_highlight/localization/ru_RU.inc b/plugins/message_highlight/localization/ru_RU.inc
new file mode 100644
index 000000000..8f24aa188
--- /dev/null
+++ b/plugins/message_highlight/localization/ru_RU.inc
@@ -0,0 +1,14 @@
+<?php
+$labels['mh_title'] = 'Подсветка сообщений';
+$labels['mh_matches'] = 'совпадения';
+$labels['mh_color'] = 'цвет';
+$labels['mh_delete'] = 'удалить';
+$labels['deleteconfirm'] = 'Вы действительно хотите удалить это правило?';
+
+// these should never happen, but add anyways
+$labels['headererror'] = 'Ошибка в правиле';
+$labels['inputempty'] = 'Одно или более совпадений пусты';
+$labels['invalidcolor'] = 'Неверный цвет';
+
+?>
+
diff --git a/plugins/message_highlight/message_highlight.css b/plugins/message_highlight/message_highlight.css
new file mode 100644
index 000000000..3d18b3b54
--- /dev/null
+++ b/plugins/message_highlight/message_highlight.css
@@ -0,0 +1,74 @@
+.rcmfd_mh_row td {
+ #background-color: transparent !important;
+}
+
+.rcmfd_mh_header {
+ font-size: 10pt;
+ margin-right: 10px;
+}
+
+.rcmfd_mh_input {
+ font-size: 10pt;
+ margin-left: 10px !important;
+ margin-right: 10px !important;
+}
+
+.mh_color {
+ margin-right: 10px;
+}
+
+.mh_color_input_2 {
+ #background-color:#FF764D;
+ border:1px solid black;
+ cursor:pointer;
+ display:inline-block;
+ float:none;
+ height: 20px;
+ width:100px;
+ margin-left: 10px;
+ vertical-align: top;
+}
+
+.mh_color_input {
+ width: 100px;
+ height: 20px;
+ display: none;
+ padding-top: 4px;
+ margin-right: 10px;
+}
+
+.mh_button {
+ margin-left: 10px;
+}
+
+.mh_first {
+ display: none;
+}
+
+/* icon */
+#sections-table #rcmrowmh_preferences td.section {
+ background-position: 6px -238px;
+}
+
+#sections-table #rcmrowmh_preferences.selected td.section {
+ background-position: 6px -262px;
+}
+
+/* remove some colorpicker elements */
+#mColorPickerTransparent, #mColorPickerSwatches, #mColorPickerImgGray {
+ display: none;
+}
+
+#mColorPickerFooter {
+ background-color: #ffffff !important;
+}
+
+#mColorPickerImg {
+ height: 55px !important;
+}
+
+#mColorPicker {
+ height: 83px !important;
+ padding: 2px !important;
+ background-color: #ffffff !important;
+}
diff --git a/plugins/message_highlight/message_highlight.js b/plugins/message_highlight/message_highlight.js
new file mode 100644
index 000000000..f6b0c58ec
--- /dev/null
+++ b/plugins/message_highlight/message_highlight.js
@@ -0,0 +1,58 @@
+var mh_cur_row;
+
+$(document).ready(function() {
+ if(window.rcmail) {
+
+ rcmail.addEventListener('plugin.mh_receive_row', mh_receive_row);
+
+ rcmail.addEventListener('insertrow', function(evt) {
+ var message = rcmail.env.messages[evt.row.uid];
+
+ // check if our color info is present
+ if(message.flags && message.flags.plugin_mh_color) {
+ $(evt.row.obj).addClass('rcmfd_mh_row');
+ evt.row.obj.style.color = message.flags.plugin_mh_color;
+ }
+ });
+
+
+ $('.mh_delete').live('click', function() {
+ mh_delete(this);
+ });
+
+ $('.mh_add').live('click', function() {
+ mh_add(this);
+ });
+ }
+});
+
+
+function mh_delete(button) {
+ if(confirm(rcmail.get_label('message_highlight.deleteconfirm'))) {
+ $(button).closest('tr', '#prefs-details').remove();
+ }
+}
+
+// do an ajax call to get a new row
+function mh_add(button) {
+ mh_cur_row = $(button).closest('tr', '#prefs-details');
+ lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_request('plugin.mh_add_row', '', lock);
+}
+
+// ajax return call
+function mh_receive_row(data) {
+ var row = data.row;
+ $(mh_cur_row).after('<tr><td>'+row+'</td></tr>');
+ //$('.mh_color_input:last').mColorPicker();
+
+ $('input[data-mcolorpicker!="true"]').filter(function() {
+ return ($.fn.mColorPicker.init.replace == '[type=color]')? this.getAttribute("type") == 'color': $(this).is($.fn.mColorPicker.init.replace);
+ }).mColorPicker({
+ imageFolder: 'plugins/message_highlight/colorpicker/images/',
+ allowTransparency: false,
+ showLogo: false,
+ liveEvents: false,
+ checkRedraw: 'ajaxSuccess'
+ });
+}
diff --git a/plugins/message_highlight/message_highlight.php b/plugins/message_highlight/message_highlight.php
new file mode 100644
index 000000000..573257dc0
--- /dev/null
+++ b/plugins/message_highlight/message_highlight.php
@@ -0,0 +1,176 @@
+<?php
+
+/**
+* @version 2.1
+* @author Cor Bosman (cor@roundcu.be)
+*/
+
+class message_highlight extends rcube_plugin
+{
+ public $task = 'mail|settings';
+ private $rcmail;
+ private $prefs;
+
+ public function init()
+ {
+ $this->add_texts('localization/', array('deleteconfirm'));
+ $this->add_hook('messages_list', array($this, 'mh_highlight'));
+ $this->add_hook('preferences_list', array($this, 'mh_preferences'));
+ $this->add_hook('preferences_save', array($this, 'mh_save'));
+ $this->add_hook('preferences_sections_list',array($this, 'mh_preferences_section'));
+ $this->add_hook('storage_init', array($this, 'storage_init'));
+
+ $this->register_action('plugin.mh_add_row', array($this, 'mh_add_row'));
+
+ $this->include_script('message_highlight.js');
+ $this->include_script('colorpicker/mColorPicker.js');
+ $this->include_stylesheet('message_highlight.css');
+ }
+
+ function storage_init($p)
+ {
+ $p['fetch_headers'] .= trim($p['fetch_headers']. ' ' . 'CC');
+ return($p);
+ }
+
+
+ // add color information for all messages
+ function mh_highlight($p)
+ {
+ $rcmail = rcmail::get_instance();
+ $this->prefs = $rcmail->config->get('message_highlight', array());
+
+ // dont loop over all messages if we dont have any highlights or no msgs
+ if(!count($this->prefs) or !isset($p['messages']) or !is_array($p['messages'])) return $p;
+
+ // loop over all messages and add highlight color to each message
+ foreach($p['messages'] as $message) {
+ if(($color = $this->mh_find_match($message)) !== false ) {
+ $message->list_flags['extra_flags']['plugin_mh_color'] = $color;
+ }
+ }
+ return($p);
+ }
+
+ // find a match for this message
+ function mh_find_match($message) {
+ foreach($this->prefs as $p) {
+ if(stristr($message->$p['header'], $p['input'])) {
+ return($p['color']);
+ }
+ }
+ return false;
+ }
+
+ // user preferences
+ function mh_preferences($args) {
+ if($args['section'] == 'mh_preferences') {
+ $this->add_texts('localization/', false);
+ $rcmail = rcmail::get_instance();
+
+ $args['blocks']['mh_preferences'] = array(
+ 'options' => array(),
+ 'name' => Q($this->gettext('mh_title'))
+ );
+
+ $i = 1;
+ $prefs = $rcmail->config->get('message_highlight', array());
+
+ foreach($prefs as $p) {
+ $args['blocks']['mh_preferences']['options'][$i++] = array(
+ 'content' => $this->mh_get_form_row($p['header'], $p['input'], $p['color'], true)
+ );
+ }
+
+ // no rows yet, add 1 empty row
+ if($i == 1) {
+ $args['blocks']['mh_preferences']['options'][$i] = array(
+ 'content' => $this->mh_get_form_row()
+ );
+ }
+ }
+
+ return($args);
+ }
+
+ function mh_add_row() {
+ $rcmail = rcmail::get_instance();
+ $rcmail->output->command('plugin.mh_receive_row', array('row' => $this->mh_get_form_row()));
+ }
+
+ // create a form row
+ function mh_get_form_row($header = 'from', $input = '', $color = '#ffffff', $delete = false) {
+
+ // header select box
+ $header_select = new html_select(array('name' => '_mh_header[]', 'class' => 'rcmfd_mh_header'));
+ $header_select->add(Q($this->gettext('subject')), 'subject');
+ $header_select->add(Q($this->gettext('from')), 'from');
+ $header_select->add(Q($this->gettext('to')), 'to');
+ $header_select->add(Q($this->gettext('cc')), 'cc');
+
+ // input field
+ $input = new html_inputfield(array('name' => '_mh_input[]', 'class' => 'rcmfd_mh_input', 'type' => 'text', 'autocomplete' => 'off', 'value' => $input));
+
+ // color box
+ $color = html::tag('input', array('id' => uniqid() ,'name' => '_mh_color[]' ,'type' => 'color' ,'text' => 'hidden', 'class' => 'mh_color_input', 'value' => $color, 'data-hex' => 'true'));
+
+ // delete button
+ $button = html::tag('input', array('class' => 'button mh_delete mh_button', 'type' => 'button', 'value' => $this->gettext('mh_delete'), 'title' => $this->gettext('mh_delete_description')));
+
+ // add button
+ $add_button = html::tag('input', array('class' => 'button mh_add mh_button', 'type' => 'button', 'value' => $this->gettext('mh_add'), 'title' => $this->gettext('mh_add_description')));
+
+ $content = $header_select->show($header) .
+ html::span('mh_matches', Q($this->gettext('mh_matches'))) .
+ $input->show() .
+ html::span('mh_color', Q($this->gettext('mh_color'))) .
+ $color . $button . $add_button;
+
+ if(rcmail::get_instance()->config->get('request_saver_compress_html', false)){
+ $content = request_saver::html_compress($content);
+ }
+
+ return($content);
+ }
+
+ // add a section to the preferences tab
+ function mh_preferences_section($args) {
+ $this->add_texts('localization/', false);
+ $args['list']['mh_preferences'] = array(
+ 'id' => 'mh_preferences',
+ 'section' => Q($this->gettext('mh_title'))
+ );
+ return($args);
+ }
+
+ // save preferences
+ function mh_save($args) {
+ if($args['section'] != 'mh_preferences') return;
+
+ $rcmail = rcmail::get_instance();
+
+ $header = get_input_value('_mh_header', RCUBE_INPUT_POST);
+ $input = get_input_value('_mh_input', RCUBE_INPUT_POST);
+ $color = get_input_value('_mh_color', RCUBE_INPUT_POST);
+
+
+ for($i=0; $i < count($header); $i++) {
+ if(!in_array($header[$i], array('subject', 'from', 'to', 'cc'))) {
+ $rcmail->output->show_message('message_highlight.headererror', 'error');
+ return;
+ }
+ if(!preg_match('/^#[0-9a-fA-F]{2,6}$/', $color[$i])) {
+ $rcmail->output->show_message('message_highlight.invalidcolor', 'error');
+ return;
+ }
+ if($input[$i] == '') {
+ continue;
+ }
+ $prefs[] = array('header' => $header[$i], 'input' => $input[$i], 'color' => $color[$i]);
+ }
+
+ $args['prefs']['message_highlight'] = $prefs;
+ return($args);
+ }
+}
+?>
diff --git a/plugins/message_highlight/package.xml b/plugins/message_highlight/package.xml
new file mode 100644
index 000000000..8da1c72f5
--- /dev/null
+++ b/plugins/message_highlight/package.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>message_highlight</name>
+ <lead>
+ <name>Cor Bosman</name>
+ <user>cor</user>
+ <email>cor@roundcu.be</email>
+ <active>yes</active>
+ </lead>
+ <uri>https://github.com/corbosman/message_highlight</uri>
+ <version>
+ <release>2.0</release>
+ </version>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+</package>
diff --git a/plugins/new_user_dialog/localization/ar.inc b/plugins/new_user_dialog/localization/ar.inc
new file mode 100644
index 000000000..110b6c429
--- /dev/null
+++ b/plugins/new_user_dialog/localization/ar.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog 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-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'يرجى إكمال هوية المرسل';
+$labels['identitydialoghint'] = 'يظهر هذا المربع مرة واحدة فقط عند تسجيل الدخول أول مرة .';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ar_SA.inc b/plugins/new_user_dialog/localization/ar_SA.inc
new file mode 100644
index 000000000..ea65a059c
--- /dev/null
+++ b/plugins/new_user_dialog/localization/ar_SA.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog 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-new_user_dialog/
+*/
+$labels['identitydialoghint'] = 'يظهر هذا المربع مرة واحدة فقط عند أول الدخول';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ast.inc b/plugins/new_user_dialog/localization/ast.inc
new file mode 100644
index 000000000..0ec826dee
--- /dev/null
+++ b/plugins/new_user_dialog/localization/ast.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog 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-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'Por favor, completa los tos datos personales';
+$labels['identitydialoghint'] = 'Esti diálogu namái va apaecer la primer vegada que te coneutes al corréu.';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/en_US.inc b/plugins/new_user_dialog/localization/en_US.inc
index d508cfc9c..a9e66bd23 100644
--- a/plugins/new_user_dialog/localization/en_US.inc
+++ b/plugins/new_user_dialog/localization/en_US.inc
@@ -2,10 +2,10 @@
/*
+-----------------------------------------------------------------------+
- | plugins/new_user_dialog/localization/<lang>.inc |
+ | plugins/new_user_dialog/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail New User Dialog plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/new_user_dialog/localization/es_AR.inc b/plugins/new_user_dialog/localization/es_AR.inc
new file mode 100644
index 000000000..bda1c7477
--- /dev/null
+++ b/plugins/new_user_dialog/localization/es_AR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog 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-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'Por favor, seleccione una identidad para los mensajes salientes';
+$labels['identitydialoghint'] = 'Este diálogo aparecerá sólo una vez durante el primer ingreso';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/eu_ES.inc b/plugins/new_user_dialog/localization/eu_ES.inc
new file mode 100644
index 000000000..1276ea70c
--- /dev/null
+++ b/plugins/new_user_dialog/localization/eu_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog 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-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'Osatu zure bidaltzaile-identitatea';
+$labels['identitydialoghint'] = 'Kutxa hau behin bakarri agertzen da lehenengoz sartzean.';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/fa_AF.inc b/plugins/new_user_dialog/localization/fa_AF.inc
new file mode 100644
index 000000000..d66d4cbcf
--- /dev/null
+++ b/plugins/new_user_dialog/localization/fa_AF.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog 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-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'لطفا مشخصات فرستنده را کامل کنید';
+$labels['identitydialoghint'] = 'این متن تنها هنگام اولین ورود نمایش داده خواهد شد';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/lb_LU.inc b/plugins/new_user_dialog/localization/lb_LU.inc
index 36da96e5e..4fe55546a 100644
--- a/plugins/new_user_dialog/localization/lb_LU.inc
+++ b/plugins/new_user_dialog/localization/lb_LU.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
*/
-
-$labels = array();
$labels['identitydialogtitle'] = 'Vervollstänneg w.e.gl deng Sender-Identitéit';
$labels['identitydialoghint'] = 'Dës Këscht erschéngt just beim éischte Login.';
-
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/lv_LV.inc b/plugins/new_user_dialog/localization/lv_LV.inc
index 0447d995a..2e3642330 100644
--- a/plugins/new_user_dialog/localization/lv_LV.inc
+++ b/plugins/new_user_dialog/localization/lv_LV.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['identitydialogtitle'] = 'Lūdzu aizpildiet Jūsu, kā sūtītāja, identitātes informāciju';
-$labels['identitydialoghint'] = 'Šis logs parādīsies tikai pirmajā autorizācijas reizē.';
+$labels['identitydialogtitle'] = 'Lūdzu, aizpildiet nosūtītāja identifikācijas informāciju';
+$labels['identitydialoghint'] = 'Šis logs parādīsies tikai pirmajā pieteikšanās reizē';
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ro_RO.inc b/plugins/new_user_dialog/localization/ro_RO.inc
index caa8f3257..9d16daee5 100644
--- a/plugins/new_user_dialog/localization/ro_RO.inc
+++ b/plugins/new_user_dialog/localization/ro_RO.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['identitydialogtitle'] = 'Te rog completează identitatea de expeditor.';
-$labels['identitydialoghint'] = 'Această căsuţă apare o data la prima autentificare.';
+$labels['identitydialogtitle'] = 'Te rog completează identitatea expeditorului.';
+$labels['identitydialoghint'] = 'Această căsuţă apare doar la prima autentificare.';
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/new_user_dialog.php b/plugins/new_user_dialog/new_user_dialog.php
index 39a707638..9c9dcce1c 100644
--- a/plugins/new_user_dialog/new_user_dialog.php
+++ b/plugins/new_user_dialog/new_user_dialog.php
@@ -10,12 +10,10 @@
* @version @package_version@
* @license GNU GPLv3+
* @author Thomas Bruederli
- * @author Aleksander Machniak
*/
class new_user_dialog extends rcube_plugin
{
public $task = 'login|mail';
- public $noframe = true;
function init()
{
@@ -34,9 +32,8 @@ class new_user_dialog extends rcube_plugin
function create_identity($p)
{
// set session flag when a new user was created and the default identity seems to be incomplete
- if ($p['login'] && !$p['complete']) {
+ if ($p['login'] && !$p['complete'])
$_SESSION['plugin.newuserdialog'] = true;
- }
}
/**
@@ -66,7 +63,7 @@ class new_user_dialog extends rcube_plugin
$table->add(null, html::tag('input', array(
'type' => 'text',
'name' => '_email',
- 'value' => rcube_utils::idn_to_utf8($identity['email']),
+ 'value' => rcube_idn_to_utf8($identity['email']),
'disabled' => ($identities_level == 1 || $identities_level == 3)
)));
@@ -89,30 +86,20 @@ class new_user_dialog extends rcube_plugin
'id' => 'newuserdialog',
'action' => $rcmail->url('plugin.newusersave'),
'method' => 'post'),
- html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) .
+ html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) .
+ html::p('hint', Q($this->gettext('identitydialoghint'))) .
$table->show() .
html::p(array('class' => 'formbuttons'),
html::tag('input', array('type' => 'submit',
'class' => 'button mainaction', 'value' => $this->gettext('save'))))
));
- $title = rcube::JQ($this->gettext('identitydialogtitle'));
-
// disable keyboard events for messages list (#1486726)
- $rcmail->output->add_script("
- $('#newuserdialog').show()
- .dialog({modal:true, resizable:false, closeOnEscape:false, width:450, title:'$title'})
- .submit(function() {
- var i, request = {}, form = $(this).serializeArray();
-
- for (i in form)
- request[form[i].name] = form[i].value;
-
- rcmail.http_post('plugin.newusersave', request, true);
- return false;
- });
- $('input[name=_name]').focus();
- rcube_webmail.prototype.new_user_dialog_close = function() { $('#newuserdialog').dialog('close'); }
+ $rcmail->output->add_script(
+ "rcmail.message_list.key_press = function(){};
+ rcmail.message_list.key_down = function(){};
+ $('#newuserdialog').show().dialog({ modal:true, resizable:false, closeOnEscape:false, width:420 });
+ $('input[name=_name]').focus();
", 'docready');
$this->include_stylesheet('newuserdialog.css');
@@ -120,45 +107,39 @@ class new_user_dialog extends rcube_plugin
}
/**
- * Handler for submitted form (ajax request)
+ * Handler for submitted form
*
* Check fields and save to default identity if valid.
* Afterwards the session flag is removed and we're done.
*/
function save_data()
{
- $rcmail = rcmail::get_instance();
- $identity = $rcmail->user->get_identity();
- $ident_level = intval($rcmail->config->get('identities_level', 0));
+ $rcmail = rcmail::get_instance();
+ $identity = $rcmail->user->get_identity();
+ $identities_level = intval($rcmail->config->get('identities_level', 0));
$save_data = array(
- 'name' => rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST),
- 'email' => rcube_utils::get_input_value('_email', rcube_utils::INPUT_POST),
- 'organization' => rcube_utils::get_input_value('_organization', rcube_utils::INPUT_POST),
- 'signature' => rcube_utils::get_input_value('_signature', rcube_utils::INPUT_POST),
+ 'name' => get_input_value('_name', RCUBE_INPUT_POST),
+ 'email' => get_input_value('_email', RCUBE_INPUT_POST),
+ 'organization' => get_input_value('_organization', RCUBE_INPUT_POST),
+ 'signature' => get_input_value('_signature', RCUBE_INPUT_POST),
);
// don't let the user alter the e-mail address if disabled by config
- if (in_array($ident_level, array(1,3,4))) {
+ if ($identities_level == 1 || $identities_level == 3)
$save_data['email'] = $identity['email'];
- }
+ else
+ $save_data['email'] = rcube_idn_to_ascii($save_data['email']);
- if (empty($save_data['name']) || empty($save_data['email'])) {
- $rcmail->output->show_message('formincomplete', 'error');
- }
- else if (!rcube_utils::check_email($save_data['email'] = rcube_utils::idn_to_ascii($save_data['email']))) {
- $rcmail->output->show_message('emailformaterror', 'error', array('email' => $save_data['email']));
- }
- else {
- // save data
+ // save data if not empty
+ if (!empty($save_data['name']) && !empty($save_data['email'])) {
$rcmail->user->update_identity($identity['identity_id'], $save_data);
$rcmail->session->remove('plugin.newuserdialog');
- // hide dialog
- $rcmail->output->command('new_user_dialog_close');
- $rcmail->output->show_message('successfullysaved', 'confirmation');
}
- $rcmail->output->send();
+ $rcmail->output->redirect('');
}
}
+
+?>
diff --git a/plugins/new_user_dialog/package.xml b/plugins/new_user_dialog/package.xml
index 68a929931..0bca1d9d4 100644
--- a/plugins/new_user_dialog/package.xml
+++ b/plugins/new_user_dialog/package.xml
@@ -13,16 +13,21 @@
<email>roundcube@gmail.com</email>
<active>yes</active>
</lead>
- <date>2013-05-09</date>
+ <date>2012-01-16</date>
+ <time>17:00</time>
<version>
- <release>2.0</release>
- <api>2.0</api>
+ <release>1.5</release>
+ <api>1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>
+- Use jquery UI to render the dialog
+- Fixed IDNA encoding/decoding of e-mail addresses (#1487909)
+ </notes>
<contents>
<dir baseinstalldir="/" name="/">
<file name="new_user_dialog.php" role="php">
@@ -66,4 +71,84 @@
</required>
</dependencies>
<phprelease/>
+ <changelog>
+ <release>
+ <date>2010-03-29</date>
+ <time>13:20:00</time>
+ <version>
+ <release>1.0</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes></notes>
+ </release>
+ <release>
+ <date>2010-05-13</date>
+ <time>19:35:00</time>
+ <version>
+ <release>1.1</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+- Fix space bar and backspace buttons not working (#1486726)
+ </notes>
+ </release>
+ <release>
+ <date>2010-05-27</date>
+ <time>12:00:00</time>
+ <version>
+ <release>1.2</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+- Add overlay box only to mail task main template
+- Fix possible error on form submission (#1486103)
+ </notes>
+ </release>
+ <release>
+ <date>2010-12-02</date>
+ <time>12:00:00</time>
+ <version>
+ <release>1.3</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+- Added setting of focus on name input
+- Added gl_ES translation
+ </notes>
+ </release>
+ <release>
+ <date>2012-01-16</date>
+ <time>17:00:00</time>
+ <version>
+ <release>1.5</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>- Use jquery UI to render the dialog</notes>
+ </release>
+ </changelog>
</package>
diff --git a/plugins/new_user_identity/new_user_identity.php b/plugins/new_user_identity/new_user_identity.php
index 3943134b2..200d9accd 100644
--- a/plugins/new_user_identity/new_user_identity.php
+++ b/plugins/new_user_identity/new_user_identity.php
@@ -8,18 +8,17 @@
*
* @version @package_version@
* @author Kris Steinhoff
- * @license GNU GPLv3+
*
* Example configuration:
*
* // The id of the address book to use to automatically set a new
* // user's full name in their new identity. (This should be an
- * // string, which refers to the $config['ldap_public'] array.)
- * $config['new_user_identity_addressbook'] = 'People';
+ * // string, which refers to the $rcmail_config['ldap_public'] array.)
+ * $rcmail_config['new_user_identity_addressbook'] = 'People';
*
* // When automatically setting a new users's full name in their
* // new identity, match the user's login name against this field.
- * $config['new_user_identity_match'] = 'uid';
+ * $rcmail_config['new_user_identity_match'] = 'uid';
*/
class new_user_identity extends rcube_plugin
{
@@ -34,6 +33,8 @@ class new_user_identity extends rcube_plugin
function lookup_user_name($args)
{
+ $rcmail = rcmail::get_instance();
+
if ($this->init_ldap($args['host'])) {
$results = $this->ldap->search('*', $args['user'], true);
if (count($results->records) == 1) {
@@ -42,7 +43,7 @@ class new_user_identity extends rcube_plugin
$args['user_name'] = $user_name;
if (!$args['user_email'] && strpos($user_email, '@')) {
- $args['user_email'] = rcube_utils::idn_to_ascii($user_email);
+ $args['user_email'] = rcube_idn_to_ascii($user_email);
}
}
}
diff --git a/plugins/new_user_identity/package.xml b/plugins/new_user_identity/package.xml
index 45a3c4c8d..e50cd9255 100644
--- a/plugins/new_user_identity/package.xml
+++ b/plugins/new_user_identity/package.xml
@@ -24,7 +24,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/newmail_notifier/config.inc.php.dist b/plugins/newmail_notifier/config.inc.php.dist
index cdb563c40..067fe19f1 100644
--- a/plugins/newmail_notifier/config.inc.php.dist
+++ b/plugins/newmail_notifier/config.inc.php.dist
@@ -1,12 +1,12 @@
<?php
// Enables basic notification
-$config['newmail_notifier_basic'] = false;
+$rcmail_config['newmail_notifier_basic'] = false;
// Enables sound notification
-$config['newmail_notifier_sound'] = false;
+$rcmail_config['newmail_notifier_sound'] = false;
// Enables desktop notification
-$config['newmail_notifier_desktop'] = false;
+$rcmail_config['newmail_notifier_desktop'] = false;
?>
diff --git a/plugins/newmail_notifier/localization/ast.inc b/plugins/newmail_notifier/localization/ast.inc
new file mode 100644
index 000000000..3c5c192e0
--- /dev/null
+++ b/plugins/newmail_notifier/localization/ast.inc
@@ -0,0 +1,28 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/newmail_notifier/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New Mail Notifier 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-newmail_notifier/
+*/
+$labels['basic'] = 'Amosar notificaciones del navegador cuando aporte un mensaxe nuevu';
+$labels['desktop'] = 'Amosar notificaciones del escritoriu cuando aporte un mensaxe nuevu';
+$labels['sound'] = 'Reproducir soníu cuando aporte un mensaxe nuevu';
+$labels['test'] = 'Prueba';
+$labels['title'] = '¡Mensaxe nuevu!';
+$labels['body'] = 'Recibisti un mensaxe nuevu';
+$labels['testbody'] = 'Esta ye una notificación de pruebes';
+$labels['desktopdisabled'] = 'Les notificaciones d\'escritoriu tán deshabilitaes nel to navegador.';
+$labels['desktopunsupported'] = 'El to navegador nun sofita notificaciones d\'escritoriu.';
+$labels['desktoptimeout'] = 'Zarrar notificación d\'escritoriu';
+?>
diff --git a/plugins/newmail_notifier/localization/bg_BG.inc b/plugins/newmail_notifier/localization/bg_BG.inc
new file mode 100644
index 000000000..15791dd93
--- /dev/null
+++ b/plugins/newmail_notifier/localization/bg_BG.inc
@@ -0,0 +1,28 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/newmail_notifier/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New Mail Notifier 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-newmail_notifier/
+*/
+$labels['basic'] = 'Показва известия в браузъра при ново писмо';
+$labels['desktop'] = 'Показва известия на работния плот при ново писмо';
+$labels['sound'] = 'Възпроизведи звук при ново писмо';
+$labels['test'] = 'Тест';
+$labels['title'] = 'Ново писмо!';
+$labels['body'] = 'Получихте ново писмо.';
+$labels['testbody'] = 'Това е тестово известие.';
+$labels['desktopdisabled'] = 'Известията на работния плот са изключени за Вашия браузър.';
+$labels['desktopunsupported'] = 'Вашият браузър не поддържа известия на работния плот.';
+$labels['desktoptimeout'] = 'Затваряне на известие на работния плот';
+?>
diff --git a/plugins/newmail_notifier/localization/el_GR.inc b/plugins/newmail_notifier/localization/el_GR.inc
new file mode 100644
index 000000000..5f41bc974
--- /dev/null
+++ b/plugins/newmail_notifier/localization/el_GR.inc
@@ -0,0 +1,27 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/newmail_notifier/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New Mail Notifier 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-newmail_notifier/
+*/
+$labels['basic'] = 'Εμφανίση ειδοποιήσεων πρόγραμματος περιήγησης στο νέο μήνυμα';
+$labels['desktop'] = 'Εμφάνιση ειδοποιήσεων στην επιφάνεια εργασίας για νέο μήνυμα ';
+$labels['sound'] = 'Ηχητική ειδοποίηση κατά την λήψη νέων μηνυμάτων';
+$labels['test'] = 'Δοκιμη';
+$labels['title'] = 'Nεο Email!';
+$labels['body'] = 'Έχετε λάβει ένα νέο μήνυμα.';
+$labels['testbody'] = 'Αυτή είναι μια δοκιμή ειδοποίησης.';
+$labels['desktopdisabled'] = 'Οι κοινοποιήσεις Desktop ειναι απενεργοποιημένη στον περιηγητή σας.';
+$labels['desktopunsupported'] = 'Ο περιηγητής σας δεν υποστηρίζει ειδοποιήσεις στην επιφάνεια εργασίας.';
+?>
diff --git a/plugins/newmail_notifier/localization/en_US.inc b/plugins/newmail_notifier/localization/en_US.inc
index 7c1c5cf3f..da8340b80 100644
--- a/plugins/newmail_notifier/localization/en_US.inc
+++ b/plugins/newmail_notifier/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/newmail_notifier/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail New Mail Notifier plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/newmail_notifier/localization/es_AR.inc b/plugins/newmail_notifier/localization/es_AR.inc
new file mode 100644
index 000000000..682d79ef4
--- /dev/null
+++ b/plugins/newmail_notifier/localization/es_AR.inc
@@ -0,0 +1,27 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/newmail_notifier/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New Mail Notifier 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-newmail_notifier/
+*/
+$labels['basic'] = 'Mostrar notificación cuando haya nuevos mensajes';
+$labels['desktop'] = 'Mostrar notificación en escritorio cuando haya nuevos mensajes';
+$labels['sound'] = 'Reproducir sonido cuando haya nuevos mensajes';
+$labels['test'] = 'Prueba';
+$labels['title'] = 'Correo nuevo!';
+$labels['body'] = 'Has recibido correo nuevo';
+$labels['testbody'] = 'Esta es una notificación de prueba';
+$labels['desktopdisabled'] = 'Las notificaciones en escritorio están deshabilitadas en tu navegador';
+$labels['desktopunsupported'] = 'Tu navegador no soporta notificaciones en escritorio';
+?>
diff --git a/plugins/newmail_notifier/localization/eu_ES.inc b/plugins/newmail_notifier/localization/eu_ES.inc
new file mode 100644
index 000000000..7d7d90408
--- /dev/null
+++ b/plugins/newmail_notifier/localization/eu_ES.inc
@@ -0,0 +1,27 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/newmail_notifier/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New Mail Notifier 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-newmail_notifier/
+*/
+$labels['basic'] = 'Bistaratu nabigatzailearen jakinarazpenak mezu berrian';
+$labels['desktop'] = 'Bistaratu sistemaren jakinarazpenak mezu berrian';
+$labels['sound'] = 'Jo soinu bat mezu berriarekin';
+$labels['test'] = 'Testa';
+$labels['title'] = 'ePosta berria';
+$labels['body'] = 'Mezu berria jaso duzu';
+$labels['testbody'] = 'Hau jakinarazpen proba bat da';
+$labels['desktopdisabled'] = 'Sistemaren jakinarazpenak ezgaituak daude zure nabigatzailean';
+$labels['desktopunsupported'] = 'Zure nabigatzaileak ez ditu sistemaren jakinarazpenak onartzen.';
+?>
diff --git a/plugins/newmail_notifier/localization/lb_LU.inc b/plugins/newmail_notifier/localization/lb_LU.inc
index c4b014819..8e6f5f603 100644
--- a/plugins/newmail_notifier/localization/lb_LU.inc
+++ b/plugins/newmail_notifier/localization/lb_LU.inc
@@ -15,7 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/
*/
-
$labels['basic'] = 'Browser-Notifikatioun bei neiem Message uweisen';
$labels['desktop'] = 'Desktop-Notifikatioun bei neiem Message uweisen';
$labels['sound'] = 'Dësen Toun bei neiem Message spillen';
@@ -25,5 +24,5 @@ $labels['body'] = 'Du hues en neie Message kritt.';
$labels['testbody'] = 'Dëst ass eng Test-Benoorichtegung.';
$labels['desktopdisabled'] = 'Desktop-Notifikatioune sinn an dengem Browser ausgeschalt.';
$labels['desktopunsupported'] = 'Däi Browser ënnerstëtzt keng Desktop-Notifikatiounen.';
-
+$labels['desktoptimeout'] = 'Browser-Notifikatioun zoumaachen';
?>
diff --git a/plugins/newmail_notifier/localization/lv_LV.inc b/plugins/newmail_notifier/localization/lv_LV.inc
index da9603cd5..9df738b25 100644
--- a/plugins/newmail_notifier/localization/lv_LV.inc
+++ b/plugins/newmail_notifier/localization/lv_LV.inc
@@ -16,14 +16,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/
*/
-$labels['basic'] = 'Saņemot jaunu vēstuli, parādīt paziņojumu';
-$labels['desktop'] = 'Saņemot jaunu vēstuli, parādīt darbavirsmas paziņojumu';
-$labels['sound'] = 'Saņemot jaunu vēstuli, atskaņot skaņas signālu';
-$labels['test'] = 'Pārbaudīt';
-$labels['title'] = 'Jauns e-pasts!';
-$labels['body'] = 'Jūs esat saņēmis jaunu vēstuli.';
+$labels['basic'] = 'Attēlot paziņojumu pie jaunas vēstules saņemšanas';
+$labels['desktop'] = 'Attēlot darbvirsmas paziņojumu pie jaunas vēstules saņemšanas';
+$labels['sound'] = 'Atskaņot skaņas signālu pie jaunas vēstules saņemšanas';
+$labels['test'] = 'Test';
+$labels['title'] = 'Jauns E-pasts!';
+$labels['body'] = 'Jūs esat saņēmis jaunu e-pastu.';
$labels['testbody'] = 'Šis ir testa paziņojums.';
-$labels['desktopdisabled'] = 'Darbavirsmas paziņojumi Jūsu pārlūkprogrammā ir atslēgti.';
-$labels['desktopunsupported'] = 'Jūsu pārlūkprogramma neatbalsta darbavirsmas paziņojumus.';
+$labels['desktopdisabled'] = 'Darbvirsmas paziņojumi ir atslēgti Jūsu pārlūkprogrammā.';
+$labels['desktopunsupported'] = 'Jūsu pārlūkprogramma neatbalsta darbvirsmas paziņojumus.';
?>
diff --git a/plugins/newmail_notifier/localization/ro_RO.inc b/plugins/newmail_notifier/localization/ro_RO.inc
index c78c7e081..b27e506ab 100644
--- a/plugins/newmail_notifier/localization/ro_RO.inc
+++ b/plugins/newmail_notifier/localization/ro_RO.inc
@@ -19,11 +19,11 @@
$labels['basic'] = 'Afişează notificări în browser la mesaj nou.';
$labels['desktop'] = 'Afişează notificări desktop la mesaj nou.';
$labels['sound'] = 'Redă un sunet la mesaj nou.';
-$labels['test'] = 'Test';
+$labels['test'] = 'Testează';
$labels['title'] = 'E-mail nou!';
$labels['body'] = 'Ai primit un mesaj nou.';
$labels['testbody'] = 'Aceasta este o notificare de test.';
$labels['desktopdisabled'] = 'Notificările desktop sunt dezactivate în browser.';
-$labels['desktopunsupported'] = 'Browser-ul nu suportă notificări desktop.';
+$labels['desktopunsupported'] = 'Browser-ul dumneavoastră nu suportă notificări desktop.';
?>
diff --git a/plugins/newmail_notifier/localization/ti.inc b/plugins/newmail_notifier/localization/ti.inc
new file mode 100644
index 000000000..17b8e7361
--- /dev/null
+++ b/plugins/newmail_notifier/localization/ti.inc
@@ -0,0 +1,27 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/newmail_notifier/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New Mail Notifier 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-newmail_notifier/
+*/
+$labels['basic'] = 'ሓዱሽ መል እኽቲ ጠቆምቲ አብ ጎስጓሲ ይርአ';
+$labels['desktop'] = 'ሓዱሽ መል እኽቲ ጠቆምቲ ኣብ ደስክቶፕ ይርአ';
+$labels['sound'] = 'ሓዱሽ መል እኽቲ ምስዝመጽእ ድምጺ ይሰማዕ';
+$labels['test'] = 'ፈተነ';
+$labels['title'] = 'ሓድሽ ኢደብዳበ!';
+$labels['body'] = 'ሓድሽ ኢደብዳበ በጺሑ አሎ::';
+$labels['testbody'] = 'እዚ ጥቆማ ንፈተን ዝተገብረ እዩ::';
+$labels['desktopdisabled'] = 'ናይ ደስክቶፕ ጠቆምቲ ተኸልኪሎማ አለዉ::';
+$labels['desktopunsupported'] = 'እዚ ጎስጓሲ ናይ ደስክቶፕ ጠቆምቲ ኣይተገጠመሉን::';
+?>
diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js
index b00f33d10..45238eb56 100644
--- a/plugins/newmail_notifier/newmail_notifier.js
+++ b/plugins/newmail_notifier/newmail_notifier.js
@@ -34,13 +34,6 @@ function newmail_notifier_stop(prop)
$('<link rel="shortcut icon" href="'+rcmail.env.favicon_href+'"/>').replaceAll('link[rel="shortcut icon"]');
rcmail.env.favicon_changed = 0;
}
-
- // Remove IE icon overlay if we're pinned to Taskbar
- try {
- if(window.external.msIsSiteMode()) {
- window.external.msSiteModeClearIconOverlay();
- }
- } catch(e) {}
}
// Basic notification: window.focus and favicon change
@@ -59,13 +52,6 @@ function newmail_notifier_basic()
rcmail.env.favicon_changed = 1;
link.replaceAll(oldlink);
-
- // Add IE icon overlay if we're pinned to Taskbar
- try {
- if (window.external.msIsSiteMode()) {
- window.external.msSiteModeSetIconOverlay('plugins/newmail_notifier/overlay.ico', rcmail.gettext('title', 'newmail_notifier'));
- }
- } catch(e) {}
}
// Sound notification
@@ -86,79 +72,44 @@ function newmail_notifier_sound()
}
}
-// Desktop notification
-// - Require Chrome or Firefox latest version (22+) / 21.0 or older with a plugin
+// Desktop notification (need Chrome or Firefox with a plugin)
function newmail_notifier_desktop(body)
{
-
-/**
- * Fix: As of 17 June 2013, Chrome/Chromium does not implement Notification.permission correctly that
- * it gives 'undefined' until an object has been created:
- * https://code.google.com/p/chromium/issues/detail?id=163226
- *
- */
- try {
- if (Notification.permission == 'granted' || Notification.permission == undefined) {
- var popup = new Notification(rcmail.gettext('title', 'newmail_notifier'), {
- dir: "auto",
- lang: "",
- body: body,
- tag: "newmail_notifier",
- icon: "plugins/newmail_notifier/mail.png",
- });
- popup.onclick = function() {
- this.close();
- }
- setTimeout(function() { popup.close(); }, 10000); // close after 10 seconds
- if (popup.permission == 'granted') return true;
- }
- }
- catch (e) {
- var dn = window.webkitNotifications;
-
- if (dn && !dn.checkPermission()) {
- if (rcmail.newmail_popup)
- rcmail.newmail_popup.cancel();
- var popup = window.webkitNotifications.createNotification('plugins/newmail_notifier/mail.png',
- rcmail.gettext('title', 'newmail_notifier'), body);
- popup.onclick = function() {
- this.cancel();
- }
- popup.show();
- setTimeout(function() { popup.cancel(); }, 10000); // close after 10 seconds
- rcmail.newmail_popup = popup;
- return true;
+ var dn = window.webkitNotifications;
+
+ if (dn && !dn.checkPermission()) {
+ if (rcmail.newmail_popup)
+ rcmail.newmail_popup.cancel();
+ var popup = window.webkitNotifications.createNotification('plugins/newmail_notifier/mail.png',
+ rcmail.gettext('title', 'newmail_notifier'), body);
+ popup.onclick = function() {
+ this.cancel();
}
+ popup.show();
+ setTimeout(function() { popup.cancel(); }, 10000); // close after 10 seconds
+ rcmail.newmail_popup = popup;
+ return true;
}
+
return false;
}
function newmail_notifier_test_desktop()
{
- var txt = rcmail.gettext('testbody', 'newmail_notifier');
+ var dn = window.webkitNotifications,
+ txt = rcmail.gettext('testbody', 'newmail_notifier');
- // W3C draft implementation (with fix for Chrome/Chromium)
- try {
- var testNotification = new window.Notification(txt, {tag: "newmail_notifier"}); // Try to show a test message
- if (Notification.permission !== 'granted' || (testNotification.permission && testNotification.permission !== 'granted'))
- newmail_notifier_desktop_authorize();
- }
- // webkit implementation
- catch (e) {
- var dn = window.webkitNotifications;
- if (dn) {
- if (!dn.checkPermission())
- newmail_notifier_desktop(txt);
- else
- dn.requestPermission(function() {
- if (!newmail_notifier_desktop(txt))
- rcmail.display_message(rcmail.gettext('desktopdisabled', 'newmail_notifier'), 'error');
- });
- }
+ if (dn) {
+ if (!dn.checkPermission())
+ newmail_notifier_desktop(txt);
else
- // Everything fails, means the browser has no support
- rcmail.display_message(rcmail.gettext('desktopunsupported', 'newmail_notifier'), 'error');
+ dn.requestPermission(function() {
+ if (!newmail_notifier_desktop(txt))
+ rcmail.display_message(rcmail.gettext('desktopdisabled', 'newmail_notifier'), 'error');
+ });
}
+ else
+ rcmail.display_message(rcmail.gettext('desktopunsupported', 'newmail_notifier'), 'error');
}
function newmail_notifier_test_basic()
@@ -170,12 +121,3 @@ function newmail_notifier_test_sound()
{
newmail_notifier_sound();
}
-
-function newmail_notifier_desktop_authorize() {
- Notification.requestPermission(function(perm) {
- if (perm == 'denied')
- rcmail.display_message(rcmail.gettext('desktopdisabled', 'newmail_notifier'), 'error');
- if (perm == 'granted')
- newmail_notifier_test_desktop(); // Test again, which should show test message
- });
-}
diff --git a/plugins/newmail_notifier/newmail_notifier.php b/plugins/newmail_notifier/newmail_notifier.php
index ca1c2ff67..2c7ba949d 100644
--- a/plugins/newmail_notifier/newmail_notifier.php
+++ b/plugins/newmail_notifier/newmail_notifier.php
@@ -15,18 +15,18 @@
*
* Copyright (C) 2011, 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 free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
*
* 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/.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
class newmail_notifier extends rcube_plugin
@@ -35,9 +35,6 @@ class newmail_notifier extends rcube_plugin
private $rc;
private $notified;
- private $opt = array();
- private $exceptions = array();
-
/**
* Plugin initialization
@@ -52,34 +49,13 @@ class newmail_notifier extends rcube_plugin
$this->add_hook('preferences_save', array($this, 'prefs_save'));
}
else { // if ($this->rc->task == 'mail') {
+ $this->add_hook('new_messages', array($this, 'notify'));
// add script when not in ajax and not in frame
if ($this->rc->output->type == 'html' && empty($_REQUEST['_framed'])) {
$this->add_texts('localization/');
$this->rc->output->add_label('newmail_notifier.title', 'newmail_notifier.body');
$this->include_script('newmail_notifier.js');
}
-
- if ($this->rc->action == 'refresh') {
- // Load configuration
- $this->load_config();
-
- $this->opt['basic'] = $this->rc->config->get('newmail_notifier_basic');
- $this->opt['sound'] = $this->rc->config->get('newmail_notifier_sound');
- $this->opt['desktop'] = $this->rc->config->get('newmail_notifier_desktop');
-
- if (!empty($this->opt)) {
- // Get folders to skip checking for
- $exceptions = array('drafts_mbox', 'sent_mbox', 'trash_mbox');
- foreach ($exceptions as $folder) {
- $folder = $this->rc->config->get($folder);
- if (strlen($folder) && $folder != 'INBOX') {
- $this->exceptions[] = $folder;
- }
- }
-
- $this->add_hook('new_messages', array($this, 'notify'));
- }
- }
}
}
@@ -117,7 +93,7 @@ class newmail_notifier extends rcube_plugin
$this->gettext('test'));
$args['blocks']['new_message']['options'][$key] = array(
- 'title' => html::label($field_id, rcube::Q($this->gettext($type))),
+ 'title' => html::label($field_id, Q($this->gettext($type))),
'content' => $content
);
}
@@ -144,7 +120,7 @@ class newmail_notifier extends rcube_plugin
foreach (array('basic', 'desktop', 'sound') as $type) {
$key = 'newmail_notifier_' . $type;
if (!in_array($key, $dont_override)) {
- $args['prefs'][$key] = rcube_utils::get_input_value('_'.$key, rcube_utils::INPUT_POST) ? true : false;
+ $args['prefs'][$key] = get_input_value('_'.$key, RCUBE_INPUT_POST) ? true : false;
}
}
@@ -156,36 +132,45 @@ class newmail_notifier extends rcube_plugin
*/
function notify($args)
{
- // Already notified or unexpected input
- if ($this->notified || empty($args['diff']['new'])) {
+ // Already notified or non-automatic check
+ if ($this->notified || !empty($_GET['_refresh'])) {
return $args;
}
- $mbox = $args['mailbox'];
- $storage = $this->rc->get_storage();
- $delimiter = $storage->get_hierarchy_delimiter();
+ // Get folders to skip checking for
+ if (empty($this->exceptions)) {
+ $this->delimiter = $this->rc->storage->get_hierarchy_delimiter();
+
+ $exceptions = array('drafts_mbox', 'sent_mbox', 'trash_mbox');
+ foreach ($exceptions as $folder) {
+ $folder = $this->rc->config->get($folder);
+ if (strlen($folder) && $folder != 'INBOX') {
+ $this->exceptions[] = $folder;
+ }
+ }
+ }
+
+ $mbox = $args['mailbox'];
// Skip exception (sent/drafts) folders (and their subfolders)
foreach ($this->exceptions as $folder) {
- if (strpos($mbox.$delimiter, $folder.$delimiter) === 0) {
+ if (strpos($mbox.$this->delimiter, $folder.$this->delimiter) === 0) {
return $args;
}
}
- // Check if any of new messages is UNSEEN
- $deleted = $this->rc->config->get('skip_deleted') ? 'UNDELETED ' : '';
- $search = $deleted . 'UNSEEN UID ' . $args['diff']['new'];
- $unseen = $storage->search_once($mbox, $search);
+ $this->notified = true;
+
+ // Load configuration
+ $this->load_config();
- if ($unseen->count()) {
- $this->notified = true;
+ $basic = $this->rc->config->get('newmail_notifier_basic');
+ $sound = $this->rc->config->get('newmail_notifier_sound');
+ $desktop = $this->rc->config->get('newmail_notifier_desktop');
+ if ($basic || $sound || $desktop) {
$this->rc->output->command('plugin.newmail_notifier',
- array(
- 'basic' => $this->opt['basic'],
- 'sound' => $this->opt['sound'],
- 'desktop' => $this->opt['desktop'],
- ));
+ array('basic' => $basic, 'sound' => $sound, 'desktop' => $desktop));
}
return $args;
diff --git a/plugins/newmail_notifier/package.xml b/plugins/newmail_notifier/package.xml
index b8ef34933..d3de25fb3 100644
--- a/plugins/newmail_notifier/package.xml
+++ b/plugins/newmail_notifier/package.xml
@@ -19,16 +19,16 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2013-03-16</date>
+ <date>2012-02-07</date>
<version>
- <release>0.5</release>
- <api>0.5</api>
+ <release>0.4</release>
+ <api>0.3</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/newmail_notifier/sound.mp3 b/plugins/newmail_notifier/sound.mp3
new file mode 100644
index 000000000..3b494a94d
--- /dev/null
+++ b/plugins/newmail_notifier/sound.mp3
Binary files differ
diff --git a/plugins/password/README b/plugins/password/README
index 262ebfd86..ef6f5b428 100644
--- a/plugins/password/README
+++ b/plugins/password/README
@@ -1,29 +1,31 @@
-----------------------------------------------------------------------
Password Plugin for Roundcube
-----------------------------------------------------------------------
+
Plugin that adds a possibility to change user password using many
methods (drivers) via Settings/Password tab.
+
-----------------------------------------------------------------------
- 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 free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ as published by the Free Software Foundation.
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
+ 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/.
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@version @package_version@
- @author Aleksander Machniak <alec@alec.pl>
+ @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
@author <see driver files for driver authors>
-----------------------------------------------------------------------
- 1. Configuration
- 2. Drivers
+ 1. Configuration
+ 2. Drivers
2.1. Database (sql)
2.2. Cyrus/SASL (sasl)
2.3. Poppassd/Courierpassd (poppassd)
@@ -42,8 +44,7 @@
2.16. DBMail (dbmail)
2.17. Expect (expect)
2.18. Samba (smb)
- 2.19. Vpopmail daemon (vpopmaild)
- 3. Driver API
+ 3. Driver API
1. Configuration
@@ -64,40 +65,40 @@
-------------------
You can specify which database to connect by 'password_db_dsn' option and
- what SQL query to execute by 'password_query'. See config.inc.php.dist file for
+ what SQL query to execute by 'password_query'. See main.inc.php.dist file for
more info.
Example implementations of an update_passwd function:
- This is for use with LMS (http://lms.org.pl) database and postgres:
- CREATE OR REPLACE FUNCTION update_passwd(hash text, account text) RETURNS integer AS $$
- DECLARE
- res integer;
- BEGIN
- UPDATE passwd SET password = hash
- WHERE login = split_part(account, '@', 1)
- AND domainid = (SELECT id FROM domains WHERE name = split_part(account, '@', 2))
- RETURNING id INTO res;
- RETURN res;
- END;
- $$ LANGUAGE plpgsql SECURITY DEFINER;
+ CREATE OR REPLACE FUNCTION update_passwd(hash text, account text) RETURNS integer AS $$
+ DECLARE
+ res integer;
+ BEGIN
+ UPDATE passwd SET password = hash
+ WHERE login = split_part(account, '@', 1)
+ AND domainid = (SELECT id FROM domains WHERE name = split_part(account, '@', 2))
+ RETURNING id INTO res;
+ RETURN res;
+ END;
+ $$ LANGUAGE plpgsql SECURITY DEFINER;
- This is for use with a SELECT update_passwd(%o,%c,%u) query
- Updates the password only when the old password matches the MD5 password
- in the database
-
- CREATE FUNCTION update_password (oldpass text, cryptpass text, user text) RETURNS text
- MODIFIES SQL DATA
- BEGIN
- DECLARE currentsalt varchar(20);
- DECLARE error text;
- SET error = 'incorrect current password';
- SELECT substring_index(substr(user.password,4),_latin1'$',1) INTO currentsalt FROM users WHERE username=user;
- SELECT '' INTO error FROM users WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
- UPDATE users SET password=cryptpass WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
- RETURN error;
- END
+ Updates the password only when the old password matches the MD5 password
+ in the database
+
+ CREATE FUNCTION update_password (oldpass text, cryptpass text, user text) RETURNS text
+ MODIFIES SQL DATA
+ BEGIN
+ DECLARE currentsalt varchar(20);
+ DECLARE error text;
+ SET error = 'incorrect current password';
+ SELECT substring_index(substr(user.password,4),_latin1'$',1) INTO currentsalt FROM users WHERE username=user;
+ SELECT '' INTO error FROM users WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
+ UPDATE users SET password=cryptpass WHERE username=user AND password=ENCRYPT(oldpass,currentsalt);
+ RETURN error;
+ END
Example SQL UPDATEs:
@@ -137,11 +138,12 @@
Installation:
- Change into the helpers directory. Edit the chgsaslpasswd.c file as is
+ Change into the helpers directory. Copy and edit
+ /usr/share/roundcube-plugins/examples/chgsaslpasswd.c as is
documented within it.
Compile the wrapper program:
- gcc -o chgsaslpasswd chgsaslpasswd.c
+ gcc -o chgsaslpasswd chgsaslpasswd.c
Chown the compiled chgsaslpasswd binary to the cyrus user and group
that your browser runs as, then chmod them to 4550.
@@ -149,13 +151,13 @@
For example, if your cyrus user is 'cyrus' and the apache server group is
'nobody' (I've been told Redhat runs Apache as user 'apache'):
- chown cyrus:nobody chgsaslpasswd
- chmod 4550 chgsaslpasswd
+ chown cyrus:nobody chgsaslpasswd
+ chmod 4550 chgsaslpasswd
Stephen Carr has suggested users should try to run the scripts on a test
account as the cyrus user eg;
- su cyrus -c "./chgsaslpasswd -p test_account"
+ su cyrus -c "./chgsaslpasswd -p test_account"
This will allow you to make sure that the script will work for your setup.
Should the script not work, make sure that:
@@ -191,12 +193,8 @@
2.6. cPanel (cpanel)
--------------------
- Install cPanel XMLAPI Client Class into Roundcube program/lib directory
- or any other place in PHP include path. You can get the class from
- https://raw.github.com/CpanelInc/xmlapi-php/master/xmlapi.php
-
- You can configure parameters for connection to cPanel's API interface.
- See config.inc.php.dist file for more info.
+ You can specify parameters for HTTP connection to cPanel's admin
+ interface. See config.inc.php.dist file for more info.
2.7. XIMSS/Communigate (ximms)
@@ -210,7 +208,8 @@
----------------------------
As in sasl driver this one allows to change password using shell
- utility called "virtualmin". See helpers/chgvirtualminpasswd.c for
+ utility called "virtualmin". See
+ /usr/share/doc/roundcube-plugins/examples/chgvirtualminpasswd.c for
installation instructions. See also config.inc.php.dist file.
@@ -235,8 +234,9 @@
Driver that adds functionality to change the systems user password via
the 'chpasswd' command. See config.inc.php.dist file.
- Attached wrapper script (helpers/chpass-wrapper.py) restricts password changes
- to uids >= 1000 and can deny requests based on a blacklist.
+ Attached wrapper script
+ (/usr/share/doc/roundcube-plugins/examples/chpass-wrapper.py) restricts
+ password changes to uids >= 1000 and can deny requests based on a blacklist.
2.12. LDAP - no PEAR (ldap_simple)
@@ -247,7 +247,7 @@
This driver is fully compatible with the ldap driver, but
does not require (or uses) the
- $config['password_ldap_force_replace'] variable.
+ $rcmail_config['password_ldap_force_replace'] variable.
Other advantages:
* Connects only once with the LDAP server when using the search user.
* Does not read the DN, but only replaces the password within (that is
@@ -300,16 +300,6 @@
Driver to change Samba user password via the 'smbpasswd' command.
See config.inc.php.dist file for configuration description.
- 2.19. Vpopmail daemon (vpopmaild)
- -----------------------------------
-
- Driver for the daemon of vpopmail. Vpopmail is used with qmail to
- enable virtual users that are saved in a database and not in /etc/passwd.
-
- Set $config['password_vpopmaild_host'] to the host where vpopmaild runs.
-
- Set $config['password_vpopmaild_port'] to the port of vpopmaild.
-
3. Driver API
-------------
diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist
index 82f6617e5..a40e2a93f 100644
--- a/plugins/password/config.inc.php.dist
+++ b/plugins/password/config.inc.php.dist
@@ -4,43 +4,39 @@
// -----------------------
// A driver to use for password change. Default: "sql".
// See README file for list of supported driver names.
-$config['password_driver'] = 'sql';
+$rcmail_config['password_driver'] = 'sql';
// Determine whether current password is required to change password.
// Default: false.
-$config['password_confirm_current'] = true;
+$rcmail_config['password_confirm_current'] = true;
// Require the new password to be a certain length.
// set to blank to allow passwords of any length
-$config['password_minimum_length'] = 0;
+$rcmail_config['password_minimum_length'] = 0;
// Require the new password to contain a letter and punctuation character
// Change to false to remove this check.
-$config['password_require_nonalpha'] = false;
+$rcmail_config['password_require_nonalpha'] = false;
// Enables logging of password changes into logs/password
-$config['password_log'] = false;
+$rcmail_config['password_log'] = false;
// Comma-separated list of login exceptions for which password change
// will be not available (no Password tab in Settings)
-$config['password_login_exceptions'] = null;
+$rcmail_config['password_login_exceptions'] = null;
// Array of hosts that support password changing. Default is NULL.
// Listed hosts will feature a Password option in Settings; others will not.
// Example:
-//$config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
-$config['password_hosts'] = null;
-
-// Enables saving the new password even if it matches the old password. Useful
-// for upgrading the stored passwords after the encryption scheme has changed.
-$config['password_force_save'] = false;
+//$rcmail_config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
+$rcmail_config['password_hosts'] = null;
// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
-$config['password_db_dsn'] = '';
+$rcmail_config['password_db_dsn'] = '';
// The SQL query used to change the password.
// The query can contain the following macros that will be expanded as follows:
@@ -60,52 +56,52 @@ $config['password_db_dsn'] = '';
// (in case the username is an email address)
// Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)"
-$config['password_query'] = 'SELECT update_passwd(%c, %u)';
+$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
// By default the crypt() function which is used to create the '%c'
// parameter uses the md5 algorithm. To use different algorithms
// you can choose between: des, md5, blowfish, sha256, sha512.
// Before using other hash functions than des or md5 please make sure
// your operating system supports the other hash functions.
-$config['password_crypt_hash'] = 'md5';
+$rcmail_config['password_crypt_hash'] = 'md5';
// By default domains in variables are using unicode.
// Enable this option to use punycoded names
-$config['password_idn_ascii'] = false;
+$rcmail_config['password_idn_ascii'] = false;
// Path for dovecotpw (if not in $PATH)
-// $config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw';
+// $rcmail_config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw';
// Dovecot method (dovecotpw -s 'method')
-$config['password_dovecotpw_method'] = 'CRAM-MD5';
+$rcmail_config['password_dovecotpw_method'] = 'CRAM-MD5';
// Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
-$config['password_dovecotpw_with_method'] = false;
+$rcmail_config['password_dovecotpw_with_method'] = false;
// Using a password hash for %n and %q variables.
// Determine which hashing algorithm should be used to generate
// the hashed new and current password for using them within the
// SQL query. Requires PHP's 'hash' extension.
-$config['password_hash_algorithm'] = 'sha1';
+$rcmail_config['password_hash_algorithm'] = 'sha1';
// You can also decide whether the hash should be provided
// as hex string or in base64 encoded format.
-$config['password_hash_base64'] = false;
+$rcmail_config['password_hash_base64'] = false;
// Poppassd Driver options
// -----------------------
// The host which changes the password
-$config['password_pop_host'] = 'localhost';
+$rcmail_config['password_pop_host'] = 'localhost';
// TCP port used for poppassd connections
-$config['password_pop_port'] = 106;
+$rcmail_config['password_pop_port'] = 106;
// SASL Driver options
// -------------------
// Additional arguments for the saslpasswd2 call
-$config['password_saslpasswd_args'] = '';
+$rcmail_config['password_saslpasswd_args'] = '';
// LDAP and LDAP_SIMPLE Driver options
@@ -114,41 +110,41 @@ $config['password_saslpasswd_args'] = '';
// You can provide one or several hosts in an array in which case the hosts are tried from left to right.
// Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
// Default: 'localhost'
-$config['password_ldap_host'] = 'localhost';
+$rcmail_config['password_ldap_host'] = 'localhost';
// LDAP server port to connect to
// Default: '389'
-$config['password_ldap_port'] = '389';
+$rcmail_config['password_ldap_port'] = '389';
// TLS is started after connecting
// Using TLS for password modification is recommanded.
// Default: false
-$config['password_ldap_starttls'] = false;
+$rcmail_config['password_ldap_starttls'] = false;
// LDAP version
// Default: '3'
-$config['password_ldap_version'] = '3';
+$rcmail_config['password_ldap_version'] = '3';
// LDAP base name (root directory)
// Exemple: 'dc=exemple,dc=com'
-$config['password_ldap_basedn'] = 'dc=exemple,dc=com';
+$rcmail_config['password_ldap_basedn'] = 'dc=exemple,dc=com';
// LDAP connection method
// There is two connection method for changing a user's LDAP password.
// 'user': use user credential (recommanded, require password_confirm_current=true)
// 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW)
// Default: 'user'
-$config['password_ldap_method'] = 'user';
+$rcmail_config['password_ldap_method'] = 'user';
// LDAP Admin DN
// Used only in admin connection mode
// Default: null
-$config['password_ldap_adminDN'] = null;
+$rcmail_config['password_ldap_adminDN'] = null;
// LDAP Admin Password
// Used only in admin connection mode
// Default: null
-$config['password_ldap_adminPW'] = null;
+$rcmail_config['password_ldap_adminPW'] = null;
// LDAP user DN mask
// The user's DN is mandatory and as we only have his login,
@@ -158,7 +154,7 @@ $config['password_ldap_adminPW'] = null;
// '%domain' will be replaced by the current roundcube user's domain part
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
// Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
-$config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
+$rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
// LDAP search DN
// The DN roundcube should bind with to find out user's DN
@@ -169,7 +165,7 @@ $config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
// users login to find his DN instead. A common reason might be that
// your users are placed under different ou's like engineering or
// sales which cannot be derived from their login only.
-$config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
+$rcmail_config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
// LDAP search password
// If password_ldap_searchDN is set, the password to use for
@@ -179,13 +175,13 @@ $config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com'
// is only accesible to roundcube and don't forget to restrict roundcube's access to
// your directory as much as possible using ACLs. Should this password be compromised
// you want to minimize the damage.
-$config['password_ldap_searchPW'] = 'secret';
+$rcmail_config['password_ldap_searchPW'] = 'secret';
// LDAP search base
// If password_ldap_searchDN is set, the base to search in using the filter below.
// Note that you should comment out the default password_ldap_userDN_mask setting
// for this to take effect.
-$config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
+$rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
// LDAP search filter
// If password_ldap_searchDN is set, the filter to use when
@@ -197,7 +193,7 @@ $config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
// Example: '(uid=%login)'
// Example: '(&(objectClass=posixAccount)(uid=%login))'
-$config['password_ldap_search_filter'] = '(uid=%login)';
+$rcmail_config['password_ldap_search_filter'] = '(uid=%login)';
// LDAP password hash type
// Standard LDAP encryption type which must be one of: crypt,
@@ -205,34 +201,34 @@ $config['password_ldap_search_filter'] = '(uid=%login)';
// Please note that most encodage types require external libraries
// to be included in your PHP installation, see function hashPassword in drivers/ldap.php for more info.
// Default: 'crypt'
-$config['password_ldap_encodage'] = 'crypt';
+$rcmail_config['password_ldap_encodage'] = 'crypt';
// LDAP password attribute
// Name of the ldap's attribute used for storing user password
// Default: 'userPassword'
-$config['password_ldap_pwattr'] = 'userPassword';
+$rcmail_config['password_ldap_pwattr'] = 'userPassword';
// LDAP password force replace
// Force LDAP replace in cases where ACL allows only replace not read
// See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace
// Default: true
-$config['password_ldap_force_replace'] = true;
+$rcmail_config['password_ldap_force_replace'] = true;
// LDAP Password Last Change Date
// Some places use an attribute to store the date of the last password change
// The date is meassured in "days since epoch" (an integer value)
// Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange)
-$config['password_ldap_lchattr'] = '';
+$rcmail_config['password_ldap_lchattr'] = '';
// LDAP Samba password attribute, e.g. sambaNTPassword
// Name of the LDAP's Samba attribute used for storing user password
-$config['password_ldap_samba_pwattr'] = '';
+$rcmail_config['password_ldap_samba_pwattr'] = '';
// LDAP Samba Password Last Change Date attribute, e.g. sambaPwdLastSet
// Some places use an attribute to store the date of the last password change
// The date is meassured in "seconds since epoch" (an integer value)
// Whenever the password is changed, the attribute will be updated if set
-$config['password_ldap_samba_lchattr'] = '';
+$rcmail_config['password_ldap_samba_lchattr'] = '';
// DirectAdmin Driver options
@@ -242,57 +238,63 @@ $config['password_ldap_samba_lchattr'] = '';
// The host can contain the following macros that will be expanded as follows:
// %h is replaced with the imap host (from the session info)
// %d is replaced with the domain part of the username (if the username is an email)
-$config['password_directadmin_host'] = 'tcp://localhost';
+$rcmail_config['password_directadmin_host'] = 'tcp://localhost';
// TCP port used for DirectAdmin connections
-$config['password_directadmin_port'] = 2222;
+$rcmail_config['password_directadmin_port'] = 2222;
// vpopmaild Driver options
// -----------------------
// The host which changes the password
-$config['password_vpopmaild_host'] = 'localhost';
+$rcmail_config['password_vpopmaild_host'] = 'localhost';
// TCP port used for vpopmaild connections
-$config['password_vpopmaild_port'] = 89;
+$rcmail_config['password_vpopmaild_port'] = 89;
// cPanel Driver options
// --------------------------
// The cPanel Host name
-$config['password_cpanel_host'] = 'host.domain.com';
+$rcmail_config['password_cpanel_host'] = 'host.domain.com';
// The cPanel admin username
-$config['password_cpanel_username'] = 'username';
+$rcmail_config['password_cpanel_username'] = 'username';
// The cPanel admin password
-$config['password_cpanel_password'] = 'password';
+$rcmail_config['password_cpanel_password'] = 'password';
// The cPanel port to use
-$config['password_cpanel_port'] = 2087;
+$rcmail_config['password_cpanel_port'] = 2082;
+
+// Using ssl for cPanel connections?
+$rcmail_config['password_cpanel_ssl'] = true;
+
+// The cPanel theme in use
+$rcmail_config['password_cpanel_theme'] = 'x';
// XIMSS (Communigate server) Driver options
// -----------------------------------------
// Host name of the Communigate server
-$config['password_ximss_host'] = 'mail.example.com';
+$rcmail_config['password_ximss_host'] = 'mail.example.com';
// XIMSS port on Communigate server
-$config['password_ximss_port'] = 11024;
+$rcmail_config['password_ximss_port'] = 11024;
// chpasswd Driver options
// ---------------------
// Command to use
-$config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
+$rcmail_config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
// XMail Driver options
// ---------------------
-$config['xmail_host'] = 'localhost';
-$config['xmail_user'] = 'YourXmailControlUser';
-$config['xmail_pass'] = 'YourXmailControlPass';
-$config['xmail_port'] = 6017;
+$rcmail_config['xmail_host'] = 'localhost';
+$rcmail_config['xmail_user'] = 'YourXmailControlUser';
+$rcmail_config['xmail_pass'] = 'YourXmailControlPass';
+$rcmail_config['xmail_port'] = 6017;
// hMail Driver options
@@ -300,9 +302,9 @@ $config['xmail_port'] = 6017;
// Remote hMailServer configuration
// true: HMailserver is on a remote box (php.ini: com.allow_dcom = true)
// false: Hmailserver is on same box as PHP
-$config['hmailserver_remote_dcom'] = false;
+$rcmail_config['hmailserver_remote_dcom'] = false;
// Windows credentials
-$config['hmailserver_server'] = array(
+$rcmail_config['hmailserver_server'] = array(
'Server' => 'localhost', // hostname or ip address
'Username' => 'administrator', // windows username
'Password' => 'password' // windows user password
@@ -320,8 +322,7 @@ $config['hmailserver_server'] = array(
// 5: domain-username
// 6: username_domain
// 7: domain_username
-// 8: username@domain; mbox.username
-$config['password_virtualmin_format'] = 8;
+$config['password_virtualmin_format'] = 0;
// pw_usermod Driver options
@@ -329,36 +330,32 @@ $config['password_virtualmin_format'] = 8;
// Use comma delimited exlist to disable password change for users
// Add the following line to visudo to tighten security:
// www ALL=NOPASSWORD: /usr/sbin/pw
-$config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';
+$rcmail_config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';
// DBMail Driver options
// -------------------
// Additional arguments for the dbmail-users call
-$config['password_dbmail_args'] = '-p sha512';
+$rcmail_config['password_dbmail_args'] = '-p sha512';
// Expect Driver options
// ---------------------
// Location of expect binary
-$config['password_expect_bin'] = '/usr/bin/expect';
+$rcmail_config['password_expect_bin'] = '/usr/bin/expect';
// Location of expect script (see helpers/passwd-expect)
-$config['password_expect_script'] = '';
+$rcmail_config['password_expect_script'] = '';
// Arguments for the expect script. See the helpers/passwd-expect file for details.
// This is probably a good starting default:
// -telent -host localhost -output /tmp/passwd.log -log /tmp/passwd.log
-$config['password_expect_params'] = '';
+$rcmail_config['password_expect_params'] = '';
// smb Driver options
// ---------------------
// Samba host (default: localhost)
-// Supported replacement variables:
-// %n - hostname ($_SERVER['SERVER_NAME'])
-// %t - hostname without the first part
-// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
-$config['password_smb_host'] = 'localhost';
+$rcmail_config['password_smb_host'] = 'localhost';
// Location of smbpasswd binary
-$config['password_smb_cmd'] = '/usr/bin/smbpasswd';
+$rcmail_config['password_smb_cmd'] = '/usr/bin/smbpasswd';
diff --git a/plugins/password/drivers/chpasswd.php b/plugins/password/drivers/chpasswd.php
index 137275e69..3ea10159c 100644
--- a/plugins/password/drivers/chpasswd.php
+++ b/plugins/password/drivers/chpasswd.php
@@ -26,7 +26,7 @@ class rcube_chpasswd_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/cpanel.php b/plugins/password/drivers/cpanel.php
index b71c33ec1..79887109b 100644
--- a/plugins/password/drivers/cpanel.php
+++ b/plugins/password/drivers/cpanel.php
@@ -4,43 +4,95 @@
* cPanel Password Driver
*
* Driver that adds functionality to change the users cPanel password.
- * Originally written by Fulvio Venturelli <fulvio@venturelli.org>
+ * The cPanel PHP API code has been taken from: http://www.phpclasses.org/browse/package/3534.html
*
- * Completely rewritten using the cPanel API2 call Email::passwdpop
- * as opposed to the original coding against the UI, which is a fragile method that
- * makes the driver to always return a failure message for any language other than English
- * see http://trac.roundcube.net/ticket/1487015
+ * This driver has been tested with Hostmonster hosting and seems to work fine.
*
- * This driver has been tested with o2switch hosting and seems to work fine.
- *
- * @version 3.0
- * @author Christian Chech <christian@chech.fr>
+ * @version 2.0
+ * @author Fulvio Venturelli <fulvio@venturelli.org>
*/
class rcube_cpanel_password
{
public function save($curpas, $newpass)
{
- require_once 'xmlapi.php';
-
$rcmail = rcmail::get_instance();
- $this->cuser = $rcmail->config->get('password_cpanel_username');
-
- // Setup the xmlapi connection
- $this->xmlapi = new xmlapi($rcmail->config->get('password_cpanel_host'));
- $this->xmlapi->set_port($rcmail->config->get('password_cpanel_port'));
- $this->xmlapi->password_auth($this->cuser, $rcmail->config->get('password_cpanel_password'));
- $this->xmlapi->set_output('json');
- $this->xmlapi->set_debug(0);
+ // Create a cPanel email object
+ $cPanel = new emailAccount($rcmail->config->get('password_cpanel_host'),
+ $rcmail->config->get('password_cpanel_username'),
+ $rcmail->config->get('password_cpanel_password'),
+ $rcmail->config->get('password_cpanel_port'),
+ $rcmail->config->get('password_cpanel_ssl'),
+ $rcmail->config->get('password_cpanel_theme'),
+ $_SESSION['username'] );
- if ($this->setPassword($_SESSION['username'], $newpass)) {
+ if ($cPanel->setPassword($newpass)) {
return PASSWORD_SUCCESS;
}
else {
return PASSWORD_ERROR;
}
}
+}
+
+
+class HTTP
+{
+ function HTTP($host, $username, $password, $port, $ssl, $theme)
+ {
+ $this->ssl = $ssl ? 'ssl://' : '';
+ $this->username = $username;
+ $this->password = $password;
+ $this->theme = $theme;
+ $this->auth = base64_encode($username . ':' . $password);
+ $this->port = $port;
+ $this->host = $host;
+ $this->path = '/frontend/' . $theme . '/';
+ }
+
+ function getData($url, $data = '')
+ {
+ $url = $this->path . $url;
+ if (is_array($data)) {
+ $url = $url . '?';
+ foreach ($data as $key => $value) {
+ $url .= urlencode($key) . '=' . urlencode($value) . '&';
+ }
+ $url = substr($url, 0, -1);
+ }
+
+ $response = '';
+ $fp = fsockopen($this->ssl . $this->host, $this->port);
+ if (!$fp) {
+ return false;
+ }
+
+ $out = 'GET ' . $url . ' HTTP/1.0' . "\r\n";
+ $out .= 'Authorization: Basic ' . $this->auth . "\r\n";
+ $out .= 'Connection: Close' . "\r\n\r\n";
+ fwrite($fp, $out);
+ while (!feof($fp)) {
+ $response .= @fgets($fp);
+ }
+ fclose($fp);
+ return $response;
+ }
+}
+
+
+class emailAccount
+{
+ function emailAccount($host, $username, $password, $port, $ssl, $theme, $address)
+ {
+ $this->HTTP = new HTTP($host, $username, $password, $port, $ssl, $theme);
+ if (strpos($address, '@')) {
+ list($this->email, $this->domain) = explode('@', $address);
+ }
+ else {
+ list($this->email, $this->domain) = array($address, '');
+ }
+ }
/**
* Change email account password
@@ -49,24 +101,16 @@ class rcube_cpanel_password
* @param string $password email account password
* @return bool
*/
- function setPassword($address, $password)
+ function setPassword($password)
{
- if (strpos($address, '@')) {
- list($data['email'], $data['domain']) = explode('@', $address);
- }
- else {
- list($data['email'], $data['domain']) = array($address, '');
- }
-
+ $data['email'] = $this->email;
+ $data['domain'] = $this->domain;
$data['password'] = $password;
+ $response = $this->HTTP->getData('mail/dopasswdpop.html', $data);
- $query = $this->xmlapi->api2_query($this->cuser, 'Email', 'passwdpop', $data);
- $query = json_decode($query, true);
-
- if ($query['cpanelresult']['data'][0]['result'] == 1) {
+ if (strpos($response, 'success') && !strpos($response, 'failure')) {
return true;
}
-
return false;
}
}
diff --git a/plugins/password/drivers/dbmail.php b/plugins/password/drivers/dbmail.php
index 529027b8d..e4c0d52e3 100644
--- a/plugins/password/drivers/dbmail.php
+++ b/plugins/password/drivers/dbmail.php
@@ -29,7 +29,7 @@ class rcube_dbmail_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/directadmin.php b/plugins/password/drivers/directadmin.php
index 44ecea406..fb156cea9 100644
--- a/plugins/password/drivers/directadmin.php
+++ b/plugins/password/drivers/directadmin.php
@@ -43,7 +43,7 @@ class rcube_directadmin_password
$response = $Socket->fetch_parsed_body();
//DEBUG
- //rcube::console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");
+ //console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");
if($Socket->result_status_code != 200)
return array('code' => PASSWORD_CONNECT_ERROR, 'message' => $Socket->error[0]);
@@ -297,6 +297,7 @@ class HTTPSocket {
$status = socket_get_status($socket);
$startTime = time();
$length = 0;
+ $prevSecond = 0;
while ( !feof($socket) && !$status['timed_out'] )
{
$chunk = fgets($socket,1024);
diff --git a/plugins/password/drivers/expect.php b/plugins/password/drivers/expect.php
index 1f68924df..7a191e254 100644
--- a/plugins/password/drivers/expect.php
+++ b/plugins/password/drivers/expect.php
@@ -45,7 +45,7 @@ class rcube_expect_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/hmail.php b/plugins/password/drivers/hmail.php
index 650434617..104c851ae 100644
--- a/plugins/password/drivers/hmail.php
+++ b/plugins/password/drivers/hmail.php
@@ -5,6 +5,7 @@
*
* @version 2.0
* @author Roland 'rosali' Liebl <myroundcube@mail4us.net>
+ *
*/
class rcube_hmail_password
@@ -25,8 +26,8 @@ class rcube_hmail_password
$obApp = new COM("hMailServer.Application");
}
catch (Exception $e) {
- rcube::write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
- rcube::write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
+ write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
+ write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
return PASSWORD_ERROR;
}
@@ -38,7 +39,8 @@ class rcube_hmail_password
else {
$domain = $rcmail->config->get('username_domain',false);
if (!$domain) {
- rcube::write_log('errors','Plugin password (hmail driver): $config[\'username_domain\'] is not defined.');
+ write_log('errors','Plugin password (hmail driver): $rcmail_config[\'username_domain\'] is not defined.');
+ write_log('errors','Plugin password (hmail driver): Hint: Use hmail_login plugin (http://myroundcube.googlecode.com');
return PASSWORD_ERROR;
}
$username = $username . "@" . $domain;
@@ -53,8 +55,8 @@ class rcube_hmail_password
return PASSWORD_SUCCESS;
}
catch (Exception $e) {
- rcube::write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
- rcube::write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
+ write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
+ write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
return PASSWORD_ERROR;
}
}
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index 548d327e1..f773335ac 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -271,7 +271,7 @@ class rcube_ldap_password
case 'samba':
if (function_exists('hash')) {
- $cryptedPassword = hash('md4', rcube_charset::convert($passwordClear, RCUBE_CHARSET, 'UTF-16LE'));
+ $cryptedPassword = hash('md4', rcube_charset_convert($passwordClear, RCMAIL_CHARSET, 'UTF-16LE'));
$cryptedPassword = strtoupper($cryptedPassword);
} else {
/* Your PHP install does not have the hash() function */
diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php
index d47e14492..01385f2d0 100644
--- a/plugins/password/drivers/ldap_simple.php
+++ b/plugins/password/drivers/ldap_simple.php
@@ -240,7 +240,7 @@ class rcube_ldap_simple_password
break;
case 'samba':
if (function_exists('hash')) {
- $crypted_password = hash('md4', rcube_charset::convert($password_clear, RCUBE_CHARSET, 'UTF-16LE'));
+ $crypted_password = hash('md4', rcube_charset_convert($password_clear, RCMAIL_CHARSET, 'UTF-16LE'));
$crypted_password = strtoupper($crypted_password);
} else {
/* Your PHP install does not have the hash() function */
diff --git a/plugins/password/drivers/pam.php b/plugins/password/drivers/pam.php
index 4d0ba1656..15a802c74 100644
--- a/plugins/password/drivers/pam.php
+++ b/plugins/password/drivers/pam.php
@@ -21,7 +21,7 @@ class rcube_pam_password
}
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -30,7 +30,7 @@ class rcube_pam_password
}
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/pw_usermod.php b/plugins/password/drivers/pw_usermod.php
index 237e275a7..5b92fcbfb 100644
--- a/plugins/password/drivers/pw_usermod.php
+++ b/plugins/password/drivers/pw_usermod.php
@@ -28,7 +28,7 @@ class rcube_pw_usermod_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/sasl.php b/plugins/password/drivers/sasl.php
index 8776eff2e..9380cf838 100644
--- a/plugins/password/drivers/sasl.php
+++ b/plugins/password/drivers/sasl.php
@@ -32,7 +32,7 @@ class rcube_sasl_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/smb.php b/plugins/password/drivers/smb.php
index 9f2b96afa..88021156f 100644
--- a/plugins/password/drivers/smb.php
+++ b/plugins/password/drivers/smb.php
@@ -26,15 +26,13 @@ class rcube_smb_password
public function save($currpass, $newpass)
{
- $host = rcmail::get_instance()->config->get('password_smb_host','localhost');
- $bin = rcmail::get_instance()->config->get('password_smb_cmd','/usr/bin/smbpasswd');
+ $host = rcmail::get_instance()->config->get('password_smb_host','localhost');
+ $bin = rcmail::get_instance()->config->get('password_smb_cmd','/usr/bin/smbpasswd');
$username = $_SESSION['username'];
- $host = rcube_utils::parse_host($host);
- $tmpfile = tempnam(sys_get_temp_dir(),'smb');
- $cmd = $bin . ' -r ' . $host . ' -s -U "' . $username . '" > ' . $tmpfile . ' 2>&1';
- $handle = @popen($cmd, 'w');
-
+ $tmpfile = tempnam(sys_get_temp_dir(),'smb');
+ $cmd = $bin . ' -r ' . $host . ' -s -U "' . $username . '" > ' . $tmpfile . ' 2>&1';
+ $handle = @popen($cmd, 'w');
fputs($handle, $currpass."\n");
fputs($handle, $newpass."\n");
fputs($handle, $newpass."\n");
@@ -46,7 +44,7 @@ class rcube_smb_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index 7a51dfe44..8c8dc87b5 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -34,9 +34,8 @@ class rcube_sql_password
$db = $rcmail->get_dbh();
}
- if ($db->is_error()) {
+ if ($err = $db->is_error())
return PASSWORD_ERROR;
- }
// crypted password
if (strpos($sql, '%c') !== FALSE) {
@@ -118,7 +117,7 @@ class rcube_sql_password
// hashed passwords
if (preg_match('/%[n|q]/', $sql)) {
if (!extension_loaded('hash')) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -165,14 +164,14 @@ class rcube_sql_password
// convert domains to/from punnycode
if ($rcmail->config->get('password_idn_ascii')) {
- $domain_part = rcube_utils::idn_to_ascii($domain_part);
- $username = rcube_utils::idn_to_ascii($username);
- $host = rcube_utils::idn_to_ascii($host);
+ $domain_part = rcube_idn_to_ascii($domain_part);
+ $username = rcube_idn_to_ascii($username);
+ $host = rcube_idn_to_ascii($host);
}
else {
- $domain_part = rcube_utils::idn_to_utf8($domain_part);
- $username = rcube_utils::idn_to_utf8($username);
- $host = rcube_utils::idn_to_utf8($host);
+ $domain_part = rcube_idn_to_utf8($domain_part);
+ $username = rcube_idn_to_utf8($username);
+ $host = rcube_idn_to_utf8($host);
}
// at least we should always have the local part
@@ -185,7 +184,7 @@ class rcube_sql_password
if (!$db->is_error()) {
if (strtolower(substr(trim($sql),0,6)) == 'select') {
- if ($db->fetch_array($res))
+ if ($result = $db->fetch_array($res))
return PASSWORD_SUCCESS;
} else {
// This is the good case: 1 row updated
diff --git a/plugins/password/drivers/virtualmin.php b/plugins/password/drivers/virtualmin.php
index 2c7aee617..40f5c2529 100644
--- a/plugins/password/drivers/virtualmin.php
+++ b/plugins/password/drivers/virtualmin.php
@@ -18,8 +18,7 @@ class rcube_virtualmin_password
{
function save($currpass, $newpass)
{
- $rcmail = rcmail::get_instance();
-
+ $rcmail = rcmail::get_instance();
$format = $rcmail->config->get('password_virtualmin_format', 0);
$username = $_SESSION['username'];
@@ -48,14 +47,14 @@ class rcube_virtualmin_password
$pieces = explode("_", $username);
$domain = $pieces[0];
break;
- case 8: // domain taken from alias, username left as it was
- $email = $rcmail->user->data['alias'];
- $domain = substr(strrchr($email, "@"), 1);
- break;
default: // username@domain
$domain = substr(strrchr($username, "@"), 1);
}
+ if (!$domain) {
+ $domain = $rcmail->user->get_username('domain');
+ }
+
$username = escapeshellcmd($username);
$domain = escapeshellcmd($domain);
$newpass = escapeshellcmd($newpass);
@@ -67,7 +66,7 @@ class rcube_virtualmin_password
return PASSWORD_SUCCESS;
}
else {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/xmail.php b/plugins/password/drivers/xmail.php
index 47beb2178..33a49ffe3 100644
--- a/plugins/password/drivers/xmail.php
+++ b/plugins/password/drivers/xmail.php
@@ -10,10 +10,10 @@
* Setup xmail_host, xmail_user, xmail_pass and xmail_port into
* config.inc.php of password plugin as follows:
*
- * $config['xmail_host'] = 'localhost';
- * $config['xmail_user'] = 'YourXmailControlUser';
- * $config['xmail_pass'] = 'YourXmailControlPass';
- * $config['xmail_port'] = 6017;
+ * $rcmail_config['xmail_host'] = 'localhost';
+ * $rcmail_config['xmail_user'] = 'YourXmailControlUser';
+ * $rcmail_config['xmail_pass'] = 'YourXmailControlPass';
+ * $rcmail_config['xmail_port'] = 6017;
*
*/
@@ -32,7 +32,7 @@ class rcube_xmail_password
$xmail->port = $rcmail->config->get('xmail_port');
if (!$xmail->connect()) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -42,7 +42,7 @@ class rcube_xmail_password
}
else if (!$xmail->send("userpasswd\t".$domain."\t".$user."\t".$newpass."\n")) {
$xmail->close();
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -67,7 +67,7 @@ class XMail {
function send($msg)
{
socket_write($this->socket,$msg);
- if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
+ if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
return false;
}
return true;
@@ -85,7 +85,7 @@ class XMail {
return false;
}
- if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
+ if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
socket_close($this->socket);
return false;
}
diff --git a/plugins/password/localization/ar.inc b/plugins/password/localization/ar.inc
new file mode 100644
index 000000000..521127a8f
--- /dev/null
+++ b/plugins/password/localization/ar.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'تغيير كلمة المرور';
+$labels['curpasswd'] = 'كلمة المرور الحالية:';
+$labels['newpasswd'] = 'كلمة المرور الجديدة:';
+$labels['confpasswd'] = 'تأكيد كلمة المرور الجديدة:';
+$messages['nopassword'] = 'من فضلك أدخل كلمة المرور الجديدة.';
+$messages['nocurpassword'] = 'من فضلك أدخل كلمة المرور الحالية.';
+$messages['passwordincorrect'] = 'كلمة المرور الحالية غير صحيحة.';
+$messages['passwordinconsistency'] = 'كلمة المرور غير مطابقة حاول مجددا';
+$messages['crypterror'] = 'تعذر حفظ كلمة المرور الجديدة. وظيفة التشفير مفقودة.';
+$messages['connecterror'] = 'تعذر حفظ كلمة المرور الجديدة. خطأ بالإتصال.';
+$messages['internalerror'] = 'تعذر حفظ كلمة المرور الجديدة.';
+$messages['passwordshort'] = 'كلمة المرور يجب على الأقل $length أحرف';
+$messages['passwordweak'] = ' كلمة المرور يجب أن تتضمن رقم واحد على الأقل وحرف ترقيم واحد.';
+$messages['passwordforbidden'] = 'كلمة المرور تحتوى على أحرف ممنوعة';
+?>
diff --git a/plugins/password/localization/ar_SA.inc b/plugins/password/localization/ar_SA.inc
new file mode 100644
index 000000000..990505bac
--- /dev/null
+++ b/plugins/password/localization/ar_SA.inc
@@ -0,0 +1,29 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'تغيير كلمة المرور';
+$labels['curpasswd'] = 'كلمة المرور الحالية';
+$labels['newpasswd'] = 'كلمة المرور الجديدة';
+$labels['confpasswd'] = 'تأكيد كلمة المرور الجديدة';
+$messages['nopassword'] = 'من فضلك أدخل كلمة مرور جديدة';
+$messages['nocurpassword'] = 'من فضلك أدخل كلمة المرور الحالية';
+$messages['passwordincorrect'] = 'كلمة المرور الحالية غير صحيحة';
+$messages['passwordinconsistency'] = 'كلمة المرور غير مطابقة, أعد المحاولة';
+$messages['connecterror'] = 'تعذر حفظ كلمة المرور الجديدة. خطأ في الإتصال';
+$messages['internalerror'] = 'تعذر حفظ كلمة المرور الجديدة';
+$messages['passwordforbidden'] = 'كلمة المرور تحتوي حروفاً ممنوعة';
+?>
diff --git a/plugins/password/localization/ast.inc b/plugins/password/localization/ast.inc
new file mode 100644
index 000000000..99b283ec5
--- /dev/null
+++ b/plugins/password/localization/ast.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'Camudar contraseña';
+$labels['curpasswd'] = 'Contraseña actual:';
+$labels['newpasswd'] = 'Contraseña nueva:';
+$labels['confpasswd'] = 'Confirmar contraseña:';
+$messages['nopassword'] = 'Por favor, introduz una contraseña nueva.';
+$messages['nocurpassword'] = 'Por favor, introduz la contraseña actual.';
+$messages['passwordincorrect'] = 'La contraseña actual ye incorreuta.';
+$messages['passwordinconsistency'] = 'Les contraseñes nun concasen. Por favor, inténtalo otra vegada.';
+$messages['crypterror'] = 'Nun pudo guardase la contraseña nueva. Falta la función de cifráu.';
+$messages['connecterror'] = 'Nun pudo guardase la contraseña nueva. Fallu de conexón.';
+$messages['internalerror'] = 'Nun pudo guardase la contraseña nueva. ';
+$messages['passwordshort'] = 'La contraseña tien de tener polo menos $length caráuteres.';
+$messages['passwordweak'] = 'La contraseña tien de tener polo menos un númberu y un signu de puntuación.';
+$messages['passwordforbidden'] = 'La contraseña que s\'introduxo contién caráuteres non permitíos.';
+?>
diff --git a/plugins/password/localization/be_BE.inc b/plugins/password/localization/be_BE.inc
new file mode 100644
index 000000000..457e67e9e
--- /dev/null
+++ b/plugins/password/localization/be_BE.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'Змяніць пароль';
+$labels['curpasswd'] = 'Бягучы пароль:';
+$labels['newpasswd'] = 'Новы пароль:';
+$labels['confpasswd'] = 'Паўтарыце новы пароль:';
+$messages['nopassword'] = 'Увядзіце новы пароль.';
+$messages['nocurpassword'] = 'Увядзіце бягучы пароль.';
+$messages['passwordincorrect'] = 'Няслушны бягучы пароль.';
+$messages['passwordinconsistency'] = 'Паролі не супадаюць. Паспрабуйце яшчэ раз.';
+$messages['crypterror'] = 'Не ўдалося захаваць новы пароль. Бракуе функцыі шыфравання.';
+$messages['connecterror'] = 'Не ўдалося захаваць новы пароль. Памылка злучэння.';
+$messages['internalerror'] = 'Не ўдалося захаваць новы пароль.';
+$messages['passwordshort'] = 'Пароль мусіць быць мінімум $length знакаў.';
+$messages['passwordweak'] = 'Пароль мусіць утрымліваць мінімум адну лічбу і адзін знак пунктуацыі.';
+$messages['passwordforbidden'] = 'Пароль утрымлівае забароненыя знакі.';
+?>
diff --git a/plugins/password/localization/el_GR.inc b/plugins/password/localization/el_GR.inc
new file mode 100644
index 000000000..b1c72ab69
--- /dev/null
+++ b/plugins/password/localization/el_GR.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'Αλλαγη κωδικου προσβασης';
+$labels['curpasswd'] = 'Τρεχων κωδικος προσβασης:';
+$labels['newpasswd'] = 'Νεος κωδικος προσβασης:';
+$labels['confpasswd'] = 'Επιβεβαιωση κωδικου προσβασης:';
+$messages['nopassword'] = 'Εισαγετε εναν νεο κωδικο.';
+$messages['nocurpassword'] = 'Εισαγετε τον τρεχων κωδικο.';
+$messages['passwordincorrect'] = 'Ο τρεχων κωδικος ειναι λαθος.';
+$messages['passwordinconsistency'] = 'Οι κωδικοί πρόσβασης δεν ταιριάζουν, προσπαθήστε ξανά.';
+$messages['crypterror'] = 'Δεν μπορεσε να αποθηκεύθει ο νέος κωδικός πρόσβασης. Η λειτουργία κρυπτογράφησης λείπει.';
+$messages['connecterror'] = 'Δεν μπορεσε να αποθηκεύθει ο νέος κωδικός πρόσβασης. Σφάλμα σύνδεσης.';
+$messages['internalerror'] = 'Δεν μπορεσε να αποθηκεύθει ο νέος κωδικός πρόσβασης. ';
+$messages['passwordshort'] = 'Ο κωδικός πρόσβασης πρέπει να είναι τουλάχιστον $μήκος χαρακτήρων.';
+$messages['passwordweak'] = 'Ο κωδικός πρόσβασης πρέπει να περιλαμβάνει τουλάχιστον έναν αριθμό και ένα σημείο στίξης. ';
+$messages['passwordforbidden'] = 'Ο κωδικός πρόσβασης περιέχει μη επιτρεπτούς χαρακτήρες. ';
+?>
diff --git a/plugins/password/localization/en_US.inc b/plugins/password/localization/en_US.inc
index a4c077fe5..dd57c1318 100644
--- a/plugins/password/localization/en_US.inc
+++ b/plugins/password/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/password/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Password plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/password/localization/eu_ES.inc b/plugins/password/localization/eu_ES.inc
new file mode 100644
index 000000000..b814d2983
--- /dev/null
+++ b/plugins/password/localization/eu_ES.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'Pasahitza aldatu';
+$labels['curpasswd'] = 'Oraingo pasahitza:';
+$labels['newpasswd'] = 'Pasahitz berria:';
+$labels['confpasswd'] = 'Konfirmatu pasahitz berria:';
+$messages['nopassword'] = 'Sartu pasahitz berria.';
+$messages['nocurpassword'] = 'Sartu oraingo pasahitza.';
+$messages['passwordincorrect'] = 'Oraingo pasahitza ez da zuzena.';
+$messages['passwordinconsistency'] = 'Pasahitz berria ez datoz bat, saiatu berriz.';
+$messages['crypterror'] = 'Ezin izan da pasahitz berria gorde. Ez da enkriptazio funtziorik aurkitu.';
+$messages['connecterror'] = 'Ezin izan da pasahitz berria gorde. Konexio arazoak egon dira.';
+$messages['internalerror'] = 'Ezin izan da pasahitz berria gorde.';
+$messages['passwordshort'] = 'Gutxienez $length karakteretakoa izan behar du pasahitzak.';
+$messages['passwordweak'] = 'Gutxienez zenbaki bat eta puntuazio karaktere bat izan behar du pasahitzak.';
+$messages['passwordforbidden'] = 'Galarazitako karaktereak daude pasahitzean.';
+?>
diff --git a/plugins/password/localization/fa_AF.inc b/plugins/password/localization/fa_AF.inc
new file mode 100644
index 000000000..5bf7c3a8f
--- /dev/null
+++ b/plugins/password/localization/fa_AF.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'تغییر رمز عبور';
+$labels['curpasswd'] = 'رمز عبور کنونی';
+$labels['newpasswd'] = 'رمز عبور جدید';
+$labels['confpasswd'] = 'تایید رمز عبور جدید';
+$messages['nopassword'] = 'لطفا رمز عبور جدیدی وارد کنید';
+$messages['nocurpassword'] = 'لطفا رمز عبور کنونی را وارد کنید';
+$messages['passwordincorrect'] = 'رمز عبور کنونی اشتباه است';
+$messages['passwordinconsistency'] = 'رمزهای عبور با هم مطابقت ندارند، لطفا دوباره سعی کنید';
+$messages['crypterror'] = 'امکان ذخیره رمز عبور جدید وجود ندارد. تابع رمزگذاری یافت نشد';
+$messages['connecterror'] = 'امکان ذخیره رمز عبور جدید وجود ندارد. لطفا دوباره سعی کنید';
+$messages['internalerror'] = 'امکان ذخیره رمز عبور جدید وجود ندارد';
+$messages['passwordshort'] = 'طول رمز عبور می بایست حداقل به طول $length کاراکتر باشد';
+$messages['passwordweak'] = 'رمز عبور می بایست دارای حداقل یک عدد و یک کاراکتر علامت گذاری باشد';
+$messages['passwordforbidden'] = 'رمز عبور شامل کاراکترهای غیر مجاز است';
+?>
diff --git a/plugins/password/localization/gl_ES.inc b/plugins/password/localization/gl_ES.inc
index 93c505a6a..245d1c634 100644
--- a/plugins/password/localization/gl_ES.inc
+++ b/plugins/password/localization/gl_ES.inc
@@ -26,7 +26,7 @@ $messages = array();
$messages['nopassword'] = 'Por favor, introduza un contrasinal novo.';
$messages['nocurpassword'] = 'Por favor, introduza o contrasinal actual.';
$messages['passwordincorrect'] = 'O contrasinal actual é incorrecto.';
-$messages['passwordinconsistency'] = 'Os contrasinais non cadran. Por favor, inténteo outra vez.';
+$messages['passwordinconsistency'] = 'Os contrasinals non coinciden. Por favor, inténteo de novo.';
$messages['crypterror'] = 'Non foi posible gardar o contrasinal novo. Falta a función de cifrado.';
$messages['connecterror'] = 'Non foi posible gardar o contrasinal novo. Erro de conexión';
$messages['internalerror'] = 'Non foi posible gardar o contrasinal novo.';
diff --git a/plugins/password/localization/lb_LU.inc b/plugins/password/localization/lb_LU.inc
index 9962aed28..08026f242 100644
--- a/plugins/password/localization/lb_LU.inc
+++ b/plugins/password/localization/lb_LU.inc
@@ -15,14 +15,10 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
*/
-
-$labels = array();
$labels['changepasswd'] = 'Passwuert änneren';
$labels['curpasswd'] = 'Aktuellt Passwuert:';
$labels['newpasswd'] = 'Neit Passwuert:';
$labels['confpasswd'] = 'Neit Passwuert bestätegen:';
-
-$messages = array();
$messages['nopassword'] = 'Gëff wann ech gelift en neit Passwuert an.';
$messages['nocurpassword'] = 'Gëff wann ech gelift dat aktuellt Passwuert an.';
$messages['passwordincorrect'] = 'Aktuellt Passwuert net korrekt.';
@@ -33,5 +29,4 @@ $messages['internalerror'] = 'Neit Passwuert konnt net gespäichert ginn.';
$messages['passwordshort'] = 'D\'Passwuert muss mindestens $length Zeeche laang sinn.';
$messages['passwordweak'] = 'D\'Passwuert muss mindestens eng Zuel an ee Sazzeechen enthalen.';
$messages['passwordforbidden'] = 'D\'Passwuert enthält verbueden Zeechen.';
-
?>
diff --git a/plugins/password/localization/lv_LV.inc b/plugins/password/localization/lv_LV.inc
index ac0e5da79..650d31b2c 100644
--- a/plugins/password/localization/lv_LV.inc
+++ b/plugins/password/localization/lv_LV.inc
@@ -20,18 +20,18 @@ $labels = array();
$labels['changepasswd'] = 'Nomainīt paroli';
$labels['curpasswd'] = 'Pašreizējā parole:';
$labels['newpasswd'] = 'Jaunā parole:';
-$labels['confpasswd'] = 'Apstiprināt jauno paroli:';
+$labels['confpasswd'] = 'Vēlreiz jauno paroli:';
$messages = array();
-$messages['nopassword'] = 'Lūdzu ievadiet jauno paroli.';
-$messages['nocurpassword'] = 'Lūdzu ievadiet pašreizējo paroli.';
-$messages['passwordincorrect'] = 'Pašreizējā parole nav pareiza.';
+$messages['nopassword'] = 'Lūdzu, ievadiet jauno paroli.';
+$messages['nocurpassword'] = 'Lūdzu, ievadiet pašreizējo paroli.';
+$messages['passwordincorrect'] = 'Pašreizējā parole nepareiza.';
$messages['passwordinconsistency'] = 'Paroles nesakrīt. Lūdzu, ievadiet vēlreiz.';
-$messages['crypterror'] = 'Nevarēja saglabāt jauno paroli. Trūkst kriptēšanas funkcijas.';
+$messages['crypterror'] = 'Nevarēja saglabāt jauno paroli. Trūkst kriptēšanas funkcija.';
$messages['connecterror'] = 'Nevarēja saglabāt jauno paroli. Savienojuma kļūda.';
$messages['internalerror'] = 'Nevarēja saglabāt jauno paroli.';
-$messages['passwordshort'] = 'Jaunajai parolei jābūt vismaz $length simbolu garai.';
-$messages['passwordweak'] = 'Jaunajai parolei jāsatur vismaz viens cipars un speciālais simbols.';
-$messages['passwordforbidden'] = 'Parole satur neatļautus simbolus.';
+$messages['passwordshort'] = 'Jaunajai parolei jābūt vismaz $length simbola garai.';
+$messages['passwordweak'] = 'Jaunajai parolei jāsatur vismaz viens cipars un punktuācijas simbols.';
+$messages['passwordforbidden'] = 'Password contains forbidden characters.';
?>
diff --git a/plugins/password/localization/ro_RO.inc b/plugins/password/localization/ro_RO.inc
index 7406efb9a..17ec31c6b 100644
--- a/plugins/password/localization/ro_RO.inc
+++ b/plugins/password/localization/ro_RO.inc
@@ -20,18 +20,18 @@ $labels = array();
$labels['changepasswd'] = 'Schimbați parola';
$labels['curpasswd'] = 'Parola curentă:';
$labels['newpasswd'] = 'Parola nouă:';
-$labels['confpasswd'] = 'Confirmați parola nouă:';
+$labels['confpasswd'] = 'Confirmare parola nouă:';
$messages = array();
$messages['nopassword'] = 'Te rog să introduci noua parolă.';
$messages['nocurpassword'] = 'Te rog să introduci parola curentă';
$messages['passwordincorrect'] = 'Parola curentă este incorectă.';
-$messages['passwordinconsistency'] = 'Parolele nu se potrivesc, vă rugăm să mai încercați';
-$messages['crypterror'] = 'Nu am reușit să salvez noua parolă. Lipsa funcției de criptare.';
+$messages['passwordinconsistency'] = 'Parolele nu se potrivesc, te rog să mai încerci';
+$messages['crypterror'] = 'Nu am reușit să salvez noua parolă. Funcția de criptare lipsește.';
$messages['connecterror'] = 'Nu am reușit să salvez noua parolă. Eroare connexiune.';
$messages['internalerror'] = 'Nu am reușit să salvez noua parolă.';
-$messages['passwordshort'] = 'Parola trebuie să aibă $length caractere.';
-$messages['passwordweak'] = 'Parola trebuie să conțina cel puțin un număr si un semn de punctuație';
+$messages['passwordshort'] = 'Parola trebuie să aibă minim $length caractere.';
+$messages['passwordweak'] = 'Parola trebuie să conțina cel puțin un număr si un semn de punctuație.';
$messages['passwordforbidden'] = 'Parola conține caractere nepermise.';
?>
diff --git a/plugins/password/localization/ru_RU.inc b/plugins/password/localization/ru_RU.inc
index 2517f922b..79fbfedf6 100644
--- a/plugins/password/localization/ru_RU.inc
+++ b/plugins/password/localization/ru_RU.inc
@@ -26,11 +26,11 @@ $messages = array();
$messages['nopassword'] = 'Пожалуйста, введите новый пароль.';
$messages['nocurpassword'] = 'Пожалуйста, введите текущий пароль.';
$messages['passwordincorrect'] = 'Текущий пароль неверен.';
-$messages['passwordinconsistency'] = 'Пароли не совпадают, попробуйте ещё раз, пожалуйста.';
+$messages['passwordinconsistency'] = 'Пароли не совпадают, попробуйте, пожалуйста, ещё.';
$messages['crypterror'] = 'Не могу сохранить новый пароль. Отсутствует криптографическая функция.';
$messages['connecterror'] = 'Не могу сохранить новый пароль. Ошибка соединения.';
$messages['internalerror'] = 'Не могу сохранить новый пароль.';
-$messages['passwordshort'] = 'Длина пароля должна быть как минимум $length символов.';
+$messages['passwordshort'] = 'Пароль должен быть длиной как минимум $length символов.';
$messages['passwordweak'] = 'Пароль должен включать в себя как минимум одну цифру и один знак пунктуации.';
$messages['passwordforbidden'] = 'Пароль содержит недопустимые символы.';
diff --git a/plugins/password/localization/ti.inc b/plugins/password/localization/ti.inc
new file mode 100644
index 000000000..9453318f0
--- /dev/null
+++ b/plugins/password/localization/ti.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'መሕለፊ ቃል ይለወጥ';
+$labels['curpasswd'] = 'ህልው መሕለፊ ቃል:';
+$labels['newpasswd'] = 'ሓዱሽ መሕለፊ ቃል:';
+$labels['confpasswd'] = 'መረጋገፂ ሓዱሽ መሕለፊ ቃል :';
+$messages['nopassword'] = 'ሓዱሽ መሕለፊ ቃል አብዚ ይእቶ::';
+$messages['nocurpassword'] = 'ህልው መሕለፊ ቃል ኣብዚ ይእቶ::';
+$messages['passwordincorrect'] = 'ህልው መሕለፊ ቃል ከምኡ ኣይኮነን::';
+$messages['passwordinconsistency'] = 'መሕለፍቲ ቃላት ሓድ ኣይኮኑን ::ተውሳኺ ፈተነ የድሊ::';
+$messages['crypterror'] = 'መመስጥሪ ፋንክሽን ስለዝሳእነ እቲ መሕለፊ ቃል ኣይተቐመጠን::';
+$messages['connecterror'] = 'ናይ ርክብ ጸገም ስለዘሎ እቲ መሕለፊ ቃል ኣይተቐመጠን::';
+$messages['internalerror'] = 'እቲ መሕለፊ ቃል ኣይተቐመጠን::';
+$messages['passwordshort'] = 'ንውሓት መሕለፊ ቃል $length ፊዳላት ክኾን አለዎ::';
+$messages['passwordweak'] = 'መሕለፊ ቃል እንተውሓደ ሓደ ኣሃዝን ሓደ ስርዓተ ነጥብን ከጠቓልል አለዎ::';
+$messages['passwordforbidden'] = 'እቲ መሕለፊ ቃል ውጉዳት ፊዳላት አለውዎ::';
+?>
diff --git a/plugins/password/localization/uk_UA.inc b/plugins/password/localization/uk_UA.inc
new file mode 100644
index 000000000..0d102e528
--- /dev/null
+++ b/plugins/password/localization/uk_UA.inc
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password 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-password/
+*/
+$labels['changepasswd'] = 'Змінити пароль';
+$labels['curpasswd'] = 'Поточний пароль:';
+$labels['newpasswd'] = 'Новий пароль:';
+$labels['confpasswd'] = 'Підтвердіть новий пароль:';
+$messages['nopassword'] = 'Будь ласка, введіть новий пароль.';
+$messages['nocurpassword'] = 'Будь ласка, введіть поточний пароль.';
+$messages['passwordincorrect'] = 'Поточний пароль неправильний.';
+$messages['passwordinconsistency'] = 'Паролі не збігаються, спробуйте ще раз.';
+$messages['crypterror'] = 'Не вдалося зберегти новий пароль. Функція шифрування відсутня.';
+$messages['connecterror'] = 'Не вдалося зберегти новий пароль. Помилка з\'єднання.';
+$messages['internalerror'] = 'Не вдалося зберегти новий пароль.';
+$messages['passwordshort'] = 'Пароль повинен бути не менше $length символів.';
+$messages['passwordweak'] = 'Пароль повинен містити як мінімум одну цифру і один розділовий знак.';
+$messages['passwordforbidden'] = 'Пароль містить заборонені символи.';
+?>
diff --git a/plugins/password/package.xml b/plugins/password/package.xml
index 16eda1ad0..9a056dec6 100644
--- a/plugins/password/package.xml
+++ b/plugins/password/package.xml
@@ -15,18 +15,19 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2013-04-28</date>
+ <date>2012-11-15</date>
<version>
- <release>3.4</release>
+ <release>3.2</release>
<api>2.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>
-Added password_force_save option
+- Fix wrong (non-specific) error message on crypt or connection error (#1488808)
+- Added option to define IMAP hosts that support password changes - password_hosts
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -346,36 +347,5 @@ Added password_force_save option
- Added Samba password (#1488364)
</notes>
</release>
- <release>
- <date>2012-11-15</date>
- <version>
- <release>3.2</release>
- <api>2.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes>
-- Fix wrong (non-specific) error message on crypt or connection error (#1488808)
-- Added option to define IMAP hosts that support password changes - password_hosts
- </notes>
- </release>
- <release>
- <date>2013-03-30</date>
- <version>
- <release>3.3</release>
- <api>2.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes>
-Added new cPanel driver - fixes localization related issues (#1487015)
- </notes>
- </release>
</changelog>
</package>
diff --git a/plugins/password/password.php b/plugins/password/password.php
index f1a3e17b9..806db0586 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -1,26 +1,32 @@
<?php
-/**
- * Password Plugin for Roundcube
- *
- * @version @package_version@
- * @author Aleksander Machniak <alec@alec.pl>
- *
- * Copyright (C) 2005-2013, The Roundcube Dev Team
- *
- * 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/.
- */
+/*
+ +-------------------------------------------------------------------------+
+ | Password Plugin for Roundcube |
+ | @version @package_version@ |
+ | |
+ | Copyright (C) 2009-2010, Roundcube Dev. |
+ | |
+ | This program is free software; you can redistribute it and/or modify |
+ | it under the terms of the GNU General Public License version 2 |
+ | as published by the Free Software Foundation. |
+ | |
+ | 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, write to the Free Software Foundation, Inc., |
+ | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
+ | |
+ +-------------------------------------------------------------------------+
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ +-------------------------------------------------------------------------+
+
+ $Id: index.php 2645 2009-06-15 07:01:36Z alec $
+
+*/
define('PASSWORD_CRYPT_ERROR', 1);
define('PASSWORD_ERROR', 2);
@@ -106,22 +112,22 @@ class password extends rcube_plugin
$rc_charset = strtoupper($rcmail->output->get_charset());
$sespwd = $rcmail->decrypt($_SESSION['password']);
- $curpwd = $confirm ? rcube_utils::get_input_value('_curpasswd', rcube_utils::INPUT_POST, true, $charset) : $sespwd;
- $newpwd = rcube_utils::get_input_value('_newpasswd', rcube_utils::INPUT_POST, true);
- $conpwd = rcube_utils::get_input_value('_confpasswd', rcube_utils::INPUT_POST, true);
+ $curpwd = $confirm ? get_input_value('_curpasswd', RCUBE_INPUT_POST, true, $charset) : $sespwd;
+ $newpwd = get_input_value('_newpasswd', RCUBE_INPUT_POST, true);
+ $conpwd = get_input_value('_confpasswd', RCUBE_INPUT_POST, true);
// check allowed characters according to the configured 'password_charset' option
// by converting the password entered by the user to this charset and back to UTF-8
$orig_pwd = $newpwd;
- $chk_pwd = rcube_charset::convert($orig_pwd, $rc_charset, $charset);
- $chk_pwd = rcube_charset::convert($chk_pwd, $charset, $rc_charset);
+ $chk_pwd = rcube_charset_convert($orig_pwd, $rc_charset, $charset);
+ $chk_pwd = rcube_charset_convert($chk_pwd, $charset, $rc_charset);
// WARNING: Default password_charset is ISO-8859-1, so conversion will
// change national characters. This may disable possibility of using
// the same password in other MUA's.
// We're doing this for consistence with Roundcube core
- $newpwd = rcube_charset::convert($newpwd, $rc_charset, $charset);
- $conpwd = rcube_charset::convert($conpwd, $rc_charset, $charset);
+ $newpwd = rcube_charset_convert($newpwd, $rc_charset, $charset);
+ $conpwd = rcube_charset_convert($conpwd, $rc_charset, $charset);
if ($chk_pwd != $orig_pwd) {
$rcmail->output->command('display_message', $this->gettext('passwordforbidden'), 'error');
@@ -135,13 +141,13 @@ class password extends rcube_plugin
}
else if ($required_length && strlen($newpwd) < $required_length) {
$rcmail->output->command('display_message', $this->gettext(
- array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
+ array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
}
else if ($check_strength && (!preg_match("/[0-9]/", $newpwd) || !preg_match("/[^A-Za-z0-9]/", $newpwd))) {
$rcmail->output->command('display_message', $this->gettext('passwordweak'), 'error');
}
// password is the same as the old one, do nothing, return success
- else if ($sespwd == $newpwd && !$rcmail->config->get('password_force_save')) {
+ else if ($sespwd == $newpwd) {
$rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
}
// try to save the password
@@ -157,8 +163,8 @@ class password extends rcube_plugin
// Log password change
if ($rcmail->config->get('password_log')) {
- rcube::write_log('password', sprintf('Password changed for user %s (ID: %d) from %s',
- $rcmail->get_user_name(), $rcmail->user->ID, rcube_utils::remote_ip()));
+ write_log('password', sprintf('Password changed for user %s (ID: %d) from %s',
+ $rcmail->get_user_name(), $rcmail->user->ID, rcmail_remote_ip()));
}
}
else {
@@ -166,7 +172,7 @@ class password extends rcube_plugin
}
}
- $rcmail->overwrite_action('plugin.password');
+ rcmail_overwrite_action('plugin.password');
$rcmail->output->send('plugin');
}
@@ -191,7 +197,7 @@ class password extends rcube_plugin
$input_curpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, rcube::Q($this->gettext('curpasswd'))));
+ $table->add('title', html::label($field_id, Q($this->gettext('curpasswd'))));
$table->add(null, $input_curpasswd->show());
}
@@ -200,7 +206,7 @@ class password extends rcube_plugin
$input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, rcube::Q($this->gettext('newpasswd'))));
+ $table->add('title', html::label($field_id, Q($this->gettext('newpasswd'))));
$table->add(null, $input_newpasswd->show());
// show confirm password selection
@@ -208,7 +214,7 @@ class password extends rcube_plugin
$input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, rcube::Q($this->gettext('confpasswd'))));
+ $table->add('title', html::label($field_id, Q($this->gettext('confpasswd'))));
$table->add(null, $input_confpasswd->show());
$out = html::div(array('class' => 'box'),
@@ -240,7 +246,7 @@ class password extends rcube_plugin
$file = $this->home . "/drivers/$driver.php";
if (!file_exists($file)) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -252,7 +258,7 @@ class password extends rcube_plugin
include_once $file;
if (!class_exists($class, false) || !method_exists($class, 'save')) {
- rcube::raise_error(array(
+ raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/quickrules/localization/cs_CZ.inc b/plugins/quickrules/localization/cs_CZ.inc
new file mode 100644
index 000000000..d2fa4f533
--- /dev/null
+++ b/plugins/quickrules/localization/cs_CZ.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Libor Klepac */
+
+$labels = array();
+$labels['createfilter'] = 'Vytvořit filtr...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/de_CH.inc b/plugins/quickrules/localization/de_CH.inc
new file mode 100644
index 000000000..f1fe8e579
--- /dev/null
+++ b/plugins/quickrules/localization/de_CH.inc
@@ -0,0 +1,10 @@
+<?php
+/* Author: Mike Constabel */
+
+$labels = array();
+$labels['createfilter'] = 'Erstelle Filter...';
+$labels['createfilterbased'] = 'Erstelle einen auf dieser Nachricht basierenden Filter';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/de_DE.inc b/plugins/quickrules/localization/de_DE.inc
new file mode 100644
index 000000000..f1fe8e579
--- /dev/null
+++ b/plugins/quickrules/localization/de_DE.inc
@@ -0,0 +1,10 @@
+<?php
+/* Author: Mike Constabel */
+
+$labels = array();
+$labels['createfilter'] = 'Erstelle Filter...';
+$labels['createfilterbased'] = 'Erstelle einen auf dieser Nachricht basierenden Filter';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/en_GB.inc b/plugins/quickrules/localization/en_GB.inc
new file mode 100644
index 000000000..74b4dcdc5
--- /dev/null
+++ b/plugins/quickrules/localization/en_GB.inc
@@ -0,0 +1,10 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['createfilter'] = 'Create filter';
+$labels['createfilterbased'] = 'Create a filter based on this message';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/en_US.inc b/plugins/quickrules/localization/en_US.inc
new file mode 100644
index 000000000..74b4dcdc5
--- /dev/null
+++ b/plugins/quickrules/localization/en_US.inc
@@ -0,0 +1,10 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['createfilter'] = 'Create filter';
+$labels['createfilterbased'] = 'Create a filter based on this message';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/hu_HU.inc b/plugins/quickrules/localization/hu_HU.inc
new file mode 100644
index 000000000..8d3eeefb8
--- /dev/null
+++ b/plugins/quickrules/localization/hu_HU.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Norbert Wellinger */
+
+$labels = array();
+$labels['createfilter'] = 'Szűrő létrehozása..';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/it_IT.inc b/plugins/quickrules/localization/it_IT.inc
new file mode 100644
index 000000000..5201faedc
--- /dev/null
+++ b/plugins/quickrules/localization/it_IT.inc
@@ -0,0 +1,10 @@
+<?php
+/* Author: Alessio Cecchi */
+
+$labels = array();
+$labels['createfilter'] = 'Crea filtro...';
+$labels['createfilterbased'] = 'Crea un filtro basato su questo messaggio';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/pl_PL.inc b/plugins/quickrules/localization/pl_PL.inc
new file mode 100644
index 000000000..5d14121b2
--- /dev/null
+++ b/plugins/quickrules/localization/pl_PL.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: DZIOBAK */
+
+$labels = array();
+$labels['createfilter'] = 'Utwórz filtr...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/pt_BR.inc b/plugins/quickrules/localization/pt_BR.inc
new file mode 100644
index 000000000..d0b4aa838
--- /dev/null
+++ b/plugins/quickrules/localization/pt_BR.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Pedro Padron */
+
+$labels = array();
+$labels['createfilter'] = 'Criar filtro...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/localization/pt_PT.inc b/plugins/quickrules/localization/pt_PT.inc
new file mode 100644
index 000000000..d0b4aa838
--- /dev/null
+++ b/plugins/quickrules/localization/pt_PT.inc
@@ -0,0 +1,9 @@
+<?php
+/* Author: Pedro Padron */
+
+$labels = array();
+$labels['createfilter'] = 'Criar filtro...';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/package.xml b/plugins/quickrules/package.xml
new file mode 100644
index 000000000..3fa80454a
--- /dev/null
+++ b/plugins/quickrules/package.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>quickrules</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-QuickRules/</uri>
+ <summary>Adds a button to the message list to allow the quick creation of rules in the SieveRules plugin</summary>
+ <description>Adds a button to the message list to allow the quick creation of rules in the SieveRules plugin. Infomration from selected emails is used to prefile the new rule form.</description>
+ <lead>
+ <name>Philip Weir</name>
+ <user>JohnDoh</user>
+ <email>roundcube@tehinterweb.co.uk</email>
+ <active>yes</active>
+ </lead>
+ <date>2013-02-24</date>
+ <time>10:16:53</time>
+ <version>
+ <release>1.4</release>
+ <api>1.4</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>-</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="quickrules.php" role="php">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="quickrules.js" role="data">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="CHANGELOG" role="data"/>
+ <file name="README.md" role="data"/>
+ <file name="localization/cs_CZ.inc" role="data"/>
+ <file name="localization/de_CH.inc" role="data"/>
+ <file name="localization/de_DE.inc" role="data"/>
+ <file name="localization/en_GB.inc" role="data"/>
+ <file name="localization/en_US.inc" role="data"/>
+ <file name="localization/hu_HU.inc" role="data"/>
+ <file name="localization/it_IT.inc" role="data"/>
+ <file name="localization/pl_PL.inc" role="data"/>
+ <file name="localization/pt_BR.inc" role="data"/>
+ <file name="localization/pt_PT.inc" role="data"/>
+ <file name="skins/classic/ie6hacks.css" role="data"/>
+ <file name="skins/classic/mail_toolbar.gif" role="data"/>
+ <file name="skins/classic/mail_toolbar.png" role="data"/>
+ <file name="skins/classic/messageactions.gif" role="data"/>
+ <file name="skins/classic/messageactions.png" role="data"/>
+ <file name="skins/classic/quickrules.css" role="data"/>
+ <file name="skins/larry/ie6hacks.css" role="data"/>
+ <file name="skins/larry/mail_toolbar.png" role="data"/>
+ <file name="skins/larry/messageactions.png" role="data"/>
+ <file name="skins/larry/quickrules.css" role="data"/>
+ </dir>
+ <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.1</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ <package>
+ <name>sieverules</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/</uri>
+ <min>1.15</min>
+ </package>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>
diff --git a/plugins/quickrules/quickrules.js b/plugins/quickrules/quickrules.js
new file mode 100644
index 000000000..7b8702330
--- /dev/null
+++ b/plugins/quickrules/quickrules.js
@@ -0,0 +1,169 @@
+/**
+ * QuickRules plugin script
+ */
+
+function rcmail_quickrules() {
+ if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length))
+ return;
+
+ var uids = rcmail.env.uid ? rcmail.env.uid : rcmail.message_list.get_selection().join(',');
+
+ var lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_post('plugin.quickrules.add', '_uid='+uids+'&_mbox='+urlencode(rcmail.env.mailbox), lock);
+}
+
+function quickrules_add_filter() {
+ rcmail.command('plugin.sieverules.add');
+}
+
+function quickrules_setup_rules() {
+ var rulesTable = rcube_find_object('rules-table');
+ var actsTable = rcube_find_object('actions-table');
+
+ if (rcmail_quickrules_rules.length < 1)
+ return;
+
+ for (i = 1; i < rcmail_quickrules_rules.length; i++)
+ rcmail.command('plugin.sieverules.add_rule','', rulesTable.tBodies[0].rows[0]);
+
+ var headers = document.getElementsByName('_selheader[]');
+ var ops = document.getElementsByName('_operator[]');
+ var targets = document.getElementsByName('_target[]');
+ var otherHeaders = document.getElementsByName('_header[]');
+ var headerParts = "";
+
+ for (var i = 1; i < headers.length; i++) {
+ $(headers[i]).val(rcmail_quickrules_rules[i-1].header);
+ $(ops[i]).val(rcmail_quickrules_rules[i-1].op);
+ headerParts = "";
+
+ // other headers
+ if (rcmail_quickrules_rules[i-1].header.indexOf('other') == 0) {
+ headerParts = rcmail_quickrules_rules[i-1].header.split('::');
+ rcmail_quickrules_rules[i-1].header = 'header::other'
+ $(headers[i]).val(rcmail_quickrules_rules[i-1].header);
+ }
+
+ // check values set ok before adding rule
+ if ($(headers[i]).val() == rcmail_quickrules_rules[i-1].header && $(ops[i]).val() == rcmail_quickrules_rules[i-1].op) {
+ rcmail.sieverules_header_select(headers[i]);
+
+ if (headerParts)
+ $(otherHeaders[i]).val(headerParts[1]);
+
+ // set the op again (header onchange resets it)
+ $(ops[i]).val(rcmail_quickrules_rules[i-1].op);
+ rcmail.sieverules_rule_op_select(ops[i]);
+
+ targets[i].value = rcmail_quickrules_rules[i-1].target;
+ }
+ else {
+ headers[i].selectedIndex = 0;
+ ops[i].selectedIndex = 0;
+ }
+ }
+
+ if (rcmail_quickrules_actions.length < 1)
+ return;
+
+ for (i = 1; i < rcmail_quickrules_actions.length; i++)
+ rcmail.command('plugin.sieverules.add_action','', actsTable.tBodies[0].rows[0]);
+
+ var acts = document.getElementsByName('_act[]');
+ var folders = document.getElementsByName('_folder[]');
+ var flags = document.getElementsByName('_imapflags[]');
+
+ for (var i = 1; i < acts.length; i++) {
+ $(acts[i]).val(rcmail_quickrules_actions[i-1].act);
+
+ // check for imap4flags
+ if (rcmail_quickrules_actions[i-1].act == 'imapflags') {
+ if ($(acts[i]).val() != rcmail_quickrules_actions[i-1].act)
+ $(acts[i]).val('imap4flags');
+
+ // check values set ok before adding action
+ if ($(acts[i]).val() == rcmail_quickrules_actions[i-1].act) {
+ rcmail.sieverules_action_select(acts[i]);
+ $(flags[i]).val(rcmail_quickrules_actions[i-1].props);
+ }
+ else {
+ acts[i].selectedIndex = 0;
+ }
+ }
+ else {
+ // check values set ok before adding action
+ if ($(acts[i]).val() == rcmail_quickrules_actions[i-1].act) {
+ rcmail.sieverules_action_select(acts[i]);
+ $(folders[i]).val(rcmail_quickrules_actions[i-1].props);
+ }
+ else {
+ acts[i].selectedIndex = 0;
+ }
+ }
+ }
+}
+
+function rcmail_quickrules_status(command) {
+ switch (command) {
+ case 'beforedelete':
+ if (!rcmail.env.flag_for_deletion && rcmail.env.trash_mailbox &&
+ rcmail.env.mailbox != rcmail.env.trash_mailbox &&
+ (rcmail.message_list && !rcmail.message_list.shiftkey))
+ rcmail.enable_command('plugin.quickrules.create', false);
+
+ break;
+ case 'beforemove':
+ case 'beforemoveto':
+ rcmail.enable_command('plugin.quickrules.create', false);
+ break;
+ case 'aftermove':
+ case 'aftermoveto':
+ if (rcmail.env.action == 'show')
+ rcmail.enable_command('plugin.quickrules.create', true);
+
+ break;
+ case 'afterpurge':
+ case 'afterexpunge':
+ if (!rcmail.env.messagecount && rcmail.task == 'mail')
+ rcmail.enable_command('plugin.quickrules.create', false);
+
+ break;
+ }
+}
+
+function rcmail_quickrules_init() {
+ if (rcmail.env.action == 'plugin.sieverules')
+ quickrules_add_filter();
+
+ if (rcmail.env.action == 'plugin.sieverules.add')
+ quickrules_setup_rules();
+
+ if (window.rcm_contextmenu_register_command)
+ rcm_contextmenu_register_command('quickrules', 'rcmail_quickrules', rcmail.gettext('quickrules.createfilter'), 'moveto', 'after', false);
+}
+
+$(document).ready(function() {
+ if (window.rcmail) {
+ rcmail.addEventListener('init', function(evt) {
+ // register command (directly enable in message view mode)
+ rcmail.register_command('plugin.quickrules.create', rcmail_quickrules, rcmail.env.uid);
+
+ if (rcmail.message_list && rcmail.env.junk_mailbox) {
+ rcmail.message_list.addEventListener('select', function(list) {
+ rcmail.enable_command('plugin.quickrules.create', list.get_single_selection() != null);
+ });
+ }
+ });
+
+ rcmail.add_onload('rcmail_quickrules_init()');
+
+ // update button activation after external events
+ rcmail.addEventListener('beforedelete', function(props) { rcmail_quickrules_status('beforedelete'); } );
+ rcmail.addEventListener('beforemove', function(props) { rcmail_quickrules_status('beforemove'); } );
+ rcmail.addEventListener('beforemoveto', function(props) { rcmail_quickrules_status('beforemoveto'); } );
+ rcmail.addEventListener('aftermove', function(props) { rcmail_quickrules_status('aftermove'); } );
+ rcmail.addEventListener('aftermoveto', function(props) { rcmail_quickrules_status('aftermoveto'); } );
+ rcmail.addEventListener('afterpurge', function(props) { rcmail_quickrules_status('afterpurge'); } );
+ rcmail.addEventListener('afterexpunge', function(props) { rcmail_quickrules_status('afterexpunge'); } );
+ }
+}); \ No newline at end of file
diff --git a/plugins/quickrules/quickrules.php b/plugins/quickrules/quickrules.php
new file mode 100644
index 000000000..575dd5724
--- /dev/null
+++ b/plugins/quickrules/quickrules.php
@@ -0,0 +1,137 @@
+<?php
+
+/**
+ * QuickRules
+ *
+ * Plugin to allow the user to quickly create filters from the message list
+ *
+ * @version @package_version@
+ * @requires SieveRules plugin
+ * @author Philip Weir
+ */
+class quickrules extends rcube_plugin
+{
+ public $task = 'mail|settings';
+
+ // default values: label => value
+ private $headers = array('subject' => 'header::Subject',
+ 'from' => 'address::From',
+ 'to' => 'address::To',
+ 'cc' => 'address::Cc',
+ 'bcc' => 'address::Bcc',
+ 'envelopeto' => 'envelope::To',
+ 'envelopefrom' => 'envelope::From'
+ );
+
+ private $operators = array('filtercontains' => 'contains',
+ 'filternotcontains' => 'notcontains',
+ 'filteris' => 'is',
+ 'filterisnot' => 'notis',
+ 'filterexists' => 'exists',
+ 'filternotexists' => 'notexists'
+ );
+
+ private $flags = array('flagread' => '\\Seen',
+ 'flagdeleted' => '\\Deleted',
+ 'flaganswered' => '\\Answered',
+ 'flagdraft' => '\\Draft',
+ 'flagflagged' => '\\\\Flagged'
+ );
+
+ private $additional_headers = array('List-Id');
+
+ function init()
+ {
+ // load required plugin
+ $this->require_plugin('sieverules');
+
+ $rcmail = rcube::get_instance();
+ $this->register_action('plugin.quickrules.add', array($this, 'init_rule'));
+
+ if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')) {
+ $this->add_texts('localization', true);
+ $this->include_script('quickrules.js');
+ $this->include_stylesheet($this->local_skin_path() .'/quickrules.css');
+ if ($rcmail->output->browser->ie && $rcmail->output->browser->ver == 6)
+ $this->include_stylesheet($this->local_skin_path() . '/ie6hacks.css');
+
+ $this->add_button(array('command' => 'plugin.quickrules.create', 'type' => 'link', 'class' => 'button buttonPas quickrules disabled', 'classact' => 'button quickrules', 'classsel' => 'button quickrulesSel', 'title' => 'quickrules.createfilterbased', 'label' => 'quickrules.createfilter'), 'toolbar');
+ }
+
+ if ($_SESSION['plugin.quickrules']) {
+ $this->add_hook('storage_init', array($this, 'fetch_headers'));
+ $this->_create_rule();
+ }
+ }
+
+ function init_rule()
+ {
+ $_SESSION['plugin.quickrules'] = true;
+ $_SESSION['plugin.quickrules.uids'] = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
+ $_SESSION['plugin.quickrules.mbox'] = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
+
+ rcube::get_instance()->output->redirect(array('task' => 'settings', 'action' => 'plugin.sieverules'));
+ }
+
+ function fetch_headers($attr)
+ {
+ $attr['fetch_headers'] .= trim($attr['fetch_headers'] . join(' ', $this->additional_headers));
+ return($attr);
+ }
+
+ private function _create_rule()
+ {
+ $rcmail = rcube::get_instance();
+ if ($rcmail->action == 'plugin.sieverules' || $rcmail->action == 'plugin.sieverules.add') {
+ $this->include_script('quickrules.js');
+
+ if ($rcmail->action == 'plugin.sieverules.add') {
+ $uids = $_SESSION['plugin.quickrules.uids'];
+ $mbox = $_SESSION['plugin.quickrules.mbox'];
+ $rcmail->storage_init();
+
+ $rules = array();
+ $actions = array();
+ foreach (explode(",", $uids) as $uid) {
+ $message = new rcube_message($uid);
+ $rules[] = rcube_output::json_serialize(array('header' => $this->headers['from'], 'op' => $this->operators['filteris'], 'target' => $message->sender['mailto']));
+
+ $recipients = array();
+ $recipients_array = rcube_mime::decode_address_list($message->headers->to);
+ foreach ($recipients_array as $recipient)
+ $recipients[] = $recipient['mailto'];
+
+ $identity = $rcmail->user->get_identity();
+ $recipient_str = join(', ', $recipients);
+ if ($recipient_str != $identity['email'])
+ $rules[] = rcube_output::json_serialize(array('header' => $this->headers['to'], 'op' => $this->operators['filteris'], 'target' => $recipient_str));
+
+ if (strlen($message->subject) > 0)
+ $rules[] = rcube_output::json_serialize(array('header' => $this->headers['subject'], 'op' => $this->operators['filtercontains'], 'target' => $message->subject));
+
+ foreach ($this->additional_headers as $header) {
+ if (strlen($message->headers->others[strtolower($header)]) > 0)
+ $rules[] = rcube_output::json_serialize(array('header' => 'other::' . $header, 'op' => $this->operators['filteris'], 'target' => $message->headers->others[strtolower($header)]));
+ }
+
+ if ($mbox != 'INBOX')
+ $actions[] = rcube_output::json_serialize(array('act' => 'fileinto', 'props' => $mbox));
+
+ foreach ($message->headers->flags as $flag) {
+ if ($flag == 'Flagged')
+ $actions[] = rcube_output::json_serialize(array('act' => 'imapflags', 'props' => $this->flags['flagflagged']));
+ }
+ }
+
+ $this->api->output->add_script(rcmail_output::JS_OBJECT_NAME . "_quickrules_rules = [" . implode(',', $rules) . "];");
+ $this->api->output->add_script(rcmail_output::JS_OBJECT_NAME . "_quickrules_actions = [" . implode(',', $actions) . "];");
+
+ $_SESSION['plugin.quickrules'] = false;
+ $_SESSION['plugin.quickrules.uids'] = '';
+ $_SESSION['plugin.quickrules.mbox'] = '';
+ }
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/quickrules/skins/classic/ie6hacks.css b/plugins/quickrules/skins/classic/ie6hacks.css
new file mode 100644
index 000000000..2a3b57506
--- /dev/null
+++ b/plugins/quickrules/skins/classic/ie6hacks.css
@@ -0,0 +1,14 @@
+/**
+ * QuickRules plugin styles (IE6 hacks)
+ */
+
+#messagetoolbar a.quickrules,
+#messagetoolbar a.quickrulesSel
+{
+ background-image: url(mail_toolbar.gif);
+}
+
+#rcmContextMenu .quickrules a
+{
+ background-image: url(messageactions.gif);
+} \ No newline at end of file
diff --git a/plugins/quickrules/skins/classic/mail_toolbar.gif b/plugins/quickrules/skins/classic/mail_toolbar.gif
new file mode 100644
index 000000000..96945bee8
--- /dev/null
+++ b/plugins/quickrules/skins/classic/mail_toolbar.gif
Binary files differ
diff --git a/plugins/quickrules/skins/classic/mail_toolbar.png b/plugins/quickrules/skins/classic/mail_toolbar.png
new file mode 100644
index 000000000..9a6397482
--- /dev/null
+++ b/plugins/quickrules/skins/classic/mail_toolbar.png
Binary files differ
diff --git a/plugins/quickrules/skins/classic/messageactions.gif b/plugins/quickrules/skins/classic/messageactions.gif
new file mode 100644
index 000000000..bdfa8e142
--- /dev/null
+++ b/plugins/quickrules/skins/classic/messageactions.gif
Binary files differ
diff --git a/plugins/quickrules/skins/classic/messageactions.png b/plugins/quickrules/skins/classic/messageactions.png
new file mode 100644
index 000000000..492565fda
--- /dev/null
+++ b/plugins/quickrules/skins/classic/messageactions.png
Binary files differ
diff --git a/plugins/quickrules/skins/classic/quickrules.css b/plugins/quickrules/skins/classic/quickrules.css
new file mode 100644
index 000000000..1ff5a33b2
--- /dev/null
+++ b/plugins/quickrules/skins/classic/quickrules.css
@@ -0,0 +1,26 @@
+/**
+ * QuickRules plugin styles
+ */
+
+#messagetoolbar a.quickrules,
+#messagetoolbar a.quickrulesSel
+{
+ text-indent: -5000px;
+ background-image: url(mail_toolbar.png);
+}
+
+#messagetoolbar a.quickrules
+{
+ background-position: 0 0;
+}
+
+#messagetoolbar a.quickrulesSel
+{
+ background-position: 0 -32px;
+}
+
+#rcmContextMenu .quickrules a
+{
+ background-image: url(messageactions.png);
+ background-position: 7px 0px;
+} \ No newline at end of file
diff --git a/plugins/quickrules/skins/larry/ie6hacks.css b/plugins/quickrules/skins/larry/ie6hacks.css
new file mode 100644
index 000000000..f5e8ac794
--- /dev/null
+++ b/plugins/quickrules/skins/larry/ie6hacks.css
@@ -0,0 +1,3 @@
+/**
+ * QuickRules plugin styles (IE6 hacks)
+ */
diff --git a/plugins/quickrules/skins/larry/mail_toolbar.png b/plugins/quickrules/skins/larry/mail_toolbar.png
new file mode 100644
index 000000000..f5738f0f5
--- /dev/null
+++ b/plugins/quickrules/skins/larry/mail_toolbar.png
Binary files differ
diff --git a/plugins/quickrules/skins/larry/messageactions.png b/plugins/quickrules/skins/larry/messageactions.png
new file mode 100644
index 000000000..f7a431d10
--- /dev/null
+++ b/plugins/quickrules/skins/larry/messageactions.png
Binary files differ
diff --git a/plugins/quickrules/skins/larry/quickrules.css b/plugins/quickrules/skins/larry/quickrules.css
new file mode 100644
index 000000000..64f146b0c
--- /dev/null
+++ b/plugins/quickrules/skins/larry/quickrules.css
@@ -0,0 +1,21 @@
+/**
+ * QuickRules plugin styles
+ */
+
+#messagetoolbar a.quickrules,
+#messagetoolbar a.quickrulesSel
+{
+ background-image: url(mail_toolbar.png);
+}
+
+#messagetoolbar a.quickrules,
+#messagetoolbar a.quickrulesSel
+{
+ background-position: center -16px;
+}
+
+#rcmContextMenu .quickrules a span
+{
+ background-image: url(messageactions.png);
+ background-position: 5px 6px;
+} \ No newline at end of file
diff --git a/plugins/sauserprefs/config.inc.php.dist b/plugins/sauserprefs/config.inc.php.dist
new file mode 100644
index 000000000..81b85507f
--- /dev/null
+++ b/plugins/sauserprefs/config.inc.php.dist
@@ -0,0 +1,160 @@
+<?php
+
+/**
+ * SAUserPrefs configuration file
+ */
+
+// spamassassin database settings
+$rcmail_config['sauserprefs_db_dsnw'] = 'mysql://username:password@localhost/database';
+
+// PEAR database DSN for read only operations (if empty write database will be used)
+// useful for database replication
+$rcmail_config['sauserprefs_db_dsnr'] = '';
+
+// use persistent db-connections
+// beware this will not "always" work as expected
+// see: http://www.php.net/manual/en/features.persistent-connections.php
+$rcmail_config['sauserprefs_db_persistent'] = FALSE;
+
+// table that holds user prefs
+$rcmail_config['sauserprefs_sql_table_name'] = "userpref";
+
+// name of the username field in the user prefs table
+$rcmail_config['sauserprefs_sql_username_field'] = "username";
+
+// name of the preference field in the user prefs table, holds the name of the preference
+$rcmail_config['sauserprefs_sql_preference_field'] = "preference";
+
+// name of the value field in the user prefs table, holds the value of the preference
+$rcmail_config['sauserprefs_sql_value_field'] = "value";
+
+// username of the current user in the database, normaly %u (username from the session info)
+// %u is replaced with the username (from the session info)
+// %l is replaced with the local part of the username (if the username is an email address)
+// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
+// %i is replaced with the email address from the user's default identity
+$rcmail_config['sauserprefs_userid'] = "%u";
+
+// username of the "global" or default settings user in the database, normaly $GLOBAL or @GLOBAL
+$rcmail_config['sauserprefs_global_userid'] = "\$GLOBAL";
+
+// enable the whitelists synchronisation, check README for more information
+$rcmail_config['sauserprefs_whitelist_sync'] = FALSE;
+
+// id of the address book to synchronise the whitelist with, null for default Roundcube address book
+$rcmail_config['sauserprefs_whitelist_abook_id'] = null;
+
+// don't allow these settings to be overriden by the user
+// eg. $rcmail_config['sauserprefs_dont_override'] = array('required_score','rewrite_header Subject');
+// to disable entire sections enter the secion name surrounded by braces. Sections are: general,tests,bayes,headers,report,addresses
+// eg. $rcmail_config['sauserprefs_dont_override'] = array('{tests}');
+$rcmail_config['sauserprefs_dont_override'] = array();
+
+// default settings
+// these are overridden by $GLOBAL and user settings from the database
+$rcmail_config['sauserprefs_default_prefs'] = array(
+ "required_score" => "5",
+ "rewrite_header Subject" => "*****SPAM*****",
+ "ok_languages" => "all",
+ "ok_locales" => "all",
+ "fold_headers" => "1",
+ "add_header all Level" => "_STARS(*)_",
+ "use_razor1" => "0",
+ "use_razor2" => "1",
+ "use_pyzor" => "1",
+ "use_dcc" => "1",
+ "use_bayes" => "1",
+ "skip_rbl_checks" => "0",
+ "report_safe" => "1",
+ "bayes_auto_learn" => "1",
+ "bayes_auto_learn_threshold_nonspam" => "0.1",
+ "bayes_auto_learn_threshold_spam" => "12.0",
+ "use_bayes_rules" => "1"
+ );
+
+// spam score increment - increment values in the the score threshold drop down by this, from 0 to 10
+$rcmail_config['sauserprefs_score_inc'] = 1;
+
+// allow the user to delete bayesian data
+// please also see sauserprefs_bayes_delete_query option
+$rcmail_config['sauserprefs_bayes_delete'] = false;
+
+// delete user bayesian data stored in database
+// the query can contain the following macros that will be expanded as follows:
+// %u is replaced with the username from the sauserprefs_userid setting above
+// use an array to run multiple queries
+// eg. $rcmail_config['sauserprefs_bayes_delete_query'] = array(
+// 'DELETE FROM bayes_seen WHERE id IN (SELECT id FROM bayes_vars WHERE username = %u);',
+// 'DELETE FROM bayes_token WHERE id IN (SELECT id FROM bayes_vars WHERE username = %u);',
+// 'DELETE FROM bayes_vars WHERE username = %u;',
+// );
+$rcmail_config['sauserprefs_bayes_delete_query'] = '';
+
+// define languages
+$rcmail_config['sauserprefs_languages'] = array(
+ "af" => "Afrikaans",
+ "sq" => "Albanian",
+ "am" => "Amharic",
+ "ar" => "Arabic",
+ "hy" => "Armenian",
+ "eu" => "Basque",
+ "bs" => "Bosnian",
+ "bg" => "Bulgarian",
+ "be" => "Byelorussian",
+ "ca" => "Catalan",
+ "zh" => "Chinese",
+ "hr" => "Croatian",
+ "cs" => "Czech",
+ "da" => "Danish",
+ "nl" => "Dutch",
+ "en" => "English",
+ "eo" => "Esperanto",
+ "et" => "Estonian",
+ "fi" => "Finnish",
+ "fr" => "French",
+ "fy" => "Frisian",
+ "ka" => "Georgian",
+ "de" => "German",
+ "el" => "Greek",
+ "he" => "Hebrew",
+ "hi" => "Hindi",
+ "hu" => "Hungarian",
+ "is" => "Icelandic",
+ "id" => "Indonesian",
+ "ga" => "Irish Gaelic",
+ "it" => "Italian",
+ "ja" => "Japanese",
+ "ko" => "Korean",
+ "la" => "Latin",
+ "lv" => "Latvian",
+ "lt" => "Lithuanian",
+ "ms" => "Malay",
+ "mr" => "Marathi",
+ "ne" => "Nepali",
+ "no" => "Norwegian",
+ "fa" => "Persian",
+ "pl" => "Polish",
+ "pt" => "Portuguese",
+ "qu" => "Quechua",
+ "rm" => "Rhaeto-Romance",
+ "ro" => "Romanian",
+ "ru" => "Russian",
+ "sa" => "Sanskrit",
+ "sco" => "Scots",
+ "gd" => "Scottish Gaelic",
+ "sr" => "Serbian",
+ "sk" => "Slovak",
+ "sl" => "Slovenian",
+ "es" => "Spanish",
+ "sw" => "Swahili",
+ "sv" => "Swedish",
+ "tl" => "Tagalog",
+ "ta" => "Tamil",
+ "th" => "Thai",
+ "tr" => "Turkish",
+ "uk" => "Ukrainian",
+ "vi" => "Vietnamese",
+ "cy" => "Welsh",
+ "yi" => "Yiddish"
+ );
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/include/rcube_sauserprefs_storage.php b/plugins/sauserprefs/include/rcube_sauserprefs_storage.php
new file mode 100644
index 000000000..0819d5cf4
--- /dev/null
+++ b/plugins/sauserprefs/include/rcube_sauserprefs_storage.php
@@ -0,0 +1,268 @@
+<?php
+
+/**
+ * SAUserPrefs storage class
+ *
+ * Class to handle the SQL work for SAUserPrefs
+ *
+ * @author Philip Weir
+ */
+class rcube_sauserprefs_storage
+{
+ private $db;
+ private $db_dsnw;
+ private $db_dsnr;
+ private $db_persistent;
+ private $sa_user;
+ private $table_name;
+ private $username_field;
+ private $preference_field;
+ private $value_field;
+ private $bayes_delete_query;
+
+ function __construct($db_dsnw, $db_dsnr, $db_persistent, $sa_user, $table_name, $username_field, $preference_field, $value_field, $bayes_delete_query)
+ {
+ $this->db_dsnw = $db_dsnw;
+ $this->db_dsnr = $db_dsnr;
+ $this->db_persistent = $db_persistent;
+ $this->sa_user = $sa_user;
+ $this->table_name = $table_name;
+ $this->username_field = $username_field;
+ $this->preference_field = $preference_field;
+ $this->value_field = $value_field;
+ $this->bayes_delete_query = $bayes_delete_query;
+ }
+
+ function load_prefs($user)
+ {
+ $this->_db_connect('r');
+ $prefs = array();
+
+ $sql_result = $this->db->query(
+ "SELECT ". $this->preference_field.
+ ", ". $this->value_field.
+ " FROM ". $this->table_name.
+ " WHERE ". $this->username_field ." = ?;",
+ $user);
+
+ while ($sql_result && ($sql_arr = $this->db->fetch_assoc($sql_result))) {
+ $pref_name = $sql_arr[$this->preference_field];
+ $pref_name = sauserprefs::map_pref_name($pref_name, true);
+ $pref_value = $sql_arr[$this->value_field];
+
+ if ($pref_name == 'whitelist_from' || $pref_name == 'blacklist_from' || $pref_name == 'whitelist_to')
+ $prefs['addresses'][] = array('field' => $pref_name, 'value' => $pref_value);
+ else
+ $prefs[$pref_name] = $pref_value;
+
+ // update deprecated prefs in db
+ if ($sql_arr[$this->preference_field] != sauserprefs::map_pref_name($pref_name)) {
+ $this->_db_connect('w');
+
+ $this->db->query(
+ "UPDATE ". $this->table_name.
+ " SET ". $this->preference_field ." = ?".
+ " WHERE ". $this->username_field ." = ?".
+ " AND ". $this->preference_field ." = ?;",
+ sauserprefs::map_pref_name($pref_name),
+ $user,
+ $sql_arr[$this->preference_field]);
+ }
+ }
+
+ return $prefs;
+ }
+
+ function save_prefs($new_prefs, $cur_prefs, $global_prefs)
+ {
+ $this->_db_connect('w');
+ $result = true;
+
+ // save prefs
+ foreach ($new_prefs as $preference => $value) {
+ if ($preference == 'addresses') {
+ foreach ($value as $address) {
+ if ($address['action'] == "DELETE") {
+ $result = false;
+
+ $this->db->query(
+ "DELETE FROM ". $this->table_name.
+ " WHERE ". $this->username_field ." = ?".
+ " AND ". $this->preference_field ." = ?".
+ " AND ". $this->value_field ." = ?;",
+ $this->sa_user,
+ sauserprefs::map_pref_name($address['field']),
+ $address['value']);
+
+ $result = $this->db->affected_rows();
+
+ if (!$result) {
+ rcube::write_log('errors', 'sauserprefs error: cannot delete "' . sauserprefs::map_pref_name($prefs[$idx]) . '" = "' . $vals[$idx] . '" for ' . $this->sa_user);
+ break;
+ }
+ }
+ elseif ($address['action'] == "INSERT") {
+ $result = false;
+
+ $this->db->query(
+ "INSERT INTO ". $this->table_name.
+ " (". $this->username_field.
+ ", ". $this->preference_field.
+ ", ". $this->value_field.
+ ") VALUES (?, ?, ?);",
+ $this->sa_user,
+ sauserprefs::map_pref_name($address['field']),
+ $address['value']);
+
+ $result = $this->db->affected_rows();
+
+ if (!$result) {
+ rcube::write_log('errors', 'sauserprefs error: cannot insert "' . sauserprefs::map_pref_name($prefs[$idx]) . '" = "' . $vals[$idx] . '" for ' . $this->sa_user);
+ break;
+ }
+ }
+ }
+ }
+ elseif (array_key_exists($preference, $cur_prefs) && ($value == "" || $value == $global_prefs[$preference])) {
+ $result = false;
+
+ $this->db->query(
+ "DELETE FROM ". $this->table_name.
+ " WHERE ". $this->username_field ." = ?".
+ " AND ". $this->preference_field ." = ?;",
+ $this->sa_user,
+ sauserprefs::map_pref_name($preference));
+
+ $result = $this->db->affected_rows();
+
+ if (!$result) {
+ rcube::write_log('errors', 'sauserprefs error: cannot delete "' . sauserprefs::map_pref_name($preference) . '" for "' . $this->sa_user);
+ break;
+ }
+ }
+ elseif (array_key_exists($preference, $cur_prefs) && $value != $cur_prefs[$preference]) {
+ $result = false;
+
+ $this->db->query(
+ "UPDATE ". $this->table_name.
+ " SET ". $this->value_field ." = ?".
+ " WHERE ". $this->username_field ." = ?".
+ " AND ". $this->preference_field ." = ?;",
+ $value,
+ $this->sa_user,
+ sauserprefs::map_pref_name($preference));
+
+ $result = $this->db->affected_rows();
+
+ if (!$result) {
+ rcube::write_log('errors', 'sauserprefs error: cannot update "' . sauserprefs::map_pref_name($preference) . '" = "' . $value . '" for ' . $this->sa_user);
+ break;
+ }
+ }
+ elseif (!array_key_exists($preference, $cur_prefs) && $value != $global_prefs[$preference]) {
+ $result = false;
+
+ $this->db->query(
+ "INSERT INTO ". $this->table_name.
+ " (". $this->username_field.
+ ", ". $this->preference_field.
+ ", ". $this->value_field.
+ ") VALUES (?, ?, ?);",
+ $this->sa_user,
+ sauserprefs::map_pref_name($preference),
+ $value);
+
+ $result = $this->db->affected_rows();
+
+ if (!$result) {
+ rcube::write_log('errors', 'sauserprefs error: cannot insert "' . sauserprefs::map_pref_name($preference) . '" = "' . $value . '" for ' . $this->sa_user);
+ break;
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ function whitelist_add($emails)
+ {
+ $this->_db_connect('w');
+
+ foreach ($emails as $email) {
+ // check address is not already whitelisted
+ $sql_result = $this->db->query(
+ "SELECT ". $this->value_field.
+ " FROM ". $this->table_name.
+ " WHERE ". $this->username_field ." = ?".
+ " AND ". $this->preference_field ." = ?".
+ " AND ". $this->value_field ." = ?;",
+ $this->sa_user,
+ sauserprefs::map_pref_name('whitelist_from'),
+ $email);
+
+ if (!$this->db->fetch_array($sql_result))
+ $this->db->query(
+ "INSERT INTO ". $this->table_name.
+ " (". $this->username_field.
+ ", ". $this->preference_field.
+ ", ". $this->value_field.
+ ") VALUES (?, ?, ?);",
+ $this->sa_user,
+ sauserprefs::map_pref_name('whitelist_from'),
+ $email);
+ }
+ }
+
+ function whitelist_delete($emails)
+ {
+ $this->_db_connect('w');
+
+ foreach ($emails as $email)
+ $this->db->query(
+ "DELETE FROM ". $this->table_name.
+ " WHERE ". $this->username_field ." = ?".
+ " AND ". $this->preference_field ." = ?".
+ " AND ". $this->value_field ." = ?;",
+ $this->sa_user,
+ sauserprefs::map_pref_name('whitelist_from'),
+ $email);
+
+ }
+
+ function purge_bayes()
+ {
+ $this->_db_connect('w');
+ $queries = !is_array($this->bayes_delete_query) ? array($this->bayes_delete_query) : $this->bayes_delete_query;
+
+ foreach ($queries as $sql) {
+ $sql = str_replace('%u', $this->db->quote($this->sa_user, 'text'), $sql);
+ $this->db->query($sql);
+
+ if ($this->db->is_error())
+ break;
+ }
+
+ if (!$this->db->is_error())
+ return true;
+ else
+ return false;
+ }
+
+ private function _db_connect($mode)
+ {
+ if (!$this->db)
+ $this->db = rcube_db::factory($this->db_dsnw, $this->db_dsnr, $this->db_persistent);
+
+ $this->db->db_connect($mode);
+
+ // check DB connections and exit on failure
+ if ($err_str = $this->db->is_error()) {
+ raise_error(array(
+ 'code' => 603,
+ 'type' => 'db',
+ 'message' => $err_str), false, true);
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/cs_CZ.inc b/plugins/sauserprefs/localization/cs_CZ.inc
new file mode 100644
index 000000000..53be0e691
--- /dev/null
+++ b/plugins/sauserprefs/localization/cs_CZ.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Tomáš Bezděk */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Spravovat nastavení detekce spamu';
+$labels['sauserprefssettings'] = 'Nastavení Spam-u';
+$labels['spamgeneralsettings'] = 'Všeobecné nastavení';
+$labels['spamthres'] = 'Hranice skóre';
+$labels['spamsubject'] = 'Značka v předmětu';
+$labels['spamsubjectblank'] = '(nechajte prázdne pre žádnou)';
+$labels['spamlang'] = 'Jazyky zprávy';
+$labels['enabled'] = 'Povoleno';
+$labels['disabled'] = 'Zakázáno';
+$labels['headers'] = 'Hlavičky zpráv';
+$labels['foldheaders'] = 'Povolit víceřádkové v hlavičky';
+$labels['spamlevelstars'] = 'Pouzít \'Spam Level\' hlavičku (úroveň spamu)';
+$labels['spamlevelchar'] = 'Znak úrovně spamu';
+$labels['spamtests'] = 'Internetové spam testy';
+$labels['userazor1'] = 'Použít Razor v1';
+$labels['userazor2'] = 'Použít Razor v2';
+$labels['usepyzor'] = 'Použít Pyzor';
+$labels['usebayes'] = 'Použít Bayesiánský klasifikátor';
+$labels['usedcc'] = 'Použít DCC';
+$labels['skiprblchecks'] = 'Použít RBL';
+$labels['spamreportsettings'] = 'Nastavení reportu';
+$labels['spamreport0'] = 'Zahrnout oznámení do hlavičky originální zprávy';
+$labels['spamreport1'] = 'Zahrnout originál jako MIME přílohu k oznámení';
+$labels['spamreport2'] = 'Zahrnout originál jako textovou přílohu k oznámení';
+$labels['spamaddressrules'] = 'Pravidla adres';
+$labels['whitelist_from'] = 'Příjmout zprávu od';
+$labels['blacklist_from'] = 'Odmítnout zprávu od';
+$labels['whitelist_to'] = 'Příjmat zprávy zaslané pro';
+$labels['addrule'] = 'Přidat';
+$labels['rule'] = 'Pravidlo';
+$labels['importfromaddressbook'] = 'Importovat adresy z adresáře';
+$labels['deleteall'] = 'Odstranit vše';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Výchozí hodnocení';
+$labels['otherscore'] = 'Ostatní (%s)';
+$labels['usedefault'] = 'Obnovit výchozí nastavení';
+$labels['langoptions'] = 'Jazyková nastavení';
+$labels['bayes'] = 'Nastaveni Bayes filtru';
+$labels['purgingbayes'] = 'Odstraňuji Bayesiánské data';
+$labels['purgebayes'] = 'Odstranit vlastní Bayesiánské data';
+$labels['bayesautolearn'] = 'Použít automatické učení Bayesiánského filtru';
+$labels['bayesautooptions'] = 'Nastavení automatického učení';
+$labels['bayesnonspam'] = 'Hranice pro be-spam';
+$labels['bayesspam'] = 'Hranice pro spam';
+$labels['bayesrules'] = 'Použít Bayesiánská pravidla';
+$labels['help'] = 'Nápověda';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Nastavení spamu bylo úspěšně změněno';
+$messages['sauserpreffailed'] = 'Chyba: Nastavení spamu se nepodařilo změnit';
+$messages['spamthresexp'] = 'Všechny maily se skóre vyšším, jako určená hranice budou označeny jako spam. Zvýšením této hranice sa zvýší počet nerozpoznaných spamů, na druhé straně sa sníží počet mailův chybně označených jako spam.';
+$messages['spamlangexp'] = 'Vyberte všechny jazyky ve kterých předpokladáte příjem e-mailů. Všetky přijaté zprávy napsané v jiných jazycích budou brány jako pravděpodobný spam.';
+$messages['headersexp'] = 'SpamAssassin přidává do kontrolovaných e-mailů hlavičky s informacemi o výsledcích kontroly. Použijte nasledující volby na jejich přizpůsobení.';
+$messages['spamtestssexp'] = 'Některé testy pri detekci spamu používají externí služby na internetu. Vyberte ty, které chcete využívat:';
+$messages['spamreport'] = 'Pokud je e-mail identifikovaný jako spam, vytvoří se report o všech testech a jejich dosáhnutém skóre...';
+$messages['autowhitelist'] = 'E-mailové adresy ve vašem Addresáři jsou automaticky přidány do listu "Příjmout zprávu od".';
+$messages['whitelistexp'] = 'V e-mailových adresách může byť použitý zástupný znak hvězdička (*). Např.: *@domena.cz or *@*.domena.cz.';
+$messages['spamaddressexists'] = 'Previdlo pro tuto adresu již existuje';
+$messages['spamenteraddress'] = 'Prosím zadajte adresu, kterou chcete přidat';
+$messages['spamaddresserror'] = 'Chyba: Adresa se jeví neplatná';
+$messages['spamaddressdelete'] = 'Jste si jisti, že chcete vymazat toto pravidlo?';
+$messages['spamaddressdeleteall'] = 'Jste si jisti, že chcete vymazae všechny pravidla?';
+$messages['noaddressrules'] = 'Nebyly nalezeny žádné pravidla adries.';
+$messages['importingaddresses'] = 'Importuji adresy ....';
+$messages['usedefaultconfirm'] = 'Jste si jisti, že chcete doopravdy obnovit předvolené nastavení? To vymaže všechny Vaše nastavení, včetně pravidel adres.';
+$messages['purgebayesexp'] = 'Vymaže osobní Bayesiánskou databázi vytvořenou z Vašich e-mailoů';
+$messages['bayesnonspamexp'] = 'E-maily s nižším skóre jak uvedená hranice budou použité na zlepšení detekce (naučení) nespamových zpráv.';
+$messages['bayesspamexp'] = 'E-maily s vyšším skóre jak uvedená hranice budou použité na zlepšení detekce (naučení) nespamových zpráv.';
+$messages['bayesautohelp'] = 'Pokud je automatické učení zapnuto, systém použije zprávy které s velkou jistotou prohlásí za spam/nespam na zlepšení detekčných filtrů.';
+$messages['bayeshelp'] = 'Bayesianský klasifikátor se snaží identifikovat spam podle slov, alebo shluku znaků, které sa obvykle vyskytují v spamových, alebo nespamových e-mailech.';
+$messages['rblhelp'] = 'IP adresy serverů v hlavičkách, nebo v odkazech v e-mailu budou vyhledané na něktorých blacklistech. Blacklisty jsou seznamy známých adres spammerů, které se aktualizují v reálném čase.';
+$messages['dcchelp'] = 'DCC, aneb distribuované výměnné centrum kontrolních součtů, je systém serverů sbírajících a vypočítavajících kontrolní součty (či podpisy) milionů e-mailů denně. Podle podobnosti kontrolního součtu příchozí zprávy vůči seznamu evidovaných se určuje pravděpodobnost spamu.';
+$messages['pyzhelp'] = 'Pyzor je síťový systém na detekci a blokování spamu pomocí přehledu zpráv. Přehledy sa vypočítavají několika způsoby tak, aby dokázaly tolerovat malou změnu v obsahu zprávy.';
+$messages['raz2help'] = 'Vipul\'s Razor je distribuovaná spolupracující síť na detekci a blokování spamu, pracující na základě užívateli zaslaných spamových vzorků. Tyto vzorky jsou zohledňovány podle reputace užívatele, který je poskytl. Detekcie se tvoří pomocí charakteristik, které efektívně zachytávají i měníací se obsah spamu.';
+$messages['raz1help'] = 'Vipul\'s Razor je distribuovaná spolupracující síť na detekci a blokování spamu, pracující na základě uživateľ zaslaných spamových vzorků. Tyto vzorky jsou zohledňovány podle reputace uživatele, který je poskytl. Detekcie sa tvoří pomocí charakteristík, které efektivně zachytávají i měnící se obsah spamu. Verzie 1 byla nahrzena verzí 2 a není už nadále podporována.';
+$messages['levelhelp'] = 'Hlavička \'Spam Level\' zobrazuje opakovaním znaku (např. hvezdičky) skóre, které kontrolovaný e-mail získal. To může být užitečné při dalším zpracování e-mailu.';
+$messages['foldhelp'] = 'Mohou být hlavičky přidané do e-mailu SpamAssassinem rozdělené na víc řádků, namísto toho, aby byly na jednom velmi dlouhém řádku? Pokud je řádek rozdělený, jeho pokračování je označeno odsazením.';
+$messages['bayesruleshlp'] = 'Předtím, než může byt Bayesovský klasifikátor efektívně použit, musí se natrénovat správně rozeznávat spam od nespamu. Vypnutím Bayesiánskych pravidel umožníte systému učit se z přicházejícich e-mailů, ale nebude se používat na detekci spamu..';
+$messages['purgebayesconfirm'] = 'Jste si jisti, že chcete doopravdy vymazat celou Vaši Bayesiánskou databázi?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/de_CH.inc b/plugins/sauserprefs/localization/de_CH.inc
new file mode 100644
index 000000000..00cd54ffb
--- /dev/null
+++ b/plugins/sauserprefs/localization/de_CH.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Simon Tauber */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Verwalten der Spamfilter-Einstellungen';
+$labels['sauserprefssettings'] = 'Spam Einstellungen';
+$labels['spamgeneralsettings'] = 'Generelle Einstellugen';
+$labels['spamthres'] = 'Schwellenwert';
+$labels['spamsubject'] = 'Spam Betreff';
+$labels['spamsubjectblank'] = '(Leer lassen um zu deaktivieren)';
+$labels['spamlang'] = 'Mitteilungssprache';
+$labels['enabled'] = 'Aktiviert';
+$labels['disabled'] = 'Deaktiviert';
+$labels['headers'] = 'Mitteilungsheaders';
+$labels['foldheaders'] = 'Mehrzeilige Header erlauben';
+$labels['spamlevelstars'] = '\'Spam Level\' Header verwenden';
+$labels['spamlevelchar'] = 'Spam Level Symbol';
+$labels['spamtests'] = 'Internet basierter Spam Test';
+$labels['userazor1'] = 'Razor v1 verwenden';
+$labels['userazor2'] = 'Razor v2 verwenden';
+$labels['usepyzor'] = 'Pyzor verwenden';
+$labels['usebayes'] = 'Naive Bayesische Stil Klassifizierung';
+$labels['usedcc'] = 'DCC verwenden';
+$labels['skiprblchecks'] = 'Echtzeit Blackhole Liste verwenden';
+$labels['spamreportsettings'] = 'Berichtseinstellungen';
+$labels['spamreport0'] = 'Bericht in den Header der Orginalnachricht einfügen';
+$labels['spamreport1'] = 'Orginalmeldung dem Bericht als MIME Anhang hinzufügen';
+$labels['spamreport2'] = 'Orginalmeldung dem Bericht als Text Anhang hinzufügen';
+$labels['spamaddressrules'] = 'Addressregeln';
+$labels['whitelist_from'] = 'Mails akzeptieren von';
+$labels['blacklist_from'] = 'Mails ablehnen von';
+$labels['whitelist_to'] = 'Akzeptiere Mails gesendet an';
+$labels['addrule'] = 'Regel hinzufügen';
+$labels['rule'] = 'Regel';
+$labels['importfromaddressbook'] = 'Adressen aus dem Adressbuch importieren';
+$labels['deleteall'] = 'Alle löschen';
+$labels['autoscore'] = 'Automatisch';
+$labels['defaultscore'] = 'Standardscore';
+$labels['otherscore'] = 'Andere (%s)';
+$labels['usedefault'] = 'Standardscore wiederherstellen';
+$labels['langoptions'] = 'Sprachoptionen';
+$labels['bayes'] = 'Bayes Einstellungen';
+$labels['purgingbayes'] = 'Lösche bayesische Daten...';
+$labels['purgebayes'] = 'Lösche persönliche bayesische Daten';
+$labels['bayesautolearn'] = 'Bayes auto-lernen verwenden';
+$labels['bayesautooptions'] = 'Auto-lernen Optionen';
+$labels['bayesnonspam'] = '"Kein Spam" Schwellenwert';
+$labels['bayesspam'] = '"Spam" Schwellenwert';
+$labels['bayesrules'] = 'Bayesische Regeln verwenden';
+$labels['help'] = 'Hilfe';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Spam Einstellungen erfolgreich geändert';
+$messages['sauserpreffailed'] = 'Fehler: Spam-Einstellungen konnten nicht geändert werden';
+$messages['spamthresexp'] = 'Alles über dem Schwellenwert wird als Spam markiert. Erhöhen des Schwellenwerts minimiert die verpassten Meldungen, aber erhöht die Möglichkeit der falschen Einstufung.';
+$messages['spamlangexp'] = 'Wählen Sie alle Sprachen in denen Mails empfangen werden sollen. Alle nicht ausgewählten Sprachen werden als möglicher Spam markiert.';
+$messages['headersexp'] = 'SpamAssassin fügt den verarbeiteten Mitteilungen Header mit Informationen über das Ergebnis zu. Verwende folgende Optionen um diese Header zu konfigurieren.';
+$messages['spamtestssexp'] = 'Einige Checks verwenden Internet-baiserte Dienste um Spam besser identifizieren zu können. Wählen Sie, welche verwendet werden sollen:';
+$messages['spamreport'] = 'Wird eine Mail als Spam identifiziert werden Berichte aller zugewiesenen Tests und Scores hinzugefügt...';
+$messages['autowhitelist'] = 'Email Adressen aus dem Adressbuch werden automatisch zu der "Whitelist" hinzugefügt.';
+$messages['whitelistexp'] = 'Ein (*) kann als Wildcard verwendet werden. Zum Beispiel: *@example.com oder *@*.example.com.';
+$messages['spamaddressexists'] = 'Es existiert bereits eine Regel für diese Adresse';
+$messages['spamenteraddress'] = 'Bitte eine hinzuzufügende Adresse eingeben';
+$messages['spamaddresserror'] = 'Fehler: Die Adresse scheint ungültig zu sein';
+$messages['spamaddressdelete'] = 'Sind Sie sicher, dass Sie diese Regel löschen möchten?';
+$messages['spamaddressdeleteall'] = 'Sind Sie sicher, dass Sie alle Adressregeln löschen möchten?';
+$messages['noaddressrules'] = 'Keine Adressregel gefunden.';
+$messages['importingaddresses'] = 'Adressen werden importiert...';
+$messages['usedefaultconfirm'] = 'Sind Sie sicher, dass Sie die Standardeinstellungen wiederherstellen möchten? Alle Einstellungen inklusive Adressregeln werden gelöscht.';
+$messages['purgebayesexp'] = 'Gesammelte persönliche Bayesische Daten Ihrer Mails löschen.';
+$messages['bayesnonspamexp'] = 'Mittelungen, deren Score unter diesem Schwellenwert liegen, werden verwendet um die "Ham" Erkennung zu verbessern.';
+$messages['bayesspamexp'] = 'Mittelungen, deren Score über diesem Schwellenwert liegen, werden verwendet um die Spam-Erkennung zu verbessern.';
+$messages['bayesautohelp'] = 'Wenn Bayes auto-lernen aktiviert ist, verwendet das System Mitteilungen die höchstwarscheinlich Spam/Ham sind um die Erkennungsfilter zu verbessern..';
+$messages['bayeshelp'] = 'Die bayesische Klassifizierung versucht Spam anhand bekannter Wortfolgen zu identifizieren, die in Spam/Ham Mitteilungen gefunden wurde.';
+$messages['rblhelp'] = 'Die Serveradressen der hypertext links einer Mitteilung werden mit Blacklists oder Listen bekannter Spamquellen verglichen.';
+$messages['dcchelp'] = 'DCC (Distributed Checksum Clearinghouse) ist ein System aus Servern die Cheksummen von millionen von Mails sammeln und zählen. Dies Werte können verwendet werden um Spam zu erkennen.';
+$messages['pyzhelp'] = 'Pyzor ist ein kollaboratives, vernetztes System, um Spam anhand eines Auszugs einer Mitteilung zu erkennen und zu blocken.';
+$messages['raz2help'] = 'Vipul\'s Razor ist ein Prüfsummen-basiertes, verteiltes, gemeinschaftliches E-Mail-Spam-Erkennungs- und -Filter-Netzwerk. Razor basiert auf einem verteilten Spam-Katalog, der durch Benutzerrückmeldungen ständig aktualisiert wird. E-Mail-Clients und -Server können so bekannten Spam filtern. Die Erkennung erfolgt über statistische und randomisierte Signaturen.';
+$messages['raz1help'] = 'Vipul\'s Razor ist ein Prüfsummen-basiertes, verteiltes, gemeinschaftliches E-Mail-Spam-Erkennungs- und -Filter-Netzwerk. Razor basiert auf einem verteilten Spam-Katalog, der durch Benutzerrückmeldungen ständig aktualisiert wird. E-Mail-Clients und -Server können so bekannten Spam filtern. Die Erkennung erfolgt über statistische und randomisierte Signaturen.';
+$messages['levelhelp'] = 'Der \'Spam Level\' Header kann Mitteilungen anhand von Zeichen, die sich eine bestimmte Anzahl mal wiederhohlen, hinzugefügt werden.';
+$messages['foldhelp'] = 'Standardmäßig werden Header, die von SpamAssasin hinzugefügt werden, "whitespace foled". In anderen Worten: Sie werden auf mehrere Zeilen verteilt anstelle von einer sehr langen Zeile. Jeder andere Zeile wird ein Tabulator vorgesetzt um es als eine weiterführende Zeile der Vorhergehenden zu markieren.';
+$messages['bayesruleshlp'] = 'Es empfiehlt sich, die "naive bayesische Stil Klassifizierung" zu verwenden. Damit können auch die Regeln deaktiviert werden auch wenn das automatisch und manuelle Lernen aktiviert ist.';
+$messages['purgebayesconfirm'] = 'Sind Sie sicher, dass Sie alle bayesischen Daten löschen möchten?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/de_DE.inc b/plugins/sauserprefs/localization/de_DE.inc
new file mode 100644
index 000000000..00cd54ffb
--- /dev/null
+++ b/plugins/sauserprefs/localization/de_DE.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Simon Tauber */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Verwalten der Spamfilter-Einstellungen';
+$labels['sauserprefssettings'] = 'Spam Einstellungen';
+$labels['spamgeneralsettings'] = 'Generelle Einstellugen';
+$labels['spamthres'] = 'Schwellenwert';
+$labels['spamsubject'] = 'Spam Betreff';
+$labels['spamsubjectblank'] = '(Leer lassen um zu deaktivieren)';
+$labels['spamlang'] = 'Mitteilungssprache';
+$labels['enabled'] = 'Aktiviert';
+$labels['disabled'] = 'Deaktiviert';
+$labels['headers'] = 'Mitteilungsheaders';
+$labels['foldheaders'] = 'Mehrzeilige Header erlauben';
+$labels['spamlevelstars'] = '\'Spam Level\' Header verwenden';
+$labels['spamlevelchar'] = 'Spam Level Symbol';
+$labels['spamtests'] = 'Internet basierter Spam Test';
+$labels['userazor1'] = 'Razor v1 verwenden';
+$labels['userazor2'] = 'Razor v2 verwenden';
+$labels['usepyzor'] = 'Pyzor verwenden';
+$labels['usebayes'] = 'Naive Bayesische Stil Klassifizierung';
+$labels['usedcc'] = 'DCC verwenden';
+$labels['skiprblchecks'] = 'Echtzeit Blackhole Liste verwenden';
+$labels['spamreportsettings'] = 'Berichtseinstellungen';
+$labels['spamreport0'] = 'Bericht in den Header der Orginalnachricht einfügen';
+$labels['spamreport1'] = 'Orginalmeldung dem Bericht als MIME Anhang hinzufügen';
+$labels['spamreport2'] = 'Orginalmeldung dem Bericht als Text Anhang hinzufügen';
+$labels['spamaddressrules'] = 'Addressregeln';
+$labels['whitelist_from'] = 'Mails akzeptieren von';
+$labels['blacklist_from'] = 'Mails ablehnen von';
+$labels['whitelist_to'] = 'Akzeptiere Mails gesendet an';
+$labels['addrule'] = 'Regel hinzufügen';
+$labels['rule'] = 'Regel';
+$labels['importfromaddressbook'] = 'Adressen aus dem Adressbuch importieren';
+$labels['deleteall'] = 'Alle löschen';
+$labels['autoscore'] = 'Automatisch';
+$labels['defaultscore'] = 'Standardscore';
+$labels['otherscore'] = 'Andere (%s)';
+$labels['usedefault'] = 'Standardscore wiederherstellen';
+$labels['langoptions'] = 'Sprachoptionen';
+$labels['bayes'] = 'Bayes Einstellungen';
+$labels['purgingbayes'] = 'Lösche bayesische Daten...';
+$labels['purgebayes'] = 'Lösche persönliche bayesische Daten';
+$labels['bayesautolearn'] = 'Bayes auto-lernen verwenden';
+$labels['bayesautooptions'] = 'Auto-lernen Optionen';
+$labels['bayesnonspam'] = '"Kein Spam" Schwellenwert';
+$labels['bayesspam'] = '"Spam" Schwellenwert';
+$labels['bayesrules'] = 'Bayesische Regeln verwenden';
+$labels['help'] = 'Hilfe';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Spam Einstellungen erfolgreich geändert';
+$messages['sauserpreffailed'] = 'Fehler: Spam-Einstellungen konnten nicht geändert werden';
+$messages['spamthresexp'] = 'Alles über dem Schwellenwert wird als Spam markiert. Erhöhen des Schwellenwerts minimiert die verpassten Meldungen, aber erhöht die Möglichkeit der falschen Einstufung.';
+$messages['spamlangexp'] = 'Wählen Sie alle Sprachen in denen Mails empfangen werden sollen. Alle nicht ausgewählten Sprachen werden als möglicher Spam markiert.';
+$messages['headersexp'] = 'SpamAssassin fügt den verarbeiteten Mitteilungen Header mit Informationen über das Ergebnis zu. Verwende folgende Optionen um diese Header zu konfigurieren.';
+$messages['spamtestssexp'] = 'Einige Checks verwenden Internet-baiserte Dienste um Spam besser identifizieren zu können. Wählen Sie, welche verwendet werden sollen:';
+$messages['spamreport'] = 'Wird eine Mail als Spam identifiziert werden Berichte aller zugewiesenen Tests und Scores hinzugefügt...';
+$messages['autowhitelist'] = 'Email Adressen aus dem Adressbuch werden automatisch zu der "Whitelist" hinzugefügt.';
+$messages['whitelistexp'] = 'Ein (*) kann als Wildcard verwendet werden. Zum Beispiel: *@example.com oder *@*.example.com.';
+$messages['spamaddressexists'] = 'Es existiert bereits eine Regel für diese Adresse';
+$messages['spamenteraddress'] = 'Bitte eine hinzuzufügende Adresse eingeben';
+$messages['spamaddresserror'] = 'Fehler: Die Adresse scheint ungültig zu sein';
+$messages['spamaddressdelete'] = 'Sind Sie sicher, dass Sie diese Regel löschen möchten?';
+$messages['spamaddressdeleteall'] = 'Sind Sie sicher, dass Sie alle Adressregeln löschen möchten?';
+$messages['noaddressrules'] = 'Keine Adressregel gefunden.';
+$messages['importingaddresses'] = 'Adressen werden importiert...';
+$messages['usedefaultconfirm'] = 'Sind Sie sicher, dass Sie die Standardeinstellungen wiederherstellen möchten? Alle Einstellungen inklusive Adressregeln werden gelöscht.';
+$messages['purgebayesexp'] = 'Gesammelte persönliche Bayesische Daten Ihrer Mails löschen.';
+$messages['bayesnonspamexp'] = 'Mittelungen, deren Score unter diesem Schwellenwert liegen, werden verwendet um die "Ham" Erkennung zu verbessern.';
+$messages['bayesspamexp'] = 'Mittelungen, deren Score über diesem Schwellenwert liegen, werden verwendet um die Spam-Erkennung zu verbessern.';
+$messages['bayesautohelp'] = 'Wenn Bayes auto-lernen aktiviert ist, verwendet das System Mitteilungen die höchstwarscheinlich Spam/Ham sind um die Erkennungsfilter zu verbessern..';
+$messages['bayeshelp'] = 'Die bayesische Klassifizierung versucht Spam anhand bekannter Wortfolgen zu identifizieren, die in Spam/Ham Mitteilungen gefunden wurde.';
+$messages['rblhelp'] = 'Die Serveradressen der hypertext links einer Mitteilung werden mit Blacklists oder Listen bekannter Spamquellen verglichen.';
+$messages['dcchelp'] = 'DCC (Distributed Checksum Clearinghouse) ist ein System aus Servern die Cheksummen von millionen von Mails sammeln und zählen. Dies Werte können verwendet werden um Spam zu erkennen.';
+$messages['pyzhelp'] = 'Pyzor ist ein kollaboratives, vernetztes System, um Spam anhand eines Auszugs einer Mitteilung zu erkennen und zu blocken.';
+$messages['raz2help'] = 'Vipul\'s Razor ist ein Prüfsummen-basiertes, verteiltes, gemeinschaftliches E-Mail-Spam-Erkennungs- und -Filter-Netzwerk. Razor basiert auf einem verteilten Spam-Katalog, der durch Benutzerrückmeldungen ständig aktualisiert wird. E-Mail-Clients und -Server können so bekannten Spam filtern. Die Erkennung erfolgt über statistische und randomisierte Signaturen.';
+$messages['raz1help'] = 'Vipul\'s Razor ist ein Prüfsummen-basiertes, verteiltes, gemeinschaftliches E-Mail-Spam-Erkennungs- und -Filter-Netzwerk. Razor basiert auf einem verteilten Spam-Katalog, der durch Benutzerrückmeldungen ständig aktualisiert wird. E-Mail-Clients und -Server können so bekannten Spam filtern. Die Erkennung erfolgt über statistische und randomisierte Signaturen.';
+$messages['levelhelp'] = 'Der \'Spam Level\' Header kann Mitteilungen anhand von Zeichen, die sich eine bestimmte Anzahl mal wiederhohlen, hinzugefügt werden.';
+$messages['foldhelp'] = 'Standardmäßig werden Header, die von SpamAssasin hinzugefügt werden, "whitespace foled". In anderen Worten: Sie werden auf mehrere Zeilen verteilt anstelle von einer sehr langen Zeile. Jeder andere Zeile wird ein Tabulator vorgesetzt um es als eine weiterführende Zeile der Vorhergehenden zu markieren.';
+$messages['bayesruleshlp'] = 'Es empfiehlt sich, die "naive bayesische Stil Klassifizierung" zu verwenden. Damit können auch die Regeln deaktiviert werden auch wenn das automatisch und manuelle Lernen aktiviert ist.';
+$messages['purgebayesconfirm'] = 'Sind Sie sicher, dass Sie alle bayesischen Daten löschen möchten?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/en_GB.inc b/plugins/sauserprefs/localization/en_GB.inc
new file mode 100644
index 000000000..6c500af9f
--- /dev/null
+++ b/plugins/sauserprefs/localization/en_GB.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Manage spam detection settings';
+$labels['sauserprefssettings'] = 'Spam settings';
+$labels['spamgeneralsettings'] = 'General Settings';
+$labels['spamthres'] = 'Score threshold';
+$labels['spamsubject'] = 'Subject tag';
+$labels['spamsubjectblank'] = '(leave blank for none)';
+$labels['spamlang'] = 'Message languages';
+$labels['enabled'] = 'Enabled';
+$labels['disabled'] = 'Disabled';
+$labels['headers'] = 'Message Headers';
+$labels['foldheaders'] = 'Allow multiple lines in headers';
+$labels['spamlevelstars'] = 'Use \'Spam Level\' header';
+$labels['spamlevelchar'] = 'Spam level character';
+$labels['spamtests'] = 'Internet Based Spam Tests';
+$labels['userazor1'] = 'Use Razor v1';
+$labels['userazor2'] = 'Use Razor v2';
+$labels['usepyzor'] = 'Use Pyzor';
+$labels['usebayes'] = 'Use Bayesian style classifier';
+$labels['usedcc'] = 'Use DCC';
+$labels['skiprblchecks'] = 'Use Realtime Blackhole List';
+$labels['spamreportsettings'] = 'Report Settings';
+$labels['spamreport0'] = 'Include report in headers of original message';
+$labels['spamreport1'] = 'Include original as MIME attachment to report';
+$labels['spamreport2'] = 'Include original as text-only attachment to report';
+$labels['spamaddressrules'] = 'Address Rules';
+$labels['whitelist_from'] = 'Accept Mail From';
+$labels['blacklist_from'] = 'Reject Mail From';
+$labels['whitelist_to'] = 'Accept Mail Sent To';
+$labels['addrule'] = 'Add Rule';
+$labels['rule'] = 'Rule';
+$labels['importfromaddressbook'] = 'Import addresses from Address Book';
+$labels['deleteall'] = 'Delete All';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Default Score';
+$labels['otherscore'] = 'Other (%s)';
+$labels['usedefault'] = 'Restore Default Settings';
+$labels['langoptions'] = 'Language Options';
+$labels['bayes'] = 'Bayes Settings';
+$labels['purgingbayes'] = 'Deleting Bayesian data...';
+$labels['purgebayes'] = 'Delete personal Bayesian data';
+$labels['bayesautolearn'] = 'Use Bayes auto learn';
+$labels['bayesautooptions'] = 'Auto learn options';
+$labels['bayesnonspam'] = 'Non spam threshold';
+$labels['bayesspam'] = 'Spam threshold';
+$labels['bayesrules'] = 'Use Baysian rules';
+$labels['help'] = 'Help';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Successfully changed spam settings';
+$messages['sauserpreffailed'] = 'Error: Cannot change spam settings';
+$messages['spamthresexp'] = 'Anything above the threshold is marked as spam. Increasing this threshold will increase the amount of spam missed, but will reduce the risk of false positives.';
+$messages['spamlangexp'] = 'Select all the languages you expect to receive e-mail in. Any messages received that are written in non selected languages will be treated as possible spam.';
+$messages['headersexp'] = 'SpamAssassin adds headers to processed messages providing information about the results. Use the options below to configure these headers.';
+$messages['spamtestssexp'] = 'Some checks use internet based services to help identify spam. Select the ones you wish to use:';
+$messages['spamreport'] = 'When a message is identified as spam a report of all tests and scores assigned is created...';
+$messages['autowhitelist'] = 'Email addresses in your Address Book are automatically added to the \'Accept Mail From\' list.';
+$messages['whitelistexp'] = 'An asterisk (*) can be used as a wild card for greater flexibility. For example: *@example.com or *@*.example.com.';
+$messages['spamaddressexists'] = 'A rule already exists for this address';
+$messages['spamenteraddress'] = 'Please enter an address to add';
+$messages['spamaddresserror'] = 'Error: Address appears invalid';
+$messages['spamaddressdelete'] = 'Are you sure you want to delete this rule?';
+$messages['spamaddressdeleteall'] = 'Are you sure you want to delete all address rules?';
+$messages['noaddressrules'] = 'No address rules found.';
+$messages['importingaddresses'] = 'Importing addresses...';
+$messages['usedefaultconfirm'] = 'Are you sure you want to restore the default settings? This will delete all your settings, including your address rules.';
+$messages['purgebayesexp'] = 'Delete personal Bayesian data collected from your email';
+$messages['bayesnonspamexp'] = 'Messages which score below this threshold will be used to improve the systems detection of non spam messages.';
+$messages['bayesspamexp'] = 'Messages which score above this threshold will be used to improve the systems detection of spam messages.';
+$messages['bayesautohelp'] = 'When Bayes auto learn is enabled the system will automatically process messages which are very likely to be spam/non spam and use the information from those to improve the detection filters.';
+$messages['bayeshelp'] = 'The Bayesian classifier tries to identify spam by looking at words or short character sequences that are commonly found in spam or non spam messages.';
+$messages['rblhelp'] = 'Server addresses found in hypertext links in a message will be checked against several \'blacklists\' or lists of known spam sources.';
+$messages['dcchelp'] = 'The DCC or Distributed Checksum Clearinghouse is a system of servers collecting and counting checksums (or signatures) of millions of mail messages every day. The greater the similarity the checksum of an incoming message has to the list the more likely it is to be spam.';
+$messages['pyzhelp'] = 'Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages. The digests are generated in a number of different ways to allow for small differences in the content of the message.';
+$messages['raz2help'] = 'Vipul\'s Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content. The spam reports are validated through reputation assignments given to each reporter.';
+$messages['raz1help'] = 'Vipul\'s Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content. The spam reports are validated through reputation assignments given to each reporter. Version 1 has now been replaced by version 2 and is no longer supported.';
+$messages['levelhelp'] = 'The \'Spam Level\' header can be added to a message to indicate the score given to a message by repeating the character specified that many times. This may be useful for further processing of the message.';
+$messages['foldhelp'] = 'Should headers added by SpamAssassin will be wrapped? In other words, should they be broken up into multiple lines instead of one very long one. When a line is broken it will be indented to mark it as a continuation of the preceding one.';
+$messages['bayesruleshlp'] = 'Before the Bayesian-style classifier can be used effectively it must be "trained" to properly detect spam/non spam messages. Disabling the Bayesian rules allows the system to continue to learn both automatically and manually from incoming mail but it will not be used to detect spam.';
+$messages['purgebayesconfirm'] = 'Are you sure delete all your Bayesian data?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/en_US.inc b/plugins/sauserprefs/localization/en_US.inc
new file mode 100644
index 000000000..6c500af9f
--- /dev/null
+++ b/plugins/sauserprefs/localization/en_US.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Manage spam detection settings';
+$labels['sauserprefssettings'] = 'Spam settings';
+$labels['spamgeneralsettings'] = 'General Settings';
+$labels['spamthres'] = 'Score threshold';
+$labels['spamsubject'] = 'Subject tag';
+$labels['spamsubjectblank'] = '(leave blank for none)';
+$labels['spamlang'] = 'Message languages';
+$labels['enabled'] = 'Enabled';
+$labels['disabled'] = 'Disabled';
+$labels['headers'] = 'Message Headers';
+$labels['foldheaders'] = 'Allow multiple lines in headers';
+$labels['spamlevelstars'] = 'Use \'Spam Level\' header';
+$labels['spamlevelchar'] = 'Spam level character';
+$labels['spamtests'] = 'Internet Based Spam Tests';
+$labels['userazor1'] = 'Use Razor v1';
+$labels['userazor2'] = 'Use Razor v2';
+$labels['usepyzor'] = 'Use Pyzor';
+$labels['usebayes'] = 'Use Bayesian style classifier';
+$labels['usedcc'] = 'Use DCC';
+$labels['skiprblchecks'] = 'Use Realtime Blackhole List';
+$labels['spamreportsettings'] = 'Report Settings';
+$labels['spamreport0'] = 'Include report in headers of original message';
+$labels['spamreport1'] = 'Include original as MIME attachment to report';
+$labels['spamreport2'] = 'Include original as text-only attachment to report';
+$labels['spamaddressrules'] = 'Address Rules';
+$labels['whitelist_from'] = 'Accept Mail From';
+$labels['blacklist_from'] = 'Reject Mail From';
+$labels['whitelist_to'] = 'Accept Mail Sent To';
+$labels['addrule'] = 'Add Rule';
+$labels['rule'] = 'Rule';
+$labels['importfromaddressbook'] = 'Import addresses from Address Book';
+$labels['deleteall'] = 'Delete All';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Default Score';
+$labels['otherscore'] = 'Other (%s)';
+$labels['usedefault'] = 'Restore Default Settings';
+$labels['langoptions'] = 'Language Options';
+$labels['bayes'] = 'Bayes Settings';
+$labels['purgingbayes'] = 'Deleting Bayesian data...';
+$labels['purgebayes'] = 'Delete personal Bayesian data';
+$labels['bayesautolearn'] = 'Use Bayes auto learn';
+$labels['bayesautooptions'] = 'Auto learn options';
+$labels['bayesnonspam'] = 'Non spam threshold';
+$labels['bayesspam'] = 'Spam threshold';
+$labels['bayesrules'] = 'Use Baysian rules';
+$labels['help'] = 'Help';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Successfully changed spam settings';
+$messages['sauserpreffailed'] = 'Error: Cannot change spam settings';
+$messages['spamthresexp'] = 'Anything above the threshold is marked as spam. Increasing this threshold will increase the amount of spam missed, but will reduce the risk of false positives.';
+$messages['spamlangexp'] = 'Select all the languages you expect to receive e-mail in. Any messages received that are written in non selected languages will be treated as possible spam.';
+$messages['headersexp'] = 'SpamAssassin adds headers to processed messages providing information about the results. Use the options below to configure these headers.';
+$messages['spamtestssexp'] = 'Some checks use internet based services to help identify spam. Select the ones you wish to use:';
+$messages['spamreport'] = 'When a message is identified as spam a report of all tests and scores assigned is created...';
+$messages['autowhitelist'] = 'Email addresses in your Address Book are automatically added to the \'Accept Mail From\' list.';
+$messages['whitelistexp'] = 'An asterisk (*) can be used as a wild card for greater flexibility. For example: *@example.com or *@*.example.com.';
+$messages['spamaddressexists'] = 'A rule already exists for this address';
+$messages['spamenteraddress'] = 'Please enter an address to add';
+$messages['spamaddresserror'] = 'Error: Address appears invalid';
+$messages['spamaddressdelete'] = 'Are you sure you want to delete this rule?';
+$messages['spamaddressdeleteall'] = 'Are you sure you want to delete all address rules?';
+$messages['noaddressrules'] = 'No address rules found.';
+$messages['importingaddresses'] = 'Importing addresses...';
+$messages['usedefaultconfirm'] = 'Are you sure you want to restore the default settings? This will delete all your settings, including your address rules.';
+$messages['purgebayesexp'] = 'Delete personal Bayesian data collected from your email';
+$messages['bayesnonspamexp'] = 'Messages which score below this threshold will be used to improve the systems detection of non spam messages.';
+$messages['bayesspamexp'] = 'Messages which score above this threshold will be used to improve the systems detection of spam messages.';
+$messages['bayesautohelp'] = 'When Bayes auto learn is enabled the system will automatically process messages which are very likely to be spam/non spam and use the information from those to improve the detection filters.';
+$messages['bayeshelp'] = 'The Bayesian classifier tries to identify spam by looking at words or short character sequences that are commonly found in spam or non spam messages.';
+$messages['rblhelp'] = 'Server addresses found in hypertext links in a message will be checked against several \'blacklists\' or lists of known spam sources.';
+$messages['dcchelp'] = 'The DCC or Distributed Checksum Clearinghouse is a system of servers collecting and counting checksums (or signatures) of millions of mail messages every day. The greater the similarity the checksum of an incoming message has to the list the more likely it is to be spam.';
+$messages['pyzhelp'] = 'Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages. The digests are generated in a number of different ways to allow for small differences in the content of the message.';
+$messages['raz2help'] = 'Vipul\'s Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content. The spam reports are validated through reputation assignments given to each reporter.';
+$messages['raz1help'] = 'Vipul\'s Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content. The spam reports are validated through reputation assignments given to each reporter. Version 1 has now been replaced by version 2 and is no longer supported.';
+$messages['levelhelp'] = 'The \'Spam Level\' header can be added to a message to indicate the score given to a message by repeating the character specified that many times. This may be useful for further processing of the message.';
+$messages['foldhelp'] = 'Should headers added by SpamAssassin will be wrapped? In other words, should they be broken up into multiple lines instead of one very long one. When a line is broken it will be indented to mark it as a continuation of the preceding one.';
+$messages['bayesruleshlp'] = 'Before the Bayesian-style classifier can be used effectively it must be "trained" to properly detect spam/non spam messages. Disabling the Bayesian rules allows the system to continue to learn both automatically and manually from incoming mail but it will not be used to detect spam.';
+$messages['purgebayesconfirm'] = 'Are you sure delete all your Bayesian data?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/es_ES.inc b/plugins/sauserprefs/localization/es_ES.inc
new file mode 100644
index 000000000..26dcb63d1
--- /dev/null
+++ b/plugins/sauserprefs/localization/es_ES.inc
@@ -0,0 +1,85 @@
+<?php
+/* Author: Joan Riera Pol */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['sauserprefssettings'] = 'Preferencias de Spam';
+$labels['spamgeneralsettings'] = 'Preferencias Generales';
+$labels['spamthres'] = 'Margen de puntuación';
+$labels['spamsubject'] = 'Etiqueta del asunto';
+$labels['spamsubjectblank'] = '(dejar en blanco para ninguna)';
+$labels['spamlang'] = 'Idiomas de mensaje';
+$labels['enabled'] = 'Habilitado';
+$labels['disabled'] = 'Deshabilitado';
+$labels['headers'] = 'Cabecera de mensajes';
+$labels['foldheaders'] = 'Permitir múltiples líneas en cabecera';
+$labels['spamlevelstars'] = 'Usar \'nivel de spam\' en cabecera';
+$labels['spamlevelchar'] = 'Caracter para el nivel de spam';
+$labels['spamtests'] = 'Pruebas de Spam basadas en Internet';
+$labels['userazor1'] = 'Usar Razor v1';
+$labels['userazor2'] = 'Usar Razor v2';
+$labels['usepyzor'] = 'Usar Pyzor';
+$labels['usebayes'] = 'Usar clasificador de estilo Bayesian';
+$labels['usedcc'] = 'Usar DCC';
+$labels['skiprblchecks'] = 'Usar lista negra en tiempo real';
+$labels['spamreportsettings'] = 'Preferencias de informes';
+$labels['spamreport0'] = 'Incluir informe en la cabecera del mensaje original';
+$labels['spamreport1'] = 'Incluir original como adjunto MIME al informe';
+$labels['spamreport2'] = 'Incluir al informe el original como adjunto de sólo texto';
+$labels['spamaddressrules'] = 'Reglas de direcciones';
+$labels['whitelist_from'] = 'Aceptar correos de';
+$labels['blacklist_from'] = 'Rechazar correos de';
+$labels['whitelist_to'] = 'Aceptar correos mandados a';
+$labels['addrule'] = 'Añadir regla';
+$labels['rule'] = 'Regla';
+$labels['importfromaddressbook'] = 'Importar direcciones desde el la lista de contactos';
+$labels['deleteall'] = 'Eliminar todos';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Puntuación por defecto';
+$labels['otherscore'] = 'Otro (%s)';
+$labels['usedefault'] = 'Restaurar preferencias por defecto';
+$labels['langoptions'] = 'Opciones de idioma';
+$labels['bayes'] = 'Preferencias Bayesianas';
+$labels['purgingbayes'] = 'Eliminando datos Bayesianos...';
+$labels['purgebayes'] = 'Eliminar datos personales Bayesianos';
+$labels['bayesautolearn'] = 'Utilizar autoaprendizaje Bayes';
+$labels['bayesautooptions'] = 'Opciones de autoaprendizaje';
+$labels['bayesnonspam'] = 'Sin umbral de spam';
+$labels['bayesspam'] = 'Umbral de Spam';
+$labels['bayesrules'] = 'Usar reglas Bayesianas';
+$labels['help'] = 'Ayuda';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Preferencias de spam modificadas';
+$messages['sauserpreffailed'] = 'Error: No se han podido modificar las preferencias de spam';
+$messages['spamthresexp'] = 'Cualquier correo por encima del umbral será marcado como spam. Ampliando este umbral se incrementará la cantidad de spam no filtrado, pero reducirá el riesgo de falsos positivos.';
+$messages['spamlangexp'] = 'Selecciona los idiomas en los que esperas recibir los correos. Cualquier mensaje recibido escrito en cualquiera de los idiomas no seleccionados será tratado como posible spam.';
+$messages['headersexp'] = 'SpamAssassin añade cabeceras a mensajes procesados proporcionando información sobre los resultados. Usar las opciones inferiores para configurar estas cabeceras.';
+$messages['spamtestssexp'] = 'Algunas comprobaciones utilizan servicios en red para ayudar a identificar spam. Selecciona los que deseas utilizar:';
+$messages['spamreport'] = 'Cuando un mensaje es identificado como spam se creará un reporte de las pruebas y las puntuaciones asignadas...';
+$messages['autowhitelist'] = 'Las cuentas de correo en tu lista de contactos son añadidas de forma automática a la lista \'Aceptar correos de\'.';
+$messages['whitelistexp'] = 'Un asterisco (*) puede ser utilizado como wildcard para mayor flexibilidad. Por ejemplo: *@ejemplo.com o *@*.ejemplo.com.';
+$messages['spamaddressexists'] = 'Ya existe una regla para esta dirección';
+$messages['spamenteraddress'] = 'Por favor, introduce una dirección a añadir';
+$messages['spamaddresserror'] = 'Error: La dirección parece errónea';
+$messages['spamaddressdelete'] = '¿Estás seguro de eliminar esta regla?';
+$messages['spamaddressdeleteall'] = '¿Estás seguro de eliminar todas las reglas?';
+$messages['noaddressrules'] = 'No se han encontrado reglas.';
+$messages['importingaddresses'] = 'Importando direcciones...';
+$messages['usedefaultconfirm'] = '¿Estás seguro de querer restaurar las preferencias por defecto? Esto eliminará todas tus preferencias, incluyendo tus reglas de direcciones.';
+$messages['purgebayesexp'] = 'Eliminar datos Bayesianos personales recolectados de tu correo';
+$messages['bayesnonspamexp'] = 'Mensajes con puntuación menor al umbral será utilizado para mejorar los sistemas de detección de correos que no son spam.';
+$messages['bayesspamexp'] = 'Mensajes con puntuación superior al umbral serán utilizados para mejorar los sistemas de detección de correos no deseados.';
+$messages['bayesautohelp'] = 'Cuando se activa el autoaprendizaje Bayesiano el sistema precesará automáticamente los mensajes que posiblemente sean spam/no spam y usará su información para mejorar los filtros de detección.';
+$messages['bayeshelp'] = 'El clasificador Bayesiano trata de identificar spam buscando palabras o combinaciones cortas de letras que se encuentran comunmente en mensajes de spam.';
+$messages['rblhelp'] = 'Los servidores encontrados en los enlaces en los correos recibidos serán comprobadas en varias \'listas negras\' o listas de fuentes de spam conocidas.';
+$messages['dcchelp'] = 'El DCC o Distributed Checksum Clearinghouse es un sistema de servidores coleccionando y contando checksums (o firmas) de millones de correos electrónicos cada día. Cuanto más parecido es el checksum de un mensaje entrante a la lista es más probable que sea spam.';
+$messages['pyzhelp'] = 'Pyzor es un sistema en red colaborativo para detectar y bloquear spam utilizando trozos de mensajes. Estos trozos son generados en varias formas distintas para buscar pequeñas diferencias en el contenido del mensaje.';
+$messages['raz2help'] = 'Vipul\'s Razor es una red distribuida, colaborativa para la detección y filtrado de spam basada en envíos de usuarios. La detección es llevada a cabo con firmas que encuentran de forma eficiente el contenido spam. Los reportes de spam son validados mediante reputación dada a cada reportante.';
+$messages['raz1help'] = 'Vipul\'s Razor es una red distribuida, colaborativa para la detección y filtrado de spam basada en envíos de usuarios. La detección es llevada a cabo con firmas que encuentran de forma eficiente el contenido spam. Los reportes de spam son validados mediante reputación dada a cada reportante. Versión 1 ha sido modificado ahora por version 2 y ya no es soportada.';
+$messages['levelhelp'] = 'La cabecera de \'Nivel de Spam\' puede ser añadida a un mensaje para indicar la puntuación dada a un mensaje repitiendo determinadas veces el caracter especificado. Esto puede ser útil para el procesamiento posterior del mensaje.';
+$messages['foldhelp'] = '¿Debe la cabecera añadida por SpamAssassin ser cortada? En otras palabras, ¿debe ser partida en varias líneas la cabecera en vez de una muy larga? Cuando una linea es partida está indicada para marcarla como la continuacióon de la siguiente.';
+$messages['bayesruleshlp'] = 'Antes de que el clasificador de estilo Bayesiano pueda ser usado de forma efectiva tiene que ser "entrenado" para detectar correctamente los mensajes de spam/no spam. Deshabilitando las reglas Bayesianas permitirá continuar aprendiendo de forma automática y manual de correo entrante pero no será usado para filtrarlo.';
+$messages['purgebayesconfirm'] = '¿Estás seguro de querer eliminar todos tus datos Bayesianos?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/fr_FR.inc b/plugins/sauserprefs/localization/fr_FR.inc
new file mode 100644
index 000000000..c8ce746b1
--- /dev/null
+++ b/plugins/sauserprefs/localization/fr_FR.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Jérémy Bobbio based on previous translation by magik_cypress */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Gérer les paramètres de détection des spams';
+$labels['sauserprefssettings'] = 'Préférences liées au spams';
+$labels['spamgeneralsettings'] = 'Préférences principales';
+$labels['spamthres'] = 'Seuil';
+$labels['spamsubject'] = 'Étiqueter le sujet';
+$labels['spamsubjectblank'] = '(laisser vide pour ne pas mettre d\'étiquette)';
+$labels['spamlang'] = 'Langues des messages';
+$labels['enabled'] = 'Actif';
+$labels['disabled'] = 'Inactif';
+$labels['headers'] = 'En-têtes du message';
+$labels['foldheaders'] = 'Autoriser plusieurs lignes dans les en-têtes';
+$labels['spamlevelstars'] = 'Utiliser l\'en-tête "Spam Level"';
+$labels['spamlevelchar'] = 'Symbole représentant le niveau de spam';
+$labels['spamtests'] = 'Services externes de détection';
+$labels['userazor1'] = 'Utiliser Razor v1';
+$labels['userazor2'] = 'Utiliser Razor v2';
+$labels['usepyzor'] = 'Utiliser Pyzor';
+$labels['usebayes'] = 'Utiliser le filtre bayésien';
+$labels['usedcc'] = 'Utiliser DCC';
+$labels['skiprblchecks'] = 'Utiliser les listes noires (RBL)';
+$labels['spamreportsettings'] = 'Préférences du rapport';
+$labels['spamreport0'] = 'Inclure le rapport dans les en-têtes du message original';
+$labels['spamreport1'] = 'Inclure tout le message original en pièce-jointe du rapport';
+$labels['spamreport2'] = 'Inclure le texte du message original en pièce-jointe du rapport';
+$labels['spamaddressrules'] = 'Adresses particulières';
+$labels['whitelist_from'] = 'Accepter les messages de';
+$labels['blacklist_from'] = 'Rejeter les messages de';
+$labels['whitelist_to'] = 'Accepter les messages envoyé à';
+$labels['addrule'] = 'Ajouter';
+$labels['rule'] = 'Règle';
+$labels['importfromaddressbook'] = 'Importer le carnet d\'adresses';
+$labels['deleteall'] = 'Tout supprimer';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Score par défaut';
+$labels['otherscore'] = 'Autre (%s)';
+$labels['usedefault'] = 'Rétablir les préférences par défaut';
+$labels['langoptions'] = 'Options de langues';
+$labels['bayes'] = 'Préférences du filtre bayésien';
+$labels['purgingbayes'] = 'Suppression des données du filtre bayésien...';
+$labels['purgebayes'] = 'Supprimer les données personnelles du filtre bayésien';
+$labels['bayesautolearn'] = 'Activer l\'apprentissage automatique du filtre bayésien';
+$labels['bayesautooptions'] = 'Options de l\'apprentissage automatique';
+$labels['bayesnonspam'] = 'Seuil des messages légitimes';
+$labels['bayesspam'] = 'Seuil des spams';
+$labels['bayesrules'] = 'Utiliser le filtre bayésien pour la détection';
+$labels['help'] = 'Aide';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Préférences modifiées avec succès';
+$messages['sauserpreffailed'] = 'Erreur : impossible de modifier les préférences';
+$messages['spamthresexp'] = 'Tout ce qui se trouve au dessus du seuil sera considéré comme spam. Augmenter le seuil va donc augmenter le nombre de spams qui ne seront pas détectés, mais réduira les risques de faux positifs.';
+$messages['spamlangexp'] = 'Choisir toutes les langues dans lesquelles seront écrits les messages reçus. Tous les messages reçus qui seront écrits dans une langue qui n\'aura pas été choisie sera traité comme un spam possible.';
+$messages['headersexp'] = 'SpamAssassin ajoute des en-têtes contenant des informations sur les traitements effectués. Les options suivantes permettent de configurer ces en-têtes.';
+$messages['spamtestssexp'] = 'Certains tests utilisent des services Internet externes pour aider à identifier les spams. Choisir ceux qui doivent êtres utilisés :';
+$messages['spamreport'] = 'Quand un message est identifié comme spam, un rapport avec tous les tests et scores est créé...';
+$messages['autowhitelist'] = 'Les adresses qui se trouvent dans le carnet d\'adresses sont automatiquement ajoutées dans la liste des exceptions.';
+$messages['whitelistexp'] = 'Une astérisque (*) peut être utilisé comme joker pour les traitements généraux. Par exemple : *example.com ou *@*.example.com.';
+$messages['spamaddressexists'] = 'Une règle existe déjà pour cette addresse';
+$messages['spamenteraddress'] = 'Entrer une adresse à ajouter';
+$messages['spamaddresserror'] = 'Erreur : l\'adresse semble invalide';
+$messages['spamaddressdelete'] = 'Faut-il vraiment supprimer cette règle ?';
+$messages['spamaddressdeleteall'] = 'Faut-il vraiment supprimer toutes les règles ?';
+$messages['noaddressrules'] = 'Aucune règle n\'a été trouvé.';
+$messages['importingaddresses'] = 'Importation des adresses en cours...';
+$messages['usedefaultconfirm'] = 'Faut-il vraiment rétablir les préférences par défaut ? Cela supprimera tous les changements, dont les réglages spécifiques.';
+$messages['purgebayesexp'] = 'Supprimer les données personnelles du filtre bayésien apprises de vos courriels';
+$messages['bayesnonspamexp'] = 'Les messages classés en-dessous de ce seuil seront utilisés pour améliorer la détection des messages légitimes.';
+$messages['bayesspamexp'] = 'Les messages classés au-dessus de ce seuil seront utilisés pour améliorer la détection des spams.';
+$messages['bayesautohelp'] = 'Quand l\'apprentissage automatique du filtre bayésien est activé, le système traitera les messages qui sembleront être ou ne pas être des spams afin d\'améliorer la détection de futurs messages.';
+$messages['bayeshelp'] = 'Le filtre bayésien essaye d\'identifier les spams à partir des mots ou des séquences de caractères qui se trouvent dans les messages qui sont ou ne sont pas des spams.';
+$messages['rblhelp'] = 'Les adresses des serveurs qui se trouvent dans les liens hypertextes d\'un message seront vérifiés à partir de plusieurs "listes noires" ou listes de sources connues de spam.';
+$messages['dcchelp'] = 'Le DCC ou le "Distributed Checksum Clearinghouse" est un système de serveurs collectant et contant les signatures de millions de courriels chaque jour. Plus la signature d\'un message reçu est similaire à celle de la liste, plus il a de chances d\'être un spam.';
+$messages['pyzhelp'] = 'Pyzor est un réseau collaboratif de systèmes visant à détecter et bloquer les spams à partir de condensé de messages. Ces condensés sont générés de plusieurs manières différentes afin d\'autoriser de petites différences dans le contenu des messages.';
+$messages['raz2help'] = 'Vipul\'s Razor est un réseau collaboratif et distribué de détection et de filtrage de spam se basant sur des envois de spams par les utilisateurs. La détection est faite à partir de signatures qui détectent efficacement le contenu changeant des spams. Les rapports sont validés grâce à une réputation associée à chaque rapporteur.';
+$messages['raz1help'] = 'Vipul\'s Razor est un réseau collaboratif et distribué de détection et de filtrage de spam se basant sur des envois de spams par les utilisateurs. La détection est faite à partir de signatures qui détectent efficacement le contenu changeant des spams. Les rapports sont validés grâce à une réputation associée à chaque rapporteur. La version 1 a été remplacé par la version 2 et n\'est donc plus supportée.';
+$messages['levelhelp'] = 'L\'en-tête "Spam Level" peut être ajouté à un message pour indiquer le score de ce dernier en répetant un symbole plusieurs fois. Cela peut être utile pour le traitement ultérieur du message.';
+$messages['foldhelp'] = 'Est-ce que les en-têtes ajoutés par SpamAssassin doivent revenir à la ligne ? En d\'autres termes, est-ce qu\'ils doivent êtres répartis sur plusieurs lignes au lieu de n\'être que sur seule ligne très longue. Lorsqu\'il y a un retour à la ligne, la suivante sera indenté afin de marquer la continuité avec la précédente.';
+$messages['bayesruleshlp'] = 'Avant que le filtre bayésien puisse être utilisé, il doit effectivement être "entrainé" pour pouvoir correctement détecter les spams. Désactiver le filtre bayésien permet au système de continuer à apprendre automatiquement et manuellement des messages reçus, mais il ne sera pas utilisé pour la détection des spams en eux-mêmes.';
+$messages['purgebayesconfirm'] = 'Faut-il vraiment supprimer toutes les données personnelles du filtre bayésien ?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/gl_ES.inc b/plugins/sauserprefs/localization/gl_ES.inc
new file mode 100644
index 000000000..e7dfe159a
--- /dev/null
+++ b/plugins/sauserprefs/localization/gl_ES.inc
@@ -0,0 +1,85 @@
+<?php
+/* Author: David Garabana Barro */
+
+$labels = array();
+$labels['sauserprefs'] = 'Correo lixo';
+$labels['sauserprefssettings'] = 'Axustes de correo lixo';
+$labels['spamgeneralsettings'] = 'Axustes xerais';
+$labels['spamthres'] = 'Umbral de puntuación';
+$labels['spamsubject'] = 'Etiqueta do asunto';
+$labels['spamsubjectblank'] = '(deixar en branco para ningún)';
+$labels['spamlang'] = 'Idiomas da mensaxe';
+$labels['enabled'] = 'Activado';
+$labels['disabled'] = 'Desactivado';
+$labels['headers'] = 'Cabeceiras da mensaxe';
+$labels['foldheaders'] = 'Permitir cabecerias de máis dunha liña';
+$labels['spamlevelstars'] = 'Utilizar a cabeceira \'Spam Level\'';
+$labels['spamlevelchar'] = 'Caracter de nivel de correo lixo';
+$labels['spamtests'] = 'Probas de correo lixo en Internet';
+$labels['userazor1'] = 'Utilizar Razor v1';
+$labels['userazor2'] = 'Utilizar Razor v2';
+$labels['usepyzor'] = 'Utilizar Pyzor';
+$labels['usebayes'] = 'Utilizar o clasificador de tipo Bayesian';
+$labels['usedcc'] = 'Utilizar DCC';
+$labels['skiprblchecks'] = 'Utilizar a \'Realtime Blackhole List\' (RBL)';
+$labels['spamreportsettings'] = 'Axustes de informes ';
+$labels['spamreport0'] = 'Incluir informe nas cabeceiras da mensaxe orixinal';
+$labels['spamreport1'] = 'Incluir a mensaxe orixinal coma anexo MIME ao informe';
+$labels['spamreport2'] = 'Incluir a mensaxe orixinal coma anexo de texto ao informe';
+$labels['spamaddressrules'] = 'Regras de direccións';
+$labels['whitelist_from'] = 'Aceptar correo de';
+$labels['blacklist_from'] = 'Rexeitar correo de';
+$labels['whitelist_to'] = 'Aceptar correo enviado a';
+$labels['addrule'] = 'Engadir regra';
+$labels['rule'] = 'Regra';
+$labels['importfromaddressbook'] = 'Importar direccións dende a libreta de direccións';
+$labels['deleteall'] = 'Eliminar todo';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Puntuación por omisión';
+$labels['otherscore'] = 'Outro (%s)';
+$labels['usedefault'] = 'Restaurar os valores por omisión';
+$labels['langoptions'] = 'Opcións da linguaxe';
+$labels['bayes'] = 'Axustes de Bayes';
+$labels['purgingbayes'] = 'Eliminando os datos bayesianos';
+$labels['purgebayes'] = 'Eliminando os datos persoais bayesianos';
+$labels['bayesautolearn'] = 'Empregar autoaprendizaxe bayesiano';
+$labels['bayesautooptions'] = 'Opcións de autoaprendizaxe';
+$labels['bayesnonspam'] = 'Umbral de "non correo lixo"';
+$labels['bayesspam'] = 'Umbral de "correo lixo"';
+$labels['bayesrules'] = 'Empregar regras bayesianas';
+$labels['help'] = 'Axuda';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Modificáronse correctamente os axustes de correo lixo';
+$messages['sauserpreffailed'] = 'Produciuse un erro: Non se poden modificar os axustes de correo lixo';
+$messages['spamthresexp'] = 'Calquera puntuación por enbira desde umbral é marcado coma correo lixo. Se sube este umbral, aumentará a cantidade de correo lixo non detectado, pero tamén reducirá o risco de que se produzan falsos positivos.';
+$messages['spamlangexp'] = 'Escolla as linguaxes nas que espera recibir correo electrónico.Calquera mensaxe que reciba escrita nunha língua non seleccionada será tratada coma posible correo lixo.';
+$messages['headersexp'] = 'SpamAssassin engade cabeceiras ás mensaxes procesadas informando dos resultados. Empregue as opcións de embaixo para configurar estas cabeceiras.';
+$messages['spamtestssexp'] = 'Algunhas das probas utilizan servicios de Internet para axudar a identificar o correo lixo. Escolla as que lle gostaría empregar:';
+$messages['spamreport'] = 'Cando unha mensaxe se identifica coma correo lixo, créase un informe de tódalas probas probas e puntuacións asignadas...';
+$messages['autowhitelist'] = 'As direccións de correo electrónico na súa libreta de direccións engádense automáticamente á lista de \'Aceptar correo de\'';
+$messages['whitelistexp'] = 'Pódese usar un asterisco (*) coma comodín para ter máis flexibilidade. Por exemplo: *@exemplo.com ou *@*.exemplo.com.';
+$messages['spamaddressexists'] = 'Xa existe una regra para esta dirección';
+$messages['spamenteraddress'] = 'Por favor, introduza unha dirección para engadir';
+$messages['spamaddresserror'] = 'Produciuse un erro: A dirección semella inválida';
+$messages['spamaddressdelete'] = 'Está seguro de que quere borrar esta regra?';
+$messages['spamaddressdeleteall'] = 'Está seguro de que quere borrar tódalas regras de dirección?';
+$messages['noaddressrules'] = 'Non se atoparon regras de dirección';
+$messages['importingaddresses'] = 'Importando direccións...';
+$messages['usedefaultconfirm'] = 'Está seguro de que quere restaurar os valores po omisión?. Esto vai borrar tódolos seus axustes, incluso as regras de dirección.';
+$messages['purgebayesexp'] = 'Eliminar os datos bayesianos persoais do seu correo electrónico';
+$messages['bayesnonspamexp'] = 'As mensaxes con puntuación menor a este umbrar vanse usar para mellorar os sistemas de detección de mensaxes non lixo';
+$messages['bayesspamexp'] = 'As mensaxes con puntuación maior a este umbrar vanse usar para mellorar os sistemas de detección de mensaxes lixo';
+$messages['bayesautohelp'] = 'Cando está activado o autoaprendizaxe bayesiano, o sistema vai procesar automáticamente as mensaxes que semellan correo lixo/non lixo, e usará a información destes para mellorar os filtros de detección.';
+$messages['bayeshelp'] = 'O clasificador bayesiano tenta identificar o correo lixo buscando por verbas ou secuencias cortas de caracteres que adoitan atoparse en mensaxes lixo e non lixo.';
+$messages['rblhelp'] = 'As direccións de servidores atopadas en ligazóns nunha mensaxe hanse comprobar en diversas "listas negras" ou listas de orixes coñecidos de correo lixo.';
+$messages['dcchelp'] = 'O "Distributed Checksum Clearinghouse" é un sistema de servidores que colleitan e contan sumas de comprobación (ou sinaturas) de millóns de mensaxes de correo cada día. Canto máis se pareza una suma dunha mensaxe entrante a unha da lista, máis probable é que sea corre lixo.';
+$messages['pyzhelp'] = 'Pyzor é un sistema colaborativo en rede para detectar e bloquear correo lixo utilizando resumos que identifican mensaxes. Os resumos xenéranse de varias maneiras distintas, para atopar pequenas diferencias no contido da mensaxe.';
+$messages['raz2help'] = 'Vipul\'s Razor é unha rede distribuida e colaborativa de detección e filtrado de correo lixo, que se basa en envíos de correo lixo por parte de usuarios. A detección faise por medio de sinaturas que paran de manera eficiente a mutación dos contidos do correo lixo. Os envíos de correo lixo valídanse a través de asignacións de reputación que se lle otorga a cada usuario.';
+$messages['raz1help'] = 'Vipul\'s Razor é unha rede distribuida e colaborativa de detección e filtrado de correo lixo, que se basa en envíos de correo lixo por parte de usuarios. A detección faise por medio de sinaturas que paran de manera eficiente a mutación dos contidos do correo lixo. Os envíos de correo lixo valídanse a través de asignacións de reputación que se lle otorga a cada usuario. A versión 1 foi trocada pola 2, e xa non está soportada.';
+$messages['levelhelp'] = 'Pódese engadir a cabeceria "Spam Level" á mensaxe para indicar a puntuación dada repetindo o carácter especificad tantas veces coma puntos teña a mensaxe. Pode ser útil para procesamiento posterior da menxase.';
+$messages['foldhelp'] = 'Deberíanse cortar as cabeceiras engadidas por SpamAssassin? Ou, dito doutro xeito, deberíanse dividir en varias liñas no canto de deixala nuna soa liña moi longa?. Cando se divide unha liña sángrase para indicar que é continuación da anterior.';
+$messages['bayesruleshlp'] = 'Antes de poder usar o clasificador tipo bayesiano, é necesario "entranalo" para que detecte eficientemente correos lixo/non lixo. Se se desactivan as regras bayesianas, permítese que o sistema continue a aprender automáticamente e manualmente das mensaxes entrantes, pero non se vai usar para detectar correo lixo.';
+$messages['purgebayesconfirm'] = 'Está seguro de que quere borrar os seus datos bayesianos?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/hu_HU.inc b/plugins/sauserprefs/localization/hu_HU.inc
new file mode 100644
index 000000000..952f3f1cf
--- /dev/null
+++ b/plugins/sauserprefs/localization/hu_HU.inc
@@ -0,0 +1,61 @@
+<?php
+/* Author: Zoltan Nagy */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['sauserprefssettings'] = 'Spam beállítás';
+$labels['spamgeneralsettings'] = 'Általános beállítás';
+$labels['spamthres'] = 'Küszöb szám';
+$labels['spamsubject'] = 'Tárgy cimke';
+$labels['spamsubjectblank'] = '(hagyja üressen ha egyik sem)';
+$labels['spamlang'] = 'Üzenetek nyelve';
+$labels['enabled'] = 'Bekapcsolva';
+$labels['disabled'] = 'Kikapcsolva';
+$labels['headers'] = 'Üzenet fejléc';
+$labels['foldheaders'] = 'Több sor engedélyezése a fejlécben';
+$labels['spamlevelstars'] = '\'Spam szint\' fejléc használata';
+$labels['spamlevelchar'] = 'Spam szint karakter';
+$labels['spamtests'] = 'Inernet Alapu Spam Tesztek';
+$labels['userazor1'] = 'Razor v1 használata';
+$labels['userazor2'] = 'Razor v2 használata';
+$labels['usepyzor'] = 'Pyzor használata';
+$labels['usebayes'] = 'Nyílt (naiv) Bayesian stílusú besorolás használata';
+$labels['usedcc'] = 'DCC használata';
+$labels['skiprblchecks'] = 'Valós idejű Feketelyuk Lista használata';
+$labels['spamreportsettings'] = 'Beállítások jelentése';
+$labels['spamreport0'] = 'A riport beágyazása az eredeti fejlécbe';
+$labels['spamreport1'] = 'az eredeti MIME-ként csatolása a ripothoz';
+$labels['spamreport2'] = 'az eredeti csak szöveg-ként csatolása a ripothoz';
+$labels['spamaddressrules'] = 'Cím szabályok';
+$labels['whitelist_from'] = 'Mailek elfogadása küldőtől';
+$labels['blacklist_from'] = 'Mailek visszautasítása küldőtől';
+$labels['whitelist_to'] = 'Címzettnek küldött mailek elfogadása';
+$labels['addrule'] = 'Szabály hozzáadása';
+$labels['rule'] = 'Szabály';
+$labels['importfromaddressbook'] = 'Címek importálása a Címjegyzékből';
+$labels['deleteall'] = 'Mindent törli';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Alapérték';
+$labels['otherscore'] = 'Egyéb (%s)';
+$labels['usedefault'] = 'Alabértékek visszaállítása';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Sikeresen megváltoztatta a spam beállításokat';
+$messages['sauserpreffailed'] = 'Hiba: nem sikerült a spam beállítások megváltoztatása';
+$messages['spamthresexp'] = 'Minden ami a küszöb alatti érték, spam-ként lesz jelölve. A küszöb értékének a növelése, növeli a bejutó spameket, de csökkenti a hamis spam jelölést';
+$messages['spamlangexp'] = 'Válassza ki a nyelveket amilyen nyelvü leveleket vár. Minden érkező levél amely a nem megjelölt nyelven íródott, lehetséges spamként lesz kezelve.';
+$messages['headersexp'] = 'A SpamAssassin fejlécet ad a levélhez mely információval szolgál az eredményről. Az alábbi beállításokkal konfigurálhatja ezeket a fejléceket.';
+$messages['spamtestssexp'] = 'Néhány beállítás internet alapu szolgáltatást használ a spamek azonosítására. Válassza ki a használni kivántakat.';
+$messages['spamreport'] = 'Mikor egy üzenet spamként kerül azonosításra, létrejön egy csatolt riport a tesztek és eredményeikből.';
+$messages['autowhitelist'] = 'A Címjegyzékben található e-mail címek automatikusan hozzáadódnak a \'Mail Elfogadás -tól\'';
+$messages['whitelistexp'] = 'A csillag karakter (*) használható helyettesítő karakterként a nagyobb rugalmasságért. pl. *@example.com vagy *@*.example.com';
+$messages['spamaddressexists'] = 'Ehhez a címhez már létezik szabály';
+$messages['spamenteraddress'] = 'Írja be a címet melyet szeretne hozzáadni';
+$messages['spamaddresserror'] = 'Hiba: a cím érvénytelen';
+$messages['spamaddressdelete'] = 'Biztosan törölni szeretné ezt a szabályt?';
+$messages['spamaddressdeleteall'] = 'Biztosan törölni szeretné az összes cím szabályt?';
+$messages['noaddressrules'] = 'Nem található cím szabály.';
+$messages['importingaddresses'] = 'Címek importálása...';
+$messages['usedefaultconfirm'] = 'Biztos, hogy vissza szeretné állítani az alapbeállítást? Ez törli az összes beállítást, ideértve a cím szabályokat is.';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/it_IT.inc b/plugins/sauserprefs/localization/it_IT.inc
new file mode 100644
index 000000000..67f4a99a0
--- /dev/null
+++ b/plugins/sauserprefs/localization/it_IT.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Alessio Cecchi */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Gestisci le impostazioni di rilevamento dello Spam';
+$labels['sauserprefssettings'] = 'Impostazioni spam';
+$labels['spamgeneralsettings'] = 'Impostazioni generali';
+$labels['spamthres'] = 'Punteggio valutazione';
+$labels['spamsubject'] = 'Tag oggetto';
+$labels['spamsubjectblank'] = '(lasciare in bianco se niente)';
+$labels['spamlang'] = 'Lingue del messaggio';
+$labels['enabled'] = 'Abilitato';
+$labels['disabled'] = 'Disabilitato';
+$labels['headers'] = 'Intestazioni messaggio';
+$labels['foldheaders'] = 'Consenti più linee nell\'intestazione';
+$labels['spamlevelstars'] = 'Usa instazione \'Spam Level\'';
+$labels['spamlevelchar'] = 'carattere \'Spam level\'';
+$labels['spamtests'] = 'Test spam su internet';
+$labels['userazor1'] = 'Usa Razor v1';
+$labels['userazor2'] = 'Usa Razor v2';
+$labels['usepyzor'] = 'Usa Pyzor';
+$labels['usebayes'] = 'Usa stile classificazione ingenua Bayesiana';
+$labels['usedcc'] = 'Usa DCC';
+$labels['skiprblchecks'] = 'Usa RBL (Realtime Blackhole List)';
+$labels['spamreportsettings'] = 'Impostazioni dei rapporti';
+$labels['spamreport0'] = 'Includi report nelle intestazioni del messaggio originale';
+$labels['spamreport1'] = 'Includi il messaggio originale come allegato MIME al raporto';
+$labels['spamreport2'] = 'Includi il messeggio originale come allegato TXT al rapporto';
+$labels['spamaddressrules'] = 'Regole su indirizzi';
+$labels['whitelist_from'] = 'Consenti DA ( From: )';
+$labels['blacklist_from'] = 'Nega DA ( From: )';
+$labels['whitelist_to'] = 'Consenti destinatiari ( To: )';
+$labels['addrule'] = 'Aggiungi regola';
+$labels['rule'] = 'Regola';
+$labels['importfromaddressbook'] = 'Importa indirizzi dalla rubrica online';
+$labels['deleteall'] = 'Cancella tutto';
+$labels['autoscore'] = 'Automatico';
+$labels['defaultscore'] = 'Punteggio standard';
+$labels['otherscore'] = 'Altro (%s)';
+$labels['usedefault'] = 'Ripristina le impostazioni iniziali';
+$labels['langoptions'] = 'Opzioni Lingua';
+$labels['bayes'] = 'Impostazione filtri Bayesiani';
+$labels['purgingbayes'] = 'Cancellazione dei dati Bayesiani...';
+$labels['purgebayes'] = 'Elimina i dati personali Bayesiani';
+$labels['bayesautolearn'] = 'Utilizza l\'Apprendimento automatico Bayesiano';
+$labels['bayesautooptions'] = 'Impostazioni Apprendimento automatico';
+$labels['bayesnonspam'] = 'Soglia di Non Spam';
+$labels['bayesspam'] = 'Soglia di Spam';
+$labels['bayesrules'] = 'Utilizza i filtri Bayesiani';
+$labels['help'] = 'Aiuto';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Cambiamenti applicati con successo';
+$messages['sauserpreffailed'] = 'Errore: imposibile salvare i cambiamenti';
+$messages['spamthresexp'] = 'Tutto quello che oltre passa il punteggio verrà segnalato come spam. Aumentare il punteggio significa aumentare i messaggi di spam non segnalati, ma riduce il richio di falsi positivi.';
+$messages['spamlangexp'] = 'Selezionare tutte le lingue in cui ci si aspetta possa arrivare un messaggio. Tutti i messaggi che arriveranno in una lingua non selezionata saranno segnalati come spam.';
+$messages['headersexp'] = 'SpamAssassin aggiunge delle intestazioni al messaggioriguardante il risultato dell\'analisi. Usare questa opzione per configurare queste intestazioni.';
+$messages['spamtestssexp'] = 'Certi controlli utilizzano dei servizi internet per analizzare il messaggio. Selezionare quello che si vuole utilizzare:';
+$messages['spamreport'] = 'Quando un messaggio viene identificato come spam viene creato un rapporto dei test ed il punteggio questo rapporto viene creato...';
+$messages['autowhitelist'] = 'Gli indirizzi Email della Rubrica della Webmail vengono caricati automaticamente ed inseriti nella lista \'Consenti mail DA\'.';
+$messages['whitelistexp'] = 'Un asterisco (*) può essere usato come carattere \'jolly\' per aumentare la flessibilità della regola. Ad esempio: *@dominio.com o *@*.dominio.com.';
+$messages['spamaddressexists'] = 'Esiste già una regola per questo indirizzo';
+$messages['spamenteraddress'] = 'Inserire un indirizzo da aggiungere';
+$messages['spamaddresserror'] = 'Errore: Indirizzo invalido';
+$messages['spamaddressdelete'] = 'Sicuro di voler CANCELLARE questa regola?';
+$messages['spamaddressdeleteall'] = 'Sicuro di voler CANCELLARE TUTTI gli indirizzi della lista??';
+$messages['noaddressrules'] = 'Nessuna regola trovata.';
+$messages['importingaddresses'] = 'Importazione indirizzi...';
+$messages['usedefaultconfirm'] = 'Sicuro di voler ripristinare le impostazioni iniziali ? Questa operazione CANCELLERA TUTTE LE IMPOSTAZIONI, incluse le regole per i messaggi!.';
+$messages['purgebayesexp'] = 'Elimina i dati Bayesiani personali raccolti dal tuo indirizzo email';
+$messages['bayesnonspamexp'] = 'I messaggi con punteggio al di sotto di questa soglia verranno utilizzati per migliorare l\'individuazione dei messaggi non spam.';
+$messages['bayesspamexp'] = 'I messaggi con punteggio al di sopra di questa soglia verranno utilizzati per migliorare l\'individuazione dei messaggi di spam.';
+$messages['bayesautohelp'] = 'Quando l\'apprendimento automatico Bayesiano è abilitato il sistema analizza automaticamente i messaggi che con molta probabilità sono spam oppure no e utilizza le informazioni ricavate per migliorare il rilevamento.';
+$messages['bayeshelp'] = 'I filtri Bayesiaio provano ad identificare lo spam, cercando parole o brevi sequenze di caratteri che si trovano più di frequente nei messaggi di spam e non.';
+$messages['rblhelp'] = 'Gli indirizzi trovati nei collegamenti ipertestuali di un messaggio verranno controllati sulla base di diverse "liste nere" o liste di fonti di spam note.';
+$messages['dcchelp'] = 'DCC o Distributed Checksum Clearinghouse è un sistema centralizzato di raccolta e conteggio checksum (o firme) di milioni di messaggi di posta elettronica in transito ogni giorno. Quanto maggiore è la somiglianza del checksum di un messaggio in arrivo nel sistema DCC, più probabile è che quel messaggio possa essere spam.';
+$messages['pyzhelp'] = 'Pyzor è una network collaborativo per rilevare e bloccare lo spam utilizzando la raccolta ed il conteggio dei digest (o firme) dei messaggi. I digest sono generati in un numero di modi diversi per tollerare piccole differenze nel contenuto del messaggio.';
+$messages['raz2help'] = 'Vipul Razor è un network collaborativo per l\'individuazione dello spam. La rilevazione viene effettuata con le firme in modo efficiente al fine di individuare mutazione nei di spam. Le segnalazioni di spam sono convalidati mediante l\'assegnazione di reputazione dato a ogni contributore al network.';
+$messages['raz1help'] = 'Vipul Razor è un network collaborativo per l\'individuazione dello spam. La rilevazione viene effettuata con le firme in modo efficiente al fine di individuare mutazione nei di spam. Le segnalazioni di spam sono convalidati mediante l\'assegnazione di reputazione dato a ogni contributore al network. La versione 1 è stata sostituita dalla versione 2 e non è più utilizzata.';
+$messages['levelhelp'] = 'L\'intestazione \'Spam Level\' può essere aggiunto a un messaggio per indicare il punteggio assegnatoli ripetendo il carattere specificato molte volte. Ciò può essere utile per un ulteriore elaborazione del messaggio.';
+$messages['foldhelp'] = 'Gli header aggiunti da SpamAssassin devono essere suddivisi? In altre parole, essi dovrebbero essere suddivisi in più righe invece di una molto lunga. Quando una linea è interrotta apparirà rientrata per segnalare la continuazione della precedente.';
+$messages['bayesruleshlp'] = 'Prima che i filtri Bayesiani possano funzionare in modo efficace devono essere "addestrati" per rilevare correttamente i messaggi di spam e non. La disattivazione delle regole bayesiane permette al sistema di continuare l\'apprendimento sia automaticamente che manualmente sulla posta in arrivo, ma non saranno utilizzati per rilevare lo spam.';
+$messages['purgebayesconfirm'] = 'Sei sicuro di voler eliminare tutti i dati bayesiani?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/pl_PL.inc b/plugins/sauserprefs/localization/pl_PL.inc
new file mode 100644
index 000000000..eaae55944
--- /dev/null
+++ b/plugins/sauserprefs/localization/pl_PL.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Bartosz Mierzwiak */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['managespam'] = 'Ustawienia wykrywania Spamu';
+$labels['sauserprefssettings'] = 'Ustawienia Spamu';
+$labels['spamgeneralsettings'] = 'Ustawienia Główne';
+$labels['spamthres'] = 'Próg punktowania';
+$labels['spamsubject'] = 'Znacznik w temacie';
+$labels['spamsubjectblank'] = '(zostaw puste jesli brak)';
+$labels['spamlang'] = 'Język wiadomości';
+$labels['enabled'] = 'Włączony';
+$labels['disabled'] = 'Wyłączony';
+$labels['headers'] = 'Nagłówki Wiadomości';
+$labels['foldheaders'] = 'Zezwalaj na wiele lini w nagłówku';
+$labels['spamlevelstars'] = 'Użyj \'Spam Level\' w nagłówku';
+$labels['spamlevelchar'] = 'Znacznik poziomu spamu';
+$labels['spamtests'] = 'Testy Spamu oparte o internet';
+$labels['userazor1'] = 'Użyj Razor v1';
+$labels['userazor2'] = 'Użyj Razor v2';
+$labels['usepyzor'] = 'Użyj Pyzor';
+$labels['usebayes'] = 'Użyj Bayesian style classifier';
+$labels['usedcc'] = 'Użyj DCC';
+$labels['skiprblchecks'] = 'Użyj Realtime Blackhole List';
+$labels['spamreportsettings'] = 'Opcje Raportu';
+$labels['spamreport0'] = 'Dołącz raport w nagłówku orginalnej wiadomości';
+$labels['spamreport1'] = 'Dołącz orginał jako MIME załącznik do raportu';
+$labels['spamreport2'] = 'Dołącz orginał jako załącznik textowy';
+$labels['spamaddressrules'] = 'Reguły Adresów';
+$labels['whitelist_from'] = 'Akceptuj wiadomości od';
+$labels['blacklist_from'] = 'Rejestruj wiadomości od';
+$labels['whitelist_to'] = 'Akceptuj wiadomości wysłane do';
+$labels['addrule'] = 'Dodaj regułe';
+$labels['rule'] = 'Reguła';
+$labels['importfromaddressbook'] = 'Importuj adresy z książki adresowej';
+$labels['deleteall'] = 'Usuń wszystko';
+$labels['autoscore'] = 'Automatycznie';
+$labels['defaultscore'] = 'Domyślny Wynik';
+$labels['otherscore'] = 'Inny (%s)';
+$labels['usedefault'] = 'Przywróć ustawienia domyślne';
+$labels['langoptions'] = 'Opcje Językowe';
+$labels['bayes'] = 'Ustawienia Bayes';
+$labels['purgingbayes'] = 'Usówanie danych Bayes';
+$labels['purgebayes'] = 'Usówanie osobistych danych Bayes';
+$labels['bayesautolearn'] = 'Użyj Bayes auto lern';
+$labels['bayesautooptions'] = 'Opcje automatycznej nauki';
+$labels['bayesnonspam'] = 'Próg nie spamu';
+$labels['bayesspam'] = 'Próg spamu';
+$labels['bayesrules'] = 'Użyj reguł Bayes';
+$labels['help'] = 'Pomoc';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Zmiany ustawień spamu zakończone sukcesem';
+$messages['sauserpreffailed'] = 'Error: Nie można zmienić ustawień spamu';
+$messages['spamthresexp'] = 'Wszystko powyżej progu jest oznaczone jako spam. Podnosząc ten próg wzrośnie ilość spamu nieodebranego, ale zmniejszy się ryzyko fałszywych alarmów.';
+$messages['spamlangexp'] = 'Wybierz wszystkie języki w jakich można oczekiwać, że otrzymasz wiadomości e-mail. Wszelkie wiadomości otrzymane, które są napisane w językach innych niż wybrane będą traktowane jako spam.';
+$messages['headersexp'] = 'SpamAssassin dodaje nagłówki przetworzonych wiadomości, dostarczające informacji o wynikach. Użyj poniższych opcji, aby skonfigurować te nagłówki.';
+$messages['spamtestssexp'] = 'Niektóre kontrole wykorzystania usług internetowych w celu identyfikowania spamu. Wybierz te, których chcesz używać:';
+$messages['spamreport'] = 'Gdy wiadomość jest klasyfikowana jako spam, tworzony jest raport z wszystkich testów.';
+$messages['autowhitelist'] = 'Adresy w Twojej książce adresowej są automatycznie dodawane do listy akceptowanych nadawców.';
+$messages['whitelistexp'] = 'Gwiazdka (*) zapewnia większą elastyczność. Na przykład: * @ example.com lub * @ *. example.com.';
+$messages['spamaddressexists'] = 'Reguła aktualnie istnieje dla tego adresu';
+$messages['spamenteraddress'] = 'Wpisz adres, który chcesz dodać';
+$messages['spamaddresserror'] = 'Error: Niewłąściwy adres';
+$messages['spamaddressdelete'] = 'Jesteś pewny(a) że chcesz usunąć tą regułe?';
+$messages['spamaddressdeleteall'] = 'Jestes pewny(a) że chcesz usunąć wszystkie reguły adresowe?';
+$messages['noaddressrules'] = 'Nie znaleziono reguły adresowej.';
+$messages['importingaddresses'] = 'Wczytywanie adresów...';
+$messages['usedefaultconfirm'] = 'Jesteś pewny(a) że chcesz przywrócić ustawienia domyślne? Usunie to wszystkie Twoje ustaawienia, łącznie z regułami adresacji.';
+$messages['purgebayesexp'] = 'Usuń osobiste dane Bayes zgromadzone z Twoich wiadomości';
+$messages['bayesnonspamexp'] = 'Wiadomości z wartością poniżej tego progu będą użyte do poprawienia systemowej detekcji nie-spamu.';
+$messages['bayesspamexp'] = 'Wiadomości z wartością powyżej tego progu będą użyte do poprawienia systemowej detekcji spamu.';
+$messages['bayesautohelp'] = 'Kiedy włączone jest auto-uczenie się filtra słownikowego Bayes, system automatycznie przetworzy wiadomość która prawdopodobnie jest spamem/nie spamem aby ulepszyć filtry skanujące.';
+$messages['bayeshelp'] = 'Klasyfikator Bayesa próbuje zidentyfikować spam patrząc na słowa lub krótkie sekwencje znaków, które są powszechnie spotykane w spamie lub wiadomościach niespamowych.';
+$messages['rblhelp'] = 'Znalezione adresy serwerów zamieszczonych w linkach w hipertekscie, będą sprawdzone z czarną listą serwerów i znanych źródeł spamu.';
+$messages['dcchelp'] = 'DCC inaczej Distributed Checksum Clearinghouse, to system serwerów zbierania i liczenia sum kontrolnych milionów wiadomości dziennie. Im większe podobieństwo kontrolne otrzymanej wiadomości jest na liście, tym bardziej prawdopodobne że jest to spam.';
+$messages['pyzhelp'] = 'Pyzor jest to sieciowym systemem wykrywania i blokowania spamu przy identyfikacji zarysu wiadomości. Zarysy są wytwarzane na wiele różnych sposobów, aby pozwolić na niewielkie różnice w treści wiadomości.';
+$messages['raz2help'] = 'Vipul\'s Razor to rozproszona, społecznościowa sieć wykrywająca i filtrująca spam na podstawie zgłoszeń użytkowników. Wykrywanie odbywa się na podstawie sygnatur którymi oznaczane są treści spamu. Znaczniki wiarygodności użytkowników pomagają uwiarygodniać zgłoszenia spamu.';
+$messages['raz1help'] = 'Vipul\'s Razor to rozproszona, społecznościowa sieć wykrywająca i filtrująca spam na podstawie zgłoszeń użytkowników. Wykrywanie odbywa się na podstawie sygnatur którymi oznaczane są treści spamu. Znaczniki wiarygodności użytkowników pomagają uwiarygodniać zgłoszenia spamu. Wersja 1 została zastąpiona przez wersję 2 i nie jest już wspierana.';
+$messages['levelhelp'] = 'Nagłówek \'Poziom Spamu\' może zostać dodany do wiadomości aby uwidocznić punktację jaka otrzymała wiadmość, Znacznik zostanie powtórzony tyle razy ile punktów otrzymała wiadomość. Może to być pomocne przy następnych przetwarzaniach wiadomości.';
+$messages['foldhelp'] = 'Czy zawijać nagłówki dodane przez SpamAssassina? Inaczej mówiąc czy mają być łamane w wielu liniach czy też pozostawione jako jedna długa linia. Kiedy linia jest dzielona zostaje oznaczona jako kontynuacja poprzedniej linii.';
+$messages['bayesruleshlp'] = 'Słownikowy filtr Bayesa przed efektywnym użyciem musi przejść proces "trenowania" aby poprawnie wykrywać spam/nie spam. Wyłączenie reguł filtra Bayesa pozwoli systemowi na "uczenie" się zarówno automatycznie jak i ręcznie z nadchodzących wiadomości, ale wyniki działania filtrów nie będą używane do wykrywania spamu.';
+$messages['purgebayesconfirm'] = 'Czy napewno usunąć wszystkie dane Bayes?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/pt_BR.inc b/plugins/sauserprefs/localization/pt_BR.inc
new file mode 100644
index 000000000..f5eb14327
--- /dev/null
+++ b/plugins/sauserprefs/localization/pt_BR.inc
@@ -0,0 +1,85 @@
+<?php
+/* Author: Alexandre Correa */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['sauserprefssettings'] = 'Configurações Spam';
+$labels['spamgeneralsettings'] = 'Configurações Gerais';
+$labels['spamthres'] = 'Pontuação Inicial';
+$labels['spamsubject'] = 'Marca do Assunto';
+$labels['spamsubjectblank'] = '(deixe em branco para nenhum)';
+$labels['spamlang'] = 'Linguagem das mensagens';
+$labels['enabled'] = 'Ligado';
+$labels['disabled'] = 'Desligado';
+$labels['headers'] = 'Cabeçalho';
+$labels['foldheaders'] = 'Permitir multiplas linhas no cabeçalho';
+$labels['spamlevelstars'] = 'Usar \'Nivel de Spam\' no cabeçalho';
+$labels['spamlevelchar'] = 'Marcador de nível';
+$labels['spamtests'] = 'Testes de spam ON-LINE';
+$labels['userazor1'] = 'Usar Lista Razor V1';
+$labels['userazor2'] = 'Usar Lista Razor V2';
+$labels['usepyzor'] = 'Usar Lista Pyzor';
+$labels['usebayes'] = 'Usar classificação \'Bayesian\'';
+$labels['usedcc'] = 'Usar DCC';
+$labels['skiprblchecks'] = 'Usar Lista-Negra em tempo real';
+$labels['spamreportsettings'] = 'Configurações de Notificação';
+$labels['spamreport0'] = 'Incluir notas nos cabeçalhos da mensagem original';
+$labels['spamreport1'] = 'Incluir mensagem como anexo MIME';
+$labels['spamreport2'] = 'Incluir mensagem como texto plano';
+$labels['spamaddressrules'] = 'Regras de Endereços';
+$labels['whitelist_from'] = 'Aceitar email de';
+$labels['blacklist_from'] = 'Rejeitar email de';
+$labels['whitelist_to'] = 'Aceitar email enviado para';
+$labels['addrule'] = 'Adicionar regra';
+$labels['rule'] = 'Regra';
+$labels['importfromaddressbook'] = 'Importar endereço do Livro de Endereços';
+$labels['deleteall'] = 'Apagar tudo';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Pontuação Padrão';
+$labels['otherscore'] = 'Outro (%s)';
+$labels['usedefault'] = 'Voltar configuração padrão';
+$labels['langoptions'] = 'Opções de linguagem';
+$labels['bayes'] = 'Configuração \'Bayes\'';
+$labels['purgingbayes'] = 'Apagar dados da \'Bayes\'';
+$labels['purgebayes'] = 'Apagar dados pessoais da \'Bayes\'';
+$labels['bayesautolearn'] = 'Usar auto-aprendizagem da \'Bayes\'';
+$labels['bayesautooptions'] = 'Opções de auto-aprendizagem';
+$labels['bayesnonspam'] = 'Pontuação de Não-Spam';
+$labels['bayesspam'] = 'Potuação de Spam';
+$labels['bayesrules'] = 'Usar regras \'Baysian\'';
+$labels['help'] = 'Ajuda';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Configurações de SPAM salvas';
+$messages['sauserpreffailed'] = 'Erro: Não foi possível alterar configurações de SPAM';
+$messages['spamthresexp'] = 'Qualquer valor acima da pontuação será marcado como SPAM. Aumentando a pontuação pode aumentar a quantidade de SPAM não detectado, mas evita que uma mensagem verdadeira seja marcada como SPAM.';
+$messages['spamlangexp'] = 'Selecione todos os idiomas que você espera receber mensagens. Qualquer mensagem recebida de idiomas não selecionados são marcadas como SPAM.';
+$messages['headersexp'] = 'SpamAssassin adiciona cabeçalhos nas mensagens processadas com informações sobre os resultados obtidos. Utilize as opções abaixo para configurar:';
+$messages['spamtestssexp'] = 'Algumas verificações fazem consultas on-line afim de ajudar a detectar SPAM. Selecione as opções que deseja utilizar:';
+$messages['spamreport'] = 'Quando uma mensagem é identificada como SPAM, uma notificação de todos os testes e pontuações obtidas é criada...';
+$messages['autowhitelist'] = 'Endereços de email cadastrados em sua agenda são automaticamente adicionados na lista de "Aceitar email de".';
+$messages['whitelistexp'] = 'Asterisco pode ser utilizado como curinga para uma maior flexibilidade. Exemplo: *@exemplo.com.br ou *@*.exemplo.com.br';
+$messages['spamaddressexists'] = 'Uma regra já existe para este endereço';
+$messages['spamenteraddress'] = 'Digite um endereço para adicionar';
+$messages['spamaddresserror'] = 'Erro: Endereço inválido';
+$messages['spamaddressdelete'] = 'Tem certeza que deseja excluir esta regra ?';
+$messages['spamaddressdeleteall'] = 'Tem certeza que deseja excluir TODAS as regras ?';
+$messages['noaddressrules'] = 'Regras de endereço não encontradas.';
+$messages['importingaddresses'] = 'Importando endereços...';
+$messages['usedefaultconfirm'] = 'Tem certeza que deseja restaurar para os padrões iniciais? Isto apaga todas as configurações, incluindo regras de endereços';
+$messages['purgebayesexp'] = 'Apagar configurações pessoais \'Bayes\' coletadas em seu email';
+$messages['bayesnonspamexp'] = 'Mensagens que tenham pontuação abaixo deste nível são utilizadas para aprimorar o sistema de detecção de menagens NÃO-SPAM.';
+$messages['bayesspamexp'] = 'Mensagens que tenham pontuação acima deste nível são utilizadas para aprimorar o sistema de detecção de mensagens SPAM.';
+$messages['bayesautohelp'] = 'Quando a auto-aprendizagem \'Bayes\' está ativada, o sistema utiliza as mensagens marcadas como SPAM/NÃO-SPAM para aprimorar o sistema de detecção.';
+$messages['bayeshelp'] = 'O sistema \'Bayes\' tenta identificar SPAM analisando as palavras ou textos curtos sequenciais que, em comum, são encontrados nas mensagems SPAM/NÃO-SPAM.';
+$messages['rblhelp'] = 'Endereço do servidor encontrado nos atalhos na mensagem são verificadas nas listas-negra ou listas de spam.';
+$messages['dcchelp'] = 'O DCC é um sistema composto por servidores que coletam e contabilizam as assinaturas digitais de milhões de mensagens. Estes contadores podem ser utilizados para detectar spam.';
+$messages['pyzhelp'] = 'Pyzor é um sistema colaborativo e interligado para detectar e bloquear mensagens identificadas pelo seu indice.';
+$messages['raz2help'] = '\'Vipuls Razor\' é um sistema baseado nas notificações feitas por vários usuários. A detecção é feita com base na assinatura digital da mensagem.';
+$messages['raz1help'] = '\'Vipuls Razor\' é um sistema baseado nas notificações feitas por vários usuários. A detecção é feita com base na assinatura digital da mensagem.';
+$messages['levelhelp'] = 'O cabeçalho \'Spam Level\' pode ser adicionado na mensagem repetindo o \'Marcado de nível\' de acordo com a pontuação obtida.';
+$messages['foldhelp'] = 'Por padrão, os cabeçalhos adicionados são separados por duplo espaço. Evitando uma linha muito longa, quebrando-a em várias linhas menores.';
+$messages['bayesruleshlp'] = 'Se usar as regras \'naive-Bayes-style\' como classificadores. Permite que desligue as regras mas, possibilitando deixar auto-aprendizagem automatica ou manual.';
+$messages['purgebayesconfirm'] = 'Tem certeza que deseja excluir os dados da \'Bayes\' ?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/ro_RO.inc b/plugins/sauserprefs/localization/ro_RO.inc
new file mode 100644
index 000000000..dff15fd1f
--- /dev/null
+++ b/plugins/sauserprefs/localization/ro_RO.inc
@@ -0,0 +1,85 @@
+<?php
+/* Author: Ovidiu Bica */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['sauserprefssettings'] = 'Setari spam';
+$labels['spamgeneralsettings'] = 'Setari generale';
+$labels['spamthres'] = 'Scor maxim';
+$labels['spamsubject'] = 'Cuvant cheie, ex. [SPAM]';
+$labels['spamsubjectblank'] = '(lasati gol pentru niciunul)';
+$labels['spamlang'] = 'Mesaje in limbile';
+$labels['enabled'] = 'Activat';
+$labels['disabled'] = 'Dezactivat';
+$labels['headers'] = 'Header mesaje';
+$labels['foldheaders'] = 'Permite linii multiple in header';
+$labels['spamlevelstars'] = 'Foloseste \'Nivel de spam\' in header';
+$labels['spamlevelchar'] = 'Caracter pentru nivel spam';
+$labels['spamtests'] = 'Teste spam de pe internet.';
+$labels['userazor1'] = 'Foloseste Razor v1';
+$labels['userazor2'] = 'Foloseste Razorv2';
+$labels['usepyzor'] = 'Foloseste Pyzor';
+$labels['usebayes'] = 'Foloseste stilul de clasificare Bayesian';
+$labels['usedcc'] = 'Foloseste DCC';
+$labels['skiprblchecks'] = 'Foloseste lista Blackhole in timp real';
+$labels['spamreportsettings'] = 'Setari raportari';
+$labels['spamreport0'] = 'Include raportul in headerul mesajului original';
+$labels['spamreport1'] = 'Include raportul original ca atasament MIME';
+$labels['spamreport2'] = 'Include raportul original ca atasament text';
+$labels['spamaddressrules'] = 'Reguli adrese';
+$labels['whitelist_from'] = 'Accepta mail de la';
+$labels['blacklist_from'] = 'Refuza mail de la';
+$labels['whitelist_to'] = 'Accepta mail trimis la';
+$labels['addrule'] = 'Adauga regula';
+$labels['rule'] = 'Regula';
+$labels['importfromaddressbook'] = 'Importa adresele din agenda';
+$labels['deleteall'] = 'Sterge tot';
+$labels['autoscore'] = 'Automat';
+$labels['defaultscore'] = 'Scor implicit';
+$labels['otherscore'] = 'Altele (%s)';
+$labels['usedefault'] = 'Restaureaza setarile implicite';
+$labels['langoptions'] = 'Optiuni lingvistice';
+$labels['bayes'] = 'Setari Bayes';
+$labels['purgingbayes'] = 'Sterg datele Bayesian';
+$labels['purgebayes'] = 'Sterg datele Bayesian personale';
+$labels['bayesautolearn'] = 'Foloseste instruirea automata a filtrului Bayes';
+$labels['bayesautooptions'] = 'Optiuni instruire automata';
+$labels['bayesnonspam'] = 'Prag limita non spam';
+$labels['bayesspam'] = 'Prag limita spam';
+$labels['bayesrules'] = 'Foloseste reguli Bayesian';
+$labels['help'] = 'Ajutor';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Setarile de SPAM au fost setate cu succes.';
+$messages['sauserpreffailed'] = 'Eroare: Nu pot actualiza setarile de spam.';
+$messages['spamthresexp'] = 'Orice mesaj mai mare de acest prag va fi marcat ca spam. Crescand acest prag va mari numarul de mesaje spam nedetectate insa va reduce numarul de mesaje interpretate gresit ca spam.';
+$messages['spamlangexp'] = 'Selecteaza toate limbile in care te astepti sa primesti mesaje. Orice mesaj receptionat intr-o alta limba va fi considerat spam.';
+$messages['headersexp'] = 'Spamassassin adauga headere la mesajele procesate furnizand informatii despre rezultate. Foloseste optiunile de mai jos pentru a configura aceste headere.';
+$messages['spamtestssexp'] = 'Unele verificari folosesc servicii de pe internet in vederea detectarii spamului. Selecteaza-le pe cele pe care doresti sa le folosesti.';
+$messages['spamreport'] = 'Cand un mesaj este identificat ca spam, este creat un raport al testelor si al scorurilor. ';
+$messages['autowhitelist'] = 'Adresele de email din agenda sunt adaugate automat in lista adreselor acceptate automat.';
+$messages['whitelistexp'] = 'O steluta (*) poate fi folosita ca inlocuitor global pentru o flexibilitate marita. De ex. *@exemplu.com sau *@*.exemplu.com';
+$messages['spamaddressexists'] = 'Exista deja o regula pentru aceasta adresa.';
+$messages['spamenteraddress'] = 'Te rog sa introduci o adresa pentru a o adauga.';
+$messages['spamaddresserror'] = 'Eroare: Adresa pare invalida.';
+$messages['spamaddressdelete'] = 'Esti sigur ca doresti sa stergi aceasta regula?';
+$messages['spamaddressdeleteall'] = 'Esti sigur ca doresti sa stergi toate regulile?';
+$messages['noaddressrules'] = 'Nu a fost gasita nici o regula.';
+$messages['importingaddresses'] = 'Import adresele ....';
+$messages['usedefaultconfirm'] = 'Esti sigur ca doresti sa revi la setarile initiale? Aceasta actiune va sterge toate setarile efectuate pana in prezent .';
+$messages['purgebayesexp'] = 'Sterge datele personale ale filtrului Bayesyan colectate de pe adresa ta.';
+$messages['bayesnonspamexp'] = 'mesajele care au un scor sub acest prag vor fi folosite pentru antrenarea filtrului non spam';
+$messages['bayesspamexp'] = 'Mesajele care au un scor peste acest prag vor fi folosite pentru detectarea mesajelor spam.';
+$messages['bayesautohelp'] = 'Atunci cand este activat filtrul Bayesian autodidact, acesta proceseaza automat mesajele care sunt foarte probabil spam/non spam si foloseste aceste informatii pentru a imbunatati filtrele de detectie.';
+$messages['bayeshelp'] = 'Filtrul Bayesian clasificator incearca sa identifice spam-ul uitandu-se la cuvinte sau secvente de caractere care sunt folosite frecvent in spam sau non spam.';
+$messages['rblhelp'] = 'Adresele web gasite in legaturile din mesaje vor fi verificate in cateva liste negre sau liste cu spamer cunoscuti deja.';
+$messages['dcchelp'] = 'The DCC or Distributed Checksum Clearinghouse is a system of servers collecting and counting checksums (or signatures) of millions of mail messages every day. The greater the similarity the checksum of an incoming message has to the list the more likely it is to be spam.';
+$messages['pyzhelp'] = 'Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages. The digests are generated in a number of different ways to allow for small differences in the content of the message.';
+$messages['raz2help'] = 'Vipul\'s Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content. The spam reports are validated through reputation assignments given to each reporter.';
+$messages['raz1help'] = 'ipul\'s Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content. The spam reports are validated through reputation assignments given to each reporter. Version 1 has now been replaced by version 2 and is no longer supported.';
+$messages['levelhelp'] = 'The \'Spam Level\' header can be added to a message to indicate the score given to a message by repeating the character specified that many times. This may be useful for further processing of the message.';
+$messages['foldhelp'] = 'Should headers added by SpamAssassin will be wrapped? In other words, should they be broken up into multiple lines instead of one very long one. When a line is broken it will be indented to mark it as a continuation of the preceding one.';
+$messages['bayesruleshlp'] = 'Before the Bayesian-style classifier can be used effectively it must be "trained" to properly detect spam/non spam messages. Disabling the Bayesian rules allows the system to continue to learn both automatically and manually from incoming mail but it will not be used to detect spam.';
+$messages['purgebayesconfirm'] = 'Esti sigur ca doresti sa stergi toate datele Bayesiane?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/ru_RU.inc b/plugins/sauserprefs/localization/ru_RU.inc
new file mode 100644
index 000000000..3681836bb
--- /dev/null
+++ b/plugins/sauserprefs/localization/ru_RU.inc
@@ -0,0 +1,87 @@
+<?php
+/* Author: Sergey Khaliulov
+ Updates: Vladislav Bogdanov
+*/
+
+$labels = array();
+$labels['sauserprefs'] = 'Спам фильтр';
+$labels['sauserprefssettings'] = 'Настройки спам фильтра';
+$labels['spamgeneralsettings'] = 'Основные параметры';
+$labels['spamthres'] = 'Порог оценки';
+$labels['spamsubject'] = 'Метка спама в теме сообщения';
+$labels['spamsubjectblank'] = '(оставьте пустым, чтобы не менять тему сообщения)';
+$labels['spamlang'] = 'Языки сообщения';
+$labels['enabled'] = 'Включен';
+$labels['disabled'] = 'Отключен';
+$labels['headers'] = 'Заголовки сообщения';
+$labels['foldheaders'] = 'Разрешить многострочные записи в заголовках';
+$labels['spamlevelstars'] = 'Использовать заголовок \'Spam Level\'';
+$labels['spamlevelchar'] = 'Символ уровня спама';
+$labels['spamtests'] = 'Internet-проверки';
+$labels['userazor1'] = 'Использовать Razor v1';
+$labels['userazor2'] = 'Использовать Razor v2';
+$labels['usepyzor'] = 'Использовать Pyzor';
+$labels['usebayes'] = 'Включить "наивный" Байесовский классификатор';
+$labels['usedcc'] = 'Использовать DCC';
+$labels['skiprblchecks'] = 'Использовать Черные Списки адресов (RBL)';
+$labels['spamreportsettings'] = 'Параметры уведомления';
+$labels['spamreport0'] = 'Добавить отчет в заголовки оригинального сообщения';
+$labels['spamreport1'] = 'Добавить в отчет оригинал письма как MIME вложение';
+$labels['spamreport2'] = 'Добавить в отчет оригинал письма как текст';
+$labels['spamaddressrules'] = 'Фильтры по адресу';
+$labels['whitelist_from'] = 'Принимать письма от:';
+$labels['blacklist_from'] = 'Отбрасывать письма от:';
+$labels['whitelist_to'] = 'Принимать полученные для:';
+$labels['addrule'] = 'Добавить';
+$labels['rule'] = 'Правило';
+$labels['importfromaddressbook'] = 'Импортировать адреса из Адресной книги';
+$labels['deleteall'] = 'Удалить все';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'По умолчанию';
+$labels['otherscore'] = 'Другой (%s)';
+$labels['usedefault'] = 'Восстановить настройки по умолчанию';
+$labels['langoptions'] = 'Языки';
+$labels['bayes'] = 'Байесовский фильтр';
+$labels['purgingbayes'] = 'Удаляется статистика Байесовского фильтра...';
+$labels['purgebayes'] = 'Удалить собранную статистику';
+$labels['bayesautolearn'] = 'Включить авто-обучение Байесовского фильтра';
+$labels['bayesautooptions'] = 'Параметры авто-обучения';
+$labels['bayesnonspam'] = 'Граница не-СПАМа';
+$labels['bayesspam'] = 'Граница СПАМа';
+$labels['bayesrules'] = 'Использовать Байесовский фильтр для оценки сообщений';
+$labels['help'] = 'Помощь';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Параметры фильтрации спама изменены';
+$messages['sauserpreffailed'] = 'Ошибка: Невозможно изменить параметры';
+$messages['spamthresexp'] = 'Система фильтрации спама использует числовые оценки для классификации сообщений. Используется большое количество тестов, каждый из которых возвращает определенное числовое значение при соответствии сообщения этому тесту. Результаты всех тестов суммируются для получения общей числовой оценки сообщения. При превышении полученной оценкой указанного порога - сообщение помечается как спам. Увеличение этого порога увеличит количество пропущенного спама, но и уменьшит риск ложных срабатываний. Общепринятым значением оценки, разделяющим СПАМ и не-СПАМ является число 5. Сообщения с оценкой более 8 практически в 100% случаев являются спамом.';
+$messages['spamlangexp'] = 'Любые полученные сообщения, которые написаны не на выбранном языке будут рассматриваться в качестве возможного спама.';
+$messages['headersexp'] = 'SpamAssassin добавляет в заголовки проверенных сообщений записи с информацией о результатах проверки. Укажите параметры добавляемых заголовков:';
+$messages['spamtestssexp'] = 'Некоторые алгоритмы проверки на спам используют интернет сервисы. Выберите те, которые Вы желаете использовать:';
+$messages['spamreport'] = 'Если сообщение идентифицировано как спам, сообщение должно быть сформировано следующим образом:';
+$messages['autowhitelist'] = 'Адреса электронной почты в Вашей Адресной книге могут быть автоматически добавлены к списку "Принимать письма от" (белый список).';
+$messages['whitelistexp'] = 'Звездочка (*) может использоваться как групповой символ для большей гибкости. Например: *@example.com или *@*.example.com. В общем случае не следует заносить много адресов в список "Отбрасывать письма от" (черный список), так как большинство адресов отправителей используются для рассылки спама только один раз. Этот список стоит использовать только в исключительных случаях, для блокирования писем от особо навязчивых нежелательных корреспондентов.';
+$messages['spamaddressexists'] = 'Правило уже существует для этого адреса';
+$messages['spamenteraddress'] = 'Введите адрес для добавления правила';
+$messages['spamaddresserror'] = 'Ошибка: Адрес указан неверно';
+$messages['spamaddressdelete'] = 'Вы дествительно хотите удалить это правило?';
+$messages['spamaddressdeleteall'] = 'Вы уверены что хотите удалить все правила фильтрации по адресу?';
+$messages['noaddressrules'] = 'Правил фильтрации по адресу не найдено.';
+$messages['importingaddresses'] = 'Импорт адресов...';
+$messages['usedefaultconfirm'] = 'Вы уверены, что Вы хотите восстановить настройки по умолчанию? Это удалит все Ваши настройки, включая правила проверки адреса.';
+$messages['purgebayesexp'] = 'Удалить все данные, собранные Байсовским фильтром из Ваших сообщений';
+$messages['bayesnonspamexp'] = 'Фильтр автоматически занесет сообщения, оценка которых НИЖЕ этого значения, в базу не-СПАМ сообщений.';
+$messages['bayesspamexp'] = 'Фильтр автоматически занесет сообщения, оценка которых ВЫШЕ этого значения, в базу СПАМ сообщений.';
+$messages['bayesautohelp'] = 'Позволяет автоматически заносить сообщения, с большой долей вероятности распознанные (при помощи других тестов) как СПАМ либо не-СПАМ, в соответствующие базы данных Байесовского фильтра.';
+$messages['bayeshelp'] = 'Байесовский фильтр (также известен как "наивный" Байесовский классификатор) - это обучаемая система, собирающая статистику вхождения слов либо коротких последовательностей символов в СПАМ и не-СПАМ сообщения. При большом объеме данных (более 200 достаточно свежих сообщений каждого типа) Байесовский фильтр позволяет достаточно точно классифицировать последующие сообщения как СПАМ либо не-СПАМ.';
+$messages['rblhelp'] = 'Адреса серверов, указанные в гипертекстовых ссылках, найденных в тексте сообщения, будут проверены в \'Черных Списках\', содержащих известные источники спама.';
+$messages['dcchelp'] = 'DCC (Distributed Checksum Clearinghouse, Распределенный Центр Контрольных сумм) - это система, подсчитывающая количество похожих сообщений, принятых пользователями Internet по всему миру. Ежедневно обрабатывается более 300 миллионов сообщений. Чем больше количество похожих друг на друга сообщений - тем больше вероятность, что это спам. Внимание: сообщения популярных списков рассылки могут быть распознаны как спам с точки зрения DCC. Поэтому рекомендуется отфильтровывать такие сообщения до Спам-фильтра (например при помощи SIEVE-фильтров или Procmail-фильтров, если они поддерживаются сервером).';
+$messages['pyzhelp'] = 'Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages.';
+$messages['raz2help'] = 'Серверы системы Razor хранят большое количество контрольных сумм сообщений, зарегистрированных как спам многочисленными пользователями системы. Очень малое количество ложных срабатываний обеспечивается механизмом "репутации" пользователя.';
+$messages['raz1help'] = 'Устаревшая и неподдерживаемая версия системы Razor. Используйте Razor v2.';
+$messages['levelhelp'] = 'The \'Spam Level\' header can be added to a message to indicate the score given to a message by repeating a character a certain number of times.';
+$messages['foldhelp'] = 'By default, headers added by SpamAssassin will be whitespace folded. In other words, they will be broken up into multiple lines instead of one very long one and each other line will have a tabulator prepended to mark it as a continuation of the preceding one.';
+$messages['bayesruleshlp'] = 'Позволяет использовать данные, собранные при помощи автоматического и ручного методов обучения Байесовского фильтра, для классификации последующих сообщений. Внимание: для классификации требуется большая предварительно собранная база (по 200 свежих сообщений каждого типа). В противном случае фильтр не работает даже если эта опция включена.';
+$messages['purgebayesconfirm'] = 'Вы уверены, что хотите удалить всю собранную статистику Байесовского фильтра?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/sk_SK.inc b/plugins/sauserprefs/localization/sk_SK.inc
new file mode 100644
index 000000000..4cefe9928
--- /dev/null
+++ b/plugins/sauserprefs/localization/sk_SK.inc
@@ -0,0 +1,86 @@
+<?php
+/* Author: Michal Michalac */
+
+$labels = array();
+$labels['sauserprefs'] = 'Spam';
+$labels['sauserprefssettings'] = 'Nastavenia Spam-u';
+$labels['spamgeneralsettings'] = 'Všeobecné nastavenia';
+$labels['spamthres'] = 'Hranica skóre';
+$labels['spamsubject'] = 'Značka v predmete';
+$labels['spamsubjectblank'] = '(nechajte prázdne pre žiadnu)';
+$labels['spamlang'] = 'Jazyk správ';
+$labels['enabled'] = 'Povolený';
+$labels['disabled'] = 'Zakázaný';
+$labels['headers'] = 'Hlavičky správ';
+$labels['foldheaders'] = 'Povoliť viacriadkové hlavičky';
+$labels['spamlevelstars'] = 'Vytvárať hlavičku \'Spam Level\' (úroveň spamu)';
+$labels['spamlevelchar'] = 'Znak úrovne spamu';
+$labels['spamtests'] = 'Internetové spam testy';
+$labels['userazor1'] = 'Používať Razor v1';
+$labels['userazor2'] = 'Používať Razor v2';
+$labels['usepyzor'] = 'Používať Pyzor';
+$labels['usebayes'] = 'Používať Bayesovský klasifikátor';
+$labels['usedcc'] = 'Používať DCC';
+$labels['skiprblchecks'] = 'Používať RBL';
+$labels['spamreportsettings'] = 'Nastavenia reportu';
+$labels['spamreport0'] = 'Vkladať informácie len do hlavičiek pôvodného e-mailu';
+$labels['spamreport1'] = 'Vkladať pôvodný e-mail ako MIME prílohu reportu';
+$labels['spamreport2'] = 'Vkladať pôvodný e-mail ako textovú prílohu reportu';
+$labels['spamaddressrules'] = 'Pravidlá adries';
+$labels['whitelist_from'] = 'Prijímať e-maily od';
+$labels['blacklist_from'] = 'Odmietať e-maily od';
+$labels['whitelist_to'] = 'Prijímať e-maily zaslané komu';
+$labels['addrule'] = 'Pridať';
+$labels['rule'] = 'Pravidlo';
+$labels['importfromaddressbook'] = 'Importovať adresy z adresára';
+$labels['deleteall'] = 'Vymazať všetky';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Predvolená';
+$labels['otherscore'] = 'Iná (%s)';
+$labels['usedefault'] = 'Obnoviť predvolené nastavenia';
+$labels['langoptions'] = 'Jazykové voľby';
+$labels['bayes'] = 'Nastavenia Bayesu';
+$labels['purgingbayes'] = 'Vymazávam Bayesiánsku databázu...';
+$labels['purgebayes'] = 'Vymazať vlastnú Bayesiánsku databázu';
+$labels['bayesautolearn'] = 'Použiť automatické učenie Bayes';
+$labels['bayesautooptions'] = 'Voľby automatického učenia';
+$labels['bayesnonspam'] = 'Hranica pre nespam';
+$labels['bayesspam'] = 'Hranica pre spam';
+$labels['bayesrules'] = 'Využívať Baysiánske pravidlá';
+$labels['help'] = 'Pomoc';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Nastavenia spamu úspešne zmenené';
+$messages['sauserpreffailed'] = 'Chyba: Nastavenia spamu sa nepodarilo zmeniť';
+$messages['spamthresexp'] = "Všetky maily so skóre vyšším, ako určená hranica, budú označené ako spam.
+Zvýšením tejto hranice sa zväčší počet nerozpoznaných spamov, na druhej strane sa ale zníži počet mailov chybne označených ako spam.";
+$messages['spamlangexp'] = "Vyberte všetky jazyky v ktorých predpokladáte príjem e-mailov. Všetky prijaté správy napísané v iných jazykoch budú brané ako pravdepodobný spam.";
+$messages['headersexp'] = "SpamAssassin pridáva do kontrolovaných e-mailov hlavičky s infomráciami o výsledkoch kontroly. Použite nasledujúce voľby na ich prispôsobenie.";
+$messages['spamtestssexp'] = 'Niektoré testy pri detekcii spamu používajú externé služby na internete. Vyberte tie, ktoré chcete využívať:';
+$messages['spamreport'] = 'Keď je e-mail identifikovaný ako spam, vytvorí sa report o všetkých testoch a ich dosiahnutom skóre...';
+$messages['autowhitelist'] = 'Email addresses in your Address Book are automatically added to the \'Accept Mail From\' list.';
+$messages['whitelistexp'] = "V e-mailových adresách môže byť použitý zástupný znak hviezdička (*). Napr.: *@domena.sk or *@*.domena.sk.";
+$messages['spamaddressexists'] = 'Previdlo pre túto adresu už existuje';
+$messages['spamenteraddress'] = 'Prosím zadajte adresu, ktorú chcete pridať';
+$messages['spamaddresserror'] = 'Chyba: Adresa vyzará neplatná';
+$messages['spamaddressdelete'] = 'Ste si istí, že chcete naozaj vymazať toto pravidlo?';
+$messages['spamaddressdeleteall'] = 'Ste si istí, že chcete naozaj vymazať všetky pravidlá adries?';
+$messages['noaddressrules'] = 'Neboli nájdené žiadne pravidlá adries.';
+$messages['importingaddresses'] = 'Importujem adresy...';
+$messages['usedefaultconfirm'] = 'Ste si istí, že chcete naozaj obnoviť predvolené nastavenia? To vymaže všetky Vaše nastavenia, vrátane pravidiel adries.';
+$messages['purgebayesexp'] = 'Vymaže osobnú Bayesiánsku databázu vytvorenú z Vašich e-mailov';
+$messages['bayesnonspamexp'] = 'E-maily s nižším skóre ako uvedená hranica budú použité na zlepšenie detekcie (naučenie) nespamových správ.';
+$messages['bayesspamexp'] = 'E-maily s vyšším skóre ako uvedená hranica budú použité na zlepšenie detekcie (naučenie) spamových správ.';
+$messages['bayesautohelp'] = 'Keď je automatické učenie zapnuté, systém použije správy ktoré s veľkou istotou prehlási za spam/nespam na zlepšenie detekčných filtrov.';
+$messages['bayeshelp'] = 'Bayesovský klasifikátor sa snaží identifikovať spam podľa slov, alebo zhluku znakov, ktoré sa obvykle vyskytujú v spamových, alebo nespamových e-mailoch.';
+$messages['rblhelp'] = 'IP adresy serverov v hlavičkách, alebo v odkazoch v e-maili budú vyhľadané na niektorých blacklistoch. Blacklisty sú zoznamy známych adries spammerov, ktoré sa aktualizujú v reálnom čase.';
+$messages['dcchelp'] = 'DCC, alebo distribuované výmenné centrum kontrolných súčtov, je systém serverov zbierajúcich a vypočítavajúcich kontrolné súčty (či podpisy) miliónov e-mailov denne. Podľa podobnosti kontrolného súčtu príchodzej správy voči zoznamu evidovaných sa určuje pravdepodobnosť spamu.';
+$messages['pyzhelp'] = 'Pyzor je sieťový systém na detekciu a blokovanie spamu pomocou digestu správ. Digesty sa vypočítavajú niekoľkými spôsobmi tak, aby dokázali tolerovať malú zmenu v obsahu správy.';
+$messages['raz2help'] = 'Vipul\'s Razor je distribuovaná spolupracujúca sieť na detekciu a blokovanie spamu, pracujúca na základe užívateľmi zaslaných spamových vzoriek. Tieto vzorky sú zohľadňované podľa reputácie užívateľa, ktorý ich poskytol. Detekcia sa robí pomocou charakteristík, ktoré efektívne zachytávajú aj meniaci sa obsah spamu.';
+$messages['raz1help'] = 'Vipul\'s Razor je distribuovaná spolupracujúca sieť na detekciu a blokovanie spamu, pracujúca na základe užívateľmi zaslaných spamových vzoriek. Tieto vzorky sú zohľadňované podľa reputácie užívateľa, ktorý ich poskytol. Detekcia sa robí pomocou charakteristík, ktoré efektívne zachytávajú aj meniaci sa obsah spamu. Verzia 1 bola nahradená verziou 2 a nie je už naďalej podporovaná.';
+$messages['levelhelp'] = 'Hlavička \'Spam Level\' zobrazuje opakovaním znaku (napr. hviezdičky) skóre, ktoré kontrolovaný e-mail získal. To môže byť užitočné pri ďalšom spracovaní e-mailu.';
+$messages['foldhelp'] = 'Môžu byť hlavičky pridané do e-mailu SpamAssassinom rozdelené na viac riadkov, namiesto toho, aby boli na jednom veľmi dlhom riadku? Keď je riadok rozdelený, jeho pokračovanie je označené odsadením.';
+$messages['bayesruleshlp'] = 'Predtým, ako môže byt Bayesovský klasifikátor efektívne použitý, musí sa natrénovať správne rozoznávať spam od nespamu. Vypnutím Bayesiánskych pravidiel umožníte systému učiť sa z prichádzajúcich e-mailov, ale nebude sa používať na detekciu spamu..';
+$messages['purgebayesconfirm'] = 'Ste si istí, že chcete naozaj vymazať celú Vašu Bayesiánsku databázu?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/localization/sv_SE.inc b/plugins/sauserprefs/localization/sv_SE.inc
new file mode 100644
index 000000000..029ee86a5
--- /dev/null
+++ b/plugins/sauserprefs/localization/sv_SE.inc
@@ -0,0 +1,84 @@
+<?php
+/* Author: Reino Wallin */
+
+$labels = array();
+$labels['sauserprefs'] = 'Skräppost';
+$labels['sauserprefssettings'] = 'Inställningar för skräppost';
+$labels['spamgeneralsettings'] = 'Allmänna inställningar';
+$labels['spamthres'] = 'Tröskelvärde';
+$labels['spamsubject'] = 'Rubrikmärkning';
+$labels['spamsubjectblank'] = '(lämna tom om du inte vill lägga till någon text till rubriken)';
+$labels['spamlang'] = 'Brevets språk';
+$labels['enabled'] = 'Aktiverad';
+$labels['disabled'] = 'Ej aktiverad';
+$labels['headers'] = 'Brevhuvud';
+$labels['foldheaders'] = 'Tillåt flera rader i brevhuvudet';
+$labels['spamlevelstars'] = 'Använd \'Spam Level\' i brevhuvudet';
+$labels['spamlevelchar'] = 'Tecken för \'Spam Level\'';
+$labels['spamtests'] = 'Internetbaserade tester av skräppost';
+$labels['userazor1'] = 'Använd Razor v1';
+$labels['userazor2'] = 'Använd Razor v2';
+$labels['usepyzor'] = 'Använd Pyzor';
+$labels['usebayes'] = 'Använd bayesklassificering';
+$labels['usedcc'] = 'Använd DCC';
+$labels['skiprblchecks'] = 'Använd svartlistor i realtid';
+$labels['spamreportsettings'] = 'Rapportinställningar';
+$labels['spamreport0'] = 'Lägg till rapporten till originalbrevets brevhuvud';
+$labels['spamreport1'] = 'Sänd rapporten med originalbrevet som en MIME-bilaga';
+$labels['spamreport2'] = 'Sänd rapporten med originalbrevet som en text-bilaga';
+$labels['spamaddressrules'] = 'Adressregler';
+$labels['whitelist_from'] = 'Acceptera brev från';
+$labels['blacklist_from'] = 'Avvisa brev från';
+$labels['whitelist_to'] = 'Acceptera brev till';
+$labels['addrule'] = 'Lägg till';
+$labels['rule'] = 'Regel';
+$labels['importfromaddressbook'] = 'Importera adresser från adressboken';
+$labels['deleteall'] = 'Radera alla';
+$labels['autoscore'] = 'Auto';
+$labels['defaultscore'] = 'Använd grundinställningar';
+$labels['otherscore'] = 'Annan (%s)';
+$labels['usedefault'] = 'Återställ grundinställningar';
+$labels['langoptions'] = 'Språkinställningar';
+$labels['bayes'] = 'Bayesinställningar';
+$labels['purgingbayes'] = 'Raderar bayesdata...';
+$labels['purgebayes'] = 'Radera personliga bayesdata';
+$labels['bayesautolearn'] = 'Använd bayesinlärning';
+$labels['bayesautooptions'] = 'Inställningar för inlärning';
+$labels['bayesnonspam'] = 'Tröskelvärde för vanliga brev';
+$labels['bayesspam'] = 'Tröskelvärde för skräppost';
+$labels['bayesrules'] = 'Använd bayesregler';
+$labels['help'] = 'Hjälp';
+
+$messages = array();
+$messages['sauserprefchanged'] = 'Dina inställningar för skräppost har sparats';
+$messages['sauserpreffailed'] = 'Fel: Det går inte att spara dina inställningar för skräppost';
+$messages['spamthresexp'] = 'Alla brev som vid granskningen av SpamAssassin får ett värde som överstiger tröskelvärdet för skräppost blir märkta som skräppost. Ökar man tröskelvärdet innebär det att viss skräppost inte blir märkt som skräppost, men man reducerar också risken att vanliga brev blir märkta som skräppost.';
+$messages['spamlangexp'] = 'Välj de språk du förväntar dig att mottagna brev är skrivna på. Brev som är skrivna på andra språk än de du inte valt kommer att bli betrakade som möjlig skräppost';
+$messages['headersexp'] = 'SpamAssassin lägger till information i brevhuvudet på brev som granskats av SpamAssassin. Informationen beskriver resultatet av granskningen. Använd inställningarna nedan för att konfigurera dessa brevhuvuden.';
+$messages['spamtestssexp'] = 'Vissa kontroller som SpamAssassin utför för att karaktärisera ett brev, baseras på tjänster på Internet. Välj de tjänster du önskar använda dig av:';
+$messages['spamreport'] = 'När ett brev karaktäriseras som skräppost skapas en rapport med alla resulten från granskningen som SpamAssassin gör...';
+$messages['autowhitelist'] = 'Lägg per automatik till adresserna i din adressbok till \'Acceptera brev från\' listan.';
+$messages['whitelistexp'] = 'Du kan använda en asterisk (*) för att skapa ett mer flexibelt regelverk, exempelvis: *@example.com eller *@*.example.com.';
+$messages['spamaddressexists'] = 'En regel finns redan för denna adressen';
+$messages['spamenteraddress'] = 'Ange en adress att lägga till';
+$messages['spamaddresserror'] = 'Fel: Ogiltlig adress';
+$messages['spamaddressdelete'] = 'Är du säker på att du vill radera denna adressregel?';
+$messages['spamaddressdeleteall'] = 'Är du säker på att du vill radera alla adressregler?';
+$messages['noaddressrules'] = 'Det existerar inga adressregler.';
+$messages['importingaddresses'] = 'Importerar adresser...';
+$messages['usedefaultconfirm'] = 'Är du säker på att du vill återställa grundinställninganra? Om så sker raderar du dina nuvarande inställningar, som exempelvis dina adressregler.';
+$messages['purgebayesexp'] = 'Radera personliga bayesdata som samlats in från dina brev';
+$messages['bayesnonspamexp'] = 'Brev som erhåller ett skräppostvärde under detta tröskelvärde kommer att användas för att förbättra skräppostsystemets förmåga att identifiera brev som inte är skräppost.';
+$messages['bayesspamexp'] = 'Brev som erhåller ett skräppostvärde över detta tröskelvärde kommer att användas för att förbättra skräppostsystemets förmåga att identifiera skräppost.';
+$messages['bayesautohelp'] = 'Om bayesinlärning är aktiverat kommer skräppostsystemet att vid granskningen av brev, som med stor sannolikhet är spräppost eller med stor sannolikhet är vanliga brev, att automatiskt uppdatera sin databas och förbättra sin förmåga att detektera skräppost. Brev som är mer svårbedömda kommer inte att användas vid inlärningen';
+$messages['bayeshelp'] = 'Vid klassificering av brev baserat på Bayes försöker man identifiera spräppost med hjälp av ord, eller korta bokstavssekvenser, som är vanligt förekommande i vanliga brev respektive skräppost.';
+$messages['rblhelp'] = 'Serveradresser som finns i länkar infogade i brev kommer att kontrolleras mot ett flertal \'svartlistor\' och listor över välkända källor för skräppost.';
+$messages['dcchelp'] = 'DCC (Distributed Checksum Clearinghouse) är en internettjänst baserad på ett antal sevrar som dagligen samlar in och beräknar checksumman för miljontals brev. Checksumman för inkommande brev jämförs med data i databasen och desto större likhet som råder desto större sannolikhet är det att brevet är att betrakta som skräppost.';
+$messages['pyzhelp'] = 'Pyzor är en distribuerad internettjänst för att detektera skräppost. Den baseras på att man beräknar en checksumma av brevet som kontrolleras mot nätverksbaserade databaser för att se om andra har klassificerat brevtexten som skräppost.';
+$messages['raz2help'] = 'Vipul\'s Razor är en distribuerad internettjänst för att detektera skräppost. Den baseras på att man beräknar en checksumma av brevet som kontrolleras mot nätverksbaserade databaser för att se om andra har klassificerat brevtexten som skräppost. Razor är effektivt även när det gäller så kallade muterade brevtexter.';
+$messages['levelhelp'] = 'Brevhuvudet benämnt \'Spam Level\', som visar hur brevet klassificerats, kan läggas till breven och underlätta för vidare behandling.';
+$messages['foldhelp'] = 'Skall de brevhuvud som SpamAssassin lägger till brevet struktureras som en lång rad eller ett flertal separata brevhuvud.';
+$messages['bayesruleshlp'] = 'Innan bayesklassificering kan göras effektivt måste en inlärning av vad som är spräppost respektive vanliga brev ske. Om man inte väljer att använda bayesklassificering kommer skräppostsystemet att öka sin förmåga att detektera skräppost genom både manuellt och automatiskt inlärning, men klassificering kommer inte att ske.';
+$messages['purgebayesconfirm'] = 'Är du säker på att du vill radera alla dina bayesdata?';
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/package.xml b/plugins/sauserprefs/package.xml
new file mode 100644
index 000000000..e6845a1dc
--- /dev/null
+++ b/plugins/sauserprefs/package.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>sauserprefs</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-SpamAssassin-User-Prefs-SQL/</uri>
+ <summary>Control SpamAssassin settings from within Roundcube</summary>
+ <description>Adds a 'Spam' tab to the 'Personal Settings' to allow the user to change their SpamAssassin preferences. Preferences must be stored in a SQL database. Default preferences are used when no user preference is found.</description>
+ <lead>
+ <name>Philip Weir</name>
+ <user>JohnDoh</user>
+ <email>roundcube@tehinterweb.co.uk</email>
+ <active>yes</active>
+ </lead>
+ <date>2013-02-24</date>
+ <time>10:16:53</time>
+ <version>
+ <release>1.10</release>
+ <api>1.10</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>-</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="sauserprefs.php" role="php">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="sauserprefs.js" role="data">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="config.inc.php.dist" role="data"/>
+ <file name="CHANGELOG" role="data"/>
+ <file name="README.md" role="data"/>
+ <file name="include/rcube_sauserprefs_storage.php" role="php"/>
+ <file name="localization/cs_CZ.inc" role="data"/>
+ <file name="localization/de_CH.inc" role="data"/>
+ <file name="localization/de_DE.inc" role="data"/>
+ <file name="localization/en_GB.inc" role="data"/>
+ <file name="localization/en_US.inc" role="data"/>
+ <file name="localization/es_ES.inc" role="data"/>
+ <file name="localization/fr_FR.inc" role="data"/>
+ <file name="localization/gl_ES.inc" role="data"/>
+ <file name="localization/hu_HU.inc" role="data"/>
+ <file name="localization/it_IT.inc" role="data"/>
+ <file name="localization/pl_PL.inc" role="data"/>
+ <file name="localization/pt_BR.inc" role="data"/>
+ <file name="localization/ro_RO.inc" role="data"/>
+ <file name="localization/ru_RU.inc" role="data"/>
+ <file name="localization/sk_SK.inc" role="data"/>
+ <file name="localization/sv_SE.inc" role="data"/>
+ <file name="skins/classic/help.gif" role="data"/>
+ <file name="skins/classic/icons.gif" role="data"/>
+ <file name="skins/classic/icons.png" role="data"/>
+ <file name="skins/classic/ie6hacks.css" role="data"/>
+ <file name="skins/classic/iehacks.css" role="data"/>
+ <file name="skins/classic/safari.css" role="data"/>
+ <file name="skins/classic/sauserprefs.css" role="data"/>
+ <file name="skins/classic/tabstyles.css" role="data"/>
+ <file name="skins/classic/templates/sauserprefs.html" role="data"/>
+ <file name="skins/classic/templates/settingsedit.html" role="data"/>
+ <file name="skins/larry/help.png" role="data"/>
+ <file name="skins/larry/icons.png" role="data"/>
+ <file name="skins/larry/iehacks.css" role="data"/>
+ <file name="skins/larry/listicons.png" role="data"/>
+ <file name="skins/larry/safari.css" role="data"/>
+ <file name="skins/larry/sauserprefs.css" role="data"/>
+ <file name="skins/larry/tabstyles.css" role="data"/>
+ <file name="skins/larry/templates/sauserprefs.html" role="data"/>
+ <file name="skins/larry/templates/settingsedit.html" role="data"/>
+ </dir>
+ <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.1</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>
diff --git a/plugins/sauserprefs/sauserprefs.js b/plugins/sauserprefs/sauserprefs.js
new file mode 100644
index 000000000..3b965566f
--- /dev/null
+++ b/plugins/sauserprefs/sauserprefs.js
@@ -0,0 +1,459 @@
+/**
+ * SAUserPrefs plugin script
+ */
+
+rcube_webmail.prototype.sauserprefs_toggle_level_char = function(checkbox) {
+ var level_char;
+
+ if (level_char = rcube_find_object('rcmfd_spamlevelchar'))
+ level_char.disabled = !checkbox.checked;
+}
+
+rcube_webmail.prototype.sauserprefs_toggle_bayes = function(checkbox) {
+ var tickbox;
+ var dropdown;
+
+ if (tickbox = rcube_find_object('rcmfd_spambayesrules'))
+ tickbox.disabled = !checkbox.checked;
+
+ if (tickbox = rcube_find_object('rcmfd_spambayesautolearn'))
+ tickbox.disabled = !checkbox.checked;
+
+ if ((dropdown = rcube_find_object('rcmfd_bayesnonspam')) && (tickbox.checked || !checkbox.checked))
+ dropdown.disabled = !checkbox.checked;
+
+ if ((dropdown = rcube_find_object('rcmfd_bayesspam')) && (tickbox.checked || !checkbox.checked))
+ dropdown.disabled = !checkbox.checked;
+}
+
+rcube_webmail.prototype.sauserprefs_toggle_bayes_auto = function(checkbox) {
+ var dropdown;
+
+ if (dropdown = rcube_find_object('rcmfd_bayesnonspam'))
+ dropdown.disabled = !checkbox.checked;
+
+ if (dropdown = rcube_find_object('rcmfd_bayesspam'))
+ dropdown.disabled = !checkbox.checked;
+}
+
+rcube_webmail.prototype.sauserprefs_addressrule_import = function(address) {
+ parent.rcmail.set_busy(false, null, rcmail.env.sauserprefs_whitelist);
+
+ var adrTable = rcube_find_object('address-rules-table').tBodies[0];
+
+ var actions = document.getElementsByName('_address_rule_act[]');
+ var prefs = document.getElementsByName('_address_rule_field[]');
+ var addresses = document.getElementsByName('_address_rule_value[]');
+ var insHere;
+
+ for (var i = 1; i < addresses.length; i++) {
+ if (addresses[i].value == address && actions[i].value != "DELETE") {
+ return false;
+ }
+ else if (addresses[i].value > address) {
+ insHere = adrTable.rows[i + 1];
+ break;
+ }
+ }
+
+ var newNode = adrTable.rows[0].cloneNode(true);
+ adrTable.rows[1].style.display = 'none';
+
+ if (insHere)
+ adrTable.insertBefore(newNode, insHere);
+ else
+ adrTable.appendChild(newNode);
+
+ newNode.style.display = "";
+ newNode.cells[0].className = "whitelist_from";
+ newNode.cells[0].innerHTML = rcmail.gettext('whitelist_from','sauserprefs');
+ newNode.cells[1].innerHTML = address;
+ actions[newNode.rowIndex - 2].value = "INSERT";
+ prefs[newNode.rowIndex - 2].value = "whitelist_from";
+ addresses[newNode.rowIndex - 2].value = address;
+
+ rcmail.env.address_rule_count++;
+}
+
+rcube_webmail.prototype.sauserprefs_help = function(sel) {
+ var help = rcube_find_object(sel);
+ help.style.display = (help.style.display == 'none' ? '' : 'none');
+ return false;
+}
+
+$(document).ready(function() {
+ if (window.rcmail) {
+ rcmail.addEventListener('init', function(evt) {
+ var tab = $('<span>').attr('id', 'settingstabpluginsauserprefs').addClass('tablink');
+ var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.sauserprefs').attr('title', rcmail.gettext('managespam', 'sauserprefs')).html(rcmail.gettext('sauserprefs','sauserprefs')).appendTo(tab);
+
+ // add button and register command
+ rcmail.add_element(tab, 'tabs');
+
+ if (rcmail.env.action == 'plugin.sauserprefs.edit') {
+ rcmail.register_command('plugin.sauserprefs.select_all_langs', function() {
+ var langlist = document.getElementsByName('_spamlang[]');
+ var obj;
+
+ for (var i = 0; i < langlist.length; i++) {
+ langlist[i].checked = true;
+ obj = rcube_find_object('spam_lang_'+ i);
+ obj.title = rcmail.gettext('enabled','sauserprefs');
+ obj.className = 'enabled';
+ }
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.select_invert_langs', function() {
+ var langlist = document.getElementsByName('_spamlang[]');
+ var obj;
+
+ for (var i = 0; i < langlist.length; i++) {
+ if (langlist[i].checked) {
+ langlist[i].checked = false;
+ obj = rcube_find_object('spam_lang_'+ i);
+ obj.title = rcmail.gettext('disabled','sauserprefs');
+ obj.className = 'disabled';
+ }
+ else {
+ langlist[i].checked = true;
+ obj = rcube_find_object('spam_lang_'+ i);
+ obj.title = rcmail.gettext('enabled','sauserprefs');
+ obj.className = 'enabled';
+ }
+ }
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.select_no_langs', function() {
+ var langlist = document.getElementsByName('_spamlang[]');
+ var obj;
+
+ for (var i = 0; i < langlist.length; i++) {
+ langlist[i].checked = false;
+ obj = rcube_find_object('spam_lang_'+ i);
+ obj.title = rcmail.gettext('disabled','sauserprefs');
+ obj.className = 'disabled';
+ }
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.message_lang', function(lang_code, obj) {
+ var langlist = document.getElementsByName('_spamlang[]');
+ var i = obj.parentNode.parentNode.rowIndex - 1;
+
+ if (langlist[i].checked) {
+ langlist[i].checked = false;
+ obj.title = rcmail.gettext('disabled','sauserprefs');
+ obj.className = 'disabled';
+ }
+ else {
+ langlist[i].checked = true;
+ obj.title = rcmail.gettext('enabled','sauserprefs');
+ obj.className = 'enabled';
+ }
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.addressrule_del', function(props, obj) {
+ var adrTable = rcube_find_object('address-rules-table').tBodies[0];
+ var rowidx = obj.parentNode.parentNode.rowIndex - 1;
+ var fieldidx = rowidx - 1;
+
+ if (!confirm(rcmail.gettext('spamaddressdelete','sauserprefs')))
+ return false;
+
+ if (document.getElementsByName('_address_rule_act[]')[fieldidx].value == "INSERT") {
+ adrTable.deleteRow(rowidx);
+ }
+ else {
+ adrTable.rows[rowidx].style.display = 'none';
+ document.getElementsByName('_address_rule_act[]')[fieldidx].value = "DELETE";
+ }
+
+ rcmail.env.address_rule_count--;
+ if (rcmail.env.address_rule_count < 1)
+ adrTable.rows[1].style.display = '';
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.addressrule_add', function() {
+ var adrTable = rcube_find_object('address-rules-table').tBodies[0];
+ var input_spamaddressrule = rcube_find_object('_spamaddressrule');
+ var selrule = input_spamaddressrule.selectedIndex;
+ var input_spamaddress = rcube_find_object('_spamaddress');
+
+ if (input_spamaddress.value.replace(/^\s+|\s+$/g, '') == '') {
+ alert(rcmail.gettext('spamenteraddress','sauserprefs'));
+ input_spamaddress.focus();
+ return false;
+ }
+ else if (!rcube_check_email(input_spamaddress.value.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true)) {
+ alert(rcmail.gettext('spamaddresserror','sauserprefs'));
+ input_spamaddress.focus();
+ return false;
+ }
+ else {
+ var actions = document.getElementsByName('_address_rule_act[]');
+ var prefs = document.getElementsByName('_address_rule_field[]');
+ var addresses = document.getElementsByName('_address_rule_value[]');
+ var insHere;
+
+ for (var i = 1; i < addresses.length; i++) {
+ if (addresses[i].value == input_spamaddress.value && actions[i].value != "DELETE") {
+ alert(rcmail.gettext('spamaddressexists','sauserprefs'));
+ input_spamaddress.focus();
+ return false;
+ }
+ else if (addresses[i].value > input_spamaddress.value) {
+ insHere = adrTable.rows[i + 1];
+ break;
+ }
+ }
+
+ var newNode = adrTable.rows[0].cloneNode(true);
+ adrTable.rows[1].style.display = 'none';
+
+ if (insHere)
+ adrTable.insertBefore(newNode, insHere);
+ else
+ adrTable.appendChild(newNode);
+
+ newNode.style.display = "";
+ newNode.cells[0].className = input_spamaddressrule.options[selrule].value;
+ newNode.cells[0].innerHTML = input_spamaddressrule.options[selrule].text;
+ newNode.cells[1].innerHTML = input_spamaddress.value;
+ actions[newNode.rowIndex - 2].value = "INSERT";
+ prefs[newNode.rowIndex - 2].value = input_spamaddressrule.options[selrule].value;
+ addresses[newNode.rowIndex - 2].value = input_spamaddress.value;
+
+ input_spamaddressrule.selectedIndex = 0;
+ input_spamaddress.value = '';
+
+ rcmail.env.address_rule_count++;
+ }
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.whitelist_delete_all', function(props, obj) {
+ var adrTable = rcube_find_object('address-rules-table').tBodies[0];
+
+ if (!confirm(rcmail.gettext('spamaddressdeleteall','sauserprefs')))
+ return false;
+
+ for (var i = adrTable.rows.length - 1; i > 1; i--) {
+ if (document.getElementsByName('_address_rule_act[]')[i-1].value == "INSERT") {
+ adrTable.deleteRow(i);
+ rcmail.env.address_rule_count--;
+ }
+ else if (document.getElementsByName('_address_rule_act[]')[i-1].value != "DELETE") {
+ adrTable.rows[i].style.display = 'none';
+ document.getElementsByName('_address_rule_act[]')[i-1].value = "DELETE";
+ rcmail.env.address_rule_count--;
+ }
+ }
+
+ adrTable.rows[1].style.display = '';
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.import_whitelist', function(props, obj) {
+ rcmail.env.sauserprefs_whitelist = rcmail.set_busy(true, 'sauserprefs.importingaddresses');
+ rcmail.http_request('plugin.sauserprefs.whitelist_import', '', rcmail.env.sauserprefs_whitelist);
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.purge_bayes', function(props, obj) {
+ if (confirm(rcmail.gettext('purgebayesconfirm','sauserprefs'))) {
+ var lock = rcmail.set_busy(true, 'sauserprefs.purgingbayes');
+ rcmail.http_request('plugin.sauserprefs.purge_bayes', '', lock);
+ }
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sauserprefs.save', function() { rcmail.gui_objects.editform.submit(); }, true);
+
+ rcmail.register_command('plugin.sauserprefs.default', function() {
+ if (confirm(rcmail.gettext('usedefaultconfirm','sauserprefs'))) {
+ // Score
+ if (rcube_find_object('rcmfd_spamthres'))
+ rcube_find_object('rcmfd_spamthres').selectedIndex = 0;
+
+ // Subject tag
+ if (rcube_find_object('rcmfd_spamsubject'))
+ rcube_find_object('rcmfd_spamsubject').value = rcmail.env.rewrite_header_Subject
+
+ // Languages
+ var langlist = document.getElementsByName('_spamlang[]');
+ var obj;
+ var dlangs = " " + rcmail.env.ok_languages + " ";
+
+ for (var i = 0; i < langlist.length; i++) {
+ langlist[i].checked = false;
+ obj = rcube_find_object('spam_lang_' + i);
+ obj.title = rcmail.gettext('disabled','sauserprefs');
+ obj.className = 'disabled';
+
+ if (dlangs.indexOf(" " + langlist[i].value + " ") > -1) {
+ langlist[i].checked = true;
+ obj = rcube_find_object('spam_lang_' + i);
+ obj.title = rcmail.gettext('enabled','sauserprefs');
+ obj.className = 'enabled';
+ }
+ }
+
+ // Tests
+ if (rcube_find_object('rcmfd_spamuserazor1')) {
+ if (rcmail.env.use_razor1 == '1')
+ rcube_find_object('rcmfd_spamuserazor1').checked = true;
+ else
+ rcube_find_object('rcmfd_spamuserazor1').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spamuserazor2')) {
+ if (rcmail.env.use_razor2 == '1')
+ rcube_find_object('rcmfd_spamuserazor2').checked = true;
+ else
+ rcube_find_object('rcmfd_spamuserazor2').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spamusepyzor')) {
+ if (rcmail.env.use_pyzor == '1')
+ rcube_find_object('rcmfd_spamusepyzor').checked = true;
+ else
+ rcube_find_object('rcmfd_spamusepyzor').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spamusedcc')) {
+ if (rcmail.env.use_dcc == '1')
+ rcube_find_object('rcmfd_spamusedcc').checked = true;
+ else
+ rcube_find_object('rcmfd_spamusedcc').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spamskiprblchecks')) {
+ if (rcmail.env.skip_rbl_checks == '1')
+ rcube_find_object('rcmfd_spamskiprblchecks').checked = true;
+ else
+ rcube_find_object('rcmfd_spamskiprblchecks').checked = false;
+ }
+
+ // Bayes
+ if (rcube_find_object('rcmfd_spamusebayes')) {
+ if (rcmail.env.use_bayes == '1')
+ rcube_find_object('rcmfd_spamusebayes').checked = true;
+ else
+ rcube_find_object('rcmfd_spamusebayes').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spambayesautolearn')) {
+ if (rcmail.env.bayes_auto_learn == '1')
+ rcube_find_object('rcmfd_spambayesautolearn').checked = true;
+ else
+ rcube_find_object('rcmfd_spambayesautolearn').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_bayesnonspam'))
+ rcube_find_object('rcmfd_bayesnonspam').selectedIndex = 0;
+
+ if (rcube_find_object('rcmfd_bayesspam'))
+ rcube_find_object('rcmfd_bayesspam').selectedIndex = 0;
+
+ if (rcube_find_object('rcmfd_spambayesrules')) {
+ if (rcmail.env.use_bayes_rules == '1')
+ rcube_find_object('rcmfd_spambayesrules').checked = true;
+ else
+ rcube_find_object('rcmfd_spambayesrules').checked = false;
+ }
+
+ // Headers
+ if (rcube_find_object('rcmfd_spamfoldheaders')) {
+ if (rcmail.env.skip_rbl_checks == '1')
+ rcube_find_object('rcmfd_spamfoldheaders').checked = true;
+ else
+ rcube_find_object('rcmfd_spamfoldheaders').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spamlevelstars')) {
+ if (rcmail.env.add_header_all_Level != '') {
+ rcube_find_object('rcmfd_spamlevelstars').checked = true;
+ rcube_find_object('rcmfd_spamlevelchar').value = rcmail.env.add_header_all_Level.substr(7, 1);
+ }
+ else {
+ rcube_find_object('rcmfd_spamlevelstars').checked = false;
+ rcube_find_object('rcmfd_spamlevelchar').value = "*";
+ }
+ }
+
+ // Report
+ if (rcube_find_object('rcmfd_spamreport_0')) {
+ if (rcmail.env.report_safe == '0')
+ rcube_find_object('rcmfd_spamreport_0').checked = true;
+ else
+ rcube_find_object('rcmfd_spamreport_0').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spamreport_1')) {
+ if (rcmail.env.report_safe == '1')
+ rcube_find_object('rcmfd_spamreport_1').checked = true;
+ else
+ rcube_find_object('rcmfd_spamreport_1').checked = false;
+ }
+
+ if (rcube_find_object('rcmfd_spamreport_2')) {
+ if (rcmail.env.report_safe == '2')
+ rcube_find_object('rcmfd_spamreport_2').checked = true;
+ else
+ rcube_find_object('rcmfd_spamreport_2').checked = false;
+ }
+
+ // Delete whitelist
+ if (rcube_find_object('address-rules-table')) {
+ var adrTable = rcube_find_object('address-rules-table').tBodies[0];
+ for (var i = adrTable.rows.length - 1; i > 1; i--) {
+ if (document.getElementsByName('_address_rule_act[]')[i-1].value == "INSERT") {
+ adrTable.deleteRow(i);
+ rcmail.env.address_rule_count--;
+ }
+ else if (document.getElementsByName('_address_rule_act[]')[i-1].value != "DELETE") {
+ adrTable.rows[i].style.display = 'none';
+ document.getElementsByName('_address_rule_act[]')[i-1].value = "DELETE";
+ rcmail.env.address_rule_count--;
+ }
+ }
+ adrTable.rows[1].style.display = '';
+ }
+ }
+ }, true);
+
+ rcmail.enable_command('plugin.sauserprefs.save','plugin.sauserprefs.default', true);
+ }
+ });
+
+ if (rcmail.env.action == 'plugin.sauserprefs') {
+ rcmail.section_select = function(list) {
+ var id = list.get_single_selection()
+
+ if (id) {
+ var add_url = '';
+ var target = window;
+ this.set_busy(true);
+
+ if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
+ add_url = '&_framed=1';
+ target = window.frames[this.env.contentframe];
+ }
+
+ target.location.href = this.env.comm_path + '&_action=plugin.sauserprefs.edit&_section=' + id + add_url;
+ }
+
+ return true;
+ }
+ }
+ }
+}); \ No newline at end of file
diff --git a/plugins/sauserprefs/sauserprefs.php b/plugins/sauserprefs/sauserprefs.php
new file mode 100644
index 000000000..8cab496b7
--- /dev/null
+++ b/plugins/sauserprefs/sauserprefs.php
@@ -0,0 +1,909 @@
+<?php
+
+/**
+ * SAUserPrefs
+ *
+ * Plugin to allow the user to manage their SpamAssassin settings using an SQL database
+ *
+ * @version @package_version@
+ * @author Philip Weir
+ */
+class sauserprefs extends rcube_plugin
+{
+ public $task = 'mail|addressbook|settings';
+ private $storage;
+ private $sections = array();
+ private $cur_section;
+ private $global_prefs;
+ private $user_prefs;
+ private $addressbook = '0';
+ private $sa_locales = array('en', 'ja', 'ko', 'ru', 'th', 'zh');
+ private $sa_user;
+ static $deprecated_prefs = array('required_hits' => 'required_score');
+
+ function init()
+ {
+ $rcmail = rcube::get_instance();
+ $this->load_config();
+ $this->sa_user = $rcmail->config->get('sauserprefs_userid', "%u");
+
+ $identity_arr = $rcmail->user->get_identity();
+ $identity = $identity_arr['email'];
+ $this->sa_user = str_replace('%u', $_SESSION['username'], $this->sa_user);
+ $this->sa_user = str_replace('%l', $rcmail->user->get_username('local'), $this->sa_user);
+ $this->sa_user = str_replace('%d', $rcmail->user->get_username('domain'), $this->sa_user);
+ $this->sa_user = str_replace('%i', $identity, $this->sa_user);
+
+ // init storage
+ include('include/rcube_sauserprefs_storage.php');
+ $this->storage = new rcube_sauserprefs_storage($rcmail->config->get('sauserprefs_db_dsnw'), $rcmail->config->get('sauserprefs_db_dsnr'), $rcmail->config->get('sauserprefs_db_persistent'),
+ $this->sa_user, $rcmail->config->get('sauserprefs_sql_table_name'), $rcmail->config->get('sauserprefs_sql_username_field'), $rcmail->config->get('sauserprefs_sql_preference_field'),
+ $rcmail->config->get('sauserprefs_sql_value_field'), $rcmail->config->get('sauserprefs_bayes_delete_query'));
+
+ if ($rcmail->config->get('sauserprefs_whitelist_abook_id', false))
+ $this->addressbook = $rcmail->config->get('sauserprefs_whitelist_abook_id');
+
+ if ($rcmail->task == 'settings') {
+ $this->add_texts('localization/', array('sauserprefs', 'managespam'));
+ $this->include_stylesheet($this->local_skin_path() . '/tabstyles.css');
+
+ $this->sections = array(
+ 'general' => array('id' => 'general', 'section' => $this->gettext('spamgeneralsettings')),
+ 'tests' => array('id' => 'tests', 'section' => $this->gettext('spamtests')),
+ 'bayes' => array('id' => 'bayes', 'section' => $this->gettext('bayes')),
+ 'headers' => array('id' => 'headers', 'section' => $this->gettext('headers')),
+ 'report' => array('id' => 'report','section' => $this->gettext('spamreportsettings')),
+ 'addresses' => array('id' => 'addresses', 'section' => $this->gettext('spamaddressrules')),
+ );
+ $this->cur_section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GPC);
+
+ $this->register_action('plugin.sauserprefs', array($this, 'init_html'));
+ $this->register_action('plugin.sauserprefs.edit', array($this, 'init_html'));
+ $this->register_action('plugin.sauserprefs.save', array($this, 'save'));
+ $this->register_action('plugin.sauserprefs.whitelist_import', array($this, 'whitelist_import'));
+ $this->register_action('plugin.sauserprefs.purge_bayes', array($this, 'purge_bayes'));
+ $this->include_script('sauserprefs.js');
+ }
+ elseif ($rcmail->config->get('sauserprefs_whitelist_sync')) {
+ $this->add_hook('contact_create', array($this, 'contact_add'));
+ $this->add_hook('contact_update', array($this, 'contact_save'));
+ $this->add_hook('contact_delete', array($this, 'contact_delete'));
+ }
+ }
+
+ function init_html()
+ {
+ $this->_load_global_prefs();
+ $this->_load_user_prefs();
+
+ $this->api->output->set_pagetitle($this->gettext('sauserprefssettings'));
+
+ if (rcube::get_instance()->action == 'plugin.sauserprefs.edit') {
+ $this->user_prefs = array_merge($this->global_prefs, $this->user_prefs);
+ $this->api->output->add_handler('userprefs', array($this, 'gen_form'));
+ $this->api->output->add_handler('sectionname', array($this, 'prefs_section_name'));
+ $this->api->output->send('sauserprefs.settingsedit');
+ }
+ else {
+ $this->api->output->add_handler('sasectionslist', array($this, 'section_list'));
+ $this->api->output->add_handler('saprefsframe', array($this, 'preference_frame'));
+ $this->api->output->send('sauserprefs.sauserprefs');
+ }
+ }
+
+ function section_list($attrib)
+ {
+ $no_override = array_flip(rcube::get_instance()->config->get('sauserprefs_dont_override'));
+
+ // add id to message list table if not specified
+ if (!strlen($attrib['id']))
+ $attrib['id'] = 'rcmsectionslist';
+
+ $sections = array();
+ $blocks = $attrib['sections'] ? preg_split('/[\s,;]+/', strip_quotes($attrib['sections'])) : array_keys($this->sections);
+ foreach ($blocks as $block) {
+ if (!isset($no_override['{' . $block . '}']))
+ $sections[$block] = $this->sections[$block];
+ }
+
+ // create XHTML table
+ $out = rcube::get_instance()->table_output($attrib, $sections, array('section'), 'id');
+
+ // set client env
+ $this->api->output->add_gui_object('sectionslist', $attrib['id']);
+ $this->api->output->include_script('list.js');
+
+ return $out;
+ }
+
+ function preference_frame($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmprefsframe';
+
+ return $this->api->output->frame($attrib, true);
+ }
+
+ function gen_form($attrib)
+ {
+ $this->api->output->add_label(
+ 'sauserprefs.spamaddressexists', 'sauserprefs.spamenteraddress',
+ 'sauserprefs.spamaddresserror', 'sauserprefs.spamaddressdelete',
+ 'sauserprefs.spamaddressdeleteall', 'sauserprefs.enabled', 'sauserprefs.disabled',
+ 'sauserprefs.importingaddresses', 'sauserprefs.usedefaultconfirm', 'sauserprefs.purgebayesconfirm',
+ 'sauserprefs.whitelist_from');
+
+ // output global prefs as default in env
+ foreach($this->global_prefs as $key => $val)
+ $this->api->output->set_env(str_replace(" ", "_", $key), $val);
+
+ unset($attrib['form']);
+
+ list($form_start, $form_end) = get_form_tags($attrib, 'plugin.sauserprefs.save', null,
+ array('name' => '_section', 'value' => $this->cur_section));
+
+ $out = $form_start;
+
+ $out .= $this->_prefs_block($this->cur_section, $attrib);
+
+ return $out . $form_end;
+ }
+
+ function prefs_section_name()
+ {
+ return $this->sections[$this->cur_section]['section'];
+ }
+
+ function save()
+ {
+ $rcmail = rcube::get_instance();
+ $this->_load_global_prefs();
+ $this->_load_user_prefs();
+
+ $no_override = array_flip($rcmail->config->get('sauserprefs_dont_override'));
+ $new_prefs = array();
+ $result = true;
+
+ switch ($this->cur_section)
+ {
+ case 'general':
+ if (!isset($no_override['required_hits']))
+ $new_prefs['required_hits'] = rcube_utils::get_input_value('_spamthres', rcube_utils::INPUT_POST);
+
+ if (!isset($no_override['rewrite_header Subject']))
+ $new_prefs['rewrite_header Subject'] = rcube_utils::get_input_value('_spamsubject', rcube_utils::INPUT_POST);
+
+ if (!isset($no_override['ok_locales'])) {
+ $new_prefs['ok_locales'] = '';
+ if (is_array(rcube_utils::get_input_value('_spamlang', rcube_utils::INPUT_POST))) {
+ $locales = array_intersect(rcube_utils::get_input_value('_spamlang', rcube_utils::INPUT_POST), $this->sa_locales);
+ $new_prefs['ok_locales'] = implode(" ", $locales);
+ }
+ }
+
+ if (!isset($no_override['ok_languages']))
+ $new_prefs['ok_languages'] = is_array(rcube_utils::get_input_value('_spamlang', rcube_utils::INPUT_POST)) ? implode(" ", rcube_utils::get_input_value('_spamlang', rcube_utils::INPUT_POST)) : '';
+
+ break;
+
+ case 'headers':
+ if (!isset($no_override['fold_headers']))
+ $new_prefs['fold_headers'] = empty($_POST['_spamfoldheaders']) ? "0" : "1";
+
+ if (!isset($no_override['add_header all Level'])) {
+ $spamchar = empty($_POST['_spamlevelchar']) ? "*" : rcube_utils::get_input_value('_spamlevelchar', rcube_utils::INPUT_POST);
+
+ if (rcube_utils::get_input_value('_spamlevelstars', rcube_utils::INPUT_POST) == "1") {
+ $new_prefs['add_header all Level'] = "_STARS(". $spamchar .")_";
+ $new_prefs['remove_header all'] = "0";
+ }
+ else {
+ $new_prefs['add_header all Level'] = "";
+ $new_prefs['remove_header all'] = "Level";
+ }
+ }
+
+ break;
+
+ case 'tests':
+ if (!isset($no_override['use_razor1']))
+ $new_prefs['use_razor1'] = empty($_POST['_spamuserazor1']) ? "0" : "1";
+
+ if (!isset($no_override['use_razor2']))
+ $new_prefs['use_razor2'] = empty($_POST['_spamuserazor2']) ? "0" : "1";
+
+ if (!isset($no_override['use_pyzor']))
+ $new_prefs['use_pyzor'] = empty($_POST['_spamusepyzor']) ? "0" : "1";
+
+ if (!isset($no_override['use_dcc']))
+ $new_prefs['use_dcc'] = empty($_POST['_spamusedcc']) ? "0" : "1";
+
+ if (!isset($no_override['skip_rbl_checks']))
+ $new_prefs['skip_rbl_checks'] = empty($_POST['_spamskiprblchecks']) ? "1" : "0";
+
+ break;
+
+ case 'bayes':
+ if (!isset($no_override['use_bayes']))
+ $new_prefs['use_bayes'] = empty($_POST['_spamusebayes']) ? "0" : "1";
+
+ if (!isset($no_override['bayes_auto_learn']))
+ $new_prefs['bayes_auto_learn'] = empty($_POST['_spambayesautolearn']) ? "0" : "1";
+
+ if (!isset($no_override['bayes_auto_learn_threshold_nonspam']) && !empty($_POST['_bayesnonspam']))
+ $new_prefs['bayes_auto_learn_threshold_nonspam'] = rcube_utils::get_input_value('_bayesnonspam', rcube_utils::INPUT_POST);
+
+ if (!isset($no_override['bayes_auto_learn_threshold_spam']) && !empty($_POST['_bayesspam']))
+ $new_prefs['bayes_auto_learn_threshold_spam'] = rcube_utils::get_input_value('_bayesspam', rcube_utils::INPUT_POST);
+
+ if (!isset($no_override['use_bayes_rules']))
+ $new_prefs['use_bayes_rules'] = empty($_POST['_spambayesrules']) ? "0" : "1";
+
+ break;
+
+ case 'report':
+ if (!isset($no_override['report_safe']))
+ $new_prefs['report_safe'] = rcube_utils::get_input_value('_spamreport', rcube_utils::INPUT_POST);
+
+ break;
+
+ case 'addresses':
+ $acts = rcube_utils::get_input_value('_address_rule_act', rcube_utils::INPUT_POST);
+ $prefs = rcube_utils::get_input_value('_address_rule_field', rcube_utils::INPUT_POST);
+ $vals = rcube_utils::get_input_value('_address_rule_value', rcube_utils::INPUT_POST);
+
+ foreach ($acts as $idx => $act)
+ $new_prefs['addresses'][] = array('field' => $prefs[$idx], 'value' => $vals[$idx], 'action' => $act);
+
+ break;
+ }
+
+ // allow additional actions before prefs are saved
+ $data = $rcmail->plugins->exec_hook('sauserprefs_save', array(
+ 'section' => $this->cur_section, 'cur_prefs' => $this->user_prefs, 'new_prefs' => $new_prefs, 'global_prefs' => $this->global_prefs));
+
+ if (!$data['abort']) {
+ // save prefs
+ if ($this->storage->save_prefs($data['new_prefs'], $this->user_prefs, $this->global_prefs))
+ $this->api->output->command('display_message', $this->gettext('sauserprefchanged'), 'confirmation');
+ else
+ $this->api->output->command('display_message', $this->gettext('sauserpreffailed'), 'error');
+ }
+ else {
+ $this->api->output->command('display_message', $data['message'] ? $data['message'] : $this->gettext('sauserpreffailed'), 'error');
+ }
+
+ // go to next step
+ $rcmail->overwrite_action('plugin.sauserprefs.edit');
+ $this->_load_user_prefs();
+ $this->init_html();
+ }
+
+ function whitelist_import()
+ {
+ $contacts = rcube::get_instance()->get_address_book($this->addressbook);
+ $contacts->set_page(1);
+ $contacts->set_pagesize(99999);
+ $result = $contacts->list_records(null, 0, true);
+
+ if (empty($result) || $result->count == 0)
+ return;
+
+ $records = $result->records;
+ foreach ($records as $row_data) {
+ foreach ($this->_gen_email_arr($row_data) as $email)
+ $this->api->output->command('sauserprefs_addressrule_import', $email, '', '');
+ }
+
+ $contacts->close();
+ }
+
+ function purge_bayes()
+ {
+ $rcmail = rcube::get_instance();
+
+ if (!$rcmail->config->get('sauserprefs_bayes_delete', false)) {
+ $this->api->output->command('display_message', $this->gettext('servererror'), 'error');
+ return;
+ }
+
+ if ($this->storage->purge_bayes())
+ $this->api->output->command('display_message', $this->gettext('done'), 'confirmation');
+ else
+ $this->api->output->command('display_message', $this->gettext('servererror'), 'error');
+ }
+
+ function contact_add($args)
+ {
+ $rcmail = rcube::get_instance();
+
+ // only works with specified address book
+ if ($args['source'] != $this->addressbook && $args['source'] != null)
+ return;
+
+ $emails = $this->_gen_email_arr($args['record']);
+ $this->storage->whitelist_add($emails);
+ }
+
+ function contact_save($args)
+ {
+ $this->contact_delete($args);
+ $this->contact_add($args);
+ }
+
+ function contact_delete($args)
+ {
+ $rcmail = rcube::get_instance();
+
+ // only works with specified address book
+ if ($args['source'] != $this->addressbook && $args['source'] != null)
+ return;
+
+ if (!is_array($args['id']))
+ $args['id'] = array($args['id']);
+
+ $contacts = $rcmail->get_address_book($this->addressbook);
+ foreach ($args['id'] as $id) {
+ $emails = $this->_gen_email_arr($contacts->get_record($id, true));
+ $this->storage->whitelist_delete($emails);
+ }
+
+ $contacts->close();
+ }
+
+ private function _load_global_prefs()
+ {
+ $rcmail = rcube::get_instance();
+ $this->global_prefs = $this->_load_prefs($rcmail->config->get('sauserprefs_global_userid'));
+ $this->global_prefs = array_merge($rcmail->config->get('sauserprefs_default_prefs'), $this->global_prefs);
+ }
+
+ private function _load_user_prefs()
+ {
+ $this->user_prefs = $this->_load_prefs($this->sa_user);
+ }
+
+ private function _load_prefs($user)
+ {
+ $rcmail = rcube::get_instance();
+ $prefs = $this->storage->load_prefs($user);
+
+ // sort address rules
+ $prefs['addresses'] = $this->_subval_sort($prefs['addresses'], 'value');
+
+ return $prefs;
+ }
+
+ private function _prefs_block($part, $attrib)
+ {
+ $rcmail = rcube::get_instance();
+ $no_override = array_flip($rcmail->config->get('sauserprefs_dont_override'));
+ $locale_info = localeconv();
+
+ switch ($part)
+ {
+ // General tests
+ case 'general':
+ $out = '';
+ $data = '';
+
+ $table = new html_table(array('class' => 'generalprefstable', 'cols' => 2));
+
+ if (!isset($no_override['required_hits'])) {
+ $field_id = 'rcmfd_spamthres';
+ $input_spamthres = new html_select(array('name' => '_spamthres', 'id' => $field_id));
+ $input_spamthres->add($this->gettext('defaultscore'), '');
+
+ $decPlaces = 0;
+ if ($rcmail->config->get('sauserprefs_score_inc') - (int)$rcmail->config->get('sauserprefs_score_inc') > 0)
+ $decPlaces = strlen($rcmail->config->get('sauserprefs_score_inc') - (int)$rcmail->config->get('sauserprefs_score_inc')) - 2;
+
+ $score_found = false;
+ for ($i = 1; $i <= 10; $i = $i + $rcmail->config->get('sauserprefs_score_inc')) {
+ $input_spamthres->add(number_format($i, $decPlaces, $locale_info['decimal_point'], ''), number_format($i, $decPlaces, '.', ''));
+
+ if (!$score_found && $this->user_prefs['required_hits'] && (float)$this->user_prefs['required_hits'] == (float)$i)
+ $score_found = true;
+ }
+
+ if (!$score_found && $this->user_prefs['required_hits'])
+ $input_spamthres->add(str_replace('%s', $this->user_prefs['required_hits'], $this->gettext('otherscore')), (float)$this->user_prefs['required_hits']);
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('spamthres'))));
+ $table->add(null, $input_spamthres->show(number_format($this->user_prefs['required_hits'], $decPlaces, '.', '')));
+ $table->add(array('colspan' => 2), rcmail::Q($this->gettext('spamthresexp')));
+ }
+
+ if (!isset($no_override['rewrite_header Subject'])) {
+ $field_id = 'rcmfd_spamsubject';
+ $input_spamsubject = new html_inputfield(array('name' => '_spamsubject', 'id' => $field_id, 'value' => $this->user_prefs['rewrite_header Subject'], 'style' => 'width:200px;'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('spamsubject'))));
+ $table->add(null, $input_spamsubject->show());
+
+ $table->add('title', "&nbsp;");
+ $table->add(null, rcmail::Q($this->gettext('spamsubjectblank')));
+ }
+
+ if ($table->size() > 0)
+ $out .= html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('mainoptions'))) . $table->show());
+
+ if (!isset($no_override['ok_languages']) || !isset($no_override['ok_locales'])) {
+ $data = html::p(null, rcmail::Q($this->gettext('spamlangexp')));
+
+ $table = new html_table(array('class' => 'langprefstable', 'cols' => 1));
+
+ $select_all = $this->api->output->button(array('command' => 'plugin.sauserprefs.select_all_langs', 'type' => 'link', 'label' => 'all'));
+ $select_none = $this->api->output->button(array('command' => 'plugin.sauserprefs.select_no_langs', 'type' => 'link', 'label' => 'none'));
+ $select_invert = $this->api->output->button(array('command' => 'plugin.sauserprefs.select_invert_langs', 'type' => 'link', 'label' => 'invert'));
+
+ $table->add(array('id' => 'listcontrols'), $this->gettext('select') .":&nbsp;&nbsp;". $select_all ."&nbsp;&nbsp;". $select_invert ."&nbsp;&nbsp;". $select_none);
+
+ $lang_table = new html_table(array('id' => 'spam-langs-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 2));
+ $lang_table->add_header(array('colspan' => 2), $this->gettext('language'));
+
+ if (!isset($no_override['ok_locales'])) {
+ if ($this->user_prefs['ok_locales'] == "all")
+ $ok_locales = $this->sa_locales;
+ else
+ $ok_locales = explode(" ", $this->user_prefs['ok_locales']);
+ }
+ else {
+ $ok_locales = array();
+ }
+
+ if (!isset($no_override['ok_languages'])) {
+ if ($this->user_prefs['ok_languages'] == "all")
+ $ok_languages = array_keys($rcmail->config->get('sauserprefs_languages'));
+ else
+ $ok_languages = explode(" ", $this->user_prefs['ok_languages']);
+ }
+ else {
+ $tmp_array = $rcmail->config->get('sauserprefs_languages');
+ $rcmail->config->set('sauserprefs_languages', array_intersect_key($tmp_array, array_flip($this->sa_locales)));
+ $ok_languages = array();
+ }
+
+ $i = 0;
+ $locales_langs = array_merge($ok_locales, $ok_languages);
+ foreach ($rcmail->config->get('sauserprefs_languages') as $lang_code => $name) {
+ if (in_array($lang_code, $locales_langs))
+ $button = $this->api->output->button(array('command' => 'plugin.sauserprefs.message_lang', 'prop' => $lang_code, 'type' => 'link', 'class' => 'enabled', 'id' => 'spam_lang_' . $i, 'title' => 'sauserprefs.enabled', 'content' => ' '));
+ else
+ $button = $this->api->output->button(array('command' => 'plugin.sauserprefs.message_lang', 'prop' => $lang_code, 'type' => 'link', 'class' => 'disabled', 'id' => 'spam_lang_' . $i, 'title' => 'sauserprefs.disabled', 'content' => ' '));
+
+ $input_spamlang = new html_checkbox(array('style' => 'display: none;', 'name' => '_spamlang[]', 'value' => $lang_code));
+
+ $lang_table->add('lang', $name);
+ $lang_table->add('tick', $button . $input_spamlang->show(in_array($lang_code, $locales_langs) ? $lang_code : ''));
+
+ $i++;
+ }
+
+ $table->add('scroller', html::div(array('id' => 'spam-langs-cont'), $lang_table->show()));
+
+ $out .= html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('langoptions'))) . $data . $table->show());
+ }
+
+ break;
+
+ // Header settings
+ case 'headers':
+ $data = html::p(null, rcmail::Q($this->gettext('headersexp')));
+
+ $table = new html_table(array('class' => 'headersprefstable', 'cols' => 3));
+
+ if (!isset($no_override['fold_headers'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("fold_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spamfoldheaders';
+ $input_spamreport = new html_checkbox(array('name' => '_spamfoldheaders', 'id' => $field_id, 'value' => '1'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('foldheaders'))));
+ $table->add(null, $input_spamreport->show($this->user_prefs['fold_headers']));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'fold_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('foldhelp')));
+ }
+
+ if (!isset($no_override['add_header all Level'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("level_help");', 'title' => $this->gettext('help')), $help_button);
+
+ if ($this->user_prefs['remove_header all'] != 'Level') {
+ $enabled = "1";
+ $char = $this->user_prefs['add_header all Level'];
+ $char = substr($char, 7, 1);
+ }
+ else {
+ $enabled = "0";
+ $char = "*";
+ }
+
+ $field_id = 'rcmfd_spamlevelstars';
+ $input_spamreport = new html_checkbox(array('name' => '_spamlevelstars', 'id' => $field_id, 'value' => '1',
+ 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sauserprefs_toggle_level_char(this)'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('spamlevelstars'))));
+ $table->add(null, $input_spamreport->show($enabled));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'level_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('levelhelp')));
+
+ $field_id = 'rcmfd_spamlevelchar';
+ $input_spamsubject = new html_inputfield(array('name' => '_spamlevelchar', 'id' => $field_id, 'value' => $char,
+ 'style' => 'width:20px;', 'disabled' => $enabled?0:1));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('spamlevelchar'))));
+ $table->add(null, $input_spamsubject->show());
+ $table->add('help', '&nbsp;');
+ }
+
+ $out = html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('mainoptions'))) . $data . $table->show());
+ break;
+
+ // Test settings
+ case 'tests':
+ $data = html::p(null, rcmail::Q($this->gettext('spamtestssexp')));
+
+ $table = new html_table(array('class' => 'testsprefstable', 'cols' => 3));
+
+ if (!isset($no_override['use_razor1'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("raz1_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spamuserazor1';
+ $input_spamtest = new html_checkbox(array('name' => '_spamuserazor1', 'id' => $field_id, 'value' => '1'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('userazor1'))));
+ $table->add(null, $input_spamtest->show($this->user_prefs['use_razor1']));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'raz1_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('raz1help')));
+ }
+
+ if (!isset($no_override['use_razor2'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("raz2_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spamuserazor2';
+ $input_spamtest = new html_checkbox(array('name' => '_spamuserazor2', 'id' => $field_id, 'value' => '1'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('userazor2'))));
+ $table->add(null, $input_spamtest->show($this->user_prefs['use_razor2']));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'raz2_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('raz2help')));
+ }
+
+ if (!isset($no_override['use_pyzor'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("pyz_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spamusepyzor';
+ $input_spamtest = new html_checkbox(array('name' => '_spamusepyzor', 'id' => $field_id, 'value' => '1'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('usepyzor'))));
+ $table->add(null, $input_spamtest->show($this->user_prefs['use_pyzor']));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'pyz_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('pyzhelp')));
+ }
+
+ if (!isset($no_override['use_dcc'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("dcc_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spamusedcc';
+ $input_spamtest = new html_checkbox(array('name' => '_spamusedcc', 'id' => $field_id, 'value' => '1'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('usedcc'))));
+ $table->add(null, $input_spamtest->show($this->user_prefs['use_dcc']));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'dcc_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('dcchelp')));
+ }
+
+ if (!isset($no_override['skip_rbl_checks'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("rbl_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spamskiprblchecks';
+ $enabled = $this->user_prefs['skip_rbl_checks'] == "1" ? "0" : "1";
+ $input_spamtest = new html_checkbox(array('name' => '_spamskiprblchecks', 'id' => $field_id, 'value' => '1'));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('skiprblchecks'))));
+ $table->add(null, $input_spamtest->show($enabled));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'rbl_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('rblhelp')));
+ }
+
+ $out = html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('mainoptions'))) . $data . $table->show());
+ break;
+
+ // Bayes settings
+ case 'bayes':
+ $data = html::p(null, rcmail::Q($this->gettext('bayeshelp')));
+
+ $table = new html_table(array('class' => 'bayesprefstable', 'cols' => 3));
+
+ if (!isset($no_override['use_bayes'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("bayes_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spamusebayes';
+ $input_spamtest = new html_checkbox(array('name' => '_spamusebayes', 'id' => $field_id, 'value' => '1',
+ 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sauserprefs_toggle_bayes(this)'));
+
+ if ($rcmail->config->get('sauserprefs_bayes_delete', false))
+ $delete_link = "&nbsp;&nbsp;&nbsp;" . html::span(array('id' => 'listcontrols'), $this->api->output->button(array('command' => 'plugin.sauserprefs.purge_bayes', 'type' => 'link', 'label' => 'sauserprefs.purgebayes', 'title' => 'sauserprefs.purgebayesexp')));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('usebayes'))));
+ $table->add(null, $input_spamtest->show($this->user_prefs['use_bayes']) . $delete_link);
+ $table->add('help', '&nbsp;');
+ $table->set_row_attribs(array('id' => 'bayes_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('bayeshelp')));
+ }
+
+ if (!isset($no_override['use_bayes_rules'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("bayesrules_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spambayesrules';
+ $input_spamtest = new html_checkbox(array('name' => '_spambayesrules', 'id' => $field_id, 'value' => '1', 'disabled' => $this->user_prefs['use_bayes']?0:1));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('bayesrules'))));
+ $table->add(null, $input_spamtest->show($this->user_prefs['use_bayes_rules']));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'bayesrules_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('bayesruleshlp')));
+ }
+
+ if (!isset($no_override['bayes_auto_learn'])) {
+ $help_button = html::img(array('class' => $imgclass, 'src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sauserprefs_help("bayesauto_help");', 'title' => $this->gettext('help')), $help_button);
+
+ $field_id = 'rcmfd_spambayesautolearn';
+ $input_spamtest = new html_checkbox(array('name' => '_spambayesautolearn', 'id' => $field_id, 'value' => '1',
+ 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sauserprefs_toggle_bayes_auto(this)', 'disabled' => $this->user_prefs['use_bayes']?0:1));
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('bayesautolearn'))));
+ $table->add(null, $input_spamtest->show($this->user_prefs['bayes_auto_learn']));
+ $table->add('help', $help_button);
+ $table->set_row_attribs(array('id' => 'bayesauto_help', 'style' => 'display: none;'));
+ $table->add(array('colspan' => '3'), rcmail::Q($this->gettext('bayesautohelp')));
+ }
+
+ if ($table->size() > 0)
+ $out = html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('mainoptions'))) . $table->show());
+
+ $table = new html_table(array('class' => 'bayesprefstable', 'cols' => 2));
+
+ $data = "";
+ if (!isset($no_override['bayes_auto_learn_threshold_nonspam'])) {
+ $field_id = 'rcmfd_bayesnonspam';
+ $input_bayesnthres = new html_select(array('name' => '_bayesnonspam', 'id' => $field_id, 'disabled' => (!$this->user_prefs['bayes_auto_learn'] || !$this->user_prefs['use_bayes'])?1:0));
+ $input_bayesnthres->add($this->gettext('defaultscore'), '');
+
+ $decPlaces = 1;
+ //if ($rcmail->config->get('sauserprefs_score_inc') - (int)$rcmail->config->get('sauserprefs_score_inc') > 0)
+ // $decPlaces = strlen($rcmail->config->get('sauserprefs_score_inc') - (int)$rcmail->config->get('sauserprefs_score_inc')) - 2;
+
+ $score_found = false;
+ for ($i = -1; $i <= 1; $i = $i + 0.1) {
+ $input_bayesnthres->add(number_format($i, $decPlaces, $locale_info['decimal_point'], ''), number_format($i, $decPlaces, '.', ''));
+
+ if (!$score_found && $this->user_prefs['bayes_auto_learn_threshold_nonspam'] && (float)$this->user_prefs['bayes_auto_learn_threshold_nonspam'] == (float)$i)
+ $score_found = true;
+ }
+
+ if (!$score_found && $this->user_prefs['bayes_auto_learn_threshold_nonspam'])
+ $input_bayesnthres->add(str_replace('%s', $this->user_prefs['bayes_auto_learn_threshold_nonspam'], $this->gettext('otherscore')), (float)$this->user_prefs['bayes_auto_learn_threshold_nonspam']);
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('bayesnonspam'))));
+ $table->add(null, $input_bayesnthres->show(number_format($this->user_prefs['bayes_auto_learn_threshold_nonspam'], $decPlaces, '.', '')));
+ $table->add(array('colspan' => '2'), rcmail::Q($this->gettext('bayesnonspamexp')));
+ }
+
+ if (!isset($no_override['bayes_auto_learn_threshold_spam'])) {
+ $field_id = 'rcmfd_bayesspam';
+ $input_bayesthres = new html_select(array('name' => '_bayesspam', 'id' => $field_id, 'disabled' => (!$this->user_prefs['bayes_auto_learn'] || !$this->user_prefs['use_bayes'])?1:0));
+ $input_bayesthres->add($this->gettext('defaultscore'), '');
+
+ $decPlaces = 0;
+ if ($rcmail->config->get('sauserprefs_score_inc') - (int)$rcmail->config->get('sauserprefs_score_inc') > 0)
+ $decPlaces = strlen($rcmail->config->get('sauserprefs_score_inc') - (int)$rcmail->config->get('sauserprefs_score_inc')) - 2;
+
+ $score_found = false;
+ for ($i = 1; $i <= 20; $i = $i + $rcmail->config->get('sauserprefs_score_inc')) {
+ $input_bayesthres->add(number_format($i, $decPlaces, $locale_info['decimal_point'], ''), number_format($i, $decPlaces, '.', ''));
+
+ if (!$score_found && $this->user_prefs['bayes_auto_learn_threshold_spam'] && (float)$this->user_prefs['bayes_auto_learn_threshold_spam'] == (float)$i)
+ $score_found = true;
+ }
+
+ if (!$score_found && $this->user_prefs['required_hits'])
+ $input_bayesthres->add(str_replace('%s', $this->user_prefs['bayes_auto_learn_threshold_spam'], $this->gettext('otherscore')), (float)$this->user_prefs['bayes_auto_learn_threshold_spam']);
+
+ $table->add('title', html::label($field_id, rcmail::Q($this->gettext('bayesspam'))));
+ $table->add(null, $input_bayesthres->show(number_format($this->user_prefs['bayes_auto_learn_threshold_spam'], $decPlaces, '.', '')));
+ $table->add(array('colspan' => '2'), rcmail::Q($this->gettext('bayesspamexp')));
+ }
+
+ if ($table->size() > 0)
+ $out .= html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('bayesautooptions'))) . $table->show());
+
+ break;
+
+ // Report settings
+ case 'report':
+ $data = html::p(null, rcmail::Q($this->gettext('spamreport')));
+
+ $table = new html_table(array('class' => 'reportprefstable', 'cols' => 2));
+
+ if (!isset($no_override['report_safe'])) {
+ $field_id = 'rcmfd_spamreport';
+ $input_spamreport0 = new html_radiobutton(array('name' => '_spamreport', 'id' => $field_id.'_0', 'value' => '0'));
+ $table->add('title', html::label($field_id.'_0', rcmail::Q($this->gettext('spamreport0'))));
+ $table->add(null, $input_spamreport0->show($this->user_prefs['report_safe']));
+
+ $input_spamreport1 = new html_radiobutton(array('name' => '_spamreport', 'id' => $field_id.'_1', 'value' => '1'));
+ $table->add('title', html::label($field_id.'_1', rcmail::Q($this->gettext('spamreport1'))));
+ $table->add(null, $input_spamreport1->show($this->user_prefs['report_safe']));
+ $data .= $input_spamreport1->show($this->user_prefs['report_safe']) ."&nbsp;". html::label($field_id .'_1', rcmail::Q($this->gettext('spamreport1'))) . "<br />";
+
+ $input_spamreport2 = new html_radiobutton(array('name' => '_spamreport', 'id' => $field_id.'_2', 'value' => '2'));
+ $table->add('title', html::label($field_id.'_2', rcmail::Q($this->gettext('spamreport2'))));
+ $table->add(null, $input_spamreport2->show($this->user_prefs['report_safe']));
+ }
+
+ $out = html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('mainoptions'))) . $table->show());
+ break;
+
+ // Address settings
+ case 'addresses':
+ $data = html::p(null, rcmail::Q($this->gettext('whitelistexp')));
+
+ if ($rcmail->config->get('sauserprefs_whitelist_sync'))
+ $data .= rcmail::Q($this->gettext('autowhitelist')) . "<br /><br />";
+
+ $table = new html_table(array('class' => 'addressprefstable', 'cols' => 4));
+
+ $field_id = 'rcmfd_spamaddressrule';
+ $input_spamaddressrule = new html_select(array('name' => '_spamaddressrule', 'id' => $field_id));
+ $input_spamaddressrule->add($this->gettext('whitelist_from'),'whitelist_from');
+ $input_spamaddressrule->add($this->gettext('blacklist_from'), 'blacklist_from');
+ $input_spamaddressrule->add($this->gettext('whitelist_to'), 'whitelist_to');
+
+ $field_id = 'rcmfd_spamaddress';
+ $input_spamaddress = new html_inputfield(array('name' => '_spamaddress', 'id' => $field_id, 'style' => 'width:200px;'));
+
+ $field_id = 'rcmbtn_add_address';
+ $button_addaddress = $this->api->output->button(array('command' => 'plugin.sauserprefs.addressrule_add', 'type' => 'input', 'class' => 'button', 'label' => 'sauserprefs.addrule'));
+
+ $table->add('ruletype', $input_spamaddressrule->show());
+ $table->add('address', $input_spamaddress->show());
+ $table->add('action', $button_addaddress);
+ $table->add(null, "&nbsp;");
+
+ $import = $this->api->output->button(array('command' => 'plugin.sauserprefs.import_whitelist', 'type' => 'link', 'label' => 'import', 'title' => 'sauserprefs.importfromaddressbook'));
+ $delete_all = $this->api->output->button(array('command' => 'plugin.sauserprefs.whitelist_delete_all', 'type' => 'link', 'label' => 'sauserprefs.deleteall'));
+
+ $table->add(array('colspan' => 4, 'id' => 'listcontrols'), $import ."&nbsp;&nbsp;". $delete_all);
+
+ $address_table = new html_table(array('id' => 'address-rules-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 3));
+ $address_table->add_header('rule', $this->gettext('rule'));
+ $address_table->add_header('email', $this->gettext('email'));
+ $address_table->add_header('control', '&nbsp;');
+
+ $this->_address_row($address_table, null, null, $attrib);
+
+ if (sizeof($this->user_prefs['addresses']) > 0)
+ $norules = 'display: none;';
+
+ $address_table->set_row_attribs(array('style' => $norules));
+ $address_table->add(array('colspan' => '3'), rcube_utils::rep_specialchars_output($this->gettext('noaddressrules')));
+
+ $this->api->output->set_env('address_rule_count', sizeof($this->user_prefs['addresses']));
+ foreach ($this->user_prefs['addresses'] as $address)
+ $this->_address_row($address_table, $address['field'], $address['value'], $attrib);
+
+ $table->add(array('colspan' => 4, 'class' => 'scroller'), html::div(array('id' => 'address-rules-cont'), $address_table->show()));
+
+ if ($table->size())
+ $out = html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('mainoptions'))) . $data . $table->show());
+
+ break;
+
+ default:
+ $out = '';
+ }
+
+ return $out;
+ }
+
+ private function _address_row($address_table, $field, $value, $attrib)
+ {
+ if (!isset($field))
+ $address_table->set_row_attribs(array('style' => 'display: none;'));
+
+ $hidden_action = new html_hiddenfield(array('name' => '_address_rule_act[]', 'value' => ''));
+ $hidden_field = new html_hiddenfield(array('name' => '_address_rule_field[]', 'value' => $field));
+ $hidden_text = new html_hiddenfield(array('name' => '_address_rule_value[]', 'value' => $value));
+
+ switch ($field)
+ {
+ case "whitelist_from":
+ $fieldtxt = rcube_utils::rep_specialchars_output($this->gettext('whitelist_from'));
+ break;
+ case "blacklist_from":
+ $fieldtxt = rcube_utils::rep_specialchars_output($this->gettext('blacklist_from'));
+ break;
+ case "whitelist_to":
+ $fieldtxt = rcube_utils::rep_specialchars_output($this->gettext('whitelist_to'));
+ break;
+ }
+
+ $address_table->add(array('class' => $field), $fieldtxt);
+ $address_table->add(array('class' => 'email'), $value);
+ $del_button = $this->api->output->button(array('command' => 'plugin.sauserprefs.addressrule_del', 'type' => 'link', 'class' => 'delete', 'label' => 'delete', 'content' => ' '));
+ $address_table->add('control', $del_button . $hidden_action->show() . $hidden_field->show() . $hidden_text->show());
+
+ return $address_table;
+ }
+
+ static function map_pref_name($pref, $reverse = false)
+ {
+ if (!$reverse) {
+ if (array_key_exists($pref, self::$deprecated_prefs))
+ $pref = self::$deprecated_prefs[$pref];
+ }
+ else {
+ if (($orig_pref = array_search($pref, self::$deprecated_prefs)) != FALSE)
+ $pref = $orig_pref;
+ }
+
+ return $pref;
+ }
+
+ private function _subval_sort($a, $subkey)
+ {
+ if (sizeof($a) == 0)
+ return array();
+
+ foreach ($a as $k => $v)
+ $b[$k] = strtolower($v[$subkey]);
+
+ asort($b);
+
+ foreach ($b as $k => $v)
+ $c[] = $a[$k];
+
+ return $c;
+ }
+
+ private function _gen_email_arr($contact)
+ {
+ $emails = array();
+
+ if (!is_array($contact))
+ return $emails;
+
+ foreach ($contact as $key => $value) {
+ if (preg_match('/^email(:(.+))?$/i', $key, $matches)) {
+ foreach ((array)$value as $subkey => $subval) {
+ if ($matches[2])
+ $emails[$matches[2] . $subkey] = $subval;
+ else
+ $emails['email' . $subkey] = $subval;
+ }
+ }
+ }
+
+ return $emails;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/classic/help.gif b/plugins/sauserprefs/skins/classic/help.gif
new file mode 100644
index 000000000..ea7bbb363
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/help.gif
Binary files differ
diff --git a/plugins/sauserprefs/skins/classic/icons.gif b/plugins/sauserprefs/skins/classic/icons.gif
new file mode 100644
index 000000000..e52c33e51
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/icons.gif
Binary files differ
diff --git a/plugins/sauserprefs/skins/classic/icons.png b/plugins/sauserprefs/skins/classic/icons.png
new file mode 100644
index 000000000..065d880bd
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/icons.png
Binary files differ
diff --git a/plugins/sauserprefs/skins/classic/ie6hacks.css b/plugins/sauserprefs/skins/classic/ie6hacks.css
new file mode 100644
index 000000000..65c3e6af8
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/ie6hacks.css
@@ -0,0 +1,9 @@
+/**
+ * SAUserPrefs plugin styles (IE6 hacks)
+ */
+
+#spam-langs-table td.tick a,
+#address-rules-table td.control a
+{
+ background-image: url(icons.gif);
+} \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/classic/iehacks.css b/plugins/sauserprefs/skins/classic/iehacks.css
new file mode 100644
index 000000000..0577d936c
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/iehacks.css
@@ -0,0 +1,9 @@
+/**
+ * SAUserPrefs plugin styles (IE hacks)
+ */
+
+#address-rules-table,
+#spam-langs-table
+{
+ width: expression('auto');
+} \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/classic/safari.css b/plugins/sauserprefs/skins/classic/safari.css
new file mode 100644
index 000000000..0ff418083
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/safari.css
@@ -0,0 +1,6 @@
+/**
+ * SAUserPrefs plugin styles (safari hacks)
+ */
+
+html>body*#address-rules-table[id$="address-rules-table"]:not([class="none"]) { table-layout: auto; }
+html>body*#spam-langs-table[id$="spam-langs-table"]:not([class="none"]) { table-layout: auto; } \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/classic/sauserprefs.css b/plugins/sauserprefs/skins/classic/sauserprefs.css
new file mode 100644
index 000000000..81ba60250
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/sauserprefs.css
@@ -0,0 +1,185 @@
+/**
+ * SAUserPrefs plugin styles
+ */
+
+#address-rules-cont,
+#spam-langs-cont
+{
+ border: 1px solid #999999;
+ background-color: #F9F9F9;
+ height: 200px;
+ overflow: auto;
+ width: 510px;
+}
+
+body.address-rules-table,
+body.spam-langs-table
+{
+ margin: 0px;
+ background-color: #F9F9F9;
+}
+
+#address-rules-table,
+#spam-langs-table
+{
+ width: 100%;
+ display: table;
+ table-layout: fixed;
+}
+
+#address-rules-table thead td.rule
+{
+ width: 180px;
+}
+
+#address-rules-table thead td.control
+{
+ width: 40px;
+}
+
+#spam-langs-table td.lang,
+#address-rules-table td.rule,
+#address-rules-table td.email,
+#address-rules-table td.email
+{
+ text-align: left;
+ vertical-align: middle;
+}
+
+#spam-langs-table td.tick,
+#address-rules-table td.control
+{
+ text-align: right;
+ vertical-align: middle;
+}
+
+#spam-langs-table td.tick a,
+#address-rules-table td.control a
+{
+ display: block;
+ float: right;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+}
+
+#address-rules-table td.control a.delete
+{
+ background-position: 0 0;
+}
+
+#spam-langs-table td.tick a.enabled
+{
+ background-position: 0 -18px;
+}
+
+#spam-langs-table td.tick a.disabled
+{
+ background-position: 0 -36px;
+}
+
+.whitelist_from,
+.whitelist_to
+{
+ color: #008800;
+ text-align: left;
+ vertical-align: middle;
+
+}
+
+.blacklist_from
+{
+ color: #BB0000;
+ text-align: left;
+ vertical-align: middle;
+}
+
+#listcontrols
+{
+ font-size: 11px;
+ text-align: right;
+}
+
+#listcontrols a,
+#listcontrols a:active,
+#listcontrols a:visited
+{
+ color: #CC0000;
+ font-size: 11px;
+ text-decoration: none;
+}
+
+#listcontrols a:hover
+{
+ text-decoration: underline;
+}
+
+table.generalprefstable,
+table.headersprefstable,
+table.testsprefstable,
+table.bayesprefstable,
+table.reportprefstable
+{
+ width: 100%;
+}
+
+table.generalprefstable td.title
+{
+ width: 115px;
+}
+
+table.headersprefstable td.title
+{
+ width: 220px;
+}
+
+table.testsprefstable td.title
+{
+ width: 175px;
+}
+
+table.bayesprefstable td.title
+{
+ width: 220px;
+}
+
+table.reportprefstable td.title
+{
+ width: 320px;
+}
+
+table.generalprefstable td.help,
+table.langprefstable td.help,
+table.headersprefstable td.help,
+table.testsprefstable td.help,
+table.bayesprefstable td.help,
+table.reportprefstable td.help,
+table.addressprefstable td.help
+{
+ text-align: right;
+}
+
+table.addressprefstable td.ruletype
+{
+ width: 180px;
+ padding-bottom: 10px;
+}
+
+table.addressprefstable td.address
+{
+ width: 220px;
+ padding-bottom: 10px;
+}
+
+table.addressprefstable td.action
+{
+ width: 100px;
+ text-align: right;
+ padding-bottom: 10px;
+}
+
+table.langprefstable td.scroller,
+table.addressprefstable td.scroller
+{
+ padding: 0;
+} \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/classic/tabstyles.css b/plugins/sauserprefs/skins/classic/tabstyles.css
new file mode 100644
index 000000000..c3cfaa4ac
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/tabstyles.css
@@ -0,0 +1,3 @@
+/**
+ * SAUserPrefs plugin styles (tab styles)
+ */
diff --git a/plugins/sauserprefs/skins/classic/templates/sauserprefs.html b/plugins/sauserprefs/skins/classic/templates/sauserprefs.html
new file mode 100644
index 000000000..dae567837
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/templates/sauserprefs.html
@@ -0,0 +1,47 @@
+<!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" />
+<link rel="stylesheet" type="text/css" href="/this/sauserprefs.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+<script type="text/javascript" src="/functions.js"></script>
+<script type="text/javascript" src="/splitter.js"></script>
+
+<style type="text/css">
+#sectionslist { width: <roundcube:exp expression="!empty(cookie:spamprefsviewsplitter) ? cookie:spamprefsviewsplitter-5 : 190" />px; }
+#prefs-box { left: <roundcube:exp expression="!empty(cookie:spamprefsviewsplitter) ? cookie:spamprefsviewsplitter+5 : 200" />px;
+<roundcube:exp expression="browser:ie ? ('width:expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:spamprefsviewsplitter) ? cookie:spamprefsviewsplitter+5 : 200).')+\\'px\\');') : ''" />
+}
+</style>
+</head>
+<body>
+
+<roundcube:include file="/includes/taskbar.html" />
+<roundcube:include file="/includes/header.html" />
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="mainscreen">
+
+<div id="sectionslist">
+<roundcube:object name="sasectionslist" id="sections-table" class="records-table" cellspacing="0" />
+</div>
+
+<script type="text/javascript">
+ var spamprefviewsplit = new rcube_splitter({id:'spamprefsviewsplitter', p1: 'sectionslist', p2: 'prefs-box', orientation: 'v', relative: true, start: 195});
+ rcmail.add_onload('spamprefviewsplit.init()');
+</script>
+
+<div id="prefs-box">
+<roundcube:object name="saprefsframe" id="prefs-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" />
+</div>
+
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/classic/templates/settingsedit.html b/plugins/sauserprefs/skins/classic/templates/settingsedit.html
new file mode 100644
index 000000000..73ba59880
--- /dev/null
+++ b/plugins/sauserprefs/skins/classic/templates/settingsedit.html
@@ -0,0 +1,33 @@
+<!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" />
+<link rel="stylesheet" type="text/css" href="/this/sauserprefs.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="/this//ie6hacks.css" /><![endif]-->
+<script type="text/javascript" src="/functions.js"></script>
+</head>
+<body class="iframe">
+
+<div id="prefs-title" class="boxtitle"><roundcube:object name="sectionname" /></div>
+
+<div id="prefs-details" class="boxcontent">
+<roundcube:object name="userprefs" form="form" helpIcon="/this/help.gif" />
+<div id="formfooter">
+<div class="footerleft">
+<roundcube:button command="plugin.sauserprefs.default" type="input" class="button" label="sauserprefs.usedefault" style="margin-right:0.5em" />
+<roundcube:button command="plugin.sauserprefs.save" type="input" class="button mainaction" label="save" />
+</div>
+</div>
+</div>
+
+<p>&nbsp;</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/larry/help.png b/plugins/sauserprefs/skins/larry/help.png
new file mode 100644
index 000000000..9f7a6ae44
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/help.png
Binary files differ
diff --git a/plugins/sauserprefs/skins/larry/icons.png b/plugins/sauserprefs/skins/larry/icons.png
new file mode 100644
index 000000000..6e070901e
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/icons.png
Binary files differ
diff --git a/plugins/sauserprefs/skins/larry/iehacks.css b/plugins/sauserprefs/skins/larry/iehacks.css
new file mode 100644
index 000000000..0577d936c
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/iehacks.css
@@ -0,0 +1,9 @@
+/**
+ * SAUserPrefs plugin styles (IE hacks)
+ */
+
+#address-rules-table,
+#spam-langs-table
+{
+ width: expression('auto');
+} \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/larry/listicons.png b/plugins/sauserprefs/skins/larry/listicons.png
new file mode 100644
index 000000000..3571ac6c4
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/listicons.png
Binary files differ
diff --git a/plugins/sauserprefs/skins/larry/safari.css b/plugins/sauserprefs/skins/larry/safari.css
new file mode 100644
index 000000000..0ff418083
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/safari.css
@@ -0,0 +1,6 @@
+/**
+ * SAUserPrefs plugin styles (safari hacks)
+ */
+
+html>body*#address-rules-table[id$="address-rules-table"]:not([class="none"]) { table-layout: auto; }
+html>body*#spam-langs-table[id$="spam-langs-table"]:not([class="none"]) { table-layout: auto; } \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/larry/sauserprefs.css b/plugins/sauserprefs/skins/larry/sauserprefs.css
new file mode 100644
index 000000000..41dfab2e2
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/sauserprefs.css
@@ -0,0 +1,253 @@
+/**
+ * SAUserPrefs plugin styles
+ */
+
+#address-rules-cont,
+#spam-langs-cont
+{
+ height: 200px;
+ overflow: auto;
+ width: 100%;
+}
+
+body.address-rules-table,
+body.spam-langs-table
+{
+ margin: 0px;
+}
+
+#address-rules-table,
+#spam-langs-table
+{
+ width: 100%;
+ display: table;
+ table-layout: fixed;
+ border: 0;
+}
+
+#address-rules-table thead td,
+#spam-langs-table thead td
+{
+ background-color: #CCC;
+ font-weight: bold;
+ color: #000;
+}
+
+#address-rules-table thead td.rule
+{
+ width: 180px;
+}
+
+#address-rules-table thead td.control
+{
+ width: 40px;
+}
+
+#spam-langs-table td.lang,
+#address-rules-table td.rule,
+#address-rules-table td.email,
+#address-rules-table td.email
+{
+ text-align: left;
+ vertical-align: middle;
+ border-left: 0;
+ border-right: 0;
+}
+
+#spam-langs-table td.tick,
+#address-rules-table td.control
+{
+ text-align: right;
+ vertical-align: middle;
+ border-left: 0;
+ border-right: 0;
+}
+
+#spam-langs-table td.tick a,
+#address-rules-table td.control a
+{
+ display: block;
+ float: right;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+ cursor: pointer;
+}
+
+#address-rules-table td.control a.delete
+{
+ background-position: 0 -1px;
+}
+
+#spam-langs-table td.tick a.enabled
+{
+ background-position: 0 -18px;
+}
+
+#spam-langs-table td.tick a.disabled
+{
+ background-position: 0 -36px;
+}
+
+.whitelist_from,
+.whitelist_to
+{
+ color: #008800;
+ text-align: left;
+ vertical-align: middle;
+}
+
+.blacklist_from
+{
+ color: #BB0000;
+ text-align: left;
+ vertical-align: middle;
+}
+
+#listcontrols
+{
+ font-size: 11px;
+ text-align: right;
+}
+
+#listcontrols a,
+#listcontrols a:active,
+#listcontrols a:visited
+{
+ color: #2D5986;
+ font-size: 11px;
+ text-decoration: none;
+}
+
+#listcontrols a:hover
+{
+ text-decoration: underline;
+}
+
+table.generalprefstable,
+table.langprefstable,
+table.headersprefstable,
+table.testsprefstable,
+table.bayesprefstable,
+table.reportprefstable,
+table.addressprefstable
+{
+ width: 100%;
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+
+table.generalprefstable td,
+table.langprefstable td,
+table.headersprefstable td,
+table.testsprefstable td,
+table.bayesprefstable td,
+table.reportprefstable td,
+table.addressprefstable td
+{
+ width: 80%;
+ padding: 4px 10px;
+ background: #eee;
+ border-bottom: 2px solid #fff;
+}
+
+table.addressprefstable td
+{
+ width: auto;
+}
+
+table.generalprefstable td.title,
+table.langprefstable td.title,
+table.headersprefstable td.title,
+table.testsprefstable td.title,
+table.bayesprefstable td.title,
+table.reportprefstable td.title,
+table.addressprefstable td.title
+{
+ width: 20%;
+ color: #333;
+ padding-right: 20px;
+ white-space: nowrap;
+}
+
+table.addressprefstable td.ruletype
+{
+ width: 180px;
+}
+
+table.addressprefstable td.address
+{
+ width: 220px;
+}
+
+table.addressprefstable td.action
+{
+ width: 100px;
+ text-align: right;
+}
+
+table.langprefstable td.scroller,
+table.addressprefstable td.scroller
+{
+ padding: 0;
+}
+
+#sections-table #rcmrowtests td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -199px;
+}
+
+#sections-table #rcmrowtests.selected td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -225px;
+}
+
+#sections-table #rcmrowbayes td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -248px;
+}
+
+#sections-table #rcmrowbayes.selected td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -270px;
+}
+
+#sections-table #rcmrowheaders td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -99px;
+}
+
+#sections-table #rcmrowheaders.selected td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -124px;
+}
+
+#sections-table #rcmrowreport td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -150px;
+}
+
+#sections-table #rcmrowreport.selected td.section
+{
+ background-image: url(listicons.png);
+ background-position: 5px -174px;
+}
+
+#sections-table #rcmrowaddresses td.section
+{
+ background-image: url(listicons.png);
+ background-position: 4px -50px;
+}
+
+#sections-table #rcmrowaddresses.selected td.section
+{
+ background-image: url(listicons.png);
+ background-position: 4px -74px;
+} \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/larry/tabstyles.css b/plugins/sauserprefs/skins/larry/tabstyles.css
new file mode 100644
index 000000000..c22f8199a
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/tabstyles.css
@@ -0,0 +1,15 @@
+/**
+ * SAUserPrefs plugin styles (tab styles)
+ */
+
+#settings-sections #settingstabpluginsauserprefs a
+{
+ background-image: url(listicons.png);
+ background-position: 3px -3px;
+}
+
+#settings-sections #settingstabpluginsauserprefs.selected a
+{
+ background-image: url(listicons.png);
+ background-position: 3px -27px;
+} \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/larry/templates/sauserprefs.html b/plugins/sauserprefs/skins/larry/templates/sauserprefs.html
new file mode 100644
index 000000000..6f734f092
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/templates/sauserprefs.html
@@ -0,0 +1,54 @@
+<roundcube:object name="doctype" value="html5" />
+<html>
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+<link rel="stylesheet" type="text/css" href="/this/sauserprefs.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+</head>
+<body class="noscroll">
+
+<roundcube:include file="/includes/header.html" />
+
+<div id="mainscreen" class="offset">
+
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="settings-right">
+
+<div id="sectionslist" class="uibox listbox">
+<div class="scroller">
+ <roundcube:object name="sasectionslist" id="sections-table" class="listing" />
+</div>
+</div>
+
+<div id="preferences-box" class="uibox contentbox">
+<div class="iframebox">
+ <roundcube:object name="saprefsframe" id="preferences-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" />
+</div>
+<roundcube:object name="message" id="message" class="statusbar" />
+</div>
+
+</div>
+
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+<script type="text/javascript">
+/* <![CDATA[ */
+
+$(document).ready(function(){
+ new rcube_splitter({id:'sauserprefssplitter', p1: '#sectionslist', p2: '#preferences-box', orientation: 'v', relative: true, start: 240}).init();
+});
+
+/* ]]> */
+</script>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sauserprefs/skins/larry/templates/settingsedit.html b/plugins/sauserprefs/skins/larry/templates/settingsedit.html
new file mode 100644
index 000000000..302288027
--- /dev/null
+++ b/plugins/sauserprefs/skins/larry/templates/settingsedit.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" />
+<link rel="stylesheet" type="text/css" href="/this/sauserprefs.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+</head>
+<body class="iframe">
+
+<h1 class="boxtitle"><roundcube:object name="sectionname" /></h1>
+
+<div id="preferences-details" class="boxcontent">
+<roundcube:object name="userprefs" form="form" class="propform" helpIcon="/this/help.png" />
+</div>
+
+<div class="footerleft formbuttons">
+<roundcube:button command="plugin.sauserprefs.save" type="input" class="button mainaction" label="save" />
+<roundcube:button command="plugin.sauserprefs.default" type="input" class="button" label="sauserprefs.usedefault" style="margin-right:0.5em" />
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/show_additional_headers/package.xml b/plugins/show_additional_headers/package.xml
index 9ca60baa9..7297916c3 100644
--- a/plugins/show_additional_headers/package.xml
+++ b/plugins/show_additional_headers/package.xml
@@ -24,7 +24,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/show_additional_headers/show_additional_headers.php b/plugins/show_additional_headers/show_additional_headers.php
index b7f01104c..1375348c2 100644
--- a/plugins/show_additional_headers/show_additional_headers.php
+++ b/plugins/show_additional_headers/show_additional_headers.php
@@ -6,12 +6,12 @@
* Proof-of-concept plugin which will fetch additional headers
* and display them in the message view.
*
- * Enable the plugin in config.inc.php and add your desired headers:
- * $config['show_additional_headers'] = array('User-Agent');
+ * Enable the plugin in config/main.inc.php and add your desired headers:
+ * $rcmail_config['show_additional_headers'] = array('User-Agent');
*
* @version @package_version@
* @author Thomas Bruederli
- * @license GNU GPLv3+
+ * @website http://roundcube.net
*/
class show_additional_headers extends rcube_plugin
{
diff --git a/plugins/sieverules/config.inc.php.dist b/plugins/sieverules/config.inc.php.dist
new file mode 100644
index 000000000..7d8f48238
--- /dev/null
+++ b/plugins/sieverules/config.inc.php.dist
@@ -0,0 +1,147 @@
+<?php
+
+/**
+ * SieveRules configuration file
+ */
+
+// managesieve server address
+// The host can contain the following macros that will be expanded as follows:
+// %n - hostname ($_SERVER['SERVER_NAME'])
+// %t - hostname without the first part
+// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
+// %s - domain name after the '@' from e-mail address provided at login screen
+// For example %n = mail.domain.tld, %t = domain.tld
+$rcmail_config['sieverules_host'] = 'localhost';
+
+// managesieve server port
+$rcmail_config['sieverules_port'] = 2000;
+
+// Log managesieve conversation to <log_dir>/sieverules or to syslog
+$rcmail_config['sieverules_debug'] = false;
+
+// authentication method. Can be CRAM-MD5, DIGEST-MD5, PLAIN, LOGIN, EXTERNAL
+// or none. Optional, defaults to best method supported by server.
+$rcmail_config['sieverules_auth_type'] = null;
+
+// optional managesieve authentication identifier to be used as authorization proxy,
+// authenticate as a different user but act on behalf of the logged in user,
+// works with PLAIN and DIGEST-MD5 auth.
+$rcmail_config['sieverules_auth_cid'] = null;
+
+// optional managesieve authentication password to be used for sieverules_auth_cid
+$rcmail_config['sieverules_auth_pw'] = null;
+
+// enable TLS for managesieve server connection
+$rcmail_config['sieverules_usetls'] = FALSE;
+
+// folder delimiter - if your sieve system uses a different folder delimiter to
+// your IMAP server set it here, otherwise leave as null to use IMAP delimiter
+$rcmail_config['sieverules_folder_delimiter'] = null;
+
+// Sieve RFC says that we should use UTF-8 encoding for mailbox names,
+// but some implementations does not covert UTF-8 to modified UTF-7.
+// set to null for default behaviour
+$rcmail_config['sieverules_folder_encoding'] = null;
+
+// include the IMAP root in the folder path when creating the rules
+// set to false to never include the IMAP root in the folder path
+// set to null for default behaviour
+$rcmail_config['sieverules_include_imap_root'] = null;
+
+// ruleset name
+$rcmail_config['sieverules_ruleset_name'] = 'roundcube';
+
+// allow multiple actions
+$rcmail_config['sieverules_multiple_actions'] = TRUE;
+
+// allowed actions
+$rcmail_config['sieverules_allowed_actions'] = array(
+ 'fileinto' => TRUE,
+ 'vacation' => TRUE,
+ 'reject' => TRUE,
+ 'redirect' => TRUE,
+ 'keep' => TRUE,
+ 'discard' => TRUE,
+ 'imapflags' => TRUE,
+ 'notify' => TRUE,
+ 'stop' => TRUE,
+ 'editheaderadd' => TRUE,
+ 'editheaderrem' => TRUE
+ );
+
+// headers listed as examples of "Other headers"
+$rcmail_config['sieverules_other_headers'] = array(
+ 'Reply-To', 'List-Id', 'MailingList', 'Mailing-List',
+ 'X-ML-Name', 'X-List', 'X-List-Name', 'X-Mailing-List',
+ 'Resent-From', 'Resent-To', 'X-Mailer', 'X-MailingList',
+ 'X-Spam-Status', 'X-Priority', 'Importance', 'X-MSMail-Priority',
+ 'Precedence', 'Return-Path', 'Received', 'Auto-Submitted',
+ 'X-Spam-Flag', 'X-Spam-Tests', 'Sender',
+ );
+
+// Predefined rules
+// each rule should be in it own array - examples provided in README
+// 'name' => name of the rule, displayed in the rule type select box
+// 'type' => one of: header, address, envelope, size
+// 'header' => name of the header to test
+// 'operator' => operator to use, for all possible values please see README
+// 'extra' => extra information needed for the rule in some cases
+// 'target' => value that the header is tested against
+$rcmail_config['sieverules_predefined_rules'] = array();
+
+// Advanced editor
+// allows the user to edit the sieve file directly, without the restrictions of the normal UI
+// 0 - Disabled, option not shown in the UI
+// 1 - Enabled, option shown in the UI
+// 2 - Option shown in the UI and used by default
+$rcmail_config['sieverules_adveditor'] = 0;
+
+// Allow users to use multiple rulesets
+$rcmail_config['sieverules_multiplerules'] = FALSE;
+
+// Default (or global) sieve rule file
+$rcmail_config['sieverules_default_file'] = '/etc/dovecot/sieve/default';
+
+// Auto load default sieve rule file if no rules exist and no import filters match
+$rcmail_config['sieverules_auto_load_default'] = FALSE;
+
+// Example sieve rule file
+$rcmail_config['sieverules_example_file'] = '/etc/dovecot/sieve/example';
+
+// Force the :addresses line to always be added to new vacation rules
+// Some sieve setups require that the :address part of a vacation rule is always present for the message to be sent
+// Cyrus setups need this to option set to true
+$rcmail_config['sieverules_force_vacto'] = FALSE;
+
+// Limit the selection of :addresses available to only those setup in as an identity
+// Setting this to false will give the user a textbox to enter in any address(es) they like, rather than a list of checkboxes
+$rcmail_config['sieverules_limit_vacto'] = TRUE;
+
+// Allow users to set the :from option when creating new vacation rules, not all servers support this option
+// If your server supports the variables extension users also have an 'auto detect' option which will detect the address to which the message was sent
+// Else the user's default identity will be used as the default value
+$rcmail_config['sieverules_show_vacfrom'] = FALSE;
+
+// Allow users to set the :handle option when creating new vacation rules, not all servers support this option
+$rcmail_config['sieverules_show_vachandle'] = FALSE;
+
+// The rule file can be written as one IF/ELSIF statement or as a series of unrelated IF statements
+// TRUE - one IF/ELSIF statement (default)
+// FALSE - a series of unrelated IF statements
+$rcmail_config['sieverules_use_elsif'] = TRUE;
+
+// Fileinto action options
+// 0 - List only subscribed folders
+// 1 - List subscribed and unsubscribed folders
+// 2 - List subscribed and unsubscribed folders and allow users to enter a folder name (for advanced users only, requires sieve mailbox extension)
+$rcmail_config['sieverules_fileinto_options'] = 0;
+
+// Define the format of the :from option value for vacation and notify actions
+// 0 - Use only the email address - :from "user@example.com"
+// 1 - Use the name and email address, not all servers support this option - :from "First Last <user@example.com>"
+$rcmail_config['sieverules_from_format'] = 0;
+
+// For information on customising the rule file see "The structure of the rule file" in the README
+// For information on customising the contents of the drop downs see "Default values for header, operator and flag drop downs" in the README
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/importFilters/avelsieve.php b/plugins/sieverules/importFilters/avelsieve.php
new file mode 100644
index 000000000..c1e3fef9a
--- /dev/null
+++ b/plugins/sieverules/importFilters/avelsieve.php
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * SieveRules import filter for Avelsieve
+ *
+ * The class should be named 'srimport_[filename]'
+ * Each import filter must have:
+ * An attribute called name
+ * A pubic function called detector
+ * A pubic function called importer
+ * The importer function can return either a string to be parsed by the SieveRules parser
+ * or an array, similar to the one created by the SieveRules parser
+ */
+class srimport_avelsieve
+{
+ public $name = 'Squirrelmail (Avelsieve)';
+
+ public function detector($script)
+ {
+ return preg_match('/#AVELSIEVE_VERSION.*/', $script) ? True : False;
+ }
+
+ public function importer($script)
+ {
+ $i = 0;
+ $content = '';
+ $name = array();
+
+ // tokenize rules
+ if ($tokens = preg_split('/(#START_SIEVE_RULE.*END_SIEVE_RULE)\n/', $script, -1, PREG_SPLIT_DELIM_CAPTURE)) {
+ foreach($tokens as $token) {
+ if (preg_match('/(require\s+\[.*\];)/i', $token, $matches)) {
+ $content .= $matches[1] . "\n";
+ }
+ elseif (!preg_match('/^#START_SIEVE_RULE.*/', $token, $matches)) {
+ $rulename = "# rule:[";
+ $parts = explode ('"', trim($token));
+
+ for ($i = 1; $i < count($parts); $i+=2)
+ $rulename .= $parts[$i] . " ";
+
+ $rulename .= "]\n";
+ $content .= $rulename;
+
+ $content .= trim($token) . "\n";
+ }
+ }
+ }
+
+ return $content;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/importFilters/ingo.php b/plugins/sieverules/importFilters/ingo.php
new file mode 100644
index 000000000..8d85ce6e1
--- /dev/null
+++ b/plugins/sieverules/importFilters/ingo.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * SieveRules import filter for INGO
+ *
+ * The class should be named 'srimport_[filename]'
+ * Each import filter must have:
+ * An attribute called name
+ * A pubic function called detector
+ * A pubic function called importer
+ * The importer function can return either a string to be parsed by the SieveRules parser
+ * or an array, similar to the one created by the SieveRules parser
+ */
+class srimport_ingo
+{
+ public $name = 'Horde (INGO)';
+
+ public function detector($script)
+ {
+ return preg_match('/# [a-z0-9\ ]+/i', $script) ? True : False;
+ }
+
+ public function importer($script)
+ {
+ $i = 0;
+ $name = array();
+ // tokenize rules
+ if ($tokens = preg_split('/(# .+)\r?\n/i', $script, -1, PREG_SPLIT_DELIM_CAPTURE)) {
+ // unset first token, its the ingo header
+ $tokens[1] = "";
+
+ foreach($tokens as $token) {
+ if (preg_match('/^# (.+)/i', $token, $matches)) {
+ $name[$i] = $matches[1];
+ $content .= "# rule:[" . $name[$i] . "]\n";
+ }
+ elseif (isset($name[$i])) {
+ $token = str_replace(":comparator \"i;ascii-casemap\" ", "", $token);
+ $content .= $token . "\n";
+ $i++;
+ }
+ elseif (preg_match('/^\r?\n?require/i', $token)) {
+ $content .= $token . "\n";
+ }
+ }
+ }
+
+ return $content;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/include/rcube_sieve.php b/plugins/sieverules/include/rcube_sieve.php
new file mode 100644
index 000000000..a5fd9649a
--- /dev/null
+++ b/plugins/sieverules/include/rcube_sieve.php
@@ -0,0 +1,249 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | rcube_sieve class for managesieve operations (using PEAR::Net_Sieve) |
+ | |
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ | Modifications by: Philip Weir |
+ | * Make ruleset name configurable |
+ | * Added import functions |
+ +-----------------------------------------------------------------------+
+*/
+
+define('SIEVE_ERROR_CONNECTION', 1);
+define('SIEVE_ERROR_LOGIN', 2);
+define('SIEVE_ERROR_NOT_EXISTS', 3); // script not exists
+define('SIEVE_ERROR_INSTALL', 4); // script installation
+define('SIEVE_ERROR_ACTIVATE', 5); // script activation
+define('SIEVE_ERROR_OTHER', 255); // other/unknown error
+
+class rcube_sieve
+{
+ private $sieve;
+ private $ruleset;
+ private $importers = array();
+ private $elsif;
+ private $cache = false;
+ public $error = false;
+ public $list = array();
+ public $script;
+
+ public function __construct($username, $password, $host, $port, $auth_type = NULL, $usetls, $ruleset, $dir, $elsif = true, $auth_cid = NULL, $auth_pw = NULL)
+ {
+ $this->sieve = new Net_Sieve();
+
+ $data = rcube::get_instance()->plugins->exec_hook('sieverules_connect', array(
+ 'username' => $username, 'password' => $password, 'host' => $host, 'port' => $port,
+ 'auth_type' => $auth_type, 'usetls' => $usetls, 'ruleset' => $ruleset, 'dir' => $dir,
+ 'elsif' => $elsif, 'auth_cid' => $auth_cid, 'auth_pw' => $auth_pw));
+
+ $username = $data['username'];
+ $password = $data['password'];
+ $host = $data['host'];
+ $port = $data['port'];
+ $auth_type = $data['auth_type'];
+ $usetls = $data['usetls'];
+ $ruleset = $data['ruleset'];
+ $dir = $data['dir'];
+ $elsif = $data['elsif'];
+ $auth_cid = $data['auth_cid'];
+ $auth_pw = $data['auth_pw'];
+
+ if (PEAR::isError($this->sieve->connect($host, $port, NULL, $usetls)))
+ return $this->_set_error(SIEVE_ERROR_CONNECTION);
+
+ if (!empty($auth_cid)) {
+ $authz = $username;
+ $username = $auth_cid;
+ $password = $auth_pw;
+ }
+
+ if (PEAR::isError($this->sieve->login($username, $password, $auth_type ? strtoupper($auth_type) : NULL, $authz)))
+ return $this->_set_error(SIEVE_ERROR_LOGIN);
+
+ $this->ruleset = $ruleset;
+ $this->elsif = $elsif;
+
+ if ($this->ruleset !== false) {
+ $this->get_script();
+ }
+ else {
+ $this->ruleset = $this->get_active();
+ $this->get_script();
+ }
+
+ // init importers
+ $dir = slashify(realpath(slashify($dir) . 'importFilters/'));
+ $handle = opendir($dir);
+ while ($importer = readdir($handle)) {
+ if (is_file($dir . $importer) && is_readable($dir . $importer)) {
+ include($dir . $importer);
+
+ $importer = substr($importer, 0, -4);
+ $importer = 'srimport_' . $importer;
+
+ if (class_exists($importer, false)) {
+ $importerClass = new $importer();
+ $this->importers[$importer] = $importerClass;
+ }
+ }
+ }
+ closedir($handle);
+ }
+
+ public function __destruct()
+ {
+ $this->sieve->disconnect();
+ }
+
+ public function error()
+ {
+ return $this->error ? $this->error : false;
+ }
+
+ public function save($script = '')
+ {
+ if (!$script)
+ $script = $this->script->as_text();
+
+ if (!$script)
+ $script = '/* empty script */';
+
+ // allow additional actions before ruleset is saved
+ $data = rcube::get_instance()->plugins->exec_hook('sieverules_save', array(
+ 'ruleset' => $this->ruleset, 'script' => $script));
+
+ if ($data['abort'])
+ return $data['message'] ? $data['message'] : false;
+
+ if (PEAR::isError($this->sieve->installScript($this->ruleset, $data['script'])))
+ return $this->_set_error(SIEVE_ERROR_INSTALL);
+
+ if ($this->cache) $_SESSION['sieverules_script_cache_' . $this->ruleset] = serialize($this->script);
+
+ return true;
+ }
+
+ public function get_extensions()
+ {
+ if ($this->sieve) {
+ $ext = $this->sieve->getExtensions();
+ $ext = array_map('strtolower', (array) $ext);
+ return $ext;
+ }
+ }
+
+ public function check_import()
+ {
+ $result = false;
+
+ foreach ($this->list as $ruleset) {
+ if ($ruleset == $this->ruleset)
+ continue;
+
+ $script = $this->sieve->getScript($ruleset);
+
+ foreach ($this->importers as $id => $importer) {
+ if ($importer->detector($script)) {
+ $result = array($id, $importer->name, $ruleset);
+ break;
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ public function do_import($type, $ruleset)
+ {
+ $script = $this->sieve->getScript($ruleset);
+ $content = $this->importers[$type]->importer($script);
+ $this->script->import_filters($content);
+
+ if (is_array($content))
+ return $this->save();
+ else
+ return $this->save($content);
+ }
+
+ public function get_script()
+ {
+ if (!$this->sieve)
+ return false;
+
+ if ($this->cache && $_SESSION['sieverules_script_cache']) {
+ $this->list = unserialize($_SESSION['sieverules_scripts_list']);
+ $this->script = unserialize($_SESSION['sieverules_script_cache_' . $this->ruleset]);
+ return;
+ }
+
+ $this->list = $this->sieve->listScripts();
+
+ if (PEAR::isError($this->list))
+ return $this->_set_error(SIEVE_ERROR_OTHER);
+
+ if (in_array($this->ruleset, $this->list)) {
+ $script = $this->sieve->getScript($this->ruleset);
+
+ if (PEAR::isError($script))
+ return $this->_set_error(SIEVE_ERROR_OTHER);
+ }
+ else {
+ $this->_set_error(SIEVE_ERROR_NOT_EXISTS);
+ $script = '';
+ }
+
+ $data = rcube::get_instance()->plugins->exec_hook('sieverules_load', array(
+ 'ruleset' => $this->ruleset, 'script' => $script));
+
+ $this->script = new rcube_sieve_script($data['script'], $this->get_extensions(), $this->elsif);
+
+ if ($this->cache) {
+ $_SESSION['sieverules_scripts_list'] = serialize($this->list);
+ $_SESSION['sieverules_script_cache_' . $this->ruleset] = serialize($this->script);
+ }
+ }
+
+ public function get_active()
+ {
+ return $this->sieve->getActive();
+ }
+
+ public function set_active($ruleset)
+ {
+ if (PEAR::isError($this->sieve->setActive($ruleset)))
+ return $this->_set_error(SIEVE_ERROR_ACTIVATE);
+
+ return true;
+ }
+
+ public function del_script($script)
+ {
+ return $this->sieve->removeScript($script);
+ }
+
+ public function set_ruleset($ruleset)
+ {
+ $this->ruleset = $ruleset;
+ $this->get_script();
+ }
+
+ public function set_debug($debug)
+ {
+ $this->sieve->setDebug($debug, array($this, 'debug_handler'));
+ }
+
+ public function debug_handler(&$sieve, $message)
+ {
+ rcube::write_log('sieverules', preg_replace('/\r\n$/', '', $message));
+ }
+
+ private function _set_error($error)
+ {
+ $this->error = $error;
+ return false;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/include/rcube_sieve_script.php b/plugins/sieverules/include/rcube_sieve_script.php
new file mode 100644
index 000000000..2dbd52a28
--- /dev/null
+++ b/plugins/sieverules/include/rcube_sieve_script.php
@@ -0,0 +1,969 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | rcube_sieve_script class for sieverules script parsing |
+ | |
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ | Modifications by: Philip Weir |
+ | * Changed name of keys in script array |
+ | * Added support for address and envelope |
+ | * Added support for vacation |
+ | * Added support for disabled rules (written to file as comment) |
+ | * Added support for regex tests |
+ | * Added support for imapflags |
+ | * Added support for relational operators and comparators |
+ | * Added support for subaddress tests |
+ | * Added support for notify action |
+ | * Added support for stop action |
+ | * Added support for body and copy |
+ | * Added support for spamtest and virustest |
+ | * Added support for date |
+ | * Added support for editheader |
+ +-----------------------------------------------------------------------+
+*/
+
+define('SIEVE_ERROR_BAD_ACTION', 1);
+define('SIEVE_ERROR_NOT_FOUND', 2);
+
+// define constants for sieve file
+if (!defined('RCUBE_SIEVE_NEWLINE'))
+ define('RCUBE_SIEVE_NEWLINE', "\r\n");
+
+if (!defined('RCUBE_SIEVE_INDENT'))
+ define('RCUBE_SIEVE_INDENT', "\t");
+
+if (!defined('RCUBE_SIEVE_HEADER'))
+ define('RCUBE_SIEVE_HEADER', "## Generated by Roundcube Webmail SieveRules Plugin ##");
+
+class rcube_sieve_script
+{
+ private $elsif = true;
+ private $content = array();
+ private $supported = array(
+ 'fileinto',
+ 'reject',
+ 'ereject',
+ 'vacation',
+ 'imapflags',
+ 'imap4flags',
+ 'notify',
+ 'enotify',
+ 'spamtest',
+ 'virustest',
+ 'date',
+ 'editheader'
+ );
+ public $raw = '';
+
+ public function __construct($script, $ext = array(), $elsif = true)
+ {
+ $this->raw = $script;
+ $this->elsif = $elsif;
+
+ // adjust supported extenstion to match sieve server
+ $this->supported = array_intersect($this->supported, $ext);
+ if (in_array('copy', $ext))
+ $this->supported = array_merge($this->supported, array('fileinto_copy','redirect_copy'));
+
+ if (in_array('editheader', $ext))
+ $this->supported = array_merge($this->supported, array('editheaderadd','editheaderrem'));
+
+ // include standard actions in supported list
+ $this->supported = array_merge($this->supported, array('redirect','keep','discard','stop'));
+
+ // load script
+ $this->content = $this->parse_text($script);
+ }
+
+ public function add_text($script)
+ {
+ $content = $this->parse_text($script);
+ $result = false;
+
+ // check existsing script rules names
+ foreach ($this->content as $idx => $elem)
+ $names[$elem['name']] = $idx;
+
+ foreach ($content as $elem) {
+ if (!isset($names[$elem['name']])) {
+ array_push($this->content, $elem);
+ $result = true;
+ }
+ }
+
+ return $result;
+ }
+
+ public function import_filters($content)
+ {
+ if (is_array($content)) {
+ $result = false;
+
+ // check existsing script rules names
+ foreach ($this->content as $idx => $elem)
+ $names[$elem['name']] = $idx;
+
+ foreach ($content as $elem) {
+ if (!isset($names[$elem['name']])) {
+ array_push($this->content, $elem);
+ $result = true;
+ }
+ }
+ }
+ else {
+ $this->add_text($content);
+ }
+ }
+
+ public function add_rule($content, $pos = null)
+ {
+ foreach ($content['actions'] as $action) {
+ if (!in_array($action['type'], $this->supported))
+ return SIEVE_ERROR_BAD_ACTION;
+ }
+
+ if ($pos !== null)
+ array_splice($this->content, $pos, 0, array($content));
+ else
+ array_push($this->content, $content);
+
+ return true;
+ }
+
+ public function delete_rule($index)
+ {
+ if (isset($this->content[$index])) {
+ unset($this->content[$index]);
+ $this->content = array_values($this->content);
+ return true;
+ }
+
+ return SIEVE_ERROR_NOT_FOUND;
+ }
+
+ public function size()
+ {
+ return sizeof($this->content);
+ }
+
+ public function update_rule($index, $content)
+ {
+ foreach ($content['actions'] as $action) {
+ if (!in_array($action['type'], $this->supported))
+ return SIEVE_ERROR_BAD_ACTION;
+ }
+
+ if ($this->content[$index]) {
+ $this->content[$index] = $content;
+ return true;
+ }
+
+ return SIEVE_ERROR_NOT_FOUND;
+ }
+
+ public function move_rule($source, $destination)
+ {
+ $this->add_rule($this->content[$source], $destination);
+
+ if ($source < $destination)
+ $this->delete_rule($source);
+ else
+ $this->delete_rule($source + 1);
+ }
+
+ public function as_text()
+ {
+ $script = '';
+ $variables = '';
+ $exts = array();
+
+ // rules
+ $activeRules = 0;
+ foreach ($this->content as $rule) {
+ $tests = array();
+ $i = 0;
+
+ if ($rule['disabled'] == 1) {
+ $script .= '# rule:[' . $rule['name'] . "]" . RCUBE_SIEVE_NEWLINE;
+ $script .= '# disabledRule:[' . $this->_safe_serial(serialize($rule)) . "]" . RCUBE_SIEVE_NEWLINE;
+ }
+ else {
+ // header
+ $script .= '# rule:[' . $rule['name'] . "]" . RCUBE_SIEVE_NEWLINE;
+
+ // constraints expressions
+ foreach ($rule['tests'] as $test) {
+ $tests[$i] = '';
+
+ switch ($test['type']) {
+ case 'size':
+ $tests[$i] .= ($test['not'] ? 'not ' : '');
+ $tests[$i] .= 'size :' . ($test['operator']=='under' ? 'under ' : 'over ') . $test['target'];
+ break;
+ case 'virustest':
+ case 'spamtest':
+ array_push($exts, $test['type']);
+ array_push($exts, 'relational');
+ array_push($exts, 'comparator-i;ascii-numeric');
+ $tests[$i] .= ($test['not'] ? 'not ' : '');
+ $tests[$i] .= $test['type'] . ' :value ' . ($test['operator'] == 'eq' ? '"eq" ' :
+ ($test['operator'] == 'le' ? '"le" ' : '"ge" ')) .
+ ':comparator "i;ascii-numeric" "' . $test['target'] .'"';
+ break;
+ case 'true':
+ $tests[$i] .= ($test['not'] ? 'not true' : 'true');
+ break;
+ case 'exists':
+ $tests[$i] .= ($test['not'] ? 'not ' : '');
+
+ if (is_array($test['header']))
+ $tests[$i] .= 'exists ["' . implode('", "', $this->_escape_string($test['header'])) . '"]';
+ else
+ $tests[$i] .= 'exists "' . $this->_escape_string($test['header']) . '"';
+
+ break;
+ case 'envelope':
+ array_push($exts, 'envelope');
+ case 'header':
+ case 'address':
+ if ($test['operator'] == 'regex')
+ array_push($exts, 'regex');
+ elseif (substr($test['operator'], 0, 5) == 'count' || substr($test['operator'], 0, 5) == 'value')
+ array_push($exts, 'relational');
+ elseif ($test['operator'] == 'user' || $test['operator'] == 'detail' || $test['operator'] == 'domain')
+ array_push($exts, 'subaddress');
+
+ $tests[$i] .= ($test['not'] ? 'not ' : '');
+ $tests[$i] .= $test['type']. ' :' . $test['operator'];
+
+ if ($test['comparator'] != '') {
+ if ($test['comparator'] != 'i;ascii-casemap' && $test['comparator'] != 'i;octet')
+ array_push($exts, 'comparator-' . $test['comparator']);
+
+ $tests[$i] .= ' :comparator "' . $test['comparator'] . '"';
+ }
+
+ if (is_array($test['header']))
+ $tests[$i] .= ' ["' . implode('", "', $this->_escape_string($test['header'])) . '"]';
+ else
+ $tests[$i] .= ' "' . $this->_escape_string($test['header']) . '"';
+
+ if (is_array($test['target']))
+ $tests[$i] .= ' ["' . implode('", "', $this->_escape_string($test['target'])) . '"]';
+ else
+ $tests[$i] .= ' "' . $this->_escape_string($test['target']) . '"';
+
+ break;
+ case 'body':
+ array_push($exts, 'body');
+ if ($test['operator'] == 'regex')
+ array_push($exts, 'regex');
+ elseif (substr($test['operator'], 0, 5) == 'count' || substr($test['operator'], 0, 5) == 'value')
+ array_push($exts, 'relational');
+
+ $tests[$i] .= ($test['not'] ? 'not ' : '');
+ $tests[$i] .= $test['type'];
+
+ if ($test['bodypart'] != '')
+ $tests[$i] .= ' :' . $test['bodypart'];
+
+ if ($test['contentpart'] != '')
+ $tests[$i] .= ' "'. $test['contentpart'] .'"';
+
+ $tests[$i] .= ' :' . $test['operator'];
+
+ if ($test['comparator'] != '') {
+ if ($test['comparator'] != 'i;ascii-casemap' && $test['comparator'] != 'i;octet')
+ array_push($exts, 'comparator-' . $test['comparator']);
+
+ $tests[$i] .= ' :comparator "' . $test['comparator'] . '"';
+ }
+
+ if (is_array($test['target']))
+ $tests[$i] .= ' ["' . implode('", "', $this->_escape_string($test['target'])) . '"]';
+ else
+ $tests[$i] .= ' "' . $this->_escape_string($test['target']) . '"';
+
+ break;
+ case 'date':
+ array_push($exts, 'date');
+ if ($test['operator'] == 'regex')
+ array_push($exts, 'regex');
+ elseif (substr($test['operator'], 0, 5) == 'count' || substr($test['operator'], 0, 5) == 'value')
+ array_push($exts, 'relational');
+
+ $tests[$i] .= ($test['not'] ? 'not ' : '');
+ $tests[$i] .= $test['header'];
+
+ $timezone = rcube::get_instance()->config->get('timezone', 'auto');
+ if ($timezone != 'auto') {
+ $tz = new DateTimeZone($timezone);
+ $date = new DateTime('now', $tz);
+ $tests[$i] .= ' :zone ' . '"' . $date->format('O') . '"';
+ }
+
+ $tests[$i] .= ' :' . $test['operator'];
+
+ if ($test['comparator'] != '') {
+ if ($test['comparator'] != 'i;ascii-casemap' && $test['comparator'] != 'i;octet')
+ array_push($exts, 'comparator-' . $test['comparator']);
+
+ $tests[$i] .= ' :comparator "' . $test['comparator'] . '"';
+ }
+
+ $tests[$i] .= ' "' . $this->_escape_string($test['datepart']) . '"';
+ $tests[$i] .= ' "' . $this->_escape_string($test['target']) . '"';
+
+ break;
+ }
+
+ $i++;
+ }
+
+ $script .= ($activeRules > 0 && $this->elsif ? 'els' : '') . ($rule['join'] ? 'if allof (' : 'if anyof (');
+ $activeRules++;
+
+ if (sizeof($tests) > 1)
+ $script .= implode("," . RCUBE_SIEVE_NEWLINE . RCUBE_SIEVE_INDENT, $tests);
+ elseif (sizeof($tests))
+ $script .= $tests[0];
+ else
+ $script .= 'true';
+
+
+ $script .= ")". RCUBE_SIEVE_NEWLINE ."{" . RCUBE_SIEVE_NEWLINE;
+
+ // action(s)
+ $actions = '';
+ foreach ($rule['actions'] as $action) {
+ switch ($action['type']) {
+ case 'fileinto':
+ case 'fileinto_copy':
+ array_push($exts, 'fileinto');
+
+ $args = '';
+ if ($action['type'] == 'fileinto_copy') {
+ array_push($exts, 'copy');
+ $args .= ' :copy';
+ }
+
+ if ($action['create']) {
+ array_push($exts, 'mailbox');
+ $args .= ' :create';
+ }
+
+ // variables support in fileinto by David Warden
+ if (preg_match('/\$\{\d+\}/', $action['target']))
+ array_push($exts, 'variables');
+
+ $actions .= RCUBE_SIEVE_INDENT . "fileinto" . $args . " \"" . $this->_escape_string($action['target']) . "\";" . RCUBE_SIEVE_NEWLINE;
+ break;
+ case 'redirect':
+ case 'redirect_copy':
+ $args = '';
+ if ($action['type'] == 'redirect_copy') {
+ array_push($exts, 'copy');
+ $args .= ' :copy';
+ }
+
+ $tokens = preg_split('/[,;\s]/', $action['target']);
+ foreach ($tokens as $email)
+ $actions .= RCUBE_SIEVE_INDENT . "redirect" . $args . " \"" . $this->_escape_string($email) . "\";" . RCUBE_SIEVE_NEWLINE;
+ break;
+ case 'reject':
+ case 'ereject':
+ array_push($exts, $action['type']);
+
+ if (strpos($action['target'], "\n")!==false)
+ $actions .= RCUBE_SIEVE_INDENT . $action['type']." text:" . RCUBE_SIEVE_NEWLINE . $action['target'] . RCUBE_SIEVE_NEWLINE . "." . RCUBE_SIEVE_NEWLINE . ";" . RCUBE_SIEVE_NEWLINE;
+ else
+ $actions .= RCUBE_SIEVE_INDENT . $action['type']." \"" . $this->_escape_string($action['target']) . "\";" . RCUBE_SIEVE_NEWLINE;
+
+ break;
+ case 'vacation':
+ array_push($exts, 'vacation');
+ $action['subject'] = $this->_escape_string($action['subject']);
+
+// // encoding subject header with mb_encode provides better results with asian characters
+// if (function_exists("mb_encode_mimeheader"))
+// {
+// mb_internal_encoding($action['charset']);
+// $action['subject'] = mb_encode_mimeheader($action['subject'], $action['charset'], 'Q');
+// mb_internal_encoding(RCUBE_CHARSET);
+// }
+
+ // detect original recipient
+ if ($action['from'] == 'auto' && strpos($variables, 'set "from"') === false) {
+ array_push($exts, 'variables');
+
+ $variables .= 'set "from" "";' . RCUBE_SIEVE_NEWLINE;
+ $variables .= 'if header :matches "to" "*" {' . RCUBE_SIEVE_NEWLINE;
+ $variables .= RCUBE_SIEVE_INDENT . 'set "from" "${1}";' . RCUBE_SIEVE_NEWLINE;
+ $variables .= '}' . RCUBE_SIEVE_NEWLINE;
+
+ $action['from'] = "\${from}";
+ }
+ elseif ($action['from'] == 'auto') {
+ $action['from'] = "\${from}";
+ }
+
+ // append original subject
+ if ($action['origsubject'] == '1' && strpos($variables, 'set "subject"') === false) {
+ array_push($exts, 'variables');
+
+ $variables .= 'set "subject" "";' . RCUBE_SIEVE_NEWLINE;
+ $variables .= 'if header :matches "subject" "*" {' . RCUBE_SIEVE_NEWLINE;
+ $variables .= RCUBE_SIEVE_INDENT . 'set "subject" "${1}";' . RCUBE_SIEVE_NEWLINE;
+ $variables .= '}' . RCUBE_SIEVE_NEWLINE;
+
+ $action['subject'] = trim($action['subject']);
+ if (substr($action['subject'], -1, 1) != ":") $action['subject'] .= ":";
+ $action['subject'] .= " \${subject}";
+ }
+
+ $actions .= RCUBE_SIEVE_INDENT . "vacation" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['days'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":days ". $action['days'] . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['addresses'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":addresses [\"". str_replace(",", "\",\"", $this->_escape_string($action['addresses'])) ."\"]" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['subject'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":subject \"". $action['subject'] ."\"" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['handle'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":handle \"". $this->_escape_string($action['handle']) ."\"" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['from'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":from \"". $this->_escape_string($action['from']) ."\"" . RCUBE_SIEVE_NEWLINE;
+
+ if ($action['htmlmsg']) {
+ $MAIL_MIME = new Mail_mime("\r\n");
+
+ $action['msg'] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">' .
+ "\r\n<html><body>\r\n" . $action['msg'] . "\r\n</body></html>\r\n";
+
+ $MAIL_MIME->setHTMLBody($action['msg']);
+
+ // add a plain text version of the e-mail as an alternative part.
+ $h2t = new rcube_html2text($action['msg'], false, true, 0);
+ $plainTextPart = $h2t->get_text();
+ if (!$plainTextPart) {
+ // empty message body breaks attachment handling in drafts
+ $plainTextPart = "\r\n";
+ }
+ else {
+ // make sure all line endings are CRLF (#1486712)
+ $plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart);
+ }
+
+ $MAIL_MIME->setTXTBody($plainTextPart);
+
+ $MAIL_MIME->setParam('html_charset', $action['charset']);
+ $MAIL_MIME->setParam('text_charset', $action['charset']);
+
+ $action['msg'] = $MAIL_MIME->getMessage();
+ }
+
+ // escape lines which start is a .
+ $action['msg'] = preg_replace('/(^|\r?\n)\./', "$1..", $action['msg']);
+
+ if ($action['htmlmsg'])
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":mime text:". RCUBE_SIEVE_NEWLINE . $action['msg'] . RCUBE_SIEVE_NEWLINE . "." . RCUBE_SIEVE_NEWLINE . ";" . RCUBE_SIEVE_NEWLINE;
+ elseif ($action['charset'] != "UTF-8")
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":mime text:". RCUBE_SIEVE_NEWLINE ."Content-Type: text/plain; charset=". $action['charset'] . RCUBE_SIEVE_NEWLINE . RCUBE_SIEVE_NEWLINE . $action['msg'] . RCUBE_SIEVE_NEWLINE . "." . RCUBE_SIEVE_NEWLINE . ";" . RCUBE_SIEVE_NEWLINE;
+ elseif (strpos($action['msg'], "\n") !== false)
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . "text:" . RCUBE_SIEVE_NEWLINE . $action['msg'] . RCUBE_SIEVE_NEWLINE . "." . RCUBE_SIEVE_NEWLINE . ";" . RCUBE_SIEVE_NEWLINE;
+ else
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . "\"" . $this->_escape_string($action['msg']) . "\";" . RCUBE_SIEVE_NEWLINE;
+
+ break;
+ case 'imapflags':
+ case 'imap4flags':
+ array_push($exts, $action['type']);
+
+ if (strpos($actions, "setflag") !== false)
+ $actions .= RCUBE_SIEVE_INDENT . "addflag \"" . $this->_escape_string($action['target']) . "\";" . RCUBE_SIEVE_NEWLINE;
+ else
+ $actions .= RCUBE_SIEVE_INDENT . "setflag \"" . $this->_escape_string($action['target']) . "\";" . RCUBE_SIEVE_NEWLINE;
+
+ break;
+ case 'notify':
+ array_push($exts, 'notify');
+ $actions .= RCUBE_SIEVE_INDENT . "notify" . RCUBE_SIEVE_NEWLINE;
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":method \"" . $this->_escape_string($action['method']) . "\"" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['options'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":options [\"" . str_replace(",", "\",\"", $this->_escape_string($action['options'])) . "\"]" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['from'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":from \"" . $this->_escape_string($action['from']) . "\"" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['importance'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":importance \"" . $this->_escape_string($action['importance']) . "\"" . RCUBE_SIEVE_NEWLINE;
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":message \"". $this->_escape_string($action['msg']) ."\";" . RCUBE_SIEVE_NEWLINE;
+ break;
+ case 'enotify':
+ array_push($exts, 'enotify');
+ $actions .= RCUBE_SIEVE_INDENT . "notify" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['options'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":options [\"" . str_replace(",", "\",\"", $this->_escape_string($action['options'])) . "\"]" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['from'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":from \"" . $this->_escape_string($action['from']) . "\"" . RCUBE_SIEVE_NEWLINE;
+ if (!empty($action['importance'])) $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":importance \"" . $this->_escape_string($action['importance']) . "\"" . RCUBE_SIEVE_NEWLINE;
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . ":message \"". $this->_escape_string($action['msg']) ."\"" . RCUBE_SIEVE_NEWLINE;
+ $actions .= RCUBE_SIEVE_INDENT . RCUBE_SIEVE_INDENT . "\"" . $this->_escape_string($action['method']) . "\";" . RCUBE_SIEVE_NEWLINE;
+ break;
+ case 'editheaderadd':
+ array_push($exts, 'editheader');
+ $actions .= RCUBE_SIEVE_INDENT . "addheader";
+
+ if ($action['index'] == 'last')
+ $actions .= " :last";
+
+ $actions .= " \"". $this->_escape_string($action['name']) ."\" \"". $this->_escape_string($action['value']) ."\";" . RCUBE_SIEVE_NEWLINE;
+ break;
+ case 'editheaderrem':
+ array_push($exts, 'editheader');
+ $actions .= RCUBE_SIEVE_INDENT . "deleteheader";
+
+ if (is_numeric($action['index']))
+ $actions .= " :index " . $action['index'];
+ elseif ($action['index'] == 'last')
+ $actions .= " :last";
+
+ if (strlen($action['operator']) > 0)
+ $actions .= " :" . $action['operator'];
+
+ $actions .= " \"". $this->_escape_string($action['name']) ."\"";
+
+ if (strlen($action['value']) > 0)
+ $actions .= " \"". $this->_escape_string($action['value']) ."\"";
+
+ $actions .= ";" . RCUBE_SIEVE_NEWLINE;
+ break;
+ case 'keep':
+ case 'discard':
+ case 'stop':
+ $actions .= RCUBE_SIEVE_INDENT . $action['type'] .";" . RCUBE_SIEVE_NEWLINE;
+ break;
+ }
+ }
+
+ $script .= $actions . "}" . RCUBE_SIEVE_NEWLINE;
+ }
+ }
+
+ if ($variables)
+ $variables .= RCUBE_SIEVE_NEWLINE;
+
+ // requires
+ $exts = array_unique($exts);
+ if (sizeof($exts))
+ $script = 'require ["' . implode('","', $exts) . "\"];" . RCUBE_SIEVE_NEWLINE . RCUBE_SIEVE_NEWLINE . $variables . $script;
+
+ // author
+ if ($script && RCUBE_SIEVE_HEADER)
+ $script = RCUBE_SIEVE_HEADER . RCUBE_SIEVE_NEWLINE . $script;
+
+ return $script;
+ }
+
+ public function as_array()
+ {
+ return $this->content;
+ }
+
+ public function parse_text($script)
+ {
+ $i = 0;
+ $content = array();
+
+ // remove C comments
+ $script = preg_replace('|/\*.*?\*/|sm', '', $script);
+
+ // tokenize rules - \r is optional for backward compatibility (added 20090413)
+ if ($tokens = preg_split('/(# rule:\[.*\])\r?\n/', $script, -1, PREG_SPLIT_DELIM_CAPTURE)) {
+ foreach($tokens as $token) {
+ if (preg_match('/^# rule:\[(.*)\]/', $token, $matches)) {
+ $content[$i]['name'] = $matches[1];
+ }
+ elseif (isset($content[$i]['name']) && sizeof($content[$i]) == 1 && preg_match('/^# disabledRule:\[(.*)\]/', $token, $matches)) {
+ $content[$i] = unserialize($this->_regular_serial($matches[1]));
+ $i++;
+ }
+ elseif (isset($content[$i]['name']) && sizeof($content[$i]) == 1) {
+ if ($rule = $this->_tokenize_rule($token)) {
+ $content[$i] = array_merge($content[$i], $rule);
+ $i++;
+ }
+ else {
+ unset($content[$i]);
+ }
+ }
+ }
+ }
+
+ return $content;
+ }
+
+ private function _tokenize_rule($content)
+ {
+ $result = NULL;
+
+ if (preg_match('/^(if|elsif|else)\s+((true|not\s+true|allof|anyof|exists|header|not|size|envelope|address|spamtest|virustest|date|currentdate)\s+(.*))\s+\{(.*)\}$/sm', trim($content), $matches)) {
+ list($tests, $join) = $this->_parse_tests(trim($matches[2]));
+ $actions = $this->_parse_actions(trim($matches[5]));
+
+ if ($tests && $actions) {
+ $result = array(
+ 'tests' => $tests,
+ 'actions' => $actions,
+ 'join' => $join,
+ );
+ }
+ }
+
+ return $result;
+ }
+
+ private function _parse_actions($content)
+ {
+ $content = str_replace("\r\n", "\n", $content);
+ $result = NULL;
+
+ // supported actions
+ $patterns[] = '^\s*discard;';
+ $patterns[] = '^\s*keep;';
+ $patterns[] = '^\s*stop;';
+ $patterns[] = '^\s*fileinto\s+(:copy\s+)?(:create\s+)?(.*?[^\\\]);';
+ $patterns[] = '^\s*redirect\s+(:copy\s+)?(.*?[^\\\]);';
+ $patterns[] = '^\s*setflag\s+(.*?[^\\\]);';
+ $patterns[] = '^\s*addflag\s+(.*?[^\\\]);';
+ $patterns[] = '^\s*reject\s+text:(.*)\n\.\n;';
+ $patterns[] = '^\s*ereject\s+text:(.*)\n\.\n;';
+ $patterns[] = '^\s*reject\s+(.*?[^\\\]);';
+ $patterns[] = '^\s*ereject\s+(.*?[^\\\]);';
+ $patterns[] = '^\s*vacation\s+(:days\s+([0-9]+)\s+)?(:addresses\s+\[(.*?[^\\\])\]\s+)?(:subject\s+(".*?[^"\\\]")\s+)?(:handle\s+(".*?[^"\\\]")\s+)?(:from\s+(".*?[^"\\\]")\s+)?(:mime\s+)?text:(.*)\n\.\n;';
+ $patterns[] = '^\s*vacation\s+(:days\s+([0-9]+)\s+)?(:addresses\s+\[(.*?[^\\\])\]\s+)?(:subject\s+(".*?[^"\\\]")\s+)?(:handle\s+(".*?[^"\\\]")\s+)?(:from\s+(".*?[^"\\\]")\s+)?(.*?[^\\\]);';
+ $patterns[] = '^\s*notify\s+:method\s+(".*?[^"\\\]")\s+(:options\s+\[(.*?[^\\\])\]\s+)?(:from\s+(".*?[^"\\\]")\s+)?(:importance\s+(".*?[^"\\\]")\s+)?:message\s+(".*?[^"\\\]");';
+ $patterns[] = '^\s*notify\s+(:options\s+\[(.*?[^\\\])\]\s+)?(:from\s+(".*?[^"\\\]")\s+)?(:importance\s+(".*?[^"\\\]")\s+)?:message\s+(".*?[^"\\\]")\s+(.*);';
+ $patterns[] = '^\s*addheader\s+(:(last))?\s*(".*?[^"\\\]")\s+(".*?[^"\\\]");';
+ $patterns[] = '^\s*deleteheader\s+(:(last)|:index\s([0-9])+)?\s*(:(contains))?\s*(".*?[^"\\\]")\s*(".*?[^"\\\]")?;';
+
+ $pattern = '/(' . implode('$)|(', $patterns) . '$)/ms';
+
+ // parse actions body
+ if (preg_match_all($pattern, $content, $mm, PREG_SET_ORDER)) {
+ foreach ($mm as $m) {
+ $content = trim($m[0]);
+
+ if (preg_match('/^(discard|keep|stop)/', $content, $matches)) {
+ $result[] = array('type' => $matches[1]);
+ }
+ elseif (preg_match('/^fileinto\s+:copy/', $content)) {
+ $result[] = array('type' => 'fileinto_copy', 'target' => $this->_parse_string($m[sizeof($m)-1]));
+ }
+ elseif (preg_match('/^fileinto/', $content)) {
+ $result[] = array('type' => 'fileinto', 'target' => $this->_parse_string($m[sizeof($m)-1]));
+ }
+ elseif (preg_match('/^redirect\s+:copy/', $content)) {
+ $result[] = array('type' => 'redirect_copy', 'target' => $this->_parse_string($m[sizeof($m)-1]));
+ }
+ elseif (preg_match('/^redirect/', $content)) {
+ $result[] = array('type' => 'redirect', 'target' => $this->_parse_string($m[sizeof($m)-1]));
+ }
+ elseif (preg_match('/^(reject|ereject)\s+(.*);$/sm', $content, $matches)) {
+ $result[] = array('type' => $matches[1], 'target' => $this->_parse_string($matches[2]));
+ }
+ elseif (preg_match('/^(setflag|addflag)/', $content)) {
+ if (in_array('imap4flags', $this->supported))
+ $result[] = array('type' => 'imap4flags', 'target' => $this->_parse_string($m[sizeof($m)-1]));
+ else
+ $result[] = array('type' => 'imapflags', 'target' => $this->_parse_string($m[sizeof($m)-1]));
+ }
+ elseif (preg_match('/^vacation\s+(:days\s+([0-9]+)\s+)?(:addresses\s+\[(.*?[^\\\])\]\s+)?(:subject\s+(".*?[^"\\\]")\s+)?(:handle\s+(".*?[^"\\\]")\s+)?(:from\s+(".*?[^"\\\]")\s+)?(.*);$/sm', $content, $matches)) {
+ $origsubject = "";
+ if (substr($matches[6], -13, 12) == ": \${subject}") {
+ $matches[6] = trim(substr($matches[6], 0, -13)) . "\"";
+ $origsubject = "1";
+ }
+
+ if ($matches[10] == "\"\${from}\"")
+ $matches[10] = "\"auto\"";
+
+// if (function_exists("mb_decode_mimeheader")) $matches[5] = mb_decode_mimeheader($matches[5]);
+
+ if (strpos($matches[11], 'Content-Type: multipart/alternative') !== false) {
+ $htmlmsg = true;
+
+ preg_match('/Content-Type: text\/html; charset=([^\r\n]+).*<body>(.+)<\/body>/sm', $matches[11], $htmlparts);
+ $msg = quoted_printable_decode($htmlparts[2]);
+ $charset = $htmlparts[1];
+ }
+ else {
+ $htmlmsg = false;
+ $msg = $this->_parse_string($matches[11]);
+ $charset = $this->_parse_charset($matches[11]);
+ }
+
+ // unescape lines which start is a .
+ $msg = preg_replace('/(^|\r?\n)\.\./', "$1.", $msg);
+
+ $result[] = array('type' => 'vacation',
+ 'days' => $matches[2],
+ 'subject' => $this->_parse_string($matches[6]),
+ 'origsubject' => $origsubject,
+ 'from' => $this->_parse_string($matches[10]),
+ 'addresses' => $this->_parse_string(str_replace("\",\"", ",", $matches[4])),
+ 'handle' => $this->_parse_string($matches[8]),
+ 'msg' => $msg,
+ 'htmlmsg' => $htmlmsg,
+ 'charset' => $charset);
+ }
+ elseif (preg_match('/^notify\s+:method\s+(".*?[^"\\\]")\s+(:options\s+\[(.*?[^\\\])\]\s+)?(:from\s+(".*?[^"\\\]")\s+)?(:importance\s+(".*?[^"\\\]")\s+)?:message\s+(".*?[^"\\\]");$/sm', $content, $matches)) {
+ $result[] = array('type' => 'notify',
+ 'method' => $this->_parse_string($matches[1]),
+ 'options' => $this->_parse_string($matches[3]),
+ 'from' => $this->_parse_string($matches[5]),
+ 'importance' => $this->_parse_string($matches[7]),
+ 'msg' => $this->_parse_string($matches[8]));
+ }
+ elseif (preg_match('/^notify\s+(:options\s+\[(.*?[^\\\])\]\s+)?(:from\s+(".*?[^"\\\]")\s+)?(:importance\s+(".*?[^"\\\]")\s+)?:message\s+(".*?[^"\\\]")\s+(.*);$/sm', $content, $matches)) {
+ $result[] = array('type' => 'enotify',
+ 'method' => $this->_parse_string($matches[8]),
+ 'options' => $this->_parse_string($matches[2]),
+ 'from' => $this->_parse_string($matches[4]),
+ 'importance' => $this->_parse_string($matches[6]),
+ 'msg' => $this->_parse_string($matches[7]));
+ }
+ elseif (preg_match('/^addheader/', $content)) {
+ $result[] = array('type' => 'editheaderadd',
+ 'index' => $m[sizeof($m)-3],
+ 'name' => $this->_parse_string($m[sizeof($m)-2]),
+ 'value' => $this->_parse_string($m[sizeof($m)-1]));
+ }
+ elseif (preg_match('/^deleteheader/', $content)) {
+ $result[] = array('type' => 'editheaderrem',
+ 'index' => $m[sizeof($m)-6] == 'last' ? $m[sizeof($m)-6] : $m[sizeof($m)-5],
+ 'operator' => $m[sizeof($m)-3],
+ 'name' => strlen($m[sizeof($m)-2]) == 0 ? $this->_parse_string($m[sizeof($m)-1]) : $this->_parse_string($m[sizeof($m)-2]),
+ 'value' => strlen($m[sizeof($m)-2]) == 0 ? '' : $this->_parse_string($m[sizeof($m)-1]));
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ private function _parse_tests($content)
+ {
+ $result = NULL;
+
+ // lists
+ if (preg_match('/^(allof|anyof)\s+\((.*)\)$/sm', $content, $matches)) {
+ $content = $matches[2];
+ $join = $matches[1]=='allof' ? true : false;
+ }
+ else {
+ $join = false;
+ }
+
+ // supported tests regular expressions
+ $patterns[] = '(not\s+)?(exists)\s+\[(.*?[^\\\])\]';
+ $patterns[] = '(not\s+)?(exists)\s+(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(true)';
+ $patterns[] = '(not\s+)?(size)\s+:(under|over)\s+([0-9]+[KGM]{0,1})';
+ $patterns[] = '(not\s+)?(spamtest|virustest)\s+:value\s+"(eq|ge|le)"\s+:comparator\s+"i;ascii-numeric"\s+"(.*?[^\\\])"';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(contains|is|matches|regex|user|detail|domain)((\s+))\[(.*?[^\\\]")\]\s+\[(.*?[^\\\]")\]';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(contains|is|matches|regex|user|detail|domain)((\s+))(".*?[^\\\]")\s+(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(contains|is|matches|regex|user|detail|domain)((\s+))\[(.*?[^\\\]")\]\s+(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(contains|is|matches|regex|user|detail|domain)((\s+))(".*?[^\\\]")\s+\[(.*?[^\\\]")\]';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(count\s+".*?[^\\\]"|value\s+".*?[^\\\]")(\s+:comparator\s+"(.*?[^\\\])")?\s+\[(.*?[^\\\]")\]\s+\[(.*?[^\\\]")\]';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(count\s+".*?[^\\\]"|value\s+".*?[^\\\]")(\s+:comparator\s+"(.*?[^\\\])")?\s+(".*?[^\\\]")\s+(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(count\s+".*?[^\\\]"|value\s+".*?[^\\\]")(\s+:comparator\s+"(.*?[^\\\])")?\s+\[(.*?[^\\\]")\]\s+(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(header|address|envelope)\s+:(count\s+".*?[^\\\]"|value\s+".*?[^\\\]")(\s+:comparator\s+"(.*?[^\\\])")?\s+(".*?[^\\\]")\s+\[(.*?[^\\\]")\]';
+ $patterns[] = '(not\s+)?(body)(\s+:(raw|text|content\s+".*?[^\\\]"))?\s+:(contains|is|matches|regex)((\s+))\[(.*?[^\\\]")\]';
+ $patterns[] = '(not\s+)?(body)(\s+:(raw|text|content\s+".*?[^\\\]"))?\s+:(contains|is|matches|regex)((\s+))(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(body)(\s+:(raw|text|content\s+".*?[^\\\]"))?\s+:(count\s+".*?[^\\\]"|value\s+".*?[^\\\]")(\s+:comparator\s+"(.*?[^\\\])")?\s+\[(.*?[^\\\]")\]';
+ $patterns[] = '(not\s+)?(body)(\s+:(raw|text|content\s+".*?[^\\\]"))?\s+:(count\s+".*?[^\\\]"|value\s+".*?[^\\\]")(\s+:comparator\s+"(.*?[^\\\])")?\s+(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(date|currentdate)(\s+:zone\s+"([\+\-][0-9]{4})")?\s+:(contains|is|matches|regex)((\s+))(".*?[^\\\]"\s+)?(".*?[^\\\]")\s+(".*?[^\\\]")';
+ $patterns[] = '(not\s+)?(date|currentdate)(\s+:zone\s+"([\+\-][0-9]{4})")?\s+:(count\s+".*?[^\\\]"|value\s+".*?[^\\\]")(\s+:comparator\s+"(.*?[^\\\])")?(\s+".*?[^\\\]")?\s+(".*?[^\\\]")\s+(".*?[^\\\]")';
+
+ // join patterns...
+ $pattern = '/(' . implode(')|(', $patterns) . ')/';
+
+ // ...and parse tests list
+ if (preg_match_all($pattern, $content, $matches, PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ $size = sizeof($match);
+
+ if (preg_match('/^(not\s+)?size/', $match[0])) {
+ $result[] = array(
+ 'type' => 'size',
+ 'not' => $match[$size-4] ? true : false,
+ 'operator' => $match[$size-2], // under/over
+ 'target' => $match[$size-1], // value
+ );
+ }
+ elseif (preg_match('/^(not\s+)?(spamtest|virustest)/', $match[0])) {
+ $result[] = array(
+ 'type' => $match[$size-3],
+ 'not' => $match[$size-4] ? true : false,
+ 'operator' => $match[$size-2], // ge/le/eq
+ 'target' => $match[$size-1], // value
+ );
+ }
+ elseif (preg_match('/^(not\s+)?(header|address|envelope)/', $match[0])) {
+ $result[] = array(
+ 'type' => $match[$size-6],
+ 'not' => $match[$size-7] ? true : false,
+ 'operator' => $match[$size-5], // is/contains/matches
+ 'header' => $this->_parse_list($match[$size-2]), // header(s)
+ 'target' => $this->_parse_list($match[$size-1], ($match[$size-5] == 'regex' ? true : false)), // string(s)
+ 'comparator' => trim($match[$size-3])
+ );
+ }
+ elseif (preg_match('/^(not\s+)?exists/', $match[0])) {
+ $result[] = array(
+ 'type' => 'exists',
+ 'not' => $match[$size-3] ? true : false,
+ 'operator' => 'exists',
+ 'header' => $this->_parse_list($match[$size-1]), // header(s)
+ );
+ }
+ elseif (preg_match('/^(not\s+)?true/', $match[0])) {
+ $result[] = array(
+ 'type' => 'true',
+ 'not' => $match[$size-2] ? true : false,
+ );
+ }
+ elseif (preg_match('/^(not\s+)?body/', $match[0])) {
+ if (preg_match('/.*content\s+"(.*?[^\\\])".*/', $match[$size-5], $parts)) {
+ $bodypart = 'content';
+ $contentpart = $parts[1];
+ }
+ else {
+ $bodypart = $match[$size-5];
+ $contentpart = '';
+ }
+
+ $result[] = array(
+ 'type' => 'body',
+ 'not' => $match[$size-8] ? true : false,
+ 'bodypart' => $bodypart,
+ 'contentpart' => $contentpart,
+ 'operator' => $match[$size-4], // is/contains/matches
+ 'header' => 'body', // header(s)
+ 'target' => $this->_parse_list($match[$size-1], ($match[$size-4] == 'regex' ? true : false)), // string(s)
+ 'comparator' => trim($match[$size-2])
+ );
+ }
+ elseif (preg_match('/^(not\s+)?(date|currentdate)/', $match[0])) {
+ $result[] = array(
+ 'type' => 'date',
+ 'not' => $match[$size-10] ? true : false,
+ 'header' => $match[$size-9], // header
+ 'operator' => $match[$size-6], // is/contains/matches
+ 'datepart' => $this->_parse_list($match[$size-2]),
+ 'target' => $this->_parse_list($match[$size-1], ($match[$size-5] == 'regex' ? true : false)), // string(s)
+ 'field' => $match[$size-3], // received
+ 'comparator' => trim($match[$size-4])
+ );
+ }
+ }
+ }
+
+ return array($result, $join);
+ }
+
+ private function _parse_string($content)
+ {
+ $text = '';
+ $content = trim($content);
+
+ if (preg_match('/^:mime\s+text:(.*)\.$/sm', $content, $matches)) {
+ $parts = preg_split("/\r?\n/", $matches[1], 4);
+ $text = trim($parts[3]);
+ }
+ elseif (preg_match('/^text:(.*)\.$/sm', $content, $matches))
+ $text = trim($matches[1]);
+ elseif (preg_match('/^"(.*)"$/', $content, $matches))
+ $text = str_replace('\"', '"', $matches[1]);
+
+ return $text;
+ }
+
+ private function _parse_charset($content)
+ {
+ $charset = RCUBE_CHARSET;
+ $content = trim($content);
+
+ if (preg_match('/^:mime\s+text:(.*)\.$/sm', $content, $matches)) {
+ $parts = preg_split("/\r?\n/", $matches[1], 4);
+
+ $charset = trim(substr($parts[1], stripos($parts[1], "charset=") + 8));
+ }
+
+ return $charset;
+ }
+
+ private function _escape_string($content)
+ {
+ $replace['/"/'] = '\\"';
+
+ if (is_array($content)) {
+ for ($x=0, $y=sizeof($content); $x<$y; $x++)
+ $content[$x] = preg_replace(array_keys($replace), array_values($replace), $content[$x]);
+
+ return $content;
+ }
+ else {
+ return preg_replace(array_keys($replace), array_values($replace), $content);
+ }
+ }
+
+ private function _parse_list($content, $regex = false)
+ {
+ $result = array();
+
+ if ($regex) {
+ if (preg_match('/^"(.*)"$/', $content, $matches));
+ $content = $matches[1];
+
+ $content = str_replace('\"', '"', $content);
+ return $content;
+ }
+
+ for ($x=0, $len=strlen($content); $x<$len; $x++) {
+ switch ($content[$x]) {
+ case '\\':
+ $str .= $content[++$x];
+
+ break;
+ case '"':
+ if (isset($str)) {
+ $result[] = $str;
+ unset($str);
+ }
+ else {
+ $str = '';
+ }
+
+ break;
+ default:
+ if (isset($str))
+ $str .= $content[$x];
+
+ break;
+ }
+ }
+
+ if (sizeof($result)>1)
+ return $result;
+ elseif (sizeof($result) == 1)
+ return $result[0];
+ else
+ return NULL;
+ }
+
+ private function _safe_serial($data)
+ {
+ $data = str_replace("\r", "[!r]", $data);
+ $data = str_replace("\n", "[!n]", $data);
+ return $data;
+ }
+
+ private function _regular_serial($data)
+ {
+ $data = str_replace("[!r]", "\r", $data);
+ $data = str_replace("[!n]", "\n", $data);
+ return $data;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/jquery.maskedinput.js b/plugins/sieverules/jquery.maskedinput.js
new file mode 100644
index 000000000..0d9ce6e06
--- /dev/null
+++ b/plugins/sieverules/jquery.maskedinput.js
@@ -0,0 +1,7 @@
+/*
+ Masked Input plugin for jQuery
+ Copyright (c) 2007-2013 Josh Bush (digitalbush.com)
+ Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
+ Version: 1.3.1
+*/
+(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++<a.length;)if(n=a.charAt(pos-1),s[t].test(n)){R[t]=n,i=t;break}if(pos>a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery); \ No newline at end of file
diff --git a/plugins/sieverules/lib/Net/Sieve.php b/plugins/sieverules/lib/Net/Sieve.php
new file mode 120000
index 000000000..fa112b6a9
--- /dev/null
+++ b/plugins/sieverules/lib/Net/Sieve.php
@@ -0,0 +1 @@
+../../../../../php/Net/Sieve.php \ No newline at end of file
diff --git a/plugins/sieverules/localization/ca_ES.inc b/plugins/sieverules/localization/ca_ES.inc
new file mode 100644
index 000000000..63ad80d0f
--- /dev/null
+++ b/plugins/sieverules/localization/ca_ES.inc
@@ -0,0 +1,168 @@
+<?php
+/* Author: GràciaNet */
+
+$labels = array();
+$labels['filters'] = 'Filtres';
+$labels['managefilters'] = 'Gesti&oacute; de filtres';
+$labels['filtername'] = 'Nom del filtre';
+$labels['disablerule'] = 'Desactivar regla';
+$labels['disabled'] = 'Desactivada';
+$labels['newfilter'] = 'Nou filtre';
+$labels['moveup'] = 'Moure amunt';
+$labels['movedown'] = 'Moure avall';
+$labels['filterallof'] = 'coincideix amb TOTES les regles seg&uuml;ents';
+$labels['filteranyof'] = 'coincideix amb ALGUNA de les seg&uuml;ents regles';
+$labels['filterany'] = 'tots els missatges';
+$labels['filtercontains'] = 'cont&eacute;';
+$labels['filternotcontains'] = 'no cont&eacute';
+$labels['filteris'] = '&eacutes igual a';
+$labels['filterisnot'] = 'es diferent de';
+$labels['filterexists'] = 'existeix';
+$labels['filternotexists'] = 'no existeix';
+$labels['filterregex'] = 'coincideix amb l\'expressi&oacute; regular';
+$labels['filternotregex'] = 'no coincideix amb l\'expressi&oacute; regular';
+$labels['filterunder'] = '&eacutes menys que';
+$labels['filterover'] = '&eacutes m&eacutes que';
+$labels['filteradvoptions'] = 'm&eacutes opcions...';
+$labels['spamtest'] = 'Probabilitat de Spam';
+$labels['operator'] = 'Operador';
+$labels['comparator'] = 'Comparador';
+$labels['isgreaterthan'] = '&eacutes major que';
+$labels['isgreaterthanequal'] = '&eacutes major o igual que';
+$labels['islessthan'] = '&eacutes menor que';
+$labels['islessthanequal'] = '&eacutes menor o igual que';
+$labels['equals'] = '&eacutes igual a';
+$labels['notequals'] = '&eacutes diferent de';
+$labels['countisgreaterthan'] = 'quantitat &eacutes major que';
+$labels['countisgreaterthanequal'] = 'quantitat ñes major o igual que';
+$labels['countislessthan'] = 'quantitat &eacutes menor que';
+$labels['countislessthanequal'] = 'quantitat &eacutes menor o igual que';
+$labels['countequals'] = 'quantitat &eacutes igual a';
+$labels['countnotequals'] = 'quantitat &eacutes diferent de';
+$labels['valueisgreaterthan'] = 'valor &eacutes major que';
+$labels['valueisgreaterthanequal'] = 'valor &eacutes major o igual que';
+$labels['valueislessthan'] = 'valor &eacutes menor que';
+$labels['valueislessthanequal'] = 'valor &eacutes menor o igual que';
+$labels['valueequals'] = 'valor &eacutes igual a';
+$labels['valuenotequals'] = 'valor &eacutes diferent de';
+$labels['userpart'] = 'la part de l\'usuari &eacutes igual a';
+$labels['notuserpart'] = 'la part de l\'usuari &eacutes diferent de';
+$labels['detailpart'] = 'la part del detall &eacutes igual a';
+$labels['notdetailpart'] = 'la part del detall &eacutes diferent de';
+$labels['domainpart'] = 'la part del domini &eacutes igual a';
+$labels['notdomainpart'] = 'la part del domini &eacutes diferent de';
+$labels['teststring'] = 'Iniciant prova';
+$labels['messagemoveto'] = 'Moure missatge a';
+$labels['messageredirect'] = 'Redirigir missatge a';
+$labels['messageimapflags'] = 'Marcar missatge com';
+$labels['messagereject'] = 'Rebutjar amb avís';
+$labels['messagevacation'] = 'Missatge de vacances';
+$labels['messagekeep'] = 'Mantenir missatges';
+$labels['messagediscard'] = 'Descartar missatge';
+$labels['messagenotify'] = 'Enviar notificaci&oacute; ';
+$labels['messagestop'] = 'Deixar de processar filtres';
+$labels['messagehelp'] = 'Qu&egrave; &eacutes això?';
+$labels['sieveorigsubj'] = 'Afegir assumpte original a la resposta';
+$labels['sievevachandle'] = 'Manejador';
+$labels['method'] = 'M&egrave;tode';
+$labels['options'] = 'Opcions';
+$labels['messagesrules'] = 'Regles de filtrat';
+$labels['messagesactions'] = 'Accions del filtre';
+$labels['sieveto'] = 'Àlies';
+$labels['sievefrom'] = 'De';
+$labels['flag'] = 'Marca';
+$labels['importancen'] = 'Cap';
+$labels['importance1'] = '1';
+$labels['importance2'] = '2';
+$labels['importance3'] = '3';
+$labels['flagread'] = 'Llegit';
+$labels['flagdeleted'] = 'Eliminat';
+$labels['flaganswered'] = 'Respost';
+$labels['flagdraft'] = 'Esborrany';
+$labels['flagflagged'] = 'Marcat';
+$labels['addsieverule'] = 'Afegir una altra regla despr&eacutes d\'aquesta';
+$labels['addsieveact'] = 'Afegir una altra acci&oacute; despr&eacutes d\'aquesta';
+$labels['deletesieverule'] = 'Eliminar aquesta regla';
+$labels['deletesieveact'] = 'Eliminar aquesta acci&oacute; ';
+$labels['envelopefrom'] = 'Remitent a la capçalera';
+$labels['envelopeto'] = 'Destinatari e la capçalera';
+$labels['otherheader'] = 'Una altra capçalera';
+$labels['days'] = 'Període';
+$labels['message'] = 'Missatge';
+$labels['sieveruleheaders'] = 'Veure exemples d\'altres capçaleres';
+$labels['examplefilters'] = 'Filtres d\'exemple';
+$labels['importfilters'] = 'Importar filtres';
+$labels['usedefaultfilter'] = 'Utilitzar filters per defecte';
+$labels['importfilter'] = 'Importar filtre';
+$labels['adveditor'] = 'Editor avançat';
+$labels['messageredirectcopy'] = 'Envía una còpia a ';
+$labels['messagecopyto'] = 'Copiar missatge a ';
+$labels['body'] = 'Cos';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Altre';
+$labels['bodycontentpart'] = 'Contingut';
+$labels['notchecked'] = 'no seleccionat';
+$labels['spamlevelisgreaterthanequal'] = '&eacutes major o igual que';
+$labels['spamlevelislessthanequal'] = '&eacutes menor o igual que';
+$labels['spamlevelequals'] = '&eacutes igual a';
+$labels['selectruleset'] = 'Escollir conjunt de regles';
+$labels['activeruleset'] = '%s (actiu)';
+$labels['activateruleset'] = 'Activar aquest conjunt de regles';
+$labels['newruleset'] = 'Crear un nou conjunt de regles.';
+$labels['delruleset'] = 'Eliminar aquest conjunt de regles';
+$labels['renameruleset'] = 'Renombrar aquest conjunt de regles';
+$labels['copy'] = 'Copiar';
+$labels['copyexistingfilter'] = 'Copiar els filtres existentes';
+$labels['copytoruleset'] = 'Copiar filtre a un altre conjunt de regles';
+$labels['copyfromruleset'] = 'Copiar filtres des d\'un conjunt de regles existents';
+
+$messages = array();
+$messages['nosieverules'] = 'No s\'han trobat filtres.';
+$messages['filterdeleteconfirm'] = 'Est&agrave;s segur de voler eliminar aquest filtre?';
+$messages['ruledeleteconfirm'] = 'Est&agrave;s segur de voler eliminar aquesta regla?';
+$messages['actiondeleteconfirm'] = 'Est&agrave;s segur de voler eliminar aquesta acci&oacute; ?';
+$messages['filterunknownerror'] = 'Error desconegut en el servidor';
+$messages['filterconnerror'] = 'Impossible connectar amb el servidor sieve';
+$messages['filterdeleteerror'] = 'No s\'ha pogut eliminar el filtre. Error del servidor';
+$messages['filterdeleted'] = 'Filtre eliminat';
+$messages['filtersaved'] = 'Filtre guardat';
+$messages['filtersaveerror'] = 'Incapaç de guardar el filtre. Error en el servidor';
+$messages['vacdaysexp'] = 'El període &eacutes el número de dies que el missatge no ser&agrave; reenviat al mateix usuari, sense importar el nombre de vegades que intenti posar-se en contacte amb tu<br /><br />Por ejemplo, si en Jaume envia un misssatge un dilluns, i t&eacute un període fixat en 7, en Jaume rebr&agrave; un avís de vacances el dilluns però no en rebr&agrave; cap altre fins al proper dilluns, malgrat env&iuml;i m&eacutes missatges durant la setmana.';
+$messages['vachandleexp'] = 'Es pot usar un manejador per a vincular diferents missatges de vacances tots junts. Un cop s\'env&iuml;i el missatge no se n\'enviar&agrave; un altre que contingut el mateix manejador durant el període definit.';
+$messages['vactoexp'] = 'Llista de destinataris addicionals que seran inclosos en l\'auto-resposta. Si un usuari no &eacutes la sefa adreça personal i no est&agrave; a la llista no se li enviar&agrave;n missatges.';
+$messages['norulename'] = 'Cal assignar un nom al filtre';
+$messages['ruleexists'] = 'Ja existeix un filtre amb aquest nom. Escolleix-ne un altre';
+$messages['noheader'] = 'Heu d\'introdu&iuml;r el nom de la capçalera a verificar';
+$messages['headerbadchars'] = 'Error: La capçalera cont&eacute car&agrave;cters no permesos';
+$messages['noheadervalue'] = 'Ingresseu un valor per a comparar-lo amb la capçalera';
+$messages['sizewrongformat'] = 'Error: El tamany del missatge ha de ser num&egrave;ric';
+$messages['noredirect'] = 'Introdu&iuml;u una adreça de correu a la qual redirigir tots els missatges';
+$messages['redirectaddresserror'] = 'Error: Adreça no v&agrave;lida';
+$messages['noreject'] = 'Introdu&iuml;u el text a enviar en els missatges rebutjats';
+$messages['vacnodays'] = 'Introdu&iuml;u el número de dies per al període que el missatge no ser&agrave; reenviat a la mateixa persona';
+$messages['vacdayswrongformat'] = 'Error: El període ha de ser de m&eacutes d\'1 dia';
+$messages['vacnomsg'] = 'Introdu&iuml;u un text per al missatge';
+$messages['notifynomethod'] = 'Introdu&iuml;u un m&egrave;tode a trav&eacutes del qual s\'enviar&agrave; la notificaci&oacute; ';
+$messages['notifynomsg'] = 'Introdu&iuml;u un text per al seu missatge';
+$messages['sieveruleexp'] = 'Heu de definir una o m&eacutes regles que s\'empraran per a comprar els missatges. Els filtres s&oacute; n executats en l\'ordre que apareixen a l\'esquerra d\'aquesta pantalla. Si es troba una coincid&egrave;ncia, la resta del filtres no es comproven.';
+$messages['sieveactexp'] = 'Seleccioneu una de les opcions que apareixen a continuaci&oacute; . Aquesta acci&oacute; ser&agrave; executada per cada missatge que encaixi amb les regles definides a sobre d\'aquest text.';
+$messages['sieveheadershlp'] = 'A continuaci&oacute; hi ha alguns exemples de capçaleres que poden verificar-se amb filtres. Seleccioni\'n una per afegir a la regla o introdu&iuml;u-ne una de pròpia en el requadre de dalt.';
+$messages['movingfilter'] = 'Movent filtre...';
+$messages['noexistingfilters'] = 'No s\'han detectat filtres!';
+$messages['importdefault'] = '<b>Emprar filtres per defecte:</b> Hi ha un joc de filtres per defecte disponibles. Voleu instalar una còpia d\'aquests filtres?';
+$messages['importother'] = '<b>Importar filtres:</b> S\'ha trobat un altre joc de filtres de %s. Voleu importar-los a la llsita de filtres?';
+$messages['switchtoadveditor'] = 'L\'editor avançat li permet editar les regles de sieve directament. Qualsevol canvi que faci ser&agrave; il.legible per l\'editor normal de regles i es perder&agrave; si guarda modificacions amb l\'editor normal. Voleu continuar?';
+$messages['filterimported'] = 'Filtre importat correctament';
+$messages['filterimporterror'] = 'No s\'ha pogut importar el filtre . Error en el servidor';
+$messages['badoperator'] = 'Ho lamentem, però l\'operador seleccionat no es pot usar en aquesta regla.';
+$messages['filteractionerror'] = 'L\'acci&oacute; requerida no est&agrave; disponible en aquest servidor.';
+$messages['filtermissingerror'] = 'No s\'ha pogut localitzar la regla solicitada.';
+$messages['delrulesetconf'] = 'Esteu segur de voler eliminar aquest conjunt de regles?';
+$messages['rulesetexists'] = 'Ja existeix un conjunt de regles amb aquest nom. Escolliu-ne un altre.';
+$messages['copyexisting'] = '<b> Copia el seg&uuml;ent conjunt de regles:</b> Voleu importar els filtres d\'un conjunt de regles existents al conjunt actual?';
+$messages['filtercopied'] = 'Filtre copiat correctament';
+$messages['nosieverulesets'] = 'No s\'han trobat regles.';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/cs_CZ.inc b/plugins/sieverules/localization/cs_CZ.inc
new file mode 100644
index 000000000..f5a8b5f61
--- /dev/null
+++ b/plugins/sieverules/localization/cs_CZ.inc
@@ -0,0 +1,195 @@
+<?php
+/* Author: Kepi */
+
+$labels = array();
+$labels['filters'] = 'Filtry';
+$labels['filtersname'] = 'Filtry ($name)';
+$labels['managefilters'] = 'Spravovat filtry';
+$labels['filtername'] = 'Název filtru';
+$labels['disablerule'] = 'Vypnout filtr';
+$labels['disabled'] = 'vypnuto';
+$labels['newfilter'] = 'Nový filtr';
+$labels['moveup'] = 'Posunout nahoru';
+$labels['movedown'] = 'Posunout dolů';
+$labels['filterallof'] = 'odpovídá všem pravidlům';
+$labels['filteranyof'] = 'odpovídá alespoň jednomu pravidlu';
+$labels['filterany'] = 'všechny zprávy';
+$labels['filtercontains'] = 'obsahuje';
+$labels['filternotcontains'] = 'neobsahuje';
+$labels['filteris'] = 'je rovno';
+$labels['filterisnot'] = 'není rovno';
+$labels['filterexists'] = 'existuje';
+$labels['filternotexists'] = 'neexistuje';
+$labels['filterregex'] = 'odpovídá regulárnímu výrazu';
+$labels['filternotregex'] = 'neodpovídá regulárnímu výrazu';
+$labels['filterunder'] = 'je méně než';
+$labels['filterover'] = 'je více než';
+$labels['filterbefore'] = 'je před';
+$labels['filterafter'] = 'je po';
+$labels['filteradvoptions'] = 'více možností...';
+$labels['spamtest'] = 'Pravděpodobnost spamu';
+$labels['operator'] = 'Operátor';
+$labels['comparator'] = 'Porovnávání';
+$labels['isgreaterthan'] = 'je větší než';
+$labels['isgreaterthanequal'] = 'je větší nebo rovno';
+$labels['islessthan'] = 'je menší než';
+$labels['islessthanequal'] = 'je menší nebo rovno';
+$labels['equals'] = 'je rovno';
+$labels['notequals'] = 'není rovno';
+$labels['countisgreaterthan'] = 'počet je větší než';
+$labels['countisgreaterthanequal'] = 'počet je větší nebo roven';
+$labels['countislessthan'] = 'počet je menší než';
+$labels['countislessthanequal'] = 'počet je menší nebo roven';
+$labels['countequals'] = 'počet je roven';
+$labels['countnotequals'] = 'počet není roven';
+$labels['valueisgreaterthan'] = 'hodnota je větší než';
+$labels['valueisgreaterthanequal'] = 'hodnota je větší nebo rovna';
+$labels['valueislessthan'] = 'hodnota je menší než';
+$labels['valueislessthanequal'] = 'hodnota je menší nebo rovna';
+$labels['valueequals'] = 'hodnota je rovna';
+$labels['valuenotequals'] = 'hodnota není rovna';
+$labels['userpart'] = 'část uživatele je rovna';
+$labels['notuserpart'] = 'část uživatele není rovna';
+$labels['detailpart'] = 'upřesňující část je rovna';
+$labels['notdetailpart'] = 'upřesňující část není rovna';
+$labels['domainpart'] = 'doménová část je rovna';
+$labels['notdomainpart'] = 'doménová část není rovna';
+$labels['teststring'] = 'Testovací řetězec';
+$labels['messagemoveto'] = 'Přesunout zprávy do';
+$labels['messageredirect'] = 'Přesměrovat zprávy na';
+$labels['messageimapflags'] = 'Označit zprávy jako';
+$labels['messagereject'] = 'Odmítnout se zprávou';
+$labels['messagevacation'] = 'Automatická odpověď';
+$labels['messagekeep'] = 'Ponechat zprávu';
+$labels['messagediscard'] = 'Zahodit zprávu';
+$labels['messagenotify'] = 'Odeslat upozornění';
+$labels['messagestop'] = 'Přerušit vykonávání filtrů';
+$labels['messagehelp'] = 'Co je toto?';
+$labels['sieveorigsubj'] = 'K odpovědi připojit původní předmět';
+$labels['sievevachandle'] = 'Štítek';
+$labels['method'] = 'Metoda';
+$labels['options'] = 'Možnosti';
+$labels['messagesrules'] = 'Pravidla filtru';
+$labels['messagesactions'] = 'Akce filtru';
+$labels['sieveto'] = 'Aliasy';
+$labels['sievefrom'] = 'Od';
+$labels['flag'] = 'Priorita';
+$labels['importancen'] = 'Žádná';
+$labels['importance1'] = 'Vysoká';
+$labels['importance2'] = 'Normální';
+$labels['importance3'] = 'Nízká';
+$labels['flagread'] = 'Přečtené';
+$labels['flagdeleted'] = 'Odstraněné';
+$labels['flaganswered'] = 'Zodpovězené';
+$labels['flagdraft'] = 'Koncept';
+$labels['flagflagged'] = 'Označené';
+$labels['addsieverule'] = 'Přidat další pravidlo (pod toto pravidlo)';
+$labels['addsieveact'] = 'Přidat další akci (pod tuto akci)';
+$labels['deletesieverule'] = 'Odstranit toto pravidlo';
+$labels['deletesieveact'] = 'Odstranit tuto akci';
+$labels['envelopefrom'] = 'Skutečný odesílatel';
+$labels['envelopeto'] = 'Skutečný adresát';
+$labels['otherheader'] = 'Další hlavička';
+$labels['days'] = 'Prodleva';
+$labels['message'] = 'Zpráva';
+$labels['sieveruleheaders'] = 'Zobrazit ukázky dalších hlaviček';
+$labels['examplefilters'] = 'Ukázkové filtry';
+$labels['importfilters'] = 'Import filtrů';
+$labels['usedefaultfilter'] = 'Použít výchozí filtry';
+$labels['importfilter'] = 'Importovat filtry';
+$labels['moreactions'] = 'Více voleb...';
+$labels['adveditor'] = 'Pokročilý editor';
+$labels['stdeditor'] = 'Normální editor';
+$labels['messageredirectcopy'] = 'Odeslat kopii na';
+$labels['messagecopyto'] = 'Kopírovat zprávu do';
+$labels['body'] = 'Tělo zprávy';
+$labels['auto'] = 'Automaticky';
+$labels['raw'] = 'Surové';
+$labels['text'] = 'Textové';
+$labels['other'] = 'Ostatní';
+$labels['bodycontentpart'] = 'Obsahová část';
+$labels['notchecked'] = 'Nekontrolováno';
+$labels['spamlevelisgreaterthanequal'] = 'je větší nebo rovno';
+$labels['spamlevelislessthanequal'] = 'je menší nebo rovno';
+$labels['spamlevelequals'] = 'je rovno';
+$labels['i;ascii-casemap'] = 'shoda bez ohledu na velikost písmen';
+$labels['i;octet'] = 'přesná shoda';
+$labels['i;ascii-numeric'] = 'číselná shoda';
+$labels['selectruleset'] = 'Vyberte sadu pravidel';
+$labels['activeruleset'] = '%s (aktivní)';
+$labels['activateruleset'] = 'Aktivovat tuto sadu filtrů';
+$labels['isactive'] = 'Aktivní sada filtrů';
+$labels['isinactive'] = 'Neaktivní sada filtrů';
+$labels['newruleset'] = 'Vytvořit novou sadu filtrů';
+$labels['delruleset'] = 'Odstranit tuto sadu filtrů';
+$labels['renameruleset'] = 'Přejmenovat tuto sadu filtrů';
+$labels['copy'] = 'Kopírovat';
+$labels['copyexistingfilter'] = 'Kopírovat existující filtry';
+$labels['copytoruleset'] = 'Kopírovat filtr do jiné sady';
+$labels['copyfromruleset'] = 'Kopířovat filtry z existující sady';
+$labels['time'] = 'Čas';
+$labels['weekday'] = 'Den v týdnu';
+$labels['virustest'] = 'Pravděpodobnost viru';
+$labels['novirus'] = 'žádný virus nenalezen';
+$labels['virusremoved'] = 'virus nalezen a odstraněn';
+$labels['viruscured'] = 'virus nalezen a vyléčen';
+$labels['possiblevirus'] = 'zpráva pravděpodobně obsahuje virus';
+$labels['definitevirus'] = 'zpráva určitě obsahuje virus';
+
+$messages = array();
+$messages['nosieverules'] = 'Nenalezeny žádné filtry.';
+$messages['filterdeleteconfirm'] = 'Opravdu chcete smazat tento filtr?';
+$messages['ruledeleteconfirm'] = 'Opravdu chcete smazat toto pravidlo?';
+$messages['actiondeleteconfirm'] = 'Opravdu chcete smazat tuto akci?';
+$messages['filterunknownerror'] = 'Neznámá chyba serveru.';
+$messages['filterconnerror'] = 'Nepodařilo se připojit k serveru sieve.';
+$messages['filterdeleteerror'] = 'Nepodařilo se smazat filtr. Nastala chyba serveru.';
+$messages['filterdeleted'] = 'Filtr úspěšně smazán.';
+$messages['filtersaved'] = 'Filt úspěšně uložen.';
+$messages['filtersaveerror'] = 'Nepodařilo se uložit filtr. Nastala chyba serveru.';
+$messages['vacdaysexp'] = 'Prodleva je počet dní, během kterých nebude zpráva doručena stejnému uživateli, nehledě na to, kolikrát vás kontaktuje.<br /><br />Příklad: Pokud vám Honza napíše v pondělí a prodleva je nastavena na 7, Honza obdrží zprávu o vaší nedostupnosti v pondělí, ale do dalšího pondělí už žádnou další zprávu nedostane, nehledě na počet mailů, které vám během týdne pošle.';
+$messages['vachandleexp'] = 'Štítek může být použit ke spojení více různých oznámení o nedostupnosti dohromady. Jakmile je jedna zpráva zaslána, žádná další se stejným štítkem už v dané době zaslána nebude.';
+$messages['vactoexp'] = 'Seznam dalších emailů, které jsou v automatické odpovědi zahrnuty. Pokud není příjemcem emailu vaše hlavní adresa a není na tomto seznamu, žádná zpráva nebude odeslána.';
+$messages['vactoexp_adv'] = 'Jednotlivé adresy oddělte čárkou. Například: test1@adresa.cz,test2@adresa.cz,test3@adresa.cz';
+$messages['vactoexp_err'] = 'Chyba: Více aliasů musí být odděleno čárkou.';
+$messages['norulename'] = 'Zadejte prosím jméno pro tento filtr.';
+$messages['ruleexists'] = 'Filtr se stejným jménem již existuje. Zadejte prosím jiné.';
+$messages['noheader'] = 'Zadejte prosím jméno hlavičky k otestování.';
+$messages['headerbadchars'] = 'Chyba: hlavička obsahuje zakázané znaky.';
+$messages['noheadervalue'] = 'Zadejte prosím hodnotu, vůči které bude hlavička testována.';
+$messages['sizewrongformat'] = 'Chyba: velikost zprávy musí být číslo.';
+$messages['noredirect'] = 'Zadejte prosím emailovou adresu, na kterou se má zpráva přesměrovat.';
+$messages['redirectaddresserror'] = 'Chyba: zdá se, že je email chybný.';
+$messages['noreject'] = 'Zadejte prosím zprávu, která se odešle spolu s odmítnutým emailem.';
+$messages['vacnodays'] = 'Zadejte prosím počet dní pro prodlevu, během které nebude zpráva zasílána stejné osobě.';
+$messages['vacdayswrongformat'] = 'Chyba: prodleva musí být číslo větší nebo rovné 1.';
+$messages['vacnomsg'] = 'Zadejte prosím nějaký text pro vaši zprávu.';
+$messages['notifynomethod'] = 'Zadejte prosím metodu, jakou má být notifikace zaslána.';
+$messages['notifynomsg'] = 'Zadejte prosím nějaký text pro vaši zprávu.';
+$messages['sieveruleexp'] = 'Prosím přidejte jedno nebo více pravidel vůči kterým bude každá zpráva testována. Filtry jsou vyhodnocovány v pořadí v jakém jsou uvedeny v sloupci vlevo. Pokud je nalezena shoda, žádný další filtr se již nevyhodnocuje.';
+$messages['sieveruleexp_stop'] = 'Zadejte prosím jedno nebo více pravidel vůči kterým bude každá zpráva testována. Filtry jsou vyhodnocovány v pořadí v jakém jsou uvedeny v sloupci vlevo dokud není dosaženo \'Přerušení\' akce.';
+$messages['sieveactexp'] = 'Prosím vyberte si z voleb níže. Akce budou vykonány pro jakoukoliv zprávu, která vyhovuje pravidlům výše.';
+$messages['sieveheadershlp'] = 'Níže je několik případu hlaviček, které mohou být ve filtrech testovány. Pro přidání do pravidla vyberte hlavičku nebo zadejte vlastní v poli nahoře.';
+$messages['movingfilter'] = 'Přesouvám filtr...';
+$messages['noexistingfilters'] = 'Nenalezeny žádné existující filtry!';
+$messages['importdefault'] = '<b>Použít výchozí filtry:</b> Je dostupná sada výchozích filtrů. Přejte si tuto sadu využít?';
+$messages['importother'] = '<b>Importovat filtry:</b> Byla nalezena jiná sada filtrů z %s. Chcete tyto filtry importovat do stávající sady?';
+$messages['switchtoadveditor'] = 'Přepnutí do pokročilého editoru vám umožní přímo upravovat soubor sieve filtrů. Jakékoliv provedené změny mohou být nečitelné v normálním editoru a mohou být ztraceny, pokud je v normálním editoru uložíte. Přejete si pokračovat?';
+$messages['filterimported'] = 'Filtry úspěšně naimportovány.';
+$messages['filterimporterror'] = 'Nelze importovat filtry. Nastala chyba serveru.';
+$messages['notifyinvalidmethod'] = 'Metoda není napsána ve správném formátu, musí se jednat o URI. Například: `mailto:upozorneni@adresa.cz`.';
+$messages['nobodycontentpart'] = 'Zadejte prosím obsahovou část k otestování.';
+$messages['badoperator'] = 'Omlouváme se, ale operátor, který jste vybrali, nemůže být v tomto pravidle použit.';
+$messages['filteractionerror'] = 'Akce, které jste si vyžádali, není podporována serverem.';
+$messages['filtermissingerror'] = 'Nepodařilo se najít vyžádané pravidlo.';
+$messages['contentpartexp'] = 'MIME-typ nebo konkrétní část zprávy, která má být testována. Například: `message/rfc822`, `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Opravdu chcete smazat tuto sadu pravidel?';
+$messages['rulesetexists'] = 'Sada pravidel s tímto jménem již existuje. Zadejte prosím jinou.';
+$messages['copyexisting'] = '<b>Kopírovat existující sadu pravidel:</b> Chcete zkopírovat filtry z existující sady pravidel do vybrané sady?';
+$messages['filtercopied'] = 'Filtry úspěšně zkopírovány.';
+$messages['nosieverulesets'] = 'Nenalezeny žádné sady pravidel.';
+$messages['baddateformat'] = 'Chyba: Zadejte prosím datum ve formátu YYYY-MM-DD';
+$messages['badtimeformat'] = 'Chyba: Zadejte prosím čas ve formátu HH:MM:SS';
+$messages['missingfoldername'] = 'Chyba: Zadejte prosím jméno složky';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/de_CH.inc b/plugins/sieverules/localization/de_CH.inc
new file mode 100644
index 000000000..d203cd8c1
--- /dev/null
+++ b/plugins/sieverules/localization/de_CH.inc
@@ -0,0 +1,192 @@
+<?php
+/* Author: Mike Constabel */
+
+$labels = array();
+$labels['filters'] = 'Filter';
+$labels['managefilters'] = 'Filter verwalten';
+$labels['filtername'] = 'Filtername';
+$labels['disablerule'] = 'Filterregel abschalten';
+$labels['disabled'] = 'abgeschaltet';
+$labels['newfilter'] = 'Neuer Filter';
+$labels['moveup'] = 'Aufwärts';
+$labels['movedown'] = 'Abwärts';
+$labels['filterallof'] = 'trifft alle folgenden Regeln';
+$labels['filteranyof'] = 'trifft irgendeine der folgenden Regeln';
+$labels['filterany'] = 'alle Nachrichten';
+$labels['filtercontains'] = 'enthält';
+$labels['filternotcontains'] = 'enthält nicht';
+$labels['filteris'] = 'ist identisch mit';
+$labels['filterisnot'] = 'ist nicht identisch mit';
+$labels['filterexists'] = 'existiert';
+$labels['filternotexists'] = 'existiert nicht';
+$labels['filterregex'] = 'trifft auf den regulären Ausdruck zu';
+$labels['filternotregex'] = 'trifft nicht auf den regulären Ausdruck zu';
+$labels['filterunder'] = 'ist kleiner als';
+$labels['filterover'] = 'ist größer als';
+$labels['filterbefore'] = 'ist vor';
+$labels['filterafter'] = 'ist nach';
+$labels['filteradvoptions'] = 'weitere Optionen...';
+$labels['spamtest'] = 'Spam-Wahrscheinlichkeit';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Komparator';
+$labels['isgreaterthan'] = 'ist größer als';
+$labels['isgreaterthanequal'] = 'ist größer als oder gleich ';
+$labels['islessthan'] = 'ist kleiner als';
+$labels['islessthanequal'] = 'ist kleiner als oder gleich';
+$labels['equals'] = 'ist gleich';
+$labels['notequals'] = 'ist nicht gleich';
+$labels['countisgreaterthan'] = 'Anzahl ist größer als';
+$labels['countisgreaterthanequal'] = 'Anzahl ist mindestens';
+$labels['countislessthan'] = 'Anzahl ist kleiner';
+$labels['countislessthanequal'] = 'Anzahl ist höchstens';
+$labels['countequals'] = 'Anzahl ist gleich';
+$labels['countnotequals'] = 'Anzahl ist ungleich';
+$labels['valueisgreaterthan'] = 'Wert ist größer als';
+$labels['valueisgreaterthanequal'] = 'Wert ist mindestens';
+$labels['valueislessthan'] = 'Wert ist kleiner als';
+$labels['valueislessthanequal'] = 'Wert ist höchstens';
+$labels['valueequals'] = 'Wert ist gleich';
+$labels['valuenotequals'] = 'Wert ist ungleich';
+$labels['userpart'] = 'User-Teil gleicht';
+$labels['notuserpart'] = 'User-Teil gleicht nicht';
+$labels['detailpart'] = 'Detail-Teil gleicht';
+$labels['notdetailpart'] = 'Detail-Teil gleicht nicht';
+$labels['domainpart'] = 'Domain-Teil gleicht';
+$labels['notdomainpart'] = 'Domain-Teil gleicht nicht';
+$labels['teststring'] = 'Test-Zeichenkette';
+$labels['messagemoveto'] = 'Verschiebe Nachricht nach';
+$labels['messageredirect'] = 'Leite Nachricht weiter an';
+$labels['messageimapflags'] = 'Markiere Nachricht als';
+$labels['messagereject'] = 'Lehne Nachricht ab mit Begründung';
+$labels['messagevacation'] = 'Abwesenheitsnachricht';
+$labels['messagekeep'] = 'Behalte Nachricht';
+$labels['messagediscard'] = 'Verwerfe Nachricht';
+$labels['messagenotify'] = 'Sende Benachrichtigung';
+$labels['messagestop'] = 'Filterverarbeitung beenden';
+$labels['messagehelp'] = 'Hilfe';
+$labels['sieveorigsubj'] = 'Hänge originalen Betreff an die Antwort an';
+$labels['sievevachandle'] = 'Handle';
+$labels['method'] = 'Methode';
+$labels['options'] = 'Optionen';
+$labels['messagesrules'] = 'Filterregeln';
+$labels['messagesactions'] = 'Filteraktionen';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'From';
+$labels['flag'] = 'Markierung';
+$labels['importancen'] = 'Keine';
+$labels['importance1'] = '1';
+$labels['importance2'] = '1';
+$labels['importance3'] = '1';
+$labels['flagread'] = 'Gelesen';
+$labels['flagdeleted'] = 'Gelöscht';
+$labels['flaganswered'] = 'Beantwortet';
+$labels['flagdraft'] = 'Entwurf';
+$labels['flagflagged'] = 'Markiert';
+$labels['addsieverule'] = 'Weitere Regel unterhalb dieser hinzufügen';
+$labels['addsieveact'] = 'Weitere Aktion unterhalb dieser hinzufügen';
+$labels['deletesieverule'] = 'Diese Regel löschen';
+$labels['deletesieveact'] = 'Diese Aktion löschen';
+$labels['envelopefrom'] = 'Envelope From';
+$labels['envelopeto'] = 'Envelope To';
+$labels['otherheader'] = 'Anderer Header';
+$labels['days'] = 'Zeitraum';
+$labels['message'] = 'Nachricht';
+$labels['sieveruleheaders'] = 'Zeige Beispiele für andere Header';
+$labels['examplefilters'] = 'Beispielfilter...';
+$labels['importfilters'] = 'Filter importieren';
+$labels['usedefaultfilter'] = 'Verwende Standardfilter';
+$labels['importfilter'] = 'Filter importieren';
+$labels['moreactions'] = 'Weitere Optionen...';
+$labels['adveditor'] = 'Erweiterter Editor';
+$labels['stdeditor'] = 'Standard-Editor';
+$labels['messageredirectcopy'] = 'Sende eine Kopie an';
+$labels['messagecopyto'] = 'Kopiere Nachricht nach';
+$labels['body'] = 'Body';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Anderes';
+$labels['bodycontentpart'] = 'Content Part';
+$labels['notchecked'] = 'nicht geprüft';
+$labels['spamlevelisgreaterthanequal'] = 'ist mindestens';
+$labels['spamlevelislessthanequal'] = 'ist höchstens';
+$labels['spamlevelequals'] = 'ist gleich';
+$labels['i;ascii-casemap'] = 'schreibungsunabhängige Zeichenfolge';
+$labels['i;octet'] = 'exakte Zeichenfolge';
+$labels['i;ascii-numeric'] = 'zahlenmäßige Übereinstimmung';
+$labels['selectruleset'] = 'Wähle Regelsatz';
+$labels['activeruleset'] = '%s (aktiv)';
+$labels['activateruleset'] = 'Aktiviere Regelsatz';
+$labels['newruleset'] = 'Erstelle Regelsatz';
+$labels['delruleset'] = 'Lösche diesen Regelsatz';
+$labels['renameruleset'] = 'Regelsatz umbenennen';
+$labels['copy'] = 'Kopieren';
+$labels['copyexistingfilter'] = 'Kopiere bestehende Filter';
+$labels['copytoruleset'] = 'Kopiere Filter in anderen Regelsatz';
+$labels['copyfromruleset'] = 'Kopiere Filter aus anderem Regelsatz';
+$labels['time'] = 'Zeit';
+$labels['weekday'] = 'Wochentag';
+$labels['virustest'] = 'Viruswahrscheinlichkeit';
+$labels['novirus'] = 'keinen Virus gefunden';
+$labels['virusremoved'] = 'Virus gefunden und entfernt';
+$labels['viruscured'] = 'Virus gefunden und kuriert';
+$labels['possiblevirus'] = 'Nachricht enthält möglicherweise einen Virus';
+$labels['definitevirus'] = 'Nachricht enthält definitiv einen Virus';
+
+$messages = array();
+$messages['nosieverules'] = 'Keine Filter gefunden.';
+$messages['filterdeleteconfirm'] = 'Bist du sicher das du diesen Filter löschen möchtest?';
+$messages['ruledeleteconfirm'] = 'Bist du sicher das du diese Regel löschen möchtest?';
+$messages['actiondeleteconfirm'] = 'Bist du sicher das du diese Aktion löschen möchtest?';
+$messages['filterunknownerror'] = 'Unbekannter Serverfehler';
+$messages['filterconnerror'] = 'Konnte keine Verbindung zum Sieve-Server aufbauen';
+$messages['filterdeleteerror'] = 'Konnte Filter nicht löschen. Serverfehler';
+$messages['filterdeleted'] = 'Filter erfolgreich gelöscht';
+$messages['filtersaved'] = 'Filter erfolgreich gespeichert';
+$messages['filtersaveerror'] = 'Konnte Filter nicht speichern. Serverfehler';
+$messages['vacdaysexp'] = 'Zeitraum in Anzahl Tagen, in dem die Abwesenheitsnachricht nicht erneut an den selben Absender gesendet wird.<br /><br />Beispiel: Wenn Joe dir am Montag eine Mail schickt und der Zeitraum beträgt 7, bekommt Joe sofort eine Abwesenheitsnachricht gesendet, dann aber bis zum darauffolgenden Montag keine mehr, egal wie häufig er weitere Mails sendet.';
+$messages['vachandleexp'] = 'Ein Handle kann genutzt werden um verschiedene Abwesenheitsnachrichten zu koppeln, so dass im Zeitraum keine weiteren Abwesenheitsnachrichten gesendet werden die das selbe Handle besitzen.';
+$messages['vactoexp'] = 'Liste zusätzlicher Empfängeradressen für die ebenfalls eine Abwesenheitsnachricht gesendet wird. Gehen Mails ein, deren Empfänger nicht die Hauptadresse ist und die nicht in dieser Liste stehen wird keine Abwesenheitsnachricht gesendet.';
+$messages['vactoexp_adv'] = 'Trenne mehrere Adressen mit einem Komma (,). Zum Beispiel: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Fehler: Mehrere Adressen müssen durch ein Komma (,) getrennt werden';
+$messages['norulename'] = 'Bitte gib einen Namen für diesen Filter ein';
+$messages['ruleexists'] = 'Ein Filter mit diesem Namen existiert bereits. Wähle einen anderen';
+$messages['noheader'] = 'Bitte gib den Namen des zu testenden Headers ein';
+$messages['headerbadchars'] = 'Fehler: Header enthält unzulässige Zeichen';
+$messages['noheadervalue'] = 'Bitte gib den Wert ein, gegen den der Header getestet werden soll';
+$messages['sizewrongformat'] = 'Fehler: Nachrichtengröße muss numerisch sein';
+$messages['noredirect'] = 'Bitte gib eine E-Mail Adresse zur Weiterleitung ein';
+$messages['redirectaddresserror'] = 'Fehler: E-Mail Adresse ungültig';
+$messages['noreject'] = 'Bitte gib eine Nachricht als Begründung für die Abweisung der Mail ein';
+$messages['vacnodays'] = 'Bitte gib die Anzahl Tage ein, währendessen die Abwesenheitsnachricht nicht erneut an den selben Absender gesendet wird.';
+$messages['vacdayswrongformat'] = 'Fehler: Der Zeitraum muss numerisch größer gleich 1 sein';
+$messages['vacnomsg'] = 'Bitte gib einen Text für deine Nachricht ein';
+$messages['notifynomethod'] = 'Bitte gibt eine Methode an mit der Benachrichtigungen versendet werden sollen.';
+$messages['notifynomsg'] = 'Bitte gebe einen Text für die Nachricht ein';
+$messages['sieveruleexp'] = 'Bitte erstelle eine oder mehrere Regeln gegen die jede Nachricht getestet werden soll. Filter werden in der Reihenfolge durchlaufen, in der sie links gelistet sind. Wenn ein Filter zutrifft, werden keine weiteren Filter durchlaufen.';
+$messages['sieveruleexp_stop'] = 'Bitte wähle mindestens eine Regel, die auf die Nachrichten angewandt werden soll. Filter werden in der Reihenfolge abgearbeitet, wie sie auf der linken Seite dargestellt sind bis eine \'Stop\'-Regel zutrifft.';
+$messages['sieveactexp'] = 'Bitte wähle eine von den unten gelisteten Optionen. Diese Aktionen werden für jede Nachricht ausgeführt, die auf obige Filterregel(n) passt.';
+$messages['sieveheadershlp'] = 'Unten werden einige Header als Beispiel für mögliche Header angezeigt. Wähle einen oder füge oben einen eigenen Header hinzu.';
+$messages['movingfilter'] = 'Verschiebe Filter...';
+$messages['noexistingfilters'] = 'Keine vorhandenen Filter gefunden!';
+$messages['importdefault'] = '<b>Verwende Standardfilter:</b> Es sind eine Reihe von Standardfiltern verfügbar. Möchtest Du diese verwenden?';
+$messages['importother'] = '<b>Filter importieren:</b> EIne Reihe von Filtern von %s wurden gefunden. Möchtest Du diese Filter Deinen Filtern hinzufügen?';
+$messages['switchtoadveditor'] = 'Die verwendung des erweiterten Editors ermöglicht es, die Sieve-Filter direkt zu bearbeiten. Alle Änderungen sind für den normalen Editor unlesbar und werden verworfen wenn eine Regel mit dem normalen Editor gespeichert wird. Möchtest Du fortfahren?';
+$messages['filterimported'] = 'Filterimport erfolgreich';
+$messages['filterimporterror'] = 'Fehler beim Filterimport. Serverfehler.';
+$messages['notifyinvalidmethod'] = 'Die Methode scheint ein ungültiges Format zu haben. Es muss eine URI sein, z. B.: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Bitte gib den zu testenden Bereich des Inhalts an';
+$messages['badoperator'] = 'Der gewählte Operator kann in dieser Regel nicht verwendet werden';
+$messages['filteractionerror'] = 'Die gewünschte Aktion wird vom Server nicht unterstützt';
+$messages['filtermissingerror'] = 'Die angeforderte Regel konnte nicht gefunden werden';
+$messages['contentpartexp'] = 'Der MIME-Typ oder der Teil der Nachricht, der getestet werden soll. Zum Beispiel: `message/rfc822`, `text/html`, `audio/mp3` oder `image`.';
+$messages['delrulesetconf'] = 'Soll dieser Regelsatz wirklich gelöscht werden?';
+$messages['rulesetexists'] = 'Ein Regelsatz mit diesem Namen existiert bereits. Bitte wähle einen anderen Namen.';
+$messages['copyexisting'] = 'Kopiere bestehenden Regelsatz: Sollen die Filter von einem bestehenden Regelsatz in den akutellen Regelsatz kopiert werden?';
+$messages['filtercopied'] = 'Filter erfolgreich kopiert.';
+$messages['nosieverulesets'] = 'Keine Regelsätze gefunden.';
+$messages['baddateformat'] = 'Fehler: Bitte das Datum im Format JJJJ-MM-TT eingeben.';
+$messages['badtimeformat'] = 'Fehler: Bitte die Uhrzeit im Format HH:MM:SS eingeben.';
+$messages['missingfoldername'] = 'Fehler: Bitte ein Verzeichnisnamen eingeben.';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/de_DE.inc b/plugins/sieverules/localization/de_DE.inc
new file mode 100644
index 000000000..3d7499c35
--- /dev/null
+++ b/plugins/sieverules/localization/de_DE.inc
@@ -0,0 +1,192 @@
+<?php
+/* Author: Michael Metz */
+
+$labels = array();
+$labels['filters'] = 'Filter';
+$labels['managefilters'] = 'Filter verwalten';
+$labels['filtername'] = 'Filtername';
+$labels['disablerule'] = 'Filterregel abschalten';
+$labels['disabled'] = 'abgeschaltet';
+$labels['newfilter'] = 'Neuer Filter';
+$labels['moveup'] = 'Aufwärts';
+$labels['movedown'] = 'Abwärts';
+$labels['filterallof'] = 'trifft alle folgenden Regeln';
+$labels['filteranyof'] = 'trifft irgendeine der folgenden Regeln';
+$labels['filterany'] = 'alle Nachrichten';
+$labels['filtercontains'] = 'enthält';
+$labels['filternotcontains'] = 'enthält nicht';
+$labels['filteris'] = 'ist identisch mit';
+$labels['filterisnot'] = 'ist nicht identisch mit';
+$labels['filterexists'] = 'existiert';
+$labels['filternotexists'] = 'existiert nicht';
+$labels['filterregex'] = 'trifft auf den regulären Ausdruck zu';
+$labels['filternotregex'] = 'trifft nicht auf den regulären Ausdruck zu';
+$labels['filterunder'] = 'ist kleiner als';
+$labels['filterover'] = 'ist größer als';
+$labels['filterbefore'] = 'ist vor';
+$labels['filterafter'] = 'ist nach';
+$labels['filteradvoptions'] = 'weitere Optionen...';
+$labels['spamtest'] = 'Spam-Wahrscheinlichkeit';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Komparator';
+$labels['isgreaterthan'] = 'ist größer als';
+$labels['isgreaterthanequal'] = 'ist größer als oder gleich ';
+$labels['islessthan'] = 'ist kleiner als';
+$labels['islessthanequal'] = 'ist kleiner als oder gleich';
+$labels['equals'] = 'ist gleich';
+$labels['notequals'] = 'ist nicht gleich';
+$labels['countisgreaterthan'] = 'Anzahl ist größer als';
+$labels['countisgreaterthanequal'] = 'Anzahl ist mindestens';
+$labels['countislessthan'] = 'Anzahl ist kleiner';
+$labels['countislessthanequal'] = 'Anzahl ist höchstens';
+$labels['countequals'] = 'Anzahl ist gleich';
+$labels['countnotequals'] = 'Anzahl ist ungleich';
+$labels['valueisgreaterthan'] = 'Wert ist größer als';
+$labels['valueisgreaterthanequal'] = 'Wert ist mindestens';
+$labels['valueislessthan'] = 'Wert ist kleiner als';
+$labels['valueislessthanequal'] = 'Wert ist höchstens';
+$labels['valueequals'] = 'Wert ist gleich';
+$labels['valuenotequals'] = 'Wert ist ungleich';
+$labels['userpart'] = 'User-Teil gleicht';
+$labels['notuserpart'] = 'User-Teil gleicht nicht';
+$labels['detailpart'] = 'Detail-Teil gleicht';
+$labels['notdetailpart'] = 'Detail-Teil gleicht nicht';
+$labels['domainpart'] = 'Domain-Teil gleicht';
+$labels['notdomainpart'] = 'Domain-Teil gleicht nicht';
+$labels['teststring'] = 'Test-Zeichenkette';
+$labels['messagemoveto'] = 'Verschiebe Nachricht nach';
+$labels['messageredirect'] = 'Leite Nachricht weiter an';
+$labels['messageimapflags'] = 'Markiere Nachricht als';
+$labels['messagereject'] = 'Lehne Nachricht ab mit Begründung';
+$labels['messagevacation'] = 'Abwesenheitsnachricht';
+$labels['messagekeep'] = 'Behalte Nachricht';
+$labels['messagediscard'] = 'Verwerfe Nachricht';
+$labels['messagenotify'] = 'Sende Benachrichtigung';
+$labels['messagestop'] = 'Filterverarbeitung beenden';
+$labels['messagehelp'] = 'Hilfe';
+$labels['sieveorigsubj'] = 'Hänge originalen Betreff an die Antwort an';
+$labels['sievevachandle'] = 'Handle';
+$labels['method'] = 'Methode';
+$labels['options'] = 'Optionen';
+$labels['messagesrules'] = 'Filterregeln';
+$labels['messagesactions'] = 'Filteraktionen';
+$labels['sieveto'] = 'Empfänger';
+$labels['sievefrom'] = 'Absender';
+$labels['flag'] = 'Markierung';
+$labels['importancen'] = 'Keine';
+$labels['importance1'] = '1';
+$labels['importance2'] = '1';
+$labels['importance3'] = '1';
+$labels['flagread'] = 'Gelesen';
+$labels['flagdeleted'] = 'Gelöscht';
+$labels['flaganswered'] = 'Beantwortet';
+$labels['flagdraft'] = 'Entwurf';
+$labels['flagflagged'] = 'Markiert';
+$labels['addsieverule'] = 'Weitere Regel unterhalb dieser hinzufügen';
+$labels['addsieveact'] = 'Weitere Aktion unterhalb dieser hinzufügen';
+$labels['deletesieverule'] = 'Diese Regel löschen';
+$labels['deletesieveact'] = 'Diese Aktion löschen';
+$labels['envelopefrom'] = 'Envelope From';
+$labels['envelopeto'] = 'Envelope To';
+$labels['otherheader'] = 'Anderer Header';
+$labels['days'] = 'Zeitraum';
+$labels['message'] = 'Nachricht';
+$labels['sieveruleheaders'] = 'Zeige Beispiele für andere Header';
+$labels['examplefilters'] = 'Beispielfilter...';
+$labels['importfilters'] = 'Filter importieren';
+$labels['usedefaultfilter'] = 'Verwende Standardfilter';
+$labels['importfilter'] = 'Filter importieren';
+$labels['moreactions'] = 'Weitere Optionen...';
+$labels['adveditor'] = 'Erweiterter Editor';
+$labels['stdeditor'] = 'Standard-Editor';
+$labels['messageredirectcopy'] = 'Sende eine Kopie an';
+$labels['messagecopyto'] = 'Kopiere Nachricht nach';
+$labels['body'] = 'Body';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Anderes';
+$labels['bodycontentpart'] = 'Content Part';
+$labels['notchecked'] = 'nicht geprüft';
+$labels['spamlevelisgreaterthanequal'] = 'ist mindestens';
+$labels['spamlevelislessthanequal'] = 'ist höchstens';
+$labels['spamlevelequals'] = 'ist gleich';
+$labels['i;ascii-casemap'] = 'schreibungsunabhängige Zeichenfolge';
+$labels['i;octet'] = 'exakte Zeichenfolge';
+$labels['i;ascii-numeric'] = 'zahlenmäßige Übereinstimmung';
+$labels['selectruleset'] = 'Wähle Regelsatz';
+$labels['activeruleset'] = '%s (aktiv)';
+$labels['activateruleset'] = 'Aktiviere Regelsatz';
+$labels['newruleset'] = 'Erstelle Regelsatz';
+$labels['delruleset'] = 'Lösche diesen Regelsatz';
+$labels['renameruleset'] = 'Regelsatz umbenennen';
+$labels['copy'] = 'Kopieren';
+$labels['copyexistingfilter'] = 'Kopiere bestehende Filter';
+$labels['copytoruleset'] = 'Kopiere Filter in anderen Regelsatz';
+$labels['copyfromruleset'] = 'Kopiere Filter aus anderem Regelsatz';
+$labels['time'] = 'Zeit';
+$labels['weekday'] = 'Wochentag';
+$labels['virustest'] = 'Viruswahrscheinlichkeit';
+$labels['novirus'] = 'keinen Virus gefunden';
+$labels['virusremoved'] = 'Virus gefunden und entfernt';
+$labels['viruscured'] = 'Virus gefunden und kuriert';
+$labels['possiblevirus'] = 'Nachricht enthält möglicherweise einen Virus';
+$labels['definitevirus'] = 'Nachricht enthält definitiv einen Virus';
+
+$messages = array();
+$messages['nosieverules'] = 'Keine Filter gefunden.';
+$messages['filterdeleteconfirm'] = 'Bist du sicher das du diesen Filter löschen möchtest?';
+$messages['ruledeleteconfirm'] = 'Bist du sicher das du diese Regel löschen möchtest?';
+$messages['actiondeleteconfirm'] = 'Bist du sicher das du diese Aktion löschen möchtest?';
+$messages['filterunknownerror'] = 'Unbekannter Serverfehler';
+$messages['filterconnerror'] = 'Konnte keine Verbindung zum Sieve-Server aufbauen';
+$messages['filterdeleteerror'] = 'Konnte Filter nicht löschen. Serverfehler';
+$messages['filterdeleted'] = 'Filter erfolgreich gelöscht';
+$messages['filtersaved'] = 'Filter erfolgreich gespeichert';
+$messages['filtersaveerror'] = 'Konnte Filter nicht speichern. Serverfehler';
+$messages['vacdaysexp'] = 'Zeitraum in Anzahl Tagen, in dem die Abwesenheitsnachricht nicht erneut an den selben Absender gesendet wird.<br /><br />Beispiel: Wenn Joe dir am Montag eine Mail schickt und der Zeitraum beträgt 7, bekommt Joe sofort eine Abwesenheitsnachricht gesendet, dann aber bis zum darauffolgenden Montag keine mehr, egal wie häufig er weitere Mails sendet.';
+$messages['vachandleexp'] = 'Ein Handle kann genutzt werden um verschiedene Abwesenheitsnachrichten zu koppeln, so dass im Zeitraum keine weiteren Abwesenheitsnachrichten gesendet werden die das selbe Handle besitzen.';
+$messages['vactoexp'] = 'Liste zusätzlicher Empfängeradressen, für die ebenfalls eine Abwesenheitsnachricht gesendet wird. Gehen Mails ein, deren Empfänger nicht die Hauptadresse ist und die nicht in dieser Liste stehen, wird keine Abwesenheitsnachricht gesendet.';
+$messages['vactoexp_adv'] = 'Trenne mehrere Adressen mit einem Komma (,). Zum Beispiel: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Fehler: Mehrere Adressen müssen durch ein Komma (,) getrennt werden';
+$messages['norulename'] = 'Bitte gib einen Namen für diesen Filter ein';
+$messages['ruleexists'] = 'Ein Filter mit diesem Namen existiert bereits. Wähle einen anderen';
+$messages['noheader'] = 'Bitte gib den Namen des zu testenden Headers ein';
+$messages['headerbadchars'] = 'Fehler: Header enthält unzulässige Zeichen';
+$messages['noheadervalue'] = 'Bitte gib den Wert ein, gegen den der Header getestet werden soll';
+$messages['sizewrongformat'] = 'Fehler: Nachrichtengröße muss numerisch sein';
+$messages['noredirect'] = 'Bitte gib eine E-Mail Adresse zur Weiterleitung ein';
+$messages['redirectaddresserror'] = 'Fehler: E-Mail Adresse ungültig';
+$messages['noreject'] = 'Bitte gib eine Nachricht als Begründung für die Abweisung der Mail ein';
+$messages['vacnodays'] = 'Bitte gib die Anzahl Tage ein, währendessen die Abwesenheitsnachricht nicht erneut an den selben Absender gesendet wird.';
+$messages['vacdayswrongformat'] = 'Fehler: Der Zeitraum muss numerisch größer gleich 1 sein';
+$messages['vacnomsg'] = 'Bitte gib einen Text für deine Nachricht ein';
+$messages['notifynomethod'] = 'Bitte gibt eine Methode an mit der Benachrichtigungen versendet werden sollen.';
+$messages['notifynomsg'] = 'Bitte gebe einen Text für die Nachricht ein';
+$messages['sieveruleexp'] = 'Bitte erstelle eine oder mehrere Regeln gegen die jede Nachricht getestet werden soll. Filter werden in der Reihenfolge durchlaufen, in der sie links gelistet sind. Wenn ein Filter zutrifft, werden keine weiteren Filter durchlaufen.';
+$messages['sieveruleexp_stop'] = 'Bitte wähle mindestens eine Regel, die auf die Nachrichten angewandt werden soll. Filter werden in der Reihenfolge abgearbeitet, wie sie auf der linken Seite dargestellt sind bis eine \'Stop\'-Regel zutrifft.';
+$messages['sieveactexp'] = 'Bitte wähle eine von den unten gelisteten Optionen. Diese Aktionen werden für jede Nachricht ausgeführt, die auf obige Filterregel(n) passt.';
+$messages['sieveheadershlp'] = 'Unten werden einige Header als Beispiel für mögliche Header angezeigt. Wähle einen oder füge oben einen eigenen Header hinzu.';
+$messages['movingfilter'] = 'Verschiebe Filter...';
+$messages['noexistingfilters'] = 'Keine vorhandenen Filter gefunden!';
+$messages['importdefault'] = '<b>Verwende Standardfilter:</b> Es sind eine Reihe von Standardfiltern verfügbar. Möchtest Du diese verwenden?';
+$messages['importother'] = '<b>Filter importieren:</b> EIne Reihe von Filtern von %s wurden gefunden. Möchtest Du diese Filter Deinen Filtern hinzufügen?';
+$messages['switchtoadveditor'] = 'Die verwendung des erweiterten Editors ermöglicht es, die Sieve-Filter direkt zu bearbeiten. Alle Änderungen sind für den normalen Editor unlesbar und werden verworfen wenn eine Regel mit dem normalen Editor gespeichert wird. Möchtest Du fortfahren?';
+$messages['filterimported'] = 'Filterimport erfolgreich';
+$messages['filterimporterror'] = 'Fehler beim Filterimport. Serverfehler.';
+$messages['notifyinvalidmethod'] = 'Die Methode scheint ein ungültiges Format zu haben. Es muss eine URI sein, z. B.: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Bitte gib den zu testenden Bereich des Inhalts an';
+$messages['badoperator'] = 'Der gewählte Operator kann in dieser Regel nicht verwendet werden';
+$messages['filteractionerror'] = 'Die gewünschte Aktion wird vom Server nicht unterstützt';
+$messages['filtermissingerror'] = 'Die angeforderte Regel konnte nicht gefunden werden';
+$messages['contentpartexp'] = 'Der MIME-Typ oder der Teil der Nachricht, der getestet werden soll. Zum Beispiel: `message/rfc822`, `text/html`, `audio/mp3` oder `image`.';
+$messages['delrulesetconf'] = 'Soll dieser Regelsatz wirklich gelöscht werden?';
+$messages['rulesetexists'] = 'Ein Regelsatz mit diesem Namen existiert bereits. Bitte wähle einen anderen Namen.';
+$messages['copyexisting'] = 'Kopiere bestehenden Regelsatz: Sollen die Filter von einem bestehenden Regelsatz in den akutellen Regelsatz kopiert werden?';
+$messages['filtercopied'] = 'Filter erfolgreich kopiert.';
+$messages['nosieverulesets'] = 'Keine Regelsätze gefunden.';
+$messages['baddateformat'] = 'Fehler: Bitte das Datum im Format JJJJ-MM-TT eingeben.';
+$messages['badtimeformat'] = 'Fehler: Bitte die Uhrzeit im Format HH:MM:SS eingeben.';
+$messages['missingfoldername'] = 'Fehler: Bitte ein Verzeichnisnamen eingeben.';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/en_GB.inc b/plugins/sieverules/localization/en_GB.inc
new file mode 100644
index 000000000..bdb0a15f4
--- /dev/null
+++ b/plugins/sieverules/localization/en_GB.inc
@@ -0,0 +1,205 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['filters'] = 'Filters';
+$labels['filtersname'] = 'Filters ($name)';
+$labels['managefilters'] = 'Manage message filters';
+$labels['filtername'] = 'Filter name';
+$labels['disablerule'] = 'Disable rule';
+$labels['disabled'] = 'Disabled';
+$labels['newfilter'] = 'New filter';
+$labels['moveup'] = 'Move up';
+$labels['movedown'] = 'Move down';
+$labels['filterallof'] = 'matching all of the following rules';
+$labels['filteranyof'] = 'matching any of the following rules';
+$labels['filterany'] = 'all messages';
+$labels['filtercontains'] = 'contains';
+$labels['filternotcontains'] = 'does not contain';
+$labels['filteris'] = 'is equal to';
+$labels['filterisnot'] = 'is not equal to';
+$labels['filterexists'] = 'exists';
+$labels['filternotexists'] = 'does not exist';
+$labels['filterregex'] = 'matches regular expression';
+$labels['filternotregex'] = 'does not match regular expression';
+$labels['filterunder'] = 'is less than';
+$labels['filterover'] = 'is more than';
+$labels['filterbefore'] = 'is before';
+$labels['filterafter'] = 'is after';
+$labels['filteradvoptions'] = 'more options...';
+$labels['spamtest'] = 'Spam Probability';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Comparator';
+$labels['isgreaterthan'] = 'is greater than';
+$labels['isgreaterthanequal'] = 'is greater than or equal to';
+$labels['islessthan'] = 'is less than';
+$labels['islessthanequal'] = 'is less than or equal to';
+$labels['equals'] = 'is equal to';
+$labels['notequals'] = 'does not equal';
+$labels['countisgreaterthan'] = 'count is greater than';
+$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
+$labels['countislessthan'] = 'count is less than';
+$labels['countislessthanequal'] = 'count is less than or equal to';
+$labels['countequals'] = 'count is equal to';
+$labels['countnotequals'] = 'count does not equal';
+$labels['valueisgreaterthan'] = 'value is greater than';
+$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
+$labels['valueislessthan'] = 'value is less than';
+$labels['valueislessthanequal'] = 'value is less than or equal to';
+$labels['valueequals'] = 'value is equal to';
+$labels['valuenotequals'] = 'value does not equal';
+$labels['userpart'] = 'user part equals';
+$labels['notuserpart'] = 'user part does not equal';
+$labels['detailpart'] = 'detail part equals';
+$labels['notdetailpart'] = 'detail part does not equal';
+$labels['domainpart'] = 'domain part equals';
+$labels['notdomainpart'] = 'domain part does not equal';
+$labels['teststring'] = 'Test string';
+$labels['messagemoveto'] = 'Move message to';
+$labels['messageredirect'] = 'Redirect message to';
+$labels['messageimapflags'] = 'Mark message as';
+$labels['messagereject'] = 'Reject with message';
+$labels['messagevacation'] = 'Out of Office Message';
+$labels['messagekeep'] = 'Keep message';
+$labels['messagediscard'] = 'Discard message';
+$labels['messagenotify'] = 'Send notification';
+$labels['messagestop'] = 'Stop processing filters';
+$labels['messagehelp'] = 'What is this?';
+$labels['sieveorigsubj'] = 'Append original subject to response';
+$labels['sievevachandle'] = 'Handle';
+$labels['method'] = 'Method';
+$labels['options'] = 'Options';
+$labels['messagesrules'] = 'Filter Rules';
+$labels['messagesactions'] = 'Filter Actions';
+$labels['sieveto'] = 'Aliases';
+$labels['sievefrom'] = 'From';
+$labels['flag'] = 'Importance';
+$labels['importancen'] = 'None';
+$labels['importance1'] = 'High';
+$labels['importance2'] = 'Normal';
+$labels['importance3'] = 'Low';
+$labels['flagread'] = 'Read';
+$labels['flagdeleted'] = 'Deleted';
+$labels['flaganswered'] = 'Answered';
+$labels['flagdraft'] = 'Draft';
+$labels['flagflagged'] = 'Flagged';
+$labels['addsieverule'] = 'Add another rule, below this one';
+$labels['addsieveact'] = 'Add another action, below this one';
+$labels['deletesieverule'] = 'Delete this rule';
+$labels['deletesieveact'] = 'Delete this action';
+$labels['envelopefrom'] = 'Envelope From';
+$labels['envelopeto'] = 'Envelope To';
+$labels['otherheader'] = 'Other header';
+$labels['days'] = 'Period';
+$labels['message'] = 'Message';
+$labels['sieveruleheaders'] = 'View examples of other headers';
+$labels['examplefilters'] = 'Example Filters';
+$labels['importfilters'] = 'Import Filters';
+$labels['usedefaultfilter'] = 'Use default filters';
+$labels['importfilter'] = 'Import filters';
+$labels['moreactions'] = 'More options...';
+$labels['adveditor'] = 'Advanced editor';
+$labels['stdeditor'] = 'Standard editor';
+$labels['messageredirectcopy'] = 'Send a copy to';
+$labels['messagecopyto'] = 'Copy message to';
+$labels['body'] = 'Body';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Other';
+$labels['bodycontentpart'] = 'Content Part';
+$labels['notchecked'] = 'not checked';
+$labels['spamlevelisgreaterthanequal'] = 'is greater than or equal to';
+$labels['spamlevelislessthanequal'] = 'is less than or equal to';
+$labels['spamlevelequals'] = 'is equal to';
+$labels['i;ascii-casemap'] = 'case-insensitive string match';
+$labels['i;octet'] = 'exact string match';
+$labels['i;ascii-numeric'] = 'numeric match';
+$labels['selectruleset'] = 'Select ruleset';
+$labels['activeruleset'] = '%s (active)';
+$labels['activateruleset'] = 'Activate this ruleset';
+$labels['isactive'] = 'Active ruleset';
+$labels['isinactive'] = 'Inactive ruleset';
+$labels['newruleset'] = 'Create a new ruleset';
+$labels['delruleset'] = 'Delete this ruleset';
+$labels['renameruleset'] = 'Rename this ruleset';
+$labels['copy'] = 'Copy';
+$labels['copyexistingfilter'] = 'Copy existing filters';
+$labels['copytoruleset'] = 'Copy filter to another ruleset';
+$labels['copyfromruleset'] = 'Copy filters from existing ruleset';
+$labels['time'] = 'Time';
+$labels['weekday'] = 'Weekday';
+$labels['virustest'] = 'Virus Probability';
+$labels['novirus'] = 'no virus found';
+$labels['virusremoved'] = 'virus found and removed';
+$labels['viruscured'] = 'virus found and cured';
+$labels['possiblevirus'] = 'message possibly contains a virus';
+$labels['definitevirus'] = 'message defiantly contains a virus';
+$labels['addheader'] = 'Add header';
+$labels['removeheader'] = 'Remove header';
+$labels['headername'] = 'Header name';
+$labels['headervalue'] = 'Header value';
+$labels['headerappend'] = 'Append to existing message header.';
+$labels['headerindex'] = 'Header index';
+$labels['headerdelall'] = 'all occurrences';
+$labels['last'] = 'last';
+
+$messages = array();
+$messages['nosieverules'] = 'No filters found.';
+$messages['filterdeleteconfirm'] = 'Are you sure you want to delete this filter?';
+$messages['ruledeleteconfirm'] = 'Are you sure you want to delete this rule?';
+$messages['actiondeleteconfirm'] = 'Are you sure you want to delete this action?';
+$messages['filterunknownerror'] = 'Unknown server error';
+$messages['filterconnerror'] = 'Unable to connect to sieve server';
+$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occurred';
+$messages['filterdeleted'] = 'Filter deleted successfully';
+$messages['filtersaved'] = 'Filter saved successfully';
+$messages['filtersaveerror'] = 'Unable to save filter. Server error occurred';
+$messages['vacdaysexp'] = 'The period is the number of days during which the message will not be resent to the same user, no matter how many times they contact you.<br /><br />For example: If Joe emails you on Monday and the period is set to 7 then Joe will receive an out of office message on Monday but will not get another one until the following Monday, no matter how many emails he sends an email during the week.';
+$messages['vachandleexp'] = 'A handle can be used to link different out of office messages together, once one message has been sent no other message with the same handle will be resent in that period.';
+$messages['vactoexp'] = 'List of additional recipient addresses which are included in the auto replying. If a mail\'s recipient is not your main address and it\'s not on this list, no message will be sent.';
+$messages['vactoexp_adv'] = 'Separate multiple aliases with a comma (,). For Example: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Error: Multiple aliases should be separated with a comma (,)';
+$messages['norulename'] = 'Please enter a name for this filter';
+$messages['ruleexists'] = 'A filter with this name already exists. Please enter another';
+$messages['noheader'] = 'Please enter the name of the header to test';
+$messages['headerbadchars'] = 'Error: Header contains forbidden characters';
+$messages['noheadervalue'] = 'Please enter a value to test the header against';
+$messages['sizewrongformat'] = 'Error: Message size must be numeric';
+$messages['noredirect'] = 'Please enter an email address to redirect messages to';
+$messages['redirectaddresserror'] = 'Error: Address appears invalid';
+$messages['noreject'] = 'Please enter a message to send with rejected email';
+$messages['vacnodays'] = 'Please enter a number of days for the period in which the message will not be resent to the same person';
+$messages['vacdayswrongformat'] = 'Error: The period must be a number greater than or equal to 1';
+$messages['vacnomsg'] = 'Please enter some text for your message';
+$messages['notifynomethod'] = 'Please enter a method by which the notification should be sent';
+$messages['notifynomsg'] = 'Please enter some text for your message';
+$messages['sieveruleexp'] = 'Please define one or more rules against which each message will be tested. Filters are run in the order in which they appear on the left of this screen, if a match is found no further filters will be tested.';
+$messages['sieveruleexp_stop'] = 'Please define one or more rules against which each message will be tested. Filters are run in the order in which they appear on the left of this screen until a \'Stop\' action is met.';
+$messages['sieveactexp'] = 'Please select from the options below. These actions will be performed for any message matching the above rule(s).';
+$messages['sieveheadershlp'] = 'Below are some examples of other headers that can be tested by the filters. Select a header to add it to the rule or enter a custom one in the box above.';
+$messages['movingfilter'] = 'Moving filter...';
+$messages['noexistingfilters'] = 'No existing filters detected!';
+$messages['importdefault'] = '<b>Use default filters:</b> There is a set of default filters available. Would you like to use these filters?';
+$messages['importother'] = '<b>Import filters:</b> Another set of filters from %s has been found. Would you like to import these filters into your current set?';
+$messages['switchtoadveditor'] = 'Switching to the advanced editor allows you to edit the sieve file directly. Any changes here may be unreadable in the normal editor and may be lost when filters are saved using the normal editor. Do you wish to continue?';
+$messages['filterimported'] = 'Filter imported successfully';
+$messages['filterimporterror'] = 'Unable to import filter. Server error occurred';
+$messages['notifyinvalidmethod'] = 'The method does not appear to be written in a valid format, it must be a URI. For example: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Please enter a content part to test';
+$messages['badoperator'] = 'Sorry the operator you selected cannot be used in this rule';
+$messages['filteractionerror'] = 'The action you requested is not supported by the server';
+$messages['filtermissingerror'] = 'Unable to find the rule requested';
+$messages['contentpartexp'] = 'The MIME-type or specific part of the message which should be tested. For example: `message/rfc822`, `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Are you sure you want to delete this ruleset?';
+$messages['rulesetexists'] = 'A ruleset with this name already exists. Please enter another';
+$messages['copyexisting'] = '<b>Copy exiting ruleset:</b> Would you like to copy filters from an existing ruleset into your current set?';
+$messages['filtercopied'] = 'Filter copied successfully';
+$messages['nosieverulesets'] = 'No rulesets found.';
+$messages['baddateformat'] = 'Error: Please enter the date in the format YYYY-MM-DD';
+$messages['badtimeformat'] = 'Error: Please enter the time in the format HH:MM:SS';
+$messages['missingfoldername'] = 'Error: Please enter a folder name';
+$messages['eheadernoname'] = 'Error: Please enter a header name';
+$messages['eheadernoval'] = 'Error: Please enter a header value';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/en_US.inc b/plugins/sieverules/localization/en_US.inc
new file mode 100644
index 000000000..6049eeb73
--- /dev/null
+++ b/plugins/sieverules/localization/en_US.inc
@@ -0,0 +1,205 @@
+<?php
+/* Author: Philip Weir */
+
+$labels = array();
+$labels['filters'] = 'Filters';
+$labels['filtersname'] = 'Filters ($name)';
+$labels['managefilters'] = 'Manage message filters';
+$labels['filtername'] = 'Filter name';
+$labels['disablerule'] = 'Disable rule';
+$labels['disabled'] = 'Disabled';
+$labels['newfilter'] = 'New filter';
+$labels['moveup'] = 'Move up';
+$labels['movedown'] = 'Move down';
+$labels['filterallof'] = 'matching all of the following rules';
+$labels['filteranyof'] = 'matching any of the following rules';
+$labels['filterany'] = 'all messages';
+$labels['filtercontains'] = 'contains';
+$labels['filternotcontains'] = 'does not contain';
+$labels['filteris'] = 'is equal to';
+$labels['filterisnot'] = 'is not equal to';
+$labels['filterexists'] = 'exists';
+$labels['filternotexists'] = 'does not exist';
+$labels['filterregex'] = 'matches regular expression';
+$labels['filternotregex'] = 'does not match regular expression';
+$labels['filterunder'] = 'is less than';
+$labels['filterover'] = 'is more than';
+$labels['filterbefore'] = 'is before';
+$labels['filterafter'] = 'is after';
+$labels['filteradvoptions'] = 'more options...';
+$labels['spamtest'] = 'Spam Probability';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Comparator';
+$labels['isgreaterthan'] = 'is greater than';
+$labels['isgreaterthanequal'] = 'is greater than or equal to';
+$labels['islessthan'] = 'is less than';
+$labels['islessthanequal'] = 'is less than or equal to';
+$labels['equals'] = 'is equal to';
+$labels['notequals'] = 'does not equal';
+$labels['countisgreaterthan'] = 'count is greater than';
+$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
+$labels['countislessthan'] = 'count is less than';
+$labels['countislessthanequal'] = 'count is less than or equal to';
+$labels['countequals'] = 'count is equal to';
+$labels['countnotequals'] = 'count does not equal';
+$labels['valueisgreaterthan'] = 'value is greater than';
+$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
+$labels['valueislessthan'] = 'value is less than';
+$labels['valueislessthanequal'] = 'value is less than or equal to';
+$labels['valueequals'] = 'value is equal to';
+$labels['valuenotequals'] = 'value does not equal';
+$labels['userpart'] = 'user part equals';
+$labels['notuserpart'] = 'user part does not equal';
+$labels['detailpart'] = 'detail part equals';
+$labels['notdetailpart'] = 'detail part does not equal';
+$labels['domainpart'] = 'domain part equals';
+$labels['notdomainpart'] = 'domain part does not equal';
+$labels['teststring'] = 'Test string';
+$labels['messagemoveto'] = 'Move message to';
+$labels['messageredirect'] = 'Redirect message to';
+$labels['messageimapflags'] = 'Mark message as';
+$labels['messagereject'] = 'Reject with message';
+$labels['messagevacation'] = 'Out of Office Message';
+$labels['messagekeep'] = 'Keep message';
+$labels['messagediscard'] = 'Discard message';
+$labels['messagenotify'] = 'Send notification';
+$labels['messagestop'] = 'Stop processing filters';
+$labels['messagehelp'] = 'What is this?';
+$labels['sieveorigsubj'] = 'Append original subject to response';
+$labels['sievevachandle'] = 'Handle';
+$labels['method'] = 'Method';
+$labels['options'] = 'Options';
+$labels['messagesrules'] = 'Filter Rules';
+$labels['messagesactions'] = 'Filter Actions';
+$labels['sieveto'] = 'Aliases';
+$labels['sievefrom'] = 'From';
+$labels['flag'] = 'Importance';
+$labels['importancen'] = 'None';
+$labels['importance1'] = 'High';
+$labels['importance2'] = 'Normal';
+$labels['importance3'] = 'Low';
+$labels['flagread'] = 'Read';
+$labels['flagdeleted'] = 'Deleted';
+$labels['flaganswered'] = 'Answered';
+$labels['flagdraft'] = 'Draft';
+$labels['flagflagged'] = 'Flagged';
+$labels['addsieverule'] = 'Add another rule, below this one';
+$labels['addsieveact'] = 'Add another action, below this one';
+$labels['deletesieverule'] = 'Delete this rule';
+$labels['deletesieveact'] = 'Delete this action';
+$labels['envelopefrom'] = 'Envelope From';
+$labels['envelopeto'] = 'Envelope To';
+$labels['otherheader'] = 'Other header';
+$labels['days'] = 'Period';
+$labels['message'] = 'Message';
+$labels['sieveruleheaders'] = 'View examples of other headers';
+$labels['examplefilters'] = 'Example Filters';
+$labels['importfilters'] = 'Import Filters';
+$labels['usedefaultfilter'] = 'Use default filters';
+$labels['importfilter'] = 'Import filters';
+$labels['moreactions'] = 'More options...';
+$labels['adveditor'] = 'Advanced editor';
+$labels['stdeditor'] = 'Standard editor';
+$labels['messageredirectcopy'] = 'Send a copy to';
+$labels['messagecopyto'] = 'Copy message to';
+$labels['body'] = 'Body';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Other';
+$labels['bodycontentpart'] = 'Content Part';
+$labels['notchecked'] = 'not checked';
+$labels['spamlevelisgreaterthanequal'] = 'is greater than or equal to';
+$labels['spamlevelislessthanequal'] = 'is less than or equal to';
+$labels['spamlevelequals'] = 'is equal to';
+$labels['i;ascii-casemap'] = 'case-insensitive string match';
+$labels['i;octet'] = 'exact string match';
+$labels['i;ascii-numeric'] = 'numeric match';
+$labels['selectruleset'] = 'Select ruleset';
+$labels['activeruleset'] = '%s (active)';
+$labels['activateruleset'] = 'Activate this ruleset';
+$labels['isactive'] = 'Active ruleset';
+$labels['isinactive'] = 'Inactive ruleset';
+$labels['newruleset'] = 'Create a new ruleset';
+$labels['delruleset'] = 'Delete this ruleset';
+$labels['renameruleset'] = 'Rename this ruleset';
+$labels['copy'] = 'Copy';
+$labels['copyexistingfilter'] = 'Copy existing filters';
+$labels['copytoruleset'] = 'Copy filter to another ruleset';
+$labels['copyfromruleset'] = 'Copy filters from existing ruleset';
+$labels['time'] = 'Time';
+$labels['weekday'] = 'Weekday';
+$labels['virustest'] = 'Virus Probability';
+$labels['novirus'] = 'no virus found';
+$labels['virusremoved'] = 'virus found and removed';
+$labels['viruscured'] = 'virus found and cured';
+$labels['possiblevirus'] = 'message possibly contains a virus';
+$labels['definitevirus'] = 'message possibly defiantly a virus';
+$labels['addheader'] = 'Add header';
+$labels['removeheader'] = 'Remove header';
+$labels['headername'] = 'Header name';
+$labels['headervalue'] = 'Header value';
+$labels['headerappend'] = 'Append to existing message header.';
+$labels['headerindex'] = 'Header index';
+$labels['headerdelall'] = 'all occurrences';
+$labels['last'] = 'last';
+
+$messages = array();
+$messages['nosieverules'] = 'No filters found.';
+$messages['filterdeleteconfirm'] = 'Are you sure you want to delete this filter?';
+$messages['ruledeleteconfirm'] = 'Are you sure you want to delete this rule?';
+$messages['actiondeleteconfirm'] = 'Are you sure you want to delete this action?';
+$messages['filterunknownerror'] = 'Unknown server error';
+$messages['filterconnerror'] = 'Unable to connect to sieve server';
+$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occurred';
+$messages['filterdeleted'] = 'Filter deleted successfully';
+$messages['filtersaved'] = 'Filter saved successfully';
+$messages['filtersaveerror'] = 'Unable to save filter. Server error occurred';
+$messages['vacdaysexp'] = 'The period is the number of days during which the message will not be resent to the same user, no matter how many times they contact you.<br /><br />For example: If Joe emails you on Monday and the period is set to 7 then Joe will receive an out of office message on Monday but will not get another one until the following Monday, no matter how many emails he sends an email during the week.';
+$messages['vachandleexp'] = 'A handle can be used to link different out of office messages together, once one message has been sent no other message with the same handle will be resent in that period.';
+$messages['vactoexp'] = 'List of additional recipient addresses which are included in the auto replying. If a mail\'s recipient is not your main address and it\'s not on this list, no message will be sent.';
+$messages['vactoexp_adv'] = 'Separate multiple aliases with a comma (,). For Example: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Error: Multiple aliases should be separated with a comma (,)';
+$messages['norulename'] = 'Please enter a name for this filter';
+$messages['ruleexists'] = 'A filter with this name already exists. Please enter another';
+$messages['noheader'] = 'Please enter the name of the header to test';
+$messages['headerbadchars'] = 'Error: Header contains forbidden characters';
+$messages['noheadervalue'] = 'Please enter a value to test the header against';
+$messages['sizewrongformat'] = 'Error: Message size must be numeric';
+$messages['noredirect'] = 'Please enter an email address to redirect messages to';
+$messages['redirectaddresserror'] = 'Error: Address appears invalid';
+$messages['noreject'] = 'Please enter a message to send with rejected email';
+$messages['vacnodays'] = 'Please enter a number of days for the period in which the message will not be resent to the same person';
+$messages['vacdayswrongformat'] = 'Error: The period must be a number greater than or equal to 1';
+$messages['vacnomsg'] = 'Please enter some text for your message';
+$messages['notifynomethod'] = 'Please enter a method by which the notification should be sent';
+$messages['notifynomsg'] = 'Please enter some text for your message';
+$messages['sieveruleexp'] = 'Please define one or more rules against which each message will be tested. Filters are run in the order in which they appear on the left of this screen, if a match is found no further filters will be tested.';
+$messages['sieveruleexp_stop'] = 'Please define one or more rules against which each message will be tested. Filters are run in the order in which they appear on the left of this screen until a \'Stop\' action is met.';
+$messages['sieveactexp'] = 'Please select from the options below. These actions will be performed for any message matching the above rule(s).';
+$messages['sieveheadershlp'] = 'Below are some examples of other headers that can be tested by the filters. Select a header to add it to the rule or enter a custom one in the box above.';
+$messages['movingfilter'] = 'Moving filter...';
+$messages['noexistingfilters'] = 'No existing filters detected!';
+$messages['importdefault'] = '<b>Use default filters:</b> There is a set of default filters available. Would you like to use these filters?';
+$messages['importother'] = '<b>Import filters:</b> Another set of filters from %s has been found. Would you like to import these filters into your current set?';
+$messages['switchtoadveditor'] = 'Switching to the advanced editor allows you to edit the sieve file directly. Any changes here may be unreadable in the normal editor and may be lost when filters are saved using the normal editor. Do you wish to continue?';
+$messages['filterimported'] = 'Filter imported successfully';
+$messages['filterimporterror'] = 'Unable to import filter. Server error occurred';
+$messages['notifyinvalidmethod'] = 'The method does not appear to be written in a valid format, it must be a URI. For example: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Please enter a content part to test';
+$messages['badoperator'] = 'Sorry the operator you selected cannot be used in this rule';
+$messages['filteractionerror'] = 'The action you requested is not supported by the server';
+$messages['filtermissingerror'] = 'Unable to find the rule requested';
+$messages['contentpartexp'] = 'The MIME-type or specific part of the message which should be tested. For example: `message/rfc822`, `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Are you sure you want to delete this ruleset?';
+$messages['rulesetexists'] = 'A ruleset with this name already exists. Please enter another';
+$messages['copyexisting'] = '<b>Copy exiting ruleset:</b> Would you like to copy filters from an existing ruleset into your current set?';
+$messages['filtercopied'] = 'Filter copied successfully';
+$messages['nosieverulesets'] = 'No rulesets found.';
+$messages['baddateformat'] = 'Error: Please enter the date in the format YYYY-MM-DD';
+$messages['badtimeformat'] = 'Error: Please enter the time in the format HH:MM:SS';
+$messages['missingfoldername'] = 'Error: Please enter a folder name';
+$messages['eheadernoname'] = 'Error: Please enter a header name';
+$messages['eheadernoval'] = 'Error: Please enter a header value';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/es_AR.inc b/plugins/sieverules/localization/es_AR.inc
new file mode 100644
index 000000000..b57e223a4
--- /dev/null
+++ b/plugins/sieverules/localization/es_AR.inc
@@ -0,0 +1,140 @@
+<?php
+/* Author: Alejandro Vargas */
+
+$labels = array();
+$labels['filters'] = 'Filtros';
+$labels['managefilters'] = 'Manejo de filtros';
+$labels['filtername'] = 'Nombre del filtro';
+$labels['disablerule'] = 'Desactivar regla';
+$labels['disabled'] = 'Desactivada';
+$labels['newfilter'] = 'Nuevo filtro';
+$labels['moveup'] = 'Mover arriba';
+$labels['movedown'] = 'Mover abajo';
+$labels['filterallof'] = 'concuerda con TODAS las reglas siguientes';
+$labels['filteranyof'] = 'concuerda con ALGUNA de las reglas siguientes';
+$labels['filterany'] = 'todos los mensajes';
+$labels['filtercontains'] = 'contiene';
+$labels['filternotcontains'] = 'no contiene';
+$labels['filteris'] = 'es igual a';
+$labels['filterisnot'] = 'es distinto de';
+$labels['filterexists'] = 'existe';
+$labels['filternotexists'] = 'no existe';
+$labels['filterregex'] = 'concuerda con la expresion regular';
+$labels['filternotregex'] = 'no concuerda con la expresion regular';
+$labels['filterunder'] = 'es menos que';
+$labels['filterover'] = 'es mas que';
+$labels['filteradvoptions'] = 'mas opciones...';
+$labels['operator'] = 'Operador';
+$labels['comparator'] = 'Comparador';
+$labels['isgreaterthan'] = 'es mayor que';
+$labels['isgreaterthanequal'] = 'es mayor o igual que';
+$labels['islessthan'] = 'es menor que';
+$labels['islessthanequal'] = 'es menor o igual que';
+$labels['equals'] = 'es igual a';
+$labels['notequals'] = 'es distinto de';
+$labels['countisgreaterthan'] = 'cantidad es mayor que';
+$labels['countisgreaterthanequal'] = 'cantidad es mayor o igual que';
+$labels['countislessthan'] = 'cantidad es menor que';
+$labels['countislessthanequal'] = 'cantidad es menor o igual que';
+$labels['countequals'] = 'cantidad es igual a';
+$labels['countnotequals'] = 'cantidad es distinto de';
+$labels['valueisgreaterthan'] = 'valor es mayor que';
+$labels['valueisgreaterthanequal'] = 'valor es mayor o igual que';
+$labels['valueislessthan'] = 'valor es menor que';
+$labels['valueislessthanequal'] = 'valor es menor o igual que';
+$labels['valueequals'] = 'valor es igual a';
+$labels['valuenotequals'] = 'valor es distinto de';
+$labels['userpart'] = 'la parte del usuario es igual a';
+$labels['notuserpart'] = 'la parte del usuario es distinta de';
+$labels['detailpart'] = 'la parte del detalle es igual a';
+$labels['notdetailpart'] = 'la parte del detalle es distinta de';
+$labels['domainpart'] = 'la parte del dominio es igual a';
+$labels['notdomainpart'] = 'la parte del dominio es distinta de';
+$labels['teststring'] = 'Iniciando prueba';
+$labels['messagemoveto'] = 'Mover mensaje a';
+$labels['messageredirect'] = 'Redirigir mensaje a';
+$labels['messageimapflags'] = 'Marcar mensaje como';
+$labels['messagereject'] = 'Rechazar con aviso';
+$labels['messagevacation'] = 'Mensaje de vacaciones';
+$labels['messagekeep'] = 'Mantener mensaje';
+$labels['messagediscard'] = 'Descartar mensaje';
+$labels['messagenotify'] = 'Enviar notificacion';
+$labels['messagestop'] = 'Dejar de procesar filtros';
+$labels['messagehelp'] = 'Que es esto?';
+$labels['sieveorigsubj'] = 'Agregar asunto iriginal a la respuesta';
+$labels['sievevachandle'] = 'Manejador';
+$labels['method'] = 'Metodo';
+$labels['options'] = 'Opciones';
+$labels['messagesrules'] = 'Reglas de filtrado';
+$labels['messagesactions'] = 'Acciones del filtro';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'De';
+$labels['flag'] = 'Marca';
+$labels['importancen'] = 'Ninguno';
+$labels['importance1'] = '1';
+$labels['importance2'] = '2';
+$labels['importance3'] = '3';
+$labels['flagread'] = 'Leido';
+$labels['flagdeleted'] = 'Borrado';
+$labels['flaganswered'] = 'Respondido';
+$labels['flagdraft'] = 'Borrador';
+$labels['flagflagged'] = 'Marcado';
+$labels['addsieverule'] = 'Agregar otra regla despues de esta';
+$labels['addsieveact'] = 'Agregar otra accion despues de esta';
+$labels['deletesieverule'] = 'Borrar esta regla';
+$labels['deletesieveact'] = 'Borrar esta accion';
+$labels['envelopefrom'] = 'Remitente en la cabecera';
+$labels['envelopeto'] = 'Destinatario en la cabecera';
+$labels['otherheader'] = 'Otra cabecera';
+$labels['days'] = 'Periodo';
+$labels['message'] = 'Mensaje';
+$labels['sieveruleheaders'] = 'Ver ejemplos de otras cabeceras';
+$labels['examplefilters'] = 'Filtros de ejemplo';
+$labels['importfilters'] = 'Importar filtros';
+$labels['usedefaultfilter'] = 'Usar filtros por defecto';
+$labels['importfilter'] = 'Importar filtro';
+$labels['adveditor'] = 'Editor avanzado';
+$labels['spamlevelisgreaterthanequal'] = 'es mayor o igual que';
+$labels['spamlevelislessthanequal'] = 'es menor o igual que';
+$labels['spamlevelequals'] = 'es igual a';
+
+$messages = array();
+$messages['nosieverules'] = 'No se han encontrado filtros.';
+$messages['filterdeleteconfirm'] = '¿Está seguro de que quiere borrar este filtro?';
+$messages['ruledeleteconfirm'] = '¿Está seguro de que quiere borrar esta regla?';
+$messages['actiondeleteconfirm'] = '¿Está seguro de que quiere borrar esta acción?';
+$messages['filterunknownerror'] = 'Error desconocido en el servidor';
+$messages['filterconnerror'] = 'Imposible conectar con el servidor sieve';
+$messages['filterdeleteerror'] = 'No se pudo borrar el filtro. Error del servidor';
+$messages['filterdeleted'] = 'Filtro borrado';
+$messages['filtersaved'] = 'Filtro grabado';
+$messages['filtersaveerror'] = 'Incapaz de grabar filtro. Error en el servidor';
+$messages['vacdaysexp'] = 'El periodo es el numero de dias que el mensaje no será reenviado al mismo usuario, sin importar cuantas veces intente contactar con usted<br /><br />Por ejemplo, si Juan le manda un mensaje, unlunes, y tiene el periodo fijado en 7, Juan recibirá un aviso de vacaciones el lunes pero no recibirá otro hasta el siguiente lunes, sin importar cuántos emails le envíe durente la semana.';
+$messages['vachandleexp'] = 'Se puede usar un manejador para vincular diferentes mensajes de vacaciones todos juntos, una vez se envio un mensaje, no se enviará otro que tenga el mismo manejador durante el periodo definido.';
+$messages['vactoexp'] = 'Lista de destinatarios adicionales que será incluida en la auto respuesta. Si un destinatario no es su dirección principal, y no está en esta lista, no se le enviarán mensajes.';
+$messages['norulename'] = 'Debe asignar un nombre al filtro';
+$messages['ruleexists'] = 'Ya hay un filtro con ese nombre. Elija otro';
+$messages['noheader'] = 'Debe ingresar el nombre de la cabecera a verificar';
+$messages['headerbadchars'] = 'Error: La cabecera contiene caracteres no permitidos';
+$messages['noheadervalue'] = 'Ingrese un valor contra el cual comparar la cabecera';
+$messages['sizewrongformat'] = 'Error: El tamaño del mensaje debe ser numérico';
+$messages['noredirect'] = 'Ingrese una dirección de email a la cual redirigir los mensajes';
+$messages['redirectaddresserror'] = 'Error: Dirección inválida';
+$messages['noreject'] = 'Ingrese el texto a enviar con los mensajes rechazados';
+$messages['vacnodays'] = 'Ingrese el numero de dias para el periodo que el mensaje no será reenviado a la misma persona';
+$messages['vacdayswrongformat'] = 'Error: El periodo debe ser 1 o más dias';
+$messages['vacnomsg'] = 'Ingrese un texto para el mensaje';
+$messages['notifynomethod'] = 'Ingrese el método por el cual se enviará la notificación';
+$messages['notifynomsg'] = 'Ingrese un texto para su mensaje';
+$messages['sieveruleexp'] = 'Debe definir una o más reglas contra las que se comprobarán los mensajes. Los filtros son ejecutados en el orden e nque aparecen a la izquierda de esta pantalla. Si se encuentra una coincidencia los demás filtros no se comprueban.';
+$messages['sieveactexp'] = 'Seleccione una de las opciones que figuran abajo. Esta acción será ejecutada por cada mensaje que concuerden con las reglas que figuran arriba.';
+$messages['sieveheadershlp'] = 'Debajo hay algunos ejemplos de cabeceras que pueden verificarse con filtros. Seleccione una cabecera para agregar a la regla o increse una propia en el cuadro de arriba.';
+$messages['movingfilter'] = 'Moviendo filtro...';
+$messages['noexistingfilters'] = '¡No se detectan filtros!';
+$messages['importdefault'] = '<b>Usar filtros por defecto:</b> Hay un juego de filtros por defecto disponibles. ¿Quiere instalar una copia de esos filtros?';
+$messages['importother'] = '<b>Importar filtros:</b> Se ha encontrado otro juego de filtros de %s. ¿Quiere importarlos a su lista de filtros?';
+$messages['switchtoadveditor'] = 'El editor avanzado le permite editar las reglas de sieve directamente. Cualquier cambio que haga será ilegible para el editor normal de reglas y se parderá si graba modificaciones con el editor normal. ¿Quiere continuar?';
+$messages['filterimported'] = 'Filtro importado correctamente';
+$messages['filterimporterror'] = 'No se pudo importar el filtro. Error en el servidor';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/es_ES.inc b/plugins/sieverules/localization/es_ES.inc
new file mode 100644
index 000000000..df9b0f24b
--- /dev/null
+++ b/plugins/sieverules/localization/es_ES.inc
@@ -0,0 +1,185 @@
+<?php
+/* Author: Alejandro Vargas */
+
+$labels = array();
+$labels['filters'] = 'Filtros';
+$labels['managefilters'] = 'Manejo de filtros';
+$labels['filtername'] = 'Nombre del filtro';
+$labels['disablerule'] = 'Desactivar regla';
+$labels['disabled'] = 'Desactivada';
+$labels['newfilter'] = 'Nuevo filtro';
+$labels['moveup'] = 'Mover arriba';
+$labels['movedown'] = 'Mover abajo';
+$labels['filterallof'] = 'concuerda con TODAS las reglas siguientes';
+$labels['filteranyof'] = 'concuerda con ALGUNA de las reglas siguientes';
+$labels['filterany'] = 'todos los mensajes';
+$labels['filtercontains'] = 'contiene';
+$labels['filternotcontains'] = 'no contiene';
+$labels['filteris'] = 'es igual a';
+$labels['filterisnot'] = 'es distinto de';
+$labels['filterexists'] = 'existe';
+$labels['filternotexists'] = 'no existe';
+$labels['filterregex'] = 'concuerda con la expresion regular';
+$labels['filternotregex'] = 'no concuerda con la expresion regular';
+$labels['filterunder'] = 'es menos que';
+$labels['filterover'] = 'es mas que';
+$labels['filterbefore'] = 'es antes que';
+$labels['filterafter'] = 'es después que';
+$labels['filteradvoptions'] = 'mas opciones...';
+$labels['spamtest'] = 'Probabilidad de Spam';
+$labels['operator'] = 'Operador';
+$labels['comparator'] = 'Comparador';
+$labels['isgreaterthan'] = 'es mayor que';
+$labels['isgreaterthanequal'] = 'es mayor o igual que';
+$labels['islessthan'] = 'es menor que';
+$labels['islessthanequal'] = 'es menor o igual que';
+$labels['equals'] = 'es igual a';
+$labels['notequals'] = 'es distinto de';
+$labels['countisgreaterthan'] = 'cantidad es mayor que';
+$labels['countisgreaterthanequal'] = 'cantidad es mayor o igual que';
+$labels['countislessthan'] = 'cantidad es menor que';
+$labels['countislessthanequal'] = 'cantidad es menor o igual que';
+$labels['countequals'] = 'cantidad es igual a';
+$labels['countnotequals'] = 'cantidad es distinto de';
+$labels['valueisgreaterthan'] = 'valor es mayor que';
+$labels['valueisgreaterthanequal'] = 'valor es mayor o igual que';
+$labels['valueislessthan'] = 'valor es menor que';
+$labels['valueislessthanequal'] = 'valor es menor o igual que';
+$labels['valueequals'] = 'valor es igual a';
+$labels['valuenotequals'] = 'valor es distinto de';
+$labels['userpart'] = 'la parte del usuario es igual a';
+$labels['notuserpart'] = 'la parte del usuario es distinta de';
+$labels['detailpart'] = 'la parte del detalle es igual a';
+$labels['notdetailpart'] = 'la parte del detalle es distinta de';
+$labels['domainpart'] = 'la parte del dominio es igual a';
+$labels['notdomainpart'] = 'la parte del dominio es distinta de';
+$labels['teststring'] = 'Iniciando prueba';
+$labels['messagemoveto'] = 'Mover mensaje a';
+$labels['messageredirect'] = 'Redirigir mensaje a';
+$labels['messageimapflags'] = 'Marcar mensaje como';
+$labels['messagereject'] = 'Rechazar con aviso';
+$labels['messagevacation'] = 'Mensaje de vacaciones';
+$labels['messagekeep'] = 'Mantener mensaje';
+$labels['messagediscard'] = 'Descartar mensaje';
+$labels['messagenotify'] = 'Enviar notificacion';
+$labels['messagestop'] = 'Dejar de procesar filtros';
+$labels['messagehelp'] = 'Que es esto?';
+$labels['sieveorigsubj'] = 'Agregar asunto iriginal a la respuesta';
+$labels['sievevachandle'] = 'Manejador';
+$labels['method'] = 'Metodo';
+$labels['options'] = 'Opciones';
+$labels['messagesrules'] = 'Reglas de filtrado';
+$labels['messagesactions'] = 'Acciones del filtro';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'De';
+$labels['flag'] = 'Marca';
+$labels['importancen'] = 'Ninguno';
+$labels['importance1'] = '1';
+$labels['importance2'] = '2';
+$labels['importance3'] = '3';
+$labels['flagread'] = 'Leido';
+$labels['flagdeleted'] = 'Borrado';
+$labels['flaganswered'] = 'Respondido';
+$labels['flagdraft'] = 'Borrador';
+$labels['flagflagged'] = 'Marcado';
+$labels['addsieverule'] = 'Agregar otra regla despues de esta';
+$labels['addsieveact'] = 'Agregar otra accion despues de esta';
+$labels['deletesieverule'] = 'Borrar esta regla';
+$labels['deletesieveact'] = 'Borrar esta accion';
+$labels['envelopefrom'] = 'Remitente en la cabecera';
+$labels['envelopeto'] = 'Destinatario en la cabecera';
+$labels['otherheader'] = 'Otra cabecera';
+$labels['days'] = 'Periodo';
+$labels['message'] = 'Mensaje';
+$labels['sieveruleheaders'] = 'Ver ejemplos de otras cabeceras';
+$labels['examplefilters'] = 'Filtros de ejemplo';
+$labels['importfilters'] = 'Importar filtros';
+$labels['usedefaultfilter'] = 'Usar filtros por defecto';
+$labels['importfilter'] = 'Importar filtro';
+$labels['moreactions'] = 'Más opciones...';
+$labels['adveditor'] = 'Editor avanzado';
+$labels['stdeditor'] = 'Editor estándar';
+$labels['messageredirectcopy'] = 'Envia una copia a ';
+$labels['messagecopyto'] = 'Copiar mensaje a ';
+$labels['body'] = 'Cuerpo';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Texto';
+$labels['other'] = 'Otro';
+$labels['bodycontentpart'] = 'Contenido';
+$labels['notchecked'] = 'no seleccionado';
+$labels['spamlevelisgreaterthanequal'] = 'es mayor o igual que';
+$labels['spamlevelislessthanequal'] = 'es menor o igual que';
+$labels['spamlevelequals'] = 'es igual a';
+$labels['i;ascii-casemap'] = 'no distingue mayúsculas/minúsculas';
+$labels['i;octet'] = 'coincide exactamente';
+$labels['i;ascii-numeric'] = 'coincidencia numérica';
+$labels['selectruleset'] = 'Escojer conjunto de reglas';
+$labels['activeruleset'] = '%s (activo)';
+$labels['activateruleset'] = 'Activar este conjunto de reglas';
+$labels['newruleset'] = 'Crear un nuevo conjunto de reglas.';
+$labels['delruleset'] = 'Borrar este conjunto de reglas';
+$labels['renameruleset'] = 'Renombrar este conjunto de reglas';
+$labels['copy'] = 'Copiar';
+$labels['copyexistingfilter'] = 'Copiar los filtros existentes';
+$labels['copytoruleset'] = 'Copiar filtro a otro conjunto de reglas';
+$labels['copyfromruleset'] = 'Copiar filtros desde un conjunto de reglas existente';
+$labels['time'] = 'Tiempo';
+$labels['weekday'] = 'Día de la semana';
+
+$messages = array();
+$messages['nosieverules'] = 'No se han encontrado filtros.';
+$messages['filterdeleteconfirm'] = '¿Está seguro de que quiere borrar este filtro?';
+$messages['ruledeleteconfirm'] = '¿Está seguro de que quiere borrar esta regla?';
+$messages['actiondeleteconfirm'] = '¿Está seguro de que quiere borrar esta acción?';
+$messages['filterunknownerror'] = 'Error desconocido en el servidor';
+$messages['filterconnerror'] = 'Imposible conectar con el servidor sieve';
+$messages['filterdeleteerror'] = 'No se pudo borrar el filtro. Error del servidor';
+$messages['filterdeleted'] = 'Filtro borrado';
+$messages['filtersaved'] = 'Filtro grabado';
+$messages['filtersaveerror'] = 'Incapaz de grabar filtro. Error en el servidor';
+$messages['vacdaysexp'] = 'El periodo es el numero de dias que el mensaje no será reenviado al mismo usuario, sin importar cuantas veces intente contactar con usted<br /><br />Por ejemplo, si Juan le manda un mensaje, un lunes, y tiene el periodo fijado en 7, Juan recibirá un aviso de vacaciones el lunes pero no recibirá otro hasta el siguiente lunes, sin importar cuántos emails le envíe durente la semana.';
+$messages['vachandleexp'] = 'Se puede usar un manejador para vincular diferentes mensajes de vacaciones todos juntos, una vez se envio un mensaje, no se enviará otro que tenga el mismo manejador durante el periodo definido.';
+$messages['vactoexp'] = 'Lista de destinatarios adicionales que será incluida en la auto respuesta. Si un destinatario no es su dirección principal, y no está en esta lista, no se le enviarán mensajes.';
+$messages['vactoexp_adv'] = 'Separe multiples alias con coma (,). Por ejemplo test1@ejemplo.com,test2@ejemplo.com,test3@ejemplo.com';
+$messages['vactoexp_err'] = 'Error: Los distintos alias deben separarse con coma (,)';
+$messages['norulename'] = 'Debe asignar un nombre al filtro';
+$messages['ruleexists'] = 'Ya hay un filtro con ese nombre. Elija otro';
+$messages['noheader'] = 'Debe ingresar el nombre de la cabecera a verificar';
+$messages['headerbadchars'] = 'Error: La cabecera contiene caracteres no permitidos';
+$messages['noheadervalue'] = 'Ingrese un valor contra el cual comparar la cabecera';
+$messages['sizewrongformat'] = 'Error: El tamaño del mensaje debe ser numérico';
+$messages['noredirect'] = 'Ingrese una dirección de email a la cual redirigir los mensajes';
+$messages['redirectaddresserror'] = 'Error: Dirección inválida';
+$messages['noreject'] = 'Ingrese el texto a enviar con los mensajes rechazados';
+$messages['vacnodays'] = 'Ingrese el numero de dias para el periodo que el mensaje no será reenviado a la misma persona';
+$messages['vacdayswrongformat'] = 'Error: El periodo debe ser 1 o más dias';
+$messages['vacnomsg'] = 'Ingrese un texto para el mensaje';
+$messages['notifynomethod'] = 'Ingrese el método por el cual se enviará la notificación';
+$messages['notifynomsg'] = 'Ingrese un texto para su mensaje';
+$messages['sieveruleexp'] = 'Debe definir una o más reglas contra las que se comprobarán los mensajes. Los filtros son ejecutados en el orden en que aparecen a la izquierda de esta pantalla. Si se encuentra una coincidencia los demás filtros no se comprueban.';
+$messages['sieveruleexp_stop'] = 'Debe definir una o más reglas contra las que se comprobarán los mensajes. Los filtros son ejecutados en el orden en que aparecen a la izquierda de esta pantalla, hasta que una acción \'Stop\' se cumpla.';
+$messages['sieveactexp'] = 'Seleccione una de las opciones que figuran abajo. Esta acción será ejecutada por cada mensaje que concuerden con las reglas que figuran arriba.';
+$messages['sieveheadershlp'] = 'Debajo hay algunos ejemplos de cabeceras que pueden verificarse con filtros. Seleccione una cabecera para agregar a la regla o increse una propia en el cuadro de arriba.';
+$messages['movingfilter'] = 'Moviendo filtro...';
+$messages['noexistingfilters'] = '¡No se detectan filtros!';
+$messages['importdefault'] = '<b>Usar filtros por defecto:</b> Hay un juego de filtros por defecto disponibles. ¿Quiere instalar una copia de esos filtros?';
+$messages['importother'] = '<b>Importar filtros:</b> Se ha encontrado otro juego de filtros de %s. ¿Quiere importarlos a su lista de filtros?';
+$messages['switchtoadveditor'] = 'El editor avanzado le permite editar las reglas de sieve directamente. Cualquier cambio que haga será ilegible para el editor normal de reglas y se parderá si graba modificaciones con el editor normal. ¿Quiere continuar?';
+$messages['filterimported'] = 'Filtro importado correctamente';
+$messages['filterimporterror'] = 'No se pudo importar el filtro. Error en el servidor';
+$messages['notifyinvalidmethod'] = 'El método no parece estar escrito en un formato válido, debe ser una URI. Por ejemplo: "mailto: alert@example.com".';
+$messages['nobodycontentpart'] = 'Por favor, introduzca una parte de contenido para prueba';
+$messages['badoperator'] = 'Lo sentimos, el operador que ha seleccionado no se puede usar en esta regla.';
+$messages['filteractionerror'] = 'La acción requerida no está soportada por el servidor.';
+$messages['filtermissingerror'] = 'No ha sido posible encontrar la regla solicitada.';
+$messages['contentpartexp'] = 'El tipo MIME o una parte específica del mensaje debe ser probado. Por ejemplo: `message/rfc822`, `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Está seguro de querer borrar este conjunto de reglas?';
+$messages['rulesetexists'] = 'Ya existe un conjunto de reglas con ese nombre. Por favor, escoja otro.';
+$messages['copyexisting'] = '<b> Copia el siguiente conjunto de reglas:</b> ¿Quiere importar los filtros de un conjunto de reglas existente al conjunto actual?';
+$messages['filtercopied'] = 'Filtro copiado correctamente';
+$messages['nosieverulesets'] = 'No se han encontrado reglas.';
+$messages['baddateformat'] = 'Error: Por favor, introduzca la fecha en el formato AAAA-MM-DD';
+$messages['badtimeformat'] = 'Error: Por favor, introduzca la hora en el formato HH:MM:SS';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/et_EE.inc b/plugins/sieverules/localization/et_EE.inc
new file mode 100644
index 000000000..980097d14
--- /dev/null
+++ b/plugins/sieverules/localization/et_EE.inc
@@ -0,0 +1,79 @@
+<?php
+/* Author: Andi Lõhmus */
+
+$labels = array();
+$labels['filters'] = 'Filtrid';
+$labels['managefilters'] = 'Halda sisenevate kirjade filtreid';
+$labels['filtername'] = 'Filtri nimi';
+$labels['disablerule'] = 'Keela filter';
+$labels['disabled'] = 'Keelatud';
+$labels['newfilter'] = 'Uus filter';
+$labels['moveup'] = 'Liiguta ülesse';
+$labels['movedown'] = 'Liiguta alla';
+$labels['filterallof'] = 'vastab kõikidele järgnevatele reeglitele';
+$labels['filteranyof'] = 'vastab mõnele järgnevatest reeglitest';
+$labels['filterany'] = 'kõik kirjad';
+$labels['filtercontains'] = 'sisaldab';
+$labels['filternotcontains'] = 'ei sisalda';
+$labels['filteris'] = 'on võrdne kui';
+$labels['filterisnot'] = 'ei ole võrdne kui';
+$labels['filterexists'] = 'on olemas';
+$labels['filternotexists'] = 'pole olemas';
+$labels['filterregex'] = 'vastab regulaaravaldisele';
+$labels['filternotregex'] = 'ei vasta regulaaravaldisele';
+$labels['filterunder'] = 'on vähem kui';
+$labels['filterover'] = 'on rohkem kui';
+$labels['filteradvoptions'] = 'rohkem valikuid';
+$labels['spamtest'] = 'Spammi tõenäosus';
+$labels['operator'] = 'Operaator';
+$labels['comparator'] = 'Komparaator';
+$labels['isgreaterthan'] = 'on suurem kui';
+$labels['isgreaterthanequal'] = 'on suurem või samaväärne ';
+$labels['islessthan'] = 'on vähem kui';
+$labels['islessthanequal'] = 'on vähem või võrdne kui';
+$labels['equals'] = 'on võrdne';
+$labels['notequals'] = 'ei ole võrdne';
+$labels['countisgreaterthan'] = 'arv on suurem kui';
+$labels['countisgreaterthanequal'] = 'arv on suurem või võrdne kui';
+$labels['countislessthan'] = 'arv on väiksem kui';
+$labels['countislessthanequal'] = 'arv on väiksem või võrdne kui';
+$labels['countequals'] = 'arv on võrdne';
+$labels['countnotequals'] = 'arv ei ole võrdne';
+$labels['valueisgreaterthan'] = 'väärtus on suurem kui';
+$labels['valueisgreaterthanequal'] = 'väärtus on suurem või võrdne kui';
+$labels['valueislessthan'] = 'väärtus on võiksem kui';
+$labels['valueislessthanequal'] = 'väärtus on väiksem või võrdne kui';
+$labels['valueequals'] = 'väärtus on võrdne';
+$labels['valuenotequals'] = 'väärtus ei ole võrdne';
+$labels['userpart'] = 'kasutajanimi (enne "@" või "+" märki) on võrdne';
+$labels['notuserpart'] = 'kasutajanimi (enne "@" või "+" märki) ei ole võrdne';
+$labels['detailpart'] = 'nime osa peale "+" märki on võrdne';
+$labels['notdetailpart'] = 'nime osa peale "+" märki ei ole võrdne';
+$labels['domainpart'] = 'domeeninimi (peale "@") on võrdne';
+$labels['notdomainpart'] = 'domeeninimi (peale "@") ei ole võrdne';
+$labels['teststring'] = 'Võrdle reaga';
+$labels['messagemoveto'] = 'Liiguta kiri';
+$labels['messageredirect'] = 'Suuna teisele aadressile';
+$labels['messageimapflags'] = 'Märgi kiri';
+$labels['messagereject'] = 'Keeldu';
+$labels['messagevacation'] = 'Saada kontorist väljas teade';
+$labels['messagekeep'] = 'Säilita kiri';
+$labels['messagediscard'] = 'Kustuta kiri ära';
+$labels['messagenotify'] = 'Saada teadaanne';
+$labels['messagestop'] = 'Lõpeta filtrite töö';
+$labels['messagehelp'] = 'Mis see on?';
+$labels['sieveorigsubj'] = 'Lisa originaal vastusele';
+$labels['sievevachandle'] = 'Käsitle';
+$labels['method'] = 'Meetod';
+$labels['options'] = 'Valikud';
+$labels['messagesrules'] = 'Filtri reeglid';
+$labels['messagesactions'] = 'Filtri toimingud';
+$labels['sievefrom'] = 'Saatja';
+$labels['flag'] = 'Tähtsus';
+$labels['importancen'] = 'Mitte ükski';
+$labels['importance1'] = 'Kõrge';
+$labels['importance2'] = 'Normaalne';
+
+$messages = array();
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/fi_FI.inc b/plugins/sieverules/localization/fi_FI.inc
new file mode 100644
index 000000000..9114f4adc
--- /dev/null
+++ b/plugins/sieverules/localization/fi_FI.inc
@@ -0,0 +1,186 @@
+<?php
+/* Author: Samu Juvonen */
+
+$labels = array();
+$labels['filters'] = 'Suotimet';
+$labels['managefilters'] = 'Hallitse viestisuotimia';
+$labels['filtername'] = 'Suotimen nimi';
+$labels['disablerule'] = 'Poista käytöstä';
+$labels['disabled'] = 'Ei käytössä';
+$labels['newfilter'] = 'Uusi suodin';
+$labels['moveup'] = 'Siirrä ylös';
+$labels['movedown'] = 'Siirrä alas';
+$labels['filterallof'] = 'täsmää kaikkiin sääntöihin';
+$labels['filteranyof'] = 'täsmää johonkin säännöistä';
+$labels['filterany'] = 'kaikki viestit';
+$labels['filtercontains'] = 'Sisältää';
+$labels['filternotcontains'] = 'Ei sisällä';
+$labels['filteris'] = 'Sama kuin';
+$labels['filterisnot'] = 'Ei ole sama kuin';
+$labels['filterexists'] = 'On olemassa';
+$labels['filternotexists'] = 'Ei ole olemassa';
+$labels['filterregex'] = 'Täsmää säännölliseen lausekkeeseen';
+$labels['filternotregex'] = 'Ei täsmää säännölliseen lausekkeeseen';
+$labels['filterunder'] = 'Vähemmän kuin';
+$labels['filterover'] = 'Enemmän kuin';
+$labels['filterbefore'] = 'Ennen';
+$labels['filterafter'] = 'Jälkeen';
+$labels['filteradvoptions'] = 'Lisää vaihtoehtoja...';
+$labels['spamtest'] = 'Spammin todennäköisyys';
+$labels['operator'] = 'Operaattori';
+$labels['comparator'] = 'Vertailu';
+$labels['isgreaterthan'] = 'Suurempi kuin';
+$labels['isgreaterthanequal'] = 'Suurempi tai yhtä suuri kuin';
+$labels['islessthan'] = 'Vähemmän kuin';
+$labels['islessthanequal'] = 'Vähemmän tai yhtä suuri kuin';
+$labels['equals'] = 'Yhtä suuri kuin';
+$labels['notequals'] = 'Ei ole yhtä suuri';
+$labels['countisgreaterthan'] = 'Lukumäärä suurempi';
+$labels['countisgreaterthanequal'] = 'Lukumäärä suurempi tai yhtä suuri';
+$labels['countislessthan'] = 'Lukumäärä pienempi';
+$labels['countislessthanequal'] = 'Lukumäärä pienempi tai yhtä suuri';
+$labels['countequals'] = 'Lukumäärä yhtä suuri';
+$labels['countnotequals'] = 'Lukumäärä erisuuri';
+$labels['valueisgreaterthan'] = 'Arvo suurempi';
+$labels['valueisgreaterthanequal'] = 'Arvo suurempi tai yhtä suuri';
+$labels['valueislessthan'] = 'Arvo pienempi';
+$labels['valueislessthanequal'] = 'Arvo pienempi tai yhtä suuri';
+$labels['valueequals'] = 'Arvo on yhtä suuri';
+$labels['valuenotequals'] = 'Arvo on eri suuri';
+$labels['userpart'] = 'Käyttäjäosa täsmää';
+$labels['notuserpart'] = 'Käyttäjäosa ei täsmää';
+$labels['detailpart'] = 'Lisätiedot täsmäävät';
+$labels['notdetailpart'] = 'Lisätiedot eivät täsmää';
+$labels['domainpart'] = 'Domain täsmää';
+$labels['notdomainpart'] = 'Domain ei täsmää';
+$labels['teststring'] = 'Verrattava arvo';
+$labels['messagemoveto'] = 'Siirrä viesti kansioon';
+$labels['messageredirect'] = 'Uudelleenohjaa osoitteeseen';
+$labels['messageimapflags'] = 'Vaihda viestin tila';
+$labels['messagereject'] = 'Hylkää viestillä';
+$labels['messagevacation'] = 'Poissaoloviesti';
+$labels['messagekeep'] = 'Säilytä viesti';
+$labels['messagediscard'] = 'Hylkää viesti';
+$labels['messagenotify'] = 'Lähetä ilmoitus';
+$labels['messagestop'] = 'Keskeytä suotimien suoritus';
+$labels['messagehelp'] = 'Mikä tämä on?';
+$labels['sieveorigsubj'] = 'Lisää alkuperäinen otsikko vastauksen loppuun';
+$labels['sievevachandle'] = 'Handle';
+$labels['method'] = 'Method';
+$labels['options'] = 'Asetukset';
+$labels['messagesrules'] = 'Suotimen säännöt';
+$labels['messagesactions'] = 'Suotimen toiminnot';
+$labels['sieveto'] = 'Aliakset';
+$labels['sievefrom'] = 'Lähettäjä';
+$labels['flag'] = 'Tärkeys';
+$labels['importancen'] = 'Ei mitään';
+$labels['importance1'] = 'Korkea';
+$labels['importance2'] = 'Tavallinen';
+$labels['importance3'] = 'Alhainen';
+$labels['flagread'] = 'Luettu';
+$labels['flagdeleted'] = 'Poistettu';
+$labels['flaganswered'] = 'Vastattu';
+$labels['flagdraft'] = 'Luonnos';
+$labels['flagflagged'] = 'Merkitty';
+$labels['addsieverule'] = 'Lisää uusi sääntö alle';
+$labels['addsieveact'] = 'Lisää uusi toiminto alle';
+$labels['deletesieverule'] = 'Poista sääntö';
+$labels['deletesieveact'] = 'Poista toiminto';
+$labels['envelopefrom'] = 'Lähettäjä (envelope)';
+$labels['envelopeto'] = 'Vastaanottaja (envelope)';
+$labels['otherheader'] = 'Muu otsikkotieto';
+$labels['days'] = 'Aikaväli';
+$labels['message'] = 'Viesti';
+$labels['sieveruleheaders'] = 'Katso esimerkkejä muista otsikkotiedoista';
+$labels['examplefilters'] = 'Esimerkkejä';
+$labels['importfilters'] = 'Tuo suotimet';
+$labels['usedefaultfilter'] = 'Käytä oletussuotimia';
+$labels['importfilter'] = 'Tuo suotimet';
+$labels['moreactions'] = 'Lisää asetuksia...';
+$labels['adveditor'] = 'Laajennettu editori';
+$labels['stdeditor'] = 'Tavallinen editori';
+$labels['messageredirectcopy'] = 'Lähetä kopio osoitteeseen';
+$labels['messagecopyto'] = 'Kopioi viesti kansioon';
+$labels['body'] = 'Viesti';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raaka';
+$labels['text'] = 'Teksti';
+$labels['other'] = 'Muu';
+$labels['bodycontentpart'] = 'Sisältöosa';
+$labels['spamnotchecked'] = 'Ei tarkistettu';
+$labels['spamlevelisgreaterthanequal'] = 'Korkeampi tai yhtä korkea kuin';
+$labels['spamlevelislessthanequal'] = 'Matalampi tai yhtä korkea kuin';
+$labels['spamlevelequals'] = 'Yhtä korkea';
+$labels['i;ascii-casemap'] = 'Kirjainkoosta riippumaton merkkijonovertailu';
+$labels['i;octet'] = 'Täydellinen merkkijonon vastaavuus';
+$labels['i;ascii-numeric'] = 'Numeerinen vastaavuus';
+$labels['selectruleset'] = 'Valitse säännöstö';
+$labels['activeruleset'] = '%s (aktiivinen)';
+$labels['activateruleset'] = 'Ota säännöstö käyttöön';
+$labels['newruleset'] = 'Luo uusi säännöstö';
+$labels['delruleset'] = 'Poista säännöstö';
+$labels['renameruleset'] = 'Nimeä säännöstö uudelleen';
+$labels['copy'] = 'Kopioi';
+$labels['copyexistingfilter'] = 'Kopioi nykyiset suotimet';
+$labels['copytoruleset'] = 'Kopioi suodin uuteen säännöstöön';
+$labels['copyfromruleset'] = 'Kopioi suotimia vanhasta säännöstöstä';
+$labels['time'] = 'Aika';
+$labels['weekday'] = 'Viikonpäivä';
+
+$messages = array();
+$messages['nosieverules'] = 'Suotimia ei löytynyt.';
+$messages['filterdeleteconfirm'] = 'Haluatko varmasti poistaa tämän suotimen?';
+$messages['ruledeleteconfirm'] = 'Haluatko varmasti poistaa tämän säännön?';
+$messages['actiondeleteconfirm'] = 'Haluatko varmasti poistaa tämän toiminnon?';
+$messages['filterunknownerror'] = 'Tuntematon palvelinvirhe';
+$messages['filterconnerror'] = 'Unable to connect to sieve server';
+$messages['filterdeleteerror'] = 'Palvelinvirhe. Suodinta ei poistettu.';
+$messages['filterdeleted'] = 'Suodin poistettu onnistuneesti';
+$messages['filtersaved'] = 'Suodin tallennettu onnistuneesti';
+$messages['filtersaveerror'] = 'Palvelinvirhe. Suodinta ei tallennettu.';
+$messages['vacdaysexp'] = 'Aikaväli on päivien määrä, jona aikana viestiä ei lähetetä samalle käyttäjälle välittämättä siitä, kuinka usein he ottavat sinuun yhteyttä.<br/><br/>Esimerkki: Jaakko lähettää sinulle sähköpostia maanantaina ja aikaväliksi on valittu 7 päivää. Jaakko saa poissaoloviestisi maanantaina, mutta jos hän lähettää sinulle samalla viikolla lisää viestejä, uutta ilmoitusta ei lähetetä ennen seuraavaa maanantaita.';
+$messages['vachandleexp'] = 'Ryhmittelyä voidaan käyttää yhdistämään eri poissaoloviestit toisiinsa. Kun yksi viesti on lähetetty, muita saman ryhmittelyn viestejä ei lähetetä kyseisen aikavälin aikana.';
+$messages['vactoexp'] = 'Lista muista vastaanottajien sähköpostiosoitteista, jotka liitetään automaattivastaukseen. Mikäli viestin vastaanottaja ei ole pääosoitteesi eikä löydy tältä listalta, mitään viestiä ei lähetetä.';
+$messages['vactoexp_adv'] = 'Erottele aliakset pilkulla (,). Esimerkki: testi1@esimerkki.fi,testi2@esimerkki.fi,testi3@esimerkki.fi';
+$messages['vactoexp_err'] = 'Virhe: aliakset tulee erotella pilkulla (,)';
+$messages['norulename'] = 'Anna suotimelle nimi';
+$messages['ruleexists'] = 'Tällä nimellä on jo suodin. Anna uusi nimi';
+$messages['noheader'] = 'Anna testattavan otsikkotiedon nimi';
+$messages['headerbadchars'] = 'Virhe: otsikkotiedossa on kiellettyjä merkkejä';
+$messages['noheadervalue'] = 'Anna arvo, jolla otsikkotietoa testataan';
+$messages['sizewrongformat'] = 'Virhe: viestin koon täytyy olla numeerinen';
+$messages['noredirect'] = 'Anna osoite, johon viestit ohjataan';
+$messages['redirectaddresserror'] = 'Virhe: osoite ei ole kelvollinen';
+$messages['noreject'] = 'Anna viesti, joka liitetään hylättyyn sähköpostiin';
+$messages['vacnodays'] = 'Ilmoita aikaväli (päivien määrä), jona samalle henkilölle ei lähetetä uutta viestiä.';
+$messages['vacdayswrongformat'] = 'Virhe: aikavälin täytyy olla suurempi tai yhtä suuri luku kuin 1';
+$messages['vacnomsg'] = 'Kirjoita viestiisi jotain sisältöä';
+$messages['notifynomethod'] = 'Määrittele metodi, jota käyttäen ilmoitus lähetetään.';
+$messages['notifynomsg'] = 'Kirjoita viestiisi jotain sisältöä';
+$messages['sieveruleexp'] = 'Määrittele yksi tai useampia sääntöjä, joihin jokaista viestiä testataan. Suotimet suoritetaan siinä järjestyksessä, jossa ne esiintyvät vasemmalla olevalla listalla. Kun jokin suotimista täsmää, loppuja suotimia ei suoriteta.';
+$messages['sieveruleexp_stop'] = 'Määrittele yksi tai useampia sääntöjä, joihin jokaista viestiä testataan. Suotimet suoritetaan siinä järjestyksessä, jossa ne esiintyvät vasemmalla olevalla listalla, kunnes keskeytyssääntö tavataan.';
+$messages['sieveactexp'] = 'Valitse jokin alla olevista vaihtoehdoista. Toiminnot suoritetaan kaikille viesteille, jotka täsmäävät yllä oleviin sääntöihin.';
+$messages['sieveheadershlp'] = 'Alla on esimerkkejä otsikkotiedoista, joita voidaan testata suotimilla. Valitse jokin otsikkotieto listasta tai määrittele muu otsikkotieto yllä olevaan kenttään.';
+$messages['movingfilter'] = 'Siirretään suodinta...';
+$messages['noexistingfilters'] = 'Suotimia ei löytynyt!';
+$messages['importdefault'] = '<b>Käytä oletussuotimia:</b> Suotimia on saatavilla. Haluatko käyttää näitä suotimia?';
+$messages['importother'] = '<b>Tuo suotimia:</b> Suotimia löydettiin palvelusta %s. Haluatko lisätä nämä suotimet nykyisiin suotimiin?';
+$messages['switchtoadveditor'] = 'Laajennetulla editorilla voit muokata seulatiedostoa suoraan. Tehdyt muutokset eivät välttämättä ole luettavissa tavallisessa editorissa ja saattavat hävitä, jos suotimia muokataan tavallisella editorilla. Haluatko jatkaa?';
+$messages['filterimported'] = 'Suodin lisätty onnistuneesti';
+$messages['filterimporterror'] = 'Palvelinvirhe. Suotimia ei lisätty';
+$messages['notifyinvalidmethod'] = 'Metodi ei ole kelvollisessa muodossa. Sen täytyy olla osoite. Esimerkki: mailto:virhe@esimerkki.fi';
+$messages['nobodycontentpart'] = 'Anna testattava sisältöosa';
+$messages['badoperator'] = 'Valitsemaasi operaattoria ei voida käyttää tässä säännössä';
+$messages['filteractionerror'] = 'Palvelin ei tue valitsemaasi toimintoa';
+$messages['filtermissingerror'] = 'Valittua sääntöä ei löytynyt';
+$messages['contentpartexp'] = 'MIME-tyyppi tai tietty viestin osa, jota testataan. Esimerkki: "message/rfc822", "text/html", "audio/mp3" tai "image"';
+$messages['delrulesetconf'] = 'Haluatko varmasti poistaa tämän säännöstön?';
+$messages['rulesetexists'] = 'Tällä nimellä on jo säännöstö. Anna uusi nimi';
+$messages['copyexisting'] = '<b>Kopioi säännöstö:</b> Haluatko kopioida toisen säännöstön nykyisiin sääntöihisi?';
+$messages['filtercopied'] = 'Suodin kopioitu onnistuneesti';
+$messages['nosieverulesets'] = 'Säännöstöä ei löytynyt.';
+$messages['baddateformat'] = 'Virhe: anna päivämäärä muodossa VVVV-KK-PP';
+$messages['badtimeformat'] = 'Virhe: anna aika muodossa TT:MM:SS';
+$messages['missingfoldername'] = 'Virhe: anna kansiolle nimi';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/fr_FR.inc b/plugins/sieverules/localization/fr_FR.inc
new file mode 100644
index 000000000..fb9f6d430
--- /dev/null
+++ b/plugins/sieverules/localization/fr_FR.inc
@@ -0,0 +1,185 @@
+<?php
+/* Author: Aymeric Peuch */
+
+$labels = array();
+$labels['filters'] = 'Filtres';
+$labels['managefilters'] = 'Gestion des filtres sur les mails entrants';
+$labels['filtername'] = 'Nom du filtre';
+$labels['disablerule'] = 'Désactiver le filtre';
+$labels['disabled'] = 'Désactivé';
+$labels['newfilter'] = 'Nouveau filtre';
+$labels['moveup'] = 'Monter';
+$labels['movedown'] = 'Descendre';
+$labels['filterallof'] = 'valident toutes les conditions suivantes';
+$labels['filteranyof'] = 'valident au moins une des conditions suivantes';
+$labels['filterany'] = 'tous les messages';
+$labels['filtercontains'] = 'contient';
+$labels['filternotcontains'] = 'ne contient pas';
+$labels['filteris'] = 'est';
+$labels['filterisnot'] = 'n\'est pas';
+$labels['filterexists'] = 'existe';
+$labels['filternotexists'] = 'n\'existe pas';
+$labels['filterregex'] = 'valide l\'expression régulière';
+$labels['filternotregex'] = 'ne valide pas l\'expression régulière';
+$labels['filterunder'] = 'est inférieur à';
+$labels['filterover'] = 'est supérieur à';
+$labels['filterbefore'] = 'antérieur(e) à';
+$labels['filterafter'] = 'postérieur(e) à';
+$labels['filteradvoptions'] = 'plus d\'options...';
+$labels['spamtest'] = 'Probabilité de spam';
+$labels['operator'] = 'Opérateur';
+$labels['comparator'] = 'Comparateur';
+$labels['isgreaterthan'] = 'plus grande que';
+$labels['isgreaterthanequal'] = 'plus grande ou égale à';
+$labels['islessthan'] = 'plus petite que';
+$labels['islessthanequal'] = 'plus petite ou égale à';
+$labels['equals'] = 'est égale à';
+$labels['notequals'] = 'n\'est pas égale à';
+$labels['countisgreaterthan'] = 'longueur plus grande que';
+$labels['countisgreaterthanequal'] = 'longueur plus grande ou égale à';
+$labels['countislessthan'] = 'longueur plus petite que';
+$labels['countislessthanequal'] = 'longueur plus petite ou égale à';
+$labels['countequals'] = 'longueur est égale à';
+$labels['countnotequals'] = 'longueur n\'est pas égale à';
+$labels['valueisgreaterthan'] = 'valeur plus grande que';
+$labels['valueisgreaterthanequal'] = 'valeur plus grande ou égale à';
+$labels['valueislessthan'] = 'valeur plus petite que';
+$labels['valueislessthanequal'] = 'valeur plus petite ou égale à';
+$labels['valueequals'] = 'valeur est égale à';
+$labels['valuenotequals'] = 'valeur n\'est pas égale à';
+$labels['userpart'] = 'partie utilisateur égale à';
+$labels['notuserpart'] = 'partie utilisateur n\'est pas égale à';
+$labels['detailpart'] = 'partie détaillée égale à';
+$labels['notdetailpart'] = 'partie détaillée n\'est pas égale à';
+$labels['domainpart'] = 'partie domaine égale à';
+$labels['notdomainpart'] = 'partie domaine n\'est pas égale à';
+$labels['teststring'] = 'Chaîne de test';
+$labels['messagemoveto'] = 'Déplacer le message vers';
+$labels['messageredirect'] = 'Rediriger le message à';
+$labels['messageimapflags'] = 'Marquer le message comme';
+$labels['messagereject'] = 'Rejeter le message';
+$labels['messagevacation'] = 'Message d\'absence';
+$labels['messagekeep'] = 'Garder le message';
+$labels['messagediscard'] = 'Refuser le message';
+$labels['messagenotify'] = 'Envoyer la notification';
+$labels['messagestop'] = 'Arrêter les filtres en cours';
+$labels['messagehelp'] = 'Qu\'est-ce que c\'est ?';
+$labels['sieveorigsubj'] = 'Ajouter le sujet original à la réponse';
+$labels['sievevachandle'] = 'Traiter';
+$labels['method'] = 'Méthode';
+$labels['options'] = 'Options';
+$labels['messagesrules'] = 'Règles du filtre';
+$labels['messagesactions'] = 'Actions du filtre';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'De';
+$labels['flag'] = 'Importance';
+$labels['importancen'] = 'Aucune';
+$labels['importance1'] = 'Haute';
+$labels['importance2'] = 'Normale';
+$labels['importance3'] = 'Basse';
+$labels['flagread'] = 'Lu';
+$labels['flagdeleted'] = 'Supprimé';
+$labels['flaganswered'] = 'Répondu';
+$labels['flagdraft'] = 'Brouillon';
+$labels['flagflagged'] = 'Suivi';
+$labels['addsieverule'] = 'Ajouter une autre règle en dessous de celle-ci';
+$labels['addsieveact'] = 'Ajouter une autre action en dessous de celle-ci';
+$labels['deletesieverule'] = 'Effacer cette règle';
+$labels['deletesieveact'] = 'Effacer cette action';
+$labels['envelopefrom'] = 'Enveloppe De';
+$labels['envelopeto'] = 'Enveloppe Pour';
+$labels['otherheader'] = 'Autre entête';
+$labels['days'] = 'Période';
+$labels['message'] = 'Message';
+$labels['sieveruleheaders'] = 'Voir des exemples d\'autres entêtes';
+$labels['examplefilters'] = 'Exemple de filtres';
+$labels['importfilters'] = 'Importer des filtres';
+$labels['usedefaultfilter'] = 'Utiliser les filtres par défaut';
+$labels['importfilter'] = 'Importer des filtres';
+$labels['moreactions'] = 'Plus d\'options';
+$labels['adveditor'] = 'Editeur avancé';
+$labels['stdeditor'] = 'Editeur par défaut';
+$labels['messageredirectcopy'] = 'Envoyé une copie à';
+$labels['messagecopyto'] = 'Copier le message vers';
+$labels['body'] = 'Corps';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Brut';
+$labels['text'] = 'Texte';
+$labels['other'] = 'Autre';
+$labels['bodycontentpart'] = 'Contenu';
+$labels['notchecked'] = 'non coché';
+$labels['spamlevelisgreaterthanequal'] = 'plus grande ou égale à';
+$labels['spamlevelislessthanequal'] = 'plus petite ou égale à';
+$labels['spamlevelequals'] = 'est égale à';
+$labels['i;ascii-casemap'] = 'insensible à la casse';
+$labels['i;octet'] = 'correspondance exacte';
+$labels['i;ascii-numeric'] = 'correspondance numérique';
+$labels['selectruleset'] = 'Sélectionner un groupe de règles';
+$labels['activeruleset'] = '%s (actif)';
+$labels['activateruleset'] = 'Activer ce groupe de règles';
+$labels['newruleset'] = 'Créer un nouveau groupe de règles';
+$labels['delruleset'] = 'Effacer ce groupe de règles';
+$labels['renameruleset'] = 'Renomer ce groupe de règles';
+$labels['copy'] = 'Copier';
+$labels['copyexistingfilter'] = 'Copier les filtres éxistants';
+$labels['copytoruleset'] = 'Copier le filtre dans un autre groupe de règles';
+$labels['copyfromruleset'] = 'Copier des filtres depuis un autre groupe de règles';
+$labels['time'] = 'Heure';
+$labels['weekday'] = 'Jour de la semaine';
+
+$messages = array();
+$messages['nosieverules'] = 'Aucun filtre trouvé.';
+$messages['filterdeleteconfirm'] = 'Etes-vous sûr de vouloir effacer ce filtre ?';
+$messages['ruledeleteconfirm'] = 'Etes-vous sûr de vouloir effacer cette règle ?';
+$messages['actiondeleteconfirm'] = 'Etes-vous sûr de vouloir effacer cette action ?';
+$messages['filterunknownerror'] = 'Erreur serveur inconnue';
+$messages['filterconnerror'] = 'Impossible de se connecter au serveur sieve';
+$messages['filterdeleteerror'] = 'Impossible de supprimer le filtre. Une erreur serveur a eu lieu';
+$messages['filterdeleted'] = 'Suppression du filtre effectuée.';
+$messages['filtersaved'] = 'Sauvegarde du filtre effectuée.';
+$messages['filtersaveerror'] = 'Impossible d\'enregistrer le filtre. Une erreur serveur a eu lieu';
+$messages['vacdaysexp'] = 'La période est le nombre de jours pendant lesquels le message ne sera pas renvoyé à l\'utilisateur, peu importe le nombre de fois où il vous contacte. <br /> <br /> Par exemple: Si Joe vous contacte le lundi et la période est définie à 7, alors Joe va recevoir un message d\'absence du bureau le lundi, mais n\'en aura pas de nouveaux avant le lundi suivant, peu importe le nombre d\'emails qu\'il envoie au cours de la semaine.';
+$messages['vachandleexp'] = 'Un traitement peut être utilisé pour lier différents messages d\'absence ensemble ; une fois qu\'un message a été envoyé, aucun autre message autre avec le même traitement sera renvoyé durant la période.';
+$messages['vactoexp'] = 'Liste de destinataires supplémentaires qui sont inclus dans l\'auto réponse. Si le destinataire de l\'email n\'est pas votre adresse principale et qu\'elle n\'est pas dans la liste, aucun message ne sera envoyé.';
+$messages['vactoexp_adv'] = 'Séparez plusieurs adresses avec une virgule (,). Par exemple: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Erreur: Plusieurs adresses doivent être séparées par une virgule (,)';
+$messages['norulename'] = 'Veuillez entrer un nom pour le filtre';
+$messages['ruleexists'] = 'Un filtre avec le même nom existe déjà. Veuillez en choisir un autre';
+$messages['noheader'] = 'Veuillez entrer le nom de l\'entête à tester';
+$messages['headerbadchars'] = 'Erreur : L\'entête contient des caractères interdits.';
+$messages['noheadervalue'] = 'Veuillez entrer une valeur à tester pour l\'entête';
+$messages['sizewrongformat'] = 'Erreur : La taile du message doit être un nombre';
+$messages['noredirect'] = 'Veuillez entrer une adresse email pour la redirection du message';
+$messages['redirectaddresserror'] = 'Erreur : L\'adresse email semble invalide';
+$messages['noreject'] = 'Veuillez entrer un message à envoyer pour les emails rejetés';
+$messages['vacnodays'] = 'Veuillez entrer un nombre de jours pour la période durant laquelle le message ne sera pas renvoyé à la même personne.';
+$messages['vacdayswrongformat'] = 'Erreur : La période doit être un nombre supérieir à 1';
+$messages['vacnomsg'] = 'Veuillez entrer du texte pour votre message';
+$messages['notifynomethod'] = 'Veuillez entrer la méthode par laquellela notification doit être envoyé';
+$messages['notifynomsg'] = 'veuillez entrer du texte pour votre message';
+$messages['sieveruleexp'] = 'Veuillez définir une ou plusieurs règles pour le filtre. Les filtres sont exécutés dans l\'ordre dans lequel ils apparaissent sur la gauche de l\'écran. Si un filtre est exécuté, plus aucun autre filtre ne sera testé.';
+$messages['sieveruleexp_stop'] = 'Veuillez définir une ou plusieurs règles pour le filtre. Les filtres sont exécutés dans l\'ordre dans lequel ils apparaissent sur la gauche de l\'écran, et ce, jusqu\'à ce qu\'une action d\'arrêt des filtres soit exécutée.';
+$messages['sieveactexp'] = 'Veuillez définir une ou plusieurs actions ci-dessous. Ces actions seront exécutés pour chaque message qui correspondra au règles ci-dessus.';
+$messages['sieveheadershlp'] = 'Voici ci-dessous une liste d\'exemple d\'entête que vous pouvez utilisez dans votre règle. Sélectionnez-en une pour l\'ajouter à la règle ou entrez-en une manuellement dans le champs texte ci-dessous.';
+$messages['movingfilter'] = 'Déplacement du filtre...';
+$messages['noexistingfilters'] = 'Aucun filtre détecté!';
+$messages['importdefault'] = '<b>Utiliser les filtres par défaut : </b>Il y a des filtres disponibles. Voulez-vous utiliser ces filtres ?';
+$messages['importother'] = '<b>Importer des filtres : </b>Un autre set de filtres de %s a été trouvé. Voulez-vous importer ces filtres dans votre profil ?';
+$messages['switchtoadveditor'] = 'Changer pour l\'éditeur avancé vous permet de modifier le fichier sieve directement. Tout changement ici peut le rendre illisible pour l\'édteur normal et peut être perdu quand les filtres sont enregistré avec l\'édteur normal. Voulez-vous continuer ?';
+$messages['filterimported'] = 'Importation des filtres effectuée.';
+$messages['filterimporterror'] = 'Impossible d\'importer les filtres. Une erreur serveur a eu lieu';
+$messages['notifyinvalidmethod'] = 'La méthode ne semble pas être écrite dans un format valide, elle doit être une URI. Par exemple : \'mailto:alert@exemple.com\'';
+$messages['nobodycontentpart'] = 'Veuillez entrer un contenu à tester';
+$messages['badoperator'] = 'Désolé, l\'opérateur que vous avez sélectionner ne peut pas être utilisé pour cette règle';
+$messages['filteractionerror'] = 'L\'action demandée n\'est pas supportée par le serveur';
+$messages['filtermissingerror'] = 'Impossible de trouver la règle demandée';
+$messages['contentpartexp'] = 'Le MIME-type our la partie spécifique du message qui doit être testé. Par exemple : `message/rfc822`, `text/html`, `audio/mp3` ou `image`.';
+$messages['delrulesetconf'] = 'Êtes vous sûr de vouloir effacer ce groupe de règles ?';
+$messages['rulesetexists'] = 'Un groupe de règles porte déjà ce nom. Veuillez en choisir un autre.';
+$messages['copyexisting'] = '<b>Copie d\'un groupe de règles éxistant :</b> Voulez vous copier les filtres d\'un groupe de règles éxistant dans le groupe courant ?';
+$messages['filtercopied'] = 'Filtre copié avec succès';
+$messages['nosieverulesets'] = 'Aucun groupe de règles trouvé.';
+$messages['baddateformat'] = 'Erreur: Veuillez entrer une date sous la forme AAAA-MM-JJ';
+$messages['badtimeformat'] = 'Erreur: Veuillez entrer une heure sous la forme HH:MM:SS';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/hu_HU.inc b/plugins/sieverules/localization/hu_HU.inc
new file mode 100644
index 000000000..21addfbcf
--- /dev/null
+++ b/plugins/sieverules/localization/hu_HU.inc
@@ -0,0 +1,171 @@
+<?php
+/* Author: Tamas P */
+
+$labels = array();
+$labels['filters'] = 'Szűrők';
+$labels['managefilters'] = 'Szűrők kezelése';
+$labels['filtername'] = 'Szűrő neve';
+$labels['disablerule'] = 'Szabály kikapcsolása';
+$labels['disabled'] = 'Kikapcsolva';
+$labels['newfilter'] = 'Új szűrő';
+$labels['moveup'] = 'Fennebb';
+$labels['movedown'] = 'Lennebb';
+$labels['filterallof'] = 'illeszkedik az összes következő szabályra';
+$labels['filteranyof'] = 'illeszkedik valamely szabályra';
+$labels['filterany'] = 'összes üzenet';
+$labels['filtercontains'] = 'tartalmazza';
+$labels['filternotcontains'] = 'nem tartalmazza';
+$labels['filteris'] = 'egyenlő';
+$labels['filterisnot'] = 'nem egyenlő';
+$labels['filterexists'] = 'létezik';
+$labels['filternotexists'] = 'nem létezik';
+$labels['filterregex'] = 'illeszkedik reguláris kifejezésre';
+$labels['filternotregex'] = 'nem illeszkedik reguláris kifejezésre';
+$labels['filterunder'] = 'kevesebb mint';
+$labels['filterover'] = 'több mint';
+$labels['filteradvoptions'] = 'több beállítás...';
+$labels['spamtest'] = 'Spam valószínűség';
+$labels['operator'] = 'számítás';
+$labels['comparator'] = 'Összehasonlító';
+$labels['isgreaterthan'] = 'nagyobb mint';
+$labels['isgreaterthanequal'] = 'nagyobb vagy egyenlő';
+$labels['islessthan'] = 'kissebb mint';
+$labels['islessthanequal'] = 'kissebb vagy egyenlő';
+$labels['equals'] = 'egyenlő';
+$labels['notequals'] = 'nem egyenlő';
+$labels['countisgreaterthan'] = 'számítás nagyobb mint';
+$labels['countisgreaterthanequal'] = 'számítás nagyobb vagy egyenlő';
+$labels['countislessthan'] = 'számítás kissebb mint';
+$labels['countislessthanequal'] = 'számítás kissebb vagy egyenlő';
+$labels['countequals'] = 'számítás egyenlő';
+$labels['countnotequals'] = 'számítás nem egyenlő';
+$labels['valueisgreaterthan'] = 'érték nagyobb mint';
+$labels['valueisgreaterthanequal'] = 'érték nagyobb vagy egyenlő';
+$labels['valueislessthan'] = 'érték kissebb mint';
+$labels['valueislessthanequal'] = 'érték kissebb vagy egyenlő';
+$labels['valueequals'] = 'érték egyenlő';
+$labels['valuenotequals'] = 'érték nem egyenlő';
+$labels['userpart'] = 'felhasználó része egyenlő';
+$labels['notuserpart'] = 'felhasználó része nem egyenlő';
+$labels['detailpart'] = 'részlet része egyenlő';
+$labels['notdetailpart'] = 'részlet része nem egyenlő';
+$labels['domainpart'] = 'domain része egyenlő';
+$labels['notdomainpart'] = 'domain része nem egyenlő';
+$labels['teststring'] = 'Teszt szöveg';
+$labels['messagemoveto'] = 'Üzenet áthelyezése';
+$labels['messageredirect'] = 'Üzenet átirányítása';
+$labels['messageimapflags'] = 'Megjelőlés mint';
+$labels['messagereject'] = 'Elutasítás, üzenettel';
+$labels['messagevacation'] = 'Irodán kivűl üzenet';
+$labels['messagekeep'] = 'Megtartás';
+$labels['messagediscard'] = 'Üzenet eldobása';
+$labels['messagenotify'] = 'Értesítés küldése';
+$labels['messagestop'] = 'Szűrők feldolgozásának leállítása';
+$labels['messagehelp'] = 'Mi ez?';
+$labels['sieveorigsubj'] = 'Az eredeti tárgy hozzáfűzése a válaszhoz';
+$labels['sievevachandle'] = 'Kezel';
+$labels['method'] = 'Módszer';
+$labels['options'] = 'Feltételek';
+$labels['messagesrules'] = 'Szűrő szabályok';
+$labels['messagesactions'] = 'Szűrő akció';
+$labels['sieveto'] = 'Aliaszok';
+$labels['sievefrom'] = 'Feladó';
+$labels['flag'] = 'Jelőlés';
+$labels['importancen'] = 'Egyik sem';
+$labels['importance1'] = '1';
+$labels['importance2'] = '2';
+$labels['importance3'] = '3';
+$labels['flagread'] = 'Olvasott';
+$labels['flagdeleted'] = 'Törölt';
+$labels['flaganswered'] = 'Megválaszolt';
+$labels['flagdraft'] = 'Piszkozat';
+$labels['flagflagged'] = 'Megjelőlve';
+$labels['addsieverule'] = 'Új szabály hozzáadása, ez alá';
+$labels['addsieveact'] = 'Új akció hozzáadása, ez alá';
+$labels['deletesieverule'] = 'Szabály törlése';
+$labels['deletesieveact'] = 'Akció törlése';
+$labels['envelopefrom'] = 'Boríték, Küldő';
+$labels['envelopeto'] = 'Boríték, Cimzett';
+$labels['otherheader'] = 'Más fejléc';
+$labels['days'] = 'Időszak';
+$labels['message'] = 'Üzenet';
+$labels['sieveruleheaders'] = 'Fejléc minták megtekintése';
+$labels['examplefilters'] = 'Szűrő minták';
+$labels['importfilters'] = 'Szűrők importálása';
+$labels['usedefaultfilter'] = 'Alapértelmezett szűrők használata';
+$labels['importfilter'] = 'Szűrők importálása';
+$labels['moreactions'] = 'Tobábbi opciók...';
+$labels['adveditor'] = 'Haladó szerkesztő';
+$labels['stdeditor'] = 'Egyszerű szerkesztő';
+$labels['messageredirectcopy'] = 'Másolat küldése';
+$labels['auto'] = 'Auto';
+$labels['text'] = 'Szöveg';
+$labels['other'] = 'Egyéb';
+$labels['spamlevelisgreaterthanequal'] = 'nagyobb vagy egyenlő';
+$labels['spamlevelislessthanequal'] = 'kissebb vagy egyenlő';
+$labels['spamlevelequals'] = 'egyenlő';
+$labels['i;ascii-casemap'] = 'kis/nagybetű nem számít';
+$labels['i;octet'] = 'pontos egyezés';
+$labels['selectruleset'] = 'Szabálycsoport kiválasztása';
+$labels['activateruleset'] = 'Szabálycsoport aktiválása';
+$labels['newruleset'] = 'Új szabálycsoport létrehozása';
+$labels['delruleset'] = 'Szabálycsoport törlése';
+$labels['renameruleset'] = 'Szabálycsoport átnevezése';
+$labels['copy'] = 'Másol';
+$labels['copyexistingfilter'] = 'Létező szűrők másolása';
+$labels['copytoruleset'] = 'Szűrő másolása másik szabálycsoportba';
+$labels['copyfromruleset'] = 'Szűrő(k) másolása másik szabálycsoportból';
+$labels['time'] = 'Idő';
+$labels['weekday'] = 'Hétköznap';
+
+$messages = array();
+$messages['nosieverules'] = 'Nem található szűrő';
+$messages['filterdeleteconfirm'] = 'Biztosan törölni akarod ezt a szűrőt?';
+$messages['ruledeleteconfirm'] = 'Biztosan törölni akarod ezt a szabályt?';
+$messages['actiondeleteconfirm'] = 'Biztosan törölni akarod ezt az akciót?';
+$messages['filterunknownerror'] = 'Ismeretlen szerverhiba';
+$messages['filterconnerror'] = 'Nem sikerült kapcsolódni a sieve szerverhez';
+$messages['filterdeleteerror'] = 'Nem lehet törölni a szűrőt. Szerver hiba';
+$messages['filterdeleted'] = 'A szűrő sikeresen törölve';
+$messages['filtersaved'] = 'Szűrő elmentve';
+$messages['filtersaveerror'] = 'Nem sikerült elmenteni a szűrőt. Szerver hiba';
+$messages['vacdaysexp'] = 'Az dőszak, azon napok száma míg egy üzenet nem lesz újraküldve ugyanannak a címzettnek, függetlenül attól hányszolt lépett önnel kapcsolatba.<br /><br />Pédául: Ha János üzenetet küld Hétfőn és az időszak 7, válaszul kap egy Irodán kívül üzenetet ami nem lesz neki újraküldve a következő Hétfőig, bármennyi üzenetet is küld János ebben az időszakban.';
+$messages['vachandleexp'] = 'A mutató arra használható, hogy összekapcsoljon külömböző Irodán kívül üzeneteket. Ha egy ilyen üzenet el lett küldve, másik ilyen mutatóju üzenet nem lesz elküldve megadott időszakban';
+$messages['vactoexp'] = 'A többi címzett listája akiknek az automatikus válasz el lesz küldve. Ha egy címzett nem a fő cím én nincs ebben a listában, nem lesz neki üzenet küldve.';
+$messages['vactoexp_adv'] = 'Több álnevet vesszővel (,) lehet elválasztani. Pl. teszt1@pelda.hu, teszt2@pelda.hu, teszt3@pelda.hu';
+$messages['vactoexp_err'] = 'Hiba! Több álnév esetén vesszőt (,) kell használni';
+$messages['norulename'] = 'Irjon be egy nevet a szűrőnek';
+$messages['ruleexists'] = 'Ez a szűrőnév már létezik. Kérem irjon be másikat';
+$messages['noheader'] = 'Kérem irja be a fejléc nevét a teszthez';
+$messages['headerbadchars'] = 'Hiba: A fejléc illegális karaktert tartalmaz';
+$messages['noheadervalue'] = 'Kérem irjon be egy értéket a fejléc teszteléséhez';
+$messages['sizewrongformat'] = 'Hiba: az üzenet mérete szám kell legyen';
+$messages['noredirect'] = 'Kérem irjon be egy e-mail címet az átirányításhoz';
+$messages['redirectaddresserror'] = 'Hiba: A cím nem megfelelő';
+$messages['noreject'] = 'Írja be az üzenetet amit válaszolni szeretne a visszadobott üzenetre';
+$messages['vacnodays'] = 'Írja be a napok számát arra az időszakra mig az üzenet nem lesz újraküldve ugyanannak a címzettnek';
+$messages['vacdayswrongformat'] = 'Hiba: az időszak 1-nél nagyobb vagy egyenlő lehet';
+$messages['vacnomsg'] = 'Írja be az üzenet szövegét';
+$messages['notifynomethod'] = 'Írja be a módszert, melyel az értesitést eloküldjük';
+$messages['notifynomsg'] = 'Írja be az üzenet szövegét';
+$messages['sieveruleexp'] = 'Kérem határozzon meg egy vagy több szabályt mellyel az üzenetek szelve lesznek. A szűrők olyan sorrendben futnak le, ahogyan megjelennek a baloldalon. Ha egy szűrőnek megfelel az üzenet, több szűrő nem hajtodik végre.';
+$messages['sieveactexp'] = 'Kérem válasszon a következő lehetőségekből. ezek minden üzenetnre végrehajtódnak, melyek megfelelnek a szabálynak.';
+$messages['sieveheadershlp'] = 'Alább néhány példa más fejlécre melyek tesztelhetőek a szűrőkkel. Válassza ki a fejlécet, adja hozzá a szűrőhőz vagy írjon be egyénit az alábbi szövegmezőbe.';
+$messages['movingfilter'] = 'Szűrő áthelyezése...';
+$messages['noexistingfilters'] = 'Nem találhatók szűrők';
+$messages['importdefault'] = '<b>Alapértelmezett szűrők használata:</b> Alapértelmezett szűrők léteznek. Szeretné használni ezeket a szűrőket?';
+$messages['importother'] = '<b>Szűrők importálása:</b> Egy másik szűrőcsoport %s től létezik. Be szeretné tölteni ezt a szűrőcsoportot?';
+$messages['switchtoadveditor'] = 'ÿtváltás halado szerkesztőre, mellyel Ön direktbe szerkesztheti a sieve fájlt. Az itt végzett változtatások nem lesznek olvashatóak a norlál szerkesztöben és elvesznek ha a szűrők mentésre kerülnek a normál szerkesztőben. Szeretné folytatni?';
+$messages['filterimported'] = 'A szűrő sikeresen importálva';
+$messages['filterimporterror'] = 'Nem sikerült a szűrő importálása. Szerver hiba';
+$messages['filteractionerror'] = 'A kért műveletet nem támogatja a szerver';
+$messages['filtermissingerror'] = 'Nem találom a keresett szabályt';
+$messages['delrulesetconf'] = 'Biztosan törölni szeretné ezt a szabálycsoportot?';
+$messages['rulesetexists'] = 'Már létezik ilyen nevű szabálycsoport. Írjon be másikat!';
+$messages['filtercopied'] = 'Szűrő sikeresen átmásolva';
+$messages['nosieverulesets'] = 'Nincs ilyen szabálycsoport.';
+$messages['baddateformat'] = 'Hiba: a dátumot ÉÉÉÉ-HH-NN formátumban kell megadni.';
+$messages['badtimeformat'] = 'Hiba: az időt ÓÓ:PP:MP fromátumban kell megadni';
+$messages['missingfoldername'] = 'Hiba! Írjon be egy mappanevet.';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/it_IT.inc b/plugins/sieverules/localization/it_IT.inc
new file mode 100644
index 000000000..a5a7bc484
--- /dev/null
+++ b/plugins/sieverules/localization/it_IT.inc
@@ -0,0 +1,202 @@
+<?php
+/* Author: Alessio Cecchi */
+
+$labels = array();
+$labels['filters'] = 'Filtri';
+$labels['managefilters'] = 'Gestisci filtri';
+$labels['filtername'] = 'Nome del filtro';
+$labels['disablerule'] = 'Disabilita regola';
+$labels['disabled'] = 'Disabilitata';
+$labels['newfilter'] = 'Nuovo filtro';
+$labels['moveup'] = 'Muovi su';
+$labels['movedown'] = 'Muovi giù';
+$labels['filterallof'] = 'soddisfa tutte le seguenti regole';
+$labels['filteranyof'] = 'soddisfa una qualunque delle seguenti regole';
+$labels['filterany'] = 'tutti i messaggi';
+$labels['filtercontains'] = 'contiene';
+$labels['filternotcontains'] = 'non contiene';
+$labels['filteris'] = 'è uguale a';
+$labels['filterisnot'] = 'non è uguale a';
+$labels['filterexists'] = 'esiste';
+$labels['filternotexists'] = 'non esiste';
+$labels['filterregex'] = 'soddisfa espressione regolare';
+$labels['filternotregex'] = 'non soddisfa espressione regolare';
+$labels['filterunder'] = 'è minore di';
+$labels['filterover'] = 'è maggiore di';
+$labels['filterbefore'] = 'prima';
+$labels['filterafter'] = 'dopo';
+$labels['filteradvoptions'] = 'altre opzioni...';
+$labels['spamtest'] = 'Probabilità Spam';
+$labels['operator'] = 'Operatore';
+$labels['comparator'] = 'Comparatore';
+$labels['isgreaterthan'] = 'è maggiore di';
+$labels['isgreaterthanequal'] = 'è maggiore o uguale a';
+$labels['islessthan'] = 'è minore di';
+$labels['islessthanequal'] = 'è minore o uguale a';
+$labels['equals'] = 'è uguale a';
+$labels['notequals'] = 'è diverso da';
+$labels['countisgreaterthan'] = 'numero di occorrenze maggiore di';
+$labels['countisgreaterthanequal'] = 'numero di occorrenze maggiore o uguale a';
+$labels['countislessthan'] = 'numero di occorrenze minore di';
+$labels['countislessthanequal'] = 'numero di occorrenze minore o uguale a';
+$labels['countequals'] = 'numero di occorrenze uguale a';
+$labels['countnotequals'] = 'numero di occorrenze diverso da';
+$labels['valueisgreaterthan'] = 'valore maggiore di';
+$labels['valueisgreaterthanequal'] = 'valore maggiore o uguale a';
+$labels['valueislessthan'] = 'valore minore di';
+$labels['valueislessthanequal'] = 'valore minore o uguale a';
+$labels['valueequals'] = 'valore uguale a';
+$labels['valuenotequals'] = 'valore diverso da';
+$labels['userpart'] = 'parte utente dell\'indirizzo uguale a';
+$labels['notuserpart'] = 'parte utente dell\'indirizzo diversa da';
+$labels['detailpart'] = 'parte del dettaglio dell\'indirizzo uguale a';
+$labels['notdetailpart'] = 'parte del dettaglio dell\'indirizzo diverso da';
+$labels['domainpart'] = 'dominio uguale a';
+$labels['notdomainpart'] = 'dominio diverso da';
+$labels['teststring'] = 'Stringa di test';
+$labels['messagemoveto'] = 'Sposta il messaggio in';
+$labels['messageredirect'] = 'Reindirizza il messaggio in';
+$labels['messageimapflags'] = 'Contrassegna il messaggio come';
+$labels['messagereject'] = 'Respingi con il seguente messaggio';
+$labels['messagevacation'] = 'Messaggio di assenza';
+$labels['messagekeep'] = 'Conserva il messaggio';
+$labels['messagediscard'] = 'Scarta il messaggio';
+$labels['messagenotify'] = 'Invia notifica';
+$labels['messagestop'] = 'Smetti di processare i filtri';
+$labels['messagehelp'] = 'Cos\'è questo?';
+$labels['sieveorigsubj'] = 'Appendi l\'oggetto originale alla risposta';
+$labels['sievevachandle'] = 'Gestisci';
+$labels['method'] = 'Metodo';
+$labels['options'] = 'Opzioni';
+$labels['messagesrules'] = 'Regole del filtro';
+$labels['messagesactions'] = 'Azioni del filtro';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'Da';
+$labels['flag'] = 'Importanza';
+$labels['importancen'] = 'Nessuna';
+$labels['importance1'] = 'Alta';
+$labels['importance2'] = 'Normale';
+$labels['importance3'] = 'Bassa';
+$labels['flagread'] = 'Letto';
+$labels['flagdeleted'] = 'Cancellato';
+$labels['flaganswered'] = 'Risposto';
+$labels['flagdraft'] = 'Bozza';
+$labels['flagflagged'] = 'Etichettati';
+$labels['addsieverule'] = 'Aggiungi un\'altra regola sotto';
+$labels['addsieveact'] = 'Aggiungi un\'altra azione sotto';
+$labels['deletesieverule'] = 'Cancella questa regola';
+$labels['deletesieveact'] = 'Cancella questa azione';
+$labels['envelopefrom'] = 'Envelope Da';
+$labels['envelopeto'] = 'Envelope A';
+$labels['otherheader'] = 'Altra intestazione';
+$labels['days'] = 'Periodo';
+$labels['message'] = 'Messaggio';
+$labels['sieveruleheaders'] = 'Vedi esempi di altre intestazioni';
+$labels['examplefilters'] = 'Filtri di esempio';
+$labels['importfilters'] = 'Importa Filtri';
+$labels['usedefaultfilter'] = 'Usa i filtri predefiniti';
+$labels['importfilter'] = 'Importa filtri';
+$labels['moreactions'] = 'Altre opzioni...';
+$labels['adveditor'] = 'Editor avanzato';
+$labels['stdeditor'] = 'Editor semplice';
+$labels['messageredirectcopy'] = 'Invia una copia a';
+$labels['messagecopyto'] = 'Copia il messaggio in';
+$labels['body'] = 'Corpo';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Testo';
+$labels['other'] = 'Altro';
+$labels['bodycontentpart'] = 'Contenuto del corpo';
+$labels['notchecked'] = 'non etichettato';
+$labels['spamlevelisgreaterthanequal'] = 'è maggiore o uguale a';
+$labels['spamlevelislessthanequal'] = 'è minore o uguale a';
+$labels['spamlevelequals'] = 'è uguale a';
+$labels['i;ascii-casemap'] = 'corrispondenza non sensibile alle maiuscole';
+$labels['i;octet'] = 'corrispondenza esatta';
+$labels['i;ascii-numeric'] = 'corrispondenza numerica';
+$labels['selectruleset'] = 'Seleziona set di regole';
+$labels['activeruleset'] = '%s (attivo)';
+$labels['activateruleset'] = 'Attiva questo set di regole';
+$labels['newruleset'] = 'Crea un nuovo set di regole';
+$labels['delruleset'] = 'Cancella questo set di regole';
+$labels['renameruleset'] = 'Rinomina questo set di regole';
+$labels['copy'] = 'Copia';
+$labels['copyexistingfilter'] = 'Copia i filtri esistenti';
+$labels['copytoruleset'] = 'Copia il filtro in un altro set di regole';
+$labels['copyfromruleset'] = 'Copia i filtri da un set di regole esistente';
+$labels['time'] = 'Ora';
+$labels['weekday'] = 'Giorno della settimana';
+$labels['virustest'] = 'Probabilità Virus';
+$labels['novirus'] = 'nessun virus trovato';
+$labels['virusremoved'] = 'virus trovato e rimosso';
+$labels['viruscured'] = 'virus trovato e curato';
+$labels['possiblevirus'] = 'il messaggio potrebbe contenere un virus';
+$labels['definitevirus'] = 'il messaggio potrebbe essere certamente un virus';
+$labels['addheader'] = 'Aggiungi un header';
+$labels['removeheader'] = 'Rimuovi un header';
+$labels['headername'] = 'Nome header';
+$labels['headervalue'] = 'Contenuto header';
+$labels['headerappend'] = 'Accoda ad un header esistente';
+$labels['headerindex'] = 'Indice header';
+$labels['headerdelall'] = 'Tutte le occorrenze';
+$labels['last'] = 'ultimo';
+
+$messages = array();
+$messages['nosieverules'] = 'Nessun filtro trovato.';
+$messages['filterdeleteconfirm'] = 'Sei sicuro/a di di voler cancellare questo filtro?';
+$messages['ruledeleteconfirm'] = 'Sei sicuro/a di voler cancellare questa regola?';
+$messages['actiondeleteconfirm'] = 'Sei sicuro/a di voler cancellare questa azione?';
+$messages['filterunknownerror'] = 'Errore sconosciuto del server';
+$messages['filterconnerror'] = 'Impossibile connettersi al server sieve';
+$messages['filterdeleteerror'] = 'Impossibile cancellare il filtro. Errore del server';
+$messages['filterdeleted'] = 'Filtro cancellato con successo';
+$messages['filtersaved'] = 'Filtro salvato con successo';
+$messages['filtersaveerror'] = 'Impossibile salvare il filtro. Errore del server';
+$messages['vacdaysexp'] = 'Il periodo è il numero di giorni durante i quali il messaggio non sarà più spedito allo stesso utente, a prescindere da quante volte ti abbiano contattato.<br /><br />Per esempio: Se Marco ti scrive una email lunedì e il periodo è impostato a 7, Marco riceverà un messaggio di assenza lunedì ma non ne riceverà altri fino al lunedì successivo, indipendentemente dal n. di email che invia durante la settimana.';
+$messages['vachandleexp'] = 'Un handle può essere usato per collegare diversi messaggi di assenza insieme, una volta che un messaggio è stato inviato nessun altro con lo stesso handle sarà rispedito in quel periodo.';
+$messages['vactoexp'] = 'Lista degli indirizzi dei destinatari aggiuntivi che sono inclusi nella risposta automatica. Se un destinatario non è il tuo indirizzo principale e non è in questa lista, nessun messaggio sarà inviato.';
+$messages['vactoexp_adv'] = 'Separare i diversi indirizzi con una virgola. Per esempio: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Errore: i diversi indirizzi devono essere separati da virgole';
+$messages['norulename'] = 'Inserire un nome per il filtro';
+$messages['ruleexists'] = 'Un filtro con questo nome esiste già. Per favore scegline un altro.';
+$messages['noheader'] = 'Inserire il nome dell\'intestazione da testare';
+$messages['headerbadchars'] = 'Errore: L\'intestazione contiene caratteri proibiti';
+$messages['noheadervalue'] = 'Inserire un valore con cui testare l\'intestazione';
+$messages['sizewrongformat'] = 'Errore: Le dimensioni del messaggio devono essere espresse in formato numerico';
+$messages['noredirect'] = 'Inserire un indirizzo email a cui reindirizzare i messaggi';
+$messages['redirectaddresserror'] = 'Errore: L\'indirizzo non è valido';
+$messages['noreject'] = 'Inserire un messaggio da inviare con le email respinte';
+$messages['vacnodays'] = 'Inserire il numero di giorni per il periodo in cui il messaggio non sarà reinviato alla stessa persona';
+$messages['vacdayswrongformat'] = 'Errore: Il periodo deve essere un numero maggiore o uguale a 1';
+$messages['vacnomsg'] = 'Inserire un testo per il messaggio';
+$messages['notifynomethod'] = 'Inserire un metodo con cui la notifica dovrà essere inviata';
+$messages['notifynomsg'] = 'Inserire un testo per il messaggio';
+$messages['sieveruleexp'] = 'Definire una o più regole con cui ogni messaggio sarà testato. I filtri sono lanciati nell\'ordine in cui essi appaiono nella sinistra della schermata. Se una regola viene soddisfatta nessun altro filtro viene valutato.';
+$messages['sieveruleexp_stop'] = 'Definire una o più regole con le quali testare i messaggi. I filtri sono lanciati nell\'ordine in cui appaiono nella sinistra della schermata fintanto che non viene eseguita un\'azione di \'Stop\'.';
+$messages['sieveactexp'] = 'Selezionare una delle opzioni. Queste azioni saranno eseguite per ogni messaggio che soddiferà le regole qui sopra.';
+$messages['sieveheadershlp'] = 'Questi sono alcuni esempi di intestazioni che possono essere testate dal filtro. Scegliere un\'intestazione per aggiungerla alla regola, o scriverne una personalizzata nella casella qui sopra.';
+$messages['movingfilter'] = 'Sto spostando il filtro...';
+$messages['noexistingfilters'] = 'Nessun filtro esistente rilevato!';
+$messages['importdefault'] = '<b>Usa i filtri predefiniti:</b> C\'è un set predefinito di filtri disponibile. Vuoi usare questi filtri?';
+$messages['importother'] = '<b>Importa filtri:</b> è stato trovato un altro set di filtri da %s. Vuoi importare questi filtri nel tuo set corrente?';
+$messages['switchtoadveditor'] = 'Passare all\'editor avanzato ti consente di editare il \'file sieve\' direttamente. Ogni cambiamento qui potrà risultare illeggibile nell\'editor normale e può essere perso quando i filtri sono salvati usando l\'editor normale. Vuoi continuare?';
+$messages['filterimported'] = 'Filtro importato con successo';
+$messages['filterimporterror'] = 'Impossibile importare il filtro. Errore del server.';
+$messages['notifyinvalidmethod'] = 'Il metodo non sembra essere scritto in un formato valido, deve essere un URI, per esempio: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Inserire una parte di contenuto da testare';
+$messages['badoperator'] = 'Spiacente, l\'operatore che hai selezionato non può essere usato in questa regola';
+$messages['filteractionerror'] = 'L\'azione che hai richiesto non è supportata dal server';
+$messages['filtermissingerror'] = 'Impossibile trovare la regola richiesta';
+$messages['contentpartexp'] = 'Il MIME-type o la parte specifica del messaggio che dovrebbe essere testato. Per esempio: `message/rfc822`, `text/html`, `audio/mp3` o `image`.';
+$messages['delrulesetconf'] = 'Sei sicuro di voler cancellare questo set di regole?';
+$messages['rulesetexists'] = 'Un set di regole con questo nome esiste già. Inseriscine un altro.';
+$messages['copyexisting'] = '<b>Copia del set di regole:</b> Vuoi copiare i filtri dal set di regole esistente nel set corrente?';
+$messages['filtercopied'] = 'Filtro copiato con successo';
+$messages['nosieverulesets'] = 'Nessun set di regole trovato.';
+$messages['baddateformat'] = 'Errore: Inserire la data nel formato YYYY-MM-DD';
+$messages['badtimeformat'] = 'Errore: Inserire l\'ora nel formato HH:MM:SS';
+$messages['missingfoldername'] = 'Errore: Per favore inserisci il nome di una cartella';
+$messages['eheadernoname'] = 'Errore: Per favore inserisci il nome di un header';
+$messages['eheadernoval'] = 'Errore: Per favore inserisci il contenuto di un header';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/nl_NL.inc b/plugins/sieverules/localization/nl_NL.inc
new file mode 100644
index 000000000..ccdeeb7c4
--- /dev/null
+++ b/plugins/sieverules/localization/nl_NL.inc
@@ -0,0 +1,205 @@
+<?php
+/* Author: Beheer */
+
+$labels = array();
+$labels['filters'] = 'Filters';
+$labels['filtersname'] = 'Filters ($name)';
+$labels['managefilters'] = 'Beheer inkomende mail filters';
+$labels['filtername'] = 'Filternaam';
+$labels['disablerule'] = 'Regel uitschakelen';
+$labels['disabled'] = 'Uitgeschakeld';
+$labels['newfilter'] = 'Nieuw filter';
+$labels['moveup'] = 'Omhoog';
+$labels['movedown'] = 'Omlaag';
+$labels['filterallof'] = 'die voldoen aan alle volgende regels';
+$labels['filteranyof'] = 'die voldoen aan een van de volgende regels';
+$labels['filterany'] = 'alle berichten';
+$labels['filtercontains'] = 'bevat';
+$labels['filternotcontains'] = 'bevat niet';
+$labels['filteris'] = 'is gelijk aan';
+$labels['filterisnot'] = 'is niet gelijk aan';
+$labels['filterexists'] = 'bestaat';
+$labels['filternotexists'] = 'bestaat niet';
+$labels['filterregex'] = 'voldoet aan reguliere expressie';
+$labels['filternotregex'] = 'voldoet niet aan reguliere expressie';
+$labels['filterunder'] = 'onder';
+$labels['filterover'] = 'over';
+$labels['filterbefore'] = 'is voor';
+$labels['filterafter'] = 'is na';
+$labels['filteradvoptions'] = 'meer opties...';
+$labels['spamtest'] = 'Spam waarschijnlijkheid';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Vergelijker';
+$labels['isgreaterthan'] = 'is groter dan';
+$labels['isgreaterthanequal'] = 'is groter dan of gelijk aan';
+$labels['islessthan'] = 'is minder dan';
+$labels['islessthanequal'] = 'is minder dan of gelijk aan';
+$labels['equals'] = 'is gelijk aan';
+$labels['notequals'] = 'is niet gelijk aan';
+$labels['countisgreaterthan'] = 'aantal is groter dan';
+$labels['countisgreaterthanequal'] = 'aantal is groter dan of gelijk aan';
+$labels['countislessthan'] = 'aantal is kleiner dan';
+$labels['countislessthanequal'] = 'aantal is kleiner dan of gelijk aan';
+$labels['countequals'] = 'aantal is gelijk aan';
+$labels['countnotequals'] = 'aantal is niet gelijk aan';
+$labels['valueisgreaterthan'] = 'waarde is groter dan';
+$labels['valueisgreaterthanequal'] = 'waarde is groter dan of gelijk aan';
+$labels['valueislessthan'] = 'waarde is minder dan';
+$labels['valueislessthanequal'] = 'waarde is minder dan of gelijk aan';
+$labels['valueequals'] = 'waarde is gelijk aan';
+$labels['valuenotequals'] = 'waarde is niet gelijk aan';
+$labels['userpart'] = 'gebruikersdeel is gelijk aan';
+$labels['notuserpart'] = 'gebruikersdeel is niet gelijk aan';
+$labels['detailpart'] = 'detaildeel is gelijk aan';
+$labels['notdetailpart'] = 'detaildeel is niet gelijk aan';
+$labels['domainpart'] = 'domeindeel is gelijk aan';
+$labels['notdomainpart'] = 'domeindeel is niet gelijk aan';
+$labels['teststring'] = 'Testwaarde';
+$labels['messagemoveto'] = 'Verplaats bericht naar';
+$labels['messageredirect'] = 'Verstuur bericht door naar';
+$labels['messageimapflags'] = 'Markeer bericht als';
+$labels['messagereject'] = 'Weiger met bericht';
+$labels['messagevacation'] = 'Afwezigheidsbericht';
+$labels['messagekeep'] = 'Bericht behouden';
+$labels['messagediscard'] = 'Ontdoen van bericht';
+$labels['messagenotify'] = 'Verstuur notificatie';
+$labels['messagestop'] = 'Stop filterverwerking';
+$labels['messagehelp'] = 'Wat is dit?';
+$labels['sieveorigsubj'] = 'Voeg origineel onderwerp toe aan reactie';
+$labels['sievevachandle'] = 'Reactienaam (\'handle\')';
+$labels['method'] = 'Methode';
+$labels['options'] = 'Opties';
+$labels['messagesrules'] = 'Filterregels';
+$labels['messagesactions'] = 'Filteracties';
+$labels['sieveto'] = 'Aliassen';
+$labels['sievefrom'] = 'Van';
+$labels['flag'] = 'Belangrijkheid';
+$labels['importancen'] = 'Geen';
+$labels['importance1'] = 'Hoog';
+$labels['importance2'] = 'Normaal';
+$labels['importance3'] = 'Laag';
+$labels['flagread'] = 'Gelezen';
+$labels['flagdeleted'] = 'Verwijderd';
+$labels['flaganswered'] = 'Beantwoord';
+$labels['flagdraft'] = 'Concept';
+$labels['flagflagged'] = 'Gemarkeerd';
+$labels['addsieverule'] = 'Nieuwe regel onder deze';
+$labels['addsieveact'] = 'Nieuwe actie onder deze';
+$labels['deletesieverule'] = 'Verwijder deze regel';
+$labels['deletesieveact'] = 'Verwijder deze actie';
+$labels['envelopefrom'] = 'Envelop Van';
+$labels['envelopeto'] = 'Envelop Aan';
+$labels['otherheader'] = 'Andere header';
+$labels['days'] = 'Periode';
+$labels['message'] = 'Bericht';
+$labels['sieveruleheaders'] = 'Bekijk voorbeelden van andere headers';
+$labels['examplefilters'] = 'Voorbeelden filters';
+$labels['importfilters'] = 'Importeer filters';
+$labels['usedefaultfilter'] = 'Gebruik standaardfilters';
+$labels['importfilter'] = 'Importeer filters';
+$labels['moreactions'] = 'Meer opties...';
+$labels['adveditor'] = 'Geavanceerde editor';
+$labels['stdeditor'] = 'Standaard editor';
+$labels['messageredirectcopy'] = 'Verstuur kopie naar';
+$labels['messagecopyto'] = 'Kopie bericht naar';
+$labels['body'] = 'Bericht';
+$labels['auto'] = 'Automatisch';
+$labels['raw'] = 'Bron';
+$labels['text'] = 'Tekst';
+$labels['other'] = 'Anders';
+$labels['bodycontentpart'] = 'Inhoudsgedeelte';
+$labels['notchecked'] = 'niet gecontroleerd';
+$labels['spamlevelisgreaterthanequal'] = 'is groter dan of gelijk aan';
+$labels['spamlevelislessthanequal'] = 'is kleiner dan of gelijk aan';
+$labels['spamlevelequals'] = 'is gelijk aan';
+$labels['i;ascii-casemap'] = 'hoofdlettergevoelige vergelijking';
+$labels['i;octet'] = 'exacte vergelijking';
+$labels['i;ascii-numeric'] = 'numerieke vergelijking';
+$labels['selectruleset'] = 'Selecteer regelset';
+$labels['activeruleset'] = '%s (actief)';
+$labels['activateruleset'] = 'Activeer deze regelset';
+$labels['isactive'] = 'Actieve regelset';
+$labels['isinactive'] = 'Inactieve regelset';
+$labels['newruleset'] = 'Maak een nieuwe regelset';
+$labels['delruleset'] = 'Verwijder deze regelset';
+$labels['renameruleset'] = 'Hernoem deze regelset';
+$labels['copy'] = 'Kopie';
+$labels['copyexistingfilter'] = 'Kopieer bestaande filters';
+$labels['copytoruleset'] = 'Kopieer filter naar een andere regelset';
+$labels['copyfromruleset'] = 'Kopieer filters van bestaande regelset';
+$labels['time'] = 'Tijd';
+$labels['weekday'] = 'Weekdag';
+$labels['virustest'] = 'Virus waarschijnlijkheid';
+$labels['novirus'] = 'geen virus gevonden';
+$labels['virusremoved'] = 'virus gevonden en verwijderd';
+$labels['viruscured'] = 'virus gevonden en genezen';
+$labels['possiblevirus'] = 'bericht bevat mogelijk een virus';
+$labels['definitevirus'] = 'bericht bevat hoogstwaarschijnlijk een virus';
+$labels['addheader'] = 'Header toevoegen';
+$labels['removeheader'] = 'Header verwijderen';
+$labels['headername'] = 'Header naam';
+$labels['headervalue'] = 'Header waarde';
+$labels['headerappend'] = 'Toevoegen aan bestaande header.';
+$labels['headerindex'] = 'Header index';
+$labels['headerdelall'] = 'allen';
+$labels['last'] = 'laatste';
+
+$messages = array();
+$messages['nosieverules'] = 'Geen filters gevonden.';
+$messages['filterdeleteconfirm'] = 'Weet u zeker dat u dit filter wilt verwijderen?';
+$messages['ruledeleteconfirm'] = 'Weet u zeker dat u deze regel wilt verwijderen?';
+$messages['actiondeleteconfirm'] = 'Weet u zeker dat u deze actie wilt verwijderen?';
+$messages['filterunknownerror'] = 'Onbekende serverfout';
+$messages['filterconnerror'] = 'Kan geen verbinding maken met de managesieve server';
+$messages['filterdeleteerror'] = 'Kan filter niet verwijderen. Er is een fout opgetreden';
+$messages['filterdeleted'] = 'Filter succesvol verwijderd';
+$messages['filtersaved'] = 'Filter succesvol opgeslagen';
+$messages['filtersaveerror'] = 'Kan filter niet opslaan. Er is een fout opgetreden.';
+$messages['vacdaysexp'] = 'De periode is het aantal dagen dat een bericht niet opnieuw wordt verzonden naar dezelfde ontvanger, ongeacht het aantal keer dat deze contact opneemt.<br /><br />Voorbeeld: Als Jan u op maandag emailt en de periode is op 7 ingesteld dan zal Jan op maandag een afwezigheidsbericht ontvangen, maar geen andere tot de daaropvolgende maandag, ongeacht het aantal emails welke hij gedurende de week verstuurt.';
+$messages['vachandleexp'] = 'Een reactienaam of handle kan verschillende afwezigheidsberichten groeperen, zodat er binnen een periode slechts een enkel afwezigheidsbericht met dezelfde reactienaam wordt verstuurd.';
+$messages['vactoexp'] = 'Lijst van extra adressen welke bij een afwezigsheidmelding gebruikt worden. Meldingen worden alleen verzonden als het bericht aan het standaard adres of een adres in deze lijst gericht is.';
+$messages['vactoexp_adv'] = 'Scheid meerdere aliases met een komma (,). Bijvoorbeeld: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Fout: Meerdere aliases moeten met een komma (,) worden gescheiden';
+$messages['norulename'] = 'Vul een naam in voor dit filter';
+$messages['ruleexists'] = 'Deze naam is al in gebruik voor een ander filter, voer a.u.b. een andere in';
+$messages['noheader'] = 'Vul een naam voor de kop in om te testen';
+$messages['headerbadchars'] = 'Fout: de kop bevat ongeldige tekens';
+$messages['noheadervalue'] = 'Vul een waarde in om met de kop te testen';
+$messages['sizewrongformat'] = 'Fout: berichtgrootte is niet numeriek';
+$messages['noredirect'] = 'Vul een e-mailadres in om berichten naar door te sturen';
+$messages['redirectaddresserror'] = 'Fout: ongeldig e-mailadres';
+$messages['noreject'] = 'Vul een bericht in om mee te zenden met geweigerde e-mail';
+$messages['vacnodays'] = 'Vul het aantal dagen in voor de periode waarin het bericht niet opnieuw naar dezelfde persoon wordt verzonden';
+$messages['vacdayswrongformat'] = '\'Fout: De periode moet groter dan of gelijk aan 1 zijn';
+$messages['vacnomsg'] = 'Vul tekst in voor uw bericht';
+$messages['notifynomethod'] = 'Kies een verzendmethode voor de notificatie';
+$messages['notifynomsg'] = 'Vul tekst in voor uw melding';
+$messages['sieveruleexp'] = 'Maak een of meer regels waaraan een bericht moet voldoen. Filters worden uitgevoerd in de volgorde zoals deze links op het scherm zijn te zien. Als aan een regel wordt voldaan dan worden eventuele volgende regels genegeerd.';
+$messages['sieveruleexp_stop'] = 'Maak een of meer regels waaraan een bericht moet voldoen. Filters worden uitgevoerd in de volgorde zoals deze links op het scherm zijn te zien totdat een \'Stop\' aktie optreedt';
+$messages['sieveactexp'] = '\'Maak een keuze uit onderstaande opties. Deze acties worden uitgevoerd voor elk bericht dat aan bovenstaande regels voldoet.';
+$messages['sieveheadershlp'] = 'Hieronder staan voorbeelden van andere koppen die kunnen worden getest door de filters. Kies een kop om toe te voegen aan de regel of vul een kop in in het invoerveld.';
+$messages['movingfilter'] = 'Bezig met filter verplaatsen...';
+$messages['noexistingfilters'] = 'Geen bestaande filters gevonden!';
+$messages['importdefault'] = '\'<b>Gebruik standaardfilters:</b> Er is een set van standaardfilters beschikbaar. Wilt u deze filters gebruiken?';
+$messages['importother'] = '<b>Import filters:</b> Er is een andere set filters van %s gevonden. Wilt u deze filters in uw huidige set importeren?';
+$messages['switchtoadveditor'] = 'U kunt het \'Sieve\' bestand rechtstreeks wijzigen via de geavanceerde editor. Veranderingen zijn mogelijk onleesbaar in de standaardeditor en kunnen verloren gaan als filters via de standaardeditor worden opgeslagen. Wilt u doorgaan?';
+$messages['filterimported'] = 'Filter succesvol geimporteerd';
+$messages['filterimporterror'] = 'Kan filter niet importeren. Er is een fout opgetreden.';
+$messages['notifyinvalidmethod'] = 'De methode is in een ongeldig formaat (URI) geschreven. Voorbeeld: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Vul een inhoudsgedeelte in om te testen';
+$messages['badoperator'] = 'De gekozen operator kan niet in deze regel worden gebruikt';
+$messages['filteractionerror'] = 'De server ondersteund deze actie niet';
+$messages['filtermissingerror'] = 'Regel niet gevonden';
+$messages['contentpartexp'] = 'Het MIME-type of specifiek gedeelte van het bericht welke getest moet worden. Bijvoorbeeld: `message/rfc822`, `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Weet u zeker dat u deze regelset wilt verwijderen?';
+$messages['rulesetexists'] = 'Er is al een regelset met deze naam, voer a.u.b. een andere in';
+$messages['copyexisting'] = '<b>Bestaande regelset kopie&euml;ren:</b> Wilt u filters van een bestaande regelset naar u huidige regelset kopie&euml;ren?';
+$messages['filtercopied'] = 'Filter succesvol gekopieerd';
+$messages['nosieverulesets'] = 'Geen regelsets gevonden.';
+$messages['baddateformat'] = 'Fout: Vul de datum in het JJJJ-MM-DD in';
+$messages['badtimeformat'] = 'Fout: Vul de tijd in het format UU:MM:SS in';
+$messages['missingfoldername'] = 'Fout: Vul een mapnaam in';
+$messages['eheadernoname'] = 'Fout: Vul een header naam in';
+$messages['eheadernoval'] = 'Fout: Vul een header waarde in';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/pl_PL.inc b/plugins/sieverules/localization/pl_PL.inc
new file mode 100644
index 000000000..4f1de93f8
--- /dev/null
+++ b/plugins/sieverules/localization/pl_PL.inc
@@ -0,0 +1,205 @@
+<?php
+/* Author: Bartosz Mierzwiak */
+
+$labels = array();
+$labels['filters'] = 'Filtry';
+$labels['filtersname'] = 'Filtry ($name)';
+$labels['managefilters'] = 'Zarządzaj filtrami';
+$labels['filtername'] = 'Nazwa reguły:';
+$labels['disablerule'] = 'Wyłącz regułę';
+$labels['disabled'] = 'Wyłączona';
+$labels['newfilter'] = 'Nowy filtr';
+$labels['moveup'] = 'Przenieś wyżej';
+$labels['movedown'] = 'Przenieś niżej';
+$labels['filterallof'] = 'spełniające wszystkie poniższe kryteria';
+$labels['filteranyof'] = 'spełniające dowolne z poniższych kryteriów';
+$labels['filterany'] = 'wszystkie wiadomości';
+$labels['filtercontains'] = 'zawiera';
+$labels['filternotcontains'] = 'nie zawiera';
+$labels['filteris'] = 'jest równa';
+$labels['filterisnot'] = 'nie jest równa';
+$labels['filterexists'] = 'istnieje';
+$labels['filternotexists'] = 'nie istnieje';
+$labels['filterregex'] = 'pasuje do wyrażenia regularnego';
+$labels['filternotregex'] = 'nie pasuje do wyrażenia regularnego ';
+$labels['filterunder'] = 'jest mniejsza niż';
+$labels['filterover'] = 'jest większa niż';
+$labels['filterbefore'] = 'jest wcześniejsza';
+$labels['filterafter'] = 'jest późniejsza';
+$labels['filteradvoptions'] = 'więcej opcji...';
+$labels['spamtest'] = 'Przypuszczalnie Spam';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Komparator';
+$labels['isgreaterthan'] = 'jest większe od';
+$labels['isgreaterthanequal'] = 'jest większa lub równa';
+$labels['islessthan'] = 'jest mniejsza niż';
+$labels['islessthanequal'] = 'jest mniejsza lub równa';
+$labels['equals'] = 'jest równy';
+$labels['notequals'] = 'nie równa się';
+$labels['countisgreaterthan'] = 'liczba jest większa niż';
+$labels['countisgreaterthanequal'] = 'liczba jest większa lub równa';
+$labels['countislessthan'] = 'liczba jest równa';
+$labels['countislessthanequal'] = 'liczba jest mniejsza niż';
+$labels['countequals'] = 'liczba jest równa';
+$labels['countnotequals'] = 'liczba jest inna niż';
+$labels['valueisgreaterthan'] = 'wartość jest wyższa niż';
+$labels['valueisgreaterthanequal'] = 'wartość jest większa lub równa';
+$labels['valueislessthan'] = 'wartość jest mniejsza niż';
+$labels['valueislessthanequal'] = 'wartość jest mniejsza lub równa';
+$labels['valueequals'] = 'wartość jest równa';
+$labels['valuenotequals'] = 'wartość jest inna niż';
+$labels['userpart'] = 'część użytkowników jest równa';
+$labels['notuserpart'] = 'część użytkowników jest inna niż';
+$labels['detailpart'] = 'część szczegółów jest równa';
+$labels['notdetailpart'] = 'część szczegółów jest inna niż';
+$labels['domainpart'] = 'część domeny zawiera';
+$labels['notdomainpart'] = 'część domeny nie zawiera';
+$labels['teststring'] = 'Łańcuch testowy';
+$labels['messagemoveto'] = 'Przenieś wiadomość do';
+$labels['messageredirect'] = 'Przekierowanie wiadomości';
+$labels['messageimapflags'] = 'Oznacz wiadomość jako';
+$labels['messagereject'] = 'Odrzuć wiadomość';
+$labels['messagevacation'] = 'Automatyczna odpowiedź';
+$labels['messagekeep'] = 'Zachowaj wiadomość';
+$labels['messagediscard'] = 'Odrzuć wiadomość';
+$labels['messagenotify'] = 'Wyślij zgłoszenie';
+$labels['messagestop'] = 'Nie sprawdzaj kolejnych filtrów';
+$labels['messagehelp'] = 'Co to jest?';
+$labels['sieveorigsubj'] = 'Dołącz oryginalny przedmiot odpowiedzi';
+$labels['sievevachandle'] = 'Obsłuż';
+$labels['method'] = 'Metoda';
+$labels['options'] = 'Opcje';
+$labels['messagesrules'] = 'Reguły filtra';
+$labels['messagesactions'] = 'Filtr działania';
+$labels['sieveto'] = 'alians';
+$labels['sievefrom'] = 'Z';
+$labels['flag'] = 'Ważność';
+$labels['importancen'] = 'Najwyższa';
+$labels['importance1'] = 'Wysoka';
+$labels['importance2'] = 'Normalna';
+$labels['importance3'] = 'Niska';
+$labels['flagread'] = 'Odebrane';
+$labels['flagdeleted'] = 'Usunięto';
+$labels['flaganswered'] = 'Odpowiedział';
+$labels['flagdraft'] = 'Projekt';
+$labels['flagflagged'] = 'Oflagowane';
+$labels['addsieverule'] = 'Dodaj nowy przepis, poniżej tej jednej';
+$labels['addsieveact'] = 'Dodaj kolejne działania, pod tym jednym';
+$labels['deletesieverule'] = 'Usuń tę regułę';
+$labels['deletesieveact'] = 'Usuń to działanie';
+$labels['envelopefrom'] = 'Adres Nadawcy';
+$labels['envelopeto'] = 'Adres Odbiorcy';
+$labels['otherheader'] = 'Inny nagłówek';
+$labels['days'] = 'Liczba dni';
+$labels['message'] = 'Wiadomość';
+$labels['sieveruleheaders'] = 'Pokaż przykłady innych nagłówków';
+$labels['examplefilters'] = 'Przykłady filtrów';
+$labels['importfilters'] = 'Importuj filtry';
+$labels['usedefaultfilter'] = 'Użyj domyślnych filtrów';
+$labels['importfilter'] = 'Importuj filtr';
+$labels['moreactions'] = 'Więcej opcji...';
+$labels['adveditor'] = 'Zaawansowana edycja';
+$labels['stdeditor'] = 'Edytor standardowy';
+$labels['messageredirectcopy'] = 'Wyślij kopię wiadomości do:';
+$labels['messagecopyto'] = 'Kopiuj wiadomość do:';
+$labels['body'] = 'Cała wiadomość';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Inny';
+$labels['bodycontentpart'] = 'Zawartość części';
+$labels['notchecked'] = 'nie sprawdza';
+$labels['spamlevelisgreaterthanequal'] = 'jest większa lub równa';
+$labels['spamlevelislessthanequal'] = 'jest mniejsza lub równa';
+$labels['spamlevelequals'] = 'jest równa';
+$labels['i;ascii-casemap'] = 'przypadek-ignorowania łańcucha dopasowania';
+$labels['i;octet'] = 'dopasowanie łańcucha';
+$labels['i;ascii-numeric'] = 'numeryczne dopasowanie';
+$labels['selectruleset'] = 'Zaznacz zestaw reguł';
+$labels['activeruleset'] = '%s (aktywna)';
+$labels['activateruleset'] = 'Aktywuj zestaw reguł';
+$labels['isactive'] = 'Aktywny zestaw reguł';
+$labels['isinactive'] = 'Niekatywny zestaw reguł';
+$labels['newruleset'] = 'Utwórz nowy zestaw reguł';
+$labels['delruleset'] = 'Usuń ten zestaw reguł';
+$labels['renameruleset'] = 'Zmień nazwę tego zestawu reguł';
+$labels['copy'] = 'Kopiuj';
+$labels['copyexistingfilter'] = 'Kopiuj istniejące filtry';
+$labels['copytoruleset'] = 'Kopiuj filtr do innego zestawu reguł';
+$labels['copyfromruleset'] = 'Kopiuj filtry z istniejącego zestawu reguł';
+$labels['time'] = 'Czas';
+$labels['weekday'] = 'Dzień tygodnia';
+$labels['virustest'] = 'Prawdopodobieństwo wirusa';
+$labels['novirus'] = 'nie znaleziono wirusa';
+$labels['virusremoved'] = 'wirus znaleziony i usunięty';
+$labels['viruscured'] = 'wirus znaleziony i zneutralizowany';
+$labels['possiblevirus'] = 'wiadomość może zawierać wirusa';
+$labels['definitevirus'] = 'wiadomość może zawierać groźnego wirusa';
+$labels['addheader'] = 'Dodaj nagłówek';
+$labels['removeheader'] = 'Usuń nagłówek';
+$labels['headername'] = 'Nazwa nagłówka';
+$labels['headervalue'] = 'Wartość nagłówka';
+$labels['headerappend'] = 'Dodaj do istniejącego nagłówka wiadomości';
+$labels['headerindex'] = 'Indeks nagłówka';
+$labels['headerdelall'] = 'wszystkie zdarzenia';
+$labels['last'] = 'ostatni';
+
+$messages = array();
+$messages['nosieverules'] = 'Nie znaleziono filtrów.';
+$messages['filterdeleteconfirm'] = 'Czy na pewno chcesz usunąć ten filtr?';
+$messages['ruledeleteconfirm'] = 'Czy na pewno chcesz usunąć tę regułę?';
+$messages['actiondeleteconfirm'] = 'Czy na pewno chcesz usunąć tę zasadę działania? ';
+$messages['filterunknownerror'] = 'Nieznany błąd serwera.';
+$messages['filterconnerror'] = 'Nie można się połączyć z serwerem filtrów';
+$messages['filterdeleteerror'] = 'Nie można usunąć filtru. Błąd serwera!';
+$messages['filterdeleted'] = 'Filtr został usunięty';
+$messages['filtersaved'] = 'Filtr zapisany';
+$messages['filtersaveerror'] = 'Nie można zapisać filtra - Błąd serwera!';
+$messages['vacdaysexp'] = 'Okres to liczba dni, podczas których wiadomość nie zostanie wysłana ponownie do tego samego użytkownika, bez względu na to ile razy próbował się z tobą skontaktować. Na przykład: Jeśli Jasio wyśle wiadomości e-mail w poniedziałek, a okres ten zostanie ustawiony na 7 dni, Małgosia otrzyma automatyczną odpowiedź w poniedziałek, ale nie będzie dostawała kolejnych do następnego poniedziałku, bez względu na liczbę wiadomości e-mail wysłanych w ciągu tygodnia.';
+$messages['vachandleexp'] = 'Uchwyt może być stosowany do łączenia różnych komunikatów razem, gdy jedna wiadomość została wysłana, żadne inne wiadomości nie bedą wysyłane w tym okresie.';
+$messages['vactoexp'] = 'Lista dodatkowych adresów odbiorców, które są zawarte w automatycznej odpowiedzi.';
+$messages['vactoexp_adv'] = 'Rozdziel adresy aliasów przecinkiem (,). Na przykład: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Błąd: Adresy aliasów muszą być rodzielone przecinkiem (,)';
+$messages['norulename'] = 'Proszę podać nazwę tego filtru';
+$messages['ruleexists'] = 'Filtr o takiej nazwie już istnieje. Proszę podać inną nazwę!';
+$messages['noheader'] = 'Proszę wprowadzić nazwę nagłówka do badania';
+$messages['headerbadchars'] = 'Błąd: Nagłówek zawiera zakazane znaki!';
+$messages['noheadervalue'] = 'Proszę wprowadzić wartość do badań nagłówka.';
+$messages['sizewrongformat'] = 'Błąd: Rozmiar wiadomości musi być określony numeryczne';
+$messages['noredirect'] = 'Proszę podać adres e-mail aby przekierować wiadomości';
+$messages['redirectaddresserror'] = 'Błąd: Adres wydaje się nieprawidłowy';
+$messages['noreject'] = 'Proszę wprowadzić treść wiadomości, aby wysłać e-mail z komunikatem odrzucenia';
+$messages['vacnodays'] = 'Proszę podać liczbę dni w okresie, w którym wiadomość nie zostanie wysłana ponownie do tej samej osoby';
+$messages['vacdayswrongformat'] = 'Błąd: Okres ten musi być liczbą większą lub równą 1 ';
+$messages['vacnomsg'] = 'Proszę wprowadzić treść do Twojej wiadomości generowanej automatycznie';
+$messages['notifynomethod'] = 'Proszę wprowadzić metodę, dzięki której zgłoszenie powinno być wysłane';
+$messages['notifynomsg'] = 'Proszę wprowadzić treść do Twojej wiadomości';
+$messages['sieveruleexp'] = 'Proszę określić jedną lub więcej reguł z których każda wiadomość będzie testowane. Filtry są uruchamiane w kolejności, w jakiej znajdują się na lewo od ekranu, jeśli nie zostaną znalezione żadne dodatkowe, filtry zostaną przetestowane.';
+$messages['sieveruleexp_stop'] = 'Proszę podać jedną lub więcej reguł jakimi testowana będzie wiadomość. Filtry będą używane w kolejności w jakiej widnieją po lewej stronie tego ekranu, do momentu dotarcia do akcji \'Stop\'.';
+$messages['sieveactexp'] = 'Proszę wybrać jedną z poniższych opcji. Działania te będą wykonywane dla wszystkich wiadomości pasujących do reguł(y).';
+$messages['sieveheadershlp'] = 'Poniżej kilka przykładów innych nagłówków, które mogą być badane przez filtry. Wybierz nagłówek, aby dodać go do przepisu lub wprowadź własny w polu powyżej.';
+$messages['movingfilter'] = 'Przemieszczanie filtra...';
+$messages['noexistingfilters'] = 'Nie znaleziono istniejących filtrów!';
+$messages['importdefault'] = 'Użyj domyślnego zestawu filtrów: Nie ma domyślnie dostępnego zestawu filtrów. Chcesz używać tych filtrów? ';
+$messages['importother'] = 'Importuj filtry: Kolejny zestaw filtrów %s zostało znalezione. Czy chcesz zaimportować te filtry do bieżącego zestawu?';
+$messages['switchtoadveditor'] = 'Przełącz na zaawansowany edytor pozwala na edycję plików bezpośrednio sito. Wszelkie zmiany w tym względzie może być nieczytelne w normalnym edytorze i mogą zostać utracone, gdy filtry są zapisywane przy użyciu normalnego edytora. Czy chcesz kontynuować? ';
+$messages['filterimported'] = 'Filtr zaimportowany';
+$messages['filterimporterror'] = 'Nie można zaimportować filtra. Błąd serwera!';
+$messages['notifyinvalidmethod'] = 'Ta metoda ma nieprawidłowy format, podaj URI. Na przykład: "mailto: alert@example.com".';
+$messages['nobodycontentpart'] = 'Proszę wprowadzić zawartość strony do testowania';
+$messages['badoperator'] = 'Przepraszamy, wybrany operator nie może być stosowany w tej regule.';
+$messages['filteractionerror'] = 'Żądane działanie nie jest obsługiwane przez serwer!';
+$messages['filtermissingerror'] = 'Nie można znaleźć treści reguły';
+$messages['contentpartexp'] = 'Typ MIME lub określonej części wiadomości, które powinny być badane. Na przykład: "message/rfc822`, `text/html`, `audio/mp3` lub `image`.';
+$messages['delrulesetconf'] = 'Czy na pewno chcesz usunąć ten zestaw reguł?';
+$messages['rulesetexists'] = 'Reguła o takiej nazwie już istnieje. Proszę podać inną nazwę';
+$messages['copyexisting'] = 'Kopiowanie istniejącego zestawu reguł: Czy chcesz skopiować filtry z istniejącego zestawu reguł do bieżącego zestawu?';
+$messages['filtercopied'] = 'Filtr przekopiowany';
+$messages['nosieverulesets'] = 'Nie znaleziono zestawu filtrów.';
+$messages['baddateformat'] = 'Błąd: Podaj datę w formacie YYYY-MM-DD';
+$messages['badtimeformat'] = 'Błąd: Podaj czas w formacie HH:MM:SS';
+$messages['missingfoldername'] = 'Błąd: Podaj nazwę folderu';
+$messages['eheadernoname'] = 'Błąd: Podaj nazwę nagłówka';
+$messages['eheadernoval'] = 'Błąd: Podaj wartość nagłówka';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/pt_BR.inc b/plugins/sieverules/localization/pt_BR.inc
new file mode 100644
index 000000000..1cf68551a
--- /dev/null
+++ b/plugins/sieverules/localization/pt_BR.inc
@@ -0,0 +1,183 @@
+<?php
+/* Author: Pedro Padron */
+
+$labels = array();
+$labels['filters'] = 'Filtros';
+$labels['managefilters'] = 'Gerenciar filtros';
+$labels['filtername'] = 'Nome do filtro';
+$labels['disablerule'] = 'Desativar regra';
+$labels['disabled'] = 'Desativado';
+$labels['newfilter'] = 'Novo filtro';
+$labels['moveup'] = 'Mover para cima';
+$labels['movedown'] = 'Mover para baixo';
+$labels['filterallof'] = 'corresponde a todas as seguintes regras';
+$labels['filteranyof'] = 'corresponde a uma das seguintes regras';
+$labels['filterany'] = 'todas as mensagens';
+$labels['filtercontains'] = 'contém';
+$labels['filternotcontains'] = 'não contém';
+$labels['filteris'] = 'é igual a';
+$labels['filterisnot'] = 'é diferente de';
+$labels['filterexists'] = 'existe';
+$labels['filternotexists'] = 'não existe';
+$labels['filterregex'] = 'corresponde à expressão';
+$labels['filternotregex'] = 'não corresponde à expressão';
+$labels['filterunder'] = 'é inferior a';
+$labels['filterover'] = 'é superior a';
+$labels['filterbefore'] = 'é antes';
+$labels['filterafter'] = 'é depois';
+$labels['filteradvoptions'] = 'mais opções...';
+$labels['spamtest'] = 'Probabilidade de Spam';
+$labels['operator'] = 'Operador';
+$labels['comparator'] = 'Comparador';
+$labels['isgreaterthan'] = 'é maior que';
+$labels['isgreaterthanequal'] = 'é maior ou igual a';
+$labels['islessthan'] = 'é menor que';
+$labels['islessthanequal'] = 'é menor ou igual a';
+$labels['equals'] = 'é igual a';
+$labels['notequals'] = 'é diferente de';
+$labels['countisgreaterthan'] = 'contagem é maior que';
+$labels['countisgreaterthanequal'] = 'contagem é maior ou igual a';
+$labels['countislessthan'] = 'contagem é menor que';
+$labels['countislessthanequal'] = 'contagem é menor ou igual a';
+$labels['countequals'] = 'contagem é igual a';
+$labels['countnotequals'] = 'contagem é diferente de';
+$labels['valueisgreaterthan'] = 'valor é maior que';
+$labels['valueisgreaterthanequal'] = 'valor é maior ou igual a';
+$labels['valueislessthan'] = 'valor é menor que';
+$labels['valueislessthanequal'] = 'valor é menor ou igual a';
+$labels['valueequals'] = 'valor é igual a';
+$labels['valuenotequals'] = 'valor diferente de';
+$labels['userpart'] = 'parte do utilizador igual a';
+$labels['notuserpart'] = 'parte do utilizador diferente de';
+$labels['detailpart'] = 'parte do detalhe igual a';
+$labels['notdetailpart'] = 'parte do detalhe diferente de';
+$labels['domainpart'] = 'parte do domínio igual a';
+$labels['notdomainpart'] = 'parte do domínio diferente de';
+$labels['teststring'] = 'Texto de teste';
+$labels['messagemoveto'] = 'Mover mensagem para';
+$labels['messageredirect'] = 'Redirecionar mensagem para';
+$labels['messageimapflags'] = 'Marcar mensagem como';
+$labels['messagereject'] = 'Rejeitar com a mensagem';
+$labels['messagevacation'] = 'Mensagem de Fora do Escritório';
+$labels['messagekeep'] = 'Manter mensagem';
+$labels['messagediscard'] = 'Rejeitar mensagem';
+$labels['messagenotify'] = 'Enviar notificação';
+$labels['messagestop'] = 'Parar o processamento de filtros';
+$labels['messagehelp'] = 'O que é isto?';
+$labels['sieveorigsubj'] = 'Acrescentar assunto original à resposta';
+$labels['sievevachandle'] = 'Identificador';
+$labels['method'] = 'Método';
+$labels['options'] = 'Opções';
+$labels['messagesrules'] = 'Regras para Filtros';
+$labels['messagesactions'] = 'Ações para Filtros';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'De';
+$labels['flag'] = 'Importância';
+$labels['importancen'] = 'Nenhum';
+$labels['importance1'] = 'Alta';
+$labels['importance2'] = 'Normal';
+$labels['importance3'] = 'Baixa';
+$labels['flagread'] = 'Lida';
+$labels['flagdeleted'] = 'Eliminada';
+$labels['flaganswered'] = 'Respondida';
+$labels['flagdraft'] = 'Rascunho';
+$labels['flagflagged'] = 'Marcada';
+$labels['addsieverule'] = 'Adicionar outra regra, depois desta';
+$labels['addsieveact'] = 'Adicionar outra ação, depois desta';
+$labels['deletesieverule'] = 'Eliminar esta regra';
+$labels['deletesieveact'] = 'Eliminar esta ação';
+$labels['envelopefrom'] = 'Envelope De';
+$labels['envelopeto'] = 'Envelope Para';
+$labels['otherheader'] = 'Outro cabeçalho';
+$labels['days'] = 'Periodo';
+$labels['message'] = 'Mensagem';
+$labels['sieveruleheaders'] = 'Ver exemplos de outros cabecalhos';
+$labels['examplefilters'] = 'Exemplo de Filtros';
+$labels['importfilters'] = 'Importar Filtros';
+$labels['usedefaultfilter'] = 'Usar filtros predefinidos';
+$labels['importfilter'] = 'Importar filtros';
+$labels['moreactions'] = 'Mais opções...';
+$labels['adveditor'] = 'Editor avançado';
+$labels['stdeditor'] = 'Editor padrão';
+$labels['messageredirectcopy'] = 'Enviar cópia para';
+$labels['messagecopyto'] = 'Copiar mensagem para';
+$labels['body'] = 'Corpo';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Texto';
+$labels['other'] = 'Outro';
+$labels['bodycontentpart'] = 'Parte Conteúdo';
+$labels['notchecked'] = 'não verificado';
+$labels['spamlevelisgreaterthanequal'] = 'é maior ou igual a';
+$labels['spamlevelislessthanequal'] = 'é menor ou igual a';
+$labels['spamlevelequals'] = 'é igual a';
+$labels['i;ascii-casemap'] = 'correspondência de texto indeferente a maiúsculas e minúsculas';
+$labels['i;octet'] = 'correspondência exata do texto';
+$labels['i;ascii-numeric'] = 'correspondência numérica';
+$labels['selectruleset'] = 'Selecionar conjunto de regras';
+$labels['activeruleset'] = '%s (ativo)';
+$labels['activateruleset'] = 'Ativar este conjunto de regras';
+$labels['newruleset'] = 'Criar um no grupo de regras';
+$labels['delruleset'] = 'Eliminar este conjunto de regras';
+$labels['renameruleset'] = 'Renomear este conjunto de regras';
+$labels['copy'] = 'Copiar';
+$labels['copyexistingfilter'] = 'Copiar filtros existentes';
+$labels['copytoruleset'] = 'Copiar o filtro para outro conjunto de regras';
+$labels['copyfromruleset'] = 'Copiar filtros de um conjunto regras existente';
+$labels['time'] = 'Tempo';
+$labels['weekday'] = 'dia da semana';
+
+$messages = array();
+$messages['nosieverules'] = 'Nenhum filtro encontrado.';
+$messages['filterdeleteconfirm'] = 'Tem a certeza que pretende eliminar este filtro?';
+$messages['ruledeleteconfirm'] = 'Tem a certeza que pretende eliminar esta regra?';
+$messages['actiondeleteconfirm'] = 'Tem a certeza que pretende eliminar esta ação?';
+$messages['filterunknownerror'] = 'Erro de servidor desconhecido';
+$messages['filterconnerror'] = 'Não foi possível conectar ao servidor Sieve';
+$messages['filterdeleteerror'] = 'Não foi possível eliminar o filtro. Erro no servidor';
+$messages['filterdeleted'] = 'Filtro eliminado com sucesso';
+$messages['filtersaved'] = 'Filtro salvo com sucesso';
+$messages['filtersaveerror'] = 'Não foi possível salvar o filtro. Erro no servidor';
+$messages['vacdaysexp'] = 'O período é o número de dias durante o qual a mensagem não será reenviada para o mesmo remetente, não importando quantas vezes ele entre contato.<br/><br/>Por exemplo: Se João lhe enviar e-mails na segunda-feira e o período estiver definido para 7 dias, João irá receber uma mensagem de Fora do Escritório na segunda-feira, mas não irá receber mais nenhuma até à segunda-feira seguinte, não importando quantos e-mails ele lhe envie durante a semana.';
+$messages['vachandleexp'] = 'Um identificador pode ser usado para ligar as diferentes mensagens de Fora do Escritório em conjunto, uma vez que uma mensagem foi enviada nenhuma outra com o mesmo identificador será enviada.';
+$messages['vactoexp'] = 'Lista de endereços de destinatários adicionais que estão incluídos na resposta automática. Se um destinatário de e-mail não for seu endereço principal e não estiver nesta lista, nenhuma mensagem será enviada.';
+$messages['norulename'] = 'Por favor, indique um nome para este filtro';
+$messages['ruleexists'] = 'Já existe um filtro com este nome. Por favor, indique outro';
+$messages['noheader'] = 'Por favor, indique o nome do cabeçalho para testar';
+$messages['headerbadchars'] = 'Erro: O cabeçalho contém caracteres proibidos';
+$messages['noheadervalue'] = 'Por favor indique um valor para testar o cabeçalho contra';
+$messages['sizewrongformat'] = 'Erro: O tamanho da mensagem deve ser numérico';
+$messages['noredirect'] = 'Indique um endereço de e-mail para redirecionar as mensagens';
+$messages['redirectaddresserror'] = 'Erro: O endereço de e-mail parece ser inválido';
+$messages['noreject'] = 'Indique uma mensagem para enviar juntamente com o e-mail rejeitado';
+$messages['vacnodays'] = 'Por favor insira um número de dias para o período em que a mensagem não será reenviado para a mesma pessoa';
+$messages['vacdayswrongformat'] = 'Erro: O período deve ser um número maior ou igual a 1';
+$messages['vacnomsg'] = 'Insira o texto para a sua mensagem';
+$messages['notifynomethod'] = 'Por favor, indique um método pelo qual a notificação deve ser enviada';
+$messages['notifynomsg'] = 'Insira o texto para a sua mensagem';
+$messages['sieveruleexp'] = 'Por favor, defina uma ou mais regras sobre as quais cada mensagem será testada. Os filtros são executados na ordem em que aparecem à esquerda da tela, se for encontrada uma correspondência mais nenhum filtro será testado.';
+$messages['sieveruleexp_stop'] = 'Por favor, defina uma ou mais regras sobre as quais cada mensagem será testada. Os filtros são executados na ordem em que aparecem à esquerda da tela até uma ação de \'Stop\' ser encontrada.';
+$messages['sieveactexp'] = 'Por favor, selecione uma das opções abaixo. Essas ações serão realizadas para qualquer mensagem correspondente à(s) regra(s) acima.';
+$messages['sieveheadershlp'] = 'Abaixo estão alguns exemplos de outros cabeçalhos que podem ser testados pelos filtros. Selecione um cabeçalho para adicioná-lo à regra, ou introduza um personalizado na caixa acima.';
+$messages['movingfilter'] = 'Movendo filtro...';
+$messages['noexistingfilters'] = 'Não foi detectado nenhum filtro existente!';
+$messages['importdefault'] = '<b>Usar filtros predefinidos:</b> Há um conjunto de filtros predefinidos disponíveis. Gostaria de usar esses filtros?';
+$messages['importother'] = '<b>Importação de filtros:</b>Foi encontrado outro conjunto de filtros de %s. Gostaria de importar esses filtros para o seu conjunto actual?';
+$messages['switchtoadveditor'] = 'Mudando para o editor avançado é possível editar o arquivo Sieve diretamente. Quaisquer alterações aqui efetuadas podem ser ilegíveis no editor normal e podem ser perdidas quando os filtros são guardados usando o editor normal. Deseja continuar?';
+$messages['filterimported'] = 'Filtro importado com sucesso';
+$messages['filterimporterror'] = 'Não foi possível importar o filtro. Ocorreu um erro no servidor.';
+$messages['notifyinvalidmethod'] = 'O método parece não estar escrito num formato válido, ele deve ser uma URL. Por exemplo: "mailto: alert@example.com».';
+$messages['nobodycontentpart'] = 'Por favor, indique uma parte de conteúdo para testar';
+$messages['badoperator'] = 'O operador seleccionado não pode ser usado nesta regra';
+$messages['filteractionerror'] = 'A ação solicitada não é suportada pelo servidor';
+$messages['filtermissingerror'] = 'Não foi possível encontrar a regra solicitada';
+$messages['contentpartexp'] = 'O tipo de MIME ou parte específica da mensagem que deve ser testado. Por exemplo: `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Tem certeza que quer eliminar este conjunto de regras?';
+$messages['rulesetexists'] = 'Um conjunto de regras com este nome já existe. Por favor, indique outro nome';
+$messages['copyexisting'] = '<b>Copiar conjunto de regras existente:</b>Gostaria de copiar os filtros de um conjunto de de regras existente para o seu conjunto actual?';
+$messages['filtercopied'] = 'Filtro copiado com sucesso';
+$messages['nosieverulesets'] = 'Nenhum conjunto de regras encontrado.';
+$messages['baddateformat'] = 'Erro: Indique a data no formato AAAA-MM-DD';
+$messages['badtimeformat'] = 'Erro: Indique a hora no formato HH:MM:SS';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/pt_PT.inc b/plugins/sieverules/localization/pt_PT.inc
new file mode 100644
index 000000000..5b3dffc24
--- /dev/null
+++ b/plugins/sieverules/localization/pt_PT.inc
@@ -0,0 +1,183 @@
+<?php
+/* Author: Ling Fude */
+
+$labels = array();
+$labels['filters'] = 'Filtros';
+$labels['managefilters'] = 'Gerir filtros';
+$labels['filtername'] = 'Nome do filtro';
+$labels['disablerule'] = 'Desactivar regra';
+$labels['disabled'] = 'Desactivado';
+$labels['newfilter'] = 'Novo filtro';
+$labels['moveup'] = 'Mover para cima';
+$labels['movedown'] = 'Mover para baixo';
+$labels['filterallof'] = 'corresponde a todas as seguintes regras';
+$labels['filteranyof'] = 'corresponde a uma das seguintes regras';
+$labels['filterany'] = 'todas as mensagens';
+$labels['filtercontains'] = 'contém';
+$labels['filternotcontains'] = 'não contém';
+$labels['filteris'] = 'é igual a';
+$labels['filterisnot'] = 'é diferente de';
+$labels['filterexists'] = 'existe';
+$labels['filternotexists'] = 'não existe';
+$labels['filterregex'] = 'corresponde à expressão';
+$labels['filternotregex'] = 'não corresponde à expressão';
+$labels['filterunder'] = 'é inferior a';
+$labels['filterover'] = 'é superior a';
+$labels['filterbefore'] = 'é antes';
+$labels['filterafter'] = 'é depois';
+$labels['filteradvoptions'] = 'mais opções...';
+$labels['spamtest'] = 'Probabilidade de Spam';
+$labels['operator'] = 'Operador';
+$labels['comparator'] = 'Comparador';
+$labels['isgreaterthan'] = 'é maior que';
+$labels['isgreaterthanequal'] = 'é maior ou igual a';
+$labels['islessthan'] = 'é menor que';
+$labels['islessthanequal'] = 'é menor ou igual a';
+$labels['equals'] = 'é igual a';
+$labels['notequals'] = 'é diferente de';
+$labels['countisgreaterthan'] = 'contagem é maior que';
+$labels['countisgreaterthanequal'] = 'contagem é maior ou igual a';
+$labels['countislessthan'] = 'contagem é menor que';
+$labels['countislessthanequal'] = 'contagem é menor ou igual a';
+$labels['countequals'] = 'contagem é igual a';
+$labels['countnotequals'] = 'contagem é diferente de';
+$labels['valueisgreaterthan'] = 'valor é maior que';
+$labels['valueisgreaterthanequal'] = 'valor é maior ou igual a';
+$labels['valueislessthan'] = 'valor é menor que';
+$labels['valueislessthanequal'] = 'valor é menor ou igual a';
+$labels['valueequals'] = 'valor é igual a';
+$labels['valuenotequals'] = 'valor diferente de';
+$labels['userpart'] = 'parte do utilizador igual a';
+$labels['notuserpart'] = 'parte do utilizador diferente de';
+$labels['detailpart'] = 'parte do detalhe igual a';
+$labels['notdetailpart'] = 'parte do detalhe diferente de';
+$labels['domainpart'] = 'parte do domínio igual a';
+$labels['notdomainpart'] = 'parte do domínio diferente de';
+$labels['teststring'] = 'Texto de teste';
+$labels['messagemoveto'] = 'Mover mensagem para';
+$labels['messageredirect'] = 'Redirecionar mensagem para';
+$labels['messageimapflags'] = 'Marcar mensagem como';
+$labels['messagereject'] = 'Rejeitar com a mensagem';
+$labels['messagevacation'] = 'Mensagem Fora do Escritório';
+$labels['messagekeep'] = 'Manter mensagem';
+$labels['messagediscard'] = 'Rejeitar mensagem';
+$labels['messagenotify'] = 'Enviar notificação';
+$labels['messagestop'] = 'Parar o processamento de filtros';
+$labels['messagehelp'] = 'O que é isto?';
+$labels['sieveorigsubj'] = 'Acrescentar assunto original à resposta';
+$labels['sievevachandle'] = 'Identificador';
+$labels['method'] = 'Método';
+$labels['options'] = 'Opções';
+$labels['messagesrules'] = 'Regras para Filtros';
+$labels['messagesactions'] = 'Acções para Filtros';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'De';
+$labels['flag'] = 'Importância';
+$labels['importancen'] = 'Nenhum';
+$labels['importance1'] = 'Alta';
+$labels['importance2'] = 'Normal';
+$labels['importance3'] = 'Baixa';
+$labels['flagread'] = 'Lida';
+$labels['flagdeleted'] = 'Eliminada';
+$labels['flaganswered'] = 'Respondida';
+$labels['flagdraft'] = 'Rascunho';
+$labels['flagflagged'] = 'Marcada';
+$labels['addsieverule'] = 'Adicionar outra regra, depois desta';
+$labels['addsieveact'] = 'Adicionar outra acção, depois desta';
+$labels['deletesieverule'] = 'Eliminar esta regra';
+$labels['deletesieveact'] = 'Eliminar esta acção';
+$labels['envelopefrom'] = 'Envelope De';
+$labels['envelopeto'] = 'Envelope Para';
+$labels['otherheader'] = 'Outro cabeçalho';
+$labels['days'] = 'Periodo';
+$labels['message'] = 'Mensagem';
+$labels['sieveruleheaders'] = 'Ver exemplos de outros cabecalhos';
+$labels['examplefilters'] = 'Exemplo de Filtros';
+$labels['importfilters'] = 'Importar Filtros';
+$labels['usedefaultfilter'] = 'Usar filtros predefinidos';
+$labels['importfilter'] = 'Importar filtros';
+$labels['moreactions'] = 'Mais opções...';
+$labels['adveditor'] = 'Editor avançado';
+$labels['stdeditor'] = 'Editor padrão';
+$labels['messageredirectcopy'] = 'Enviar cópia para';
+$labels['messagecopyto'] = 'Copiar mensagem para';
+$labels['body'] = 'Corpo';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Texto';
+$labels['other'] = 'Outro';
+$labels['bodycontentpart'] = 'Parte Conteúdo';
+$labels['notchecked'] = 'não verificado';
+$labels['spamlevelisgreaterthanequal'] = 'é maior ou igual a';
+$labels['spamlevelislessthanequal'] = 'é menor ou igual a';
+$labels['spamlevelequals'] = 'é igual a';
+$labels['i;ascii-casemap'] = 'correspondência de texto indeferente a maiúsculas e minúsculas';
+$labels['i;octet'] = 'correspondência exacta do texto';
+$labels['i;ascii-numeric'] = 'correspondência numérica';
+$labels['selectruleset'] = 'Seleccionar conjunto de regras';
+$labels['activeruleset'] = '%s (activo)';
+$labels['activateruleset'] = 'Activar este conjunto de regras';
+$labels['newruleset'] = 'Criar um no grupo de regras';
+$labels['delruleset'] = 'Eliminar este conjunto de regras';
+$labels['renameruleset'] = 'Renomear este conjunto de regras';
+$labels['copy'] = 'Copiar';
+$labels['copyexistingfilter'] = 'Copiar filtros existentes';
+$labels['copytoruleset'] = 'Copiar o filtro para outro conjunto de regras';
+$labels['copyfromruleset'] = 'Copiar filtros de um conjunto regras existente';
+$labels['time'] = 'Tempo';
+$labels['weekday'] = 'dia da semana';
+
+$messages = array();
+$messages['nosieverules'] = 'Nenhum filtro encontrado.';
+$messages['filterdeleteconfirm'] = 'Tem a certeza que pretende eliminar este filtro?';
+$messages['ruledeleteconfirm'] = 'Tem a certeza que pretende eliminar esta regra?';
+$messages['actiondeleteconfirm'] = 'Tem a certeza que pretende eliminar esta acção?';
+$messages['filterunknownerror'] = 'Erro de servidor desconhecido';
+$messages['filterconnerror'] = 'Não é possível ligar ao servidor Sieve';
+$messages['filterdeleteerror'] = 'Não foi possível eliminar o filtro. Erro no servidor';
+$messages['filterdeleted'] = 'Filtro eliminado com sucesso';
+$messages['filtersaved'] = 'Filtro guardado com sucesso';
+$messages['filtersaveerror'] = 'Não foi possível guardar o filtro. Erro no servidor';
+$messages['vacdaysexp'] = 'O período é o número de dias durante o qual a mensagem não será reenviado para o mesmo remetente, não importa quantas vezes ele entre contacto consigo.<br/><br/>Por exemplo: Se o João lhe enviar e-mails na segunda-feira e o período está definido para 7 dias, o João irá receber uma mensagem de Fora do Escritório na segunda-feira, mas não irá receber mais nenhuma até à segunda-feira seguinte, não importa quantos e-mails ele lhe envie durante a semana.';
+$messages['vachandleexp'] = 'Um identificador pode ser usado para ligar as diferentes mensagens de Fora do Escritório em conjunto, uma vez que uma mensagem for enviada nenhuma outra mensagem com o mesmo identificador será enviada no mesmo período.';
+$messages['vactoexp'] = 'Lista de endereços de destinatários adicionais que estão incluídos na resposta automática. Se um destinatário de e-mail não é o seu endereço principal e não está nesta lista, nenhuma mensagem será enviada.';
+$messages['norulename'] = 'Por favor, indique um nome para este filtro';
+$messages['ruleexists'] = 'Já existe um filtro com este nome. Por favor, indique outro';
+$messages['noheader'] = 'Por favor, indique o nome do cabeçalho para testar';
+$messages['headerbadchars'] = 'Erro: O cabeçalho contém caracteres proibidos';
+$messages['noheadervalue'] = 'Por favor indique um valor para testar o cabeçalho contra';
+$messages['sizewrongformat'] = 'Erro: O tamanho da mensagem deve ser numérico';
+$messages['noredirect'] = 'Indique um endereço de e-mail para redirecionar as mensagens';
+$messages['redirectaddresserror'] = 'Erro: O endereço de e-mail parece ser inválido';
+$messages['noreject'] = 'Indique uma mensagem para enviar juntamente com o e-mail rejeitado';
+$messages['vacnodays'] = 'Por favor insira um número de dias para o período em que a mensagem não será reenviado para a mesma pessoa';
+$messages['vacdayswrongformat'] = 'Erro: O período deve ser um número maior ou igual a 1';
+$messages['vacnomsg'] = 'Insira o texto para a sua mensagem';
+$messages['notifynomethod'] = 'Por favor, indique um método pelo qual a notificação deve ser enviada';
+$messages['notifynomsg'] = 'Insira o texto para a sua mensagem';
+$messages['sieveruleexp'] = 'Por favor, defina uma ou mais regras sobre as quais cada mensagem será testada. Os filtros são executados na ordem em que aparecem à esquerda do ecrã, se for encontrada uma correspondência mais nenhum filtro será testado.';
+$messages['sieveruleexp_stop'] = 'Por favor, defina uma ou mais regras sobre as quais cada mensagem será testada. Os filtros são executados na ordem em que aparecem à esquerda do ecrã até uma acção de \'Stop\' ser encontrada.';
+$messages['sieveactexp'] = 'Por favor, seleccione uma das opções abaixo. Essas acções serão realizadas para qualquer mensagem correspondente à(s) regra(s) acima.';
+$messages['sieveheadershlp'] = 'Abaixo estão alguns exemplos de outros cabeçalhos que podem ser testados pelos filtros. Selecione um cabeçalho para adicioná-lo à regra, ou introduza um personalizado na caixa acima.';
+$messages['movingfilter'] = 'A mover filtro...';
+$messages['noexistingfilters'] = 'Não foi detectado nenhum filtro existente!';
+$messages['importdefault'] = '<b>Usar filtros predefinidos:</b> Há um conjunto de filtros predefinidos disponíveis. Gostaria de usar esses filtros?';
+$messages['importother'] = '<b>Importação de filtros:</b>Foi encontrado outro conjunto de filtros de %s. Gostaria de importar esses filtros para o seu conjunto actual?';
+$messages['switchtoadveditor'] = 'Mudando para o editor avançado permite editar o ficheiro Sieve directamente. Quaisquer alterações aqui efectuadas podem ser ilegíveis no editor normal e podem ser perdidas quando os filtros são guardados usando o editor normal. Deseja continuar?';
+$messages['filterimported'] = 'Filtro importado com sucesso';
+$messages['filterimporterror'] = 'Não foi possível importar o filtro. Ocorreu um erro no servidor.';
+$messages['notifyinvalidmethod'] = 'O método parece não estar escrito num formato válido, ele deve ser um URL. Por exemplo: "mailto: alert@example.com».';
+$messages['nobodycontentpart'] = 'Por favor, indique uma parte de conteúdo para testar';
+$messages['badoperator'] = 'O operador seleccionado não pode ser usado nesta regra';
+$messages['filteractionerror'] = 'A acção solicitada não é suportada pelo servidor';
+$messages['filtermissingerror'] = 'Não foi possível encontrar a regra solicitada';
+$messages['contentpartexp'] = 'O tipo de MIME ou parte específica da mensagem que deve ser testado. Por exemplo: `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Tem certeza que quer eliminar este conjunto de regras?';
+$messages['rulesetexists'] = 'Um conjunto de regras com este nome já existe. Por favor, indique outro nome';
+$messages['copyexisting'] = '<b>Copiar conjunto de regras existente:</b>Gostaria de copiar os filtros de um conjunto de de regras existente para o seu conjunto actual?';
+$messages['filtercopied'] = 'Filtro copiado com sucesso';
+$messages['nosieverulesets'] = 'Nenhum conjunto de regras encontrado.';
+$messages['baddateformat'] = 'Erro: Indique a data no formato AAAA-MM-DD';
+$messages['badtimeformat'] = 'Erro: Indique a hora no formato HH:MM:SS';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/ro_RO.inc b/plugins/sieverules/localization/ro_RO.inc
new file mode 100644
index 000000000..f8dce4c02
--- /dev/null
+++ b/plugins/sieverules/localization/ro_RO.inc
@@ -0,0 +1,175 @@
+<?php
+/* Author: Ovidiu Bica */
+
+$labels = array();
+$labels['filters'] = 'Filtre';
+$labels['managefilters'] = 'Administrează filtrele';
+$labels['filtername'] = 'Nume filtru';
+$labels['disablerule'] = 'Dezactivează regula';
+$labels['disabled'] = 'Dezactivat';
+$labels['newfilter'] = 'Filtru nou';
+$labels['moveup'] = 'Mută sus';
+$labels['movedown'] = 'Mută jos';
+$labels['filterallof'] = 'îndeplineşte toate regulile de mai jos';
+$labels['filteranyof'] = 'îndeplineşte oricare regula de mai jos';
+$labels['filterany'] = 'toate mesajele';
+$labels['filtercontains'] = 'conţine';
+$labels['filternotcontains'] = 'nu conţine';
+$labels['filteris'] = 'este egal cu';
+$labels['filterisnot'] = 'nu este egal cu';
+$labels['filterexists'] = 'există';
+$labels['filternotexists'] = 'nu există';
+$labels['filterregex'] = 'indeplineşte expresia';
+$labels['filternotregex'] = 'nu indeplineşte expresia';
+$labels['filterunder'] = 'este mai puţin de';
+$labels['filterover'] = 'este mai mult de';
+$labels['filteradvoptions'] = 'mai multe opţiuni';
+$labels['spamtest'] = 'Probabilitate de spam';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Comparator';
+$labels['isgreaterthan'] = 'este mai mare de';
+$labels['isgreaterthanequal'] = 'este mai mare sau egal cu';
+$labels['islessthan'] = 'este mai mic de';
+$labels['islessthanequal'] = 'este mai mic sau egal cu';
+$labels['equals'] = 'este egal cu';
+$labels['notequals'] = 'nu este egal';
+$labels['countisgreaterthan'] = 'numărul este mai mare de';
+$labels['countisgreaterthanequal'] = 'numărul este mai mare sau egal cu';
+$labels['countislessthan'] = 'numărul este mai mic de';
+$labels['countislessthanequal'] = 'numărul este mai mic sau egal cu';
+$labels['countequals'] = 'numărul este egal cu';
+$labels['countnotequals'] = 'numărul nu este egal cu';
+$labels['valueisgreaterthan'] = 'valoarea este mai mare de';
+$labels['valueisgreaterthanequal'] = 'valoarea este mai mare sau egală cu';
+$labels['valueislessthan'] = 'valoarea este mai mică de';
+$labels['valueislessthanequal'] = 'valoarea este mai mică sau egală cu';
+$labels['valueequals'] = 'valoarea este egala cu';
+$labels['valuenotequals'] = 'valoarea nu este egală';
+$labels['userpart'] = 'utilizatorul este';
+$labels['notuserpart'] = 'utilizatorul nu este';
+$labels['detailpart'] = 'detaliul este';
+$labels['notdetailpart'] = 'detaliul nu este';
+$labels['domainpart'] = 'domeniul este';
+$labels['notdomainpart'] = 'domeniul nu este';
+$labels['teststring'] = 'mesaj de test';
+$labels['messagemoveto'] = 'Mută mesajul în';
+$labels['messageredirect'] = 'Redirectionează mesajul la';
+$labels['messageimapflags'] = 'Marchează mesajul ca';
+$labels['messagereject'] = 'Refuză mesajul cu';
+$labels['messagevacation'] = 'Mesaj - Plecat din birou';
+$labels['messagekeep'] = 'Păastrează mesajul';
+$labels['messagediscard'] = 'Refuză mesajul';
+$labels['messagenotify'] = 'Trimite notificare';
+$labels['messagestop'] = 'Opreşte procesarea filtrelor';
+$labels['messagehelp'] = 'Ce este asta?';
+$labels['sieveorigsubj'] = 'Atasează subiectul original la răspuns';
+$labels['sievevachandle'] = 'Foloseşte';
+$labels['method'] = 'Metodă';
+$labels['options'] = 'Opţiuni';
+$labels['messagesrules'] = 'Reguli filtrare';
+$labels['messagesactions'] = 'Acţiuni filtrare';
+$labels['sieveto'] = 'Sinonime';
+$labels['sievefrom'] = 'De la';
+$labels['flag'] = 'Importanţă';
+$labels['importancen'] = 'Nici unul';
+$labels['importance1'] = 'Mare';
+$labels['importance2'] = 'Normal';
+$labels['importance3'] = 'Scăzut';
+$labels['flagread'] = 'Citit';
+$labels['flagdeleted'] = 'Şters';
+$labels['flaganswered'] = 'Răspuns';
+$labels['flagdraft'] = 'Ciornă';
+$labels['flagflagged'] = 'Marcat';
+$labels['addsieverule'] = 'Adaugă o nouă regulă sub aceasta';
+$labels['addsieveact'] = 'Adaugă o nouă acţiune sub aceasta';
+$labels['deletesieverule'] = 'Şterge această regulă';
+$labels['deletesieveact'] = 'Şterge această acţiune';
+$labels['envelopefrom'] = 'Mesaj de la';
+$labels['envelopeto'] = 'Mesaj către';
+$labels['otherheader'] = 'Alt cuprins';
+$labels['days'] = 'Perioadă';
+$labels['message'] = 'Mesaj';
+$labels['sieveruleheaders'] = 'Vezi exemple de alte cuprinsuri';
+$labels['examplefilters'] = 'Exemple de filtre';
+$labels['importfilters'] = 'Importa filtre';
+$labels['usedefaultfilter'] = 'Foloseste filtre implicite';
+$labels['importfilter'] = 'Importa filtru';
+$labels['adveditor'] = 'Editor avansat';
+$labels['messageredirectcopy'] = 'Trimite o copie către';
+$labels['messagecopyto'] = 'Copiază mesajul către';
+$labels['body'] = 'Conţinut';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Brut';
+$labels['text'] = 'Text';
+$labels['other'] = 'Altul';
+$labels['bodycontentpart'] = 'Conţinut';
+$labels['notchecked'] = 'neverificat';
+$labels['spamlevelisgreaterthanequal'] = 'este mai mare sau egal cu';
+$labels['spamlevelislessthanequal'] = 'este mai mic sau egal cu';
+$labels['spamlevelequals'] = 'este egal cu';
+$labels['i;ascii-casemap'] = 'potrivire caractere mici/mari';
+$labels['i;octet'] = 'potrivire exactă';
+$labels['i;ascii-numeric'] = 'potrivire numerică';
+$labels['selectruleset'] = 'Selectează setul de reguli';
+$labels['activeruleset'] = '%s (activ)';
+$labels['activateruleset'] = 'Activează acest set de reguli';
+$labels['newruleset'] = 'Crează un nou set de reguli';
+$labels['delruleset'] = 'Sterge acest set de reguli';
+$labels['renameruleset'] = 'Redenumeşte acest set de reguli';
+$labels['copy'] = 'Copiază';
+$labels['copyexistingfilter'] = 'Copiază filtre existente';
+$labels['copytoruleset'] = 'Copiază filtrul la un alt set de reguli';
+$labels['copyfromruleset'] = 'Copiază filtrele de la un set de reguli existent';
+
+$messages = array();
+$messages['nosieverules'] = 'Nu a fost găsit niciun filtru.';
+$messages['filterdeleteconfirm'] = 'Eşti sigur că doreşti să ştergi acest filtru?';
+$messages['ruledeleteconfirm'] = 'Eşti sigur că doreşti să ştergi această regulă?';
+$messages['actiondeleteconfirm'] = 'Eşti sigur că doreşti să ştergi această acţiune?';
+$messages['filterunknownerror'] = 'Eroare de server necunoscută.';
+$messages['filterconnerror'] = 'Nu m-am putut conecta la serverul Sieve.';
+$messages['filterdeleteerror'] = 'Nu am putut şterge filtrul. Eroare de server.';
+$messages['filterdeleted'] = 'Filtru şters cu succes.';
+$messages['filtersaved'] = 'Filtru salvat cu succes.';
+$messages['filtersaveerror'] = 'Nu am putut salva filtrul. Eroare de server.';
+$messages['vacdaysexp'] = 'Perioada este numărul de zile în care mesajul nu va fi retrimis persoanei indiferent de câte ori te va contacta.<br /><br />De exemplu: Dacă Ion iţi trimite un email luni şi perioada este setată la 7 zile, atunci Ion va primi un mesaj OUT of OFFICE luni însă nu va mai primi niciunul pana lunea următoare indiferent de câte mesaje îţi va trimite.';
+$messages['vachandleexp'] = 'Poate fi folosită o regulă pentru a lega mesaje OUT of OFFICE împreună. Odată trimis un mesaj, nu va mai fi trimis niciun mesaj cu aceeasi regulă.';
+$messages['vactoexp'] = 'Lista adreselor de email aditionale care vor fi incluse in raspunsul automat. ';
+$messages['norulename'] = 'Te rog sa introduci un nume pentru acest filtru.';
+$messages['ruleexists'] = 'Un filtru cu acest nume există deja. Te rog să introduci altul.';
+$messages['noheader'] = 'Te rog să introduci numele headerului pentru verificare.';
+$messages['headerbadchars'] = 'Eroare: Headerul conţine caractere ilegale.';
+$messages['noheadervalue'] = 'Te rog să introduci o valoare pentru a testa headerul.';
+$messages['sizewrongformat'] = 'Eroare: Mărimea mesajului trebuie să fie numerică .';
+$messages['noredirect'] = 'Te rog să introduci o adresă de email pentru a redirecţiona mesajele.';
+$messages['redirectaddresserror'] = 'Eroare: Adresa nu pare să fie validă.';
+$messages['noreject'] = 'Te rog să introduci un mesaj pentru a fi trimis impreună cu mesajul de respingere.';
+$messages['vacnodays'] = 'Te rog să introduci o perioadă de zile în care mesaju';
+$messages['vacdayswrongformat'] = 'Eroare: Perioada trebuie să fie un număr mai mare sau egal cu 1.';
+$messages['vacnomsg'] = 'Te rog să introduci un text pentru mesaj.';
+$messages['notifynomethod'] = 'Te rog să introduci o metodă prin care să se trimită notificarea.';
+$messages['notifynomsg'] = 'Te rog să introduci un text pentru mesaj.';
+$messages['sieveruleexp'] = 'Te rog să introduci una sau mai multe reguli prin care va fi testat fiecare mesaj. Filtrele sunt aplicate în ordinea în care apar în stânga ecranului. Dacă este găsită o potrivire, niciun alt filtru nu va mai fi testat.';
+$messages['sieveruleexp_stop'] = 'Te rog să introduci una sau mai multe reguli prin care va fi testat fiecare mesaj. Filtrele sunt aplicate în ordinea în care apar în stânga ecranului până câand este găsită o acţiune de stopare.';
+$messages['sieveactexp'] = 'Te rog sa selectezi una din opţiunile de mai jos. Aceste acţiuni vor fi efectuate pentru orice mesaj ce se potriveşte regulilor de mai jos.';
+$messages['sieveheadershlp'] = 'Mai jos aveţi exemple de alte headere ce pot fi testate de către filtre. Selectează un header pentru a-l adăuga la regulă sau introdu una proprie în câmpul de mai sus.';
+$messages['movingfilter'] = 'Se mută filtrul ...';
+$messages['noexistingfilters'] = 'Nici un filtru existent ...';
+$messages['importdefault'] = '<b>Foloseşte filtrele implicite:</b>Există un set de filtre implicite. Doreşti să foloseşti aceste filtre?';
+$messages['importother'] = '<b>Importă filtre</b> Un alt set de filtre de la %s a fost găsit. Doreşti să imporţi aceste filtre in setul tău curent?';
+$messages['switchtoadveditor'] = 'Trecerea la editorul avansat iti permite să editezi fişierul sieve direct. Orice modificare faci aici poate fi de nedescifrat in editorul normal si poate fi pierdută atunci când filtrele sunt salvate folosind editorul normal. Doreşti să continui?';
+$messages['filterimported'] = 'Filtrul importat cu succes?';
+$messages['filterimporterror'] = 'Imposibil de importat filtrul. Eroare de server.';
+$messages['notifyinvalidmethod'] = 'Metoda nu pare a fi scrisă într-un format valid, trebuie să fie un URL. De ex. `mailto:ion@exemplu.com`';
+$messages['nobodycontentpart'] = 'Te rog să introduci un conţinut de probă.';
+$messages['badoperator'] = 'Îmi pare rău, operatorul selectat nu poate fi folosit în această regulă.';
+$messages['filteractionerror'] = 'Acţiunea cerută nu este suportată de server.';
+$messages['filtermissingerror'] = 'Imposibil de găsit regula cerută.';
+$messages['contentpartexp'] = 'Tipul MIME-Type sau o parte specifica din mesajul ce trebuie testat. De ex. `message/rfc822`, `text/html`, `audio/mp3` sau `image`.';
+$messages['delrulesetconf'] = 'Eşti sigur că doreşti să ştergi acest set de reguli?';
+$messages['rulesetexists'] = 'Un set de reguli cu acest nume există deja. Introdu altul.';
+$messages['copyexisting'] = '<b>Copiază setul de reguli existent:</b> Doreşti să copiezi filtrele dintr-un set de reguli existent in setul tău curent?';
+$messages['filtercopied'] = 'Filtrul copiat cu succes.';
+$messages['nosieverulesets'] = 'Niciun set de reguli găsit.';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/ru_RU.inc b/plugins/sieverules/localization/ru_RU.inc
new file mode 100644
index 000000000..12aaeea53
--- /dev/null
+++ b/plugins/sieverules/localization/ru_RU.inc
@@ -0,0 +1,182 @@
+<?php
+/* Author: Peter Zotov */
+
+$labels = array();
+$labels['filters'] = 'Фильтры';
+$labels['managefilters'] = 'управление фильтрами';
+$labels['filtername'] = 'Имя фильтра';
+$labels['disablerule'] = 'отключить правило';
+$labels['disabled'] = 'отключено';
+$labels['newfilter'] = 'Новый фильтр';
+$labels['moveup'] = 'вверх';
+$labels['movedown'] = 'вниз';
+$labels['filterallof'] = 'соответствует всем правилам';
+$labels['filteranyof'] = 'соответствует хотя бы одному из правил';
+$labels['filterany'] = 'все сообщения';
+$labels['filtercontains'] = 'содержит';
+$labels['filternotcontains'] = 'не содержит';
+$labels['filteris'] = 'совпадает с';
+$labels['filterisnot'] = 'не совпадает с';
+$labels['filterexists'] = 'существует';
+$labels['filternotexists'] = 'не существует';
+$labels['filterregex'] = 'соответствует регулярному выражению';
+$labels['filternotregex'] = 'не соответствует регулярному выражению';
+$labels['filterunder'] = 'меньше чем';
+$labels['filterover'] = 'больше чем';
+$labels['filterbefore'] = 'до';
+$labels['filterafter'] = 'после';
+$labels['filteradvoptions'] = 'другие...';
+$labels['spamtest'] = 'Вероятность спама';
+$labels['operator'] = 'Условие';
+$labels['comparator'] = 'Сравнение';
+$labels['isgreaterthan'] = 'больше чем';
+$labels['isgreaterthanequal'] = 'больше чем или равен';
+$labels['islessthan'] = 'меньше чем';
+$labels['islessthanequal'] = 'меньше чем или равен';
+$labels['equals'] = 'равен';
+$labels['notequals'] = 'не равен';
+$labels['countisgreaterthan'] = 'количество больше чем';
+$labels['countisgreaterthanequal'] = 'количество больше чем или равно';
+$labels['countislessthan'] = 'количество меньше чем';
+$labels['countislessthanequal'] = 'количество меньше чем или равно';
+$labels['countequals'] = 'количество равно';
+$labels['countnotequals'] = 'количество не равно';
+$labels['valueisgreaterthan'] = 'значение больше чем';
+$labels['valueisgreaterthanequal'] = 'значение больше чем или равно';
+$labels['valueislessthan'] = 'значение меньше чем';
+$labels['valueislessthanequal'] = 'значение меньше чем или равно';
+$labels['valueequals'] = 'значение равно';
+$labels['valuenotequals'] = 'значение не равно';
+$labels['userpart'] = 'имя пользователя (перед \'@\' или \'+\') равно';
+$labels['notuserpart'] = 'имя пользователя не равно';
+$labels['detailpart'] = 'часть имени после \'+\' равна';
+$labels['notdetailpart'] = 'часть имени после \'+\' не равна';
+$labels['domainpart'] = 'имя домена (после \'@\') равно';
+$labels['notdomainpart'] = 'имя домена не равно';
+$labels['teststring'] = 'Сравнить со строкой';
+$labels['messagemoveto'] = 'переместить сообщения в';
+$labels['messageredirect'] = 'перенаправить сообщения на адрес';
+$labels['messageimapflags'] = 'пометить сообщения как';
+$labels['messagereject'] = 'отклонить с сообщением';
+$labels['messagevacation'] = 'сообщение "Нет на месте"';
+$labels['messagekeep'] = 'сохранить сообщение';
+$labels['messagediscard'] = 'отклонить сообщение';
+$labels['messagenotify'] = 'отправить уведомление';
+$labels['messagestop'] = 'прекратить обработку фильтров';
+$labels['messagehelp'] = 'Что это?';
+$labels['sieveorigsubj'] = 'Добавить тему исходного сообщения к ответу';
+$labels['sievevachandle'] = 'Метка';
+$labels['method'] = 'Способ';
+$labels['options'] = 'Параметры';
+$labels['messagesrules'] = 'Правила фильтра';
+$labels['messagesactions'] = 'Действия фильтра';
+$labels['sieveto'] = 'Адреса';
+$labels['sievefrom'] = 'От';
+$labels['flag'] = 'Важность';
+$labels['importancen'] = 'не указана';
+$labels['importance1'] = 'высокая';
+$labels['importance2'] = 'обычная';
+$labels['importance3'] = 'низкая';
+$labels['flagread'] = 'прочитано';
+$labels['flagdeleted'] = 'удалено';
+$labels['flaganswered'] = 'ответ написан';
+$labels['flagdraft'] = 'черновик';
+$labels['flagflagged'] = 'помечено';
+$labels['addsieverule'] = 'добавить правило';
+$labels['addsieveact'] = 'добавить дополнительное действие';
+$labels['deletesieverule'] = 'удалить правило';
+$labels['deletesieveact'] = 'удалить действие';
+$labels['otherheader'] = 'Другой заголовок';
+$labels['days'] = 'Периодичность';
+$labels['message'] = 'Сообщение';
+$labels['sieveruleheaders'] = 'посмотреть примеры других заголовков';
+$labels['examplefilters'] = 'Примеры фильтров';
+$labels['importfilters'] = 'Импорт фильтров';
+$labels['usedefaultfilter'] = 'Использовать фильтры по умолчанию';
+$labels['importfilter'] = 'Импортировать фильтры';
+$labels['moreactions'] = 'Другие варианты...';
+$labels['adveditor'] = 'Расширенный редактор';
+$labels['stdeditor'] = 'Стандартный редактор';
+$labels['messageredirectcopy'] = 'отослать копию на адрес';
+$labels['messagecopyto'] = 'сохранить копию в папку';
+$labels['body'] = 'Тело сообщения';
+$labels['auto'] = 'автоматически';
+$labels['raw'] = 'в исходнике';
+$labels['text'] = 'в тексте';
+$labels['other'] = 'часть сообщения';
+$labels['bodycontentpart'] = 'MIME-тип части сообщения';
+$labels['notchecked'] = 'не проверено';
+$labels['spamlevelisgreaterthanequal'] = 'больше чем или равна';
+$labels['spamlevelislessthanequal'] = 'меньше чем или равна';
+$labels['spamlevelequals'] = 'равна';
+$labels['i;ascii-casemap'] = 'сравнение строк без учета регистра';
+$labels['i;octet'] = 'точное сравнение строк';
+$labels['i;ascii-numeric'] = 'числовое сравнение';
+$labels['selectruleset'] = 'Выбрать набор правил';
+$labels['activeruleset'] = '%s (активный)';
+$labels['activateruleset'] = 'Активировать набор правил';
+$labels['newruleset'] = 'Создать набор правил';
+$labels['delruleset'] = 'Удалить набор правил';
+$labels['renameruleset'] = 'Переименовать набор правил';
+$labels['copy'] = 'Скопировать';
+$labels['copyexistingfilter'] = 'Скопировать существующие фильтры';
+$labels['copytoruleset'] = 'Скопировать фильтры в другой набор';
+$labels['copyfromruleset'] = 'Скопировать фильтры из существующего набора';
+$labels['time'] = 'Время';
+$labels['weekday'] = 'День недели';
+
+$messages = array();
+$messages['nosieverules'] = 'Фильтры не найдены.';
+$messages['filterdeleteconfirm'] = 'Вы уверены, что хотите удалить этот фильтр?';
+$messages['ruledeleteconfirm'] = 'Вы уверены, что хотите удалить это правило?';
+$messages['actiondeleteconfirm'] = 'Вы уверены, что хотите удалить это действие?';
+$messages['filterunknownerror'] = 'Неизвестная ошибка сервера.';
+$messages['filterconnerror'] = 'Невозможно соединиться с сервером sieve.';
+$messages['filterdeleteerror'] = 'Невозможно удалить фильтр. Возникла ошибка сервера.';
+$messages['filterdeleted'] = 'Фильтр успешно удален.';
+$messages['filtersaved'] = 'Фильтр успешно сохранен.';
+$messages['filtersaveerror'] = 'Невозможно сохранить фильтр. Возникла ошибка сервера.';
+$messages['vacdaysexp'] = 'Количество дней, в течение которого корреспонденты не будут получать повторные сообщения об вашем отсутствии, вне зависимости от того, сколько раз они вам написали за это время.<br /><br />Например: Если Вася написал вам письмо в понедельник и вы установили периодичность в 7 (дней), то Вася получит сообщение о Вашем отсутствии в понедельник, и больше не будет получать таких сообщений до следующего понедельника, даже если он писал вам много раз.';
+$messages['vachandleexp'] = 'Метка связывает несколько сообщений об отсутствии вместе: после того, как одно из них было отправлено, другие сообщения с той же меткой не будут отправляться в течение этого периода..';
+$messages['vactoexp'] = 'Список дополнительных адресов получателей, для которых будет работать "автоответчик". Ответы не будут отправляться, если адреса получателя принятого сообщения нет в этом списке.';
+$messages['vactoexp_adv'] = 'Несколько адресов разделяются запятой (,). Например, test1@example.com,test2@example.com,test3@example.com.';
+$messages['vactoexp_err'] = 'Ошибка: Несколько ардесов должны быть разделены запятыми.';
+$messages['norulename'] = 'Пожалуйста, введите имя для этого фильтра.';
+$messages['ruleexists'] = 'Фильтр с таким именем уже существует. Введите другое имя фильтра.';
+$messages['noheader'] = 'Пожалуйста, введите имя заголовка для проверки.';
+$messages['headerbadchars'] = 'Ошибка: указанная строка содержит запрещенные символы.';
+$messages['noheadervalue'] = 'Пожалуйста, введите значение для проверки заголовка.';
+$messages['sizewrongformat'] = 'Ошибка: размер сообщения должен быть числовым.';
+$messages['noredirect'] = 'Пожалуйста, введите адрес электронной почты для перенаправки сообщения.';
+$messages['redirectaddresserror'] = 'Ошибка: введен неверный адрес.';
+$messages['noreject'] = 'Пожалуйста, введите текст сообщения.';
+$messages['vacnodays'] = 'Пожалуйста, укажите периодичность отсылки уведомлений';
+$messages['vacdayswrongformat'] = 'Ошибка: Периодичность должна быть положительным целым числом';
+$messages['vacnomsg'] = 'Пожалуйста, введите текст сообщения.';
+$messages['notifynomethod'] = 'Пожалуйста, введите способ отправки уведомления.';
+$messages['notifynomsg'] = 'Пожалуйста, введите текст сообщения.';
+$messages['sieveruleexp'] = 'Пожалуйста, введите одно или несколько правил, согласно которым будут проверяться сообщения. Фильтры работают в том порядке, в котором они появляются слева. Если соответствие найдено, остальные фильтры тестироваться не будут.';
+$messages['sieveactexp'] = 'Пожалуйста, выберите одно или несколько действий. Эти действия будут выполняться для каждого сообщения, соответствующего вышеуказанным правилам.';
+$messages['sieveheadershlp'] = 'Ниже находятся несколько примеров заголовков, которые могут быть проверены фильтрами. Выберите заголовок, чтобы добавить его, либо введите другой в поле ввода.';
+$messages['movingfilter'] = 'Перемещение фильтра...';
+$messages['noexistingfilters'] = 'Фильтров не найдено!';
+$messages['importdefault'] = '<b>Фильтры по умолчанию:</b> Доступен набор фильтров по умолчанию. Использовать?';
+$messages['importother'] = '<b>Импорт фильтров:</b> Найден набор фильтров от приложения %s. Импортировать?';
+$messages['switchtoadveditor'] = 'Переключение в режим расширенного редактора позволяет редактировать исходный текст сценария \'sieve\'. Изменения, сделанные в этом режиме, могут не восприниматься графическим интерфейсом, и могут быть потеряны в случае сохранения фильтров в графическом интерфейсе. Продолжить?';
+$messages['filterimported'] = 'Фильтр успешно импортирован';
+$messages['filterimporterror'] = 'Ошибка сервера во время импорта фильтра. Импорт не выполнен';
+$messages['notifyinvalidmethod'] = 'Формат метода неверен. Нужно указать URI, например: «mailto:alert@example.com».';
+$messages['nobodycontentpart'] = 'Укажите часть тела сообщения';
+$messages['badoperator'] = 'Такой оператор не может использоваться в данном правиле';
+$messages['filteractionerror'] = 'Запрошенное действие не поддерживается сервером';
+$messages['filtermissingerror'] = 'Указанное правило не существует';
+$messages['contentpartexp'] = 'MIME-тип или часть сообщения для проверки. Например, «message/rfc822», «text/html», «audio/mp3» или «image».';
+$messages['delrulesetconf'] = 'Действительно удалить этот набор правил?';
+$messages['rulesetexists'] = 'Набор правил с таким названием уже существует. Выберите другое название.';
+$messages['copyexisting'] = '<b>Копирование существующего набора правил:</b> Скопировать фильтры из существующего набора правил в текущий набор?';
+$messages['filtercopied'] = 'Фильтры успешно скопированы';
+$messages['nosieverulesets'] = 'Наборы правил не найдены.';
+$messages['baddateformat'] = 'Ошибка: Дата должна вводиться в формате ГГГГ-ММ-ДД';
+$messages['badtimeformat'] = 'Ошибка: Время должно вводиться в формате ЧЧ:ММ:СС';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/sk_SK.inc b/plugins/sieverules/localization/sk_SK.inc
new file mode 100644
index 000000000..420ffbb88
--- /dev/null
+++ b/plugins/sieverules/localization/sk_SK.inc
@@ -0,0 +1,159 @@
+<?php
+/* Author: Michal Michalac */
+
+$labels = array();
+$labels['filters'] = 'Pravidlá';
+$labels['managefilters'] = 'Spravovať pravidlá';
+$labels['filtername'] = 'Názov pravidla';
+$labels['disablerule'] = 'Zakázať pravidlo';
+$labels['disabled'] = 'zakázané';
+$labels['newfilter'] = 'Nové pravidlo';
+$labels['moveup'] = 'Posunúť vyššie';
+$labels['movedown'] = 'Posunúť nižšie';
+$labels['filterallof'] = 'vyhovuje všetkým nasl. podmienkam';
+$labels['filteranyof'] = 'vyhovuje niektorej z nasl. podmienok';
+$labels['filterany'] = 'všetky správy';
+$labels['filtercontains'] = 'obsahuje';
+$labels['filternotcontains'] = 'neobsahuje';
+$labels['filteris'] = 'je presne';
+$labels['filterisnot'] = 'nie je';
+$labels['filterexists'] = 'existuje';
+$labels['filternotexists'] = 'neexistuje';
+$labels['filterregex'] = 'vyhovuje regulárnemu výrazu';
+$labels['filternotregex'] = 'nevyhovuje regulárnemu výrazu';
+$labels['filterunder'] = 'je menšie ako';
+$labels['filterover'] = 'je väčšie ako';
+$labels['filteradvoptions'] = 'viac volieb...';
+$labels['spamtest'] = 'Pravdepodobnosť spamu';
+$labels['operator'] = 'Operátor';
+$labels['comparator'] = 'Porovnanie';
+$labels['isgreaterthan'] = 'je väčšie ako';
+$labels['isgreaterthanequal'] = 'je väčšie, alebo rovné ako';
+$labels['islessthan'] = 'je menšie ako';
+$labels['islessthanequal'] = 'je menšie, alebo rovné ako';
+$labels['equals'] = 'je rovné';
+$labels['notequals'] = 'nie je rovné';
+$labels['countisgreaterthan'] = 'počet je väčší ako';
+$labels['countisgreaterthanequal'] = 'počet je väčší, alebo rovný ako';
+$labels['countislessthan'] = 'počet je menší ako';
+$labels['countislessthanequal'] = 'počet je menší, alebo rovný ako';
+$labels['countequals'] = 'počet je';
+$labels['countnotequals'] = 'počet nie je ';
+$labels['valueisgreaterthan'] = 'hodnota je väčšia ako';
+$labels['valueisgreaterthanequal'] = 'hodnota je väčšia, alebo rovná ako';
+$labels['valueislessthan'] = 'hodnota je menšia ako';
+$labels['valueislessthanequal'] = 'hodnota je menšia, alebo rovná ako';
+$labels['valueequals'] = 'hodnota je rovná';
+$labels['valuenotequals'] = 'hodnota nie je rovná';
+$labels['userpart'] = 'užívateľská časť sa zhoduje s';
+$labels['notuserpart'] = 'užívateľská časť sa nezhoduje s';
+$labels['detailpart'] = 'detail sa zhoduje s';
+$labels['notdetailpart'] = 'detail sa nezhoduje s';
+$labels['domainpart'] = 'doména sa zhoduje';
+$labels['notdomainpart'] = 'doména sa nezhoduje';
+$labels['teststring'] = 'Testovací text';
+$labels['messagemoveto'] = 'Presunúť správu do';
+$labels['messageredirect'] = 'Preposlať správu na';
+$labels['messageimapflags'] = 'Označiť správu ako';
+$labels['messagereject'] = 'Odmietnuť so správou';
+$labels['messagevacation'] = 'Dovolenka';
+$labels['messagekeep'] = 'Zachovať správu';
+$labels['messagediscard'] = 'Zrušiť správu';
+$labels['messagenotify'] = 'Zaslať upozornenie';
+$labels['messagestop'] = 'Ukončiť spracovanie pravidiel';
+$labels['messagehelp'] = 'Čo je toto?';
+$labels['sieveorigsubj'] = 'Pripojiť k odpovedi pôvodný predmet';
+$labels['sievevachandle'] = 'Odkaz';
+$labels['method'] = 'Metóda';
+$labels['options'] = 'Voľby';
+$labels['messagesrules'] = 'Podmienky pravidla';
+$labels['messagesactions'] = 'Akcie pravidla';
+$labels['sieveto'] = 'Aliasy';
+$labels['sievefrom'] = 'Od';
+$labels['flag'] = 'Dôležitosť';
+$labels['importancen'] = 'žiadna';
+$labels['importance1'] = 'vysoká';
+$labels['importance2'] = 'štandardná';
+$labels['importance3'] = 'nízka';
+$labels['flagread'] = 'Prečítanú';
+$labels['flagdeleted'] = 'Vymazanú';
+$labels['flaganswered'] = 'Zodpovedanú';
+$labels['flagdraft'] = 'Koncept';
+$labels['flagflagged'] = 'Označenú';
+$labels['addsieverule'] = 'Pridať ďalšiu podmienku';
+$labels['addsieveact'] = 'Pridať ďalšiu akciu';
+$labels['deletesieverule'] = 'Vymazať túto podmienku';
+$labels['deletesieveact'] = 'Vymazať túto akciu';
+$labels['envelopefrom'] = 'Odosielateľ na obálke';
+$labels['envelopeto'] = 'Adresát na obálke';
+$labels['otherheader'] = 'Iná hlavička';
+$labels['days'] = 'Obdobie';
+$labels['message'] = 'Správa';
+$labels['sieveruleheaders'] = 'Zobraziť príklady ďalších hlavičiek';
+$labels['examplefilters'] = 'Pripravené pravidlá';
+$labels['importfilters'] = 'Importovať pravidlá';
+$labels['usedefaultfilter'] = 'Použiť predvolené pravidlá';
+$labels['importfilter'] = 'Importovať pravidlo';
+$labels['adveditor'] = 'Pokročilý editor';
+$labels['messageredirectcopy'] = 'Preposlať kópiu na';
+$labels['messagecopyto'] = 'Kopírovať správu do';
+$labels['body'] = 'Telo';
+$labels['auto'] = 'Automatické';
+$labels['raw'] = 'Hrubé';
+$labels['text'] = 'Text';
+$labels['other'] = 'Iné';
+$labels['bodycontentpart'] = 'Obsah správy';
+$labels['notchecked'] = 'nekontrolovaný';
+$labels['spamlevelisgreaterthanequal'] = 'je väčší, alebo rovný ako';
+$labels['spamlevelislessthanequal'] = 'je menší, alebo rovný ako';
+$labels['spamlevelequals'] = 'je rovný';
+$labels['i;ascii-casemap'] = 'text sa zhoduje bez rozlíšenia veľkosti písmen';
+$labels['i;octet'] = 'text sa zhoduje';
+$labels['i;ascii-numeric'] = 'číslo sa zhoduje';
+
+$messages = array();
+$messages['nosieverules'] = 'Žiadne pravidlá neboli nájdené.';
+$messages['filterdeleteconfirm'] = 'Ste si istí, že chcete toto pravidlo naozaj vymazať?';
+$messages['ruledeleteconfirm'] = 'Ste si istí, že chcete túto podmienku naozaj vymazať?';
+$messages['actiondeleteconfirm'] = 'Ste si istí, že chcete túto akciu naozaj vymazať?';
+$messages['filterunknownerror'] = 'Neznáma chyba servera';
+$messages['filterconnerror'] = 'Nie je možné pripojiť sa k sieve serveru';
+$messages['filterdeleteerror'] = 'Pravidlo nie je možné vymazať. Vyskytla sa chyba serveru';
+$messages['filterdeleted'] = 'Pravidlo bolo úspešne vymazané';
+$messages['filtersaved'] = 'Pravidlo bolo úspešne uložené';
+$messages['filtersaveerror'] = 'Pravidlo nie je možné uložiť. Vyskytla sa chyba serveru';
+$messages['vacdaysexp'] = "Obdobie je počet dní, počas ktorého nebude správa posielaná rovnakému užívateľovi bez ohľadu na to, koľko krát Vás bude kontaktovať. Napr.: Ak si nastavíte obdobie na 7 (dní) a Jozef Vám pošle e-mail v pondelok, v stredu, v nedeľu a na ďalší pondelok, dostane správu o Vašej neprítomnosti vždy len v pondelok.";
+$messages['vachandleexp'] = 'Odkaz sa dá použiť na pripojenie iných dovolenkových správ. Každá z nich sa v nastavenom období použije len raz.';
+$messages['vactoexp'] = "Zoznam ďalších adresátov zahrnutých do automatického odpovedania. Ak e-mail nie je adresovaný na Vašu hlavnú e-mailovú adresu ani na adresu v tomto zozname, automatická odpoveď sa neposiela.";
+$messages['norulename'] = 'Zadajte prosím názov pravidla';
+$messages['ruleexists'] = 'Pravidlo s týmto názvom už existuje. Zadajte prosím iný názov';
+$messages['noheader'] = 'Zadajte prosím názov hlavičky pre porovnanie';
+$messages['headerbadchars'] = 'Chyba: Hlavička obsahuje zakázané znaky';
+$messages['noheadervalue'] = 'Zadajte prosím hodnotu s ktorou sa má hlavička porovnávať';
+$messages['sizewrongformat'] = 'Chyba: Veľkosť správy musí byť číslo';
+$messages['noredirect'] = 'Zadajte prosím e-mailovú adresu na ktorú sa má správa preposlať';
+$messages['redirectaddresserror'] = 'Chyba: Adresa vyzerá ako neplatná';
+$messages['noreject'] = 'Zadajte prosím správu, ktorá sa pošle s odmietnutím';
+$messages['vacnodays'] = 'Zadajte prosím do obdobia počet dní, počas ktorých nebude automatická odpoveď posielaná rovnakému užívateľovi';
+$messages['vacdayswrongformat'] = 'Chyba: Obdobie musí byť číslo väčšie, alebo rovné 1';
+$messages['vacnomsg'] = 'Zadajte prosím nejaký text správy';
+$messages['notifynomethod'] = 'Zadajte prosím spôsob, ktorým má byť upozornenie poslané';
+$messages['notifynomsg'] = 'Zadajte prosím text Vašej správy';
+$messages['sieveruleexp'] = "Zadefinujte prosím podmienky s ktorými bude správa porovnávaná. Pravidlá sa vyhodnocujú v poradí v akom sú zobrazené v ľavej časti tejto obrazovky. Ak sa nájde zhoda, ďalšie pravidlá sa vyhodnocovať nebudú.";
+$messages['sieveactexp'] = 'Vyberte prosím zo zoznamu akciu, ktorá sa bude vykonávať pre všetky e-maily vyhovujúce podmienke/podmienkam vyššie.';
+$messages['sieveheadershlp'] = 'Nižšie je uvedených niekoľko príkladov hlavičiek, ktoré môžu byť použité v podmienkach. Vyberte si tú, ktorú chcete vložiť do podmienky hore, alebo zadajte názov hlavičky do okienka ručne.';
+$messages['movingfilter'] = 'Presúvam pravidlo...';
+$messages['noexistingfilters'] = 'Žiadne pravidlo nebolo nájdené!';
+$messages['importdefault'] = '<b>Použiť pripravené pravidlá:</b> Je dostupných niekoľko pravidiel. Chcete ich použiť?';
+$messages['importother'] = '<b>Importovať pravidlá:</b> Ďalšia sada pravidiel bola nájdená v %s. Chcete ich importovať?';
+$messages['switchtoadveditor'] = 'Prepnutie do pokročilého editora Vám umožní priamo editovať súbor pravidel. Úpravy, ktoré tu urobíte môžu byť pre štandardný editor pravidiel nečitateľné a môžu sa pri uložení v ňom stratiť. Chcete pokračovať?';
+$messages['filterimported'] = 'Pravidlá boli úspešne importované';
+$messages['filterimporterror'] = 'Pravidlá nebolo možné importovať. Vyskytla sa chyba servera';
+$messages['notifyinvalidmethod'] = 'Vyzerá to, že metóda nie je zapísaná v platnom formáte. Musí to byť URI. Napr.: `mailto:adresa@domena.sk`.';
+$messages['nobodycontentpart'] = 'Zadajte prosím obsahovú časť testu';
+$messages['badoperator'] = 'Prepáčte, ale operátor ktorý ste vybrali nemôže byť v tejto podmienke použitý';
+$messages['filteractionerror'] = 'Akcia, ktorú ste vybrali nie je podporovaná serverom';
+$messages['filtermissingerror'] = 'Nepodarilo sa nájsť požadovanú podmienku';
+$messages['contentpartexp'] = 'Typ MIME, alebo špecifická časť správy, ktorá má byť testovaná. Napr.: `message/rfc822`, `text/html`, `audio/mp3` či `image`.';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/sl_SI.inc b/plugins/sieverules/localization/sl_SI.inc
new file mode 100644
index 000000000..16bc1851d
--- /dev/null
+++ b/plugins/sieverules/localization/sl_SI.inc
@@ -0,0 +1,185 @@
+<?php
+/* Author: Jernej Simončič */
+
+$labels = array();
+$labels['filters'] = 'Pravila';
+$labels['managefilters'] = 'Upravljal pravila';
+$labels['filtername'] = 'Ime';
+$labels['disablerule'] = 'Onemogoči pravilo';
+$labels['disabled'] = 'Onemogočeno';
+$labels['newfilter'] = 'Novo pravilo';
+$labels['moveup'] = 'Premakni višje';
+$labels['movedown'] = 'Premakni nižje';
+$labels['filterallof'] = 'sporočilo zadošča vsem pogojem';
+$labels['filteranyof'] = 'sporočilo zadošča kateremukoli od pogojev';
+$labels['filterany'] = 'vsa sporočila';
+$labels['filtercontains'] = 'vsebuje';
+$labels['filternotcontains'] = 'ne vsebuje';
+$labels['filteris'] = 'je enak';
+$labels['filterisnot'] = 'ni enak';
+$labels['filterexists'] = 'obstaja';
+$labels['filternotexists'] = 'ne obstaja';
+$labels['filterregex'] = 'ustreza regularnemu izrazu';
+$labels['filternotregex'] = 'ne ustreza regularnemu izrazu';
+$labels['filterunder'] = 'je manj kot';
+$labels['filterover'] = 'je več kot';
+$labels['filterbefore'] = 'je pred';
+$labels['filterafter'] = 'je po';
+$labels['filteradvoptions'] = 'več možnosti...';
+$labels['spamtest'] = 'spam verjetnost';
+$labels['operator'] = 'Operater';
+$labels['comparator'] = 'Primerjava';
+$labels['isgreaterthan'] = 'je večje kot';
+$labels['isgreaterthanequal'] = 'je večje ali enako';
+$labels['islessthan'] = 'je manjše kot';
+$labels['islessthanequal'] = 'je manjše ali enako';
+$labels['equals'] = 'je enako';
+$labels['notequals'] = 'ni enako';
+$labels['countisgreaterthan'] = 'število je večje kot';
+$labels['countisgreaterthanequal'] = 'število je večje ali enako';
+$labels['countislessthan'] = 'število je manjše kot';
+$labels['countislessthanequal'] = 'število je manjše ali enako';
+$labels['countequals'] = 'število je enako';
+$labels['countnotequals'] = 'število ni enako';
+$labels['valueisgreaterthan'] = 'vrednost je večja kot';
+$labels['valueisgreaterthanequal'] = 'vrednost je večja ali enaka';
+$labels['valueislessthan'] = 'vrednost je manjša kot';
+$labels['valueislessthanequal'] = 'vrednost je manjša ali enaka';
+$labels['valueequals'] = 'vrednost je enaka';
+$labels['valuenotequals'] = 'vrednost ni enaka';
+$labels['userpart'] = 'uporabniški del naslova je enak';
+$labels['notuserpart'] = 'uporabniški del naslova ni enak';
+$labels['detailpart'] = 'podrobni del naslova je enak';
+$labels['notdetailpart'] = 'podrobni del naslova ni enak';
+$labels['domainpart'] = 'domena je enaka';
+$labels['notdomainpart'] = 'domena ni enaka';
+$labels['teststring'] = 'Vzorčno besedilo';
+$labels['messagemoveto'] = 'Premakni sporočilo v';
+$labels['messageredirect'] = 'Preusmeri sporočilo';
+$labels['messageimapflags'] = 'Označi sporočilo kot';
+$labels['messagereject'] = 'Zavrni s sporočilom';
+$labels['messagevacation'] = 'Samodejni odgovor';
+$labels['messagekeep'] = 'Ohrani sporočilo';
+$labels['messagediscard'] = 'Zavrzi sporočilo';
+$labels['messagenotify'] = 'Pošlji obvestilo';
+$labels['messagestop'] = 'Prenehaj z izvajanjem pravil';
+$labels['messagehelp'] = 'Kaj je to?';
+$labels['sieveorigsubj'] = 'Pripni originalno zadevo k odgovoru';
+$labels['sievevachandle'] = 'Vzdevek';
+$labels['method'] = 'Metoda';
+$labels['options'] = 'Možnosti';
+$labels['messagesrules'] = 'Pogoji';
+$labels['messagesactions'] = 'Dejanja';
+$labels['sieveto'] = 'Drugi prejemniki';
+$labels['sievefrom'] = 'Od';
+$labels['flag'] = 'Pomembnost';
+$labels['importancen'] = 'Brez';
+$labels['importance1'] = 'Visoka';
+$labels['importance2'] = 'Običajna';
+$labels['importance3'] = 'Nizka';
+$labels['flagread'] = 'Prebrano';
+$labels['flagdeleted'] = 'Izbrisano';
+$labels['flaganswered'] = 'Odgovorjeno';
+$labels['flagdraft'] = 'Osnutek';
+$labels['flagflagged'] = 'Zastavica';
+$labels['addsieverule'] = 'Dodaj novo pravilo';
+$labels['addsieveact'] = 'Dodaj novo dejanje';
+$labels['deletesieverule'] = 'Izbriši to pravilo';
+$labels['deletesieveact'] = 'Izbriši to dejanje';
+$labels['envelopefrom'] = 'Pošiljatelj ovojnice';
+$labels['envelopeto'] = 'Prejemnik ovojnice';
+$labels['otherheader'] = 'Druga polja';
+$labels['days'] = 'Ponovitev';
+$labels['message'] = 'Sporočilo';
+$labels['sieveruleheaders'] = 'Prikaži vzorce polj';
+$labels['examplefilters'] = 'Vzorčni filtri';
+$labels['importfilters'] = 'Uvozi filtre';
+$labels['usedefaultfilter'] = 'Uporabi privzete filtre';
+$labels['importfilter'] = 'Uvozi filter';
+$labels['moreactions'] = 'Več možnosti...';
+$labels['adveditor'] = 'Napredni urejevalnik';
+$labels['stdeditor'] = 'Običajni urejevalnik';
+$labels['messageredirectcopy'] = 'Pošlji kopijo';
+$labels['messagecopyto'] = 'Kopiraj sporočilo v';
+$labels['body'] = 'Telo';
+$labels['auto'] = 'Samodejno';
+$labels['raw'] = 'Surovo';
+$labels['text'] = 'Besedilo';
+$labels['other'] = 'Drugo';
+$labels['bodycontentpart'] = 'Del vsebine';
+$labels['notchecked'] = 'ni pregledano';
+$labels['spamlevelisgreaterthanequal'] = 'je večja ali enaka';
+$labels['spamlevelislessthanequal'] = 'je manjša ali enaka';
+$labels['spamlevelequals'] = 'je enaka';
+$labels['i;ascii-casemap'] = 'primerjaj brez razlikovanja velikih in malih črk';
+$labels['i;octet'] = 'primerjaj z razlikovanjem velikih in malih črk';
+$labels['i;ascii-numeric'] = 'primerjaj kot število';
+$labels['selectruleset'] = 'Izberi zbirko pravil';
+$labels['activeruleset'] = '%s (aktivna)';
+$labels['activateruleset'] = 'Aktiviraj to zbirko';
+$labels['newruleset'] = 'Ustvari novo zbirko';
+$labels['delruleset'] = 'Izbriši to zbirko';
+$labels['renameruleset'] = 'Preimenuj to zbirko';
+$labels['copy'] = 'Kopiraj';
+$labels['copyexistingfilter'] = 'Kopiraj obstoječa pravila';
+$labels['copytoruleset'] = 'Kopiraj pravilo v drugo zbirko';
+$labels['copyfromruleset'] = 'Kopiraj pravila iz obstoječe zbirke';
+$labels['time'] = 'Čas';
+$labels['weekday'] = 'Dan v tednu';
+
+$messages = array();
+$messages['nosieverules'] = 'Ni pravil.';
+$messages['filterdeleteconfirm'] = 'Ali resnično želiš izbrisati to pravilo?';
+$messages['ruledeleteconfirm'] = 'Ali resnično želiš izbrisati ta pogoj?';
+$messages['actiondeleteconfirm'] = 'Ali resnično želiš izbrisati to dejanje?';
+$messages['filterunknownerror'] = 'Neznana napaka strežnika';
+$messages['filterconnerror'] = 'Ni se bilo mogoče povezati na strežnik sieve';
+$messages['filterdeleteerror'] = 'Ni mogoče izbrisati pravila. Prišlo je do napake strežnika';
+$messages['filterdeleted'] = 'Pravilo izbrisano';
+$messages['filtersaved'] = 'Pravilo shranjeno';
+$messages['filtersaveerror'] = 'Ni mogoče shraniti pravila. Prišlo je do napake strežnika';
+$messages['vacdaysexp'] = 'Ponovitev je število dni, ki mora preteči, preden bo sporočilo znova poslano istemu pošiljatelju, ne glede na to, koliko sporočil je poslal v tem času.<br /><br />Npr.: če Janez pošlje sporočilo v ponedeljek, in je ponovitev nastavljena na 7, potem bo dobil odgovor v ponedeljek, še enega pa ne bo dobil pred naslednjim ponedeljkom, ne glede na to, koliko sporočil bo poslal vmes.';
+$messages['vachandleexp'] = 'Z vzdevkom se lahko med seboj poveže več različnih samodejnih odgovorov - ko je bil samodejni odgovor z nekim vzdevkom poslan, ne bo v tej ponovitvi poslano noben drug odgovor z istim vzdevkom.';
+$messages['vactoexp'] = 'Seznam dodatnih naslovov prejemnikov, ki bodo vključeni pri samodejnem odgovarjanju. Če naslova prejemnika sporočila ni na tem seznamu, samodejni odgovor na sporočilo ne bo poslan.';
+$messages['vactoexp_adv'] = 'Naslove ločite z vejicami. Primer: naslov1@example.com,naslov2@example.org,naslov3@example.com';
+$messages['vactoexp_err'] = 'Napaka: naslovi morajo biti ločeni z vejicami (,)';
+$messages['norulename'] = 'Vnesite ime pravila';
+$messages['ruleexists'] = 'Pravilo s tem imenom že obstaja. Vnesite drugo ime';
+$messages['noheader'] = 'Vnesite ime polja';
+$messages['headerbadchars'] = 'Napaka: polje vsebuje nedovoljene znake';
+$messages['noheadervalue'] = 'Vnesite vrednost, s katero se preizkuša polje';
+$messages['sizewrongformat'] = 'Napaka: velikost sporočila mora biti število';
+$messages['noredirect'] = 'Vnestie e-poštni naslov, na katerega naj se preusmeri sporočilo';
+$messages['redirectaddresserror'] = 'Napaka: naslov ni videti veljaven';
+$messages['noreject'] = 'Vnesite sporočilo, ki naj se pošlje z zavrnitvijo';
+$messages['vacnodays'] = 'Vnesite število dni, po preteku katerih se bo samodejni odgovor ponovil';
+$messages['vacdayswrongformat'] = 'Napaka: ponovitev mora biti večja ali enaka 1';
+$messages['vacnomsg'] = 'Vnesite besedilo sporočila';
+$messages['notifynomethod'] = 'Vnesite metodo, s katero naj bo poslano sporočilo';
+$messages['notifynomsg'] = 'Vnesite besedilo sporočila';
+$messages['sieveruleexp'] = 'Pripravite enega ali več pogojev, pod katerimi bo to pravilo uveljavljeno. Pravila se izvajajo v vrstnem redu, po katerem so razvrščena na seznamu na levi strani. Če sporočilo ustreza pogojem, se nadaljna pravila ne bodo izvedla.';
+$messages['sieveruleexp_stop'] = 'Pripravite enega ali več pogojev, pod katerimi bo to pravilo uveljavljeno. Pravila se izvajajo v vrstnem redu, po katerem so razvrščena na seznamu na levi strani, in se izvajajo do dejanja ›Prenehaj‹.';
+$messages['sieveactexp'] = 'Izberite eno od spodnjih možnosti. Ta dejanja se bodo izvedla za vsako sporočilo, ki ustreza zgornjim pravilom.';
+$messages['sieveheadershlp'] = 'Spodaj je nekaj primerov drugih polj, ki jih lahko preizkušajo pravila. Izberite polje s seznama, ali pa vnesite poljubno polje.';
+$messages['movingfilter'] = 'Premikam pravilo...';
+$messages['noexistingfilters'] = 'Obstoječa pravila niso bila zaznana!';
+$messages['importdefault'] = '<b>Uporabi privzeta pravila:</b> na voljo so privzeta pravila. Ali jih želite uvoziti?';
+$messages['importother'] = '<b>Uvozi filtre:</b> Najdena je bila druga zbirka pravil %s. Ali želite uvoziti ta pravila v trenutno zbirko?';
+$messages['switchtoadveditor'] = 'Preklop v napredni urejevalnik omogoča neposredno urejanje datoteke sieve. Sprememb, ki jih naredite v naprednem urejevalniku, običajni urejevalnik morda ne bo razumel, in se lahko izgubijo, če pravila shranite z običajnim urejevalnikom. Ali želite nadaljevati?';
+$messages['filterimported'] = 'Pravilo uspešno uvoženo';
+$messages['filterimporterror'] = 'Pravila ni bilo mogoče uvoziti. Prišlo je do napake strežnika';
+$messages['notifyinvalidmethod'] = 'Metoda mora biti zapisana v URI formatu, npr.: ›mailto:alert@example.com‹.';
+$messages['nobodycontentpart'] = 'Vnesite del vsebine za preizkus';
+$messages['badoperator'] = 'Izbranega operaterja ne morete uporabiti s tem pravilom';
+$messages['filteractionerror'] = 'Strežnik ne podpira željenega dejanja';
+$messages['filtermissingerror'] = 'Željenega pravila ni bilo mogoče najti';
+$messages['contentpartexp'] = 'MIME vrsta ali specifičen del sporočila, ki naj se testira. Npr.: ›message/rfc822‹, ›text/html‹, ›audio/mp3‹ ali ›image‹.';
+$messages['delrulesetconf'] = 'Ali ste prepričani, da želite izbrisati izbrano zbirko?';
+$messages['rulesetexists'] = 'Zbirka s tem imenom že obstaja. Vnesite drugo ime';
+$messages['copyexisting'] = '<b>Kopiraj obstoječo zbirko:</b> Ali želite kopirati pravila iz obstoječe zbirke v trenutno?';
+$messages['filtercopied'] = 'Pravilo uspešno prekopirano';
+$messages['nosieverulesets'] = 'Ni zbirk.';
+$messages['baddateformat'] = 'Napaka: vnesite datum v obliki LLLL-MM-DD';
+$messages['badtimeformat'] = 'Napaka: vnesite čas v obliki UU:MM:SS';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/sv_SE.inc b/plugins/sieverules/localization/sv_SE.inc
new file mode 100644
index 000000000..2aa2d4e03
--- /dev/null
+++ b/plugins/sieverules/localization/sv_SE.inc
@@ -0,0 +1,159 @@
+<?php
+/* Author: Ida Wellner */
+
+$labels = array();
+$labels['filters'] = 'Filter';
+$labels['managefilters'] = 'Hantera filter';
+$labels['filtername'] = 'Filternamn';
+$labels['disablerule'] = 'Inaktivera regel';
+$labels['disabled'] = 'Inaktiverad';
+$labels['newfilter'] = 'Nytt filter';
+$labels['moveup'] = 'Flytta uppåt';
+$labels['movedown'] = 'Flytta nedåt';
+$labels['filterallof'] = 'matcha samtliga av följande regler';
+$labels['filteranyof'] = 'matcha en av följande regler';
+$labels['filterany'] = 'alla meddelanden';
+$labels['filtercontains'] = 'innehåller';
+$labels['filternotcontains'] = 'inte innehåller';
+$labels['filteris'] = 'är';
+$labels['filterisnot'] = 'inte är';
+$labels['filterexists'] = 'existerar';
+$labels['filternotexists'] = 'inte existerar';
+$labels['filterregex'] = 'matchar följande reguljära uttryck';
+$labels['filternotregex'] = 'inte matchar följande reguljära uttryck';
+$labels['filterunder'] = 'är mindre än';
+$labels['filterover'] = 'är större än';
+$labels['filteradvoptions'] = 'fler inställningar...';
+$labels['spamtest'] = 'Spamklassning';
+$labels['operator'] = 'Operator';
+$labels['comparator'] = 'Typ av matchning';
+$labels['isgreaterthan'] = 'är större än';
+$labels['isgreaterthanequal'] = 'är större än eller lika med';
+$labels['islessthan'] = 'är mindre än';
+$labels['islessthanequal'] = 'är mindre än eller lika med';
+$labels['equals'] = 'är lika med';
+$labels['notequals'] = 'är inte lika med';
+$labels['countisgreaterthan'] = 'antal är större än';
+$labels['countisgreaterthanequal'] = 'antal är större än eller lika med';
+$labels['countislessthan'] = 'antal är mindre än';
+$labels['countislessthanequal'] = 'antal är mindre än eller lika med';
+$labels['countequals'] = 'antal är lika med';
+$labels['countnotequals'] = 'antal är inte lika med';
+$labels['valueisgreaterthan'] = 'värdet är större än';
+$labels['valueisgreaterthanequal'] = 'värdet är större än eller lika med';
+$labels['valueislessthan'] = 'värdet är mindre än';
+$labels['valueislessthanequal'] = 'värdet är mindre än eller lika med';
+$labels['valueequals'] = 'värdet är lika med';
+$labels['valuenotequals'] = 'värdet är inte lika med';
+$labels['userpart'] = 'användare är lika med';
+$labels['notuserpart'] = 'användare är inte lika med';
+$labels['detailpart'] = 'klartextnamn är lika med';
+$labels['notdetailpart'] = 'klartextnamn är inte lika med';
+$labels['domainpart'] = 'domän är lika med';
+$labels['notdomainpart'] = 'domän är inte lika med';
+$labels['teststring'] = 'Matcha mot';
+$labels['messagemoveto'] = 'Flytta meddelande till';
+$labels['messageredirect'] = 'Omdirigera meddelande till';
+$labels['messageimapflags'] = 'Markera meddelande som';
+$labels['messagereject'] = 'Avvisa med meddelande';
+$labels['messagevacation'] = 'Frånvarobesked';
+$labels['messagekeep'] = 'Behåll meddelandet';
+$labels['messagediscard'] = 'Kasta meddelandet';
+$labels['messagenotify'] = 'Skicka notifiering';
+$labels['messagestop'] = 'Sluta behandla filter';
+$labels['messagehelp'] = 'Vad är detta?';
+$labels['sieveorigsubj'] = 'Lägg till orginalmeddelandets ämnesrad i svaret';
+$labels['sievevachandle'] = 'Id';
+$labels['method'] = 'Metod';
+$labels['options'] = 'Options';
+$labels['messagesrules'] = 'Filterregler';
+$labels['messagesactions'] = 'Filteråtgärder';
+$labels['sieveto'] = 'Alias';
+$labels['sievefrom'] = 'Från';
+$labels['flag'] = 'Prioritet';
+$labels['importancen'] = 'Ingen';
+$labels['importance1'] = 'Hög';
+$labels['importance2'] = 'Normal';
+$labels['importance3'] = 'Låg';
+$labels['flagread'] = 'Läst';
+$labels['flagdeleted'] = 'Borttaget';
+$labels['flaganswered'] = 'Besvarat';
+$labels['flagdraft'] = 'Utkast';
+$labels['flagflagged'] = 'Flaggat';
+$labels['addsieverule'] = 'Lägg till ytterligare regel under denna';
+$labels['addsieveact'] = 'Lägg till ytterligare åtgärd under denna';
+$labels['deletesieverule'] = 'Ta bort denna regel';
+$labels['deletesieveact'] = 'Ta bort denna åtgärd';
+$labels['envelopefrom'] = 'Kuvertavsändare';
+$labels['envelopeto'] = 'Kuvertmottagare';
+$labels['otherheader'] = 'Annat brevhuvud';
+$labels['days'] = 'Dagar';
+$labels['message'] = 'Meddelande';
+$labels['sieveruleheaders'] = 'Se exempel på andra brevhuvuden';
+$labels['examplefilters'] = 'Exempelfilter';
+$labels['importfilters'] = 'Importera filter';
+$labels['usedefaultfilter'] = 'Använd standardfilter';
+$labels['importfilter'] = 'Importera filter';
+$labels['adveditor'] = 'Avancerad editor';
+$labels['messageredirectcopy'] = 'Skicka en kopia till';
+$labels['messagecopyto'] = 'Kopiera meddelandet till';
+$labels['body'] = 'Meddelandetext';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Annat';
+$labels['bodycontentpart'] = 'Innehållsdel';
+$labels['notchecked'] = 'inte kontrollerat';
+$labels['spamlevelisgreaterthanequal'] = 'är större än eller lika med';
+$labels['spamlevelislessthanequal'] = 'är mindre än eller lika med';
+$labels['spamlevelequals'] = 'är lika med';
+$labels['i;ascii-casemap'] = 'ej skiftlägeskänslig strängmatchning';
+$labels['i;octet'] = 'exakt strängmatchning';
+$labels['i;ascii-numeric'] = 'numerisk matchning';
+
+$messages = array();
+$messages['nosieverules'] = 'Inga filter funna.';
+$messages['filterdeleteconfirm'] = 'Är du säker på att du vill ta bort det här filtret?';
+$messages['ruledeleteconfirm'] = 'Är du säker på att du vill radera den här regeln?';
+$messages['actiondeleteconfirm'] = 'Är du säker på att du vill radera den här åtgärden?';
+$messages['filterunknownerror'] = 'Okänt serverfel';
+$messages['filterconnerror'] = 'Kan ej kontakta sieve-servern';
+$messages['filterdeleteerror'] = 'Kan ej ta bort filtret. Ett serverfel inträffade.';
+$messages['filterdeleted'] = 'Filtret har tagits bort';
+$messages['filtersaved'] = 'Filret har sparats';
+$messages['filtersaveerror'] = 'Kan inte spara filtret. Ett serverfel inträffade.';
+$messages['vacdaysexp'] = 'Frånvaromeddelandet kommer endast att skickas en gång till samma användare under det antal dagar som anges ovan, oavsett hur många gånger den personen mailar dig.<br /> <br />Exempel: Om Joe mailar dig på måndag och antalet dagar är 7 kommer han att få ett frånvaromeddelande på måndag, men sedan får han inget nytt förrän nästa måndag oavsett hur många gånger han mailar dig under veckan.';
+$messages['vachandleexp'] = 'Ett id kan använndas för att länka samman flera frånvaromeddelanden. När ett frånvaromeddelande med detta id har skickats kommer inga fler att frånvaromeddelanden med samma id att skickas under perioden.';
+$messages['vactoexp'] = 'Frånvaromeddelandet skickas enbart till din huvudsakliga adress + de adresser du valt i listan ovan. Har du fler mottagaradresser du vill kunna välja bland måste du först lägga till dessa under Profiler.';
+$messages['norulename'] = 'Fyll i ett namn på detta filter.';
+$messages['ruleexists'] = 'Ett filter med det valda namnet finns redan. Vänligen fyll i ett annat namn.';
+$messages['noheader'] = 'Fyll i namnet på brevhuvudet';
+$messages['headerbadchars'] = 'Fel: Brevhuvudet innehåller otillåtna tecken';
+$messages['noheadervalue'] = 'Fyll i ett värde som brevhuvudet ska testas mot';
+$messages['sizewrongformat'] = 'Fel: Meddelandestorlek måste anges i siffror';
+$messages['noredirect'] = 'Fyll i en e-postadress att omdirigera meddelanden till';
+$messages['redirectaddresserror'] = 'Fel: e-postadressen har inte giltigt format';
+$messages['noreject'] = 'Fyll i ett meddelande som ska skickas med brev som avvisas';
+$messages['vacnodays'] = 'Fyll i antalet dagar för den period under vilken meddelandet inte kommer att skickas på nytt till samma person';
+$messages['vacdayswrongformat'] = 'Fel: Antalet dagar måste vara ett tal större än eller lika med 1';
+$messages['vacnomsg'] = 'Fyll i text som ska skickas i frånvaromeddelandet';
+$messages['notifynomethod'] = 'Fyll i med vilken metod notifieringen ska skickas';
+$messages['notifynomsg'] = 'Fyll i en notifieringstext';
+$messages['sieveruleexp'] = 'Definiera en eller flera regler som varje meddelande kommer att testas mot. Filter körs i den ordning de listas till vänster.';
+$messages['sieveactexp'] = 'Välj bland alternativen nedan. Dessa åtgärder kommer att utföras varje gång ett meddelande matchar reglerna ovan.';
+$messages['sieveheadershlp'] = 'Detta är några exempel på andra brevhuvudet som filtren kan testa. Välj ett brevhuvud för att lägga till det till regeln eller fyll i ett eget brevhuvud.';
+$messages['movingfilter'] = 'Flyttar filter...';
+$messages['noexistingfilters'] = 'Hittar inga existerande filter!';
+$messages['importdefault'] = '<b>Använd standardfilter:</b> Det finns en uppsättning standardfilter tillgängliga. Skulle du vilja använda dem?';
+$messages['importother'] = '<b>Importera filter:</b> En annan uppsättning filter från %s har upptäckts. Skulle du vilja importera dem till din nuvarande filteruppsättning?';
+$messages['switchtoadveditor'] = 'Med den avancerade editorn kan du redigera din filterfil direkt. Ändringar gjorda där kan gå förlorade om du senare redigerar dina filter via den vanliga filterredigeringen. Vill du fortsätta?';
+$messages['filterimported'] = 'Importen av filter lyckades';
+$messages['filterimporterror'] = 'Importen av filter misslyckades. Ett serverfel uppstod.';
+$messages['notifyinvalidmethod'] = 'Den angivna metoden har inte ett giltigt format, det måste vara en URI. Exempel: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Fyll i vilken del av innehållet som ska testas';
+$messages['badoperator'] = 'Den valda operatorn kan inte användas i den här regeln';
+$messages['filteractionerror'] = 'Den valda åtgärden stöds inte av servern';
+$messages['filtermissingerror'] = 'Kan inte hitta den önskade regeln';
+$messages['contentpartexp'] = 'Fyll i MIME-typ eller specifik del av meddelandet som ska testas. Exempel: `message/rfc822`, `text/html`, `audio/mp3`';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/localization/zh_TW.inc b/plugins/sieverules/localization/zh_TW.inc
new file mode 100644
index 000000000..4f63b1e70
--- /dev/null
+++ b/plugins/sieverules/localization/zh_TW.inc
@@ -0,0 +1,192 @@
+<?php
+/* Author: Guo-Wei Su */
+
+$labels = array();
+$labels['filters'] = '郵件規則';
+$labels['managefilters'] = '管理郵件規則';
+$labels['filtername'] = '規則名稱';
+$labels['disablerule'] = '停用規則';
+$labels['disabled'] = '停用';
+$labels['newfilter'] = '建立新規則';
+$labels['moveup'] = '上移';
+$labels['movedown'] = '下移';
+$labels['filterallof'] = '符合所有條件';
+$labels['filteranyof'] = '符合任何一個條件';
+$labels['filterany'] = '所有郵件';
+$labels['filtercontains'] = '包含';
+$labels['filternotcontains'] = '不包含';
+$labels['filteris'] = '等於';
+$labels['filterisnot'] = '不等於';
+$labels['filterexists'] = '存在';
+$labels['filternotexists'] = '不存在';
+$labels['filterregex'] = '符合正則表示式';
+$labels['filternotregex'] = '不符合正則表示式';
+$labels['filterunder'] = '小於';
+$labels['filterover'] = '大於';
+$labels['filterbefore'] = '之前';
+$labels['filterafter'] = '之後';
+$labels['filteradvoptions'] = '更多選項...';
+$labels['spamtest'] = 'Spam 可能性';
+$labels['operator'] = '操作';
+$labels['comparator'] = '比較';
+$labels['isgreaterthan'] = '大於';
+$labels['isgreaterthanequal'] = '大於或等於';
+$labels['islessthan'] = '小於';
+$labels['islessthanequal'] = '小於或等於';
+$labels['equals'] = '等於';
+$labels['notequals'] = '不等於';
+$labels['countisgreaterthan'] = '數量大於';
+$labels['countisgreaterthanequal'] = '數量大於或等於';
+$labels['countislessthan'] = '數量少於';
+$labels['countislessthanequal'] = '數量少於或等於';
+$labels['countequals'] = '數量等於';
+$labels['countnotequals'] = '數量不等於';
+$labels['valueisgreaterthan'] = '值大於';
+$labels['valueisgreaterthanequal'] = '值大於或等於';
+$labels['valueislessthan'] = '值小於';
+$labels['valueislessthanequal'] = '值小於或等於';
+$labels['valueequals'] = '值等於';
+$labels['valuenotequals'] = '值不等於';
+$labels['userpart'] = 'user part equals';
+$labels['notuserpart'] = 'user part does not equal';
+$labels['detailpart'] = 'detail part equals';
+$labels['notdetailpart'] = 'detail part does not equal';
+$labels['domainpart'] = 'domain part equals';
+$labels['notdomainpart'] = 'domain part does not equal';
+$labels['teststring'] = '測試字串';
+$labels['messagemoveto'] = '移動郵件至';
+$labels['messageredirect'] = 'Redirect message to';
+$labels['messageimapflags'] = '變更為';
+$labels['messagereject'] = '拒絕郵件';
+$labels['messagevacation'] = '不在辦公室訊息';
+$labels['messagekeep'] = '保留郵件';
+$labels['messagediscard'] = '丟棄郵件';
+$labels['messagenotify'] = '寄送通知';
+$labels['messagestop'] = '中斷郵件規則';
+$labels['messagehelp'] = '這是什麼?';
+$labels['sieveorigsubj'] = '附加來件主旨至回信主旨中';
+$labels['sievevachandle'] = 'Handle';
+$labels['method'] = '方式';
+$labels['options'] = '選項';
+$labels['messagesrules'] = '規則條件';
+$labels['messagesactions'] = '規則動作';
+$labels['sieveto'] = '別名';
+$labels['sievefrom'] = '寄件者';
+$labels['flag'] = '重要性';
+$labels['importancen'] = '無';
+$labels['importance1'] = '高';
+$labels['importance2'] = '一般';
+$labels['importance3'] = '低';
+$labels['flagread'] = '讀取';
+$labels['flagdeleted'] = '刪除';
+$labels['flaganswered'] = '已答覆';
+$labels['flagdraft'] = '草稿';
+$labels['flagflagged'] = '標幟';
+$labels['addsieverule'] = '新增條件,在這筆之後';
+$labels['addsieveact'] = '新增動作,在這筆之後';
+$labels['deletesieverule'] = '刪除這個條件';
+$labels['deletesieveact'] = '刪除這個動作';
+$labels['envelopefrom'] = 'Envelope From';
+$labels['envelopeto'] = 'Envelope To';
+$labels['otherheader'] = '其他郵件表頭';
+$labels['days'] = '期間';
+$labels['message'] = '訊息';
+$labels['sieveruleheaders'] = '顯示表頭範例';
+$labels['examplefilters'] = '規則範例';
+$labels['importfilters'] = '匯入規則';
+$labels['usedefaultfilter'] = '使用預設規則';
+$labels['importfilter'] = '匯入規則';
+$labels['moreactions'] = '更多選項...';
+$labels['adveditor'] = '進階編輯器';
+$labels['stdeditor'] = '一般編輯器';
+$labels['messageredirectcopy'] = '寄送副本到';
+$labels['messagecopyto'] = '複製郵件到';
+$labels['body'] = 'Body';
+$labels['auto'] = 'Auto';
+$labels['raw'] = 'Raw';
+$labels['text'] = 'Text';
+$labels['other'] = 'Other';
+$labels['bodycontentpart'] = 'Content Part';
+$labels['notchecked'] = 'not checked';
+$labels['spamlevelisgreaterthanequal'] = '大於或等於';
+$labels['spamlevelislessthanequal'] = '小於或等於';
+$labels['spamlevelequals'] = '等於';
+$labels['i;ascii-casemap'] = 'case-insensitive string match';
+$labels['i;octet'] = 'exact string match';
+$labels['i;ascii-numeric'] = '數字符合';
+$labels['selectruleset'] = 'Select ruleset';
+$labels['activeruleset'] = '%s (active)';
+$labels['activateruleset'] = 'Activate this ruleset';
+$labels['newruleset'] = 'Create a new ruleset';
+$labels['delruleset'] = 'Delete this ruleset';
+$labels['renameruleset'] = 'Rename this ruleset';
+$labels['copy'] = '複製';
+$labels['copyexistingfilter'] = '複製規則';
+$labels['copytoruleset'] = 'Copy filter to another ruleset';
+$labels['copyfromruleset'] = 'Copy filters from existing ruleset';
+$labels['time'] = '時間';
+$labels['weekday'] = '平日';
+$labels['virustest'] = 'Virus Probability';
+$labels['novirus'] = '找不到病毒';
+$labels['virusremoved'] = '發現病毒並移除';
+$labels['viruscured'] = '發現病毒並清除';
+$labels['possiblevirus'] = 'message possibly contains a virus';
+$labels['definitevirus'] = 'message possibly defiantly a virus';
+
+$messages = array();
+$messages['nosieverules'] = '沒有任何規則';
+$messages['filterdeleteconfirm'] = '您確定要刪除這筆郵件規則嗎?';
+$messages['ruledeleteconfirm'] = '您確定要刪除這筆規則條件嗎?';
+$messages['actiondeleteconfirm'] = '您確定要刪除這筆規則動作嗎?';
+$messages['filterunknownerror'] = '未知的伺服器錯誤';
+$messages['filterconnerror'] = '無法連線至sieve伺服器';
+$messages['filterdeleteerror'] = '無法刪除郵件規則。(伺服器錯誤)';
+$messages['filterdeleted'] = '成功刪除郵件規則';
+$messages['filtersaved'] = '郵件規則儲存完必';
+$messages['filtersaveerror'] = '無法儲存郵件規則。(伺服器錯誤)';
+$messages['vacdaysexp'] = 'The period is the number of days during which the message will not be resent to the same user, no matter how many times they contact you.<br /><br />For example: If Joe emails you on Monday and the period is set to 7 then Joe will receive an out of office message on Monday but will not get another one until the following Monday, no matter how many emails he sends an email during the week.';
+$messages['vachandleexp'] = 'A handle can be used to link different out of office messages together, once one message has been sent no other message with the same handle will be resent in that period.';
+$messages['vactoexp'] = 'List of additional recipient addresses which are included in the auto replying. If a mail\'s recipient is not your main address and it\'s not on this list, no message will be sent.';
+$messages['vactoexp_adv'] = 'Separate multiple aliases with a comma (,). For Example: test1@example.com,test2@example.com,test3@example.com';
+$messages['vactoexp_err'] = 'Error: Multiple aliases should be separated with a comma (,)';
+$messages['norulename'] = '請輸入規則名稱';
+$messages['ruleexists'] = '重複的規則名稱。請重新輸入';
+$messages['noheader'] = 'Please enter the name of the header to test';
+$messages['headerbadchars'] = 'Error: Header contains forbidden characters';
+$messages['noheadervalue'] = 'Please enter a value to test the header against';
+$messages['sizewrongformat'] = '錯誤: 郵件大小必須是數字';
+$messages['noredirect'] = '請輸入一個電子郵件位址以便轉寄訊息';
+$messages['redirectaddresserror'] = 'Error: Address appears invalid';
+$messages['noreject'] = 'Please enter a message to send with rejected email';
+$messages['vacnodays'] = 'Please enter a number of days for the period in which the message will not be resent to the same person';
+$messages['vacdayswrongformat'] = 'Error: The period must be a number greater than or equal to 1';
+$messages['vacnomsg'] = 'Please enter some text for your message';
+$messages['notifynomethod'] = 'Please enter a method by which the notification should be sent';
+$messages['notifynomsg'] = 'Please enter some text for your message';
+$messages['sieveruleexp'] = '請定義一個或多個規則條件。每封信都會依照左側列表,採由上而下的順序比對規則條件,如果符合其中一個規則,後續的郵件規則將不被執行。';
+$messages['sieveruleexp_stop'] = 'Please define one or more rules against which each message will be tested. Filters are run in the order in which they appear on the left of this screen until a \'Stop\' action is met.';
+$messages['sieveactexp'] = '請從選單中選擇項目,這些動作將會套用在符合上述規則條件的郵件。';
+$messages['sieveheadershlp'] = 'Below are some examples of other headers that can be tested by the filters. Select a header to add it to the rule or enter a custom one in the box above.';
+$messages['movingfilter'] = '移動郵件規則...';
+$messages['noexistingfilters'] = 'No existing filters detected!';
+$messages['importdefault'] = '<b>Use default filters:</b> There is a set of default filters available. Would you like to use these filters?';
+$messages['importother'] = '<b>Import filters:</b> Another set of filters from %s has been found. Would you like to import these filters into your current set?';
+$messages['switchtoadveditor'] = 'Switching to the advanced editor allows you to edit the sieve file directly. Any changes here may be unreadable in the normal editor and may be lost when filters are saved using the normal editor. Do you wish to continue?';
+$messages['filterimported'] = 'Filter imported successfully';
+$messages['filterimporterror'] = '無法匯入郵件規則。(伺服器錯誤)';
+$messages['notifyinvalidmethod'] = 'The method does not appear to be written in a valid format, it must be a URI. For example: `mailto:alert@example.com`.';
+$messages['nobodycontentpart'] = 'Please enter a content part to test';
+$messages['badoperator'] = 'Sorry the operator you selected cannot be used in this rule';
+$messages['filteractionerror'] = 'The action you requested is not supported by the server';
+$messages['filtermissingerror'] = 'Unable to find the rule requested';
+$messages['contentpartexp'] = 'The MIME-type or specific part of the message which should be tested. For example: `message/rfc822`, `text/html`, `audio/mp3` or `image`.';
+$messages['delrulesetconf'] = 'Are you sure you want to delete this ruleset?';
+$messages['rulesetexists'] = 'A ruleset with this name already exists. Please enter another';
+$messages['copyexisting'] = '<b>Copy exiting ruleset:</b> Would you like to copy filters from an existing ruleset into your current set?';
+$messages['filtercopied'] = 'Filter copied successfully';
+$messages['nosieverulesets'] = 'No rulesets found.';
+$messages['baddateformat'] = 'Error: Please enter the date in the format YYYY-MM-DD';
+$messages['badtimeformat'] = 'Error: Please enter the time in the format HH:MM:SS';
+$messages['missingfoldername'] = '錯誤: 請輸入資料夾名稱';
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/package.xml b/plugins/sieverules/package.xml
new file mode 100644
index 000000000..1ca73d3f8
--- /dev/null
+++ b/plugins/sieverules/package.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>sieverules</name>
+ <uri>http://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/</uri>
+ <summary>Control sieve filter settings from within Roundcube</summary>
+ <description>Adds a 'Filters' tab to the 'Personal Settings' to allow the user to manage their Sieve mail rules. Uses the Managesieve protocol. Predefined rules created for the user to select.</description>
+ <lead>
+ <name>Philip Weir</name>
+ <user>JohnDoh</user>
+ <email>roundcube@tehinterweb.co.uk</email>
+ <active>yes</active>
+ </lead>
+ <date>2013-02-24</date>
+ <time>10:16:53</time>
+ <version>
+ <release>1.18</release>
+ <api>1.18</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>-</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="sieverules.php" role="php">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="sieverules.js" role="data">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="config.inc.php.dist" role="data"/>
+ <file name="CHANGELOG" role="data"/>
+ <file name="README.md" role="data"/>
+ <file name="importFilters/avelsieve.php" role="php"/>
+ <file name="importFilters/ingo.php" role="php"/>
+ <file name="include/rcube_sieve.php" role="php"/>
+ <file name="include/rcube_sieve_script.php" role="php"/>
+ <file name="jquery.maskedinput.js" role="data"/>
+ <file name="lib/Net/Sieve.php" role="php"/>
+ <file name="localization/ca_ES.inc" role="data"/>
+ <file name="localization/cs_CZ.inc" role="data"/>
+ <file name="localization/de_CH.inc" role="data"/>
+ <file name="localization/de_DE.inc" role="data"/>
+ <file name="localization/en_GB.inc" role="data"/>
+ <file name="localization/en_US.inc" role="data"/>
+ <file name="localization/es_AR.inc" role="data"/>
+ <file name="localization/es_ES.inc" role="data"/>
+ <file name="localization/et_EE.inc" role="data"/>
+ <file name="localization/fi_FI.inc" role="data"/>
+ <file name="localization/fr_FR.inc" role="data"/>
+ <file name="localization/hu_HU.inc" role="data"/>
+ <file name="localization/it_IT.inc" role="data"/>
+ <file name="localization/nl_NL.inc" role="data"/>
+ <file name="localization/pl_PL.inc" role="data"/>
+ <file name="localization/pt_BR.inc" role="data"/>
+ <file name="localization/pt_PT.inc" role="data"/>
+ <file name="localization/ro_RO.inc" role="data"/>
+ <file name="localization/ru_RU.inc" role="data"/>
+ <file name="localization/sk_SK.inc" role="data"/>
+ <file name="localization/sl_SI.inc" role="data"/>
+ <file name="localization/sv_SE.inc" role="data"/>
+ <file name="localization/zh_TW.inc" role="data"/>
+ <file name="skins/classic/cross.gif" role="data"/>
+ <file name="skins/classic/help.gif" role="data"/>
+ <file name="skins/classic/icons.gif" role="data"/>
+ <file name="skins/classic/icons.png" role="data"/>
+ <file name="skins/classic/ie6hacks.css" role="data"/>
+ <file name="skins/classic/iehacks.css" role="data"/>
+ <file name="skins/classic/safari.css" role="data"/>
+ <file name="skins/classic/sieverules.css" role="data"/>
+ <file name="skins/classic/tabstyles.css" role="data"/>
+ <file name="skins/classic/templates/advancededitor.html" role="data"/>
+ <file name="skins/classic/templates/editsieverule.html" role="data"/>
+ <file name="skins/classic/templates/setupsieverules.html" role="data"/>
+ <file name="skins/classic/templates/sieverules.html" role="data"/>
+ <file name="skins/classic/tick.gif" role="data"/>
+ <file name="skins/larry/cross.png" role="data"/>
+ <file name="skins/larry/help.png" role="data"/>
+ <file name="skins/larry/icons.png" role="data"/>
+ <file name="skins/larry/iehacks.css" role="data"/>
+ <file name="skins/larry/listicons.png" role="data"/>
+ <file name="skins/larry/safari.css" role="data"/>
+ <file name="skins/larry/sieverules.css" role="data"/>
+ <file name="skins/larry/tabstyles.css" role="data"/>
+ <file name="skins/larry/templates/advancededitor.html" role="data"/>
+ <file name="skins/larry/templates/editsieverule.html" role="data"/>
+ <file name="skins/larry/templates/setupsieverules.html" role="data"/>
+ <file name="skins/larry/templates/sieverules.html" role="data"/>
+ <file name="skins/larry/tick.png" role="data"/>
+ </dir>
+ <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.1</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ <package>
+ <name>jqueryui</name>
+ <uri>http://trac.roundcube.net/browser/trunk/plugins/jqueryui/</uri>
+ <min>1.8.14</min>
+ </package>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>
diff --git a/plugins/sieverules/sieverules.js b/plugins/sieverules/sieverules.js
new file mode 100644
index 000000000..5ec505869
--- /dev/null
+++ b/plugins/sieverules/sieverules.js
@@ -0,0 +1,1480 @@
+/**
+ * SieveRules plugin script
+ */
+
+rcube_webmail.prototype.sieverules_select = function(list) {
+ if (rcmail.sieverules_examples) rcmail.sieverules_examples.clear_selection();
+ var id;
+
+ if (this.sieverules_timer)
+ clearTimeout(rcmail.sieverules_timer);
+
+ if (id = list.get_single_selection())
+ rcmail.sieverules_timer = window.setTimeout(function() { rcmail.sieverules_load(id, 'plugin.sieverules.edit'); }, 200);
+}
+
+rcube_webmail.prototype.sieverules_keypress = function(list) {
+ if (list.key_pressed == list.DELETE_KEY)
+ rcmail.command('plugin.sieverules.delete');
+ else if (list.key_pressed == list.BACKSPACE_KEY)
+ rcmail.command('plugin.sieverules.delete');
+}
+
+rcube_webmail.prototype.sieverules_ex_select = function(list) {
+ rcmail.sieverules_list.clear_selection();
+ if (list.multi_selecting)
+ return false;
+
+ if (this.sieverules_timer)
+ clearTimeout(this.sieverules_timer);
+
+ var id;
+ if (id = list.get_single_selection())
+ rcmail.sieverules_timer = window.setTimeout(function() { rcmail.sieverules_load(id, 'plugin.sieverules.add'); }, 200);
+}
+
+rcube_webmail.prototype.sieverules_mouse_up = function(e) {
+ if (rcmail.sieverules_list) {
+ if (!rcube_mouse_is_over(e, rcmail.sieverules_list.list))
+ rcmail.sieverules_list.blur();
+ }
+
+ if (rcmail.sieverules_examples) {
+ if (!rcube_mouse_is_over(e, rcmail.sieverules_examples.list))
+ rcmail.sieverules_examples.blur();
+ }
+
+ // handle mouse release when dragging
+ if (rcmail.sieverules_ex_drag_active && rcmail.sieverules_list && rcmail.env.sieverules_last_target) {
+ rcmail.command('plugin.sieverules.import_ex');
+ rcmail.sieverules_examples.draglayer.hide();
+ }
+ else if (rcmail.sieverules_drag_active && rcmail.sieverules_list && rcmail.env.sieverules_last_target) {
+ var _src = rcmail.sieverules_list.get_single_selection();
+
+ if (rcmail.env.sieverules_last_target == 'end') {
+ var _dst = rcmail.sieverules_list.rows.length;
+ $(rcmail.gui_objects.sieverules_list).children('tbody').children('tr:last').removeClass('droptargetend');
+ }
+ else {
+ var _dst = rcmail.env.sieverules_last_target.substr(6);
+ $('#' + rcmail.env.sieverules_last_target).removeClass('droptarget');
+ }
+
+ rcmail.command('plugin.sieverules.move', { source:_src, dest:_dst });
+ rcmail.sieverules_list.draglayer.hide();
+ }
+};
+
+rcube_webmail.prototype.sieverules_ex_drag_start = function(list) {
+ rcmail.sieverules_ex_drag_active = true;
+ rcmail.sieverules_list.drag_active = true;
+ rcmail.sieverules_drag_start(list);
+};
+
+rcube_webmail.prototype.sieverules_drag_start = function(list) {
+ rcmail.sieverules_drag_active = true;
+
+ if (this.sieverules_timer)
+ clearTimeout(this.sieverules_timer);
+
+ if (rcmail.gui_objects.sieverules_list) {
+ rcmail.initialBodyScrollTop = bw.ie ? 0 : window.pageYOffset;
+ rcmail.initialListScrollTop = rcmail.gui_objects.sieverules_list.parentNode.scrollTop;
+
+ var pos, list, rulesTable;
+ list = $(rcmail.gui_objects.sieverules_list.parentNode);
+ pos = list.offset();
+ rcmail.env.sieveruleslist_coords = { x1:pos.left, y1:pos.top, x2:pos.left + list.width(), y2:pos.top + list.height() };
+
+ rows = rcmail.sieverules_list.rows;
+ rcmail.env.sieverules_coords = new Array();
+ for (var i = 0; i < rows.length; i++) {
+ pos = $('#' + rows[i].id).offset();
+ rcmail.env.sieverules_coords[rows[i].id] = { x1:pos.left, y1:pos.top, x2:pos.left + $('#' + rows[i].id).width(), y2:pos.top + $('#' + rows[i].id).height(), on:0 };
+ }
+ }
+};
+
+rcube_webmail.prototype.sieverules_drag_move = function(e) {
+ if (rcmail.gui_objects.sieverules_list && rcmail.env.sieveruleslist_coords) {
+ // offsets to compensate for scrolling while dragging a message
+ var boffset = bw.ie ? -document.documentElement.scrollTop : rcmail.initialBodyScrollTop;
+ var moffset = rcmail.initialListScrollTop-rcmail.gui_objects.sieverules_list.parentNode.scrollTop;
+ var toffset = -moffset-boffset;
+
+ var li, pos, mouse;
+ mouse = rcube_event.get_mouse_pos(e);
+ pos = rcmail.env.sieveruleslist_coords;
+ mouse.y += toffset;
+
+ // if mouse pointer is outside of folderlist
+ if (mouse.x < pos.x1 || mouse.x >= pos.x2 || mouse.y < pos.y1 || mouse.y >= pos.y2) {
+ $(rcmail.gui_objects.sieverules_list).children('tbody').children('tr:last').removeClass('droptargetend');
+ rcmail.env.sieverules_last_target = null;
+ }
+ else {
+ $(rcmail.gui_objects.sieverules_list).children('tbody').children('tr:last').addClass('droptargetend');
+ rcmail.env.sieverules_last_target = 'end';
+ }
+
+ // over the folders
+ for (var k in rcmail.env.sieverules_coords) {
+ pos = rcmail.env.sieverules_coords[k];
+ if (mouse.x >= pos.x1 && mouse.x < pos.x2 && mouse.y >= pos.y1 && mouse.y < pos.y2) {
+ $(rcmail.gui_objects.sieverules_list).children('tbody').children('tr:last').removeClass('droptargetend');
+ $('#' + k).addClass('droptarget');
+ rcmail.env.sieverules_last_target = k;
+ rcmail.env.sieverules_coords[k].on = 1;
+ }
+ else if (pos.on) {
+ $('#' + k).removeClass('droptarget');
+ rcmail.env.sieverules_last_target = null;
+ rcmail.env.sieverules_coords[k].on = 0;
+ }
+ }
+ }
+};
+
+rcube_webmail.prototype.sieverules_drag_end = function(e) {
+ rcmail.sieverules_drag_active = false;
+ rcmail.sieverules_ex_drag_active = false;
+ rcmail.env.sieverules_last_target = null;
+
+ // over the rules
+ if (rcmail.gui_objects.sieverules_list && rcmail.env.sieverules_coords) {
+ for (var k in rcmail.env.sieverules_coords) {
+ if (rcmail.env.sieverules_coords[k].on) {
+ $('#' + k).removeClass('droptarget');
+ }
+ }
+ }
+
+ $(rcmail.gui_objects.sieverules_list).children('tbody').children('tr:last').removeClass('droptargetend');
+};
+
+rcube_webmail.prototype.sieverules_load = function(id, action) {
+ if (action == 'plugin.sieverules.edit' && (!id || id == rcmail.env.iid))
+ return false;
+
+ var add_url = '';
+ var target = window;
+ if (rcmail.env.contentframe && window.frames && window.frames[rcmail.env.contentframe]) {
+ add_url = '&_framed=1';
+ target = window.frames[rcmail.env.contentframe];
+ rcube_find_object(rcmail.env.contentframe).style.visibility = 'inherit';
+ }
+
+ if (action && (id || action == 'plugin.sieverules.add')) {
+ rcmail.set_busy(true);
+ target.location.href = rcmail.env.comm_path+'&_action='+action+'&_iid='+id+add_url;
+ }
+
+ return true;
+}
+
+rcube_webmail.prototype.sieverules_ready = function(id) {
+ if (id.substring(0, 2) != 'ex')
+ rcmail.enable_command('plugin.sieverules.delete', true);
+
+ if (rcmail.sieverules_examples)
+ rcmail.sieverules_examples.clear_selection();
+
+ rcmail.sieverules_list.highlight_row(id);
+ rcmail.env.iid = id;
+
+ return true;
+}
+
+rcube_webmail.prototype.sieverules_update_list = function(action, param1, param2, param3, param4) {
+ var sid = rcmail.sieverules_list.get_single_selection();
+ var selection;
+ var rows = rcmail.sieverules_list.rows;
+ var rules = Array();
+
+ switch(action) {
+ case 'add-first':
+ rcmail.sieverules_list.clear();
+ case 'add':
+ if (rows.length == 1 && rows[0].obj.cells[0].innerHTML == rcmail.gettext('loading',''))
+ rcmail.sieverules_list.remove_row(0);
+
+ var newrow = document.createElement('tr');
+
+ if (param1 == -1) {
+ var cell = document.createElement('td');
+ cell.setAttribute('colspan', '2');
+ cell.appendChild(document.createTextNode(param2));
+ newrow.appendChild(cell);
+ }
+ else {
+ newrow.id = param1;
+ var cell = document.createElement('td');
+ cell.appendChild(document.createTextNode(param2));
+ newrow.appendChild(cell);
+
+ cell = document.createElement('td');
+ cell.className = 'control';
+
+ param3 = param3.replace(/\\'/g, '\'');
+ param4 = param4.replace(/\\'/g, '\'');
+
+ cell.innerHTML = param3 + param4;
+ newrow.appendChild(cell);
+ }
+
+ rcmail.sieverules_list.insert_row(newrow);
+ break;
+ case 'update':
+ rows[param1].obj.cells[0].innerHTML = param2;
+ break;
+ case 'delete':
+ rcmail.sieverules_list.clear_selection();
+ sid = null;
+ case 'reload':
+ rcmail.sieverules_list.clear();
+
+ var newrow = document.createElement('tr');
+ var cell = document.createElement('td');
+ cell.setAttribute('colspan', '2');
+ cell.appendChild(document.createTextNode(rcmail.gettext('loading','')));
+ newrow.appendChild(cell);
+ rcmail.sieverules_list.insert_row(newrow);
+
+ rcmail.http_request('plugin.sieverules.update_list', '', false);
+ break;
+ case 'move':
+ // create array of rules
+ for (var i = 0; i < rows.length; i++) {
+ rules[i] = rows[i].obj.cells[0].innerHTML;
+
+ if (sid == i) selection = rules[i];
+ }
+
+ // assign order
+ rules.splice(param2, 0, rules[param1]);
+
+ if (parseInt(param1) < parseInt(param2))
+ rules.splice(param1, 1);
+ else
+ rules.splice(parseInt(param1) + 1, 1);
+
+ // update table
+ for (var i = 0; i < rows.length; i++) {
+ rows[i].obj.cells[0].innerHTML = rules[i];
+
+ if (rules[i] == selection) sid = i;
+ }
+
+ var target = window;
+ if (rcmail.env.contentframe && window.frames && window.frames[rcmail.env.contentframe])
+ target = window.frames[rcmail.env.contentframe];
+
+ // update iid of rule being editied
+ var iid;
+ if (target.rcube_find_object && (iid = target.rcube_find_object('_iid'))) {
+ if (iid.value != param1 && iid.value != "") {
+ if (iid.value > param1 && iid.value < param2) {
+ sid = parseInt(iid.value) - 1;
+ rcmail.sieverules_list.highlight_row(sid);
+ rcmail.sieverules_list.select_row(sid);
+ iid.value = sid;
+ target.rcmail.env.iid = sid;
+ }
+ else if (iid.value < param1 && iid.value > param2) {
+ sid = parseInt(iid.value) + 1;
+ rcmail.sieverules_list.highlight_row(sid);
+ rcmail.sieverules_list.select_row(sid);
+ iid.value = sid;
+ target.rcmail.env.iid = sid;
+ }
+ else {
+ rcmail.sieverules_list.select_row(iid.value);
+ }
+ }
+ else if (iid.value != "") {
+ rcmail.sieverules_list.highlight_row(sid);
+ rcmail.sieverules_list.select_row(sid);
+ iid.value = sid;
+ target.rcmail.env.iid = sid;
+ }
+ }
+ else if (sid) {
+ rcmail.sieverules_list.highlight_row(sid);
+ rcmail.sieverules_list.select_row(sid);
+ }
+
+ break;
+ }
+}
+
+rcube_webmail.prototype.sieverules_rule_join_radio = function(value) {
+ var rulesTable = rcube_find_object('rules-table');
+
+ if (rulesTable.tBodies[0].rows.length == 3)
+ rcmail.command('plugin.sieverules.add_rule','', rulesTable.tBodies[0].rows[0]);
+
+ rulesTable.style.display = (value == 'any' ? 'none' : '');
+}
+
+rcube_webmail.prototype.sieverules_header_select = function(sel) {
+ var idx = sel.parentNode.parentNode.rowIndex / 3;
+ var eidx = ((idx + 1) * 3) - 1;
+ var obj = document.getElementsByName('_selheader[]')[idx];
+ var testType = obj.value.split('::')[0];
+ var header = obj.value.split('::')[1];
+ var selIdx = 0;
+ var target_obj = $("input[name='_target[]']")[idx];
+
+ document.getElementsByName('_test[]')[idx].value = testType;
+ document.getElementsByName('_header[]')[idx].value = header;
+ document.getElementsByName('_target[]')[idx].className = '';
+ document.getElementsByName('_operator[]')[idx].selectedIndex = 0;
+ document.getElementsByName('_bodypart[]')[idx].style.display = 'none';
+ document.getElementsByName('_datepart[]')[idx].style.display = 'none';
+ document.getElementsByName('_weekday[]')[idx].style.display = 'none';
+ $(target_obj).unmask();
+
+ if (header == 'size') {
+ document.getElementsByName('_header[]')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_headerhlp')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_date_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spamtest_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spam_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_virus_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_size_operator[]')[idx].style.display = '';
+ document.getElementsByName('_target[]')[idx].style.display = '';
+ document.getElementsByName('_target[]')[idx].className = 'short';
+ document.getElementsByName('_units[]')[idx].style.display = '';
+ }
+ else if (header == 'spamtest') {
+ document.getElementsByName('_header[]')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_headerhlp')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_size_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_date_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spamtest_operator[]')[idx].style.display = '';
+ document.getElementsByName('_spam_probability[]')[idx].style.display = '';
+ document.getElementsByName('_virus_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_target[]')[idx].style.display = 'none';
+ document.getElementsByName('_target[]')[idx].value = document.getElementsByName('_spam_probability[]')[idx].value;
+ document.getElementsByName('_units[]')[idx].style.display = 'none';
+ }
+ else if (header == 'virustest') {
+ document.getElementsByName('_header[]')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_headerhlp')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_size_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_date_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spamtest_operator[]')[idx].style.display = '';
+ document.getElementsByName('_spam_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_virus_probability[]')[idx].style.display = '';
+ document.getElementsByName('_target[]')[idx].style.display = 'none';
+ document.getElementsByName('_target[]')[idx].value = document.getElementsByName('_spam_probability[]')[idx].value;
+ document.getElementsByName('_units[]')[idx].style.display = 'none';
+ }
+ else if (header.indexOf('predefined_') == 0) {
+ document.getElementsByName('_header[]')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_headerhlp')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_size_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_date_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spamtest_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spam_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_virus_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_target[]')[idx].style.display = 'none';
+ document.getElementsByName('_units[]')[idx].style.display = 'none';
+
+ if (rcmail.env.predefined_rules[header.substring(11)][0] == 'size') {
+ document.getElementsByName('_header[]')[idx].value = 'size';
+ selIdx = rcmail.sieverules_get_index(document.getElementsByName('_size_operator[]')[idx], rcmail.env.predefined_rules[header.substring(11)][2]);
+ document.getElementsByName('_size_operator[]')[idx].selectedIndex = selIdx;
+ var reg = new RegExp('^([0-9]+)(K|M)*$');
+ var matches = reg.exec(rcmail.env.predefined_rules[header.substring(11)][3]);
+ document.getElementsByName('_target[]')[idx].value = matches[1];
+ selIdx = rcmail.sieverules_get_index(document.getElementsByName('_units[]')[idx], matches[2]);
+ document.getElementsByName('_units[]')[idx].selectedIndex = selIdx;
+ }
+ else if (rcmail.env.predefined_rules[header.substring(11)][0] == 'spamtest') {
+ document.getElementsByName('_header[]')[idx].value = 'spamtest';
+ selIdx = rcmail.sieverules_get_index(document.getElementsByName('_spamtest_operator[]')[idx], rcmail.env.predefined_rules[header.substring(11)][2]);
+ document.getElementsByName('_spamtest_operator[]')[idx].selectedIndex = selIdx;
+ document.getElementsByName('_spam_probability[]')[idx].value = rcmail.env.predefined_rules[header.substring(11)][3];
+ }
+ else if (rcmail.env.predefined_rules[header.substring(11)][0] == 'virustest') {
+ document.getElementsByName('_header[]')[idx].value = 'virustest';
+ selIdx = rcmail.sieverules_get_index(document.getElementsByName('_spamtest_operator[]')[idx], rcmail.env.predefined_rules[header.substring(11)][2]);
+ document.getElementsByName('_spamtest_operator[]')[idx].selectedIndex = selIdx;
+ document.getElementsByName('_virus_probability[]')[idx].value = rcmail.env.predefined_rules[header.substring(11)][3];
+ }
+ else {
+ document.getElementsByName('_header[]')[idx].value = rcmail.env.predefined_rules[header.substring(11)][1];
+ selIdx = rcmail.sieverules_get_index(document.getElementsByName('_operator[]')[idx], rcmail.env.predefined_rules[header.substring(11)][2], -1);
+
+ // check advanced options if standard not found
+ if (selIdx == -1 && rcmail.sieverules_get_index(document.getElementsByName('_advoperator[]')[idx], rcmail.env.predefined_rules[header.substring(11)][2], -1) > -1) {
+ document.getElementsByName('_operator[]')[idx].selectedIndex = rcmail.sieverules_get_index(document.getElementsByName('_operator[]')[idx], 'advoptions');
+ document.getElementsByName('_advoperator[]')[idx].selectedIndex = rcmail.sieverules_get_index(document.getElementsByName('_advoperator[]')[idx], rcmail.env.predefined_rules[header.substring(11)][2]);
+ document.getElementsByName('_comparator[]')[idx].selectedIndex = rcmail.sieverules_get_index(document.getElementsByName('_comparator[]')[idx], rcmail.env.predefined_rules[header.substring(11)][3]);
+ document.getElementsByName('_advtarget[]')[idx].value = rcmail.env.predefined_rules[header.substring(11)][4];
+ }
+ else {
+ document.getElementsByName('_operator[]')[idx].selectedIndex = selIdx;
+ document.getElementsByName('_target[]')[idx].value = rcmail.env.predefined_rules[header.substring(11)][4];
+ }
+ }
+ }
+ else {
+ document.getElementsByName('_operator[]')[idx].style.display = '';
+ document.getElementsByName('_size_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spamtest_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_spam_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_virus_probability[]')[idx].style.display = 'none';
+ document.getElementsByName('_date_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_target[]')[idx].style.display = '';
+ document.getElementsByName('_units[]')[idx].style.display = 'none';
+
+ if (header == 'other') {
+ document.getElementsByName('_header[]')[idx].style.visibility = 'visible';
+ document.getElementsByName('_headerhlp')[idx].style.visibility = 'visible';
+ document.getElementsByName('_header[]')[idx].value = '';
+ }
+ else {
+ document.getElementsByName('_header[]')[idx].style.visibility = 'hidden';
+ document.getElementsByName('_headerhlp')[idx].style.visibility = 'hidden';
+ }
+
+ if (header == 'body') {
+ document.getElementsByName('_header[]')[idx].style.display = 'none';
+ document.getElementsByName('_headerhlp')[idx].style.display = 'none';
+ document.getElementsByName('_bodypart[]')[idx].style.display = '';
+
+ document.getElementsByName('_body_contentpart[]')[idx].parentNode.parentNode.style.display = '';
+ }
+ else if (testType == 'date') {
+ document.getElementsByName('_header[]')[idx].style.display = 'none';
+ document.getElementsByName('_headerhlp')[idx].style.display = 'none';
+ document.getElementsByName('_datepart[]')[idx].style.display = '';
+ document.getElementsByName('_operator[]')[idx].style.display = 'none';
+ document.getElementsByName('_date_operator[]')[idx].style.display = '';
+
+ document.getElementsByName('_datepart[]')[idx].selectedIndex = 0;
+ document.getElementsByName('_body_contentpart[]')[idx].parentNode.parentNode.style.display = 'none';
+ $(target_obj).datepicker({ dateFormat: 'yy-mm-dd' });
+ }
+ else {
+ document.getElementsByName('_header[]')[idx].style.display = '';
+ document.getElementsByName('_headerhlp')[idx].style.display = '';
+
+ document.getElementsByName('_body_contentpart[]')[idx].parentNode.parentNode.style.display = 'none';
+ }
+ }
+
+ var idx = sel.parentNode.parentNode.rowIndex;
+ rcube_find_object('rules-table').tBodies[0].rows[idx + 1].style.display = 'none';
+ rcube_find_object('rules-table').tBodies[0].rows[idx + 2].style.display = 'none';
+}
+
+rcube_webmail.prototype.sieverules_bodypart_select = function(sel) {
+ var idx = sel.parentNode.parentNode.rowIndex;
+ var eidx = idx / 3;
+ var obj = document.getElementsByName('_bodypart[]')[eidx];
+
+ document.getElementsByName('_body_contentpart[]')[eidx].disabled = false;
+ document.getElementsByName('_advoperator[]')[eidx].disabled = (document.getElementsByName('_operator[]')[eidx].value == 'advoptions') ? false : true;
+
+ if (document.getElementsByName('_operator[]')[eidx].value == 'advoptions')
+ rcmail.sieverules_rule_advop_select(document.getElementsByName('_advoperator[]')[eidx]);
+ else
+ document.getElementsByName('_comparator[]')[eidx].disabled = true;
+
+ document.getElementsByName('_advtarget[]')[eidx].disabled = (document.getElementsByName('_operator[]')[eidx].value == 'advoptions') ? false : true;
+ var advopts_row = rcube_find_object('rules-table').tBodies[0].rows[idx + 2];
+ if (obj.value != 'content' && document.getElementsByName('_operator[]')[eidx].value == 'advoptions')
+ document.getElementsByName('_body_contentpart[]')[eidx].disabled = true;
+ else
+ advopts_row.style.display = (obj.value == 'content' ? '' : 'none');
+}
+
+rcube_webmail.prototype.sieverules_datepart_select = function(sel) {
+ var idx = sel.parentNode.parentNode.rowIndex;
+ var eidx = idx / 3;
+ var obj = document.getElementsByName('_datepart[]')[eidx];
+ var opr = document.getElementsByName('_operator[]')[eidx];
+ var target_obj = $("input[name='_target[]']")[eidx];
+ $(target_obj).datepicker("destroy");
+ $(target_obj).unmask();
+
+ if (obj.value == 'date')
+ $(target_obj).datepicker({ dateFormat: 'yy-mm-dd' });
+ else if (obj.value == 'time')
+ $(target_obj).mask('99:99:99', {example: 'HH:MM:SS', placeholder: '0'});
+
+ document.getElementsByName('_advtarget[]')[eidx].style.display = (obj.value == 'weekday') ? 'none' : '';
+ document.getElementsByName('_advweekday[]')[eidx].style.display = (obj.value == 'weekday') ? '' : 'none';
+ if (opr.value != 'exists' && opr.value != 'notexists' && opr.value != 'advoptions') {
+ document.getElementsByName('_target[]')[eidx].style.display = (obj.value == 'weekday') ? 'none' : '';
+ document.getElementsByName('_weekday[]')[eidx].style.display = (obj.value == 'weekday') ? '' : 'none';
+ }
+}
+
+rcube_webmail.prototype.sieverules_rule_op_select = function(sel) {
+ var idx = sel.parentNode.parentNode.rowIndex;
+ var eidx = idx / 3;
+ var datepart = document.getElementsByName('_datepart[]')[eidx].value;
+
+ var obj = document.getElementsByName('_operator[]')[eidx];
+ if (obj.value == 'exists' || obj.value == 'notexists' || obj.value == 'advoptions') {
+ document.getElementsByName('_target[]')[eidx].style.display = 'none';
+ document.getElementsByName('_weekday[]')[eidx].style.display = 'none';
+ }
+ else {
+ document.getElementsByName('_target[]')[eidx].style.display = (datepart == 'weekday') ? 'none' : '';
+ document.getElementsByName('_weekday[]')[eidx].style.display = (datepart == 'weekday') ? '' : 'none';
+ }
+
+ if (obj.value != 'exists' && obj.value != 'notexists' && document.getElementsByName('_test[]')[eidx].value == 'exists') {
+ var h_obj = document.getElementsByName('_selheader[]')[eidx];
+ var testType = h_obj.value.split('::')[0];
+
+ document.getElementsByName('_test[]')[eidx].value = testType;
+ }
+
+ document.getElementsByName('_body_contentpart[]')[eidx].disabled = (document.getElementsByName('_bodypart[]')[eidx].value == 'content') ? false : true;
+ document.getElementsByName('_advoperator[]')[eidx].disabled = false;
+ rcmail.sieverules_rule_advop_select(document.getElementsByName('_advoperator[]')[eidx]);
+ document.getElementsByName('_advtarget[]')[eidx].disabled = false;
+ var advopts_row = rcube_find_object('rules-table').tBodies[0].rows[idx + 2];
+ if (obj.value != 'advoptions' && document.getElementsByName('_bodypart[]')[eidx].value == 'content') {
+ document.getElementsByName('_advoperator[]')[eidx].disabled = true;
+ document.getElementsByName('_comparator[]')[eidx].disabled = true;
+ document.getElementsByName('_advtarget[]')[eidx].disabled = true;
+ }
+ else {
+ advopts_row.style.display = (obj.value == 'advoptions' ? '' : 'none');
+ }
+
+ return false;
+}
+
+rcube_webmail.prototype.sieverules_rule_advop_select = function(sel) {
+ var obj = sel.parentNode.parentNode.parentNode.parentNode;
+ var idx = (obj.parentNode.parentNode.rowIndex - 2) / 3;
+
+ if (sel.value.substring(0, 5) == 'count' || sel.value.substring(0, 5) == 'value')
+ document.getElementsByName('_comparator[]')[idx].disabled = false;
+ else
+ document.getElementsByName('_comparator[]')[idx].disabled = true;
+
+ return false;
+}
+
+rcube_webmail.prototype.sieverules_action_select = function(sel) {
+ var idx = sel.parentNode.parentNode.rowIndex;
+ var actoion_row = rcube_find_object('actions-table').tBodies[0].rows[idx];
+ var obj = document.getElementsByName('_act[]')[idx];
+
+ // hide everything
+ document.getElementsByName('_folder[]')[idx].style.display = 'none';
+ $(document.getElementsByName('_customfolder[]')[idx]).parent().hide();
+ document.getElementsByName('_redirect[]')[idx].style.display = 'none';
+ document.getElementsByName('_reject[]')[idx].style.display = 'none';
+ document.getElementsByName('_imapflags[]')[idx].style.display = 'none';
+ document.getElementsByName('_day[]')[idx].parentNode.parentNode.parentNode.parentNode.style.display = 'none';
+ document.getElementsByName('_nmethod[]')[idx].parentNode.parentNode.parentNode.parentNode.style.display = 'none';
+ document.getElementsByName('_eheadname[]')[idx].parentNode.parentNode.parentNode.parentNode.style.display = 'none';
+
+ if (obj.value == 'fileinto' || obj.value == 'fileinto_copy')
+ document.getElementsByName('_folder[]')[idx].style.display = '';
+ else if (obj.value == 'reject' || obj.value == 'ereject')
+ document.getElementsByName('_reject[]')[idx].style.display = '';
+ else if (obj.value == 'vacation') {
+ document.getElementsByName('_day[]')[idx].parentNode.parentNode.parentNode.parentNode.style.display = '';
+
+ if (rcmail.env.sieverules_htmleditor == 1) {
+ rowid = document.getElementsByName('_msg[]')[idx].id.replace('rcmfd_sievevacmag_', '');
+ document.getElementById('rcmfd_sievevachtmlcb_' + rowid).checked = true;
+ rcmail.sieverules_toggle_vac_html(document.getElementById('rcmfd_sievevachtmlcb_' + rowid), rowid, 'rcmfd_sievevacmag_' + rowid);
+ }
+
+ rcmail.enable_sig(document.getElementsByName('_vacfrom[]')[idx]);
+ }
+ else if (obj.value == 'notify' || obj.value == 'enotify')
+ document.getElementsByName('_nmethod[]')[idx].parentNode.parentNode.parentNode.parentNode.style.display = '';
+ else if (obj.value == 'redirect' || obj.value == 'redirect_copy')
+ document.getElementsByName('_redirect[]')[idx].style.display = '';
+ else if (obj.value == 'imapflags' || obj.value == 'imap4flags')
+ document.getElementsByName('_imapflags[]')[idx].style.display = '';
+ else if (obj.value == 'editheaderadd' || obj.value == 'editheaderrem') {
+ document.getElementsByName('_eheadname[]')[idx].parentNode.parentNode.parentNode.parentNode.style.display = '';
+
+ if (obj.value == 'editheaderrem') {
+ document.getElementsByName('_eheadval[]')[idx].parentNode.parentNode.style.display = 'none';
+ document.getElementsByName('_eheadaddlast[]')[idx].parentNode.parentNode.style.display = 'none';
+ document.getElementsByName('_hadv_opts[]')[idx].parentNode.parentNode.style.display = '';
+ }
+ else {
+ document.getElementsByName('_eheadval[]')[idx].parentNode.parentNode.style.display = '';
+ document.getElementsByName('_eheadaddlast[]')[idx].parentNode.parentNode.style.display = '';
+ document.getElementsByName('_eheadopp[]')[idx].parentNode.parentNode.style.display = 'none';
+ document.getElementsByName('_eheadindex[]')[idx].parentNode.parentNode.style.display = 'none';
+ document.getElementsByName('_hadv_opts[]')[idx].parentNode.parentNode.style.display = 'none';
+ }
+ }
+
+ if ($(document.getElementsByName('_folder[]')[idx]).is(':visible') && document.getElementsByName('_folder[]')[idx].value == '@@newfolder')
+ $(document.getElementsByName('_customfolder[]')[idx]).parent().show();
+}
+
+rcube_webmail.prototype.sieverules_select_folder = function(sel) {
+ var idx = sel.parentNode.parentNode.rowIndex;
+ var actoion_row = rcube_find_object('actions-table').tBodies[0].rows[idx];
+ var obj = document.getElementsByName('_folder[]')[idx];
+
+ $(document.getElementsByName('_customfolder[]')[idx]).parent().hide();
+ if (obj.value == '@@newfolder')
+ $(document.getElementsByName('_customfolder[]')[idx]).parent().show();
+}
+
+rcube_webmail.prototype.sieverules_xheaders = function(sel) {
+ var idx = sel.parentNode.parentNode.rowIndex + 1;
+ var xheader_row = rcube_find_object('rules-table').tBodies[0].rows[idx];
+ xheader_row.style.display = (xheader_row.style.display == 'none' ? '' : 'none');
+ return false;
+}
+
+rcube_webmail.prototype.sieverules_set_xheader = function(sel) {
+ var obj = sel.parentNode.parentNode.parentNode.parentNode;
+ var idx = (obj.parentNode.parentNode.rowIndex - 1) / 3;
+ var headerBox = document.getElementsByName('_header[]')[idx];
+ headerBox.value = sel.value;
+}
+
+rcube_webmail.prototype.sieverules_get_index = function(list, value, fallback) {
+ fallback = fallback || 0;
+
+ for (var i = 0; i < list.length; i++) {
+ if (list[i].value == value)
+ return i;
+ }
+
+ return fallback;
+}
+
+rcube_webmail.prototype.sieverules_toggle_vac_to = function(sel, id) {
+ var obj = rcube_find_object('rcmfd_sievevacto_' + id);
+ var opts = document.getElementsByName('_vacto_check_' + id + '[]')
+
+ obj.value = "";
+ for (i = 0; i < opts.length; i++) {
+ if (opts[i].checked) {
+ if (obj.value.length > 0) obj.value += ",";
+ obj.value += opts[i].value;
+ }
+ }
+}
+
+rcube_webmail.prototype.sieverules_toggle_vac_osubj = function(sel, id) {
+ var obj = rcube_find_object('rcmfd_sievevactoh_' + id);
+ obj.value = sel.checked ? sel.value : "";
+}
+
+rcube_webmail.prototype.sieverules_toggle_vac_html = function(obj, rowid, txtid) {
+ rcmail_toggle_editor(obj, txtid);
+
+ var sel = rcube_find_object('rcmfd_sievevachtmlhd_' + rowid);
+ sel.value = obj.checked ? obj.value : "";
+}
+
+rcube_webmail.prototype.sieverules_notify_impt = function(sel, id) {
+ var obj = rcube_find_object('rcmfd_sievenimpt_' + id);
+ obj.value = sel.value == 'none' ? '' : sel.value;
+}
+
+rcmail.sieverules_help = function(sel, row) {
+ var obj = sel.parentNode.parentNode.parentNode.parentNode;
+ var help_row = obj.tBodies[0].rows[row];
+ help_row.style.display = (help_row.style.display == 'none' ? '' : 'none');
+ return false;
+}
+
+rcube_webmail.prototype.sieverules_show_adv = function(sel) {
+ var obj = sel.parentNode.parentNode.parentNode.parentNode;
+ var rows = obj.tBodies[0].rows;
+
+ if (sel.checked) {
+ for(var i = 0; i < rows.length; i++)
+ if(rows[i].className && rows[i].className.match(/advanced/))
+ rows[i].style.display = '';
+ }
+ else {
+ for(var i = 0; i < rows.length; i++)
+ if(rows[i].className && rows[i].className.match(/advanced/))
+ rows[i].style.display = 'none';
+
+ for(var i = 0; i < rows.length; i++)
+ if(rows[i].className && rows[i].className.match(/advhelp/))
+ rows[i].style.display = 'none';
+ }
+}
+
+rcube_webmail.prototype.sieverules_adveditor = function(sel) {
+ if (sel.checked && !confirm(rcmail.gettext('switchtoadveditor','sieverules'))) {
+ sel.checked = false;
+ return false;
+ }
+
+ if (sel.checked)
+ rcmail.goto_url('plugin.sieverules.advanced', '', true);
+ else
+ rcmail.goto_url('plugin.sieverules', '_override=1', true);
+}
+
+rcube_webmail.prototype.sieverules_load_setup = function() {
+ var add_url = '';
+
+ var target = window;
+ if (rcmail.env.contentframe && window.frames && window.frames[rcmail.env.contentframe]) {
+ add_url = '&_framed=1';
+ target = window.frames[rcmail.env.contentframe];
+ rcube_find_object(rcmail.env.contentframe).style.visibility = 'inherit';
+ }
+
+ target.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules.setup' + add_url;
+}
+
+rcube_webmail.prototype.sieverules_select_ruleset = function(obj, action) {
+ if (typeof obj == 'string') {
+ window.location.href = rcmail.env.comm_path+'&_action='+action+'&_ruleset=' + obj;
+ }
+ else {
+ var idx = obj.selectedIndex;
+ window.location.href = rcmail.env.comm_path+'&_action='+action+'&_ruleset=' + obj.options[idx].value;
+ }
+}
+
+rcube_webmail.prototype.sieverules_add_ruleset = function(val, text) {
+ var obj = rcube_find_object('rulelist');
+
+ // remove loading message
+ if (obj.options.length == 1 && obj.options[0].value == '' && obj.options[0].text == rcmail.gettext('loading',''))
+ obj.remove(0);
+
+ var opt = document.createElement('option');
+ opt.value = val;
+ opt.text = text;
+
+ obj.options.add(opt);
+
+ if (rcmail.env.ruleset == val)
+ obj.selectedIndex = obj.options.length - 1;
+}
+
+rcube_webmail.prototype.sieverules_disable_ruleset_options = function() {
+ $('#rulelist').attr("disabled", "disabled");
+ rcmail.enable_command('plugin.sieverules.ruleset_dialog', 'plugin.sieverules.activate_ruleset', 'plugin.sieverules.del_ruleset', false);
+}
+
+rcube_webmail.prototype.sieverulesdialog_submit = function() {
+ var action = rcube_find_object('sieverulesrsdialog_action').value;
+ var val = rcube_find_object('sieverulesrsdialog_name').value;
+
+ if (action == '' || action == 'rename_ruleset') {
+ var obj = rcube_find_object('sieverulesrsdialog_ruleset');
+ for (i = 0; i < obj.options.length ; i++) {
+ if (obj.options[i].value == val) {
+ alert(rcmail.gettext('rulesetexists','sieverules'));
+ rcube_find_object('sieverulesrsdialog_name').focus();
+ return false;
+ }
+ }
+ }
+ else if (action == 'copyto_ruleset' || action == 'copyfrom_ruleset') {
+ var obj = rcube_find_object('sieverulesrsdialog_ruleset');
+ var idx = obj.selectedIndex;
+ val = obj.options[idx].value;
+ }
+
+ $('#sieverulesrsdialog').dialog('close');
+
+ var target = window;
+ if (rcmail.env.contentframe && window.frames && window.frames[rcmail.env.contentframe])
+ target = window.frames[rcmail.env.contentframe];
+
+ if (action == 'rename_ruleset')
+ window.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules.rename_ruleset&_ruleset=' + rcmail.env.ruleset + '&_new=' + val;
+ else if (action == 'copyto_ruleset')
+ rcmail.http_request('plugin.sieverules.copy_filter', '_iid='+ target.rcmail.env.iid +'&_dest=' + val, true);
+ else if (action == 'copyfrom_ruleset')
+ window.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules.import&_import=_copy_&_ruleset=' + val + '&_new=' + rcmail.env.ruleset;
+ else
+ window.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules&_ruleset=' + val;
+}
+
+rcube_webmail.prototype.enable_sig = function(obj) {
+ var id;
+
+ if (obj.options[0].value == 'auto' || obj.options[0].value == '')
+ id = obj.selectedIndex;
+ else
+ id = obj.selectedIndex + 1;
+
+ // enable manual signature insert
+ if (rcmail.env.signatures && rcmail.env.signatures[id])
+ rcmail.enable_command('plugin.sieverules.vacation_sig', true);
+ else
+ rcmail.enable_command('plugin.sieverules.vacation_sig', false);
+}
+
+rcube_webmail.prototype.sieverules_toggle_eheadlast = function(obj) {
+ var selectobj = document.getElementById(obj.id.replace('_eheadaddlast_', '_eheadindex_'));
+
+ if (obj.checked)
+ selectobj.selectedIndex = 6;
+ else
+ selectobj.selectedIndex = 0;
+}
+
+$(document).ready(function() {
+ if (window.rcmail) {
+ rcmail.addEventListener('init', function(evt) {
+ if (rcmail.env.action == 'plugin.sieverules.add' || rcmail.env.action == 'plugin.sieverules.edit' || rcmail.env.action == 'plugin.sieverules.setup' || rcmail.env.action == 'plugin.sieverules.advanced')
+ var tab = $('<span>').attr('id', 'settingstabpluginsieverules').addClass('tablink selected');
+ else
+ var tab = $('<span>').attr('id', 'settingstabpluginsieverules').addClass('tablink');
+
+ var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.sieverules').attr('title', rcmail.gettext('managefilters', 'sieverules')).html(rcmail.gettext('filters','sieverules')).appendTo(tab);
+
+ // add button and register command
+ rcmail.add_element(tab, 'tabs');
+
+ if ((rcmail.env.action == 'plugin.sieverules' || rcmail.env.action == 'plugin.sieverules.advanced') && !rcmail.env.sieveruleserror) {
+ if (rcmail.gui_objects.sieverules_list) {
+ rcmail.sieverules_list = new rcube_list_widget(rcmail.gui_objects.sieverules_list, {multiselect:false, draggable:true, keyboard:true});
+
+ // override blur function to prevent current rule being deselected
+ rcmail.sieverules_list.blur = function() {}
+
+ rcmail.sieverules_list.addEventListener('select', function(o) { rcmail.sieverules_select(o); });
+ rcmail.sieverules_list.addEventListener('keypress', function(o) { rcmail.sieverules_keypress(o); });
+ rcmail.sieverules_list.addEventListener('dragstart', function(o) { rcmail.sieverules_drag_start(o); });
+ rcmail.sieverules_list.addEventListener('dragmove', function(e) { rcmail.sieverules_drag_move(e); });
+ rcmail.sieverules_list.addEventListener('dragend', function(e) { rcmail.sieverules_drag_end(e); });
+ document.onmouseup = function(e) { return rcmail.sieverules_mouse_up(e); };
+ rcmail.sieverules_list.init();
+ rcmail.sieverules_list.focus();
+
+ if (rcmail.env.iid && rcmail.env.iid < rcmail.sieverules_list.rows.length && !rcmail.env.eid)
+ rcmail.sieverules_list.select_row(rcmail.env.iid, false, false);
+ }
+
+ if (rcmail.gui_objects.sieverules_examples) {
+ rcmail.sieverules_examples = new rcube_list_widget(rcmail.gui_objects.sieverules_examples, {multiselect:true, draggable:true, keyboard:true});
+ rcmail.sieverules_examples.addEventListener('select', function(o) { rcmail.sieverules_ex_select(o); });
+ rcmail.sieverules_examples.addEventListener('dragstart', function(o) { rcmail.sieverules_ex_drag_start(o); });
+ rcmail.sieverules_examples.addEventListener('dragmove', function(e) { rcmail.sieverules_drag_move(e); });
+ rcmail.sieverules_examples.addEventListener('dragend', function(e) { rcmail.sieverules_drag_end(e); });
+ rcmail.sieverules_examples.init();
+
+ if (rcmail.env.eid)
+ rcmail.sieverules_examples.highlight_row(rcmail.env.eid);
+
+ rcmail.register_command('plugin.sieverules.import_ex', function() {
+ if (rcmail.sieverules_examples.get_selection().length > 0) {
+ rcmail.set_busy(true, 'sieverules.movingfilter');
+ rcmail.goto_url('plugin.sieverules.import', '_import=_example_&_pos='+ rcmail.env.sieverules_last_target +'&_eids=' + rcmail.sieverules_examples.get_selection(), true);
+ }
+ }, true);
+ }
+
+ if (rcmail.env.action == 'plugin.sieverules') {
+ rcmail.register_command('plugin.sieverules.move', function(props, obj) {
+ var args = (props.source) ? props : { source:obj.parentNode.parentNode.rowIndex - 1, dest:props };
+
+ if (args.dest > -1 && args.dest <= rcmail.sieverules_list.rows.length) {
+ var lock = rcmail.set_busy(true, 'sieverules.movingfilter');
+ rcmail.http_request('plugin.sieverules.move', '_src=' + args.source + '&_dst=' + args.dest, lock);
+ }
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.add', function(id) {
+ if (rcmail.sieverules_examples) rcmail.sieverules_examples.clear_selection();
+ rcmail.sieverules_list.clear_selection();
+ rcmail.env.iid = null;
+ rcmail.enable_command('plugin.sieverules.delete', false);
+
+ var add_url = '';
+
+ var target = window;
+ if (rcmail.env.contentframe && window.frames && window.frames[rcmail.env.contentframe]) {
+ add_url = '&_framed=1';
+ target = window.frames[rcmail.env.contentframe];
+ rcube_find_object(rcmail.env.contentframe).style.visibility = 'inherit';
+ }
+
+ target.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules.add' + add_url;
+ }, true);
+ }
+
+ rcmail.register_command('plugin.sieverules.ruleset_dialog', function(props, obj) {
+ rcube_find_object('sieverulesrsdialog_add').style.display = 'none';
+ rcube_find_object('sieverulesrsdialog_edit').style.display = 'none';
+ rcube_find_object('sieverulesrsdialog_copyto').style.display = 'none';
+ rcube_find_object('sieverulesrsdialog_copyfrom').style.display = 'none';
+ rcube_find_object('sieverulesrsdialog_input').style.display = 'none';
+ rcube_find_object('sieverulesrsdialog_select').style.display = 'none';
+ rcube_find_object('sieverulesrsdialog_name').value = '';
+
+ if (props == 'rename_ruleset') {
+ //rcube_find_object('sieverulesrsdialog_edit').style.display = '';
+ boxtitle = rcube_find_object('sieverulesrsdialog_edit').innerHTML;
+ rcube_find_object('sieverulesrsdialog_input').style.display = '';
+ rcube_find_object('sieverulesrsdialog_name').value = rcmail.env.ruleset;
+ }
+ else if (props == 'copyto_ruleset') {
+ //rcube_find_object('sieverulesrsdialog_copyto').style.display = '';
+ boxtitle = rcube_find_object('sieverulesrsdialog_copyto').innerHTML;
+ rcube_find_object('sieverulesrsdialog_select').style.display = '';
+ }
+ else if (props == 'copyfrom_ruleset') {
+ //rcube_find_object('sieverulesrsdialog_copyfrom').style.display = '';
+ boxtitle = rcube_find_object('sieverulesrsdialog_copyfrom').innerHTML;
+ rcube_find_object('sieverulesrsdialog_select').style.display = '';
+ }
+ else {
+ //rcube_find_object('sieverulesrsdialog_add').style.display = '';
+ boxtitle = rcube_find_object('sieverulesrsdialog_add').innerHTML;
+ rcube_find_object('sieverulesrsdialog_input').style.display = '';
+ }
+
+ rcube_find_object('sieverulesrsdialog_action').value = props;
+
+ $('#sieverulesrsdialog').dialog({ title: boxtitle, width: 512, resizable: false, modal: true });
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.activate_ruleset', function(props, obj) {
+ rcmail.set_busy(true);
+
+ var obj = rcube_find_object('rulelist');
+ if (obj) {
+ rcmail.http_request('plugin.sieverules.enable_ruleset', '_ruleset=' + rcmail.env.ruleset, true);
+ obj.options.length = 0;
+
+ var opt = document.createElement('option');
+ opt.value = '';
+ opt.text = rcmail.gettext('loading','');
+
+ obj.options.add(opt);
+ rcmail.enable_command('plugin.sieverules.activate_ruleset', false);
+ }
+ else {
+ window.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules.enable_ruleset&_reload=1&_ruleset=' + rcmail.env.ruleset;
+ }
+ }, false);
+
+ rcmail.register_command('plugin.sieverules.del_ruleset', function(props, obj) {
+ if (rcmail.env.ruleset_total < 2)
+ return false;
+
+ if (confirm(rcmail.gettext('delrulesetconf','sieverules')))
+ window.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules.del_ruleset&_ruleset=' + rcmail.env.ruleset + '&_next=' + rcmail.env.ruleset_next;
+ }, false);
+
+ rcmail.register_command('plugin.sieverules.sieverules_adveditor', function(props, obj) {
+ var chkbox = document.createElement('checkbox');
+
+ if (props == "1")
+ chkbox.checked = true;
+
+ rcmail.sieverules_adveditor(chkbox);
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.delete', function(id) {
+ if (confirm(rcmail.gettext('filterdeleteconfirm','sieverules'))) {
+ var add_url = '';
+
+ var target = window;
+ if (rcmail.env.contentframe && window.frames && window.frames[rcmail.env.contentframe]) {
+ add_url = '&_framed=1';
+ target = window.frames[rcmail.env.contentframe];
+ rcube_find_object(rcmail.env.contentframe).style.visibility = 'inherit';
+ }
+
+ target.location.href = rcmail.env.comm_path+'&_action=plugin.sieverules.delete&_iid=' + rcmail.env.iid + add_url;
+ rcmail.enable_command('plugin.sieverules.delete', false);
+ }
+ }, false);
+
+ if (rcmail.env.action == 'plugin.sieverules.advanced') {
+ rcmail.register_command('plugin.sieverules.save', function() {
+ rcmail.gui_objects.editform.submit();
+ }, true);
+ }
+
+ // enable commands
+ if (!rcmail.env.ruleset_active && rcmail.env.ruleset_total > 1)
+ rcmail.enable_command('plugin.sieverules.del_ruleset', true);
+
+ if (!rcmail.env.ruleset_active)
+ rcmail.enable_command('plugin.sieverules.activate_ruleset', true);
+ }
+ else if (rcmail.env.action == 'plugin.sieverules.setup') {
+ rcmail.register_command('plugin.sieverules.import', function(props) {
+ var add_url = '';
+
+ var target = window;
+ if (rcmail.env.framed)
+ target = window.parent;
+
+ target.location.href = './?_task=settings&_action=plugin.sieverules.import&' + props;
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.ruleset_dialog_setup', function(props, obj) {
+ var target = window;
+ if (rcmail.env.framed)
+ target = window.parent;
+
+ target.rcube_find_object('sieverulesrsdialog_add').style.display = 'none';
+ target.rcube_find_object('sieverulesrsdialog_edit').style.display = 'none';
+ target.rcube_find_object('sieverulesrsdialog_input').style.display = 'none';
+ //target.rcube_find_object('sieverulesrsdialog_copyfrom').style.display = '';
+ boxtitle = rcube_find_object('sieverulesrsdialog_copyfrom').innerHTML;
+ target.rcube_find_object('sieverulesrsdialog_select').style.display = '';
+ target.rcube_find_object('sieverulesrsdialog_action').value = props;
+
+ target.$('#sieverulesrsdialog').dialog({ title: boxtitle, width: 512, resizable: false, modal: true });
+ }, true);
+ }
+
+ if (rcmail.env.action == 'plugin.sieverules.add' || rcmail.env.action == 'plugin.sieverules.edit') {
+ rcmail.register_command('plugin.sieverules.add_rule', function(props, obj) {
+ rcmail.enable_command('plugin.sieverules.del_rule', true);
+ var rulesTable = rcube_find_object('rules-table').tBodies[0];
+ var idx = obj.parentNode.parentNode.rowIndex + 3;
+ var newNode1 = rulesTable.rows[0].cloneNode(true);
+ var newNode2 = rulesTable.rows[1].cloneNode(true);
+ var newNode3 = rulesTable.rows[2].cloneNode(true);
+
+ if (idx < rulesTable.rows.length) {
+ rulesTable.insertBefore(newNode3, rulesTable.rows[idx]);
+ rulesTable.insertBefore(newNode2, rulesTable.rows[idx]);
+ rulesTable.insertBefore(newNode1, rulesTable.rows[idx]);
+ }
+ else {
+ rulesTable.appendChild(newNode1);
+ rulesTable.appendChild(newNode2);
+ rulesTable.appendChild(newNode3);
+ }
+
+ rcmail.env.sieverules_rules++;
+ var tmp = $(newNode2).html().replace(/rowid/g, rcmail.env.sieverules_rules);
+ $(newNode2).html(tmp);
+ var tmp = $(newNode3).html().replace(/rowid/g, rcmail.env.sieverules_rules);
+ $(newNode3).html(tmp);
+
+ newNode1.style.display = "";
+ newNode2.style.display = "none";
+ newNode3.style.display = "none";
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.del_rule', function(props, obj) {
+ var rulesTable = rcube_find_object('rules-table').tBodies[0];
+
+ if (rulesTable.rows.length == 6)
+ return false;
+
+ if (confirm(rcmail.gettext('ruledeleteconfirm','sieverules'))) {
+ rulesTable.deleteRow(obj.parentNode.parentNode.rowIndex + 2);
+ rulesTable.deleteRow(obj.parentNode.parentNode.rowIndex + 1);
+ rulesTable.deleteRow(obj.parentNode.parentNode.rowIndex);
+ }
+
+ if (rcube_find_object('rules-table').tBodies[0].rows.length == 6)
+ rcmail.enable_command('plugin.sieverules.del_rule', false);
+
+ return false;
+ }, false);
+
+ rcmail.register_command('plugin.sieverules.copy_rule', function(props, obj) {
+ parent.rcmail.command('plugin.sieverules.ruleset_dialog', 'copyto_ruleset', obj);
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.add_action', function(props, obj) {
+ rcmail.enable_command('plugin.sieverules.del_action', true);
+ var actsTable = rcube_find_object('actions-table').tBodies[0];
+ var idx = obj.parentNode.parentNode.rowIndex + 1;
+ var newNode = actsTable.rows[0].cloneNode(true);
+
+ if (idx < actsTable.rows.length)
+ actsTable.insertBefore(newNode, actsTable.rows[idx]);
+ else
+ actsTable.appendChild(newNode);
+
+ rcmail.env.sieverules_actions++;
+ var tmp = $(newNode).html().replace(/rowid/g, rcmail.env.sieverules_actions);
+ $(newNode).html(tmp);
+
+ newNode.style.display = "";
+
+ return false;
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.del_action', function(props, obj) {
+ var actsTable = rcube_find_object('actions-table').tBodies[0];
+
+ if (actsTable.rows.length == 2)
+ return false;
+
+ if (confirm(rcmail.gettext('actiondeleteconfirm','sieverules')))
+ actsTable.deleteRow(obj.parentNode.parentNode.rowIndex);
+
+ if (rcube_find_object('actions-table').tBodies[0].rows.length == 2)
+ rcmail.enable_command('plugin.sieverules.del_action', false);
+
+ return false;
+ }, false);
+
+ rcmail.register_command('plugin.sieverules.save', function() {
+ var rows;
+
+ if (rcmail.env.framed)
+ rows = parent.rcmail.sieverules_list.rows;
+ else
+ rows = rcmail.sieverules_list.rows;
+
+ var input_name = rcube_find_object('_name');
+ var rule_join = document.getElementsByName('_join');
+ var headers = document.getElementsByName('_header[]');
+ var bodyparts = document.getElementsByName('_bodypart[]');
+ var contentparts = document.getElementsByName('_body_contentpart[]');
+ var dateparts = document.getElementsByName('_datepart[]');
+ var ops = document.getElementsByName('_operator[]');
+ var advops = document.getElementsByName('_advoperator[]');
+ var targets = document.getElementsByName('_target[]');
+ var advtargets = document.getElementsByName('_advtarget[]');
+ var acts = document.getElementsByName('_act[]');
+ var folders = document.getElementsByName('_folder[]');
+ var customfolders = document.getElementsByName('_customfolder[]');
+ var addrs = document.getElementsByName('_redirect[]');
+ var rejects = document.getElementsByName('_reject[]');
+ var senders = document.getElementsByName('_vacfrom[]');
+ var aliases = document.getElementsByName('_vacto[]');
+ var days = document.getElementsByName('_day[]');
+ var subjects = document.getElementsByName('_subject[]');
+ var msgs = document.getElementsByName('_msg[]');
+ var nmethods = document.getElementsByName('_nmethod[]');
+ var nmsgs = document.getElementsByName('_nmsg[]');
+ var eheadernames = document.getElementsByName('_eheadname[]');
+ var eheadervals = document.getElementsByName('_eheadval[]');
+ var size_test = new RegExp('^[0-9]+$');
+ var spamtest_test = new RegExp('^[0-9]+$');
+ var header_test = new RegExp('^[a-zA-Z0-9\-]+( ?, ?[a-zA-Z0-9\-]+)*$');
+ var date_test = new RegExp('^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$');
+ var time_test = new RegExp('^[0-9]{2}:[0-9]{2}:[0-9]{2}$');
+
+ if (input_name && input_name.value == '') {
+ alert(rcmail.gettext('norulename','sieverules'));
+ input_name.focus();
+ return false;
+ }
+
+ for (var i = 0; i < rows.length; i++) {
+ if (input_name.value == rows[i].obj.cells[0].innerHTML && i != rcmail.env.iid) {
+ alert(rcmail.gettext('ruleexists','sieverules'));
+ input_name.focus();
+ return false;
+ }
+ }
+
+ for (var i = 1; i < headers.length && (rule_join[0].checked || rule_join[1].checked); i++) {
+ if (headers[i].value == '') {
+ alert(rcmail.gettext('noheader','sieverules'));
+ headers[i].focus();
+ return false;
+ }
+
+ if (!header_test.test(headers[i].value)) {
+ alert(rcmail.gettext('headerbadchars','sieverules'));
+ headers[i].focus();
+ return false;
+ }
+
+ if (bodyparts[i].value == 'content' && contentparts[i].value == '') {
+ alert(rcmail.gettext('nobodycontentpart','sieverules'));
+ contentparts[i].focus();
+ return false;
+ }
+
+ if (targets[i] && dateparts[i].value != 'weekday' && ops[i].value.indexOf("exists") == -1 && ops[i].value.indexOf("advoptions") == -1 && targets[i].value == '') {
+ alert(rcmail.gettext('noheadervalue','sieverules'));
+ targets[i].focus();
+ return false;
+ }
+
+ if (advtargets[i] && dateparts[i].value != 'weekday' && ops[i].value.indexOf("advoptions") != -1 && advtargets[i].value == '') {
+ alert(rcmail.gettext('noheadervalue','sieverules'));
+ advtargets[i].focus();
+ return false;
+ }
+
+ if (headers[i].value == 'size' && !size_test.test(targets[i].value)) {
+ alert(rcmail.gettext('sizewrongformat','sieverules'));
+ targets[i].focus();
+ return false;
+ }
+
+ if (headers[i].value == 'spamtest') {
+ targets[i].value = document.getElementsByName('_spam_probability[]')[i].value;
+ }
+
+ if (headers[i].value == 'virustest') {
+ targets[i].value = document.getElementsByName('_virus_probability[]')[i].value;
+ }
+
+ if (headers[i].value == 'body' && (advops[i].value.indexOf('user') > -1 || advops[i].value.indexOf('detail') > -1 || advops[i].value.indexOf('domain') > -1)) {
+ alert(rcmail.gettext('badoperator','sieverules'));
+ advops[i].focus();
+ return false;
+ }
+
+ if ((headers[i].value == 'date' || headers[i].value == 'currentdate')) {
+ if (dateparts[i].value == 'date' && !date_test.test(targets[i].value)) {
+ alert(rcmail.gettext('baddateformat','sieverules'));
+ targets[i].focus();
+ return false;
+ }
+ else if (dateparts[i].value == 'time' && !time_test.test(targets[i].value)) {
+ alert(rcmail.gettext('badtimeformat','sieverules'));
+ targets[i].focus();
+ return false;
+ }
+ }
+ }
+
+ for (var i = 1; i < acts.length; i++) {
+ var idx = acts[i].selectedIndex;
+
+ if (acts[i][idx].value == 'fileinto' || acts[i][idx].value == 'fileinto_copy') {
+ if (folders[i].value == '@@newfolder' && customfolders[i].value == '') {
+ alert(rcmail.gettext('missingfoldername','sieverules'));
+ customfolders[i].focus();
+ return false;
+ }
+ }
+ else if (acts[i][idx].value == 'redirect' || acts[i][idx].value == 'redirect_copy') {
+ if (addrs[i].value == '') {
+ alert(rcmail.gettext('noredirect','sieverules'));
+ addrs[i].focus();
+ return false;
+ }
+
+ if (!rcube_check_email(addrs[i].value.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true)) {
+ alert(rcmail.gettext('redirectaddresserror','sieverules'));
+ addrs[i].focus();
+ return false;
+ }
+ }
+ else if (acts[i][idx].value == 'reject' || acts[i][idx].value == 'ereject') {
+ if (rejects[i].value == '') {
+ alert(rcmail.gettext('noreject','sieverules'));
+ rejects[i].focus();
+ return false;
+ }
+ }
+ else if (acts[i][idx].value == 'vacation') {
+ if (senders[i].value != '' && senders[i].value != 'auto' && !rcube_check_email(senders[i].value.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true) && !$.isNumeric(senders[i].value)) {
+ alert(rcmail.gettext('redirectaddresserror','sieverules'));
+ senders[i].focus();
+ return false;
+ }
+
+ if (aliases[i].value.indexOf(' ') > -1 || aliases[i].value.indexOf(';') > -1) {
+ alert(rcmail.gettext('vactoexp_err','sieverules'));
+ aliases[i].focus();
+ return false;
+ }
+
+ //if (days[i].value == '') {
+ // alert(rcmail.gettext('vacnodays','sieverules'));
+ // days[i].focus();
+ // return false;
+ //}
+
+ if (days[i].value != '' && (!size_test.test(days[i].value) || days[i].value < 1)) {
+ alert(rcmail.gettext('vacdayswrongformat','sieverules'));
+ days[i].focus();
+ return false;
+ }
+
+ //if (subjects[i].value == '') {
+ // alert(rcmail.gettext('vacnosubject','sieverules'));
+ // subjects[i].focus();
+ // return false;
+ //}
+
+ var editor = tinyMCE.get("rcmfd_sievevacmag_" + (i - 1));
+ if ((editor && editor.getContent() == '') || (!editor && msgs[i].value == '')) {
+ alert(rcmail.gettext('vacnomsg','sieverules'));
+ msgs[i].focus();
+ return false;
+ }
+ }
+ else if (acts[i][idx].value == 'notify' || acts[i][idx].value == 'enotify') {
+ if (nmethods[i].value == '') {
+ alert(rcmail.gettext('notifynomethod','sieverules'));
+ nmethods[i].focus();
+ return false;
+ }
+
+ if (acts[i][idx].value == 'enotify' && nmethods[i].value.indexOf(':') == -1) {
+ alert(rcmail.gettext('notifyinvalidmethod','sieverules'));
+ nmethods[i].focus();
+ return false;
+ }
+
+ if (nmsgs[i].value == '') {
+ alert(rcmail.gettext('notifynomsg','sieverules'));
+ nmsgs[i].focus();
+ return false;
+ }
+ }
+ else if (acts[i][idx].value == 'editheaderadd' || acts[i][idx].value == 'editheaderrem') {
+ if (eheadernames[i].value == '') {
+ alert(rcmail.gettext('eheadernoname','sieverules'));
+ eheadernames[i].focus();
+ return false;
+ }
+
+ if (acts[i][idx].value == 'editheaderadd') {
+ if (eheadervals[i].value == '') {
+ alert(rcmail.gettext('eheadernoval','sieverules'));
+ eheadervals[i].focus();
+ return false;
+ }
+ }
+ }
+ }
+
+ // enable the comparators field
+ for (var i = 0; i < document.getElementsByName('_comparator[]').length; i++)
+ document.getElementsByName('_comparator[]')[i].disabled = false;
+
+ rcmail.gui_objects.editform.submit();
+ }, true);
+
+ rcmail.register_command('plugin.sieverules.vacation_sig', function(id) {
+ var obj = document.getElementById("rcmfd_sievevacfrom_" + id);
+ var is_html = ($("#rcmfd_sievevachtmlcb_" + id).is(':checked'));
+
+ if (!obj || !obj.options)
+ return false;
+
+ var sig, id;
+ var sig_separator = '-- ';
+
+ if (obj.options[0].value == 'auto' || obj.options[0].value == '')
+ id = obj.selectedIndex;
+ else
+ id = obj.selectedIndex + 1;
+
+ if (is_html) {
+ var editor = tinyMCE.get("rcmfd_sievevacmag_" + id),
+ sigElem = editor.dom.get('_rc_sig');
+
+ // Append the signature as a div within the body
+ if (!sigElem) {
+ var body = editor.getBody(),
+ doc = editor.getDoc();
+
+ sigElem = doc.createElement('div');
+ sigElem.setAttribute('id', '_rc_sig');
+
+ if (bw.ie) // add empty line before signature on IE
+ body.appendChild(doc.createElement('br'));
+
+ body.appendChild(sigElem);
+ }
+
+ if (rcmail.env.signatures[id]) {
+ if (rcmail.env.signatures[id].is_html) {
+ sig = rcmail.env.signatures[id].text;
+ if (!rcmail.env.signatures[id].plain_text.match(/^--[ -]\r?\n/m))
+ sig = sig_separator + '<br />' + sig;
+ }
+ else {
+ sig = rcmail.env.signatures[id].text;
+ if (!sig.match(/^--[ -]\r?\n/m))
+ sig = sig_separator + '\n' + sig;
+
+ sig = '<pre>' + sig + '</pre>';
+ }
+
+ sigElem.innerHTML = sig;
+ }
+ }
+ else {
+ var input_message = $("#rcmfd_sievevacmag_" + id);
+ var message = input_message.val();
+
+ if (rcmail.env.signatures && rcmail.env.signatures[id]) {
+ sig = rcmail.env.signatures[id]['text'];
+ sig = sig.replace(/\r\n/g, '\n');
+
+ if (!sig.match(/^--[ -]\n/))
+ sig = sig_separator + '\n' + sig;
+
+ message = message.replace(/[\r\n]+$/, '');
+ message += '\n\n' + sig;
+ }
+
+ input_message.val(message);
+ }
+
+ return false;
+ }, false);
+
+ // enable commands
+ if (rcube_find_object('rules-table').tBodies[0].rows.length > 6)
+ rcmail.enable_command('plugin.sieverules.del_rule', true);
+
+ if (rcube_find_object('actions-table').tBodies[0].rows.length > 2)
+ rcmail.enable_command('plugin.sieverules.del_action', true);
+
+ rcmail.enable_command('toggle-editor', true);
+
+ // enable sig button
+ var acts = document.getElementsByName('_act[]');
+ for (var i = 1; i < acts.length; i++) {
+ var idx = acts[i].selectedIndex;
+
+ if (acts[i][idx].value == 'vacation')
+ rcmail.enable_sig(document.getElementsByName('_vacfrom[]')[i]);
+ }
+
+ // add input masks
+ rcmail.add_onload(function setup_inputmasks() {
+ // date/time inputs
+ headers = document.getElementsByName('_selheader[]');
+ for (var i = 0; i < headers.length; i++) {
+ if (headers[i].value.indexOf('date::') == 0) {
+ var obj = document.getElementsByName('_datepart[]')[i];
+ var target_obj = $("input[name='_target[]']")[i];
+
+ $(target_obj).datepicker("destroy");
+ $(target_obj).unmask();
+
+ if (obj.value == 'date')
+ $(target_obj).datepicker({ dateFormat: 'yy-mm-dd' });
+ else if (obj.value == 'time')
+ $(target_obj).mask('99:99:99', {example: 'HH:MM:SS', placeholder: '0'});
+ }
+
+ }
+ });
+ }
+ });
+ }
+}); \ No newline at end of file
diff --git a/plugins/sieverules/sieverules.php b/plugins/sieverules/sieverules.php
new file mode 100644
index 000000000..adb2bc16b
--- /dev/null
+++ b/plugins/sieverules/sieverules.php
@@ -0,0 +1,2331 @@
+<?php
+
+/**
+ * SieveRules
+ *
+ * Plugin to allow the user to manage their Sieve filters using the managesieve protocol
+ *
+ * @version @package_version@
+ * @requires jQueryUI plugin
+ * @author Philip Weir
+ * Based on the Managesieve plugin by Aleksander Machniak
+ */
+class sieverules extends rcube_plugin
+{
+ public $task = 'settings';
+ private $sieve;
+ private $sieve_error;
+ private $script;
+ private $action;
+ private $examples = array();
+ private $force_vacto = false;
+ private $show_vacfrom = false;
+ private $show_vachandle = false;
+ private $current_ruleset;
+
+ // default values: label => value
+ private $headers = array('subject' => 'header::Subject',
+ 'from' => 'address::From',
+ 'to' => 'address::To',
+ 'cc' => 'address::Cc',
+ 'bcc' => 'address::Bcc',
+ 'envelopeto' => 'envelope::To',
+ 'envelopefrom' => 'envelope::From'
+ );
+
+ private $operators = array('filtercontains' => 'contains',
+ 'filternotcontains' => 'notcontains',
+ 'filteris' => 'is',
+ 'filterisnot' => 'notis',
+ 'filterexists' => 'exists',
+ 'filternotexists' => 'notexists'
+ );
+
+ private $flags = array('flagread' => '\\\\Seen',
+ 'flagdeleted' => '\\\\Deleted',
+ 'flaganswered' => '\\\\Answered',
+ 'flagdraft' => '\\\\Draft',
+ 'flagflagged' => '\\\\Flagged'
+ );
+
+ function init()
+ {
+ $rcmail = rcube::get_instance();
+ $this->load_config();
+
+ // load required plugin
+ $this->require_plugin('jqueryui');
+
+ if ($rcmail->config->get('sieverules_multiplerules') && rcube_utils::get_input_value('_ruleset', rcube_utils::INPUT_GET, true))
+ $this->current_ruleset = rcube_utils::get_input_value('_ruleset', rcube_utils::INPUT_GET, true);
+ elseif ($rcmail->config->get('sieverules_multiplerules') && $_SESSION['sieverules_current_ruleset'])
+ $this->current_ruleset = $_SESSION['sieverules_current_ruleset'];
+ elseif ($rcmail->config->get('sieverules_multiplerules'))
+ $this->current_ruleset = false;
+ else
+ $this->current_ruleset = $rcmail->config->get('sieverules_ruleset_name');
+
+ // override default values
+ if ($rcmail->config->get('sieverules_default_headers'))
+ $this->headers = $rcmail->config->get('sieverules_default_headers');
+
+ if ($rcmail->config->get('sieverules_default_operators'))
+ $this->operators = $rcmail->config->get('sieverules_default_operators');
+
+ if ($rcmail->config->get('sieverules_default_flags'))
+ $this->flags = $rcmail->config->get('sieverules_default_flags');
+
+ $this->action = $rcmail->action;
+
+ $this->add_texts('localization/', array('filters', 'managefilters'));
+ $this->include_stylesheet($this->local_skin_path() . '/tabstyles.css');
+ $this->include_script('sieverules.js');
+
+ $this->register_action('plugin.sieverules', array($this, 'init_html'));
+ $this->register_action('plugin.sieverules.add', array($this, 'init_html'));
+ $this->register_action('plugin.sieverules.edit', array($this, 'init_html'));
+ $this->register_action('plugin.sieverules.setup', array($this, 'init_setup'));
+ $this->register_action('plugin.sieverules.advanced', array($this, 'init_html'));
+ $this->register_action('plugin.sieverules.move', array($this, 'move'));
+ $this->register_action('plugin.sieverules.save', array($this, 'save'));
+ $this->register_action('plugin.sieverules.delete', array($this, 'delete'));
+ $this->register_action('plugin.sieverules.import', array($this, 'import'));
+ $this->register_action('plugin.sieverules.update_list', array($this, 'gen_js_list'));
+ $this->register_action('plugin.sieverules.del_ruleset', array($this, 'delete_ruleset'));
+ $this->register_action('plugin.sieverules.rename_ruleset', array($this, 'rename_ruleset'));
+ $this->register_action('plugin.sieverules.enable_ruleset', array($this, 'enable_ruleset'));
+ $this->register_action('plugin.sieverules.copy_filter', array($this, 'copy_filter'));
+ }
+
+ function init_html()
+ {
+ $rcmail = rcube::get_instance();
+
+ // always include all identities when creating vacation messages
+ if ($rcmail->config->get('sieverules_force_vacto'))
+ $this->force_vacto = $rcmail->config->get('sieverules_force_vacto');
+
+ // include the 'from' option when creating vacation messages
+ if ($rcmail->config->get('sieverules_show_vacfrom'))
+ $this->show_vacfrom = $rcmail->config->get('sieverules_show_vacfrom');
+
+ // include the 'handle' option when creating vacation messages
+ if ($rcmail->config->get('sieverules_show_vachandle'))
+ $this->show_vachandle = $rcmail->config->get('sieverules_show_vachandle');
+
+ $this->_startup();
+
+ if ($rcmail->config->get('sieverules_multiplerules') && $this->current_ruleset === false) {
+ if ($ruleset = $this->sieve->get_active()) {
+ $this->current_ruleset = $this->sieve->get_active();
+ }
+ else {
+ $this->current_ruleset = $rcmail->config->get('sieverules_ruleset_name');
+ $this->_startup();
+ $rcmail->overwrite_action('plugin.sieverules.setup');
+ $this->action = 'plugin.sieverules.setup';
+ }
+ }
+
+ if ($rcmail->config->get('sieverules_multiplerules'))
+ $_SESSION['sieverules_current_ruleset'] = $this->current_ruleset;
+
+ $this->api->output->set_env('ruleset', $this->current_ruleset);
+ if ($rcmail->config->get('sieverules_adveditor') == 2 && rcube_utils::get_input_value('_override', rcube_utils::INPUT_GET) != '1' && $this->action == 'plugin.sieverules') {
+ $rcmail->overwrite_action('plugin.sieverules.advanced');
+ $this->action = 'plugin.sieverules.advanced';
+ }
+
+ $this->api->output->add_handlers(array(
+ 'sieveruleslist' => array($this, 'gen_list'),
+ 'sieverulesexamplelist' => array($this, 'gen_examples'),
+ 'sieverulessetup' => array($this, 'gen_setup'),
+ 'sieveruleform' => array($this, 'gen_form'),
+ 'advancededitor' => array($this, 'gen_advanced'),
+ 'advswitch' => array($this, 'gen_advswitch'),
+ 'rulelist' => array($this, 'gen_rulelist'),
+ 'sieverulesframe' => array($this, 'sieverules_frame'),
+ ));
+
+ if ($this->action != 'plugin.sieverules.advanced')
+ $this->api->output->include_script('list.js');
+
+ if (sizeof($this->examples) > 0)
+ $this->api->output->set_env('examples', 'true');
+
+ if ($this->action == 'plugin.sieverules.add' || $this->action == 'plugin.sieverules.edit') {
+ $rcmail->html_editor('sieverules');
+ $this->api->output->add_script(sprintf("window.rcmail_editor_settings = %s",
+ json_encode(array(
+ 'plugins' => 'paste,tabfocus',
+ 'theme_advanced_buttons1' => 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr',
+ 'theme_advanced_buttons2' => 'link,unlink,code,forecolor,fontselect,fontsizeselect',
+ ))), 'head');
+
+ $this->api->output->set_pagetitle($this->action == 'plugin.sieverules.add' ? $this->gettext('newfilter') : $this->gettext('edititem'));
+ $this->api->output->send('sieverules.editsieverule');
+ }
+ elseif ($this->action == 'plugin.sieverules.setup') {
+ $this->api->output->set_pagetitle($this->gettext('filters'));
+ $this->api->output->add_script(rcmail_output::JS_OBJECT_NAME .".add_onload('". rcmail_output::JS_OBJECT_NAME .".sieverules_load_setup()');");
+ $this->api->output->send('sieverules.sieverules');
+ }
+ elseif ($this->action == 'plugin.sieverules.advanced') {
+ $this->api->output->set_pagetitle($this->gettext('filters'));
+ $this->api->output->send('sieverules.advancededitor');
+ }
+ else {
+ $this->api->output->set_pagetitle($this->gettext('filters'));
+ $this->api->output->send('sieverules.sieverules');
+ }
+ }
+
+ function init_setup()
+ {
+ $this->_startup();
+
+ $this->api->output->add_handlers(array(
+ 'sieverulessetup' => array($this, 'gen_setup'),
+ ));
+
+ $this->api->output->set_pagetitle($this->gettext('filters'));
+ $this->api->output->send('sieverules.setupsieverules');
+ }
+
+ function sieverules_frame($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmprefsframe';
+
+ return $this->api->output->frame($attrib, true);
+ }
+
+ function gen_advanced($attrib)
+ {
+ list($form_start, $form_end) = get_form_tags($attrib, 'plugin.sieverules.save');
+ $out = $form_start;
+
+ $input_script = new html_textarea(array('id' => 'sieverules_adv', 'name' => '_script'));
+ $out .= $input_script->show($this->sieve->script->raw);
+
+ $out .= $form_end;
+
+ return $out;
+ }
+
+ function gen_list($attrib)
+ {
+ $this->api->output->add_label('sieverules.movingfilter', 'loading', 'sieverules.switchtoadveditor', 'sieverules.filterdeleteconfirm');
+ $this->api->output->add_gui_object('sieverules_list', 'sieverules-table');
+
+ $table = new html_table(array('id' => 'sieverules-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 2));
+
+ if (rcube::get_instance()->config->get('sieverules_multiplerules', false)) {
+ if ($this->current_ruleset == $this->sieve->get_active())
+ $status = html::img(array('id' => 'rulesetstatus', 'src' => $attrib['activeicon'], 'alt' => $this->gettext('isactive'), 'title' => $this->gettext('isactive')));
+ else
+ $status = html::img(array('id' => 'rulesetstatus', 'src' => $attrib['inactiveicon'], 'alt' => $this->gettext('isinactive'), 'title' => $this->gettext('isinactive')));
+
+ $table->add_header(array('colspan' => '2'), html::span(array('title' => $this->current_ruleset), $this->gettext(array('name' => 'filtersname', 'vars' => array('name' => $this->current_ruleset)))) . $status);
+ }
+ else {
+ $table->add_header(array('colspan' => 2), $this->gettext('filters'));
+ }
+
+ if (sizeof($this->script) == 0) {
+ $table->add(array('colspan' => '2'), rcube_utils::rep_specialchars_output($this->gettext('nosieverules')));
+ }
+ else foreach($this->script as $idx => $filter) {
+ $table->set_row_attribs(array('id' => 'rcmrow' . $idx));
+
+ if ($filter['disabled'] == 1)
+ $table->add(null, rcmail::Q($filter['name']) . ' (' . $this->gettext('disabled') . ')');
+ else
+ $table->add(null, rcmail::Q($filter['name']));
+
+ $dst = $idx - 1;
+ $up_link = $this->api->output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'up_arrow', 'title' => 'sieverules.moveup', 'content' => ' '));
+ $dst = $idx + 2;
+ $down_link = $this->api->output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'down_arrow', 'title' => 'sieverules.movedown', 'content' => ' '));
+
+ $table->add('control', $down_link . $up_link);
+ }
+
+ return html::tag('div', array('id' => 'sieverules-list-filters'), $table->show($attrib));
+ }
+
+ function gen_js_list()
+ {
+ $this->_startup();
+
+ if (sizeof($this->script) == 0) {
+ $this->api->output->command('sieverules_update_list', 'add-first', -1, rcube_utils::rep_specialchars_output($this->gettext('nosieverules')));
+ }
+ else foreach($this->script as $idx => $filter) {
+ if ($filter['disabled'] == 1)
+ $filter_name = $filter['name'] . ' (' . $this->gettext('disabled') . ')';
+ else
+ $filter_name = $filter['name'];
+
+ $tmp_output = new rcmail_output_html('settings');
+ $dst = $idx - 1;
+ $up_link = $tmp_output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'up_arrow', 'title' => 'sieverules.moveup', 'content' => ' '));
+ $up_link = str_replace("'", "\'", $up_link);
+ $dst = $idx + 2;
+ $down_link = $tmp_output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'down_arrow', 'title' => 'sieverules.movedown', 'content' => ' '));
+ $down_link = str_replace("'", "\'", $down_link);
+
+ $this->api->output->command('sieverules_update_list', $idx == 0 ? 'add-first' : 'add', 'rcmrow' . $idx, rcmail::JQ($filter_name), $down_link, $up_link);
+ }
+
+ $this->api->output->send();
+ }
+
+ function gen_examples($attrib)
+ {
+ if (sizeof($this->examples) > 0) {
+ $this->api->output->add_gui_object('sieverules_examples', 'sieverules-examples');
+
+ $examples = new html_table(array('id' => 'sieverules-examples', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 1));
+ $examples->add_header(null, $this->gettext('examplefilters'));
+
+ foreach($this->examples as $idx => $filter) {
+ $examples->set_row_attribs(array('id' => 'rcmrowex' . $idx));
+ $examples->add(null, rcmail::Q($filter['name']));
+ }
+
+ return html::tag('div', array('id' => 'sieverules-list-examples'), $examples->show($attrib));
+ }
+ else {
+ return '';
+ }
+
+ }
+
+ function gen_advswitch($attrib)
+ {
+ $input_adv = new html_checkbox(array('id' => 'adveditor', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_adveditor(this);', 'value' => '1'));
+ $out = html::label('adveditor', rcmail::Q($this->gettext('adveditor'))) . $input_adv->show($this->action == 'plugin.sieverules.advanced' ? '1' : '');
+ return html::tag('div', array('id' => 'advancedmode'), $out);
+ }
+
+ function gen_rulelist($attrib)
+ {
+ $this->api->output->add_label('sieverules.delrulesetconf', 'sieverules.rulesetexists');
+
+ $rulesets = array();
+ foreach ($this->sieve->list as $ruleset) {
+ array_push($rulesets, $ruleset);
+ }
+ sort($rulesets);
+ $activeruleset = $this->sieve->get_active();
+
+ $next_ruleset = '';
+ for ($i = 0; $i < sizeof($rulesets); $i++) {
+ if ($rulesets[$i] == $this->current_ruleset) {
+ $i++;
+
+ if ($i == sizeof($rulesets))
+ $i = sizeof($rulesets) - 2;
+
+ $next_ruleset = $rulesets[$i];
+ break;
+ }
+ }
+
+ $this->api->output->set_env('ruleset_total', sizeof($rulesets));
+ $this->api->output->set_env('ruleset_active', $this->current_ruleset == $activeruleset ? True : False);
+ $this->api->output->set_env('ruleset_next', $next_ruleset);
+
+ // new/rename ruleset dialog
+ $out = '';
+ $table = new html_table(array('cols' => 2, 'class' => 'propform'));
+ $table->set_row_attribs(array('id' => 'sieverulesrsdialog_input'));
+ $table->add('title', html::label('sieverulesrsdialog_name', rcmail::Q($this->gettext('name'))));
+ $table->add(null, html::tag('input', array('type' => 'text', 'id' => 'sieverulesrsdialog_name', 'name' => '_name', 'value' => '')));
+
+ $select_ruleset = new html_select(array('id' => 'sieverulesrsdialog_ruleset'));
+ if (sizeof($this->sieve->list) == 1) {
+ $select_ruleset->add(rcmail::Q($this->gettext('nosieverulesets')), '');
+ }
+ else foreach ($rulesets as $ruleset) {
+ if ($ruleset !== $this->current_ruleset)
+ $select_ruleset->add(rcmail::Q($ruleset), rcmail::Q($ruleset));
+ }
+
+ $table->set_row_attribs(array('id' => 'sieverulesrsdialog_select'));
+ $table->add('title', html::label('sieverulesrsdialog_ruleset', rcmail::Q($this->gettext('selectruleset'))));
+ $table->add(null, $select_ruleset->show());
+
+ $buttons = html::tag('input', array('type' => 'hidden', 'id' => 'sieverulesrsdialog_action', 'value' => ''));
+ $buttons .= html::tag('input', array('type' => 'button', 'class' => 'button mainaction', 'value' => $this->gettext('save'), 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverulesdialog_submit();')) . '&nbsp;';
+
+ $out .= html::tag('h3', array('id' => 'sieverulesrsdialog_add'), rcmail::Q($this->gettext('newruleset')));
+ $out .= html::tag('h3', array('id' => 'sieverulesrsdialog_edit', 'style' => 'display: none;'), rcmail::Q($this->gettext('renameruleset')));
+ $out .= html::tag('h3', array('id' => 'sieverulesrsdialog_copyto', 'style' => 'display: none;'), rcmail::Q($this->gettext('copytoruleset')));
+ $out .= html::tag('h3', array('id' => 'sieverulesrsdialog_copyfrom', 'style' => 'display: none;'), rcmail::Q($this->gettext('copyfromruleset')));
+ $out .= $table->show();
+ $out .= html::p(array('class' => 'formbuttons'), $buttons);
+ $out = html::tag('form', array(), $out);
+ $out = html::div(array('id' => 'sieverulesrsdialog', 'style' => 'display: none;'), $out);
+
+ // add overlay input box to html page
+ $this->api->output->add_footer($out);
+
+ $action = ($this->action == 'plugin.sieverules.advanced') ? 'plugin.sieverules.advanced' : 'plugin.sieverules';
+ if ($attrib['type'] == 'link') {
+ $lis = '';
+
+ if (sizeof($this->sieve->list) == 0) {
+ $href = html::a(array('href' => "#", 'class' => 'active', 'onclick' => 'return false;'), rcmail::Q($this->gettext('nosieverulesets')));
+ $lis .= html::tag('li', $href);
+ }
+ else foreach ($rulesets as $ruleset) {
+ $class = 'active';
+ if ($ruleset === $this->current_ruleset)
+ $class .= ' selected';
+
+ $ruleset_text = $ruleset;
+ if ($ruleset === $activeruleset)
+ $ruleset_text = str_replace('%s', $ruleset, $this->gettext('activeruleset'));
+
+ $href = html::a(array('href' => "#", 'class' => $class, 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_select_ruleset(\''. $ruleset .'\', \''. $action .'\');'), rcmail::Q($ruleset_text));
+ $lis .= html::tag('li', null, $href);
+ }
+
+ return $lis;
+ }
+ elseif ($attrib['type'] == 'select') {
+ $select_ruleset = new html_select(array('id' => 'rulelist', 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_select_ruleset(this, \''. $action .'\');'));
+
+ if (sizeof($this->sieve->list) == 0) {
+ $select_ruleset->add(rcmail::Q($this->gettext('nosieverulesets')), '');
+ }
+ else foreach ($rulesets as $ruleset) {
+ if ($ruleset === $activeruleset)
+ $ruleset = str_replace('%s', $ruleset, $this->gettext('activeruleset'));
+
+ $select_ruleset->add(rcmail::Q($ruleset), rcmail::Q($ruleset));
+ }
+
+ return html::label('rulelist', rcmail::Q($this->gettext('selectruleset'))) . $select_ruleset->show(rcmail::Q($this->current_ruleset));
+ }
+ }
+
+ function gen_setup()
+ {
+ $rcmail = rcube::get_instance();
+ $text = '';
+ $buttons = '';
+
+ if ($rcmail->config->get('sieverules_default_file', false) && is_readable($rcmail->config->get('sieverules_default_file'))) {
+ $text .= "<br /><br />" . $this->gettext('importdefault');
+ $buttons .= $this->api->output->button(array('command' => 'plugin.sieverules.import', 'prop' => '_import=_default_', 'type' => 'input', 'class' => 'button', 'label' => 'sieverules.usedefaultfilter'));
+ }
+ elseif ($rcmail->config->get('sieverules_default_file', false) && !is_readable($rcmail->config->get('sieverules_default_file'))) {
+ rcube::raise_error(array(
+ 'code' => 600,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "SieveRules plugin: Unable to open default rule file"
+ ), true, false);
+ }
+
+ $type = '';
+ $ruleset = '';
+ if (sizeof($this->sieve->list) > 0) {
+ if ($result = $this->sieve->check_import()) {
+ list($type, $name, $ruleset) = $result;
+ $text .= "<br /><br />" . str_replace('%s', $name, $this->gettext('importother'));
+ $buttons .= (strlen($buttons) > 0) ? '&nbsp;&nbsp;' : '';
+ $buttons .= $this->api->output->button(array('command' => 'plugin.sieverules.import', 'prop' => '_type=' . $type . '&_import=' . $ruleset, 'type' => 'input', 'class' => 'button', 'label' => 'sieverules.importfilter'));
+ }
+
+ if ($rcmail->config->get('sieverules_multiplerules', false)) {
+ $text .= "<br /><br />" . $this->gettext('copyexisting');
+ $buttons .= (strlen($buttons) > 0) ? '&nbsp;&nbsp;' : '';
+ $buttons .= $this->api->output->button(array('command' => 'plugin.sieverules.ruleset_dialog_setup', 'prop' => 'copyfrom_ruleset', 'type' => 'input', 'class' => 'button', 'label' => 'sieverules.copyexistingfilter'));
+ }
+ }
+
+ if ($rcmail->config->get('sieverules_auto_load_default') && !$rcmail->config->get('sieverules_multiplerules', false) && $type != '' && $ruleset != '' && $ruleset == $this->sieve->get_active()) {
+ $this->import($type, $ruleset, false);
+
+ if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".goto_url('plugin.sieverules');");
+ }
+ else {
+ // go to sieverules page
+ $rcmail->overwrite_action('plugin.sieverules');
+ $this->api->output->send('sieverules.sieverules');
+ }
+ }
+ else if ($rcmail->config->get('sieverules_auto_load_default') && is_readable($rcmail->config->get('sieverules_default_file')) && strlen($text) > 0 && strlen($buttons) > 0 && $type == '' && $ruleset == '') {
+ $this->import($type, '_default_', false);
+
+ if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".goto_url('plugin.sieverules');");
+ }
+ else {
+ // go to sieverules page
+ $rcmail->overwrite_action('plugin.sieverules');
+ $this->api->output->send('sieverules.sieverules');
+ }
+ }
+ else if (strlen($text) > 0 && strlen($buttons) > 0) {
+ $out = "<br />". $this->gettext('noexistingfilters') . $text . "<br /><br /><br />\n";
+ $out .= $buttons;
+ $out .= "&nbsp;&nbsp;" . $this->api->output->button(array('command' => 'plugin.sieverules.import', 'prop' => '_import=_none_', 'type' => 'input', 'class' => 'button', 'label' => 'cancel'));
+
+ $out = html::tag('p', array('style' => 'text-align: center; padding: 10px;'), "\n" . $out);
+ $out = html::tag('div', array('id' => 'prefs-title', 'class' => 'boxtitle'), rcmail::Q($this->gettext('importfilters'))) . $out;
+
+ return $out;
+ }
+ else {
+ if ($rcmail->config->get('sieverules_auto_load_default') && !is_readable($rcmail->config->get('sieverules_default_file')))
+ rcube::raise_error(array(
+ 'code' => 600,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "SieveRules plugin: Unable to open default rule file"
+ ), true, false);
+
+ $this->sieve->save();
+ if (!($rcmail->config->get('sieverules_multiplerules', false) && sizeof($this->sieve->list) > 1))
+ $this->sieve->set_active($this->current_ruleset);
+
+ if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".goto_url('plugin.sieverules');");
+ }
+ else {
+ // go to sieverules page
+ $rcmail->overwrite_action('plugin.sieverules');
+ $this->api->output->send('sieverules.sieverules');
+ }
+ }
+ }
+
+ function gen_form($attrib)
+ {
+ $rcmail = rcube::get_instance();
+ $this->include_script('jquery.maskedinput.js');
+ $this->api->output->add_label(
+ 'sieverules.norulename', 'sieverules.ruleexists', 'sieverules.noheader',
+ 'sieverules.headerbadchars', 'sieverules.noheadervalue', 'sieverules.sizewrongformat',
+ 'sieverules.noredirect', 'sieverules.redirectaddresserror', 'sieverules.noreject', 'sieverules.vacnodays',
+ 'sieverules.vacdayswrongformat', 'sieverules.vacnomsg', 'sieverules.notifynomethod', 'sieverules.missingfoldername',
+ 'sieverules.notifynomsg', 'sieverules.ruledeleteconfirm',
+ 'sieverules.actiondeleteconfirm', 'sieverules.notifyinvalidmethod', 'sieverules.nobodycontentpart',
+ 'sieverules.badoperator','sieverules.baddateformat','sieverules.badtimeformat','sieverules.vactoexp_err','editorwarning',
+ 'sieverules.eheadernoname','sieverules.eheadernoval');
+
+ $ext = $this->sieve->get_extensions();
+ $iid = rcube_utils::get_input_value('_iid', rcube_utils::INPUT_GPC);
+ if ($iid == '')
+ $iid = sizeof($this->script);
+
+ if (substr($iid, 0, 2) == 'ex') {
+ $cur_script = $this->examples[substr($iid, 2)];
+ $this->api->output->set_env('eid', $iid);
+ $iid = sizeof($this->script);
+ $this->api->output->set_env('iid', $iid);
+ $example = true;
+ }
+ else {
+ $cur_script = $this->script[$iid];
+ $this->api->output->set_env('iid', $iid);
+ $example = false;
+
+ if (isset($this->script[$iid]))
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".sieverules_ready('".$iid."');");
+ }
+
+ if (sizeof($rcmail->config->get('sieverules_predefined_rules')) > 0) {
+ $predefined = array();
+ foreach($rcmail->config->get('sieverules_predefined_rules') as $idx => $data)
+ array_push($predefined, array($data['type'], $data['header'], $data['operator'], $data['extra'], $data['target']));
+
+ $this->api->output->set_env('predefined_rules', $predefined);
+ }
+
+ list($form_start, $form_end) = get_form_tags($attrib, 'plugin.sieverules.save');
+
+ $out = $form_start;
+
+ $hidden_iid = new html_hiddenfield(array('name' => '_iid', 'value' => $iid));
+ $out .= $hidden_iid->show();
+
+ // 'any' flag
+ if (sizeof($cur_script['tests']) == 1 && $cur_script['tests'][0]['type'] == 'true' && !$cur_script['tests'][0]['not'])
+ $any = true;
+
+ // filter disable
+ $field_id = 'rcmfd_disable';
+ $input_disable = new html_checkbox(array('name' => '_disable', 'id' => $field_id, 'value' => 1));
+
+ $out .= html::span('disableLink', html::label($field_id, rcmail::Q($this->gettext('disablerule')))
+ . "&nbsp;" . $input_disable->show($cur_script['disabled']));
+
+ // filter name input
+ $field_id = 'rcmfd_name';
+ $input_name = new html_inputfield(array('name' => '_name', 'id' => $field_id));
+
+ $out .= html::label($field_id, rcmail::Q($this->gettext('filtername')));
+ $out .= "&nbsp;" . $input_name->show($cur_script['name']);
+
+ $out .= "<br /><br />";
+
+ if (sizeof($cur_script['tests']) == 1 && $cur_script['tests'][0]['type'] == 'true' && !$cur_script['tests'][0]['not'])
+ $join_any = true;
+
+ $field_id = 'rcmfd_join_all';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'allof', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_rule_join_radio(\'allof\')'));
+ $join_type = $input_join->show($cur_script['join'] && !$join_any ? 'allof' : '');
+ $join_type .= "&nbsp;" . html::label($field_id, rcmail::Q($this->gettext('filterallof')));
+
+ $field_id = 'rcmfd_join_anyof';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'anyof', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_rule_join_radio(\'anyof\')'));
+ $join_type .= "&nbsp;" . $input_join->show($cur_script['join'] && !$join_any ? '' : 'anyof');
+ $join_type .= "&nbsp;" . html::label($field_id, rcmail::Q($this->gettext('filteranyof')));
+
+ $field_id = 'rcmfd_join_any';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'any', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_rule_join_radio(\'any\')'));
+ $join_type .= "&nbsp;" . $input_join->show($join_any ? 'any' : '');
+ $join_type .= "&nbsp;" . html::label($field_id, rcmail::Q($this->gettext('filterany')));
+
+ $rules_table = new html_table(array('id' => 'rules-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 5));
+ $rules_table = $this->_rule_row($ext, $rules_table, null, $rcmail->config->get('sieverules_predefined_rules'), $attrib);
+
+ if (!$join_any) {
+ if (!isset($cur_script))
+ $rules_table = $this->_rule_row($ext, $rules_table, array(), $rcmail->config->get('sieverules_predefined_rules'), $attrib);
+ else foreach ($cur_script['tests'] as $rules)
+ $rules_table = $this->_rule_row($ext, $rules_table, $rules, $rcmail->config->get('sieverules_predefined_rules'), $attrib);
+ }
+
+ $this->api->output->set_env('sieverules_rules', $rules_table->size());
+
+ $out .= html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('messagesrules')))
+ . rcmail::Q((!$rcmail->config->get('sieverules_use_elsif', true)) ? $this->gettext('sieveruleexp_stop'): $this->gettext('sieveruleexp')) . "<br /><br />"
+ . $join_type . "<br /><br />"
+ . $rules_table->show($attrib));
+
+ $rcmail->storage_init();
+ $actions_table = new html_table(array('id' => 'actions-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 3));
+ $actions_table = $this->_action_row($ext, $actions_table, 'rowid', null, $attrib, $example);
+
+ if (!isset($cur_script))
+ $actions_table = $this->_action_row($ext, $actions_table, 0, array(), $attrib, $example);
+ else foreach ($cur_script['actions'] as $idx => $actions)
+ $actions_table = $this->_action_row($ext, $actions_table, $idx, $actions, $attrib, $example);
+
+ $this->api->output->set_env('sieverules_actions', $actions_table->size());
+ $this->api->output->set_env('sieverules_htmleditor', $rcmail->config->get('htmleditor'));
+
+ $out .= html::tag('fieldset', null, html::tag('legend', null, rcmail::Q($this->gettext('messagesactions')))
+ . rcmail::Q($this->gettext('sieveactexp')). "<br /><br />"
+ . $actions_table->show($attrib));
+
+ $out .= $form_end;
+
+ // output sigs for vacation messages
+ $user_identities = $rcmail->user->list_identities();
+ if (count($user_identities)) {
+ foreach ($user_identities as $sql_arr) {
+ // add signature to array
+ if (!empty($sql_arr['signature'])) {
+ $identity_id = $sql_arr['identity_id'];
+ $a_signatures[$identity_id]['text'] = $sql_arr['signature'];
+
+ if ($sql_arr['html_signature'] == 1) {
+ $h2t = new rcube_html2text($a_signatures[$identity_id]['text'], false, false);
+ $a_signatures[$identity_id]['text'] = trim($h2t->get_text());
+ }
+ }
+ }
+
+ $this->api->output->set_env('signatures', $a_signatures);
+ }
+
+ return $out;
+ }
+
+ function move()
+ {
+ $this->_startup();
+
+ $src = rcube_utils::get_input_value('_src', rcube_utils::INPUT_GET);
+ $dst = rcube_utils::get_input_value('_dst', rcube_utils::INPUT_GET);
+
+ $result = $this->sieve->script->move_rule($src, $dst);
+ $result = $this->sieve->save();
+
+ if ($result === true)
+ $this->api->output->command('sieverules_update_list', 'move', $src , $dst);
+ else
+ $this->api->output->command('display_message', $result !== false ? $result : $this->gettext('filtersaveerror'), 'error');
+
+ $this->api->output->send();
+ }
+
+ function save()
+ {
+ $rcmail = rcube::get_instance();
+ $this->_startup();
+
+ $script = trim(rcube_utils::get_input_value('_script', rcube_utils::INPUT_POST, true));
+ if ($script != '' && ($rcmail->config->get('sieverules_adveditor') == 1 || $rcmail->config->get('sieverules_adveditor') == 2)) {
+ $script = $this->_strip_val($script);
+ $save = $this->sieve->save($script);
+
+ if ($save === true) {
+ $this->api->output->command('display_message', $this->gettext('filtersaved'), 'confirmation');
+ $this->sieve->get_script();
+ }
+ else {
+ $this->api->output->command('display_message', $save !== false ? $save : $this->gettext('filtersaveerror'), 'error');
+ }
+
+ // go to next step
+ $rcmail->overwrite_action('plugin.sieverules.advanced');
+ $this->action = 'plugin.sieverules.advanced';
+ $this->init_html();
+ }
+ else {
+ // check if POST var limits have been reached
+ // code by Aleksander Machniak
+ $max_post = max(array(
+ ini_get('max_input_vars'),
+ ini_get('suhosin.request.max_vars'),
+ ini_get('suhosin.post.max_vars'),
+ ));
+
+ $max_depth = max(array(
+ ini_get('suhosin.request.max_array_depth'),
+ ini_get('suhosin.post.max_array_depth'),
+ ));
+
+ // check request size limit
+ if ($max_post && count($_POST, COUNT_RECURSIVE) >= $max_post) {
+ rcube::raise_error(array(
+ 'code' => 500,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "SieveRules plugin: max_input_vars, suhosin.request.max_vars or suhosin.post.max_vars limit reached."
+ ), true, false);
+
+ $this->api->output->command('display_message', $this->gettext('filtersaveerror'), 'error');
+
+ // go to next step
+ $rcmail->overwrite_action('plugin.sieverules.edit');
+ $this->action = 'plugin.sieverules.edit';
+ $this->init_html();
+
+ return;
+ }
+ // check request depth limits
+ else if ($max_depth && count($_POST['_test']) > $max_depth) {
+ rcube::raise_error(array(
+ 'code' => 500,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "SieveRules plugin: suhosin.request.max_array_depth or suhosin.post.max_array_depth limit reached."
+ ), true, false);
+
+ $this->api->output->command('display_message', $this->gettext('filtersaveerror'), 'error');
+
+ // go to next step
+ $rcmail->overwrite_action('plugin.sieverules.edit');
+ $this->action = 'plugin.sieverules.edit';
+ $this->init_html();
+
+ return;
+ }
+
+ $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true));
+ $iid = trim(rcube_utils::get_input_value('_iid', rcube_utils::INPUT_POST));
+ $join = trim(rcube_utils::get_input_value('_join', rcube_utils::INPUT_POST));
+ $disabled = trim(rcube_utils::get_input_value('_disable', rcube_utils::INPUT_POST));
+
+ $tests = rcube_utils::get_input_value('_test', rcube_utils::INPUT_POST);
+ $headers = rcube_utils::get_input_value('_header', rcube_utils::INPUT_POST);
+ $bodyparts = rcube_utils::get_input_value('_bodypart', rcube_utils::INPUT_POST);
+ $ops = rcube_utils::get_input_value('_operator', rcube_utils::INPUT_POST);
+ $sizeops = rcube_utils::get_input_value('_size_operator', rcube_utils::INPUT_POST);
+ $dateops = rcube_utils::get_input_value('_date_operator', rcube_utils::INPUT_POST);
+ $spamtestops = rcube_utils::get_input_value('_spamtest_operator', rcube_utils::INPUT_POST);
+ $targets = rcube_utils::get_input_value('_target', rcube_utils::INPUT_POST, true);
+ $sizeunits = rcube_utils::get_input_value('_units', rcube_utils::INPUT_POST);
+ $contentparts = rcube_utils::get_input_value('_body_contentpart', rcube_utils::INPUT_POST);
+ $comparators = rcube_utils::get_input_value('_comparator', rcube_utils::INPUT_POST);
+ $advops = rcube_utils::get_input_value('_advoperator', rcube_utils::INPUT_POST);
+ $advtargets = rcube_utils::get_input_value('_advtarget', rcube_utils::INPUT_POST, true);
+ $actions = rcube_utils::get_input_value('_act', rcube_utils::INPUT_POST);
+ $folders = rcube_utils::get_input_value('_folder', rcube_utils::INPUT_POST);
+ $customfolders = rcube_utils::get_input_value('_customfolder', rcube_utils::INPUT_POST);
+ $addresses = rcube_utils::get_input_value('_redirect', rcube_utils::INPUT_POST);
+ $rejects = rcube_utils::get_input_value('_reject', rcube_utils::INPUT_POST);
+ $vacfroms = rcube_utils::get_input_value('_vacfrom', rcube_utils::INPUT_POST);
+ $vactos = rcube_utils::get_input_value('_vacto', rcube_utils::INPUT_POST);
+ $days = rcube_utils::get_input_value('_day', rcube_utils::INPUT_POST);
+ $handles = rcube_utils::get_input_value('_handle', rcube_utils::INPUT_POST);
+ $subjects = rcube_utils::get_input_value('_subject', rcube_utils::INPUT_POST, true);
+ $origsubjects = rcube_utils::get_input_value('_orig_subject', rcube_utils::INPUT_POST, true);
+ $msgs = rcube_utils::get_input_value('_msg', rcube_utils::INPUT_POST, true);
+ $htmlmsgs = rcube_utils::get_input_value('_htmlmsg', rcube_utils::INPUT_POST, true);
+ $charsets = rcube_utils::get_input_value('_vaccharset', rcube_utils::INPUT_POST);
+ $flags = rcube_utils::get_input_value('_imapflags', rcube_utils::INPUT_POST);
+ $nfroms = rcube_utils::get_input_value('_nfrom', rcube_utils::INPUT_POST);
+ $nimpts = rcube_utils::get_input_value('_nimpt', rcube_utils::INPUT_POST);
+ $nmethods = rcube_utils::get_input_value('_nmethod', rcube_utils::INPUT_POST);
+ $noptions = rcube_utils::get_input_value('_noption', rcube_utils::INPUT_POST);
+ $nmsgs = rcube_utils::get_input_value('_nmsg', rcube_utils::INPUT_POST, true);
+ $dateparts = rcube_utils::get_input_value('_datepart', rcube_utils::INPUT_POST);
+ $weekdays = rcube_utils::get_input_value('_weekday', rcube_utils::INPUT_POST);
+ $advweekdays = rcube_utils::get_input_value('_advweekday', rcube_utils::INPUT_POST);
+ $advweekdays = rcube_utils::get_input_value('_advweekday', rcube_utils::INPUT_POST);
+ $eheadnames = rcube_utils:: get_input_value('_eheadname', rcube_utils::INPUT_POST, true);
+ $eheadvals = rcube_utils::get_input_value('_eheadval', rcube_utils::INPUT_POST, true);
+ $eheadopps = rcube_utils::get_input_value('_eheadopp', rcube_utils::INPUT_POST);
+ $eheadindexes = rcube_utils::get_input_value('_eheadindex', rcube_utils::INPUT_POST);
+
+ $script = array();
+ $script['join'] = ($join == 'allof') ? true : false;
+ $script['name'] = $name;
+ $script['disabled'] = $disabled;
+ $script['tests'] = array();
+ $script['actions'] = array();
+
+ // rules
+ $i = 0;
+ if ($join == 'any') {
+ $script['tests'][0]['type'] = 'true';
+ }
+ else foreach($tests as $idx => $type) {
+ // ignore the first (default) row
+ if ($idx == 0)
+ continue;
+
+ $header = $this->_strip_val($headers[$idx]);
+ $op = $this->_strip_val($ops[$idx]);
+ $bodypart = $this->_strip_val($bodyparts[$idx]);
+ $advop = $this->_strip_val($advops[$idx]);
+ $contentpart = $this->_strip_val($contentparts[$idx]);
+ $target = $this->_strip_val($targets[$idx]);
+ $advtarget = $this->_strip_val($advtargets[$idx]);
+ $comparator = $this->_strip_val($comparators[$idx]);
+ $datepart = $this->_strip_val($dateparts[$idx]);
+ $weekday = $this->_strip_val($weekdays[$idx]);
+ $advweekday = $this->_strip_val($advweekdays[$idx]);
+
+ switch ($type) {
+ case 'size':
+ $sizeop = $this->_strip_val($sizeops[$idx]);
+ $sizeunit = $this->_strip_val($sizeunits[$idx]);
+
+ $script['tests'][$i]['type'] = 'size';
+ $script['tests'][$i]['operator'] = $sizeop;
+ $script['tests'][$i]['target'] = $target.$sizeunit;
+ break;
+ case 'spamtest':
+ case 'virustest':
+ $spamtestop = $this->_strip_val($spamtestops[$idx]);
+
+ $script['tests'][$i]['type'] = $type;
+ $script['tests'][$i]['operator'] = $spamtestop;
+ $script['tests'][$i]['target'] = $target;
+ break;
+ case 'date':
+ $op = $this->_strip_val($dateops[$idx]);
+
+ if ($datepart == 'weekday')
+ $target = $weekday;
+
+ $script['tests'][$i]['datepart'] = $datepart;
+ case 'body':
+ $script['tests'][$i]['bodypart'] = $bodypart;
+
+ if ($bodypart == 'content')
+ $script['tests'][$i]['contentpart'] = $contentpart;
+ else
+ $script['tests'][$i]['contentpart'] = '';
+ case 'exists':
+ case 'header':
+ case 'address':
+ case 'envelope':
+ if (preg_match('/^not/', $op) || preg_match('/^not/', $advop))
+ $script['tests'][$i]['not'] = true;
+ else
+ $script['tests'][$i]['not'] = '';
+
+ $op = preg_replace('/^not/', '', $op);
+ $advop = preg_replace('/^not/', '', $advop);
+ $header = preg_match('/[\s,]+/', $header) ? preg_split('/[\s,]+/', $header, -1, PREG_SPLIT_NO_EMPTY) : $header;
+
+ if ($op == 'exists') {
+ $script['tests'][$i]['type'] = 'exists';
+ $script['tests'][$i]['operator'] = 'exists';
+ $script['tests'][$i]['header'] = $header;
+ }
+ elseif ($op == 'advoptions') {
+ $script['tests'][$i]['type'] = $type;
+ $script['tests'][$i]['operator'] = $advop;
+ $script['tests'][$i]['header'] = $header;
+ $script['tests'][$i]['target'] = $advtarget;
+
+ if (substr($advop, 0, 5) == 'count' || substr($advop, 0, 5) == 'value')
+ $script['tests'][$i]['comparator'] = $comparator;
+ else
+ $script['tests'][$i]['comparator'] = '';
+ }
+ else {
+ $script['tests'][$i]['type'] = $type;
+ $script['tests'][$i]['operator'] = $op;
+ $script['tests'][$i]['header'] = $header;
+ $script['tests'][$i]['target'] = $target;
+ }
+ break;
+ }
+ $i++;
+ }
+
+ // actions
+ $i = 0;
+ foreach($actions as $idx => $type) {
+ // ignore the first (default) row
+ if ($idx == 0)
+ continue;
+
+ $type = $this->_strip_val($type);
+
+ $script['actions'][$i]['type'] = $type;
+
+ switch ($type) {
+ case 'fileinto':
+ case 'fileinto_copy':
+ $folder = $this->_strip_val($folders[$idx], false, false);
+ $rcmail = rcube::get_instance();
+ $rcmail->storage_init();
+ $script['actions'][$i]['create'] = false;
+ if ($folder == '@@newfolder') {
+ $script['actions'][$i]['create'] = true;
+ $folder = $this->_strip_val($customfolders[$idx]);
+ $folder = $rcmail->config->get('sieverules_include_imap_root', true) ? $rcmail->storage->mod_folder($folder, 'IN') : $folder;
+ }
+ $script['actions'][$i]['target'] = $rcmail->config->get('sieverules_include_imap_root', true) ? $folder : $rcmail->storage->mod_folder($folder);
+ if ($rcmail->config->get('sieverules_folder_delimiter', false))
+ $script['actions'][$i]['target'] = str_replace($rcmail->storage->get_hierarchy_delimiter(), $rcmail->config->get('sieverules_folder_delimiter'), $script['actions'][$i]['target']);
+ break;
+ case 'redirect':
+ case 'redirect_copy':
+ $address = $this->_strip_val($addresses[$idx]);
+ $script['actions'][$i]['target'] = $address;
+ break;
+ case 'reject':
+ case 'ereject':
+ $rejects = $this->_strip_val($rejects[$idx]);
+ $script['actions'][$i]['target'] = $rejects;
+ break;
+ case 'vacation':
+ $from = $this->_strip_val($vacfroms[$idx]);
+ $to = $this->_strip_val($vactos[$idx]);
+ $day = $this->_strip_val($days[$idx]);
+ $handle = $this->_strip_val($handles[$idx]);
+ $subject = $this->_strip_val($subjects[$idx]);
+ $origsubject = $this->_strip_val($origsubjects[$idx]);
+ $htmlmsg = $this->_strip_val($htmlmsgs[$idx]);
+ $msg = ($htmlmsg == "1") ? $msgs[$idx] : $this->_strip_val($msgs[$idx]);
+ $charset = $this->_strip_val($charsets[$idx]);
+
+ // format from address
+ if (is_numeric($from)) {
+ if (is_array($identity_arr = $this->_rcmail_get_identity($from))) {
+ if ($identity_arr['val_string'])
+ $from = $identity_arr['val_string'];
+ }
+ else {
+ $from = null;
+ }
+ }
+
+ $script['actions'][$i]['days'] = $day;
+ $script['actions'][$i]['subject'] = $subject;
+ $script['actions'][$i]['origsubject'] = $origsubject;
+ $script['actions'][$i]['from'] = $from;
+ $script['actions'][$i]['addresses'] = $to;
+ $script['actions'][$i]['handle'] = $handle;
+ $script['actions'][$i]['msg'] = $msg;
+ $script['actions'][$i]['htmlmsg'] = ($htmlmsg == "1") ? true : false;
+ $script['actions'][$i]['charset'] = $charset;
+ break;
+ case 'imapflags':
+ case 'imap4flags':
+ $flag = $this->_strip_val($flags[$idx]);
+ $script['actions'][$i]['target'] = $flag;
+ break;
+ case 'notify':
+ case 'enotify':
+ $from = $this->_strip_val($nfroms[$idx]);
+ $importance = $this->_strip_val($nimpts[$idx]);
+ $method = $this->_strip_val($nmethods[$idx]);
+ $option = $this->_strip_val($noptions[$idx]);
+ $msg = $this->_strip_val($nmsgs[$idx]);
+
+ // format from address
+ if (is_numeric($from)) {
+ if (is_array($identity_arr = $this->_rcmail_get_identity($from))) {
+ if ($identity_arr['val_string'])
+ $from = $identity_arr['val_string'];
+ }
+ else {
+ $from = null;
+ }
+ }
+
+ $script['actions'][$i]['from'] = $from;
+ $script['actions'][$i]['importance'] = $importance;
+ $script['actions'][$i]['method'] = $method;
+ $script['actions'][$i]['options'] = $option;
+ $script['actions'][$i]['msg'] = $msg;
+ break;
+ case 'editheaderadd':
+ case 'editheaderrem':
+ $name = $this->_strip_val($eheadnames[$idx]);
+ $value = $this->_strip_val($eheadvals[$idx]);
+ $script['actions'][$i]['name'] = $name;
+ $script['actions'][$i]['value'] = $value;
+ $script['actions'][$i]['index'] = $eheadindexes[$idx];
+
+ if (strlen($script['actions'][$i]['value']) > 0)
+ $script['actions'][$i]['operator'] = $eheadopps[$idx];
+
+ break;
+ }
+
+ $i++;
+ }
+
+ if (!isset($this->script[$iid]))
+ $result = $this->sieve->script->add_rule($script);
+ else
+ $result = $this->sieve->script->update_rule($iid, $script);
+
+ if ($result === true)
+ $save = $this->sieve->save();
+
+ if ($save === true && $result === true && !($rcmail->config->get('sieverules_multiplerules', false) && sizeof($this->sieve->list) > 1))
+ $save = $this->sieve->set_active($this->current_ruleset);
+
+ if ($save === true && $result === true) {
+ $this->api->output->command('display_message', $this->gettext('filtersaved'), 'confirmation');
+
+ if ($script['disabled'] == 1)
+ $filter_name = $script['name'] . ' (' . $this->gettext('disabled') . ')';
+ else
+ $filter_name = $script['name'];
+
+ $dst = $iid - 1;
+ $up_link = $this->api->output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'up_arrow', 'title' => 'sieverules.moveup', 'content' => ' '));
+ $up_link = str_replace("'", "\'", $up_link);
+ $dst = $iid + 2;
+ $down_link = $this->api->output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'down_arrow', 'title' => 'sieverules.movedown', 'content' => ' '));
+ $down_link = str_replace("'", "\'", $down_link);
+
+ if (!isset($this->script[$iid]) && sizeof($this->script) == 0)
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".sieverules_update_list('add-first', 'rcmrow". $iid ."', '". rcmail::Q($filter_name) ."', '". $down_link ."', '". $up_link ."');");
+ elseif (!isset($this->script[$iid]))
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".sieverules_update_list('add', 'rcmrow". $iid ."', '". rcmail::Q($filter_name) ."', '". $down_link ."', '". $up_link ."');");
+ else
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".sieverules_update_list('update', ". $iid .", '". rcmail::Q($filter_name) ."');");
+ }
+ else {
+ if ($result === SIEVE_ERROR_BAD_ACTION)
+ $this->api->output->command('display_message', $this->gettext('filteractionerror'), 'error');
+ elseif ($result === SIEVE_ERROR_NOT_FOUND)
+ $this->api->output->command('display_message', $this->gettext('filtermissingerror'), 'error');
+ else
+ $this->api->output->command('display_message', $save !== false ? $save : $this->gettext('filtersaveerror'), 'error');
+ }
+
+ // update rule list
+ if ($this->sieve_error)
+ $this->script = array();
+ else
+ $this->script = $this->sieve->script->as_array();
+
+ // go to next step
+ $rcmail->overwrite_action('plugin.sieverules.edit');
+ $this->action = 'plugin.sieverules.edit';
+ $this->init_html();
+ }
+ }
+
+ function delete()
+ {
+ $this->_startup();
+
+ $result = false;
+ $ids = rcube_utils::get_input_value('_iid', rcube_utils::INPUT_GET);
+ if (is_numeric($ids) && isset($this->script[$ids]) && !$this->sieve_error) {
+ $result = $this->sieve->script->delete_rule($ids);
+ if ($result === true)
+ $result = $this->sieve->save();
+ }
+
+ if ($result === true) {
+ $this->api->output->command('display_message', $this->gettext('filterdeleted'), 'confirmation');
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".sieverules_update_list('delete', ". $ids .");");
+ }
+ elseif ($result === SIEVE_ERROR_NOT_FOUND)
+ $this->api->output->command('display_message', $this->gettext('filtermissingerror'), 'error');
+ else
+ $this->api->output->command('display_message', $result !== false ? $result : $this->gettext('filterdeleteerror'), 'error');
+
+ // update rule list
+ if ($this->sieve_error)
+ $this->script = array();
+ else
+ $this->script = $this->sieve->script->as_array();
+
+ if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
+ $this->api->output->add_script("parent.". rcmail_output::JS_OBJECT_NAME .".show_contentframe(false);");
+ }
+ else {
+ // go to sieverules page
+ rcube::get_instance()->overwrite_action('plugin.sieverules');
+ $this->action = 'plugin.sieverules';
+ $this->init_html();
+ }
+ }
+
+ function import($type = null, $ruleset = null, $redirect = true)
+ {
+ $rcmail = rcube::get_instance();
+ $this->_startup();
+
+ if (!$type && !$ruleset) {
+ $type = rcube_utils::get_input_value('_type', rcube_utils::INPUT_GET);
+ $ruleset = rcube_utils::get_input_value('_import', rcube_utils::INPUT_GET);
+ }
+
+ if ($ruleset == '_default_') {
+ if ($rcmail->config->get('sieverules_default_file', false) && is_readable($rcmail->config->get('sieverules_default_file'))) {
+ $this->sieve->script->add_text(file_get_contents($rcmail->config->get('sieverules_default_file')));
+ $save = $this->sieve->save();
+
+ if ($save === true && !($rcmail->config->get('sieverules_multiplerules', false) && sizeof($this->sieve->list) > 1))
+ $save = $this->sieve->set_active($this->current_ruleset);
+
+ if ($save === true)
+ $this->api->output->command('display_message', $this->gettext('filterimported'), 'confirmation');
+ else
+ $this->api->output->command('display_message', $save !== false ? $save : $this->gettext('filterimporterror'), 'error');
+
+ // update rule list
+ if ($this->sieve_error)
+ $this->script = array();
+ else
+ $this->script = $this->sieve->script->as_array();
+ }
+ elseif ($rcmail->config->get('sieverules_default_file', false) && !is_readable($rcmail->config->get('sieverules_default_file'))) {
+ rcube::raise_error(array(
+ 'code' => 600,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "SieveRules plugin: Unable to open default rule file"
+ ), true, false);
+ }
+ }
+ elseif ($ruleset == '_example_') {
+ if (rcube_utils::get_input_value('_eids', rcube_utils::INPUT_GET)) {
+ $pos = rcube_utils::get_input_value('_pos', rcube_utils::INPUT_GET);
+ $eids = explode(",", rcube_utils::get_input_value('_eids', rcube_utils::INPUT_GET));
+
+ if ($pos == 'end')
+ $pos = null;
+ else
+ $pos = substr($pos, 6);
+
+ foreach ($eids as $eid) {
+ $this->sieve->script->add_rule($this->examples[substr($eid, 2)], $pos);
+ if ($pos) $pos++;
+ }
+
+ $this->sieve->save();
+ if (!($rcmail->config->get('sieverules_multiplerules', false) && sizeof($this->sieve->list) > 1))
+ $this->sieve->set_active($this->current_ruleset);
+
+ // update rule list
+ if ($this->sieve_error)
+ $this->script = array();
+ else
+ $this->script = $this->sieve->script->as_array();
+ }
+ }
+ elseif ($ruleset == '_none_') {
+ $this->sieve->save();
+ if (!($rcmail->config->get('sieverules_multiplerules', false) && sizeof($this->sieve->list) > 1))
+ $this->sieve->set_active($this->current_ruleset);
+ }
+ elseif ($ruleset == '_copy_') {
+ $this->rename_ruleset(true);
+ return;
+ }
+ elseif ($type != '' && $ruleset != '') {
+ $import = $this->sieve->do_import($type, $ruleset);
+
+ if ($import) {
+ $this->script = $this->sieve->script->as_array();
+ $this->sieve->save();
+
+ if (!($rcmail->config->get('sieverules_multiplerules', false) && sizeof($this->sieve->list) > 1))
+ $this->sieve->set_active($this->current_ruleset);
+
+ $this->api->output->command('display_message', $this->gettext('filterimported'), 'confirmation');
+ }
+ else {
+ $this->script = array();
+ if (!$redirect) $this->sieve->save();
+ $this->api->output->command('display_message', $this->gettext('filterimporterror'), 'error');
+ }
+ }
+
+ if ($redirect) {
+ // go to sieverules page
+ $rcmail->overwrite_action('plugin.sieverules');
+ $this->action = 'plugin.sieverules';
+ $this->init_html();
+ }
+ }
+
+ function delete_ruleset()
+ {
+ $this->_startup();
+ $this->sieve->del_script($this->current_ruleset);
+
+ $this->current_ruleset = rcube_utils::get_input_value('_next', rcube_utils::INPUT_GET);
+
+ rcube::get_instance()->overwrite_action('plugin.sieverules');
+ $this->action = 'plugin.sieverules';
+ $this->init_html();
+ }
+
+ function rename_ruleset($makeCopy = false)
+ {
+ $this->_startup();
+ $script = $this->sieve->script->as_text();
+ $active = $this->sieve->get_active() == $this->current_ruleset ? true : false;
+
+ $old_ruleset = $this->current_ruleset;
+ $this->current_ruleset = rcube_utils::get_input_value('_new', rcube_utils::INPUT_GET, true);
+ $this->sieve->set_ruleset($this->current_ruleset);
+ $this->sieve->save($script);
+
+ if (!$makeCopy) {
+ if ($active)
+ $this->sieve->set_active($this->current_ruleset);
+
+ $this->sieve->del_script($old_ruleset);
+ }
+
+ rcube::get_instance()->overwrite_action('plugin.sieverules');
+ $this->action = 'plugin.sieverules';
+ $this->init_html();
+ }
+
+ function enable_ruleset()
+ {
+ $this->_startup();
+ $activeruleset = rcube_utils::get_input_value('_ruleset', rcube_utils::INPUT_GET, true);
+ $this->sieve->set_active($activeruleset);
+
+ if (rcube_utils::get_input_value('_reload', rcube_utils::INPUT_GET, true) == "1") {
+ rcube::get_instance()->overwrite_action('plugin.sieverules');
+ $this->action = 'plugin.sieverules';
+ $this->init_html();
+ }
+ else {
+ $rulesets = array();
+ foreach ($this->sieve->list as $ruleset)
+ array_push($rulesets, $ruleset);
+
+ sort($rulesets);
+
+ foreach ($rulesets as $ruleset) {
+ if ($ruleset === $activeruleset)
+ $this->api->output->command('sieverules_add_ruleset', rcmail::Q($ruleset), rcmail::Q(str_replace('%s', $ruleset, $this->gettext('activeruleset'))));
+ else
+ $this->api->output->command('sieverules_add_ruleset', rcmail::Q($ruleset), rcmail::Q($ruleset));
+ }
+
+ $this->api->output->send();
+ }
+ }
+
+ function copy_filter()
+ {
+ $this->_startup();
+ $script = $this->script[rcube_utils::get_input_value('_iid', rcube_utils::INPUT_GET)];
+ $this->current_ruleset = rcube_utils::get_input_value('_dest', rcube_utils::INPUT_GET);
+ $this->_startup();
+ $this->sieve->script->add_rule($script);
+ $this->sieve->save();
+
+ $this->api->output->command('display_message', $this->gettext('filtercopied'), 'confirmation');
+ $this->api->output->send();
+ }
+
+ private function _startup()
+ {
+ $rcmail = rcube::get_instance();
+
+ if (!$this->sieve) {
+ include('lib/Net/Sieve.php');
+ include('include/rcube_sieve.php');
+ include('include/rcube_sieve_script.php');
+ $rcmail = rcube::get_instance();
+
+ // try to connect to managesieve server and to fetch the script
+ $this->sieve = new rcube_sieve($_SESSION['username'],
+ $rcmail->decrypt($_SESSION['password']),
+ rcube_utils::idn_to_ascii(rcube_utils::parse_host($rcmail->config->get('sieverules_host'))),
+ $rcmail->config->get('sieverules_port'), $rcmail->config->get('sieverules_auth_type', NULL),
+ $rcmail->config->get('sieverules_usetls'), $this->current_ruleset,
+ $this->home, $rcmail->config->get('sieverules_use_elsif', true),
+ $rcmail->config->get('sieverules_auth_cid', NULL), $rcmail->config->get('sieverules_auth_pw', NULL));
+
+ if ($rcmail->config->get('sieverules_debug', false))
+ $this->sieve->set_debug(true);
+
+ $this->sieve_error = $this->sieve->error();
+
+ if ($this->sieve_error == SIEVE_ERROR_NOT_EXISTS) {
+ // load default rule set
+ if (($rcmail->config->get('sieverules_default_file', false) && is_readable($rcmail->config->get('sieverules_default_file'))) || sizeof($this->sieve->list) > 0) {
+ $rcmail->overwrite_action('plugin.sieverules.setup');
+ $this->action = 'plugin.sieverules.setup';
+ }
+ elseif ($rcmail->config->get('sieverules_default_file', false) && !is_readable($rcmail->config->get('sieverules_default_file'))) {
+ rcube::raise_error(array(
+ 'code' => 600,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "SieveRules plugin: Unable to open default rule file"
+ ), true, false);
+ }
+
+ // that's not exactly an error
+ $this->sieve_error = false;
+ }
+ elseif ($this->sieve_error) {
+ switch ($this->sieve_error) {
+ case SIEVE_ERROR_CONNECTION:
+ case SIEVE_ERROR_LOGIN:
+ $this->api->output->command('display_message', $this->gettext('filterconnerror'), 'error');
+ break;
+ default:
+ $this->api->output->command('display_message', $this->gettext('filterunknownerror'), 'error');
+ break;
+ }
+
+ $this->api->output->set_env('sieveruleserror', true);
+ }
+
+ // finally set script objects
+ if ($this->sieve_error) {
+ $this->script = array();
+ }
+ else {
+ $this->script = $this->sieve->script->as_array();
+
+ // load example filters
+ if ($rcmail->config->get('sieverules_example_file', false) && is_readable($rcmail->config->get('sieverules_example_file')))
+ $this->examples = $this->sieve->script->parse_text(file_get_contents($rcmail->config->get('sieverules_example_file')));
+ elseif ($rcmail->config->get('sieverules_example_file', false) && !is_readable($rcmail->config->get('sieverules_example_file')))
+ rcube::raise_error(array(
+ 'code' => 600,
+ 'type' => 'php',
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "SieveRules plugin: Unable to open example rule file"
+ ), true, false);
+ }
+ }
+ else {
+ $this->sieve->set_ruleset($this->current_ruleset);
+ $this->script = $this->sieve->script->as_array();
+ }
+ }
+
+ private function _rule_row($ext, $rules_table, $rule, $predefined_rules, $attrib)
+ {
+ $rcmail = rcube::get_instance();
+
+ if (!isset($rule))
+ $rules_table->set_row_attribs(array('style' => 'display: none;'));
+
+ if (in_array('regex', $ext) || in_array('relational', $ext) || in_array('subaddress', $ext))
+ $this->operators['filteradvoptions'] = 'advoptions';
+
+ $header_style = 'visibility: hidden;';
+ $op_style = '';
+ $sizeop_style = 'display: none;';
+ $dateop_style = 'display: none;';
+ $spamtestop_style = 'display: none;';
+ $target_style = '';
+ $units_style = 'display: none;';
+ $bodypart_style = 'display: none;';
+ $datepart_style = 'display: none;';
+ $advcontentpart_style = 'display: none;';
+ $spam_prob_style = 'display: none;';
+ $virus_prob_style = 'display: none;';
+ $weekdays_style = 'display: none;';
+ $advweekdays_style = 'display: none;';
+ $advtarget_style = '';
+
+ $test = 'header';
+ $selheader = 'Subject';
+ $header = 'Subject';
+ $op = 'contains';
+ $sizeop = 'under';
+ $spamtestop = 'ge';
+ $target = '';
+ $target_size = '';
+ $units = 'KB';
+ $bodypart = '';
+ $advcontentpart = '';
+
+ $predefined = -1;
+ foreach($predefined_rules as $idx => $data) {
+ if (($data['type'] == $rule['type'] || $rule['type'] == 'exists')
+ && $data['header'] == $rule['header']
+ && $data['operator'] == ($rule['not'] ? 'not' : '') . $rule['operator']
+ && $data['target'] == $rule['target']) {
+ $predefined = $idx;
+ break;
+ }
+ }
+
+ if ($predefined > -1) {
+ $op_style = 'display: none;';
+ $target_style = 'display: none;';
+ $selheader = $rule['type'] . '::predefined_' . $predefined;
+ $test = $rule['type'];
+
+ if ($rule['type'] == 'size') {
+ $header = 'size';
+ $sizeop = $rule['operator'];
+ preg_match('/^([0-9]+)(K|M|G)*$/', $rule['target'], $matches);
+ $target = $matches[1];
+ $target_size = 'short';
+ $units = $matches[2];
+ }
+ elseif ($rule['type'] == 'spamtest') {
+ $header = 'spamtest';
+ $spamtestop = $rule['operator'];
+ $target = $rule['target'];
+ }
+ elseif ($rule['type'] == 'virustest') {
+ $header = 'virustest';
+ $spamtestop = $rule['operator'];
+ $target = $rule['target'];
+ }
+ elseif ($rule['type'] == 'exists') {
+ $selheader = $predefined_rules[$predefined]['type'] . '::predefined_' . $predefined;
+ $header = $rule['header'];
+ $op = ($rule['not'] ? 'not' : '') . $rule['operator'];
+ }
+ else {
+ $header = $rule['header'];
+ $op = ($rule['not'] ? 'not' : '') . $rule['operator'];
+ $target = $rule['target'];
+ }
+ }
+ elseif ((isset($rule['type']) && $rule['type'] != 'exists') && in_array($rule['type'] . '::' . $rule['header'], $this->headers)) {
+ $target_style = $rule['operator'] == 'exists' ? 'display: none;' : '';
+
+ $selheader = $rule['type'] . '::' . $rule['header'];
+ $test = $rule['type'];
+ $header = $rule['header'];
+ $op = ($rule['not'] ? 'not' : '') . $rule['operator'];
+ $target = $rule['target'];
+ }
+ elseif ((isset($rule['type']) && $rule['type'] == 'exists') && $this->_in_headerarray($rule['header'], $this->headers) != false) {
+ $target_style = $rule['operator'] == 'exists' ? 'display: none;' : '';
+
+ $selheader = $this->_in_headerarray($rule['header'], $this->headers) . '::' . $rule['header'];
+ $test = $rule['type'];
+ $header = $rule['header'];
+ $op = ($rule['not'] ? 'not' : '') . $rule['operator'];
+ }
+ elseif (isset($rule['type']) && $rule['type'] == 'size') {
+ $op_style = 'display: none;';
+ $sizeop_style = '';
+ $units_style = '';
+
+ $selheader = 'size::size';
+ $header = 'size';
+ $test = 'size';
+ $sizeop = $rule['operator'];
+ preg_match('/^([0-9]+)(K|M|G)*$/', $rule['target'], $matches);
+ $target = $matches[1];
+ $target_size = 'short';
+ $units = $matches[2];
+ }
+ elseif (isset($rule['type']) && $rule['type'] == 'body') {
+ $bodypart_style = '';
+ $header_style = 'display: none;';
+
+ $selheader = 'body::body';
+ $header = 'body';
+ $test = 'body';
+ $bodypart = $rule['bodypart'];
+ $op = ($rule['not'] ? 'not' : '') . $rule['operator'];
+ $target = $rule['target'];
+
+ if ($rule['contentpart'] != '') {
+ $advcontentpart = $rule['contentpart'];
+ $advcontentpart_style = '';
+ }
+ }
+ elseif (isset($rule['type']) && $rule['type'] == 'spamtest') {
+ $op_style = 'display: none;';
+ $target_style = 'display: none;';
+ $spamtestop_style = '';
+ $spam_prob_style = '';
+
+ $test = $rule['type'];
+ $selheader = 'spamtest::spamtest';
+ $header = 'spamtest';
+ $spamtestop = $rule['operator'];
+ $target = $rule['target'];
+ $spam_probability = $rule['target'];
+ }
+ elseif (isset($rule['type']) && $rule['type'] == 'virustest') {
+ $op_style = 'display: none;';
+ $target_style = 'display: none;';
+ $spamtestop_style = '';
+ $virus_prob_style = '';
+
+ $test = $rule['type'];
+ $selheader = 'virustest::virustest';
+ $header = 'virustest';
+ $spamtestop = $rule['operator'];
+ $target = $rule['target'];
+ $virus_probability = $rule['target'];
+ }
+ elseif (isset($rule['type']) && $rule['type'] == 'date') {
+ $op_style = 'display: none;';
+ $dateop_style = '';
+ $header_style = 'display: none;';
+ $datepart_style = '';
+
+ if ($rule['datepart'] == 'weekday') {
+ $target_style = 'display: none;';
+ $advtarget_style = 'display: none;';
+ $weekdays_style = '';
+ $advweekdays_style = '';
+ }
+
+ $test = $rule['type'];
+ $selheader = 'date::' . $rule['header'];
+ $header = $rule['header'];
+ $datepart = $rule['datepart'];
+ $dateop = ($rule['not'] ? 'not' : '') . $rule['operator'];
+ $target = $rule['target'];
+ }
+ elseif (isset($rule['type']) && $rule['type'] != 'true') {
+ $header_style = '';
+ $target_style = $rule['operator'] == 'exists' ? 'display: none;' : '';
+
+ $selheader = 'header::other';
+ $test = 'header';
+ $header = is_array($rule['header']) ? join(', ', $rule['header']) : $rule['header'];
+ $op = ($rule['not'] ? 'not' : '') . $rule['operator'];
+ $target = $rule['target'];
+ }
+
+ // check for advanced options
+ $showadvanced = false;
+ if (!in_array($op, $this->operators) || $rule['comparator'] != '' || $rule['contentpart'] != '') {
+ $showadvanced = true;
+ $target_style = 'display: none;';
+ }
+
+ $select_header = new html_select(array('name' => "_selheader[]", 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_header_select(this)'));
+ foreach($this->headers as $name => $val) {
+ if (($val == 'envelope' && in_array('envelope', $ext)) || $val != 'envelope')
+ $select_header->add(rcmail::Q($this->gettext($name)), rcmail::Q($val));
+ }
+
+ if (in_array('body', $ext))
+ $select_header->add(rcmail::Q($this->gettext('body')), rcmail::Q('body::body'));
+
+ if (in_array('spamtest', $ext))
+ $select_header->add(rcmail::Q($this->gettext('spamtest')), rcmail::Q('spamtest::spamtest'));
+
+ if (in_array('virustest', $ext))
+ $select_header->add(rcmail::Q($this->gettext('virustest')), rcmail::Q('virustest::virustest'));
+
+ foreach($predefined_rules as $idx => $data)
+ $select_header->add(rcmail::Q($data['name']), rcmail::Q($data['type'] . '::predefined_' . $idx));
+
+ if (in_array('date', $ext))
+ $select_header->add(rcmail::Q($this->gettext('arrival')), rcmail::Q('date::currentdate'));
+
+ $select_header->add(rcmail::Q($this->gettext('size')), rcmail::Q('size::size'));
+ $select_header->add(rcmail::Q($this->gettext('otherheader')), rcmail::Q('header::other'));
+ $input_test = new html_hiddenfield(array('name' => '_test[]', 'value' => $test));
+ $rules_table->add('selheader', $select_header->show($selheader) . $input_test->show());
+
+ $help_button = html::img(array('src' => $attrib['helpicon'], 'alt' => $this->gettext('sieveruleheaders'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('name' => '_headerhlp', 'href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sieverules_xheaders(this);', 'title' => $this->gettext('sieveruleheaders'), 'style' => $header_style), $help_button);
+
+ $input_header = new html_inputfield(array('name' => '_header[]', 'style' => $header_style, 'class' => 'short'));
+ $select_bodypart = new html_select(array('name' => '_bodypart[]', 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_bodypart_select(this)', 'style' => $bodypart_style));
+ $select_bodypart->add(rcmail::Q($this->gettext('auto')), rcmail::Q(''));
+ $select_bodypart->add(rcmail::Q($this->gettext('raw')), rcmail::Q('raw'));
+ $select_bodypart->add(rcmail::Q($this->gettext('text')), rcmail::Q('text'));
+ $select_bodypart->add(rcmail::Q($this->gettext('other')), rcmail::Q('content'));
+ $select_datepart = new html_select(array('name' => '_datepart[]', 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_datepart_select(this)','style' => $datepart_style));
+ $select_datepart->add(rcmail::Q($this->gettext('date')), rcmail::Q('date'));
+ $select_datepart->add(rcmail::Q($this->gettext('time')), rcmail::Q('time'));
+ $select_datepart->add(rcmail::Q($this->gettext('weekday')), rcmail::Q('weekday'));
+ $rules_table->add('header', $input_header->show($header) . $help_button . $select_bodypart->show($bodypart) . $select_datepart->show($datepart));
+
+ $select_op = new html_select(array('name' => "_operator[]", 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_rule_op_select(this)', 'style' => $op_style));
+ foreach($this->operators as $name => $val)
+ $select_op->add(rcmail::Q($this->gettext($name)), $val);
+
+ $select_size_op = new html_select(array('name' => "_size_operator[]", 'style' => $sizeop_style));
+ $select_size_op->add(rcmail::Q($this->gettext('filterunder')), 'under');
+ $select_size_op->add(rcmail::Q($this->gettext('filterover')), 'over');
+
+ $select_date_op = new html_select(array('name' => "_date_operator[]", 'style' => $dateop_style));
+ $select_date_op->add(rcmail::Q($this->gettext('filteris')), 'is');
+ $select_date_op->add(rcmail::Q($this->gettext('filterisnot')), 'notis');
+
+ if (in_array('relational', $ext)) {
+ $select_date_op->add(rcmail::Q($this->gettext('filterbefore')), 'value "lt"');
+ $select_date_op->add(rcmail::Q($this->gettext('filterafter')), 'value "gt"');
+ }
+
+ $select_spamtest_op = new html_select(array('name' => "_spamtest_operator[]", 'style' => $spamtestop_style));
+ $select_spamtest_op->add(rcmail::Q($this->gettext('spamlevelequals')), 'eq');
+ $select_spamtest_op->add(rcmail::Q($this->gettext('spamlevelislessthanequal')), 'le');
+ $select_spamtest_op->add(rcmail::Q($this->gettext('spamlevelisgreaterthanequal')), 'ge');
+
+ if ($showadvanced)
+ $rules_table->add('op', $select_op->show('advoptions') . $select_size_op->show($sizeop) . $select_date_op->show($dateop) . $select_spamtest_op->show($spamtestop));
+ else
+ $rules_table->add('op', $select_op->show($op) . $select_size_op->show($sizeop) . $select_date_op->show($dateop) . $select_spamtest_op->show($spamtestop));
+
+ $input_target = new html_inputfield(array('name' => '_target[]', 'style' => $target_style, 'class' => $target_size));
+
+ $select_units = new html_select(array('name' => "_units[]", 'style' => $units_style, 'class' => 'short'));
+ $select_units->add(rcmail::Q($this->gettext('B')), '');
+ $select_units->add(rcmail::Q($this->gettext('KB')), 'K');
+ $select_units->add(rcmail::Q($this->gettext('MB')), 'M');
+
+ $select_spam_probability = new html_select(array('name' => "_spam_probability[]", 'style' => $spam_prob_style, 'class' => 'long'));
+ $select_spam_probability->add(rcmail::Q($this->gettext('notchecked')), '0');
+ $select_spam_probability->add(rcmail::Q("0%"), '1');
+ $select_spam_probability->add(rcmail::Q("10%"), '2');
+ $select_spam_probability->add(rcmail::Q("20%"), '3');
+ $select_spam_probability->add(rcmail::Q("40%"), '4');
+ $select_spam_probability->add(rcmail::Q("50%"), '5');
+ $select_spam_probability->add(rcmail::Q("60%"), '6');
+ $select_spam_probability->add(rcmail::Q("70%"), '7');
+ $select_spam_probability->add(rcmail::Q("80%"), '8');
+ $select_spam_probability->add(rcmail::Q("90%"), '9');
+ $select_spam_probability->add(rcmail::Q("100%"), '10');
+
+ $select_virus_probability = new html_select(array('name' => "_virus_probability[]", 'style' => $virus_prob_style, 'class' => 'long'));
+ $select_virus_probability->add(rcmail::Q($this->gettext('notchecked')), '0');
+ $select_virus_probability->add(rcmail::Q($this->gettext('novirus')), '1');
+ $select_virus_probability->add(rcmail::Q($this->gettext('virusremoved')), '2');
+ $select_virus_probability->add(rcmail::Q($this->gettext('viruscured')), '3');
+ $select_virus_probability->add(rcmail::Q($this->gettext('possiblevirus')), '4');
+ $select_virus_probability->add(rcmail::Q($this->gettext('definitevirus')), '5');
+
+ $select_weekdays = new html_select(array('name' => "_weekday[]", 'style' => $weekdays_style, 'class' => 'long'));
+ $select_weekdays->add(rcmail::Q($this->gettext('sunday')), '0');
+ $select_weekdays->add(rcmail::Q($this->gettext('monday')), '1');
+ $select_weekdays->add(rcmail::Q($this->gettext('tuesday')), '2');
+ $select_weekdays->add(rcmail::Q($this->gettext('wednesday')), '3');
+ $select_weekdays->add(rcmail::Q($this->gettext('thursday')), '4');
+ $select_weekdays->add(rcmail::Q($this->gettext('friday')), '5');
+ $select_weekdays->add(rcmail::Q($this->gettext('saturday')), '6');
+
+ $rules_table->add('target', $select_weekdays->show($target) . $select_spam_probability->show($spam_probability) . $select_virus_probability->show($virus_probability) . $input_target->show($target) . "&nbsp;" . $select_units->show($units));
+
+ $add_button = $this->api->output->button(array('command' => 'plugin.sieverules.add_rule', 'type' => 'link', 'class' => 'add', 'title' => 'sieverules.addsieverule', 'content' => ' '));
+ $delete_button = $this->api->output->button(array('command' => 'plugin.sieverules.del_rule', 'type' => 'link', 'class' => 'delete', 'classact' => 'delete_act', 'title' => 'sieverules.deletesieverule', 'content' => ' '));
+ $rules_table->add('control', $delete_button . $add_button);
+
+ if (isset($rule))
+ $rowid = $rules_table->size();
+ else
+ $rowid = 'rowid';
+
+ $headers_table = new html_table(array('class' => 'records-table', 'cellspacing' => '0', 'cols' => 4));
+ $headers_table->add(array('colspan' => 4, 'style' => 'white-space: normal;'), rcmail::Q($this->gettext('sieveheadershlp')));
+
+ $col1 = '';
+ $col2 = '';
+ $col3 = '';
+ $col4 = '';
+ $other_headers = $rcmail->config->get('sieverules_other_headers');
+ sort($other_headers);
+ $col_length = sizeof($other_headers) / 4;
+ $col_length = ceil($col_length);
+ foreach ($other_headers as $idx => $xheader) {
+ $input_xheader = new html_radiobutton(array('id' => $xheader . '_' . $rowid, 'name' => '_xheaders_' . $rowid . '[]', 'value' => $xheader, 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_set_xheader(this)', 'class' => 'radio'));
+ $xheader_show = $input_xheader->show($header) . "&nbsp;" . html::label($xheader . '_' . $rowid, rcmail::Q($xheader));
+
+ if ($idx < $col_length)
+ $col1 .= $xheader_show . "<br />";
+ elseif ($idx < $col_length * 2)
+ $col2 .= $xheader_show . "<br />";
+ elseif ($idx < $col_length * 3)
+ $col3 .= $xheader_show . "<br />";
+ elseif ($idx < $col_length * 4)
+ $col4 .= $xheader_show . "<br />";
+ }
+
+ $headers_table->add(array('style' => 'vertical-align: top; width: 25%;'), $col1);
+ $headers_table->add(array('style' => 'vertical-align: top; width: 25%;'), $col2);
+ $headers_table->add(array('style' => 'vertical-align: top; width: 25%;'), $col3);
+ $headers_table->add(array('style' => 'vertical-align: top; width: 25%;'), $col4);
+
+ $rules_table->set_row_attribs(array('style' => 'display: none;'));
+ $rules_table->add(array('colspan' => 5), $headers_table->show());
+
+ $advanced_table = new html_table(array('class' => 'records-table', 'cellspacing' => '0', 'cols' => 2));
+ $advanced_table->add(array('colspan' => 2, 'style' => 'white-space: normal;'), rcmail::Q($this->gettext('advancedoptions')));
+
+ $help_button = html::img(array('src' => $attrib['helpicon'], 'alt' => $this->gettext('contentpart'), 'border' => 0, 'style' => 'margin-left: 4px;'));
+ $help_button = html::a(array('href' => "#", 'onclick' => 'return '. rcmail_output::JS_OBJECT_NAME .'.sieverules_help(this, ' . $advanced_table->size() . ');', 'title' => $this->gettext('contentpart')), $help_button);
+
+ $field_id = 'rcmfd_advcontentpart_'. $rowid;
+ $advanced_table->set_row_attribs(array('style' => $advcontentpart_style));
+ $input_advcontentpart = new html_inputfield(array('id' => $field_id, 'name' => '_body_contentpart[]', 'class' => 'short'));
+ $advanced_table->add(array('style' => 'white-space: normal;', 'class' => 'selheader'), html::label($field_id, rcmail::Q($this->gettext('bodycontentpart'))));
+ $advanced_table->add(array('style' => 'white-space: normal;'), $input_advcontentpart->show($advcontentpart) . $help_button);
+
+ $advanced_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
+ $advanced_table->add(array('colspan' => 2, 'class' => 'vacdaysexp'), $this->gettext('contentpartexp'));
+
+ $field_id = 'rcmfd_advoperator_'. $rowid;
+ $select_advop = new html_select(array('id' => $field_id, 'name' => "_advoperator[]", 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_rule_advop_select(this)'));
+
+ if (in_array('regex', $ext)) {
+ $select_advop->add(rcmail::Q($this->gettext('filterregex')), 'regex');
+ $select_advop->add(rcmail::Q($this->gettext('filternotregex')), 'notregex');
+ }
+
+ if (in_array('relational', $ext)) {
+ $select_advop->add(rcmail::Q($this->gettext('countisgreaterthan')), 'count "gt"');
+ $select_advop->add(rcmail::Q($this->gettext('countisgreaterthanequal')), 'count "ge"');
+ $select_advop->add(rcmail::Q($this->gettext('countislessthan')), 'count "lt"');
+ $select_advop->add(rcmail::Q($this->gettext('countislessthanequal')), 'count "le"');
+ $select_advop->add(rcmail::Q($this->gettext('countequals')), 'count "eq"');
+ $select_advop->add(rcmail::Q($this->gettext('countnotequals')), 'count "ne"');
+ $select_advop->add(rcmail::Q($this->gettext('valueisgreaterthan')), 'value "gt"');
+ $select_advop->add(rcmail::Q($this->gettext('valueisgreaterthanequal')), 'value "ge"');
+ $select_advop->add(rcmail::Q($this->gettext('valueislessthan')), 'value "lt"');
+ $select_advop->add(rcmail::Q($this->gettext('valueislessthanequal')), 'value "le"');
+ $select_advop->add(rcmail::Q($this->gettext('valueequals')), 'value "eq"');
+ $select_advop->add(rcmail::Q($this->gettext('valuenotequals')), 'value "ne"');
+ }
+
+ if (in_array('subaddress', $ext)) {
+ $select_advop->add(rcmail::Q($this->gettext('userpart')), 'user');
+ $select_advop->add(rcmail::Q($this->gettext('notuserpart')), 'notuser');
+ $select_advop->add(rcmail::Q($this->gettext('detailpart')), 'detail');
+ $select_advop->add(rcmail::Q($this->gettext('notdetailpart')), 'notdetail');
+ $select_advop->add(rcmail::Q($this->gettext('domainpart')), 'domain');
+ $select_advop->add(rcmail::Q($this->gettext('notdomainpart')), 'notdomain');
+ }
+
+ $advanced_table->add(array('style' => 'white-space: normal;', 'class' => 'selheader'), html::label($field_id, rcmail::Q($this->gettext('operator'))));
+ $advanced_table->add(array('style' => 'white-space: normal;'), $select_advop->show($op));
+
+ $field_id = 'rcmfd_comparator_'. $rowid;
+ if (substr($op, 0, 5) == 'count' || substr($op, 0, 5) == 'value')
+ $select_comparator = new html_select(array('id' => $field_id, 'name' => "_comparator[]"));
+ else
+ $select_comparator = new html_select(array('id' => $field_id, 'name' => "_comparator[]", 'disabled' => 'disabled'));
+
+ $select_comparator->add(rcmail::Q($this->gettext('i;ascii-casemap')), '');
+ $select_comparator->add(rcmail::Q($this->gettext('i;octet')), 'i;octet');
+
+ foreach ($ext as $extension) {
+ if (substr($extension, 0, 11) == 'comparator-' && $extension != 'comparator-i;ascii-casemap' && $extension != 'comparator-i;octet')
+ $select_comparator->add(rcmail::Q($this->gettext(substr($extension, 11))), substr($extension, 11));
+ }
+
+ $advanced_table->add(array('style' => 'white-space: normal;', 'class' => 'selheader'), html::label($field_id, rcmail::Q($this->gettext('comparator'))));
+ $advanced_table->add(array('style' => 'white-space: normal;'), $select_comparator->show($rule['comparator']));
+
+ $select_advweekdays = new html_select(array('name' => "_advweekday[]", 'style' => $advweekdays_style));
+ $select_advweekdays->add(rcmail::Q($this->gettext('sunday')), '0');
+ $select_advweekdays->add(rcmail::Q($this->gettext('monday')), '1');
+ $select_advweekdays->add(rcmail::Q($this->gettext('tuesday')), '2');
+ $select_advweekdays->add(rcmail::Q($this->gettext('wednesday')), '3');
+ $select_advweekdays->add(rcmail::Q($this->gettext('thursday')), '4');
+ $select_advweekdays->add(rcmail::Q($this->gettext('friday')), '5');
+ $select_advweekdays->add(rcmail::Q($this->gettext('saturday')), '6');
+
+ $field_id = 'rcmfd_advtarget_'. $rowid;
+ $input_advtarget = new html_inputfield(array('id' => $field_id, 'name' => '_advtarget[]', 'style' => $advtarget_style));
+ $advanced_table->add(array('style' => 'white-space: normal;', 'class' => 'selheader'), html::label($field_id, rcmail::Q($this->gettext('teststring'))));
+ $advanced_table->add(array('style' => 'white-space: normal;'), $input_advtarget->show($target) . $select_advweekdays->show($target));
+
+ if (!($showadvanced && $predefined == -1))
+ $rules_table->set_row_attribs(array('style' => 'display: none;'));
+ $rules_table->add(array('colspan' => 5), $advanced_table->show());
+
+ return $rules_table;
+ }
+
+ private function _action_row($ext, $actions_table, $rowid, $action, $attrib, $example)
+ {
+ $rcmail = rcube::get_instance();
+ static $a_mailboxes;
+
+ if (!isset($action))
+ $actions_table->set_row_attribs(array('style' => 'display: none;'));
+
+ $help_icon = html::img(array('src' => $attrib['helpicon'], 'alt' => $this->gettext('messagehelp'), 'border' => 0));
+
+ $vacadvstyle = ($action['type'] != 'vacation' && $this->force_vacto) ? '' : 'display: none;';
+ $vacadvstyle_from = ($this->show_vacfrom) ? $vacadvstyle : 'display: none;';
+ $vacadvstyle_handle = ($this->show_vachandle) ? $vacadvstyle : 'display: none;';
+ $vacadvclass_from = ($this->show_vacfrom) ? 'advanced' : 'disabled';
+ $vacadvclass_handle = ($this->show_vachandle) ? 'advanced' : 'disabled';
+ $vacshowadv = ($action['type'] != 'vacation' && $this->force_vacto) ? '1' : '';
+ $noteadvstyle = 'display: none;';
+ $noteshowadv = '';
+ $eheadadvstyle = 'display: none;';
+ $eheadshowadv = '';
+
+ // setup allowed actions
+ $allowed_actions = array();
+ $config_actions = $rcmail->config->get('sieverules_allowed_actions', array());
+ if (in_array('fileinto', $ext) && ($config_actions['fileinto'] || $action['type'] == 'fileinto'))
+ $allowed_actions['fileinto'] = $this->gettext('messagemoveto');
+ if (in_array('fileinto', $ext) && in_array('copy', $ext) && ($config_actions['fileinto'] || $action['type'] == 'fileinto'))
+ $allowed_actions['fileinto_copy'] = $this->gettext('messagecopyto');
+ if (in_array('vacation', $ext) && ($config_actions['vacation'] || $action['type'] == 'vacation'))
+ $allowed_actions['vacation'] = $this->gettext('messagevacation');
+ if (in_array('reject', $ext) && ($config_actions['reject'] || $action['type'] == 'reject'))
+ $allowed_actions['reject'] = $this->gettext('messagereject');
+ elseif (in_array('ereject', $ext) && ($config_actions['reject'] || $action['type'] == 'ereject'))
+ $allowed_actions['ereject'] = $this->gettext('messagereject');
+ if (in_array('imap4flags', $ext) && ($config_actions['imapflags'] || $action['type'] == 'imap4flags'))
+ $allowed_actions['imap4flags'] = $this->gettext('messageimapflags');
+ elseif (in_array('imapflags', $ext) && ($config_actions['imapflags'] || $action['type'] == 'imapflags'))
+ $allowed_actions['imapflags'] = $this->gettext('messageimapflags');
+ if (in_array('notify', $ext) && ($config_actions['notify'] || $action['type'] == 'notify'))
+ $allowed_actions['notify'] = $this->gettext('messagenotify');
+ elseif (in_array('enotify', $ext) && ($config_actions['notify'] || $action['type'] == 'enotify'))
+ $allowed_actions['enotify'] = $this->gettext('messagenotify');
+ if (in_array('editheader', $ext) && ($config_actions['editheaderadd'] || $action['type'] == 'editheaderadd'))
+ $allowed_actions['editheaderadd'] = $this->gettext('addheader');
+ if (in_array('editheader', $ext) && ($config_actions['editheaderrem'] || $action['type'] == 'editheaderrem'))
+ $allowed_actions['editheaderrem'] = $this->gettext('removeheader');
+ if ($config_actions['redirect'] || $action['type'] == 'redirect')
+ $allowed_actions['redirect'] = $this->gettext('messageredirect');
+ if (in_array('copy', $ext) && ($config_actions['redirect'] || $action['type'] == 'redirect_copy'))
+ $allowed_actions['redirect_copy'] = $this->gettext('messageredirectcopy');
+ if ($config_actions['keep'] || $action['type'] == 'keep')
+ $allowed_actions['keep'] = $this->gettext('messagekeep');
+ if ($config_actions['discard'] || $action['type'] == 'discard')
+ $allowed_actions['discard'] = $this->gettext('messagediscard');
+ if ($config_actions['stop'] || $action['type'] == 'stop')
+ $allowed_actions['stop'] = $this->gettext('messagestop');
+
+ // set the default action
+ reset($allowed_actions);
+ $method = key($allowed_actions);
+
+ $folder = 'INBOX';
+ $reject = '';
+
+ $identity = $rcmail->user->get_identity();
+ if ($this->show_vacfrom)
+ $vacfrom = (in_array('variables', $ext)) ? 'auto' : $identity['email'];
+ else
+ $vacfrom = null;
+
+ $vacto = null;
+ $address = '';
+ $days = '';
+ $handle = '';
+ $subject = '';
+ $origsubject = '';
+ $msg = '';
+ $charset = RCUBE_CHARSET;
+ $flags = '';
+ $nfrom = '';
+ $nimpt = '';
+ $nmethod = '';
+ $noptions = '';
+ $nmsg = '';
+
+ if ($action['type'] == 'fileinto' || $action['type'] == 'fileinto_copy') {
+ $method = $action['type'];
+ $folder = $rcmail->config->get('sieverules_include_imap_root', true) ? $action['target'] : $rcmail->storage->mod_folder($action['target'], 'IN');
+
+ if ($rcmail->config->get('sieverules_folder_delimiter', false))
+ $folder = str_replace($rcmail->storage->get_hierarchy_delimiter(), $rcmail->config->get('sieverules_folder_delimiter'), $folder);
+ }
+ elseif ($action['type'] == 'reject' || $action['type'] == 'ereject') {
+ $method = $action['type'];
+ $reject = $action['target'];
+ }
+ elseif ($action['type'] == 'vacation') {
+ $method = 'vacation';
+ $days = $action['days'];
+ $vacfrom_default = $vacfrom;
+ $vacfrom = $action['from'];
+ $vacto = $action['addresses'];
+ $handle = $action['handle'];
+ $subject = $action['subject'];
+ $origsubject = $action['origsubject'];
+ $msg = $action['msg'];
+ $htmlmsg = $action['htmlmsg'] ? '1' : '';
+ $charset = $action['charset'];
+
+ if ($htmlmsg == '1' && $rcmail->config->get('htmleditor') == '0') {
+ $h2t = new rcube_html2text($msg, false, true, 0);
+ $msg = $h2t->get_text();
+ $htmlmsg = '';
+ }
+ elseif ($htmlmsg == '' && $rcmail->config->get('htmleditor') == '1') {
+ $msg = $msg;
+ $msg = nl2br($msg);
+ $htmlmsg = '1';
+ }
+
+ if (!$example)
+ $this->force_vacto = false;
+
+ // check advanced enabled
+ if ((!empty($vacfrom) && $vacfrom != $vacfrom_default) || !empty($vacto) || !empty($handle) || !empty($days) || $charset != RCUBE_CHARSET || $this->force_vacto) {
+ $vacadvstyle = '';
+ $vacadvstyle_from = ($this->show_vacfrom) ? '' : 'display: none;';
+ $vacadvstyle_handle = ($this->show_vachandle) ? '' : 'display: none;';
+ $vacshowadv = '1';
+ }
+ }
+ elseif ($action['type'] == 'redirect' || $action['type'] == 'redirect_copy') {
+ $method = $action['type'];
+ $address = $action['target'];
+ }
+ elseif ($action['type'] == 'imapflags' || $action['type'] == 'imap4flags') {
+ $method = $action['type'];
+ $flags = $action['target'];
+ }
+ elseif ($action['type'] == 'notify' || $action['type'] == 'enotify') {
+ $method = $action['type'];
+ $nfrom = $action['from'];
+ $nimpt = $action['importance'];
+ $nmethod = $action['method'];
+ $noptions = $action['options'];
+ $nmsg = $action['msg'];
+
+ // check advanced enabled
+ if (!empty($nfrom) || !empty($nimpt)) {
+ $noteadvstyle = '';
+ $noteshowadv = '1';
+ }
+ }
+ elseif ($action['type'] == 'editheaderadd' || $action['type'] == 'editheaderrem') {
+ $method = $action['type'];
+ $headername = $action['name'];
+ $headerval = $action['value'];
+ $headerindex = $action['index'];
+ $headeropp = $action['operator'];
+
+ if ($action['type'] == 'editheaderrem' && (!empty($headerindex) || !empty($headerval))) {
+ $eheadadvstyle = '';
+ $eheadshowadv = '1';
+ }
+ }
+ elseif ($action['type'] == 'discard' || $action['type'] == 'keep' || $action['type'] == 'stop') {
+ $method = $action['type'];
+ }
+
+ $select_action = new html_select(array('name' => "_act[]", 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_action_select(this)'));
+ foreach ($allowed_actions as $value => $text)
+ $select_action->add(rcmail::Q($text), $value);
+
+ $actions_table->add('action', $select_action->show($method));
+
+ $vacs_table = new html_table(array('class' => 'records-table', 'cellspacing' => '0', 'cols' => 3, 'style' => ($method == 'vacation') ? '' : 'display: none;'));
+
+ $to_addresses = "";
+ $vacto_arr = explode(",", $vacto);
+ $user_identities = $rcmail->user->list_identities();
+ if (count($user_identities)) {
+ $field_id = 'rcmfd_sievevacfrom_'. $rowid;
+ $select_id = new html_select(array('id' => $field_id, 'name' => "_vacfrom[]", 'class' => 'short', 'onchange' => rcmail_output::JS_OBJECT_NAME . '.enable_sig(this);'));
+
+ if ($this->show_vacfrom && in_array('variables', $ext))
+ $select_id->add(rcmail::Q($this->gettext('autodetect')), "auto");
+ elseif (!$this->show_vacfrom)
+ $select_id->add(rcmail::Q($this->gettext('autodetect')), "");
+
+ foreach ($user_identities as $sql_arr) {
+ $from = $this->_rcmail_get_identity($sql_arr['identity_id']);
+
+ // find currently selected from address
+ if ($vacfrom != '' && $vacfrom == rcmail::Q($from['string']))
+ $vacfrom = $sql_arr['identity_id'];
+ elseif ($vacfrom != '' && $vacfrom == $from['mailto'])
+ $vacfrom = $sql_arr['identity_id'];
+
+ $select_id->add($from['disp_string'], $sql_arr['identity_id']);
+
+ $ffield_id = 'rcmfd_vac_' . $rowid . '_' . $sql_arr['identity_id'];
+
+ if ($this->force_vacto) {
+ $curaddress = $sql_arr['email'];
+ $vacto .= (!empty($vacto) ? ',' : '') . $sql_arr['email'];
+ }
+ else {
+ $curaddress = in_array($sql_arr['email'], $vacto_arr) ? $sql_arr['email'] : "";
+ }
+
+ $input_address = new html_checkbox(array('id' => $ffield_id, 'name' => '_vacto_check_' . $rowid . '[]', 'value' => $sql_arr['email'], 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_toggle_vac_to(this, '. $rowid .')', 'class' => 'checkbox'));
+ $to_addresses .= $input_address->show($curaddress) . "&nbsp;" . html::label($ffield_id, rcmail::Q($sql_arr['email'])) . "<br />";
+ }
+ }
+
+ if ($rcmail->config->get('sieverules_limit_vacto', true) && strlen($to_addresses) > 0) {
+ $vacs_table->set_row_attribs(array('class' => $vacadvclass_from, 'style' => $vacadvstyle_from));
+ $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('from'))));
+ $vacs_table->add(null, $select_id->show($vacfrom));
+
+ $sig_button = $this->api->output->button(array('command' => 'plugin.sieverules.vacation_sig', 'prop' => $rowid, 'type' => 'link', 'class' => 'vacsig', 'classact' => 'vacsig_act', 'title' => 'insertsignature', 'content' => ' '));
+ $vacs_table->add(null, $sig_button);
+
+ $field_id = 'rcmfd_sievevacto_'. $rowid;
+ $input_vacto = new html_hiddenfield(array('id' => $field_id, 'name' => '_vacto[]', 'value' => $vacto));
+ $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $vacadvstyle));
+ $vacs_table->add(array('style' => 'vertical-align: top;'), rcmail::Q($this->gettext('sieveto')));
+ $vacs_table->add(null, $to_addresses . $input_vacto->show());
+ $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
+ $vacs_table->add(array('style' => 'vertical-align: top;'), $help_button);
+
+ $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
+ $vacs_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('vactoexp'));
+ }
+ else {
+ $field_id = 'rcmfd_sievevacfrom_'. $rowid;
+ $input_vacfrom = new html_inputfield(array('id' => $field_id, 'name' => '_vacfrom[]'));
+ $vacs_table->set_row_attribs(array('class' => $vacadvclass_from, 'style' => $vacadvstyle_from));
+ $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('from'))));
+ $vacs_table->add(null, $input_vacfrom->show($vacfrom));
+
+ $sig_button = $this->api->output->button(array('command' => 'plugin.sieverules.vacation_sig', 'prop' => $rowid, 'type' => 'link', 'class' => 'vacsig', 'classact' => 'vacsig_act', 'title' => 'insertsignature', 'content' => ' '));
+ $vacs_table->add(null, $sig_button);
+
+ $field_id = 'rcmfd_sievevacto_'. $rowid;
+ $input_vacto = new html_inputfield(array('id' => $field_id, 'name' => '_vacto[]', 'class' => 'short'));
+ $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $vacadvstyle));
+ $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('sieveto'))));
+ $vacs_table->add(null, $input_vacto->show($vacto));
+
+ $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
+ $vacs_table->add(null, $help_button);
+ $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
+ $vacs_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('vactoexp') . '<br /><br />' . $this->gettext('vactoexp_adv'));
+ }
+
+ $field_id = 'rcmfd_sievevacdays_'. $rowid;
+ $input_day = new html_inputfield(array('id' => $field_id, 'name' => '_day[]', 'class' => 'short'));
+ $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $vacadvstyle));
+ $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('days'))));
+ $vacs_table->add(null, $input_day->show($days));
+ $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
+ $vacs_table->add(null, $help_button);
+
+ $vacs_table->set_row_attribs(array('style' => 'display: none;'));
+ $vacs_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('vacdaysexp'));
+
+ $field_id = 'rcmfd_sievevachandle_'. $rowid;
+ $input_handle = new html_inputfield(array('id' => $field_id, 'name' => '_handle[]', 'class' => 'short'));
+ $vacs_table->set_row_attribs(array('class' => $vacadvclass_handle, 'style' => $vacadvstyle_handle));
+ $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('sievevachandle'))));
+ $vacs_table->add(null, $input_handle->show($handle));
+ $help_button = html::a(array('href' => "#", 'onclick' => 'return ' . rcmail_output::JS_OBJECT_NAME . '.sieverules_help(this, ' . $vacs_table->size() . ');', 'title' => $this->gettext('messagehelp')), $help_icon);
+ $vacs_table->add(null, $help_button);
+
+ $vacs_table->set_row_attribs(array('class' => 'advhelp', 'style' => 'display: none;'));
+ $vacs_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('vachandleexp'));
+
+ $field_id = 'rcmfd_sievevacsubject_'. $rowid;
+ $input_subject = new html_inputfield(array('id' => $field_id, 'name' => '_subject[]'));
+ $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('subject'))));
+ $vacs_table->add(array('colspan' => 2), $input_subject->show($subject));
+
+ if (in_array('variables', $ext)) {
+ $field_id = 'rcmfd_sievevacsubject_orig_'. $rowid;
+ $input_origsubject = new html_checkbox(array('id' => $field_id, 'value' => '1', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_toggle_vac_osubj(this, '. $rowid .')', 'class' => 'checkbox'));
+ $input_vacosubj = new html_hiddenfield(array('id' => 'rcmfd_sievevactoh_'. $rowid, 'name' => '_orig_subject[]', 'value' => $origsubject));
+ $vacs_table->add(null, '&nbsp;');
+ $vacs_table->add(array('colspan' => 2), $input_origsubject->show($origsubject) . "&nbsp;" . html::label($field_id, rcmail::Q($this->gettext('sieveorigsubj'))) . $input_vacosubj->show());
+ }
+
+ $field_id = 'rcmfd_sievevacmag_'. $rowid;
+ $input_msg = new html_textarea(array('id' => $field_id, 'name' => '_msg[]', 'rows' => '8', 'cols' => '40', 'class' => $htmlmsg == 1 ? 'mce_editor' : '', 'is_escaped' => $htmlmsg == 1 ? true : null));
+ $input_html = new html_checkbox(array('id' => 'rcmfd_sievevachtmlcb_'. $rowid, 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_toggle_vac_html(this, '. $rowid .', \'' . $field_id .'\');', 'value' => '1', 'class' => 'checkbox'));
+ $input_htmlhd = new html_hiddenfield(array('id' => 'rcmfd_sievevachtmlhd_'. $rowid, 'name' => '_htmlmsg[]', 'value' => $htmlmsg));
+ $vacs_table->add('msg', html::label($field_id, rcmail::Q($this->gettext('message'))));
+ $vacs_table->add(array('colspan' => 2), $input_msg->show($msg) . html::tag('div', in_array('htmleditor', $rcmail->config->get('dont_override')) ? array('style' => 'display: none;') : null, $input_html->show($htmlmsg) . "&nbsp;" . html::label('rcmfd_sievevachtml_' . $rowid, rcmail::Q($this->gettext('htmlmessage')))) . $input_htmlhd->show());
+
+ $field_id = 'rcmfd_sievecharset_'. $rowid;
+ $vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $vacadvstyle));
+ $vacs_table->add(null, html::label($field_id, rcmail::Q($this->gettext('charset'))));
+ $vacs_table->add(array('colspan' => 2), $rcmail->output->charset_selector(array('id' => $field_id, 'name' => '_vaccharset[]', 'selected' => $charset)));
+
+ $input_advopts = new html_checkbox(array('id' => 'vadvopts' . $rowid, 'name' => '_vadv_opts[]', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_show_adv(this);', 'value' => '1', 'class' => 'checkbox'));
+ $vacs_table->add(array('colspan' => '3', 'style' => 'text-align: right'), html::label('vadvopts' . $rowid, rcmail::Q($this->gettext('advancedoptions'))) . $input_advopts->show($vacshowadv));
+
+ $notify_table = new html_table(array('class' => 'records-table', 'cellspacing' => '0', 'cols' => 3, 'style' => ($method == 'notify' || $method == 'enotify') ? '' : 'display: none;'));
+
+ $user_identities = $rcmail->user->list_identities();
+ if (count($user_identities)) {
+ $field_id = 'rcmfd_sievenotifyfrom_'. $rowid;
+ $select_id = new html_select(array('id' => $field_id, 'name' => "_nfrom[]"));
+ $select_id->add(rcmail::Q($this->gettext('autodetect')), "");
+
+ foreach ($user_identities as $sql_arr) {
+ $from = $this->_rcmail_get_identity($sql_arr['identity_id']);
+
+ // find currently selected from address
+ if ($nfrom != '' && $nfrom == rcmail::Q($from['string']))
+ $nfrom = $sql_arr['identity_id'];
+ elseif ($nfrom != '' && $nfrom == $from['mailto'])
+ $nfrom = $sql_arr['identity_id'];
+
+ $select_id->add($from['disp_string'], $sql_arr['identity_id']);
+ }
+
+ $notify_table->set_row_attribs(array('class' => 'advanced', 'style' => $noteadvstyle));
+ $notify_table->add(null, html::label($field_id, rcmail::Q($this->gettext('sievefrom'))));
+ $notify_table->add(array('colspan' => 2), $select_id->show($nfrom));
+ }
+
+ $field_id = 'rcmfd_nmethod_'. $rowid;
+ $input_method = new html_inputfield(array('id' => $field_id, 'name' => '_nmethod[]'));
+ $notify_table->add(null, html::label($field_id, rcmail::Q($this->gettext('method'))));
+ $notify_table->add(array('colspan' => 2), $input_method->show($nmethod));
+
+ $field_id = 'rcmfd_noption_'. $rowid;
+ $input_method = new html_inputfield(array('id' => $field_id, 'name' => '_noption[]'));
+ $notify_table->add(null, html::label($field_id, rcmail::Q($this->gettext('options'))));
+ $notify_table->add(array('colspan' => 2), $input_method->show($noptions));
+
+ $notify_table->set_row_attribs(array('style' => 'display: none;'));
+ $notify_table->add(array('colspan' => 3, 'class' => 'vacdaysexp'), $this->gettext('nmethodexp'));
+
+ $field_id = 'rcmfd_nimpt_'. $rowid;
+ $input_importance = new html_radiobutton(array('id' => $field_id . '_none', 'name' => '_notify_radio_' . $rowid, 'value' => 'none', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_notify_impt(this, '. $rowid .')', 'class' => 'radio'));
+ $importance_show = $input_importance->show($nimpt) . "&nbsp;" . html::label($field_id . '_none', rcmail::Q($this->gettext('importancen')));
+ $input_importance = new html_radiobutton(array('id' => $field_id . '_1', 'name' => '_notify_radio_' . $rowid, 'value' => '1', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_notify_impt(this, '. $rowid .')', 'class' => 'radio'));
+ $importance_show .= '&nbsp;&nbsp;' . $input_importance->show($nimpt) . "&nbsp;" . html::label($field_id . '_1', rcmail::Q($this->gettext('importance1')));
+ $input_importance = new html_radiobutton(array('id' => $field_id . '_2', 'name' => '_notify_radio_' . $rowid, 'value' => '2', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_notify_impt(this, '. $rowid .')', 'class' => 'radio'));
+ $importance_show .= '&nbsp;&nbsp;' . $input_importance->show($nimpt) . "&nbsp;" . html::label($field_id . '_2', rcmail::Q($this->gettext('importance2')));
+ $input_importance = new html_radiobutton(array('id' => $field_id . '_3', 'name' => '_notify_radio_' . $rowid, 'value' => '3', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_notify_impt(this, '. $rowid .')', 'class' => 'radio'));
+ $importance_show .= '&nbsp;&nbsp;' . $input_importance->show($nimpt) . "&nbsp;" . html::label($field_id . '_3', rcmail::Q($this->gettext('importance3')));
+ $input_importance = new html_hiddenfield(array('id' => 'rcmfd_sievenimpt_'. $rowid, 'name' => '_nimpt[]'));
+
+ $notify_table->set_row_attribs(array('class' => 'advanced', 'style' => $noteadvstyle));
+ $notify_table->add(null, rcmail::Q($this->gettext('flag')));
+ $notify_table->add(array('colspan' => 2), $importance_show . $input_importance->show($nimpt));
+
+ $field_id = 'rcmfd_nmsg_'. $rowid;
+ $input_msg = new html_inputfield(array('id' => $field_id, 'name' => '_nmsg[]'));
+ $notify_table->add(null, html::label($field_id, rcmail::Q($this->gettext('message'))));
+ $notify_table->add(array('colspan' => 2), $input_msg->show($nmsg));
+
+ if (in_array('enotify', $ext)) {
+ $input_advopts = new html_checkbox(array('id' => 'nadvopts' . $rowid, 'name' => '_nadv_opts[]', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_show_adv(this);', 'value' => '1', 'class' => 'checkbox'));
+ $notify_table->add(array('colspan' => '3', 'style' => 'text-align: right'), html::label('nadvopts' . $rowid, rcmail::Q($this->gettext('advancedoptions'))) . $input_advopts->show($noteshowadv));
+ }
+
+ $headers_table = new html_table(array('class' => 'records-table', 'cellspacing' => '0', 'cols' => 2, 'style' => ($method == 'editheaderadd' || $method == 'editheaderrem') ? '' : 'display: none;'));
+
+ $field_id = 'rcmfd_eheadname_'. $rowid;
+ $input_header = new html_inputfield(array('id' => $field_id, 'name' => '_eheadname[]'));
+ $headers_table->add(null, html::label($field_id, rcmail::Q($this->gettext('headername'))));
+ $headers_table->add(null, $input_header->show($headername));
+
+ $field_id = 'rcmfd_eheadindex_'. $rowid;
+ $select_index = new html_select(array('id' => $field_id, 'name' => "_eheadindex[]"));
+ $select_index->add(rcmail::Q($this->gettext('headerdelall')), "");
+ $select_index->add(rcmail::Q("1"), "1");
+ $select_index->add(rcmail::Q("2"), "2");
+ $select_index->add(rcmail::Q("3"), "3");
+ $select_index->add(rcmail::Q("4"), "4");
+ $select_index->add(rcmail::Q("5"), "5");
+ $select_index->add(rcmail::Q($this->gettext('last')), "last");
+
+ $headers_table->set_row_attribs(array('class' => 'advanced', 'style' => $eheadadvstyle));
+ $headers_table->add(null, html::label($field_id, rcmail::Q($this->gettext('headerindex'))));
+ $headers_table->add(null, $select_index->show($headerindex));
+
+ $field_id = 'rcmfd_eheadopp_'. $rowid;
+ $select_match = new html_select(array('id' => $field_id, 'name' => "_eheadopp[]"));
+ $select_match->add(rcmail::Q($this->gettext('filteris')), "");
+ $select_match->add(rcmail::Q($this->gettext('filtercontains')), "contains");
+
+ $headers_table->set_row_attribs(array('class' => 'advanced', 'style' => $eheadadvstyle));
+ $headers_table->add(null, html::label($field_id, rcmail::Q($this->gettext('operator'))));
+ $headers_table->add(null, $select_match->show($headeropp));
+
+ $field_id = 'rcmfd_eheadval_'. $rowid;
+ $input_header = new html_inputfield(array('id' => $field_id, 'name' => '_eheadval[]'));
+
+ if ($method == 'editheaderrem')
+ $headers_table->set_row_attribs(array('class' => 'advanced', 'style' => $eheadadvstyle));
+
+ $headers_table->add(null, html::label($field_id, rcmail::Q($this->gettext('headervalue'))));
+ $headers_table->add(null, $input_header->show($headerval));
+
+ if ($method == 'editheaderrem')
+ $headers_table->set_row_attribs(array('style' => 'display: none;'));
+
+ $field_id = 'rcmfd_eheadaddlast_'. $rowid;
+ $input_index = new html_checkbox(array('id' => $field_id, 'value' => 'last', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_toggle_eheadlast(this);', 'name' => '_eheadaddlast[]', 'class' => 'checkbox'));
+ $headers_table->add(null, '&nbsp;');
+ $headers_table->add(null, $input_index->show($headerindex) . "&nbsp;" . html::label($field_id, rcmail::Q($this->gettext('headerappend'))));
+
+ if ($method == 'editheaderadd')
+ $headers_table->set_row_attribs(array('style' => 'display: none;'));
+
+ $input_advopts = new html_checkbox(array('id' => 'hadvopts' . $rowid, 'name' => '_hadv_opts[]', 'onclick' => rcmail_output::JS_OBJECT_NAME . '.sieverules_show_adv(this);', 'value' => '1', 'class' => 'checkbox'));
+ $headers_table->add(array('colspan' => '3', 'style' => 'text-align: right'), html::label('nadvopts' . $rowid, rcmail::Q($this->gettext('advancedoptions'))) . $input_advopts->show($eheadshowadv));
+
+ // get mailbox list
+ $mbox_name = $rcmail->storage->get_folder();
+
+ // build the folders tree
+ if (empty($a_mailboxes)) {
+ // get mailbox list
+ if ($rcmail->config->get('sieverules_fileinto_options', 0) > 0)
+ $a_folders = $rcmail->storage->list_folders();
+ else
+ $a_folders = $rcmail->storage->list_folders_subscribed();
+
+ $delimiter = $rcmail->storage->get_hierarchy_delimiter();
+ $a_mailboxes = array();
+
+ foreach ($a_folders as $ifolder) {
+ if ($rcmail->config->get('sieverules_folder_encoding'))
+ $ifolder = $this->_mbox_encode($ifolder, $rcmail->config->get('sieverules_folder_encoding'));
+
+ if ($rcmail->config->get('sieverules_folder_delimiter', false))
+ $rcmail->build_folder_tree($a_mailboxes, str_replace($delimiter, $rcmail->config->get('sieverules_folder_delimiter'), $ifolder), $rcmail->config->get('sieverules_folder_delimiter'));
+ else
+ $rcmail->build_folder_tree($a_mailboxes, $ifolder, $delimiter);
+ }
+
+ if ($rcmail->config->get('sieverules_fileinto_options', 0) == 2 && in_array('mailbox', $ext))
+ array_push($a_mailboxes, array('id' => '@@newfolder', 'name' => $this->gettext('createfolder'), 'virtual' => '', 'folders' => array()));
+ }
+
+ $input_folderlist = new html_select(array('name' => '_folder[]', 'onchange' => rcmail_output::JS_OBJECT_NAME . '.sieverules_select_folder(this);', 'style' => ($method == 'fileinto' || $method == 'fileinto_copy') ? '' : 'display: none;', 'is_escaped' => true));
+ $rcmail->render_folder_tree_select($a_mailboxes, $mbox_name, 100, $input_folderlist, false);
+
+ $show_customfolder = 'display: none;';
+ if ($rcmail->config->get('sieverules_fileinto_options', 0) == 2 && !$rcmail->storage->folder_exists($folder)) {
+ $customfolder = $rcmail->storage->mod_folder($folder);
+ $folder = '@@newfolder';
+ $show_customfolder = '';
+ }
+
+ $input_customfolder = new html_inputfield(array('name' => '_customfolder[]'));
+ $otherfolders = html::span(array('id' => 'customfolder_rowid', 'style' => $show_customfolder), '<br />' . $input_customfolder->show($customfolder));
+
+ $input_address = new html_inputfield(array('name' => '_redirect[]', 'style' => ($method == 'redirect' || $method == 'redirect_copy') ? '' : 'display: none;'));
+ $input_reject = new html_textarea(array('name' => '_reject[]', 'rows' => '5', 'cols' => '40', 'style' => ($method == 'reject' || $method == 'ereject') ? '' : 'display: none;'));
+ $input_imapflags = new html_select(array('name' => '_imapflags[]', 'style' => ($method == 'imapflags' || $method == 'imap4flags') ? '' : 'display: none;'));
+ foreach($this->flags as $name => $val)
+ $input_imapflags->add(rcmail::Q($this->gettext($name)), rcmail::Q($val));
+
+ $actions_table->add('folder', $input_folderlist->show($folder) . $otherfolders . $input_address->show($address) . $vacs_table->show() . $notify_table->show() . $input_imapflags->show($flags) . $input_reject->show($reject) . $headers_table->show());
+
+ $add_button = $this->api->output->button(array('command' => 'plugin.sieverules.add_action', 'type' => 'link', 'class' => 'add', 'title' => 'sieverules.addsieveact', 'content' => ' '));
+ $delete_button = $this->api->output->button(array('command' => 'plugin.sieverules.del_action', 'type' => 'link', 'class' => 'delete', 'classact' => 'delete_act', 'title' => 'sieverules.deletesieveact', 'content' => ' '));
+
+ if ($rcmail->config->get('sieverules_multiple_actions'))
+ $actions_table->add('control', $delete_button . $add_button);
+ else
+ $actions_table->add('control', "&nbsp;");
+
+ return $actions_table;
+ }
+
+ private function _in_headerarray($needle, $haystack)
+ {
+ foreach ($haystack as $data) {
+ $args = explode("::", $data);
+ if ($args[1] == $needle)
+ return $args[0];
+ }
+
+ return false;
+ }
+
+ private function _strip_val($str, $allow_html = false, $trim = true)
+ {
+ $str = !$allow_html ? htmlspecialchars_decode($str) : $str;
+ $str = $trim ? trim($str) : $str;
+
+ return $str;
+ }
+
+ private function _mbox_encode($text, $encoding)
+ {
+ return rcube_charset::convert($text, 'UTF7-IMAP', $encoding);
+ }
+
+ // get identity record
+ private function _rcmail_get_identity($id)
+ {
+ $rcmail = rcube::get_instance();
+
+ if ($sql_arr = $rcmail->user->get_identity($id)) {
+ $out = $sql_arr;
+ $out['mailto'] = $sql_arr['email'];
+ $out['string'] = format_email_recipient($sql_arr['email'], rcube_charset::convert($sql_arr['name'], RCUBE_CHARSET, $this->api->output->get_charset()));
+
+ if ($rcmail->config->get('sieverules_from_format', 0) == 1) {
+ $out['disp_string'] = $out['string'];
+ $out['val_string'] = $out['string'];
+ }
+ else {
+ $out['disp_string'] = $out['mailto'];
+ $out['val_string'] = $out['mailto'];
+ }
+
+ return $out;
+ }
+
+ return FALSE;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/cross.gif b/plugins/sieverules/skins/classic/cross.gif
new file mode 100644
index 000000000..327052a23
--- /dev/null
+++ b/plugins/sieverules/skins/classic/cross.gif
Binary files differ
diff --git a/plugins/sieverules/skins/classic/help.gif b/plugins/sieverules/skins/classic/help.gif
new file mode 100644
index 000000000..ea7bbb363
--- /dev/null
+++ b/plugins/sieverules/skins/classic/help.gif
Binary files differ
diff --git a/plugins/sieverules/skins/classic/icons.gif b/plugins/sieverules/skins/classic/icons.gif
new file mode 100644
index 000000000..ba772f2ad
--- /dev/null
+++ b/plugins/sieverules/skins/classic/icons.gif
Binary files differ
diff --git a/plugins/sieverules/skins/classic/icons.png b/plugins/sieverules/skins/classic/icons.png
new file mode 100644
index 000000000..31a26491d
--- /dev/null
+++ b/plugins/sieverules/skins/classic/icons.png
Binary files differ
diff --git a/plugins/sieverules/skins/classic/ie6hacks.css b/plugins/sieverules/skins/classic/ie6hacks.css
new file mode 100644
index 000000000..a6b414034
--- /dev/null
+++ b/plugins/sieverules/skins/classic/ie6hacks.css
@@ -0,0 +1,10 @@
+/**
+ * SieveRules plugin styles (IE6 hacks)
+ */
+
+#sieverules-table tbody td.control a,
+#rules-table tbody td.control a,
+#actions-table tbody td.control a
+{
+ background-image: url(icons.gif);
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/iehacks.css b/plugins/sieverules/skins/classic/iehacks.css
new file mode 100644
index 000000000..582f452a3
--- /dev/null
+++ b/plugins/sieverules/skins/classic/iehacks.css
@@ -0,0 +1,53 @@
+/**
+ * SieveRules plugin styles (IE hacks)
+ */
+
+#sieverules-list
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)+'px');
+}
+
+.sieverules-boxcontent
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)-25+'px');
+}
+
+#sieverules-list-filters
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)+'px');
+ width: expression(parseInt(this.parentNode.offsetWidth)+'px');
+}
+
+#sieverules-list-examples
+{
+ width: expression(parseInt(this.parentNode.offsetWidth)+'px');
+}
+
+#sieverules-details
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)+'px');
+ width: expression((parseInt(this.parentNode.offsetWidth)-250)+'px');
+}
+
+#sieverules-advanced
+{
+ height: expression((parseInt(document.documentElement.clientHeight)-130)+'px');
+ width: expression((parseInt(document.documentElement.clientWidth)-40)+'px');
+}
+
+table.records-table td.vacdaysexp
+{
+ word-wrap: break-word;
+}
+
+#sieverules-advancedbox
+{
+ height: expression((parseInt(document.documentElement.clientHeight)-177)+'px');
+ width: expression((parseInt(document.documentElement.clientWidth)-48)+'px');
+}
+
+#sieverules-advanced textarea
+{
+ height: expression((parseInt(document.documentElement.clientHeight)-177)+'px');
+ width: expression((parseInt(document.documentElement.clientWidth)-48)+'px');
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/safari.css b/plugins/sieverules/skins/classic/safari.css
new file mode 100644
index 000000000..0add9e3d2
--- /dev/null
+++ b/plugins/sieverules/skins/classic/safari.css
@@ -0,0 +1,8 @@
+/**
+ * SieveRules plugin styles (safari hacks)
+ */
+
+table.records-table td.vacdaysexp
+{
+ word-wrap: break-word;
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/sieverules.css b/plugins/sieverules/skins/classic/sieverules.css
new file mode 100644
index 000000000..54a1b0cfa
--- /dev/null
+++ b/plugins/sieverules/skins/classic/sieverules.css
@@ -0,0 +1,406 @@
+/**
+ * SieveRules plugin styles
+ */
+
+#sieverules-list
+{
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ width: 240px;
+}
+
+.sieverules-boxcontent
+{
+ position: absolute;
+ top: 0;
+ bottom: 23px;
+ width: 100%;
+}
+
+#sieverules-list-filters
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ width: 100%;
+ border: 1px solid #999999;
+ overflow: auto;
+}
+
+#sieverules-list-filters thead td
+{
+ height: 20px;
+}
+
+#sieverules-list-filters thead td span
+{
+ position: absolute;
+ top: 2px;
+ left: 4px;
+ right: 25px;
+ height: 20px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+
+#sieverules-list-filters thead td img
+{
+ position: absolute;
+ top: 2px;
+ right: 2px;
+}
+
+#sieverules-list-examples
+{
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: 100%;
+ border: 1px solid #999999;
+ overflow: auto;
+}
+
+#sieverules-list div.boxfooter
+{
+ border: 1px solid #999999;
+ border-top: 0;
+ width: 100%;
+}
+
+#sieverules-details
+{
+ position: absolute;
+ top: 0;
+ left: 250px;
+ right: 0;
+ bottom: 0;
+ border: 1px solid #999999;
+}
+
+#sieverules-advanced
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 25px;
+ right: 0;
+ overflow: hidden;
+ border: 1px solid #999999;
+}
+
+span.disableLink
+{
+ float: right;
+ width: 200px;
+ text-align: right;
+}
+
+#sieverules-table,
+#sieverules-examples
+{
+ width: 100%;
+}
+
+#sieverules-table tbody td
+{
+ cursor: default;
+}
+
+#sieverules-table tbody td.control,
+#rules-table tbody td.control,
+#actions-table tbody td.control
+{
+ text-align: right;
+}
+
+#sieverules-table tbody td.control a,
+#rules-table tbody td.control a,
+#actions-table tbody td.control a
+{
+ display: block;
+ float: right;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+}
+
+#sieverules-table tbody td.control a.up_arrow
+{
+ background-position: 0 0;
+}
+
+#sieverules-table tbody td.control a.down_arrow
+{
+ background-position: 0 -18px;
+}
+
+#rules-table tbody td.control,
+#actions-table tbody td.control
+{
+ vertical-align: top;
+}
+
+#rules-table tbody td.control a.add,
+#actions-table tbody td.control a.add
+{
+ margin-left: 5px;
+ background-position: 0 -72px;
+}
+
+#rules-table tbody td.control a.delete,
+#actions-table tbody td.control a.delete
+{
+ background-position: 0 -54px;
+}
+
+#rules-table tbody td.control a.delete_act,
+#actions-table tbody td.control a.delete_act
+{
+ background-position: 0 -36px;
+}
+
+#actions-table tbody a.vacsig
+{
+ display: block;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+ background-position: 0 -108px;
+}
+
+#actions-table tbody a.vacsig_act
+{
+ display: block;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+ background-position: 0 -90px;
+}
+
+#rules-table,
+#actions-table,
+#rules-table td table.records-table
+{
+ width: 100%;
+}
+
+#rules-table td.selheader,
+#rules-table td.op
+{
+ width: 130px;
+}
+
+#rules-table td.header
+{
+ width: 135px;
+}
+
+#rules-table td.target
+{
+ width: 160px;
+}
+
+#rules-table input
+{
+ width: 150px;
+}
+
+#rules-table input.short
+{
+ width: 100px;
+}
+
+#rules-table select
+{
+ width: 123px;
+}
+
+#rules-table select.short
+{
+ width: 45px;
+}
+
+#rules-table select.long
+{
+ width: 157px;
+}
+
+#rules-table td table.records-table select
+{
+ width: 432px;
+}
+
+#rules-table td table.records-table input
+{
+ width: 426px;
+}
+
+#rules-table td table.records-table input.short
+{
+ width: 406px;
+}
+
+#rules-table td table.records-table input.radio
+{
+ width: auto;
+}
+
+#actions-table td.action
+{
+ width: 165px;
+ vertical-align: top;
+}
+
+#actions-table td.folder
+{
+ width: 420px;
+ vertical-align: top;
+}
+
+#actions-table td.action select
+{
+ width: 160px;
+}
+
+#actions-table td.folder input,
+#actions-table td.folder textarea
+{
+ width: 400px;
+}
+
+#actions-table td.folder select
+{
+ width: 408px;
+}
+
+#actions-table td.folder table.records-table select
+{
+ width: 337px;
+}
+
+#actions-table td.folder table.records-table input,
+#actions-table td.folder table.records-table textarea
+{
+ width: 330px;
+}
+
+#actions-table td.folder table.records-table input.short,
+#actions-table td.folder table.records-table select.short
+{
+ width: 310px;
+}
+
+#actions-table td.folder table.records-table input.checkbox,
+#actions-table td.folder table.records-table input.radio
+{
+ width: auto;
+}
+
+table.records-table td.msg
+{
+ vertical-align: top;
+}
+
+table.records-table td.vacdaysexp
+{
+ width: 398px;
+ white-space: -moz-pre-wrap !important;
+ white-space: pre-wrap !important;
+ white-space: pre;
+}
+
+#listbuttons
+{
+ position: absolute;
+ bottom: 18px;
+ left: 20px;
+}
+
+#advancedmode
+{
+ white-space: nowrap;
+ text-align: right;
+ position: absolute;
+ bottom: 30px;
+ right: 20px;
+ width: 460px;
+}
+
+#sieverules-advancedbox
+{
+ position: absolute;
+ top: 20px;
+ left: 0;
+ bottom: 26px;
+ right: 4px;
+}
+
+#sieverules-advanced textarea
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ border: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.records-table tbody tr.droptarget td
+{
+ border-top: 2px solid #000000;
+}
+
+.records-table tbody tr.droptargetend td
+{
+ border-bottom: 2px solid #000000;
+}
+
+#sieverulesrsdialog h3
+{
+ color: #333;
+ font-size: normal;
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+}
+
+#sieverulesrsdialog table td.title
+{
+ color: #666;
+ text-align: right;
+ padding-right: 1em;
+ white-space: nowrap;
+}
+
+#sieverulesrsdialog table td input
+{
+ width: 20em;
+}
+
+#sieverulesrsdialog .formbuttons
+{
+ margin-top: 1.5em;
+ text-align: center;
+}
+
+input.inputmask
+{
+ color: #999999;
+}
+
+#sieverulesactionsmenu a.selected
+{
+ font-weight: bold;
+}
+
+#sieverules-advbuttons
+{
+ position: absolute;
+ left: 0;
+ bottom: 0;
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/tabstyles.css b/plugins/sieverules/skins/classic/tabstyles.css
new file mode 100644
index 000000000..b1b1c3f95
--- /dev/null
+++ b/plugins/sieverules/skins/classic/tabstyles.css
@@ -0,0 +1,3 @@
+/**
+ * SieveRules plugin styles (tab styles)
+ */
diff --git a/plugins/sieverules/skins/classic/templates/advancededitor.html b/plugins/sieverules/skins/classic/templates/advancededitor.html
new file mode 100644
index 000000000..e42e40195
--- /dev/null
+++ b/plugins/sieverules/skins/classic/templates/advancededitor.html
@@ -0,0 +1,55 @@
+<!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" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+<script type="text/javascript" src="/functions.js"></script>
+</head>
+<body onload="rcube_init_mail_ui(); rcmail_ui.popups.sieverulesmenu = {id: 'sieverulesactionsmenu', obj:$('#sieverulesactionsmenu'), above:1};">
+
+<roundcube:include file="/includes/taskbar.html" />
+<roundcube:include file="/includes/header.html" />
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="mainscreen">
+
+<div id="sieverules-advanced">
+<div id="prefs-title" class="boxtitle"><roundcube:object name="steptitle" /></div>
+
+<div id="sieverules-advancedbox">
+<roundcube:object name="advancededitor" />
+</div>
+
+<div class="boxfooter">
+<roundcube:button name="sieverulesactions" id="sieverulesmenulink" type="link" title="sieverules.moreactions" class="button groupactions" onclick="rcmail_ui.show_popupmenu('sieverulesmenu'); return false" content=" " />
+</div>
+</div>
+
+<div id="sieverules-advbuttons">
+<roundcube:button command="plugin.sieverules.save" type="input" label="save" class="button mainaction" />
+</div>
+
+</div>
+
+<div id="sieverulesactionsmenu" class="popupmenu">
+ <ul>
+ <roundcube:if condition="config:sieverules_multiplerules == true" />
+ <li class="separator_below"><roundcube:button command="plugin.sieverules.ruleset_dialog" type="link" label="sieverules.newruleset" classAct="active" /></li>
+ <roundcube:object name="rulelist" type="link" />
+ <li class="separator_above"><roundcube:button command="plugin.sieverules.ruleset_dialog" prop="rename_ruleset" type="link" label="sieverules.renameruleset" classAct="active" /></li>
+ <li><roundcube:button command="plugin.sieverules.del_ruleset" type="link" label="sieverules.delruleset" classAct="active" /></li>
+ <li><roundcube:button command="plugin.sieverules.activate_ruleset" type="link" label="sieverules.activateruleset" classAct="active" /></li>
+ <roundcube:endif />
+ <li<roundcube:exp expression="config:sieverules_multiplerules == true ? ' class=separator_above' : ''" />><roundcube:button command="plugin.sieverules.sieverules_adveditor" prop="0" type="link" label="sieverules.stdeditor" classAct="active" /></li>
+ </ul>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/templates/editsieverule.html b/plugins/sieverules/skins/classic/templates/editsieverule.html
new file mode 100644
index 000000000..58b4c966a
--- /dev/null
+++ b/plugins/sieverules/skins/classic/templates/editsieverule.html
@@ -0,0 +1,29 @@
+<!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" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="/this//ie6hacks.css" /><![endif]-->
+<script type="text/javascript" src="/functions.js"></script>
+</head>
+<body class="iframe">
+<div id="prefs-title" class="boxtitle"><roundcube:object name="steptitle" /></div>
+
+<div class="boxcontent">
+<roundcube:object name="sieveruleform" helpIcon="/this/help.gif" />
+
+<p><br />
+<roundcube:button command="plugin.sieverules.copy_rule" type="input" class="button" label="sieverules.copy" condition="env:action=='plugin.sieverules.edit' && config:sieverules_multiplerules == true" style="margin-right:0.5em" />
+<roundcube:button command="plugin.sieverules.save" type="input" class="button mainaction" label="save" />
+</p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/templates/setupsieverules.html b/plugins/sieverules/skins/classic/templates/setupsieverules.html
new file mode 100644
index 000000000..a9e01f565
--- /dev/null
+++ b/plugins/sieverules/skins/classic/templates/setupsieverules.html
@@ -0,0 +1,18 @@
+<!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" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+<script type="text/javascript" src="/functions.js"></script>
+</head>
+<body onload="parent.rcmail.sieverules_disable_ruleset_options();" class="iframe">
+<roundcube:object name="sieverulessetup" />
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/templates/sieverules.html b/plugins/sieverules/skins/classic/templates/sieverules.html
new file mode 100644
index 000000000..66b2c0022
--- /dev/null
+++ b/plugins/sieverules/skins/classic/templates/sieverules.html
@@ -0,0 +1,93 @@
+<!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" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="/this//ie6hacks.css" /><![endif]-->
+<script type="text/javascript" src="/functions.js"></script>
+<script type="text/javascript" src="/splitter.js"></script>
+
+<style type="text/css">
+
+#sieverules-list { width: <roundcube:exp expression="!empty(cookie:sieverulesviewsplitter) ? cookie:sieverulesviewsplitter-5 : 240" />px; }
+<roundcube:if condition="env:examples" />
+#sieverules-list-filters {
+ bottom: <roundcube:exp expression="!empty(cookie:sievefiltersviewsplitter) ? cookie:sievefiltersviewsplitter+5 : 0" />px;
+ <roundcube:exp expression="browser:ie ? ('height:expression((parseInt(this.parentNode.offsetHeight)-'.(!empty(cookie:sievefiltersviewsplitter) ? cookie:sievefiltersviewsplitter+5 : 0).')+\\'px\\');') : ''" />
+}
+<roundcube:else />
+#sieverules-list-filters {
+ bottom: 0;
+ <roundcube:exp expression="browser:ie ? 'height:expression(parseInt(this.parentNode.offsetHeight)+\\'px\\');' : ''" />
+}
+<roundcube:endif />
+#sieverules-details {
+ left: <roundcube:exp expression="!empty(cookie:sieverulesviewsplitter) ? cookie:sieverulesviewsplitter+5 : 250" />px;
+ <roundcube:exp expression="browser:ie ? ('width:expression((parseInt(mainscreen.offsetWidth)-'.(!empty(cookie:sieverulesviewsplitter) ? cookie:sieverulesviewsplitter+5 : 250).')+\\'px\\');') : ''" />
+}
+</style>
+
+</head>
+<body onload="rcube_init_mail_ui(); rcmail_ui.popups.sieverulesmenu = {id: 'sieverulesactionsmenu', obj:$('#sieverulesactionsmenu'), above:1};">
+
+<roundcube:include file="/includes/taskbar.html" />
+<roundcube:include file="/includes/header.html" />
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="mainscreen">
+
+<div id="sieverules-list">
+<div class="sieverules-boxcontent">
+<roundcube:object name="sieveruleslist" activeicon="/this/tick.gif" inactiveicon="/this/cross.gif" />
+<roundcube:object name="sieverulesexamplelist" />
+</div>
+<div class="boxfooter">
+<roundcube:button command="plugin.sieverules.add" type="link" title="sieverules.newfilter" class="buttonPas addgroup" classAct="button addgroup" content=" " />
+<roundcube:button command="plugin.sieverules.delete" type="link" title="delete" class="buttonPas delgroup" classAct="button delgroup" content=" " />
+<roundcube:if condition="config:sieverules_multiplerules == true || config:sieverules_adveditor == 1 || config:sieverules_adveditor == 2" />
+<roundcube:button name="sieverulesactions" id="sieverulesmenulink" type="link" title="sieverules.moreactions" class="button groupactions" onclick="rcmail_ui.show_popupmenu('sieverulesmenu'); return false" content=" " />
+<roundcube:endif />
+</div>
+</div>
+
+<script type="text/javascript">
+ var rulesviewsplit = new rcube_splitter({id:'sieverulesviewsplitter', p1: 'sieverules-list', p2: 'sieverules-details', orientation: 'v', relative: true, start: 245});
+ rcmail.add_onload('rulesviewsplit.init()');
+
+ if ($('#sieverules-list-examples').length > 0) {
+ var filtersHeight = parseInt($('#sieverules-list').height() - 210);
+ var filtersviewsplit = new rcube_splitter({id:'sievefiltersviewsplitter', p1: 'sieverules-list-filters', p2: 'sieverules-list-examples', orientation: 'h', relative: true, start: filtersHeight});
+ rcmail.add_onload('filtersviewsplit.init()');
+ }
+</script>
+
+<div id="sieverules-details">
+<roundcube:object name="sieverulesframe" id="prefs-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" />
+</div>
+
+</div>
+
+<div id="sieverulesactionsmenu" class="popupmenu">
+ <ul>
+ <roundcube:if condition="config:sieverules_multiplerules == true" />
+ <li class="separator_below"><roundcube:button command="plugin.sieverules.ruleset_dialog" type="link" label="sieverules.newruleset" classAct="active" /></li>
+ <roundcube:object name="rulelist" type="link" />
+ <li class="separator_above"><roundcube:button command="plugin.sieverules.ruleset_dialog" prop="rename_ruleset" type="link" label="sieverules.renameruleset" classAct="active" /></li>
+ <li><roundcube:button command="plugin.sieverules.del_ruleset" type="link" label="sieverules.delruleset" classAct="active" /></li>
+ <li><roundcube:button command="plugin.sieverules.activate_ruleset" type="link" label="sieverules.activateruleset" classAct="active" /></li>
+ <roundcube:endif />
+ <roundcube:if condition="config:sieverules_adveditor == 1 || config:sieverules_adveditor == 2" />
+ <li<roundcube:exp expression="config:sieverules_multiplerules == true ? ' class=separator_above' : ''" />><roundcube:button command="plugin.sieverules.sieverules_adveditor" prop="1" type="link" label="sieverules.adveditor" classAct="active" /></li>
+ <roundcube:endif />
+ </ul>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/classic/tick.gif b/plugins/sieverules/skins/classic/tick.gif
new file mode 100644
index 000000000..08c3a3a13
--- /dev/null
+++ b/plugins/sieverules/skins/classic/tick.gif
Binary files differ
diff --git a/plugins/sieverules/skins/larry/cross.png b/plugins/sieverules/skins/larry/cross.png
new file mode 100644
index 000000000..8d8a13f47
--- /dev/null
+++ b/plugins/sieverules/skins/larry/cross.png
Binary files differ
diff --git a/plugins/sieverules/skins/larry/help.png b/plugins/sieverules/skins/larry/help.png
new file mode 100644
index 000000000..9f7a6ae44
--- /dev/null
+++ b/plugins/sieverules/skins/larry/help.png
Binary files differ
diff --git a/plugins/sieverules/skins/larry/icons.png b/plugins/sieverules/skins/larry/icons.png
new file mode 100644
index 000000000..db84da896
--- /dev/null
+++ b/plugins/sieverules/skins/larry/icons.png
Binary files differ
diff --git a/plugins/sieverules/skins/larry/iehacks.css b/plugins/sieverules/skins/larry/iehacks.css
new file mode 100644
index 000000000..e370e9300
--- /dev/null
+++ b/plugins/sieverules/skins/larry/iehacks.css
@@ -0,0 +1,53 @@
+/**
+ * SieveRules plugin styles (IE hacks)
+ */
+
+#sieverules-list
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)+'px');
+}
+
+.sieverules-boxcontent
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)-25+'px');
+}
+
+#sieverules-list-filters
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)+'px');
+ width: expression(parseInt(this.parentNode.offsetWidth)+'px');
+}
+
+#sieverules-list-examples
+{
+ width: expression(parseInt(this.parentNode.offsetWidth)+'px');
+}
+
+#sieverules-details
+{
+ height: expression(parseInt(this.parentNode.offsetHeight)+'px');
+ width: expression((parseInt(this.parentNode.offsetWidth)-270)+'px');
+}
+
+#sieverules-advanced
+{
+ height: expression((parseInt(document.documentElement.clientHeight)-130)+'px');
+ width: expression((parseInt(document.documentElement.clientWidth)-40)+'px');
+}
+
+table.records-table td.vacdaysexp
+{
+ word-wrap: break-word;
+}
+
+#sieverules-advancedbox
+{
+ height: expression((parseInt(document.documentElement.clientHeight)-177)+'px');
+ width: expression((parseInt(document.documentElement.clientWidth)-48)+'px');
+}
+
+#sieverules-advanced textarea
+{
+ height: expression((parseInt(document.documentElement.clientHeight)-177)+'px');
+ width: expression((parseInt(document.documentElement.clientWidth)-48)+'px');
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/listicons.png b/plugins/sieverules/skins/larry/listicons.png
new file mode 100644
index 000000000..f6889c4a0
--- /dev/null
+++ b/plugins/sieverules/skins/larry/listicons.png
Binary files differ
diff --git a/plugins/sieverules/skins/larry/safari.css b/plugins/sieverules/skins/larry/safari.css
new file mode 100644
index 000000000..0add9e3d2
--- /dev/null
+++ b/plugins/sieverules/skins/larry/safari.css
@@ -0,0 +1,8 @@
+/**
+ * SieveRules plugin styles (safari hacks)
+ */
+
+table.records-table td.vacdaysexp
+{
+ word-wrap: break-word;
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/sieverules.css b/plugins/sieverules/skins/larry/sieverules.css
new file mode 100644
index 000000000..c726acfed
--- /dev/null
+++ b/plugins/sieverules/skins/larry/sieverules.css
@@ -0,0 +1,435 @@
+/**
+ * SieveRules plugin styles
+ */
+
+#sieverules-list
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 260px;
+ bottom: 0;
+}
+
+#sieverules-list-filters
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ width: 100%;
+ overflow: auto;
+}
+
+#sieverules-list-filters thead td
+{
+ height: 15px;
+}
+
+#sieverules-list-filters thead td span
+{
+ position: absolute;
+ top: 10px;
+ left: 8px;
+ right: 30px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+
+#sieverules-list-filters thead td img
+{
+ position: absolute;
+ top: 9px;
+ right: 8px;
+}
+
+#sieverules-list-examples
+{
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: 100%;
+ overflow: auto;
+}
+
+#sieverules-details
+{
+ position: absolute;
+ top: 0;
+ left: 270px;
+ right: 0;
+ bottom: 0;
+}
+
+#sieverules-advanced
+{
+ position: absolute;
+ top: 0;
+ left: 232px;
+ right: 0;
+ bottom: 0;
+}
+
+span.disableLink
+{
+ float: right;
+ width: 200px;
+ text-align: right;
+}
+
+#sieverules-table,
+#sieverules-examples
+{
+ width: 100%;
+}
+
+#sieverules-table tbody td
+{
+ cursor: default;
+}
+
+#sieverules-table tbody td.control,
+#rules-table tbody td.control,
+#actions-table tbody td.control
+{
+ text-align: right;
+}
+
+#sieverules-table tbody td.control a,
+#rules-table tbody td.control a,
+#actions-table tbody td.control a
+{
+ display: block;
+ float: right;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+}
+
+#sieverules-table tbody td.control a.up_arrow
+{
+ background-position: 0 0;
+}
+
+#sieverules-table tbody td.control a.down_arrow
+{
+ background-position: 0 -18px;
+}
+
+#rules-table tbody td.control,
+#actions-table tbody td.control
+{
+ vertical-align: top;
+}
+
+#rules-table tbody td.control a.add,
+#actions-table tbody td.control a.add
+{
+ margin-left: 5px;
+ background-position: 0 -78px;
+}
+
+#rules-table tbody td.control a.delete,
+#actions-table tbody td.control a.delete
+{
+ background-position: 0 -59px;
+}
+
+#rules-table tbody td.control a.delete_act,
+#actions-table tbody td.control a.delete_act
+{
+ background-position: 0 -39px;
+}
+
+#actions-table tbody a.vacsig
+{
+ display: block;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+ background-position: -1px -126px;
+}
+
+#actions-table tbody a.vacsig_act
+{
+ display: block;
+ width: 16px;
+ height: 16px;
+ background-image: url(icons.png);
+ background-position: -1px -102px;
+}
+
+table.records-table
+{
+ width: auto;
+ border: 0;
+}
+
+table.records-table tbody td,
+table.records-table thead td
+{
+ border: 0;
+}
+
+#rules-table,
+#actions-table
+{
+ width: 100%;
+}
+
+#rules-table td table.records-table
+{
+ width: auto;
+}
+
+#rules-table td,
+#actions-table td,
+#rules-table td table.records-table td
+{
+ width: auto;
+}
+
+#rules-table td.selheader,
+#rules-table td.op
+{
+ width: 130px;
+}
+
+#rules-table td.header
+{
+ width: 135px;
+}
+
+#rules-table td.target
+{
+ width: 180px;
+}
+
+#rules-table input
+{
+ width: 150px;
+}
+
+#rules-table input.short
+{
+ width: 100px;
+}
+
+#rules-table select
+{
+ width: 123px;
+}
+
+#rules-table select.short
+{
+ width: 45px;
+}
+
+#rules-table select.long
+{
+ width: 157px;
+}
+
+#rules-table td table.records-table select
+{
+ width: 432px;
+}
+
+#rules-table td table.records-table input
+{
+ width: 426px;
+}
+
+#rules-table td table.records-table input.short
+{
+ width: 406px;
+}
+
+#rules-table td table.records-table input.radio
+{
+ width: auto;
+}
+
+#actions-table td.action
+{
+ width: 165px;
+ vertical-align: top;
+}
+
+#actions-table td.folder
+{
+ width: 420px;
+ vertical-align: top;
+}
+
+#actions-table td.action select
+{
+ width: 160px;
+}
+
+#actions-table td.folder input,
+#actions-table td.folder textarea
+{
+ width: 400px;
+}
+
+#actions-table td.folder select
+{
+ width: 408px;
+}
+
+#actions-table td.folder table.records-table select
+{
+ width: 337px;
+}
+
+#actions-table td.folder table.records-table input,
+#actions-table td.folder table.records-table textarea
+{
+ width: 330px;
+}
+
+#actions-table td.folder table.records-table input.short,
+#actions-table td.folder table.records-table select.short
+{
+ width: 310px;
+}
+
+#actions-table td.folder table.records-table input.checkbox,
+#actions-table td.folder table.records-table input.radio
+{
+ width: auto;
+}
+
+table.records-table td.msg
+{
+ vertical-align: top;
+}
+
+table.records-table td.vacdaysexp
+{
+ width: 398px;
+ white-space: -moz-pre-wrap !important;
+ white-space: pre-wrap !important;
+ white-space: pre;
+}
+
+#advancedmode
+{
+ white-space: nowrap;
+ text-align: right;
+ position: absolute;
+ bottom: 30px;
+ right: 20px;
+ width: 460px;
+}
+
+#sieverules-advancedbox
+{
+ position: absolute;
+ top: 34px;
+ left: 0;
+ bottom: 100px;
+ right: 8px;
+}
+
+#sieverules-advanced textarea
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ border: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.listing tbody tr.droptarget td
+{
+ border-top: 2px solid #0e5266;
+ background-color: #D9ECF4;
+}
+
+.listing tbody tr.droptargetend td
+{
+ border-bottom: 2px solid #0e5266;
+ background-color: #D9ECF4;
+}
+
+#sieverulesrsdialog h3
+{
+ color: #333;
+ font-size: medium;
+ margin-top: 0.5em;
+ margin-bottom: 1em;
+}
+
+#sieverulesrsdialog table td input
+{
+ width: 20em;
+}
+
+#sieverulesrsdialog .formbuttons
+{
+ margin-top: 1.5em;
+ text-align: center;
+}
+
+input.inputmask
+{
+ color: #999999;
+}
+
+#sieverulesactionsmenu a.selected
+{
+ font-weight: bold;
+}
+
+#sieverules-advbuttons
+{
+ position: absolute;
+ left: 0;
+ bottom: 45px;
+}
+
+#sieverules-advanced .boxfooter
+{
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 27px;
+ padding-left: 1px;
+ border-top: 1px solid #ddd;
+ border-radius: 0 0 4px 4px;
+ background: #eaeaea;
+ background: -moz-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eaeaea), color-stop(100%,#c8c8c8));
+ background: -o-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ background: -ms-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ background: linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+#sieverules-advanced .boxfooter .listbutton
+{
+ background: #C4BEBE;
+}
+
+#sieverules-advanced .boxfooter .listbutton .inner
+{
+ height: 20px;
+ background-image: url(listicons.png);
+ background-position: 5px -52px;
+}
+
+#sieverules-advanced .boxfooter #message
+{
+ position: absolute;
+ top: 0;
+ left: 65px;
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/tabstyles.css b/plugins/sieverules/skins/larry/tabstyles.css
new file mode 100644
index 000000000..a7c988240
--- /dev/null
+++ b/plugins/sieverules/skins/larry/tabstyles.css
@@ -0,0 +1,15 @@
+/**
+ * SieveRules plugin styles (tab styles)
+ */
+
+#settings-sections #settingstabpluginsieverules a
+{
+ background-image: url(listicons.png);
+ background-position: 6px -2px;
+}
+
+#settings-sections #settingstabpluginsieverules.selected a
+{
+ background-image: url(listicons.png);
+ background-position: 6px -25px;
+} \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/templates/advancededitor.html b/plugins/sieverules/skins/larry/templates/advancededitor.html
new file mode 100644
index 000000000..38186f049
--- /dev/null
+++ b/plugins/sieverules/skins/larry/templates/advancededitor.html
@@ -0,0 +1,60 @@
+<roundcube:object name="doctype" value="html5" />
+<html>
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+</head>
+<body class="noscroll">
+
+<roundcube:include file="/includes/header.html" />
+
+<div id="mainscreen" class="offset">
+
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="sieverules-advanced" class="uibox contentbox">
+
+<h1 class="boxtitle"><roundcube:object name="steptitle" /></h1>
+
+<div id="sieverules-advancedbox" class="boxcontent">
+<roundcube:object name="advancededitor" class="propform" />
+</div>
+
+<div id="sieverules-advbuttons">
+<div class="footerleft formbuttons">
+<roundcube:button command="plugin.sieverules.save" type="input" label="save" class="button mainaction" />
+</div>
+</div>
+
+<div class="boxfooter">
+<roundcube:button name="sieverulesactions" id="sieverulesactionsmenulink" type="link" title="sieverules.moreactions" class="listbutton groupactions" onclick="UI.show_popup('sieverulesactionsmenu', true, {id: 'sieverulesactionsmenu', obj:$('#sieverulesactionsmenu'), above:1}); return false" innerClass="inner" content="&#9881;" />
+<roundcube:object name="message" id="message" />
+</div>
+</div>
+
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+<div id="sieverulesactionsmenu" class="popupmenu">
+<ul class="toolbarmenu">
+<roundcube:if condition="config:sieverules_multiplerules == true" />
+<li class="separator_below"><roundcube:button command="plugin.sieverules.ruleset_dialog" type="link" label="sieverules.newruleset" classAct="active" /></li>
+<roundcube:object name="rulelist" type="link" />
+<li class="separator_above"><roundcube:button command="plugin.sieverules.ruleset_dialog" prop="rename_ruleset" type="link" label="sieverules.renameruleset" classAct="active" /></li>
+<li><roundcube:button command="plugin.sieverules.del_ruleset" type="link" label="sieverules.delruleset" classAct="active" /></li>
+<li><roundcube:button command="plugin.sieverules.activate_ruleset" type="link" label="sieverules.activateruleset" classAct="active" /></li>
+<roundcube:endif />
+<li<roundcube:exp expression="config:sieverules_multiplerules == true ? ' class=separator_above' : ''" />><roundcube:button command="plugin.sieverules.sieverules_adveditor" prop="0" type="link" label="sieverules.stdeditor" classAct="active" /></li>
+</ul>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/templates/editsieverule.html b/plugins/sieverules/skins/larry/templates/editsieverule.html
new file mode 100644
index 000000000..5b7fe285c
--- /dev/null
+++ b/plugins/sieverules/skins/larry/templates/editsieverule.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" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+</head>
+<body class="iframe">
+
+<h1 class="boxtitle"><roundcube:object name="steptitle" /></h1>
+
+<div id="preferences-details" class="boxcontent">
+<roundcube:object name="sieveruleform" class="propform" helpIcon="/this/help.png" />
+</div>
+
+<div class="footerleft formbuttons">
+<roundcube:button command="plugin.sieverules.save" type="input" class="button mainaction" label="save" />
+<roundcube:button command="plugin.sieverules.copy_rule" type="input" class="button" label="sieverules.copy" condition="env:action=='plugin.sieverules.edit' && config:sieverules_multiplerules == true" />
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/templates/setupsieverules.html b/plugins/sieverules/skins/larry/templates/setupsieverules.html
new file mode 100644
index 000000000..0b11adbdd
--- /dev/null
+++ b/plugins/sieverules/skins/larry/templates/setupsieverules.html
@@ -0,0 +1,27 @@
+<roundcube:object name="doctype" value="html5" />
+<html>
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+</head>
+<body class="iframe">
+
+<h1 class="boxtitle"><roundcube:object name="steptitle" /></h1>
+
+<div id="preferences-details" class="boxcontent">
+<roundcube:object name="sieverulessetup" class="propform" />
+</div>
+
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/templates/sieverules.html b/plugins/sieverules/skins/larry/templates/sieverules.html
new file mode 100644
index 000000000..694152076
--- /dev/null
+++ b/plugins/sieverules/skins/larry/templates/sieverules.html
@@ -0,0 +1,78 @@
+<roundcube:object name="doctype" value="html5" />
+<html>
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+<link rel="stylesheet" type="text/css" href="/this/sieverules.css" />
+<roundcube:if condition="browser:ie" />
+<link rel="stylesheet" type="text/css" href="/this/iehacks.css" />
+<roundcube:endif />
+<roundcube:if condition="browser:safari" />
+<link rel="stylesheet" type="text/css" href="/this/safari.css" />
+<roundcube:endif />
+</head>
+<body class="noscroll">
+
+<roundcube:include file="/includes/header.html" />
+
+<div id="mainscreen" class="offset">
+
+<roundcube:include file="/includes/settingstabs.html" />
+
+<div id="settings-right">
+
+<div id="sieverules-list" class="uibox listbox">
+<div class="scroller withfooter">
+<roundcube:object name="sieveruleslist" class="listing" cellspacing="0" noheader="true" activeicon="/this/tick.png" inactiveicon="/this/cross.png" />
+<roundcube:object name="sieverulesexamplelist" class="listing" cellspacing="0" noheader="true" />
+</div>
+<div class="boxfooter">
+<roundcube:button command="plugin.sieverules.add" type="link" title="sieverules.newfilter" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button command="plugin.sieverules.delete" type="link" title="delete" class="listbutton delete disabled" classAct="listbutton delete" innerClass="inner" content="-" /><roundcube:if condition="config:sieverules_multiplerules == true || config:sieverules_adveditor == 1 || config:sieverules_adveditor == 2" /><roundcube:button name="sieverulesactions" id="sieverulesactionsmenulink" type="link" title="sieverules.moreactions" class="listbutton groupactions" onclick="UI.show_popup('sieverulesactionsmenu', true, {id: 'sieverulesactionsmenu', obj:$('#sieverulesactionsmenu'), above:1}); return false" innerClass="inner" content="&#9881;" /><roundcube:endif />
+</div>
+</div>
+
+<div id="sieverules-details" class="uibox contentbox">
+<div class="iframebox">
+ <roundcube:object name="sieverulesframe" id="preferences-frame" style="width:100%; height:100%" frameborder="0" src="/watermark.html" />
+</div>
+<roundcube:object name="message" id="message" class="statusbar" />
+</div>
+
+</div>
+
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+<div id="sieverulesactionsmenu" class="popupmenu">
+<ul class="toolbarmenu">
+<roundcube:if condition="config:sieverules_multiplerules == true" />
+<li class="separator_below"><roundcube:button command="plugin.sieverules.ruleset_dialog" type="link" label="sieverules.newruleset" classAct="active" /></li>
+<roundcube:object name="rulelist" type="link" />
+<li class="separator_above"><roundcube:button command="plugin.sieverules.ruleset_dialog" prop="rename_ruleset" type="link" label="sieverules.renameruleset" classAct="active" /></li>
+<li><roundcube:button command="plugin.sieverules.del_ruleset" type="link" label="sieverules.delruleset" classAct="active" /></li>
+<li><roundcube:button command="plugin.sieverules.activate_ruleset" type="link" label="sieverules.activateruleset" classAct="active" /></li>
+<roundcube:endif />
+<roundcube:if condition="config:sieverules_adveditor == 1 || config:sieverules_adveditor == 2" />
+<li<roundcube:exp expression="config:sieverules_multiplerules == true ? ' class=separator_above' : ''" />><roundcube:button command="plugin.sieverules.sieverules_adveditor" prop="1" type="link" label="sieverules.adveditor" classAct="active" /></li>
+<roundcube:endif />
+</ul>
+</div>
+
+<script type="text/javascript">
+/* <![CDATA[ */
+
+$(document).ready(function(){
+ new rcube_splitter({id:'sieverulesviewsplitter', p1: '#sieverules-list', p2: '#sieverules-details', orientation: 'v', relative: true, start: 240}).init();
+
+ if ($('#sieverules-list-examples').length > 0) {
+ var filtersHeight = parseInt($('#sieverules-list').height() - 210);
+ new rcube_splitter({id:'sievefiltersviewsplitter', p1: '#sieverules-list-filters', p2: '#sieverules-list-examples', orientation: 'h', relative: true, start: filtersHeight}).init();
+ }
+});
+
+/* ]]> */
+</script>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/sieverules/skins/larry/tick.png b/plugins/sieverules/skins/larry/tick.png
new file mode 100644
index 000000000..6a26a6a08
--- /dev/null
+++ b/plugins/sieverules/skins/larry/tick.png
Binary files differ
diff --git a/plugins/squirrelmail_usercopy/config.inc.php.dist b/plugins/squirrelmail_usercopy/config.inc.php.dist
index 03ec1cb86..cb62b1b86 100644
--- a/plugins/squirrelmail_usercopy/config.inc.php.dist
+++ b/plugins/squirrelmail_usercopy/config.inc.php.dist
@@ -1,25 +1,25 @@
<?php
// Driver - 'file' or 'sql'
-$config['squirrelmail_driver'] = 'sql';
+$rcmail_config['squirrelmail_driver'] = 'sql';
// full path to the squirrelmail data directory
-$config['squirrelmail_data_dir'] = '';
-$config['squirrelmail_data_dir_hash_level'] = 0;
+$rcmail_config['squirrelmail_data_dir'] = '';
+$rcmail_config['squirrelmail_data_dir_hash_level'] = 0;
// 'mysql://dbuser:dbpass@localhost/database'
-$config['squirrelmail_dsn'] = 'mysql://user:password@localhost/webmail';
-$config['squirrelmail_db_charset'] = 'iso-8859-1';
+$rcmail_config['squirrelmail_dsn'] = 'mysql://user:password@localhost/webmail';
+$rcmail_config['squirrelmail_db_charset'] = 'iso-8859-1';
-$config['squirrelmail_address_table'] = 'address';
-$config['squirrelmail_userprefs_table'] = 'userprefs';
+$rcmail_config['squirrelmail_address_table'] = 'address';
+$rcmail_config['squirrelmail_userprefs_table'] = 'userprefs';
// identities_level option value for squirrelmail plugin
// With this you can bypass/change identities_level checks
// for operations inside this plugin. See #1486773
-$config['squirrelmail_identities_level'] = null;
+$rcmail_config['squirrelmail_identities_level'] = null;
// Set to false if you don't want the email address of the default identity
// (squirrelmail preference "email_address") to be saved as alias.
// Recommended: set to false if your squirrelmail config setting $edit_identity has been true.
-$config['squirrelmail_set_alias'] = true; \ No newline at end of file
+$rcmail_config['squirrelmail_set_alias'] = true; \ No newline at end of file
diff --git a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php b/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
index e882a2f37..7849f915e 100644
--- a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
+++ b/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
@@ -63,7 +63,7 @@ class squirrelmail_usercopy extends rcube_plugin
if ($this->prefs['___sig'.$i.'___'])
$ident_data['signature'] = $this->prefs['___sig'.$i.'___'];
// insert identity
- $rcmail->user->insert_identity($ident_data);
+ $identid = $rcmail->user->insert_identity($ident_data);
}
}
@@ -73,8 +73,8 @@ class squirrelmail_usercopy extends rcube_plugin
foreach ($this->abook as $rec) {
// #1487096 handle multi-address and/or too long items
$rec['email'] = array_shift(explode(';', $rec['email']));
- if (rcube_utils::check_email(rcube_utils::idn_to_ascii($rec['email']))) {
- $rec['email'] = rcube_utils::idn_to_utf8($rec['email']);
+ if (check_email(rcube_idn_to_ascii($rec['email']))) {
+ $rec['email'] = rcube_idn_to_utf8($rec['email']);
$contacts->insert($rec, true);
}
}
@@ -167,7 +167,7 @@ class squirrelmail_usercopy extends rcube_plugin
$sql_result = $db->query('SELECT * FROM '.$userprefs_table.' WHERE user=?', $uname); // ? is replaced with emailaddress
while ($sql_array = $db->fetch_assoc($sql_result) ) { // fetch one row from result
- $this->prefs[$sql_array['prefkey']] = rcube_charset::convert(rtrim($sql_array['prefval']), $db_charset);
+ $this->prefs[$sql_array['prefkey']] = rcube_charset_convert(rtrim($sql_array['prefval']), $db_charset);
}
/* retrieve address table data */
@@ -175,11 +175,11 @@ class squirrelmail_usercopy extends rcube_plugin
// parse addres book
while ($sql_array = $db->fetch_assoc($sql_result) ) { // fetch one row from result
- $rec['name'] = rcube_charset::convert(rtrim($sql_array['nickname']), $db_charset);
- $rec['firstname'] = rcube_charset::convert(rtrim($sql_array['firstname']), $db_charset);
- $rec['surname'] = rcube_charset::convert(rtrim($sql_array['lastname']), $db_charset);
- $rec['email'] = rcube_charset::convert(rtrim($sql_array['email']), $db_charset);
- $rec['notes'] = rcube_charset::convert(rtrim($sql_array['label']), $db_charset);
+ $rec['name'] = rcube_charset_convert(rtrim($sql_array['nickname']), $db_charset);
+ $rec['firstname'] = rcube_charset_convert(rtrim($sql_array['firstname']), $db_charset);
+ $rec['surname'] = rcube_charset_convert(rtrim($sql_array['lastname']), $db_charset);
+ $rec['email'] = rcube_charset_convert(rtrim($sql_array['email']), $db_charset);
+ $rec['notes'] = rcube_charset_convert(rtrim($sql_array['label']), $db_charset);
if ($rec['name'] && $rec['email'])
$this->abook[] = $rec;
diff --git a/plugins/subscriptions_option/localization/az_AZ.inc b/plugins/subscriptions_option/localization/az_AZ.inc
new file mode 100644
index 000000000..27ee6a54e
--- /dev/null
+++ b/plugins/subscriptions_option/localization/az_AZ.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'IMAP göndərişi istifadə et';
+?>
diff --git a/plugins/subscriptions_option/localization/be_BE.inc b/plugins/subscriptions_option/localization/be_BE.inc
new file mode 100644
index 000000000..470336838
--- /dev/null
+++ b/plugins/subscriptions_option/localization/be_BE.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Выкарыстоўваць IMAP-падпіскі';
+?>
diff --git a/plugins/subscriptions_option/localization/bg_BG.inc b/plugins/subscriptions_option/localization/bg_BG.inc
new file mode 100644
index 000000000..fd025e7dc
--- /dev/null
+++ b/plugins/subscriptions_option/localization/bg_BG.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Използвай IMAP абонаменти';
+?>
diff --git a/plugins/subscriptions_option/localization/el_GR.inc b/plugins/subscriptions_option/localization/el_GR.inc
new file mode 100644
index 000000000..aae45c2a6
--- /dev/null
+++ b/plugins/subscriptions_option/localization/el_GR.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Χρησιμοποιήστε IMAP Συνδρομές';
+?>
diff --git a/plugins/subscriptions_option/localization/en_US.inc b/plugins/subscriptions_option/localization/en_US.inc
index 3eb18fc1d..19e1b26c7 100644
--- a/plugins/subscriptions_option/localization/en_US.inc
+++ b/plugins/subscriptions_option/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/subscriptions_option/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Subscriptions plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/subscriptions_option/localization/es_AR.inc b/plugins/subscriptions_option/localization/es_AR.inc
new file mode 100644
index 000000000..d062f1934
--- /dev/null
+++ b/plugins/subscriptions_option/localization/es_AR.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Usar suscripción a carpetas IMAP';
+?>
diff --git a/plugins/subscriptions_option/localization/eu_ES.inc b/plugins/subscriptions_option/localization/eu_ES.inc
new file mode 100644
index 000000000..a6d349e11
--- /dev/null
+++ b/plugins/subscriptions_option/localization/eu_ES.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Erabili IMAP harpidetzak';
+?>
diff --git a/plugins/subscriptions_option/localization/fa_AF.inc b/plugins/subscriptions_option/localization/fa_AF.inc
new file mode 100644
index 000000000..696fbdc0b
--- /dev/null
+++ b/plugins/subscriptions_option/localization/fa_AF.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'از ثبت نام های IMAP استفاده کنید';
+?>
diff --git a/plugins/subscriptions_option/localization/gl_ES.inc b/plugins/subscriptions_option/localization/gl_ES.inc
index a273777da..bbff10c3b 100644
--- a/plugins/subscriptions_option/localization/gl_ES.inc
+++ b/plugins/subscriptions_option/localization/gl_ES.inc
@@ -17,6 +17,6 @@
*/
$labels = array();
-$labels['useimapsubscriptions'] = 'Usar subscricións IMAP';
+$labels['useimapsubscriptions'] = 'Usar suscripcións IMAP';
?>
diff --git a/plugins/subscriptions_option/localization/id_ID.inc b/plugins/subscriptions_option/localization/id_ID.inc
new file mode 100644
index 000000000..4232379c2
--- /dev/null
+++ b/plugins/subscriptions_option/localization/id_ID.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Gunakan Langganan IMAP';
+?>
diff --git a/plugins/subscriptions_option/localization/lb_LU.inc b/plugins/subscriptions_option/localization/lb_LU.inc
index d9432634b..8c1114e85 100644
--- a/plugins/subscriptions_option/localization/lb_LU.inc
+++ b/plugins/subscriptions_option/localization/lb_LU.inc
@@ -15,8 +15,5 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/
*/
-
-$labels = array();
$labels['useimapsubscriptions'] = 'IMAP-Abonnementer benotzen';
-
?>
diff --git a/plugins/subscriptions_option/localization/lv_LV.inc b/plugins/subscriptions_option/localization/lv_LV.inc
new file mode 100644
index 000000000..1b22bd148
--- /dev/null
+++ b/plugins/subscriptions_option/localization/lv_LV.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Izmantot IMAP abonēšanas iestatījumus';
+?>
diff --git a/plugins/subscriptions_option/localization/nn_NO.inc b/plugins/subscriptions_option/localization/nn_NO.inc
new file mode 100644
index 000000000..c679eac90
--- /dev/null
+++ b/plugins/subscriptions_option/localization/nn_NO.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Bruk IMAP-abonnement';
+?>
diff --git a/plugins/subscriptions_option/localization/ro_RO.inc b/plugins/subscriptions_option/localization/ro_RO.inc
new file mode 100644
index 000000000..82053c1a3
--- /dev/null
+++ b/plugins/subscriptions_option/localization/ro_RO.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions 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-subscriptions_option/
+*/
+$labels['useimapsubscriptions'] = 'Utilizare abonări IMAP';
+?>
diff --git a/plugins/subscriptions_option/localization/ru_RU.inc b/plugins/subscriptions_option/localization/ru_RU.inc
index b332e24ba..2b25783f3 100644
--- a/plugins/subscriptions_option/localization/ru_RU.inc
+++ b/plugins/subscriptions_option/localization/ru_RU.inc
@@ -17,6 +17,6 @@
*/
$labels = array();
-$labels['useimapsubscriptions'] = 'Использовать IMAP подписки';
+$labels['useimapsubscriptions'] = 'Использовать IMAP подписку';
?>
diff --git a/plugins/subscriptions_option/package.xml b/plugins/subscriptions_option/package.xml
index 04f2c1b3c..79d44f8c2 100644
--- a/plugins/subscriptions_option/package.xml
+++ b/plugins/subscriptions_option/package.xml
@@ -32,7 +32,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/subscriptions_option/subscriptions_option.php b/plugins/subscriptions_option/subscriptions_option.php
index 130f16a8b..b81a5ac8a 100644
--- a/plugins/subscriptions_option/subscriptions_option.php
+++ b/plugins/subscriptions_option/subscriptions_option.php
@@ -7,12 +7,12 @@
* It includes a toggle on the settings page under "Server Settings".
* The preference can also be locked
*
- * Add it to the plugins list in config.inc.php to enable the user option
+ * Add it to the plugins list in config/main.inc.php to enable the user option
* The user option can be hidden and set globally by adding 'use_subscriptions'
* to the 'dont_override' configure line:
- * $config['dont_override'] = array('use_subscriptions');
+ * $rcmail_config['dont_override'] = array('use_subscriptions');
* and then set the global preference
- * $config['use_subscriptions'] = true; // or false
+ * $rcmail_config['use_subscriptions'] = true; // or false
*
* Roundcube caches folder lists. When a user changes this option or visits
* their folder list, this cache is refreshed. If the option is on the
@@ -21,7 +21,6 @@
*
* @version @package_version@
* @author Ziba Scott
- * @license GNU GPLv3+
*/
class subscriptions_option extends rcube_plugin
{
@@ -47,7 +46,7 @@ class subscriptions_option extends rcube_plugin
$checkbox = new html_checkbox(array('name' => '_use_subscriptions', 'id' => $field_id, 'value' => 1));
$args['blocks']['main']['options']['use_subscriptions'] = array(
- 'title' => html::label($field_id, rcube::Q($this->gettext('useimapsubscriptions'))),
+ 'title' => html::label($field_id, Q($this->gettext('useimapsubscriptions'))),
'content' => $checkbox->show($use_subscriptions?1:0),
);
}
diff --git a/plugins/thunderbird_labels/localization/bg_BG.inc b/plugins/thunderbird_labels/localization/bg_BG.inc
new file mode 100644
index 000000000..d4f9e45ad
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/bg_BG.inc
@@ -0,0 +1,17 @@
+<?php
+/**
+* Author:
+* Deyan Stoykov
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Thunderbird етикети';
+$labels['label0'] = 'Без етикет';
+$labels['label1'] = 'Важно';
+$labels['label2'] = 'Работно';
+$labels['label3'] = 'Лично';
+$labels['label4'] = 'За изпълнение';
+$labels['label5'] = 'Отложено';
+
+$messages = array();
diff --git a/plugins/thunderbird_labels/localization/ca_ES.inc b/plugins/thunderbird_labels/localization/ca_ES.inc
new file mode 100644
index 000000000..d34c8efc8
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/ca_ES.inc
@@ -0,0 +1,17 @@
+<?php
+/**
+* Author:
+* Lluís Forns Puigmartí
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Etiquetes';
+$labels['label0'] = 'Cap etiqueta';
+$labels['label1'] = 'Important';
+$labels['label2'] = 'Feina';
+$labels['label3'] = 'Personal';
+$labels['label4'] = 'Per fer';
+$labels['label5'] = 'Més tard';
+
+$messages = array();
diff --git a/plugins/thunderbird_labels/localization/cs_CZ.inc b/plugins/thunderbird_labels/localization/cs_CZ.inc
new file mode 100644
index 000000000..d5fae12bb
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/cs_CZ.inc
@@ -0,0 +1,18 @@
+<?php
+/**
+* Author:
+* Miroslav Zidek
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Štítky Thunderbirdu';
+$labels['label0'] = 'Žádný štítek';
+$labels['label1'] = 'Důležité';
+$labels['label2'] = 'Pracovní';
+$labels['label3'] = 'Osobní';
+$labels['label4'] = 'Udělat';
+$labels['label5'] = 'Později';
+
+$messages = array();
+
diff --git a/plugins/thunderbird_labels/localization/de_DE.inc b/plugins/thunderbird_labels/localization/de_DE.inc
new file mode 100644
index 000000000..86473f60a
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/de_DE.inc
@@ -0,0 +1,18 @@
+<?php
+/**
+* Author:
+* Michael Kefeder
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Thunderbird Schlagwörter';
+$labels['label0'] = 'Alle Entfernen';
+$labels['label1'] = 'Wichtig';
+$labels['label2'] = 'Dienstlich';
+$labels['label3'] = 'Persönlich'; // grün
+$labels['label4'] = 'Zu Erledigen'; // blau
+$labels['label5'] = 'Später';
+
+$messages = array();
+
diff --git a/plugins/thunderbird_labels/localization/en_US.inc b/plugins/thunderbird_labels/localization/en_US.inc
new file mode 100644
index 000000000..2d4237e05
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/en_US.inc
@@ -0,0 +1,18 @@
+<?php
+/**
+* Author:
+* Michael Kefeder
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Thunderbird Labels';
+$labels['label0'] = 'No Label';
+$labels['label1'] = 'Important';
+$labels['label2'] = 'Work';
+$labels['label3'] = 'Personal';
+$labels['label4'] = 'To Do';
+$labels['label5'] = 'Later';
+
+$messages = array();
+
diff --git a/plugins/thunderbird_labels/localization/fr_FR.inc b/plugins/thunderbird_labels/localization/fr_FR.inc
new file mode 100644
index 000000000..e50690a2a
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/fr_FR.inc
@@ -0,0 +1,17 @@
+<?php
+/**
+* Author:
+* Michael Kefeder
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+
+$labels['label'] = 'Thunderbird Etiquettes';
+$labels['label0'] = 'Enlever toutes les &eacute;tiquettes';
+$labels['label1'] = 'Important';
+$labels['label2'] = 'Travail';
+$labels['label3'] = 'Personnel';
+$labels['label4'] = 'A faire';
+$labels['label5'] = 'Plus tard';
+
diff --git a/plugins/thunderbird_labels/localization/hu_HU.inc b/plugins/thunderbird_labels/localization/hu_HU.inc
new file mode 100644
index 000000000..eb450d899
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/hu_HU.inc
@@ -0,0 +1,18 @@
+<?php
+/**
+* Author:
+* Daniel P.
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Thunderbird Cimkék';
+$labels['label0'] = 'Minden cimke törlése';
+$labels['label1'] = 'Fontos';
+$labels['label2'] = 'Munka';
+$labels['label3'] = 'Személyes';
+$labels['label4'] = 'Teendők';
+$labels['label5'] = 'Később';
+
+$messages = array();
+
diff --git a/plugins/thunderbird_labels/localization/lv_LV.inc b/plugins/thunderbird_labels/localization/lv_LV.inc
new file mode 100644
index 000000000..00d557c7b
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/lv_LV.inc
@@ -0,0 +1,17 @@
+<?php
+/**
+* Author:
+* Artem Ushakov
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Vēstules atzīme';
+$labels['label0'] = 'Izdzēst visas atzīmes';
+$labels['label1'] = 'Svarīgs';
+$labels['label2'] = 'Darba';
+$labels['label3'] = 'Personāls';
+$labels['label4'] = 'Izpildei';
+$labels['label5'] = 'Atlikts';
+
+$messages = array();
diff --git a/plugins/thunderbird_labels/localization/pl_PL.inc b/plugins/thunderbird_labels/localization/pl_PL.inc
new file mode 100644
index 000000000..52284a802
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/pl_PL.inc
@@ -0,0 +1,18 @@
+<?php
+/**
+* Author:
+* master771
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Etykiety';
+$labels['label0'] = 'Brak';
+$labels['label1'] = 'Ważne';
+$labels['label2'] = 'Praca';
+$labels['label3'] = 'Osobiste';
+$labels['label4'] = 'Do zrobienia';
+$labels['label5'] = 'Później';
+
+$messages = array();
+
diff --git a/plugins/thunderbird_labels/localization/ru_RU.inc b/plugins/thunderbird_labels/localization/ru_RU.inc
new file mode 100644
index 000000000..d3bfa3220
--- /dev/null
+++ b/plugins/thunderbird_labels/localization/ru_RU.inc
@@ -0,0 +1,18 @@
+<?php
+/**
+* Author:
+* Николай Николай
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*/
+
+$labels = array();
+$labels['label'] = 'Метка Thunderbird';
+$labels['label0'] = 'Удалить все метки';
+$labels['label1'] = 'Важное';
+$labels['label2'] = 'Рабочее';
+$labels['label3'] = 'Личное';
+$labels['label4'] = 'К исполнению';
+$labels['label5'] = 'Отложено';
+
+$messages = array();
+
diff --git a/plugins/thunderbird_labels/skins/classic/tb_label.css b/plugins/thunderbird_labels/skins/classic/tb_label.css
new file mode 100644
index 000000000..3daf6a793
--- /dev/null
+++ b/plugins/thunderbird_labels/skins/classic/tb_label.css
@@ -0,0 +1,183 @@
+/**
+* Author:
+* Michael Kefeder
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*
+* CSS is Based on a patch for roundcube 0.3 I found a long time ago
+*/
+
+#tb_label_popuplink {
+ background-image: url(thunderbird_32.png);
+ background-repeat: no-repeat;
+ width: 32px;
+ height: 32px;
+ padding: 0px;
+ margin: 0px 5px 0px 5px;
+}
+
+#tb_label_popup
+{
+ width: auto;
+ position: absolute;
+}
+
+#tb_label_popup a.active
+{
+ color: inherit; /* fix for firefox */
+}
+
+.toolbarmenu li.label0 a
+{
+ color: #CCC;
+}
+.toolbarmenu li.label0,
+.toolbarmenu li.label0 a.active
+{
+ color: #333;
+}
+.toolbarmenu li.label1 a
+{
+ color: #FCC;
+}
+.toolbarmenu li.label2 a
+{
+ color: #FC3;
+}
+.toolbarmenu li.label3 a
+{
+ color: #3C3;
+}
+.toolbarmenu li.label4 a
+{
+ color: #99F;
+}
+.toolbarmenu li.label5 a
+{
+ color: #C9C;
+}
+/* Colors for single/preview message window headers display */
+table.label1
+{
+ background-color: #FCC;
+}
+table.label2
+{
+ background-color: #FC3;
+}
+table.label3
+{
+ background-color: #3C3;
+}
+table.label4
+{
+ background-color: #99F;
+}
+table.label5
+{
+ background-color: #C9C;
+}
+
+/* Support for Thunderbird label: definition of the 5 label color */
+/* Unselected (unfocused) messages */
+#messagelist tr.label1 td,
+#messagelist tr.label1 td a,
+.toolbarmenu li.label1,
+.toolbarmenu li.label1 a.active
+{
+ color: #FF0000;
+}
+
+#messagelist tr.label2 td,
+#messagelist tr.label2 td a,
+.toolbarmenu li.label2,
+.toolbarmenu li.label2 a.active
+{
+ color: #FF9900;
+}
+
+#messagelist tr.label3 td,
+#messagelist tr.label3 td a,
+.toolbarmenu li.label3,
+.toolbarmenu li.label3 a.active
+{
+ color: #009900;
+}
+
+#messagelist tr.label4 td,
+#messagelist tr.label4 td a,
+.toolbarmenu li.label4,
+.toolbarmenu li.label4 a.active
+{
+ color: #3333FF;
+}
+
+#messagelist tr.label5 td,
+#messagelist tr.label5 td a,
+.toolbarmenu li.label5,
+.toolbarmenu li.label5 a.active
+{
+ color: #993399;
+}
+
+/* Selected messages */
+#messagelist tr.selected.label1 td,
+#messagelist tr.selected.label1 td a
+{
+ color: #FFFFFF;
+ background-color: #FF0000;
+}
+
+#messagelist tr.selected.label2 td,
+#messagelist tr.selected.label2 td a
+{
+ color: #FFFFFF;
+ background-color: #FF9900;
+}
+
+#messagelist tr.selected.label3 td,
+#messagelist tr.selected.label3 td a
+{
+ color: #FFFFFF;
+ background-color: #009900;
+}
+
+#messagelist tr.selected.label4 td,
+#messagelist tr.selected.label4 td a
+{
+ color: #FFFFFF;
+ background-color: #3333FF;
+}
+
+#messagelist tr.selected.label5 td,
+#messagelist tr.selected.label5 td a
+{
+ color: #FFFFFF;
+ background-color: #993399;
+}
+
+/* Non-labeled selected message: changed to make it look "like" Thunderbird */
+/*#messagelist tr.selected td
+{
+ color: #000000;
+ background-color: #F0CB82;
+}
+*/
+/* Addition for selected RCM "flagged" message */
+/*#messagelist tr.selected.flagged td
+{
+ color: #FFFFFF;
+ background-color: #CC3333;
+}
+*/
+/* Non specific message : changed to make it look like Thunderbird */
+/*#messagelist tr.selected td a
+{
+ color: #000000;
+}
+*/
+/* Addition for selected RCM "flagged" message */
+/*#messagelist tr.selected.flagged td a
+{
+ color: #FFFFFF;
+}
+*/
diff --git a/plugins/thunderbird_labels/skins/classic/thunderbird_32.png b/plugins/thunderbird_labels/skins/classic/thunderbird_32.png
new file mode 100644
index 000000000..b51af5e04
--- /dev/null
+++ b/plugins/thunderbird_labels/skins/classic/thunderbird_32.png
Binary files differ
diff --git a/plugins/thunderbird_labels/skins/default/tb_label.css b/plugins/thunderbird_labels/skins/default/tb_label.css
new file mode 100644
index 000000000..3daf6a793
--- /dev/null
+++ b/plugins/thunderbird_labels/skins/default/tb_label.css
@@ -0,0 +1,183 @@
+/**
+* Author:
+* Michael Kefeder
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*
+* CSS is Based on a patch for roundcube 0.3 I found a long time ago
+*/
+
+#tb_label_popuplink {
+ background-image: url(thunderbird_32.png);
+ background-repeat: no-repeat;
+ width: 32px;
+ height: 32px;
+ padding: 0px;
+ margin: 0px 5px 0px 5px;
+}
+
+#tb_label_popup
+{
+ width: auto;
+ position: absolute;
+}
+
+#tb_label_popup a.active
+{
+ color: inherit; /* fix for firefox */
+}
+
+.toolbarmenu li.label0 a
+{
+ color: #CCC;
+}
+.toolbarmenu li.label0,
+.toolbarmenu li.label0 a.active
+{
+ color: #333;
+}
+.toolbarmenu li.label1 a
+{
+ color: #FCC;
+}
+.toolbarmenu li.label2 a
+{
+ color: #FC3;
+}
+.toolbarmenu li.label3 a
+{
+ color: #3C3;
+}
+.toolbarmenu li.label4 a
+{
+ color: #99F;
+}
+.toolbarmenu li.label5 a
+{
+ color: #C9C;
+}
+/* Colors for single/preview message window headers display */
+table.label1
+{
+ background-color: #FCC;
+}
+table.label2
+{
+ background-color: #FC3;
+}
+table.label3
+{
+ background-color: #3C3;
+}
+table.label4
+{
+ background-color: #99F;
+}
+table.label5
+{
+ background-color: #C9C;
+}
+
+/* Support for Thunderbird label: definition of the 5 label color */
+/* Unselected (unfocused) messages */
+#messagelist tr.label1 td,
+#messagelist tr.label1 td a,
+.toolbarmenu li.label1,
+.toolbarmenu li.label1 a.active
+{
+ color: #FF0000;
+}
+
+#messagelist tr.label2 td,
+#messagelist tr.label2 td a,
+.toolbarmenu li.label2,
+.toolbarmenu li.label2 a.active
+{
+ color: #FF9900;
+}
+
+#messagelist tr.label3 td,
+#messagelist tr.label3 td a,
+.toolbarmenu li.label3,
+.toolbarmenu li.label3 a.active
+{
+ color: #009900;
+}
+
+#messagelist tr.label4 td,
+#messagelist tr.label4 td a,
+.toolbarmenu li.label4,
+.toolbarmenu li.label4 a.active
+{
+ color: #3333FF;
+}
+
+#messagelist tr.label5 td,
+#messagelist tr.label5 td a,
+.toolbarmenu li.label5,
+.toolbarmenu li.label5 a.active
+{
+ color: #993399;
+}
+
+/* Selected messages */
+#messagelist tr.selected.label1 td,
+#messagelist tr.selected.label1 td a
+{
+ color: #FFFFFF;
+ background-color: #FF0000;
+}
+
+#messagelist tr.selected.label2 td,
+#messagelist tr.selected.label2 td a
+{
+ color: #FFFFFF;
+ background-color: #FF9900;
+}
+
+#messagelist tr.selected.label3 td,
+#messagelist tr.selected.label3 td a
+{
+ color: #FFFFFF;
+ background-color: #009900;
+}
+
+#messagelist tr.selected.label4 td,
+#messagelist tr.selected.label4 td a
+{
+ color: #FFFFFF;
+ background-color: #3333FF;
+}
+
+#messagelist tr.selected.label5 td,
+#messagelist tr.selected.label5 td a
+{
+ color: #FFFFFF;
+ background-color: #993399;
+}
+
+/* Non-labeled selected message: changed to make it look "like" Thunderbird */
+/*#messagelist tr.selected td
+{
+ color: #000000;
+ background-color: #F0CB82;
+}
+*/
+/* Addition for selected RCM "flagged" message */
+/*#messagelist tr.selected.flagged td
+{
+ color: #FFFFFF;
+ background-color: #CC3333;
+}
+*/
+/* Non specific message : changed to make it look like Thunderbird */
+/*#messagelist tr.selected td a
+{
+ color: #000000;
+}
+*/
+/* Addition for selected RCM "flagged" message */
+/*#messagelist tr.selected.flagged td a
+{
+ color: #FFFFFF;
+}
+*/
diff --git a/plugins/thunderbird_labels/skins/default/thunderbird_32.png b/plugins/thunderbird_labels/skins/default/thunderbird_32.png
new file mode 100644
index 000000000..b51af5e04
--- /dev/null
+++ b/plugins/thunderbird_labels/skins/default/thunderbird_32.png
Binary files differ
diff --git a/plugins/thunderbird_labels/skins/larry/tb_label.css b/plugins/thunderbird_labels/skins/larry/tb_label.css
new file mode 100644
index 000000000..1c6936cd7
--- /dev/null
+++ b/plugins/thunderbird_labels/skins/larry/tb_label.css
@@ -0,0 +1,170 @@
+/**
+* Author:
+* Michael Kefeder
+* http://code.google.com/p/rcmail-thunderbird-labels/
+*
+* CSS is Based on a patch for roundcube 0.3 I found a long time ago
+*/
+
+#tb_label_popuplink {
+ background-image: url(thunderbird_32.png);
+ /*background-repeat: repeat;*/
+ background-position: 50% 0px;
+ width: 32px;
+ height: 13px;
+ padding: 28px 2px 0px 2px;
+ margin: 0px 5px 0px 5px;
+}
+
+#tb_label_popup
+{
+ width: auto;
+ position: absolute;
+}
+
+#tb_label_popup a.active
+{
+ color: inherit; /* fix for firefox */
+}
+
+.toolbarmenu li.label0,
+.toolbarmenu li.label0 a.active
+{
+ color: #EEE;
+}
+/* Colors for single/preview message window headers display */
+table.label1
+{
+ background-color: #FCC;
+}
+table.label2
+{
+ background-color: #FC3;
+}
+table.label3
+{
+ background-color: #3C3;
+}
+table.label4
+{
+ background-color: #99F;
+}
+table.label5
+{
+ background-color: #C9C;
+}
+
+/* Support for Thunderbird label: definition of the 5 label color */
+/* Unselected (unfocused) messages */
+#messagelist tr.label1 td,
+#messagelist tr.label1 td a,
+.toolbarmenu li.label1,
+.toolbarmenu li.label1 a.active
+{
+ color: #FF0000;
+}
+
+#messagelist tr.label2 td,
+#messagelist tr.label2 td a,
+.toolbarmenu li.label2,
+.toolbarmenu li.label2 a.active
+{
+ color: #FF9900;
+}
+
+#messagelist tr.label3 td,
+#messagelist tr.label3 td a,
+.toolbarmenu li.label3,
+.toolbarmenu li.label3 a.active
+{
+ color: #009900;
+}
+
+#messagelist tr.label4 td,
+#messagelist tr.label4 td a
+{
+ color: #3333FF;
+}
+
+/* lighter blue for dark-grey popup... */
+.toolbarmenu li.label4,
+.toolbarmenu li.label4 a.active
+{
+ color: #0CF;
+}
+
+#messagelist tr.label5 td,
+#messagelist tr.label5 td a
+{
+ color: #993399;
+}
+
+/* lighter purple for dark-grey popup... */
+.toolbarmenu li.label5,
+.toolbarmenu li.label5 a.active
+{
+ color: #B6F;
+}
+
+/* Selected messages */
+#messagelist tr.selected.label1 td,
+#messagelist tr.selected.label1 td a
+{
+ color: #FFFFFF;
+ background-color: #FF0000;
+}
+
+#messagelist tr.selected.label2 td,
+#messagelist tr.selected.label2 td a
+{
+ color: #FFFFFF;
+ background-color: #FF9900;
+}
+
+#messagelist tr.selected.label3 td,
+#messagelist tr.selected.label3 td a
+{
+ color: #FFFFFF;
+ background-color: #009900;
+}
+
+#messagelist tr.selected.label4 td,
+#messagelist tr.selected.label4 td a
+{
+ color: #FFFFFF;
+ background-color: #3333FF;
+}
+
+#messagelist tr.selected.label5 td,
+#messagelist tr.selected.label5 td a
+{
+ color: #FFFFFF;
+ background-color: #993399;
+}
+
+/* Non-labeled selected message: changed to make it look "like" Thunderbird */
+/*#messagelist tr.selected td
+{
+ color: #000000;
+ background-color: #F0CB82;
+}
+*/
+/* Addition for selected RCM "flagged" message */
+/*#messagelist tr.selected.flagged td
+{
+ color: #FFFFFF;
+ background-color: #CC3333;
+}
+*/
+/* Non specific message : changed to make it look like Thunderbird */
+/*#messagelist tr.selected td a
+{
+ color: #000000;
+}
+*/
+/* Addition for selected RCM "flagged" message */
+/*#messagelist tr.selected.flagged td a
+{
+ color: #FFFFFF;
+}
+*/
diff --git a/plugins/thunderbird_labels/skins/larry/thunderbird_32.png b/plugins/thunderbird_labels/skins/larry/thunderbird_32.png
new file mode 100644
index 000000000..c8254dd65
--- /dev/null
+++ b/plugins/thunderbird_labels/skins/larry/thunderbird_32.png
Binary files differ
diff --git a/plugins/thunderbird_labels/tb_label.js b/plugins/thunderbird_labels/tb_label.js
new file mode 100644
index 000000000..a9239f30f
--- /dev/null
+++ b/plugins/thunderbird_labels/tb_label.js
@@ -0,0 +1,369 @@
+/**
+ * Version:
+ * $Revision: 26 $
+ * Author:
+ * Michael Kefeder
+ * http://code.google.com/p/rcmail-thunderbird-labels/
+ */
+
+// global variable for contextmenu actions
+rcmail.tb_label_no = '';
+
+function rcmail_tb_label_menu(p)
+{
+ if (typeof rcmail_ui == "undefined")
+ rcmail_ui = UI;
+ if (!rcmail_ui.check_tb_popup())
+ rcmail_ui.tb_label_popup_add();
+
+ // Show the popup menu with tags
+ // -- skin larry vs classic
+ if (typeof rcmail_ui.show_popupmenu == "undefined")
+ rcmail_ui.show_popup('tb_label_popup');
+ else
+ rcmail_ui.show_popupmenu('tb_label_popup');
+
+ return false;
+}
+
+/**
+* Shows the colors based on flag info like in Thunderbird
+*/
+function rcm_tb_label_insert(uid, row)
+{
+ var message = rcmail.env.messages[uid];
+
+ if (message.flags && message.flags.tb_labels)
+ {
+ var rowobj = $(row.obj);
+ for (idx in message.flags.tb_labels)
+ rowobj.addClass('label' + message.flags.tb_labels[idx]);
+ }
+}
+
+/**
+* Shows the submenu of thunderbird labels
+*/
+function rcm_tb_label_submenu(p)
+{
+ if (typeof rcmail_ui == "undefined")
+ rcmail_ui = UI;
+ // setup onclick and active/non active classes
+ rcm_tb_label_create_popupmenu();
+
+ // -- create sensible popup, using roundcubes internals
+ if (!rcmail_ui.check_tb_popup())
+ rcmail_ui.tb_label_popup_add();
+ // -- skin larry vs classic
+ if (typeof rcmail_ui.show_popupmenu == "undefined")
+ rcmail_ui.show_popup('tb_label_popup');
+ else
+ rcmail_ui.show_popupmenu('tb_label_popup');
+ return false;
+}
+
+function rcm_tb_label_flag_toggle(flag_uids, toggle_label_no, onoff)
+{
+ var headers_table = $('table.headers-table');
+ var preview_frame = $('#messagecontframe');
+ // preview frame exists, simulate environment of single message view
+ if (preview_frame.length)
+ {
+ tb_labels_for_message = preview_frame.get(0).contentWindow.tb_labels_for_message;
+ headers_table = preview_frame.contents().find('table.headers-table');
+ }
+
+ if (!rcmail.message_list
+ && !headers_table)
+ return;
+ // for single message view
+ if (headers_table.length && flag_uids.length)
+ {
+ if (onoff == true)
+ {
+ // add color
+ headers_table.addClass('label'+toggle_label_no);
+ // add to flag list
+ tb_labels_for_message.push(toggle_label_no);
+ }
+ else
+ {
+ // remove color
+ headers_table.removeClass('label'+toggle_label_no);
+ var pos = jQuery.inArray(toggle_label_no, tb_labels_for_message);
+ if (pos > -1)
+ tb_labels_for_message.splice(pos, 1);
+ }
+ // exit function when in detail mode. when preview is active keep going
+ if (!rcmail.env.messages)
+ return;
+ }
+ jQuery.each(flag_uids, function (idx, uid) {
+ var message = rcmail.env.messages[uid];
+ var row = rcmail.message_list.rows[uid];
+ if (onoff == true)
+ {
+ // add colors
+ var rowobj = $(row.obj);
+ rowobj.addClass('label'+toggle_label_no);
+ // add to flag list
+ message.flags.tb_labels.push(toggle_label_no);
+ }
+ else
+ {
+ // remove colors
+ var rowobj = $(row.obj);
+ rowobj.removeClass('label'+toggle_label_no);
+ // remove from flag list
+ var pos = jQuery.inArray(toggle_label_no, message.flags.tb_labels);
+ if (pos > -1)
+ message.flags.tb_labels.splice(pos, 1);
+ }
+ });
+}
+
+function rcm_tb_label_flag_msgs(flag_uids, toggle_label_no)
+{
+ rcm_tb_label_flag_toggle(flag_uids, toggle_label_no, true);
+}
+
+function rcm_tb_label_unflag_msgs(unflag_uids, toggle_label_no)
+{
+ rcm_tb_label_flag_toggle(unflag_uids, toggle_label_no, false);
+}
+
+// helper function to get selected/active messages
+function rcm_tb_label_get_selection()
+{
+ var selection = rcmail.message_list ? rcmail.message_list.get_selection() : [];
+ if (selection.length == 0 && rcmail.env.uid)
+ selection = [rcmail.env.uid, ];
+ return selection;
+}
+
+function rcm_tb_label_create_popupmenu()
+{
+ for (i = 0; i < 6; i++)
+ {
+ var cur_a = $('li.label' + i +' a');
+
+ // add/remove active class
+ var selection = rcm_tb_label_get_selection();
+
+ if (selection.length == 0)
+ cur_a.removeClass('active');
+ else
+ cur_a.addClass('active');
+ }
+}
+
+function rcm_tb_label_init_onclick()
+{
+ for (i = 0; i < 6; i++)
+ {
+ var cur_a = $('#tb_label_popup li.label' + i +' a');
+
+ // TODO check if click event is defined instead of unbinding?
+ cur_a.unbind('click');
+ cur_a.click(function() {
+ var toggle_label = $(this).parent().attr('class');
+ var toggle_label_no = parseInt(toggle_label.replace('label', ''));
+ var selection = rcm_tb_label_get_selection();
+
+ if (!selection.length)
+ return;
+
+ var from = toggle_label_no;
+ var to = toggle_label_no + 1;
+ var unset_all = false;
+ // special case flag 0 means remove all flags
+ if (toggle_label_no == 0)
+ {
+ from = 1;
+ to = 6;
+ unset_all = true;
+ }
+ for (i = from; i < to; i++)
+ {
+ toggle_label = 'label' + i;
+ toggle_label_no = i;
+ // compile list of unflag and flag msgs and then send command
+ // Thunderbird modifies multiple message flags like it did the first in the selection
+ // e.g. first message has flag1, you click flag1, every message select loses flag1, the ones not having flag1 don't get it!
+ var first_toggle_mode = 'on';
+ if (rcmail.env.messages)
+ {
+ var first_message = rcmail.env.messages[selection[0]];
+ if (first_message.flags
+ && jQuery.inArray(toggle_label_no,
+ first_message.flags.tb_labels) >= 0
+ )
+ first_toggle_mode = 'off';
+ else
+ first_toggle_mode = 'on';
+ }
+ else // single message display
+ {
+ // flag already set?
+ if (jQuery.inArray(toggle_label_no,
+ tb_labels_for_message) >= 0)
+ first_toggle_mode = 'off';
+ }
+ var flag_uids = [];
+ var unflag_uids = [];
+ jQuery.each(selection, function (idx, uid) {
+ // message list not available (example: in detailview)
+ if (!rcmail.env.messages)
+ {
+ if (first_toggle_mode == 'on')
+ flag_uids.push(uid);
+ else
+ unflag_uids.push(uid);
+ // make sure for unset all there is the single message id
+ if (unset_all && unflag_uids.length == 0)
+ unflag_uids.push(uid);
+ return;
+ }
+ var message = rcmail.env.messages[uid];
+ if (message.flags
+ && jQuery.inArray(toggle_label_no,
+ message.flags.tb_labels) >= 0
+ )
+ {
+ if (first_toggle_mode == 'off')
+ unflag_uids.push(uid);
+ }
+ else
+ {
+ if (first_toggle_mode == 'on')
+ flag_uids.push(uid);
+ }
+ });
+
+ if (unset_all)
+ flag_uids = [];
+
+ // skip sending flags to backend that are not set anywhere
+ if (flag_uids.length == 0
+ && unflag_uids.length == 0)
+ continue;
+
+ var str_flag_uids = flag_uids.join(',');
+ var str_unflag_uids = unflag_uids.join(',');
+
+ var lock = rcmail.set_busy(true, 'loading');
+ rcmail.http_request('plugin.thunderbird_labels.set_flags', '_flag_uids=' + str_flag_uids + '&_unflag_uids=' + str_unflag_uids + '&_mbox=' + urlencode(rcmail.env.mailbox) + "&_toggle_label=" + toggle_label, lock);
+
+ // remove/add classes and tb labels from messages in JS
+ rcm_tb_label_flag_msgs(flag_uids, toggle_label_no);
+ rcm_tb_label_unflag_msgs(unflag_uids, toggle_label_no);
+ }
+ });
+ }
+}
+
+function rcmail_ctxm_label(command, el, pos)
+{
+ // my code works only on selected rows, contextmenu also on unselected
+ // so if no selection is available, use the uid set by contextmenu plugin
+ var selection = rcmail.message_list ? rcmail.message_list.get_selection() : [];
+
+ if (!selection.length && !rcmail.env.uid)
+ return;
+ if (!selection.length && rcmail.env.uid)
+ rcmail.message_list.select_row(rcmail.env.uid);
+
+ var cur_a = $('#tb_label_popup li.label' + rcmail.tb_label_no +' a');
+ if (cur_a)
+ {
+ cur_a.click();
+ }
+
+ return;
+}
+
+function rcmail_ctxm_label_set(which)
+{
+ // hack for my contextmenu submenu hack to propagate the selected label-no
+ rcmail.tb_label_no = which;
+}
+
+
+$(document).ready(function() {
+ rcm_tb_label_init_onclick();
+ // add keyboard shortcuts for normal keyboard and keypad
+ $(document).keyup(function(e) {
+ //console.log('Handler for .keyup() called.' + e.which);
+ var k = e.which;
+ if ((k > 47 && k < 58) || (k > 95 && k < 106))
+ {
+ var label_no = k % 48;
+ var cur_a = $('#tb_label_popup li.label' + label_no + ' a');
+
+ if (cur_a)
+ {
+ cur_a.click();
+ }
+ }
+ });
+
+ // if exists add contextmenu entries
+ if (window.rcm_contextmenu_register_command) {
+ rcm_contextmenu_register_command('ctxm_tb_label', rcmail_ctxm_label, $('#tb_label_ctxm_mainmenu'), 'moreacts', 'after', true);
+ }
+
+ // single message displayed?
+ if (window.tb_labels_for_message)
+ {
+ jQuery.each(tb_labels_for_message, function(idx, val)
+ {
+ rcm_tb_label_flag_msgs([-1,], val);
+ }
+ );
+ }
+
+ // add roundcube events
+ rcmail.addEventListener('insertrow', function(event) { rcm_tb_label_insert(event.uid, event.row); });
+
+ rcmail.addEventListener('init', function(evt) {
+ // create custom button, JS method, broken layout in Firefox 9 using PHP method now
+ /*var button = $('<A>').attr('href', '#').attr('id', 'tb_label_popuplink').attr('title', rcmail.gettext('label', 'thunderbird_labels')).html('');
+
+ button.bind('click', function(e) {
+ rcmail.command('plugin.thunderbird_labels.rcm_tb_label_submenu', this);
+ return false;
+ });
+
+ // add and register
+ rcmail.add_element(button, 'toolbar');
+ rcmail.register_button('plugin.thunderbird_labels.rcm_tb_label_submenu', 'tb_label_popuplink', 'link');
+ */
+ rcmail.register_command('plugin.thunderbird_labels.rcm_tb_label_submenu', rcm_tb_label_submenu, true);
+ });
+
+ // -- add my submenu to roundcubes UI (for roundcube classic only?)
+ if (window.rcube_mail_ui)
+ rcube_mail_ui.prototype.tb_label_popup_add = function() {
+ add = {
+ tb_label_popup: {id:'tb_label_popup'}
+ };
+ this.popups = $.extend(this.popups, add);
+ var obj = $('#'+this.popups.tb_label_popup.id);
+ if (obj.length)
+ this.popups.tb_label_popup.obj = obj;
+ else
+ delete this.popups.tb_label_popup;
+ };
+
+ if (window.rcube_mail_ui)
+ rcube_mail_ui.prototype.check_tb_popup = function() {
+ // larry skin doesn't have that variable, popup works automagically, return true
+ if (typeof this.popups == 'undefined')
+ return true;
+ if (this.popups.tb_label_popup)
+ return true;
+ else
+ return false;
+ };
+});
+
diff --git a/plugins/thunderbird_labels/thunderbird_labels.php b/plugins/thunderbird_labels/thunderbird_labels.php
new file mode 100644
index 000000000..e6487ae95
--- /dev/null
+++ b/plugins/thunderbird_labels/thunderbird_labels.php
@@ -0,0 +1,210 @@
+<?php
+/**
+ * Thunderbird Labels Plugin for Roundcube Webmail
+ *
+ * Plugin to show the 5 Message Labels Thunderbird Email-Client provides for IMAP
+ *
+ * @version $Revision: 24 $
+ * @author Michael Kefeder
+ * @url http://code.google.com/p/rcmail-thunderbird-labels/
+ */
+class thunderbird_labels extends rcube_plugin
+{
+ public $task = 'mail';
+ private $map;
+
+ function init()
+ {
+ $rcmail = rcmail::get_instance();
+ # -- disable plugin when printing message
+ if ($rcmail->action == 'print')
+ return;
+
+ $this->include_script('tb_label.js');
+ $this->add_texts('localization/', true);
+ $this->add_hook('messages_list', array($this, 'read_flags'));
+ $this->add_hook('message_load', array($this, 'read_single_flags'));
+ $this->add_hook('template_object_messageheaders', array($this, 'color_headers'));
+ $this->add_hook('render_page', array($this, 'tb_label_popup'));
+ $this->include_stylesheet($this->local_skin_path() . '/tb_label.css');
+
+ $this->name = get_class($this);
+ $this->prefs = array('show_labels' => true);
+ # -- additional TB flags
+ $this->add_tb_flags = array(
+ 'LABEL1' => '$Label1',
+ 'LABEL2' => '$Label2',
+ 'LABEL3' => '$Label3',
+ 'LABEL4' => '$Label4',
+ 'LABEL5' => '$Label5',
+ );
+ $this->message_tb_labels = array();
+
+ $this->add_button(
+ array(
+ 'command' => 'plugin.thunderbird_labels.rcm_tb_label_submenu',
+ 'id' => 'tb_label_popuplink',
+ 'title' => 'label', # gets translated
+ 'domain' => $this->ID,
+ 'type' => 'link',
+ 'content' => ' ', # maybe put translated version of "Labels" here?
+ 'class' => ($rcmail->config->get('skin') == 'larry') ? 'button' : 'tb_noclass',
+ ),
+ 'toolbar'
+ );
+
+ $this->register_action('plugin.thunderbird_labels.set_flags', array($this, 'set_flags'));
+
+
+ if (method_exists($this, 'require_plugin')
+ && in_array('contextmenu', $rcmail->config->get('plugins'))
+ && $this->require_plugin('contextmenu'))
+ {
+ if ($rcmail->action == '')
+ $this->add_hook('render_mailboxlist', array($this, 'show_tb_label_contextmenu'));
+ }
+ }
+
+ public function show_tb_label_contextmenu($args)
+ {
+ $rcmail = rcmail::get_instance();
+ $this->add_texts('localization/');
+ #$this->api->output->add_label('copymessage.copyingmessage');
+
+ $li = html::tag('li', array('class' => 'submenu'), Q($this->gettext('label')) . $this->_gen_label_submenu($args, 'tb_label_ctxm_submenu'));
+ $out .= html::tag('ul', array('id' => 'tb_label_ctxm_mainmenu'), $li);
+ $this->api->output->add_footer(html::div(array('style' => 'display: none;'), $out));
+ }
+
+ private function _gen_label_submenu($args, $id)
+ {
+ $rcmail = rcmail::get_instance();
+ $out = '';
+ for ($i = 0; $i < 6; $i++)
+ {
+ $separator = ($i == 0)? ' separator_below' :'';
+ $out .= '<li class="label'.$i.$separator.' ctxm_tb_label"><a href="#ctxm_tb_label" class="active" onclick="rcmail_ctxm_label_set('.$i.')">'.$i.' '.$this->gettext('label'.$i).'</a></li>';
+ }
+ $out = html::tag('ul', array('class' => 'popupmenu toolbarmenu folders', 'id' => $id), $out);
+ return $out;
+ }
+
+ public function read_single_flags($args)
+ {
+ #write_log($this->name, print_r(($args['object']), true));
+ if (!count($this->prefs)
+ or !isset($args['object'])
+ )
+ return;
+
+ if (is_array($args['object']->headers->flags))
+ {
+ $this->message_tb_labels = array();
+ foreach ($args['object']->headers->flags as $flagname => $flagvalue)
+ {
+ $flag = is_numeric("$flagvalue")? $flagname:$flagvalue;// for compatibility with < 0.5.4
+ $flag = strtolower($flag);
+ if (preg_match('/^\$?label/', $flag))
+ {
+ $flag_no = preg_replace('/^\$?label/', '', $flag);
+ #write_log($this->name, "Single message Flag: ".$flag." Flag_no:".$flag_no);
+ $this->message_tb_labels[] = (int)$flag_no;
+ }
+ }
+ }
+ # -- no return value for this hook
+ }
+
+ /**
+ * Writes labelnumbers for single message display
+ * Coloring of Message header table happens via Javascript
+ */
+ public function color_headers($p)
+ {
+ #write_log($this->name, print_r($p, true));
+ # -- always write array, even when empty
+ $p['content'] .= '<script type="text/javascript">
+ var tb_labels_for_message = ['.join(',', $this->message_tb_labels).'];
+ </script>';
+ return $p;
+ }
+
+ public function read_flags($args)
+ {
+ #write_log($this->name, print_r($args, true));
+ // add color information for all messages
+ #$rcmail = rcmail::get_instance();
+ #$this->prefs = $rcmail->config->get('thunderbird_labels', array());
+ // dont loop over all messages if we dont have any highlights or no msgs
+ if (!count($this->prefs)
+ or !isset($args['messages'])
+ or !is_array($args['messages']))
+ return $args;
+
+ // loop over all messages and add $LabelX info to the extra_flags
+ foreach($args['messages'] as $message)
+ {
+ #write_log($this->name, print_r($message->flags, true));
+ $message->list_flags['extra_flags']['tb_labels'] = array(); # always set extra_flags, needed for javascript later!
+ if (is_array($message->flags))
+ foreach ($message->flags as $flagname => $flagvalue)
+ {
+ $flag = is_numeric("$flagvalue")? $flagname:$flagvalue;// for compatibility with < 0.5.4
+ $flag = strtolower($flag);
+ if (preg_match('/^\$?label/', $flag))
+ {
+ $flag_no = preg_replace('/^\$?label/', '', $flag);
+ #write_log($this->name, "Flag:".$flag." Flag_no:".$flag_no);
+ $message->list_flags['extra_flags']['tb_labels'][] = (int)$flag_no;
+ }
+ }
+ }
+ return($args);
+ }
+
+ function set_flags()
+ {
+ #write_log($this->name, print_r($_GET, true));
+
+ $rcmail = rcmail::get_instance();
+ $imap = $rcmail->imap;
+ $cbox = get_input_value('_cur', RCUBE_INPUT_GET);
+ $mbox = get_input_value('_mbox', RCUBE_INPUT_GET);
+ $toggle_label = get_input_value('_toggle_label', RCUBE_INPUT_GET);
+ $flag_uids = get_input_value('_flag_uids', RCUBE_INPUT_GET);
+ $flag_uids = explode(',', $flag_uids);
+ $unflag_uids = get_input_value('_unflag_uids', RCUBE_INPUT_GET);
+ $unflag_uids = explode(',', $unflag_uids);
+
+ $imap->conn->flags = array_merge($imap->conn->flags, $this->add_tb_flags);
+
+ #write_log($this->name, print_r($flag_uids, true));
+ #write_log($this->name, print_r($unflag_uids, true));
+
+ if (!is_array($unflag_uids)
+ || !is_array($flag_uids))
+ return false;
+
+ $imap->set_flag($flag_uids, $toggle_label, $mbox);
+ $imap->set_flag($unflag_uids, "UN$toggle_label", $mbox);
+
+ $this->api->output->send();
+ }
+
+ function tb_label_popup()
+ {
+ $rcmail = rcmail::get_instance();
+ $out = '<div id="tb_label_popup" class="popupmenu">
+ <ul class="toolbarmenu">';
+ for ($i = 0; $i < 6; $i++)
+ {
+ $separator = ($i == 0)? ' separator_below' :'';
+ $out .= '<li class="label'.$i.$separator.'"><a href="#" class="active">'.$i.' '.$this->gettext('label'.$i).'</a></li>';
+ }
+ $out .= '</ul>
+ </div>';
+ $rcmail->output->add_gui_object('tb_label_popup_obj', 'tb_label_popup');
+ $rcmail->output->add_footer($out);
+ }
+}
+?>
diff --git a/plugins/userinfo/localization/ar.inc b/plugins/userinfo/localization/ar.inc
new file mode 100644
index 000000000..92d5194ee
--- /dev/null
+++ b/plugins/userinfo/localization/ar.inc
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'معلومات المستخدم';
+$labels['lastlogin'] = 'أخر تسجيل دخول';
+$labels['defaultidentity'] = 'الهوية الافتراضية';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/ast.inc b/plugins/userinfo/localization/ast.inc
new file mode 100644
index 000000000..179c5ba29
--- /dev/null
+++ b/plugins/userinfo/localization/ast.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'Información d\'usuariu';
+$labels['created'] = 'Creáu';
+$labels['lastlogin'] = 'Cabera conexón';
+$labels['defaultidentity'] = 'Identidá predeterminada';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/bg_BG.inc b/plugins/userinfo/localization/bg_BG.inc
new file mode 100644
index 000000000..078c89e4a
--- /dev/null
+++ b/plugins/userinfo/localization/bg_BG.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'Потребителска информация';
+$labels['created'] = 'Създаден';
+$labels['lastlogin'] = 'Последен вход';
+$labels['defaultidentity'] = 'Самоличност по подразбиране';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/el_GR.inc b/plugins/userinfo/localization/el_GR.inc
new file mode 100644
index 000000000..61fa25aa3
--- /dev/null
+++ b/plugins/userinfo/localization/el_GR.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'Πληροφορίες χρήστη ';
+$labels['created'] = 'Δημιουργηθηκε';
+$labels['lastlogin'] = 'Τελευταια συνδεση';
+$labels['defaultidentity'] = 'Προκαθορισμένη ταυτότητα';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/en_US.inc b/plugins/userinfo/localization/en_US.inc
index 01230de85..b269dd560 100644
--- a/plugins/userinfo/localization/en_US.inc
+++ b/plugins/userinfo/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/userinfo/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Userinfo plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/userinfo/localization/es_AR.inc b/plugins/userinfo/localization/es_AR.inc
new file mode 100644
index 000000000..fefbecef1
--- /dev/null
+++ b/plugins/userinfo/localization/es_AR.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'Información de usuario';
+$labels['created'] = 'Creado';
+$labels['lastlogin'] = 'Ultimo ingreso';
+$labels['defaultidentity'] = 'Identidad por defecto';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/eu_ES.inc b/plugins/userinfo/localization/eu_ES.inc
new file mode 100644
index 000000000..38cce04bd
--- /dev/null
+++ b/plugins/userinfo/localization/eu_ES.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'Erabiltzailearen informazioa';
+$labels['created'] = 'Sortua';
+$labels['lastlogin'] = 'Azken saioa';
+$labels['defaultidentity'] = 'Lehenetsitako identitatea';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/fa_AF.inc b/plugins/userinfo/localization/fa_AF.inc
new file mode 100644
index 000000000..8308a7f3c
--- /dev/null
+++ b/plugins/userinfo/localization/fa_AF.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'اطلاعات کاربر';
+$labels['created'] = 'ایجاد شد';
+$labels['lastlogin'] = 'آخرین ورود';
+$labels['defaultidentity'] = 'هویت پیش فرض';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/fr_FR.inc b/plugins/userinfo/localization/fr_FR.inc
index c830c587d..c830c587d 100755..100644
--- a/plugins/userinfo/localization/fr_FR.inc
+++ b/plugins/userinfo/localization/fr_FR.inc
diff --git a/plugins/userinfo/localization/lb_LU.inc b/plugins/userinfo/localization/lb_LU.inc
index d8394f6d8..db2e0c8c7 100644
--- a/plugins/userinfo/localization/lb_LU.inc
+++ b/plugins/userinfo/localization/lb_LU.inc
@@ -15,11 +15,8 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/
*/
-
-$labels = array();
$labels['userinfo'] = 'Benotzer-Info';
$labels['created'] = 'Erstallt';
$labels['lastlogin'] = 'Leschte Login';
$labels['defaultidentity'] = 'Standard-Identitéit';
-
?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/ro_RO.inc b/plugins/userinfo/localization/ro_RO.inc
index 25c4d1059..2f96f849b 100755..100644
--- a/plugins/userinfo/localization/ro_RO.inc
+++ b/plugins/userinfo/localization/ro_RO.inc
@@ -17,9 +17,9 @@
*/
$labels = array();
-$labels['userinfo'] = 'Informatii utilisator';
-$labels['created'] = 'Data creatiei';
-$labels['lastlogin'] = 'Ultima conectare';
-$labels['defaultidentity'] = 'Identitate principala';
+$labels['userinfo'] = 'Informații utilizator';
+$labels['created'] = 'Data creării';
+$labels['lastlogin'] = 'Ultima autentificare';
+$labels['defaultidentity'] = 'Identitate principală';
?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/ti.inc b/plugins/userinfo/localization/ti.inc
new file mode 100644
index 000000000..3799f66e4
--- /dev/null
+++ b/plugins/userinfo/localization/ti.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo 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-userinfo/
+*/
+$labels['userinfo'] = 'ሓብሬታ በዓል ዋና ';
+$labels['created'] = 'እዋን ፍጥረት';
+$labels['lastlogin'] = 'እዋን እታው';
+$labels['defaultidentity'] = 'ዘይተለወጠ መለለይ መንነት';
+?> \ No newline at end of file
diff --git a/plugins/userinfo/userinfo.php b/plugins/userinfo/userinfo.php
index a175563ef..efb65f51d 100644
--- a/plugins/userinfo/userinfo.php
+++ b/plugins/userinfo/userinfo.php
@@ -31,25 +31,25 @@ class userinfo extends rcube_plugin
$table = new html_table(array('cols' => 2, 'cellpadding' => 3));
$table->add('title', 'ID');
- $table->add('', rcube::Q($user->ID));
+ $table->add('', Q($user->ID));
- $table->add('title', rcube::Q($this->gettext('username')));
- $table->add('', rcube::Q($user->data['username']));
+ $table->add('title', Q($this->gettext('username')));
+ $table->add('', Q($user->data['username']));
- $table->add('title', rcube::Q($this->gettext('server')));
- $table->add('', rcube::Q($user->data['mail_host']));
+ $table->add('title', Q($this->gettext('server')));
+ $table->add('', Q($user->data['mail_host']));
- $table->add('title', rcube::Q($this->gettext('created')));
- $table->add('', rcube::Q($user->data['created']));
+ $table->add('title', Q($this->gettext('created')));
+ $table->add('', Q($user->data['created']));
- $table->add('title', rcube::Q($this->gettext('lastlogin')));
- $table->add('', rcube::Q($user->data['last_login']));
+ $table->add('title', Q($this->gettext('lastlogin')));
+ $table->add('', Q($user->data['last_login']));
$identity = $user->get_identity();
- $table->add('title', rcube::Q($this->gettext('defaultidentity')));
- $table->add('', rcube::Q($identity['name'] . ' <' . $identity['email'] . '>'));
+ $table->add('title', Q($this->gettext('defaultidentity')));
+ $table->add('', Q($identity['name'] . ' <' . $identity['email'] . '>'));
- return html::tag('h4', null, rcube::Q('Infos for ' . $user->get_username())) . $table->show();
+ return html::tag('h4', null, Q('Infos for ' . $user->get_username())) . $table->show();
}
}
diff --git a/plugins/vcard_attachments/localization/ar.inc b/plugins/vcard_attachments/localization/ar.inc
new file mode 100644
index 000000000..2d40d9bba
--- /dev/null
+++ b/plugins/vcard_attachments/localization/ar.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/vcard_attachments/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Vcard Attachments 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-vcard_attachments/
+*/
+$labels['addvcardmsg'] = 'إضافة vCard إلى دفتر العناوين';
+$labels['vcardsavefailed'] = 'غير قادر على حفظ بصيغة vCard';
+?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/ar_SA.inc b/plugins/vcard_attachments/localization/ar_SA.inc
new file mode 100644
index 000000000..47461898d
--- /dev/null
+++ b/plugins/vcard_attachments/localization/ar_SA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/vcard_attachments/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Vcard Attachments 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-vcard_attachments/
+*/
+$labels['addvcardmsg'] = 'إضافة صيغة vCard إلى دفتر العناوين';
+$labels['vcardsavefailed'] = 'غير قادر على الحفظ بصيغة vCard';
+?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/bg_BG.inc b/plugins/vcard_attachments/localization/bg_BG.inc
new file mode 100644
index 000000000..7e0b174e9
--- /dev/null
+++ b/plugins/vcard_attachments/localization/bg_BG.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/vcard_attachments/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Vcard Attachments 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-vcard_attachments/
+*/
+$labels['addvcardmsg'] = 'Добавяне на vCard към адресната книга';
+$labels['vcardsavefailed'] = 'Невъзможен запис на vCard';
+?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/el_GR.inc b/plugins/vcard_attachments/localization/el_GR.inc
new file mode 100644
index 000000000..a59f6f556
--- /dev/null
+++ b/plugins/vcard_attachments/localization/el_GR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/vcard_attachments/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Vcard Attachments 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-vcard_attachments/
+*/
+$labels['addvcardmsg'] = 'Προσθήκη vCard στο βιβλίο διευθύνσεων';
+$labels['vcardsavefailed'] = 'Δεν είναι δυνατή η αποθήκευση του vCard';
+?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/en_US.inc b/plugins/vcard_attachments/localization/en_US.inc
index a52a93228..02eed29ea 100644
--- a/plugins/vcard_attachments/localization/en_US.inc
+++ b/plugins/vcard_attachments/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/vcard_attachments/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Vcard Attachments plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/vcard_attachments/localization/es_AR.inc b/plugins/vcard_attachments/localization/es_AR.inc
new file mode 100644
index 000000000..ee2f0c84b
--- /dev/null
+++ b/plugins/vcard_attachments/localization/es_AR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/vcard_attachments/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Vcard Attachments 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-vcard_attachments/
+*/
+$labels['addvcardmsg'] = 'Agregar vCard a la libreta de direcciones';
+$labels['vcardsavefailed'] = 'Imposible guardar vCard';
+?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/eu_ES.inc b/plugins/vcard_attachments/localization/eu_ES.inc
new file mode 100644
index 000000000..f60ac6efa
--- /dev/null
+++ b/plugins/vcard_attachments/localization/eu_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/vcard_attachments/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Vcard Attachments 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-vcard_attachments/
+*/
+$labels['addvcardmsg'] = 'Gehitu vCard helbide-liburura';
+$labels['vcardsavefailed'] = 'Ezin da vCard gorde';
+?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/gl_ES.inc b/plugins/vcard_attachments/localization/gl_ES.inc
index 806f6bb7d..b502c85c7 100644
--- a/plugins/vcard_attachments/localization/gl_ES.inc
+++ b/plugins/vcard_attachments/localization/gl_ES.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['addvcardmsg'] = 'Engadir vCard ao caderno de enderezos';
-$labels['vcardsavefailed'] = 'Non foi posible gardar a vCard';
+$labels['addvcardmsg'] = 'Engadir a tarxeta ao caderno de enderezos';
+$labels['vcardsavefailed'] = 'Non foi posible gardar a tarxeta';
?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/lb_LU.inc b/plugins/vcard_attachments/localization/lb_LU.inc
index b9d23eaa5..005650fd7 100644
--- a/plugins/vcard_attachments/localization/lb_LU.inc
+++ b/plugins/vcard_attachments/localization/lb_LU.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/
*/
-
-$labels = array();
$labels['addvcardmsg'] = 'vCard an d\'Adressbuch setzen';
$labels['vcardsavefailed'] = 'vCard kann net gespäichert ginn';
-
?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/vcard_attachments.php b/plugins/vcard_attachments/vcard_attachments.php
index cf7e22d3a..e7f7d5f1f 100644
--- a/plugins/vcard_attachments/vcard_attachments.php
+++ b/plugins/vcard_attachments/vcard_attachments.php
@@ -45,7 +45,7 @@ class vcard_attachments extends rcube_plugin
}
}
// the same with message bodies
- foreach ((array)$this->message->parts as $part) {
+ foreach ((array)$this->message->parts as $idx => $part) {
if ($this->is_vcard($part)) {
$this->vcard_parts[] = $part->mime_id;
$this->vcard_bodies[] = $part->mime_id;
@@ -63,6 +63,7 @@ class vcard_attachments extends rcube_plugin
function html_output($p)
{
$attach_script = false;
+ $icon = 'plugins/vcard_attachments/' .$this->local_skin_path(). '/vcard_add_contact.png';
foreach ($this->vcard_parts as $part) {
$vcards = rcube_vcard::import($this->message->get_part_content($part, null, true));
@@ -89,10 +90,10 @@ class vcard_attachments extends rcube_plugin
$p['content'] .= html::p(array('class' => 'vcardattachment'),
html::a(array(
'href' => "#",
- 'onclick' => "return plugin_vcard_save_contact('" . rcube::JQ($part.':'.$idx) . "')",
+ 'onclick' => "return plugin_vcard_save_contact('" . JQ($part.':'.$idx) . "')",
'title' => $this->gettext('addvcardmsg'),
),
- html::span(null, rcube::Q($display)))
+ html::span(null, Q($display)))
);
}
@@ -114,9 +115,9 @@ class vcard_attachments extends rcube_plugin
{
$this->add_texts('localization', true);
- $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
- $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
- $mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST);
+ $uid = get_input_value('_uid', RCUBE_INPUT_POST);
+ $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
+ $mime_id = get_input_value('_part', RCUBE_INPUT_POST);
$rcmail = rcmail::get_instance();
$storage = $rcmail->get_storage();
@@ -143,7 +144,7 @@ class vcard_attachments extends rcube_plugin
}
else {
// We're using UTF8 internally
- $email = rcube_utils::idn_to_utf8($email);
+ $email = rcube_idn_to_utf8($email);
// compare e-mail address
$existing = $CONTACTS->search('email', $email, 1, false);
diff --git a/plugins/virtuser_file/virtuser_file.php b/plugins/virtuser_file/virtuser_file.php
index f2b357aaf..01032616c 100644
--- a/plugins/virtuser_file/virtuser_file.php
+++ b/plugins/virtuser_file/virtuser_file.php
@@ -3,10 +3,10 @@
/**
* File based User-to-Email and Email-to-User lookup
*
- * Add it to the plugins list in config.inc.php and set
+ * Add it to the plugins list in config/main.inc.php and set
* path to a virtuser table file to resolve user names and e-mail
* addresses
- * $rcmail['virtuser_file'] = '';
+ * $rcmail_config['virtuser_file'] = '';
*
* @version @package_version@
* @license GNU GPLv3+
@@ -19,13 +19,13 @@ class virtuser_file extends rcube_plugin
function init()
{
- $this->app = rcmail::get_instance();
- $this->file = $this->app->config->get('virtuser_file');
+ $this->app = rcmail::get_instance();
+ $this->file = $this->app->config->get('virtuser_file');
- if ($this->file) {
- $this->add_hook('user2email', array($this, 'user2email'));
- $this->add_hook('email2user', array($this, 'email2user'));
- }
+ if ($this->file) {
+ $this->add_hook('user2email', array($this, 'user2email'));
+ $this->add_hook('email2user', array($this, 'email2user'));
+ }
}
/**
@@ -34,24 +34,25 @@ class virtuser_file extends rcube_plugin
function user2email($p)
{
$r = $this->findinvirtual('/\s' . preg_quote($p['user'], '/') . '\s*$/');
- $result = array();
+ $result = array();
- for ($i=0; $i<count($r); $i++) {
- $arr = preg_split('/\s+/', $r[$i]);
+ for ($i=0; $i<count($r); $i++)
+ {
+ $arr = preg_split('/\s+/', $r[$i]);
- if (count($arr) > 0 && strpos($arr[0], '@')) {
- $result[] = rcube_utils::idn_to_ascii(trim(str_replace('\\@', '@', $arr[0])));
+ if (count($arr) > 0 && strpos($arr[0], '@')) {
+ $result[] = rcube_idn_to_ascii(trim(str_replace('\\@', '@', $arr[0])));
- if ($p['first']) {
- $p['email'] = $result[0];
- break;
- }
- }
- }
+ if ($p['first']) {
+ $p['email'] = $result[0];
+ break;
+ }
+ }
+ }
- $p['email'] = empty($result) ? NULL : $result;
+ $p['email'] = empty($result) ? NULL : $result;
- return $p;
+ return $p;
}
/**
@@ -59,18 +60,18 @@ class virtuser_file extends rcube_plugin
*/
function email2user($p)
{
- $r = $this->findinvirtual('/^' . preg_quote($p['email'], '/') . '\s/');
+ $r = $this->findinvirtual('/^' . preg_quote($p['email'], '/') . '\s/');
- for ($i=0; $i<count($r); $i++) {
- $arr = preg_split('/\s+/', trim($r[$i]));
+ for ($i=0; $i<count($r); $i++) {
+ $arr = preg_split('/\s+/', trim($r[$i]));
- if (count($arr) > 0) {
- $p['user'] = trim($arr[count($arr)-1]);
- break;
- }
- }
+ if (count($arr) > 0) {
+ $p['user'] = trim($arr[count($arr)-1]);
+ break;
+ }
+ }
- return $p;
+ return $p;
}
/**
@@ -81,25 +82,26 @@ class virtuser_file extends rcube_plugin
*/
private function findinvirtual($pattern)
{
- $result = array();
- $virtual = null;
+ $result = array();
+ $virtual = null;
- if ($this->file)
- $virtual = file($this->file);
+ if ($this->file)
+ $virtual = file($this->file);
- if (empty($virtual))
- return $result;
+ if (empty($virtual))
+ return $result;
- // check each line for matches
- foreach ($virtual as $line) {
- $line = trim($line);
- if (empty($line) || $line[0]=='#')
- continue;
+ // check each line for matches
+ foreach ($virtual as $line) {
+ $line = trim($line);
+ if (empty($line) || $line[0]=='#')
+ continue;
- if (preg_match($pattern, $line))
- $result[] = $line;
- }
+ if (preg_match($pattern, $line))
+ $result[] = $line;
+ }
- return $result;
+ return $result;
}
+
}
diff --git a/plugins/virtuser_query/package.xml b/plugins/virtuser_query/package.xml
index 9430bf69d..58f697019 100644
--- a/plugins/virtuser_query/package.xml
+++ b/plugins/virtuser_query/package.xml
@@ -13,16 +13,16 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2012-02-17</date>
+ <date>2011-11-21</date>
<version>
- <release>2.0</release>
- <api>2.0</api>
+ <release>1.1</release>
+ <api>1.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/virtuser_query/virtuser_query.php b/plugins/virtuser_query/virtuser_query.php
index a0b748288..a4c83265e 100644
--- a/plugins/virtuser_query/virtuser_query.php
+++ b/plugins/virtuser_query/virtuser_query.php
@@ -3,7 +3,7 @@
/**
* DB based User-to-Email and Email-to-User lookup
*
- * Add it to the plugins list in config.inc.php and set
+ * Add it to the plugins list in config/main.inc.php and set
* SQL queries to resolve usernames, e-mail addresses and hostnames from the database
* %u will be replaced with the current username for login.
* %m will be replaced with the current e-mail address for login.
@@ -12,29 +12,23 @@
* The email query could optionally select identity data columns in specified order:
* name, organization, reply-to, bcc, signature, html_signature
*
- * $config['virtuser_query'] = array('email' => '', 'user' => '', 'host' => '', 'alias' => '');
+ * $rcmail_config['virtuser_query'] = array('email' => '', 'user' => '', 'host' => '');
*
* The email query can return more than one record to create more identities.
* This requires identities_level option to be set to value less than 2.
*
- * By default Roundcube database is used. To use different database (or host)
- * you can specify DSN string in $config['virtuser_query_dsn'] option.
- *
* @version @package_version@
* @author Aleksander Machniak <alec@alec.pl>
* @author Steffen Vogel
- * @author Tim Gerundt
- * @license GNU GPLv3+
*/
class virtuser_query extends rcube_plugin
{
private $config;
private $app;
- private $db;
function init()
{
- $this->app = rcmail::get_instance();
+ $this->app = rcmail::get_instance();
$this->config = $this->app->config->get('virtuser_query');
if (!empty($this->config)) {
@@ -51,9 +45,6 @@ class virtuser_query extends rcube_plugin
if ($this->config['host']) {
$this->add_hook('authenticate', array($this, 'user2host'));
}
- if ($this->config['alias']) {
- $this->add_hook('authenticate', array($this, 'alias2user'));
- }
}
}
@@ -62,7 +53,7 @@ class virtuser_query extends rcube_plugin
*/
function user2email($p)
{
- $dbh = $this->get_dbh();
+ $dbh = $this->app->get_dbh();
$sql_result = $dbh->query(preg_replace('/%u/', $dbh->escape($p['user']), $this->config['email']));
@@ -70,11 +61,11 @@ class virtuser_query extends rcube_plugin
if (strpos($sql_arr[0], '@')) {
if ($p['extended'] && count($sql_arr) > 1) {
$result[] = array(
- 'email' => rcube_utils::idn_to_ascii($sql_arr[0]),
+ 'email' => rcube_idn_to_ascii($sql_arr[0]),
'name' => $sql_arr[1],
'organization' => $sql_arr[2],
- 'reply-to' => rcube_utils::idn_to_ascii($sql_arr[3]),
- 'bcc' => rcube_utils::idn_to_ascii($sql_arr[4]),
+ 'reply-to' => rcube_idn_to_ascii($sql_arr[3]),
+ 'bcc' => rcube_idn_to_ascii($sql_arr[4]),
'signature' => $sql_arr[5],
'html_signature' => (int)$sql_arr[6],
);
@@ -99,7 +90,7 @@ class virtuser_query extends rcube_plugin
*/
function email2user($p)
{
- $dbh = $this->get_dbh();
+ $dbh = $this->app->get_dbh();
$sql_result = $dbh->query(preg_replace('/%m/', $dbh->escape($p['email']), $this->config['user']));
@@ -115,7 +106,7 @@ class virtuser_query extends rcube_plugin
*/
function user2host($p)
{
- $dbh = $this->get_dbh();
+ $dbh = $this->app->get_dbh();
$sql_result = $dbh->query(preg_replace('/%u/', $dbh->escape($p['user']), $this->config['host']));
@@ -126,40 +117,5 @@ class virtuser_query extends rcube_plugin
return $p;
}
- /**
- * Alias > User
- */
- function alias2user($p)
- {
- $dbh = $this->get_dbh();
-
- $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escape($p['user']), $this->config['alias']));
-
- if ($sql_arr = $dbh->fetch_array($sql_result)) {
- $p['user'] = $sql_arr[0];
- }
-
- return $p;
- }
-
- /**
- * Initialize database handler
- */
- function get_dbh()
- {
- if (!$this->db) {
- if ($dsn = $this->app->config->get('virtuser_query_dsn')) {
- // connect to the virtuser database
- $this->db = rcube_db::factory($dsn);
- $this->db->set_debug((bool)$this->app->config->get('sql_debug'));
- $this->db->db_connect('r'); // connect in read mode
- }
- else {
- $this->db = $this->app->get_dbh();
- }
- }
-
- return $this->db;
- }
-
}
+
diff --git a/plugins/zipdownload/README b/plugins/zipdownload/README
index f253d63ee..4fa3c17b6 100644
--- a/plugins/zipdownload/README
+++ b/plugins/zipdownload/README
@@ -23,7 +23,7 @@ folder for details on the skin license.
Install
=======
* Place this plugin folder into plugins directory of Roundcube
-* Add zipdownload to $config['plugins'] in your Roundcube config
+* Add zipdownload to $rcmail_config['plugins'] in your Roundcube config
NB: When downloading the plugin from GitHub you will need to create a
directory called zipdownload and place the files in there, ignoring the
diff --git a/plugins/zipdownload/config.inc.php.dist b/plugins/zipdownload/config.inc.php.dist
index 0b2d14b60..5c7489a15 100644
--- a/plugins/zipdownload/config.inc.php.dist
+++ b/plugins/zipdownload/config.inc.php.dist
@@ -7,15 +7,15 @@
// Zip attachments
// Only show the link when there are more than this many attachments
// -1 to prevent downloading of attachments as zip
-$config['zipdownload_attachments'] = 1;
+$rcmail_config['zipdownload_attachments'] = 1;
// Zip entire folders
-$config['zipdownload_folder'] = false;
+$rcmail_config['zipdownload_folder'] = false;
// Zip selection of messages
-$config['zipdownload_selection'] = false;
+$rcmail_config['zipdownload_selection'] = false;
// Charset to use for filenames inside the zip
-$config['zipdownload_charset'] = 'ISO-8859-1';
+$rcmail_config['zipdownload_charset'] = 'ISO-8859-1';
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ar.inc b/plugins/zipdownload/localization/ar.inc
new file mode 100644
index 000000000..c5857c96c
--- /dev/null
+++ b/plugins/zipdownload/localization/ar.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'تنزيل كل المرفقات';
+$labels['downloadfolder'] = 'تنزيل المجلد';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ar_SA.inc b/plugins/zipdownload/localization/ar_SA.inc
new file mode 100644
index 000000000..dd5f5f349
--- /dev/null
+++ b/plugins/zipdownload/localization/ar_SA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'تحميل جميع المرفقات';
+$labels['downloadfolder'] = 'تحميل المجلد';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/be_BE.inc b/plugins/zipdownload/localization/be_BE.inc
new file mode 100644
index 000000000..7c6fb3876
--- /dev/null
+++ b/plugins/zipdownload/localization/be_BE.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Спампаваць усе далучэнні';
+$labels['downloadfolder'] = 'Спампаваць папку';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/bg_BG.inc b/plugins/zipdownload/localization/bg_BG.inc
new file mode 100644
index 000000000..69f91f6f2
--- /dev/null
+++ b/plugins/zipdownload/localization/bg_BG.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Изтегляне на всички прикачени файлове';
+$labels['downloadfolder'] = 'Изтегляне на папка';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/el_GR.inc b/plugins/zipdownload/localization/el_GR.inc
new file mode 100644
index 000000000..2a12b5da0
--- /dev/null
+++ b/plugins/zipdownload/localization/el_GR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Λυψη ολων των συννημενων';
+$labels['downloadfolder'] = 'Λυψη φακελου';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/en_US.inc b/plugins/zipdownload/localization/en_US.inc
index aee8a5e15..8823d3b8d 100644
--- a/plugins/zipdownload/localization/en_US.inc
+++ b/plugins/zipdownload/localization/en_US.inc
@@ -5,7 +5,7 @@
| plugins/zipdownload/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail Zipdownload plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/zipdownload/localization/eo.inc b/plugins/zipdownload/localization/eo.inc
new file mode 100644
index 000000000..bc6ef9d69
--- /dev/null
+++ b/plugins/zipdownload/localization/eo.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Elŝuti ĉiujn kunsendaĵojn';
+$labels['downloadfolder'] = 'Elŝuti dosierujon';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/eu_ES.inc b/plugins/zipdownload/localization/eu_ES.inc
new file mode 100644
index 000000000..0be09c8b2
--- /dev/null
+++ b/plugins/zipdownload/localization/eu_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Deskargatu eranskin guztiak';
+$labels['downloadfolder'] = 'Deskargatu karpeta';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/fa_AF.inc b/plugins/zipdownload/localization/fa_AF.inc
new file mode 100644
index 000000000..57bb55ea4
--- /dev/null
+++ b/plugins/zipdownload/localization/fa_AF.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'بارگزاری همه ضمیمه ها';
+$labels['downloadfolder'] = 'بارگزاری پوشه';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/fi_FI.inc b/plugins/zipdownload/localization/fi_FI.inc
new file mode 100644
index 000000000..7e2c3137d
--- /dev/null
+++ b/plugins/zipdownload/localization/fi_FI.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Lataa kaikki liitteet';
+$labels['downloadfolder'] = 'Lataa kansio';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/id_ID.inc b/plugins/zipdownload/localization/id_ID.inc
new file mode 100644
index 000000000..2ff3c87df
--- /dev/null
+++ b/plugins/zipdownload/localization/id_ID.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Unduh semua lampiran';
+$labels['downloadfolder'] = 'Folder download';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ko_KR.inc b/plugins/zipdownload/localization/ko_KR.inc
new file mode 100644
index 000000000..cae831353
--- /dev/null
+++ b/plugins/zipdownload/localization/ko_KR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = '모든 첨부파일을 다운로드';
+$labels['downloadfolder'] = '다운로드 폴더';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/lb_LU.inc b/plugins/zipdownload/localization/lb_LU.inc
index 6721c51cb..434b064dd 100644
--- a/plugins/zipdownload/localization/lb_LU.inc
+++ b/plugins/zipdownload/localization/lb_LU.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'All d\'Unhäng eroflueden';
$labels['downloadfolder'] = 'Dossier eroflueden';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/lv_LV.inc b/plugins/zipdownload/localization/lv_LV.inc
new file mode 100644
index 000000000..b23417abc
--- /dev/null
+++ b/plugins/zipdownload/localization/lv_LV.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Lejupielādēt visus pielikumus';
+$labels['downloadfolder'] = 'Lejupielādēt mapi';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ro_RO.inc b/plugins/zipdownload/localization/ro_RO.inc
index 7cba54d32..ac4a983d6 100644
--- a/plugins/zipdownload/localization/ro_RO.inc
+++ b/plugins/zipdownload/localization/ro_RO.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['downloadall'] = 'Descarca toate atasamentele.';
-$labels['downloadfolder'] = 'Dosar de descărcare';
+$labels['downloadall'] = 'Descarcă toate atașamentele';
+$labels['downloadfolder'] = 'Descarcă dosar';
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ru_RU.inc b/plugins/zipdownload/localization/ru_RU.inc
index 0b58fa7fa..014b2001e 100644
--- a/plugins/zipdownload/localization/ru_RU.inc
+++ b/plugins/zipdownload/localization/ru_RU.inc
@@ -18,6 +18,6 @@
$labels = array();
$labels['downloadall'] = 'Загрузить все вложения';
-$labels['downloadfolder'] = 'Загрузить папку';
+$labels['downloadfolder'] = 'Загрузить каталог';
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/sl_SI.inc b/plugins/zipdownload/localization/sl_SI.inc
new file mode 100644
index 000000000..07caeacbc
--- /dev/null
+++ b/plugins/zipdownload/localization/sl_SI.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Prenesi vse priponke';
+$labels['downloadfolder'] = 'Prenesi mapo';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/uk_UA.inc b/plugins/zipdownload/localization/uk_UA.inc
new file mode 100644
index 000000000..6232e9a2c
--- /dev/null
+++ b/plugins/zipdownload/localization/uk_UA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = 'Завантажити всі вкладення';
+$labels['downloadfolder'] = 'Завантажити теку';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/zh_CN.inc b/plugins/zipdownload/localization/zh_CN.inc
new file mode 100644
index 000000000..dfa8db34a
--- /dev/null
+++ b/plugins/zipdownload/localization/zh_CN.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload 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-zipdownload/
+*/
+$labels['downloadall'] = '下载全部附件';
+$labels['downloadfolder'] = '下载文件夹';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/skins/larry/zipdownload.css b/plugins/zipdownload/skins/larry/zipdownload.css
index bb92631b1..d719ac677 100644
--- a/plugins/zipdownload/skins/larry/zipdownload.css
+++ b/plugins/zipdownload/skins/larry/zipdownload.css
@@ -2,6 +2,6 @@
a.zipdownload {
display: inline-block;
- margin-top: .5em;
+ margin-top: 1.5em;
padding: 3px 5px 4px 5px;
-}
+} \ No newline at end of file
diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php
index 59431267d..443fef728 100644
--- a/plugins/zipdownload/zipdownload.php
+++ b/plugins/zipdownload/zipdownload.php
@@ -62,14 +62,11 @@ class zipdownload extends rcube_plugin
// only show the link if there is more than the configured number of attachments
if (substr_count($p['content'], '<li') > $rcmail->config->get('zipdownload_attachments', 1)) {
- $href = $rcmail->url(array(
- '_action' => 'plugin.zipdownload.zip_attachments',
- '_mbox' => $rcmail->output->env['mailbox'],
- '_uid' => $rcmail->output->env['uid'],
- ));
-
- $link = html::a(array('href' => $href, 'class' => 'button zipdownload'),
- rcube::Q($this->gettext('downloadall'))
+ $link = html::a(array(
+ 'href' => rcmail_url('plugin.zipdownload.zip_attachments', array('_mbox' => $rcmail->output->env['mailbox'], '_uid' => $rcmail->output->env['uid'])),
+ 'class' => 'button zipdownload',
+ ),
+ Q($this->gettext('downloadall'))
);
// append link to attachments list, slightly different in some skins
@@ -99,7 +96,7 @@ class zipdownload extends rcube_plugin
$temp_dir = $rcmail->config->get('temp_dir');
$tmpfname = tempnam($temp_dir, 'zipdownload');
$tempfiles = array($tmpfname);
- $message = new rcube_message(rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET));
+ $message = new rcube_message(get_input_value('_uid', RCUBE_INPUT_GET));
// open zip file
$zip = new ZipArchive();
@@ -143,7 +140,7 @@ class zipdownload extends rcube_plugin
public function download_selection()
{
if (isset($_REQUEST['_uid'])) {
- $uids = explode(",", rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GPC));
+ $uids = explode(",", get_input_value('_uid', RCUBE_INPUT_GPC));
if (sizeof($uids) > 0)
$this->_download_messages($uids);
@@ -160,7 +157,7 @@ class zipdownload extends rcube_plugin
// initialize searching result if search_filter is used
if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') {
- $imap->search($mbox_name, $_SESSION['search_filter'], RCUBE_CHARSET);
+ $imap->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET);
}
// fetch message headers for all pages
@@ -169,7 +166,7 @@ class zipdownload extends rcube_plugin
for ($i = 0; ($i * $imap->get_pagesize()) <= $count; $i++) {
$a_headers = $imap->list_messages($mbox_name, ($i + 1));
- foreach ($a_headers as $header) {
+ foreach ($a_headers as $n => $header) {
if (empty($header))
continue;
@@ -199,7 +196,7 @@ class zipdownload extends rcube_plugin
$zip = new ZipArchive();
$zip->open($tmpfname, ZIPARCHIVE::OVERWRITE);
- foreach ($uids as $uid){
+ foreach ($uids as $key => $uid){
$headers = $imap->get_message_headers($uid);
$subject = rcube_mime::decode_mime_string((string)$headers->subject);
$subject = $this->_convert_filename($subject);
@@ -237,9 +234,7 @@ class zipdownload extends rcube_plugin
private function _deliver_zipfile($tmpfname, $filename)
{
$browser = new rcube_browser;
- $rcmail = rcmail::get_instance();
-
- $rcmail->output->nocacheing_headers();
+ send_nocacheing_headers();
if ($browser->ie && $browser->ver < 7)
$filename = rawurlencode(abbreviate_string($filename, 55));