From 59478e06c25303a790a0840ab2ac30662c4ef781 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 5 Aug 2014 16:46:22 +0200 Subject: c'est la merde.. --- .htaccess | 3 + CHANGELOG | 68 +- INSTALL | 2 + bin/package2composer.sh | 109 + bin/transifexpull.sh | 38 + bin/updatedb.sh | 7 + config/.htaccess | 2 - config/defaults.inc.php | 78 +- index.php | 9 +- installer/rcube_install.php | 2 +- logs/.htaccess | 2 - main.inc.php.dist | 900 +++ plugins/acl/acl.php | 56 +- plugins/acl/config.inc.php.dist | 16 +- plugins/acl/localization/az_AZ.inc | 2 +- plugins/acl/localization/be_BE.inc | 90 + plugins/acl/localization/bg_BG.inc | 90 + plugins/acl/localization/el_GR.inc | 90 + plugins/acl/localization/en_US.inc | 4 +- plugins/acl/localization/es_AR.inc | 89 + plugins/acl/localization/et_EE.inc | 6 +- plugins/acl/localization/eu_ES.inc | 90 + plugins/acl/localization/fa_IR.inc | 28 +- plugins/acl/localization/fi_FI.inc | 28 +- plugins/acl/localization/gl_ES.inc | 64 +- plugins/acl/localization/he_IL.inc | 2 +- plugins/acl/localization/lb_LU.inc | 30 - plugins/acl/localization/lt_LT.inc | 2 +- plugins/acl/localization/lv_LV.inc | 90 + plugins/acl/localization/pl_PL.inc | 2 +- plugins/acl/localization/ro_RO.inc | 24 +- plugins/acl/localization/th_TH.inc | 50 + plugins/acl/localization/ti.inc | 67 + plugins/acl/localization/tr_TR.inc | 2 +- plugins/acl/package.xml | 2 +- plugins/acl/skins/classic/acl.css | 4 +- plugins/acl/skins/larry/acl.css | 24 +- .../additional_message_headers.php | 4 +- .../additional_message_headers/config.inc.php.dist | 10 +- plugins/archive/archive.js | 31 +- plugins/archive/archive.php | 146 +- plugins/archive/localization/ar.inc | 18 + plugins/archive/localization/ast.inc | 31 + plugins/archive/localization/bn_BD.inc | 18 + plugins/archive/localization/en_US.inc | 11 +- plugins/archive/localization/eu_ES.inc | 31 + plugins/archive/localization/fa_AF.inc | 26 + plugins/archive/localization/fa_IR.inc | 6 +- plugins/archive/localization/fi_FI.inc | 18 +- plugins/archive/localization/fr_FR.inc | 6 +- plugins/archive/localization/hi_IN.inc | 18 + plugins/archive/localization/ia.inc | 18 + plugins/archive/localization/lb_LU.inc | 3 - plugins/archive/localization/lv_LV.inc | 22 +- plugins/archive/localization/mn_MN.inc | 18 + plugins/archive/localization/ms_MY.inc | 18 + plugins/archive/localization/my_MM.inc | 18 + plugins/archive/localization/nb_NB.inc | 21 + plugins/archive/localization/nb_NO.inc | 2 +- plugins/archive/localization/nl_BE.inc | 18 + plugins/archive/localization/nn_NO.inc | 2 +- plugins/archive/localization/nqo.inc | 18 + plugins/archive/localization/om.inc | 18 + plugins/archive/localization/pt_BR.inc | 18 +- plugins/archive/localization/ro_RO.inc | 6 +- plugins/archive/localization/te_IN.inc | 18 + plugins/archive/localization/th_TH.inc | 18 + plugins/archive/localization/ti.inc | 18 + plugins/archive/localization/tzm.inc | 18 + plugins/archive/localization/ur_PK.inc | 18 + plugins/archive/localization/zh_CN.inc | 20 +- plugins/archive/package.xml | 42 +- plugins/attachment_reminder/localization/ar.inc | 20 + plugins/attachment_reminder/localization/ar_SA.inc | 20 + plugins/attachment_reminder/localization/az_AZ.inc | 20 + plugins/attachment_reminder/localization/be_BE.inc | 20 + plugins/attachment_reminder/localization/bg_BG.inc | 20 + plugins/attachment_reminder/localization/bn_BD.inc | 20 + plugins/attachment_reminder/localization/bs_BA.inc | 20 + plugins/attachment_reminder/localization/ca_ES.inc | 20 + plugins/attachment_reminder/localization/cs_CZ.inc | 20 + plugins/attachment_reminder/localization/cy_GB.inc | 20 + plugins/attachment_reminder/localization/da_DK.inc | 20 + plugins/attachment_reminder/localization/de_CH.inc | 2 - plugins/attachment_reminder/localization/de_DE.inc | 18 +- plugins/attachment_reminder/localization/el_GR.inc | 20 + plugins/attachment_reminder/localization/eo.inc | 20 + plugins/attachment_reminder/localization/es_AR.inc | 20 + plugins/attachment_reminder/localization/es_ES.inc | 18 +- plugins/attachment_reminder/localization/et_EE.inc | 20 + plugins/attachment_reminder/localization/eu_ES.inc | 20 + plugins/attachment_reminder/localization/fa_AF.inc | 20 + plugins/attachment_reminder/localization/fa_IR.inc | 20 + plugins/attachment_reminder/localization/fi_FI.inc | 20 + plugins/attachment_reminder/localization/fr_FR.inc | 18 +- plugins/attachment_reminder/localization/gl_ES.inc | 20 + plugins/attachment_reminder/localization/he_IL.inc | 20 + plugins/attachment_reminder/localization/hi_IN.inc | 20 + plugins/attachment_reminder/localization/hu_HU.inc | 20 + plugins/attachment_reminder/localization/hy_AM.inc | 20 + plugins/attachment_reminder/localization/ia.inc | 20 + plugins/attachment_reminder/localization/id_ID.inc | 20 + plugins/attachment_reminder/localization/it_IT.inc | 18 +- plugins/attachment_reminder/localization/ja_JP.inc | 20 + plugins/attachment_reminder/localization/ko_KR.inc | 20 + plugins/attachment_reminder/localization/lb_LU.inc | 2 - plugins/attachment_reminder/localization/lt_LT.inc | 20 + plugins/attachment_reminder/localization/lv_LV.inc | 20 + plugins/attachment_reminder/localization/ml_IN.inc | 20 + plugins/attachment_reminder/localization/mn_MN.inc | 20 + plugins/attachment_reminder/localization/ms_MY.inc | 20 + plugins/attachment_reminder/localization/my_MM.inc | 20 + plugins/attachment_reminder/localization/nb_NO.inc | 20 + plugins/attachment_reminder/localization/nl_BE.inc | 20 + plugins/attachment_reminder/localization/nl_NL.inc | 22 +- plugins/attachment_reminder/localization/nn_NO.inc | 20 + plugins/attachment_reminder/localization/nqo.inc | 20 + plugins/attachment_reminder/localization/om.inc | 20 + plugins/attachment_reminder/localization/pl_PL.inc | 16 +- plugins/attachment_reminder/localization/pt_BR.inc | 20 + plugins/attachment_reminder/localization/pt_PT.inc | 20 + plugins/attachment_reminder/localization/ro_RO.inc | 20 + plugins/attachment_reminder/localization/ru_RU.inc | 20 + plugins/attachment_reminder/localization/sk_SK.inc | 20 + plugins/attachment_reminder/localization/sl_SI.inc | 20 + plugins/attachment_reminder/localization/sr_CS.inc | 20 + plugins/attachment_reminder/localization/sv_SE.inc | 20 + plugins/attachment_reminder/localization/te_IN.inc | 20 + plugins/attachment_reminder/localization/th_TH.inc | 20 + plugins/attachment_reminder/localization/ti.inc | 20 + plugins/attachment_reminder/localization/tr_TR.inc | 20 + plugins/attachment_reminder/localization/tzm.inc | 20 + plugins/attachment_reminder/localization/uk_UA.inc | 20 + plugins/attachment_reminder/localization/ur_PK.inc | 20 + plugins/attachment_reminder/localization/vi_VN.inc | 20 + plugins/attachment_reminder/localization/zh_CN.inc | 22 +- plugins/attachment_reminder/localization/zh_TW.inc | 18 +- plugins/autologon/autologon.php | 4 +- plugins/compose_addressbook/compose_addressbook.js | 224 + .../compose_addressbook/compose_addressbook.php | 180 + plugins/compose_addressbook/config.inc.php.dist | 21 + plugins/compose_addressbook/localization/de_DE.inc | 11 + plugins/compose_addressbook/localization/en_GB.inc | 10 + plugins/compose_addressbook/localization/en_US.inc | 10 + plugins/compose_addressbook/localization/es_ES.inc | 10 + plugins/compose_addressbook/localization/fr_FR.inc | 10 + plugins/compose_addressbook/localization/it_IT.inc | 10 + plugins/compose_addressbook/localization/nl_NL.inc | 10 + plugins/compose_addressbook/localization/pl_PL.inc | 10 + plugins/compose_addressbook/localization/sv_SE.inc | 10 + plugins/compose_addressbook/localization/zh_TW.inc | 10 + plugins/compose_addressbook/package.xml | 18 + .../skins/classic/compose_addressbook.css | 83 + .../skins/classic/compose_addressbook.png | Bin 0 -> 4142 bytes .../skins/classic/searchfield.gif | Bin 0 -> 397 bytes .../smoothness/images/ui-anim_basic_16x16.gif | Bin 0 -> 1553 bytes .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes .../smoothness/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes .../smoothness/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes .../classic/smoothness/jquery-ui-1.8.2.custom.css | 345 + plugins/contextmenu/contextmenu.js | 595 ++ plugins/contextmenu/contextmenu.php | 315 + plugins/contextmenu/jquery.contextMenu.js | 21 + plugins/contextmenu/jquery.mousewheel.js | 1 + plugins/contextmenu/localization/ca_ES.inc | 12 + plugins/contextmenu/localization/cs_CZ.inc | 12 + plugins/contextmenu/localization/da_DK.inc | 12 + plugins/contextmenu/localization/de_CH.inc | 12 + plugins/contextmenu/localization/de_DE.inc | 12 + plugins/contextmenu/localization/en_GB.inc | 12 + plugins/contextmenu/localization/en_US.inc | 12 + plugins/contextmenu/localization/es_ES.inc | 12 + plugins/contextmenu/localization/fr_FR.inc | 12 + plugins/contextmenu/localization/gl_ES.inc | 12 + plugins/contextmenu/localization/hu_HU.inc | 12 + plugins/contextmenu/localization/it_IT.inc | 12 + plugins/contextmenu/localization/nl_NL.inc | 12 + plugins/contextmenu/localization/pl_PL.inc | 12 + plugins/contextmenu/localization/pt_BR.inc | 12 + plugins/contextmenu/localization/ro_RO.inc | 12 + plugins/contextmenu/localization/ru_RU.inc | 12 + plugins/contextmenu/localization/sv_SE.inc | 12 + plugins/contextmenu/localization/tr_TR.inc | 12 + plugins/contextmenu/localization/uk_UA.inc | 12 + plugins/contextmenu/localization/zh_TW.inc | 12 + plugins/contextmenu/package.xml | 90 + plugins/contextmenu/skins/classic/contexticons.gif | Bin 0 -> 2238 bytes plugins/contextmenu/skins/classic/contexticons.png | Bin 0 -> 4261 bytes plugins/contextmenu/skins/classic/contextmenu.css | 357 + plugins/contextmenu/skins/classic/folders.gif | Bin 0 -> 2430 bytes plugins/contextmenu/skins/classic/folders.png | Bin 0 -> 4771 bytes plugins/contextmenu/skins/classic/ie6hacks.css | 54 + .../contextmenu/skins/classic/messageactions.gif | Bin 0 -> 1567 bytes .../contextmenu/skins/classic/messageactions.png | Bin 0 -> 2578 bytes plugins/contextmenu/skins/larry/contexticons.png | Bin 0 -> 5728 bytes plugins/contextmenu/skins/larry/contextmenu.css | 425 ++ plugins/contextmenu/skins/larry/folders.png | Bin 0 -> 3901 bytes plugins/contextmenu/skins/larry/ie6hacks.css | 3 + plugins/contextmenu/skins/larry/messageactions.png | Bin 0 -> 1698 bytes plugins/copymessage/copymessage.js | 40 + plugins/copymessage/copymessage.php | 114 + plugins/copymessage/localization/ca_ES.inc | 9 + plugins/copymessage/localization/cs_CZ.inc | 9 + plugins/copymessage/localization/da_DK.inc | 9 + plugins/copymessage/localization/de_CH.inc | 9 + plugins/copymessage/localization/de_DE.inc | 9 + plugins/copymessage/localization/en_GB.inc | 9 + plugins/copymessage/localization/en_US.inc | 9 + plugins/copymessage/localization/es_ES.inc | 9 + plugins/copymessage/localization/fr_FR.inc | 9 + plugins/copymessage/localization/gl_ES.inc | 9 + plugins/copymessage/localization/hu_HU.inc | 9 + plugins/copymessage/localization/it_IT.inc | 9 + plugins/copymessage/localization/nl_NL.inc | 9 + plugins/copymessage/localization/pl_PL.inc | 9 + plugins/copymessage/localization/pt_BR.inc | 9 + plugins/copymessage/localization/ro_RO.inc | 9 + plugins/copymessage/localization/ru_RU.inc | 9 + plugins/copymessage/localization/sv_SE.inc | 9 + plugins/copymessage/localization/tr_TR.inc | 9 + plugins/copymessage/package.xml | 78 + .../database_attachments/database_attachments.php | 126 +- plugins/database_attachments/package.xml | 6 +- plugins/debug_logger/debug_logger.php | 10 +- plugins/debug_logger/runlog/runlog.php | 2 +- plugins/dkimstatus/dkimstatus.php | 155 + plugins/dkimstatus/images/authorsign.png | Bin 0 -> 699 bytes plugins/dkimstatus/images/invalidsig.png | Bin 0 -> 618 bytes plugins/dkimstatus/images/nosiginfo.png | Bin 0 -> 707 bytes plugins/dkimstatus/images/thirdpty.png | Bin 0 -> 722 bytes plugins/dkimstatus/localization/cs_CZ.inc | 16 + plugins/dkimstatus/localization/de_DE.inc | 8 + plugins/dkimstatus/localization/en_US.inc | 9 + plugins/dkimstatus/localization/es_ES.inc | 9 + plugins/dkimstatus/localization/fr_FR.inc | 10 + plugins/dkimstatus/localization/it_IT.inc | 7 + plugins/dkimstatus/localization/ja_JP.inc | 9 + plugins/dkimstatus/localization/pl_PL.inc | 9 + plugins/dkimstatus/localization/ro_RO.inc | 9 + plugins/dovecot_impersonate/config.inc.php.dist | 10 + .../dovecot_impersonate/dovecot_impersonate.php | 52 + plugins/dovecot_impersonate/package.xml | 18 + plugins/enigma/README | 35 - plugins/enigma/config.inc.php.dist | 14 - plugins/enigma/enigma.js | 206 - plugins/enigma/enigma.php | 476 -- plugins/enigma/home/.htaccess | 2 - plugins/enigma/home/aldric/pubring.gpg | 0 plugins/enigma/home/aldric/secring.gpg | 0 plugins/enigma/home/aldric/trustdb.gpg | Bin 0 -> 40 bytes plugins/enigma/home/hugues/pubring.gpg | Bin 0 -> 133165 bytes plugins/enigma/home/hugues/secring.gpg | Bin 0 -> 1350 bytes plugins/enigma/home/hugues/trustdb.gpg | Bin 0 -> 1200 bytes plugins/enigma/lib/Crypt/GPG.php | 2542 ------- .../enigma/lib/Crypt/GPG/DecryptStatusHandler.php | 336 - plugins/enigma/lib/Crypt/GPG/Engine.php | 1758 ----- plugins/enigma/lib/Crypt/GPG/Exceptions.php | 473 -- plugins/enigma/lib/Crypt/GPG/Key.php | 223 - plugins/enigma/lib/Crypt/GPG/Signature.php | 428 -- plugins/enigma/lib/Crypt/GPG/SubKey.php | 649 -- plugins/enigma/lib/Crypt/GPG/UserId.php | 373 -- .../enigma/lib/Crypt/GPG/VerifyStatusHandler.php | 216 - plugins/enigma/lib/enigma_driver.php | 106 - plugins/enigma/lib/enigma_driver_gnupg.php | 305 - plugins/enigma/lib/enigma_engine.php | 533 -- plugins/enigma/lib/enigma_error.php | 62 - plugins/enigma/lib/enigma_key.php | 129 - plugins/enigma/lib/enigma_signature.php | 34 - plugins/enigma/lib/enigma_subkey.php | 57 - plugins/enigma/lib/enigma_ui.php | 455 -- plugins/enigma/lib/enigma_userid.php | 31 - plugins/enigma/localization/en_US.inc | 53 - plugins/enigma/localization/ja_JP.inc | 55 - plugins/enigma/localization/ru_RU.inc | 65 - plugins/enigma/skins/classic/enigma.css | 182 - plugins/enigma/skins/classic/enigma.png | Bin 1592 -> 0 bytes plugins/enigma/skins/classic/enigma_error.png | Bin 1960 -> 0 bytes plugins/enigma/skins/classic/key.png | Bin 1743 -> 0 bytes plugins/enigma/skins/classic/key_add.png | Bin 1967 -> 0 bytes plugins/enigma/skins/classic/keys_toolbar.png | Bin 14977 -> 0 bytes .../enigma/skins/classic/templates/keyimport.html | 20 - .../enigma/skins/classic/templates/keyinfo.html | 17 - plugins/enigma/skins/classic/templates/keys.html | 80 - plugins/enigma/tests/Enigma.php | 23 - plugins/fail2ban/fail2ban.php | 33 + .../filesystem_attachments.php | 1 - plugins/filesystem_attachments/package.xml | 2 +- plugins/help/config.inc.php.dist | 34 +- plugins/help/content/about.html | 27 + plugins/help/content/license.html | 2 +- plugins/help/help.php | 69 +- plugins/help/localization/ar.inc | 18 + plugins/help/localization/ast.inc | 21 + plugins/help/localization/be_BE.inc | 21 + plugins/help/localization/bg_BG.inc | 21 + plugins/help/localization/bn_BD.inc | 18 + plugins/help/localization/el_GR.inc | 21 + plugins/help/localization/en_US.inc | 4 +- plugins/help/localization/es_AR.inc | 21 + plugins/help/localization/eu_ES.inc | 21 + plugins/help/localization/fa_AF.inc | 21 + plugins/help/localization/gl_ES.inc | 2 +- plugins/help/localization/hi_IN.inc | 18 + plugins/help/localization/ia.inc | 18 + plugins/help/localization/lb_LU.inc | 3 - plugins/help/localization/lv_LV.inc | 21 + plugins/help/localization/ml_IN.inc | 18 + plugins/help/localization/mn_MN.inc | 18 + plugins/help/localization/ms_MY.inc | 18 + plugins/help/localization/my_MM.inc | 18 + plugins/help/localization/nl_BE.inc | 18 + plugins/help/localization/nqo.inc | 18 + plugins/help/localization/om.inc | 18 + plugins/help/localization/ro_RO.inc | 21 + plugins/help/localization/te_IN.inc | 18 + plugins/help/localization/th_TH.inc | 18 + plugins/help/localization/ti.inc | 21 + plugins/help/localization/tzm.inc | 18 + plugins/help/localization/uk_UA.inc | 21 + plugins/help/localization/ur_PK.inc | 18 + plugins/help/package.xml | 9 +- plugins/help/skins/classic/help.css | 16 +- plugins/help/skins/classic/templates/help.html | 17 +- plugins/help/skins/larry/help.css | 1 + plugins/help/skins/larry/templates/help.html | 8 +- plugins/hide_blockquote/hide_blockquote.php | 4 +- plugins/hide_blockquote/localization/ar.inc | 18 + plugins/hide_blockquote/localization/ar_SA.inc | 20 + plugins/hide_blockquote/localization/be_BE.inc | 21 + plugins/hide_blockquote/localization/bg_BG.inc | 21 + plugins/hide_blockquote/localization/bn_BD.inc | 18 + plugins/hide_blockquote/localization/el_GR.inc | 21 + plugins/hide_blockquote/localization/en_US.inc | 4 +- plugins/hide_blockquote/localization/es_AR.inc | 21 + plugins/hide_blockquote/localization/eu_ES.inc | 21 + plugins/hide_blockquote/localization/fa_AF.inc | 18 + plugins/hide_blockquote/localization/fi_FI.inc | 2 +- plugins/hide_blockquote/localization/hi_IN.inc | 18 + plugins/hide_blockquote/localization/ia.inc | 18 + plugins/hide_blockquote/localization/lb_LU.inc | 3 - plugins/hide_blockquote/localization/lv_LV.inc | 21 + plugins/hide_blockquote/localization/ml_IN.inc | 18 + plugins/hide_blockquote/localization/mn_MN.inc | 18 + plugins/hide_blockquote/localization/ms_MY.inc | 18 + plugins/hide_blockquote/localization/my_MM.inc | 18 + plugins/hide_blockquote/localization/nl_BE.inc | 18 + plugins/hide_blockquote/localization/nqo.inc | 18 + plugins/hide_blockquote/localization/om.inc | 18 + plugins/hide_blockquote/localization/ro_RO.inc | 21 + plugins/hide_blockquote/localization/te_IN.inc | 18 + plugins/hide_blockquote/localization/th_TH.inc | 18 + plugins/hide_blockquote/localization/ti.inc | 18 + plugins/hide_blockquote/localization/tzm.inc | 18 + plugins/hide_blockquote/localization/uk_UA.inc | 20 + plugins/hide_blockquote/localization/ur_PK.inc | 18 + plugins/http_authentication/config.inc.php.dist | 4 +- .../http_authentication/http_authentication.php | 6 +- plugins/jqueryui/config.inc.php.dist | 4 +- plugins/jqueryui/jqueryui.php | 1 - plugins/jqueryui/js/i18n/jquery-ui-i18n.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-af.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ar-DZ.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ar.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-az.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-bg.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-bs.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ca.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-cs.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-cy-GB.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-da.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-de.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-el.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-en-AU.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-en-GB.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-en-NZ.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-eo.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-es.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-et.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-eu.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-fa.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-fi.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-fo.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-fr-CH.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-fr.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-gl.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-he.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-hi.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-hr.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-hu.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-hy.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-id.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-is.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-it.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ja.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ka.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-kk.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-km.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ko.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-lb.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-lt.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-lv.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-mk.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ml.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ms.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-nl-BE.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-nl.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-no.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-pl.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-pt-BR.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-pt.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-rm.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ro.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ru.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-sk.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-sl.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-sq.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-sr-SR.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-sr.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-sv.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-ta.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-th.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-tj.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-tr.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-uk.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-vi.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-zh-CN.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-zh-HK.js | 0 .../jqueryui/js/i18n/jquery.ui.datepicker-zh-TW.js | 0 plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js | 0 .../classic/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin .../classic/images/ui-bg_flat_75_ffffff_40x100.png | Bin .../classic/images/ui-bg_flat_90_cc3333_40x100.png | Bin .../classic/images/ui-bg_glass_95_fef1ec_1x400.png | Bin .../ui-bg_highlight-hard_90_a3a3a3_1x100.png | Bin .../ui-bg_highlight-hard_90_e6e6e7_1x100.png | Bin .../ui-bg_highlight-hard_90_f4f4f4_1x100.png | Bin .../classic/images/ui-icons_000000_256x240.png | Bin .../classic/images/ui-icons_333333_256x240.png | Bin .../classic/images/ui-icons_666666_256x240.png | Bin .../classic/images/ui-icons_cc3333_256x240.png | Bin .../classic/images/ui-icons_dddddd_256x240.png | Bin .../themes/classic/jquery-ui-1.9.1.custom.css | 0 .../ui-bg_highlight-hard_55_b0ccd7_1x100.png | Bin .../ui-bg_highlight-hard_65_ffffff_1x100.png | Bin .../ui-bg_highlight-hard_75_eaeaea_1x100.png | Bin .../ui-bg_highlight-hard_75_f8f8f8_1x100.png | Bin .../ui-bg_highlight-soft_75_fafafa_1x100.png | Bin .../ui-bg_highlight-soft_90_e4e4e4_1x100.png | Bin .../larry/images/ui-icons_004458_256x240.png | Bin .../larry/images/ui-icons_d7211e_256x240.png | Bin .../themes/larry/jquery-ui-1.9.1.custom.css | 0 .../redmond/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin .../redmond/images/ui-bg_flat_55_fbec88_40x100.png | Bin .../redmond/images/ui-bg_glass_75_d0e5f5_1x400.png | Bin .../redmond/images/ui-bg_glass_85_dfeffc_1x400.png | Bin .../redmond/images/ui-bg_glass_95_fef1ec_1x400.png | Bin .../images/ui-bg_gloss-wave_55_5c9ccc_500x100.png | Bin .../images/ui-bg_inset-hard_100_f5f8f9_1x100.png | Bin .../images/ui-bg_inset-hard_100_fcfdfd_1x100.png | Bin .../redmond/images/ui-icons_217bc0_256x240.png | Bin .../redmond/images/ui-icons_2e83ff_256x240.png | Bin .../redmond/images/ui-icons_469bdd_256x240.png | Bin .../redmond/images/ui-icons_6da8d5_256x240.png | Bin .../redmond/images/ui-icons_cd0a0a_256x240.png | Bin .../redmond/images/ui-icons_d8e7f3_256x240.png | Bin .../redmond/images/ui-icons_f9bd01_256x240.png | Bin .../themes/redmond/jquery-ui-1.9.1.custom.css | 0 plugins/keyboard_shortcuts/keyboard_shortcuts.css | 23 + plugins/keyboard_shortcuts/keyboard_shortcuts.js | 139 + plugins/keyboard_shortcuts/keyboard_shortcuts.php | 130 + plugins/keyboard_shortcuts/localization/cs_CZ.inc | 24 + plugins/keyboard_shortcuts/localization/de_DE.inc | 10 + plugins/keyboard_shortcuts/localization/en_US.inc | 11 + plugins/keyboard_shortcuts/localization/fr_FR.inc | 11 + plugins/keyboard_shortcuts/localization/nl_NL.inc | 11 + plugins/keyboard_shortcuts/localization/pl_PL.inc | 11 + plugins/keyboard_shortcuts/localization/ru_RU.inc | 11 + plugins/keyboard_shortcuts/localization/sv_SE.inc | 10 + plugins/keyboard_shortcuts/localization/zh_TW.inc | 11 + plugins/keyboard_shortcuts/package.xml | 18 + .../skins/classic/images/keyboard.png | Bin 0 -> 4157 bytes .../skins/larry/images/keyboard.png | Bin 0 -> 4157 bytes plugins/listcommands/listcommands.php | 106 + plugins/listcommands/localization/en_US.inc | 12 + plugins/listcommands/localization/es_ES.inc | 12 + plugins/listcommands/localization/fr_FR.inc | 13 + plugins/listcommands/localization/nl_NL.inc | 12 + plugins/listcommands/localization/pl_PL.inc | 12 + plugins/listcommands/localization/ru_RU.inc | 12 + plugins/listcommands/package.xml | 18 + plugins/managesieve/Changelog | 37 +- plugins/managesieve/config.inc.php.dist | 30 +- plugins/managesieve/lib/Roundcube/rcube_sieve.php | 16 +- .../lib/Roundcube/rcube_sieve_engine.php | 151 +- .../lib/Roundcube/rcube_sieve_script.php | 493 +- plugins/managesieve/localization/ar_SA.inc | 33 + plugins/managesieve/localization/az_AZ.inc | 14 +- plugins/managesieve/localization/be_BE.inc | 2 +- plugins/managesieve/localization/bg_BG.inc | 8 +- plugins/managesieve/localization/bs_BA.inc | 2 +- plugins/managesieve/localization/ca_ES.inc | 8 +- plugins/managesieve/localization/cs_CZ.inc | 22 +- plugins/managesieve/localization/cy_GB.inc | 8 +- plugins/managesieve/localization/da_DK.inc | 8 +- plugins/managesieve/localization/de_CH.inc | 2 +- plugins/managesieve/localization/de_DE.inc | 8 +- plugins/managesieve/localization/el_GR.inc | 216 +- plugins/managesieve/localization/en_GB.inc | 2 +- plugins/managesieve/localization/en_US.inc | 51 +- plugins/managesieve/localization/eo.inc | 2 +- plugins/managesieve/localization/es_AR.inc | 2 +- plugins/managesieve/localization/es_ES.inc | 25 +- plugins/managesieve/localization/et_EE.inc | 29 +- plugins/managesieve/localization/eu_ES.inc | 181 + plugins/managesieve/localization/fa_IR.inc | 7 +- plugins/managesieve/localization/fi_FI.inc | 24 +- plugins/managesieve/localization/fr_FR.inc | 26 +- plugins/managesieve/localization/gl_ES.inc | 148 +- plugins/managesieve/localization/he_IL.inc | 7 +- plugins/managesieve/localization/hr_HR.inc | 26 +- plugins/managesieve/localization/hu_HU.inc | 2 +- plugins/managesieve/localization/hy_AM.inc | 2 +- plugins/managesieve/localization/ia.inc | 2 +- plugins/managesieve/localization/id_ID.inc | 2 +- plugins/managesieve/localization/it_IT.inc | 26 +- plugins/managesieve/localization/ja_JP.inc | 2 +- plugins/managesieve/localization/ko_KR.inc | 2 +- plugins/managesieve/localization/lb_LU.inc | 147 - plugins/managesieve/localization/lt_LT.inc | 10 +- plugins/managesieve/localization/lv_LV.inc | 163 +- plugins/managesieve/localization/ml_IN.inc | 1 + plugins/managesieve/localization/mr_IN.inc | 2 +- plugins/managesieve/localization/nb_NO.inc | 2 +- plugins/managesieve/localization/nl_NL.inc | 2 +- plugins/managesieve/localization/nn_NO.inc | 13 +- plugins/managesieve/localization/pl_PL.inc | 25 +- plugins/managesieve/localization/pt_BR.inc | 21 +- plugins/managesieve/localization/pt_PT.inc | 2 +- plugins/managesieve/localization/ro_RO.inc | 8 +- plugins/managesieve/localization/ru_RU.inc | 21 +- plugins/managesieve/localization/si_LK.inc | 1 + plugins/managesieve/localization/sk_SK.inc | 2 +- plugins/managesieve/localization/sl_SI.inc | 25 +- plugins/managesieve/localization/sv_SE.inc | 2 +- plugins/managesieve/localization/th_TH.inc | 45 + plugins/managesieve/localization/tr_TR.inc | 8 +- plugins/managesieve/localization/uk_UA.inc | 2 +- plugins/managesieve/localization/vi_VN.inc | 17 +- plugins/managesieve/localization/zh_CN.inc | 2 +- plugins/managesieve/localization/zh_TW.inc | 2 +- plugins/managesieve/managesieve.js | 185 +- plugins/managesieve/managesieve.php | 1919 +++++- plugins/managesieve/package.xml | 18 +- plugins/managesieve/skins/classic/managesieve.css | 103 +- .../managesieve/skins/classic/managesieve_mail.css | 2 +- .../skins/classic/templates/managesieve.html | 6 +- plugins/managesieve/skins/larry/managesieve.css | 116 +- plugins/managesieve/tests/src/parser.out | 4 +- plugins/managesieve/tests/src/parser_enotify_b | 6 +- plugins/managesieve/tests/src/parser_notify_b | 6 +- plugins/managesieve/tests/src/parser_relational | 2 +- plugins/managesieve/tests/src/parser_subaddress | 2 +- plugins/markasjunk/localization/ar.inc | 20 + plugins/markasjunk/localization/bg_BG.inc | 21 + plugins/markasjunk/localization/en_US.inc | 4 +- plugins/markasjunk/localization/eu_ES.inc | 21 + plugins/markasjunk/localization/lb_LU.inc | 3 - plugins/markasjunk/localization/lv_LV.inc | 6 +- plugins/markasjunk/localization/ro_RO.inc | 6 +- plugins/markasjunk/localization/ru_RU.inc | 4 +- plugins/markasjunk2/config.inc.php.dist | 152 + plugins/markasjunk2/drivers/cmd_learn.php | 74 + plugins/markasjunk2/drivers/dir_learn.php | 49 + plugins/markasjunk2/drivers/edit_headers.php | 53 + plugins/markasjunk2/drivers/email_learn.php | 191 + plugins/markasjunk2/drivers/sa_blacklist.php | 103 + plugins/markasjunk2/drivers/sa_detach.php | 47 + plugins/markasjunk2/localization/ca_ES.inc | 14 + plugins/markasjunk2/localization/cs_CZ.inc | 14 + plugins/markasjunk2/localization/de_CH.inc | 15 + plugins/markasjunk2/localization/de_DE.inc | 15 + plugins/markasjunk2/localization/en_GB.inc | 15 + plugins/markasjunk2/localization/en_US.inc | 15 + plugins/markasjunk2/localization/es_AR.inc | 14 + plugins/markasjunk2/localization/es_ES.inc | 14 + plugins/markasjunk2/localization/fa_IR.inc | 14 + plugins/markasjunk2/localization/fr_FR.inc | 14 + plugins/markasjunk2/localization/gl_ES.inc | 14 + plugins/markasjunk2/localization/hu_HU.inc | 14 + plugins/markasjunk2/localization/it_IT.inc | 15 + plugins/markasjunk2/localization/lv_LV.inc | 15 + plugins/markasjunk2/localization/nl_NL.inc | 14 + plugins/markasjunk2/localization/pl_PL.inc | 15 + plugins/markasjunk2/localization/pt_BR.inc | 14 + plugins/markasjunk2/localization/ro_RO.inc | 14 + plugins/markasjunk2/localization/ru_RU.inc | 15 + plugins/markasjunk2/localization/tr_TR.inc | 14 + plugins/markasjunk2/localization/zh_TW.inc | 14 + plugins/markasjunk2/markasjunk2.js | 199 + plugins/markasjunk2/markasjunk2.php | 211 + plugins/markasjunk2/package.xml | 92 + plugins/markasjunk2/skins/classic/ie6hacks.css | 19 + plugins/markasjunk2/skins/classic/mail_toolbar.gif | Bin 0 -> 3434 bytes plugins/markasjunk2/skins/classic/mail_toolbar.png | Bin 0 -> 7565 bytes plugins/markasjunk2/skins/classic/markasjunk2.css | 52 + .../markasjunk2/skins/classic/messageactions.gif | Bin 0 -> 1307 bytes .../markasjunk2/skins/classic/messageactions.png | Bin 0 -> 1798 bytes plugins/markasjunk2/skins/larry/ie6hacks.css | 3 + plugins/markasjunk2/skins/larry/mail_toolbar.png | Bin 0 -> 1924 bytes plugins/markasjunk2/skins/larry/markasjunk2.css | 51 + plugins/markasjunk2/skins/larry/messageactions.png | Bin 0 -> 1050 bytes .../message_highlight/colorpicker/images/color.png | Bin 0 -> 892 bytes .../colorpicker/images/colorpicker.png | Bin 0 -> 4739 bytes .../colorpicker/images/graybar.jpg | Bin 0 -> 5225 bytes .../message_highlight/colorpicker/images/grid.gif | Bin 0 -> 87 bytes .../colorpicker/images/meta100.png | Bin 0 -> 828 bytes .../colorpicker/images/transparentpixel.gif | Bin 0 -> 43 bytes .../message_highlight/colorpicker/mColorPicker.js | 564 ++ plugins/message_highlight/localization/de_DE.inc | 15 + plugins/message_highlight/localization/en_US.inc | 16 + plugins/message_highlight/localization/fr_FR.inc | 16 + plugins/message_highlight/localization/nl_NL.inc | 15 + plugins/message_highlight/localization/ru_RU.inc | 14 + plugins/message_highlight/message_highlight.css | 74 + plugins/message_highlight/message_highlight.js | 58 + plugins/message_highlight/message_highlight.php | 176 + plugins/message_highlight/package.xml | 18 + plugins/new_user_dialog/localization/ar.inc | 20 + plugins/new_user_dialog/localization/ar_SA.inc | 19 + plugins/new_user_dialog/localization/ast.inc | 20 + plugins/new_user_dialog/localization/en_US.inc | 4 +- plugins/new_user_dialog/localization/es_AR.inc | 20 + plugins/new_user_dialog/localization/eu_ES.inc | 20 + plugins/new_user_dialog/localization/fa_AF.inc | 20 + plugins/new_user_dialog/localization/lb_LU.inc | 3 - plugins/new_user_dialog/localization/lv_LV.inc | 4 +- plugins/new_user_dialog/localization/ro_RO.inc | 4 +- plugins/new_user_dialog/new_user_dialog.php | 69 +- plugins/new_user_dialog/package.xml | 91 +- plugins/new_user_identity/new_user_identity.php | 11 +- plugins/new_user_identity/package.xml | 2 +- plugins/newmail_notifier/config.inc.php.dist | 6 +- plugins/newmail_notifier/localization/ast.inc | 28 + plugins/newmail_notifier/localization/bg_BG.inc | 28 + plugins/newmail_notifier/localization/el_GR.inc | 27 + plugins/newmail_notifier/localization/en_US.inc | 2 +- plugins/newmail_notifier/localization/es_AR.inc | 27 + plugins/newmail_notifier/localization/eu_ES.inc | 27 + plugins/newmail_notifier/localization/lb_LU.inc | 3 +- plugins/newmail_notifier/localization/lv_LV.inc | 16 +- plugins/newmail_notifier/localization/ro_RO.inc | 4 +- plugins/newmail_notifier/localization/ti.inc | 27 + plugins/newmail_notifier/newmail_notifier.js | 110 +- plugins/newmail_notifier/newmail_notifier.php | 85 +- plugins/newmail_notifier/package.xml | 8 +- plugins/newmail_notifier/sound.mp3 | Bin 0 -> 7488 bytes plugins/password/README | 116 +- plugins/password/config.inc.php.dist | 143 +- plugins/password/drivers/chpasswd.php | 2 +- plugins/password/drivers/cpanel.php | 110 +- plugins/password/drivers/dbmail.php | 2 +- plugins/password/drivers/directadmin.php | 3 +- plugins/password/drivers/expect.php | 2 +- plugins/password/drivers/hmail.php | 12 +- plugins/password/drivers/ldap.php | 2 +- plugins/password/drivers/ldap_simple.php | 2 +- plugins/password/drivers/pam.php | 4 +- plugins/password/drivers/pw_usermod.php | 2 +- plugins/password/drivers/sasl.php | 2 +- plugins/password/drivers/smb.php | 14 +- plugins/password/drivers/sql.php | 19 +- plugins/password/drivers/virtualmin.php | 13 +- plugins/password/drivers/xmail.php | 16 +- plugins/password/localization/ar.inc | 32 + plugins/password/localization/ar_SA.inc | 29 + plugins/password/localization/ast.inc | 32 + plugins/password/localization/be_BE.inc | 32 + plugins/password/localization/el_GR.inc | 32 + plugins/password/localization/en_US.inc | 2 +- plugins/password/localization/eu_ES.inc | 32 + plugins/password/localization/fa_AF.inc | 32 + plugins/password/localization/gl_ES.inc | 2 +- plugins/password/localization/lb_LU.inc | 5 - plugins/password/localization/lv_LV.inc | 16 +- plugins/password/localization/ro_RO.inc | 10 +- plugins/password/localization/ru_RU.inc | 4 +- plugins/password/localization/ti.inc | 32 + plugins/password/localization/uk_UA.inc | 32 + plugins/password/package.xml | 40 +- plugins/password/password.php | 82 +- plugins/quickrules/localization/cs_CZ.inc | 9 + plugins/quickrules/localization/de_CH.inc | 10 + plugins/quickrules/localization/de_DE.inc | 10 + plugins/quickrules/localization/en_GB.inc | 10 + plugins/quickrules/localization/en_US.inc | 10 + plugins/quickrules/localization/hu_HU.inc | 9 + plugins/quickrules/localization/it_IT.inc | 10 + plugins/quickrules/localization/pl_PL.inc | 9 + plugins/quickrules/localization/pt_BR.inc | 9 + plugins/quickrules/localization/pt_PT.inc | 9 + plugins/quickrules/package.xml | 79 + plugins/quickrules/quickrules.js | 169 + plugins/quickrules/quickrules.php | 137 + plugins/quickrules/skins/classic/ie6hacks.css | 14 + plugins/quickrules/skins/classic/mail_toolbar.gif | Bin 0 -> 1722 bytes plugins/quickrules/skins/classic/mail_toolbar.png | Bin 0 -> 3310 bytes .../quickrules/skins/classic/messageactions.gif | Bin 0 -> 571 bytes .../quickrules/skins/classic/messageactions.png | Bin 0 -> 842 bytes plugins/quickrules/skins/classic/quickrules.css | 26 + plugins/quickrules/skins/larry/ie6hacks.css | 3 + plugins/quickrules/skins/larry/mail_toolbar.png | Bin 0 -> 1350 bytes plugins/quickrules/skins/larry/messageactions.png | Bin 0 -> 672 bytes plugins/quickrules/skins/larry/quickrules.css | 21 + plugins/sauserprefs/config.inc.php.dist | 160 + .../include/rcube_sauserprefs_storage.php | 268 + plugins/sauserprefs/localization/cs_CZ.inc | 86 + plugins/sauserprefs/localization/de_CH.inc | 86 + plugins/sauserprefs/localization/de_DE.inc | 86 + plugins/sauserprefs/localization/en_GB.inc | 86 + plugins/sauserprefs/localization/en_US.inc | 86 + plugins/sauserprefs/localization/es_ES.inc | 85 + plugins/sauserprefs/localization/fr_FR.inc | 86 + plugins/sauserprefs/localization/gl_ES.inc | 85 + plugins/sauserprefs/localization/hu_HU.inc | 61 + plugins/sauserprefs/localization/it_IT.inc | 86 + plugins/sauserprefs/localization/pl_PL.inc | 86 + plugins/sauserprefs/localization/pt_BR.inc | 85 + plugins/sauserprefs/localization/ro_RO.inc | 85 + plugins/sauserprefs/localization/ru_RU.inc | 87 + plugins/sauserprefs/localization/sk_SK.inc | 86 + plugins/sauserprefs/localization/sv_SE.inc | 84 + plugins/sauserprefs/package.xml | 91 + plugins/sauserprefs/sauserprefs.js | 459 ++ plugins/sauserprefs/sauserprefs.php | 909 +++ plugins/sauserprefs/skins/classic/help.gif | Bin 0 -> 1024 bytes plugins/sauserprefs/skins/classic/icons.gif | Bin 0 -> 1345 bytes plugins/sauserprefs/skins/classic/icons.png | Bin 0 -> 2045 bytes plugins/sauserprefs/skins/classic/ie6hacks.css | 9 + plugins/sauserprefs/skins/classic/iehacks.css | 9 + plugins/sauserprefs/skins/classic/safari.css | 6 + plugins/sauserprefs/skins/classic/sauserprefs.css | 185 + plugins/sauserprefs/skins/classic/tabstyles.css | 3 + .../skins/classic/templates/sauserprefs.html | 47 + .../skins/classic/templates/settingsedit.html | 33 + plugins/sauserprefs/skins/larry/help.png | Bin 0 -> 475 bytes plugins/sauserprefs/skins/larry/icons.png | Bin 0 -> 962 bytes plugins/sauserprefs/skins/larry/iehacks.css | 9 + plugins/sauserprefs/skins/larry/listicons.png | Bin 0 -> 4891 bytes plugins/sauserprefs/skins/larry/safari.css | 6 + plugins/sauserprefs/skins/larry/sauserprefs.css | 253 + plugins/sauserprefs/skins/larry/tabstyles.css | 15 + .../skins/larry/templates/sauserprefs.html | 54 + .../skins/larry/templates/settingsedit.html | 30 + plugins/show_additional_headers/package.xml | 2 +- .../show_additional_headers.php | 6 +- plugins/sieverules/config.inc.php.dist | 147 + plugins/sieverules/importFilters/avelsieve.php | 54 + plugins/sieverules/importFilters/ingo.php | 52 + plugins/sieverules/include/rcube_sieve.php | 249 + plugins/sieverules/include/rcube_sieve_script.php | 969 +++ plugins/sieverules/jquery.maskedinput.js | 7 + plugins/sieverules/lib/Net/Sieve.php | 1 + plugins/sieverules/localization/ca_ES.inc | 168 + plugins/sieverules/localization/cs_CZ.inc | 195 + plugins/sieverules/localization/de_CH.inc | 192 + plugins/sieverules/localization/de_DE.inc | 192 + plugins/sieverules/localization/en_GB.inc | 205 + plugins/sieverules/localization/en_US.inc | 205 + plugins/sieverules/localization/es_AR.inc | 140 + plugins/sieverules/localization/es_ES.inc | 185 + plugins/sieverules/localization/et_EE.inc | 79 + plugins/sieverules/localization/fi_FI.inc | 186 + plugins/sieverules/localization/fr_FR.inc | 185 + plugins/sieverules/localization/hu_HU.inc | 171 + plugins/sieverules/localization/it_IT.inc | 202 + plugins/sieverules/localization/nl_NL.inc | 205 + plugins/sieverules/localization/pl_PL.inc | 205 + plugins/sieverules/localization/pt_BR.inc | 183 + plugins/sieverules/localization/pt_PT.inc | 183 + plugins/sieverules/localization/ro_RO.inc | 175 + plugins/sieverules/localization/ru_RU.inc | 182 + plugins/sieverules/localization/sk_SK.inc | 159 + plugins/sieverules/localization/sl_SI.inc | 185 + plugins/sieverules/localization/sv_SE.inc | 159 + plugins/sieverules/localization/zh_TW.inc | 192 + plugins/sieverules/package.xml | 116 + plugins/sieverules/sieverules.js | 1480 +++++ plugins/sieverules/sieverules.php | 2331 +++++++ plugins/sieverules/skins/classic/cross.gif | Bin 0 -> 577 bytes plugins/sieverules/skins/classic/help.gif | Bin 0 -> 1024 bytes plugins/sieverules/skins/classic/icons.gif | Bin 0 -> 2017 bytes plugins/sieverules/skins/classic/icons.png | Bin 0 -> 2748 bytes plugins/sieverules/skins/classic/ie6hacks.css | 10 + plugins/sieverules/skins/classic/iehacks.css | 53 + plugins/sieverules/skins/classic/safari.css | 8 + plugins/sieverules/skins/classic/sieverules.css | 406 ++ plugins/sieverules/skins/classic/tabstyles.css | 3 + .../skins/classic/templates/advancededitor.html | 55 + .../skins/classic/templates/editsieverule.html | 29 + .../skins/classic/templates/setupsieverules.html | 18 + .../skins/classic/templates/sieverules.html | 93 + plugins/sieverules/skins/classic/tick.gif | Bin 0 -> 545 bytes plugins/sieverules/skins/larry/cross.png | Bin 0 -> 342 bytes plugins/sieverules/skins/larry/help.png | Bin 0 -> 475 bytes plugins/sieverules/skins/larry/icons.png | Bin 0 -> 1773 bytes plugins/sieverules/skins/larry/iehacks.css | 53 + plugins/sieverules/skins/larry/listicons.png | Bin 0 -> 1345 bytes plugins/sieverules/skins/larry/safari.css | 8 + plugins/sieverules/skins/larry/sieverules.css | 435 ++ plugins/sieverules/skins/larry/tabstyles.css | 15 + .../skins/larry/templates/advancededitor.html | 60 + .../skins/larry/templates/editsieverule.html | 30 + .../skins/larry/templates/setupsieverules.html | 27 + .../skins/larry/templates/sieverules.html | 78 + plugins/sieverules/skins/larry/tick.png | Bin 0 -> 284 bytes plugins/squirrelmail_usercopy/config.inc.php.dist | 18 +- .../squirrelmail_usercopy.php | 18 +- .../subscriptions_option/localization/az_AZ.inc | 19 + .../subscriptions_option/localization/be_BE.inc | 19 + .../subscriptions_option/localization/bg_BG.inc | 19 + .../subscriptions_option/localization/el_GR.inc | 19 + .../subscriptions_option/localization/en_US.inc | 2 +- .../subscriptions_option/localization/es_AR.inc | 19 + .../subscriptions_option/localization/eu_ES.inc | 19 + .../subscriptions_option/localization/fa_AF.inc | 19 + .../subscriptions_option/localization/gl_ES.inc | 2 +- .../subscriptions_option/localization/id_ID.inc | 19 + .../subscriptions_option/localization/lb_LU.inc | 3 - .../subscriptions_option/localization/lv_LV.inc | 19 + .../subscriptions_option/localization/nn_NO.inc | 19 + .../subscriptions_option/localization/ro_RO.inc | 19 + .../subscriptions_option/localization/ru_RU.inc | 2 +- plugins/subscriptions_option/package.xml | 2 +- .../subscriptions_option/subscriptions_option.php | 9 +- plugins/thunderbird_labels/localization/bg_BG.inc | 17 + plugins/thunderbird_labels/localization/ca_ES.inc | 17 + plugins/thunderbird_labels/localization/cs_CZ.inc | 18 + plugins/thunderbird_labels/localization/de_DE.inc | 18 + plugins/thunderbird_labels/localization/en_US.inc | 18 + plugins/thunderbird_labels/localization/fr_FR.inc | 17 + plugins/thunderbird_labels/localization/hu_HU.inc | 18 + plugins/thunderbird_labels/localization/lv_LV.inc | 17 + plugins/thunderbird_labels/localization/pl_PL.inc | 18 + plugins/thunderbird_labels/localization/ru_RU.inc | 18 + .../thunderbird_labels/skins/classic/tb_label.css | 183 + .../skins/classic/thunderbird_32.png | Bin 0 -> 3232 bytes .../thunderbird_labels/skins/default/tb_label.css | 183 + .../skins/default/thunderbird_32.png | Bin 0 -> 3232 bytes .../thunderbird_labels/skins/larry/tb_label.css | 170 + .../skins/larry/thunderbird_32.png | Bin 0 -> 2662 bytes plugins/thunderbird_labels/tb_label.js | 369 + plugins/thunderbird_labels/thunderbird_labels.php | 210 + plugins/userinfo/localization/ar.inc | 21 + plugins/userinfo/localization/ast.inc | 22 + plugins/userinfo/localization/bg_BG.inc | 22 + plugins/userinfo/localization/el_GR.inc | 22 + plugins/userinfo/localization/en_US.inc | 2 +- plugins/userinfo/localization/es_AR.inc | 22 + plugins/userinfo/localization/eu_ES.inc | 22 + plugins/userinfo/localization/fa_AF.inc | 22 + plugins/userinfo/localization/fr_FR.inc | 0 plugins/userinfo/localization/lb_LU.inc | 3 - plugins/userinfo/localization/ro_RO.inc | 8 +- plugins/userinfo/localization/ti.inc | 22 + plugins/userinfo/userinfo.php | 24 +- plugins/vcard_attachments/localization/ar.inc | 20 + plugins/vcard_attachments/localization/ar_SA.inc | 20 + plugins/vcard_attachments/localization/bg_BG.inc | 20 + plugins/vcard_attachments/localization/el_GR.inc | 20 + plugins/vcard_attachments/localization/en_US.inc | 2 +- plugins/vcard_attachments/localization/es_AR.inc | 20 + plugins/vcard_attachments/localization/eu_ES.inc | 20 + plugins/vcard_attachments/localization/gl_ES.inc | 4 +- plugins/vcard_attachments/localization/lb_LU.inc | 3 - plugins/vcard_attachments/vcard_attachments.php | 15 +- plugins/virtuser_file/virtuser_file.php | 92 +- plugins/virtuser_query/package.xml | 8 +- plugins/virtuser_query/virtuser_query.php | 64 +- plugins/zipdownload/README | 2 +- plugins/zipdownload/config.inc.php.dist | 8 +- plugins/zipdownload/localization/ar.inc | 20 + plugins/zipdownload/localization/ar_SA.inc | 20 + plugins/zipdownload/localization/be_BE.inc | 20 + plugins/zipdownload/localization/bg_BG.inc | 20 + plugins/zipdownload/localization/el_GR.inc | 20 + plugins/zipdownload/localization/en_US.inc | 2 +- plugins/zipdownload/localization/eo.inc | 20 + plugins/zipdownload/localization/eu_ES.inc | 20 + plugins/zipdownload/localization/fa_AF.inc | 20 + plugins/zipdownload/localization/fi_FI.inc | 20 + plugins/zipdownload/localization/id_ID.inc | 20 + plugins/zipdownload/localization/ko_KR.inc | 20 + plugins/zipdownload/localization/lb_LU.inc | 3 - plugins/zipdownload/localization/lv_LV.inc | 20 + plugins/zipdownload/localization/ro_RO.inc | 4 +- plugins/zipdownload/localization/ru_RU.inc | 2 +- plugins/zipdownload/localization/sl_SI.inc | 20 + plugins/zipdownload/localization/uk_UA.inc | 20 + plugins/zipdownload/localization/zh_CN.inc | 20 + plugins/zipdownload/skins/larry/zipdownload.css | 4 +- plugins/zipdownload/zipdownload.php | 27 +- program/include/bc.php | 16 +- program/include/iniset.php | 9 +- program/include/rcmail.php | 393 +- program/include/rcmail_output_html.php | 145 +- program/js/app.js | 7016 +------------------- program/js/common.js | 724 +- program/js/editor.js | 2 +- program/js/googiespell.js | 1136 +--- program/js/jquery.min.js | 3 +- program/js/jstz.min.js | 13 +- program/js/list.js | 1607 +---- program/lib/Crypt/GPG.php | 2542 +++++++ program/lib/Crypt/GPG/DecryptStatusHandler.php | 336 + program/lib/Crypt/GPG/Engine.php | 1758 +++++ program/lib/Crypt/GPG/Exceptions.php | 473 ++ program/lib/Crypt/GPG/Key.php | 223 + program/lib/Crypt/GPG/Signature.php | 428 ++ program/lib/Crypt/GPG/SubKey.php | 649 ++ program/lib/Crypt/GPG/UserId.php | 373 ++ program/lib/Crypt/GPG/VerifyStatusHandler.php | 216 + program/lib/Net/Sieve.php | 1274 ++++ program/lib/Roundcube/bootstrap.php | 30 +- program/lib/Roundcube/html.php | 70 +- program/lib/Roundcube/rcube.php | 302 +- program/lib/Roundcube/rcube_addressbook.php | 32 +- program/lib/Roundcube/rcube_base_replacer.php | 2 +- program/lib/Roundcube/rcube_browser.php | 2 +- program/lib/Roundcube/rcube_cache.php | 45 +- program/lib/Roundcube/rcube_config.php | 251 +- program/lib/Roundcube/rcube_contacts.php | 4 - program/lib/Roundcube/rcube_content_filter.php | 2 +- program/lib/Roundcube/rcube_csv2vcard.php | 49 +- program/lib/Roundcube/rcube_db.php | 107 +- program/lib/Roundcube/rcube_db_mssql.php | 32 +- program/lib/Roundcube/rcube_db_mysql.php | 23 +- program/lib/Roundcube/rcube_db_pgsql.php | 47 +- program/lib/Roundcube/rcube_db_sqlite.php | 47 +- program/lib/Roundcube/rcube_db_sqlsrv.php | 29 +- program/lib/Roundcube/rcube_enriched.php | 2 +- program/lib/Roundcube/rcube_image.php | 99 +- program/lib/Roundcube/rcube_imap.php | 279 +- program/lib/Roundcube/rcube_imap_cache.php | 219 +- program/lib/Roundcube/rcube_imap_generic.php | 282 +- program/lib/Roundcube/rcube_ldap.php | 1322 ++-- program/lib/Roundcube/rcube_ldap_generic.php | 6 + program/lib/Roundcube/rcube_message.php | 107 +- program/lib/Roundcube/rcube_mime.php | 32 +- program/lib/Roundcube/rcube_plugin.php | 36 +- program/lib/Roundcube/rcube_plugin_api.php | 122 +- program/lib/Roundcube/rcube_result_set.php | 47 +- program/lib/Roundcube/rcube_session.php | 142 +- program/lib/Roundcube/rcube_smtp.php | 12 +- program/lib/Roundcube/rcube_spellcheck_atd.php | 204 + program/lib/Roundcube/rcube_spellcheck_enchant.php | 182 + program/lib/Roundcube/rcube_spellcheck_engine.php | 91 + program/lib/Roundcube/rcube_spellcheck_googie.php | 176 + program/lib/Roundcube/rcube_spellcheck_pspell.php | 189 + program/lib/Roundcube/rcube_spellchecker.php | 163 +- program/lib/Roundcube/rcube_storage.php | 22 +- program/lib/Roundcube/rcube_string_replacer.php | 13 +- program/lib/Roundcube/rcube_user.php | 9 +- program/lib/Roundcube/rcube_utils.php | 84 +- program/lib/Roundcube/rcube_vcard.php | 15 +- program/lib/Roundcube/rcube_washtml.php | 21 +- program/localization/ar_SA/labels.inc | 5 - program/localization/ar_SA/messages.inc | 9 +- program/localization/ast/labels.inc | 5 - program/localization/ast/messages.inc | 9 +- program/localization/az_AZ/labels.inc | 5 - program/localization/az_AZ/messages.inc | 9 +- program/localization/be_BE/labels.inc | 5 - program/localization/be_BE/messages.inc | 9 +- program/localization/bg_BG/labels.inc | 5 - program/localization/bg_BG/messages.inc | 9 +- program/localization/bn_BD/labels.inc | 5 - program/localization/bn_BD/messages.inc | 9 +- program/localization/br/labels.inc | 5 - program/localization/br/messages.inc | 9 +- program/localization/bs_BA/labels.inc | 7 +- program/localization/bs_BA/messages.inc | 9 +- program/localization/ca_ES/labels.inc | 5 - program/localization/ca_ES/messages.inc | 9 +- program/localization/cs_CZ/labels.inc | 7 +- program/localization/cs_CZ/messages.inc | 6 +- program/localization/cy_GB/labels.inc | 7 +- program/localization/cy_GB/messages.inc | 9 +- program/localization/da_DK/labels.inc | 7 +- program/localization/da_DK/messages.inc | 9 +- program/localization/de_CH/labels.inc | 5 - program/localization/de_CH/messages.inc | 2 - program/localization/de_DE/labels.inc | 7 +- program/localization/de_DE/messages.inc | 9 +- program/localization/el_GR/labels.inc | 5 - program/localization/el_GR/messages.inc | 9 +- program/localization/en_GB/labels.inc | 5 - program/localization/en_GB/messages.inc | 13 +- program/localization/en_US/csv2vcard.inc | 19 +- program/localization/en_US/labels.inc | 20 +- program/localization/en_US/labels.inc.orig | 537 ++ program/localization/en_US/messages.inc | 19 +- program/localization/eo/labels.inc | 5 - program/localization/eo/messages.inc | 9 +- program/localization/es_AR/labels.inc | 5 - program/localization/es_AR/messages.inc | 9 +- program/localization/es_ES/labels.inc | 7 +- program/localization/es_ES/messages.inc | 2 - program/localization/et_EE/labels.inc | 5 +- program/localization/et_EE/messages.inc | 2 - program/localization/eu_ES/labels.inc | 5 - program/localization/eu_ES/messages.inc | 195 +- program/localization/fa_AF/labels.inc | 5 - program/localization/fa_AF/messages.inc | 55 +- program/localization/fa_IR/labels.inc | 5 - program/localization/fa_IR/messages.inc | 163 +- program/localization/fi_FI/labels.inc | 3 - program/localization/fi_FI/messages.inc | 4 +- program/localization/fr_FR/labels.inc | 9 +- program/localization/fr_FR/messages.inc | 210 +- program/localization/fy_NL/labels.inc | 5 - program/localization/fy_NL/messages.inc | 171 +- program/localization/ga_IE/labels.inc | 5 - program/localization/ga_IE/messages.inc | 9 +- program/localization/gl_ES/labels.inc | 7 +- program/localization/gl_ES/messages.inc | 2 - program/localization/he_IL/labels.inc | 5 - program/localization/he_IL/messages.inc | 2 - program/localization/hi_IN/labels.inc | 5 - program/localization/hi_IN/messages.inc | 9 +- program/localization/hr_HR/labels.inc | 5 - program/localization/hr_HR/messages.inc | 9 +- program/localization/hu_HU/labels.inc | 5 - program/localization/hu_HU/messages.inc | 9 +- program/localization/hy_AM/labels.inc | 5 - program/localization/hy_AM/messages.inc | 9 +- program/localization/ia/labels.inc | 5 - program/localization/ia/messages.inc | 9 +- program/localization/id_ID/labels.inc | 18 +- program/localization/id_ID/messages.inc | 11 +- program/localization/index.inc | 2 - program/localization/is_IS/labels.inc | 5 - program/localization/is_IS/messages.inc | 9 +- program/localization/it_IT/labels.inc | 5 - program/localization/it_IT/messages.inc | 11 +- program/localization/ja_JP/labels.inc | 5 - program/localization/ja_JP/messages.inc | 9 +- program/localization/ka_GE/labels.inc | 5 - program/localization/ka_GE/messages.inc | 9 +- program/localization/km_KH/labels.inc | 5 - program/localization/km_KH/messages.inc | 9 +- program/localization/ko_KR/labels.inc | 5 - program/localization/ko_KR/messages.inc | 9 +- program/localization/ku/labels.inc | 5 - program/localization/ku/messages.inc | 9 +- program/localization/lb_LU/labels.inc | 77 +- program/localization/lb_LU/messages.inc | 7 +- program/localization/lt_LT/labels.inc | 5 - program/localization/lt_LT/messages.inc | 9 +- program/localization/lv_LV/labels.inc | 323 +- program/localization/lv_LV/messages.inc | 90 +- program/localization/mk_MK/labels.inc | 5 - program/localization/mk_MK/messages.inc | 9 +- program/localization/ml_IN/labels.inc | 5 - program/localization/ml_IN/messages.inc | 9 +- program/localization/mr_IN/labels.inc | 5 - program/localization/mr_IN/messages.inc | 9 +- program/localization/ms_MY/labels.inc | 5 - program/localization/ms_MY/messages.inc | 9 +- program/localization/nb_NO/labels.inc | 5 - program/localization/nb_NO/messages.inc | 9 +- program/localization/ne_NP/labels.inc | 5 - program/localization/ne_NP/messages.inc | 9 +- program/localization/nl_BE/labels.inc | 5 - program/localization/nl_BE/messages.inc | 9 +- program/localization/nl_NL/labels.inc | 5 - program/localization/nl_NL/messages.inc | 9 +- program/localization/nn_NO/labels.inc | 5 - program/localization/nn_NO/messages.inc | 9 +- program/localization/pl_PL/labels.inc | 5 - program/localization/pl_PL/messages.inc | 2 - program/localization/ps/labels.inc | 5 - program/localization/ps/messages.inc | 9 +- program/localization/pt_BR/labels.inc | 9 +- program/localization/pt_BR/messages.inc | 9 +- program/localization/pt_PT/labels.inc | 5 - program/localization/pt_PT/messages.inc | 9 +- program/localization/ro_RO/labels.inc | 3 - program/localization/ro_RO/messages.inc | 62 +- program/localization/ru_RU/labels.inc | 20 +- program/localization/ru_RU/messages.inc | 175 +- program/localization/si_LK/labels.inc | 5 - program/localization/si_LK/messages.inc | 9 +- program/localization/sk_SK/labels.inc | 5 - program/localization/sk_SK/messages.inc | 9 +- program/localization/sl_SI/labels.inc | 13 +- program/localization/sl_SI/messages.inc | 2 - program/localization/sq_AL/labels.inc | 5 - program/localization/sq_AL/messages.inc | 9 +- program/localization/sr_CS/labels.inc | 5 - program/localization/sr_CS/messages.inc | 9 +- program/localization/sv_SE/labels.inc | 5 - program/localization/sv_SE/messages.inc | 63 +- program/localization/ta_IN/labels.inc | 5 - program/localization/ta_IN/messages.inc | 9 +- program/localization/th_TH/labels.inc | 5 - program/localization/th_TH/messages.inc | 9 +- program/localization/tr_TR/labels.inc | 7 +- program/localization/tr_TR/messages.inc | 2 - program/localization/uk_UA/labels.inc | 533 +- program/localization/uk_UA/messages.inc | 115 +- program/localization/ur_PK/labels.inc | 40 + program/localization/ur_PK/messages.inc | 18 + program/localization/vi_VN/labels.inc | 5 - program/localization/vi_VN/messages.inc | 9 +- program/localization/zh_CN/labels.inc | 5 - program/localization/zh_CN/messages.inc | 136 +- program/localization/zh_TW/labels.inc | 5 - program/localization/zh_TW/messages.inc | 9 +- program/steps/addressbook/copy.inc | 12 +- program/steps/addressbook/delete.inc | 38 +- program/steps/addressbook/export.inc | 113 +- program/steps/addressbook/func.inc | 187 +- program/steps/addressbook/import.inc | 71 +- program/steps/addressbook/list.inc | 49 +- program/steps/addressbook/save.inc | 29 +- program/steps/addressbook/show.inc | 63 +- program/steps/addressbook/undo.inc | 25 +- program/steps/mail/attachments.inc | 5 +- program/steps/mail/check_recent.inc | 9 +- program/steps/mail/compose.inc | 103 +- program/steps/mail/func.inc | 336 +- program/steps/mail/func.inc.orig | 1964 ++++++ program/steps/mail/get.inc | 86 +- program/steps/mail/list.inc | 1 + program/steps/mail/list_contacts.inc | 29 +- program/steps/mail/move_del.inc | 11 +- program/steps/mail/sendmail.inc | 30 +- program/steps/mail/show.inc | 61 +- program/steps/mail/show.inc.orig | 315 + program/steps/settings/about.inc | 67 +- program/steps/settings/edit_folder.inc | 5 +- program/steps/settings/edit_prefs.inc | 2 +- program/steps/settings/edit_response.inc | 107 + program/steps/settings/folders.inc | 16 +- program/steps/settings/func.inc | 1961 +++--- program/steps/settings/responses.inc | 128 + program/steps/settings/save_prefs.inc | 4 - program/steps/utils/save_pref.inc | 22 +- program/steps/utils/spell.inc | 7 - program/steps/utils/spell_html.inc | 5 - skins/classic/addressbook.css | 79 +- skins/classic/common.css | 88 +- skins/classic/embed.css | 2 +- skins/classic/functions.js | 283 +- skins/classic/ie6hacks.css | 24 +- skins/classic/iehacks.css | 6 +- skins/classic/images/favicon.ico | Bin 34494 -> 1150 bytes skins/classic/images/mail_toolbar.png | Bin 40806 -> 36649 bytes skins/classic/includes/messagetoolbar.html | 2 +- skins/classic/mail.css | 388 +- skins/classic/settings.css | 16 +- skins/classic/templates/about.html | 7 - skins/classic/templates/addressbook.html | 28 +- skins/classic/templates/compose.html | 25 +- skins/classic/templates/contact.html | 2 +- skins/classic/templates/contactadd.html | 9 +- skins/classic/templates/contactedit.html | 9 +- skins/classic/templates/folders.html | 6 +- skins/classic/templates/login.html | 2 +- skins/classic/templates/mail.html | 18 +- skins/classic/templates/message.html | 28 +- skins/classic/templates/messageerror.html | 8 +- skins/classic/templates/messagepart.html | 38 +- skins/classic/templates/messagepreview.html | 26 +- skins/classic/templates/responseedit.html | 24 + skins/classic/templates/responses.html | 46 + skins/larry/addressbook.css | 88 +- skins/larry/embed.css | 2 +- skins/larry/ie7hacks.css | 1 - skins/larry/iehacks.css | 9 +- skins/larry/images/buttons.gif | Bin 14997 -> 13054 bytes skins/larry/images/buttons.png | Bin 50162 -> 36693 bytes skins/larry/images/favicon.ico | Bin 34494 -> 1150 bytes skins/larry/images/listicons.png | Bin 26384 -> 25486 bytes skins/larry/includes/footer.html | 12 - skins/larry/includes/header.html | 8 +- skins/larry/mail.css | 446 +- skins/larry/settings.css | 12 +- skins/larry/styles.css | 201 +- skins/larry/svggradients.css | 7 +- skins/larry/templates/about.html | 4 - skins/larry/templates/addressbook.html | 23 +- skins/larry/templates/compose.html | 16 +- skins/larry/templates/contact.html | 2 +- skins/larry/templates/contactedit.html | 2 +- skins/larry/templates/importcontacts.html | 9 +- skins/larry/templates/login.html | 4 +- skins/larry/templates/mail.html | 17 +- skins/larry/templates/message.html | 27 +- skins/larry/templates/messageerror.html | 2 +- skins/larry/templates/messagepart.html | 34 +- skins/larry/templates/messagepreview.html | 19 - skins/larry/templates/responseedit.html | 22 + skins/larry/templates/responses.html | 41 + skins/larry/ui.js | 217 +- skins/larry/watermark.html | 2 +- temp/.htaccess | 2 - tests/Framework/Browser.php | 203 + tests/Framework/Mime.php | 4 + tests/Framework/StringReplacer.php | 16 + tests/Framework/Utils.php | 32 + tests/MailFunc.php | 88 +- tests/phpunit.xml | 1 + tests/src/media.css | 22 + 1224 files changed, 51639 insertions(+), 31684 deletions(-) create mode 100755 bin/package2composer.sh create mode 100755 bin/transifexpull.sh delete mode 100644 config/.htaccess delete mode 100644 logs/.htaccess create mode 100644 main.inc.php.dist create mode 100644 plugins/acl/localization/be_BE.inc create mode 100644 plugins/acl/localization/bg_BG.inc create mode 100644 plugins/acl/localization/el_GR.inc create mode 100644 plugins/acl/localization/es_AR.inc create mode 100644 plugins/acl/localization/eu_ES.inc create mode 100644 plugins/acl/localization/lv_LV.inc create mode 100644 plugins/acl/localization/th_TH.inc create mode 100644 plugins/acl/localization/ti.inc create mode 100644 plugins/archive/localization/ar.inc create mode 100644 plugins/archive/localization/ast.inc create mode 100644 plugins/archive/localization/bn_BD.inc create mode 100644 plugins/archive/localization/eu_ES.inc create mode 100644 plugins/archive/localization/fa_AF.inc create mode 100644 plugins/archive/localization/hi_IN.inc create mode 100644 plugins/archive/localization/ia.inc create mode 100644 plugins/archive/localization/mn_MN.inc create mode 100644 plugins/archive/localization/ms_MY.inc create mode 100644 plugins/archive/localization/my_MM.inc create mode 100644 plugins/archive/localization/nb_NB.inc create mode 100644 plugins/archive/localization/nl_BE.inc create mode 100644 plugins/archive/localization/nqo.inc create mode 100644 plugins/archive/localization/om.inc create mode 100644 plugins/archive/localization/te_IN.inc create mode 100644 plugins/archive/localization/th_TH.inc create mode 100644 plugins/archive/localization/ti.inc create mode 100644 plugins/archive/localization/tzm.inc create mode 100644 plugins/archive/localization/ur_PK.inc create mode 100644 plugins/attachment_reminder/localization/ar.inc create mode 100644 plugins/attachment_reminder/localization/ar_SA.inc create mode 100644 plugins/attachment_reminder/localization/az_AZ.inc create mode 100644 plugins/attachment_reminder/localization/be_BE.inc create mode 100644 plugins/attachment_reminder/localization/bg_BG.inc create mode 100644 plugins/attachment_reminder/localization/bn_BD.inc create mode 100644 plugins/attachment_reminder/localization/bs_BA.inc create mode 100644 plugins/attachment_reminder/localization/ca_ES.inc create mode 100644 plugins/attachment_reminder/localization/cs_CZ.inc create mode 100644 plugins/attachment_reminder/localization/cy_GB.inc create mode 100644 plugins/attachment_reminder/localization/da_DK.inc create mode 100644 plugins/attachment_reminder/localization/el_GR.inc create mode 100644 plugins/attachment_reminder/localization/eo.inc create mode 100644 plugins/attachment_reminder/localization/es_AR.inc create mode 100644 plugins/attachment_reminder/localization/et_EE.inc create mode 100644 plugins/attachment_reminder/localization/eu_ES.inc create mode 100644 plugins/attachment_reminder/localization/fa_AF.inc create mode 100644 plugins/attachment_reminder/localization/fa_IR.inc create mode 100644 plugins/attachment_reminder/localization/fi_FI.inc create mode 100644 plugins/attachment_reminder/localization/gl_ES.inc create mode 100644 plugins/attachment_reminder/localization/he_IL.inc create mode 100644 plugins/attachment_reminder/localization/hi_IN.inc create mode 100644 plugins/attachment_reminder/localization/hu_HU.inc create mode 100644 plugins/attachment_reminder/localization/hy_AM.inc create mode 100644 plugins/attachment_reminder/localization/ia.inc create mode 100644 plugins/attachment_reminder/localization/id_ID.inc create mode 100644 plugins/attachment_reminder/localization/ja_JP.inc create mode 100644 plugins/attachment_reminder/localization/ko_KR.inc create mode 100644 plugins/attachment_reminder/localization/lt_LT.inc create mode 100644 plugins/attachment_reminder/localization/lv_LV.inc create mode 100644 plugins/attachment_reminder/localization/ml_IN.inc create mode 100644 plugins/attachment_reminder/localization/mn_MN.inc create mode 100644 plugins/attachment_reminder/localization/ms_MY.inc create mode 100644 plugins/attachment_reminder/localization/my_MM.inc create mode 100644 plugins/attachment_reminder/localization/nb_NO.inc create mode 100644 plugins/attachment_reminder/localization/nl_BE.inc create mode 100644 plugins/attachment_reminder/localization/nn_NO.inc create mode 100644 plugins/attachment_reminder/localization/nqo.inc create mode 100644 plugins/attachment_reminder/localization/om.inc create mode 100644 plugins/attachment_reminder/localization/pt_BR.inc create mode 100644 plugins/attachment_reminder/localization/pt_PT.inc create mode 100644 plugins/attachment_reminder/localization/ro_RO.inc create mode 100644 plugins/attachment_reminder/localization/ru_RU.inc create mode 100644 plugins/attachment_reminder/localization/sk_SK.inc create mode 100644 plugins/attachment_reminder/localization/sl_SI.inc create mode 100644 plugins/attachment_reminder/localization/sr_CS.inc create mode 100644 plugins/attachment_reminder/localization/sv_SE.inc create mode 100644 plugins/attachment_reminder/localization/te_IN.inc create mode 100644 plugins/attachment_reminder/localization/th_TH.inc create mode 100644 plugins/attachment_reminder/localization/ti.inc create mode 100644 plugins/attachment_reminder/localization/tr_TR.inc create mode 100644 plugins/attachment_reminder/localization/tzm.inc create mode 100644 plugins/attachment_reminder/localization/uk_UA.inc create mode 100644 plugins/attachment_reminder/localization/ur_PK.inc create mode 100644 plugins/attachment_reminder/localization/vi_VN.inc create mode 100644 plugins/compose_addressbook/compose_addressbook.js create mode 100644 plugins/compose_addressbook/compose_addressbook.php create mode 100644 plugins/compose_addressbook/config.inc.php.dist create mode 100644 plugins/compose_addressbook/localization/de_DE.inc create mode 100644 plugins/compose_addressbook/localization/en_GB.inc create mode 100644 plugins/compose_addressbook/localization/en_US.inc create mode 100644 plugins/compose_addressbook/localization/es_ES.inc create mode 100644 plugins/compose_addressbook/localization/fr_FR.inc create mode 100644 plugins/compose_addressbook/localization/it_IT.inc create mode 100644 plugins/compose_addressbook/localization/nl_NL.inc create mode 100644 plugins/compose_addressbook/localization/pl_PL.inc create mode 100644 plugins/compose_addressbook/localization/sv_SE.inc create mode 100644 plugins/compose_addressbook/localization/zh_TW.inc create mode 100644 plugins/compose_addressbook/package.xml create mode 100644 plugins/compose_addressbook/skins/classic/compose_addressbook.css create mode 100644 plugins/compose_addressbook/skins/classic/compose_addressbook.png create mode 100644 plugins/compose_addressbook/skins/classic/searchfield.gif create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-anim_basic_16x16.gif create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_75_ffffff_40x100.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_222222_256x240.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_2e83ff_256x240.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_454545_256x240.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_888888_256x240.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_cd0a0a_256x240.png create mode 100644 plugins/compose_addressbook/skins/classic/smoothness/jquery-ui-1.8.2.custom.css create mode 100644 plugins/contextmenu/contextmenu.js create mode 100644 plugins/contextmenu/contextmenu.php create mode 100644 plugins/contextmenu/jquery.contextMenu.js create mode 120000 plugins/contextmenu/jquery.mousewheel.js create mode 100644 plugins/contextmenu/localization/ca_ES.inc create mode 100644 plugins/contextmenu/localization/cs_CZ.inc create mode 100644 plugins/contextmenu/localization/da_DK.inc create mode 100644 plugins/contextmenu/localization/de_CH.inc create mode 100644 plugins/contextmenu/localization/de_DE.inc create mode 100644 plugins/contextmenu/localization/en_GB.inc create mode 100644 plugins/contextmenu/localization/en_US.inc create mode 100644 plugins/contextmenu/localization/es_ES.inc create mode 100644 plugins/contextmenu/localization/fr_FR.inc create mode 100644 plugins/contextmenu/localization/gl_ES.inc create mode 100644 plugins/contextmenu/localization/hu_HU.inc create mode 100644 plugins/contextmenu/localization/it_IT.inc create mode 100644 plugins/contextmenu/localization/nl_NL.inc create mode 100644 plugins/contextmenu/localization/pl_PL.inc create mode 100644 plugins/contextmenu/localization/pt_BR.inc create mode 100644 plugins/contextmenu/localization/ro_RO.inc create mode 100644 plugins/contextmenu/localization/ru_RU.inc create mode 100644 plugins/contextmenu/localization/sv_SE.inc create mode 100644 plugins/contextmenu/localization/tr_TR.inc create mode 100644 plugins/contextmenu/localization/uk_UA.inc create mode 100644 plugins/contextmenu/localization/zh_TW.inc create mode 100644 plugins/contextmenu/package.xml create mode 100644 plugins/contextmenu/skins/classic/contexticons.gif create mode 100644 plugins/contextmenu/skins/classic/contexticons.png create mode 100644 plugins/contextmenu/skins/classic/contextmenu.css create mode 100644 plugins/contextmenu/skins/classic/folders.gif create mode 100644 plugins/contextmenu/skins/classic/folders.png create mode 100644 plugins/contextmenu/skins/classic/ie6hacks.css create mode 100644 plugins/contextmenu/skins/classic/messageactions.gif create mode 100644 plugins/contextmenu/skins/classic/messageactions.png create mode 100644 plugins/contextmenu/skins/larry/contexticons.png create mode 100644 plugins/contextmenu/skins/larry/contextmenu.css create mode 100644 plugins/contextmenu/skins/larry/folders.png create mode 100644 plugins/contextmenu/skins/larry/ie6hacks.css create mode 100644 plugins/contextmenu/skins/larry/messageactions.png create mode 100644 plugins/copymessage/copymessage.js create mode 100644 plugins/copymessage/copymessage.php create mode 100644 plugins/copymessage/localization/ca_ES.inc create mode 100644 plugins/copymessage/localization/cs_CZ.inc create mode 100644 plugins/copymessage/localization/da_DK.inc create mode 100644 plugins/copymessage/localization/de_CH.inc create mode 100644 plugins/copymessage/localization/de_DE.inc create mode 100644 plugins/copymessage/localization/en_GB.inc create mode 100644 plugins/copymessage/localization/en_US.inc create mode 100644 plugins/copymessage/localization/es_ES.inc create mode 100644 plugins/copymessage/localization/fr_FR.inc create mode 100644 plugins/copymessage/localization/gl_ES.inc create mode 100644 plugins/copymessage/localization/hu_HU.inc create mode 100644 plugins/copymessage/localization/it_IT.inc create mode 100644 plugins/copymessage/localization/nl_NL.inc create mode 100644 plugins/copymessage/localization/pl_PL.inc create mode 100644 plugins/copymessage/localization/pt_BR.inc create mode 100644 plugins/copymessage/localization/ro_RO.inc create mode 100644 plugins/copymessage/localization/ru_RU.inc create mode 100644 plugins/copymessage/localization/sv_SE.inc create mode 100644 plugins/copymessage/localization/tr_TR.inc create mode 100644 plugins/copymessage/package.xml create mode 100644 plugins/dkimstatus/dkimstatus.php create mode 100644 plugins/dkimstatus/images/authorsign.png create mode 100644 plugins/dkimstatus/images/invalidsig.png create mode 100644 plugins/dkimstatus/images/nosiginfo.png create mode 100644 plugins/dkimstatus/images/thirdpty.png create mode 100644 plugins/dkimstatus/localization/cs_CZ.inc create mode 100644 plugins/dkimstatus/localization/de_DE.inc create mode 100644 plugins/dkimstatus/localization/en_US.inc create mode 100644 plugins/dkimstatus/localization/es_ES.inc create mode 100644 plugins/dkimstatus/localization/fr_FR.inc create mode 100644 plugins/dkimstatus/localization/it_IT.inc create mode 100644 plugins/dkimstatus/localization/ja_JP.inc create mode 100644 plugins/dkimstatus/localization/pl_PL.inc create mode 100644 plugins/dkimstatus/localization/ro_RO.inc create mode 100644 plugins/dovecot_impersonate/config.inc.php.dist create mode 100644 plugins/dovecot_impersonate/dovecot_impersonate.php create mode 100644 plugins/dovecot_impersonate/package.xml delete mode 100644 plugins/enigma/README delete mode 100644 plugins/enigma/config.inc.php.dist delete mode 100644 plugins/enigma/enigma.js delete mode 100644 plugins/enigma/enigma.php delete mode 100644 plugins/enigma/home/.htaccess create mode 100644 plugins/enigma/home/aldric/pubring.gpg create mode 100644 plugins/enigma/home/aldric/secring.gpg create mode 100644 plugins/enigma/home/aldric/trustdb.gpg create mode 100644 plugins/enigma/home/hugues/pubring.gpg create mode 100644 plugins/enigma/home/hugues/secring.gpg create mode 100644 plugins/enigma/home/hugues/trustdb.gpg delete mode 100644 plugins/enigma/lib/Crypt/GPG.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/DecryptStatusHandler.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/Engine.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/Exceptions.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/Key.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/Signature.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/SubKey.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/UserId.php delete mode 100644 plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php delete mode 100644 plugins/enigma/lib/enigma_driver.php delete mode 100644 plugins/enigma/lib/enigma_driver_gnupg.php delete mode 100644 plugins/enigma/lib/enigma_engine.php delete mode 100644 plugins/enigma/lib/enigma_error.php delete mode 100644 plugins/enigma/lib/enigma_key.php delete mode 100644 plugins/enigma/lib/enigma_signature.php delete mode 100644 plugins/enigma/lib/enigma_subkey.php delete mode 100644 plugins/enigma/lib/enigma_ui.php delete mode 100644 plugins/enigma/lib/enigma_userid.php delete mode 100644 plugins/enigma/localization/en_US.inc delete mode 100644 plugins/enigma/localization/ja_JP.inc delete mode 100644 plugins/enigma/localization/ru_RU.inc delete mode 100644 plugins/enigma/skins/classic/enigma.css delete mode 100644 plugins/enigma/skins/classic/enigma.png delete mode 100644 plugins/enigma/skins/classic/enigma_error.png delete mode 100644 plugins/enigma/skins/classic/key.png delete mode 100644 plugins/enigma/skins/classic/key_add.png delete mode 100644 plugins/enigma/skins/classic/keys_toolbar.png delete mode 100644 plugins/enigma/skins/classic/templates/keyimport.html delete mode 100644 plugins/enigma/skins/classic/templates/keyinfo.html delete mode 100644 plugins/enigma/skins/classic/templates/keys.html delete mode 100644 plugins/enigma/tests/Enigma.php create mode 100644 plugins/fail2ban/fail2ban.php create mode 100644 plugins/help/content/about.html create mode 100644 plugins/help/localization/ar.inc create mode 100644 plugins/help/localization/ast.inc create mode 100644 plugins/help/localization/be_BE.inc create mode 100644 plugins/help/localization/bg_BG.inc create mode 100644 plugins/help/localization/bn_BD.inc create mode 100644 plugins/help/localization/el_GR.inc create mode 100644 plugins/help/localization/es_AR.inc create mode 100644 plugins/help/localization/eu_ES.inc create mode 100644 plugins/help/localization/fa_AF.inc create mode 100644 plugins/help/localization/hi_IN.inc create mode 100644 plugins/help/localization/ia.inc create mode 100644 plugins/help/localization/lv_LV.inc create mode 100644 plugins/help/localization/ml_IN.inc create mode 100644 plugins/help/localization/mn_MN.inc create mode 100644 plugins/help/localization/ms_MY.inc create mode 100644 plugins/help/localization/my_MM.inc create mode 100644 plugins/help/localization/nl_BE.inc create mode 100644 plugins/help/localization/nqo.inc create mode 100644 plugins/help/localization/om.inc create mode 100644 plugins/help/localization/ro_RO.inc create mode 100644 plugins/help/localization/te_IN.inc create mode 100644 plugins/help/localization/th_TH.inc create mode 100644 plugins/help/localization/ti.inc create mode 100644 plugins/help/localization/tzm.inc create mode 100644 plugins/help/localization/uk_UA.inc create mode 100644 plugins/help/localization/ur_PK.inc create mode 100644 plugins/hide_blockquote/localization/ar.inc create mode 100644 plugins/hide_blockquote/localization/ar_SA.inc create mode 100644 plugins/hide_blockquote/localization/be_BE.inc create mode 100644 plugins/hide_blockquote/localization/bg_BG.inc create mode 100644 plugins/hide_blockquote/localization/bn_BD.inc create mode 100644 plugins/hide_blockquote/localization/el_GR.inc create mode 100644 plugins/hide_blockquote/localization/es_AR.inc create mode 100644 plugins/hide_blockquote/localization/eu_ES.inc create mode 100644 plugins/hide_blockquote/localization/fa_AF.inc create mode 100644 plugins/hide_blockquote/localization/hi_IN.inc create mode 100644 plugins/hide_blockquote/localization/ia.inc create mode 100644 plugins/hide_blockquote/localization/lv_LV.inc create mode 100644 plugins/hide_blockquote/localization/ml_IN.inc create mode 100644 plugins/hide_blockquote/localization/mn_MN.inc create mode 100644 plugins/hide_blockquote/localization/ms_MY.inc create mode 100644 plugins/hide_blockquote/localization/my_MM.inc create mode 100644 plugins/hide_blockquote/localization/nl_BE.inc create mode 100644 plugins/hide_blockquote/localization/nqo.inc create mode 100644 plugins/hide_blockquote/localization/om.inc create mode 100644 plugins/hide_blockquote/localization/ro_RO.inc create mode 100644 plugins/hide_blockquote/localization/te_IN.inc create mode 100644 plugins/hide_blockquote/localization/th_TH.inc create mode 100644 plugins/hide_blockquote/localization/ti.inc create mode 100644 plugins/hide_blockquote/localization/tzm.inc create mode 100644 plugins/hide_blockquote/localization/uk_UA.inc create mode 100644 plugins/hide_blockquote/localization/ur_PK.inc mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery-ui-i18n.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-af.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar-DZ.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ar.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-az.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-bg.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-bs.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ca.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-cs.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-cy-GB.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-da.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-de.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-el.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-AU.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-GB.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-en-NZ.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-eo.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-es.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-et.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-eu.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-fa.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-fi.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-fo.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr-CH.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-fr.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-gl.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-he.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-hi.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-hr.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-hu.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-hy.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-id.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-is.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-it.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ja.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ka.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-kk.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-km.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ko.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-lb.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-lt.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-lv.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-mk.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ml.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ms.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl-BE.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-nl.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-no.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-pl.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt-BR.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-pt.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-rm.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ro.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ru.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-sk.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-sl.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-sq.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr-SR.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-sr.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-sv.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-ta.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-th.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-tj.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-tr.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-uk.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-vi.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-CN.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-HK.js mode change 100755 => 100644 plugins/jqueryui/js/i18n/jquery.ui.datepicker-zh-TW.js mode change 100755 => 100644 plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-bg_flat_0_aaaaaa_40x100.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-bg_flat_75_ffffff_40x100.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-bg_flat_90_cc3333_40x100.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-bg_glass_95_fef1ec_1x400.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_a3a3a3_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_e6e6e7_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-bg_highlight-hard_90_f4f4f4_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-icons_000000_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-icons_333333_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-icons_666666_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-icons_cc3333_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/images/ui-icons_dddddd_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/classic/jquery-ui-1.9.1.custom.css mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_55_b0ccd7_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_65_ffffff_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_eaeaea_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-bg_highlight-hard_75_f8f8f8_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_75_fafafa_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-bg_highlight-soft_90_e4e4e4_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-icons_004458_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/images/ui-icons_d7211e_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/larry/jquery-ui-1.9.1.custom.css mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_flat_55_fbec88_40x100.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_glass_85_dfeffc_1x400.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_glass_95_fef1ec_1x400.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-icons_217bc0_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-icons_2e83ff_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-icons_469bdd_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-icons_6da8d5_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-icons_cd0a0a_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-icons_d8e7f3_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/images/ui-icons_f9bd01_256x240.png mode change 100755 => 100644 plugins/jqueryui/themes/redmond/jquery-ui-1.9.1.custom.css create mode 100644 plugins/keyboard_shortcuts/keyboard_shortcuts.css create mode 100644 plugins/keyboard_shortcuts/keyboard_shortcuts.js create mode 100644 plugins/keyboard_shortcuts/keyboard_shortcuts.php create mode 100644 plugins/keyboard_shortcuts/localization/cs_CZ.inc create mode 100644 plugins/keyboard_shortcuts/localization/de_DE.inc create mode 100644 plugins/keyboard_shortcuts/localization/en_US.inc create mode 100644 plugins/keyboard_shortcuts/localization/fr_FR.inc create mode 100644 plugins/keyboard_shortcuts/localization/nl_NL.inc create mode 100644 plugins/keyboard_shortcuts/localization/pl_PL.inc create mode 100644 plugins/keyboard_shortcuts/localization/ru_RU.inc create mode 100644 plugins/keyboard_shortcuts/localization/sv_SE.inc create mode 100644 plugins/keyboard_shortcuts/localization/zh_TW.inc create mode 100644 plugins/keyboard_shortcuts/package.xml create mode 100644 plugins/keyboard_shortcuts/skins/classic/images/keyboard.png create mode 100644 plugins/keyboard_shortcuts/skins/larry/images/keyboard.png create mode 100644 plugins/listcommands/listcommands.php create mode 100644 plugins/listcommands/localization/en_US.inc create mode 100644 plugins/listcommands/localization/es_ES.inc create mode 100644 plugins/listcommands/localization/fr_FR.inc create mode 100644 plugins/listcommands/localization/nl_NL.inc create mode 100644 plugins/listcommands/localization/pl_PL.inc create mode 100644 plugins/listcommands/localization/ru_RU.inc create mode 100644 plugins/listcommands/package.xml create mode 100644 plugins/managesieve/localization/ar_SA.inc create mode 100644 plugins/managesieve/localization/eu_ES.inc create mode 100644 plugins/managesieve/localization/th_TH.inc create mode 100644 plugins/markasjunk/localization/ar.inc create mode 100644 plugins/markasjunk/localization/bg_BG.inc create mode 100644 plugins/markasjunk/localization/eu_ES.inc create mode 100644 plugins/markasjunk2/config.inc.php.dist create mode 100644 plugins/markasjunk2/drivers/cmd_learn.php create mode 100644 plugins/markasjunk2/drivers/dir_learn.php create mode 100644 plugins/markasjunk2/drivers/edit_headers.php create mode 100644 plugins/markasjunk2/drivers/email_learn.php create mode 100644 plugins/markasjunk2/drivers/sa_blacklist.php create mode 100644 plugins/markasjunk2/drivers/sa_detach.php create mode 100644 plugins/markasjunk2/localization/ca_ES.inc create mode 100644 plugins/markasjunk2/localization/cs_CZ.inc create mode 100644 plugins/markasjunk2/localization/de_CH.inc create mode 100644 plugins/markasjunk2/localization/de_DE.inc create mode 100644 plugins/markasjunk2/localization/en_GB.inc create mode 100644 plugins/markasjunk2/localization/en_US.inc create mode 100644 plugins/markasjunk2/localization/es_AR.inc create mode 100644 plugins/markasjunk2/localization/es_ES.inc create mode 100644 plugins/markasjunk2/localization/fa_IR.inc create mode 100644 plugins/markasjunk2/localization/fr_FR.inc create mode 100644 plugins/markasjunk2/localization/gl_ES.inc create mode 100644 plugins/markasjunk2/localization/hu_HU.inc create mode 100644 plugins/markasjunk2/localization/it_IT.inc create mode 100644 plugins/markasjunk2/localization/lv_LV.inc create mode 100644 plugins/markasjunk2/localization/nl_NL.inc create mode 100644 plugins/markasjunk2/localization/pl_PL.inc create mode 100644 plugins/markasjunk2/localization/pt_BR.inc create mode 100644 plugins/markasjunk2/localization/ro_RO.inc create mode 100644 plugins/markasjunk2/localization/ru_RU.inc create mode 100644 plugins/markasjunk2/localization/tr_TR.inc create mode 100644 plugins/markasjunk2/localization/zh_TW.inc create mode 100644 plugins/markasjunk2/markasjunk2.js create mode 100644 plugins/markasjunk2/markasjunk2.php create mode 100644 plugins/markasjunk2/package.xml create mode 100644 plugins/markasjunk2/skins/classic/ie6hacks.css create mode 100644 plugins/markasjunk2/skins/classic/mail_toolbar.gif create mode 100644 plugins/markasjunk2/skins/classic/mail_toolbar.png create mode 100644 plugins/markasjunk2/skins/classic/markasjunk2.css create mode 100644 plugins/markasjunk2/skins/classic/messageactions.gif create mode 100644 plugins/markasjunk2/skins/classic/messageactions.png create mode 100644 plugins/markasjunk2/skins/larry/ie6hacks.css create mode 100644 plugins/markasjunk2/skins/larry/mail_toolbar.png create mode 100644 plugins/markasjunk2/skins/larry/markasjunk2.css create mode 100644 plugins/markasjunk2/skins/larry/messageactions.png create mode 100644 plugins/message_highlight/colorpicker/images/color.png create mode 100644 plugins/message_highlight/colorpicker/images/colorpicker.png create mode 100644 plugins/message_highlight/colorpicker/images/graybar.jpg create mode 100644 plugins/message_highlight/colorpicker/images/grid.gif create mode 100644 plugins/message_highlight/colorpicker/images/meta100.png create mode 100644 plugins/message_highlight/colorpicker/images/transparentpixel.gif create mode 100644 plugins/message_highlight/colorpicker/mColorPicker.js create mode 100644 plugins/message_highlight/localization/de_DE.inc create mode 100644 plugins/message_highlight/localization/en_US.inc create mode 100644 plugins/message_highlight/localization/fr_FR.inc create mode 100644 plugins/message_highlight/localization/nl_NL.inc create mode 100644 plugins/message_highlight/localization/ru_RU.inc create mode 100644 plugins/message_highlight/message_highlight.css create mode 100644 plugins/message_highlight/message_highlight.js create mode 100644 plugins/message_highlight/message_highlight.php create mode 100644 plugins/message_highlight/package.xml create mode 100644 plugins/new_user_dialog/localization/ar.inc create mode 100644 plugins/new_user_dialog/localization/ar_SA.inc create mode 100644 plugins/new_user_dialog/localization/ast.inc create mode 100644 plugins/new_user_dialog/localization/es_AR.inc create mode 100644 plugins/new_user_dialog/localization/eu_ES.inc create mode 100644 plugins/new_user_dialog/localization/fa_AF.inc create mode 100644 plugins/newmail_notifier/localization/ast.inc create mode 100644 plugins/newmail_notifier/localization/bg_BG.inc create mode 100644 plugins/newmail_notifier/localization/el_GR.inc create mode 100644 plugins/newmail_notifier/localization/es_AR.inc create mode 100644 plugins/newmail_notifier/localization/eu_ES.inc create mode 100644 plugins/newmail_notifier/localization/ti.inc create mode 100644 plugins/newmail_notifier/sound.mp3 create mode 100644 plugins/password/localization/ar.inc create mode 100644 plugins/password/localization/ar_SA.inc create mode 100644 plugins/password/localization/ast.inc create mode 100644 plugins/password/localization/be_BE.inc create mode 100644 plugins/password/localization/el_GR.inc create mode 100644 plugins/password/localization/eu_ES.inc create mode 100644 plugins/password/localization/fa_AF.inc create mode 100644 plugins/password/localization/ti.inc create mode 100644 plugins/password/localization/uk_UA.inc create mode 100644 plugins/quickrules/localization/cs_CZ.inc create mode 100644 plugins/quickrules/localization/de_CH.inc create mode 100644 plugins/quickrules/localization/de_DE.inc create mode 100644 plugins/quickrules/localization/en_GB.inc create mode 100644 plugins/quickrules/localization/en_US.inc create mode 100644 plugins/quickrules/localization/hu_HU.inc create mode 100644 plugins/quickrules/localization/it_IT.inc create mode 100644 plugins/quickrules/localization/pl_PL.inc create mode 100644 plugins/quickrules/localization/pt_BR.inc create mode 100644 plugins/quickrules/localization/pt_PT.inc create mode 100644 plugins/quickrules/package.xml create mode 100644 plugins/quickrules/quickrules.js create mode 100644 plugins/quickrules/quickrules.php create mode 100644 plugins/quickrules/skins/classic/ie6hacks.css create mode 100644 plugins/quickrules/skins/classic/mail_toolbar.gif create mode 100644 plugins/quickrules/skins/classic/mail_toolbar.png create mode 100644 plugins/quickrules/skins/classic/messageactions.gif create mode 100644 plugins/quickrules/skins/classic/messageactions.png create mode 100644 plugins/quickrules/skins/classic/quickrules.css create mode 100644 plugins/quickrules/skins/larry/ie6hacks.css create mode 100644 plugins/quickrules/skins/larry/mail_toolbar.png create mode 100644 plugins/quickrules/skins/larry/messageactions.png create mode 100644 plugins/quickrules/skins/larry/quickrules.css create mode 100644 plugins/sauserprefs/config.inc.php.dist create mode 100644 plugins/sauserprefs/include/rcube_sauserprefs_storage.php create mode 100644 plugins/sauserprefs/localization/cs_CZ.inc create mode 100644 plugins/sauserprefs/localization/de_CH.inc create mode 100644 plugins/sauserprefs/localization/de_DE.inc create mode 100644 plugins/sauserprefs/localization/en_GB.inc create mode 100644 plugins/sauserprefs/localization/en_US.inc create mode 100644 plugins/sauserprefs/localization/es_ES.inc create mode 100644 plugins/sauserprefs/localization/fr_FR.inc create mode 100644 plugins/sauserprefs/localization/gl_ES.inc create mode 100644 plugins/sauserprefs/localization/hu_HU.inc create mode 100644 plugins/sauserprefs/localization/it_IT.inc create mode 100644 plugins/sauserprefs/localization/pl_PL.inc create mode 100644 plugins/sauserprefs/localization/pt_BR.inc create mode 100644 plugins/sauserprefs/localization/ro_RO.inc create mode 100644 plugins/sauserprefs/localization/ru_RU.inc create mode 100644 plugins/sauserprefs/localization/sk_SK.inc create mode 100644 plugins/sauserprefs/localization/sv_SE.inc create mode 100644 plugins/sauserprefs/package.xml create mode 100644 plugins/sauserprefs/sauserprefs.js create mode 100644 plugins/sauserprefs/sauserprefs.php create mode 100644 plugins/sauserprefs/skins/classic/help.gif create mode 100644 plugins/sauserprefs/skins/classic/icons.gif create mode 100644 plugins/sauserprefs/skins/classic/icons.png create mode 100644 plugins/sauserprefs/skins/classic/ie6hacks.css create mode 100644 plugins/sauserprefs/skins/classic/iehacks.css create mode 100644 plugins/sauserprefs/skins/classic/safari.css create mode 100644 plugins/sauserprefs/skins/classic/sauserprefs.css create mode 100644 plugins/sauserprefs/skins/classic/tabstyles.css create mode 100644 plugins/sauserprefs/skins/classic/templates/sauserprefs.html create mode 100644 plugins/sauserprefs/skins/classic/templates/settingsedit.html create mode 100644 plugins/sauserprefs/skins/larry/help.png create mode 100644 plugins/sauserprefs/skins/larry/icons.png create mode 100644 plugins/sauserprefs/skins/larry/iehacks.css create mode 100644 plugins/sauserprefs/skins/larry/listicons.png create mode 100644 plugins/sauserprefs/skins/larry/safari.css create mode 100644 plugins/sauserprefs/skins/larry/sauserprefs.css create mode 100644 plugins/sauserprefs/skins/larry/tabstyles.css create mode 100644 plugins/sauserprefs/skins/larry/templates/sauserprefs.html create mode 100644 plugins/sauserprefs/skins/larry/templates/settingsedit.html create mode 100644 plugins/sieverules/config.inc.php.dist create mode 100644 plugins/sieverules/importFilters/avelsieve.php create mode 100644 plugins/sieverules/importFilters/ingo.php create mode 100644 plugins/sieverules/include/rcube_sieve.php create mode 100644 plugins/sieverules/include/rcube_sieve_script.php create mode 100644 plugins/sieverules/jquery.maskedinput.js create mode 120000 plugins/sieverules/lib/Net/Sieve.php create mode 100644 plugins/sieverules/localization/ca_ES.inc create mode 100644 plugins/sieverules/localization/cs_CZ.inc create mode 100644 plugins/sieverules/localization/de_CH.inc create mode 100644 plugins/sieverules/localization/de_DE.inc create mode 100644 plugins/sieverules/localization/en_GB.inc create mode 100644 plugins/sieverules/localization/en_US.inc create mode 100644 plugins/sieverules/localization/es_AR.inc create mode 100644 plugins/sieverules/localization/es_ES.inc create mode 100644 plugins/sieverules/localization/et_EE.inc create mode 100644 plugins/sieverules/localization/fi_FI.inc create mode 100644 plugins/sieverules/localization/fr_FR.inc create mode 100644 plugins/sieverules/localization/hu_HU.inc create mode 100644 plugins/sieverules/localization/it_IT.inc create mode 100644 plugins/sieverules/localization/nl_NL.inc create mode 100644 plugins/sieverules/localization/pl_PL.inc create mode 100644 plugins/sieverules/localization/pt_BR.inc create mode 100644 plugins/sieverules/localization/pt_PT.inc create mode 100644 plugins/sieverules/localization/ro_RO.inc create mode 100644 plugins/sieverules/localization/ru_RU.inc create mode 100644 plugins/sieverules/localization/sk_SK.inc create mode 100644 plugins/sieverules/localization/sl_SI.inc create mode 100644 plugins/sieverules/localization/sv_SE.inc create mode 100644 plugins/sieverules/localization/zh_TW.inc create mode 100644 plugins/sieverules/package.xml create mode 100644 plugins/sieverules/sieverules.js create mode 100644 plugins/sieverules/sieverules.php create mode 100644 plugins/sieverules/skins/classic/cross.gif create mode 100644 plugins/sieverules/skins/classic/help.gif create mode 100644 plugins/sieverules/skins/classic/icons.gif create mode 100644 plugins/sieverules/skins/classic/icons.png create mode 100644 plugins/sieverules/skins/classic/ie6hacks.css create mode 100644 plugins/sieverules/skins/classic/iehacks.css create mode 100644 plugins/sieverules/skins/classic/safari.css create mode 100644 plugins/sieverules/skins/classic/sieverules.css create mode 100644 plugins/sieverules/skins/classic/tabstyles.css create mode 100644 plugins/sieverules/skins/classic/templates/advancededitor.html create mode 100644 plugins/sieverules/skins/classic/templates/editsieverule.html create mode 100644 plugins/sieverules/skins/classic/templates/setupsieverules.html create mode 100644 plugins/sieverules/skins/classic/templates/sieverules.html create mode 100644 plugins/sieverules/skins/classic/tick.gif create mode 100644 plugins/sieverules/skins/larry/cross.png create mode 100644 plugins/sieverules/skins/larry/help.png create mode 100644 plugins/sieverules/skins/larry/icons.png create mode 100644 plugins/sieverules/skins/larry/iehacks.css create mode 100644 plugins/sieverules/skins/larry/listicons.png create mode 100644 plugins/sieverules/skins/larry/safari.css create mode 100644 plugins/sieverules/skins/larry/sieverules.css create mode 100644 plugins/sieverules/skins/larry/tabstyles.css create mode 100644 plugins/sieverules/skins/larry/templates/advancededitor.html create mode 100644 plugins/sieverules/skins/larry/templates/editsieverule.html create mode 100644 plugins/sieverules/skins/larry/templates/setupsieverules.html create mode 100644 plugins/sieverules/skins/larry/templates/sieverules.html create mode 100644 plugins/sieverules/skins/larry/tick.png create mode 100644 plugins/subscriptions_option/localization/az_AZ.inc create mode 100644 plugins/subscriptions_option/localization/be_BE.inc create mode 100644 plugins/subscriptions_option/localization/bg_BG.inc create mode 100644 plugins/subscriptions_option/localization/el_GR.inc create mode 100644 plugins/subscriptions_option/localization/es_AR.inc create mode 100644 plugins/subscriptions_option/localization/eu_ES.inc create mode 100644 plugins/subscriptions_option/localization/fa_AF.inc create mode 100644 plugins/subscriptions_option/localization/id_ID.inc create mode 100644 plugins/subscriptions_option/localization/lv_LV.inc create mode 100644 plugins/subscriptions_option/localization/nn_NO.inc create mode 100644 plugins/subscriptions_option/localization/ro_RO.inc create mode 100644 plugins/thunderbird_labels/localization/bg_BG.inc create mode 100644 plugins/thunderbird_labels/localization/ca_ES.inc create mode 100644 plugins/thunderbird_labels/localization/cs_CZ.inc create mode 100644 plugins/thunderbird_labels/localization/de_DE.inc create mode 100644 plugins/thunderbird_labels/localization/en_US.inc create mode 100644 plugins/thunderbird_labels/localization/fr_FR.inc create mode 100644 plugins/thunderbird_labels/localization/hu_HU.inc create mode 100644 plugins/thunderbird_labels/localization/lv_LV.inc create mode 100644 plugins/thunderbird_labels/localization/pl_PL.inc create mode 100644 plugins/thunderbird_labels/localization/ru_RU.inc create mode 100644 plugins/thunderbird_labels/skins/classic/tb_label.css create mode 100644 plugins/thunderbird_labels/skins/classic/thunderbird_32.png create mode 100644 plugins/thunderbird_labels/skins/default/tb_label.css create mode 100644 plugins/thunderbird_labels/skins/default/thunderbird_32.png create mode 100644 plugins/thunderbird_labels/skins/larry/tb_label.css create mode 100644 plugins/thunderbird_labels/skins/larry/thunderbird_32.png create mode 100644 plugins/thunderbird_labels/tb_label.js create mode 100644 plugins/thunderbird_labels/thunderbird_labels.php create mode 100644 plugins/userinfo/localization/ar.inc create mode 100644 plugins/userinfo/localization/ast.inc create mode 100644 plugins/userinfo/localization/bg_BG.inc create mode 100644 plugins/userinfo/localization/el_GR.inc create mode 100644 plugins/userinfo/localization/es_AR.inc create mode 100644 plugins/userinfo/localization/eu_ES.inc create mode 100644 plugins/userinfo/localization/fa_AF.inc mode change 100755 => 100644 plugins/userinfo/localization/fr_FR.inc mode change 100755 => 100644 plugins/userinfo/localization/ro_RO.inc create mode 100644 plugins/userinfo/localization/ti.inc create mode 100644 plugins/vcard_attachments/localization/ar.inc create mode 100644 plugins/vcard_attachments/localization/ar_SA.inc create mode 100644 plugins/vcard_attachments/localization/bg_BG.inc create mode 100644 plugins/vcard_attachments/localization/el_GR.inc create mode 100644 plugins/vcard_attachments/localization/es_AR.inc create mode 100644 plugins/vcard_attachments/localization/eu_ES.inc create mode 100644 plugins/zipdownload/localization/ar.inc create mode 100644 plugins/zipdownload/localization/ar_SA.inc create mode 100644 plugins/zipdownload/localization/be_BE.inc create mode 100644 plugins/zipdownload/localization/bg_BG.inc create mode 100644 plugins/zipdownload/localization/el_GR.inc create mode 100644 plugins/zipdownload/localization/eo.inc create mode 100644 plugins/zipdownload/localization/eu_ES.inc create mode 100644 plugins/zipdownload/localization/fa_AF.inc create mode 100644 plugins/zipdownload/localization/fi_FI.inc create mode 100644 plugins/zipdownload/localization/id_ID.inc create mode 100644 plugins/zipdownload/localization/ko_KR.inc create mode 100644 plugins/zipdownload/localization/lv_LV.inc create mode 100644 plugins/zipdownload/localization/sl_SI.inc create mode 100644 plugins/zipdownload/localization/uk_UA.inc create mode 100644 plugins/zipdownload/localization/zh_CN.inc mode change 100644 => 120000 program/js/jquery.min.js create mode 100644 program/lib/Crypt/GPG.php create mode 100644 program/lib/Crypt/GPG/DecryptStatusHandler.php create mode 100644 program/lib/Crypt/GPG/Engine.php create mode 100644 program/lib/Crypt/GPG/Exceptions.php create mode 100644 program/lib/Crypt/GPG/Key.php create mode 100644 program/lib/Crypt/GPG/Signature.php create mode 100644 program/lib/Crypt/GPG/SubKey.php create mode 100644 program/lib/Crypt/GPG/UserId.php create mode 100644 program/lib/Crypt/GPG/VerifyStatusHandler.php create mode 100644 program/lib/Net/Sieve.php create mode 100644 program/lib/Roundcube/rcube_spellcheck_atd.php create mode 100644 program/lib/Roundcube/rcube_spellcheck_enchant.php create mode 100644 program/lib/Roundcube/rcube_spellcheck_engine.php create mode 100644 program/lib/Roundcube/rcube_spellcheck_googie.php create mode 100644 program/lib/Roundcube/rcube_spellcheck_pspell.php create mode 100644 program/localization/en_US/labels.inc.orig mode change 100755 => 100644 program/localization/ga_IE/labels.inc mode change 100755 => 100644 program/localization/ga_IE/messages.inc mode change 100755 => 100644 program/localization/ka_GE/labels.inc mode change 100755 => 100644 program/localization/ka_GE/messages.inc mode change 100755 => 100644 program/localization/mk_MK/labels.inc mode change 100755 => 100644 program/localization/mk_MK/messages.inc mode change 100755 => 100644 program/localization/mr_IN/labels.inc mode change 100755 => 100644 program/localization/mr_IN/messages.inc mode change 100755 => 100644 program/localization/ps/labels.inc mode change 100755 => 100644 program/localization/ps/messages.inc create mode 100644 program/localization/ur_PK/labels.inc create mode 100644 program/localization/ur_PK/messages.inc create mode 100644 program/steps/mail/func.inc.orig create mode 100644 program/steps/mail/show.inc.orig create mode 100644 program/steps/settings/edit_response.inc create mode 100644 program/steps/settings/responses.inc create mode 100644 skins/classic/templates/responseedit.html create mode 100644 skins/classic/templates/responses.html create mode 100644 skins/larry/templates/responseedit.html create mode 100644 skins/larry/templates/responses.html delete mode 100644 temp/.htaccess create mode 100644 tests/src/media.css diff --git a/.htaccess b/.htaccess index dc6e62f38..345d26dba 100644 --- a/.htaccess +++ b/.htaccess @@ -21,6 +21,9 @@ php_flag session.auto_start Off php_value session.gc_maxlifetime 21600 php_value session.gc_divisor 500 php_value session.gc_probability 1 + +# http://bugs.php.net/bug.php?id=30766 +php_value mbstring.func_overload 0 diff --git a/CHANGELOG b/CHANGELOG index dbc7447ae..32511169a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,14 +1,33 @@ CHANGELOG Roundcube Webmail =========================== +- Fix date column width to fit the widest possible date format (#1489368) +- Move certain user preference options to a collapsed "advanced" block (#1488829) +- Add file type icons for Powerpoint and Open Office presentations (#1489225) +- Fix operations on folders with trailing spaces in name (#1489419) +- Improve identity selection based on From: header (#1489378) +- Fix issue where mails with inline images of the same name contained only the first image multiple times (#1489406) +- Use left/right arrow keys to collapse/expand thread and spacebar to select a row, change Ctrl key behavior (#1489392) +- Fix an issue where using arrow keys to go up a list can result in selected message being under headers (#1489403) +- Fix an issue where Home/End keys don't focus list row properly, don't scrollTo properly (#1489396) +- Add an option to disable smart Reply-List behaviour - reply_all_mode (#1488734) +- Fix an issue where pressing minus key on contacts list was hiding list records (#1489393) +- Fix an issue where shift + arrow-up key wasn't selecting all messages in collapsed thread (#1489397) +- Added icon for priority column in messages list header (#1489234) +- New feature "Canned Responses" to save and recall boilerplate text snippets +- Fix HTML part detection when encapsulated inside multipart/signed (#1489372) +- Add spellchecker backend for the After the Deadline service +- Replace markdown-style [1] link indexes in plain text email bodies +- Improved mailto: link arguments handling (#1489363) +- Use DOMDocument LIBXML_PARSEHUGE and LIBXML_COMPACT options if possible (#1489302) +- Support HTTP_HOST, SERVER_NAME and SERVER_ADDR values in include_host_config feature +- Make default font size for HTML messages configurable (request #118) +- Fix XSS issue in addressbook group name field [CVE-2013-5646] (#1489333) - After message is sent refresh messages list of replied message folder (#1489249) - Add option force specified domain in user login - username_domain_forced (#1489264) -- Fix expanded thread root message styling after refreshing messages list (#1489327) -- Fix issue where From address was removed from Cc and Bcc fields when editing a draft (#1489319) - Add option to import Vcards with group assignments - Save groups membership in Vcard export (#1488509) - Workaround broken PHP function timezone_name_from_abbr (#1489261) -- Fix error_reporting directive check (#1489323) - Make cached message size limit configurable - messages_cache_threshold (#1489317) - Log also failed logins to userlogins log - Add temp_dir_ttl configuration option (#1489304) @@ -69,6 +88,23 @@ CHANGELOG Roundcube Webmail - Fix export of selected contacts from search result (#1488905) - Feature to export only selected contacts from addressbook (by Phil Weir) +RELEASE 0.9.5 +------------- +- Fix failing vCard import when email address field contains spaces (#1489386) +- Fix default spell-check configuration after Google suspended their spell service +- Fix vulnerability in handling _session argument of utils/save-prefs (#1489382) +- Fix iframe onload for upload errors handling (#1489379) +- Fix address matching in Return-Path header on identity selection (#1489374) +- Fix text wrapping issue with long unwrappable lines (#1489371) +- Fixed issues where HTML comments inside style tag would hang Internet Explorer +- Hide Delivery Status Notification option when smtp_server is unset (#1489336) +- Display full attachment name using title attribute when name is too long to display (#1489320) +- Fix attachment icon issue when rare font/language is used (#1489326) +- Fix expanded thread root message styling after refreshing messages list (#1489327) +- Fix issue where From address was removed from Cc and Bcc fields when editing a draft (#1489319) +- Fix error_reporting directive check (#1489323) +- Fix de_DE localization of "About" label in Help plugin (#1489325) + RELEASE 0.9.4 ------------- - Make identities matching case insensitive (#1485480) @@ -95,8 +131,8 @@ RELEASE 0.9.3 - Fix base URL resolving on attribute values with no quotes (#1489275) - Fix wrong handling of links with '|' character (#1489276) - Fix colorspace issue on image conversion using ImageMagick (#1489270) -- Fix XSS vulnerability when editing a message "as new" or draft (#1489251) -- Fix XSS vulnerability when saving HTML signatures (#1489251) +- Fix XSS vulnerability when editing a message "as new" or draft [CVE-2013-5645] (#1489251) +- Fix XSS vulnerability when saving HTML signatures [CVE-2013-5645] (#1489251) - Fix rewrite rule in .htaccess (#1489240) - Fix detecting Turkish language in ISO-8859-9 encoding (#1489252) - Fix identity-selection using Return-Path headers (#1489241) @@ -316,7 +352,7 @@ RELEASE 0.8.5 - Fix #countcontrols issue in IE<=8 when text is very long (#1488890) - Fix unwanted horizontal scrollbar in message preview header (#1488866) - Add workaround for IE<=8 bug where Content-Disposition:inline was ignored (#1488844) -- Fix XSS vulnerability in vbscript: and data:text links handling (#1488850) +- Fix XSS vulnerability in vbscript: and data:text links handling [CVE-2012-6121] (#1488850) - Fix absolute positioning in HTML messages (#1488819) - Fix cache (in)validation after setting \Deleted flag - Fix keybord events on messages list in opera browser (#1488823) @@ -371,8 +407,8 @@ RELEASE 0.8.1 - Fix bug where domain name was converted to lower-case even with login_lc=false (#1488593) - Fix lower-casing email address on replies (#1488598) - Fix line separator in exported messages (#1488603) -- Fix XSS issue where plain signatures wasn't secured in HTML mode (#1488613) -- Fix XSS issue where href="javascript:" wasn't secured (#1488613) +- Fix XSS issue where plain signatures wasn't secured in HTML mode [CVE-2012-4668] (#1488613) +- Fix XSS issue where href="javascript:" wasn't secured [CVE-2012-3508] (#1488613) - Fix impossible to create message with empty plain text part (#1488610) - Fix stripped apostrophes when replying in plain text to HTML message (#1488606) - Fix inactive Save search option after advanced search (#1488607) @@ -407,7 +443,7 @@ RELEASE 0.8.0 - Fix removing contact photo using LDAP addressbook (#1488420) - Fix storing X-ANNIVERSARY date in vCard format (#1488527) - Update to Mail_Mime-1.8.5 (#1488521) -- Fix XSS vulnerability in message subject handling using Larry skin (#1488519) +- Fix XSS vulnerability in message subject handling using Larry skin [CVE-2012-3507] (#1488519) - Fix handling of links with various URI schemes e.g. "skype:" (#1488106) - Fix handling of links inside PRE elements on html to text conversion - Fix indexing of links on html to text conversion @@ -534,7 +570,7 @@ RELEASE 0.7 - Improved handling of some malformed values encoded with quoted-printable (#1488232) - Add possibility to do LDAP bind before searching for bind DN - Fix handling of empty tags in HTML messages (#1488225) -- Add content filter for embedded attachments to protect from XSS on IE (#1487895) +- Add content filter for embedded attachments to protect from XSS on IE [CVE-2012-1253] (#1487895) - Use strpos() instead of strstr() when possible (#1488211) - Fix handling HTML entities when converting HTML to text (#1488212) - Fix fit_string_to_size() renders browser and ui unresponsive (#1488207) @@ -702,7 +738,7 @@ RELEASE 0.6-beta RELEASE 0.5.4 ------------- -- Fix XSS vulnerability in UI messages (#1488030) +- Fix XSS vulnerability in UI messages [CVE-2011-2937] (#1488030) RELEASE 0.5.3 ------------- @@ -752,8 +788,8 @@ RELEASE 0.5.1 - Security: add optional referer check to prevent CSRF in GET requests - Fix email_dns_check setting not used for identities/contacts (#1487740) - Fix ICANN example addresses doesn't validate (#1487742) -- Security: protect login form submission from CSRF -- Security: prevent from relaying malicious requests through modcss.inc +- Security: protect login form submission from CSRF [CVE-2011-1491] +- Security: prevent from relaying malicious requests through modcss.inc [CVE-2011-1492] - Fix handling of non-image attachments in multipart/related messages (#1487750) - Fix IDNA support when IDN/INTL modules are in use (#1487742) - Fix handling of invalid HTML comments in messages (#1487759) @@ -1196,7 +1232,7 @@ RELEASE 0.3-RC1 --------------- - Fix import of vCard entries with params (#1485453) - Fix HTML messages output with empty block elements (#1485974) -- Use request tokens to protect POST requests from CSRF +- Use request tokens to protect POST requests from CSRF [CVE-2009-4076, CVE-2009-4077] - Added hook when killing a session - Added hook to write_log function (#1485971) - Performance improvements by use UID commands (#1485690) @@ -1323,7 +1359,7 @@ RELEASE 0.2.1 - Fix large search results on server without SORT capability (#1485668) - Get rid of preg_replace() with eval modifier and create_function usage (#1485686) - Bring back and tags in HTML messages -- Fix XSS vulnerability through background attributes as reported by Julien Cayssol +- Fix XSS vulnerability through background attributes [CVE-2009-0413] - Fix problems with backslash as IMAP hierarchy delimiter (#1484467) - Secure vcard export by getting rid of preg's 'e' modifier use (#1485689) - Fix authentication when submitting form with existing session (#1485679) @@ -1381,7 +1417,7 @@ RELEASE 0.2-STABLE - Allow deleting identities when multiple_identities=false (#1485435) - Added option focus_on_new_message (#1485374) - Fix html2text class autoloading on Windows (#1485505) -- Fix html signature formatting when identity save error occured (#1485426) +- Fix html signature formatting when identity save error occurred (#1485426) - Add feedback and set busy when moving folder (#1485497) - Fix 'Empty' link visibility for some languages e.g. Slovak (#1485489) - Fix messages count bar overlapping (#1485270) diff --git a/INSTALL b/INSTALL index 5b1c21dac..834972c9c 100644 --- a/INSTALL +++ b/INSTALL @@ -23,6 +23,8 @@ REQUIREMENTS - Net_SMTP (latest from https://github.com/pear/Net_SMTP/) - Net_IDNA2 0.1.1 or newer - Auth_SASL 1.0.6 or newer + - Net_Sieve 1.8.2 or newer (for managesieve plugin) + - Crypt_GPG 1.2.0 or newer (for enigma plugin) * php.ini options (see .htaccess file): - error_reporting E_ALL & ~E_NOTICE (or lower) - memory_limit > 16MB (increase as suitable to support large attachments) diff --git a/bin/package2composer.sh b/bin/package2composer.sh new file mode 100755 index 000000000..c615a177f --- /dev/null +++ b/bin/package2composer.sh @@ -0,0 +1,109 @@ +#!/usr/bin/env php + | + +-----------------------------------------------------------------------+ +*/ + +ini_set('error_reporting', E_ALL & ~E_NOTICE); + +list(, $filename, $vendor) = $_SERVER['argv']; + +if (!$filename || !is_readable($filename)) { + die("Invalid input file name!\nUsage: " . $_SERVER['argv'][0] . " XMLFILE VENDOR\n"); +} + +if (!$vendor) { + $vendor = 'anonymous'; +} + +$package = new SimpleXMLElement(file_get_contents($filename)); + +$data = array( + 'name' => $vendor . '/' . strval($package->name), + 'type' => 'roundcube-plugin', + 'description' => trim(strval($package->description), '- ') ? trim(strval($package->description)) : trim(strval($package->summary)), + 'homepage' => strval($package->uri), + 'license' => 'GPLv3+', + 'version' => strval($package->version->release), + 'authors' => array(), + 'repositories' => array( + array('type' => 'composer', 'url' => 'http://plugins.roundcube.net'), + ), + 'require' => array( + 'php' => '>=5.3.0', + 'roundcube/plugin-installer' => '>=0.1.3', + ), +); + +if ($package->license) { + $data['license'] = strval($package->license); +} + +if ($package->lead) { + foreach ($package->lead as $lead) { + if (strval($lead->active) == 'no') { + continue; + } + $data['authors'][] = array( + 'name' => strval($lead->name), + 'email' => strval($lead->email), + 'role' => 'Lead', + ); + } +} + +if ($devs = $package->developer) { + foreach ($package->developer as $dev) { + $data['authors'][] = array( + 'name' => strval($dev->name), + 'email' => strval($dev->email), + 'role' => 'Developer', + ); + } +} + +if ($package->dependencies->required->extension) { + foreach ($package->dependencies->required->extension as $ext) { + $data['require']['ext-' . strval($ext->name)] = '*'; + } +} + +// remove empty values +$data = array_filter($data); + +// use the JSON encoder from the Composer package +if (is_file('composer.phar')) { + include 'phar://composer.phar/src/Composer/Json/JsonFile.php'; + echo \Composer\Json\JsonFile::encode($data); +} +// PHP 5.4's json_encode() does the job, too +else if (defined('JSON_PRETTY_PRINT')) { + $flags = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT & JSON_UNESCAPED_SLASHES : 0; + echo json_encode($data, $flags); +} +else { + fputs(STDERR, +"FAILED! composer.phar not found in current directory. + +Please download it from http://getcomposer.org/download/ or with + curl -s http://getcomposer.org/installer | php +"); +} + +echo "\n"; + diff --git a/bin/transifexpull.sh b/bin/transifexpull.sh new file mode 100755 index 000000000..ba26a07f1 --- /dev/null +++ b/bin/transifexpull.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# In 'translator' mode files will contain empty translated texts +# where translation is not available, we'll remove these later + +# Note: there's a bug in txclib, so if the command below doesn't +# work see https://github.com/transifex/transifex-client/commit/a80320735973dd608b48520bf3b89ad53e2b088b + +tx --debug pull -a --mode translator + +PWD=`dirname "$0"` + +do_clean() +{ + # do not cleanup en_US files + echo "$1" | grep -v en_US > /dev/null || return + + echo "Cleaning $1" + + # remove untranslated/empty texts + perl -pi -e "s/^\\\$labels\[[^]]+\]\s+=\s+'';\n//" $1 + perl -pi -e "s/^\\\$messages\[[^]]+\]\s+=\s+'';\n//" $1 + # remove variable initialization + perl -pi -e "s/^\\\$(labels|messages)\s*=\s*array\(\);\n//" $1 + # remove (one-line) comments + perl -pi -e "s/^\\/\\/.*//" $1 + # remove empty lines (but not in file header) + perl -ne 'print if ($. < 18 || length($_) > 1)' $1 > $1.tmp + mv $1.tmp $1 +} + +# clean up translation files +for file in $PWD/../program/localization/*/*.inc; do + do_clean $file +done +for file in $PWD/../plugins/*/localization/*.inc; do + do_clean $file +done diff --git a/bin/updatedb.sh b/bin/updatedb.sh index b4ed8b7ba..1f5e18434 100755 --- a/bin/updatedb.sh +++ b/bin/updatedb.sh @@ -72,13 +72,20 @@ if (!$version && $opts['version']) { '0.2-alpha' => 2008040500, '0.2-beta' => 2008060900, '0.2-stable' => 2008092100, + '0.2.1' => 2008092100, + '0.2.2' => 2008092100, '0.3-stable' => 2008092100, '0.3.1' => 2009090400, '0.4-beta' => 2009103100, + '0.4' => 2010042300, + '0.4.1' => 2010042300, '0.4.2' => 2010042300, '0.5-beta' => 2010100600, '0.5' => 2010100600, '0.5.1' => 2010100600, + '0.5.2' => 2010100600, + '0.5.3' => 2010100600, + '0.5.4' => 2010100600, '0.6-beta' => 2011011200, '0.6' => 2011011200, '0.7-beta' => 2011092800, diff --git a/config/.htaccess b/config/.htaccess deleted file mode 100644 index 8e6a345dc..000000000 --- a/config/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order allow,deny -Deny from all \ No newline at end of file diff --git a/config/defaults.inc.php b/config/defaults.inc.php index bf7c4df2a..fc7e92fd7 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -30,6 +30,9 @@ $config['db_dsnw'] = 'mysql://roundcube:@localhost/roundcubemail'; // useful for database replication $config['db_dsnr'] = ''; +// Disable the use of already established dsnw connections for subsequent reads +$config['db_dsnw_noread'] = false; + // use persistent db-connections // beware this will not "always" work as expected // see: http://www.php.net/manual/en/features.persistent-connections.php @@ -38,6 +41,16 @@ $config['db_persistent'] = false; // you can define specific table (and sequence) names prefix $config['db_prefix'] = ''; +// Mapping of table names and connections to use for ALL operations. +// This can be used in a setup with replicated databases and a DB master +// where read/write access to cache tables should not go to master. +$config['db_table_dsn'] = array( +// 'cache' => 'r', +// 'cache_index' => 'r', +// 'cache_thread' => 'r', +// 'cache_messages' => 'r', +); + // ---------------------------------- // LOGGING/DEBUGGING @@ -239,12 +252,18 @@ $config['enable_installer'] = false; // don't allow these settings to be overriden by the user $config['dont_override'] = array(); +// define which settings should be listed under the 'advanced' block +// which is hidden by default +$config['advanced_prefs'] = array(); + // provide an URL where a user can get support for this Roundcube installation // PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE! $config['support_url'] = ''; // replace Roundcube logo with this image // specify an URL relative to the document root of this Roundcube installation +// an array can be used to specify different logos for specific template files, '*' for default logo +// for example array("*" => "/images/roundcube_logo.png", "messageprint" => "/images/roundcube_logo_print.png") $config['skin_logo'] = null; // automatically create a new Roundcube user when log-in the first time. @@ -551,15 +570,20 @@ $config['enable_spellcheck'] = true; // Setting it to 'shared' will make the dictionary shared by all users. $config['spellcheck_dictionary'] = false; -// Set the spell checking engine. 'googie' is the default. -// 'pspell' and 'enchant' are also available, but they require -// PHP Pspell or Enchant extensions. When using Nox Spell Server, also set 'googie' here. +// Set the spell checking engine. Possible values: +// - 'googie' - the default +// - 'pspell' - requires the PHP Pspell module and aspell installed +// - 'enchant' - requires the PHP Enchant module +// - 'atd' - install your own After the Deadline server or check with the people at http://www.afterthedeadline.com before using their API +// Since Google shut down their public spell checking service, you need to +// connect to a Nox Spell Server when using 'googie' here. Therefore specify the 'spellcheck_uri' $config['spellcheck_engine'] = 'googie'; -// For a locally installed Nox Spell Server, please specify the URI to call it. -// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72 -// Leave empty to use the Google spell checking service, what means -// that the message content will be sent to Google in order to check spelling +// For locally installed Nox Spell Server or After the Deadline services, +// please specify the URI to call it. +// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72 or +// the After the Deadline package from http://www.afterthedeadline.com. +// Leave empty to use the public API of service.afterthedeadline.com $config['spellcheck_uri'] = ''; // These languages can be selected for spell checking. @@ -595,6 +619,12 @@ $config['upload_progress'] = false; // Setting it to 0, disables the feature. $config['undo_timeout'] = 0; +// A static list of canned responses which are immutable for the user +$config['compose_responses_static'] = array( +// array('name' => 'Canned Response 1', 'text' => 'Static Response One'), +// array('name' => 'Canned Response 2', 'text' => 'Static Response Two'), +); + // ---------------------------------- // ADDRESSBOOK SETTINGS // ---------------------------------- @@ -644,6 +674,7 @@ $config['ldap_public']['Verisign'] = array( 'ldap_version' => 3, // using LDAPv3 'network_timeout' => 10, // The timeout (in seconds) for connect + bind arrempts. This is only supported in PHP >= 5.3.0 with OpenLDAP 2.x 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login. + // When 'user_specific' is enabled following variables can be used in base_dn/bind_dn config: // %fu - The full username provided, assumes the username is an email // address, uses the username_domain value if not an email address. // %u - The username prior to the '@'. @@ -660,6 +691,8 @@ $config['ldap_public']['Verisign'] = array( // DN and password to bind as before searching for bind DN, if anonymous search is not allowed 'search_bind_dn' => '', 'search_bind_pw' => '', + // Optional map of replacement strings => attributes used when binding for an individual address book + 'search_bind_attrib' => array(), // e.g. array('%udc' => 'ou') // Default for %dn variable if search doesn't return DN value 'search_dn_default' => '', // Optional authentication identifier to be used as SASL authorization proxy @@ -741,14 +774,19 @@ $config['ldap_public']['Verisign'] = array( // if the groups base_dn is empty, the contact base_dn is used for the groups as well // -> in this case, assure that groups and contacts are separated due to the concernig filters! 'groups' => array( - 'base_dn' => '', - 'scope' => 'sub', // Search mode: sub|base|list - 'filter' => '(objectClass=groupOfNames)', - 'object_classes' => array("top", "groupOfNames"), - 'member_attr' => 'member', // Name of the member attribute, e.g. uniqueMember - 'name_attr' => 'cn', // Attribute to be used as group name - 'member_filter' => '(objectclass=*)', // Optional filter to use when querying for group members - 'vlv' => false, // Use VLV controls to list groups + 'base_dn' => '', + 'scope' => 'sub', // Search mode: sub|base|list + 'filter' => '(objectClass=groupOfNames)', + 'object_classes' => array('top', 'groupOfNames'), // Object classes to be assigned to new groups + 'member_attr' => 'member', // Name of the default member attribute, e.g. uniqueMember + 'name_attr' => 'cn', // Attribute to be used as group name + 'email_attr' => 'mail', // Group email address attribute (e.g. for mailing lists) + 'member_filter' => '(objectclass=*)', // Optional filter to use when querying for group members + 'vlv' => false, // Use VLV controls to list groups + 'class_member_attr' => array( // Mapping of group object class to member attribute used in these objects + 'groupofnames' => 'member', + 'groupofuniquenames' => 'uniquemember' + ), ), // this configuration replaces the regular groups listing in the directory tree with // a hard-coded list of groups, each listing entries with the configured base DN and filter. @@ -958,6 +996,7 @@ $config['mdn_requests'] = 0; $config['mdn_default'] = 0; // Delivery Status Notification checkbox default state +// Note: This can be used only if smtp_server is non-empty $config['dsn_default'] = 0; // Place replies in the folder of the message being replied to @@ -982,5 +1021,14 @@ $config['autocomplete_single'] = false; // Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana $config['default_font'] = 'Verdana'; +// Default font size for composed HTML message. +// Supported sizes: 8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt +$config['default_font_size'] = '10pt'; + // Enables display of email address with name instead of a name (and address in title) $config['message_show_email'] = false; + +// Default behavior of Reply-All button: +// 0 - Reply-All always +// 1 - Reply-List if mailing list is detected +$config['reply_all_mode'] = 0; diff --git a/index.php b/index.php index 3be71f249..72515203d 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /* +-------------------------------------------------------------------------+ | Roundcube Webmail IMAP Client | - | Version 1.0-git | + | Version 0.9.5 | | | | Copyright (C) 2005-2013, The Roundcube Dev Team | | | @@ -39,7 +39,7 @@ require_once 'program/include/iniset.php'; // init application, start session, init output class, etc. -$RCMAIL = rcmail::get_instance($GLOBALS['env']); +$RCMAIL = rcmail::get_instance(); // Make the whole PHP output non-cacheable (#1487797) $RCMAIL->output->nocacheing_headers(); @@ -138,7 +138,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { } else { if (!$auth['valid']) { - $error_code = RCMAIL::ERROR_INVALID_REQUEST; + $error_code = RCMAIL::ERROR_INVALID_REQUEST; } else { $error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error(); @@ -153,9 +153,6 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { $error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed'; - // log failed login - $RCMAIL->log_login($auth['user'], true, $error_code); - $OUTPUT->show_message($error_message, 'warning'); $RCMAIL->plugins->exec_hook('login_failed', array( 'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user'])); diff --git a/installer/rcube_install.php b/installer/rcube_install.php index 9c9794cc2..df05db493 100644 --- a/installer/rcube_install.php +++ b/installer/rcube_install.php @@ -406,7 +406,7 @@ class rcube_install * * @param rcube_db Database object * - * @return boolean True if the schema is up-to-date, false if not or an error occured + * @return boolean True if the schema is up-to-date, false if not or an error occurred */ function db_schema_check($DB) { diff --git a/logs/.htaccess b/logs/.htaccess deleted file mode 100644 index 8e6a345dc..000000000 --- a/logs/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order allow,deny -Deny from all \ No newline at end of file diff --git a/main.inc.php.dist b/main.inc.php.dist new file mode 100644 index 000000000..15512f5dc --- /dev/null +++ b/main.inc.php.dist @@ -0,0 +1,900 @@ +/sendmail or to syslog +$rcmail_config['smtp_log'] = true; + +// Log successful logins to /userlogins or to syslog +$rcmail_config['log_logins'] = false; + +// Log session authentication errors to /session or to syslog +$rcmail_config['log_session'] = false; + +// Log SQL queries to /sql or to syslog +$rcmail_config['sql_debug'] = false; + +// Log IMAP conversation to /imap or to syslog +$rcmail_config['imap_debug'] = false; + +// Log LDAP conversation to /ldap or to syslog +$rcmail_config['ldap_debug'] = false; + +// Log SMTP conversation to /smtp or to syslog +$rcmail_config['smtp_debug'] = false; + +// ---------------------------------- +// IMAP +// ---------------------------------- + +// The mail host chosen to perform the log-in. +// Leave blank to show a textbox at login, give a list of hosts +// to display a pulldown menu or set one host as string. +// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls:// +// 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) +// %s - domain name after the '@' from e-mail address provided at login screen +// For example %n = mail.domain.tld, %t = domain.tld +// WARNING: After hostname change update of mail_host column in users table is +// required to match old user data records with the new host. +$rcmail_config['default_host'] = ''; + +// TCP port used for IMAP connections +$rcmail_config['default_port'] = 143; + +// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null to use +// best server supported one) +$rcmail_config['imap_auth_type'] = null; + +// If you know your imap's folder delimiter, you can specify it here. +// Otherwise it will be determined automatically +$rcmail_config['imap_delimiter'] = null; + +// If IMAP server doesn't support NAMESPACE extension, but you're +// using shared folders or personal root folder is non-empty, you'll need to +// set these options. All can be strings or arrays of strings. +// Folders need to be ended with directory separator, e.g. "INBOX." +// (special directory "~" is an exception to this rule) +// These can be used also to overwrite server's namespaces +$rcmail_config['imap_ns_personal'] = null; +$rcmail_config['imap_ns_other'] = null; +$rcmail_config['imap_ns_shared'] = null; + +// By default IMAP capabilities are readed after connection to IMAP server +// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list +// after login. Set to True if you've got this case. +$rcmail_config['imap_force_caps'] = false; + +// By default list of subscribed folders is determined using LIST-EXTENDED +// extension if available. Some servers (dovecot 1.x) returns wrong results +// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225 +// Enable this option to force LSUB command usage instead. +$rcmail_config['imap_force_lsub'] = false; + +// Some server configurations (e.g. Courier) doesn't list folders in all namespaces +// Enable this option to force listing of folders in all namespaces +$rcmail_config['imap_force_ns'] = false; + +// IMAP connection timeout, in seconds. Default: 0 (no limit) +$rcmail_config['imap_timeout'] = 0; + +// Optional IMAP authentication identifier to be used as authorization proxy +$rcmail_config['imap_auth_cid'] = null; + +// Optional IMAP authentication password to be used for imap_auth_cid +$rcmail_config['imap_auth_pw'] = null; + +// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'. +$rcmail_config['imap_cache'] = null; + +// Enables messages cache. Only 'db' cache is supported. +$rcmail_config['messages_cache'] = false; + + +// ---------------------------------- +// SMTP +// ---------------------------------- + +// SMTP server host (for sending mails). +// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls:// +// If left blank, the PHP mail() function is used +// Supported replacement variables: +// %h - user's IMAP hostname +// %n - hostname ($_SERVER['SERVER_NAME']) +// %t - hostname without the first part +// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) +// %z - IMAP domain (IMAP hostname without the first part) +// For example %n = mail.domain.tld, %t = domain.tld +$rcmail_config['smtp_server'] = ''; + +// SMTP port (default is 25; use 587 for STARTTLS or 465 for the +// deprecated SSL over SMTP (aka SMTPS)) +$rcmail_config['smtp_port'] = 25; + +// SMTP username (if required) if you use %u as the username Roundcube +// will use the current username for login +$rcmail_config['smtp_user'] = ''; + +// SMTP password (if required) if you use %p as the password Roundcube +// will use the current user's password for login +$rcmail_config['smtp_pass'] = ''; + +// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use +// best server supported one) +$rcmail_config['smtp_auth_type'] = ''; + +// Optional SMTP authentication identifier to be used as authorization proxy +$rcmail_config['smtp_auth_cid'] = null; + +// Optional SMTP authentication password to be used for smtp_auth_cid +$rcmail_config['smtp_auth_pw'] = null; + +// SMTP HELO host +// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages +// Leave this blank and you will get the server variable 'server_name' or +// localhost if that isn't defined. +$rcmail_config['smtp_helo_host'] = ''; + +// SMTP connection timeout, in seconds. Default: 0 (no limit) +// Note: There's a known issue where using ssl connection with +// timeout > 0 causes connection errors (https://bugs.php.net/bug.php?id=54511) +$rcmail_config['smtp_timeout'] = 0; + +// ---------------------------------- +// SYSTEM +// ---------------------------------- + +// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA. +// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING! +$rcmail_config['enable_installer'] = false; + +// don't allow these settings to be overriden by the user +$rcmail_config['dont_override'] = array(); + +// provide an URL where a user can get support for this Roundcube installation +// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE! +$rcmail_config['support_url'] = ''; + +// replace Roundcube logo with this image +// specify an URL relative to the document root of this Roundcube installation +$rcmail_config['skin_logo'] = null; + +// automatically create a new Roundcube user when log-in the first time. +// a new user will be created once the IMAP login succeeds. +// set to false if only registered users can use this service +$rcmail_config['auto_create_user'] = true; + +// Enables possibility to log in using email address from user identities +$rcmail_config['user_aliases'] = false; + +// use this folder to store log files (must be writeable for apache user) +// This is used by the 'file' log driver. +$rcmail_config['log_dir'] = 'logs/'; + +// use this folder to store temp files (must be writeable for apache user) +$rcmail_config['temp_dir'] = 'temp/'; + +// lifetime of message cache +// possible units: s, m, h, d, w +$rcmail_config['message_cache_lifetime'] = '10d'; + +// enforce connections over https +// with this option enabled, all non-secure connections will be redirected. +// set the port for the ssl connection as value of this option if it differs from the default 443 +$rcmail_config['force_https'] = false; + +// tell PHP that it should work as under secure connection +// even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set) +// e.g. when you're running Roundcube behind a https proxy +// this option is mutually exclusive to 'force_https' and only either one of them should be set to true. +$rcmail_config['use_https'] = false; + +// Allow browser-autocompletion on login form. +// 0 - disabled, 1 - username and host only, 2 - username, host, password +$rcmail_config['login_autocomplete'] = 0; + +// Forces conversion of logins to lower case. +// 0 - disabled, 1 - only domain part, 2 - domain and local part. +// If users authentication is case-insensitive this must be enabled. +// Note: After enabling it all user records need to be updated, e.g. with query: +// UPDATE users SET username = LOWER(username); +$rcmail_config['login_lc'] = 2; + +// Includes should be interpreted as PHP files +$rcmail_config['skin_include_php'] = false; + +// display software version on login screen +$rcmail_config['display_version'] = false; + +// Session lifetime in minutes +$rcmail_config['session_lifetime'] = 10; + +// Session domain: .example.org +$rcmail_config['session_domain'] = ''; + +// Session name. Default: 'roundcube_sessid' +$rcmail_config['session_name'] = null; + +// Session authentication cookie name. Default: 'roundcube_sessauth' +$rcmail_config['session_auth_name'] = null; + +// Session path. Defaults to PHP session.cookie_path setting. +$rcmail_config['session_path'] = null; + +// Backend to use for session storage. Can either be 'db' (default) or 'memcache' +// If set to memcache, a list of servers need to be specified in 'memcache_hosts' +// Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed +$rcmail_config['session_storage'] = 'db'; + +// Use these hosts for accessing memcached +// Define any number of hosts in the form of hostname:port or unix:///path/to/socket.file +$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' ); + +// check client IP in session athorization +$rcmail_config['ip_check'] = false; + +// check referer of incoming requests +$rcmail_config['referer_check'] = false; + +// X-Frame-Options HTTP header value sent to prevent from Clickjacking. +// Possible values: sameorigin|deny. Set to false in order to disable sending them +$rcmail_config['x_frame_options'] = 'sameorigin'; + +// this key is used to encrypt the users imap password which is stored +// in the session record (and the client cookie if remember password is enabled). +// please provide a string of exactly 24 chars. +$rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str'; + +// Automatically add this domain to user names for login +// Only for IMAP servers that require full e-mail addresses for login +// Specify an array with 'host' => 'domain' values to support multiple hosts +// Supported replacement variables: +// %h - user's IMAP hostname +// %n - hostname ($_SERVER['SERVER_NAME']) +// %t - hostname without the first part +// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) +// %z - IMAP domain (IMAP hostname without the first part) +// For example %n = mail.domain.tld, %t = domain.tld +$rcmail_config['username_domain'] = ''; + +// This domain will be used to form e-mail addresses of new users +// Specify an array with 'host' => 'domain' values to support multiple hosts +// Supported replacement variables: +// %h - user's IMAP hostname +// %n - http hostname ($_SERVER['SERVER_NAME']) +// %d - domain (http hostname without the first part) +// %z - IMAP domain (IMAP hostname without the first part) +// For example %n = mail.domain.tld, %t = domain.tld +$rcmail_config['mail_domain'] = ''; + +// Password charset. +// Use it if your authentication backend doesn't support UTF-8. +// Defaults to ISO-8859-1 for backward compatibility +$rcmail_config['password_charset'] = 'ISO-8859-1'; + +// How many seconds must pass between emails sent by a user +$rcmail_config['sendmail_delay'] = 0; + +// Maximum number of recipients per message. Default: 0 (no limit) +$rcmail_config['max_recipients'] = 0; + +// Maximum allowednumber of members of an address group. Default: 0 (no limit) +// If 'max_recipients' is set this value should be less or equal +$rcmail_config['max_group_members'] = 0; + +// add this user-agent to message headers when sending +$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION; + +// use this name to compose page titles +$rcmail_config['product_name'] = 'Roundcube Webmail'; + +// try to load host-specific configuration +// see http://trac.roundcube.net/wiki/Howto_Config for more details +$rcmail_config['include_host_config'] = false; + +// path to a text file which will be added to each sent message +// paths are relative to the Roundcube root folder +$rcmail_config['generic_message_footer'] = ''; + +// path to a text file which will be added to each sent HTML message +// paths are relative to the Roundcube root folder +$rcmail_config['generic_message_footer_html'] = ''; + +// add a received header to outgoing mails containing the creators IP and hostname +$rcmail_config['http_received_header'] = false; + +// Whether or not to encrypt the IP address and the host name +// these could, in some circles, be considered as sensitive information; +// however, for the administrator, these could be invaluable help +// when tracking down issues. +$rcmail_config['http_received_header_encrypt'] = false; + +// This string is used as a delimiter for message headers when sending +// a message via mail() function. Leave empty for auto-detection +$rcmail_config['mail_header_delimiter'] = NULL; + +// number of chars allowed for line when wrapping text. +// text wrapping is done when composing/sending messages +$rcmail_config['line_length'] = 72; + +// send plaintext messages as format=flowed +$rcmail_config['send_format_flowed'] = true; + +// According to RFC2298, return receipt envelope sender address must be empty. +// If this option is true, Roundcube will use user's identity as envelope sender for MDN responses. +$rcmail_config['mdn_use_from'] = false; + +// Set identities access level: +// 0 - many identities with possibility to edit all params +// 1 - many identities with possibility to edit all params but not email address +// 2 - one identity with possibility to edit all params +// 3 - one identity with possibility to edit all params but not email address +// 4 - one identity with possibility to edit only signature +$rcmail_config['identities_level'] = 0; + +// Mimetypes supported by the browser. +// attachments of these types will open in a preview window +// either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf' +$rcmail_config['client_mimetypes'] = null; # null == default + +// Path to a local mime magic database file for PHPs finfo extension. +// Set to null if the default path should be used. +$rcmail_config['mime_magic'] = null; + +// Absolute path to a local mime.types mapping table file. +// This is used to derive mime-types from the filename extension or vice versa. +// Such a file is usually part of the apache webserver. If you don't find a file named mime.types on your system, +// download it from http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +$rcmail_config['mime_types'] = null; + +// path to imagemagick identify binary +$rcmail_config['im_identify_path'] = null; + +// path to imagemagick convert binary +$rcmail_config['im_convert_path'] = null; + +// Size of thumbnails from image attachments displayed below the message content. +// Note: whether images are displayed at all depends on the 'inline_images' option. +// Set to 0 to display images in full size. +$rcmail_config['image_thumbnail_size'] = 240; + +// maximum size of uploaded contact photos in pixel +$rcmail_config['contact_photo_size'] = 160; + +// Enable DNS checking for e-mail address validation +$rcmail_config['email_dns_check'] = false; + +// Disables saving sent messages in Sent folder (like gmail) (Default: false) +// Note: useful when SMTP server stores sent mail in user mailbox +$rcmail_config['no_save_sent_messages'] = false; + +// ---------------------------------- +// PLUGINS +// ---------------------------------- + +// List of active plugins (in plugins/ directory) +$rcmail_config['plugins'] = array(); + +// ---------------------------------- +// USER INTERFACE +// ---------------------------------- + +// default messages sort column. Use empty value for default server's sorting, +// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc' +$rcmail_config['message_sort_col'] = ''; + +// default messages sort order +$rcmail_config['message_sort_order'] = 'DESC'; + +// These cols are shown in the message list. Available cols are: +// subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority' +$rcmail_config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment'); + +// the default locale setting (leave empty for auto-detection) +// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR +$rcmail_config['language'] = null; + +// use this format for date display (date or strftime format) +$rcmail_config['date_format'] = 'Y-m-d'; + +// give this choice of date formats to the user to select from +// Note: do not use ambiguous formats like m/d/Y +$rcmail_config['date_formats'] = array('Y-m-d', 'Y/m/d', 'Y.m.d', 'd-m-Y', 'd/m/Y', 'd.m.Y', 'j.n.Y'); + +// use this format for time display (date or strftime format) +$rcmail_config['time_format'] = 'H:i'; + +// give this choice of time formats to the user to select from +$rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A'); + +// use this format for short date display (derived from date_format and time_format) +$rcmail_config['date_short'] = 'D H:i'; + +// use this format for detailed date/time formatting (derived from date_format and time_format) +$rcmail_config['date_long'] = 'Y-m-d H:i'; + +// store draft message is this mailbox +// leave blank if draft messages should not be stored +// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) +$rcmail_config['drafts_mbox'] = 'Drafts'; + +// store spam messages in this mailbox +// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) +$rcmail_config['junk_mbox'] = 'Junk'; + +// store sent message is this mailbox +// leave blank if sent messages should not be stored +// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) +$rcmail_config['sent_mbox'] = 'Sent'; + +// move messages to this folder when deleting them +// leave blank if they should be deleted directly +// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) +$rcmail_config['trash_mbox'] = 'Trash'; + +// display these folders separately in the mailbox list. +// these folders will also be displayed with localized names +// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP) +$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash'); + +// automatically create the above listed default folders on first login +$rcmail_config['create_default_folders'] = false; + +// protect the default folders from renames, deletes, and subscription changes +$rcmail_config['protect_default_folders'] = true; + +// if in your system 0 quota means no limit set this option to true +$rcmail_config['quota_zero_as_unlimited'] = false; + +// Make use of the built-in spell checker. It is based on GoogieSpell. +// Since Google only accepts connections over https your PHP installatation +// requires to be compiled with Open SSL support +$rcmail_config['enable_spellcheck'] = true; + +// Enables spellchecker exceptions dictionary. +// Setting it to 'shared' will make the dictionary shared by all users. +$rcmail_config['spellcheck_dictionary'] = false; + +// Set the spell checking engine. 'googie' is the default. 'pspell' is also available, +// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here. +$rcmail_config['spellcheck_engine'] = 'pspell'; + +// For a locally installed Nox Spell Server, please specify the URI to call it. +// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72 +// Leave empty to use the Google spell checking service, what means +// that the message content will be sent to Google in order to check spelling +$rcmail_config['spellcheck_uri'] = ''; + +// These languages can be selected for spell checking. +// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch'); +// Leave empty for default set of available language. +$rcmail_config['spellcheck_languages'] = NULL; + +// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE) +$rcmail_config['spellcheck_ignore_caps'] = false; + +// Makes that words with numbers will be ignored (e.g. g00gle) +$rcmail_config['spellcheck_ignore_nums'] = false; + +// Makes that words with symbols will be ignored (e.g. g@@gle) +$rcmail_config['spellcheck_ignore_syms'] = false; + +// Use this char/string to separate recipients when composing a new message +$rcmail_config['recipients_separator'] = ','; + +// don't let users set pagesize to more than this value if set +$rcmail_config['max_pagesize'] = 200; + +// Minimal value of user's 'refresh_interval' setting (in seconds) +$rcmail_config['min_refresh_interval'] = 60; + +// Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option. +// By default refresh time is set to 1 second. You can set this value to true +// or any integer value indicating number of seconds. +$rcmail_config['upload_progress'] = false; + +// Specifies for how many seconds the Undo button will be available +// after object delete action. Currently used with supporting address book sources. +// Setting it to 0, disables the feature. +$rcmail_config['undo_timeout'] = 0; + +// ---------------------------------- +// ADDRESSBOOK SETTINGS +// ---------------------------------- + +// This indicates which type of address book to use. Possible choises: +// 'sql' (default), 'ldap' and ''. +// If set to 'ldap' then it will look at using the first writable LDAP +// address book as the primary address book and it will not display the +// SQL address book in the 'Address Book' view. +// If set to '' then no address book will be displayed or only the +// addressbook which is created by a plugin (like CardDAV). +$rcmail_config['address_book_type'] = 'sql'; + +// In order to enable public ldap search, configure an array like the Verisign +// example further below. if you would like to test, simply uncomment the example. +// Array key must contain only safe characters, ie. a-zA-Z0-9_ +$rcmail_config['ldap_public'] = array(); + +// If you are going to use LDAP for individual address books, you will need to +// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it. +// +// The recommended directory structure for LDAP is to store all the address book entries +// under the users main entry, e.g.: +// +// o=root +// ou=people +// uid=user@domain +// mail=contact@contactdomain +// +// So the base_dn would be uid=%fu,ou=people,o=root +// The bind_dn would be the same as based_dn or some super user login. +/* + * example config for Verisign directory + * +$rcmail_config['ldap_public']['Verisign'] = array( + 'name' => 'Verisign.com', + // Replacement variables supported in host names: + // %h - user's IMAP hostname + // %n - hostname ($_SERVER['SERVER_NAME']) + // %t - hostname without the first part + // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) + // %z - IMAP domain (IMAP hostname without the first part) + // For example %n = mail.domain.tld, %t = domain.tld + 'hosts' => array('directory.verisign.com'), + 'port' => 389, + 'use_tls' => false, + 'ldap_version' => 3, // using LDAPv3 + 'network_timeout' => 10, // The timeout (in seconds) for connect + bind arrempts. This is only supported in PHP >= 5.3.0 with OpenLDAP 2.x + 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login. + // %fu - The full username provided, assumes the username is an email + // address, uses the username_domain value if not an email address. + // %u - The username prior to the '@'. + // %d - The domain name after the '@'. + // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com" + // %dn - DN found by ldap search when search_filter/search_base_dn are used + 'base_dn' => '', + 'bind_dn' => '', + 'bind_pass' => '', + // It's possible to bind for an individual address book + // The login name is used to search for the DN to bind with + 'search_base_dn' => '', + 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))' + // DN and password to bind as before searching for bind DN, if anonymous search is not allowed + 'search_bind_dn' => '', + 'search_bind_pw' => '', + // Default for %dn variable if search doesn't return DN value + 'search_dn_default' => '', + // Optional authentication identifier to be used as SASL authorization proxy + // bind_dn need to be empty + 'auth_cid' => '', + // SASL authentication method (for proxy auth), e.g. DIGEST-MD5 + 'auth_method' => '', + // Indicates if the addressbook shall be hidden from the list. + // With this option enabled you can still search/view contacts. + 'hidden' => false, + // Indicates if the addressbook shall not list contacts but only allows searching. + 'searchonly' => false, + // Indicates if we can write to the LDAP directory or not. + // If writable is true then these fields need to be populated: + // LDAP_Object_Classes, required_fields, LDAP_rdn + 'writable' => false, + // To create a new contact these are the object classes to specify + // (or any other classes you wish to use). + 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'), + // The RDN field that is used for new entries, this field needs + // to be one of the search_fields, the base of base_dn is appended + // to the RDN to insert into the LDAP directory. + 'LDAP_rdn' => 'cn', + // The required fields needed to build a new contact as required by + // the object classes (can include additional fields not required by the object classes). + 'required_fields' => array('cn', 'sn', 'mail'), + 'search_fields' => array('mail', 'cn'), // fields to search in + // mapping of contact fields to directory attributes + // for every attribute one can specify the number of values (limit) allowed. + // default is 1, a wildcard * means unlimited + 'fieldmap' => array( + // Roundcube => LDAP:limit + 'name' => 'cn', + 'surname' => 'sn', + 'firstname' => 'givenName', + 'jobtitle' => 'title', + 'email' => 'mail:*', + 'phone:home' => 'homePhone', + 'phone:work' => 'telephoneNumber', + 'phone:mobile' => 'mobile', + 'phone:pager' => 'pager', + 'street' => 'street', + 'zipcode' => 'postalCode', + 'region' => 'st', + 'locality' => 'l', + // if you country is a complex object, you need to configure 'sub_fields' below + 'country' => 'c', + 'organization' => 'o', + 'department' => 'ou', + 'jobtitle' => 'title', + 'notes' => 'description', + // these currently don't work: + // 'phone:workfax' => 'facsimileTelephoneNumber', + // 'photo' => 'jpegPhoto', + // 'manager' => 'manager', + // 'assistant' => 'secretary', + ), + // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country' + 'sub_fields' => array(), + // Generate values for the following LDAP attributes automatically when creating a new record + 'autovalues' => array( + // 'uid' => 'md5(microtime())', // You may specify PHP code snippets which are then eval'ed + // 'mail' => '{givenname}.{sn}@mydomain.com', // or composite strings with placeholders for existing attributes + ), + 'sort' => 'cn', // The field to sort the listing by. + 'scope' => 'sub', // search mode: sub|base|list + 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act + 'fuzzy_search' => true, // server allows wildcard search + 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it) + 'numsub_filter' => '(objectClass=organizationalUnit)', // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting + 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit. + 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit. + 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups + + // definition for contact groups (uncomment if no groups are supported) + // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above) + // if the groups base_dn is empty, the contact base_dn is used for the groups as well + // -> in this case, assure that groups and contacts are separated due to the concernig filters! + 'groups' => array( + 'base_dn' => '', + 'scope' => 'sub', // search mode: sub|base|list + 'filter' => '(objectClass=groupOfNames)', + 'object_classes' => array("top", "groupOfNames"), + 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember + 'name_attr' => 'cn', // attribute to be used as group name + ), +); +*/ + +// An ordered array of the ids of the addressbooks that should be searched +// when populating address autocomplete fields server-side. ex: array('sql','Verisign'); +$rcmail_config['autocomplete_addressbooks'] = array('sql'); + +// The minimum number of characters required to be typed in an autocomplete field +// before address books will be searched. Most useful for LDAP directories that +// may need to do lengthy results building given overly-broad searches +$rcmail_config['autocomplete_min_length'] = 1; + +// Number of parallel autocomplete requests. +// If there's more than one address book, n parallel (async) requests will be created, +// where each request will search in one address book. By default (0), all address +// books are searched in one request. +$rcmail_config['autocomplete_threads'] = 0; + +// Max. numer of entries in autocomplete popup. Default: 15. +$rcmail_config['autocomplete_max'] = 15; + +// show address fields in this order +// available placeholders: {street}, {locality}, {zipcode}, {country}, {region} +$rcmail_config['address_template'] = '{street}
{locality} {zipcode}
{country} {region}'; + +// Matching mode for addressbook search (including autocompletion) +// 0 - partial (*abc*), default +// 1 - strict (abc) +// 2 - prefix (abc*) +// Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode +$rcmail_config['addressbook_search_mode'] = 0; + +// ---------------------------------- +// USER PREFERENCES +// ---------------------------------- + +// Use this charset as fallback for message decoding +$rcmail_config['default_charset'] = 'UTF-8'; + +// skin name: folder from skins/ +$rcmail_config['skin'] = 'larry'; + +// show up to X items in messages list view +$rcmail_config['mail_pagesize'] = 50; + +// show up to X items in contacts list view +$rcmail_config['addressbook_pagesize'] = 50; + +// sort contacts by this col (preferably either one of name, firstname, surname) +$rcmail_config['addressbook_sort_col'] = 'surname'; + +// the way how contact names are displayed in the list +// 0: display name +// 1: (prefix) firstname middlename surname (suffix) +// 2: (prefix) surname firstname middlename (suffix) +// 3: (prefix) surname, firstname middlename (suffix) +$rcmail_config['addressbook_name_listing'] = 0; + +// use this timezone to display date/time +// valid timezone identifers are listed here: php.net/manual/en/timezones.php +// 'auto' will use the browser's timezone settings +$rcmail_config['timezone'] = 'auto'; + +// prefer displaying HTML messages +$rcmail_config['prefer_html'] = true; + +// display remote inline images +// 0 - Never, always ask +// 1 - Ask if sender is not in address book +// 2 - Always show inline images +$rcmail_config['show_images'] = 0; + +// open messages in new window +$rcmail_config['message_extwin'] = false; + +// open message compose form in new window +$rcmail_config['compose_extwin'] = false; + +// compose html formatted messages by default +// 0 - never, 1 - always, 2 - on reply to HTML message, 3 - on forward or reply to HTML message +$rcmail_config['htmleditor'] = 0; + +// show pretty dates as standard +$rcmail_config['prettydate'] = true; + +// save compose message every 300 seconds (5min) +$rcmail_config['draft_autosave'] = 300; + +// default setting if preview pane is enabled +$rcmail_config['preview_pane'] = false; + +// Mark as read when viewed in preview pane (delay in seconds) +// Set to -1 if messages in preview pane should not be marked as read +$rcmail_config['preview_pane_mark_read'] = 0; + +// Clear Trash on logout +$rcmail_config['logout_purge'] = false; + +// Compact INBOX on logout +$rcmail_config['logout_expunge'] = false; + +// Display attached images below the message body +$rcmail_config['inline_images'] = true; + +// Encoding of long/non-ascii attachment names: +// 0 - Full RFC 2231 compatible +// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default) +// 2 - Full 2047 compatible +$rcmail_config['mime_param_folding'] = 1; + +// Set true if deleted messages should not be displayed +// This will make the application run slower +$rcmail_config['skip_deleted'] = false; + +// Set true to Mark deleted messages as read as well as deleted +// False means that a message's read status is not affected by marking it as deleted +$rcmail_config['read_when_deleted'] = true; + +// Set to true to never delete messages immediately +// Use 'Purge' to remove messages marked as deleted +$rcmail_config['flag_for_deletion'] = false; + +// Default interval for auto-refresh requests (in seconds) +// These are requests for system state updates e.g. checking for new messages, etc. +// Setting it to 0 disables the feature. +$rcmail_config['refresh_interval'] = 60; + +// If true all folders will be checked for recent messages +$rcmail_config['check_all_folders'] = false; + +// If true, after message delete/move, the next message will be displayed +$rcmail_config['display_next'] = true; + +// 0 - Do not expand threads +// 1 - Expand all threads automatically +// 2 - Expand only threads with unread messages +$rcmail_config['autoexpand_threads'] = 0; + +// When replying: +// -1 - don't cite the original message +// 0 - place cursor below the original message +// 1 - place cursor above original message (top posting) +$rcmail_config['reply_mode'] = 0; + +// When replying strip original signature from message +$rcmail_config['strip_existing_sig'] = true; + +// Show signature: +// 0 - Never +// 1 - Always +// 2 - New messages only +// 3 - Forwards and Replies only +$rcmail_config['show_sig'] = 1; + +// Use MIME encoding (quoted-printable) for 8bit characters in message body +$rcmail_config['force_7bit'] = false; + +// Defaults of the search field configuration. +// The array can contain a per-folder list of header fields which should be considered when searching +// The entry with key '*' stands for all folders which do not have a specific list set. +// Please note that folder names should to be in sync with $rcmail_config['default_folders'] +$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1)); + +// Defaults of the addressbook search field configuration. +$rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1); + +// 'Delete always' +// This setting reflects if mail should be always deleted +// when moving to Trash fails. This is necessary in some setups +// when user is over quota and Trash is included in the quota. +$rcmail_config['delete_always'] = false; + +// Directly delete messages in Junk instead of moving to Trash +$rcmail_config['delete_junk'] = false; + +// Behavior if a received message requests a message delivery notification (read receipt) +// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask) +// 3 = send automatically if sender is in addressbook, otherwise ask the user +// 4 = send automatically if sender is in addressbook, otherwise ignore +$rcmail_config['mdn_requests'] = 0; + +// Return receipt checkbox default state +$rcmail_config['mdn_default'] = 0; + +// Delivery Status Notification checkbox default state +// Note: This can be used only if smtp_server is non-empty +$rcmail_config['dsn_default'] = 0; + +// Place replies in the folder of the message being replied to +$rcmail_config['reply_same_folder'] = false; + +// Sets default mode of Forward feature to "forward as attachment" +$rcmail_config['forward_attachment'] = false; + +// Defines address book (internal index) to which new contacts will be added +// By default it is the first writeable addressbook. +// Note: Use '0' for built-in address book. +$rcmail_config['default_addressbook'] = null; + +// Enables spell checking before sending a message. +$rcmail_config['spellcheck_before_send'] = false; + +// Skip alternative email addresses in autocompletion (show one address per contact) +$rcmail_config['autocomplete_single'] = false; + +// Default font for composed HTML message. +// Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New, +// Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana +$rcmail_config['default_font'] = 'Verdana'; + +// end of config file 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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ stable stable - GNU GPLv3+ + GNU GPLv2 - 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 @@ 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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ + | + +-----------------------------------------------------------------------+ +*/ + +$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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ archive pear.roundcube.net Archive feature for Roundcube - 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. + This adds a button to move the selected messages to an archive folder. The folder can be selected in the settings panel. Thomas Bruederli thomasb roundcube@gmail.com yes - 2013-01-20 + 2011-11-23 - 2.0 - 2.0 + 1.6 + 1.6 stable @@ -34,55 +34,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ .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 @@ +.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 @@ +.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 @@ +.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 @@ .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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ .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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ .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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ .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 @@ +.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 @@ +.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 @@ +.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 @@ .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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ .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 @@ .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 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 @@ +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 $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 @@ + 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 @@ + \ 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + \ 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 @@ + + + compose_addressbook + + Cor Bosman + cor + cor@roundcu.be + yes + + https://github.com/corbosman/compose_addressbook + + 8.0 + + GNU GPLv2 + 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/compose_addressbook.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/searchfield.gif 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-anim_basic_16x16.gif 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_flat_75_ffffff_40x100.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_65_ffffff_1x400.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_dadada_1x400.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_222222_256x240.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_2e83ff_256x240.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_454545_256x240.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_888888_256x240.png 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 Binary files /dev/null and b/plugins/compose_addressbook/skins/classic/smoothness/images/ui-icons_cd0a0a_256x240.png 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('' + rcmail.gettext('movemessagetotrash') + ''); + //else + // $("#rcm_delete").html('' + rcmail.gettext('deletemessage') + ''); +} + +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 = $('
  • ').addClass(liclass); + $('').attr('href', '#' + command).addClass('active').html('' + rcmail.gettext(label) + '').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 = $('
  • ').addClass(pos); + subMenu.children('a').clone().appendTo(mainLink) + subMenu.children('a').addClass('mainlink'); + } + + var newMenu = $(' - - 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 @@ +.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 @@ +.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/.inc | + | plugins/markasjunk/localization/.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 @@ +.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 @@ + 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 @@ + + */ + +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 @@ +_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 @@ +_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 @@ +_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 @@ +_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 @@ +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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ +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 @@ + + + markasjunk2 + http://github.com/JohnDoh/Roundcube-Plugin-Mark-as-Junk-2/ + Learn messages as Junk/Not Junk + 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.). + + Philip Weir + JohnDoh + roundcube@tehinterweb.co.uk + yes + + 2013-02-24 + + + 1.6 + 1.6 + + + stable + stable + + GNU GPLv3+ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.1 + + + 1.7.0 + + + + + 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 Binary files /dev/null and b/plugins/markasjunk2/skins/classic/mail_toolbar.gif 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 Binary files /dev/null and b/plugins/markasjunk2/skins/classic/mail_toolbar.png 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 Binary files /dev/null and b/plugins/markasjunk2/skins/classic/messageactions.gif differ diff --git a/plugins/markasjunk2/skins/classic/messageactions.png b/plugins/markasjunk2/skins/classic/messageactions.png new file mode 100644 index 000000000..11a7f7f51 Binary files /dev/null and b/plugins/markasjunk2/skins/classic/messageactions.png 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 Binary files /dev/null and b/plugins/markasjunk2/skins/larry/mail_toolbar.png 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 Binary files /dev/null and b/plugins/markasjunk2/skins/larry/messageactions.png 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 Binary files /dev/null and b/plugins/message_highlight/colorpicker/images/color.png 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 Binary files /dev/null and b/plugins/message_highlight/colorpicker/images/colorpicker.png 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 Binary files /dev/null and b/plugins/message_highlight/colorpicker/images/graybar.jpg 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 Binary files /dev/null and b/plugins/message_highlight/colorpicker/images/grid.gif 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 Binary files /dev/null and b/plugins/message_highlight/colorpicker/images/meta100.png 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 Binary files /dev/null and b/plugins/message_highlight/colorpicker/images/transparentpixel.gif 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(''); + + $('.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#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)? ' ': '' + ).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( + '' + ).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( + '
    ' + ).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( + ' ' + ).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('transparent'); + if ($.fn.mColorPicker.init.showLogo) $('#mColorPickerFooter').prepend('Meta100 - Designing Fun'); + + $("#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 @@ + 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + + 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(''+row+''); + //$('.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 @@ +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 @@ + + + message_highlight + + Cor Bosman + cor + cor@roundcu.be + yes + + https://github.com/corbosman/message_highlight + + 2.0 + + GNU GPLv2 + 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 @@ +.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 @@ +.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 @@ +.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/.inc | + | plugins/new_user_dialog/localization/.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 @@ +.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 @@ +.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 @@ +.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 @@ roundcube@gmail.com yes - 2013-05-09 + 2012-01-16 + - 2.0 - 2.0 + 1.5 + 1.0 stable stable GNU GPLv3+ + +- Use jquery UI to render the dialog +- Fixed IDNA encoding/decoding of e-mail addresses (#1487909) + @@ -66,4 +71,84 @@ + + + 2010-03-29 + + + 1.0 + 1.0 + + + stable + stable + + GNU GPLv2 + + + + 2010-05-13 + + + 1.1 + 1.0 + + + stable + stable + + GNU GPLv2 + +- Fix space bar and backspace buttons not working (#1486726) + + + + 2010-05-27 + + + 1.2 + 1.0 + + + stable + stable + + GNU GPLv2 + +- Add overlay box only to mail task main template +- Fix possible error on form submission (#1486103) + + + + 2010-12-02 + + + 1.3 + 1.0 + + + stable + stable + + GNU GPLv2 + +- Added setting of focus on name input +- Added gl_ES translation + + + + 2012-01-16 + + + 1.5 + 1.0 + + + stable + stable + + GNU GPLv2 + - Use jquery UI to render the dialog + + 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 @@ stable stable - GNU GPLv3+ + GNU GPLv2 - 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 @@ 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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 @@ +.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) $('').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 @@ alec@alec.pl yes - 2013-03-16 + 2012-02-07 - 0.5 - 0.5 + 0.4 + 0.3 stable stable - GNU GPLv3+ + GNU GPLv2 - diff --git a/plugins/newmail_notifier/sound.mp3 b/plugins/newmail_notifier/sound.mp3 new file mode 100644 index 000000000..3b494a94d Binary files /dev/null and b/plugins/newmail_notifier/sound.mp3 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 + @author Aleksander 'A.L.E.C' Machniak @author ----------------------------------------------------------------------- - 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 + * 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 + * @version 2.0 + * @author Fulvio Venturelli */ 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 + * */ 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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ alec@alec.pl yes - 2013-04-28 + 2012-11-15 - 3.4 + 3.2 2.0 stable stable - GNU GPLv3+ + GNU GPLv2 -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 @@ -346,36 +347,5 @@ Added password_force_save option - Added Samba password (#1488364) - - 2012-11-15 - - 3.2 - 2.0 - - - stable - stable - - GNU GPLv2 - -- Fix wrong (non-specific) error message on crypt or connection error (#1488808) -- Added option to define IMAP hosts that support password changes - password_hosts - - - - 2013-03-30 - - 3.3 - 2.0 - - - stable - stable - - GNU GPLv2 - -Added new cPanel driver - fixes localization related issues (#1487015) - - 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 @@ - * - * 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 | + +-------------------------------------------------------------------------+ + + $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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + + + quickrules + http://github.com/JohnDoh/Roundcube-Plugin-QuickRules/ + Adds a button to the message list to allow the quick creation of rules in the SieveRules plugin + 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. + + Philip Weir + JohnDoh + roundcube@tehinterweb.co.uk + yes + + 2013-02-24 + + + 1.4 + 1.4 + + + stable + stable + + GNU GPLv3+ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.1 + + + 1.7.0 + + + sieverules + http://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/ + 1.15 + + + + + 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 @@ + 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 Binary files /dev/null and b/plugins/quickrules/skins/classic/mail_toolbar.gif 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 Binary files /dev/null and b/plugins/quickrules/skins/classic/mail_toolbar.png differ diff --git a/plugins/quickrules/skins/classic/messageactions.gif b/plugins/quickrules/skins/classic/messageactions.gif new file mode 100644 index 000000000..bdfa8e142 Binary files /dev/null and b/plugins/quickrules/skins/classic/messageactions.gif differ diff --git a/plugins/quickrules/skins/classic/messageactions.png b/plugins/quickrules/skins/classic/messageactions.png new file mode 100644 index 000000000..492565fda Binary files /dev/null and b/plugins/quickrules/skins/classic/messageactions.png 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 Binary files /dev/null and b/plugins/quickrules/skins/larry/mail_toolbar.png differ diff --git a/plugins/quickrules/skins/larry/messageactions.png b/plugins/quickrules/skins/larry/messageactions.png new file mode 100644 index 000000000..f7a431d10 Binary files /dev/null and b/plugins/quickrules/skins/larry/messageactions.png 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 @@ + "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 @@ +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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + \ 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 @@ + + + sauserprefs + http://github.com/JohnDoh/Roundcube-Plugin-SpamAssassin-User-Prefs-SQL/ + Control SpamAssassin settings from within Roundcube + 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. + + Philip Weir + JohnDoh + roundcube@tehinterweb.co.uk + yes + + 2013-02-24 + + + 1.10 + 1.10 + + + stable + stable + + GNU GPLv3+ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.1 + + + 1.7.0 + + + + + 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 = $('').attr('id', 'settingstabpluginsauserprefs').addClass('tablink'); + var button = $('').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 @@ + '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', " "); + $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') .":  ". $select_all ."  ". $select_invert ."  ". $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', ' '); + } + + $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 = "   " . 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', ' '); + $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']) ." ". html::label($field_id .'_1', rcmail::Q($this->gettext('spamreport1'))) . "
    "; + + $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')) . "

    "; + + $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, " "); + + $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 ."  ". $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', ' '); + + $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 Binary files /dev/null and b/plugins/sauserprefs/skins/classic/help.gif differ diff --git a/plugins/sauserprefs/skins/classic/icons.gif b/plugins/sauserprefs/skins/classic/icons.gif new file mode 100644 index 000000000..e52c33e51 Binary files /dev/null and b/plugins/sauserprefs/skins/classic/icons.gif differ diff --git a/plugins/sauserprefs/skins/classic/icons.png b/plugins/sauserprefs/skins/classic/icons.png new file mode 100644 index 000000000..065d880bd Binary files /dev/null and b/plugins/sauserprefs/skins/classic/icons.png 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 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + +
    + +
    + +
    + + + \ 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 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + + + + + + + +
    + +
    + +
    +
    + + +
    +
    +
    + +

     

    + + + \ 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 Binary files /dev/null and b/plugins/sauserprefs/skins/larry/help.png differ diff --git a/plugins/sauserprefs/skins/larry/icons.png b/plugins/sauserprefs/skins/larry/icons.png new file mode 100644 index 000000000..6e070901e Binary files /dev/null and b/plugins/sauserprefs/skins/larry/icons.png 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 Binary files /dev/null and b/plugins/sauserprefs/skins/larry/listicons.png 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="pagetitle" /> + + + + + + + + + + + + + +
    + + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + + + + + + + \ 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="pagetitle" /> + + + + + + + + + + + +

    + +
    + +
    + +
    + + +
    + + + + + \ 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 @@ stable stable - GNU GPLv3+ + GNU GPLv2 -
    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 @@ +/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 " +$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 @@ + \ 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 @@ + \ 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 @@ + | + | 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 @@ + | + | 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'] = '' . + "\r\n\r\n" . $action['msg'] . "\r\n\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>/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)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 @@ +
    Por ejemplo, si en Jaume envia un misssatge un dilluns, i té un període fixat en 7, en Jaume rebrà un avís de vacances el dilluns però no en rebrà cap altre fins al proper dilluns, malgrat envïi més missatges durant la setmana.'; +$messages['vachandleexp'] = 'Es pot usar un manejador per a vincular diferents missatges de vacances tots junts. Un cop s\'envïi el missatge no se n\'enviarà 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 és la sefa adreça personal i no està a la llista no se li enviarà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ïr el nom de la capçalera a verificar'; +$messages['headerbadchars'] = 'Error: La capçalera conté carà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èric'; +$messages['noredirect'] = 'Introduïu una adreça de correu a la qual redirigir tots els missatges'; +$messages['redirectaddresserror'] = 'Error: Adreça no vàlida'; +$messages['noreject'] = 'Introduïu el text a enviar en els missatges rebutjats'; +$messages['vacnodays'] = 'Introduïu el número de dies per al període que el missatge no serà reenviat a la mateixa persona'; +$messages['vacdayswrongformat'] = 'Error: El període ha de ser de més d\'1 dia'; +$messages['vacnomsg'] = 'Introduïu un text per al missatge'; +$messages['notifynomethod'] = 'Introduïu un mètode a través del qual s\'enviarà la notificació '; +$messages['notifynomsg'] = 'Introduïu un text per al seu missatge'; +$messages['sieveruleexp'] = 'Heu de definir una o més regles que s\'empraran per a comprar els missatges. Els filtres só n executats en l\'ordre que apareixen a l\'esquerra d\'aquesta pantalla. Si es troba una coincidència, la resta del filtres no es comproven.'; +$messages['sieveactexp'] = 'Seleccioneu una de les opcions que apareixen a continuació . Aquesta acció serà executada per cada missatge que encaixi amb les regles definides a sobre d\'aquest text.'; +$messages['sieveheadershlp'] = 'A continuació hi ha alguns exemples de capçaleres que poden verificar-se amb filtres. Seleccioni\'n una per afegir a la regla o introduïu-ne una de pròpia en el requadre de dalt.'; +$messages['movingfilter'] = 'Movent filtre...'; +$messages['noexistingfilters'] = 'No s\'han detectat filtres!'; +$messages['importdefault'] = 'Emprar filtres per defecte: Hi ha un joc de filtres per defecte disponibles. Voleu instalar una còpia d\'aquests filtres?'; +$messages['importother'] = 'Importar filtres: 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à il.legible per l\'editor normal de regles i es perderà 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ó requerida no està 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'] = ' Copia el següent conjunt de regles: 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 @@ +
    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'] = 'Použít výchozí filtry: Je dostupná sada výchozích filtrů. PÅ™ejte si tuto sadu využít?'; +$messages['importother'] = 'Importovat filtry: 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'] = 'Kopírovat existující sadu pravidel: 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 @@ +
    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'] = 'Verwende Standardfilter: Es sind eine Reihe von Standardfiltern verfügbar. Möchtest Du diese verwenden?'; +$messages['importother'] = 'Filter importieren: 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 @@ +
    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'] = 'Verwende Standardfilter: Es sind eine Reihe von Standardfiltern verfügbar. Möchtest Du diese verwenden?'; +$messages['importother'] = 'Filter importieren: 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 @@ +
    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'] = 'Use default filters: There is a set of default filters available. Would you like to use these filters?'; +$messages['importother'] = 'Import filters: 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'] = 'Copy exiting ruleset: 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 @@ +
    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'] = 'Use default filters: There is a set of default filters available. Would you like to use these filters?'; +$messages['importother'] = 'Import filters: 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'] = 'Copy exiting ruleset: 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 @@ +
    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'] = 'Usar filtros por defecto: Hay un juego de filtros por defecto disponibles. ¿Quiere instalar una copia de esos filtros?'; +$messages['importother'] = 'Importar filtros: 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 @@ +
    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'] = 'Usar filtros por defecto: Hay un juego de filtros por defecto disponibles. ¿Quiere instalar una copia de esos filtros?'; +$messages['importother'] = 'Importar filtros: 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'] = ' Copia el siguiente conjunto de reglas: ¿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 @@ + \ 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 @@ +
    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'] = 'Käytä oletussuotimia: Suotimia on saatavilla. Haluatko käyttää näitä suotimia?'; +$messages['importother'] = 'Tuo suotimia: 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'] = 'Kopioi säännöstö: 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 @@ +
    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'] = 'Utiliser les filtres par défaut : Il y a des filtres disponibles. Voulez-vous utiliser ces filtres ?'; +$messages['importother'] = 'Importer des filtres : 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'] = 'Copie d\'un groupe de règles éxistant : 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 @@ +
    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'] = 'Alapértelmezett szűrÅ‘k használata: Alapértelmezett szűrÅ‘k léteznek. Szeretné használni ezeket a szűrÅ‘ket?'; +$messages['importother'] = 'SzűrÅ‘k importálása: 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 @@ +
    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'] = 'Usa i filtri predefiniti: C\'è un set predefinito di filtri disponibile. Vuoi usare questi filtri?'; +$messages['importother'] = 'Importa filtri: è 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'] = 'Copia del set di regole: 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 @@ +
    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'] = '\'Gebruik standaardfilters: Er is een set van standaardfilters beschikbaar. Wilt u deze filters gebruiken?'; +$messages['importother'] = 'Import filters: 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'] = 'Bestaande regelset kopieëren: Wilt u filters van een bestaande regelset naar u huidige regelset kopieë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 @@ + \ 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 @@ +
    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'] = 'Usar filtros predefinidos: Há um conjunto de filtros predefinidos disponíveis. Gostaria de usar esses filtros?'; +$messages['importother'] = 'Importação de filtros: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'] = 'Copiar conjunto de regras existente: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 @@ +
    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'] = 'Usar filtros predefinidos: Há um conjunto de filtros predefinidos disponíveis. Gostaria de usar esses filtros?'; +$messages['importother'] = 'Importação de filtros: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'] = 'Copiar conjunto de regras existente: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 @@ +
    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'] = 'Foloseşte filtrele implicite:Există un set de filtre implicite. Doreşti să foloseşti aceste filtre?'; +$messages['importother'] = 'Importă filtre 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'] = 'Copiază setul de reguli existent: 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 @@ +
    Ðапример: ЕÑли ВаÑÑ Ð½Ð°Ð¿Ð¸Ñал вам пиÑьмо в понедельник и вы уÑтановили периодичноÑÑ‚ÑŒ в 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'] = 'Фильтры по умолчанию: ДоÑтупен набор фильтров по умолчанию. ИÑпользовать?'; +$messages['importother'] = 'Импорт фильтров: Ðайден набор фильтров от Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ %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'] = 'Копирование ÑущеÑтвующего набора правил: Скопировать фильтры из ÑущеÑтвующего набора правил в текущий набор?'; +$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 @@ +PoužiÅ¥ pripravené pravidlá: Je dostupných niekoľko pravidiel. Chcete ich použiÅ¥?'; +$messages['importother'] = 'ImportovaÅ¥ pravidlá: ÄŽ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 @@ +
    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'] = 'Uporabi privzeta pravila: na voljo so privzeta pravila. Ali jih želite uvoziti?'; +$messages['importother'] = 'Uvozi filtre: 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'] = 'Kopiraj obstojeÄo zbirko: 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 @@ +
    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'] = 'Använd standardfilter: Det finns en uppsättning standardfilter tillgängliga. Skulle du vilja använda dem?'; +$messages['importother'] = 'Importera filter: 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 @@ +
    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'] = 'Use default filters: There is a set of default filters available. Would you like to use these filters?'; +$messages['importother'] = 'Import filters: 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'] = 'Copy exiting ruleset: 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 @@ + + + sieverules + http://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/ + Control sieve filter settings from within Roundcube + 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. + + Philip Weir + JohnDoh + roundcube@tehinterweb.co.uk + yes + + 2013-02-24 + + + 1.18 + 1.18 + + + stable + stable + + GNU GPLv3+ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.1 + + + 1.7.0 + + + jqueryui + http://trac.roundcube.net/browser/trunk/plugins/jqueryui/ + 1.8.14 + + + + + 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 = $('').attr('id', 'settingstabpluginsieverules').addClass('tablink selected'); + else + var tab = $('').attr('id', 'settingstabpluginsieverules').addClass('tablink'); + + var button = $('
    ').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 + '
    ' + sig; + } + else { + sig = rcmail.env.signatures[id].text; + if (!sig.match(/^--[ -]\r?\n/m)) + sig = sig_separator + '\n' + sig; + + sig = '
    ' + sig + '
    '; + } + + 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 @@ + 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();')) . ' '; + + $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 .= "

    " . $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 .= "

    " . str_replace('%s', $name, $this->gettext('importother')); + $buttons .= (strlen($buttons) > 0) ? '  ' : ''; + $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 .= "

    " . $this->gettext('copyexisting'); + $buttons .= (strlen($buttons) > 0) ? '  ' : ''; + $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 = "
    ". $this->gettext('noexistingfilters') . $text . "


    \n"; + $out .= $buttons; + $out .= "  " . $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'))) + . " " . $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 .= " " . $input_name->show($cur_script['name']); + + $out .= "

    "; + + 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 .= " " . 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 .= " " . $input_join->show($cur_script['join'] && !$join_any ? '' : 'anyof'); + $join_type .= " " . 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 .= " " . $input_join->show($join_any ? 'any' : ''); + $join_type .= " " . 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')) . "

    " + . $join_type . "

    " + . $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')). "

    " + . $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) . " " . $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) . " " . html::label($xheader . '_' . $rowid, rcmail::Q($xheader)); + + if ($idx < $col_length) + $col1 .= $xheader_show . "
    "; + elseif ($idx < $col_length * 2) + $col2 .= $xheader_show . "
    "; + elseif ($idx < $col_length * 3) + $col3 .= $xheader_show . "
    "; + elseif ($idx < $col_length * 4) + $col4 .= $xheader_show . "
    "; + } + + $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) . " " . html::label($ffield_id, rcmail::Q($sql_arr['email'])) . "
    "; + } + } + + 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') . '

    ' . $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, ' '); + $vacs_table->add(array('colspan' => 2), $input_origsubject->show($origsubject) . " " . 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) . " " . 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) . " " . 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 .= '  ' . $input_importance->show($nimpt) . " " . 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 .= '  ' . $input_importance->show($nimpt) . " " . 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 .= '  ' . $input_importance->show($nimpt) . " " . 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, ' '); + $headers_table->add(null, $input_index->show($headerindex) . " " . 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), '
    ' . $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', " "); + + 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 Binary files /dev/null and b/plugins/sieverules/skins/classic/cross.gif differ diff --git a/plugins/sieverules/skins/classic/help.gif b/plugins/sieverules/skins/classic/help.gif new file mode 100644 index 000000000..ea7bbb363 Binary files /dev/null and b/plugins/sieverules/skins/classic/help.gif differ diff --git a/plugins/sieverules/skins/classic/icons.gif b/plugins/sieverules/skins/classic/icons.gif new file mode 100644 index 000000000..ba772f2ad Binary files /dev/null and b/plugins/sieverules/skins/classic/icons.gif differ diff --git a/plugins/sieverules/skins/classic/icons.png b/plugins/sieverules/skins/classic/icons.png new file mode 100644 index 000000000..31a26491d Binary files /dev/null and b/plugins/sieverules/skins/classic/icons.png 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 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + + + + + + + + + + +
    + +
    +
    + +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    + +
    +
      + +
    • + +
    • +
    • +
    • + + > +
    +
    + + + \ 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 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + + + + + + +
    + +
    + + +


    + + +

    +
    + + + \ 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 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + + + + + + + + \ 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 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    + + +
    +
    + + + + + +
    +
    + + + +
    + +
    + +
    + +
    +
      + +
    • + +
    • +
    • +
    • + + + > + +
    +
    + + + \ 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 Binary files /dev/null and b/plugins/sieverules/skins/classic/tick.gif differ diff --git a/plugins/sieverules/skins/larry/cross.png b/plugins/sieverules/skins/larry/cross.png new file mode 100644 index 000000000..8d8a13f47 Binary files /dev/null and b/plugins/sieverules/skins/larry/cross.png differ diff --git a/plugins/sieverules/skins/larry/help.png b/plugins/sieverules/skins/larry/help.png new file mode 100644 index 000000000..9f7a6ae44 Binary files /dev/null and b/plugins/sieverules/skins/larry/help.png differ diff --git a/plugins/sieverules/skins/larry/icons.png b/plugins/sieverules/skins/larry/icons.png new file mode 100644 index 000000000..db84da896 Binary files /dev/null and b/plugins/sieverules/skins/larry/icons.png 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 Binary files /dev/null and b/plugins/sieverules/skins/larry/listicons.png 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="pagetitle" /> + + + + + + + + + + + + + +
    + + + +
    + +

    + +
    + +
    + +
    +
    + +
    +
    + +
    + + +
    +
    + +
    + + + +
    +
      + +
    • + +
    • +
    • +
    • + +> +
    +
    + + + \ 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="pagetitle" /> + + + + + + + + + + + +

    + +
    + +
    + +
    + + +
    + + + + + \ 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="pagetitle" /> + + + + + + + + + + + +

    + +
    + +
    + + + + + + + \ 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="pagetitle" /> + + + + + + + + + + + + + +
    + + + +
    + +
    +
    + + +
    +
    + +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + + + +
    +
      + +
    • + +
    • +
    • +
    • + + +> + +
    +
    + + + + + \ 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 Binary files /dev/null and b/plugins/sieverules/skins/larry/tick.png 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 @@ 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 @@ +.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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ stable stable - GNU GPLv3+ + GNU GPLv2 -
    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 @@ + -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 = $('').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 @@ +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 .= '
  • '.$i.' '.$this->gettext('label'.$i).'
  • '; + } + $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'] .= ''; + 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 = '
    + +
    '; + $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 @@ +.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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 @@ +.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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 25c4d1059..2f96f849b --- 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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 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 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 @@ alec@alec.pl yes - 2012-02-17 + 2011-11-21 - 2.0 - 2.0 + 1.1 + 1.1 stable stable - GNU GPLv3+ + GNU GPLv2 - 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 * @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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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/.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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 @@ +.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'], ' $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)); diff --git a/program/include/bc.php b/program/include/bc.php index a7d7b5ac1..af2e51210 100644 --- a/program/include/bc.php +++ b/program/include/bc.php @@ -62,7 +62,7 @@ function rcmail_url($action, $p=array(), $task=null) function rcmail_temp_gc() { - rcmail::get_instance()->gc_temp(); + $rcmail = rcmail::get_instance()->temp_gc(); } function rcube_charset_convert($str, $from, $to=NULL) @@ -205,9 +205,9 @@ function rcmail_quota_content($attrib = null) return rcmail::get_instance()->quota_content($attrib); } -function rcmail_display_server_error($fallback=null, $fallback_args=null, $suffix='') +function rcmail_display_server_error($fallback=null, $fallback_args=null) { - rcmail::get_instance()->display_server_error($fallback, $fallback_args, $suffix); + rcmail::get_instance()->display_server_error($fallback, $fallback_args); } function rcmail_filetype2classname($mimetype, $filename) @@ -405,16 +405,6 @@ function enriched_to_html($data) return rcube_enriched::to_html($data); } -function strip_quotes($str) -{ - return str_replace(array("'", '"'), '', $str); -} - -function strip_newlines($str) -{ - return preg_replace('/[\r\n]/', '', $str); -} - class rcube_html_page extends rcmail_html_page { } diff --git a/program/include/iniset.php b/program/include/iniset.php index 919cc7682..e4fa956ef 100644 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -21,11 +21,11 @@ */ // application constants -define('RCMAIL_VERSION', '1.0-git'); +define('RCMAIL_VERSION', '0.9.5'); define('RCMAIL_START', microtime(true)); if (!defined('INSTALL_PATH')) { - define('INSTALL_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/'); + define('INSTALL_PATH', '/var/lib/roundcube/'); } if (!defined('RCMAIL_CONFIG_DIR')) { @@ -60,11 +60,6 @@ require_once 'Roundcube/bootstrap.php'; // register autoloader for rcmail app classes spl_autoload_register('rcmail_autoload'); -// include composer autoloader (if available) -if (file_exists('vendor/autoload.php')) { - require 'vendor/autoload.php'; -} - // backward compatybility (to be removed) require_once INSTALL_PATH . 'program/include/bc.php'; diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 0483f0e18..c9350bdd9 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -51,7 +51,6 @@ class rcmail extends rcube */ public $action = ''; public $comm_path = './'; - public $filename = ''; private $address_books = array(); private $action_map = array(); @@ -66,13 +65,12 @@ class rcmail extends rcube /** * This implements the 'singleton' design pattern * - * @param string Environment name to run (e.g. live, dev, test) * @return rcmail The one and only instance */ - static function get_instance($env = '') + static function get_instance() { if (!self::$instance || !is_a(self::$instance, 'rcmail')) { - self::$instance = new rcmail($env); + self::$instance = new rcmail(); self::$instance->startup(); // init AFTER object was linked with self::$instance } @@ -88,10 +86,6 @@ class rcmail extends rcube { $this->init(self::INIT_WITH_DB | self::INIT_WITH_PLUGINS); - // set filename if not index.php - if (($basename = basename($_SERVER['SCRIPT_FILENAME'])) && $basename != 'index.php') - $this->filename = $basename; - // start session $this->session_init(); @@ -132,7 +126,7 @@ class rcmail extends rcube */ public function set_task($task) { - $task = asciiwords($task, true); + $task = asciiwords($task); if ($this->user && $this->user->ID) $task = !$task ? 'mail' : $task; @@ -168,7 +162,7 @@ class rcmail extends rcube setlocale(LC_ALL, $lang . '.utf8', $lang . '.UTF-8', 'en_US.utf8', 'en_US.UTF-8'); // workaround for http://bugs.php.net/bug.php?id=18556 - if (version_compare(PHP_VERSION, '5.5.0', '<') && in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) { + if (in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) { setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8'); } } @@ -289,13 +283,13 @@ class rcmail extends rcube */ public function get_address_sources($writeable = false, $skip_hidden = false) { - $abook_type = (string) $this->config->get('address_book_type'); - $ldap_config = (array) $this->config->get('ldap_public'); + $abook_type = strtolower($this->config->get('address_book_type')); + $ldap_config = $this->config->get('ldap_public'); $autocomplete = (array) $this->config->get('autocomplete_addressbooks'); - $list = array(); + $list = array(); // We are using the DB address book or a plugin address book - if (!empty($abook_type) && strtolower($abook_type) != 'ldap') { + if ($abook_type != 'ldap' && $abook_type != '') { if (!isset($this->address_books['0'])) $this->address_books['0'] = new rcube_contacts($this->db, $this->get_user_id()); $list['0'] = array( @@ -308,7 +302,8 @@ class rcmail extends rcube ); } - if (!empty($ldap_config)) { + if ($ldap_config) { + $ldap_config = (array) $ldap_config; foreach ($ldap_config as $id => $prop) { // handle misconfiguration if (empty($prop) || !is_array($prop)) { @@ -317,7 +312,7 @@ class rcmail extends rcube $list[$id] = array( 'id' => $id, 'name' => html::quote($prop['name']), - 'groups' => !empty($prop['groups']) || !empty($prop['group_filters']), + 'groups' => is_array($prop['groups']), 'readonly' => !$prop['writable'], 'hidden' => $prop['hidden'], 'autocomplete' => in_array($id, $autocomplete) @@ -481,22 +476,15 @@ class rcmail extends rcube $port = $config['default_port']; } - // Check if we need to add/force domain to username - if (!empty($config['username_domain'])) { - $domain = is_array($config['username_domain']) ? $config['username_domain'][$host] : $config['username_domain']; - - if ($domain = rcube_utils::parse_host((string)$domain, $host)) { - $pos = strpos($username, '@'); - - // force configured domains - if (!empty($config['username_domain_forced']) && $pos !== false) { - $username = substr($username, 0, $pos) . '@' . $domain; - } - // just add domain if not specified - else if ($pos === false) { - $username .= '@' . $domain; - } - } + /* Modify username with domain if required + Inspired by Marco + */ + // Check if we need to add domain + if (!empty($config['username_domain']) && strpos($username, '@') === false) { + if (is_array($config['username_domain']) && isset($config['username_domain'][$host])) + $username .= '@'.rcube_utils::parse_host($config['username_domain'][$host], $host); + else if (is_string($config['username_domain'])) + $username .= '@'.rcube_utils::parse_host($config['username_domain'], $host); } if (!isset($config['login_lc'])) { @@ -631,7 +619,7 @@ class rcmail extends rcube $post_host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST); $post_user = rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST); - list(, $domain) = explode('@', $post_user); + list($user, $domain) = explode('@', $post_user); // direct match in default_host array if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) { @@ -734,6 +722,28 @@ class rcmail extends rcube } + /** + * Create unique authorization hash + * + * @param string Session ID + * @param int Timestamp + * @return string The generated auth hash + */ + private function get_auth_hash($sess_id, $ts) + { + $auth_string = sprintf('rcmail*sess%sR%s*Chk:%s;%s', + $sess_id, + $ts, + $this->config->get('ip_check') ? $_SERVER['REMOTE_ADDR'] : '***.***.***.***', + $_SERVER['HTTP_USER_AGENT']); + + if (function_exists('sha1')) + return sha1($auth_string); + else + return md5($auth_string); + } + + /** * Build a valid URL to this instance of Roundcube * @@ -754,7 +764,7 @@ class rcmail extends rcube $p['_task'] = $task; unset($p['task']); - $url = './' . $this->filename; + $url = './'; $delm = '?'; foreach (array_reverse($p) as $key => $val) { if ($val !== '' && $val !== null) { @@ -779,6 +789,11 @@ class rcmail extends rcube $book->close(); } + // before closing the database connection, write session data + if ($_SERVER['REMOTE_ADDR'] && is_object($this->session)) { + session_write_close(); + } + // write performance stats to logs/console if ($this->config->get('devel_mode')) { if (function_exists('memory_get_usage')) @@ -938,6 +953,193 @@ class rcmail extends rcube } + /** + * Send the given message using the configured method. + * + * @param object $message Reference to Mail_MIME object + * @param string $from Sender address string + * @param array $mailto Array of recipient address strings + * @param array $error SMTP error array (reference) + * @param string $body_file Location of file with saved message body (reference), + * used when delay_file_io is enabled + * @param array $options SMTP options (e.g. DSN request) + * + * @return boolean Send status. + */ + public function deliver_message(&$message, $from, $mailto, &$error, &$body_file = null, $options = null) + { + $plugin = $this->plugins->exec_hook('message_before_send', array( + 'message' => $message, + 'from' => $from, + 'mailto' => $mailto, + 'options' => $options, + )); + + if ($plugin['abort']) { + return isset($plugin['result']) ? $plugin['result'] : false; + } + + $from = $plugin['from']; + $mailto = $plugin['mailto']; + $options = $plugin['options']; + $message = $plugin['message']; + $headers = $message->headers(); + + // send thru SMTP server using custom SMTP library + if ($this->config->get('smtp_server')) { + // generate list of recipients + $a_recipients = array($mailto); + + if (strlen($headers['Cc'])) + $a_recipients[] = $headers['Cc']; + if (strlen($headers['Bcc'])) + $a_recipients[] = $headers['Bcc']; + + // clean Bcc from header for recipients + $send_headers = $headers; + unset($send_headers['Bcc']); + // here too, it because txtHeaders() below use $message->_headers not only $send_headers + unset($message->_headers['Bcc']); + + $smtp_headers = $message->txtHeaders($send_headers, true); + + if ($message->getParam('delay_file_io')) { + // use common temp dir + $temp_dir = $this->config->get('temp_dir'); + $body_file = tempnam($temp_dir, 'rcmMsg'); + if (PEAR::isError($mime_result = $message->saveMessageBody($body_file))) { + self::raise_error(array('code' => 650, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Could not create message: ".$mime_result->getMessage()), + TRUE, FALSE); + return false; + } + $msg_body = fopen($body_file, 'r'); + } + else { + $msg_body = $message->get(); + } + + // send message + if (!is_object($this->smtp)) { + $this->smtp_init(true); + } + + $sent = $this->smtp->send_mail($from, $a_recipients, $smtp_headers, $msg_body, $options); + $response = $this->smtp->get_response(); + $error = $this->smtp->get_error(); + + // log error + if (!$sent) { + self::raise_error(array('code' => 800, 'type' => 'smtp', + 'line' => __LINE__, 'file' => __FILE__, + 'message' => "SMTP error: ".join("\n", $response)), TRUE, FALSE); + } + } + // send mail using PHP's mail() function + else { + // unset some headers because they will be added by the mail() function + $headers_enc = $message->headers($headers); + $headers_php = $message->_headers; + unset($headers_php['To'], $headers_php['Subject']); + + // reset stored headers and overwrite + $message->_headers = array(); + $header_str = $message->txtHeaders($headers_php); + + // #1485779 + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + if (preg_match_all('/<([^@]+@[^>]+)>/', $headers_enc['To'], $m)) { + $headers_enc['To'] = implode(', ', $m[1]); + } + } + + $msg_body = $message->get(); + + if (PEAR::isError($msg_body)) { + self::raise_error(array('code' => 650, 'type' => 'php', + 'file' => __FILE__, 'line' => __LINE__, + 'message' => "Could not create message: ".$msg_body->getMessage()), + TRUE, FALSE); + } + else { + $delim = $this->config->header_delimiter(); + $to = $headers_enc['To']; + $subject = $headers_enc['Subject']; + $header_str = rtrim($header_str); + + if ($delim != "\r\n") { + $header_str = str_replace("\r\n", $delim, $header_str); + $msg_body = str_replace("\r\n", $delim, $msg_body); + $to = str_replace("\r\n", $delim, $to); + $subject = str_replace("\r\n", $delim, $subject); + } + + if (filter_var(ini_get('safe_mode'), FILTER_VALIDATE_BOOLEAN)) + $sent = mail($to, $subject, $msg_body, $header_str); + else + $sent = mail($to, $subject, $msg_body, $header_str, "-f$from"); + } + } + + if ($sent) { + $this->plugins->exec_hook('message_sent', array('headers' => $headers, 'body' => $msg_body)); + + // remove MDN headers after sending + unset($headers['Return-Receipt-To'], $headers['Disposition-Notification-To']); + + // get all recipients + if ($headers['Cc']) + $mailto .= $headers['Cc']; + if ($headers['Bcc']) + $mailto .= $headers['Bcc']; + if (preg_match_all('/<([^@]+@[^>]+)>/', $mailto, $m)) + $mailto = implode(', ', array_unique($m[1])); + + if ($this->config->get('smtp_log')) { + self::write_log('sendmail', sprintf("User %s [%s]; Message for %s; %s", + $this->user->get_username(), + $_SERVER['REMOTE_ADDR'], + $mailto, + !empty($response) ? join('; ', $response) : '')); + } + } + + if (is_resource($msg_body)) { + fclose($msg_body); + } + + $message->_headers = array(); + $message->headers($headers); + + return $sent; + } + + + /** + * Unique Message-ID generator. + * + * @return string Message-ID + */ + public function gen_message_id() + { + $local_part = md5(uniqid('rcmail'.mt_rand(),true)); + $domain_part = $this->user->get_username('domain'); + + // Try to find FQDN, some spamfilters doesn't like 'localhost' (#1486924) + if (!preg_match('/\.[a-z]+$/i', $domain_part)) { + foreach (array($_SERVER['HTTP_HOST'], $_SERVER['SERVER_NAME']) as $host) { + $host = preg_replace('/:[0-9]+$/', '', $host); + if ($host && preg_match('/\.[a-z]+$/i', $host)) { + $domain_part = $host; + } + } + } + + return sprintf('<%s@%s>', $local_part, $domain_part); + } + + /** * Returns RFC2822 formatted current date in user's timezone * @@ -961,32 +1163,22 @@ class rcmail extends rcube /** * Write login data (name, ID, IP address) to the 'userlogins' log file. */ - public function log_login($user = null, $failed_login = false, $error_code = 0) + public function log_login() { if (!$this->config->get('log_logins')) { return; } - // failed login - if ($failed_login) { - $message = sprintf('Failed login for %s from %s in session %s (error: %d)', - $user, rcube_utils::remote_ip(), session_id(), $error_code); - } - // successful login - else { - $user_name = $this->get_user_name(); - $user_id = $this->get_user_id(); + $user_name = $this->get_user_name(); + $user_id = $this->get_user_id(); - if (!$user_id) { - return; - } - - $message = sprintf('Successful login for %s (ID: %d) from %s in session %s', - $user_name, $user_id, rcube_utils::remote_ip(), session_id()); + if (!$user_id) { + return; } - // log login - self::write_log('userlogins', $message); + self::write_log('userlogins', + sprintf('Successful login for %s (ID: %d) from %s in session %s', + $user_name, $user_id, rcube_utils::remote_ip(), session_id())); } @@ -1002,7 +1194,7 @@ class rcmail extends rcube */ public function table_output($attrib, $table_data, $a_show_cols, $id_col) { - $table = new html_table($attrib); + $table = new html_table(/*array('cols' => count($a_show_cols))*/); // add table header if (!$attrib['noheader']) { @@ -1243,7 +1435,6 @@ class rcmail extends rcube $js_mailboxlist = array(); $out = html::tag('ul', $attrib, $rcmail->render_folder_tree_html($a_mailboxes, $mbox_name, $js_mailboxlist, $attrib), html::$common_attrib); - $rcmail->output->include_script('treelist.js'); $rcmail->output->add_gui_object('mailboxlist', $attrib['id']); $rcmail->output->set_env('mailboxes', $js_mailboxlist); $rcmail->output->set_env('unreadwrap', $attrib['unreadwrap']); @@ -1365,10 +1556,9 @@ class rcmail extends rcube $realnames = (bool)$attrib['realnames']; $msgcounts = $this->storage->get_cache('messagecount'); $collapsed = $this->config->get('collapsed_folders'); - $realnames = $this->config->get('show_real_foldernames'); $out = ''; - foreach ($arrFolders as $folder) { + foreach ($arrFolders as $key => $folder) { $title = null; $folder_class = $this->folder_classname($folder['id']); $is_collapsed = strpos($collapsed, '&'.rawurlencode($folder['id']).'&') !== false; @@ -1423,13 +1613,14 @@ class rcmail extends rcube 'id' => "rcmli".$folder_id, 'class' => join(' ', $classes), 'noclose' => true), - html::a($link_attrib, $html_name)); - - if (!empty($folder['folders'])) { - $out .= html::div('treetoggle ' . ($is_collapsed ? 'collapsed' : 'expanded'), ' '); - } - - $jslist[$folder['id']] = array( + html::a($link_attrib, $html_name) . + (!empty($folder['folders']) ? html::div(array( + 'class' => ($is_collapsed ? 'collapsed' : 'expanded'), + 'style' => "position:absolute", + 'onclick' => sprintf("%s.command('collapse-folder', '%s')", rcmail_output::JS_OBJECT_NAME, $js_name) + ), ' ') : '')); + + $jslist[$folder_id] = array( 'id' => $folder['id'], 'name' => $foldername, 'virtual' => $folder['virtual'] @@ -1454,7 +1645,7 @@ class rcmail extends rcube { $out = ''; - foreach ($arrFolders as $folder) { + foreach ($arrFolders as $key => $folder) { // skip exceptions (and its subfolders) if (!empty($opts['exceptions']) && in_array($folder['id'], $opts['exceptions'])) { continue; @@ -1515,38 +1706,18 @@ class rcmail extends rcube * Try to localize the given IMAP folder name. * UTF-7 decode it in case no localized text was found * - * @param string $name Folder name - * @param bool $with_path Enable path localization + * @param string $name Folder name * * @return string Localized folder name in UTF-8 encoding */ - public function localize_foldername($name, $with_path = true) + public function localize_foldername($name) { - $realnames = $this->config->get('show_real_foldernames'); - - // try to localize path of the folder - if ($with_path && !$realnames) { - $storage = $this->get_storage(); - $delimiter = $storage->get_hierarchy_delimiter(); - $path = explode($delimiter, $name); - $count = count($path); - - if ($count > 1) { - for ($i = 0; $i < $count; $i++) { - $folder = implode($delimiter, array_slice($path, 0, -$i)); - if ($folder_class = $this->folder_classname($folder)) { - $name = implode($delimiter, array_slice($path, $count - $i)); - return $this->gettext($folder_class) . $delimiter . rcube_charset::convert($name, 'UTF7-IMAP'); - } - } - } - } - - if (!$realnames && ($folder_class = $this->folder_classname($name))) { + if ($folder_class = $this->folder_classname($name)) { return $this->gettext($folder_class); } - - return rcube_charset::convert($name, 'UTF7-IMAP'); + else { + return rcube_charset::convert($name, 'UTF7-IMAP'); + } } @@ -1601,7 +1772,11 @@ class rcmail extends rcube $quota_result = (array) $quota; $quota_result['type'] = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : ''; - if ($quota['total'] > 0) { + if (!$quota['total'] && $this->config->get('quota_zero_as_unlimited')) { + $quota_result['title'] = $this->gettext('unlimited'); + $quota_result['percent'] = 0; + } + else if ($quota['total']) { if (!isset($quota['percent'])) { $quota_result['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100)); } @@ -1620,8 +1795,7 @@ class rcmail extends rcube } } else { - $unlimited = $this->config->get('quota_zero_as_unlimited'); - $quota_result['title'] = $this->gettext($unlimited ? 'unlimited' : 'unknown'); + $quota_result['title'] = $this->gettext('unknown'); $quota_result['percent'] = 0; } @@ -1634,51 +1808,32 @@ class rcmail extends rcube * * @param string $fallback Fallback message label * @param array $fallback_args Fallback message label arguments - * @param string $suffix Message label suffix */ - public function display_server_error($fallback = null, $fallback_args = null, $suffix = '') + public function display_server_error($fallback = null, $fallback_args = null) { $err_code = $this->storage->get_error_code(); $res_code = $this->storage->get_response_code(); - $args = array(); if ($res_code == rcube_storage::NOPERM) { - $error = 'errornoperm'; + $this->output->show_message('errornoperm', 'error'); } else if ($res_code == rcube_storage::READONLY) { - $error = 'errorreadonly'; - } - else if ($res_code == rcube_storage::OVERQUOTA) { - $error = 'errorroverquota'; + $this->output->show_message('errorreadonly', 'error'); } else if ($err_code && ($err_str = $this->storage->get_error_str())) { // try to detect access rights problem and display appropriate message if (stripos($err_str, 'Permission denied') !== false) { - $error = 'errornoperm'; - } - // try to detect full mailbox problem and display appropriate message - // there can be e.g. "Quota exceeded" or "quotum would exceed" - else if (stripos($err_str, 'quot') !== false && stripos($err_str, 'exceed') !== false) { - $error = 'erroroverquota'; + $this->output->show_message('errornoperm', 'error'); } else { - $error = 'servererrormsg'; - $args = array('msg' => $err_str); + $this->output->show_message('servererrormsg', 'error', array('msg' => $err_str)); } } else if ($err_code < 0) { - $error = 'storageerror'; + $this->output->show_message('storageerror', 'error'); } else if ($fallback) { - $error = $fallback; - $args = $fallback_args; - } - - if ($error) { - if ($suffix && $this->text_exists($error . $suffix)) { - $error .= $suffix; - } - $this->output->show_message($error, 'error', $args); + $this->output->show_message($fallback, 'error', $fallback_args); } } diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index a2ec29ca3..465d92f83 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -67,7 +67,6 @@ class rcmail_output_html extends rcmail_output //$this->framed = $framed; $this->set_env('task', $task); $this->set_env('x_frame_options', $this->config->get('x_frame_options', 'sameorigin')); - $this->set_env('standard_windows', (bool) $this->config->get('standard_windows')); // add cookie info $this->set_env('cookie_domain', ini_get('session.cookie_domain')); @@ -106,6 +105,7 @@ class rcmail_output_html extends rcmail_output )); } + /** * Set environment variable * @@ -121,6 +121,7 @@ class rcmail_output_html extends rcmail_output } } + /** * Getter for the current page title * @@ -144,17 +145,17 @@ class rcmail_output_html extends rcmail_output return $title; } + /** * Set skin */ public function set_skin($skin) { $valid = false; - $path = RCUBE_INSTALL_PATH . 'skins/'; - if (!empty($skin) && is_dir($path . $skin) && is_readable($path . $skin)) { - $skin_path = 'skins/' . $skin; - $valid = true; + if (!empty($skin) && is_dir('skins/'.$skin) && is_readable('skins/'.$skin)) { + $skin_path = 'skins/'.$skin; + $valid = true; } else { $skin_path = $this->config->get('skin_path'); @@ -182,16 +183,13 @@ class rcmail_output_html extends rcmail_output $this->skin_paths[] = $skin_path; // read meta file and check for dependecies - $meta = @file_get_contents(RCUBE_INSTALL_PATH . $skin_path . '/meta.json'); - $meta = @json_decode($meta, true); - if ($meta['extends']) { - $path = RCUBE_INSTALL_PATH . 'skins/'; - if (is_dir($path . $meta['extends']) && is_readable($path . $meta['extends'])) { - $this->load_skin('skins/' . $meta['extends']); - } + $meta = @json_decode(@file_get_contents($skin_path.'/meta.json'), true); + if ($meta['extends'] && is_dir('skins/' . $meta['extends'])) { + $this->load_skin('skins/' . $meta['extends']); } } + /** * Check if a specific template exists * @@ -200,18 +198,17 @@ class rcmail_output_html extends rcmail_output */ public function template_exists($name) { + $found = false; foreach ($this->skin_paths as $skin_path) { - $filename = RCUBE_INSTALL_PATH . $skin_path . '/templates/' . $name . '.html'; - if ((is_file($filename) && is_readable($filename)) - || ($this->deprecated_templates[$name] && $this->template_exists($this->deprecated_templates[$name])) - ) { - return true; - } + $filename = $skin_path . '/templates/' . $name . '.html'; + $found = (is_file($filename) && is_readable($filename)) || ($this->deprecated_templates[$name] && $this->template_exists($this->deprecated_templates[$name])); + if ($found) + break; } - - return false; + return $found; } + /** * Find the given file in the current skin path stack * @@ -236,6 +233,7 @@ class rcmail_output_html extends rcmail_output return false; } + /** * Register a GUI object to the client script * @@ -248,6 +246,7 @@ class rcmail_output_html extends rcmail_output $this->add_script(self::JS_OBJECT_NAME.".gui_object('$obj', '$id');"); } + /** * Call a client method * @@ -263,6 +262,7 @@ class rcmail_output_html extends rcmail_output $this->js_commands[] = $cmd; } + /** * Add a localized label to the client environment */ @@ -277,6 +277,7 @@ class rcmail_output_html extends rcmail_output } } + /** * Invoke display_message command * @@ -303,6 +304,7 @@ class rcmail_output_html extends rcmail_output } } + /** * Delete all stored env variables and commands * @@ -325,6 +327,7 @@ class rcmail_output_html extends rcmail_output $this->body = ''; } + /** * Redirect to a certain url * @@ -340,6 +343,7 @@ class rcmail_output_html extends rcmail_output exit; } + /** * Send the request output to the client. * This will either parse a skin tempalte or send an AJAX response @@ -373,6 +377,7 @@ class rcmail_output_html extends rcmail_output } } + /** * Process template and write to stdOut * @@ -408,6 +413,7 @@ class rcmail_output_html extends rcmail_output $this->_write($template, $this->config->get('skin_path')); } + /** * Parse a specific skin template and deliver to stdout (or return) * @@ -532,6 +538,7 @@ class rcmail_output_html extends rcmail_output } } + /** * Return executable javascript code for all registered commands * @@ -563,6 +570,7 @@ class rcmail_output_html extends rcmail_output return $out; } + /** * Make URLs starting with a slash point to skin directory * @@ -582,6 +590,7 @@ class rcmail_output_html extends rcmail_output return $str; } + /** * Show error page and terminate script execution * @@ -616,6 +625,7 @@ class rcmail_output_html extends rcmail_output array($this, 'globals_callback'), $input); } + /** * Callback funtion for preg_replace_callback() in parse_with_globals() */ @@ -624,6 +634,7 @@ class rcmail_output_html extends rcmail_output return $GLOBALS[$matches[1]]; } + /** * Correct absolute paths in images and other tags * add timestamp to .js and .css filename @@ -635,6 +646,7 @@ class rcmail_output_html extends rcmail_output array($this, 'file_callback'), $output); } + /** * Callback function for preg_replace_callback in write() * @@ -643,7 +655,7 @@ class rcmail_output_html extends rcmail_output protected function file_callback($matches) { $file = $matches[3]; - $file = preg_replace('!^/this/!', '/', $file); + $file[0] = preg_replace('!^/this/!', '/', $file[0]); // correct absolute paths if ($file[0] == '/') { @@ -660,6 +672,7 @@ class rcmail_output_html extends rcmail_output return $matches[1] . '=' . $matches[2] . $file . $matches[4]; } + /** * Public wrapper to dipp into template parsing. * @@ -676,6 +689,7 @@ class rcmail_output_html extends rcmail_output return $input; } + /** * Parse for conditional tags * @@ -713,18 +727,21 @@ class rcmail_output_html extends rcmail_output return $input; } + /** * Determines if a given condition is met * + * @todo Get rid off eval() once I understand what this does. * @todo Extend this to allow real conditions, not just "set" * @param string Condition statement * @return boolean True if condition is met, False if not */ protected function check_condition($condition) { - return $this->eval_expression($condition); + return eval("return (".$this->parse_expression($condition).");"); } + /** * Inserts hidden field with CSRF-prevention-token into POST forms */ @@ -741,16 +758,16 @@ class rcmail_output_html extends rcmail_output return $out; } + /** - * Parse & evaluate a given expression and return its result. - * - * @param string Expression statement + * Parses expression and replaces variables * - * @return mixed Expression result + * @param string Expression statement + * @return string Expression value */ - protected function eval_expression ($expression) + protected function parse_expression($expression) { - $expression = preg_replace( + return preg_replace( array( '/session:([a-z0-9_]+)/i', '/config:([a-z0-9_]+)(:([a-z0-9_]+))?/i', @@ -762,31 +779,17 @@ class rcmail_output_html extends rcmail_output ), array( "\$_SESSION['\\1']", - "\$app->config->get('\\1',rcube_utils::get_boolean('\\3'))", - "\$env['\\1']", + "\$this->app->config->get('\\1',rcube_utils::get_boolean('\\3'))", + "\$this->env['\\1']", "rcube_utils::get_input_value('\\1', rcube_utils::INPUT_GPC)", "\$_COOKIE['\\1']", - "\$browser->{'\\1'}", + "\$this->browser->{'\\1'}", $this->template_name, ), - $expression - ); - - $fn = create_function('$app,$browser,$env', "return ($expression);"); - if (!$fn) { - rcube::raise_error(array( - 'code' => 505, - 'type' => 'php', - 'file' => __FILE__, - 'line' => __LINE__, - 'message' => "Expression parse error on: ($expression)"), true, false); - - return null; - } - - return $fn($this->app, $this->browser, $this->env); + $expression); } + /** * Search for special tags in input and replace them * with the appropriate content @@ -801,6 +804,7 @@ class rcmail_output_html extends rcmail_output return preg_replace_callback('/]|\\\\>)+)(?/Ui', array($this, 'xml_command'), $input); } + /** * Callback function for parsing an xml command tag * and turn it into real html content @@ -835,7 +839,7 @@ class rcmail_output_html extends rcmail_output // show a label case 'label': if ($attrib['expression']) - $attrib['name'] = $this->eval_expression($attrib['expression']); + $attrib['name'] = eval("return " . $this->parse_expression($attrib['expression']) .";"); if ($attrib['name'] || $attrib['command']) { // @FIXME: 'noshow' is useless, remove? @@ -967,7 +971,8 @@ class rcmail_output_html extends rcmail_output // return code for a specified eval expression case 'exp': - return html::quote($this->eval_expression($attrib['expression'])); + $value = $this->parse_expression($attrib['expression']); + return eval("return html::quote($value);"); // return variable case 'var': @@ -1004,13 +1009,12 @@ class rcmail_output_html extends rcmail_output } return html::quote($value); - - case 'form': - return $this->form_tag($attrib); + break; } return ''; } + /** * Include a specific file and return it's contents * @@ -1027,6 +1031,7 @@ class rcmail_output_html extends rcmail_output return $out; } + /** * Create and register a button * @@ -1175,13 +1180,10 @@ class rcmail_output_html extends rcmail_output $out = sprintf('%s', $attrib_str, $btn_content); } - if ($attrib['wrapper']) { - $out = html::tag($attrib['wrapper'], null, $out); - } - return $out; } + /** * Link an external script file * @@ -1212,6 +1214,7 @@ class rcmail_output_html extends rcmail_output $this->script_files[$position][] = $file; } + /** * Add inline javascript code * @@ -1228,6 +1231,7 @@ class rcmail_output_html extends rcmail_output } } + /** * Link an external css file * @@ -1238,6 +1242,7 @@ class rcmail_output_html extends rcmail_output $this->css_files[] = $file; } + /** * Add HTML code to the page header * @@ -1248,6 +1253,7 @@ class rcmail_output_html extends rcmail_output $this->header .= "\n" . $str; } + /** * Add HTML code to the page footer * To be added right befor @@ -1259,6 +1265,7 @@ class rcmail_output_html extends rcmail_output $this->footer .= "\n" . $str; } + /** * Process template and write to stdOut * @@ -1267,7 +1274,12 @@ class rcmail_output_html extends rcmail_output */ public function _write($templ = '', $base_path = '') { - $output = empty($templ) ? $this->default_template : trim($templ); + $output = trim($templ); + + if (empty($output)) { + $output = $this->default_template; + $is_empty = true; + } // set default page title if (empty($this->pagetitle)) { @@ -1358,8 +1370,8 @@ class rcmail_output_html extends rcmail_output } // add css files in head, before scripts, for speed up with parallel downloads - if (!empty($this->css_files) && - (($pos = stripos($output, ' - diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html index 5e259e11c..b6dab2c4c 100644 --- a/skins/classic/templates/compose.html +++ b/skins/classic/templates/compose.html @@ -16,10 +16,10 @@ - + - + @@ -44,7 +44,7 @@ - +
    @@ -178,16 +178,23 @@ - + + + - + + + - + + + - + +
    @@ -197,9 +204,5 @@ - - diff --git a/skins/classic/templates/contact.html b/skins/classic/templates/contact.html index 8be112b49..d74a78b27 100644 --- a/skins/classic/templates/contact.html +++ b/skins/classic/templates/contact.html @@ -13,7 +13,7 @@
    :
    -
    +
    diff --git a/skins/classic/templates/contactadd.html b/skins/classic/templates/contactadd.html index bad6daf28..05cc8aa82 100644 --- a/skins/classic/templates/contactadd.html +++ b/skins/classic/templates/contactadd.html @@ -5,11 +5,11 @@ - +
    - +
    :
    @@ -35,10 +35,7 @@ - + diff --git a/skins/classic/templates/contactedit.html b/skins/classic/templates/contactedit.html index c51cbf296..db8599ac6 100644 --- a/skins/classic/templates/contactedit.html +++ b/skins/classic/templates/contactedit.html @@ -5,11 +5,11 @@ - +
    - +
    :
    @@ -35,10 +35,7 @@ - + diff --git a/skins/classic/templates/folders.html b/skins/classic/templates/folders.html index f86be092b..1ae8809ec 100644 --- a/skins/classic/templates/folders.html +++ b/skins/classic/templates/folders.html @@ -12,7 +12,7 @@ } - + @@ -58,9 +58,5 @@
    - - diff --git a/skins/classic/templates/login.html b/skins/classic/templates/login.html index 2dacd48ff..cca2bd934 100644 --- a/skins/classic/templates/login.html +++ b/skins/classic/templates/login.html @@ -15,7 +15,7 @@
    - +

    diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html index 10aebc96d..75a112ff5 100644 --- a/skins/classic/templates/mail.html +++ b/skins/classic/templates/mail.html @@ -18,7 +18,7 @@ } - + @@ -28,7 +28,7 @@
    - +