summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.tx/config7
-rw-r--r--CHANGELOG149
-rw-r--r--INSTALL58
-rw-r--r--SQL/mssql.initial.sql54
-rw-r--r--SQL/mssql/2013042700.sql1
-rw-r--r--SQL/mssql/2013052500.sql17
-rw-r--r--SQL/mssql/2013061000.sql44
-rw-r--r--SQL/mysql.initial.sql31
-rw-r--r--SQL/mysql/2013011000.sql2
-rw-r--r--SQL/mysql/2013042700.sql1
-rw-r--r--SQL/mysql/2013052500.sql7
-rw-r--r--SQL/mysql/2013061000.sql24
-rw-r--r--SQL/postgres.initial.sql82
-rw-r--r--SQL/postgres/2013042700.sql14
-rw-r--r--SQL/postgres/2013052500.sql8
-rw-r--r--SQL/postgres/2013061000.sql24
-rw-r--r--SQL/sqlite.initial.sql78
-rw-r--r--SQL/sqlite/2013011000.sql2
-rw-r--r--SQL/sqlite/2013042700.sql1
-rw-r--r--SQL/sqlite/2013052500.sql8
-rw-r--r--SQL/sqlite/2013061000.sql48
-rw-r--r--UPGRADING16
-rwxr-xr-xbin/cleandb.sh5
-rwxr-xr-xbin/decrypt.sh8
-rwxr-xr-xbin/gc.sh27
-rwxr-xr-xbin/indexcontacts.sh11
-rwxr-xr-xbin/installto.sh8
-rwxr-xr-xbin/moduserprefs.sh4
-rwxr-xr-xbin/msgimport.sh7
-rwxr-xr-xbin/update.sh89
-rwxr-xr-xbin/updatecss.sh122
-rwxr-xr-xbin/updatedb.sh66
-rw-r--r--composer.json-dist25
-rw-r--r--config/config.inc.php.sample85
-rw-r--r--config/db.inc.php.dist62
-rw-r--r--config/defaults.inc.php (renamed from config/main.inc.php.dist)495
-rw-r--r--index.php6
-rw-r--r--installer/check.php58
-rw-r--r--installer/config.php54
-rw-r--r--installer/index.php31
-rw-r--r--installer/rcube_install.php278
-rw-r--r--installer/test.php154
-rw-r--r--plugins/acl/acl.php19
-rw-r--r--plugins/acl/config.inc.php.dist6
-rw-r--r--plugins/acl/localization/cs_CZ.inc2
-rw-r--r--plugins/acl/localization/en_US.inc2
-rw-r--r--plugins/acl/localization/et_EE.inc4
-rw-r--r--plugins/acl/localization/gl_ES.inc114
-rw-r--r--plugins/acl/localization/he_IL.inc2
-rw-r--r--plugins/acl/localization/it_IT.inc6
-rw-r--r--plugins/acl/localization/ko_KR.inc102
-rw-r--r--plugins/acl/localization/lb_LU.inc99
-rw-r--r--plugins/acl/localization/lt_LT.inc2
-rw-r--r--plugins/acl/localization/pl_PL.inc2
-rw-r--r--plugins/acl/localization/tr_TR.inc2
-rw-r--r--plugins/acl/localization/zh_CN.inc28
-rw-r--r--plugins/acl/localization/zh_TW.inc4
-rw-r--r--plugins/acl/package.xml2
-rw-r--r--plugins/additional_message_headers/additional_message_headers.php6
-rw-r--r--plugins/archive/archive.js18
-rw-r--r--plugins/archive/archive.php6
-rw-r--r--plugins/archive/localization/az_AZ.inc18
-rw-r--r--plugins/archive/localization/bg_BG.inc18
-rw-r--r--plugins/archive/localization/ca_ES.inc18
-rw-r--r--plugins/archive/localization/cs_CZ.inc18
-rw-r--r--plugins/archive/localization/cy_GB.inc18
-rw-r--r--plugins/archive/localization/da_DK.inc18
-rw-r--r--plugins/archive/localization/el_GR.inc18
-rw-r--r--plugins/archive/localization/es_AR.inc18
-rw-r--r--plugins/archive/localization/gl_ES.inc18
-rw-r--r--plugins/archive/localization/he_IL.inc18
-rw-r--r--plugins/archive/localization/hu_HU.inc16
-rw-r--r--plugins/archive/localization/ko_KR.inc20
-rw-r--r--plugins/archive/localization/lb_LU.inc34
-rw-r--r--plugins/archive/localization/lt_LT.inc18
-rw-r--r--plugins/archive/localization/lv_LV.inc22
-rw-r--r--plugins/archive/localization/sl_SI.inc18
-rw-r--r--plugins/archive/localization/tr_TR.inc18
-rw-r--r--plugins/archive/localization/zh_TW.inc18
-rwxr-xr-xplugins/attachment_reminder/attachment_reminder.js68
-rwxr-xr-xplugins/attachment_reminder/attachment_reminder.php84
-rw-r--r--plugins/attachment_reminder/localization/de_CH.inc22
-rw-r--r--plugins/attachment_reminder/localization/de_DE.inc6
-rw-r--r--plugins/attachment_reminder/localization/en_US.inc22
-rw-r--r--plugins/attachment_reminder/localization/es_ES.inc6
-rw-r--r--plugins/attachment_reminder/localization/fr_FR.inc6
-rw-r--r--plugins/attachment_reminder/localization/it_IT.inc6
-rw-r--r--plugins/attachment_reminder/localization/lb_LU.inc22
-rw-r--r--plugins/attachment_reminder/localization/nl_NL.inc6
-rw-r--r--plugins/attachment_reminder/localization/pl_PL.inc6
-rw-r--r--plugins/attachment_reminder/localization/zh_CN.inc6
-rw-r--r--plugins/attachment_reminder/localization/zh_TW.inc6
-rw-r--r--plugins/attachment_reminder/package.xml67
-rw-r--r--plugins/autologon/autologon.php4
-rw-r--r--plugins/database_attachments/config.inc.php.dist12
-rw-r--r--plugins/database_attachments/database_attachments.php118
-rw-r--r--plugins/database_attachments/package.xml6
-rw-r--r--plugins/debug_logger/debug_logger.php4
-rw-r--r--plugins/debug_logger/runlog/runlog.php2
-rw-r--r--plugins/enigma/enigma.php9
-rw-r--r--plugins/enigma/lib/enigma_engine.php34
-rw-r--r--plugins/enigma/lib/enigma_ui.php5
-rw-r--r--plugins/enigma/skins/classic/templates/keys.html6
-rw-r--r--plugins/example_addressbook/example_addressbook.php3
-rw-r--r--plugins/filesystem_attachments/filesystem_attachments.php2
-rw-r--r--plugins/filesystem_attachments/package.xml2
-rw-r--r--plugins/help/config.inc.php.dist34
-rw-r--r--plugins/help/content/about.html27
-rw-r--r--plugins/help/content/license.html2
-rw-r--r--plugins/help/help.js25
-rw-r--r--plugins/help/help.php69
-rw-r--r--plugins/help/localization/de_DE.inc2
-rw-r--r--plugins/help/localization/gl_ES.inc2
-rw-r--r--plugins/help/localization/ko_KR.inc2
-rw-r--r--plugins/help/localization/lb_LU.inc24
-rw-r--r--plugins/help/localization/zh_CN.inc2
-rw-r--r--plugins/help/package.xml9
-rw-r--r--plugins/help/skins/classic/help.css16
-rw-r--r--plugins/help/skins/classic/templates/help.html17
-rw-r--r--plugins/help/skins/larry/help.css1
-rw-r--r--plugins/help/skins/larry/templates/help.html8
-rw-r--r--plugins/hide_blockquote/localization/lb_LU.inc24
-rw-r--r--plugins/http_authentication/http_authentication.php2
-rw-r--r--plugins/jqueryui/jqueryui.php1
-rw-r--r--plugins/managesieve/Changelog33
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve.php12
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php2122
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_script.php459
-rw-r--r--plugins/managesieve/localization/az_AZ.inc2
-rw-r--r--plugins/managesieve/localization/be_BE.inc2
-rw-r--r--plugins/managesieve/localization/bg_BG.inc2
-rw-r--r--plugins/managesieve/localization/bs_BA.inc8
-rw-r--r--plugins/managesieve/localization/ca_ES.inc2
-rw-r--r--plugins/managesieve/localization/cs_CZ.inc2
-rw-r--r--plugins/managesieve/localization/cy_GB.inc2
-rw-r--r--plugins/managesieve/localization/da_DK.inc2
-rw-r--r--plugins/managesieve/localization/de_CH.inc2
-rw-r--r--plugins/managesieve/localization/de_DE.inc2
-rw-r--r--plugins/managesieve/localization/el_GR.inc2
-rw-r--r--plugins/managesieve/localization/en_GB.inc2
-rw-r--r--plugins/managesieve/localization/en_US.inc25
-rw-r--r--plugins/managesieve/localization/eo.inc2
-rw-r--r--plugins/managesieve/localization/es_AR.inc2
-rw-r--r--plugins/managesieve/localization/es_ES.inc31
-rw-r--r--plugins/managesieve/localization/et_EE.inc29
-rw-r--r--plugins/managesieve/localization/fa_IR.inc1
-rw-r--r--plugins/managesieve/localization/fi_FI.inc2
-rw-r--r--plugins/managesieve/localization/fr_FR.inc39
-rw-r--r--plugins/managesieve/localization/gl_ES.inc2
-rw-r--r--plugins/managesieve/localization/he_IL.inc1
-rw-r--r--plugins/managesieve/localization/hu_HU.inc8
-rw-r--r--plugins/managesieve/localization/hy_AM.inc2
-rw-r--r--plugins/managesieve/localization/ia.inc2
-rw-r--r--plugins/managesieve/localization/id_ID.inc2
-rw-r--r--plugins/managesieve/localization/it_IT.inc2
-rw-r--r--plugins/managesieve/localization/ja_JP.inc2
-rw-r--r--plugins/managesieve/localization/ko_KR.inc2
-rw-r--r--plugins/managesieve/localization/lb_LU.inc196
-rw-r--r--plugins/managesieve/localization/lt_LT.inc2
-rw-r--r--plugins/managesieve/localization/lv_LV.inc163
-rw-r--r--plugins/managesieve/localization/ml_IN.inc1
-rw-r--r--plugins/managesieve/localization/mr_IN.inc2
-rw-r--r--plugins/managesieve/localization/nb_NO.inc23
-rw-r--r--plugins/managesieve/localization/nl_NL.inc2
-rw-r--r--plugins/managesieve/localization/nn_NO.inc2
-rw-r--r--plugins/managesieve/localization/pl_PL.inc31
-rw-r--r--plugins/managesieve/localization/pt_BR.inc27
-rw-r--r--plugins/managesieve/localization/pt_PT.inc2
-rw-r--r--plugins/managesieve/localization/ro_RO.inc2
-rw-r--r--plugins/managesieve/localization/ru_RU.inc27
-rw-r--r--plugins/managesieve/localization/si_LK.inc1
-rw-r--r--plugins/managesieve/localization/sk_SK.inc2
-rw-r--r--plugins/managesieve/localization/sl_SI.inc31
-rw-r--r--plugins/managesieve/localization/sv_SE.inc2
-rw-r--r--plugins/managesieve/localization/tr_TR.inc8
-rw-r--r--plugins/managesieve/localization/uk_UA.inc2
-rw-r--r--plugins/managesieve/localization/vi_VN.inc2
-rw-r--r--plugins/managesieve/localization/zh_CN.inc2
-rw-r--r--plugins/managesieve/localization/zh_TW.inc2
-rw-r--r--plugins/managesieve/managesieve.js194
-rw-r--r--plugins/managesieve/managesieve.php1928
-rw-r--r--plugins/managesieve/package.xml10
-rw-r--r--plugins/managesieve/skins/classic/images/erase.pngbin0 -> 453 bytes
-rw-r--r--plugins/managesieve/skins/classic/managesieve.css90
-rw-r--r--plugins/managesieve/skins/classic/templates/managesieve.html6
-rw-r--r--plugins/managesieve/skins/larry/images/erase.pngbin0 -> 453 bytes
-rw-r--r--plugins/managesieve/skins/larry/managesieve.css98
-rw-r--r--plugins/managesieve/tests/src/parser.out2
-rw-r--r--plugins/managesieve/tests/src/parser_date21
-rw-r--r--plugins/managesieve/tests/src/parser_enotify_b2
-rw-r--r--plugins/managesieve/tests/src/parser_index24
-rw-r--r--plugins/managesieve/tests/src/parser_notify_b2
-rw-r--r--plugins/managesieve/tests/src/parser_relational2
-rw-r--r--plugins/managesieve/tests/src/parser_subaddress2
-rw-r--r--plugins/markasjunk/localization/el_GR.inc2
-rw-r--r--plugins/markasjunk/localization/gl_ES.inc2
-rw-r--r--plugins/markasjunk/localization/lb_LU.inc24
-rw-r--r--plugins/markasjunk/localization/lv_LV.inc6
-rw-r--r--plugins/new_user_dialog/localization/ko_KR.inc4
-rw-r--r--plugins/new_user_dialog/localization/lb_LU.inc23
-rw-r--r--plugins/new_user_dialog/localization/lv_LV.inc4
-rw-r--r--plugins/new_user_dialog/localization/nl_NL.inc4
-rw-r--r--plugins/new_user_dialog/localization/zh_CN.inc2
-rw-r--r--plugins/new_user_dialog/new_user_dialog.php57
-rw-r--r--plugins/new_user_dialog/package.xml91
-rw-r--r--plugins/new_user_identity/new_user_identity.php3
-rw-r--r--plugins/new_user_identity/package.xml2
-rw-r--r--plugins/newmail_notifier/localization/gl_ES.inc12
-rw-r--r--plugins/newmail_notifier/localization/lb_LU.inc29
-rw-r--r--plugins/newmail_notifier/localization/lv_LV.inc16
-rw-r--r--plugins/newmail_notifier/localization/nl_NL.inc10
-rw-r--r--plugins/newmail_notifier/newmail_notifier.js110
-rw-r--r--plugins/newmail_notifier/newmail_notifier.php12
-rw-r--r--plugins/newmail_notifier/overlay.icobin0 -> 1150 bytes
-rw-r--r--plugins/newmail_notifier/package.xml2
-rw-r--r--plugins/password/README92
-rw-r--r--plugins/password/config.inc.php.dist12
-rw-r--r--plugins/password/drivers/cpanel.php110
-rw-r--r--plugins/password/drivers/directadmin.php1
-rw-r--r--plugins/password/drivers/pam.php3
-rw-r--r--plugins/password/drivers/sql.php7
-rw-r--r--plugins/password/drivers/xmail.php4
-rw-r--r--plugins/password/localization/gl_ES.inc2
-rw-r--r--plugins/password/localization/lb_LU.inc37
-rw-r--r--plugins/password/localization/lv_LV.inc16
-rw-r--r--plugins/password/localization/nl_NL.inc20
-rw-r--r--plugins/password/localization/zh_CN.inc8
-rw-r--r--plugins/password/package.xml40
-rw-r--r--plugins/password/password.php50
-rw-r--r--plugins/redundant_attachments/config.inc.php.dist6
-rw-r--r--plugins/redundant_attachments/redundant_attachments.php7
-rw-r--r--plugins/show_additional_headers/package.xml2
-rw-r--r--plugins/show_additional_headers/show_additional_headers.php4
-rw-r--r--plugins/squirrelmail_usercopy/squirrelmail_usercopy.php2
-rw-r--r--plugins/subscriptions_option/localization/gl_ES.inc2
-rw-r--r--plugins/subscriptions_option/localization/lb_LU.inc22
-rw-r--r--plugins/subscriptions_option/package.xml2
-rw-r--r--plugins/subscriptions_option/subscriptions_option.php3
-rw-r--r--plugins/userinfo/localization/lb_LU.inc25
-rw-r--r--plugins/userinfo/localization/nl_NL.inc2
-rw-r--r--plugins/userinfo/localization/zh_CN.inc4
-rw-r--r--plugins/vcard_attachments/localization/gl_ES.inc4
-rw-r--r--plugins/vcard_attachments/localization/lb_LU.inc23
-rw-r--r--plugins/vcard_attachments/localization/zh_CN.inc2
-rw-r--r--plugins/vcard_attachments/vcard_attachments.php3
-rw-r--r--plugins/virtuser_file/virtuser_file.php90
-rw-r--r--plugins/virtuser_query/package.xml2
-rw-r--r--plugins/virtuser_query/virtuser_query.php35
-rw-r--r--plugins/zipdownload/localization/lb_LU.inc23
-rw-r--r--plugins/zipdownload/zipdownload.php10
-rw-r--r--program/include/bc.php14
-rw-r--r--program/include/iniset.php20
-rw-r--r--program/include/rcmail.php279
-rw-r--r--program/include/rcmail_output_html.php129
-rw-r--r--program/js/app.js631
-rw-r--r--program/js/common.js125
-rw-r--r--program/js/editor.js4
-rw-r--r--program/js/jstz.min.js13
-rw-r--r--program/js/list.js261
-rw-r--r--program/js/treelist.js1090
-rw-r--r--program/lib/Mail/mime.php114
-rw-r--r--program/lib/Mail/mimePart.php40
-rw-r--r--program/lib/Net/Socket.php113
-rw-r--r--program/lib/Roundcube/bootstrap.php47
-rw-r--r--program/lib/Roundcube/html.php57
-rw-r--r--program/lib/Roundcube/rcube.php304
-rw-r--r--program/lib/Roundcube/rcube_addressbook.php32
-rw-r--r--program/lib/Roundcube/rcube_cache.php78
-rw-r--r--program/lib/Roundcube/rcube_cache_shared.php581
-rw-r--r--program/lib/Roundcube/rcube_config.php93
-rw-r--r--program/lib/Roundcube/rcube_contacts.php40
-rw-r--r--program/lib/Roundcube/rcube_csv2vcard.php53
-rw-r--r--program/lib/Roundcube/rcube_db.php178
-rw-r--r--program/lib/Roundcube/rcube_db_mssql.php32
-rw-r--r--program/lib/Roundcube/rcube_db_mysql.php32
-rw-r--r--program/lib/Roundcube/rcube_db_pgsql.php81
-rw-r--r--program/lib/Roundcube/rcube_db_sqlite.php47
-rw-r--r--program/lib/Roundcube/rcube_db_sqlsrv.php29
-rw-r--r--program/lib/Roundcube/rcube_enriched.php2
-rw-r--r--program/lib/Roundcube/rcube_image.php12
-rw-r--r--program/lib/Roundcube/rcube_imap.php261
-rw-r--r--program/lib/Roundcube/rcube_imap_cache.php208
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php310
-rw-r--r--program/lib/Roundcube/rcube_ldap.php1356
-rw-r--r--program/lib/Roundcube/rcube_ldap_generic.php1049
-rw-r--r--program/lib/Roundcube/rcube_ldap_result.php130
-rw-r--r--program/lib/Roundcube/rcube_message.php39
-rw-r--r--program/lib/Roundcube/rcube_message_header.php7
-rw-r--r--program/lib/Roundcube/rcube_mime.php221
-rw-r--r--program/lib/Roundcube/rcube_output.php2
-rw-r--r--program/lib/Roundcube/rcube_plugin.php42
-rw-r--r--program/lib/Roundcube/rcube_plugin_api.php119
-rw-r--r--program/lib/Roundcube/rcube_session.php170
-rw-r--r--program/lib/Roundcube/rcube_smtp.php14
-rw-r--r--program/lib/Roundcube/rcube_spellchecker.php161
-rw-r--r--program/lib/Roundcube/rcube_storage.php15
-rw-r--r--program/lib/Roundcube/rcube_string_replacer.php4
-rw-r--r--program/lib/Roundcube/rcube_user.php9
-rw-r--r--program/lib/Roundcube/rcube_utils.php56
-rw-r--r--program/lib/Roundcube/rcube_vcard.php41
-rw-r--r--program/lib/Roundcube/rcube_washtml.php50
-rw-r--r--program/lib/utf8.class.php4
-rw-r--r--program/localization/ar_SA/labels.inc10
-rw-r--r--program/localization/ar_SA/messages.inc2
-rw-r--r--program/localization/ast/labels.inc10
-rw-r--r--program/localization/ast/messages.inc2
-rw-r--r--program/localization/az_AZ/labels.inc20
-rw-r--r--program/localization/az_AZ/messages.inc24
-rw-r--r--program/localization/be_BE/labels.inc10
-rw-r--r--program/localization/be_BE/messages.inc2
-rw-r--r--program/localization/bg_BG/labels.inc16
-rw-r--r--program/localization/bg_BG/messages.inc2
-rw-r--r--program/localization/bn_BD/labels.inc10
-rw-r--r--program/localization/bn_BD/messages.inc2
-rw-r--r--program/localization/br/labels.inc10
-rw-r--r--program/localization/br/messages.inc2
-rw-r--r--program/localization/bs_BA/labels.inc12
-rw-r--r--program/localization/ca_ES/labels.inc14
-rw-r--r--program/localization/ca_ES/messages.inc70
-rw-r--r--program/localization/cs_CZ/labels.inc10
-rw-r--r--program/localization/cs_CZ/messages.inc8
-rw-r--r--program/localization/cy_GB/labels.inc20
-rw-r--r--program/localization/cy_GB/messages.inc2
-rw-r--r--program/localization/da_DK/labels.inc14
-rw-r--r--program/localization/da_DK/messages.inc4
-rw-r--r--program/localization/de_CH/labels.inc16
-rw-r--r--program/localization/de_CH/messages.inc2
-rw-r--r--program/localization/de_DE/labels.inc16
-rw-r--r--program/localization/de_DE/messages.inc2
-rw-r--r--program/localization/el_GR/labels.inc16
-rw-r--r--program/localization/el_GR/messages.inc60
-rw-r--r--program/localization/en_GB/labels.inc10
-rw-r--r--program/localization/en_GB/messages.inc2
-rw-r--r--program/localization/en_US/csv2vcard.inc17
-rw-r--r--program/localization/en_US/labels.inc11
-rw-r--r--program/localization/en_US/messages.inc9
-rw-r--r--program/localization/eo/labels.inc10
-rw-r--r--program/localization/eo/messages.inc2
-rw-r--r--program/localization/es_AR/labels.inc222
-rw-r--r--program/localization/es_AR/messages.inc2
-rw-r--r--program/localization/es_ES/labels.inc16
-rw-r--r--program/localization/es_ES/messages.inc2
-rw-r--r--program/localization/et_EE/labels.inc16
-rw-r--r--program/localization/et_EE/messages.inc4
-rw-r--r--program/localization/eu_ES/labels.inc10
-rw-r--r--program/localization/eu_ES/messages.inc2
-rw-r--r--program/localization/fa_AF/labels.inc10
-rw-r--r--program/localization/fa_AF/messages.inc2
-rw-r--r--program/localization/fa_IR/labels.inc20
-rw-r--r--program/localization/fa_IR/messages.inc2
-rw-r--r--program/localization/fi_FI/labels.inc21
-rw-r--r--program/localization/fr_FR/csv2vcard.inc96
-rw-r--r--program/localization/fr_FR/labels.inc90
-rw-r--r--program/localization/fr_FR/messages.inc2
-rw-r--r--program/localization/fy_NL/labels.inc10
-rw-r--r--program/localization/fy_NL/messages.inc171
-rwxr-xr-xprogram/localization/ga_IE/labels.inc10
-rwxr-xr-xprogram/localization/ga_IE/messages.inc2
-rw-r--r--program/localization/gl_ES/labels.inc82
-rw-r--r--program/localization/gl_ES/messages.inc24
-rw-r--r--program/localization/he_IL/labels.inc14
-rw-r--r--program/localization/he_IL/messages.inc4
-rw-r--r--program/localization/hi_IN/labels.inc10
-rw-r--r--program/localization/hi_IN/messages.inc2
-rw-r--r--program/localization/hr_HR/labels.inc10
-rw-r--r--program/localization/hr_HR/messages.inc2
-rw-r--r--program/localization/hu_HU/labels.inc16
-rw-r--r--program/localization/hu_HU/messages.inc4
-rw-r--r--program/localization/hy_AM/labels.inc10
-rw-r--r--program/localization/hy_AM/messages.inc2
-rw-r--r--program/localization/ia/labels.inc10
-rw-r--r--program/localization/ia/messages.inc2
-rw-r--r--program/localization/id_ID/labels.inc10
-rw-r--r--program/localization/id_ID/messages.inc2
-rw-r--r--program/localization/index.inc2
-rw-r--r--program/localization/is_IS/labels.inc10
-rw-r--r--program/localization/is_IS/messages.inc2
-rw-r--r--program/localization/it_IT/labels.inc14
-rw-r--r--program/localization/it_IT/messages.inc2
-rw-r--r--program/localization/ja_JP/labels.inc10
-rw-r--r--program/localization/ja_JP/messages.inc2
-rwxr-xr-xprogram/localization/ka_GE/labels.inc10
-rwxr-xr-xprogram/localization/ka_GE/messages.inc2
-rw-r--r--program/localization/km_KH/labels.inc10
-rw-r--r--program/localization/km_KH/messages.inc2
-rw-r--r--program/localization/ko_KR/labels.inc10
-rw-r--r--program/localization/ko_KR/messages.inc279
-rw-r--r--program/localization/ku/labels.inc10
-rw-r--r--program/localization/ku/messages.inc2
-rw-r--r--program/localization/lb_LU/labels.inc544
-rw-r--r--program/localization/lb_LU/messages.inc176
-rw-r--r--program/localization/lt_LT/labels.inc22
-rw-r--r--program/localization/lt_LT/messages.inc2
-rw-r--r--program/localization/lv_LV/labels.inc324
-rw-r--r--program/localization/lv_LV/messages.inc198
-rwxr-xr-xprogram/localization/mk_MK/labels.inc10
-rwxr-xr-xprogram/localization/mk_MK/messages.inc2
-rw-r--r--program/localization/ml_IN/labels.inc10
-rw-r--r--program/localization/ml_IN/messages.inc2
-rwxr-xr-xprogram/localization/mr_IN/labels.inc10
-rwxr-xr-xprogram/localization/mr_IN/messages.inc2
-rw-r--r--program/localization/ms_MY/labels.inc10
-rw-r--r--program/localization/ms_MY/messages.inc2
-rw-r--r--program/localization/nb_NO/labels.inc23
-rw-r--r--program/localization/nb_NO/messages.inc2
-rw-r--r--program/localization/ne_NP/labels.inc10
-rw-r--r--program/localization/ne_NP/messages.inc2
-rw-r--r--program/localization/nl_BE/labels.inc10
-rw-r--r--program/localization/nl_BE/messages.inc2
-rw-r--r--program/localization/nl_NL/labels.inc10
-rw-r--r--program/localization/nn_NO/labels.inc17
-rw-r--r--program/localization/nn_NO/messages.inc2
-rw-r--r--program/localization/pl_PL/labels.inc10
-rw-r--r--program/localization/pl_PL/messages.inc6
-rwxr-xr-xprogram/localization/ps/labels.inc10
-rwxr-xr-xprogram/localization/ps/messages.inc2
-rw-r--r--program/localization/pt_BR/labels.inc14
-rw-r--r--program/localization/pt_BR/messages.inc2
-rw-r--r--program/localization/pt_PT/labels.inc10
-rw-r--r--program/localization/pt_PT/messages.inc2
-rw-r--r--program/localization/ro_RO/labels.inc80
-rw-r--r--program/localization/ro_RO/messages.inc2
-rw-r--r--program/localization/ru_RU/labels.inc10
-rw-r--r--program/localization/ru_RU/messages.inc2
-rw-r--r--program/localization/si_LK/labels.inc10
-rw-r--r--program/localization/si_LK/messages.inc2
-rw-r--r--program/localization/sk_SK/labels.inc10
-rw-r--r--program/localization/sk_SK/messages.inc2
-rw-r--r--program/localization/sl_SI/labels.inc14
-rw-r--r--program/localization/sl_SI/messages.inc8
-rw-r--r--program/localization/sq_AL/labels.inc10
-rw-r--r--program/localization/sq_AL/messages.inc2
-rw-r--r--program/localization/sr_CS/labels.inc10
-rw-r--r--program/localization/sr_CS/messages.inc2
-rw-r--r--program/localization/sv_SE/labels.inc10
-rw-r--r--program/localization/sv_SE/messages.inc2
-rw-r--r--program/localization/ta_IN/labels.inc10
-rw-r--r--program/localization/ta_IN/messages.inc2
-rw-r--r--program/localization/th_TH/labels.inc10
-rw-r--r--program/localization/th_TH/messages.inc2
-rw-r--r--program/localization/tr_TR/labels.inc10
-rw-r--r--program/localization/tr_TR/messages.inc2
-rw-r--r--program/localization/uk_UA/labels.inc10
-rw-r--r--program/localization/uk_UA/messages.inc2
-rw-r--r--program/localization/vi_VN/labels.inc17
-rw-r--r--program/localization/vi_VN/messages.inc2
-rw-r--r--program/localization/zh_CN/labels.inc10
-rw-r--r--program/localization/zh_TW/labels.inc10
-rw-r--r--program/localization/zh_TW/messages.inc2
-rw-r--r--program/steps/addressbook/copy.inc12
-rw-r--r--program/steps/addressbook/delete.inc38
-rw-r--r--program/steps/addressbook/export.inc4
-rw-r--r--program/steps/addressbook/func.inc146
-rw-r--r--program/steps/addressbook/import.inc15
-rw-r--r--program/steps/addressbook/list.inc49
-rw-r--r--program/steps/addressbook/move.inc208
-rw-r--r--program/steps/addressbook/save.inc6
-rw-r--r--program/steps/addressbook/show.inc13
-rw-r--r--program/steps/addressbook/undo.inc25
-rw-r--r--program/steps/mail/autocomplete.inc2
-rw-r--r--program/steps/mail/check_recent.inc5
-rw-r--r--program/steps/mail/compose.inc133
-rw-r--r--program/steps/mail/copy.inc8
-rw-r--r--program/steps/mail/func.inc298
-rw-r--r--program/steps/mail/get.inc136
-rw-r--r--program/steps/mail/import.inc105
-rw-r--r--program/steps/mail/list_contacts.inc43
-rw-r--r--program/steps/mail/mark.inc10
-rw-r--r--program/steps/mail/move_del.inc6
-rw-r--r--program/steps/mail/search_contacts.inc19
-rw-r--r--program/steps/mail/sendmail.inc53
-rw-r--r--program/steps/mail/show.inc18
-rw-r--r--program/steps/settings/about.inc67
-rw-r--r--program/steps/settings/edit_folder.inc2
-rw-r--r--program/steps/settings/edit_prefs.inc2
-rw-r--r--program/steps/settings/folders.inc16
-rw-r--r--program/steps/settings/func.inc1972
-rw-r--r--program/steps/settings/save_prefs.inc7
-rw-r--r--program/steps/utils/save_pref.inc16
-rw-r--r--program/steps/utils/spell.inc7
-rw-r--r--program/steps/utils/spell_html.inc5
-rw-r--r--skins/classic/addressbook.css31
-rw-r--r--skins/classic/common.css9
-rw-r--r--skins/classic/embed.css6
-rw-r--r--skins/classic/functions.js253
-rw-r--r--skins/classic/images/contactgroup.pngbin0 -> 1038 bytes
-rw-r--r--skins/classic/images/favicon.icobin1150 -> 34494 bytes
-rw-r--r--skins/classic/images/mail_toolbar.pngbin36649 -> 40806 bytes
-rw-r--r--skins/classic/includes/messagetoolbar.html2
-rw-r--r--skins/classic/mail.css292
-rw-r--r--skins/classic/print.css29
-rw-r--r--skins/classic/settings.css14
-rw-r--r--skins/classic/templates/about.html7
-rw-r--r--skins/classic/templates/addressbook.html16
-rw-r--r--skins/classic/templates/compose.html10
-rw-r--r--skins/classic/templates/contact.html2
-rw-r--r--skins/classic/templates/contactadd.html9
-rw-r--r--skins/classic/templates/contactedit.html9
-rw-r--r--skins/classic/templates/folders.html6
-rw-r--r--skins/classic/templates/login.html2
-rw-r--r--skins/classic/templates/mail.html16
-rw-r--r--skins/classic/templates/message.html8
-rw-r--r--skins/classic/templates/messageerror.html6
-rw-r--r--skins/classic/templates/messagepart.html38
-rw-r--r--skins/classic/templates/messagepreview.html6
-rw-r--r--skins/larry/addressbook.css49
-rw-r--r--skins/larry/ie7hacks.css1
-rw-r--r--skins/larry/images/buttons.pngbin37956 -> 50162 bytes
-rw-r--r--skins/larry/images/contactgroup.pngbin0 -> 2104 bytes
-rw-r--r--skins/larry/images/favicon.icobin1150 -> 34494 bytes
-rw-r--r--skins/larry/images/listicons.pngbin25486 -> 26384 bytes
-rw-r--r--skins/larry/includes/header.html6
-rw-r--r--skins/larry/mail.css318
-rw-r--r--skins/larry/print.css25
-rw-r--r--skins/larry/settings.css10
-rw-r--r--skins/larry/styles.css27
-rw-r--r--skins/larry/templates/about.html4
-rw-r--r--skins/larry/templates/addressbook.html9
-rw-r--r--skins/larry/templates/compose.html2
-rw-r--r--skins/larry/templates/contact.html2
-rw-r--r--skins/larry/templates/contactedit.html2
-rw-r--r--skins/larry/templates/login.html2
-rw-r--r--skins/larry/templates/mail.html15
-rw-r--r--skins/larry/templates/message.html6
-rw-r--r--skins/larry/templates/messagepart.html34
-rw-r--r--skins/larry/templates/messagepreview.html2
-rw-r--r--skins/larry/ui.js143
-rw-r--r--tests/Framework/ImapGeneric.php23
-rw-r--r--tests/Framework/Mime.php62
-rw-r--r--tests/Framework/StringReplacer.php2
-rw-r--r--tests/Framework/Utils.php65
-rw-r--r--tests/Framework/VCard.php14
-rw-r--r--tests/Framework/Washtml.php15
-rw-r--r--tests/Selenium/bootstrap.php4
-rw-r--r--tests/bootstrap.php4
-rw-r--r--tests/src/Csv2vcard/tb_plain.csv2
-rw-r--r--tests/src/Csv2vcard/tb_plain.vcf2
-rw-r--r--tests/src/format-flowed-unfolded.txt2
-rw-r--r--tests/src/format-flowed.txt2
539 files changed, 18147 insertions, 9827 deletions
diff --git a/.tx/config b/.tx/config
index 6da7dd998..e183fb999 100644
--- a/.tx/config
+++ b/.tx/config
@@ -1,6 +1,6 @@
[main]
host = https://www.transifex.com
-lang_map = be: be_BE, sr: sr_CS, fa: fa_AF
+lang_map = be: be_BE, sr: sr_CS, fa: fa_AF, lb: lb_LU
type = PHP_ALT_ARRAY
[roundcube-webmail.labels]
@@ -23,6 +23,11 @@ file_filter = plugins/archive/localization/<lang>.inc
source_file = plugins/archive/localization/en_US.inc
source_lang = en_US
+[roundcube-webmail.plugin-attachment_reminder]
+file_filter = plugins/attachment_reminder/localization/<lang>.inc
+source_file = plugins/attachment_reminder/localization/en_US.inc
+source_lang = en_US
+
[roundcube-webmail.plugin-help]
file_filter = plugins/help/localization/<lang>.inc
source_file = plugins/help/localization/en_US.inc
diff --git a/CHANGELOG b/CHANGELOG
index 04ec31d47..b779086e0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,29 +1,162 @@
CHANGELOG Roundcube Webmail
===========================
+- Respect HTTP_X_FORWARDED_FOR and HTTP_X_REAL_IP variables for session IP check
+- Simplified configuration by merging it into one file + defaults (#1487311)
+- Make message list header stay on top when scrolling (#1295420)
+- Fix bug where signature wasn't changed on identity selection when editing a draft (#1489229)
+- Fix IMAP SETMETADATA parameters quoting (#1489231)
+- Add support for 'enchant' spellcheck engine
+- Fix "could not load message" error on valid empty message body (#1489228)
+- Check filetype detection in installer and update script (#1489193)
+- Fix handling of message/rfc822 attachments on message forward and edit (#1489214)
+- Fix folder names truncation in Classic skin (#1489220)
+- Fix parsing of square bracket characters in IMAP response strings (#1489223)
+- Don't clear References and in-Reply-To when a message is "edited as new" (#1489216)
+- Make possible to disable some (broken) IMAP extensions with imap_disable_caps option (#1489184)
+- Contacts drag-n-drop default action is to move contacts (#1488751)
+- Added possibility to choose to move or copy contacts from drag-n-drop menu (#1488751)
+- Fix messages list sorting with THREAD=REFS
+- Fix Close link and remove About link on error pages (#1489109)
+- Remove deprecated (in PHP 5.5) PREG /e modifier usage (#1489174)
+- Fix empty messages list when register_globals is enabled (#1489157)
+- Improved/unified attachment preview screen, added print button
+- Fix lack of space between searchfiler and quicksearchbar in Larry skin (#1489158)
+- Fix so valid and set date.timezone is not required by installer checks (#1489180)
+- Canonize boolean ini_get() results (#1489189)
+- Cache LDAP's user_specific search and use vlv for better performance (#1489186)
+- LDAP: auto-detect and use VLV indices for all search operations
+- LDAP: additional group configuration options for address books
+- LDAP: separated address book implementation from a generic LDAP wrapper class
+- Allow address books to browse a multi-level group hierarchy in the contacts list
+- Fix so install do not fail when one of DB driver checks fails but other drivers exist (#1489178)
+- Fix so exported vCard specifies encoding in v3-compatible format (#1489183)
+- Fix session issues when local and database time differs (#1486132)
+- Fix thread cache syncronization/validation (#1489028)
+- Added feature to import messages to the currently selected folder
+- Add option show_real_foldernames to disable localization of special folders
+- Fix database cache expunge issues (#1489149)
+- Fix date format issues on MS SQL Server (#1488918)
+- Add imap_cache_ttl option to configure TTL of imap_cache
+- Make LDAP cache engine configurable via ldap_cache and ldap_cache_ttl options
+- Fix "duplicate entry" errors on inserts to imap cache tables (#1489146)
+- Improved handling of Reply-To/Bcc addresses of identity in compose form (#1489016)
+- Added user preference to open all popups as standard windows
+- Implemented shared cache (rcube_cache_shared)
+- Change Reply-All button label/title when mailing list is detected (#1488938)
+- Fix SMTP connection using IPv6 address in smtp_server option (#1489024)
+- Added attachment_reminder plugin
+- Make PHP code eval() free, use create_function()
+- Add option to display email address together with a name in mail preview (#1488732)
+- Support CSV import from Atmail (#1489045)
+- Add db_prefix configuration option in place of db_table_*/db_sequence_* options
+- Make possible to use db_prefix for schema initialization in Installer (#1489067)
+- Fix updatedb.sh script so it recognizes also table prefix for external DDL files
+- Fix parsing invalid date string (#1489035)
+- Add "with attachment" option to messages list filter (#1485382)
- Call resize handler in intervals to prevent lags and double onresize calls in Chrome (#1489005)
+- Add rel="noreferrer" for links in displayed messages (#1484686)
+- Add ability to toggle between HTML and text while viewing a message (#1486939)
+- Remove "HTML message" from attachments list while viewing a message in text mode (#1486939)
+- Support IMAP MOVE extension [RFC 6851]
+- Add attachment menu with Open and Download options (#1488975)
+- Display user-friendly message on IMAP "over quota" errors (#1484164)
+- Extended archive plugin with user-configurable options to store messages into subfolders
+- Fix export of selected contacts from search result (#1488905)
+- Feature to export only selected contacts from addressbook (by Phil Weir)
+
+RELEASE 0.9.2
+-------------
+- Fix image thumbnails display in print mode (#1489134)
+- Fix height of message headers block (#1489108)
+- Fix timeout issue on drag&drop uploads (#1489170)
+- Fix default sorting of threaded list when THREAD=REFS isn't supported
+- Fix list mode switch to 'List' after saving list settings in Larry skin (#1489164)
+- Fix error when there's no writeable addressbook source (#1489162)
+- Fix zipdownload plugin issue with filenames charset (#1489156)
+- Fix so non-inline images aren't skipped on forward (#1489150)
+- Fix "null" instead of empty string on messages list in IE10 (#1489145)
+- Fix legacy options handling
+- Fix so bounces addresses in Sender headers are skipped on Reply-All (#1489011)
+- Fix bug where serialized strings were truncated in PDO::quote() (#1489142)
+- Fix displaying messages with invalid self-closing HTML tags (#1489137)
+- Fix PHP warning when responding to a message with many Return-Path headers (#1489136)
+- Fix unintentional compose window resize (#1489114)
+- Fix performance regression in text wrapping function (#1489133)
+- Fix connection to posgtres db using unix socket (#1489132)
+- Fix handling of comma when adding contact from contacts widget (#1489107)
+- Fix bug where a message was opened in both preview pane and new window on double-click (#1489122)
+- Fix fatal error when xdebug.max_nesting_level was exceeded in rcube_washtml (#1489110)
+- Fix PHP warning in html_table::set_row_attribs() in PHP 5.4 (#1489094)
+- Fix invalid option selected in default_font selector when font is unset (#1489112)
+- Fix displaying contact with ID divisible by 100 in sql addressbook (#1489121)
+- Fix browser warnings on PDF plugin detection (#1489118)
+- Fix fatal error when parsing UUencoded messages (#1489119)
+
+RELEASE 0.9.1
+-------------
+- Better German labels for from/to to avoid conflicts with 'sender' (#1489084)
+- Fix problem where security warning was displayed for valid images with image/jpg type (#1489097)
+- Fix handling of invalid email addresses in headers (#1489092)
+- Fix IMAP connection issue with default_socket_timeout < 0 and imap_timeout < 0 (#1489090)
+- Fix various PHP code bugs found using static analysis (#1489086)
+- Fix backslash character handling on vCard import (#1489085)
+- Fix csv import from Thunderbird with French localization (#1489059)
+- Fix messages list focus issue in Opera and Webkit (#1489058)
+- Fix Reply-To header handling in Reply-All action (#1489037)
+- Fix so Sender: address is added to Cc: field on reply to all (#1489011)
+- Fix so addressbook_search_mode works also for group search (#1489079)
+- Fix removal of a contact from a group in LDAP addressbook (#1489081)
+- Inlcude SQL query in the log on SQL error (#1489064)
+- Fix handling untagged responses in IMAP FETCH - "could not load message" error (#1489074)
+- Fix very small window size in Chrome (#1488931)
+- Fix list page reset when viewing a message in Larry skin (#1489076)
+- Fix min_refresh_interval handling on preferences save (#1489073)
+- Fix PDF support detection for Firefox PDF.js (#1488972)
+- Fix possible collision in generated thumbnail cache key (#1489069)
+- Fix exit code on bootsrap errors in CLI mode (#1489044)
+- Fix error handling in CLI mode, use STDERR and non-empty exit code (#1489043)
+- Fix error when using check_referer=true
+- Fix incorrect handling of some specific links (#1489060)
+- Fix incorrect handling of leading spaces in text wrapping
+- Fix unintentional messages list jumps on click in Internet Explorer (#1489056)
+- Fix list of required configuration options (#1489055)
+- Fix DB error when creating a new contact and a group is selected (#1489051)
+- Fix handling of deprecated boolean value of reply_mode option (#1489052)
+
+RELEASE 0.9.0
+-------------
+- Fix display of HTML entities in protected folder name (#1489042)
+- Set minimal permissions to temp files (#1488996)
+- Improve content check for embedded images without filename (#1489029)
+- Fix handling of invalid characters in message headers and output (#1489032)
+- Fix selecting collapsed rows on select-all (#1489036)
+- Avoid race-conditions with concurrent attachment uploads (#1488422)
+- Fix possible header duplicates when using additional headers (#1489033)
+- Fix session issues with use_https=true (#1488986)
+- Fix blockquote width in sent mail (#1489031)
+- Fix keyboard events on list widgets in Internet Explorer (#1489025)
+
+RELEASE 0.9-rc2
+---------------
+- Fix security issue in save-pref command
+- Remove sig_above configuration option, use reply_mode only (#1489001)
+- Refresh current folder in opener window after draft save or message sent (#1488997)
+- Fix saving draft just after entering compose window (#1489012)
- Fix javascript error in IE9 when loading form with placeholders into an iframe (#1489008)
- Fix handling of some conditional comment tags in HTML message (#1489004)
-- Add rel="noreferrer" for links in displayed messages (#1484686)
- Fix so forward as attachment works if additional attachment is added by message_compose hook (#1489000)
-- Add ability to toggle between HTML and text while viewing a message (#1486939)
- Better handling of session errors in ajax requests (#1488960)
- Fix HTML part detection for some specific message structures (#1488992)
- Don't show fake address - phishing prevention (#1488981)
- Fix forward as attachment bug with editormode != 1 (#1488991)
- Fix LIMIT/OFFSET queries handling on MS SQL Server (#1488984)
- Fix so task name can really contain all from a-z0-9_- characters (#1488941)
-- Support IMAP MOVE extension [RFC 6851]
- Fix javascript errors when working in a page opened with taget="_blank"
- Mention SQLite database format change in UPGRADING file (#1488983)
- Increase maxlength to 254 chars for email input fields in addressbook (#1488987)
-- Add attachment menu with Open and Download options (#1488975)
- Fix thumbnail size when GD extension is used for image resize (#1488985)
-- Display user-friendly message on IMAP "over quota" errors (#1484164)
- Display notice that message is encrypted also for application/pkcs7-mime messages (#1488526)
-- Extended archive plugin with user-configurable options to store messages into subfolders
-- Fix export of selected contacts from search result (#1488905)
-- Feature to export only selected contacts from addressbook (by Phil Weir)
RELEASE 0.9-rc
--------------
diff --git a/INSTALL b/INSTALL
index de2944107..5b1c21dac 100644
--- a/INSTALL
+++ b/INSTALL
@@ -52,14 +52,15 @@ INSTALLATION
4. Point your browser to http://url-to-roundcube/installer/
5. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
6. After creating and testing the configuration, remove the installer directory
-7. Done!
+7. Check Known Issues section of this file
+8. Done!
CONFIGURATION HINTS
===================
Roundcube writes internal errors to the 'errors' log file located in the logs
-directory which can be configured in config/main.inc.php. If you want ordinary
+directory which can be configured in config/config.inc.php. If you want ordinary
PHP errors to be logged there as well, enable the 'php_value error_log' line
in the .htaccess file and set the path to the log file accordingly.
@@ -95,18 +96,9 @@ mind: You need to specify this password later in 'config/db.inc.php'.
* SQLite
--------
-You need sqlite 2 (preferably 2.8) to setup the sqlite db
-(sqlite 3.x also doesn't work at the moment). Here is
-an example how you can setup the sqlite.db for roundcube:
-
-# sqlite -init SQL/sqlite.initial.sql sqlite.db
-Loading resources from SQL/sqlite.initial.sql
-SQLite version 2.8.16
-Enter ".help" for instructions
-sqlite> .exit
-# chmod o+rw sqlite.db
-
-Make sure your configuration points to the sqlite.db file and that the
+Versions of sqlite database engine older than 3 aren't supported.
+Database file and structure is created automatically by Roundcube.
+Make sure your configuration points to some file location and that the
webserver can write to the file and the directory containing the file.
@@ -116,34 +108,37 @@ To use Roundcube with PostgreSQL support you have to follow these
simple steps, which have to be done as the postgres system user (or
which ever is the database superuser):
-$ createuser roundcube
+$ createuser -P roundcube
$ createdb -O roundcube -E UNICODE roundcubemail
-$ psql roundcubemail
+$ psql -U roundcube -f SQL/postgres.initial.sql roundcubemail
-roundcubemail =# ALTER USER roundcube WITH PASSWORD 'the_new_password';
-roundcubemail =# \c - roundcube
-roundcubemail => \i SQL/postgres.initial.sql
+Note: in some system configurations you might need to add '-U postgres' to
+createuser and createdb commands.
-All this has been tested with PostgreSQL 8.x and 7.4.x. Older
-versions don't have a -O option for the createdb, so if you are
-using that version you'll have to change ownership of the DB later.
+
+* Microsoft SQL Server
+----------------------
+Language/locale of the database must be set to us_english (1033). More info
+on this at http://trac.roundcube.net/ticket/1488918.
Database cleaning
-----------------
-Do keep your database slick and clean we recommend to periodically execute
+To keep your database slick and clean we recommend to periodically execute
bin/cleandb.sh which finally removes all records that are marked as deleted.
Best solution is to install a cronjob running this script daily.
-
MANUAL CONFIGURATION
====================
-First of all, rename the files config/*.inc.php.dist to config/*.inc.php.
-You can then change these files according to your environment and your needs.
-Details about the config parameters can be found in the config files.
-See http://trac.roundcube.net/wiki/Howto_Install for even more guidance.
+First of all, copy the sample configuration file config/config.inc.php.sample
+to config/config.inc.php and make the necessary adjustments according to your
+environment and your needs. More configuration options can be copied from the
+config/defaults.inc.php file into your local config.inc.php file as needed.
+Read the comments above the individual configuration options to find out what
+they do or read http://trac.roundcube.net/wiki/Howto_Install for even more
+guidance.
You can also modify the default .htaccess file. This is necessary to
increase the allowed size of file attachments, for example:
@@ -232,3 +227,10 @@ $HTTP["host"] == "www.example.com" {
compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
}
+
+
+KNOWN ISSUES
+============
+
+Installations with uw-imap server should set imap_disabled_caps = array('ESEARCH')
+in main configuration file. ESEARCH implementation in this server is broken (#1489184).
diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 9139509a5..1027867e3 100644
--- a/SQL/mssql.initial.sql
+++ b/SQL/mssql.initial.sql
@@ -2,6 +2,15 @@ CREATE TABLE [dbo].[cache] (
[user_id] [int] NOT NULL ,
[cache_key] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
+ [expires] [datetime] NULL ,
+ [data] [text] COLLATE Latin1_General_CI_AI NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+CREATE TABLE [dbo].[cache_shared] (
+ [cache_key] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
+ [created] [datetime] NOT NULL ,
+ [expires] [datetime] NULL ,
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -9,7 +18,7 @@ GO
CREATE TABLE [dbo].[cache_index] (
[user_id] [int] NOT NULL ,
[mailbox] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
- [changed] [datetime] NOT NULL ,
+ [expires] [datetime] NULL ,
[valid] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL ,
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
@@ -18,7 +27,7 @@ GO
CREATE TABLE [dbo].[cache_thread] (
[user_id] [int] NOT NULL ,
[mailbox] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
- [changed] [datetime] NOT NULL ,
+ [expires] [datetime] NULL ,
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -27,7 +36,7 @@ CREATE TABLE [dbo].[cache_messages] (
[user_id] [int] NOT NULL ,
[mailbox] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[uid] [int] NOT NULL ,
- [changed] [datetime] NOT NULL ,
+ [expires] [datetime] NULL ,
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL ,
[flags] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
@@ -204,36 +213,49 @@ ALTER TABLE [dbo].[cache] ADD
CONSTRAINT [DF_cache_created] DEFAULT (getdate()) FOR [created]
GO
+ALTER TABLE [dbo].[cache_shared] ADD
+ CONSTRAINT [DF_cache_shared_created] DEFAULT (getdate()) FOR [created]
+GO
+
+ALTER TABLE [dbo].[cache_index] ADD
+ CONSTRAINT [DF_cache_index_valid] DEFAULT ('0') FOR [valid]
+GO
+
+ALTER TABLE [dbo].[cache_messages] ADD
+ CONSTRAINT [DF_cache_messages_flags] DEFAULT (0) FOR [flags]
+GO
+
CREATE INDEX [IX_cache_user_id] ON [dbo].[cache]([user_id]) ON [PRIMARY]
GO
CREATE INDEX [IX_cache_cache_key] ON [dbo].[cache]([cache_key]) ON [PRIMARY]
GO
-CREATE INDEX [IX_cache_created] ON [dbo].[cache]([created]) ON [PRIMARY]
+CREATE INDEX [IX_cache_shared_cache_key] ON [dbo].[cache_shared]([cache_key]) ON [PRIMARY]
GO
-ALTER TABLE [dbo].[cache_index] ADD
- CONSTRAINT [DF_cache_index_changed] DEFAULT (getdate()) FOR [changed],
- CONSTRAINT [DF_cache_index_valid] DEFAULT ('0') FOR [valid]
+CREATE INDEX [IX_cache_index_user_id] ON [dbo].[cache_index]([user_id]) ON [PRIMARY]
GO
-CREATE INDEX [IX_cache_index_user_id] ON [dbo].[cache_index]([user_id]) ON [PRIMARY]
+CREATE INDEX [IX_cache_thread_user_id] ON [dbo].[cache_thread]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [IX_cache_messages_user_id] ON [dbo].[cache_messages]([user_id]) ON [PRIMARY]
GO
-ALTER TABLE [dbo].[cache_thread] ADD
- CONSTRAINT [DF_cache_thread_changed] DEFAULT (getdate()) FOR [changed]
+CREATE INDEX [IX_cache_expires] ON [dbo].[cache]([expires]) ON [PRIMARY]
GO
-CREATE INDEX [IX_cache_thread_user_id] ON [dbo].[cache_thread]([user_id]) ON [PRIMARY]
+CREATE INDEX [IX_cache_shared_expires] ON [dbo].[cache_shared]([expires]) ON [PRIMARY]
GO
-ALTER TABLE [dbo].[cache_messages] ADD
- CONSTRAINT [DF_cache_messages_changed] DEFAULT (getdate()) FOR [changed],
- CONSTRAINT [DF_cache_messages_flags] DEFAULT (0) FOR [flags]
+CREATE INDEX [IX_cache_index_expires] ON [dbo].[cache_index]([expires]) ON [PRIMARY]
GO
-CREATE INDEX [IX_cache_messages_user_id] ON [dbo].[cache_messages]([user_id]) ON [PRIMARY]
+CREATE INDEX [IX_cache_thread_expires] ON [dbo].[cache_thread]([expires]) ON [PRIMARY]
+GO
+
+CREATE INDEX [IX_cache_messages_expires] ON [dbo].[cache_messages]([expires]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[contacts] ADD
@@ -371,6 +393,6 @@ CREATE TRIGGER [contact_delete_member] ON [dbo].[contacts]
WHERE [contact_id] IN (SELECT [contact_id] FROM deleted)
GO
-INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2013011700')
+INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2013061000')
GO
\ No newline at end of file
diff --git a/SQL/mssql/2013042700.sql b/SQL/mssql/2013042700.sql
new file mode 100644
index 000000000..fe6741a02
--- /dev/null
+++ b/SQL/mssql/2013042700.sql
@@ -0,0 +1 @@
+-- empty \ No newline at end of file
diff --git a/SQL/mssql/2013052500.sql b/SQL/mssql/2013052500.sql
new file mode 100644
index 000000000..6a7e31d46
--- /dev/null
+++ b/SQL/mssql/2013052500.sql
@@ -0,0 +1,17 @@
+CREATE TABLE [dbo].[cache_shared] (
+ [cache_key] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
+ [created] [datetime] NOT NULL ,
+ [data] [text] COLLATE Latin1_General_CI_AI NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[cache_shared] ADD
+ CONSTRAINT [DF_cache_shared_created] DEFAULT (getdate()) FOR [created]
+GO
+
+CREATE INDEX [IX_cache_shared_cache_key] ON [dbo].[cache_shared]([cache_key]) ON [PRIMARY]
+GO
+
+CREATE INDEX [IX_cache_shared_created] ON [dbo].[cache_shared]([created]) ON [PRIMARY]
+GO
+
diff --git a/SQL/mssql/2013061000.sql b/SQL/mssql/2013061000.sql
new file mode 100644
index 000000000..55b5ec3a5
--- /dev/null
+++ b/SQL/mssql/2013061000.sql
@@ -0,0 +1,44 @@
+ALTER TABLE [dbo].[cache] ADD COLUMN [expires] [datetime] NULL
+GO
+ALTER TABLE [dbo].[cache_shared] ADD COLUMN [expires] [datetime] NULL
+GO
+ALTER TABLE [dbo].[cache_index] ADD COLUMN [expires] [datetime] NULL
+GO
+ALTER TABLE [dbo].[cache_thread] ADD COLUMN [expires] [datetime] NULL
+GO
+ALTER TABLE [dbo].[cache_messages] ADD COLUMN [expires] [datetime] NULL
+GO
+
+UPDATE [dbo].[cache] SET [expires] = DATEADD(second, 604800, [created])
+GO
+UPDATE [dbo].[cache_shared] SET [expires] = DATEADD(second, 604800, [created])
+GO
+UPDATE [dbo].[cache_index] SET [expires] = DATEADD(second, 604800, [changed])
+GO
+UPDATE [dbo].[cache_thread] SET [expires] = DATEADD(second, 604800, [changed])
+GO
+UPDATE [dbo].[cache_messages] SET [expires] = DATEADD(second, 604800, [changed])
+GO
+
+DROP INDEX [IX_cache_created]
+GO
+DROP INDEX [IX_cache_shared_created]
+GO
+ALTER TABLE [dbo].[cache_index] DROP COLUMN [changed]
+GO
+ALTER TABLE [dbo].[cache_thread] DROP COLUMN [changed]
+GO
+ALTER TABLE [dbo].[cache_messages] DROP COLUMN [changed]
+GO
+
+CREATE INDEX [IX_cache_expires] ON [dbo].[cache]([expires]) ON [PRIMARY]
+GO
+CREATE INDEX [IX_cache_shared_expires] ON [dbo].[cache_shared]([expires]) ON [PRIMARY]
+GO
+CREATE INDEX [IX_cache_index_expires] ON [dbo].[cache_index]([expires]) ON [PRIMARY]
+GO
+CREATE INDEX [IX_cache_thread_expires] ON [dbo].[cache_thread]([expires]) ON [PRIMARY]
+GO
+CREATE INDEX [IX_cache_messages_expires] ON [dbo].[cache_messages]([expires]) ON [PRIMARY]
+GO
+ \ No newline at end of file
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index cb750c5ea..4e4833a62 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -35,27 +35,40 @@ CREATE TABLE `users` (
CREATE TABLE `cache` (
`user_id` int(10) UNSIGNED NOT NULL,
- `cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL ,
+ `cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
`created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
+ `expires` datetime DEFAULT NULL,
`data` longtext NOT NULL,
CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- INDEX `created_index` (`created`),
+ INDEX `expires_index` (`expires`),
INDEX `user_cache_index` (`user_id`,`cache_key`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
+-- Table structure for table `cache_shared`
+
+CREATE TABLE `cache_shared` (
+ `cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
+ `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
+ `expires` datetime DEFAULT NULL,
+ `data` longtext NOT NULL,
+ INDEX `expires_index` (`expires`),
+ INDEX `cache_key_index` (`cache_key`)
+) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
+
+
-- Table structure for table `cache_index`
CREATE TABLE `cache_index` (
`user_id` int(10) UNSIGNED NOT NULL,
`mailbox` varchar(255) BINARY NOT NULL,
- `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
+ `expires` datetime DEFAULT NULL,
`valid` tinyint(1) NOT NULL DEFAULT '0',
`data` longtext NOT NULL,
CONSTRAINT `user_id_fk_cache_index` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- INDEX `changed_index` (`changed`),
+ INDEX `expires_index` (`expires`),
PRIMARY KEY (`user_id`, `mailbox`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
@@ -65,11 +78,11 @@ CREATE TABLE `cache_index` (
CREATE TABLE `cache_thread` (
`user_id` int(10) UNSIGNED NOT NULL,
`mailbox` varchar(255) BINARY NOT NULL,
- `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
+ `expires` datetime DEFAULT NULL,
`data` longtext NOT NULL,
CONSTRAINT `user_id_fk_cache_thread` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- INDEX `changed_index` (`changed`),
+ INDEX `expires_index` (`expires`),
PRIMARY KEY (`user_id`, `mailbox`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
@@ -80,12 +93,12 @@ CREATE TABLE `cache_messages` (
`user_id` int(10) UNSIGNED NOT NULL,
`mailbox` varchar(255) BINARY NOT NULL,
`uid` int(11) UNSIGNED NOT NULL DEFAULT '0',
- `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
+ `expires` datetime DEFAULT NULL,
`data` longtext NOT NULL,
`flags` int(11) NOT NULL DEFAULT '0',
CONSTRAINT `user_id_fk_cache_messages` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- INDEX `changed_index` (`changed`),
+ INDEX `expires_index` (`expires`),
PRIMARY KEY (`user_id`, `mailbox`, `uid`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
@@ -196,4 +209,4 @@ CREATE TABLE `system` (
/*!40014 SET FOREIGN_KEY_CHECKS=1 */;
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2013011700');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2013061000');
diff --git a/SQL/mysql/2013011000.sql b/SQL/mysql/2013011000.sql
index f0b5e6a03..d1ea001db 100644
--- a/SQL/mysql/2013011000.sql
+++ b/SQL/mysql/2013011000.sql
@@ -1,6 +1,6 @@
-- Upgrade from 0.9-beta
-CREATE TABLE `system` (
+CREATE TABLE IF NOT EXISTS `system` (
`name` varchar(64) NOT NULL,
`value` mediumtext,
PRIMARY KEY(`name`)
diff --git a/SQL/mysql/2013042700.sql b/SQL/mysql/2013042700.sql
new file mode 100644
index 000000000..fe6741a02
--- /dev/null
+++ b/SQL/mysql/2013042700.sql
@@ -0,0 +1 @@
+-- empty \ No newline at end of file
diff --git a/SQL/mysql/2013052500.sql b/SQL/mysql/2013052500.sql
new file mode 100644
index 000000000..b5f72b8ab
--- /dev/null
+++ b/SQL/mysql/2013052500.sql
@@ -0,0 +1,7 @@
+CREATE TABLE `cache_shared` (
+ `cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
+ `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
+ `data` longtext NOT NULL,
+ INDEX `created_index` (`created`),
+ INDEX `cache_key_index` (`cache_key`)
+) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
diff --git a/SQL/mysql/2013061000.sql b/SQL/mysql/2013061000.sql
new file mode 100644
index 000000000..54041b340
--- /dev/null
+++ b/SQL/mysql/2013061000.sql
@@ -0,0 +1,24 @@
+ALTER TABLE `cache` ADD `expires` datetime DEFAULT NULL;
+ALTER TABLE `cache_shared` ADD `expires` datetime DEFAULT NULL;
+ALTER TABLE `cache_index` ADD `expires` datetime DEFAULT NULL;
+ALTER TABLE `cache_thread` ADD `expires` datetime DEFAULT NULL;
+ALTER TABLE `cache_messages` ADD `expires` datetime DEFAULT NULL;
+
+-- initialize expires column with created/changed date + 7days
+UPDATE `cache` SET `expires` = `created` + interval 604800 second;
+UPDATE `cache_shared` SET `expires` = `created` + interval 604800 second;
+UPDATE `cache_index` SET `expires` = `changed` + interval 604800 second;
+UPDATE `cache_thread` SET `expires` = `changed` + interval 604800 second;
+UPDATE `cache_messages` SET `expires` = `changed` + interval 604800 second;
+
+ALTER TABLE `cache` DROP INDEX `created_index`;
+ALTER TABLE `cache_shared` DROP INDEX `created_index`;
+ALTER TABLE `cache_index` DROP `changed`;
+ALTER TABLE `cache_thread` DROP `changed`;
+ALTER TABLE `cache_messages` DROP `changed`;
+
+ALTER TABLE `cache` ADD INDEX `expires_index` (`expires`);
+ALTER TABLE `cache_shared` ADD INDEX `expires_index` (`expires`);
+ALTER TABLE `cache_index` ADD INDEX `expires_index` (`expires`);
+ALTER TABLE `cache_thread` ADD INDEX `expires_index` (`expires`);
+ALTER TABLE `cache_messages` ADD INDEX `expires_index` (`expires`);
diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql
index 32d8edee8..f18cb6ad0 100644
--- a/SQL/postgres.initial.sql
+++ b/SQL/postgres.initial.sql
@@ -1,11 +1,11 @@
-- Roundcube Webmail initial database structure
--
--- Sequence "user_ids"
--- Name: user_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "users_seq"
+-- Name: users_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE user_ids
+CREATE SEQUENCE users_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
@@ -17,7 +17,7 @@ CREATE SEQUENCE user_ids
--
CREATE TABLE users (
- user_id integer DEFAULT nextval('user_ids'::text) PRIMARY KEY,
+ user_id integer DEFAULT nextval('users_seq'::text) PRIMARY KEY,
username varchar(128) DEFAULT '' NOT NULL,
mail_host varchar(128) DEFAULT '' NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL,
@@ -45,11 +45,11 @@ CREATE INDEX session_changed_idx ON session (changed);
--
--- Sequence "identity_ids"
--- Name: identity_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "identities_seq"
+-- Name: identities_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE identity_ids
+CREATE SEQUENCE identities_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
@@ -62,7 +62,7 @@ CREATE SEQUENCE identity_ids
--
CREATE TABLE identities (
- identity_id integer DEFAULT nextval('identity_ids'::text) PRIMARY KEY,
+ identity_id integer DEFAULT nextval('identities_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
@@ -82,11 +82,11 @@ CREATE INDEX identities_email_idx ON identities (email, del);
--
--- Sequence "contact_ids"
--- Name: contact_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "contacts_seq"
+-- Name: contacts_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE contact_ids
+CREATE SEQUENCE contacts_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
@@ -99,7 +99,7 @@ CREATE SEQUENCE contact_ids
--
CREATE TABLE contacts (
- contact_id integer DEFAULT nextval('contact_ids'::text) PRIMARY KEY,
+ contact_id integer DEFAULT nextval('contacts_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
@@ -115,11 +115,11 @@ CREATE TABLE contacts (
CREATE INDEX contacts_user_id_idx ON contacts (user_id, del);
--
--- Sequence "contactgroups_ids"
--- Name: contactgroups_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "contactgroups_seq"
+-- Name: contactgroups_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE contactgroups_ids
+CREATE SEQUENCE contactgroups_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
@@ -131,7 +131,7 @@ CREATE SEQUENCE contactgroups_ids
--
CREATE TABLE contactgroups (
- contactgroup_id integer DEFAULT nextval('contactgroups_ids'::text) PRIMARY KEY,
+ contactgroup_id integer DEFAULT nextval('contactgroups_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
@@ -164,14 +164,30 @@ CREATE INDEX contactgroupmembers_contact_id_idx ON contactgroupmembers (contact_
CREATE TABLE "cache" (
user_id integer NOT NULL
- REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
+ REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
cache_key varchar(128) DEFAULT '' NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL,
+ expires timestamp with time zone DEFAULT NULL,
data text NOT NULL
);
CREATE INDEX cache_user_id_idx ON "cache" (user_id, cache_key);
-CREATE INDEX cache_created_idx ON "cache" (created);
+CREATE INDEX cache_expires_idx ON "cache" (expires);
+
+--
+-- Table "cache_shared"
+-- Name: cache_shared; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE "cache_shared" (
+ cache_key varchar(255) NOT NULL,
+ created timestamp with time zone DEFAULT now() NOT NULL,
+ expires timestamp with time zone DEFAULT NULL,
+ data text NOT NULL
+);
+
+CREATE INDEX cache_shared_cache_key_idx ON "cache_shared" (cache_key);
+CREATE INDEX cache_shared_expires_idx ON "cache_shared" (expires);
--
-- Table "cache_index"
@@ -180,15 +196,15 @@ CREATE INDEX cache_created_idx ON "cache" (created);
CREATE TABLE cache_index (
user_id integer NOT NULL
- REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
+ REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
mailbox varchar(255) NOT NULL,
- changed timestamp with time zone DEFAULT now() NOT NULL,
+ expires timestamp with time zone DEFAULT NULL,
valid smallint NOT NULL DEFAULT 0,
data text NOT NULL,
PRIMARY KEY (user_id, mailbox)
);
-CREATE INDEX cache_index_changed_idx ON cache_index (changed);
+CREATE INDEX cache_index_expires_idx ON cache_index (expires);
--
-- Table "cache_thread"
@@ -197,14 +213,14 @@ CREATE INDEX cache_index_changed_idx ON cache_index (changed);
CREATE TABLE cache_thread (
user_id integer NOT NULL
- REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
+ REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
mailbox varchar(255) NOT NULL,
- changed timestamp with time zone DEFAULT now() NOT NULL,
+ expires timestamp with time zone DEFAULT NULL,
data text NOT NULL,
PRIMARY KEY (user_id, mailbox)
);
-CREATE INDEX cache_thread_changed_idx ON cache_thread (changed);
+CREATE INDEX cache_thread_expires_idx ON cache_thread (expires);
--
-- Table "cache_messages"
@@ -213,16 +229,16 @@ CREATE INDEX cache_thread_changed_idx ON cache_thread (changed);
CREATE TABLE cache_messages (
user_id integer NOT NULL
- REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
+ REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
mailbox varchar(255) NOT NULL,
uid integer NOT NULL,
- changed timestamp with time zone DEFAULT now() NOT NULL,
+ expires timestamp with time zone DEFAULT NULL,
data text NOT NULL,
flags integer NOT NULL DEFAULT 0,
PRIMARY KEY (user_id, mailbox, uid)
);
-CREATE INDEX cache_messages_changed_idx ON cache_messages (changed);
+CREATE INDEX cache_messages_expires_idx ON cache_messages (expires);
--
-- Table "dictionary"
@@ -231,18 +247,18 @@ CREATE INDEX cache_messages_changed_idx ON cache_messages (changed);
CREATE TABLE dictionary (
user_id integer DEFAULT NULL
- REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
+ REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
"language" varchar(5) NOT NULL,
data text NOT NULL,
CONSTRAINT dictionary_user_id_language_key UNIQUE (user_id, "language")
);
--
--- Sequence "searches_ids"
--- Name: searches_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "searches_seq"
+-- Name: searches_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE search_ids
+CREATE SEQUENCE searches_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
@@ -254,7 +270,7 @@ CREATE SEQUENCE search_ids
--
CREATE TABLE searches (
- search_id integer DEFAULT nextval('search_ids'::text) PRIMARY KEY,
+ search_id integer DEFAULT nextval('searches_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
"type" smallint DEFAULT 0 NOT NULL,
@@ -274,4 +290,4 @@ CREATE TABLE "system" (
value text
);
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2013011700');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2013061000');
diff --git a/SQL/postgres/2013042700.sql b/SQL/postgres/2013042700.sql
new file mode 100644
index 000000000..bbd567515
--- /dev/null
+++ b/SQL/postgres/2013042700.sql
@@ -0,0 +1,14 @@
+ALTER SEQUENCE user_ids RENAME TO users_seq;
+ALTER TABLE users ALTER COLUMN user_id SET DEFAULT nextval('users_seq'::text);
+
+ALTER SEQUENCE identity_ids RENAME TO identities_seq;
+ALTER TABLE identities ALTER COLUMN identity_id SET DEFAULT nextval('identities_seq'::text);
+
+ALTER SEQUENCE contact_ids RENAME TO contacts_seq;
+ALTER TABLE contacts ALTER COLUMN contact_id SET DEFAULT nextval('contacts_seq'::text);
+
+ALTER SEQUENCE contactgroups_ids RENAME TO contactgroups_seq;
+ALTER TABLE contactgroups ALTER COLUMN contactgroup_id SET DEFAULT nextval('contactgroups_seq'::text);
+
+ALTER SEQUENCE search_ids RENAME TO searches_seq;
+ALTER TABLE searches ALTER COLUMN search_id SET DEFAULT nextval('searches_seq'::text);
diff --git a/SQL/postgres/2013052500.sql b/SQL/postgres/2013052500.sql
new file mode 100644
index 000000000..471e57176
--- /dev/null
+++ b/SQL/postgres/2013052500.sql
@@ -0,0 +1,8 @@
+CREATE TABLE "cache_shared" (
+ cache_key varchar(255) NOT NULL,
+ created timestamp with time zone DEFAULT now() NOT NULL,
+ data text NOT NULL
+);
+
+CREATE INDEX cache_shared_cache_key_idx ON "cache_shared" (cache_key);
+CREATE INDEX cache_shared_created_idx ON "cache_shared" (created);
diff --git a/SQL/postgres/2013061000.sql b/SQL/postgres/2013061000.sql
new file mode 100644
index 000000000..9db0ebcd7
--- /dev/null
+++ b/SQL/postgres/2013061000.sql
@@ -0,0 +1,24 @@
+ALTER TABLE "cache" ADD expires timestamp with time zone DEFAULT NULL;
+ALTER TABLE "cache_shared" ADD expires timestamp with time zone DEFAULT NULL;
+ALTER TABLE "cache_index" ADD expires timestamp with time zone DEFAULT NULL;
+ALTER TABLE "cache_thread" ADD expires timestamp with time zone DEFAULT NULL;
+ALTER TABLE "cache_messages" ADD expires timestamp with time zone DEFAULT NULL;
+
+-- initialize expires column with created/changed date + 7days
+UPDATE "cache" SET expires = created + interval '604800 seconds';
+UPDATE "cache_shared" SET expires = created + interval '604800 seconds';
+UPDATE "cache_index" SET expires = changed + interval '604800 seconds';
+UPDATE "cache_thread" SET expires = changed + interval '604800 seconds';
+UPDATE "cache_messages" SET expires = changed + interval '604800 seconds';
+
+DROP INDEX cache_created_idx;
+DROP INDEX cache_shared_created_idx;
+ALTER TABLE "cache_index" DROP "changed";
+ALTER TABLE "cache_thread" DROP "changed";
+ALTER TABLE "cache_messages" DROP "changed";
+
+CREATE INDEX cache_expires_idx ON "cache" (expires);
+CREATE INDEX cache_shared_expires_idx ON "cache_shared" (expires);
+CREATE INDEX cache_index_expires_idx ON "cache_index" (expires);
+CREATE INDEX cache_thread_expires_idx ON "cache_thread" (expires);
+CREATE INDEX cache_messages_expires_idx ON "cache_messages" (expires);
diff --git a/SQL/sqlite.initial.sql b/SQL/sqlite.initial.sql
index 83874ce7c..e7f74ddfc 100644
--- a/SQL/sqlite.initial.sql
+++ b/SQL/sqlite.initial.sql
@@ -1,23 +1,6 @@
-- Roundcube Webmail initial database structure
--
--- Table structure for table cache
---
-
-CREATE TABLE cache (
- user_id integer NOT NULL default 0,
- cache_key varchar(128) NOT NULL default '',
- created datetime NOT NULL default '0000-00-00 00:00:00',
- data text NOT NULL
-);
-
-CREATE INDEX ix_cache_user_cache_key ON cache(user_id, cache_key);
-CREATE INDEX ix_cache_created ON cache(created);
-
-
--- --------------------------------------------------------
-
---
-- Table structure for table contacts and related
--
@@ -57,9 +40,6 @@ CREATE TABLE contactgroupmembers (
CREATE INDEX ix_contactgroupmembers_contact_id ON contactgroupmembers (contact_id);
-
--- --------------------------------------------------------
-
--
-- Table structure for table identities
--
@@ -82,9 +62,6 @@ CREATE TABLE identities (
CREATE INDEX ix_identities_user_id ON identities(user_id, del);
CREATE INDEX ix_identities_email ON identities(email, del);
-
--- --------------------------------------------------------
-
--
-- Table structure for table users
--
@@ -101,8 +78,6 @@ CREATE TABLE users (
CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
--- --------------------------------------------------------
-
--
-- Table structure for table session
--
@@ -117,8 +92,6 @@ CREATE TABLE session (
CREATE INDEX ix_session_changed ON session (changed);
--- --------------------------------------------------------
-
--
-- Table structure for table dictionary
--
@@ -131,8 +104,6 @@ CREATE TABLE dictionary (
CREATE UNIQUE INDEX ix_dictionary_user_language ON dictionary (user_id, "language");
--- --------------------------------------------------------
-
--
-- Table structure for table searches
--
@@ -147,7 +118,34 @@ CREATE TABLE searches (
CREATE UNIQUE INDEX ix_searches_user_type_name ON searches (user_id, type, name);
--- --------------------------------------------------------
+--
+-- Table structure for table cache
+--
+
+CREATE TABLE cache (
+ user_id integer NOT NULL default 0,
+ cache_key varchar(128) NOT NULL default '',
+ created datetime NOT NULL default '0000-00-00 00:00:00',
+ expires datetime DEFAULT NULL,
+ data text NOT NULL
+);
+
+CREATE INDEX ix_cache_user_cache_key ON cache(user_id, cache_key);
+CREATE INDEX ix_cache_expires ON cache(expires);
+
+--
+-- Table structure for table cache_shared
+--
+
+CREATE TABLE cache_shared (
+ cache_key varchar(255) NOT NULL,
+ created datetime NOT NULL default '0000-00-00 00:00:00',
+ expires datetime DEFAULT NULL,
+ data text NOT NULL
+);
+
+CREATE INDEX ix_cache_shared_cache_key ON cache_shared(cache_key);
+CREATE INDEX ix_cache_shared_expires ON cache_shared(expires);
--
-- Table structure for table cache_index
@@ -156,15 +154,13 @@ CREATE UNIQUE INDEX ix_searches_user_type_name ON searches (user_id, type, name)
CREATE TABLE cache_index (
user_id integer NOT NULL,
mailbox varchar(255) NOT NULL,
- changed datetime NOT NULL default '0000-00-00 00:00:00',
+ expires datetime DEFAULT NULL,
valid smallint NOT NULL DEFAULT '0',
data text NOT NULL,
PRIMARY KEY (user_id, mailbox)
);
-CREATE INDEX ix_cache_index_changed ON cache_index (changed);
-
--- --------------------------------------------------------
+CREATE INDEX ix_cache_index_expires ON cache_index (expires);
--
-- Table structure for table cache_thread
@@ -173,14 +169,12 @@ CREATE INDEX ix_cache_index_changed ON cache_index (changed);
CREATE TABLE cache_thread (
user_id integer NOT NULL,
mailbox varchar(255) NOT NULL,
- changed datetime NOT NULL default '0000-00-00 00:00:00',
+ expires datetime DEFAULT NULL,
data text NOT NULL,
PRIMARY KEY (user_id, mailbox)
);
-CREATE INDEX ix_cache_thread_changed ON cache_thread (changed);
-
--- --------------------------------------------------------
+CREATE INDEX ix_cache_thread_expires ON cache_thread (expires);
--
-- Table structure for table cache_messages
@@ -190,15 +184,13 @@ CREATE TABLE cache_messages (
user_id integer NOT NULL,
mailbox varchar(255) NOT NULL,
uid integer NOT NULL,
- changed datetime NOT NULL default '0000-00-00 00:00:00',
+ expires datetime DEFAULT NULL,
data text NOT NULL,
flags integer NOT NULL DEFAULT '0',
PRIMARY KEY (user_id, mailbox, uid)
);
-CREATE INDEX ix_cache_messages_changed ON cache_messages (changed);
-
--- --------------------------------------------------------
+CREATE INDEX ix_cache_messages_expires ON cache_messages (expires);
--
-- Table structure for table system
@@ -209,4 +201,4 @@ CREATE TABLE system (
value text NOT NULL
);
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2013011700');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2013061000');
diff --git a/SQL/sqlite/2013011000.sql b/SQL/sqlite/2013011000.sql
index 2c66ef95e..ec261a635 100644
--- a/SQL/sqlite/2013011000.sql
+++ b/SQL/sqlite/2013011000.sql
@@ -1,6 +1,6 @@
-- Updates from version 0.9-beta
-CREATE TABLE system (
+CREATE TABLE IF NOT EXISTS system (
name varchar(64) NOT NULL PRIMARY KEY,
value text NOT NULL
);
diff --git a/SQL/sqlite/2013042700.sql b/SQL/sqlite/2013042700.sql
new file mode 100644
index 000000000..fe6741a02
--- /dev/null
+++ b/SQL/sqlite/2013042700.sql
@@ -0,0 +1 @@
+-- empty \ No newline at end of file
diff --git a/SQL/sqlite/2013052500.sql b/SQL/sqlite/2013052500.sql
new file mode 100644
index 000000000..19ae1b110
--- /dev/null
+++ b/SQL/sqlite/2013052500.sql
@@ -0,0 +1,8 @@
+CREATE TABLE cache_shared (
+ cache_key varchar(255) NOT NULL,
+ created datetime NOT NULL default '0000-00-00 00:00:00',
+ data text NOT NULL
+);
+
+CREATE INDEX ix_cache_shared_cache_key ON cache_shared(cache_key);
+CREATE INDEX ix_cache_shared_created ON cache_shared(created);
diff --git a/SQL/sqlite/2013061000.sql b/SQL/sqlite/2013061000.sql
new file mode 100644
index 000000000..3c6b43eac
--- /dev/null
+++ b/SQL/sqlite/2013061000.sql
@@ -0,0 +1,48 @@
+DROP TABLE cache_index;
+DROP TABLE cache_thread;
+DROP TABLE cache_messages;
+
+ALTER TABLE cache ADD expires datetime DEFAULT NULL;
+DROP INDEX ix_cache_created;
+
+ALTER TABLE cache_shared ADD expires datetime DEFAULT NULL;
+DROP INDEX ix_cache_shared_created;
+
+UPDATE cache SET expires = datetime(created, '+604800 seconds');
+UPDATE cache_shared SET expires = datetime(created, '+604800 seconds');
+
+CREATE INDEX ix_cache_expires ON cache(expires);
+CREATE INDEX ix_cache_shared_expires ON cache_shared(expires);
+
+CREATE TABLE cache_index (
+ user_id integer NOT NULL,
+ mailbox varchar(255) NOT NULL,
+ expires datetime DEFAULT NULL,
+ valid smallint NOT NULL DEFAULT '0',
+ data text NOT NULL,
+ PRIMARY KEY (user_id, mailbox)
+);
+
+CREATE INDEX ix_cache_index_expires ON cache_index (expires);
+
+CREATE TABLE cache_thread (
+ user_id integer NOT NULL,
+ mailbox varchar(255) NOT NULL,
+ expires datetime DEFAULT NULL,
+ data text NOT NULL,
+ PRIMARY KEY (user_id, mailbox)
+);
+
+CREATE INDEX ix_cache_thread_expires ON cache_thread (expires);
+
+CREATE TABLE cache_messages (
+ user_id integer NOT NULL,
+ mailbox varchar(255) NOT NULL,
+ uid integer NOT NULL,
+ expires datetime DEFAULT NULL,
+ data text NOT NULL,
+ flags integer NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, mailbox, uid)
+);
+
+CREATE INDEX ix_cache_messages_expires ON cache_messages (expires);
diff --git a/UPGRADING b/UPGRADING
index 03d549920..86ddde620 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -32,19 +32,23 @@ it on a unix system, you need to do the following operations by hand:
- ./bin/
- ./SQL/
- ./program/
-2. rsync the contents of the following folders from your installation
+ - ./installer/
+2. Replace the configuration defaults files:
+ - config/defaults.inc.php
+ - config/mimetypes.php
+3. rsync the contents of the following folders from your installation
directory into the target folder:
./skins/
./plugins/
-3. Run ./bin/update.sh from the commandline OR
+4. Run ./bin/update.sh from the commandline OR
open http://url-to-roundcube/installer/ in a browser and choose "3 Test config".
To enable the latter one, you have to temporary set 'enable_installer'
- to true in your local config/main.inc.php file.
+ to true in your local config/config.inc.php file.
WARNING: See SQLite database upgrade below.
-4. Let the update script/installer check your configuration and
+5. Let the update script/installer check your configuration and
update your config files and database schema as suggested by the updater.
-5. Make sure 'enable_installer' is set to false again.
-6. See Post-Upgrade Activities section.
+6. Make sure 'enable_installer' is set to false again.
+7. See Post-Upgrade Activities section.
Post-Upgrade Activities
diff --git a/bin/cleandb.sh b/bin/cleandb.sh
index ecf258320..ea905c873 100755
--- a/bin/cleandb.sh
+++ b/bin/cleandb.sh
@@ -34,8 +34,9 @@ $RCMAIL = rcmail::get_instance();
$db = $RCMAIL->get_dbh();
$db->db_connect('w');
-if (!$db->is_connected() || $db->is_error())
- die("No DB connection\n");
+if (!$db->is_connected() || $db->is_error()) {
+ rcube::raise_error("No DB connection", false, true);
+}
if (!empty($_SERVER['argv'][1]))
$days = intval($_SERVER['argv'][1]);
diff --git a/bin/decrypt.sh b/bin/decrypt.sh
index 95fdefc42..ff7c43038 100755
--- a/bin/decrypt.sh
+++ b/bin/decrypt.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-/*-
+/**
* If http_received_header_encrypt is configured, the IP address and the
* host name of the added Received: header is encrypted with 3DES, to
* protect information that some could consider sensitve, yet their
@@ -28,8 +28,8 @@
* Such an encrypted Received: header might look like:
*
* Received: from DzgkvJBO5+bw+oje5JACeNIa/uSI4mRw2cy5YoPBba73eyBmjtyHnQ==
- * [my0nUbjZXKtl7KVBZcsvWOxxtyVFxza4]
- * with HTTP/1.1 (POST); Thu, 14 May 2009 19:17:28 +0200
+ * [my0nUbjZXKtl7KVBZcsvWOxxtyVFxza4]
+ * with HTTP/1.1 (POST); Thu, 14 May 2009 19:17:28 +0200
*
* In this example, the two encrypted components are the sender host name
* (DzgkvJBO5+bw+oje5JACeNIa/uSI4mRw2cy5YoPBba73eyBmjtyHnQ==) and the IP
@@ -48,7 +48,7 @@
*
* If (most likely binary) junk is shown, then
* - either the encryption password has, between the time the mail was sent
- * and `now', changed, or
+ * and 'now', changed, or
* - you are dealing with counterfeit header data.
*/
diff --git a/bin/gc.sh b/bin/gc.sh
new file mode 100755
index 000000000..1ee610741
--- /dev/null
+++ b/bin/gc.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env php
+<?php
+/*
+ +-----------------------------------------------------------------------+
+ | bin/gc.sh |
+ | |
+ | This file is part of the Roundcube Webmail client |
+ | 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. |
+ | |
+ | PURPOSE: |
+ | Trigger garbage collecting routines manually (e.g. via cronjob) |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Thomas Bruederli <roundcube@gmail.com> |
+ +-----------------------------------------------------------------------+
+*/
+
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+
+require INSTALL_PATH.'program/include/clisetup.php';
+
+$rcmail = rcube::get_instance();
+$rcmail->gc();
diff --git a/bin/indexcontacts.sh b/bin/indexcontacts.sh
index a9a5a952a..c85a535a7 100755
--- a/bin/indexcontacts.sh
+++ b/bin/indexcontacts.sh
@@ -30,17 +30,18 @@ $RCMAIL = rcmail::get_instance();
$db = $RCMAIL->get_dbh();
$db->db_connect('w');
-if (!$db->is_connected() || $db->is_error())
- die("No DB connection\n");
+if (!$db->is_connected() || $db->is_error()) {
+ rcube::raise_error("No DB connection", false, true);
+}
// iterate over all users
-$sql_result = $db->query("SELECT user_id FROM " . $RCMAIL->config->get('db_table_users', 'users')." WHERE 1=1");
+$sql_result = $db->query("SELECT user_id FROM " . $db->table_name('users') . " ORDER BY user_id");
while ($sql_result && ($sql_arr = $db->fetch_assoc($sql_result))) {
echo "Indexing contacts for user " . $sql_arr['user_id'] . "...";
-
+
$contacts = new rcube_contacts($db, $sql_arr['user_id']);
$contacts->set_pagesize(9999);
-
+
$result = $contacts->list_records();
while ($result->count && ($row = $result->next())) {
unset($row['words']);
diff --git a/bin/installto.sh b/bin/installto.sh
index e6cf79d7d..269a5dc06 100755
--- a/bin/installto.sh
+++ b/bin/installto.sh
@@ -26,17 +26,17 @@ require_once INSTALL_PATH . 'program/include/clisetup.php';
$target_dir = unslashify($_SERVER['argv'][1]);
if (empty($target_dir) || !is_dir(realpath($target_dir)))
- die("Invalid target: not a directory\nUsage: installto.sh <TARGET>\n");
+ rcube::raise_error("Invalid target: not a directory\nUsage: installto.sh <TARGET>", false, true);
// read version from iniset.php
$iniset = @file_get_contents($target_dir . '/program/include/iniset.php');
if (!preg_match('/define\(.RCMAIL_VERSION.,\s*.([0-9.]+[a-z-]*)/', $iniset, $m))
- die("No valid Roundcube installation found at $target_dir\n");
+ rcube::raise_error("No valid Roundcube installation found at $target_dir", false, true);
$oldversion = $m[1];
if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '>='))
- die("Installation at target location is up-to-date!\n");
+ rcube::raise_error("Installation at target location is up-to-date!", false, true);
echo "Upgrading from $oldversion. Do you want to continue? (y/N)\n";
$input = trim(fgets(STDIN));
@@ -50,7 +50,7 @@ if (strtolower($input) == 'y') {
break;
}
}
- foreach (array('index.php','.htaccess','config/main.inc.php.dist','config/db.inc.php.dist','CHANGELOG','README.md','UPGRADING','LICENSE') as $file) {
+ foreach (array('index.php','.htaccess','config/defaults.inc.php','CHANGELOG','README.md','UPGRADING','LICENSE') as $file) {
if (!system("rsync -av " . INSTALL_PATH . "$file $target_dir/$file")) {
$err = true;
break;
diff --git a/bin/moduserprefs.sh b/bin/moduserprefs.sh
index b8ba98578..9bbc885a6 100755
--- a/bin/moduserprefs.sh
+++ b/bin/moduserprefs.sh
@@ -2,7 +2,7 @@
<?php
/*
+-----------------------------------------------------------------------+
- | bin/moduserprefs.sh |
+ | bin/moduserprefs.sh |
| |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2012, The Roundcube Dev Team |
@@ -61,7 +61,7 @@ if ($args['user'])
$query = 'user_id=' . intval($args['user']);
// iterate over all users
-$sql_result = $db->query("SELECT * FROM " . $rcmail->config->get('db_table_users', 'users')." WHERE $query");
+$sql_result = $db->query("SELECT * FROM " . $db->table_name('users') . " WHERE $query");
while ($sql_result && ($sql_arr = $db->fetch_assoc($sql_result))) {
echo "Updating prefs for user " . $sql_arr['user_id'] . "...";
diff --git a/bin/msgimport.sh b/bin/msgimport.sh
index 41bcd7e53..1fcc34680 100755
--- a/bin/msgimport.sh
+++ b/bin/msgimport.sh
@@ -33,8 +33,7 @@ else if (!($args['host'] && $args['file']))
}
else if (!is_file($args['file']))
{
- print "Cannot read message file\n";
- exit;
+ rcube::raise_error("Cannot read message file.", false, true);
}
// prompt for username if not set
@@ -87,7 +86,7 @@ if ($IMAP->connect($host, $args['user'], $args['pass'], $imap_port, $imap_ssl))
if ($IMAP->save_message($args['mbox'], rtrim($message)))
$count++;
else
- die("Failed to save message to {$args['mbox']}\n");
+ rcube::raise_error("Failed to save message to {$args['mbox']}", false, true);
$message = '';
}
continue;
@@ -108,7 +107,7 @@ if ($IMAP->connect($host, $args['user'], $args['pass'], $imap_port, $imap_ssl))
}
else
{
- print "IMAP login failed.\n";
+ rcube::raise_error("IMAP login failed.", false, true);
}
?>
diff --git a/bin/update.sh b/bin/update.sh
index 05956b933..71e2c630a 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -5,7 +5,7 @@
| bin/update.sh |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2010-2011, The Roundcube Dev Team |
+ | Copyright (C) 2010-2013, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -25,7 +25,7 @@ require_once INSTALL_PATH . 'program/include/clisetup.php';
require_once INSTALL_PATH . 'installer/rcube_install.php';
// get arguments
-$opts = rcube_utils::get_opt(array('v' => 'version'));
+$opts = rcube_utils::get_opt(array('v' => 'version', 'y' => 'accept'));
// ask user if no version is specified
if (!$opts['version']) {
@@ -36,32 +36,16 @@ if (!$opts['version']) {
$opts['version'] = RCMAIL_VERSION;
}
-if ($opts['version'] && version_compare(version_parse($opts['version']), version_parse(RCMAIL_VERSION), '>='))
- die("Nothing to be done here. Bye!\n");
-
-
$RCI = rcube_install::get_instance();
$RCI->load_config();
if ($RCI->configured) {
$success = true;
-
- if ($messages = $RCI->check_config()) {
+
+ if (($messages = $RCI->check_config()) || $RCI->legacy_config) {
$success = false;
$err = 0;
- // list missing config options
- if (is_array($messages['missing'])) {
- echo "WARNING: Missing config options:\n";
- echo "(These config options should be present in the current configuration)\n";
-
- foreach ($messages['missing'] as $msg) {
- echo "- '" . $msg['prop'] . ($msg['name'] ? "': " . $msg['name'] : "'") . "\n";
- $err++;
- }
- echo "\n";
- }
-
// list old/replaced config options
if (is_array($messages['replaced'])) {
echo "WARNING: Replaced config options:\n";
@@ -86,31 +70,42 @@ if ($RCI->configured) {
echo "\n";
}
+ if (!$err && $RCI->legacy_config) {
+ echo "WARNING: Your configuration needs to be migrated!\n";
+ echo "We changed the configuration files structure and your two config files main.inc.php and db.inc.php have to be merged into one single file.\n";
+ $err++;
+ }
+
// ask user to update config files
if ($err) {
- echo "Do you want me to fix your local configuration? (y/N)\n";
- $input = trim(fgets(STDIN));
+ if (!$opts['accept']) {
+ echo "Do you want me to fix your local configuration? (y/N)\n";
+ $input = trim(fgets(STDIN));
+ }
// positive: let's merge the local config with the defaults
- if (strtolower($input) == 'y') {
- $copy1 = $copy2 = $write1 = $write2 = false;
-
+ if ($opts['accept'] || strtolower($input) == 'y') {
+ $error = $written = false;
+
// backup current config
- echo ". backing up the current config files...\n";
- $copy1 = copy(RCMAIL_CONFIG_DIR . '/main.inc.php', RCMAIL_CONFIG_DIR . '/main.old.php');
- $copy2 = copy(RCMAIL_CONFIG_DIR . '/db.inc.php', RCMAIL_CONFIG_DIR . '/db.old.php');
-
- if ($copy1 && $copy2) {
+ echo ". backing up the current config file(s)...\n";
+
+ foreach (array('config', 'main', 'db') as $file) {
+ if (file_exists(RCMAIL_CONFIG_DIR . '/' . $file . '.inc.php')) {
+ if (!copy(RCMAIL_CONFIG_DIR . '/' . $file . '.inc.php', RCMAIL_CONFIG_DIR . '/' . $file . '.old.php')) {
+ $error = true;
+ }
+ }
+ }
+
+ if (!$error) {
$RCI->merge_config();
-
- echo ". writing " . RCMAIL_CONFIG_DIR . "/main.inc.php...\n";
- $write1 = file_put_contents(RCMAIL_CONFIG_DIR . '/main.inc.php', $RCI->create_config('main', true));
- echo ". writing " . RCMAIL_CONFIG_DIR . "/main.db.php...\n";
- $write2 = file_put_contents(RCMAIL_CONFIG_DIR . '/db.inc.php', $RCI->create_config('db', true));
+ echo ". writing " . RCMAIL_CONFIG_DIR . "/config.inc.php...\n";
+ $written = file_put_contents(RCMAIL_CONFIG_DIR . '/config.inc.php', $RCI->create_config());
}
-
+
// Success!
- if ($write1 && $write2) {
+ if ($written) {
echo "Done.\n";
echo "Your configuration files are now up-to-date!\n";
@@ -119,9 +114,15 @@ if ($RCI->configured) {
foreach ($messages['missing'] as $msg)
echo "- '" . $msg['prop'] . ($msg['name'] ? "': " . $msg['name'] : "'") . "\n";
}
+
+ if ($RCI->legacy_config) {
+ foreach (array('main', 'db') as $file) {
+ @unlink(RCMAIL_CONFIG_DIR . '/' . $file . '.inc.php');
+ }
+ }
}
else {
- echo "Failed to write config files!\n";
+ echo "Failed to write config file(s)!\n";
echo "Grant write privileges to the current user or update the files manually according to the above messages.\n";
}
}
@@ -143,6 +144,16 @@ if ($RCI->configured) {
}
}
+ // check file type detection
+ if ($RCI->check_mime_detection()) {
+ echo "WARNING: File type detection doesn't work properly!\n";
+ echo "Please check the 'mime_magic' config option or the finfo functions of PHP andrun this script again.\n";
+ }
+ if ($RCI->check_mime_extensions()) {
+ echo "WARNING: Mimetype to file extension mapping doesn't work properly!\n";
+ echo "Please check the 'mime_types' config option and run this script again.\n";
+ }
+
// check database schema
if ($RCI->config['db_dsnw']) {
echo "Executing database schema update.\n";
@@ -153,7 +164,7 @@ if ($RCI->configured) {
}
// index contacts for fulltext searching
- if (version_compare(version_parse($opts['version']), '0.6.0', '<')) {
+ if ($opts['version'] && version_compare(version_parse($opts['version']), '0.6.0', '<')) {
system(INSTALL_PATH . 'bin/indexcontacts.sh');
}
diff --git a/bin/updatecss.sh b/bin/updatecss.sh
new file mode 100755
index 000000000..53d237c77
--- /dev/null
+++ b/bin/updatecss.sh
@@ -0,0 +1,122 @@
+#!/usr/bin/env php
+<?php
+/*
+ +-----------------------------------------------------------------------+
+ | bin/updatecss.sh |
+ | |
+ | This file is part of the Roundcube Webmail client |
+ | Copyright (C) 2010-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ | PURPOSE: |
+ | Update cache-baster marks for css background images |
+ +-----------------------------------------------------------------------+
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ +-----------------------------------------------------------------------+
+*/
+
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+
+require_once INSTALL_PATH . 'program/include/clisetup.php';
+
+// get arguments
+$opts = rcube_utils::get_opt(array(
+ 'd' => 'dir',
+));
+
+if (empty($opts['dir'])) {
+ print "Skin directory not specified (--dir). Using skins/ and plugins/*/skins/.\n";
+
+ $dir = INSTALL_PATH . 'skins';
+ $dir_p = INSTALL_PATH . 'plugins';
+ $skins = glob("$dir/*", GLOB_ONLYDIR);
+ $skins_p = glob("$dir_p/*/skins/*", GLOB_ONLYDIR);
+
+ $dirs = array_merge($skins, $skins_p);
+}
+// Check if directory exists
+else if (!file_exists($opts['dir'])) {
+ rcube::raise_error("Specified directory doesn't exist.", false, true);
+}
+else {
+ $dirs = array($opts['dir']);
+}
+
+foreach ($dirs as $dir) {
+ $img_dir = $dir . '/images';
+ if (!file_exists($img_dir)) {
+ continue;
+ }
+
+ $files = get_files($dir);
+ $images = get_images($img_dir);
+ $find = array();
+ $replace = array();
+
+ // build regexps array
+ foreach ($images as $path => $sum) {
+ $path_ex = str_replace('.', '\\.', $path);
+ $find[] = "#url\(['\"]?images/$path_ex(\?v=[a-f0-9-\.]+)?['\"]?\)#";
+ $replace[] = "url(images/$path?v=$sum)";
+ }
+
+ foreach ($files as $file) {
+ $file = $dir . '/' . $file;
+ print "File: $file\n";
+ $content = file_get_contents($file);
+ $content = preg_replace($find, $replace, $content, -1, $count);
+ if ($count) {
+ file_put_contents($file, $content);
+ }
+ }
+}
+
+
+function get_images($dir)
+{
+ $images = array();
+ $dh = opendir($dir);
+
+ while ($file = readdir($dh)) {
+ if (preg_match('/^(.+)\.(gif|ico|png|jpg|jpeg)$/', $file, $m)) {
+ $filepath = "$dir/$file";
+ $images[$file] = substr(md5_file($filepath), 0, 4) . '.' . filesize($filepath);
+ print "Image: $filepath ({$images[$file]})\n";
+ }
+ else if ($file != '.' && $file != '..' && is_dir($dir . '/' . $file)) {
+ foreach (get_images($dir . '/' . $file) as $img => $sum) {
+ $images[$file . '/' . $img] = $sum;
+ }
+ }
+ }
+
+ closedir($dh);
+
+ return $images;
+}
+
+function get_files($dir)
+{
+ $files = array();
+ $dh = opendir($dir);
+
+ while ($file = readdir($dh)) {
+ if (preg_match('/^(.+)\.(css|html)$/', $file, $m)) {
+ $files[] = $file;
+ }
+ else if ($file != '.' && $file != '..' && is_dir($dir . '/' . $file)) {
+ foreach (get_files($dir . '/' . $file) as $f) {
+ $files[] = $file . '/' . $f;
+ }
+ }
+ }
+
+ closedir($dh);
+
+ return $files;
+}
+
+?>
diff --git a/bin/updatedb.sh b/bin/updatedb.sh
index 1c7e1c7a1..b4ed8b7ba 100755
--- a/bin/updatedb.sh
+++ b/bin/updatedb.sh
@@ -31,18 +31,15 @@ $opts = rcube_utils::get_opt(array(
));
if (empty($opts['dir'])) {
- echo "ERROR: Database schema directory not specified (--dir).\n";
- exit(1);
+ rcube::raise_error("Database schema directory not specified (--dir).", false, true);
}
if (empty($opts['package'])) {
- echo "ERROR: Database schema package name not specified (--package).\n";
- exit(1);
+ rcube::raise_error("Database schema package name not specified (--package).", false, true);
}
// Check if directory exists
if (!file_exists($opts['dir'])) {
- echo "ERROR: Specified database schema directory doesn't exist.\n";
- exit(1);
+ rcube::raise_error("Specified database schema directory doesn't exist.", false, true);
}
$RC = rcube::get_instance();
@@ -51,8 +48,7 @@ $DB = rcube_db::factory($RC->config->get('db_dsnw'));
// Connect to database
$DB->db_connect('w');
if (!$DB->is_connected()) {
- echo "Error connecting to database: " . $DB->is_error() . ".\n";
- exit(1);
+ rcube::raise_error("Error connecting to database: " . $DB->is_error(), false, true);
}
// Read DB schema version from database (if 'system' table exists)
@@ -90,6 +86,7 @@ if (!$version && $opts['version']) {
'0.7.1' => 2011111600,
'0.7.2' => 2011111600,
'0.7.3' => 2011111600,
+ '0.7.4' => 2011111600,
'0.8-beta' => 2011121400,
'0.8-rc' => 2011121400,
'0.8.0' => 2011121400,
@@ -97,6 +94,8 @@ if (!$version && $opts['version']) {
'0.8.2' => 2011121400,
'0.8.3' => 2011121400,
'0.8.4' => 2011121400,
+ '0.8.5' => 2011121400,
+ '0.8.6' => 2011121400,
'0.9-beta' => 2012080700,
);
@@ -110,8 +109,7 @@ if (empty($version)) {
$dir = $opts['dir'] . DIRECTORY_SEPARATOR . $DB->db_provider;
if (!file_exists($dir)) {
- echo "DDL Upgrade files for " . $DB->db_provider . " driver not found.\n";
- exit(1);
+ rcube::raise_error("DDL Upgrade files for " . $DB->db_provider . " driver not found.", false, true);
}
$dh = opendir($dir);
@@ -129,13 +127,12 @@ foreach ($result as $v) {
$error = update_db_schema($opts['package'], $v, $dir . DIRECTORY_SEPARATOR . "$v.sql");
if ($error) {
- echo "\nError in DDL upgrade $v: $error\n";
- exit(1);
+ echo "[FAILED]\n";
+ rcube::raise_error("Error in DDL upgrade $v: $error", false, true);
}
echo "[OK]\n";
}
-exit(0);
function update_db_schema($package, $version, $file)
{
@@ -183,15 +180,48 @@ function update_db_schema($package, $version, $file)
function fix_table_names($sql)
{
- global $DB;
+ global $DB, $RC, $dir;
+ static $tables;
+ static $sequences;
+
+ $prefix = $RC->config->get('db_prefix');
+ $engine = $DB->db_provider;
+
+ if (empty($prefix)) {
+ return $sql;
+ }
+
+ if ($tables === null) {
+ $tables = array();
+ $sequences = array();
+
+ // read complete schema (initial) file
+ $filename = "$dir/../$engine.initial.sql";
+ $schema = @file_get_contents($filename);
- foreach (array('users','identities','contacts','contactgroups','contactgroupmembers','session','cache','cache_index','cache_index','cache_messages','dictionary','searches','system') as $table) {
- $real_table = $DB->table_name($table);
- if ($real_table != $table) {
- $sql = preg_replace("/([^a-z0-9_])$table([^a-z0-9_])/i", "\\1$real_table\\2", $sql);
+ // find table names
+ if (preg_match_all('/CREATE TABLE (\[dbo\]\.|IF NOT EXISTS )?[`"\[\]]*([^`"\[\] \r\n]+)/i', $schema, $matches)) {
+ foreach ($matches[2] as $table) {
+ $tables[$table] = $prefix . $table;
+ }
+ }
+ // find sequence names
+ if ($engine == 'postgres' && preg_match_all('/CREATE SEQUENCE (IF NOT EXISTS )?"?([^" \n\r]+)/i', $schema, $matches)) {
+ foreach ($matches[2] as $sequence) {
+ $sequences[$sequence] = $prefix . $sequence;
+ }
}
}
+ // replace table names
+ foreach ($tables as $table => $real_table) {
+ $sql = preg_replace("/([^a-zA-Z0-9_])$table([^a-zA-Z0-9_])/", "\\1$real_table\\2", $sql);
+ }
+ // replace sequence names
+ foreach ($sequences as $sequence => $real_sequence) {
+ $sql = preg_replace("/([^a-zA-Z0-9_])$sequence([^a-zA-Z0-9_])/", "\\1$real_sequence\\2", $sql);
+ }
+
return $sql;
}
diff --git a/composer.json-dist b/composer.json-dist
index 846f742eb..e7462038d 100644
--- a/composer.json-dist
+++ b/composer.json-dist
@@ -1,35 +1,16 @@
{
"name": "roundcube/roundcubemail",
"description": "The Roundcube Webmail suite",
- "license": "GPL-3.0",
+ "license": "GPL-3.0+",
"repositories": [
{
"type": "composer",
"url": "http://plugins.roundcube.net/"
- },
- {
- "type": "pear",
- "url": "http://pear.php.net/"
- },
- {
- "type": "package",
- "package": {
- "name": "Net_SMTP",
- "version": "dev-master",
- "source": {
- "url": "http://github.com/pear/Net_SMTP",
- "type": "git",
- "reference": "master"
- }
- }
}
],
"require": {
- "pear-pear/Mail_Mime": ">=1.8.1",
- "pear-pear/Mail_mimeDecode": ">=1.5.5",
- "Net_SMTP": "dev-master",
- "pear-pear/Net_IDNA2": ">=0.1.1",
- "pear-pear/Auth_SASL": ">=1.0.6"
+ "php": ">=5.3.0",
+ "roundcube/plugin-installer": ">=0.1.3"
},
"minimum-stability": "dev"
}
diff --git a/config/config.inc.php.sample b/config/config.inc.php.sample
new file mode 100644
index 000000000..9a42ba9f5
--- /dev/null
+++ b/config/config.inc.php.sample
@@ -0,0 +1,85 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | Local configuration for the Roundcube Webmail installation. |
+ | |
+ | This is a sample configuration file only containing the minumum |
+ | setup required for a functional installation. Copy more options |
+ | from defaults.inc.php to this file to override the defaults. |
+ | |
+ | This file is part of the Roundcube Webmail client |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ +-----------------------------------------------------------------------+
+*/
+
+$config = array();
+
+// Database connection string (DSN) for read+write operations
+// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
+// Currently supported db_providers: mysql, pgsql, sqlite, mssql or sqlsrv
+// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
+// NOTE: for SQLite use absolute path: 'sqlite:////full/path/to/sqlite.db?mode=0646'
+$config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
+
+// 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
+$config['default_host'] = 'localhost';
+
+// 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
+$config['smtp_server'] = '';
+
+// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
+// deprecated SSL over SMTP (aka SMTPS))
+$config['smtp_port'] = 25;
+
+// SMTP username (if required) if you use %u as the username Roundcube
+// will use the current username for login
+$config['smtp_user'] = '';
+
+// SMTP password (if required) if you use %p as the password Roundcube
+// will use the current user's password for login
+$config['smtp_pass'] = '';
+
+// 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'] = '';
+
+// Name your service. This is displayed on the login screen and in the window title
+$config['product_name'] = 'Roundcube Webmail';
+
+// 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.
+// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
+$config['des_key'] = 'rcmail-!24ByteDESkey*Str';
+
+// List of active plugins (in plugins/ directory)
+$config['plugins'] = array(
+ 'archive',
+ 'zipdownload',
+);
+
+// skin name: folder from skins/
+$config['skin'] = 'larry';
diff --git a/config/db.inc.php.dist b/config/db.inc.php.dist
deleted file mode 100644
index 9bbf7d75b..000000000
--- a/config/db.inc.php.dist
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | Configuration file for database access |
- | |
- | This file is part of the Roundcube Webmail client |
- | Copyright (C) 2005-2012, The Roundcube Dev Team |
- | |
- | Licensed under the GNU General Public License version 3 or |
- | any later version with exceptions for skins & plugins. |
- | See the README file for a full license statement. |
- | |
- +-----------------------------------------------------------------------+
-
-*/
-
-$rcmail_config = array();
-
-// PEAR database DSN for read/write operations
-// format is db_provider://user:password@host/database
-// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
-// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql or sqlsrv
-
-$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
-// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
-// Warning: for SQLite use absolute path in DSN:
-// sqlite example: 'sqlite:////full/path/to/sqlite.db?mode=0646';
-
-// PEAR database DSN for read only operations (if empty write database will be used)
-// useful for database replication
-$rcmail_config['db_dsnr'] = '';
-
-// use persistent db-connections
-// beware this will not "always" work as expected
-// see: http://www.php.net/manual/en/features.persistent-connections.php
-$rcmail_config['db_persistent'] = FALSE;
-
-// you can define specific table names used to store webmail data
-$rcmail_config['db_table_users'] = 'users';
-$rcmail_config['db_table_identities'] = 'identities';
-$rcmail_config['db_table_contacts'] = 'contacts';
-$rcmail_config['db_table_contactgroups'] = 'contactgroups';
-$rcmail_config['db_table_contactgroupmembers'] = 'contactgroupmembers';
-$rcmail_config['db_table_session'] = 'session';
-$rcmail_config['db_table_cache'] = 'cache';
-$rcmail_config['db_table_cache_index'] = 'cache_index';
-$rcmail_config['db_table_cache_thread'] = 'cache_thread';
-$rcmail_config['db_table_cache_messages'] = 'cache_messages';
-$rcmail_config['db_table_dictionary'] = 'dictionary';
-$rcmail_config['db_table_searches'] = 'searches';
-$rcmail_config['db_table_system'] = 'system';
-
-// you can define specific sequence names used in PostgreSQL
-$rcmail_config['db_sequence_users'] = 'user_ids';
-$rcmail_config['db_sequence_identities'] = 'identity_ids';
-$rcmail_config['db_sequence_contacts'] = 'contact_ids';
-$rcmail_config['db_sequence_contactgroups'] = 'contactgroups_ids';
-$rcmail_config['db_sequence_searches'] = 'search_ids';
-
-
-// end db config file
diff --git a/config/main.inc.php.dist b/config/defaults.inc.php
index b113b41a8..32dba4918 100644
--- a/config/main.inc.php.dist
+++ b/config/defaults.inc.php
@@ -2,62 +2,84 @@
/*
+-----------------------------------------------------------------------+
- | Main configuration file |
+ | Main configuration file with default settings |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2005-2011, The Roundcube Dev Team |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
| See the README file for a full license statement. |
- | |
+-----------------------------------------------------------------------+
-
*/
-$rcmail_config = array();
+$config = array();
+
+// ----------------------------------
+// SQL DATABASE
+// ----------------------------------
+
+// Database connection string (DSN) for read+write operations
+// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
+// Currently supported db_providers: mysql, pgsql, sqlite, mssql or sqlsrv
+// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
+// NOTE: for SQLite use absolute path: 'sqlite:////full/path/to/sqlite.db?mode=0646'
+$config['db_dsnw'] = 'mysql://roundcube:@localhost/roundcubemail';
+
+// Database DSN for read-only operations (if empty write database will be used)
+// useful for database replication
+$config['db_dsnr'] = '';
+
+// use persistent db-connections
+// beware this will not "always" work as expected
+// see: http://www.php.net/manual/en/features.persistent-connections.php
+$config['db_persistent'] = false;
+
+// you can define specific table (and sequence) names prefix
+$config['db_prefix'] = '';
+
// ----------------------------------
// LOGGING/DEBUGGING
// ----------------------------------
// system error reporting, sum of: 1 = log; 4 = show, 8 = trace
-$rcmail_config['debug_level'] = 1;
+$config['debug_level'] = 1;
// log driver: 'syslog' or 'file'.
-$rcmail_config['log_driver'] = 'file';
+$config['log_driver'] = 'file';
// date format for log entries
// (read http://php.net/manual/en/function.date.php for all format characters)
-$rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';
+$config['log_date_format'] = 'd-M-Y H:i:s O';
// Syslog ident string to use, if using the 'syslog' log driver.
-$rcmail_config['syslog_id'] = 'roundcube';
+$config['syslog_id'] = 'roundcube';
// Syslog facility to use, if using the 'syslog' log driver.
// For possible values see installer or http://php.net/manual/en/function.openlog.php
-$rcmail_config['syslog_facility'] = LOG_USER;
+$config['syslog_facility'] = LOG_USER;
// Log sent messages to <log_dir>/sendmail or to syslog
-$rcmail_config['smtp_log'] = true;
+$config['smtp_log'] = true;
// Log successful logins to <log_dir>/userlogins or to syslog
-$rcmail_config['log_logins'] = false;
+$config['log_logins'] = false;
// Log session authentication errors to <log_dir>/session or to syslog
-$rcmail_config['log_session'] = false;
+$config['log_session'] = false;
// Log SQL queries to <log_dir>/sql or to syslog
-$rcmail_config['sql_debug'] = false;
+$config['sql_debug'] = false;
// Log IMAP conversation to <log_dir>/imap or to syslog
-$rcmail_config['imap_debug'] = false;
+$config['imap_debug'] = false;
// Log LDAP conversation to <log_dir>/ldap or to syslog
-$rcmail_config['ldap_debug'] = false;
+$config['ldap_debug'] = false;
// Log SMTP conversation to <log_dir>/smtp or to syslog
-$rcmail_config['smtp_debug'] = false;
+$config['smtp_debug'] = false;
// ----------------------------------
// IMAP
@@ -75,18 +97,18 @@ $rcmail_config['smtp_debug'] = false;
// 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'] = '';
+$config['default_host'] = 'localhost';
// TCP port used for IMAP connections
-$rcmail_config['default_port'] = 143;
+$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;
+$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;
+$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
@@ -94,40 +116,53 @@ $rcmail_config['imap_delimiter'] = null;
// 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;
+$config['imap_ns_personal'] = null;
+$config['imap_ns_other'] = null;
+$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;
+$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;
+// Deprecated: Use imap_disabled_caps = array('LIST-EXTENDED')
+$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;
+$config['imap_force_ns'] = false;
+
+// List of disabled imap extensions.
+// Use if your IMAP server has broken implementation of some feature
+// and you can't remove it from CAPABILITY string on server-side.
+// For example UW-IMAP server has broken ESEARCH.
+// Note: Because the list is cached, re-login is required after change.
+$config['imap_disabled_caps'] = array();
// IMAP connection timeout, in seconds. Default: 0 (no limit)
-$rcmail_config['imap_timeout'] = 0;
+$config['imap_timeout'] = 0;
// Optional IMAP authentication identifier to be used as authorization proxy
-$rcmail_config['imap_auth_cid'] = null;
+$config['imap_auth_cid'] = null;
// Optional IMAP authentication password to be used for imap_auth_cid
-$rcmail_config['imap_auth_pw'] = null;
+$config['imap_auth_pw'] = null;
// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
-$rcmail_config['imap_cache'] = null;
+$config['imap_cache'] = null;
// Enables messages cache. Only 'db' cache is supported.
-$rcmail_config['messages_cache'] = false;
+$config['messages_cache'] = false;
+// Lifetime of IMAP indexes cache. Possible units: s, m, h, d, w
+$config['imap_cache_ttl'] = '10d';
+
+// Lifetime of messages cache. Possible units: s, m, h, d, w
+$config['messages_cache_ttl'] = '10d';
// ----------------------------------
// SMTP
@@ -143,38 +178,50 @@ $rcmail_config['messages_cache'] = false;
// %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'] = '';
+$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;
+$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'] = '';
+$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'] = '';
+$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'] = '';
+$config['smtp_auth_type'] = '';
// Optional SMTP authentication identifier to be used as authorization proxy
-$rcmail_config['smtp_auth_cid'] = null;
+$config['smtp_auth_cid'] = null;
// Optional SMTP authentication password to be used for smtp_auth_cid
-$rcmail_config['smtp_auth_pw'] = null;
+$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'] = '';
+// localhost if that isn't defined.
+$config['smtp_helo_host'] = '';
// SMTP connection timeout, in seconds. Default: 0 (no limit)
-$rcmail_config['smtp_timeout'] = 0;
+// Note: There's a known issue where using ssl connection with
+// timeout > 0 causes connection errors (https://bugs.php.net/bug.php?id=54511)
+$config['smtp_timeout'] = 0;
+
+// ----------------------------------
+// LDAP
+// ----------------------------------
+
+// Type of LDAP cache. Supported values: 'db', 'apc' and 'memcache'.
+$config['ldap_cache'] = 'db';
+
+// Lifetime of LDAP cache. Possible units: s, m, h, d, w
+$config['ldap_cache_ttl'] = '10m';
// ----------------------------------
// SYSTEM
@@ -182,101 +229,98 @@ $rcmail_config['smtp_timeout'] = 0;
// 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;
+$config['enable_installer'] = false;
// don't allow these settings to be overriden by the user
-$rcmail_config['dont_override'] = array();
+$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'] = '';
+$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;
+$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;
+$config['auto_create_user'] = true;
// Enables possibility to log in using email address from user identities
-$rcmail_config['user_aliases'] = false;
+$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/';
+$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';
+$config['temp_dir'] = 'temp/';
// 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;
+$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;
+$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;
+$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;
+$config['login_lc'] = 2;
// Includes should be interpreted as PHP files
-$rcmail_config['skin_include_php'] = false;
+$config['skin_include_php'] = false;
// display software version on login screen
-$rcmail_config['display_version'] = false;
+$config['display_version'] = false;
// Session lifetime in minutes
-$rcmail_config['session_lifetime'] = 10;
+$config['session_lifetime'] = 10;
// Session domain: .example.org
-$rcmail_config['session_domain'] = '';
+$config['session_domain'] = '';
// Session name. Default: 'roundcube_sessid'
-$rcmail_config['session_name'] = null;
+$config['session_name'] = null;
// Session path. Defaults to PHP session.cookie_path setting.
-$rcmail_config['session_path'] = null;
+$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'
+// Backend to use for session storage. Can either be 'db' (default), 'memcache' or 'php'
+// 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';
+// Setting this value to 'php' will use the default session save handler configured in PHP
+$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' );
+$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;
+$config['ip_check'] = false;
// check referer of incoming requests
-$rcmail_config['referer_check'] = false;
+$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';
+$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';
+$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
@@ -288,7 +332,7 @@ $rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str';
// %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'] = '';
+$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
@@ -298,64 +342,64 @@ $rcmail_config['username_domain'] = '';
// %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'] = '';
+$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';
+$config['password_charset'] = 'ISO-8859-1';
// How many seconds must pass between emails sent by a user
-$rcmail_config['sendmail_delay'] = 0;
+$config['sendmail_delay'] = 0;
// Maximum number of recipients per message. Default: 0 (no limit)
-$rcmail_config['max_recipients'] = 0;
+$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;
+$config['max_group_members'] = 0;
-// add this user-agent to message headers when sending
-$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
+// Name your service. This is displayed on the login screen and in the window title
+$config['product_name'] = 'Roundcube Webmail';
-// use this name to compose page titles
-$rcmail_config['product_name'] = 'Roundcube Webmail';
+// Add this user-agent to message headers when sending
+$config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
// try to load host-specific configuration
// see http://trac.roundcube.net/wiki/Howto_Config for more details
-$rcmail_config['include_host_config'] = false;
+$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'] = '';
+$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'] = '';
+$config['generic_message_footer_html'] = '';
// add a received header to outgoing mails containing the creators IP and hostname
-$rcmail_config['http_received_header'] = false;
+$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;
+$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;
+$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;
+$config['line_length'] = 72;
// send plaintext messages as format=flowed
-$rcmail_config['send_format_flowed'] = true;
+$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;
+$config['mdn_use_from'] = false;
// Set identities access level:
// 0 - many identities with possibility to edit all params
@@ -363,50 +407,50 @@ $rcmail_config['mdn_use_from'] = false;
// 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;
+$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
+$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;
+$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;
+$config['mime_types'] = null;
// path to imagemagick identify binary
-$rcmail_config['im_identify_path'] = null;
+$config['im_identify_path'] = null;
// path to imagemagick convert binary
-$rcmail_config['im_convert_path'] = null;
+$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;
+$config['image_thumbnail_size'] = 240;
// maximum size of uploaded contact photos in pixel
-$rcmail_config['contact_photo_size'] = 160;
+$config['contact_photo_size'] = 160;
// Enable DNS checking for e-mail address validation
-$rcmail_config['email_dns_check'] = false;
+$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;
+$config['no_save_sent_messages'] = false;
// ----------------------------------
// PLUGINS
// ----------------------------------
// List of active plugins (in plugins/ directory)
-$rcmail_config['plugins'] = array();
+$config['plugins'] = array();
// ----------------------------------
// USER INTERFACE
@@ -414,121 +458,125 @@ $rcmail_config['plugins'] = array();
// 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'] = '';
+$config['message_sort_col'] = '';
// default messages sort order
-$rcmail_config['message_sort_order'] = 'DESC';
+$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');
+$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;
+$config['language'] = null;
// use this format for date display (date or strftime format)
-$rcmail_config['date_format'] = 'Y-m-d';
+$config['date_format'] = 'Y-m-d';
// give this choice of date formats to the user to select from
-$rcmail_config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
+$config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/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';
+$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');
+$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';
+$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';
+$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';
+$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';
+$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';
+$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';
+$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');
+$config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
+
+// Disable localization of the default folder names listed above
+$config['show_real_foldernames'] = false;
// automatically create the above listed default folders on first login
-$rcmail_config['create_default_folders'] = false;
+$config['create_default_folders'] = false;
// protect the default folders from renames, deletes, and subscription changes
-$rcmail_config['protect_default_folders'] = true;
+$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;
+$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;
+$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;
+$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'] = 'googie';
+// 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.
+$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
-$rcmail_config['spellcheck_uri'] = '';
+$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;
+$config['spellcheck_languages'] = NULL;
// Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
-$rcmail_config['spellcheck_ignore_caps'] = false;
+$config['spellcheck_ignore_caps'] = false;
// Makes that words with numbers will be ignored (e.g. g00gle)
-$rcmail_config['spellcheck_ignore_nums'] = false;
+$config['spellcheck_ignore_nums'] = false;
// Makes that words with symbols will be ignored (e.g. g@@gle)
-$rcmail_config['spellcheck_ignore_syms'] = false;
+$config['spellcheck_ignore_syms'] = false;
// Use this char/string to separate recipients when composing a new message
-$rcmail_config['recipients_separator'] = ',';
+$config['recipients_separator'] = ',';
// don't let users set pagesize to more than this value if set
-$rcmail_config['max_pagesize'] = 200;
+$config['max_pagesize'] = 200;
// Minimal value of user's 'refresh_interval' setting (in seconds)
-$rcmail_config['min_refresh_interval'] = 60;
+$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;
+$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;
+$config['undo_timeout'] = 0;
// ----------------------------------
// ADDRESSBOOK SETTINGS
@@ -541,12 +589,12 @@ $rcmail_config['undo_timeout'] = 0;
// 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';
+$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();
+$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.
@@ -564,7 +612,7 @@ $rcmail_config['ldap_public'] = array();
/*
* example config for Verisign directory
*
-$rcmail_config['ldap_public']['Verisign'] = array(
+$config['ldap_public']['Verisign'] = array(
'name' => 'Verisign.com',
// Replacement variables supported in host names:
// %h - user's IMAP hostname
@@ -575,7 +623,7 @@ $rcmail_config['ldap_public']['Verisign'] = array(
// For example %n = mail.domain.tld, %t = domain.tld
'hosts' => array('directory.verisign.com'),
'port' => 389,
- 'use_tls' => false,
+ '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.
@@ -636,6 +684,7 @@ $rcmail_config['ldap_public']['Verisign'] = array(
'phone:work' => 'telephoneNumber',
'phone:mobile' => 'mobile',
'phone:pager' => 'pager',
+ 'phone:workfax' => 'facsimileTelephoneNumber',
'street' => 'street',
'zipcode' => 'postalCode',
'region' => 'st',
@@ -646,9 +695,8 @@ $rcmail_config['ldap_public']['Verisign'] = array(
'department' => 'ou',
'jobtitle' => 'title',
'notes' => 'description',
+ 'photo' => 'jpegPhoto',
// these currently don't work:
- // 'phone:workfax' => 'facsimileTelephoneNumber',
- // 'photo' => 'jpegPhoto',
// 'manager' => 'manager',
// 'assistant' => 'secretary',
),
@@ -659,238 +707,263 @@ $rcmail_config['ldap_public']['Verisign'] = 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
+ '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)
+ 'vlv_search' => false, // Use Virtual List View functions for autocompletion searches (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
+ 'config_root_dn' => 'cn=config', // Root DN to search config entries (e.g. vlv indexes)
+ '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' => 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)',
+ '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_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
+ ),
+ // 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.
+ // if the 'groups' option from above is set, it'll be shown as the first entry with the name 'Groups'
+ 'group_filters' => array(
+ 'departments' => array(
+ 'name' => 'Company Departments',
+ 'scope' => 'list',
+ 'base_dn' => 'ou=Groups,dc=mydomain,dc=com',
+ 'filter' => '(|(objectclass=groupofuniquenames)(objectclass=groupofurls))',
+ 'name_attr' => 'cn',
+ ),
+ 'customers' => array(
+ 'name' => 'Customers',
+ 'scope' => 'sub',
+ 'base_dn' => 'ou=Customers,dc=mydomain,dc=com',
+ 'filter' => '(objectClass=inetOrgPerson)',
+ 'name_attr' => 'sn',
+ ),
),
);
*/
// 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');
+$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;
+$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;
+$config['autocomplete_threads'] = 0;
// Max. numer of entries in autocomplete popup. Default: 15.
-$rcmail_config['autocomplete_max'] = 15;
+$config['autocomplete_max'] = 15;
// show address fields in this order
// available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
-$rcmail_config['address_template'] = '{street}<br/>{locality} {zipcode}<br/>{country} {region}';
+$config['address_template'] = '{street}<br/>{locality} {zipcode}<br/>{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;
+$config['addressbook_search_mode'] = 0;
// ----------------------------------
// USER PREFERENCES
// ----------------------------------
// Use this charset as fallback for message decoding
-$rcmail_config['default_charset'] = 'ISO-8859-1';
+$config['default_charset'] = 'ISO-8859-1';
// skin name: folder from skins/
-$rcmail_config['skin'] = 'larry';
+$config['skin'] = 'larry';
+
+// Enables using standard browser windows (that can be handled as tabs)
+// instead of popup windows
+$config['standard_windows'] = false;
// show up to X items in messages list view
-$rcmail_config['mail_pagesize'] = 50;
+$config['mail_pagesize'] = 50;
// show up to X items in contacts list view
-$rcmail_config['addressbook_pagesize'] = 50;
+$config['addressbook_pagesize'] = 50;
// sort contacts by this col (preferably either one of name, firstname, surname)
-$rcmail_config['addressbook_sort_col'] = 'surname';
+$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;
+$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';
+$config['timezone'] = 'auto';
// prefer displaying HTML messages
-$rcmail_config['prefer_html'] = true;
+$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;
+$config['show_images'] = 0;
// open messages in new window
-$rcmail_config['message_extwin'] = false;
+$config['message_extwin'] = false;
// open message compose form in new window
-$rcmail_config['compose_extwin'] = false;
+$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;
+$config['htmleditor'] = 0;
// show pretty dates as standard
-$rcmail_config['prettydate'] = true;
+$config['prettydate'] = true;
// save compose message every 300 seconds (5min)
-$rcmail_config['draft_autosave'] = 300;
+$config['draft_autosave'] = 300;
// default setting if preview pane is enabled
-$rcmail_config['preview_pane'] = false;
+$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;
+$config['preview_pane_mark_read'] = 0;
// Clear Trash on logout
-$rcmail_config['logout_purge'] = false;
+$config['logout_purge'] = false;
// Compact INBOX on logout
-$rcmail_config['logout_expunge'] = false;
+$config['logout_expunge'] = false;
// Display attached images below the message body
-$rcmail_config['inline_images'] = true;
+$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;
+$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;
+$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;
+$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;
+$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;
+$config['refresh_interval'] = 60;
// If true all folders will be checked for recent messages
-$rcmail_config['check_all_folders'] = false;
+$config['check_all_folders'] = false;
// If true, after message delete/move, the next message will be displayed
-$rcmail_config['display_next'] = true;
+$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;
+$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;
+$config['reply_mode'] = 0;
// When replying strip original signature from message
-$rcmail_config['strip_existing_sig'] = true;
+$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;
-
-// When replying or forwarding place sender's signature above existing message
-$rcmail_config['sig_above'] = false;
+$config['show_sig'] = 1;
// Use MIME encoding (quoted-printable) for 8bit characters in message body
-$rcmail_config['force_7bit'] = false;
+$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));
+// Please note that folder names should to be in sync with $config['default_folders']
+$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);
+$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;
+$config['delete_always'] = false;
// Directly delete messages in Junk instead of moving to Trash
-$rcmail_config['delete_junk'] = false;
+$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;
+$config['mdn_requests'] = 0;
// Return receipt checkbox default state
-$rcmail_config['mdn_default'] = 0;
+$config['mdn_default'] = 0;
// Delivery Status Notification checkbox default state
-$rcmail_config['dsn_default'] = 0;
+$config['dsn_default'] = 0;
// Place replies in the folder of the message being replied to
-$rcmail_config['reply_same_folder'] = false;
+$config['reply_same_folder'] = false;
// Sets default mode of Forward feature to "forward as attachment"
-$rcmail_config['forward_attachment'] = false;
+$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;
+$config['default_addressbook'] = null;
// Enables spell checking before sending a message.
-$rcmail_config['spellcheck_before_send'] = false;
+$config['spellcheck_before_send'] = false;
// Skip alternative email addresses in autocompletion (show one address per contact)
-$rcmail_config['autocomplete_single'] = false;
+$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'] = '';
+$config['default_font'] = 'Verdana';
-// end of config file
+// Enables display of email address with name instead of a name (and address in title)
+$config['message_show_email'] = false;
diff --git a/index.php b/index.php
index dc6827a87..2d220dede 100644
--- a/index.php
+++ b/index.php
@@ -39,7 +39,7 @@
require_once 'program/include/iniset.php';
// init application, start session, init output class, etc.
-$RCMAIL = rcmail::get_instance();
+$RCMAIL = rcmail::get_instance($GLOBALS['env']);
// Make the whole PHP output non-cacheable (#1487797)
$RCMAIL->output->nocacheing_headers();
@@ -161,7 +161,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
}
// end session (after optional referer check)
-else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcmail::check_referer())) {
+else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_utils::check_referer())) {
$userdata = array(
'user' => $_SESSION['username'],
'host' => $_SESSION['storage_host'],
@@ -236,7 +236,7 @@ else {
}
// check referer if configured
- if ($RCMAIL->config->get('referer_check') && !rcmail::check_referer()) {
+ if ($RCMAIL->config->get('referer_check') && !rcube_utils::check_referer()) {
raise_error(array(
'code' => 403, 'type' => 'php',
'message' => "Referer check failed"), true, true);
diff --git a/installer/check.php b/installer/check.php
index 14fc4f06e..ee0c9f367 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -42,12 +42,13 @@ $ini_checks = array(
'suhosin.session.encrypt' => 0,
'magic_quotes_runtime' => 0,
'magic_quotes_sybase' => 0,
- 'date.timezone' => '-NOTEMPTY-',
);
$optional_checks = array(
// required for utils/modcss.inc, should we require this?
'allow_url_fopen' => 1,
+ 'date.timezone' => '-VALID-',
+ 'register_globals' => 0, // #1489157
);
$source_urls = array(
@@ -64,12 +65,12 @@ $source_urls = array(
'Intl' => 'http://www.php.net/manual/en/book.intl.php',
'Exif' => 'http://www.php.net/manual/en/book.exif.php',
'PDO' => 'http://www.php.net/manual/en/book.pdo.php',
- 'pdo_mysql' => 'http://www.php.net/manual/en/book.pdo-mysql.php',
- 'pdo_pgsql' => 'http://www.php.net/manual/en/book.pdo-pgsql.php',
- 'pdo_sqlite' => 'http://www.php.net/manual/en/book.pdo-sqlite.php',
- 'pdo_sqlite2' => 'http://www.php.net/manual/en/book.pdo-sqlite.php',
- 'pdo_sqlsrv' => 'http://www.php.net/manual/en/book.pdo-sqlsrv.php',
- 'pdo_dblib' => 'http://www.php.net/manual/en/book.pdo-dblib.php',
+ 'pdo_mysql' => 'http://www.php.net/manual/en/ref.pdo-mysql.php',
+ 'pdo_pgsql' => 'http://www.php.net/manual/en/ref.pdo-pgsql.php',
+ 'pdo_sqlite' => 'http://www.php.net/manual/en/ref.pdo-sqlite.php',
+ 'pdo_sqlite2' => 'http://www.php.net/manual/en/ref.pdo-sqlite.php',
+ 'pdo_sqlsrv' => 'http://www.php.net/manual/en/ref.pdo-sqlsrv.php',
+ 'pdo_dblib' => 'http://www.php.net/manual/en/ref.pdo-dblib.php',
'PEAR' => 'http://pear.php.net',
'Net_SMTP' => 'http://pear.php.net/package/Net_SMTP',
'Mail_mime' => 'http://pear.php.net/package/Mail_mime',
@@ -139,10 +140,11 @@ foreach ($RCI->supported_dbs as $database => $ext) {
if (extension_loaded($ext)) {
// MySQL driver requires PHP >= 5.3 (#1488875)
if ($ext == 'pdo_mysql' && version_compare(PHP_VERSION, '5.3.0', '<')) {
- $RCI->fail($database, 'PHP >= 5.3 required');
+ $RCI->fail($database, 'PHP >= 5.3 required', null, true);
}
else {
$RCI->pass($database);
+ $found_db_driver = true;
}
}
else {
@@ -152,6 +154,9 @@ foreach ($RCI->supported_dbs as $database => $ext) {
}
echo '<br />';
}
+if (empty($found_db_driver)) {
+ $RCI->failures++;
+}
?>
@@ -185,23 +190,15 @@ foreach ($ini_checks as $var => $val) {
if ($val === '-NOTEMPTY-') {
if (empty($status)) {
$RCI->fail($var, "empty value detected");
- } else if ($var == 'date.timezone') {
- try {
- $tz = new DateTimeZone($status);
- $RCI->pass($var);
- }
- catch (Exception $e) {
- $RCI->fail($var, "invalid value detected: $status");
- }
- } else {
+ }
+ else {
$RCI->pass($var);
}
- echo '<br />';
- continue;
}
- if ($status == $val) {
+ else if (filter_var($status, FILTER_VALIDATE_BOOLEAN) == $val) {
$RCI->pass($var);
- } else {
+ }
+ else {
$RCI->fail($var, "is '$status', should be '$val'");
}
echo '<br />';
@@ -223,9 +220,24 @@ foreach ($optional_checks as $var => $val) {
echo '<br />';
continue;
}
- if ($status == $val) {
+ if ($val === '-VALID-') {
+ if ($var == 'date.timezone') {
+ try {
+ $tz = new DateTimeZone($status);
+ $RCI->pass($var);
+ }
+ catch (Exception $e) {
+ $RCI->optfail($var, empty($status) ? "not set" : "invalid value detected: $status");
+ }
+ }
+ else {
+ $RCI->pass($var);
+ }
+ }
+ else if (filter_var($status, FILTER_VALIDATE_BOOLEAN) == $val) {
$RCI->pass($var);
- } else {
+ }
+ else {
$RCI->optfail($var, "is '$status', could be '$val'");
}
echo '<br />';
diff --git a/installer/config.php b/installer/config.php
index d6846edc7..f990fc23f 100644
--- a/installer/config.php
+++ b/installer/config.php
@@ -9,13 +9,9 @@ if (!class_exists('rcube_install') || !is_object($RCI)) {
<input type="hidden" name="_step" value="2" />
<?php
-// also load the default config to fill in the fields
-$RCI->load_defaults();
-
// register these boolean fields
$RCI->bool_config_props = array(
'ip_check' => 1,
- 'enable_caching' => 1,
'enable_spellcheck' => 1,
'auto_create_user' => 1,
'smtp_log' => 1,
@@ -28,24 +24,24 @@ $RCI->bool_config_props = array(
$_SESSION['allowinstaller'] = true;
if (!empty($_POST['submit'])) {
-
- echo '<p class="notice">Copy or download the following configurations and save them in two files';
- echo ' (names above the text box) within the <tt>'.RCMAIL_CONFIG_DIR.'</tt> directory of your Roundcube installation.<br/>';
- echo ' Make sure that there are no characters outside the <tt>&lt;?php ?&gt;</tt> brackets when saving the files.</p>';
-
+ echo '<p class="notice">Copy or download the following configuration and save it';
+ echo ' as <tt><b>config.inc.php</b></tt> within the <tt>'.RCUBE_CONFIG_DIR.'</tt> directory of your Roundcube installation.<br/>';
+ echo ' Make sure that there are no characters outside the <tt>&lt;?php ?&gt;</tt> brackets when saving the file.';
+ echo '&nbsp;<input type="button" onclick="location.href=\'index.php?_getconfig=1\'" value="Download" />';
+ if ($RCI->legacy_config) {
+ echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt>';
+ echo ' from the config directory.';
+ }
+ echo '</p>';
+
$textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile"));
-
- echo '<div><em>main.inc.php (<a href="index.php?_getfile=main">download</a>)</em></div>';
- echo $textbox->show(($_SESSION['main.inc.php'] = $RCI->create_config('main')));
-
- echo '<div style="margin-top:1em"><em>db.inc.php (<a href="index.php?_getfile=db">download</a>)</em></div>';
- echo $textbox->show($_SESSION['db.inc.php'] = $RCI->create_config('db'));
+ echo $textbox->show(($_SESSION['config'] = $RCI->create_config()));
echo '<p class="hint">Of course there are more options to configure.
- Have a look at the config files or visit <a href="http://trac.roundcube.net/wiki/Howto_Config">Howto_Config</a> to find out.</p>';
+ Have a look at the defaults.inc.php file or visit <a href="http://trac.roundcube.net/wiki/Howto_Config">Howto_Config</a> to find out.</p>';
echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
-
+
// echo '<style type="text/css"> .configblock { display:none } </style>';
echo "\n<hr style='margin-bottom:1.6em' />\n";
}
@@ -127,16 +123,6 @@ echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1)
<p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changing IPs.</p>
</dd>
-<dt class="propname">enable_caching</dt>
-<dd>
-<?php
-
-$check_caching = new html_checkbox(array('name' => '_enable_caching', 'id' => "cfgcache"));
-echo $check_caching->show(intval($RCI->getprop('enable_caching')), array('value' => 1));
-
-?>
-<label for="cfgcache">Cache messages in local database</label><br />
-</dd>
<dt class="propname">enable_spellcheck</dt>
<dd>
@@ -301,6 +287,18 @@ echo '<label for="cfgdbpass">Database password (omit for sqlite)</label><br />';
?>
</dd>
+
+<dt class="propname">db_prefix</dt>
+<dd>
+<?php
+
+$input_prefix = new html_inputfield(array('name' => '_db_prefix', 'size' => 20, 'id' => "cfgdbprefix"));
+echo $input_prefix->show($RCI->getprop('db_prefix'));
+
+?>
+<div>Optional prefix that will be added to database object names (tables and sequences).</div>
+</dd>
+
</dl>
</fieldset>
@@ -647,7 +645,7 @@ $select_param_folding->add('Full RFC 2231 (Roundcube, Thunderbird)', '0');
$select_param_folding->add('RFC 2047/2231 (MS Outlook, OE)', '1');
$select_param_folding->add('Full RFC 2047 (deprecated)', '2');
-echo $select_param_folding->show(intval($RCI->getprop('mime_param_folding')));
+echo $select_param_folding->show(strval($RCI->getprop('mime_param_folding')));
?>
<div>How to encode attachment long/non-ascii names</div>
diff --git a/installer/index.php b/installer/index.php
index 0e80b1cd6..d084c8aa5 100644
--- a/installer/index.php
+++ b/installer/index.php
@@ -5,7 +5,7 @@
| Roundcube Webmail setup tool |
| Version 0.9-git |
| |
- | Copyright (C) 2009-2012, The Roundcube Dev Team |
+ | Copyright (C) 2009-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 (with exceptions |
@@ -54,17 +54,18 @@ require_once 'rcube_install.php';
// deprecated aliases (to be removed)
require_once 'bc.php';
-session_start();
+if (function_exists('session_start'))
+ session_start();
$RCI = rcube_install::get_instance();
$RCI->load_config();
-if (isset($_GET['_getfile']) && in_array($_GET['_getfile'], array('main', 'db'))) {
- $filename = $_GET['_getfile'] . '.inc.php';
- if (!empty($_SESSION[$filename])) {
+if (isset($_GET['_getconfig'])) {
+ $filename = 'config.inc.php';
+ if (!empty($_SESSION['config'])) {
header('Content-type: text/plain');
header('Content-Disposition: attachment; filename="'.$filename.'"');
- echo $_SESSION[$filename];
+ echo $_SESSION['config'];
exit;
}
else {
@@ -74,14 +75,14 @@ if (isset($_GET['_getfile']) && in_array($_GET['_getfile'], array('main', 'db'))
}
if ($RCI->configured && ($RCI->getprop('enable_installer') || $_SESSION['allowinstaller']) &&
- isset($_GET['_mergeconfig']) && in_array($_GET['_mergeconfig'], array('main', 'db'))) {
- $filename = $_GET['_mergeconfig'] . '.inc.php';
+ !empty($_GET['_mergeconfig'])) {
+ $filename = 'config.inc.php';
header('Content-type: text/plain');
header('Content-Disposition: attachment; filename="'.$filename.'"');
$RCI->merge_config();
- echo $RCI->create_config($_GET['_mergeconfig'], true);
+ echo $RCI->create_config();
exit;
}
@@ -121,8 +122,16 @@ if ($RCI->configured && empty($_REQUEST['_step'])) {
// exit if installation is complete
if ($RCI->configured && !$RCI->getprop('enable_installer') && !$_SESSION['allowinstaller']) {
// header("HTTP/1.0 404 Not Found");
- echo '<h2 class="error">The installer is disabled!</h2>';
- echo '<p>To enable it again, set <tt>$rcmail_config[\'enable_installer\'] = true;</tt> in RCUBE_CONFIG_DIR/main.inc.php</p>';
+ if ($RCI->configured && $RCI->legacy_config) {
+ echo '<h2 class="error">Your configuration needs to be migrated!</h2>';
+ echo '<p>We changed the configuration files structure and your installation needs to be updated accordingly.</p>';
+ echo '<p>Please run the <tt>bin/update.sh</tt> script from the command line or set <p>&nbsp; <tt>$rcmail_config[\'enable_installer\'] = true;</tt></p>';
+ echo ' in your RCUBE_CONFIG_DIR/main.inc.php to let the installer help you migrating it.</p>';
+ }
+ else {
+ echo '<h2 class="error">The installer is disabled!</h2>';
+ echo '<p>To enable it again, set <tt>$rcmail_config[\'enable_installer\'] = true;</tt> in RCUBE_CONFIG_DIR/config.inc.php</p>';
+ }
echo '</div></body></html>';
exit;
}
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index d5811ded1..0f1bfe23e 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -28,10 +28,12 @@ class rcube_install
var $failures = 0;
var $config = array();
var $configured = false;
+ var $legacy_config = false;
var $last_error = null;
var $email_pattern = '([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9])';
var $bool_config_props = array();
+ var $local_config = array('db_dsnw', 'default_host', 'support_url', 'des_key', 'plugins');
var $obsolete_config = array('db_backend', 'double_auth');
var $replaced_config = array(
'skin_path' => 'skin',
@@ -44,12 +46,6 @@ class rcube_install
'top_posting' => 'reply_mode',
);
- // these config options are required for a working system
- var $required_config = array(
- 'db_dsnw', 'db_table_contactgroups', 'db_table_contactgroupmembers',
- 'des_key', 'session_lifetime', 'support_url',
- );
-
// list of supported database drivers
var $supported_dbs = array(
'MySQL' => 'pdo_mysql',
@@ -84,43 +80,75 @@ class rcube_install
}
/**
- * Read the default config files and store properties
- */
- function load_defaults()
- {
- $this->_load_config('.php.dist');
- }
-
-
- /**
* Read the local config files and store properties
*/
function load_config()
{
- $this->config = array();
- $this->_load_config('.php');
- $this->configured = !empty($this->config);
+ // defaults
+ if ($config = $this->load_config_file(RCUBE_CONFIG_DIR . 'defaults.inc.php')) {
+ $this->config = (array) $config;
+ $this->defaults = $this->config;
+ }
+
+ $config = null;
+
+ // config
+ if ($config = $this->load_config_file(RCUBE_CONFIG_DIR . 'config.inc.php')) {
+ $this->config = array_merge($this->config, $config);
+ }
+ else {
+ if ($config = $this->load_config_file(RCUBE_CONFIG_DIR . 'main.inc.php')) {
+ $this->config = array_merge($this->config, $config);
+ $this->legacy_config = true;
+ }
+ if ($config = $this->load_config_file(RCUBE_CONFIG_DIR . 'db.inc.php')) {
+ $this->config = array_merge($this->config, $config);
+ $this->legacy_config = true;
+ }
+ }
+
+ $this->configured = !empty($config);
}
/**
* Read the default config file and store properties
- * @access private
*/
- function _load_config($suffix)
+ public function load_config_file($file)
{
- if (is_readable($main_inc = RCUBE_CONFIG_DIR . 'main.inc' . $suffix)) {
- include($main_inc);
- if (is_array($rcmail_config))
- $this->config += $rcmail_config;
- }
- if (is_readable($db_inc = RCUBE_CONFIG_DIR . 'db.inc'. $suffix)) {
- include($db_inc);
- if (is_array($rcmail_config))
- $this->config += $rcmail_config;
+ if (is_readable($file)) {
+ include $file;
+
+ // read comments from config file
+ if (function_exists('token_get_all')) {
+ $tokens = token_get_all(file_get_contents($file));
+ $in_config = false;
+ $buffer = '';
+ for ($i=0; $i < count($tokens); $i++) {
+ $token = $tokens[$i];
+ if ($token[0] == T_VARIABLE && $token[1] == '$config' || $token[1] == '$rcmail_config') {
+ $in_config = true;
+ if ($buffer && $tokens[$i+1] == '[' && $tokens[$i+2][0] == T_CONSTANT_ENCAPSED_STRING) {
+ $propname = trim($tokens[$i+2][1], "'\"");
+ $this->comments[$propname] = $buffer;
+ $buffer = '';
+ $i += 3;
+ }
+ }
+ else if ($in_config && $token[0] == T_COMMENT) {
+ $buffer .= strtr($token[1], array('\n' => "\n"));
+ }
+ }
+ }
+
+ // deprecated name of config variable
+ if (is_array($rcmail_config)) {
+ return $rcmail_config;
+ }
+
+ return $config;
}
}
-
/**
* Getter for a certain config property
*
@@ -140,24 +168,31 @@ class rcube_install
/**
- * Take the default config file and replace the parameters
- * with the submitted form data
+ * Create configuration file that contains parameters
+ * that differ from default values.
*
- * @param string Which config file (either 'main' or 'db')
* @return string The complete config file content
*/
- function create_config($which, $force = false)
+ function create_config()
{
- $out = @file_get_contents(RCUBE_CONFIG_DIR . $which . '.inc.php.dist');
-
- if (!$out)
- return '[Warning: could not read the config template file]';
+ $config = array();
foreach ($this->config as $prop => $default) {
-
$is_default = !isset($_POST["_$prop"]);
$value = !$is_default || $this->bool_config_props[$prop] ? $_POST["_$prop"] : $default;
+ // always disable installer
+ if ($prop == 'enable_installer')
+ $value = false;
+
+ // reset useragent to default (keeps version up-to-date)
+ if ($prop == 'useragent' && stripos($value, 'Roundcube Webmail/') !== false)
+ $value = $this->defaults[$prop];
+
+ // generate new encryption key, never use the default value
+ if ($prop == 'des_key' && $value == $this->defaults[$prop])
+ $value = $this->random_key(24);
+
// convert some form data
if ($prop == 'debug_level' && !$is_default) {
if (is_array($value)) {
@@ -167,7 +202,7 @@ class rcube_install
$value = $val;
}
}
- else if ($which == 'db' && $prop == 'db_dsnw' && !empty($_POST['_dbtype'])) {
+ else if ($prop == 'db_dsnw' && !empty($_POST['_dbtype'])) {
if ($_POST['_dbtype'] == 'sqlite')
$value = sprintf('%s://%s?mode=0646', $_POST['_dbtype'], $_POST['_dbname']{0} == '/' ? '/' . $_POST['_dbname'] : $_POST['_dbname']);
else if ($_POST['_dbtype'])
@@ -212,20 +247,24 @@ class rcube_install
}
// skip this property
- if (!$force && !$this->configured && ($value == $default))
+ if ((!array_key_exists($prop, $this->defaults) || ($value == $this->defaults[$prop])) && !in_array($prop, $this->local_config)) {
continue;
+ }
// save change
$this->config[$prop] = $value;
+ $config[$prop] = $value;
+ }
- // replace the matching line in config file
- $out = preg_replace(
- '/(\$rcmail_config\[\''.preg_quote($prop).'\'\])\s+=\s+(.+);/Uie',
- "'\\1 = ' . rcube_install::_dump_var(\$value, \$prop) . ';'",
- $out);
+ $out = "<?php\n\n";
+ $out .= "/* Local configuration for Roundcube Webmail */\n\n";
+ foreach ($config as $prop => $value) {
+ // copy option descriptions from existing config or defaults.inc.php
+ $out .= $this->comments[$prop];
+ $out .= "\$config['$prop'] = " . rcube_install::_dump_var($value, $prop) . ";\n\n";
}
- return trim($out);
+ return $out;
}
@@ -237,16 +276,13 @@ class rcube_install
*/
function check_config()
{
- $this->config = array();
- $this->load_defaults();
- $defaults = $this->config;
-
$this->load_config();
- if (!$this->configured)
+
+ if (!$this->configured) {
return null;
+ }
$out = $seen = array();
- $required = array_flip($this->required_config);
// iterate over the current configuration
foreach ($this->config as $prop => $value) {
@@ -265,12 +301,6 @@ class rcube_install
$out['obsolete'][] = array('prop' => 'mime_magic', 'explain' => "Set value to null in order to use system default");
}
- // iterate over default config
- foreach ($defaults as $prop => $value) {
- if (!isset($seen[$prop]) && isset($required[$prop]) && !(is_bool($this->config[$prop]) || strlen($this->config[$prop])))
- $out['missing'][] = array('prop' => $prop);
- }
-
// check config dependencies and contradictions
if ($this->config['enable_spellcheck'] && $this->config['spellcheck_engine'] == 'pspell') {
if (!extension_loaded('pspell')) {
@@ -288,7 +318,7 @@ class rcube_install
if ($this->config['log_driver'] == 'syslog') {
if (!function_exists('openlog')) {
$out['dependencies'][] = array('prop' => 'log_driver',
- 'explain' => 'This requires the <tt>sylog</tt> extension which could not be loaded.');
+ 'explain' => 'This requires the <tt>syslog</tt> extension which could not be loaded.');
}
if (empty($this->config['syslog_id'])) {
$out['dependencies'][] = array('prop' => 'syslog_id',
@@ -318,7 +348,6 @@ class rcube_install
{
$current = $this->config;
$this->config = array();
- $this->load_defaults();
foreach ($this->replaced_config as $prop => $replacement) {
if (isset($current[$prop])) {
@@ -346,9 +375,9 @@ class rcube_install
}
}
- $this->config = array_merge($this->config, $current);
+ $this->config = array_merge($this->config, $current);
- foreach ((array)$current['ldap_public'] as $key => $values) {
+ foreach (array_keys((array)$current['ldap_public']) as $key) {
$this->config['ldap_public'][$key] = $current['ldap_public'][$key];
}
}
@@ -357,10 +386,11 @@ class rcube_install
* Compare the local database schema with the reference schema
* required for this version of Roundcube
*
- * @param boolean True if the schema schould be updated
+ * @param rcube_db Database object
+ *
* @return boolean True if the schema is up-to-date, false if not or an error occured
*/
- function db_schema_check($DB, $update = false)
+ function db_schema_check($DB)
{
if (!$this->configured)
return false;
@@ -373,7 +403,7 @@ class rcube_install
$existing_tables = $DB->list_tables();
foreach ($db_schema as $table => $cols) {
- $table = !empty($this->config['db_table_'.$table]) ? $this->config['db_table_'.$table] : $table;
+ $table = $this->config['db_prefix'] . $table;
if (!in_array($table, $existing_tables)) {
$errors[] = "Missing table '".$table."'";
}
@@ -411,6 +441,51 @@ class rcube_install
return $schema;
}
+ /**
+ * Try to detect some file's mimetypes to test the correct behavior of fileinfo
+ */
+ function check_mime_detection()
+ {
+ $files = array(
+ 'installer/images/roundcube_logo.png' => 'image/png',
+ 'program/resources/blank.tif' => 'image/tiff',
+ 'skins/larry/templates/login.html' => 'text/html',
+ );
+
+ $errors = array();
+ foreach ($files as $path => $expected) {
+ $mimetype = rcube_mime::file_content_type(INSTALL_PATH . $path, basename($path));
+ if ($mimetype != $expected) {
+ $errors[] = array($path, $mimetype, $expected);
+ }
+ }
+
+ return $errors;
+ }
+
+ /**
+ * Check the correct configuration of the 'mime_types' mapping option
+ */
+ function check_mime_extensions()
+ {
+ $types = array(
+ 'application/zip' => 'zip',
+ 'application/x-tar' => 'tar',
+ 'application/java-archive' => 'jar',
+ 'image/bmp' => 'bmp',
+ 'image/svg+xml' => 'svg',
+ );
+
+ $errors = array();
+ foreach ($types as $mimetype => $expected) {
+ $ext = rcube_mime::get_mime_extensions($mimetype);
+ if ($ext[0] != $expected) {
+ $errors[] = array($mimetype, $ext, $expected);
+ }
+ }
+
+ return $errors;
+ }
/**
* Getter for the last error message
@@ -452,11 +527,12 @@ class rcube_install
'0.2-alpha', '0.2-beta', '0.2-stable',
'0.3-stable', '0.3.1',
'0.4-beta', '0.4.2',
- '0.5-beta', '0.5', '0.5.1',
+ '0.5-beta', '0.5', '0.5.1', '0.5.2', '0.5.3', '0.5.4',
'0.6-beta', '0.6',
- '0.7-beta', '0.7', '0.7.1', '0.7.2', '0.7.3',
- '0.8-beta', '0.8-rc', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5',
- '0.9-beta', '0.9-rc',
+ '0.7-beta', '0.7', '0.7.1', '0.7.2', '0.7.3', '0.7.4',
+ '0.8-beta', '0.8-rc', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6',
+ '0.9-beta', '0.9-rc', '0.9-rc2',
+ // Note: Do not add newer versions here
));
return $select;
}
@@ -495,10 +571,13 @@ class rcube_install
* @param string Test name
* @param string Error message
* @param string URL for details
+ * @param bool Do not count this failure
*/
- function fail($name, $message = '', $url = '')
+ function fail($name, $message = '', $url = '', $optional=false)
{
- $this->failures++;
+ if (!$optional) {
+ $this->failures++;
+ }
echo Q($name) . ':&nbsp; <span class="fail">NOT OK</span>';
$this->_showhint($message, $url);
@@ -562,7 +641,8 @@ class rcube_install
}
- static function _dump_var($var, $name=null) {
+ static function _dump_var($var, $name=null)
+ {
// special values
switch ($name) {
case 'syslog_facility':
@@ -575,8 +655,20 @@ class rcube_install
if ($val = $list[$var])
return $val;
break;
- }
+ case 'mail_header_delimiter':
+ $var = str_replace(array("\r", "\n"), array('\r', '\n'), $var);
+ return '"' . $var. '"';
+ break;
+/*
+ // RCMAIL_VERSION is undefined here
+ case 'useragent':
+ if (preg_match('|^(.*)/('.preg_quote(RCMAIL_VERSION, '|').')$|i', $var, $m)) {
+ return '"' . addcslashes($var, '"') . '/" . RCMAIL_VERSION';
+ }
+ break;
+*/
+ }
if (is_array($var)) {
if (empty($var)) {
@@ -584,7 +676,7 @@ class rcube_install
}
else { // check if all keys are numeric
$isnum = true;
- foreach ($var as $key => $value) {
+ foreach (array_keys($var) as $key) {
if (!is_numeric($key)) {
$isnum = false;
break;
@@ -638,8 +730,10 @@ class rcube_install
*/
function update_db($version)
{
- system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube --version=" . $version
- . " --dir=" . INSTALL_PATH . "SQL", $result);
+ system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube"
+ . " --version=" . escapeshellarg($version)
+ . " --dir=" . INSTALL_PATH . "SQL"
+ . " 2>&1", $result);
return !$result;
}
@@ -654,6 +748,7 @@ class rcube_install
*/
function exec_sql($sql, $DB)
{
+ $sql = $this->fix_table_names($sql, $DB);
$buff = '';
foreach (explode("\n", $sql) as $line) {
if (preg_match('/^--/', $line) || trim($line) == '')
@@ -673,6 +768,35 @@ class rcube_install
/**
+ * Parse SQL file and fix table names according to db_prefix
+ * Note: This need to be a complete database initial file
+ */
+ private function fix_table_names($sql, $DB)
+ {
+ if (empty($this->config['db_prefix'])) {
+ return $sql;
+ }
+
+ // replace table names
+ if (preg_match_all('/CREATE TABLE (\[dbo\]\.|IF NOT EXISTS )?[`"\[\]]*([^`"\[\] \r\n]+)/i', $sql, $matches)) {
+ foreach ($matches[2] as $table) {
+ $real_table = $this->config['db_prefix'] . $table;
+ $sql = preg_replace("/([^a-zA-Z0-9_])$table([^a-zA-Z0-9_])/", "\\1$real_table\\2", $sql);
+ }
+ }
+ // replace sequence names
+ if ($DB->db_provider == 'postgres' && preg_match_all('/CREATE SEQUENCE (IF NOT EXISTS )?"?([^" \n\r]+)/i', $sql, $matches)) {
+ foreach ($matches[2] as $sequence) {
+ $real_sequence = $this->config['db_prefix'] . $sequence;
+ $sql = preg_replace("/([^a-zA-Z0-9_])$sequence([^a-zA-Z0-9_])/", "\\1$real_sequence\\2", $sql);
+ }
+ }
+
+ return $sql;
+ }
+
+
+ /**
* Handler for Roundcube errors
*/
function raise_error($p)
diff --git a/installer/test.php b/installer/test.php
index bd49ac523..f834308ad 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -7,52 +7,44 @@ if (!class_exists('rcube_install') || !is_object($RCI)) {
?>
<form action="index.php?_step=3" method="post">
-<h3>Check config files</h3>
+<h3>Check config file</h3>
<?php
-$read_main = is_readable(RCUBE_CONFIG_DIR . 'main.inc.php');
-$read_db = is_readable(RCUBE_CONFIG_DIR . 'db.inc.php');
-
-if ($read_main && !empty($RCI->config)) {
- $RCI->pass('main.inc.php');
-}
-else if ($read_main) {
- $RCI->fail('main.inc.php', 'Syntax error');
+if ($read_config = is_readable(RCUBE_CONFIG_DIR . 'defaults.inc.php')) {
+ $config = $RCI->load_config_file(RCUBE_CONFIG_DIR . 'defaults.inc.php');
+ if (!empty($config)) {
+ $RCI->pass('defaults.inc.php');
+ }
+ else {
+ $RCI->fail('defaults.inc.php', 'Syntax error');
+ }
}
-else if (!$read_main) {
- $RCI->fail('main.inc.php', 'Unable to read file. Did you create the config files?');
+else {
+ $RCI->fail('defaults.inc.php', 'Unable to read default config file?');
}
echo '<br />';
-if ($read_db && !empty($RCI->config['db_table_users'])) {
- $RCI->pass('db.inc.php');
-}
-else if ($read_db) {
- $RCI->fail('db.inc.php', 'Syntax error');
+if ($read_config = is_readable(RCUBE_CONFIG_DIR . 'config.inc.php')) {
+ $config = $RCI->load_config_file(RCUBE_CONFIG_DIR . 'config.inc.php');
+ if (!empty($config)) {
+ $RCI->pass('config.inc.php');
+ }
+ else {
+ $RCI->fail('config.inc.php', 'Syntax error');
+ }
}
-else if (!$read_db) {
- $RCI->fail('db.inc.php', 'Unable to read file. Did you create the config files?');
+else {
+ $RCI->fail('config.inc.php', 'Unable to read file. Did you create the config file?');
}
+echo '<br />';
-if ($RCI->configured && ($messages = $RCI->check_config())) {
-
- if (is_array($messages['missing'])) {
- echo '<h3 class="warning">Missing config options</h3>';
- echo '<p class="hint">The following config options are not present in the current configuration.<br/>';
- echo 'Please check the default config files and add the missing properties to your local config files.</p>';
-
- echo '<ul class="configwarings">';
- foreach ($messages['missing'] as $msg) {
- echo html::tag('li', null, html::span('propname', $msg['prop']) . ($msg['name'] ? ':&nbsp;' . $msg['name'] : ''));
- }
- echo '</ul>';
- }
+if ($RCI->configured && ($messages = $RCI->check_config())) {
if (is_array($messages['replaced'])) {
echo '<h3 class="warning">Replaced config options</h3>';
echo '<p class="hint">The following config options have been replaced or renamed. ';
echo 'Please update them accordingly in your config files.</p>';
-
+
echo '<ul class="configwarings">';
foreach ($messages['replaced'] as $msg) {
echo html::tag('li', null, html::span('propname', $msg['prop']) .
@@ -64,32 +56,28 @@ if ($RCI->configured && ($messages = $RCI->check_config())) {
if (is_array($messages['obsolete'])) {
echo '<h3>Obsolete config options</h3>';
echo '<p class="hint">You still have some obsolete or inexistent properties set. This isn\'t a problem but should be noticed.</p>';
-
+
echo '<ul class="configwarings">';
foreach ($messages['obsolete'] as $msg) {
echo html::tag('li', null, html::span('propname', $msg['prop']) . ($msg['name'] ? ':&nbsp;' . $msg['name'] : ''));
}
echo '</ul>';
}
-
- echo '<p class="suggestion">OK, lazy people can download the updated config files here: ';
- echo html::a(array('href' => './?_mergeconfig=main'), 'main.inc.php') . ' &nbsp;';
- echo html::a(array('href' => './?_mergeconfig=db'), 'db.inc.php');
+
+ echo '<p class="suggestion">OK, lazy people can download the updated config file here: ';
+ echo html::a(array('href' => './?_mergeconfig=1'), 'config.inc.php') . ' &nbsp;';
echo "</p>";
-
-
+
if (is_array($messages['dependencies'])) {
echo '<h3 class="warning">Dependency check failed</h3>';
echo '<p class="hint">Some of your configuration settings require other options to be configured or additional PHP modules to be installed</p>';
-
+
echo '<ul class="configwarings">';
foreach ($messages['dependencies'] as $msg) {
echo html::tag('li', null, html::span('propname', $msg['prop']) . ': ' . $msg['explain']);
}
echo '</ul>';
}
-
-
}
?>
@@ -98,30 +86,24 @@ if ($RCI->configured && ($messages = $RCI->check_config())) {
<p>Roundcube may need to write/save files into these directories</p>
<?php
-if ($RCI->configured) {
- $pass = false;
-
- $dirs[] = $RCI->config['temp_dir'] ? $RCI->config['temp_dir'] : 'temp';
- if($RCI->config['log_driver'] != 'syslog')
- $dirs[] = $RCI->config['log_dir'] ? $RCI->config['log_dir'] : 'logs';
+$dirs[] = $RCI->config['temp_dir'] ? $RCI->config['temp_dir'] : 'temp';
+if ($RCI->config['log_driver'] != 'syslog')
+ $dirs[] = $RCI->config['log_dir'] ? $RCI->config['log_dir'] : 'logs';
- foreach ($dirs as $dir) {
- $dirpath = $dir[0] == '/' ? $dir : INSTALL_PATH . $dir;
- if (is_writable(realpath($dirpath))) {
- $RCI->pass($dir);
- $pass = true;
- }
- else {
- $RCI->fail($dir, 'not writeable for the webserver');
- }
- echo '<br />';
+foreach ($dirs as $dir) {
+ $dirpath = $dir[0] == '/' ? $dir : INSTALL_PATH . $dir;
+ if (is_writable(realpath($dirpath))) {
+ $RCI->pass($dir);
+ $pass = true;
}
-
- if (!$pass)
- echo '<p class="hint">Use <tt>chmod</tt> or <tt>chown</tt> to grant write privileges to the webserver</p>';
+ else {
+ $RCI->fail($dir, 'not writeable for the webserver');
+ }
+ echo '<br />';
}
-else {
- $RCI->fail('Config', 'Could not read config files');
+
+if (!$pass) {
+ echo '<p class="hint">Use <tt>chmod</tt> or <tt>chown</tt> to grant write privileges to the webserver</p>';
}
?>
@@ -151,7 +133,7 @@ if ($RCI->configured) {
}
}
else {
- $RCI->fail('Config', 'Could not read config files');
+ $RCI->fail('DSN (write)', 'Could not read config file');
}
// initialize db with schema found in /SQL/*
@@ -171,7 +153,7 @@ else if ($db_working && $_POST['updatedb']) {
// test database
if ($db_working) {
- $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_table_users']}");
+ $db_read = $DB->query("SELECT count(*) FROM {$RCI->config['db_prefix']}users");
if ($DB->is_error()) {
$RCI->fail('DB Schema', "Database not initialized");
echo '<p><input type="submit" name="initdb" value="Initialize database" /></p>';
@@ -195,11 +177,11 @@ if ($db_working) {
if ($db_working) {
// write test
$insert_id = md5(uniqid());
- $db_write = $DB->query("INSERT INTO {$RCI->config['db_table_session']} (sess_id, created, ip, vars) VALUES (?, ".$DB->now().", '127.0.0.1', 'foo')", $insert_id);
+ $db_write = $DB->query("INSERT INTO {$RCI->config['db_prefix']}session (sess_id, created, ip, vars) VALUES (?, ".$DB->now().", '127.0.0.1', 'foo')", $insert_id);
if ($db_write) {
$RCI->pass('DB Write');
- $DB->query("DELETE FROM {$RCI->config['db_table_session']} WHERE sess_id=?", $insert_id);
+ $DB->query("DELETE FROM {$RCI->config['db_prefix']}session WHERE sess_id=?", $insert_id);
}
else {
$RCI->fail('DB Write', $RCI->get_error());
@@ -225,6 +207,42 @@ if ($db_working) {
?>
+<h3>Test filetype detection</h3>
+
+<p>
+<?php
+
+if ($errors = $RCI->check_mime_detection()) {
+ $RCI->fail('Fileinfo/mime_content_type configuration');
+ if (!empty($RCI->config['mime_magic'])) {
+ echo '<p class="hint">Try setting the <tt>mime_magic</tt> config option to <tt>null</tt>.</p>';
+ }
+ else {
+ echo '<p class="hint">Check the <a href="http://www.php.net/manual/en/function.finfo-open.php">Fileinfo functions</a> of your PHP installation.<br/>';
+ echo 'The path to the magic.mime file can be set using the <tt>mime_magic</tt> config option in Roundcube.</p>';
+ }
+}
+else {
+ $RCI->pass('Fileinfo/mime_content_type configuration');
+}
+
+?>
+</p>
+<p>
+<?php
+
+if ($errors = $RCI->check_mime_extensions()) {
+ $RCI->fail('Mimetype to file extension mapping');
+ echo '<p class="hint">Please set a valid path to your webserver\'s mime.types file to the <tt>mime_types</tt> config option.<br/>';
+ echo 'If you can\'t find such a file, download it from <a href="http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types">svn.apache.org</a>.</p>';
+}
+else {
+ $RCI->pass('Mimetype to file extension mapping');
+}
+
+?>
+
+
<h3>Test SMTP config</h3>
<p>
@@ -427,7 +445,7 @@ if (isset($_POST['imaptest']) && !empty($_POST['_host']) && !empty($_POST['_user
After completing the installation and the final tests please <b>remove</b> the whole
installer folder from the document root of the webserver or make sure that
-<tt>enable_installer</tt> option in config/main.inc.php is disabled.<br />
+<tt>enable_installer</tt> option in <tt>config.inc.php</tt> is disabled.<br />
<br />
These files may expose sensitive configuration data like server passwords and encryption keys
diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php
index 938287b1a..a840bcd58 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 version 2
- * as published by the Free Software Foundation.
+ * 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
*/
class acl extends rcube_plugin
@@ -148,6 +148,7 @@ 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');
@@ -384,7 +385,6 @@ 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) {
@@ -433,8 +433,9 @@ class acl extends rcube_plugin
$acl = trim(rcube_utils::get_input_value('_acl', rcube_utils::INPUT_GPC));
$oldid = trim(rcube_utils::get_input_value('_old', rcube_utils::INPUT_GPC));
- $acl = array_intersect(str_split($acl), $this->rights_supported());
- $users = $oldid ? array($user) : explode(',', $user);
+ $acl = array_intersect(str_split($acl), $this->rights_supported());
+ $users = $oldid ? array($user) : explode(',', $user);
+ $result = 0;
foreach ($users as $user) {
$user = trim($user);
diff --git a/plugins/acl/config.inc.php.dist b/plugins/acl/config.inc.php.dist
index f957a233a..d0e1a0932 100644
--- a/plugins/acl/config.inc.php.dist
+++ b/plugins/acl/config.inc.php.dist
@@ -16,4 +16,10 @@ $rcmail_config['acl_users_field'] = 'mail';
// The LDAP search filter will be &'d with search queries
$rcmail_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.
+$rcmail_config['acl_specials'] = array('anyone', 'anonymous');
+
?>
diff --git a/plugins/acl/localization/cs_CZ.inc b/plugins/acl/localization/cs_CZ.inc
index acf80aca9..167788b4c 100644
--- a/plugins/acl/localization/cs_CZ.inc
+++ b/plugins/acl/localization/cs_CZ.inc
@@ -21,7 +21,7 @@ $labels['myrights'] = 'Přístupová práva';
$labels['username'] = 'Uživatel:';
$labels['advanced'] = 'pokročilý režim';
$labels['newuser'] = 'Přidat záznam';
-$labels['actions'] = 'Access right actions...';
+$labels['actions'] = 'Přístupové právo akce ...';
$labels['anyone'] = 'Všichni uživatelé (kdokoli)';
$labels['anonymous'] = 'Hosté (anonymní)';
$labels['identifier'] = 'Identifikátor';
diff --git a/plugins/acl/localization/en_US.inc b/plugins/acl/localization/en_US.inc
index 033ac29b2..3c61266be 100644
--- a/plugins/acl/localization/en_US.inc
+++ b/plugins/acl/localization/en_US.inc
@@ -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'] = 'Ubable to update access rights';
+$messages['updateerror'] = 'Unable 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/et_EE.inc b/plugins/acl/localization/et_EE.inc
index f89e7d6b7..ceec4cd0c 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'] = 'Messages Delete flag can be changed';
-$labels['longaclt'] = 'Messages Delete flag can be changed';
+$labels['longacld'] = 'Kirja kustutamis lippu saab muuta';
+$labels['longaclt'] = 'Kirja kustutamis lippu saab muuta';
$labels['longacle'] = 'Kirju saab eemaldada';
$labels['longaclx'] = 'Seda kausta ei saa kustutada ega ümber nimetada';
$labels['longacla'] = 'Selle kausta ligipääsuõigusi saab muuta';
diff --git a/plugins/acl/localization/gl_ES.inc b/plugins/acl/localization/gl_ES.inc
index a287a413e..2349975de 100644
--- a/plugins/acl/localization/gl_ES.inc
+++ b/plugins/acl/localization/gl_ES.inc
@@ -26,74 +26,74 @@ $labels['anyone'] = 'Tódolos usuarios (calquera)';
$labels['anonymous'] = 'Invitados (anónimo)';
$labels['identifier'] = 'Identificador';
-$labels['acll'] = 'Lookup';
+$labels['acll'] = 'Bloquear';
$labels['aclr'] = 'Ler mensaxes';
-$labels['acls'] = 'Keep Seen state';
-$labels['aclw'] = 'Write flags';
-$labels['acli'] = 'Insert (Copy into)';
-$labels['aclp'] = 'Post';
-$labels['aclc'] = 'Create subfolders';
-$labels['aclk'] = 'Create subfolders';
+$labels['acls'] = 'Manter o estado coma visto';
+$labels['aclw'] = 'Marcas de lectura';
+$labels['acli'] = 'Engadir (Copiar en)';
+$labels['aclp'] = 'Envío';
+$labels['aclc'] = 'Crear subcartafoles';
+$labels['aclk'] = 'Crear subcartafoles';
$labels['acld'] = 'Borrar mensaxes';
$labels['aclt'] = 'Borrar mensaxes';
-$labels['acle'] = 'Expunge';
+$labels['acle'] = 'Expurga';
$labels['aclx'] = 'Eliminar carpeta';
$labels['acla'] = 'Administrar';
-$labels['aclfull'] = 'Full control';
-$labels['aclother'] = 'Other';
-$labels['aclread'] = 'Read';
-$labels['aclwrite'] = 'Write';
-$labels['acldelete'] = 'Delete';
+$labels['aclfull'] = 'Control total';
+$labels['aclother'] = 'Outros';
+$labels['aclread'] = 'Lectura';
+$labels['aclwrite'] = 'Escritura';
+$labels['acldelete'] = 'Borrado';
-$labels['shortacll'] = 'Lookup';
-$labels['shortaclr'] = 'Read';
-$labels['shortacls'] = 'Keep';
-$labels['shortaclw'] = 'Write';
-$labels['shortacli'] = 'Insert';
-$labels['shortaclp'] = 'Post';
-$labels['shortaclc'] = 'Create';
-$labels['shortaclk'] = 'Create';
-$labels['shortacld'] = 'Delete';
-$labels['shortaclt'] = 'Delete';
-$labels['shortacle'] = 'Expunge';
-$labels['shortaclx'] = 'Folder delete';
+$labels['shortacll'] = 'Busca';
+$labels['shortaclr'] = 'Ler';
+$labels['shortacls'] = 'Manter';
+$labels['shortaclw'] = 'Escribir';
+$labels['shortacli'] = 'Insertar';
+$labels['shortaclp'] = 'Envío';
+$labels['shortaclc'] = 'Crear';
+$labels['shortaclk'] = 'Crear';
+$labels['shortacld'] = 'Borrar';
+$labels['shortaclt'] = 'Borrar';
+$labels['shortacle'] = 'Expurga';
+$labels['shortaclx'] = 'Borrar cartafol';
$labels['shortacla'] = 'Administrar';
-$labels['shortaclother'] = 'Other';
-$labels['shortaclread'] = 'Read';
-$labels['shortaclwrite'] = 'Write';
-$labels['shortacldelete'] = 'Delete';
+$labels['shortaclother'] = 'Outros';
+$labels['shortaclread'] = 'Lectura';
+$labels['shortaclwrite'] = 'Escritura';
+$labels['shortacldelete'] = 'Borrado';
-$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['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['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';
+$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';
-$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'] = 'No rights has been specified!';
-$messages['nouser'] = 'No username has been specified!';
+$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['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 d7b027a40..9ca305d32 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/it_IT.inc b/plugins/acl/localization/it_IT.inc
index b4927fb3f..11d905387 100644
--- a/plugins/acl/localization/it_IT.inc
+++ b/plugins/acl/localization/it_IT.inc
@@ -41,7 +41,7 @@ $labels['aclx'] = 'Elimina cartella';
$labels['acla'] = 'Amministra';
$labels['aclfull'] = 'Controllo completo';
-$labels['aclother'] = 'Altri';
+$labels['aclother'] = 'Altro';
$labels['aclread'] = 'Lettura';
$labels['aclwrite'] = 'Scrittura';
$labels['acldelete'] = 'Elimina';
@@ -57,10 +57,10 @@ $labels['shortaclk'] = 'Crea';
$labels['shortacld'] = 'Elimina';
$labels['shortaclt'] = 'Elimina';
$labels['shortacle'] = 'Elimina';
-$labels['shortaclx'] = 'Cancella cartella';
+$labels['shortaclx'] = 'Elimina cartella';
$labels['shortacla'] = 'Amministra';
-$labels['shortaclother'] = 'Altri';
+$labels['shortaclother'] = 'Altro';
$labels['shortaclread'] = 'Lettura';
$labels['shortaclwrite'] = 'Scrittura';
$labels['shortacldelete'] = 'Elimina';
diff --git a/plugins/acl/localization/ko_KR.inc b/plugins/acl/localization/ko_KR.inc
index 85e33725d..524427a4e 100644
--- a/plugins/acl/localization/ko_KR.inc
+++ b/plugins/acl/localization/ko_KR.inc
@@ -19,81 +19,81 @@
$labels['sharing'] = '공유';
$labels['myrights'] = '접근 권한';
$labels['username'] = '사용자:';
-$labels['advanced'] = 'advanced mode';
+$labels['advanced'] = '고급 모드';
$labels['newuser'] = '엔트리 추가';
-$labels['actions'] = 'Access right actions...';
-$labels['anyone'] = 'All users (anyone)';
-$labels['anonymous'] = 'Guests (anonymous)';
+$labels['actions'] = '접근 권한 동작...';
+$labels['anyone'] = '모든 사용자 (아무나)';
+$labels['anonymous'] = '방문자 (익명)';
$labels['identifier'] = '식별자';
-$labels['acll'] = 'Lookup';
-$labels['aclr'] = 'Read messages';
+$labels['acll'] = '조회';
+$labels['aclr'] = '읽은 메시지';
$labels['acls'] = '읽은 상태로 유지';
-$labels['aclw'] = 'Write flags';
-$labels['acli'] = 'Insert (Copy into)';
+$labels['aclw'] = '쓰기 깃발';
+$labels['acli'] = '삽입 (복사할 위치)';
$labels['aclp'] = '게시';
$labels['aclc'] = '하위 폴더 만들기';
$labels['aclk'] = '하위 폴더 만들기';
$labels['acld'] = '메시지 삭제';
$labels['aclt'] = '메시지 삭제';
-$labels['acle'] = 'Expunge';
+$labels['acle'] = '영구 제거';
$labels['aclx'] = '폴더 삭제';
$labels['acla'] = '관리자';
-$labels['aclfull'] = 'Full control';
-$labels['aclother'] = 'Other';
-$labels['aclread'] = 'Read';
-$labels['aclwrite'] = 'Write';
-$labels['acldelete'] = 'Delete';
+$labels['aclfull'] = '전체 제어권';
+$labels['aclother'] = '기타';
+$labels['aclread'] = '읽기';
+$labels['aclwrite'] = '쓰기';
+$labels['acldelete'] = '삭제';
-$labels['shortacll'] = 'Lookup';
-$labels['shortaclr'] = 'Read';
-$labels['shortacls'] = 'Keep';
-$labels['shortaclw'] = 'Write';
-$labels['shortacli'] = 'Insert';
+$labels['shortacll'] = '조회';
+$labels['shortaclr'] = '읽기';
+$labels['shortacls'] = '보관';
+$labels['shortaclw'] = '쓰기';
+$labels['shortacli'] = '삽입';
$labels['shortaclp'] = '게시';
-$labels['shortaclc'] = 'Create';
-$labels['shortaclk'] = 'Create';
-$labels['shortacld'] = 'Delete';
-$labels['shortaclt'] = 'Delete';
-$labels['shortacle'] = 'Expunge';
+$labels['shortaclc'] = '생성';
+$labels['shortaclk'] = '생성';
+$labels['shortacld'] = '삭제';
+$labels['shortaclt'] = '삭제';
+$labels['shortacle'] = '지움';
$labels['shortaclx'] = '폴더 삭제';
-$labels['shortacla'] = '관리자';
+$labels['shortacla'] = '관리';
-$labels['shortaclother'] = 'Other';
-$labels['shortaclread'] = 'Read';
-$labels['shortaclwrite'] = 'Write';
-$labels['shortacldelete'] = 'Delete';
+$labels['shortaclother'] = '기타';
+$labels['shortaclread'] = '읽기';
+$labels['shortaclwrite'] = '쓱';
+$labels['shortacldelete'] = '삭제';
-$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'] = '폴더에 메시지를 복사하거나 작성할 수 있음';
-$labels['longaclp'] = '이 폴더로 메시지를 게시할 수 있음';
-$labels['longaclc'] = '이 폴더의 바로 밑에 폴더를 생성(또는 이름 변경)할 수 있음';
-$labels['longaclk'] = '이 폴더의 바로 밑에 폴더를 생성(또는 이름 변경)할 수 있음';
-$labels['longacld'] = '메시지 삭제 플래그가 변경될 수 있음';
-$labels['longaclt'] = '메시지 삭제 플래그가 변경될 수 있음';
-$labels['longacle'] = 'Messages can be expunged';
-$labels['longaclx'] = '폴더를 삭제하거나 이름 변경 할 수 있음';
+$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'] = 'The folder can be opened for reading';
-$labels['longaclwrite'] = '메시지에 표시하거나, 폴더로 메시지를 복사하거나 작성할 수 있음';
+$labels['longaclread'] = '폴더를 열어 읽을 수 있음';
+$labels['longaclwrite'] = '메시지에 표시하거나, 폴더로 이동하거나 복사할 수 있음';
$labels['longacldelete'] = '메시지를 삭제할 수 있음';
-$messages['deleting'] = '접근 권한 삭제 중...';
-$messages['saving'] = '접근 권한 저장 중...';
-$messages['updatesuccess'] = '접근 권한을 변경하는데 성공 함.';
-$messages['deletesuccess'] = '접근 권한을 삭제하는데 성공 함.';
-$messages['createsuccess'] = '접근 권한을 추가하는데 성공 함.';
-$messages['updateerror'] = '접근 권한을 갱신할 수 없음.';
+$messages['deleting'] = '접근 권한을 삭제하는 중...';
+$messages['saving'] = '접근 권한을 저장하는 중...';
+$messages['updatesuccess'] = '접근 권한을 성공적으로 변경함.';
+$messages['deletesuccess'] = '접근 권한을 성공적으로 삭제함.';
+$messages['createsuccess'] = '접근 권한을 성공적으로 추가함.';
+$messages['updateerror'] = '접근 권한을 업데이트할 수 없음.';
$messages['deleteerror'] = '접근 권한을 삭제할 수 없음.';
$messages['createerror'] = '접근 권한을 추가할 수 없음.';
-$messages['deleteconfirm'] = '선택한 사용자(들)의 접근 권한을 삭제하고자 하는 것이 확실 합니까?';
+$messages['deleteconfirm'] = '정말로 선택한 사용자의 접근 권한을 삭제하시겠습니까?';
$messages['norights'] = '지정된 권한이 없음!';
-$messages['nouser'] = '지정된 username이 없음!';
+$messages['nouser'] = '지정된 사용자명이 없음!';
?>
diff --git a/plugins/acl/localization/lb_LU.inc b/plugins/acl/localization/lb_LU.inc
new file mode 100644
index 000000000..b9891931c
--- /dev/null
+++ b/plugins/acl/localization/lb_LU.inc
@@ -0,0 +1,99 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/acl/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail ACL plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/
+*/
+
+$labels['sharing'] = 'Sharing';
+$labels['myrights'] = 'Zougrëffsrechter';
+$labels['username'] = 'Benotzer:';
+$labels['advanced'] = 'avancéierte Modus';
+$labels['newuser'] = 'Element dobäisetzen';
+$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';
+$labels['shortaclw'] = 'Schreiwen';
+$labels['shortacli'] = 'Drasetze';
+$labels['shortaclp'] = 'Schécken';
+$labels['shortaclc'] = 'Erstellen';
+$labels['shortaclk'] = 'Erstellen';
+$labels['shortacld'] = 'Läschen';
+$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';
+$messages['deletesuccess'] = 'Rechter erfollegräich geläscht';
+$messages['createsuccess'] = 'Rechter erfollegräich dobäigesat';
+$messages['updateerror'] = 'D\'Zougrëffsrechter kënnen net aktualiséiert ginn';
+$messages['deleteerror'] = 'Rechter kënnen net geläscht ginn';
+$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 6507504e2..59393012f 100644
--- a/plugins/acl/localization/lt_LT.inc
+++ b/plugins/acl/localization/lt_LT.inc
@@ -70,7 +70,7 @@ $labels['longaclr'] = 'Aplanką galima peržiūrėti';
$labels['longacls'] = 'Pranešimų vėliavėlė "Matyta" gali būti pakeista';
$labels['longaclw'] = 'Pranešimų vėliavėlės ir raktažodžiai gali būti pakeisti, išskyrus "Matytas" ir "Ištrintas"';
$labels['longacli'] = 'Pranešimai gali būti įrašyti arba nukopijuoti į aplanką';
-$labels['longaclp'] = 'Messages can be posted to this folder';
+$labels['longaclp'] = 'Į šį aplanką galima dėti laiškus.';
$labels['longaclc'] = 'Nauji aplankai gali būti kuriami (arba pervadinami) šioje direktorijoje';
$labels['longaclk'] = 'Nauji aplankai gali būti kuriami (arba pervadinami) šioje direktorijoje';
$labels['longacld'] = 'Pranešimų vėliavėlė "Ištrintas" gali būti pakeista';
diff --git a/plugins/acl/localization/pl_PL.inc b/plugins/acl/localization/pl_PL.inc
index 73c0fc4fb..69a5e0c05 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ę zmienić praw dostępu';
+$messages['updateerror'] = 'Nie udało się zaktualizować 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/tr_TR.inc b/plugins/acl/localization/tr_TR.inc
index 1569b5926..f3d60324b 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ını güncellenemedi';
+$messages['updateerror'] = 'Erişim hakları 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/localization/zh_CN.inc b/plugins/acl/localization/zh_CN.inc
index 0c5171664..ebf314043 100644
--- a/plugins/acl/localization/zh_CN.inc
+++ b/plugins/acl/localization/zh_CN.inc
@@ -16,12 +16,12 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/
*/
-$labels['sharing'] = '共享中';
+$labels['sharing'] = '共享';
$labels['myrights'] = '访问权限';
$labels['username'] = '用户:';
$labels['advanced'] = '高级模式';
-$labels['newuser'] = '添加条目';
-$labels['actions'] = 'Access right actions...';
+$labels['newuser'] = '新增条目';
+$labels['actions'] = '权限设置...';
$labels['anyone'] = '所有用户(任何人)';
$labels['anonymous'] = '来宾(匿名)';
$labels['identifier'] = '标识符';
@@ -29,7 +29,7 @@ $labels['identifier'] = '标识符';
$labels['acll'] = '查找';
$labels['aclr'] = '读取消息';
$labels['acls'] = '保存已读状态';
-$labels['aclw'] = 'Write flags';
+$labels['aclw'] = '写入标志';
$labels['acli'] = '插入(复制至)';
$labels['aclp'] = '发送';
$labels['aclc'] = '创建子文件夹';
@@ -41,15 +41,15 @@ $labels['aclx'] = '删除文件夹';
$labels['acla'] = '管理';
$labels['aclfull'] = '全部控制';
-$labels['aclother'] = '其他';
-$labels['aclread'] = '阅读';
-$labels['aclwrite'] = '撰写';
+$labels['aclother'] = '其它';
+$labels['aclread'] = '读取';
+$labels['aclwrite'] = '写入';
$labels['acldelete'] = '删除';
$labels['shortacll'] = '查找';
-$labels['shortaclr'] = '阅读';
-$labels['shortacls'] = '保留';
-$labels['shortaclw'] = '撰写';
+$labels['shortaclr'] = '读取';
+$labels['shortacls'] = '保存';
+$labels['shortaclw'] = '写入';
$labels['shortacli'] = '插入';
$labels['shortaclp'] = '发送';
$labels['shortaclc'] = '新建';
@@ -61,22 +61,22 @@ $labels['shortaclx'] = '删除文件夹';
$labels['shortacla'] = '管理';
$labels['shortaclother'] = '其他';
-$labels['shortaclread'] = 'Read';
-$labels['shortaclwrite'] = '撰写';
+$labels['shortaclread'] = '读取';
+$labels['shortaclwrite'] = '写入';
$labels['shortacldelete'] = '删除';
$labels['longacll'] = '该文件夹在列表上可见且可被订阅';
$labels['longaclr'] = '该文件夹可被打开阅读';
$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['longacli'] = '消息可写或可被复制至文件夹中';
$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'] = '消息可被清除';
-$labels['longaclx'] = '该文件夹可悲删除或重命名';
+$labels['longaclx'] = '该文件夹可被删除或重命名';
$labels['longacla'] = '文件夹访问权限可被修改';
$labels['longaclfull'] = 'Full control including folder administration';
diff --git a/plugins/acl/localization/zh_TW.inc b/plugins/acl/localization/zh_TW.inc
index 3125c286f..821f7b321 100644
--- a/plugins/acl/localization/zh_TW.inc
+++ b/plugins/acl/localization/zh_TW.inc
@@ -65,10 +65,10 @@ $labels['shortaclread'] = '讀取';
$labels['shortaclwrite'] = '寫入';
$labels['shortacldelete'] = '刪除';
-$labels['longacll'] = 'The folder is visible on lists and can be subscribed to';
+$labels['longacll'] = '此資料夾權限可以訂閱和瀏覽';
$labels['longaclr'] = '資料夾能被打開與讀取';
$labels['longacls'] = '能修改訊息標幟';
-$labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
+$labels['longaclw'] = '內容旗標和關鍵字可以變更,不包含已檢視和刪除的';
$labels['longacli'] = '訊息能寫入或複製到資料夾';
$labels['longaclp'] = '訊息能被投遞到這個資料夾';
$labels['longaclc'] = '這個資料夾之下可以建子資料夾(或重新命名)';
diff --git a/plugins/acl/package.xml b/plugins/acl/package.xml
index 52e234f37..98460e82f 100644
--- a/plugins/acl/package.xml
+++ b/plugins/acl/package.xml
@@ -22,7 +22,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/additional_message_headers/additional_message_headers.php b/plugins/additional_message_headers/additional_message_headers.php
index 80c58d58b..a43018176 100644
--- a/plugins/additional_message_headers/additional_message_headers.php
+++ b/plugins/additional_message_headers/additional_message_headers.php
@@ -6,7 +6,7 @@
* Very simple plugin which will add additional headers
* to or remove them from outgoing messages.
*
- * Enable the plugin in config/main.inc.php and add your desired headers:
+ * Enable the plugin in config.inc.php and add your desired headers:
* $rcmail_config['additional_message_headers'] = array('User-Agent');
*
* @version @package_version@
@@ -24,7 +24,7 @@ class additional_message_headers extends rcube_plugin
function message_headers($args)
{
- $this->load_config();
+ $this->load_config();
// additional email headers
$additional_headers = rcmail::get_instance()->config->get('additional_message_headers',array());
@@ -39,5 +39,3 @@ class additional_message_headers extends rcube_plugin
return $args;
}
}
-
-?>
diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js
index eee41d336..3500b9fe4 100644
--- a/plugins/archive/archive.js
+++ b/plugins/archive/archive.js
@@ -7,18 +7,16 @@ 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('moveto', rcmail.env.archive_folder);
+ rcmail.command('move', rcmail.env.archive_folder);
}
else {
// let the server sort the messages to the according subfolders
- rcmail.http_post(
- 'plugin.move2archive',
- { _uid: rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox }
- );
+ var post_data = { _uid: rcmail.message_list.get_selection().join(','), _mbox: rcmail.env.mailbox };
+ rcmail.http_post('plugin.move2archive', post_data);
}
}
}
@@ -26,16 +24,15 @@ function rcmail_archive(prop)
// 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)))
@@ -48,4 +45,3 @@ if (window.rcmail) {
});
})
}
-
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 38b4f9fcb..7a81606ab 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -41,7 +41,7 @@ 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'));
@@ -75,10 +75,10 @@ class archive extends rcube_plugin
{
$rcmail = rcmail::get_instance();
$archive_folder = $rcmail->config->get('archive_mbox');
- $localize_name = $rcmail->config->get('archive_localize_name', true);
+ $show_real_name = $rcmail->config->get('show_real_foldernames');
// set localized name for the configured archive folder
- if ($archive_folder && $localize_name) {
+ if ($archive_folder && !$show_real_name) {
if (isset($p['list'][$archive_folder]))
$p['list'][$archive_folder]['name'] = $this->gettext('archivefolder');
else // search in subfolders
diff --git a/plugins/archive/localization/az_AZ.inc b/plugins/archive/localization/az_AZ.inc
index 8aab6f2da..19a409d41 100644
--- a/plugins/archive/localization/az_AZ.inc
+++ b/plugins/archive/localization/az_AZ.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arxiv';
$labels['buttontitle'] = 'Mesajı arxivə göndər';
$labels['archived'] = 'Arxivə göndərildi';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Müvəffəqiyyətlə arxivləşdirildi. Yeni arxiv qovluqlarını görmək üçün səhifəni yeniləyin.';
+$labels['archiveerror'] = 'Bəzi məktublar arxivləşdirilə bilinmirlər';
$labels['archivefolder'] = 'Arxiv';
-$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'] = 'Arxiv';
+$labels['archivetype'] = 'Arxivi böl: ';
+$labels['archivetypeyear'] = 'İl (məs. Arxiv/2012)';
+$labels['archivetypemonth'] = 'Ay (məs. Arxiv/2012/06)';
+$labels['archivetypefolder'] = 'Orijinal qovluq';
+$labels['archivetypesender'] = 'Göndərənin E-Poçtu';
+$labels['unkownsender'] = 'naməlum';
?>
diff --git a/plugins/archive/localization/bg_BG.inc b/plugins/archive/localization/bg_BG.inc
index fd32931c2..b7be242e0 100644
--- a/plugins/archive/localization/bg_BG.inc
+++ b/plugins/archive/localization/bg_BG.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Архивиране';
$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'] = 'Email адрес на изпращача';
+$labels['unkownsender'] = 'неизвестно';
?>
diff --git a/plugins/archive/localization/ca_ES.inc b/plugins/archive/localization/ca_ES.inc
index fde7d358e..04ade1dbf 100644
--- a/plugins/archive/localization/ca_ES.inc
+++ b/plugins/archive/localization/ca_ES.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arxiva';
$labels['buttontitle'] = 'Arxiva aquest missatge';
$labels['archived'] = 'Arxivat correctament';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arxivat correctament. Recarregueu la pàgina per veure les noves carpetes de l\'arxiu.';
+$labels['archiveerror'] = 'Alguns missatges no han pogut ser arxivats';
$labels['archivefolder'] = 'Arxiva';
-$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'] = 'Arxiu';
+$labels['archivetype'] = 'Dividir arxiu per';
+$labels['archivetypeyear'] = 'Any (p.ex. Arxiu/2012)';
+$labels['archivetypemonth'] = 'Mes (p.ex. Arxiu/2012/06)';
+$labels['archivetypefolder'] = 'Carpeta original';
+$labels['archivetypesender'] = 'Adreça del remitent';
+$labels['unkownsender'] = 'desconegut';
?>
diff --git a/plugins/archive/localization/cs_CZ.inc b/plugins/archive/localization/cs_CZ.inc
index 2f2fd95d5..e71aa5fa6 100644
--- a/plugins/archive/localization/cs_CZ.inc
+++ b/plugins/archive/localization/cs_CZ.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Archiv';
$labels['buttontitle'] = 'Archivovat zprávu';
$labels['archived'] = 'Úspěšně vloženo do archivu';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Úspěšně archivovány. Obnovte stránku, abyste uviděli nové složky v archivu.';
+$labels['archiveerror'] = 'Některé zprávy nelze archivovat';
$labels['archivefolder'] = 'Archiv';
-$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'] = 'Archiv';
+$labels['archivetype'] = 'Rozdělit archiv podle';
+$labels['archivetypeyear'] = 'Rok (např. Archiv/2012)';
+$labels['archivetypemonth'] = 'Měsíc (např. Archiv/2012/06)';
+$labels['archivetypefolder'] = 'Původní složka';
+$labels['archivetypesender'] = 'E-mail odesílatele';
+$labels['unkownsender'] = 'neznámý';
?>
diff --git a/plugins/archive/localization/cy_GB.inc b/plugins/archive/localization/cy_GB.inc
index fa8e19756..454c26da5 100644
--- a/plugins/archive/localization/cy_GB.inc
+++ b/plugins/archive/localization/cy_GB.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Archif';
$labels['buttontitle'] = 'Archifo\'r neges hwn';
$labels['archived'] = 'Archifwyd yn llwyddiannus';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Archifwyd yn llwyddiannus. Ail-lwythwch y dudalen i weld ffolderi archif newydd.';
+$labels['archiveerror'] = 'Nid oedd yn bosib archifo rhai negeseuon';
$labels['archivefolder'] = 'Archif';
-$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'] = 'Archif';
+$labels['archivetype'] = 'Rhannu archif gyda';
+$labels['archivetypeyear'] = 'Blwyddyn (e.g. Archif/2012)';
+$labels['archivetypemonth'] = 'Mis (e.g. Archif/2012/06)';
+$labels['archivetypefolder'] = 'Ffolder gwreiddiol';
+$labels['archivetypesender'] = 'Ebost anfonwr';
+$labels['unkownsender'] = 'anhysbys';
?>
diff --git a/plugins/archive/localization/da_DK.inc b/plugins/archive/localization/da_DK.inc
index d4a88cab4..ac67700a4 100644
--- a/plugins/archive/localization/da_DK.inc
+++ b/plugins/archive/localization/da_DK.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arkiv';
$labels['buttontitle'] = 'Arkivér denne besked';
$labels['archived'] = 'Succesfuldt arkiveret.';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arkivering lykkedes. Genindlæs siden for at se den nye arkiv mappe.';
+$labels['archiveerror'] = 'Nogle meddelelser kunne ikke arkiveres';
$labels['archivefolder'] = 'Arkiv';
-$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'] = 'Arkiver';
+$labels['archivetype'] = 'Del arkiv med';
+$labels['archivetypeyear'] = 'År (f.eks. Arkiv/2012)';
+$labels['archivetypemonth'] = 'Måned (f.eks. Arkiv/2012/06)';
+$labels['archivetypefolder'] = 'Original mappe';
+$labels['archivetypesender'] = 'Afsenders email';
+$labels['unkownsender'] = 'ukendt';
?>
diff --git a/plugins/archive/localization/el_GR.inc b/plugins/archive/localization/el_GR.inc
index 57a98abc8..6da9f7dbf 100644
--- a/plugins/archive/localization/el_GR.inc
+++ b/plugins/archive/localization/el_GR.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Αρχειοθέτηση';
$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'] = 'Αποστολέας email';
+$labels['unkownsender'] = 'άγνωστο';
?>
diff --git a/plugins/archive/localization/es_AR.inc b/plugins/archive/localization/es_AR.inc
index ad9e84add..5fb082497 100644
--- a/plugins/archive/localization/es_AR.inc
+++ b/plugins/archive/localization/es_AR.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Archivo';
$labels['buttontitle'] = 'Archivar este mensaje';
$labels['archived'] = 'Mensaje Archivado';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Archivado satisfactoriamente. Recarga la página para ver las nuevas capetas archivadas.';
+$labels['archiveerror'] = 'Algunos mensajes no pudieron archivarse';
$labels['archivefolder'] = 'Archivo';
-$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'] = 'Archivo';
+$labels['archivetype'] = 'Separar archivo por';
+$labels['archivetypeyear'] = 'Año (ej. Archivo/2012)';
+$labels['archivetypemonth'] = 'Mes (ej. Archivo/2012/06)';
+$labels['archivetypefolder'] = 'Carpeta original';
+$labels['archivetypesender'] = 'Remitente del correo';
+$labels['unkownsender'] = 'desconocido';
?>
diff --git a/plugins/archive/localization/gl_ES.inc b/plugins/archive/localization/gl_ES.inc
index 09b64b2ab..55180fefe 100644
--- a/plugins/archive/localization/gl_ES.inc
+++ b/plugins/archive/localization/gl_ES.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arquivo';
$labels['buttontitle'] = 'Arquivar esta mensaxe';
$labels['archived'] = 'Aquivouse a mensaxe';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arquivado correctamente. Recargue a páxina para ver os novos cartafoles de arquivado.';
+$labels['archiveerror'] = 'Non se puideron arquivar algunhas mensaxes';
$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'] = 'Arquivar';
+$labels['archivetype'] = 'Dividir o arquivo por';
+$labels['archivetypeyear'] = 'Ano (p.ex. Arquivo/2012)';
+$labels['archivetypemonth'] = 'Mes (p.ex. Arquivo/2012/06)';
+$labels['archivetypefolder'] = 'Cartafol orixe';
+$labels['archivetypesender'] = 'Enderezo do remitente';
+$labels['unkownsender'] = 'descoñecido';
?>
diff --git a/plugins/archive/localization/he_IL.inc b/plugins/archive/localization/he_IL.inc
index 834e46729..37bcaaa3f 100644
--- a/plugins/archive/localization/he_IL.inc
+++ b/plugins/archive/localization/he_IL.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'ארכיון';
$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/96 )';
+$labels['archivetypemonth'] = 'חודש ( לדוגמה, ארכיב/2012/96 )';
+$labels['archivetypefolder'] = 'תיקיה מקורית';
+$labels['archivetypesender'] = 'שולח ההודעה';
+$labels['unkownsender'] = 'לא ידוע';
?>
diff --git a/plugins/archive/localization/hu_HU.inc b/plugins/archive/localization/hu_HU.inc
index e95c2d0d2..970a24184 100644
--- a/plugins/archive/localization/hu_HU.inc
+++ b/plugins/archive/localization/hu_HU.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Archiválás';
$labels['buttontitle'] = 'Üzenet archiválása';
$labels['archived'] = 'Sikeres archiválás';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Az arhiválás sikeres. Frissitsd az oldalt, hogy lásd a létrejött arhivum mappákat.';
+$labels['archiveerror'] = 'Néhány üzenetet nem sikerült arhiválni';
$labels['archivefolder'] = 'Archiválás';
-$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['settingstitle'] = 'Archiválás';
+$labels['archivetype'] = 'Arhívum tovább bontása a következő szerint';
+$labels['archivetypeyear'] = 'Év ( pl Arhívum/2012)';
+$labels['archivetypemonth'] = 'Honap ( pl Arhívum/2012/06)';
+$labels['archivetypefolder'] = 'Eredeti mappa';
+$labels['archivetypesender'] = 'Feladó';
$labels['unkownsender'] = 'ismeretlen';
?>
diff --git a/plugins/archive/localization/ko_KR.inc b/plugins/archive/localization/ko_KR.inc
index 96a7ac404..4226420a0 100644
--- a/plugins/archive/localization/ko_KR.inc
+++ b/plugins/archive/localization/ko_KR.inc
@@ -19,16 +19,16 @@
$labels = array();
$labels['buttontext'] = '보관';
$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['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/localization/lb_LU.inc b/plugins/archive/localization/lb_LU.inc
new file mode 100644
index 000000000..6e9e6db22
--- /dev/null
+++ b/plugins/archive/localization/lb_LU.inc
@@ -0,0 +1,34 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/archive/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/
+*/
+
+$labels = array();
+$labels['buttontext'] = 'Archivéieren';
+$labels['buttontitle'] = 'Dëse Message archivéieren';
+$labels['archived'] = 'Erfollegräich archivéiert';
+$labels['archivedreload'] = 'Erfollegräich archivéiert. Lued d\'Säit nei fir déi neisten Archiv-Dossieren ze gesinn.';
+$labels['archiveerror'] = 'Verschidde Messagë konnten net archivéiert ginn';
+$labels['archivefolder'] = 'Archiv';
+$labels['settingstitle'] = 'Archiv';
+$labels['archivetype'] = 'Archiv dividéieren duerch';
+$labels['archivetypeyear'] = 'Joer (z.B. Archiv/2013)';
+$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/lt_LT.inc b/plugins/archive/localization/lt_LT.inc
index 36046277a..069a65665 100644
--- a/plugins/archive/localization/lt_LT.inc
+++ b/plugins/archive/localization/lt_LT.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Archyvuoti';
$labels['buttontitle'] = 'Perkelti šį laišką į archyvą';
$labels['archived'] = 'Laiškas sėkmingai perkeltas į archyvą';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Sėkmingai perkelta į archyvą. Iš naujo įkelkite puslapį, kad pamatytumėt pasikeitimus.';
+$labels['archiveerror'] = 'Į archyvą nepavyko perkelti keleto laiškų.';
$labels['archivefolder'] = 'Archyvuoti';
-$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'] = 'Archyvuoti';
+$labels['archivetype'] = 'Padalinti archyvą pagal';
+$labels['archivetypeyear'] = 'Metai (pvz. Archyvas/2012)';
+$labels['archivetypemonth'] = 'Mėnesis (pvz. Archyvas/2012/06)';
+$labels['archivetypefolder'] = 'Tikrasis aplankas';
+$labels['archivetypesender'] = 'Siuntėjo el. pašto adresas';
+$labels['unkownsender'] = 'nežinomas';
?>
diff --git a/plugins/archive/localization/lv_LV.inc b/plugins/archive/localization/lv_LV.inc
index ad2812fba..d4c892705 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 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['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['archivefolder'] = 'Arhīvs';
-$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'] = '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';
?>
diff --git a/plugins/archive/localization/sl_SI.inc b/plugins/archive/localization/sl_SI.inc
index 94d1f68b1..b49fe93ab 100644
--- a/plugins/archive/localization/sl_SI.inc
+++ b/plugins/archive/localization/sl_SI.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arhiv';
$labels['buttontitle'] = 'Arhiviraj to sporočilo';
$labels['archived'] = 'Sporočilo je bilo uspešno arhivirano';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Uspešno shranjeno v arhiv. Za pregled map v Arhivu ponovno naložite stran.';
+$labels['archiveerror'] = 'Nekaterih sporočil ni bilo mogoče arhivirati';
$labels['archivefolder'] = 'Arhiv';
-$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'] = 'Arhiv';
+$labels['archivetype'] = 'Razdeli arhiv glede na';
+$labels['archivetypeyear'] = 'Leto (npr. Arhiv/2012)';
+$labels['archivetypemonth'] = 'Mesec (npr. Arhiv/2012/06)';
+$labels['archivetypefolder'] = 'Izvorna mapa';
+$labels['archivetypesender'] = 'Naslov pošiljatelja';
+$labels['unkownsender'] = 'neznan';
?>
diff --git a/plugins/archive/localization/tr_TR.inc b/plugins/archive/localization/tr_TR.inc
index 765498301..b6960ea89 100644
--- a/plugins/archive/localization/tr_TR.inc
+++ b/plugins/archive/localization/tr_TR.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = 'Arşiv';
$labels['buttontitle'] = 'Bu postayı arşivle';
$labels['archived'] = 'Başarıyla arşivlendi';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Başarıyla arşivlendi. Yeni arşiv dosyalarını görmek için sayfayı yenileyin.';
+$labels['archiveerror'] = 'Bazı mesajlar arşivlenemedi.';
$labels['archivefolder'] = 'Arşiv';
-$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'] = 'Arşiv';
+$labels['archivetype'] = 'Arşivi bunla böl';
+$labels['archivetypeyear'] = 'Yıl (Arşiv/2012)';
+$labels['archivetypemonth'] = 'Ay(Arşiv/2012/06)';
+$labels['archivetypefolder'] = 'Özgün dosya';
+$labels['archivetypesender'] = 'E-Posta Göndericisi';
+$labels['unkownsender'] = 'bilinmeyen';
?>
diff --git a/plugins/archive/localization/zh_TW.inc b/plugins/archive/localization/zh_TW.inc
index a434f3184..6eac3a391 100644
--- a/plugins/archive/localization/zh_TW.inc
+++ b/plugins/archive/localization/zh_TW.inc
@@ -20,15 +20,15 @@ $labels = array();
$labels['buttontext'] = '封存';
$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/attachment_reminder/attachment_reminder.js b/plugins/attachment_reminder/attachment_reminder.js
new file mode 100755
index 000000000..50d661b3b
--- /dev/null
+++ b/plugins/attachment_reminder/attachment_reminder.js
@@ -0,0 +1,68 @@
+/* Attachment Reminder plugin script */
+
+function rcmail_get_compose_message()
+{
+ var msg;
+
+ if (window.tinyMCE && (ed = tinyMCE.get(rcmail.env.composebody))) {
+ msg = ed.getContent();
+ msg = msg.replace(/<blockquote[^>]*>(.|[\r\n])*<\/blockquote>/gmi, '');
+ }
+ else {
+ msg = $('#' + rcmail.env.composebody).val();
+ msg = msg.replace(/^>.*$/gmi, '');
+ }
+
+ return msg;
+};
+
+function rcmail_check_message(msg)
+{
+ var i, rx, keywords = rcmail.gettext('keywords', 'attachment_reminder').split(",").concat([".doc", ".pdf"]);
+
+ $.each(keywords, function(n) { return RegExp.escape(n); });
+ rx = new RegExp('(' + keywords.join('|') + ')', 'i');
+
+ return msg.search(rx) != -1;
+};
+
+function rcmail_have_attachments()
+{
+ return rcmail.env.attachments && $('li', rcmail.gui_objects.attachmentlist).length;
+};
+
+function rcmail_attachment_reminder_dialog()
+{
+ var buttons = {};
+
+ buttons[rcmail.gettext('addattachment')] = function() {
+ $(this).remove();
+ if (window.UI && UI.show_uploadform) // Larry skin
+ UI.show_uploadform();
+ else if (window.rcmail_ui && rcmail_ui.show_popup) // classic skin
+ rcmail_ui.show_popup('uploadmenu', true);
+ };
+ buttons[rcmail.gettext('send')] = function(e) {
+ $(this).remove();
+ rcmail.env.attachment_reminder = true;
+ rcmail.command('send', '', e);
+ };
+
+ rcmail.env.attachment_reminder = false;
+ rcmail.show_popup_dialog(rcmail.gettext('attachment_reminder.forgotattachment'), '', buttons);
+};
+
+
+if (window.rcmail) {
+ rcmail.addEventListener('beforesend', function(evt) {
+ var msg = rcmail_get_compose_message(),
+ subject = $('#compose-subject').val();
+
+ if (!rcmail.env.attachment_reminder && !rcmail_have_attachments()
+ && (rcmail_check_message(msg) || rcmail_check_message(subject))
+ ) {
+ rcmail_attachment_reminder_dialog();
+ return false;
+ }
+ });
+}
diff --git a/plugins/attachment_reminder/attachment_reminder.php b/plugins/attachment_reminder/attachment_reminder.php
new file mode 100755
index 000000000..84cc5f3b3
--- /dev/null
+++ b/plugins/attachment_reminder/attachment_reminder.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Attachement Reminder
+ *
+ * A plugin that reminds a user to attach the files
+ *
+ * @version @package_version@
+ * @author Thomas Yu - Sian, Liu
+ * @author Aleksander Machniak <machniak@kolabsys.com>
+ *
+ * Copyright (C) 2013 Thomas Yu - Sian, Liu
+ * Copyright (C) 2013, Kolab Systems AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ */
+
+class attachment_reminder extends rcube_plugin
+{
+ public $task = 'mail|settings';
+ public $noajax = true;
+
+
+ function init()
+ {
+ $rcmail = rcube::get_instance();
+
+ if ($rcmail->task == 'mail' && $rcmail->action == 'compose') {
+ if ($rcmail->config->get('attachment_reminder')) {
+ $this->include_script('attachment_reminder.js');
+ $this->add_texts('localization/', array('keywords', 'forgotattachment'));
+ $rcmail->output->add_label('addattachment', 'send');
+ }
+ }
+
+ if ($rcmail->task == 'settings') {
+ $dont_override = $rcmail->config->get('dont_override', array());
+
+ if (!in_array('attachment_reminder', $dont_override)) {
+ $this->add_hook('preferences_list', array($this, 'prefs_list'));
+ $this->add_hook('preferences_save', array($this, 'prefs_save'));
+ }
+ }
+ }
+
+ function prefs_list($args)
+ {
+ if ($args['section'] == 'compose') {
+ $this->add_texts('localization/');
+ $reminder = rcube::get_instance()->config->get('attachment_reminder');
+ $field_id = 'rcmfd_attachment_reminder';
+ $checkbox = new html_checkbox(array('name' => '_attachment_reminder', 'id' => $field_id, 'value' => 1));
+
+ $args['blocks']['main']['options']['attachment_reminder'] = array(
+ 'title' => html::label($field_id, rcube::Q($this->gettext('reminderoption'))),
+ 'content' => $checkbox->show($reminder ? 1 : 0),
+ );
+ }
+
+ return $args;
+ }
+
+ function prefs_save($args)
+ {
+ if ($args['section'] == 'compose') {
+ $dont_override = rcube::get_instance()->config->get('dont_override', array());
+ if (!in_array('attachment_reminder', $dont_override)) {
+ $args['prefs']['attachment_reminder'] = !empty($_POST['_attachment_reminder']);
+ }
+ }
+ return $args;
+ }
+
+}
diff --git a/plugins/attachment_reminder/localization/de_CH.inc b/plugins/attachment_reminder/localization/de_CH.inc
new file mode 100644
index 000000000..ad9f8d4f4
--- /dev/null
+++ b/plugins/attachment_reminder/localization/de_CH.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/
+*/
+
+$messages = 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
new file mode 100644
index 000000000..7de41d1fc
--- /dev/null
+++ b/plugins/attachment_reminder/localization/de_DE.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$messages['forgotattachment'] = "Haben Sie möglicherweise vergessen eine Datei anzuhängen?";
+$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['keywords'] = "anbei,im anhang,angehängt,angefügt,beigefügt,beliegend";
diff --git a/plugins/attachment_reminder/localization/en_US.inc b/plugins/attachment_reminder/localization/en_US.inc
new file mode 100644
index 000000000..488b0df37
--- /dev/null
+++ b/plugins/attachment_reminder/localization/en_US.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/
+*/
+
+$messages = array();
+$messages['forgotattachment'] = "Did you forget to attach a file?";
+$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['keywords'] = "attachment,file,attach,attached,attaching,enclosed,CV,cover letter";
diff --git a/plugins/attachment_reminder/localization/es_ES.inc b/plugins/attachment_reminder/localization/es_ES.inc
new file mode 100644
index 000000000..79225d77e
--- /dev/null
+++ b/plugins/attachment_reminder/localization/es_ES.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$messages['forgotattachment'] = "¿Olvidó adjuntar un fichero al mensaje?";
+$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['keywords'] = "adjunto";
diff --git a/plugins/attachment_reminder/localization/fr_FR.inc b/plugins/attachment_reminder/localization/fr_FR.inc
new file mode 100644
index 000000000..78522c2e1
--- /dev/null
+++ b/plugins/attachment_reminder/localization/fr_FR.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$messages['forgotattachment'] = "Avez vous oublié d'attacher un fichier ?";
+$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['keywords'] = "joins,joint,attaché,CV";
diff --git a/plugins/attachment_reminder/localization/it_IT.inc b/plugins/attachment_reminder/localization/it_IT.inc
new file mode 100644
index 000000000..d326a6065
--- /dev/null
+++ b/plugins/attachment_reminder/localization/it_IT.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$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['keywords'] = "allegato,allegati,allegata,allegate,allega,allego,alleghi,attaccato,file,attachment,attach";
diff --git a/plugins/attachment_reminder/localization/lb_LU.inc b/plugins/attachment_reminder/localization/lb_LU.inc
new file mode 100644
index 000000000..cdfe031d1
--- /dev/null
+++ b/plugins/attachment_reminder/localization/lb_LU.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/attachment_reminder/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Archive plugin |
+ | Copyright (C) 2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-attachment_reminder/
+*/
+
+$messages = 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/nl_NL.inc b/plugins/attachment_reminder/localization/nl_NL.inc
new file mode 100644
index 000000000..d80bfe9a9
--- /dev/null
+++ b/plugins/attachment_reminder/localization/nl_NL.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$messages['forgotattachment'] = "Ben je vergeten het bestand bij te voegen?";
+$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['keywords'] = "attachment,bestand,bijgaand,bijgaande,brief,bijgevoegd,bijgesloten,CV";
diff --git a/plugins/attachment_reminder/localization/pl_PL.inc b/plugins/attachment_reminder/localization/pl_PL.inc
new file mode 100644
index 000000000..96f4f4989
--- /dev/null
+++ b/plugins/attachment_reminder/localization/pl_PL.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$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/zh_CN.inc b/plugins/attachment_reminder/localization/zh_CN.inc
new file mode 100644
index 000000000..367191ffb
--- /dev/null
+++ b/plugins/attachment_reminder/localization/zh_CN.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$messages['forgotattachment'] = "您似乎忘記加入附件了,你確定要寄出?";
+$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['keywords'] = "附件,附加,附檔,附上,附加檔案";
diff --git a/plugins/attachment_reminder/localization/zh_TW.inc b/plugins/attachment_reminder/localization/zh_TW.inc
new file mode 100644
index 000000000..367191ffb
--- /dev/null
+++ b/plugins/attachment_reminder/localization/zh_TW.inc
@@ -0,0 +1,6 @@
+<?php
+
+$messages = array();
+$messages['forgotattachment'] = "您似乎忘記加入附件了,你確定要寄出?";
+$messages['reminderoption'] = "Remind about forgotten attachments";
+$messages['keywords'] = "附件,附加,附檔,附上,附加檔案";
diff --git a/plugins/attachment_reminder/package.xml b/plugins/attachment_reminder/package.xml
new file mode 100644
index 000000000..78768d534
--- /dev/null
+++ b/plugins/attachment_reminder/package.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+ http://pear.php.net/dtd/tasks-1.0.xsd
+ http://pear.php.net/dtd/package-2.0
+ http://pear.php.net/dtd/package-2.0.xsd">
+ <name>Attachment Reminder</name>
+ <summary>Roundcube plugin that prompts you if it looks like you wanted to attach a file but you didn't.</summary>
+ <description>
+ This Roundcube plugin reminds the user to attach a file if the composed message text indicates that there should be any.
+ </description>
+ <lead>
+ <name>Aleksander Machniak</name>
+ <user>alec</user>
+ <email>alec@alec.pl</email>
+ <active>yes</active>
+ </lead>
+ <lead>
+ <name>Thomas Yu - Sian, Liu</name>
+ <active>yes</active>
+ </lead>
+ <date>2013-05-20</date>
+ <version>
+ <release>1.1</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>-</notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file name="attachment_reminder.php" role="php">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+ <file name="attachment_reminder.js" role="data">
+ <tasks:replace from="@name@" to="name" type="package-info"/>
+ <tasks:replace from="@package_version@" to="version" type="package-info"/>
+ </file>
+
+ <file name="localization/de_CH.inc" role="data"></file>
+ <file name="localization/de_DE.inc" role="data"></file>
+ <file name="localization/en_US.inc" role="data"></file>
+ <file name="localization/es_ES.inc" role="data"></file>
+ <file name="localization/fr_FR.inc" role="data"></file>
+ <file name="localization/it_IT.inc" role="data"></file>
+ <file name="localization/nl_NL.inc" role="data"></file>
+ <file name="localization/pl_PL.inc" role="data"></file>
+ <file name="localization/zh_CN.inc" role="data"></file>
+ <file name="localization/zh_TW.inc" role="data"></file>
+ </dir>
+ <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.1</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <phprelease/>
+</package>
diff --git a/plugins/autologon/autologon.php b/plugins/autologon/autologon.php
index 63ffb943e..9c7d5b6fc 100644
--- a/plugins/autologon/autologon.php
+++ b/plugins/autologon/autologon.php
@@ -19,8 +19,6 @@ 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';
@@ -37,7 +35,7 @@ class autologon extends rcube_plugin
$args['cookiecheck'] = false;
$args['valid'] = true;
}
-
+
return $args;
}
diff --git a/plugins/database_attachments/config.inc.php.dist b/plugins/database_attachments/config.inc.php.dist
new file mode 100644
index 000000000..b23a9a1be
--- /dev/null
+++ b/plugins/database_attachments/config.inc.php.dist
@@ -0,0 +1,12 @@
+<?php
+
+// By default this plugin stores attachments in filesystem
+// and copies them into sql database.
+// You can change it to use 'memcache' or 'apc'.
+$rcmail_config['database_attachments_cache'] = 'db';
+
+// Attachment data expires after specied TTL time in seconds (max.2592000).
+// Default is 12 hours.
+$rcmail_config['database_attachments_cache_ttl'] = 12 * 60 * 60;
+
+?>
diff --git a/plugins/database_attachments/database_attachments.php b/plugins/database_attachments/database_attachments.php
index 2511dbbb2..47e2b5222 100644
--- a/plugins/database_attachments/database_attachments.php
+++ b/plugins/database_attachments/database_attachments.php
@@ -1,6 +1,6 @@
<?php
/**
- * Filesystem Attachments
+ * Database Attachments
*
* This plugin which provides database backed storage for temporary
* attachment file handling. The primary advantage of this plugin
@@ -16,18 +16,11 @@
require_once('plugins/filesystem_attachments/filesystem_attachments.php');
class database_attachments extends filesystem_attachments
{
+ // Cache object
+ protected $cache;
// A prefix for the cache key used in the session and in the key field of the cache table
- private $cache_prefix = "db_attach";
-
- /**
- * Helper method to generate a unique key for the given attachment file
- */
- private function _key($args)
- {
- $uname = $args['path'] ? $args['path'] : $args['name'];
- return $this->cache_prefix . $args['group'] . md5(mktime() . $uname . $_SESSION['user_id']);
- }
+ protected $prefix = "db_attach";
/**
* Save a newly uploaded attachment
@@ -35,23 +28,17 @@ class database_attachments extends filesystem_attachments
function upload($args)
{
$args['status'] = false;
- $rcmail = rcmail::get_instance();
- $key = $this->_key($args);
- $data = file_get_contents($args['path']);
+ $cache = $this->get_cache();
+ $key = $this->_key($args);
+ $data = file_get_contents($args['path']);
- if ($data === false)
+ if ($data === false) {
return $args;
+ }
- $data = base64_encode($data);
-
- $status = $rcmail->db->query(
- "INSERT INTO ".$rcmail->db->table_name('cache')
- ." (created, user_id, cache_key, data)"
- ." VALUES (".$rcmail->db->now().", ?, ?, ?)",
- $_SESSION['user_id'],
- $key,
- $data);
+ $data = base64_encode($data);
+ $status = $cache->write($key, $data);
if ($status) {
$args['id'] = $key;
@@ -68,26 +55,20 @@ class database_attachments extends filesystem_attachments
function save($args)
{
$args['status'] = false;
- $rcmail = rcmail::get_instance();
- $key = $this->_key($args);
+ $cache = $this->get_cache();
+ $key = $this->_key($args);
if ($args['path']) {
$args['data'] = file_get_contents($args['path']);
- if ($args['data'] === false)
+ if ($args['data'] === false) {
return $args;
+ }
}
- $data = base64_encode($args['data']);
-
- $status = $rcmail->db->query(
- "INSERT INTO ".$rcmail->db->table_name('cache')
- ." (created, user_id, cache_key, data)"
- ." VALUES (".$rcmail->db->now().", ?, ?, ?)",
- $_SESSION['user_id'],
- $key,
- $data);
+ $data = base64_encode($args['data']);
+ $status = $cache->write($key, $data);
if ($status) {
$args['id'] = $key;
@@ -104,13 +85,9 @@ class database_attachments extends filesystem_attachments
function remove($args)
{
$args['status'] = false;
- $rcmail = rcmail::get_instance();
- $status = $rcmail->db->query(
- "DELETE FROM ".$rcmail->db->table_name('cache')
- ." WHERE user_id = ?"
- ." AND cache_key = ?",
- $_SESSION['user_id'],
- $args['id']);
+
+ $cache = $this->get_cache();
+ $status = $cache->remove($args['id']);
if ($status) {
$args['status'] = true;
@@ -135,18 +112,11 @@ class database_attachments extends filesystem_attachments
*/
function get($args)
{
- $rcmail = rcmail::get_instance();
-
- $sql_result = $rcmail->db->query(
- "SELECT data"
- ." FROM ".$rcmail->db->table_name('cache')
- ." WHERE user_id=?"
- ." AND cache_key=?",
- $_SESSION['user_id'],
- $args['id']);
-
- if ($sql_arr = $rcmail->db->fetch_assoc($sql_result)) {
- $args['data'] = base64_decode($sql_arr['data']);
+ $cache = $this->get_cache();
+ $data = $cache->read($args['id']);
+
+ if ($data) {
+ $args['data'] = base64_decode($data);
$args['status'] = true;
}
@@ -158,12 +128,36 @@ class database_attachments extends filesystem_attachments
*/
function cleanup($args)
{
- $prefix = $this->cache_prefix . $args['group'];
- $rcmail = rcmail::get_instance();
- $rcmail->db->query(
- "DELETE FROM ".$rcmail->db->table_name('cache')
- ." WHERE user_id = ?"
- ." AND cache_key LIKE '{$prefix}%'",
- $_SESSION['user_id']);
+ $cache = $this->get_cache();
+ $cache->remove($args['group'], true);
+ }
+
+ /**
+ * Helper method to generate a unique key for the given attachment file
+ */
+ protected function _key($args)
+ {
+ $uname = $args['path'] ? $args['path'] : $args['name'];
+ return $args['group'] . md5(mktime() . $uname . $_SESSION['user_id']);
+ }
+
+ /**
+ * Initialize and return cache object
+ */
+ protected function get_cache()
+ {
+ if (!$this->cache) {
+ $this->load_config();
+
+ $rcmail = rcube::get_instance();
+ $ttl = 12 * 60 * 60; // default: 12 hours
+ $ttl = $rcmail->config->get('database_attachments_cache_ttl', $ttl);
+ $type = $rcmail->config->get('database_attachments_cache', 'db');
+
+ // Init SQL cache (disable cache data serialization)
+ $this->cache = $rcmail->get_cache($this->prefix, 'db', $ttl, false);
+ }
+
+ return $this->cache;
}
}
diff --git a/plugins/database_attachments/package.xml b/plugins/database_attachments/package.xml
index 40db858a4..44adc219e 100644
--- a/plugins/database_attachments/package.xml
+++ b/plugins/database_attachments/package.xml
@@ -5,7 +5,7 @@
http://pear.php.net/dtd/package-2.0.xsd">
<name>database_attachments</name>
<channel>pear.roundcube.net</channel>
- <summary>SQL database storage for uploaded attachments</summary>
+ <summary>Database storage for uploaded attachments</summary>
<description>
This plugin which provides database backed storage for temporary
attachment file handling. The primary advantage of this plugin
@@ -24,9 +24,9 @@
<email>ziba@umich.edu</email>
<active>yes</active>
</developer>
- <date>2011-11-21</date>
+ <date>2013-06-13</date>
<version>
- <release>1.0</release>
+ <release>1.1</release>
<api>1.0</api>
</version>
<stability>
diff --git a/plugins/debug_logger/debug_logger.php b/plugins/debug_logger/debug_logger.php
index 87a163785..deb6deb91 100644
--- a/plugins/debug_logger/debug_logger.php
+++ b/plugins/debug_logger/debug_logger.php
@@ -12,7 +12,7 @@
* which can redirect messages to files. The resulting log files
* provide timing and tag quantity results.
*
- * Enable the plugin in config/main.inc.php and add your desired
+ * Enable the plugin in config.inc.php and add your desired
* log types and files.
*
* @version @package_version@
@@ -21,7 +21,7 @@
*
* Example:
*
- * config/main.inc.php:
+ * config.inc.php:
*
* // $rcmail_config['debug_logger'][type of logging] = name of file in log_dir
* // The 'master' log includes timing information
diff --git a/plugins/debug_logger/runlog/runlog.php b/plugins/debug_logger/runlog/runlog.php
index c9f672615..0c766a13c 100644
--- a/plugins/debug_logger/runlog/runlog.php
+++ b/plugins/debug_logger/runlog/runlog.php
@@ -194,7 +194,7 @@ class runlog {
public function print_totals(){
$totals = array();
- foreach ( $this->run_log as $k => $entry ) {
+ foreach ($this->run_log as $entry) {
if ( $entry['type'] == 'start' && $entry['ended'] == true) {
$totals[$entry['value']]['duration'] += $entry['duration'];
$totals[$entry['value']]['count'] += 1;
diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php
index c96b94620..25520a27d 100644
--- a/plugins/enigma/enigma.php
+++ b/plugins/enigma/enigma.php
@@ -47,6 +47,8 @@ class enigma extends rcube_plugin
$rcmail = rcmail::get_instance();
$this->rc = $rcmail;
+ $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET);
+
if ($this->rc->task == 'mail') {
// message parse/display hooks
$this->add_hook('message_part_structure', array($this, 'parse_structure'));
@@ -79,7 +81,6 @@ class enigma extends rcube_plugin
$this->register_action('plugin.enigma', array($this, 'preferences_ui'));
// grab keys/certs management iframe requests
- $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET);
if ($this->rc->action == 'edit-prefs' && preg_match('/^enigma(certs|keys)/', $section)) {
$this->load_ui();
$this->ui->init($section);
@@ -148,7 +149,7 @@ class enigma extends rcube_plugin
*/
function parse_structure($p)
{
- $struct = $p['structure'];
+// $struct = $p['structure'];
if ($p['mimetype'] == 'text/plain' || $p['mimetype'] == 'application/pgp') {
$this->parse_plain($p);
@@ -390,7 +391,7 @@ class enigma extends rcube_plugin
function message_load($p)
{
$this->message = $p['object'];
-
+
// handle attachments vcard attachments
foreach ((array)$this->message->attachments as $attachment) {
if ($this->is_keys_part($attachment)) {
@@ -398,7 +399,7 @@ class enigma extends rcube_plugin
}
}
// the same with message bodies
- foreach ((array)$this->message->parts as $idx => $part) {
+ foreach ((array)$this->message->parts as $part) {
if ($this->is_keys_part($part)) {
$this->keys_parts[] = $part->mime_id;
$this->keys_bodies[] = $part->mime_id;
diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php
index 220d6c0b3..8a64c07ff 100644
--- a/plugins/enigma/lib/enigma_engine.php
+++ b/plugins/enigma/lib/enigma_engine.php
@@ -374,17 +374,15 @@ class enigma_engine
{
// @TODO: Handle big bodies using (temp) files
// @TODO: caching of verification result
-
- $sig = $this->pgp_driver->verify($msg_body, $sig_body);
+ $sig = $this->pgp_driver->verify($msg_body, $sig_body);
- if (($sig instanceof enigma_error) && $sig->getCode() != enigma_error::E_KEYNOTFOUND)
- rcube::raise_error(array(
+ if (($sig instanceof enigma_error) && $sig->getCode() != enigma_error::E_KEYNOTFOUND)
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Enigma plugin: " . $error->getMessage()
+ 'message' => "Enigma plugin: " . $sig->getMessage()
), true, false);
-//print_r($sig);
return $sig;
}
@@ -399,11 +397,9 @@ class enigma_engine
{
// @TODO: Handle big bodies using (temp) files
// @TODO: caching of verification result
-
+ $key = ''; $pass = ''; // @TODO
$result = $this->pgp_driver->decrypt($msg_body, $key, $pass);
-//print_r($result);
-
if ($result instanceof enigma_error) {
$err_code = $result->getCode();
if (!in_array($err_code, array(enigma_error::E_KEYNOTFOUND, enigma_error::E_BADPASS)))
@@ -430,7 +426,7 @@ class enigma_engine
{
$this->load_pgp_driver();
$result = $this->pgp_driver->list_keys($pattern);
-
+
if ($result instanceof enigma_error) {
rcube::raise_error(array(
'code' => 600, 'type' => 'php',
@@ -438,7 +434,7 @@ class enigma_engine
'message' => "Enigma plugin: " . $result->getMessage()
), true, false);
}
-
+
return $result;
}
@@ -501,9 +497,11 @@ class enigma_engine
$uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
$mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
$mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST);
+ $storage = $this->rc->get_storage();
if ($uid && $mime_id) {
- $part = $this->rc->storage->get_message_part($uid, $mime_id);
+ $storage->set_folder($mbox);
+ $part = $storage->get_message_part($uid, $mime_id);
}
if ($part && is_array($result = $this->import_key($part))) {
@@ -532,16 +530,4 @@ class enigma_engine
$uid, $part->mime_id, $part);
}
}
-
- /**
- * Adds CSS style file to the page header.
- */
- private function add_css()
- {
- $skin = $this->rc->config->get('skin');
- if (!file_exists($this->home . "/skins/$skin/enigma.css"))
- $skin = 'default';
-
- $this->include_stylesheet("skins/$skin/enigma.css");
- }
}
diff --git a/plugins/enigma/lib/enigma_ui.php b/plugins/enigma/lib/enigma_ui.php
index 47366b7e8..adb619d0c 100644
--- a/plugins/enigma/lib/enigma_ui.php
+++ b/plugins/enigma/lib/enigma_ui.php
@@ -176,8 +176,7 @@ class enigma_ui
$search = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GPC);
// define list of cols to be displayed
- $a_show_cols = array('name');
- $result = array();
+// $a_show_cols = array('name');
// Get the list
$list = $this->enigma->engine->list_keys($search);
@@ -200,7 +199,7 @@ class enigma_ui
$size = count($list);
// Add rows
- foreach($list as $idx => $key) {
+ foreach ($list as $key) {
$this->rc->output->command('enigma_add_list_row',
array('name' => rcube::Q($key->name), 'id' => $key->id));
}
diff --git a/plugins/enigma/skins/classic/templates/keys.html b/plugins/enigma/skins/classic/templates/keys.html
index 4271eccb7..f581c457b 100644
--- a/plugins/enigma/skins/classic/templates/keys.html
+++ b/plugins/enigma/skins/classic/templates/keys.html
@@ -13,7 +13,7 @@
}
</style>
</head>
-<body class="iframe" onload="rcube_init_mail_ui()">
+<body class="iframe">
<div id="prefs-title" class="boxtitle"><roundcube:label name="enigma.enigmakeys" /></div>
<div id="prefs-details" class="boxcontent">
@@ -72,5 +72,9 @@
</ul>
</div>
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/plugins/example_addressbook/example_addressbook.php b/plugins/example_addressbook/example_addressbook.php
index a15461f44..31077adf7 100644
--- a/plugins/example_addressbook/example_addressbook.php
+++ b/plugins/example_addressbook/example_addressbook.php
@@ -5,6 +5,9 @@ require_once(dirname(__FILE__) . '/example_addressbook_backend.php');
/**
* Sample plugin to add a new address book
* with just a static list of contacts
+ *
+ * @license GNU GPLv3+
+ * @author Thomas Bruederli
*/
class example_addressbook extends rcube_plugin
{
diff --git a/plugins/filesystem_attachments/filesystem_attachments.php b/plugins/filesystem_attachments/filesystem_attachments.php
index fa147795f..8d995ca0d 100644
--- a/plugins/filesystem_attachments/filesystem_attachments.php
+++ b/plugins/filesystem_attachments/filesystem_attachments.php
@@ -13,6 +13,7 @@
* require_once('plugins/filesystem_attachments/filesystem_attachments.php');
* class myCustom_attachments extends filesystem_attachments
*
+ * @license GNU GPLv3+
* @author Ziba Scott <ziba@umich.edu>
* @author Thomas Bruederli <roundcube@gmail.com>
*
@@ -60,6 +61,7 @@ class filesystem_attachments extends rcube_plugin
$args['id'] = $this->file_id();
$args['path'] = $tmpfname;
$args['status'] = true;
+ @chmod($tmpfname, 0600); // set correct permissions (#1488996)
// Note the file for later cleanup
$_SESSION['plugins']['filesystem_attachments'][$group][] = $tmpfname;
diff --git a/plugins/filesystem_attachments/package.xml b/plugins/filesystem_attachments/package.xml
index 031a74297..49ec51934 100644
--- a/plugins/filesystem_attachments/package.xml
+++ b/plugins/filesystem_attachments/package.xml
@@ -34,7 +34,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/help/config.inc.php.dist b/plugins/help/config.inc.php.dist
index d440dbbcc..1dbc21753 100644
--- a/plugins/help/config.inc.php.dist
+++ b/plugins/help/config.inc.php.dist
@@ -1,5 +1,35 @@
<?php
// Help content iframe source
-// $rcmail_config['help_source'] = 'http://trac.roundcube.net/wiki';
-$rcmail_config['help_source'] = '';
+// %l will be replaced by the language code resolved using the 'help_language_map' option
+$rcmail_config['help_source'] = 'http://roundcube.net/doc/help/0.9/%l/';
+
+// Map task/action combinations to deep-links
+// Use '<task>/<action>' or only '<task>' strings as keys
+// The values will be appended to the 'help_source' URL
+$rcmail_config['help_index_map'] = array(
+ 'login' => 'login.html',
+ 'mail' => 'mail/index.html',
+ 'mail/compose' => 'mail/compose.html',
+ 'addressbook' => 'addressbook/index.html',
+ 'settings' => 'settings/index.html',
+ 'settings/preferences' => 'settings/preferences.html',
+ 'settings/folders' => 'settings/folders.html',
+ 'settings/identities' => 'settings/identities.html',
+);
+
+// Map to translate Roundcube language codes into help document languages
+// The '*' entry will be used as default
+$rcmail_config['help_language_map'] = array('*' => 'en_US');
+
+// Enter an absolute URL to a page displaying information about this webmail
+// Alternatively, create a HTML file under <this-plugin-dir>/content/about.html
+$rcmail_config['help_about_url'] = null;
+
+// Enter an absolute URL to a page displaying information about this webmail
+// Alternatively, put your license text to <this-plugin-dir>/content/license.html
+$rcmail_config['help_license_url'] = null;
+
+// Determine whether to open the help in a new window
+$rcmail_config['help_open_extwin'] = false;
+
diff --git a/plugins/help/content/about.html b/plugins/help/content/about.html
deleted file mode 100644
index 6e9632bec..000000000
--- a/plugins/help/content/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<div id="helpabout" class="readtext">
-<h2 align="center">Copyright &copy; 2005-2012, The Roundcube Dev Team</h2>
-
-<p>
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License (with exceptions
-for skins &amp; plugins) as published by the Free Software Foundation,
-either version 3 of the License, or (at your option) any later version.
-</p>
-<p>
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-</p>
-<p>
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a>.
-</p>
-
-<p>
-For more details about licensing and the expections for skins and plugins
-see <a href="http://roundcube.net/license">roundcube.net/license</a>.
-</p>
-
-<p><br/>Website: <a href="http://roundcube.net">roundcube.net</a></p>
-</div>
diff --git a/plugins/help/content/license.html b/plugins/help/content/license.html
index 371dbffe1..9034d46f8 100644
--- a/plugins/help/content/license.html
+++ b/plugins/help/content/license.html
@@ -655,7 +655,7 @@ the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
</pre>
<p>Also add information on how to contact you by electronic and paper mail.</p>
diff --git a/plugins/help/help.js b/plugins/help/help.js
new file mode 100644
index 000000000..59a93c537
--- /dev/null
+++ b/plugins/help/help.js
@@ -0,0 +1,25 @@
+/*
+ * Help plugin client script
+ * @version 1.4
+ */
+
+// hook into switch-task event to open the help window
+if (window.rcmail) {
+ rcmail.addEventListener('beforeswitch-task', function(prop) {
+ // catch clicks to help task button
+ if (prop == 'help') {
+ if (rcmail.task == 'help') // we're already there
+ return false;
+
+ var url = rcmail.url('help/index', { _rel: rcmail.task + (rcmail.env.action ? '/'+rcmail.env.action : '') });
+ if (rcmail.env.help_open_extwin) {
+ rcmail.open_window(url, 1020, false);
+ }
+ else {
+ rcmail.redirect(url, false);
+ }
+
+ return false;
+ }
+ });
+}
diff --git a/plugins/help/help.php b/plugins/help/help.php
index 4b11dceb3..37fd908a3 100644
--- a/plugins/help/help.php
+++ b/plugins/help/help.php
@@ -1,9 +1,10 @@
<?php
/**
- * Help Plugin
+ * Roundcube Help Plugin
*
* @author Aleksander 'A.L.E.C' Machniak
+ * @author Thomas Bruederli <thomas@roundcube.net>
* @license GNU GPLv3+
*
* Configuration (see config.inc.php.dist)
@@ -21,8 +22,7 @@ class help extends rcube_plugin
function init()
{
- $rcmail = rcmail::get_instance();
-
+ $this->load_config();
$this->add_texts('localization/', false);
// register task
@@ -33,6 +33,8 @@ class help extends rcube_plugin
$this->register_action('about', array($this, 'action'));
$this->register_action('license', array($this, 'action'));
+ $rcmail = rcmail::get_instance();
+
// add taskbar button
$this->add_button(array(
'command' => 'help',
@@ -42,6 +44,9 @@ class help extends rcube_plugin
'label' => 'help.help',
), 'taskbar');
+ $this->include_script('help.js');
+ $rcmail->output->set_env('help_open_extwin', $rcmail->config->get('help_open_extwin', false), true);
+
// add style for taskbar button (must be here) and Help UI
$skin_path = $this->local_skin_path();
if (is_file($this->home . "/$skin_path/help.css")) {
@@ -53,11 +58,10 @@ class help extends rcube_plugin
{
$rcmail = rcmail::get_instance();
- $this->load_config();
-
// register UI objects
$rcmail->output->add_handlers(array(
'helpcontent' => array($this, 'content'),
+ 'tablink' => array($this, 'tablink'),
));
if ($rcmail->action == 'about')
@@ -70,20 +74,52 @@ class help extends rcube_plugin
$rcmail->output->send('help.help');
}
+ function tablink($attrib)
+ {
+ $rcmail = rcmail::get_instance();
+ $attrib['name'] = 'helplink' . $attrib['action'];
+ $attrib['href'] = $rcmail->url(array('_action' => $attrib['action'], '_extwin' => !empty($_REQUEST['_extwin']) ? 1 : null));
+ return $rcmail->output->button($attrib);
+ }
+
function content($attrib)
{
$rcmail = rcmail::get_instance();
- if ($rcmail->action == 'about') {
- return @file_get_contents($this->home.'/content/about.html');
- }
- else if ($rcmail->action == 'license') {
- return @file_get_contents($this->home.'/content/license.html');
+ switch ($rcmail->action) {
+ case 'about':
+ if (is_readable($this->home . '/content/about.html')) {
+ return @file_get_contents($this->home . '/content/about.html');
+ }
+ $default = $rcmail->url(array('_task' => 'settings', '_action' => 'about', '_framed' => 1));
+ $src = $rcmail->config->get('help_about_url', $default);
+ break;
+
+ case 'license':
+ if (is_readable($this->home . '/content/license.html')) {
+ return @file_get_contents($this->home . '/content/license.html');
+ }
+ $src = $rcmail->config->get('help_license_url', 'http://www.gnu.org/licenses/gpl-3.0-standalone.html');
+ break;
+
+ default:
+ $src = $rcmail->config->get('help_source');
+
+ // resolve task/action for depp linking
+ $index_map = $rcmail->config->get('help_index_map', array());
+ $rel = $_REQUEST['_rel'];
+ list($task,$action) = explode('/', $rel);
+ if ($add = $index_map[$rel])
+ $src .= $add;
+ else if ($add = $index_map[$task])
+ $src .= $add;
+ break;
}
// default content: iframe
- if ($src = $rcmail->config->get('help_source'))
- $attrib['src'] = $src;
+ if (!empty($src)) {
+ $attrib['src'] = $this->resolve_language($src);
+ }
if (empty($attrib['id']))
$attrib['id'] = 'rcmailhelpcontent';
@@ -93,4 +129,13 @@ class help extends rcube_plugin
return $rcmail->output->frame($attrib);
}
+
+ private function resolve_language($path)
+ {
+ // resolve language placeholder
+ $rcmail = rcmail::get_instance();
+ $langmap = $rcmail->config->get('help_language_map', array('*' => 'en_US'));
+ $lang = !empty($langmap[$_SESSION['language']]) ? $langmap[$_SESSION['language']] : $langmap['*'];
+ return str_replace('%l', $lang, $path);
+ }
}
diff --git a/plugins/help/localization/de_DE.inc b/plugins/help/localization/de_DE.inc
index 70c50646e..250657da6 100644
--- a/plugins/help/localization/de_DE.inc
+++ b/plugins/help/localization/de_DE.inc
@@ -18,7 +18,7 @@
$labels = array();
$labels['help'] = 'Hilfe';
-$labels['about'] = '&Uuml;ber';
+$labels['about'] = 'Über';
$labels['license'] = 'Lizenz';
?>
diff --git a/plugins/help/localization/gl_ES.inc b/plugins/help/localization/gl_ES.inc
index 432623751..e3e9e36ca 100644
--- a/plugins/help/localization/gl_ES.inc
+++ b/plugins/help/localization/gl_ES.inc
@@ -19,6 +19,6 @@
$labels = array();
$labels['help'] = 'Axuda';
$labels['about'] = 'Acerca de';
-$labels['license'] = 'Licencia';
+$labels['license'] = 'Licenza';
?>
diff --git a/plugins/help/localization/ko_KR.inc b/plugins/help/localization/ko_KR.inc
index a589d0ce1..836da6639 100644
--- a/plugins/help/localization/ko_KR.inc
+++ b/plugins/help/localization/ko_KR.inc
@@ -19,6 +19,6 @@
$labels = array();
$labels['help'] = '도움말';
$labels['about'] = '정보';
-$labels['license'] = '라이센스';
+$labels['license'] = '라이선스';
?>
diff --git a/plugins/help/localization/lb_LU.inc b/plugins/help/localization/lb_LU.inc
new file mode 100644
index 000000000..0a7ec6eef
--- /dev/null
+++ b/plugins/help/localization/lb_LU.inc
@@ -0,0 +1,24 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/help/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Help plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/
+*/
+
+$labels = array();
+$labels['help'] = 'Hëllef';
+$labels['about'] = 'Iwwert';
+$labels['license'] = 'Lizenz';
+
+?>
diff --git a/plugins/help/localization/zh_CN.inc b/plugins/help/localization/zh_CN.inc
index 5d6272eea..59719477b 100644
--- a/plugins/help/localization/zh_CN.inc
+++ b/plugins/help/localization/zh_CN.inc
@@ -19,6 +19,6 @@
$labels = array();
$labels['help'] = '帮助';
$labels['about'] = '关于';
-$labels['license'] = '许可协议';
+$labels['license'] = '授权信息';
?>
diff --git a/plugins/help/package.xml b/plugins/help/package.xml
index 889efd17d..d39143ba1 100644
--- a/plugins/help/package.xml
+++ b/plugins/help/package.xml
@@ -5,7 +5,7 @@
http://pear.php.net/dtd/package-2.0.xsd">
<name>help</name>
<channel>pear.roundcube.net</channel>
- <summary>Help for Roundcube</summary>
+ <summary>Online Help for Roundcube</summary>
<description>Plugin adds a new item (Help) in taskbar.</description>
<lead>
<name>Aleksander Machniak</name>
@@ -13,10 +13,10 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2012-11-11</date>
+ <date>2013-07-03</date>
<version>
- <release>1.3</release>
- <api>1.2</api>
+ <release>1.4</release>
+ <api>1.4</api>
</version>
<stability>
<release>stable</release>
@@ -31,7 +31,6 @@
<tasks:replace from="@package_version@" to="version" type="package-info"/>
</file>
<file name="config.inc.php.dist" role="data"></file>
- <file name="content/about.html" role="data"></file>
<file name="content/license.html" role="data"></file>
<file name="localization/bs_BA.inc" role="data"></file>
<file name="localization/ca_ES.inc" role="data"></file>
diff --git a/plugins/help/skins/classic/help.css b/plugins/help/skins/classic/help.css
index 8f67f111e..c45b8f0b0 100644
--- a/plugins/help/skins/classic/help.css
+++ b/plugins/help/skins/classic/help.css
@@ -5,9 +5,23 @@
background-image: url('help.gif');
}
+.extwin #tabsbar
+{
+ top: 21px;
+ left: 20px;
+ right: 100px;
+ border-bottom: 0;
+}
+
+.closelink {
+ position: absolute;
+ top: 20px;
+ right: 20px;
+}
+
.help-box
{
- overflow: auto;
+ overflow: auto;
background-color: #F2F2F2;
}
diff --git a/plugins/help/skins/classic/templates/help.html b/plugins/help/skins/classic/templates/help.html
index 2e430ecf3..3d5b22869 100644
--- a/plugins/help/skins/classic/templates/help.html
+++ b/plugins/help/skins/classic/templates/help.html
@@ -7,23 +7,28 @@
<script type="text/javascript">
function help_init_settings_tabs()
{
- var action, tab = '#helptabdefault';
+ var action, tab = '#helptabindex';
if (window.rcmail && (action = rcmail.env.action)) {
- tab = '#helptab' + (action ? action : 'default');
+ tab = '#helptab' + (action ? action : 'index');
}
$(tab).addClass('tablink-selected');
}
</script>
</head>
+<roundcube:if condition="env:extwin" />
+<body class="extwin">
+<roundcube:object name="message" id="message" />
+<roundcube:button name="close" type="link" label="close" class="closelink" onclick="self.close()" />
+<roundcube:else />
<body>
-
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
+<roundcube:endif />
<div id="tabsbar">
-<span id="helptabdefault" class="tablink"><roundcube:button name="helpdefault" href="?_task=help" type="link" label="help.help" title="help.help" /></span>
-<span id="helptababout" class="tablink"><roundcube:button name="helpabout" href="?_task=help&_action=about" type="link" label="help.about" title="help.about" class="tablink" /></span>
-<span id="helptablicense" class="tablink"><roundcube:button name="helplicense" href="?_task=help&_action=license" type="link" label="help.license" title="help.license" class="tablink" /></span>
+<span id="helptabindex" class="tablink"><roundcube:object name="tablink" action="index" type="link" label="help.help" title="help.help" /></span>
+<span id="helptababout" class="tablink"><roundcube:object name="tablink" action="about" type="link" label="help.about" title="help.about" class="tablink" /></span>
+<span id="helptablicense" class="tablink"><roundcube:object name="tablink" action="license" type="link" label="help.license" title="help.license" class="tablink" /></span>
<roundcube:container name="helptabs" id="helptabsbar" />
<script type="text/javascript"> if (window.rcmail) rcmail.add_onload(help_init_settings_tabs);</script>
</div>
diff --git a/plugins/help/skins/larry/help.css b/plugins/help/skins/larry/help.css
index c2e369af6..d9af6e15e 100644
--- a/plugins/help/skins/larry/help.css
+++ b/plugins/help/skins/larry/help.css
@@ -39,7 +39,6 @@
background: url(help.png) center -130px no-repeat;
}
-.iframebox.help_about,
.iframebox.help_license {
overflow: auto;
}
diff --git a/plugins/help/skins/larry/templates/help.html b/plugins/help/skins/larry/templates/help.html
index 39caaa62f..bfd3f1141 100644
--- a/plugins/help/skins/larry/templates/help.html
+++ b/plugins/help/skins/larry/templates/help.html
@@ -4,16 +4,16 @@
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
</head>
-<body>
+<roundcube:if condition="env:extwin" /><body class="extwin"><roundcube:else /><body><roundcube:endif />
<roundcube:include file="/includes/header.html" />
<div id="mainscreen">
<div id="helptoolbar" class="toolbar">
-<roundcube:button name="helpdefault" href="?_task=help" type="link" label="help.help" title="help.help" class="button help" />
-<roundcube:button name="helpabout" href="?_task=help&amp;_action=about" type="link" label="help.about" title="help.about" class="button about" />
-<roundcube:button name="helplicense" href="?_task=help&amp;_action=license" type="link" label="help.license" title="help.license" class="button license" />
+<roundcube:object name="tablink" action="index" type="link" label="help.help" title="help.help" class="button help" />
+<roundcube:object name="tablink" action="about" type="link" label="help.about" title="help.about" class="button about" />
+<roundcube:object name="tablink" action="license" type="link" label="help.license" title="help.license" class="button license" />
<roundcube:container name="helptabs" id="helptabsbar" />
</div>
diff --git a/plugins/hide_blockquote/localization/lb_LU.inc b/plugins/hide_blockquote/localization/lb_LU.inc
new file mode 100644
index 000000000..98e0f6936
--- /dev/null
+++ b/plugins/hide_blockquote/localization/lb_LU.inc
@@ -0,0 +1,24 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/hide_blockquote/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Hide-Blockquote plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/
+*/
+
+$labels = array();
+$labels['hide'] = 'Verstoppen';
+$labels['show'] = 'Weisen';
+$labels['quotelimit'] = 'Zitat verstoppe wann d\'Zeilenunzuel méi grouss ass ewéi';
+
+?>
diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php
index 57227cb03..2631537a0 100644
--- a/plugins/http_authentication/http_authentication.php
+++ b/plugins/http_authentication/http_authentication.php
@@ -52,7 +52,7 @@ class http_authentication extends rcube_plugin
$this->load_config();
$host = rcmail::get_instance()->config->get('http_authentication_host');
- if (is_string($host) && trim($host) !== '')
+ if (is_string($host) && trim($host) !== '' && empty($args['host']))
$args['host'] = rcube_utils::idn_to_ascii(rcube_utils::parse_host($host));
// Allow entering other user data in login form,
diff --git a/plugins/jqueryui/jqueryui.php b/plugins/jqueryui/jqueryui.php
index db640d1aa..e9b3c215e 100644
--- a/plugins/jqueryui/jqueryui.php
+++ b/plugins/jqueryui/jqueryui.php
@@ -8,6 +8,7 @@
* @version 1.9.1
* @author Cor Bosman <roundcube@wa.ter.net>
* @author Thomas Bruederli <roundcube@gmail.com>
+ * @license GNU GPLv3+
*/
class jqueryui extends rcube_plugin
{
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index 32d87a0d8..daee91a70 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -1,4 +1,9 @@
- Add vacation-seconds extension support (RFC 6131)
+- Several script parser code improvements
+- Support string list arguments in filter form (#1489018)
+- Support date, currendate and index tests - RFC5260 (#1488120)
+- Split plugin file into two files
+- Fix handling of &, <, > characters in scripts/filter names (#1489208)
* version 6.2 [2013-02-17]
-----------------------------------------------------------
@@ -205,18 +210,18 @@
- Added it_IT localization
* version 1.1 [2009-05-27]
------------------------------------------------------------
+-----------------------------------------------------------
- Added new icons
- Added support for headers lists (coma-separated) in rules
- Added de_CH localization
* version 1.0 [2009-05-21]
------------------------------------------------------------
+-----------------------------------------------------------
- Rewritten using plugin API
- Added hu_HU localization (Tamas Tevesz)
* version beta7 (svn-r2300) [2009-03-01]
------------------------------------------------------------
+-----------------------------------------------------------
- Added SquirrelMail script auto-import (Jonathan Ernst)
- Added 'vacation' support (Jonathan Ernst & alec)
- Added 'stop' support (Jonathan Ernst)
@@ -225,47 +230,47 @@
- Small style fixes
* version 0.2-stable1 (svn-r2205) [2009-01-03]
------------------------------------------------------------
+-----------------------------------------------------------
- Fix moving down filter row
- Fixes for compressed js files in stable release package
- Created patch for svn version r2205
* version 0.2-stable [2008-12-31]
------------------------------------------------------------
+-----------------------------------------------------------
- Added ru_RU, fr_FR, zh_CN translation
- Fixes for Roundcube 0.2-stable
-* version rc0.2beta [2008-09-21]
------------------------------------------------------------
+* version 0.2-beta [2008-09-21]
+-----------------------------------------------------------
- Small css fixes for IE
- Fixes for Roundcube 0.2-beta
* version beta6 [2008-08-08]
------------------------------------------------------------
+-----------------------------------------------------------
- Added de_DE translation
- Fix for Roundcube r1634
* version beta5 [2008-06-10]
------------------------------------------------------------
+-----------------------------------------------------------
- Fixed 'exists' operators
- Fixed 'not*' operators for custom headers
- Fixed filters deleting
* version beta4 [2008-06-09]
------------------------------------------------------------
+-----------------------------------------------------------
- Fix for Roundcube r1490
* version beta3 [2008-05-22]
------------------------------------------------------------
+-----------------------------------------------------------
- Fixed textarea error class setting
- Added pagetitle setting
- Added option 'managesieve_replace_delimiter'
- Fixed errors on IE (still need some css fixes)
-
+
* version beta2 [2008-05-20]
------------------------------------------------------------
+-----------------------------------------------------------
- Use 'if' only for first filter and 'elsif' for the rest
* version beta1 [2008-05-15]
------------------------------------------------------------
+-----------------------------------------------------------
- Initial version for Roundcube r1388.
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve.php b/plugins/managesieve/lib/Roundcube/rcube_sieve.php
index a04e3c2a4..3bd2978da 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve.php
@@ -6,18 +6,18 @@
* Copyright (C) 2008-2011, The Roundcube Dev Team
* Copyright (C) 2011, Kolab Systems AG
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
+ * 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
*/
// Managesieve Protocol: RFC5804
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
new file mode 100644
index 000000000..e92ba04d6
--- /dev/null
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -0,0 +1,2122 @@
+<?php
+
+/**
+ * Managesieve (Sieve Filters) Engine
+ *
+ * Engine part of Managesieve plugin implementing UI and backend access.
+ *
+ * Copyright (C) 2008-2013, The Roundcube Dev Team
+ * Copyright (C) 2011-2013, Kolab Systems AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+class rcube_sieve_engine
+{
+ private $rc;
+ private $sieve;
+ private $errors;
+ private $form;
+ private $tips = array();
+ private $script = array();
+ private $exts = array();
+ private $list;
+ private $active = array();
+ private $headers = array(
+ 'subject' => 'Subject',
+ 'from' => 'From',
+ 'to' => 'To',
+ );
+ private $addr_headers = array(
+ // Required
+ "from", "to", "cc", "bcc", "sender", "resent-from", "resent-to",
+ // Additional (RFC 822 / RFC 2822)
+ "reply-to", "resent-reply-to", "resent-sender", "resent-cc", "resent-bcc",
+ // Non-standard (RFC 2076, draft-palme-mailext-headers-08.txt)
+ "for-approval", "for-handling", "for-comment", "apparently-to", "errors-to",
+ "delivered-to", "return-receipt-to", "x-admin", "read-receipt-to",
+ "x-confirm-reading-to", "return-receipt-requested",
+ "registered-mail-reply-requested-by", "mail-followup-to", "mail-reply-to",
+ "abuse-reports-to", "x-complaints-to", "x-report-abuse-to",
+ // Undocumented
+ "x-beenthere",
+ );
+
+ const VERSION = '7.0';
+ const PROGNAME = 'Roundcube (Managesieve)';
+ const PORT = 4190;
+
+
+ /**
+ * Class constructor
+ */
+ function __construct($plugin)
+ {
+ $this->rc = rcmail::get_instance();
+ $this->plugin = $plugin;
+ }
+
+ /**
+ * Loads configuration, initializes plugin (including sieve connection)
+ */
+ function start()
+ {
+ // register UI objects
+ $this->rc->output->add_handlers(array(
+ 'filterslist' => array($this, 'filters_list'),
+ 'filtersetslist' => array($this, 'filtersets_list'),
+ 'filterframe' => array($this, 'filter_frame'),
+ 'filterform' => array($this, 'filter_form'),
+ 'filtersetform' => array($this, 'filterset_form'),
+ ));
+
+ // Get connection parameters
+ $host = $this->rc->config->get('managesieve_host', 'localhost');
+ $port = $this->rc->config->get('managesieve_port');
+ $tls = $this->rc->config->get('managesieve_usetls', false);
+
+ $host = rcube_utils::parse_host($host);
+ $host = rcube_utils::idn_to_ascii($host);
+
+ // remove tls:// prefix, set TLS flag
+ if (($host = preg_replace('|^tls://|i', '', $host, 1, $cnt)) && $cnt) {
+ $tls = true;
+ }
+
+ if (empty($port)) {
+ $port = getservbyname('sieve', 'tcp');
+ if (empty($port)) {
+ $port = self::PORT;
+ }
+ }
+
+ $plugin = $this->rc->plugins->exec_hook('managesieve_connect', array(
+ 'user' => $_SESSION['username'],
+ 'password' => $this->rc->decrypt($_SESSION['password']),
+ 'host' => $host,
+ 'port' => $port,
+ 'usetls' => $tls,
+ 'auth_type' => $this->rc->config->get('managesieve_auth_type'),
+ 'disabled' => $this->rc->config->get('managesieve_disabled_extensions'),
+ 'debug' => $this->rc->config->get('managesieve_debug', false),
+ 'auth_cid' => $this->rc->config->get('managesieve_auth_cid'),
+ 'auth_pw' => $this->rc->config->get('managesieve_auth_pw'),
+ ));
+
+ // try to connect to managesieve server and to fetch the script
+ $this->sieve = new rcube_sieve(
+ $plugin['user'],
+ $plugin['password'],
+ $plugin['host'],
+ $plugin['port'],
+ $plugin['auth_type'],
+ $plugin['usetls'],
+ $plugin['disabled'],
+ $plugin['debug'],
+ $plugin['auth_cid'],
+ $plugin['auth_pw']
+ );
+
+ if (!($error = $this->sieve->error())) {
+ // Get list of scripts
+ $list = $this->list_scripts();
+
+ if (!empty($_GET['_set']) || !empty($_POST['_set'])) {
+ $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
+ }
+ else if (!empty($_SESSION['managesieve_current'])) {
+ $script_name = $_SESSION['managesieve_current'];
+ }
+ else {
+ // get (first) active script
+ if (!empty($this->active[0])) {
+ $script_name = $this->active[0];
+ }
+ else if ($list) {
+ $script_name = $list[0];
+ }
+ // create a new (initial) script
+ else {
+ // if script not exists build default script contents
+ $script_file = $this->rc->config->get('managesieve_default');
+ $script_name = $this->rc->config->get('managesieve_script_name');
+
+ if (empty($script_name))
+ $script_name = 'roundcube';
+
+ if ($script_file && is_readable($script_file))
+ $content = file_get_contents($script_file);
+
+ // add script and set it active
+ if ($this->sieve->save_script($script_name, $content)) {
+ $this->activate_script($script_name);
+ $this->list[] = $script_name;
+ }
+ }
+ }
+
+ if ($script_name) {
+ $this->sieve->load($script_name);
+ }
+
+ $error = $this->sieve->error();
+ }
+
+ // finally set script objects
+ if ($error) {
+ switch ($error) {
+ case SIEVE_ERROR_CONNECTION:
+ case SIEVE_ERROR_LOGIN:
+ $this->rc->output->show_message('managesieve.filterconnerror', 'error');
+ break;
+ default:
+ $this->rc->output->show_message('managesieve.filterunknownerror', 'error');
+ break;
+ }
+
+ rcube::raise_error(array('code' => 403, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Unable to connect to managesieve on $host:$port"), true, false);
+
+ // to disable 'Add filter' button set env variable
+ $this->rc->output->set_env('filterconnerror', true);
+ $this->script = array();
+ }
+ else {
+ $this->exts = $this->sieve->get_extensions();
+ $this->script = $this->sieve->script->as_array();
+ $this->rc->output->set_env('currentset', $this->sieve->current);
+ $_SESSION['managesieve_current'] = $this->sieve->current;
+ }
+
+ return $error;
+ }
+
+ function actions()
+ {
+ $error = $this->start();
+
+ // Handle user requests
+ if ($action = rcube_utils::get_input_value('_act', rcube_utils::INPUT_GPC)) {
+ $fid = (int) rcube_utils::get_input_value('_fid', rcube_utils::INPUT_POST);
+
+ if ($action == 'delete' && !$error) {
+ if (isset($this->script[$fid])) {
+ if ($this->sieve->script->delete_rule($fid))
+ $result = $this->save_script();
+
+ if ($result === true) {
+ $this->rc->output->show_message('managesieve.filterdeleted', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'del', array('id' => $fid));
+ } else {
+ $this->rc->output->show_message('managesieve.filterdeleteerror', 'error');
+ }
+ }
+ }
+ else if ($action == 'move' && !$error) {
+ if (isset($this->script[$fid])) {
+ $to = (int) rcube_utils::get_input_value('_to', rcube_utils::INPUT_POST);
+ $rule = $this->script[$fid];
+
+ // remove rule
+ unset($this->script[$fid]);
+ $this->script = array_values($this->script);
+
+ // add at target position
+ if ($to >= count($this->script)) {
+ $this->script[] = $rule;
+ }
+ else {
+ $script = array();
+ foreach ($this->script as $idx => $r) {
+ if ($idx == $to)
+ $script[] = $rule;
+ $script[] = $r;
+ }
+ $this->script = $script;
+ }
+
+ $this->sieve->script->content = $this->script;
+ $result = $this->save_script();
+
+ if ($result === true) {
+ $result = $this->list_rules();
+
+ $this->rc->output->show_message('managesieve.moved', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'list',
+ array('list' => $result, 'clear' => true, 'set' => $to));
+ } else {
+ $this->rc->output->show_message('managesieve.moveerror', 'error');
+ }
+ }
+ }
+ else if ($action == 'act' && !$error) {
+ if (isset($this->script[$fid])) {
+ $rule = $this->script[$fid];
+ $disabled = $rule['disabled'] ? true : false;
+ $rule['disabled'] = !$disabled;
+ $result = $this->sieve->script->update_rule($fid, $rule);
+
+ if ($result !== false)
+ $result = $this->save_script();
+
+ if ($result === true) {
+ if ($rule['disabled'])
+ $this->rc->output->show_message('managesieve.deactivated', 'confirmation');
+ else
+ $this->rc->output->show_message('managesieve.activated', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'update',
+ array('id' => $fid, 'disabled' => $rule['disabled']));
+ } else {
+ if ($rule['disabled'])
+ $this->rc->output->show_message('managesieve.deactivateerror', 'error');
+ else
+ $this->rc->output->show_message('managesieve.activateerror', 'error');
+ }
+ }
+ }
+ else if ($action == 'setact' && !$error) {
+ $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
+ $result = $this->activate_script($script_name);
+ $kep14 = $this->rc->config->get('managesieve_kolab_master');
+
+ if ($result === true) {
+ $this->rc->output->set_env('active_sets', $this->active);
+ $this->rc->output->show_message('managesieve.setactivated', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'setact',
+ array('name' => $script_name, 'active' => true, 'all' => !$kep14));
+ } else {
+ $this->rc->output->show_message('managesieve.setactivateerror', 'error');
+ }
+ }
+ else if ($action == 'deact' && !$error) {
+ $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
+ $result = $this->deactivate_script($script_name);
+
+ if ($result === true) {
+ $this->rc->output->set_env('active_sets', $this->active);
+ $this->rc->output->show_message('managesieve.setdeactivated', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'setact',
+ array('name' => $script_name, 'active' => false));
+ } else {
+ $this->rc->output->show_message('managesieve.setdeactivateerror', 'error');
+ }
+ }
+ else if ($action == 'setdel' && !$error) {
+ $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
+ $result = $this->remove_script($script_name);
+
+ if ($result === true) {
+ $this->rc->output->show_message('managesieve.setdeleted', 'confirmation');
+ $this->rc->output->command('managesieve_updatelist', 'setdel',
+ array('name' => $script_name));
+ $this->rc->session->remove('managesieve_current');
+ } else {
+ $this->rc->output->show_message('managesieve.setdeleteerror', 'error');
+ }
+ }
+ else if ($action == 'setget') {
+ $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
+ $script = $this->sieve->get_script($script_name);
+
+ if (PEAR::isError($script))
+ exit;
+
+ $browser = new rcube_browser;
+
+ // send download headers
+ header("Content-Type: application/octet-stream");
+ header("Content-Length: ".strlen($script));
+
+ if ($browser->ie)
+ header("Content-Type: application/force-download");
+ if ($browser->ie && $browser->ver < 7)
+ $filename = rawurlencode(abbreviate_string($script_name, 55));
+ else if ($browser->ie)
+ $filename = rawurlencode($script_name);
+ else
+ $filename = addcslashes($script_name, '\\"');
+
+ header("Content-Disposition: attachment; filename=\"$filename.txt\"");
+ echo $script;
+ exit;
+ }
+ else if ($action == 'list') {
+ $result = $this->list_rules();
+
+ $this->rc->output->command('managesieve_updatelist', 'list', array('list' => $result));
+ }
+ else if ($action == 'ruleadd') {
+ $rid = rcube_utils::get_input_value('_rid', rcube_utils::INPUT_GPC);
+ $id = $this->genid();
+ $content = $this->rule_div($fid, $id, false);
+
+ $this->rc->output->command('managesieve_rulefill', $content, $id, $rid);
+ }
+ else if ($action == 'actionadd') {
+ $aid = rcube_utils::get_input_value('_aid', rcube_utils::INPUT_GPC);
+ $id = $this->genid();
+ $content = $this->action_div($fid, $id, false);
+
+ $this->rc->output->command('managesieve_actionfill', $content, $id, $aid);
+ }
+
+ $this->rc->output->send();
+ }
+ else if ($this->rc->task == 'mail') {
+ // Initialize the form
+ $rules = rcube_utils::get_input_value('r', rcube_utils::INPUT_GET);
+ if (!empty($rules)) {
+ $i = 0;
+ foreach ($rules as $rule) {
+ list($header, $value) = explode(':', $rule, 2);
+ $tests[$i] = array(
+ 'type' => 'contains',
+ 'test' => 'header',
+ 'arg1' => $header,
+ 'arg2' => $value,
+ );
+ $i++;
+ }
+
+ $this->form = array(
+ 'join' => count($tests) > 1 ? 'allof' : 'anyof',
+ 'name' => '',
+ 'tests' => $tests,
+ 'actions' => array(
+ 0 => array('type' => 'fileinto'),
+ 1 => array('type' => 'stop'),
+ ),
+ );
+ }
+ }
+
+ $this->send();
+ }
+
+ function save()
+ {
+ // Init plugin and handle managesieve connection
+ $error = $this->start();
+
+ // get request size limits (#1488648)
+ $max_post = max(array(
+ ini_get('max_input_vars'),
+ ini_get('suhosin.request.max_vars'),
+ ini_get('suhosin.post.max_vars'),
+ ));
+ $max_depth = max(array(
+ ini_get('suhosin.request.max_array_depth'),
+ ini_get('suhosin.post.max_array_depth'),
+ ));
+
+ // check request size limit
+ if ($max_post && count($_POST, COUNT_RECURSIVE) >= $max_post) {
+ rcube::raise_error(array(
+ 'code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Request size limit exceeded (one of max_input_vars/suhosin.request.max_vars/suhosin.post.max_vars)"
+ ), true, false);
+ $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
+ }
+ // check request depth limits
+ else if ($max_depth && count($_POST['_header']) > $max_depth) {
+ rcube::raise_error(array(
+ 'code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Request size limit exceeded (one of suhosin.request.max_array_depth/suhosin.post.max_array_depth)"
+ ), true, false);
+ $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
+ }
+ // filters set add action
+ else if (!empty($_POST['_newset'])) {
+ $name = rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true);
+ $copy = rcube_utils::get_input_value('_copy', rcube_utils::INPUT_POST, true);
+ $from = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST);
+ $exceptions = $this->rc->config->get('managesieve_filename_exceptions');
+ $kolab = $this->rc->config->get('managesieve_kolab_master');
+ $name_uc = mb_strtolower($name);
+ $list = $this->list_scripts();
+
+ if (!$name) {
+ $this->errors['name'] = $this->plugin->gettext('cannotbeempty');
+ }
+ else if (mb_strlen($name) > 128) {
+ $this->errors['name'] = $this->plugin->gettext('nametoolong');
+ }
+ else if (!empty($exceptions) && in_array($name, (array)$exceptions)) {
+ $this->errors['name'] = $this->plugin->gettext('namereserved');
+ }
+ else if (!empty($kolab) && in_array($name_uc, array('MASTER', 'USER', 'MANAGEMENT'))) {
+ $this->errors['name'] = $this->plugin->gettext('namereserved');
+ }
+ else if (in_array($name, $list)) {
+ $this->errors['name'] = $this->plugin->gettext('setexist');
+ }
+ else if ($from == 'file') {
+ // from file
+ if (is_uploaded_file($_FILES['_file']['tmp_name'])) {
+ $file = file_get_contents($_FILES['_file']['tmp_name']);
+ $file = preg_replace('/\r/', '', $file);
+ // for security don't save script directly
+ // check syntax before, like this...
+ $this->sieve->load_script($file);
+ if (!$this->save_script($name)) {
+ $this->errors['file'] = $this->plugin->gettext('setcreateerror');
+ }
+ }
+ else { // upload failed
+ $err = $_FILES['_file']['error'];
+
+ if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
+ $msg = $this->rc->gettext(array('name' => 'filesizeerror',
+ 'vars' => array('size' =>
+ $this->rc->show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
+ }
+ else {
+ $this->errors['file'] = $this->plugin->gettext('fileuploaderror');
+ }
+ }
+ }
+ else if (!$this->sieve->copy($name, $from == 'set' ? $copy : '')) {
+ $error = 'managesieve.setcreateerror';
+ }
+
+ if (!$error && empty($this->errors)) {
+ // Find position of the new script on the list
+ $list[] = $name;
+ asort($list, SORT_LOCALE_STRING);
+ $list = array_values($list);
+ $index = array_search($name, $list);
+
+ $this->rc->output->show_message('managesieve.setcreated', 'confirmation');
+ $this->rc->output->command('parent.managesieve_updatelist', 'setadd',
+ array('name' => $name, 'index' => $index));
+ } else if ($msg) {
+ $this->rc->output->command('display_message', $msg, 'error');
+ } else if ($error) {
+ $this->rc->output->show_message($error, 'error');
+ }
+ }
+ // filter add/edit action
+ else if (isset($_POST['_name'])) {
+ $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true));
+ $fid = trim(rcube_utils::get_input_value('_fid', rcube_utils::INPUT_POST));
+ $join = trim(rcube_utils::get_input_value('_join', rcube_utils::INPUT_POST));
+
+ // and arrays
+ $headers = rcube_utils::get_input_value('_header', rcube_utils::INPUT_POST);
+ $cust_headers = rcube_utils::get_input_value('_custom_header', rcube_utils::INPUT_POST);
+ $ops = rcube_utils::get_input_value('_rule_op', rcube_utils::INPUT_POST);
+ $sizeops = rcube_utils::get_input_value('_rule_size_op', rcube_utils::INPUT_POST);
+ $sizeitems = rcube_utils::get_input_value('_rule_size_item', rcube_utils::INPUT_POST);
+ $sizetargets = rcube_utils::get_input_value('_rule_size_target', rcube_utils::INPUT_POST);
+ $targets = rcube_utils::get_input_value('_rule_target', rcube_utils::INPUT_POST, true);
+ $mods = rcube_utils::get_input_value('_rule_mod', rcube_utils::INPUT_POST);
+ $mod_types = rcube_utils::get_input_value('_rule_mod_type', rcube_utils::INPUT_POST);
+ $body_trans = rcube_utils::get_input_value('_rule_trans', rcube_utils::INPUT_POST);
+ $body_types = rcube_utils::get_input_value('_rule_trans_type', rcube_utils::INPUT_POST, true);
+ $comparators = rcube_utils::get_input_value('_rule_comp', rcube_utils::INPUT_POST);
+ $indexes = rcube_utils::get_input_value('_rule_index', rcube_utils::INPUT_POST);
+ $lastindexes = rcube_utils::get_input_value('_rule_index_last', rcube_utils::INPUT_POST);
+ $dateheaders = rcube_utils::get_input_value('_rule_date_header', rcube_utils::INPUT_POST);
+ $dateparts = rcube_utils::get_input_value('_rule_date_part', rcube_utils::INPUT_POST);
+ $act_types = rcube_utils::get_input_value('_action_type', rcube_utils::INPUT_POST, true);
+ $mailboxes = rcube_utils::get_input_value('_action_mailbox', rcube_utils::INPUT_POST, true);
+ $act_targets = rcube_utils::get_input_value('_action_target', rcube_utils::INPUT_POST, true);
+ $area_targets = rcube_utils::get_input_value('_action_target_area', rcube_utils::INPUT_POST, true);
+ $reasons = rcube_utils::get_input_value('_action_reason', rcube_utils::INPUT_POST, true);
+ $addresses = rcube_utils::get_input_value('_action_addresses', rcube_utils::INPUT_POST, true);
+ $intervals = rcube_utils::get_input_value('_action_interval', rcube_utils::INPUT_POST);
+ $interval_types = rcube_utils::get_input_value('_action_interval_type', rcube_utils::INPUT_POST);
+ $subject = rcube_utils::get_input_value('_action_subject', rcube_utils::INPUT_POST, true);
+ $flags = rcube_utils::get_input_value('_action_flags', rcube_utils::INPUT_POST);
+ $varnames = rcube_utils::get_input_value('_action_varname', rcube_utils::INPUT_POST);
+ $varvalues = rcube_utils::get_input_value('_action_varvalue', rcube_utils::INPUT_POST);
+ $varmods = rcube_utils::get_input_value('_action_varmods', rcube_utils::INPUT_POST);
+ $notifyaddrs = rcube_utils::get_input_value('_action_notifyaddress', rcube_utils::INPUT_POST);
+ $notifybodies = rcube_utils::get_input_value('_action_notifybody', rcube_utils::INPUT_POST);
+ $notifymessages = rcube_utils::get_input_value('_action_notifymessage', rcube_utils::INPUT_POST);
+ $notifyfrom = rcube_utils::get_input_value('_action_notifyfrom', rcube_utils::INPUT_POST);
+ $notifyimp = rcube_utils::get_input_value('_action_notifyimportance', rcube_utils::INPUT_POST);
+
+ // we need a "hack" for radiobuttons
+ foreach ($sizeitems as $item)
+ $items[] = $item;
+
+ $this->form['disabled'] = $_POST['_disabled'] ? true : false;
+ $this->form['join'] = $join=='allof' ? true : false;
+ $this->form['name'] = $name;
+ $this->form['tests'] = array();
+ $this->form['actions'] = array();
+
+ if ($name == '')
+ $this->errors['name'] = $this->plugin->gettext('cannotbeempty');
+ else {
+ foreach($this->script as $idx => $rule)
+ if($rule['name'] == $name && $idx != $fid) {
+ $this->errors['name'] = $this->plugin->gettext('ruleexist');
+ break;
+ }
+ }
+
+ $i = 0;
+ // rules
+ if ($join == 'any') {
+ $this->form['tests'][0]['test'] = 'true';
+ }
+ else {
+ foreach ($headers as $idx => $header) {
+ // targets are indexed differently (assume form order)
+ $target = $this->strip_value(array_shift($targets), true);
+ $header = $this->strip_value($header);
+ $operator = $this->strip_value($ops[$idx]);
+ $comparator = $this->strip_value($comparators[$idx]);
+
+ if ($header == 'size') {
+ $sizeop = $this->strip_value($sizeops[$idx]);
+ $sizeitem = $this->strip_value($items[$idx]);
+ $sizetarget = $this->strip_value($sizetargets[$idx]);
+
+ $this->form['tests'][$i]['test'] = 'size';
+ $this->form['tests'][$i]['type'] = $sizeop;
+ $this->form['tests'][$i]['arg'] = $sizetarget;
+
+ if ($sizetarget == '')
+ $this->errors['tests'][$i]['sizetarget'] = $this->plugin->gettext('cannotbeempty');
+ else if (!preg_match('/^[0-9]+(K|M|G)?$/i', $sizetarget.$sizeitem, $m)) {
+ $this->errors['tests'][$i]['sizetarget'] = $this->plugin->gettext('forbiddenchars');
+ $this->form['tests'][$i]['item'] = $sizeitem;
+ }
+ else
+ $this->form['tests'][$i]['arg'] .= $m[1];
+ }
+ else if ($header == 'currentdate') {
+ $datepart = $this->strip_value($dateparts[$idx]);
+
+ if (preg_match('/^not/', $operator))
+ $this->form['tests'][$i]['not'] = true;
+ $type = preg_replace('/^not/', '', $operator);
+
+ if ($type == 'exists') {
+ $this->errors['tests'][$i]['op'] = true;
+ }
+
+ $this->form['tests'][$i]['test'] = 'currentdate';
+ $this->form['tests'][$i]['type'] = $type;
+ $this->form['tests'][$i]['part'] = $datepart;
+ $this->form['tests'][$i]['arg'] = $target;
+
+ if ($type != 'exists') {
+ if (!count($target)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
+ }
+ else if ($type != 'regex' && $type != 'matches') {
+ foreach ($target as $arg) {
+ if (!$this->validate_date_part($datepart, $arg)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('invaliddateformat');
+ break;
+ }
+ }
+ }
+ }
+ }
+ else if ($header == 'date') {
+ $datepart = $this->strip_value($dateparts[$idx]);
+ $dateheader = $this->strip_value($dateheaders[$idx]);
+ $index = $this->strip_value($indexes[$idx]);
+ $indexlast = $this->strip_value($lastindexes[$idx]);
+
+ if (preg_match('/^not/', $operator))
+ $this->form['tests'][$i]['not'] = true;
+ $type = preg_replace('/^not/', '', $operator);
+
+ if ($type == 'exists') {
+ $this->errors['tests'][$i]['op'] = true;
+ }
+
+ if (!empty($index) && $mod != 'envelope') {
+ $this->form['tests'][$i]['index'] = intval($index);
+ $this->form['tests'][$i]['last'] = !empty($indexlast);
+ }
+
+ if (empty($dateheader)) {
+ $dateheader = 'Date';
+ }
+ else if (!preg_match('/^[\x21-\x39\x41-\x7E]+$/i', $dateheader)) {
+ $this->errors['tests'][$i]['dateheader'] = $this->plugin->gettext('forbiddenchars');
+ }
+
+ $this->form['tests'][$i]['test'] = 'date';
+ $this->form['tests'][$i]['type'] = $type;
+ $this->form['tests'][$i]['part'] = $datepart;
+ $this->form['tests'][$i]['arg'] = $target;
+ $this->form['tests'][$i]['header'] = $dateheader;
+
+ if ($type != 'exists') {
+ if (!count($target)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
+ }
+ else if ($type != 'regex' && $type != 'matches') {
+ foreach ($target as $arg) {
+ if (!$this->validate_date_part($datepart, $arg)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('invaliddateformat');
+ break;
+ }
+ }
+ }
+ }
+ }
+ else if ($header == 'body') {
+ $trans = $this->strip_value($body_trans[$idx]);
+ $trans_type = $this->strip_value($body_types[$idx], true);
+
+ if (preg_match('/^not/', $operator))
+ $this->form['tests'][$i]['not'] = true;
+ $type = preg_replace('/^not/', '', $operator);
+
+ if ($type == 'exists') {
+ $this->errors['tests'][$i]['op'] = true;
+ }
+
+ $this->form['tests'][$i]['test'] = 'body';
+ $this->form['tests'][$i]['type'] = $type;
+ $this->form['tests'][$i]['arg'] = $target;
+
+ if (empty($target) && $type != 'exists') {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
+ }
+ else if (preg_match('/^(value|count)-/', $type)) {
+ foreach ($target as $target_value) {
+ if (!preg_match('/[0-9]+/', $target_value)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('forbiddenchars');
+ }
+ }
+ }
+
+ $this->form['tests'][$i]['part'] = $trans;
+ if ($trans == 'content') {
+ $this->form['tests'][$i]['content'] = $trans_type;
+ }
+ }
+ else {
+ $cust_header = $headers = $this->strip_value(array_shift($cust_headers));
+ $mod = $this->strip_value($mods[$idx]);
+ $mod_type = $this->strip_value($mod_types[$idx]);
+ $index = $this->strip_value($indexes[$idx]);
+ $indexlast = $this->strip_value($lastindexes[$idx]);
+
+ if (preg_match('/^not/', $operator))
+ $this->form['tests'][$i]['not'] = true;
+ $type = preg_replace('/^not/', '', $operator);
+
+ if (!empty($index) && $mod != 'envelope') {
+ $this->form['tests'][$i]['index'] = intval($index);
+ $this->form['tests'][$i]['last'] = !empty($indexlast);
+ }
+
+ if ($header == '...') {
+ if (!count($headers))
+ $this->errors['tests'][$i]['header'] = $this->plugin->gettext('cannotbeempty');
+ else {
+ foreach ($headers as $hr) {
+ // RFC2822: printable ASCII except colon
+ if (!preg_match('/^[\x21-\x39\x41-\x7E]+$/i', $hr)) {
+ $this->errors['tests'][$i]['header'] = $this->plugin->gettext('forbiddenchars');
+ }
+ }
+ }
+
+ if (empty($this->errors['tests'][$i]['header']))
+ $cust_header = (is_array($headers) && count($headers) == 1) ? $headers[0] : $headers;
+ }
+
+ if ($type == 'exists') {
+ $this->form['tests'][$i]['test'] = 'exists';
+ $this->form['tests'][$i]['arg'] = $header == '...' ? $cust_header : $header;
+ }
+ else {
+ $test = 'header';
+ $header = $header == '...' ? $cust_header : $header;
+
+ if ($mod == 'address' || $mod == 'envelope') {
+ $found = false;
+ if (empty($this->errors['tests'][$i]['header'])) {
+ foreach ((array)$header as $hdr) {
+ if (!in_array(strtolower(trim($hdr)), $this->addr_headers))
+ $found = true;
+ }
+ }
+ if (!$found)
+ $test = $mod;
+ }
+
+ $this->form['tests'][$i]['type'] = $type;
+ $this->form['tests'][$i]['test'] = $test;
+ $this->form['tests'][$i]['arg1'] = $header;
+ $this->form['tests'][$i]['arg2'] = $target;
+
+ if (empty($target)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
+ }
+ else if (preg_match('/^(value|count)-/', $type)) {
+ foreach ($target as $target_value) {
+ if (!preg_match('/[0-9]+/', $target_value)) {
+ $this->errors['tests'][$i]['target'] = $this->plugin->gettext('forbiddenchars');
+ }
+ }
+ }
+
+ if ($mod) {
+ $this->form['tests'][$i]['part'] = $mod_type;
+ }
+ }
+ }
+
+ if ($header != 'size' && $comparator) {
+ if (preg_match('/^(value|count)/', $this->form['tests'][$i]['type']))
+ $comparator = 'i;ascii-numeric';
+
+ $this->form['tests'][$i]['comparator'] = $comparator;
+ }
+
+ $i++;
+ }
+ }
+
+ $i = 0;
+ // actions
+ foreach($act_types as $idx => $type) {
+ $type = $this->strip_value($type);
+ $target = $this->strip_value($act_targets[$idx]);
+
+ switch ($type) {
+
+ case 'fileinto':
+ case 'fileinto_copy':
+ $mailbox = $this->strip_value($mailboxes[$idx], false, false);
+ $this->form['actions'][$i]['target'] = $this->mod_mailbox($mailbox, 'in');
+ if ($type == 'fileinto_copy') {
+ $type = 'fileinto';
+ $this->form['actions'][$i]['copy'] = true;
+ }
+ break;
+
+ case 'reject':
+ case 'ereject':
+ $target = $this->strip_value($area_targets[$idx]);
+ $this->form['actions'][$i]['target'] = str_replace("\r\n", "\n", $target);
+
+ // if ($target == '')
+// $this->errors['actions'][$i]['targetarea'] = $this->plugin->gettext('cannotbeempty');
+ break;
+
+ case 'redirect':
+ case 'redirect_copy':
+ $this->form['actions'][$i]['target'] = $target;
+
+ if ($this->form['actions'][$i]['target'] == '')
+ $this->errors['actions'][$i]['target'] = $this->plugin->gettext('cannotbeempty');
+ else if (!rcube_utils::check_email($this->form['actions'][$i]['target']))
+ $this->errors['actions'][$i]['target'] = $this->plugin->gettext('noemailwarning');
+
+ if ($type == 'redirect_copy') {
+ $type = 'redirect';
+ $this->form['actions'][$i]['copy'] = true;
+ }
+ break;
+
+ case 'addflag':
+ case 'setflag':
+ case 'removeflag':
+ $_target = array();
+ if (empty($flags[$idx])) {
+ $this->errors['actions'][$i]['target'] = $this->plugin->gettext('noflagset');
+ }
+ else {
+ foreach ($flags[$idx] as $flag) {
+ $_target[] = $this->strip_value($flag);
+ }
+ }
+ $this->form['actions'][$i]['target'] = $_target;
+ break;
+
+ case 'vacation':
+ $reason = $this->strip_value($reasons[$idx]);
+ $interval_type = $interval_types[$idx] == 'seconds' ? 'seconds' : 'days';
+ $this->form['actions'][$i]['reason'] = str_replace("\r\n", "\n", $reason);
+ $this->form['actions'][$i]['subject'] = $subject[$idx];
+ $this->form['actions'][$i]['addresses'] = array_shift($addresses);
+ $this->form['actions'][$i][$interval_type] = $intervals[$idx];
+// @TODO: vacation :mime, :from, :handle
+
+ foreach ((array)$this->form['actions'][$i]['addresses'] as $aidx => $address) {
+ if (!rcube_utils::check_email($address)) {
+ $this->errors['actions'][$i]['addresses'] = $this->plugin->gettext('noemailwarning');
+ break;
+ }
+ }
+
+ if ($this->form['actions'][$i]['reason'] == '')
+ $this->errors['actions'][$i]['reason'] = $this->plugin->gettext('cannotbeempty');
+ if ($this->form['actions'][$i][$interval_type] && !preg_match('/^[0-9]+$/', $this->form['actions'][$i][$interval_type]))
+ $this->errors['actions'][$i]['interval'] = $this->plugin->gettext('forbiddenchars');
+ break;
+
+ case 'set':
+ $this->form['actions'][$i]['name'] = $varnames[$idx];
+ $this->form['actions'][$i]['value'] = $varvalues[$idx];
+ foreach ((array)$varmods[$idx] as $v_m) {
+ $this->form['actions'][$i][$v_m] = true;
+ }
+
+ if (empty($varnames[$idx])) {
+ $this->errors['actions'][$i]['name'] = $this->plugin->gettext('cannotbeempty');
+ }
+ else if (!preg_match('/^[0-9a-z_]+$/i', $varnames[$idx])) {
+ $this->errors['actions'][$i]['name'] = $this->plugin->gettext('forbiddenchars');
+ }
+
+ if (!isset($varvalues[$idx]) || $varvalues[$idx] === '') {
+ $this->errors['actions'][$i]['value'] = $this->plugin->gettext('cannotbeempty');
+ }
+ break;
+
+ case 'notify':
+ if (empty($notifyaddrs[$idx])) {
+ $this->errors['actions'][$i]['address'] = $this->plugin->gettext('cannotbeempty');
+ }
+ else if (!rcube_utils::check_email($notifyaddrs[$idx])) {
+ $this->errors['actions'][$i]['address'] = $this->plugin->gettext('noemailwarning');
+ }
+ if (!empty($notifyfrom[$idx]) && !rcube_utils::check_email($notifyfrom[$idx])) {
+ $this->errors['actions'][$i]['from'] = $this->plugin->gettext('noemailwarning');
+ }
+ $this->form['actions'][$i]['address'] = $notifyaddrs[$idx];
+ $this->form['actions'][$i]['body'] = $notifybodies[$idx];
+ $this->form['actions'][$i]['message'] = $notifymessages[$idx];
+ $this->form['actions'][$i]['from'] = $notifyfrom[$idx];
+ $this->form['actions'][$i]['importance'] = $notifyimp[$idx];
+ break;
+ }
+
+ $this->form['actions'][$i]['type'] = $type;
+ $i++;
+ }
+
+ if (!$this->errors && !$error) {
+ // zapis skryptu
+ if (!isset($this->script[$fid])) {
+ $fid = $this->sieve->script->add_rule($this->form);
+ $new = true;
+ } else
+ $fid = $this->sieve->script->update_rule($fid, $this->form);
+
+ if ($fid !== false)
+ $save = $this->save_script();
+
+ if ($save && $fid !== false) {
+ $this->rc->output->show_message('managesieve.filtersaved', 'confirmation');
+ if ($this->rc->task != 'mail') {
+ $this->rc->output->command('parent.managesieve_updatelist',
+ isset($new) ? 'add' : 'update',
+ array(
+ 'name' => $this->form['name'],
+ 'id' => $fid,
+ 'disabled' => $this->form['disabled']
+ ));
+ }
+ else {
+ $this->rc->output->command('managesieve_dialog_close');
+ $this->rc->output->send('iframe');
+ }
+ }
+ else {
+ $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
+// $this->rc->output->send();
+ }
+ }
+ }
+
+ $this->send();
+ }
+
+ private function send()
+ {
+ // Handle form action
+ if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
+ if (isset($_GET['_newset']) || isset($_POST['_newset'])) {
+ $this->rc->output->send('managesieve.setedit');
+ }
+ else {
+ $this->rc->output->send('managesieve.filteredit');
+ }
+ } else {
+ $this->rc->output->set_pagetitle($this->plugin->gettext('filters'));
+ $this->rc->output->send('managesieve.managesieve');
+ }
+ }
+
+ // return the filters list as HTML table
+ function filters_list($attrib)
+ {
+ // add id to message list table if not specified
+ if (!strlen($attrib['id']))
+ $attrib['id'] = 'rcmfilterslist';
+
+ // define list of cols to be displayed
+ $a_show_cols = array('name');
+
+ $result = $this->list_rules();
+
+ // create XHTML table
+ $out = $this->rc->table_output($attrib, $result, $a_show_cols, 'id');
+
+ // set client env
+ $this->rc->output->add_gui_object('filterslist', $attrib['id']);
+ $this->rc->output->include_script('list.js');
+
+ // add some labels to client
+ $this->rc->output->add_label('managesieve.filterdeleteconfirm');
+
+ return $out;
+ }
+
+ // return the filters list as <SELECT>
+ function filtersets_list($attrib, $no_env = false)
+ {
+ // add id to message list table if not specified
+ if (!strlen($attrib['id']))
+ $attrib['id'] = 'rcmfiltersetslist';
+
+ $list = $this->list_scripts();
+
+ if ($list) {
+ asort($list, SORT_LOCALE_STRING);
+ }
+
+ if (!empty($attrib['type']) && $attrib['type'] == 'list') {
+ // define list of cols to be displayed
+ $a_show_cols = array('name');
+
+ if ($list) {
+ foreach ($list as $idx => $set) {
+ $scripts['S'.$idx] = $set;
+ $result[] = array(
+ 'name' => $set,
+ 'id' => 'S'.$idx,
+ 'class' => !in_array($set, $this->active) ? 'disabled' : '',
+ );
+ }
+ }
+
+ // create XHTML table
+ $out = $this->rc->table_output($attrib, $result, $a_show_cols, 'id');
+
+ $this->rc->output->set_env('filtersets', $scripts);
+ $this->rc->output->include_script('list.js');
+ }
+ else {
+ $select = new html_select(array('name' => '_set', 'id' => $attrib['id'],
+ 'onchange' => $this->rc->task != 'mail' ? 'rcmail.managesieve_set()' : ''));
+
+ if ($list) {
+ foreach ($list as $set)
+ $select->add($set, $set);
+ }
+
+ $out = $select->show($this->sieve->current);
+ }
+
+ // set client env
+ if (!$no_env) {
+ $this->rc->output->add_gui_object('filtersetslist', $attrib['id']);
+ $this->rc->output->add_label('managesieve.setdeleteconfirm');
+ }
+
+ return $out;
+ }
+
+ function filter_frame($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmfilterframe';
+
+ $attrib['name'] = $attrib['id'];
+
+ $this->rc->output->set_env('contentframe', $attrib['name']);
+ $this->rc->output->set_env('blankpage', $attrib['src'] ?
+ $this->rc->output->abs_url($attrib['src']) : 'program/resources/blank.gif');
+
+ return $this->rc->output->frame($attrib);
+ }
+
+ function filterset_form($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmfiltersetform';
+
+ $out = '<form name="filtersetform" action="./" method="post" enctype="multipart/form-data">'."\n";
+
+ $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $this->rc->task));
+ $hiddenfields->add(array('name' => '_action', 'value' => 'plugin.managesieve-save'));
+ $hiddenfields->add(array('name' => '_framed', 'value' => ($_POST['_framed'] || $_GET['_framed'] ? 1 : 0)));
+ $hiddenfields->add(array('name' => '_newset', 'value' => 1));
+
+ $out .= $hiddenfields->show();
+
+ $name = rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST);
+ $copy = rcube_utils::get_input_value('_copy', rcube_utils::INPUT_POST);
+ $selected = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST);
+
+ // filter set name input
+ $input_name = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30,
+ 'class' => ($this->errors['name'] ? 'error' : '')));
+
+ $out .= sprintf('<label for="%s"><b>%s:</b></label> %s<br /><br />',
+ '_name', rcube::Q($this->plugin->gettext('filtersetname')), $input_name->show($name));
+
+ $out .="\n<fieldset class=\"itemlist\"><legend>" . $this->plugin->gettext('filters') . ":</legend>\n";
+ $out .= '<input type="radio" id="from_none" name="_from" value="none"'
+ .(!$selected || $selected=='none' ? ' checked="checked"' : '').'></input>';
+ $out .= sprintf('<label for="%s">%s</label> ', 'from_none', rcube::Q($this->plugin->gettext('none')));
+
+ // filters set list
+ $list = $this->list_scripts();
+ $select = new html_select(array('name' => '_copy', 'id' => '_copy'));
+
+ if (is_array($list)) {
+ asort($list, SORT_LOCALE_STRING);
+
+ if (!$copy)
+ $copy = $_SESSION['managesieve_current'];
+
+ foreach ($list as $set) {
+ $select->add($set, $set);
+ }
+
+ $out .= '<br /><input type="radio" id="from_set" name="_from" value="set"'
+ .($selected=='set' ? ' checked="checked"' : '').'></input>';
+ $out .= sprintf('<label for="%s">%s:</label> ', 'from_set', rcube::Q($this->plugin->gettext('fromset')));
+ $out .= $select->show($copy);
+ }
+
+ // script upload box
+ $upload = new html_inputfield(array('name' => '_file', 'id' => '_file', 'size' => 30,
+ 'type' => 'file', 'class' => ($this->errors['file'] ? 'error' : '')));
+
+ $out .= '<br /><input type="radio" id="from_file" name="_from" value="file"'
+ .($selected=='file' ? ' checked="checked"' : '').'></input>';
+ $out .= sprintf('<label for="%s">%s:</label> ', 'from_file', rcube::Q($this->plugin->gettext('fromfile')));
+ $out .= $upload->show();
+ $out .= '</fieldset>';
+
+ $this->rc->output->add_gui_object('sieveform', 'filtersetform');
+
+ if ($this->errors['name'])
+ $this->add_tip('_name', $this->errors['name'], true);
+ if ($this->errors['file'])
+ $this->add_tip('_file', $this->errors['file'], true);
+
+ $this->print_tips();
+
+ return $out;
+ }
+
+
+ function filter_form($attrib)
+ {
+ if (!$attrib['id'])
+ $attrib['id'] = 'rcmfilterform';
+
+ $fid = rcube_utils::get_input_value('_fid', rcube_utils::INPUT_GPC);
+ $scr = isset($this->form) ? $this->form : $this->script[$fid];
+
+ $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $this->rc->task));
+ $hiddenfields->add(array('name' => '_action', 'value' => 'plugin.managesieve-save'));
+ $hiddenfields->add(array('name' => '_framed', 'value' => ($_POST['_framed'] || $_GET['_framed'] ? 1 : 0)));
+ $hiddenfields->add(array('name' => '_fid', 'value' => $fid));
+
+ $out = '<form name="filterform" action="./" method="post">'."\n";
+ $out .= $hiddenfields->show();
+
+ // 'any' flag
+ if (sizeof($scr['tests']) == 1 && $scr['tests'][0]['test'] == 'true' && !$scr['tests'][0]['not'])
+ $any = true;
+
+ // filter name input
+ $field_id = '_name';
+ $input_name = new html_inputfield(array('name' => '_name', 'id' => $field_id, 'size' => 30,
+ 'class' => ($this->errors['name'] ? 'error' : '')));
+
+ if ($this->errors['name'])
+ $this->add_tip($field_id, $this->errors['name'], true);
+
+ if (isset($scr))
+ $input_name = $input_name->show($scr['name']);
+ else
+ $input_name = $input_name->show();
+
+ $out .= sprintf("\n<label for=\"%s\"><b>%s:</b></label> %s\n",
+ $field_id, rcube::Q($this->plugin->gettext('filtername')), $input_name);
+
+ // filter set selector
+ if ($this->rc->task == 'mail') {
+ $out .= sprintf("\n&nbsp;<label for=\"%s\"><b>%s:</b></label> %s\n",
+ $field_id, rcube::Q($this->plugin->gettext('filterset')),
+ $this->filtersets_list(array('id' => 'sievescriptname'), true));
+ }
+
+ $out .= '<br /><br /><fieldset><legend>' . rcube::Q($this->plugin->gettext('messagesrules')) . "</legend>\n";
+
+ // any, allof, anyof radio buttons
+ $field_id = '_allof';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'allof',
+ 'onclick' => 'rule_join_radio(\'allof\')', 'class' => 'radio'));
+
+ if (isset($scr) && !$any)
+ $input_join = $input_join->show($scr['join'] ? 'allof' : '');
+ else
+ $input_join = $input_join->show();
+
+ $out .= sprintf("%s<label for=\"%s\">%s</label>&nbsp;\n",
+ $input_join, $field_id, rcube::Q($this->plugin->gettext('filterallof')));
+
+ $field_id = '_anyof';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'anyof',
+ 'onclick' => 'rule_join_radio(\'anyof\')', 'class' => 'radio'));
+
+ if (isset($scr) && !$any)
+ $input_join = $input_join->show($scr['join'] ? '' : 'anyof');
+ else
+ $input_join = $input_join->show('anyof'); // default
+
+ $out .= sprintf("%s<label for=\"%s\">%s</label>\n",
+ $input_join, $field_id, rcube::Q($this->plugin->gettext('filteranyof')));
+
+ $field_id = '_any';
+ $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'any',
+ 'onclick' => 'rule_join_radio(\'any\')', 'class' => 'radio'));
+
+ $input_join = $input_join->show($any ? 'any' : '');
+
+ $out .= sprintf("%s<label for=\"%s\">%s</label>\n",
+ $input_join, $field_id, rcube::Q($this->plugin->gettext('filterany')));
+
+ $rows_num = isset($scr) ? sizeof($scr['tests']) : 1;
+
+ $out .= '<div id="rules"'.($any ? ' style="display: none"' : '').'>';
+ for ($x=0; $x<$rows_num; $x++)
+ $out .= $this->rule_div($fid, $x);
+ $out .= "</div>\n";
+
+ $out .= "</fieldset>\n";
+
+ // actions
+ $out .= '<fieldset><legend>' . rcube::Q($this->plugin->gettext('messagesactions')) . "</legend>\n";
+
+ $rows_num = isset($scr) ? sizeof($scr['actions']) : 1;
+
+ $out .= '<div id="actions">';
+ for ($x=0; $x<$rows_num; $x++)
+ $out .= $this->action_div($fid, $x);
+ $out .= "</div>\n";
+
+ $out .= "</fieldset>\n";
+
+ $this->print_tips();
+
+ if ($scr['disabled']) {
+ $this->rc->output->set_env('rule_disabled', true);
+ }
+ $this->rc->output->add_label(
+ 'managesieve.ruledeleteconfirm',
+ 'managesieve.actiondeleteconfirm'
+ );
+ $this->rc->output->add_gui_object('sieveform', 'filterform');
+
+ return $out;
+ }
+
+ function rule_div($fid, $id, $div=true)
+ {
+ $rule = isset($this->form) ? $this->form['tests'][$id] : $this->script[$fid]['tests'][$id];
+ $rows_num = isset($this->form) ? sizeof($this->form['tests']) : sizeof($this->script[$fid]['tests']);
+
+ // headers select
+ $select_header = new html_select(array('name' => "_header[]", 'id' => 'header'.$id,
+ 'onchange' => 'rule_header_select(' .$id .')'));
+
+ foreach ($this->headers as $name => $val)
+ $select_header->add(rcube::Q($this->plugin->gettext($name)), Q($val));
+ $select_header->add(rcube::Q($this->plugin->gettext('...')), '...');
+ if (in_array('body', $this->exts))
+ $select_header->add(rcube::Q($this->plugin->gettext('body')), 'body');
+ $select_header->add(rcube::Q($this->plugin->gettext('size')), 'size');
+ if (in_array('date', $this->exts)) {
+ $select_header->add(rcube::Q($this->plugin->gettext('datetest')), 'date');
+ $select_header->add(rcube::Q($this->plugin->gettext('currdate')), 'currentdate');
+ }
+
+ if (isset($rule['test'])) {
+ if (in_array($rule['test'], array('header', 'address', 'envelope'))
+ && !is_array($rule['arg1']) && in_array($rule['arg1'], $this->headers)
+ ) {
+ $test = $rule['arg1'];
+ }
+ else if ($rule['test'] == 'exists'
+ && !is_array($rule['arg']) && in_array($rule['arg'], $this->headers)
+ ) {
+ $test = $rule['arg'];
+ }
+ else if (in_array($rule['test'], array('size', 'body', 'date', 'currentdate'))) {
+ $test = $rule['test'];
+ }
+ else if ($rule['test'] != 'true') {
+ $test = '...';
+ }
+ }
+
+ $aout = $select_header->show($test);
+
+ // custom headers input
+ if (isset($rule['test']) && in_array($rule['test'], array('header', 'address', 'envelope'))) {
+ $custom = (array) $rule['arg1'];
+ if (count($custom) == 1 && isset($this->headers[strtolower($custom[0])])) {
+ unset($custom);
+ }
+ }
+ else if (isset($rule['test']) && $rule['test'] == 'exists') {
+ $custom = (array) $rule['arg'];
+ if (count($custom) == 1 && isset($this->headers[strtolower($custom[0])])) {
+ unset($custom);
+ }
+ }
+
+ $tout = $this->list_input($id, 'custom_header', $custom, isset($custom),
+ $this->error_class($id, 'test', 'header', 'custom_header'), 15) . "\n";
+
+ // matching type select (operator)
+ $select_op = new html_select(array('name' => "_rule_op[]", 'id' => 'rule_op'.$id,
+ 'style' => 'display:' .($rule['test']!='size' ? 'inline' : 'none'),
+ 'class' => 'operator_selector',
+ 'onchange' => 'rule_op_select(this, '.$id.')'));
+ $select_op->add(rcube::Q($this->plugin->gettext('filtercontains')), 'contains');
+ $select_op->add(rcube::Q($this->plugin->gettext('filternotcontains')), 'notcontains');
+ $select_op->add(rcube::Q($this->plugin->gettext('filteris')), 'is');
+ $select_op->add(rcube::Q($this->plugin->gettext('filterisnot')), 'notis');
+ $select_op->add(rcube::Q($this->plugin->gettext('filterexists')), 'exists');
+ $select_op->add(rcube::Q($this->plugin->gettext('filternotexists')), 'notexists');
+ $select_op->add(rcube::Q($this->plugin->gettext('filtermatches')), 'matches');
+ $select_op->add(rcube::Q($this->plugin->gettext('filternotmatches')), 'notmatches');
+ if (in_array('regex', $this->exts)) {
+ $select_op->add(rcube::Q($this->plugin->gettext('filterregex')), 'regex');
+ $select_op->add(rcube::Q($this->plugin->gettext('filternotregex')), 'notregex');
+ }
+ if (in_array('relational', $this->exts)) {
+ $select_op->add(rcube::Q($this->plugin->gettext('countisgreaterthan')), 'count-gt');
+ $select_op->add(rcube::Q($this->plugin->gettext('countisgreaterthanequal')), 'count-ge');
+ $select_op->add(rcube::Q($this->plugin->gettext('countislessthan')), 'count-lt');
+ $select_op->add(rcube::Q($this->plugin->gettext('countislessthanequal')), 'count-le');
+ $select_op->add(rcube::Q($this->plugin->gettext('countequals')), 'count-eq');
+ $select_op->add(rcube::Q($this->plugin->gettext('countnotequals')), 'count-ne');
+ $select_op->add(rcube::Q($this->plugin->gettext('valueisgreaterthan')), 'value-gt');
+ $select_op->add(rcube::Q($this->plugin->gettext('valueisgreaterthanequal')), 'value-ge');
+ $select_op->add(rcube::Q($this->plugin->gettext('valueislessthan')), 'value-lt');
+ $select_op->add(rcube::Q($this->plugin->gettext('valueislessthanequal')), 'value-le');
+ $select_op->add(rcube::Q($this->plugin->gettext('valueequals')), 'value-eq');
+ $select_op->add(rcube::Q($this->plugin->gettext('valuenotequals')), 'value-ne');
+ }
+
+ // (current)date part select
+ if (in_array('date', $this->exts) || in_array('currentdate', $this->exts)) {
+ $date_parts = array('date', 'iso8601', 'std11', 'julian', 'time',
+ 'year', 'month', 'day', 'hour', 'minute', 'second', 'weekday', 'zone');
+ $select_dp = new html_select(array('name' => "_rule_date_part[]", 'id' => 'rule_date_part'.$id,
+ 'style' => $rule['test'] == 'currentdate' || $rule['test'] == 'date' ? '' : 'display:none',
+ 'class' => 'datepart_selector',
+ ));
+
+ foreach ($date_parts as $part) {
+ $select_dp->add(rcube::Q($this->plugin->gettext($part)), $part);
+ }
+
+ $tout .= $select_dp->show($rule['test'] == 'currentdate' || $rule['test'] == 'date' ? $rule['part'] : '');
+ }
+
+ // target(s) input
+ if (in_array($rule['test'], array('header', 'address', 'envelope'))) {
+ $test = ($rule['not'] ? 'not' : '').($rule['type'] ? $rule['type'] : 'is');
+ $target = $rule['arg2'];
+ }
+ else if (in_array($rule['test'], array('body', 'date', 'currentdate'))) {
+ $test = ($rule['not'] ? 'not' : '').($rule['type'] ? $rule['type'] : 'is');
+ $target = $rule['arg'];
+ }
+ else if ($rule['test'] == 'size') {
+ $test = '';
+ $target = '';
+ if (preg_match('/^([0-9]+)(K|M|G)?$/', $rule['arg'], $matches)) {
+ $sizetarget = $matches[1];
+ $sizeitem = $matches[2];
+ }
+ else {
+ $sizetarget = $rule['arg'];
+ $sizeitem = $rule['item'];
+ }
+ }
+ else {
+ $test = ($rule['not'] ? 'not' : '').$rule['test'];
+ $target = '';
+ }
+
+ $tout .= $select_op->show($test);
+ $tout .= $this->list_input($id, 'rule_target', $target,
+ $rule['test'] != 'size' && $rule['test'] != 'exists',
+ $this->error_class($id, 'test', 'target', 'rule_target')) . "\n";
+
+ $select_size_op = new html_select(array('name' => "_rule_size_op[]", 'id' => 'rule_size_op'.$id));
+ $select_size_op->add(rcube::Q($this->plugin->gettext('filterover')), 'over');
+ $select_size_op->add(rcube::Q($this->plugin->gettext('filterunder')), 'under');
+
+ $tout .= '<div id="rule_size' .$id. '" style="display:' . ($rule['test']=='size' ? 'inline' : 'none') .'">';
+ $tout .= $select_size_op->show($rule['test']=='size' ? $rule['type'] : '');
+ $tout .= '<input type="text" name="_rule_size_target[]" id="rule_size_i'.$id.'" value="'.$sizetarget.'" size="10" '
+ . $this->error_class($id, 'test', 'sizetarget', 'rule_size_i') .' />
+ <label><input type="radio" name="_rule_size_item['.$id.']" value=""'
+ . (!$sizeitem ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('B').'</label>
+ <label><input type="radio" name="_rule_size_item['.$id.']" value="K"'
+ . ($sizeitem=='K' ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('KB').'</label>
+ <label><input type="radio" name="_rule_size_item['.$id.']" value="M"'
+ . ($sizeitem=='M' ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('MB').'</label>
+ <label><input type="radio" name="_rule_size_item['.$id.']" value="G"'
+ . ($sizeitem=='G' ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('GB').'</label>';
+ $tout .= '</div>';
+
+ // Advanced modifiers (address, envelope)
+ $select_mod = new html_select(array('name' => "_rule_mod[]", 'id' => 'rule_mod_op'.$id,
+ 'onchange' => 'rule_mod_select(' .$id .')'));
+ $select_mod->add(rcube::Q($this->plugin->gettext('none')), '');
+ $select_mod->add(rcube::Q($this->plugin->gettext('address')), 'address');
+ if (in_array('envelope', $this->exts))
+ $select_mod->add(rcube::Q($this->plugin->gettext('envelope')), 'envelope');
+
+ $select_type = new html_select(array('name' => "_rule_mod_type[]", 'id' => 'rule_mod_type'.$id));
+ $select_type->add(rcube::Q($this->plugin->gettext('allparts')), 'all');
+ $select_type->add(rcube::Q($this->plugin->gettext('domain')), 'domain');
+ $select_type->add(rcube::Q($this->plugin->gettext('localpart')), 'localpart');
+ if (in_array('subaddress', $this->exts)) {
+ $select_type->add(rcube::Q($this->plugin->gettext('user')), 'user');
+ $select_type->add(rcube::Q($this->plugin->gettext('detail')), 'detail');
+ }
+
+ $need_mod = $rule['test'] != 'size' && $rule['test'] != 'body';
+ $mout = '<div id="rule_mod' .$id. '" class="adv"' . (!$need_mod ? ' style="display:none"' : '') . '>';
+ $mout .= ' <span class="label">' . rcube::Q($this->plugin->gettext('modifier')) . ' </span>';
+ $mout .= $select_mod->show($rule['test']);
+ $mout .= ' <span id="rule_mod_type' . $id . '"';
+ $mout .= ' style="display:' . (in_array($rule['test'], array('address', 'envelope')) ? 'inline' : 'none') .'">';
+ $mout .= rcube::Q($this->plugin->gettext('modtype')) . ' ';
+ $mout .= $select_type->show($rule['part']);
+ $mout .= '</span>';
+ $mout .= '</div>';
+
+ // Advanced modifiers (body transformations)
+ $select_mod = new html_select(array('name' => "_rule_trans[]", 'id' => 'rule_trans_op'.$id,
+ 'onchange' => 'rule_trans_select(' .$id .')'));
+ $select_mod->add(rcube::Q($this->plugin->gettext('text')), 'text');
+ $select_mod->add(rcube::Q($this->plugin->gettext('undecoded')), 'raw');
+ $select_mod->add(rcube::Q($this->plugin->gettext('contenttype')), 'content');
+
+ $mout .= '<div id="rule_trans' .$id. '" class="adv"' . ($rule['test'] != 'body' ? ' style="display:none"' : '') . '>';
+ $mout .= '<span class="label">' . rcube::Q($this->plugin->gettext('modifier')) . '</span>';
+ $mout .= $select_mod->show($rule['part']);
+ $mout .= '<input type="text" name="_rule_trans_type[]" id="rule_trans_type'.$id
+ . '" value="'.(is_array($rule['content']) ? implode(',', $rule['content']) : $rule['content'])
+ .'" size="20"' . ($rule['part'] != 'content' ? ' style="display:none"' : '')
+ . $this->error_class($id, 'test', 'part', 'rule_trans_type') .' />';
+ $mout .= '</div>';
+
+ // Advanced modifiers (body transformations)
+ $select_comp = new html_select(array('name' => "_rule_comp[]", 'id' => 'rule_comp_op'.$id));
+ $select_comp->add(rcube::Q($this->plugin->gettext('default')), '');
+ $select_comp->add(rcube::Q($this->plugin->gettext('octet')), 'i;octet');
+ $select_comp->add(rcube::Q($this->plugin->gettext('asciicasemap')), 'i;ascii-casemap');
+ if (in_array('comparator-i;ascii-numeric', $this->exts)) {
+ $select_comp->add(rcube::Q($this->plugin->gettext('asciinumeric')), 'i;ascii-numeric');
+ }
+
+ // Comparators
+ $mout .= '<div id="rule_comp' .$id. '" class="adv"' . ($rule['test'] == 'size' ? ' style="display:none"' : '') . '>';
+ $mout .= '<span class="label">' . rcube::Q($this->plugin->gettext('comparator')) . '</span>';
+ $mout .= $select_comp->show($rule['comparator']);
+ $mout .= '</div>';
+
+ // Date header
+ if (in_array('date', $this->exts)) {
+ $mout .= '<div id="rule_date_header_div' .$id. '" class="adv"'. ($rule['test'] != 'date' ? ' style="display:none"' : '') .'>';
+ $mout .= '<span class="label">' . rcube::Q($this->plugin->gettext('dateheader')) . '</span>';
+ $mout .= '<input type="text" name="_rule_date_header[]" id="rule_date_header'.$id
+ . '" value="'. Q($rule['test'] == 'date' ? $rule['header'] : '')
+ . '" size="15"' . $this->error_class($id, 'test', 'dateheader', 'rule_date_header') .' />';
+ $mout .= '</div>';
+ }
+
+ // Index
+ if (in_array('index', $this->exts)) {
+ $need_index = in_array($rule['test'], array('header', ', address', 'date'));
+ $mout .= '<div id="rule_index_div' .$id. '" class="adv"'. (!$need_index ? ' style="display:none"' : '') .'>';
+ $mout .= '<span class="label">' . rcube::Q($this->plugin->gettext('index')) . '</span>';
+ $mout .= '<input type="text" name="_rule_index[]" id="rule_index'.$id
+ . '" value="'. ($rule['index'] ? intval($rule['index']) : '')
+ . '" size="3"' . $this->error_class($id, 'test', 'index', 'rule_index') .' />';
+ $mout .= '&nbsp;<input type="checkbox" name="_rule_index_last[]" id="rule_index_last'.$id
+ . '" value="1"' . (!empty($rule['last']) ? ' checked="checked"' : '') . ' />'
+ . '<label for="rule_index_last'.$id.'">'.rcube::Q($this->plugin->gettext('indexlast')).'</label>';
+ $mout .= '</div>';
+ }
+
+ // Build output table
+ $out = $div ? '<div class="rulerow" id="rulerow' .$id .'">'."\n" : '';
+ $out .= '<table><tr>';
+ $out .= '<td class="advbutton">';
+ $out .= '<a href="#" id="ruleadv' . $id .'" title="'. rcube::Q($this->plugin->gettext('advancedopts')). '"
+ onclick="rule_adv_switch(' . $id .', this)" class="show">&nbsp;&nbsp;</a>';
+ $out .= '</td>';
+ $out .= '<td class="rowactions">' . $aout . '</td>';
+ $out .= '<td class="rowtargets">' . $tout . "\n";
+ $out .= '<div id="rule_advanced' .$id. '" style="display:none">' . $mout . '</div>';
+ $out .= '</td>';
+
+ // add/del buttons
+ $out .= '<td class="rowbuttons">';
+ $out .= '<a href="#" id="ruleadd' . $id .'" title="'. rcube::Q($this->plugin->gettext('add')). '"
+ onclick="rcmail.managesieve_ruleadd(' . $id .')" class="button add"></a>';
+ $out .= '<a href="#" id="ruledel' . $id .'" title="'. rcube::Q($this->plugin->gettext('del')). '"
+ onclick="rcmail.managesieve_ruledel(' . $id .')" class="button del' . ($rows_num<2 ? ' disabled' : '') .'"></a>';
+ $out .= '</td>';
+ $out .= '</tr></table>';
+
+ $out .= $div ? "</div>\n" : '';
+
+ return $out;
+ }
+
+ function action_div($fid, $id, $div=true)
+ {
+ $action = isset($this->form) ? $this->form['actions'][$id] : $this->script[$fid]['actions'][$id];
+ $rows_num = isset($this->form) ? sizeof($this->form['actions']) : sizeof($this->script[$fid]['actions']);
+
+ $out = $div ? '<div class="actionrow" id="actionrow' .$id .'">'."\n" : '';
+
+ $out .= '<table><tr><td class="rowactions">';
+
+ // action select
+ $select_action = new html_select(array('name' => "_action_type[$id]", 'id' => 'action_type'.$id,
+ 'onchange' => 'action_type_select(' .$id .')'));
+ if (in_array('fileinto', $this->exts))
+ $select_action->add(rcube::Q($this->plugin->gettext('messagemoveto')), 'fileinto');
+ if (in_array('fileinto', $this->exts) && in_array('copy', $this->exts))
+ $select_action->add(rcube::Q($this->plugin->gettext('messagecopyto')), 'fileinto_copy');
+ $select_action->add(rcube::Q($this->plugin->gettext('messageredirect')), 'redirect');
+ if (in_array('copy', $this->exts))
+ $select_action->add(rcube::Q($this->plugin->gettext('messagesendcopy')), 'redirect_copy');
+ if (in_array('reject', $this->exts))
+ $select_action->add(rcube::Q($this->plugin->gettext('messagediscard')), 'reject');
+ else if (in_array('ereject', $this->exts))
+ $select_action->add(rcube::Q($this->plugin->gettext('messagediscard')), 'ereject');
+ if (in_array('vacation', $this->exts))
+ $select_action->add(rcube::Q($this->plugin->gettext('messagereply')), 'vacation');
+ $select_action->add(rcube::Q($this->plugin->gettext('messagedelete')), 'discard');
+ if (in_array('imapflags', $this->exts) || in_array('imap4flags', $this->exts)) {
+ $select_action->add(rcube::Q($this->plugin->gettext('setflags')), 'setflag');
+ $select_action->add(rcube::Q($this->plugin->gettext('addflags')), 'addflag');
+ $select_action->add(rcube::Q($this->plugin->gettext('removeflags')), 'removeflag');
+ }
+ if (in_array('variables', $this->exts)) {
+ $select_action->add(rcube::Q($this->plugin->gettext('setvariable')), 'set');
+ }
+ if (in_array('enotify', $this->exts) || in_array('notify', $this->exts)) {
+ $select_action->add(rcube::Q($this->plugin->gettext('notify')), 'notify');
+ }
+ $select_action->add(rcube::Q($this->plugin->gettext('rulestop')), 'stop');
+
+ $select_type = $action['type'];
+ if (in_array($action['type'], array('fileinto', 'redirect')) && $action['copy']) {
+ $select_type .= '_copy';
+ }
+
+ $out .= $select_action->show($select_type);
+ $out .= '</td>';
+
+ // actions target inputs
+ $out .= '<td class="rowtargets">';
+ // shared targets
+ $out .= '<input type="text" name="_action_target['.$id.']" id="action_target' .$id. '" '
+ .'value="' .($action['type']=='redirect' ? rcube::Q($action['target'], 'strict', false) : ''). '" size="35" '
+ .'style="display:' .($action['type']=='redirect' ? 'inline' : 'none') .'" '
+ . $this->error_class($id, 'action', 'target', 'action_target') .' />';
+ $out .= '<textarea name="_action_target_area['.$id.']" id="action_target_area' .$id. '" '
+ .'rows="3" cols="35" '. $this->error_class($id, 'action', 'targetarea', 'action_target_area')
+ .'style="display:' .(in_array($action['type'], array('reject', 'ereject')) ? 'inline' : 'none') .'">'
+ . (in_array($action['type'], array('reject', 'ereject')) ? rcube::Q($action['target'], 'strict', false) : '')
+ . "</textarea>\n";
+
+ // vacation
+ $vsec = in_array('vacation-seconds', $this->exts);
+ $out .= '<div id="action_vacation' .$id.'" style="display:' .($action['type']=='vacation' ? 'inline' : 'none') .'">';
+ $out .= '<span class="label">'. rcube::Q($this->plugin->gettext('vacationreason')) .'</span><br />'
+ .'<textarea name="_action_reason['.$id.']" id="action_reason' .$id. '" '
+ .'rows="3" cols="35" '. $this->error_class($id, 'action', 'reason', 'action_reason') . '>'
+ . Q($action['reason'], 'strict', false) . "</textarea>\n";
+ $out .= '<br /><span class="label">' .rcube::Q($this->plugin->gettext('vacationsubject')) . '</span><br />'
+ .'<input type="text" name="_action_subject['.$id.']" id="action_subject'.$id.'" '
+ .'value="' . (is_array($action['subject']) ? rcube::Q(implode(', ', $action['subject']), 'strict', false) : $action['subject']) . '" size="35" '
+ . $this->error_class($id, 'action', 'subject', 'action_subject') .' />';
+ $out .= '<br /><span class="label">' .rcube::Q($this->plugin->gettext('vacationaddr')) . '</span><br />'
+ . $this->list_input($id, 'action_addresses', $action['addresses'], true,
+ $this->error_class($id, 'action', 'addresses', 'action_addresses'), 30);
+ $out .= '<br /><span class="label">' . rcube::Q($this->plugin->gettext($vsec ? 'vacationinterval' : 'vacationdays')) . '</span><br />'
+ .'<input type="text" name="_action_interval['.$id.']" id="action_interval'.$id.'" '
+ .'value="' .rcube::Q(isset($action['seconds']) ? $action['seconds'] : $action['days'], 'strict', false) . '" size="2" '
+ . $this->error_class($id, 'action', 'interval', 'action_interval') .' />';
+ if ($vsec) {
+ $out .= '&nbsp;<label><input type="radio" name="_action_interval_type['.$id.']" value="days"'
+ . (!isset($action['seconds']) ? ' checked="checked"' : '') .' class="radio" />'.$this->plugin->gettext('days').'</label>'
+ . '&nbsp;<label><input type="radio" name="_action_interval_type['.$id.']" value="seconds"'
+ . (isset($action['seconds']) ? ' checked="checked"' : '') .' class="radio" />'.$this->plugin->gettext('seconds').'</label>';
+ }
+ $out .= '</div>';
+
+ // flags
+ $flags = array(
+ 'read' => '\\Seen',
+ 'answered' => '\\Answered',
+ 'flagged' => '\\Flagged',
+ 'deleted' => '\\Deleted',
+ 'draft' => '\\Draft',
+ );
+ $flags_target = (array)$action['target'];
+
+ $out .= '<div id="action_flags' .$id.'" style="display:'
+ . (preg_match('/^(set|add|remove)flag$/', $action['type']) ? 'inline' : 'none') . '"'
+ . $this->error_class($id, 'action', 'flags', 'action_flags') . '>';
+ foreach ($flags as $fidx => $flag) {
+ $out .= '<input type="checkbox" name="_action_flags[' .$id .'][]" value="' . $flag . '"'
+ . (in_array_nocase($flag, $flags_target) ? 'checked="checked"' : '') . ' />'
+ . rcube::Q($this->plugin->gettext('flag'.$fidx)) .'<br>';
+ }
+ $out .= '</div>';
+
+ // set variable
+ $set_modifiers = array(
+ 'lower',
+ 'upper',
+ 'lowerfirst',
+ 'upperfirst',
+ 'quotewildcard',
+ 'length'
+ );
+
+ $out .= '<div id="action_set' .$id.'" style="display:' .($action['type']=='set' ? 'inline' : 'none') .'">';
+ $out .= '<span class="label">' .rcube::Q($this->plugin->gettext('setvarname')) . '</span><br />'
+ .'<input type="text" name="_action_varname['.$id.']" id="action_varname'.$id.'" '
+ .'value="' . rcube::Q($action['name']) . '" size="35" '
+ . $this->error_class($id, 'action', 'name', 'action_varname') .' />';
+ $out .= '<br /><span class="label">' .rcube::Q($this->plugin->gettext('setvarvalue')) . '</span><br />'
+ .'<input type="text" name="_action_varvalue['.$id.']" id="action_varvalue'.$id.'" '
+ .'value="' . rcube::Q($action['value']) . '" size="35" '
+ . $this->error_class($id, 'action', 'value', 'action_varvalue') .' />';
+ $out .= '<br /><span class="label">' .rcube::Q($this->plugin->gettext('setvarmodifiers')) . '</span><br />';
+ foreach ($set_modifiers as $s_m) {
+ $s_m_id = 'action_varmods' . $id . $s_m;
+ $out .= sprintf('<input type="checkbox" name="_action_varmods[%s][]" value="%s" id="%s"%s />%s<br>',
+ $id, $s_m, $s_m_id,
+ (array_key_exists($s_m, (array)$action) && $action[$s_m] ? ' checked="checked"' : ''),
+ rcube::Q($this->plugin->gettext('var' . $s_m)));
+ }
+ $out .= '</div>';
+
+ // notify
+ // skip :options tag - not used by the mailto method
+ $out .= '<div id="action_notify' .$id.'" style="display:' .($action['type']=='notify' ? 'inline' : 'none') .'">';
+ $out .= '<span class="label">' .rcube::Q($this->plugin->gettext('notifyaddress')) . '</span><br />'
+ .'<input type="text" name="_action_notifyaddress['.$id.']" id="action_notifyaddress'.$id.'" '
+ .'value="' . rcube::Q($action['address']) . '" size="35" '
+ . $this->error_class($id, 'action', 'address', 'action_notifyaddress') .' />';
+ $out .= '<br /><span class="label">'. rcube::Q($this->plugin->gettext('notifybody')) .'</span><br />'
+ .'<textarea name="_action_notifybody['.$id.']" id="action_notifybody' .$id. '" '
+ .'rows="3" cols="35" '. $this->error_class($id, 'action', 'method', 'action_notifybody') . '>'
+ . rcube::Q($action['body'], 'strict', false) . "</textarea>\n";
+ $out .= '<br /><span class="label">' .rcube::Q($this->plugin->gettext('notifysubject')) . '</span><br />'
+ .'<input type="text" name="_action_notifymessage['.$id.']" id="action_notifymessage'.$id.'" '
+ .'value="' . rcube::Q($action['message']) . '" size="35" '
+ . $this->error_class($id, 'action', 'message', 'action_notifymessage') .' />';
+ $out .= '<br /><span class="label">' .rcube::Q($this->plugin->gettext('notifyfrom')) . '</span><br />'
+ .'<input type="text" name="_action_notifyfrom['.$id.']" id="action_notifyfrom'.$id.'" '
+ .'value="' . rcube::Q($action['from']) . '" size="35" '
+ . $this->error_class($id, 'action', 'from', 'action_notifyfrom') .' />';
+ $importance_options = array(
+ 3 => 'notifyimportancelow',
+ 2 => 'notifyimportancenormal',
+ 1 => 'notifyimportancehigh'
+ );
+ $select_importance = new html_select(array(
+ 'name' => '_action_notifyimportance[' . $id . ']',
+ 'id' => '_action_notifyimportance' . $id,
+ 'class' => $this->error_class($id, 'action', 'importance', 'action_notifyimportance')));
+ foreach ($importance_options as $io_v => $io_n) {
+ $select_importance->add(rcube::Q($this->plugin->gettext($io_n)), $io_v);
+ }
+ $out .= '<br /><span class="label">' . rcube::Q($this->plugin->gettext('notifyimportance')) . '</span><br />';
+ $out .= $select_importance->show($action['importance'] ? $action['importance'] : 2);
+ $out .= '</div>';
+
+ // mailbox select
+ if ($action['type'] == 'fileinto')
+ $mailbox = $this->mod_mailbox($action['target'], 'out');
+ else
+ $mailbox = '';
+
+ $select = $this->rc->folder_selector(array(
+ 'realnames' => false,
+ 'maxlength' => 100,
+ 'id' => 'action_mailbox' . $id,
+ 'name' => "_action_mailbox[$id]",
+ 'style' => 'display:'.(!isset($action) || $action['type']=='fileinto' ? 'inline' : 'none')
+ ));
+ $out .= $select->show($mailbox);
+ $out .= '</td>';
+
+ // add/del buttons
+ $out .= '<td class="rowbuttons">';
+ $out .= '<a href="#" id="actionadd' . $id .'" title="'. rcube::Q($this->plugin->gettext('add')). '"
+ onclick="rcmail.managesieve_actionadd(' . $id .')" class="button add"></a>';
+ $out .= '<a href="#" id="actiondel' . $id .'" title="'. rcube::Q($this->plugin->gettext('del')). '"
+ onclick="rcmail.managesieve_actiondel(' . $id .')" class="button del' . ($rows_num<2 ? ' disabled' : '') .'"></a>';
+ $out .= '</td>';
+
+ $out .= '</tr></table>';
+
+ $out .= $div ? "</div>\n" : '';
+
+ return $out;
+ }
+
+ private function genid()
+ {
+ return preg_replace('/[^0-9]/', '', microtime(true));
+ }
+
+ private function strip_value($str, $allow_html = false, $trim = true)
+ {
+ if (is_array($str)) {
+ foreach ($str as $idx => $val) {
+ $val = $this->strip_value($val, $allow_html, $trim);
+
+ if ($val === '') {
+ unset($str[$idx]);
+ }
+ }
+
+ return $str;
+ }
+
+ if (!$allow_html) {
+ $str = strip_tags($str);
+ }
+
+ return $trim ? trim($str) : $str;
+ }
+
+ private function error_class($id, $type, $target, $elem_prefix='')
+ {
+ // TODO: tooltips
+ if (($type == 'test' && ($str = $this->errors['tests'][$id][$target])) ||
+ ($type == 'action' && ($str = $this->errors['actions'][$id][$target]))
+ ) {
+ $this->add_tip($elem_prefix.$id, $str, true);
+ return ' class="error"';
+ }
+
+ return '';
+ }
+
+ private function add_tip($id, $str, $error=false)
+ {
+ if ($error)
+ $str = html::span('sieve error', $str);
+
+ $this->tips[] = array($id, $str);
+ }
+
+ private function print_tips()
+ {
+ if (empty($this->tips))
+ return;
+
+ $script = rcmail_output::JS_OBJECT_NAME.'.managesieve_tip_register('.json_encode($this->tips).');';
+ $this->rc->output->add_script($script, 'foot');
+ }
+
+ private function list_input($id, $name, $value, $enabled, $class, $size=null)
+ {
+ $value = (array) $value;
+ $value = array_map(array('rcube', 'Q'), $value);
+ $value = implode("\n", $value);
+
+ return '<textarea data-type="list" name="_' . $name . '['.$id.']" id="' . $name.$id . '"'
+ . ($enabled ? '' : ' disabled="disabled"')
+ . ($size ? ' data-size="'.$size.'"' : '')
+ . $class
+ . ' style="display:none">' . $value . '</textarea>';
+ }
+
+ /**
+ * Validate input for date part elements
+ */
+ private function validate_date_part($type, $value)
+ {
+ // we do simple validation of date/part format
+ switch ($type) {
+ case 'date': // yyyy-mm-dd
+ return preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $value);
+ case 'iso8601':
+ return preg_match('/^[0-9: .,ZWT+-]+$/', $value);
+ case 'std11':
+ return preg_match('/^((Sun|Mon|Tue|Wed|Thu|Fri|Sat),\s+)?[0-9]{1,2}\s+'
+ . '(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+[0-9]{2,4}\s+'
+ . '[0-9]{2}:[0-9]{2}(:[0-9]{2})?\s+([+-]*[0-9]{4}|[A-Z]{1,3})$', $value);
+ case 'julian':
+ return preg_match('/^[0-9]+$/', $value);
+ case 'time': // hh:mm:ss
+ return preg_match('/^[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $value);
+ case 'year':
+ return preg_match('/^[0-9]{4}$/', $value);
+ case 'month':
+ return preg_match('/^[0-9]{2}$/', $value) && $value > 0 && $value < 13;
+ case 'day':
+ return preg_match('/^[0-9]{2}$/', $value) && $value > 0 && $value < 32;
+ case 'hour':
+ return preg_match('/^[0-9]{2}$/', $value) && $value < 24;
+ case 'minute':
+ return preg_match('/^[0-9]{2}$/', $value) && $value < 60;
+ case 'second':
+ // According to RFC5260, seconds can be from 00 to 60
+ return preg_match('/^[0-9]{2}$/', $value) && $value < 61;
+ case 'weekday':
+ return preg_match('/^[0-9]$/', $value) && $value < 7;
+ case 'zone':
+ return preg_match('/^[+-][0-9]{4}$/', $value);
+ }
+ }
+
+ /**
+ * Converts mailbox name from/to UTF7-IMAP from/to internal Sieve encoding
+ * with delimiter replacement.
+ *
+ * @param string $mailbox Mailbox name
+ * @param string $mode Conversion direction ('in'|'out')
+ *
+ * @return string Mailbox name
+ */
+ private function mod_mailbox($mailbox, $mode = 'out')
+ {
+ $delimiter = $_SESSION['imap_delimiter'];
+ $replace_delimiter = $this->rc->config->get('managesieve_replace_delimiter');
+ $mbox_encoding = $this->rc->config->get('managesieve_mbox_encoding', 'UTF7-IMAP');
+
+ if ($mode == 'out') {
+ $mailbox = rcube_charset::convert($mailbox, $mbox_encoding, 'UTF7-IMAP');
+ if ($replace_delimiter && $replace_delimiter != $delimiter)
+ $mailbox = str_replace($replace_delimiter, $delimiter, $mailbox);
+ }
+ else {
+ $mailbox = rcube_charset::convert($mailbox, 'UTF7-IMAP', $mbox_encoding);
+ if ($replace_delimiter && $replace_delimiter != $delimiter)
+ $mailbox = str_replace($delimiter, $replace_delimiter, $mailbox);
+ }
+
+ return $mailbox;
+ }
+
+ /**
+ * List sieve scripts
+ *
+ * @return array Scripts list
+ */
+ public function list_scripts()
+ {
+ if ($this->list !== null) {
+ return $this->list;
+ }
+
+ $this->list = $this->sieve->get_scripts();
+
+ // Handle active script(s) and list of scripts according to Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
+
+ // Skip protected names
+ foreach ((array)$this->list as $idx => $name) {
+ $_name = strtoupper($name);
+ if ($_name == 'MASTER')
+ $master_script = $name;
+ else if ($_name == 'MANAGEMENT')
+ $management_script = $name;
+ else if($_name == 'USER')
+ $user_script = $name;
+ else
+ continue;
+
+ unset($this->list[$idx]);
+ }
+
+ // get active script(s), read USER script
+ if ($user_script) {
+ $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
+ $filename_regex = '/'.preg_quote($extension, '/').'$/';
+ $_SESSION['managesieve_user_script'] = $user_script;
+
+ $this->sieve->load($user_script);
+
+ foreach ($this->sieve->script->as_array() as $rules) {
+ foreach ($rules['actions'] as $action) {
+ if ($action['type'] == 'include' && empty($action['global'])) {
+ $name = preg_replace($filename_regex, '', $action['target']);
+ $this->active[] = $name;
+ }
+ }
+ }
+ }
+ // create USER script if it doesn't exist
+ else {
+ $content = "# USER Management Script\n"
+ ."#\n"
+ ."# This script includes the various active sieve scripts\n"
+ ."# it is AUTOMATICALLY GENERATED. DO NOT EDIT MANUALLY!\n"
+ ."#\n"
+ ."# For more information, see http://wiki.kolab.org/KEP:14#USER\n"
+ ."#\n";
+ if ($this->sieve->save_script('USER', $content)) {
+ $_SESSION['managesieve_user_script'] = 'USER';
+ if (empty($this->master_file))
+ $this->sieve->activate('USER');
+ }
+ }
+ }
+ else if (!empty($this->list)) {
+ // Get active script name
+ if ($active = $this->sieve->get_active()) {
+ $this->active = array($active);
+ }
+
+ // Hide scripts from config
+ $exceptions = $this->rc->config->get('managesieve_filename_exceptions');
+ if (!empty($exceptions)) {
+ $this->list = array_diff($this->list, (array)$exceptions);
+ }
+ }
+
+ return $this->list;
+ }
+
+ /**
+ * Removes sieve script
+ *
+ * @param string $name Script name
+ *
+ * @return bool True on success, False on failure
+ */
+ public function remove_script($name)
+ {
+ $result = $this->sieve->remove($name);
+
+ // Kolab's KEP:14
+ if ($result && $this->rc->config->get('managesieve_kolab_master')) {
+ $this->deactivate_script($name);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Activates sieve script
+ *
+ * @param string $name Script name
+ *
+ * @return bool True on success, False on failure
+ */
+ public function activate_script($name)
+ {
+ // Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
+ $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
+ $user_script = $_SESSION['managesieve_user_script'];
+
+ // if the script is not active...
+ if ($user_script && array_search($name, $this->active) === false) {
+ // ...rewrite USER file adding appropriate include command
+ if ($this->sieve->load($user_script)) {
+ $script = $this->sieve->script->as_array();
+ $list = array();
+ $regexp = '/' . preg_quote($extension, '/') . '$/';
+
+ // Create new include entry
+ $rule = array(
+ 'actions' => array(
+ 0 => array(
+ 'target' => $name.$extension,
+ 'type' => 'include',
+ 'personal' => true,
+ )));
+
+ // get all active scripts for sorting
+ foreach ($script as $rid => $rules) {
+ foreach ($rules['actions'] as $action) {
+ if ($action['type'] == 'include' && empty($action['global'])) {
+ $target = $extension ? preg_replace($regexp, '', $action['target']) : $action['target'];
+ $list[] = $target;
+ }
+ }
+ }
+ $list[] = $name;
+
+ // Sort and find current script position
+ asort($list, SORT_LOCALE_STRING);
+ $list = array_values($list);
+ $index = array_search($name, $list);
+
+ // add rule at the end of the script
+ if ($index === false || $index == count($list)-1) {
+ $this->sieve->script->add_rule($rule);
+ }
+ // add rule at index position
+ else {
+ $script2 = array();
+ foreach ($script as $rid => $rules) {
+ if ($rid == $index) {
+ $script2[] = $rule;
+ }
+ $script2[] = $rules;
+ }
+ $this->sieve->script->content = $script2;
+ }
+
+ $result = $this->sieve->save();
+ if ($result) {
+ $this->active[] = $name;
+ }
+ }
+ }
+ }
+ else {
+ $result = $this->sieve->activate($name);
+ if ($result)
+ $this->active = array($name);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Deactivates sieve script
+ *
+ * @param string $name Script name
+ *
+ * @return bool True on success, False on failure
+ */
+ public function deactivate_script($name)
+ {
+ // Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
+ $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
+ $user_script = $_SESSION['managesieve_user_script'];
+
+ // if the script is active...
+ if ($user_script && ($key = array_search($name, $this->active)) !== false) {
+ // ...rewrite USER file removing appropriate include command
+ if ($this->sieve->load($user_script)) {
+ $script = $this->sieve->script->as_array();
+ $name = $name.$extension;
+
+ foreach ($script as $rid => $rules) {
+ foreach ($rules['actions'] as $action) {
+ if ($action['type'] == 'include' && empty($action['global'])
+ && $action['target'] == $name
+ ) {
+ break 2;
+ }
+ }
+ }
+
+ // Entry found
+ if ($rid < count($script)) {
+ $this->sieve->script->delete_rule($rid);
+ $result = $this->sieve->save();
+ if ($result) {
+ unset($this->active[$key]);
+ }
+ }
+ }
+ }
+ }
+ else {
+ $result = $this->sieve->deactivate();
+ if ($result)
+ $this->active = array();
+ }
+
+ return $result;
+ }
+
+ /**
+ * Saves current script (adding some variables)
+ */
+ public function save_script($name = null)
+ {
+ // Kolab's KEP:14
+ if ($this->rc->config->get('managesieve_kolab_master')) {
+ $this->sieve->script->set_var('EDITOR', self::PROGNAME);
+ $this->sieve->script->set_var('EDITOR_VERSION', self::VERSION);
+ }
+
+ return $this->sieve->save($name);
+ }
+
+ /**
+ * Returns list of rules from the current script
+ *
+ * @return array List of rules
+ */
+ public function list_rules()
+ {
+ $result = array();
+ $i = 1;
+
+ foreach ($this->script as $idx => $filter) {
+ if ($filter['type'] != 'if') {
+ continue;
+ }
+ $fname = $filter['name'] ? $filter['name'] : "#$i";
+ $result[] = array(
+ 'id' => $idx,
+ 'name' => $fname,
+ 'class' => $filter['disabled'] ? 'disabled' : '',
+ );
+ $i++;
+ }
+
+ return $result;
+ }
+}
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
index 80f590f4b..a614c3b15 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
@@ -6,18 +6,18 @@
* Copyright (C) 2008-2011, The Roundcube Dev Team
* Copyright (C) 2011, Kolab Systems AG
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
+ * 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
*/
class rcube_sieve_script
@@ -27,24 +27,26 @@ class rcube_sieve_script
private $vars = array(); // "global" variables
private $prefix = ''; // script header (comments)
private $supported = array( // Sieve extensions supported by class
- 'fileinto', // RFC5228
+ 'body', // RFC5173
+ 'copy', // RFC3894
+ 'date', // RFC5260
+ 'enotify', // RFC5435
'envelope', // RFC5228
- 'reject', // RFC5429
'ereject', // RFC5429
- 'copy', // RFC3894
- 'vacation', // RFC5230
- 'vacation-seconds', // RFC6131
- 'relational', // RFC3431
- 'regex', // draft-ietf-sieve-regex-01
+ 'fileinto', // RFC5228
'imapflags', // draft-melnikov-sieve-imapflags-06
'imap4flags', // RFC5232
'include', // draft-ietf-sieve-include-12
- 'variables', // RFC5229
- 'body', // RFC5173
- 'subaddress', // RFC5233
- 'enotify', // RFC5435
+ 'index', // RFC5260
'notify', // draft-ietf-sieve-notify-00
- // @TODO: spamtest+virustest, mailbox, date
+ 'regex', // draft-ietf-sieve-regex-01
+ 'reject', // RFC5429
+ 'relational', // RFC3431
+ 'subaddress', // RFC5233
+ 'vacation', // RFC5230
+ 'vacation-seconds', // RFC6131
+ 'variables', // RFC5229
+ // @TODO: spamtest+virustest, mailbox
);
/**
@@ -206,7 +208,6 @@ class rcube_sieve_script
// rules
foreach ($this->content as $rule) {
- $extension = '';
$script = '';
$tests = array();
$i = 0;
@@ -239,24 +240,8 @@ class rcube_sieve_script
$tests[$i] .= ($test['not'] ? 'not ' : '');
$tests[$i] .= 'header';
- if (!empty($test['type'])) {
- // relational operator + comparator
- if (preg_match('/^(value|count)-([gteqnl]{2})/', $test['type'], $m)) {
- array_push($exts, 'relational');
- array_push($exts, 'comparator-i;ascii-numeric');
-
- $tests[$i] .= ' :' . $m[1] . ' "' . $m[2] . '" :comparator "i;ascii-numeric"';
- }
- else {
- $this->add_comparator($test, $tests[$i], $exts);
-
- if ($test['type'] == 'regex') {
- array_push($exts, 'regex');
- }
-
- $tests[$i] .= ' :' . $test['type'];
- }
- }
+ $this->add_index($test, $tests[$i], $exts);
+ $this->add_operator($test, $tests[$i], $exts);
$tests[$i] .= ' ' . self::escape_string($test['arg1']);
$tests[$i] .= ' ' . self::escape_string($test['arg2']);
@@ -271,6 +256,10 @@ class rcube_sieve_script
$tests[$i] .= ($test['not'] ? 'not ' : '');
$tests[$i] .= $test['test'];
+ if ($test['test'] != 'envelope') {
+ $this->add_index($test, $tests[$i], $exts);
+ }
+
if (!empty($test['part'])) {
$tests[$i] .= ' :' . $test['part'];
if ($test['part'] == 'user' || $test['part'] == 'detail') {
@@ -278,14 +267,7 @@ class rcube_sieve_script
}
}
- $this->add_comparator($test, $tests[$i], $exts);
-
- if (!empty($test['type'])) {
- if ($test['type'] == 'regex') {
- array_push($exts, 'regex');
- }
- $tests[$i] .= ' :' . $test['type'];
- }
+ $this->add_operator($test, $tests[$i], $exts);
$tests[$i] .= ' ' . self::escape_string($test['arg1']);
$tests[$i] .= ' ' . self::escape_string($test['arg2']);
@@ -296,8 +278,6 @@ class rcube_sieve_script
$tests[$i] .= ($test['not'] ? 'not ' : '') . 'body';
- $this->add_comparator($test, $tests[$i], $exts);
-
if (!empty($test['part'])) {
$tests[$i] .= ' :' . $test['part'];
@@ -306,14 +286,35 @@ class rcube_sieve_script
}
}
- if (!empty($test['type'])) {
- if ($test['type'] == 'regex') {
- array_push($exts, 'regex');
- }
- $tests[$i] .= ' :' . $test['type'];
+ $this->add_operator($test, $tests[$i], $exts);
+
+ $tests[$i] .= ' ' . self::escape_string($test['arg']);
+ break;
+
+ case 'date':
+ case 'currentdate':
+ array_push($exts, 'date');
+
+ $tests[$i] .= ($test['not'] ? 'not ' : '') . $test['test'];
+
+ $this->add_index($test, $tests[$i], $exts);
+
+ if (!empty($test['originalzone']) && $test['test'] == 'date') {
+ $tests[$i] .= ' :originalzone';
}
+ else if (!empty($test['zone'])) {
+ $tests[$i] .= ' :zone ' . self::escape_string($test['zone']);
+ }
+
+ $this->add_operator($test, $tests[$i], $exts);
+ if ($test['test'] == 'date') {
+ $tests[$i] .= ' ' . self::escape_string($test['header']);
+ }
+
+ $tests[$i] .= ' ' . self::escape_string($test['part']);
$tests[$i] .= ' ' . self::escape_string($test['arg']);
+
break;
}
$i++;
@@ -490,6 +491,8 @@ class rcube_sieve_script
unset($exts[$key]);
}
+ sort($exts); // for convenience use always the same order
+
$output = 'require ["' . implode('","', $exts) . "\"];\n" . $output;
}
@@ -653,86 +656,85 @@ class rcube_sieve_script
break;
case 'size':
- $size = array('test' => 'size', 'not' => $not);
+ $test = array('test' => 'size', 'not' => $not);
+
+ $test['arg'] = array_pop($tokens);
+
for ($i=0, $len=count($tokens); $i<$len; $i++) {
if (!is_array($tokens[$i])
&& preg_match('/^:(under|over)$/i', $tokens[$i])
) {
- $size['type'] = strtolower(substr($tokens[$i], 1));
- }
- else {
- $size['arg'] = $tokens[$i];
+ $test['type'] = strtolower(substr($tokens[$i], 1));
}
}
- $tests[] = $size;
+ $tests[] = $test;
break;
case 'header':
- $header = array('test' => 'header', 'not' => $not, 'arg1' => '', 'arg2' => '');
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
- $header['comparator'] = $tokens[++$i];
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(count|value)$/i', $tokens[$i])) {
- $header['type'] = strtolower(substr($tokens[$i], 1)) . '-' . $tokens[++$i];
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
- $header['type'] = strtolower(substr($tokens[$i], 1));
- }
- else {
- $header['arg1'] = $header['arg2'];
- $header['arg2'] = $tokens[$i];
+ case 'address':
+ case 'envelope':
+ $test = array('test' => $token, 'not' => $not);
+
+ $test['arg2'] = array_pop($tokens);
+ $test['arg1'] = array_pop($tokens);
+
+ $test += $this->test_tokens($tokens);
+
+ if ($token != 'header' && !empty($tokens)) {
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ if (!is_array($tokens[$i]) && preg_match('/^:(localpart|domain|all|user|detail)$/i', $tokens[$i])) {
+ $test['part'] = strtolower(substr($tokens[$i], 1));
+ }
}
}
- $tests[] = $header;
+ $tests[] = $test;
break;
- case 'address':
- case 'envelope':
- $header = array('test' => $token, 'not' => $not, 'arg1' => '', 'arg2' => '');
+ case 'body':
+ $test = array('test' => 'body', 'not' => $not);
+
+ $test['arg'] = array_pop($tokens);
+
+ $test += $this->test_tokens($tokens);
+
for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
- $header['comparator'] = $tokens[++$i];
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
- $header['type'] = strtolower(substr($tokens[$i], 1));
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(localpart|domain|all|user|detail)$/i', $tokens[$i])) {
- $header['part'] = strtolower(substr($tokens[$i], 1));
- }
- else {
- $header['arg1'] = $header['arg2'];
- $header['arg2'] = $tokens[$i];
+ if (!is_array($tokens[$i]) && preg_match('/^:(raw|content|text)$/i', $tokens[$i])) {
+ $test['part'] = strtolower(substr($tokens[$i], 1));
+
+ if ($test['part'] == 'content') {
+ $test['content'] = $tokens[++$i];
+ }
}
}
- $tests[] = $header;
+ $tests[] = $test;
break;
- case 'body':
- $header = array('test' => 'body', 'not' => $not, 'arg' => '');
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
- $header['comparator'] = $tokens[++$i];
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
- $header['type'] = strtolower(substr($tokens[$i], 1));
- }
- else if (!is_array($tokens[$i]) && preg_match('/^:(raw|content|text)$/i', $tokens[$i])) {
- $header['part'] = strtolower(substr($tokens[$i], 1));
+ case 'date':
+ case 'currentdate':
+ $test = array('test' => $token, 'not' => $not);
- if ($header['part'] == 'content') {
- $header['content'] = $tokens[++$i];
- }
+ $test['arg'] = array_pop($tokens);
+ $test['part'] = array_pop($tokens);
+
+ if ($token == 'date') {
+ $test['header'] = array_pop($tokens);
+ }
+
+ $test += $this->test_tokens($tokens);
+
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ if (!is_array($tokens[$i]) && preg_match('/^:zone$/i', $tokens[$i])) {
+ $test['zone'] = $tokens[++$i];
}
- else {
- $header['arg'] = $tokens[$i];
+ else if (!is_array($tokens[$i]) && preg_match('/^:originalzone$/i', $tokens[$i])) {
+ $test['originalzone'] = true;
}
}
- $tests[] = $header;
+ $tests[] = $test;
break;
case 'exists':
@@ -784,15 +786,9 @@ class rcube_sieve_script
$result = null;
while (strlen($content)) {
- $tokens = self::tokenize($content, true);
+ $tokens = self::tokenize($content, true);
$separator = array_pop($tokens);
-
- if (!empty($tokens)) {
- $token = array_shift($tokens);
- }
- else {
- $token = $separator;
- }
+ $token = !empty($tokens) ? array_shift($tokens) : $separator;
switch ($token) {
case 'discard':
@@ -803,113 +799,78 @@ class rcube_sieve_script
case 'fileinto':
case 'redirect':
- $copy = false;
- $target = '';
+ $action = array('type' => $token, 'target' => array_pop($tokens));
+ $args = array('copy');
+ $action += $this->action_arguments($tokens, $args);
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- if (strtolower($tokens[$i]) == ':copy') {
- $copy = true;
- }
- else {
- $target = $tokens[$i];
- }
- }
-
- $result[] = array('type' => $token, 'copy' => $copy,
- 'target' => $target);
- break;
-
- case 'reject':
- case 'ereject':
- $result[] = array('type' => $token, 'target' => array_pop($tokens));
+ $result[] = $action;
break;
case 'vacation':
- $vacation = array('type' => 'vacation', 'reason' => array_pop($tokens));
-
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- $tok = strtolower($tokens[$i]);
- if ($tok == ':mime') {
- $vacation['mime'] = true;
- }
- else if ($tok[0] == ':') {
- $vacation[substr($tok, 1)] = $tokens[++$i];
- }
- }
+ $action = array('type' => 'vacation', 'reason' => array_pop($tokens));
+ $args = array('mime');
+ $vargs = array('seconds', 'days', 'addresses', 'subject', 'handle', 'from');
+ $action += $this->action_arguments($tokens, $args, $vargs);
- $result[] = $vacation;
+ $result[] = $action;
break;
+ case 'reject':
+ case 'ereject':
case 'setflag':
case 'addflag':
case 'removeflag':
- $result[] = array('type' => $token,
- // Flags list: last token (skip optional variable)
- 'target' => $tokens[count($tokens)-1]
- );
+ $result[] = array('type' => $token, 'target' => array_pop($tokens));
break;
case 'include':
- $include = array('type' => 'include', 'target' => array_pop($tokens));
-
- // Parameters: :once, :optional, :global, :personal
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- $tok = strtolower($tokens[$i]);
- if ($tok[0] == ':') {
- $include[substr($tok, 1)] = true;
- }
- }
+ $action = array('type' => 'include', 'target' => array_pop($tokens));
+ $args = array('once', 'optional', 'global', 'personal');
+ $action += $this->action_arguments($tokens, $args);
- $result[] = $include;
+ $result[] = $action;
break;
case 'set':
- $set = array('type' => 'set', 'value' => array_pop($tokens), 'name' => array_pop($tokens));
+ $action = array('type' => 'set', 'value' => array_pop($tokens), 'name' => array_pop($tokens));
+ $args = array('lower', 'upper', 'lowerfirst', 'upperfirst', 'quotewildcard', 'length');
+ $action += $this->action_arguments($tokens, $args);
- // Parameters: :lower :upper :lowerfirst :upperfirst :quotewildcard :length
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- $tok = strtolower($tokens[$i]);
- if ($tok[0] == ':') {
- $set[substr($tok, 1)] = true;
- }
- }
-
- $result[] = $set;
+ $result[] = $action;
break;
case 'require':
// skip, will be build according to used commands
- // $result[] = array('type' => 'require', 'target' => $tokens);
+ // $result[] = array('type' => 'require', 'target' => array_pop($tokens));
break;
case 'notify':
- $notify = array('type' => 'notify');
- $priorities = array(':high' => 1, ':normal' => 2, ':low' => 3);
-
- // Parameters: :from, :importance, :options, :message
- // additional (optional) :method parameter for notify extension
- for ($i=0, $len=count($tokens); $i<$len; $i++) {
- $tok = strtolower($tokens[$i]);
- if ($tok[0] == ':') {
- // Here we support only 00 version of notify draft, there
- // were a couple regressions in 00 to 04 changelog, we use
- // the version used by Cyrus
- if (isset($priorities[$tok])) {
- $notify['importance'] = $priorities[$tok];
- }
- else {
- $notify[substr($tok, 1)] = $tokens[++$i];
+ $action = array('type' => 'notify');
+ $priorities = array('high' => 1, 'normal' => 2, 'low' => 3);
+ $vargs = array('from', 'importance', 'options', 'message', 'method');
+ $args = array_keys($priorities);
+ $action += $this->action_arguments($tokens, $args, $vargs);
+
+ // Here we support only 00 version of notify draft, there
+ // were a couple regressions in 00 to 04 changelog, we use
+ // the version used by Cyrus
+ if (!isset($action['importance'])) {
+ foreach ($priorities as $key => $val) {
+ if (isset($action[$key])) {
+ $action['importance'] = $val;
+ unset($action[$key]);
}
}
- else {
- // unnamed parameter is a :method in enotify extension
- $notify['method'] = $tokens[$i];
- }
}
- $method_components = parse_url($notify['method']);
+ // unnamed parameter is a :method in enotify extension
+ if (!isset($action['method'])) {
+ $action['method'] = array_pop($tokens);
+ }
+
+ $method_components = parse_url($action['method']);
if ($method_components['scheme'] == 'mailto') {
- $notify['address'] = $method_components['path'];
+ $action['address'] = $method_components['path'];
$method_params = array();
if (array_key_exists('query', $method_components)) {
parse_str($method_components['query'], $method_params);
@@ -919,10 +880,10 @@ class rcube_sieve_script
if (ini_get('magic_quotes_gpc') || ini_get('magic_quotes_sybase')) {
array_map('stripslashes', $method_params);
}
- $notify['body'] = (array_key_exists('body', $method_params)) ? $method_params['body'] : '';
+ $action['body'] = (array_key_exists('body', $method_params)) ? $method_params['body'] : '';
}
- $result[] = $notify;
+ $result[] = $action;
break;
}
@@ -935,7 +896,7 @@ class rcube_sieve_script
}
/**
- *
+ * Add comparator to the test
*/
private function add_comparator($test, &$out, &$exts)
{
@@ -958,6 +919,111 @@ class rcube_sieve_script
}
/**
+ * Add index argument to the test
+ */
+ private function add_index($test, &$out, &$exts)
+ {
+ if (!empty($test['index'])) {
+ array_push($exts, 'index');
+ $out .= ' :index ' . intval($test['index']) . ($test['last'] ? ' :last' : '');
+ }
+ }
+
+ /**
+ * Add operators to the test
+ */
+ private function add_operator($test, &$out, &$exts)
+ {
+ if (empty($test['type'])) {
+ return;
+ }
+
+ // relational operator + comparator
+ if (preg_match('/^(value|count)-([gteqnl]{2})/', $test['type'], $m)) {
+ array_push($exts, 'relational');
+ array_push($exts, 'comparator-i;ascii-numeric');
+
+ $out .= ' :' . $m[1] . ' "' . $m[2] . '" :comparator "i;ascii-numeric"';
+ }
+ else {
+ $this->add_comparator($test, $out, $exts);
+
+ if ($test['type'] == 'regex') {
+ array_push($exts, 'regex');
+ }
+
+ $out .= ' :' . $test['type'];
+ }
+ }
+
+ /**
+ * Extract test tokens
+ */
+ private function test_tokens(&$tokens)
+ {
+ $test = array();
+ $result = array();
+
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ if (!is_array($tokens[$i]) && preg_match('/^:comparator$/i', $tokens[$i])) {
+ $test['comparator'] = $tokens[++$i];
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:(count|value)$/i', $tokens[$i])) {
+ $test['type'] = strtolower(substr($tokens[$i], 1)) . '-' . $tokens[++$i];
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
+ $test['type'] = strtolower(substr($tokens[$i], 1));
+ }
+ else if (!is_array($tokens[$i]) && preg_match('/^:index$/i', $tokens[$i])) {
+ $test['index'] = intval($tokens[++$i]);
+ if ($tokens[$i+1] && preg_match('/^:last$/i', $tokens[$i+1])) {
+ $test['last'] = true;
+ $i++;
+ }
+ }
+ else {
+ $result[] = $tokens[$i];
+ }
+ }
+
+ $tokens = $result;
+
+ return $test;
+ }
+
+ /**
+ * Extract action arguments
+ */
+ private function action_arguments(&$tokens, $bool_args, $val_args = array())
+ {
+ $action = array();
+ $result = array();
+
+ for ($i=0, $len=count($tokens); $i<$len; $i++) {
+ $tok = $tokens[$i];
+ if (!is_array($tok) && $tok[0] == ':') {
+ $tok = strtolower(substr($tok, 1));
+ if (in_array($tok, $bool_args)) {
+ $action[$tok] = true;
+ }
+ else if (in_array($tok, $val_args)) {
+ $action[$tok] = $tokens[++$i];
+ }
+ else {
+ $result[] = $tok;
+ }
+ }
+ else {
+ $result[] = $tok;
+ }
+ }
+
+ $tokens = $result;
+
+ return $action;
+ }
+
+ /**
* Escape special chars into quoted string value or multi-line string
* or list of strings
*
@@ -1015,11 +1081,10 @@ class rcube_sieve_script
* @param mixed $num Number of tokens to return, 0 for all
* or True for all tokens until separator is found.
* Separator will be returned as last token.
- * @param int $in_list Enable to call recursively inside a list
*
* @return mixed Tokens array or string if $num=1
*/
- static function tokenize(&$str, $num=0, $in_list=false)
+ static function tokenize(&$str, $num=0)
{
$result = array();
@@ -1054,7 +1119,7 @@ class rcube_sieve_script
// Parenthesized list
case '[':
$str = substr($str, 1);
- $result[] = self::tokenize($str, 0, true);
+ $result[] = self::tokenize($str, 0);
break;
case ']':
$str = substr($str, 1);
diff --git a/plugins/managesieve/localization/az_AZ.inc b/plugins/managesieve/localization/az_AZ.inc
index b1bfae5e9..670162552 100644
--- a/plugins/managesieve/localization/az_AZ.inc
+++ b/plugins/managesieve/localization/az_AZ.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Əlavə et';
$labels['del'] = 'Sil';
$labels['sender'] = 'Göndərən';
$labels['recipient'] = 'Qəbul edən';
-$labels['vacationaddresses'] = 'Əlavə ünvanlarım üçün siyahı (vergüllər ilə ayrılmış):';
+$labels['vacationaddr'] = 'Əlavə ünvanlarım üçün siyahı:';
$labels['vacationdays'] = 'Məktub neçə müddətdən bir göndərilsin (gündə):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/be_BE.inc b/plugins/managesieve/localization/be_BE.inc
index 64f81599e..ff54c0546 100644
--- a/plugins/managesieve/localization/be_BE.inc
+++ b/plugins/managesieve/localization/be_BE.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Дадаць';
$labels['del'] = 'Выдаліць';
$labels['sender'] = 'Ад каго';
$labels['recipient'] = 'Каму';
-$labels['vacationaddresses'] = 'Дадатковы спіс атрымальнікаў (праз коску):';
+$labels['vacationaddr'] = 'Дадатковы спіс атрымальнікаў:';
$labels['vacationdays'] = 'Як часта дасылаць паведамленні (ў днях):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/bg_BG.inc b/plugins/managesieve/localization/bg_BG.inc
index a8f75df04..e22290cff 100644
--- a/plugins/managesieve/localization/bg_BG.inc
+++ b/plugins/managesieve/localization/bg_BG.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Добавяне';
$labels['del'] = 'Изтриване';
$labels['sender'] = 'Подател';
$labels['recipient'] = 'Получател';
-$labels['vacationaddresses'] = 'Допълнителни e-mail адреси (разделени със запетая):';
+$labels['vacationaddr'] = 'Допълнителни e-mail адреси:';
$labels['vacationdays'] = 'Колко често пращате съобщения (в дни):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/bs_BA.inc b/plugins/managesieve/localization/bs_BA.inc
index 6d1ec8d2c..df9083129 100644
--- a/plugins/managesieve/localization/bs_BA.inc
+++ b/plugins/managesieve/localization/bs_BA.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Dodaj';
$labels['del'] = 'Obriši';
$labels['sender'] = 'Pošiljaoc';
$labels['recipient'] = 'Primaoc';
-$labels['vacationaddresses'] = 'Moje dodatne email adrese (odvojite zarezima):';
+$labels['vacationaddr'] = 'Moje dodatne email adrese:';
$labels['vacationdays'] = 'Frekvencija slanja poruka (u danima):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Frekvencija slanja poruka:';
+$labels['days'] = 'dana';
+$labels['seconds'] = 'sekundi';
$labels['vacationreason'] = 'Tijelo poruke (razlog za odmor):';
$labels['vacationsubject'] = 'Naslov poruke:';
$labels['rulestop'] = 'Prestani procjenjivati pravila';
diff --git a/plugins/managesieve/localization/ca_ES.inc b/plugins/managesieve/localization/ca_ES.inc
index df1cdec89..7ebd2c049 100644
--- a/plugins/managesieve/localization/ca_ES.inc
+++ b/plugins/managesieve/localization/ca_ES.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Afegeix';
$labels['del'] = 'Suprimeix';
$labels['sender'] = 'Remitent';
$labels['recipient'] = 'Destinatari/a';
-$labels['vacationaddresses'] = 'Altres adreces electròniques meves (separades per coma)';
+$labels['vacationaddr'] = 'Altres adreces electròniques meves:';
$labels['vacationdays'] = 'Cada quan enviar un missatge (en dies):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/cs_CZ.inc b/plugins/managesieve/localization/cs_CZ.inc
index 26baeff2b..c14873bb7 100644
--- a/plugins/managesieve/localization/cs_CZ.inc
+++ b/plugins/managesieve/localization/cs_CZ.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Přidej';
$labels['del'] = 'Smaž';
$labels['sender'] = 'Odesílatel';
$labels['recipient'] = 'Příjemce';
-$labels['vacationaddresses'] = 'Moje další e-mailové adresy (aliasy) spojené s tímto účtem (oddělené čárkou):';
+$labels['vacationaddr'] = 'Moje další e-mailové adresy (aliasy) spojené s tímto účtem:';
$labels['vacationdays'] = 'Počet dnů mezi automatickými odpověďmi:';
$labels['vacationinterval'] = 'Prodleva mezi automatickými odpověďmi:';
$labels['days'] = 'dnů';
diff --git a/plugins/managesieve/localization/cy_GB.inc b/plugins/managesieve/localization/cy_GB.inc
index 800d14b65..63d2e7100 100644
--- a/plugins/managesieve/localization/cy_GB.inc
+++ b/plugins/managesieve/localization/cy_GB.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Ychwanegu';
$labels['del'] = 'Dileu';
$labels['sender'] = 'Anfonwr';
$labels['recipient'] = 'Derbynnwr';
-$labels['vacationaddresses'] = 'Fy chyfeiriadau ebost ychwanegol (gwahanir gyda coma):';
+$labels['vacationaddr'] = 'Fy chyfeiriadau ebost ychwanegol:';
$labels['vacationdays'] = 'Pa mor aml i ddanfon negeseuon (mewn dyddiau):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/da_DK.inc b/plugins/managesieve/localization/da_DK.inc
index 6bc43cf58..058481031 100644
--- a/plugins/managesieve/localization/da_DK.inc
+++ b/plugins/managesieve/localization/da_DK.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Tilføje';
$labels['del'] = 'Fjern';
$labels['sender'] = 'Afsender';
$labels['recipient'] = 'Modtager';
-$labels['vacationaddresses'] = 'Mine alternative e-mailadresser (kommasepareret):';
+$labels['vacationaddr'] = 'Mine alternative e-mailadresser:';
$labels['vacationdays'] = 'Hvor tit skal besked sendes (i dage):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/de_CH.inc b/plugins/managesieve/localization/de_CH.inc
index b30625fe9..19a9b9de3 100644
--- a/plugins/managesieve/localization/de_CH.inc
+++ b/plugins/managesieve/localization/de_CH.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Hinzufügen';
$labels['del'] = 'Löschen';
$labels['sender'] = 'Absender';
$labels['recipient'] = 'Empfänger';
-$labels['vacationaddresses'] = 'Zusätzliche Liste von Empfängern (Komma getrennt):';
+$labels['vacationaddr'] = 'Zusätzliche Liste von Empfängern:';
$labels['vacationdays'] = 'Antwort wird erneut gesendet nach (in Tagen):';
$labels['vacationinterval'] = 'Wie oft senden:';
$labels['days'] = 'Tage';
diff --git a/plugins/managesieve/localization/de_DE.inc b/plugins/managesieve/localization/de_DE.inc
index 1b741efc6..4894904d6 100644
--- a/plugins/managesieve/localization/de_DE.inc
+++ b/plugins/managesieve/localization/de_DE.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Hinzufügen';
$labels['del'] = 'Löschen';
$labels['sender'] = 'Absender';
$labels['recipient'] = 'Empfänger';
-$labels['vacationaddresses'] = 'Zusätzliche Liste von E-Mail Empfängern (Komma getrennt):';
+$labels['vacationaddr'] = 'Zusätzliche Liste von E-Mail Empfängern:';
$labels['vacationdays'] = 'Wie oft sollen Nachrichten gesendet werden (in Tagen):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/el_GR.inc b/plugins/managesieve/localization/el_GR.inc
index 714b7240f..e5a1b792d 100644
--- a/plugins/managesieve/localization/el_GR.inc
+++ b/plugins/managesieve/localization/el_GR.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Προσθήκη';
$labels['del'] = 'Διαγραφή';
$labels['sender'] = 'Αποστολέας';
$labels['recipient'] = 'Παραλήπτης';
-$labels['vacationaddresses'] = 'Πρόσθετη λίστα email παραληπτών (διαχωρισμένη με κόμματα):';
+$labels['vacationaddr'] = 'Πρόσθετη λίστα email παραληπτών:';
$labels['vacationdays'] = 'Συχνότητα αποστολής μηνυμάτων (σε ημέρες):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/en_GB.inc b/plugins/managesieve/localization/en_GB.inc
index 4dd4f7d8b..ff4965ca0 100644
--- a/plugins/managesieve/localization/en_GB.inc
+++ b/plugins/managesieve/localization/en_GB.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Add';
$labels['del'] = 'Delete';
$labels['sender'] = 'Sender';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddresses'] = 'Additional list of recipient e-mails (comma separated):';
+$labels['vacationaddr'] = 'Additional list of recipient e-mails:';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc
index 2b391e0c5..72bbf9d41 100644
--- a/plugins/managesieve/localization/en_US.inc
+++ b/plugins/managesieve/localization/en_US.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Add';
$labels['del'] = 'Delete';
$labels['sender'] = 'Sender';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'count is greater than or equal to';
$labels['countislessthan'] = 'count is less than';
$labels['countislessthanequal'] = 'count is less than or equal to';
$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count does not equal';
+$labels['countnotequals'] = 'count is not equal to';
$labels['valueisgreaterthan'] = 'value is greater than';
$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
$labels['valueislessthan'] = 'value is less than';
$labels['valueislessthanequal'] = 'value is less than or equal to';
$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value does not equal';
+$labels['valuenotequals'] = 'value is not equal to';
$labels['setflags'] = 'Set flags to the message';
$labels['addflags'] = 'Add flags to the message';
$labels['removeflags'] = 'Remove flags from the message';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Create filter';
$labels['usedata'] = 'Use following data in the filter:';
$labels['nextstep'] = 'Next Step';
$labels['...'] = '...';
+$labels['currdate'] = 'Current date';
+$labels['datetest'] = 'Date';
+$labels['dateheader'] = 'header:';
+$labels['year'] = 'year';
+$labels['month'] = 'month';
+$labels['day'] = 'day';
+$labels['date'] = 'date (yyyy-mm-dd)';
+$labels['julian'] = 'date (julian)';
+$labels['hour'] = 'hour';
+$labels['minute'] = 'minute';
+$labels['second'] = 'second';
+$labels['time'] = 'time (hh:mm:ss)';
+$labels['iso8601'] = 'date (ISO8601)';
+$labels['std11'] = 'date (RFC2822)';
+$labels['zone'] = 'time-zone';
+$labels['weekday'] = 'weekday (0-6)';
$labels['advancedopts'] = 'Advanced options';
$labels['body'] = 'Body';
$labels['address'] = 'address';
@@ -140,6 +156,8 @@ $labels['default'] = 'default';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['index'] = 'index:';
+$labels['indexlast'] = 'backwards';
$messages = array();
$messages['filterunknownerror'] = 'Unknown server error.';
@@ -173,5 +191,6 @@ $messages['nametoolong'] = 'Name too long.';
$messages['namereserved'] = 'Reserved name.';
$messages['setexist'] = 'Set already exists.';
$messages['nodata'] = 'At least one position must be selected!';
+$messages['invaliddateformat'] = 'Invalid date or date part format';
?>
diff --git a/plugins/managesieve/localization/eo.inc b/plugins/managesieve/localization/eo.inc
index 3ce49ddb2..3f54e2391 100644
--- a/plugins/managesieve/localization/eo.inc
+++ b/plugins/managesieve/localization/eo.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Aldoni';
$labels['del'] = 'Forigi';
$labels['sender'] = 'Sendanto';
$labels['recipient'] = 'Ricevanto';
-$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/es_AR.inc b/plugins/managesieve/localization/es_AR.inc
index c9c6e70f8..e8d90efcf 100644
--- a/plugins/managesieve/localization/es_AR.inc
+++ b/plugins/managesieve/localization/es_AR.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Agregar';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remitente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddresses'] = 'Lista de direcciones de correo de destinatarios adicionales (separados por comas):';
+$labels['vacationaddr'] = 'Lista de direcciones de correo de destinatarios adicionales:';
$labels['vacationdays'] = 'Cada cuanto enviar mensajes (en días):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/es_ES.inc b/plugins/managesieve/localization/es_ES.inc
index 9673a9959..65ed461c4 100644
--- a/plugins/managesieve/localization/es_ES.inc
+++ b/plugins/managesieve/localization/es_ES.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Agregar';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remitente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddresses'] = 'Lista de direcciones de correo de destinatarios adicionales (separados por comas):';
+$labels['vacationaddr'] = 'Mis direcciones de correo electrónico adicionales:';
$labels['vacationdays'] = 'Cada cuánto enviar mensajes (en días):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Cada cuánto enviar mensajes:';
+$labels['days'] = 'días';
+$labels['seconds'] = 'segundos';
$labels['vacationreason'] = 'Cuerpo del mensaje (razón de vacaciones):';
$labels['vacationsubject'] = 'Asunto del Mensaje:';
$labels['rulestop'] = 'Parar de evaluar reglas';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'contiene más o igual que';
$labels['countislessthan'] = 'contiene menos que';
$labels['countislessthanequal'] = 'contiene menos o igual que';
$labels['countequals'] = 'contiene igual que';
-$labels['countnotequals'] = 'contiene distinto que';
+$labels['countnotequals'] = 'la cuenta no es igual a';
$labels['valueisgreaterthan'] = 'el valor es mayor que';
$labels['valueisgreaterthanequal'] = 'el valor es mayor o igual que';
$labels['valueislessthan'] = 'el valor es menor que';
$labels['valueislessthanequal'] = 'el valor es menor o igual que';
$labels['valueequals'] = 'el valor es igual que';
-$labels['valuenotequals'] = 'el valor es distinto que';
+$labels['valuenotequals'] = 'el valor no es igual a';
$labels['setflags'] = 'Etiquetar el mensaje';
$labels['addflags'] = 'Agregar etiquetas al mensaje';
$labels['removeflags'] = 'Eliminar etiquetas al mensaje';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Crear Filtro';
$labels['usedata'] = 'Usar los siguientes datos en el filtro:';
$labels['nextstep'] = 'Siguiente paso';
$labels['...'] = '...';
+$labels['currdate'] = 'Fecha actual';
+$labels['datetest'] = 'Fecha';
+$labels['dateheader'] = 'cabecera:';
+$labels['year'] = 'año';
+$labels['month'] = 'mes';
+$labels['day'] = 'día';
+$labels['date'] = 'fecha (aaaa-mm-dd)';
+$labels['julian'] = 'fecha (juliano)';
+$labels['hour'] = 'hora';
+$labels['minute'] = 'minuto';
+$labels['second'] = 'segundo';
+$labels['time'] = 'hora (hh:mm:ss)';
+$labels['iso8601'] = 'fecha (ISO8601)';
+$labels['std11'] = 'fecha (RFC2822)';
+$labels['zone'] = 'zona horaria';
+$labels['weekday'] = 'día de la semana (0-6)';
$labels['advancedopts'] = 'Opciones avanzadas';
$labels['body'] = 'Cuerpo del mensaje';
$labels['address'] = 'dirección';
@@ -140,6 +156,8 @@ $labels['default'] = 'predeterminado';
$labels['octet'] = 'estricto (octeto)';
$labels['asciicasemap'] = 'no sensible a mayúsculas (ascii-casemap)';
$labels['asciinumeric'] = 'numerico (ascii-numeric)';
+$labels['index'] = 'índice:';
+$labels['indexlast'] = 'hacia atrás';
$messages = array();
$messages['filterunknownerror'] = 'Error desconocido de servidor.';
@@ -173,5 +191,6 @@ $messages['nametoolong'] = 'Imposible crear el conjunto de filtros. Nombre demas
$messages['namereserved'] = 'Nombre reservado.';
$messages['setexist'] = 'El conjunto ya existe.';
$messages['nodata'] = '¡Al menos una posición debe ser seleccionada!';
+$messages['invaliddateformat'] = 'Fecha o formato de parte de la fecha no válido';
?>
diff --git a/plugins/managesieve/localization/et_EE.inc b/plugins/managesieve/localization/et_EE.inc
index 334a65cee..dff15dfb4 100644
--- a/plugins/managesieve/localization/et_EE.inc
+++ b/plugins/managesieve/localization/et_EE.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Lisa';
$labels['del'] = 'Kustuta';
$labels['sender'] = 'Saatja';
$labels['recipient'] = 'Saaja';
-$labels['vacationaddresses'] = 'Lisanimekiri saaja e-posti aadressidest (komadega eraldatud):';
+$labels['vacationaddr'] = 'Minu teised e-posti aadress(id):';
$labels['vacationdays'] = 'Kui tihti kirju saata (päevades):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Kui tihti kirju saata:';
+$labels['days'] = 'päeva';
+$labels['seconds'] = 'sekundit';
$labels['vacationreason'] = 'Kirja sisu (puhkuse põhjus):';
$labels['vacationsubject'] = 'Kirja teema:';
$labels['rulestop'] = 'Peata reeglite otsimine';
@@ -83,7 +83,7 @@ $labels['countisgreaterthanequal'] = 'koguarv on suurem kui või võrdne';
$labels['countislessthan'] = 'koguarv on väiksem';
$labels['countislessthanequal'] = 'koguarv on väiksem kui või võrdne';
$labels['countequals'] = 'koguarv on võrdne';
-$labels['countnotequals'] = 'koguarv ei ole võrdne';
+$labels['countnotequals'] = 'summa ei ole võrdne';
$labels['valueisgreaterthan'] = 'väärtus on suurem kui';
$labels['valueisgreaterthanequal'] = 'väärtus on suurem kui või võrdne';
$labels['valueislessthan'] = 'väärtus on väiksem kui';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Loo filter';
$labels['usedata'] = 'Kasuta filtris järgmisi andmeid:';
$labels['nextstep'] = 'Järgmine samm';
$labels['...'] = '…';
+$labels['currdate'] = 'Praegune kuupäev';
+$labels['datetest'] = 'Kuupäev';
+$labels['dateheader'] = 'päis:';
+$labels['year'] = 'aasta';
+$labels['month'] = 'kuu';
+$labels['day'] = 'päev';
+$labels['date'] = 'kuupäev (aaaa-kk-pp)';
+$labels['julian'] = 'kuupäev (Juliuse)';
+$labels['hour'] = 'tund';
+$labels['minute'] = 'minut';
+$labels['second'] = 'sekund';
+$labels['time'] = 'aeg (tt:mm:ss)';
+$labels['iso8601'] = 'kuupäev (ISO8601)';
+$labels['std11'] = 'kuupäev (RCF2822)';
+$labels['zone'] = 'ajatsoon';
+$labels['weekday'] = 'nädalapäev (0-6)';
$labels['advancedopts'] = 'Lisaseadistused';
$labels['body'] = 'Põhitekst';
$labels['address'] = 'aadress';
@@ -140,6 +156,8 @@ $labels['default'] = 'vaikimisi';
$labels['octet'] = 'range (octet)';
$labels['asciicasemap'] = 'tõstutundetu (ascii-casemap)';
$labels['asciinumeric'] = 'numbriline (ascii-numeric)';
+$labels['index'] = 'indeks:';
+$labels['indexlast'] = 'tagasisuunas';
$messages = array();
$messages['filterunknownerror'] = 'Tundmatu serveri tõrge';
@@ -173,5 +191,6 @@ $messages['nametoolong'] = 'Nimi on liiga pikk.';
$messages['namereserved'] = 'Nimi on reserveeritud.';
$messages['setexist'] = 'Kogum on juba olemas.';
$messages['nodata'] = 'Valitud peab olema vähemalt üks asukoht!';
+$messages['invaliddateformat'] = 'Vigane kuupäev või kuupäeva formaat';
?>
diff --git a/plugins/managesieve/localization/fa_IR.inc b/plugins/managesieve/localization/fa_IR.inc
index 91dfcb605..1c8eace27 100644
--- a/plugins/managesieve/localization/fa_IR.inc
+++ b/plugins/managesieve/localization/fa_IR.inc
@@ -55,7 +55,6 @@ $labels['add'] = 'افزودن';
$labels['del'] = 'حذف';
$labels['sender'] = 'فرستنده';
$labels['recipient'] = 'گیرنده';
-$labels['vacationaddresses'] = 'آدرس‌های ایمیل دیگر من (جدا شده با ویرگول):';
$labels['vacationdays'] = 'پیغام ها در چه مواقعی فرستاده شدند (در روزهای):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/fi_FI.inc b/plugins/managesieve/localization/fi_FI.inc
index 71856c95f..f006f6d23 100644
--- a/plugins/managesieve/localization/fi_FI.inc
+++ b/plugins/managesieve/localization/fi_FI.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Lisää';
$labels['del'] = 'Poista';
$labels['sender'] = 'Lähettäjä';
$labels['recipient'] = 'Vastaanottaja';
-$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/fr_FR.inc b/plugins/managesieve/localization/fr_FR.inc
index 9be9f1054..821f9caab 100644
--- a/plugins/managesieve/localization/fr_FR.inc
+++ b/plugins/managesieve/localization/fr_FR.inc
@@ -18,7 +18,7 @@
$labels['filters'] = 'Filtres';
-$labels['managefilters'] = 'Gestion des filtres sur les mails entrants';
+$labels['managefilters'] = 'Gérer les filtres sur les courriels entrants';
$labels['filtername'] = 'Nom du filtre';
$labels['newfilter'] = 'Nouveau filtre';
$labels['filteradd'] = 'Ajouter un filtre';
@@ -49,17 +49,17 @@ $labels['messagesendcopy'] = 'Envoyer une copie du message à';
$labels['messagereply'] = 'Répondre avec le message';
$labels['messagedelete'] = 'Supprimer le message';
$labels['messagediscard'] = 'Rejeter avec le message';
-$labels['messagesrules'] = 'Pour les mails entrants:';
+$labels['messagesrules'] = 'Pour les courriels entrants :';
$labels['messagesactions'] = '...exécuter les actions suivantes:';
$labels['add'] = 'Ajouter';
$labels['del'] = 'Supprimer';
$labels['sender'] = 'Expéditeur';
$labels['recipient'] = 'Destinataire';
-$labels['vacationaddresses'] = 'Liste des destinataires (séparés par une virgule) :';
+$labels['vacationaddr'] = 'Mon/Mes adresse(s) de courriel additionnelle(s):';
$labels['vacationdays'] = 'Ne pas renvoyer un message avant (jours) :';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Comment envoyer les messages :';
+$labels['days'] = 'jours';
+$labels['seconds'] = 'secondes';
$labels['vacationreason'] = 'Corps du message (raison de l\'absence) :';
$labels['vacationsubject'] = 'Sujet du message:';
$labels['rulestop'] = 'Arrêter d\'évaluer les prochaines règles';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'total supérieur ou égal à';
$labels['countislessthan'] = 'total inférieur à';
$labels['countislessthanequal'] = 'total inférieur à';
$labels['countequals'] = 'total égal à';
-$labels['countnotequals'] = 'total différent de';
+$labels['countnotequals'] = 'le comptage n\'est pas égal à';
$labels['valueisgreaterthan'] = 'valeur supérieure à';
$labels['valueisgreaterthanequal'] = 'valeur supérieure ou égale à';
$labels['valueislessthan'] = 'valeur inférieure à';
$labels['valueislessthanequal'] = 'valeur inférieure ou égale à';
$labels['valueequals'] = 'valeur égale à';
-$labels['valuenotequals'] = 'valeur différente de';
+$labels['valuenotequals'] = 'la valeur n\'est pas égale à';
$labels['setflags'] = 'Mettre les marqueurs au message';
$labels['addflags'] = 'Ajouter les marqueurs au message';
$labels['removeflags'] = 'Supprimer les marqueurs du message';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Créer un filtre';
$labels['usedata'] = 'Utiliser les informations suivantes dans le filtre';
$labels['nextstep'] = 'Étape suivante';
$labels['...'] = '...';
+$labels['currdate'] = 'Date actuelle';
+$labels['datetest'] = 'Date';
+$labels['dateheader'] = 'header:';
+$labels['year'] = 'année';
+$labels['month'] = 'mois';
+$labels['day'] = 'jour';
+$labels['date'] = 'date (yyyy-mm-dd)';
+$labels['julian'] = 'date (julien)';
+$labels['hour'] = 'heure';
+$labels['minute'] = 'minute';
+$labels['second'] = 'seconde';
+$labels['time'] = 'heure (hh:mm:ss)';
+$labels['iso8601'] = 'date (ISO8601)';
+$labels['std11'] = 'date (RFC2822)';
+$labels['zone'] = 'fuseau horaire';
+$labels['weekday'] = 'jour de la semaine (0-6)';
$labels['advancedopts'] = 'Options avancées';
$labels['body'] = 'Corps du message';
$labels['address'] = 'adresse';
@@ -140,6 +156,8 @@ $labels['default'] = 'par défaut';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'insensible à la casse (ascii-casemap)';
$labels['asciinumeric'] = 'numérique (ascii-numeric)';
+$labels['index'] = 'index:';
+$labels['indexlast'] = 'retour arrière';
$messages = array();
$messages['filterunknownerror'] = 'Erreur du serveur inconnue';
@@ -165,13 +183,14 @@ $messages['setcreateerror'] = 'Impossible de créer le groupe de filtres. Le ser
$messages['setcreated'] = 'Le groupe de filtres a bien été créé.';
$messages['activateerror'] = 'Impossible d\'activer le(s) filtre(s) sélectionné(s). Une erreur serveur s\'est produite.';
$messages['deactivateerror'] = 'Impossible de désactiver le(s) filtre(s) sélectionné(s). Une erreur serveur s\'est produite.';
-$messages['deactivated'] = 'Filtre(s) activé(s) avec succès';
-$messages['activated'] = 'Filtre(s) désactivé(s) avec succès';
+$messages['deactivated'] = 'Filtre(s) désactivé(s) avec succès.';
+$messages['activated'] = 'Filtre(s) activé(s) avec succès.';
$messages['moved'] = 'Filtre déplacé avec succès.';
$messages['moveerror'] = 'Déplacement du filtre sélectionné impossible. Le serveur a renvoyé une erreur.';
$messages['nametoolong'] = 'Nom trop long.';
$messages['namereserved'] = 'Nom réservé.';
$messages['setexist'] = 'Ce groupe existe déjà.';
$messages['nodata'] = 'Au moins un élément doit être selectionné !';
+$messages['invaliddateformat'] = 'Date non valide ou format d\'une partie de la date';
?>
diff --git a/plugins/managesieve/localization/gl_ES.inc b/plugins/managesieve/localization/gl_ES.inc
index 3f492ad46..185490a94 100644
--- a/plugins/managesieve/localization/gl_ES.inc
+++ b/plugins/managesieve/localization/gl_ES.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Engadir';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remitente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddresses'] = 'Lista de enderezos de correo de destinatarios adicionais (separados por comas):';
+$labels['vacationaddr'] = 'Lista de enderezos de correo de destinatarios adicionais:';
$labels['vacationdays'] = 'Cada canto enviar mensaxes (en días):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/he_IL.inc b/plugins/managesieve/localization/he_IL.inc
index 0b2f67ede..932d4e5d6 100644
--- a/plugins/managesieve/localization/he_IL.inc
+++ b/plugins/managesieve/localization/he_IL.inc
@@ -55,7 +55,6 @@ $labels['add'] = 'הוספה';
$labels['del'] = 'מחיקה';
$labels['sender'] = 'השולח';
$labels['recipient'] = 'הנמען';
-$labels['vacationaddresses'] = 'כתובות דוא"ל נוספות שלי (מופרדות ע"י פסיקים)';
$labels['vacationdays'] = 'באיזו תדירות ( בימים ) לשלוח הודעות:';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/hu_HU.inc b/plugins/managesieve/localization/hu_HU.inc
index c7c648ded..ea59fa717 100644
--- a/plugins/managesieve/localization/hu_HU.inc
+++ b/plugins/managesieve/localization/hu_HU.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Hozzáadás';
$labels['del'] = 'Törlés';
$labels['sender'] = 'Feladó';
$labels['recipient'] = 'Címzett';
-$labels['vacationaddresses'] = 'További címzettek (vesszővel elválasztva):';
+$labels['vacationaddr'] = 'További címzettek:';
$labels['vacationdays'] = 'Válaszüzenet küldése ennyi naponként:';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Milyen gyakran küld üzeneteket:';
+$labels['days'] = 'napok';
+$labels['seconds'] = 'másodpercek';
$labels['vacationreason'] = 'Levél szövege (automatikus válasz):';
$labels['vacationsubject'] = 'Üzenet tárgya:';
$labels['rulestop'] = 'Műveletek végrehajtásának befejezése';
diff --git a/plugins/managesieve/localization/hy_AM.inc b/plugins/managesieve/localization/hy_AM.inc
index 908175f1d..68837b065 100644
--- a/plugins/managesieve/localization/hy_AM.inc
+++ b/plugins/managesieve/localization/hy_AM.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Ավելացնել';
$labels['del'] = 'Ջնջել';
$labels['sender'] = 'Ուղարկող';
$labels['recipient'] = 'Ստացող';
-$labels['vacationaddresses'] = 'Իմ հավելյալ էլփոստի հասցեներ (բաժանված ստորակետներով).';
+$labels['vacationaddr'] = 'Իմ հավելյալ էլփոստի հասցեներ.';
$labels['vacationdays'] = 'Ինչ հաճախությամբ ուղարկել հաղորդագրությունները (օրեր)`';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/ia.inc b/plugins/managesieve/localization/ia.inc
index 45f6e5263..945de27d8 100644
--- a/plugins/managesieve/localization/ia.inc
+++ b/plugins/managesieve/localization/ia.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Add';
$labels['del'] = 'Delete';
$labels['sender'] = 'Sender';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/id_ID.inc b/plugins/managesieve/localization/id_ID.inc
index a30c2a0b0..d98a326c1 100644
--- a/plugins/managesieve/localization/id_ID.inc
+++ b/plugins/managesieve/localization/id_ID.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Tambah';
$labels['del'] = 'Hapus';
$labels['sender'] = 'Pengirim';
$labels['recipient'] = 'Penerima';
-$labels['vacationaddresses'] = 'Alamat email tambahan saya (dipisahkan koma):';
+$labels['vacationaddr'] = 'Alamat email tambahan saya:';
$labels['vacationdays'] = 'Seberapa sering mengirim pesan (dalam hari):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/it_IT.inc b/plugins/managesieve/localization/it_IT.inc
index 6fb2c424f..b54c46d9a 100644
--- a/plugins/managesieve/localization/it_IT.inc
+++ b/plugins/managesieve/localization/it_IT.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Aggiungi';
$labels['del'] = 'Elimina';
$labels['sender'] = 'Mittente';
$labels['recipient'] = 'Destinatario';
-$labels['vacationaddresses'] = 'Lista di indirizzi e-mail di destinatari addizionali (separati da virgola):';
+$labels['vacationaddr'] = 'Lista di indirizzi e-mail di destinatari addizionali:';
$labels['vacationdays'] = 'Ogni quanti giorni ribadire il messaggio allo stesso mittente';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/ja_JP.inc b/plugins/managesieve/localization/ja_JP.inc
index 0cd4f44b9..c8927d3f2 100644
--- a/plugins/managesieve/localization/ja_JP.inc
+++ b/plugins/managesieve/localization/ja_JP.inc
@@ -55,7 +55,7 @@ $labels['add'] = '追加';
$labels['del'] = '削除';
$labels['sender'] = '送信者';
$labels['recipient'] = '宛先';
-$labels['vacationaddresses'] = '電子メールの宛先の(コンマ区切った)追加のリスト:';
+$labels['vacationaddr'] = '電子メールの宛先の追加のリスト:';
$labels['vacationdays'] = 'メッセージを(1日に)送信する頻度:';
$labels['vacationinterval'] = 'メッセージを送信する頻度:';
$labels['days'] = '日';
diff --git a/plugins/managesieve/localization/ko_KR.inc b/plugins/managesieve/localization/ko_KR.inc
index 5ab4fc220..1085f624d 100644
--- a/plugins/managesieve/localization/ko_KR.inc
+++ b/plugins/managesieve/localization/ko_KR.inc
@@ -55,7 +55,7 @@ $labels['add'] = '추가';
$labels['del'] = '삭제';
$labels['sender'] = '발신인';
$labels['recipient'] = '수신인';
-$labels['vacationaddresses'] = '나의 추가 이메일 주소 (쉼표로 구분됨):';
+$labels['vacationaddr'] = '나의 추가 이메일 주소:';
$labels['vacationdays'] = '메시지 발신 주기 (일):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/lb_LU.inc b/plugins/managesieve/localization/lb_LU.inc
new file mode 100644
index 000000000..7494c0eb5
--- /dev/null
+++ b/plugins/managesieve/localization/lb_LU.inc
@@ -0,0 +1,196 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/managesieve/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Managesieve plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/
+*/
+
+
+$labels['filters'] = 'Filteren';
+$labels['managefilters'] = 'Filtere geréieren fir Mailen déi erakommen';
+$labels['filtername'] = 'Numm vum Filter';
+$labels['newfilter'] = 'Neie Filter';
+$labels['filteradd'] = 'Filter dobäisetzen';
+$labels['filterdel'] = 'Filter läschen';
+$labels['moveup'] = 'Eropréckelen';
+$labels['movedown'] = 'Erofréckelen';
+$labels['filterallof'] = 'all dës Reegele mussen zoutreffen';
+$labels['filteranyof'] = 'just eng vun de Reegele muss zoutreffen';
+$labels['filterany'] = 'all d\'Messagen';
+$labels['filtercontains'] = 'enthält';
+$labels['filternotcontains'] = 'enthält net';
+$labels['filteris'] = 'ass gläich';
+$labels['filterisnot'] = 'ass net gläich';
+$labels['filterexists'] = 'existéiert';
+$labels['filternotexists'] = 'existéiert net';
+$labels['filtermatches'] = 'matches expression';
+$labels['filternotmatches'] = 'not matches expression';
+$labels['filterregex'] = 'matches regular expression';
+$labels['filternotregex'] = 'not matches regular expression';
+$labels['filterunder'] = 'ënner';
+$labels['filterover'] = 'iwwer';
+$labels['addrule'] = 'Reegel dobäisetzen';
+$labels['delrule'] = 'Reegel läschen';
+$labels['messagemoveto'] = 'Message verréckelen an';
+$labels['messageredirect'] = 'Message ëmleeden an';
+$labels['messagecopyto'] = 'Message kopéieren an';
+$labels['messagesendcopy'] = 'Kopie vum Message schécken un';
+$labels['messagereply'] = 'Mat dësem Message äntweren';
+$labels['messagedelete'] = 'Message läschen';
+$labels['messagediscard'] = 'Discard with message';
+$labels['messagesrules'] = 'For incoming mail:';
+$labels['messagesactions'] = '...execute the following actions:';
+$labels['add'] = 'Dobäisetzen';
+$labels['del'] = 'Läschen';
+$labels['sender'] = 'Ofsender';
+$labels['recipient'] = 'Empfänger';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
+$labels['vacationdays'] = 'How often send messages (in days):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
+$labels['vacationreason'] = 'Message body (vacation reason):';
+$labels['vacationsubject'] = 'Message subject:';
+$labels['rulestop'] = 'Stop evaluating rules';
+$labels['enable'] = 'Enable/Disable';
+$labels['filterset'] = 'Filters set';
+$labels['filtersets'] = 'Filter sets';
+$labels['filtersetadd'] = 'Add filters set';
+$labels['filtersetdel'] = 'Delete current filters set';
+$labels['filtersetact'] = 'Activate current filters set';
+$labels['filtersetdeact'] = 'Deactivate current filters set';
+$labels['filterdef'] = 'Filter definition';
+$labels['filtersetname'] = 'Filters set name';
+$labels['newfilterset'] = 'New filters set';
+$labels['active'] = 'active';
+$labels['none'] = 'none';
+$labels['fromset'] = 'from set';
+$labels['fromfile'] = 'from file';
+$labels['filterdisabled'] = 'Filter disabled';
+$labels['countisgreaterthan'] = 'count is greater than';
+$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
+$labels['countislessthan'] = 'count is less than';
+$labels['countislessthanequal'] = 'count is less than or equal to';
+$labels['countequals'] = 'count is equal to';
+$labels['countnotequals'] = 'count is not equal to';
+$labels['valueisgreaterthan'] = 'value is greater than';
+$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
+$labels['valueislessthan'] = 'value is less than';
+$labels['valueislessthanequal'] = 'value is less than or equal to';
+$labels['valueequals'] = 'value is equal to';
+$labels['valuenotequals'] = 'value is not equal to';
+$labels['setflags'] = 'Set flags to the message';
+$labels['addflags'] = 'Add flags to the message';
+$labels['removeflags'] = 'Remove flags from the message';
+$labels['flagread'] = 'Read';
+$labels['flagdeleted'] = 'Deleted';
+$labels['flaganswered'] = 'Answered';
+$labels['flagflagged'] = 'Flagged';
+$labels['flagdraft'] = 'Draft';
+$labels['setvariable'] = 'Set variable';
+$labels['setvarname'] = 'Variable name:';
+$labels['setvarvalue'] = 'Variable value:';
+$labels['setvarmodifiers'] = 'Modifiers:';
+$labels['varlower'] = 'lower-case';
+$labels['varupper'] = 'upper-case';
+$labels['varlowerfirst'] = 'first character lower-case';
+$labels['varupperfirst'] = 'first character upper-case';
+$labels['varquotewildcard'] = 'quote special characters';
+$labels['varlength'] = 'length';
+$labels['notify'] = 'Send notification';
+$labels['notifyaddress'] = 'To e-mail address:';
+$labels['notifybody'] = 'Notification body:';
+$labels['notifysubject'] = 'Notification subject:';
+$labels['notifyfrom'] = 'Notification sender:';
+$labels['notifyimportance'] = 'Importance:';
+$labels['notifyimportancelow'] = 'low';
+$labels['notifyimportancenormal'] = 'normal';
+$labels['notifyimportancehigh'] = 'high';
+$labels['filtercreate'] = 'Create filter';
+$labels['usedata'] = 'Use following data in the filter:';
+$labels['nextstep'] = 'Next Step';
+$labels['...'] = '...';
+$labels['currdate'] = 'Current date';
+$labels['datetest'] = 'Date';
+$labels['dateheader'] = 'header:';
+$labels['year'] = 'year';
+$labels['month'] = 'month';
+$labels['day'] = 'day';
+$labels['date'] = 'date (yyyy-mm-dd)';
+$labels['julian'] = 'date (julian)';
+$labels['hour'] = 'hour';
+$labels['minute'] = 'minute';
+$labels['second'] = 'second';
+$labels['time'] = 'time (hh:mm:ss)';
+$labels['iso8601'] = 'date (ISO8601)';
+$labels['std11'] = 'date (RFC2822)';
+$labels['zone'] = 'time-zone';
+$labels['weekday'] = 'weekday (0-6)';
+$labels['advancedopts'] = 'Advanced options';
+$labels['body'] = 'Body';
+$labels['address'] = 'address';
+$labels['envelope'] = 'envelope';
+$labels['modifier'] = 'modifier:';
+$labels['text'] = 'text';
+$labels['undecoded'] = 'undecoded (raw)';
+$labels['contenttype'] = 'content type';
+$labels['modtype'] = 'type:';
+$labels['allparts'] = 'all';
+$labels['domain'] = 'domain';
+$labels['localpart'] = 'local part';
+$labels['user'] = 'user';
+$labels['detail'] = 'detail';
+$labels['comparator'] = 'comparator:';
+$labels['default'] = 'default';
+$labels['octet'] = 'strict (octet)';
+$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
+$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['index'] = 'index:';
+$labels['indexlast'] = 'backwards';
+
+$messages = array();
+$messages['filterunknownerror'] = 'Unknown server error.';
+$messages['filterconnerror'] = 'Unable to connect to server.';
+$messages['filterdeleteerror'] = 'Unable to delete filter. Server error occured.';
+$messages['filterdeleted'] = 'Filter deleted successfully.';
+$messages['filtersaved'] = 'Filter saved successfully.';
+$messages['filtersaveerror'] = 'Unable to save filter. Server error occured.';
+$messages['filterdeleteconfirm'] = 'Do you really want to delete selected filter?';
+$messages['ruledeleteconfirm'] = 'Are you sure, you want to delete selected rule?';
+$messages['actiondeleteconfirm'] = 'Are you sure, you want to delete selected action?';
+$messages['forbiddenchars'] = 'Forbidden characters in field.';
+$messages['cannotbeempty'] = 'Field cannot be empty.';
+$messages['ruleexist'] = 'Filter with specified name already exists.';
+$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occured.';
+$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occured.';
+$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occured.';
+$messages['setactivated'] = 'Filters set activated successfully.';
+$messages['setdeactivated'] = 'Filters set deactivated successfully.';
+$messages['setdeleted'] = 'Filters set deleted successfully.';
+$messages['setdeleteconfirm'] = 'Are you sure, you want to delete selected filters set?';
+$messages['setcreateerror'] = 'Unable to create filters set. Server error occured.';
+$messages['setcreated'] = 'Filters set created successfully.';
+$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
+$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
+$messages['deactivated'] = 'Filter(s) disabled successfully.';
+$messages['activated'] = 'Filter(s) enabled successfully.';
+$messages['moved'] = 'Filter moved successfully.';
+$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
+$messages['nametoolong'] = 'Name too long.';
+$messages['namereserved'] = 'Reserved name.';
+$messages['setexist'] = 'Set already exists.';
+$messages['nodata'] = 'At least one position must be selected!';
+$messages['invaliddateformat'] = 'Invalid date or date part format';
+
+?>
diff --git a/plugins/managesieve/localization/lt_LT.inc b/plugins/managesieve/localization/lt_LT.inc
index fecd3d6bc..3b6f4eec4 100644
--- a/plugins/managesieve/localization/lt_LT.inc
+++ b/plugins/managesieve/localization/lt_LT.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Pridėti';
$labels['del'] = 'Pašalinti';
$labels['sender'] = 'Siuntėjas';
$labels['recipient'] = 'Gavėjas';
-$labels['vacationaddresses'] = 'Papildomas gavėjų adresų sąrašas (skirti kableliais):';
+$labels['vacationaddr'] = 'Papildomas gavėjų adresų sąrašas:';
$labels['vacationdays'] = 'Kaip dažnai išsiųsti laiškus (dienomis):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/lv_LV.inc b/plugins/managesieve/localization/lv_LV.inc
index f1f85c2e0..02b4eeffa 100644
--- a/plugins/managesieve/localization/lv_LV.inc
+++ b/plugins/managesieve/localization/lv_LV.inc
@@ -30,7 +30,7 @@ $labels['filteranyof'] = 'jāatbilst jebkuram no sekojošajiem nosacījumiem';
$labels['filterany'] = 'visām vēstulēm';
$labels['filtercontains'] = 'satur';
$labels['filternotcontains'] = 'nesatur';
-$labels['filteris'] = 'vienāds ar';
+$labels['filteris'] = 'ir vienāds ar';
$labels['filterisnot'] = 'nav vienāds ar';
$labels['filterexists'] = 'eksistē';
$labels['filternotexists'] = 'neeksistē';
@@ -46,20 +46,20 @@ $labels['messagemoveto'] = 'Pārvietot vēstuli uz';
$labels['messageredirect'] = 'Pāradresēt vēstuli uz';
$labels['messagecopyto'] = 'Kopēt vēstuli uz';
$labels['messagesendcopy'] = 'Pārsūtīt vēstules kopiju uz';
-$labels['messagereply'] = 'Atbildēt ar';
+$labels['messagereply'] = 'Atbildēt ar vēstuli';
$labels['messagedelete'] = 'Dzēst vēstuli';
$labels['messagediscard'] = 'Dzēst vēstuli un atbildēt';
$labels['messagesrules'] = 'Ienākošajām vēstulēm:';
-$labels['messagesactions'] = 'Izpildīt sekojošās darbības:';
+$labels['messagesactions'] = '...izpildīt sekojošās darbības:';
$labels['add'] = 'Pievienot';
$labels['del'] = 'Dzēst';
$labels['sender'] = 'Sūtītājs';
$labels['recipient'] = 'Saņēmējs';
-$labels['vacationaddresses'] = 'Ievadiet vienu vai vairākus e-pastu(s), atdalot tos komatu:';
+$labels['vacationaddr'] = 'Mana(s) papildus e-pasta adrese(s):';
$labels['vacationdays'] = 'Cik dienu laikā vienam un tam pašam sūtītājam neatbildēt atkārtoti (piem., 7):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Cik bieži sūtīt vēstules:';
+$labels['days'] = 'dienas';
+$labels['seconds'] = 'sekundes';
$labels['vacationreason'] = 'Atvaļinājuma paziņojuma teksts:';
$labels['vacationsubject'] = 'Vēstules tēma:';
$labels['rulestop'] = 'Apturēt nosacījumu pārbaudi';
@@ -78,16 +78,16 @@ $labels['none'] = 'nav';
$labels['fromset'] = 'no kopas';
$labels['fromfile'] = 'no faila';
$labels['filterdisabled'] = 'Filtrs atslēgts';
-$labels['countisgreaterthan'] = 'skaits ir lielāks nekā';
-$labels['countisgreaterthanequal'] = 'skaits ir vienāds vai lielāks nekā';
-$labels['countislessthan'] = 'skaits ir mazāks nekā';
-$labels['countislessthanequal'] = 'skaits ir vienāds vai mazāks nekā';
+$labels['countisgreaterthan'] = 'skaits ir lielāks kā';
+$labels['countisgreaterthanequal'] = 'skaits ir vienāds vai lielāks kā';
+$labels['countislessthan'] = 'skaits ir mazāks kā';
+$labels['countislessthanequal'] = 'skaits ir vienāds vai mazāks kā';
$labels['countequals'] = 'skaits ir vienāds ar';
$labels['countnotequals'] = 'skaits nav vienāds ar';
-$labels['valueisgreaterthan'] = 'vērtība ir lielāka nekā';
-$labels['valueisgreaterthanequal'] = 'vērtība ir vienāda vai lielāka nekā';
-$labels['valueislessthan'] = 'vērtība ir mazāka nekā';
-$labels['valueislessthanequal'] = 'vērtība ir vienāda vai mazāka nekā';
+$labels['valueisgreaterthan'] = 'vērtība ir lielāka kā';
+$labels['valueisgreaterthanequal'] = 'vērtība ir vienāda vai lielāka kā';
+$labels['valueislessthan'] = 'vērtība ir mazāka kā';
+$labels['valueislessthanequal'] = 'vērtība ir vienāda vai mazāka kā';
$labels['valueequals'] = 'vērtība ir vienāda ar';
$labels['valuenotequals'] = 'vērtība nav vienāda ar';
$labels['setflags'] = 'Marķēt vēstuli';
@@ -96,82 +96,101 @@ $labels['removeflags'] = 'Noņemt vēstulei marķierus';
$labels['flagread'] = 'Lasītas';
$labels['flagdeleted'] = 'Dzēstas';
$labels['flaganswered'] = 'Atbildētas';
-$labels['flagflagged'] = 'Iezīmētās';
+$labels['flagflagged'] = 'Marķētas';
$labels['flagdraft'] = 'Melnraksts';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
-$labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
+$labels['setvariable'] = 'Iestatīt mainīgo';
+$labels['setvarname'] = 'Mainīgā nosaukums:';
+$labels['setvarvalue'] = 'Mainīgā vērtība:';
+$labels['setvarmodifiers'] = 'Modifikatori:';
+$labels['varlower'] = 'mazie burti';
+$labels['varupper'] = 'lielie burti';
+$labels['varlowerfirst'] = 'pirmais burts kā mazais burts';
+$labels['varupperfirst'] = 'pirmais burts kā lielais burts';
+$labels['varquotewildcard'] = '"citēt" speciālās rakstzīmes';
+$labels['varlength'] = 'garums';
+$labels['notify'] = 'Sūtīt paziņojumus';
+$labels['notifyaddress'] = 'Uz e-pasta adresi:';
+$labels['notifybody'] = 'Paziņojuma teksts:';
+$labels['notifysubject'] = 'Paziņojuma tēma:';
+$labels['notifyfrom'] = 'Paziņojuma sūtītājs:';
+$labels['notifyimportance'] = 'Svarīgums:';
+$labels['notifyimportancelow'] = 'zems';
+$labels['notifyimportancenormal'] = 'parasts';
+$labels['notifyimportancehigh'] = 'augsts';
$labels['filtercreate'] = 'Izveidot filtru';
$labels['usedata'] = 'Filtrā izmantot sekojošus datus';
$labels['nextstep'] = 'Nākamais solis';
$labels['...'] = '...';
-$labels['advancedopts'] = 'Paplašināti iestatījumi';
+$labels['currdate'] = 'Pašreizējais datums';
+$labels['datetest'] = 'Datums';
+$labels['dateheader'] = 'galvene:';
+$labels['year'] = 'gads';
+$labels['month'] = 'mēnesis';
+$labels['day'] = 'diena';
+$labels['date'] = 'datums (gggg-mm-dd)';
+$labels['julian'] = 'datums (Jūlija kalendārs)';
+$labels['hour'] = 'stunda';
+$labels['minute'] = 'minūte';
+$labels['second'] = 'sekunde';
+$labels['time'] = 'laiks (hh:mm:ss)';
+$labels['iso8601'] = 'datums (ISO8601)';
+$labels['std11'] = 'datums (RFC2822)';
+$labels['zone'] = 'laikajosla';
+$labels['weekday'] = 'nedēļas diena (0-6)';
+$labels['advancedopts'] = 'Paplašinātie iestatījumi';
$labels['body'] = 'Pamatteksts';
$labels['address'] = 'adresāts';
$labels['envelope'] = 'aploksne';
$labels['modifier'] = 'modifikators:';
$labels['text'] = 'teksts';
-$labels['undecoded'] = 'neatkodēts (jēldati)';
+$labels['undecoded'] = 'neatkodēts (neapstrādāti dati)';
$labels['contenttype'] = 'satura tips';
$labels['modtype'] = 'tips:';
$labels['allparts'] = 'viss';
$labels['domain'] = 'domēns';
-$labels['localpart'] = 'vietējā daļa';
+$labels['localpart'] = 'lokālā daļa';
$labels['user'] = 'lietotājs';
$labels['detail'] = 'detaļas';
-$labels['comparator'] = 'komparators';
-$labels['default'] = 'noklusējums';
-$labels['octet'] = 'strikti (oktets)';
+$labels['comparator'] = 'salīdzinātājs';
+$labels['default'] = 'noklusētā vērtība';
+$labels['octet'] = 'precīzs (oktets)';
$labels['asciicasemap'] = 'reģistrnejutīgs (ascii tabula)';
$labels['asciinumeric'] = 'skaitļu (ascii skaitļu)';
+$labels['index'] = 'indekss:';
+$labels['indexlast'] = '"backwards"';
$messages = array();
-$messages['filterunknownerror'] = 'Nezināma servera kļūda';
-$messages['filterconnerror'] = 'Neizdevās pieslēgties ManageSieve serverim';
-$messages['filterdeleteerror'] = 'Neizdevās dzēst filtru. Servera iekšējā kļūda';
-$messages['filterdeleted'] = 'Filtrs veiksmīgi izdzēsts';
-$messages['filtersaved'] = 'Filtrs veiksmīgi saglabāts';
-$messages['filtersaveerror'] = 'Neizdevās saglabāt filtru. Servera iekšējā kļūda';
-$messages['filterdeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto filtru?';
-$messages['ruledeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto nosacījumu?';
-$messages['actiondeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto darbību?';
-$messages['forbiddenchars'] = 'Lauks satur aizliegtus simbolus';
-$messages['cannotbeempty'] = 'Lauks nedrīkst būt tukšs';
-$messages['ruleexist'] = 'Filter with specified name already exists.';
-$messages['setactivateerror'] = 'Neizdevās aktivizēt atzīmēto filtru kopu. Servera iekšējā kļūda';
-$messages['setdeactivateerror'] = 'Neizdevās deaktivizēt atzīmēto filtru kopu. Servera iekšējā kļūda';
-$messages['setdeleteerror'] = 'Neizdevās izdzēst atzīmēto filtru kopu. Servera iekšējā kļūda';
-$messages['setactivated'] = 'Filtru kopa veiksmīgi aktivizēta';
-$messages['setdeactivated'] = 'Filtru kopa veiksmīgi deaktivizēta';
-$messages['setdeleted'] = 'Filtru kopa veiksmīgi izdzēsta';
-$messages['setdeleteconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto filtru kopu?';
-$messages['setcreateerror'] = 'Neizdevās izveidot filtru kopu. Servera iekšējā kļūda';
-$messages['setcreated'] = 'Filtru kopa veiksmīgi izveidota';
-$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
-$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
-$messages['deactivated'] = 'Filter(s) disabled successfully.';
-$messages['activated'] = 'Filter(s) enabled successfully.';
-$messages['moved'] = 'Filter moved successfully.';
-$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
-$messages['nametoolong'] = 'Neizdevās izveidot filtru kopu. Pārāk garš kopas nosaukums';
-$messages['namereserved'] = 'Reserved name.';
-$messages['setexist'] = 'Set already exists.';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['filterunknownerror'] = 'Nezināma servera kļūda.';
+$messages['filterconnerror'] = 'Neizdevās pieslēgties ManageSieve serverim.';
+$messages['filterdeleteerror'] = 'Neizdevās izdzēst filtru - servera kļūda.';
+$messages['filterdeleted'] = 'Filtrs veiksmīgi izdzēsts.';
+$messages['filtersaved'] = 'Filtrs veiksmīgi saglabāts.';
+$messages['filtersaveerror'] = 'Neizdevās saglabāt filtru - servera kļūda.';
+$messages['filterdeleteconfirm'] = 'Vai Jūs tiešām vēlaties dzēst atzīmēto filtru?';
+$messages['ruledeleteconfirm'] = 'Vai Jūs tiešām vēlaties dzēst atzīmēto nosacījumu?';
+$messages['actiondeleteconfirm'] = 'Vai Jūs tiešām vēlaties dzēst atzīmēto darbību?';
+$messages['forbiddenchars'] = 'Lauks satur aizliegtus simbolus.';
+$messages['cannotbeempty'] = 'Lauks nedrīkst būt tukšs.';
+$messages['ruleexist'] = 'Filtrs ar tādu nosaukumu jau pastāv.';
+$messages['setactivateerror'] = 'Neizdevās aktivizēt atzīmēto filtru kopu - servera kļūda.';
+$messages['setdeactivateerror'] = 'Neizdevās deaktivizēt atzīmēto filtru kopu - servera kļūda.';
+$messages['setdeleteerror'] = 'Neizdevās izdzēst atzīmēto filtru kopu - servera kļūda.';
+$messages['setactivated'] = 'Filtru kopa veiksmīgi aktivizēta.';
+$messages['setdeactivated'] = 'Filtru kopa veiksmīgi deaktivizēta.';
+$messages['setdeleted'] = 'Filtru kopa veiksmīgi izdzēsta.';
+$messages['setdeleteconfirm'] = 'Vai tiešām Jūs vēlaties dzēst atzīmēto filtru kopu?';
+$messages['setcreateerror'] = 'Neizdevās izveidot filtru kopu - servera kļūda.';
+$messages['setcreated'] = 'Filtru kopa veiksmīgi izveidota.';
+$messages['activateerror'] = 'Nav iespējams ieslēgt izvēlēto(s) filtru(s) - servera kļūda.';
+$messages['deactivateerror'] = 'Nav iespējams atslēgt izvēlēto(s) filtru(s) - servera kļūda.';
+$messages['deactivated'] = 'Filtrs(i) veiksmīgi atslēgts(i).';
+$messages['activated'] = 'Filtrs(i) veiksmīgi ieslēgts(i).';
+$messages['moved'] = 'Filtrs veiksmīgi pārvietots.';
+$messages['moveerror'] = 'Nav iespējams pārvietot izvēlēto filtru - servera kļūda.';
+$messages['nametoolong'] = 'Neizdevās izveidot filtru kopu. Pārāk garš kopas nosaukums.';
+$messages['namereserved'] = 'Rezervētais nosaukums.';
+$messages['setexist'] = 'Kopa jau eksistē.';
+$messages['nodata'] = 'Ir jābūt atzīmētai vismaz vienai pozīcijai!';
+$messages['invaliddateformat'] = 'Nederīgs datums vai datuma formāts';
?>
diff --git a/plugins/managesieve/localization/ml_IN.inc b/plugins/managesieve/localization/ml_IN.inc
index 67cd6829f..761b4305b 100644
--- a/plugins/managesieve/localization/ml_IN.inc
+++ b/plugins/managesieve/localization/ml_IN.inc
@@ -55,7 +55,6 @@ $labels['add'] = 'ചേര്‍ക്കു';
$labels['del'] = 'നീക്കം ചെയ്യുക';
$labels['sender'] = 'അയചയാള്‍';
$labels['recipient'] = 'സ്വീകര്‍ത്താവ്';
-$labels['vacationaddresses'] = 'സ്വീകര്‍ത്താവിന്റെ ഇമെയില്‍ വിലാസങ്ങളുടെ അധികമുള്ള പട്ടിക (കോമയിട്ട് തിരിച്ച)';
$labels['vacationdays'] = 'എത്ര ഭിവസം കൂടുമ്പോള്‍ സന്ദേശം അയക്കണം:';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/mr_IN.inc b/plugins/managesieve/localization/mr_IN.inc
index 3339737e0..082ea9bc6 100644
--- a/plugins/managesieve/localization/mr_IN.inc
+++ b/plugins/managesieve/localization/mr_IN.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'समावेश करा';
$labels['del'] = 'नष्ट करा';
$labels['sender'] = 'प्रेषक';
$labels['recipient'] = 'Recipient';
-$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/nb_NO.inc b/plugins/managesieve/localization/nb_NO.inc
index 39653b8a1..c3bf98f8b 100644
--- a/plugins/managesieve/localization/nb_NO.inc
+++ b/plugins/managesieve/localization/nb_NO.inc
@@ -55,8 +55,11 @@ $labels['add'] = 'Legg til';
$labels['del'] = 'Slett';
$labels['sender'] = 'Avsender';
$labels['recipient'] = 'Mottaker';
-$labels['vacationaddresses'] = 'Liste med mottakeradresser (adskilt med komma):';
+$labels['vacationaddr'] = 'Liste med mottakeradresser:';
$labels['vacationdays'] = 'Periode mellom meldinger (i dager):';
+$labels['vacationinterval'] = 'Periode mellom meldinger:';
+$labels['days'] = 'dager';
+$labels['seconds'] = 'sekunder';
$labels['vacationreason'] = 'Innhold (begrunnelse for fravær)';
$labels['vacationsubject'] = 'Meldingsemne:';
$labels['rulestop'] = 'Stopp evaluering av regler';
@@ -95,21 +98,21 @@ $labels['flagdeleted'] = 'Slettet';
$labels['flaganswered'] = 'Besvart';
$labels['flagflagged'] = 'Flagget';
$labels['flagdraft'] = 'Utkast';
-$labels['setvariable'] = 'Set variable';
+$labels['setvariable'] = 'Set variabel';
$labels['setvarname'] = 'Variabelnavn:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
+$labels['setvarvalue'] = 'Variabel verdi:';
+$labels['setvarmodifiers'] = 'Modifikator:';
$labels['varlower'] = 'med små bokstaver';
$labels['varupper'] = 'med store bokstaver';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
+$labels['varlowerfirst'] = 'første tegn liten bokstav';
+$labels['varupperfirst'] = 'første tegn stor bokstav';
+$labels['varquotewildcard'] = 'sitér spesialtegn';
$labels['varlength'] = 'lengde';
$labels['notify'] = 'Send melding';
$labels['notifyaddress'] = 'Til e-postadresse:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
+$labels['notifybody'] = 'Varseltekst:';
+$labels['notifysubject'] = 'Varselemne:';
+$labels['notifyfrom'] = 'Varselavsender:';
$labels['notifyimportance'] = 'Viktighet:';
$labels['notifyimportancelow'] = 'lav';
$labels['notifyimportancenormal'] = 'normal';
diff --git a/plugins/managesieve/localization/nl_NL.inc b/plugins/managesieve/localization/nl_NL.inc
index 1fd6eee4e..80c2274b1 100644
--- a/plugins/managesieve/localization/nl_NL.inc
+++ b/plugins/managesieve/localization/nl_NL.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Toevoegen';
$labels['del'] = 'Verwijderen';
$labels['sender'] = 'Afzender';
$labels['recipient'] = 'Ontvanger';
-$labels['vacationaddresses'] = 'Aanvullende lijst van geadresseerden (gescheiden met komma\'s):';
+$labels['vacationaddr'] = 'Aanvullende lijst van geadresseerden:';
$labels['vacationdays'] = 'Hoe vaak moet een bericht verstuurd worden (in dagen):';
$labels['vacationinterval'] = 'Hoe vaak moet een bericht verstuurd worden:';
$labels['days'] = 'dagen';
diff --git a/plugins/managesieve/localization/nn_NO.inc b/plugins/managesieve/localization/nn_NO.inc
index 69af8cde4..03563a72b 100644
--- a/plugins/managesieve/localization/nn_NO.inc
+++ b/plugins/managesieve/localization/nn_NO.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Legg til';
$labels['del'] = 'Slett';
$labels['sender'] = 'Avsendar';
$labels['recipient'] = 'Mottakar';
-$labels['vacationaddresses'] = 'Liste med mottakaradresser (komma-separert):';
+$labels['vacationaddr'] = 'Liste med mottakaradresser:';
$labels['vacationdays'] = 'Periode mellom meldingar (i dagar):';
$labels['vacationreason'] = 'Innhald (grunngjeving for fråvær)';
$labels['vacationsubject'] = 'Meldingsemne:';
diff --git a/plugins/managesieve/localization/pl_PL.inc b/plugins/managesieve/localization/pl_PL.inc
index f2ec96eb9..799f0fb54 100644
--- a/plugins/managesieve/localization/pl_PL.inc
+++ b/plugins/managesieve/localization/pl_PL.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Dodaj';
$labels['del'] = 'Usuń';
$labels['sender'] = 'Nadawca';
$labels['recipient'] = 'Odbiorca';
-$labels['vacationaddresses'] = 'Lista dodatkowych adresów odbiorców (oddzielonych przecinkami):';
+$labels['vacationaddr'] = 'Dodatkowy/e adres(y) e-mail:';
$labels['vacationdays'] = 'Częstotliwość wysyłania wiadomości (w dniach):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Jak często wysyłać wiadomości:';
+$labels['days'] = 'dni';
+$labels['seconds'] = 'sekundy';
$labels['vacationreason'] = 'Treść (przyczyna nieobecności):';
$labels['vacationsubject'] = 'Temat wiadomości:';
$labels['rulestop'] = 'Przerwij przetwarzanie reguł';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'ilość jest równa lub większa od';
$labels['countislessthan'] = 'ilość jest mniejsza od';
$labels['countislessthanequal'] = 'ilość jest równa lub mniejsza od';
$labels['countequals'] = 'ilość jest równa';
-$labels['countnotequals'] = 'ilość jest różna od';
+$labels['countnotequals'] = 'ilość nie jest równa';
$labels['valueisgreaterthan'] = 'wartość jest większa od';
$labels['valueisgreaterthanequal'] = 'wartość jest równa lub większa od';
$labels['valueislessthan'] = 'wartość jest mniejsza od';
$labels['valueislessthanequal'] = 'wartość jest równa lub mniejsza od';
$labels['valueequals'] = 'wartość jest równa';
-$labels['valuenotequals'] = 'wartość jest różna od';
+$labels['valuenotequals'] = 'wartość nie jest równa';
$labels['setflags'] = 'Ustaw flagi wiadomości';
$labels['addflags'] = 'Dodaj flagi do wiadomości';
$labels['removeflags'] = 'Usuń flagi wiadomości';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Utwórz filtr';
$labels['usedata'] = 'Użyj następujących danych do utworzenia filtra:';
$labels['nextstep'] = 'Następny krok';
$labels['...'] = '...';
+$labels['currdate'] = 'Bieżąca data';
+$labels['datetest'] = 'Data';
+$labels['dateheader'] = 'nagłówek:';
+$labels['year'] = 'rok';
+$labels['month'] = 'miesiąc';
+$labels['day'] = 'dzień';
+$labels['date'] = 'data (rrrr-mm-dd)';
+$labels['julian'] = 'data (kalendarz juliański)';
+$labels['hour'] = 'godzina';
+$labels['minute'] = 'minuta';
+$labels['second'] = 'sekunda';
+$labels['time'] = 'czas (gg:mm:ss)';
+$labels['iso8601'] = 'data (ISO8601)';
+$labels['std11'] = 'data (RFC2822)';
+$labels['zone'] = 'Strefa czasowa';
+$labels['weekday'] = 'dzień tygodnia (0-6)';
$labels['advancedopts'] = 'Zaawansowane opcje';
$labels['body'] = 'Treść';
$labels['address'] = 'adres';
@@ -140,6 +156,8 @@ $labels['default'] = 'domyślny';
$labels['octet'] = 'dokładny (octet)';
$labels['asciicasemap'] = 'nierozróżniający wielkości liter (ascii-casemap)';
$labels['asciinumeric'] = 'numeryczny (ascii-numeric)';
+$labels['index'] = 'indeks:';
+$labels['indexlast'] = 'wstecz';
$messages = array();
$messages['filterunknownerror'] = 'Nieznany błąd serwera.';
@@ -173,5 +191,6 @@ $messages['nametoolong'] = 'Zbyt długa nazwa.';
$messages['namereserved'] = 'Nazwa zarezerwowana.';
$messages['setexist'] = 'Zbiór już istnieje.';
$messages['nodata'] = 'Należy wybrać co najmniej jedną pozycję!';
+$messages['invaliddateformat'] = 'Nieprawidłowy format daty lub fragmentu daty';
?>
diff --git a/plugins/managesieve/localization/pt_BR.inc b/plugins/managesieve/localization/pt_BR.inc
index fb4699fd2..cd96c49ca 100644
--- a/plugins/managesieve/localization/pt_BR.inc
+++ b/plugins/managesieve/localization/pt_BR.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Adicionar';
$labels['del'] = 'Excluir';
$labels['sender'] = 'Remetente';
$labels['recipient'] = 'Destinatário';
-$labels['vacationaddresses'] = 'Lista adicional de e-mails destinatários (separado por vírgula):';
+$labels['vacationaddr'] = 'Meus endereços de e-mail adicionais:';
$labels['vacationdays'] = 'Enviar mensagens com que frequência (em dias):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Como geralmente enviam mensagens:';
+$labels['days'] = 'dias';
+$labels['seconds'] = 'segundos';
$labels['vacationreason'] = 'Corpo da mensagem (motivo de férias):';
$labels['vacationsubject'] = 'Título da mensagem:';
$labels['rulestop'] = 'Parar de avaliar regras';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Criar filtro';
$labels['usedata'] = 'Usar os seguintes dados no filtro:';
$labels['nextstep'] = 'Próximo Passo';
$labels['...'] = '...';
+$labels['currdate'] = 'Data atual';
+$labels['datetest'] = 'Data';
+$labels['dateheader'] = 'cabeçalho:';
+$labels['year'] = 'ano';
+$labels['month'] = 'mês';
+$labels['day'] = 'dia';
+$labels['date'] = 'data (aaaa-mm-dd)';
+$labels['julian'] = 'data (calendário juliano)';
+$labels['hour'] = 'hora';
+$labels['minute'] = 'minuto';
+$labels['second'] = 'segundo';
+$labels['time'] = 'hora (hh:mm:ss)';
+$labels['iso8601'] = 'data (ISO8601)';
+$labels['std11'] = 'data (RFC2822)';
+$labels['zone'] = 'fuso horário';
+$labels['weekday'] = 'dia da semana (0-6)';
$labels['advancedopts'] = 'Opções avançadas';
$labels['body'] = 'Corpo';
$labels['address'] = 'endereço';
@@ -140,6 +156,8 @@ $labels['default'] = 'padrão';
$labels['octet'] = 'estrito (octeto)';
$labels['asciicasemap'] = 'caso insensível (mapa de caracteres ascii)';
$labels['asciinumeric'] = 'numérico (ascii-numeric)';
+$labels['index'] = 'índice:';
+$labels['indexlast'] = 'retroceder';
$messages = array();
$messages['filterunknownerror'] = 'Erro desconhecido de servidor';
@@ -173,5 +191,6 @@ $messages['nametoolong'] = 'Nome muito longo.';
$messages['namereserved'] = 'Nome reservado.';
$messages['setexist'] = 'Conjunto já existe.';
$messages['nodata'] = 'Pelo menos uma posição precisa ser selecionada!';
+$messages['invaliddateformat'] = 'Data inválida';
?>
diff --git a/plugins/managesieve/localization/pt_PT.inc b/plugins/managesieve/localization/pt_PT.inc
index bfb3f296a..f51e8bf5e 100644
--- a/plugins/managesieve/localization/pt_PT.inc
+++ b/plugins/managesieve/localization/pt_PT.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Adicionar';
$labels['del'] = 'Eliminar';
$labels['sender'] = 'Remetente';
$labels['recipient'] = 'Destinatário';
-$labels['vacationaddresses'] = 'Lista adicional de destinatários de e-mails (separados por vírgula):';
+$labels['vacationaddr'] = 'Lista adicional de destinatários de e-mails:';
$labels['vacationdays'] = 'Enviar mensagens com que frequência (em dias):';
$labels['vacationinterval'] = 'Com que frequência envia mensagens:';
$labels['days'] = 'dias';
diff --git a/plugins/managesieve/localization/ro_RO.inc b/plugins/managesieve/localization/ro_RO.inc
index 2c917cbdd..8d6e9c96f 100644
--- a/plugins/managesieve/localization/ro_RO.inc
+++ b/plugins/managesieve/localization/ro_RO.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Adaugă';
$labels['del'] = 'Șterge';
$labels['sender'] = 'Expeditor';
$labels['recipient'] = 'Destinatar';
-$labels['vacationaddresses'] = 'Adresele mele de e-mail adiționale (împărțite cu virgulă):';
+$labels['vacationaddr'] = 'Adresele mele de e-mail adiționale:';
$labels['vacationdays'] = 'Cât de des să trimit mesajele (în zile):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/ru_RU.inc b/plugins/managesieve/localization/ru_RU.inc
index b05074c22..f922bcf22 100644
--- a/plugins/managesieve/localization/ru_RU.inc
+++ b/plugins/managesieve/localization/ru_RU.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Добавить';
$labels['del'] = 'Удалить';
$labels['sender'] = 'Отправитель';
$labels['recipient'] = 'Получатель';
-$labels['vacationaddresses'] = 'Список моих дополнительных адресов (разделённых запятыми):';
+$labels['vacationaddr'] = 'Мои дополнительные адреса:';
$labels['vacationdays'] = 'Как часто отправлять сообщения (в днях):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Как часто отправлять сообщения:';
+$labels['days'] = 'дней';
+$labels['seconds'] = 'секунд';
$labels['vacationreason'] = 'Текст сообщения (причина отсутствия):';
$labels['vacationsubject'] = 'Тема сообщения:';
$labels['rulestop'] = 'Закончить выполнение';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Создать фильтр';
$labels['usedata'] = 'Использовать следующие данные в фильтре:';
$labels['nextstep'] = 'Далее';
$labels['...'] = '...';
+$labels['currdate'] = 'Текущая дата';
+$labels['datetest'] = 'Дата';
+$labels['dateheader'] = 'заголовок:';
+$labels['year'] = 'год';
+$labels['month'] = 'месяц';
+$labels['day'] = 'день';
+$labels['date'] = 'дата (гггг-мм-дд)';
+$labels['julian'] = 'дата (юлианская)';
+$labels['hour'] = 'час';
+$labels['minute'] = 'минута';
+$labels['second'] = 'секунда';
+$labels['time'] = 'время (чч:мм:сс)';
+$labels['iso8601'] = 'дата (ISO8601)';
+$labels['std11'] = 'дата (RFC2822)';
+$labels['zone'] = 'часовой пояс';
+$labels['weekday'] = 'день недели (0-6)';
$labels['advancedopts'] = 'Дополнительные параметры';
$labels['body'] = 'Тело письма';
$labels['address'] = 'адрес';
@@ -140,6 +156,8 @@ $labels['default'] = 'по умолчанию';
$labels['octet'] = 'Строгий (octet)';
$labels['asciicasemap'] = 'Регистронезависимый (ascii-casemap)';
$labels['asciinumeric'] = 'Числовой (ascii-numeric)';
+$labels['index'] = 'индекс:';
+$labels['indexlast'] = 'наоборот';
$messages = array();
$messages['filterunknownerror'] = 'Неизвестная ошибка сервера';
@@ -173,5 +191,6 @@ $messages['nametoolong'] = 'Невозможно создать набор фи
$messages['namereserved'] = 'Зарезервированное имя.';
$messages['setexist'] = 'Набор уже существует.';
$messages['nodata'] = 'Нужно выбрать хотя бы одну позицию!';
+$messages['invaliddateformat'] = 'Неверная дата или формат части даты';
?>
diff --git a/plugins/managesieve/localization/si_LK.inc b/plugins/managesieve/localization/si_LK.inc
index afc2e3851..378fcf15d 100644
--- a/plugins/managesieve/localization/si_LK.inc
+++ b/plugins/managesieve/localization/si_LK.inc
@@ -55,7 +55,6 @@ $labels['add'] = 'එක් කරන්න';
$labels['del'] = 'මකන්න';
$labels['sender'] = 'යවන්නා';
$labels['recipient'] = 'ලබන්නා';
-$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
$labels['vacationdays'] = 'How often send messages (in days):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/sk_SK.inc b/plugins/managesieve/localization/sk_SK.inc
index f336cf2c5..9bfb2ef8f 100644
--- a/plugins/managesieve/localization/sk_SK.inc
+++ b/plugins/managesieve/localization/sk_SK.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Pridaj';
$labels['del'] = 'Zmaž';
$labels['sender'] = 'Odosielateľ';
$labels['recipient'] = 'Adresát';
-$labels['vacationaddresses'] = 'Dodatoční príjemcovia správy (oddelení čiarkami):';
+$labels['vacationaddr'] = 'Dodatoční príjemcovia správy:';
$labels['vacationdays'] = 'Počet dní medzi odoslaním správy:';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/sl_SI.inc b/plugins/managesieve/localization/sl_SI.inc
index f1c3b983b..aa82078f1 100644
--- a/plugins/managesieve/localization/sl_SI.inc
+++ b/plugins/managesieve/localization/sl_SI.inc
@@ -55,11 +55,11 @@ $labels['add'] = 'Dodaj';
$labels['del'] = 'Izbriši';
$labels['sender'] = 'Pošiljatelj';
$labels['recipient'] = 'Prejemnik';
-$labels['vacationaddresses'] = 'Dodaten seznam naslovov prejemnikov (ločenih z vejico):';
+$labels['vacationaddr'] = 'Moji dodatni e-naslovi';
$labels['vacationdays'] = 'Kako pogosto naj bodo sporočila poslana (v dnevih):';
-$labels['vacationinterval'] = 'How often send messages:';
-$labels['days'] = 'days';
-$labels['seconds'] = 'seconds';
+$labels['vacationinterval'] = 'Sporočila pošlji na:';
+$labels['days'] = 'dni';
+$labels['seconds'] = 'sekund';
$labels['vacationreason'] = 'Vsebina sporočila (vzrok za odsotnost):';
$labels['vacationsubject'] = 'Zadeva sporočila';
$labels['rulestop'] = 'Prekini z izvajanjem pravil';
@@ -83,13 +83,13 @@ $labels['countisgreaterthanequal'] = 'seštevek je večji ali enak';
$labels['countislessthan'] = 'seštevek je manjši od';
$labels['countislessthanequal'] = 'seštevel je manjši ali enak';
$labels['countequals'] = 'seštevek je enak';
-$labels['countnotequals'] = 'seštevek ni enak';
+$labels['countnotequals'] = 'vsota ne ustreza';
$labels['valueisgreaterthan'] = 'vrednost je večja od';
$labels['valueisgreaterthanequal'] = 'vrednost je večja ali enaka';
$labels['valueislessthan'] = 'vrednost je manjša od';
$labels['valueislessthanequal'] = 'vrednost je manjša ali enaka';
$labels['valueequals'] = 'vrednost je enaka';
-$labels['valuenotequals'] = 'vrednost je neenaka';
+$labels['valuenotequals'] = 'vrednost ni enaka';
$labels['setflags'] = 'Označi sporočilo';
$labels['addflags'] = 'Označi sporočilo';
$labels['removeflags'] = 'Odstrani zaznamke s sporočil';
@@ -121,6 +121,22 @@ $labels['filtercreate'] = 'Ustvari filter';
$labels['usedata'] = 'Pri stvarjanju filtra uporabi naslednje podatke';
$labels['nextstep'] = 'Naslednji korak';
$labels['...'] = '...';
+$labels['currdate'] = 'Današnji datum';
+$labels['datetest'] = 'Datum';
+$labels['dateheader'] = 'glava:';
+$labels['year'] = 'leto';
+$labels['month'] = 'mesec';
+$labels['day'] = 'dan';
+$labels['date'] = 'datum(yyyy-mm-dd)';
+$labels['julian'] = 'datum (julijanski)';
+$labels['hour'] = 'ura';
+$labels['minute'] = 'minuta';
+$labels['second'] = 'sekunda';
+$labels['time'] = 'čas';
+$labels['iso8601'] = 'datum (ISO8601)';
+$labels['std11'] = 'datum (RFC2822)';
+$labels['zone'] = 'časovni pas';
+$labels['weekday'] = 'dan v tednu (0-6)';
$labels['advancedopts'] = 'Dodatne možnosti';
$labels['body'] = 'Vsebina';
$labels['address'] = 'naslov';
@@ -140,6 +156,8 @@ $labels['default'] = 'privzeto';
$labels['octet'] = 'strict (octet)';
$labels['asciicasemap'] = 'ni občutljiv na velike/male črke (ascii-casemap)';
$labels['asciinumeric'] = 'numerično (ascii-numeric)';
+$labels['index'] = 'indeks:';
+$labels['indexlast'] = 'obraten vrstni red';
$messages = array();
$messages['filterunknownerror'] = 'Prišlo je do neznane napake.';
@@ -173,5 +191,6 @@ $messages['nametoolong'] = 'Ime je predolgo.';
$messages['namereserved'] = 'Rezervirano ime.';
$messages['setexist'] = 'Nastavitev filtra že obstaja.';
$messages['nodata'] = 'Izbrana mora biti vsaj ena nastavitev!';
+$messages['invaliddateformat'] = 'Neveljaven datum ali oblika zapisa datuma';
?>
diff --git a/plugins/managesieve/localization/sv_SE.inc b/plugins/managesieve/localization/sv_SE.inc
index 49d5b1222..f2aeddd9f 100644
--- a/plugins/managesieve/localization/sv_SE.inc
+++ b/plugins/managesieve/localization/sv_SE.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Lägg till';
$labels['del'] = 'Ta bort';
$labels['sender'] = 'Avsändare';
$labels['recipient'] = 'Mottagare';
-$labels['vacationaddresses'] = 'Ytterligare mottagaradresser (avdelade med kommatecken)';
+$labels['vacationaddr'] = 'Ytterligare mottagaradresser:';
$labels['vacationdays'] = 'Antal dagar mellan auto-svar:';
$labels['vacationinterval'] = 'Tid mellan auto-svar:';
$labels['days'] = 'Dagar';
diff --git a/plugins/managesieve/localization/tr_TR.inc b/plugins/managesieve/localization/tr_TR.inc
index c36869d29..19bbb2e8e 100644
--- a/plugins/managesieve/localization/tr_TR.inc
+++ b/plugins/managesieve/localization/tr_TR.inc
@@ -55,8 +55,8 @@ $labels['add'] = 'Ekle';
$labels['del'] = 'Sil';
$labels['sender'] = 'Gönderici';
$labels['recipient'] = 'Alıcı';
-$labels['vacationaddresses'] = 'İlave e-posta adreslerim(virgül ile ayrılmış)';
-$labels['vacationdays'] = 'Ne sıklıkla mesajlar gönderilir(gün)';
+$labels['vacationaddr'] = 'İlave e-posta adreslerim:';
+$labels['vacationdays'] = 'Ne sıklıkla mesajlar gönderilir(gün):';
$labels['vacationinterval'] = 'Ne kadar sıklıkla mesaj gönderirsiniz:';
$labels['days'] = 'günler';
$labels['seconds'] = 'saniyeler';
@@ -165,8 +165,8 @@ $messages['setcreateerror'] = 'Filtre setleri oluşturulamadı. Sunucuda hata ol
$messages['setcreated'] = 'Filtre setleri başarıyla oluşturuldu.';
$messages['activateerror'] = 'Seçilen filtre(ler) etkinleştirilemedi. Sunucuda hata oluştu.';
$messages['deactivateerror'] = 'Seçilen filtre(ler) pasifleştirilemedi. Sunucuda hata oluştu.';
-$messages['deactivated'] = 'Filtre(ler) başarıyla etkinleştirildi.';
-$messages['activated'] = 'Filtre(ler) başarıyla iptal edildi.';
+$messages['deactivated'] = 'Filtre(ler) başarıyla iptal edildi.';
+$messages['activated'] = 'Filtre(ler) başarıyla etkinleştirildi.';
$messages['moved'] = 'Filtre başarıyla taşındı.';
$messages['moveerror'] = 'Seçilen filtre(ler) taşınamadı. Sunucuda hata oluştu.';
$messages['nametoolong'] = 'İsim çok uzun.';
diff --git a/plugins/managesieve/localization/uk_UA.inc b/plugins/managesieve/localization/uk_UA.inc
index 41623df35..57cab9ea5 100644
--- a/plugins/managesieve/localization/uk_UA.inc
+++ b/plugins/managesieve/localization/uk_UA.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Додати';
$labels['del'] = 'Видалити';
$labels['sender'] = 'Відправник';
$labels['recipient'] = 'Отримувач';
-$labels['vacationaddresses'] = 'Додатковий список адрес отримувачів (розділених комою)';
+$labels['vacationaddr'] = 'Додатковий список адрес отримувачів:';
$labels['vacationdays'] = 'Як часто повторювати (у днях):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/vi_VN.inc b/plugins/managesieve/localization/vi_VN.inc
index 8d6fcd348..6e65cccf5 100644
--- a/plugins/managesieve/localization/vi_VN.inc
+++ b/plugins/managesieve/localization/vi_VN.inc
@@ -55,7 +55,7 @@ $labels['add'] = 'Thêm';
$labels['del'] = 'Xoá';
$labels['sender'] = 'Người gửi';
$labels['recipient'] = 'Người nhận';
-$labels['vacationaddresses'] = 'Địa chỉ email bổ sung của tôi ( phân cách bằng dấu phẩy)';
+$labels['vacationaddr'] = 'Địa chỉ email bổ sung của tôi';
$labels['vacationdays'] = 'Số lần gửi thư (trong ngày)';
$labels['vacationreason'] = 'Nội dung chính';
$labels['vacationsubject'] = 'Tiêu đề thư';
diff --git a/plugins/managesieve/localization/zh_CN.inc b/plugins/managesieve/localization/zh_CN.inc
index 79b705c54..106fb40fc 100644
--- a/plugins/managesieve/localization/zh_CN.inc
+++ b/plugins/managesieve/localization/zh_CN.inc
@@ -55,7 +55,7 @@ $labels['add'] = '添加';
$labels['del'] = '删除';
$labels['sender'] = '发件人';
$labels['recipient'] = '收件人';
-$labels['vacationaddresses'] = '收件人地址的附加名单(以半角逗号分隔)';
+$labels['vacationaddr'] = '收件人地址的附加名单';
$labels['vacationdays'] = '发送邮件频率(单位:天):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/localization/zh_TW.inc b/plugins/managesieve/localization/zh_TW.inc
index 3f3fc1313..047ebcccc 100644
--- a/plugins/managesieve/localization/zh_TW.inc
+++ b/plugins/managesieve/localization/zh_TW.inc
@@ -55,7 +55,7 @@ $labels['add'] = '新增';
$labels['del'] = '刪除';
$labels['sender'] = '寄件者';
$labels['recipient'] = '收件者';
-$labels['vacationaddresses'] = '其他收件者(用半形逗號隔開):';
+$labels['vacationaddr'] = '其他收件者:';
$labels['vacationdays'] = '多久回覆一次(單位:天):';
$labels['vacationinterval'] = 'How often send messages:';
$labels['days'] = 'days';
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js
index 04b9a76af..5201284fa 100644
--- a/plugins/managesieve/managesieve.js
+++ b/plugins/managesieve/managesieve.js
@@ -55,6 +55,11 @@ if (window.rcmail) {
}
$('input[type="text"]:first', rcmail.gui_objects.sieveform).focus();
+
+ // initialize smart list inputs
+ $('textarea[data-type="list"]', rcmail.gui_objects.sieveform).each(function() {
+ smart_field_init(this);
+ });
}
else {
rcmail.enable_command('plugin.managesieve-add', 'plugin.managesieve-setadd', !rcmail.env.sieveconnerror);
@@ -258,7 +263,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
var i, row = $('#rcmrow'+this.managesieve_rowid(o.id));
if (o.name)
- $('td', row).html(o.name);
+ $('td', row).text(o.name);
if (o.disabled)
row.addClass('disabled');
else
@@ -273,7 +278,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
var list = this.filters_list,
row = $('<tr><td class="name"></td></tr>');
- $('td', row).html(o.name);
+ $('td', row).text(o.name);
row.attr('id', 'rcmrow'+o.id);
if (o.disabled)
row.addClass('disabled');
@@ -297,7 +302,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
tr = document.createElement('TR');
td = document.createElement('TD');
- td.innerHTML = el.name;
+ $(td).text(el.name);
td.className = 'name';
tr.id = 'rcmrow' + el.id;
if (el['class'])
@@ -346,7 +351,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
list = this.filtersets_list,
row = $('<tr class="disabled"><td class="name"></td></tr>');
- $('td', row).html(o.name);
+ $('td', row).text(o.name);
row.attr('id', 'rcmrow'+id);
this.env.filtersets[id] = o.name;
@@ -469,6 +474,11 @@ rcube_webmail.prototype.managesieve_rulefill = function(content, id, after)
row.className = 'rulerow';
row.innerHTML = content;
+ // initialize smart list inputs
+ $('textarea[data-type="list"]', row).each(function() {
+ smart_field_init(this);
+ });
+
this.managesieve_formbuttons(div);
}
};
@@ -565,40 +575,45 @@ function rule_header_select(id)
var obj = document.getElementById('header' + id),
size = document.getElementById('rule_size' + id),
op = document.getElementById('rule_op' + id),
- target = document.getElementById('rule_target' + id),
- header = document.getElementById('custom_header' + id),
+ header = document.getElementById('custom_header' + id + '_list'),
mod = document.getElementById('rule_mod' + id),
trans = document.getElementById('rule_trans' + id),
- comp = document.getElementById('rule_comp' + id);
+ comp = document.getElementById('rule_comp' + id),
+ datepart = document.getElementById('rule_date_part' + id),
+ dateheader = document.getElementById('rule_date_header_div' + id),
+ h = obj.value;
- if (obj.value == 'size') {
+ if (h == 'size') {
size.style.display = 'inline';
- op.style.display = 'none';
- target.style.display = 'none';
- header.style.display = 'none';
- mod.style.display = 'none';
- trans.style.display = 'none';
- comp.style.display = 'none';
+ $.each([op, header, mod, trans, comp], function() { this.style.display = 'none'; });
}
else {
- header.style.display = obj.value != '...' ? 'none' : 'inline';
+ header.style.display = h != '...' ? 'none' : 'inline-block';
size.style.display = 'none';
op.style.display = 'inline';
comp.style.display = '';
- rule_op_select(id);
- mod.style.display = obj.value == 'body' ? 'none' : 'block';
- trans.style.display = obj.value == 'body' ? 'block' : 'none';
+ mod.style.display = h == 'body' || h == 'currentdate' || h == 'date' ? 'none' : 'block';
+ trans.style.display = h == 'body' ? 'block' : 'none';
}
- obj.style.width = obj.value == '...' ? '40px' : '';
+ if (datepart)
+ datepart.style.display = h == 'currentdate' || h == 'date' ? 'inline' : 'none';
+ if (dateheader)
+ dateheader.style.display = h == 'date' ? '' : 'none';
+
+ rule_op_select(op, id, h);
+ rule_mod_select(id, h);
+ obj.style.width = h == '...' ? '40px' : '';
};
-function rule_op_select(id)
+function rule_op_select(obj, id, header)
{
- var obj = document.getElementById('rule_op' + id),
- target = document.getElementById('rule_target' + id);
+ var target = document.getElementById('rule_target' + id + '_list');
- target.style.display = obj.value == 'exists' || obj.value == 'notexists' ? 'none' : 'inline';
+ if (!header)
+ header = document.getElementById('header' + id).value;
+
+ target.style.display = obj.value == 'exists' || obj.value == 'notexists' || header == 'size' ? 'none' : 'inline-block';
};
function rule_trans_select(id)
@@ -609,12 +624,19 @@ function rule_trans_select(id)
target.style.display = obj.value != 'content' ? 'none' : 'inline';
};
-function rule_mod_select(id)
+function rule_mod_select(id, header)
{
var obj = document.getElementById('rule_mod_op' + id),
- target = document.getElementById('rule_mod_type' + id);
+ target = document.getElementById('rule_mod_type' + id),
+ index = document.getElementById('rule_index_div' + id);
+
+ if (!header)
+ header = document.getElementById('header' + id).value;
target.style.display = obj.value != 'address' && obj.value != 'envelope' ? 'none' : 'inline';
+
+ if (index)
+ index.style.display = header != 'body' && header != 'currentdate' && header != 'size' && obj.value != 'envelope' ? '' : 'none';
};
function rule_join_radio(value)
@@ -638,8 +660,9 @@ function rule_adv_switch(id, elem)
function action_type_select(id)
{
+console.log(id);
var obj = document.getElementById('action_type' + id),
- enabled = {},
+ v = obj.value, enabled = {},
elems = {
mailbox: document.getElementById('action_mailbox' + id),
target: document.getElementById('action_target' + id),
@@ -650,25 +673,25 @@ function action_type_select(id)
notify: document.getElementById('action_notify' + id)
};
- if (obj.value == 'fileinto' || obj.value == 'fileinto_copy') {
+ if (v == 'fileinto' || v == 'fileinto_copy') {
enabled.mailbox = 1;
}
- else if (obj.value == 'redirect' || obj.value == 'redirect_copy') {
+ else if (v == 'redirect' || v == 'redirect_copy') {
enabled.target = 1;
}
- else if (obj.value.match(/^reject|ereject$/)) {
+ else if (v.match(/^reject|ereject$/)) {
enabled.target_area = 1;
}
- else if (obj.value.match(/^(add|set|remove)flag$/)) {
+ else if (v.match(/^(add|set|remove)flag$/)) {
enabled.flags = 1;
}
- else if (obj.value == 'vacation') {
+ else if (v == 'vacation') {
enabled.vacation = 1;
}
- else if (obj.value == 'set') {
+ else if (v == 'set') {
enabled.set = 1;
}
- else if (obj.value == 'notify') {
+ else if (v == 'notify') {
enabled.notify = 1;
}
@@ -677,6 +700,72 @@ function action_type_select(id)
}
};
+// Inititalizes smart list input
+function smart_field_init(field)
+{
+ var id = field.id + '_list',
+ area = $('<span class="listarea"></span>'),
+ list = field.value ? field.value.split("\n") : [''];
+
+ if ($('#'+id).length)
+ return;
+
+ // add input rows
+ $.each(list, function(i, v) {
+ area.append(smart_field_row(v, field.name, i, $(field).data('size')));
+ });
+
+ area.attr('id', id);
+ field = $(field);
+
+ if (field.attr('disabled'))
+ area.hide();
+
+ field.after(area);
+
+ if (field.hasClass('error')) {
+ area.addClass('error');
+ rcmail.managesieve_tip_register([[id, field.data('tip')]]);
+ }
+};
+
+function smart_field_row(value, name, idx, size)
+{
+ // build row element content
+ var input, content = '<span class="listelement">'
+ + '<span class="reset"></span><input type="text"></span>',
+ elem = $(content),
+ attrs = {value: value, name: name + '[]'};
+
+ if (size)
+ attrs.size = size;
+
+ input = $('input', elem).attr(attrs).keydown(function(e) {
+ var input = $(this);
+ // element creation event (on Enter)
+ if (e.which == 13) {
+ var name = input.attr('name').replace(/\[\]$/, ''),
+ dt = (new Date()).getTime(),
+ elem = smart_field_row('', name, dt, size);
+
+ input.parent().after(elem);
+ $('input', elem).focus();
+ }
+ });
+
+ // element deletion event
+ $('span[class="reset"]', elem).click(function() {
+ var span = $(this.parentNode);
+
+ if (span.parent().children().length > 1)
+ span.remove();
+ else
+ $('input', span).val('').focus();
+ });
+
+ return elem;
+}
+
// Register onmouse(leave/enter) events for tips on specified form element
rcube_webmail.prototype.managesieve_tip_register = function(tips)
{
@@ -685,25 +774,26 @@ rcube_webmail.prototype.managesieve_tip_register = function(tips)
for (var n in tips) {
$('#'+tips[n][0])
- .bind('mouseenter', {str: tips[n][1]},
- function(e) {
- var offset = $(this).offset(),
- left = offset.left,
- top = offset.top - 12,
- minwidth = $(this).width();
-
- if (framed) {
- offset = $((rcmail.env.task == 'mail' ? '#sievefilterform > iframe' : '#filter-box'), parent.document).offset();
- top += offset.top;
- left += offset.left;
- }
-
- tip.html(e.data.str)
- top -= tip.height();
-
- tip.css({left: left, top: top, minWidth: (minwidth-2) + 'px'}).show();
- })
- .bind('mouseleave', function(e) { tip.hide(); });
+ .data('tip', tips[n][1])
+ .bind('mouseenter', function(e) {
+ var elem = $(this),
+ offset = elem.offset(),
+ left = offset.left,
+ top = offset.top - 12,
+ minwidth = elem.width();
+
+ if (framed) {
+ offset = $((rcmail.env.task == 'mail' ? '#sievefilterform > iframe' : '#filter-box'), parent.document).offset();
+ top += offset.top;
+ left += offset.left;
+ }
+
+ tip.html(elem.data('tip'));
+ top -= tip.height();
+
+ tip.css({left: left, top: top, minWidth: (minwidth-2) + 'px'}).show();
+ })
+ .bind('mouseleave', function(e) { tip.hide(); });
}
};
diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index 817fa8650..6970193c2 100644
--- a/plugins/managesieve/managesieve.php
+++ b/plugins/managesieve/managesieve.php
@@ -12,60 +12,28 @@
*
* Configuration (see config.inc.php.dist)
*
- * Copyright (C) 2008-2012, The Roundcube Dev Team
- * Copyright (C) 2011-2012, Kolab Systems AG
+ * Copyright (C) 2008-2013, The Roundcube Dev Team
+ * Copyright (C) 2011-2013, 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 version 2
- * as published by the Free Software Foundation.
+ * 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
*/
class managesieve extends rcube_plugin
{
public $task = 'mail|settings';
-
private $rc;
- private $sieve;
- private $errors;
- private $form;
- private $tips = array();
- private $script = array();
- private $exts = array();
- private $list;
- private $active = array();
- private $headers = array(
- 'subject' => 'Subject',
- 'from' => 'From',
- 'to' => 'To',
- );
- private $addr_headers = array(
- // Required
- "from", "to", "cc", "bcc", "sender", "resent-from", "resent-to",
- // Additional (RFC 822 / RFC 2822)
- "reply-to", "resent-reply-to", "resent-sender", "resent-cc", "resent-bcc",
- // Non-standard (RFC 2076, draft-palme-mailext-headers-08.txt)
- "for-approval", "for-handling", "for-comment", "apparently-to", "errors-to",
- "delivered-to", "return-receipt-to", "x-admin", "read-receipt-to",
- "x-confirm-reading-to", "return-receipt-requested",
- "registered-mail-reply-requested-by", "mail-followup-to", "mail-reply-to",
- "abuse-reports-to", "x-complaints-to", "x-report-abuse-to",
- // Undocumented
- "x-beenthere",
- );
-
- const VERSION = '6.2';
- const PROGNAME = 'Roundcube (Managesieve)';
- const PORT = 4190;
-
+ private $engine;
function init()
{
@@ -92,10 +60,11 @@ class managesieve extends rcube_plugin
/**
* Initializes plugin's UI (localization, js script)
*/
- private function init_ui()
+ function init_ui()
{
- if ($this->ui_initialized)
+ if ($this->ui_initialized) {
return;
+ }
// load localization
$this->add_texts('localization/', array('filters','managefilters'));
@@ -109,6 +78,11 @@ class managesieve extends rcube_plugin
*/
function mail_task_handler()
{
+ // make sure we're not in ajax request
+ if ($this->rc->output->type != 'html') {
+ return;
+ }
+
// use jQuery for popup window
$this->require_plugin('jqueryui');
@@ -180,352 +154,18 @@ class managesieve extends rcube_plugin
}
/**
- * Loads configuration, initializes plugin (including sieve connection)
+ * Plugin action handler
*/
- function managesieve_start()
- {
- $this->load_config();
-
- // register UI objects
- $this->rc->output->add_handlers(array(
- 'filterslist' => array($this, 'filters_list'),
- 'filtersetslist' => array($this, 'filtersets_list'),
- 'filterframe' => array($this, 'filter_frame'),
- 'filterform' => array($this, 'filter_form'),
- 'filtersetform' => array($this, 'filterset_form'),
- ));
-
- // Add include path for internal classes
- $include_path = $this->home . '/lib' . PATH_SEPARATOR;
- $include_path .= ini_get('include_path');
- set_include_path($include_path);
-
- // Get connection parameters
- $host = $this->rc->config->get('managesieve_host', 'localhost');
- $port = $this->rc->config->get('managesieve_port');
- $tls = $this->rc->config->get('managesieve_usetls', false);
-
- $host = rcube_utils::parse_host($host);
- $host = rcube_utils::idn_to_ascii($host);
-
- // remove tls:// prefix, set TLS flag
- if (($host = preg_replace('|^tls://|i', '', $host, 1, $cnt)) && $cnt) {
- $tls = true;
- }
-
- if (empty($port)) {
- $port = getservbyname('sieve', 'tcp');
- if (empty($port)) {
- $port = self::PORT;
- }
- }
-
- $plugin = $this->rc->plugins->exec_hook('managesieve_connect', array(
- 'user' => $_SESSION['username'],
- 'password' => $this->rc->decrypt($_SESSION['password']),
- 'host' => $host,
- 'port' => $port,
- 'usetls' => $tls,
- 'auth_type' => $this->rc->config->get('managesieve_auth_type'),
- 'disabled' => $this->rc->config->get('managesieve_disabled_extensions'),
- 'debug' => $this->rc->config->get('managesieve_debug', false),
- 'auth_cid' => $this->rc->config->get('managesieve_auth_cid'),
- 'auth_pw' => $this->rc->config->get('managesieve_auth_pw'),
- ));
-
- // try to connect to managesieve server and to fetch the script
- $this->sieve = new rcube_sieve(
- $plugin['user'],
- $plugin['password'],
- $plugin['host'],
- $plugin['port'],
- $plugin['auth_type'],
- $plugin['usetls'],
- $plugin['disabled'],
- $plugin['debug'],
- $plugin['auth_cid'],
- $plugin['auth_pw']
- );
-
- if (!($error = $this->sieve->error())) {
- // Get list of scripts
- $list = $this->list_scripts();
-
- if (!empty($_GET['_set']) || !empty($_POST['_set'])) {
- $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
- }
- else if (!empty($_SESSION['managesieve_current'])) {
- $script_name = $_SESSION['managesieve_current'];
- }
- else {
- // get (first) active script
- if (!empty($this->active[0])) {
- $script_name = $this->active[0];
- }
- else if ($list) {
- $script_name = $list[0];
- }
- // create a new (initial) script
- else {
- // if script not exists build default script contents
- $script_file = $this->rc->config->get('managesieve_default');
- $script_name = $this->rc->config->get('managesieve_script_name');
-
- if (empty($script_name))
- $script_name = 'roundcube';
-
- if ($script_file && is_readable($script_file))
- $content = file_get_contents($script_file);
-
- // add script and set it active
- if ($this->sieve->save_script($script_name, $content)) {
- $this->activate_script($script_name);
- $this->list[] = $script_name;
- }
- }
- }
-
- if ($script_name) {
- $this->sieve->load($script_name);
- }
-
- $error = $this->sieve->error();
- }
-
- // finally set script objects
- if ($error) {
- switch ($error) {
- case SIEVE_ERROR_CONNECTION:
- case SIEVE_ERROR_LOGIN:
- $this->rc->output->show_message('managesieve.filterconnerror', 'error');
- break;
- default:
- $this->rc->output->show_message('managesieve.filterunknownerror', 'error');
- break;
- }
-
- rcube::raise_error(array('code' => 403, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Unable to connect to managesieve on $host:$port"), true, false);
-
- // to disable 'Add filter' button set env variable
- $this->rc->output->set_env('filterconnerror', true);
- $this->script = array();
- }
- else {
- $this->exts = $this->sieve->get_extensions();
- $this->script = $this->sieve->script->as_array();
- $this->rc->output->set_env('currentset', $this->sieve->current);
- $_SESSION['managesieve_current'] = $this->sieve->current;
- }
-
- return $error;
- }
-
function managesieve_actions()
{
$this->init_ui();
-
- $error = $this->managesieve_start();
-
- // Handle user requests
- if ($action = rcube_utils::get_input_value('_act', rcube_utils::INPUT_GPC)) {
- $fid = (int) rcube_utils::get_input_value('_fid', rcube_utils::INPUT_POST);
-
- if ($action == 'delete' && !$error) {
- if (isset($this->script[$fid])) {
- if ($this->sieve->script->delete_rule($fid))
- $result = $this->save_script();
-
- if ($result === true) {
- $this->rc->output->show_message('managesieve.filterdeleted', 'confirmation');
- $this->rc->output->command('managesieve_updatelist', 'del', array('id' => $fid));
- } else {
- $this->rc->output->show_message('managesieve.filterdeleteerror', 'error');
- }
- }
- }
- else if ($action == 'move' && !$error) {
- if (isset($this->script[$fid])) {
- $to = (int) rcube_utils::get_input_value('_to', rcube_utils::INPUT_POST);
- $rule = $this->script[$fid];
-
- // remove rule
- unset($this->script[$fid]);
- $this->script = array_values($this->script);
-
- // add at target position
- if ($to >= count($this->script)) {
- $this->script[] = $rule;
- }
- else {
- $script = array();
- foreach ($this->script as $idx => $r) {
- if ($idx == $to)
- $script[] = $rule;
- $script[] = $r;
- }
- $this->script = $script;
- }
-
- $this->sieve->script->content = $this->script;
- $result = $this->save_script();
-
- if ($result === true) {
- $result = $this->list_rules();
-
- $this->rc->output->show_message('managesieve.moved', 'confirmation');
- $this->rc->output->command('managesieve_updatelist', 'list',
- array('list' => $result, 'clear' => true, 'set' => $to));
- } else {
- $this->rc->output->show_message('managesieve.moveerror', 'error');
- }
- }
- }
- else if ($action == 'act' && !$error) {
- if (isset($this->script[$fid])) {
- $rule = $this->script[$fid];
- $disabled = $rule['disabled'] ? true : false;
- $rule['disabled'] = !$disabled;
- $result = $this->sieve->script->update_rule($fid, $rule);
-
- if ($result !== false)
- $result = $this->save_script();
-
- if ($result === true) {
- if ($rule['disabled'])
- $this->rc->output->show_message('managesieve.deactivated', 'confirmation');
- else
- $this->rc->output->show_message('managesieve.activated', 'confirmation');
- $this->rc->output->command('managesieve_updatelist', 'update',
- array('id' => $fid, 'disabled' => $rule['disabled']));
- } else {
- if ($rule['disabled'])
- $this->rc->output->show_message('managesieve.deactivateerror', 'error');
- else
- $this->rc->output->show_message('managesieve.activateerror', 'error');
- }
- }
- }
- else if ($action == 'setact' && !$error) {
- $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
- $result = $this->activate_script($script_name);
- $kep14 = $this->rc->config->get('managesieve_kolab_master');
-
- if ($result === true) {
- $this->rc->output->set_env('active_sets', $this->active);
- $this->rc->output->show_message('managesieve.setactivated', 'confirmation');
- $this->rc->output->command('managesieve_updatelist', 'setact',
- array('name' => $script_name, 'active' => true, 'all' => !$kep14));
- } else {
- $this->rc->output->show_message('managesieve.setactivateerror', 'error');
- }
- }
- else if ($action == 'deact' && !$error) {
- $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
- $result = $this->deactivate_script($script_name);
-
- if ($result === true) {
- $this->rc->output->set_env('active_sets', $this->active);
- $this->rc->output->show_message('managesieve.setdeactivated', 'confirmation');
- $this->rc->output->command('managesieve_updatelist', 'setact',
- array('name' => $script_name, 'active' => false));
- } else {
- $this->rc->output->show_message('managesieve.setdeactivateerror', 'error');
- }
- }
- else if ($action == 'setdel' && !$error) {
- $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
- $result = $this->remove_script($script_name);
-
- if ($result === true) {
- $this->rc->output->show_message('managesieve.setdeleted', 'confirmation');
- $this->rc->output->command('managesieve_updatelist', 'setdel',
- array('name' => $script_name));
- $this->rc->session->remove('managesieve_current');
- } else {
- $this->rc->output->show_message('managesieve.setdeleteerror', 'error');
- }
- }
- else if ($action == 'setget') {
- $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true);
- $script = $this->sieve->get_script($script_name);
-
- if (PEAR::isError($script))
- exit;
-
- $browser = new rcube_browser;
-
- // send download headers
- header("Content-Type: application/octet-stream");
- header("Content-Length: ".strlen($script));
-
- if ($browser->ie)
- header("Content-Type: application/force-download");
- if ($browser->ie && $browser->ver < 7)
- $filename = rawurlencode(abbreviate_string($script_name, 55));
- else if ($browser->ie)
- $filename = rawurlencode($script_name);
- else
- $filename = addcslashes($script_name, '\\"');
-
- header("Content-Disposition: attachment; filename=\"$filename.txt\"");
- echo $script;
- exit;
- }
- else if ($action == 'list') {
- $result = $this->list_rules();
-
- $this->rc->output->command('managesieve_updatelist', 'list', array('list' => $result));
- }
- else if ($action == 'ruleadd') {
- $rid = rcube_utils::get_input_value('_rid', rcube_utils::INPUT_GPC);
- $id = $this->genid();
- $content = $this->rule_div($fid, $id, false);
-
- $this->rc->output->command('managesieve_rulefill', $content, $id, $rid);
- }
- else if ($action == 'actionadd') {
- $aid = rcube_utils::get_input_value('_aid', rcube_utils::INPUT_GPC);
- $id = $this->genid();
- $content = $this->action_div($fid, $id, false);
-
- $this->rc->output->command('managesieve_actionfill', $content, $id, $aid);
- }
-
- $this->rc->output->send();
- }
- else if ($this->rc->task == 'mail') {
- // Initialize the form
- $rules = rcube_utils::get_input_value('r', rcube_utils::INPUT_GET);
- if (!empty($rules)) {
- $i = 0;
- foreach ($rules as $rule) {
- list($header, $value) = explode(':', $rule, 2);
- $tests[$i] = array(
- 'type' => 'contains',
- 'test' => 'header',
- 'arg1' => $header,
- 'arg2' => $value,
- );
- $i++;
- }
-
- $this->form = array(
- 'join' => count($tests) > 1 ? 'allof' : 'anyof',
- 'name' => '',
- 'tests' => $tests,
- 'actions' => array(
- 0 => array('type' => 'fileinto'),
- 1 => array('type' => 'stop'),
- ),
- );
- }
- }
-
- $this->managesieve_send();
+ $engine = $this->get_engine();
+ $engine->actions();
}
+ /**
+ * Forms save action handler
+ */
function managesieve_save()
{
// load localization
@@ -536,1524 +176,26 @@ class managesieve extends rcube_plugin
$this->include_script('managesieve.js');
}
- // Init plugin and handle managesieve connection
- $error = $this->managesieve_start();
-
- // get request size limits (#1488648)
- $max_post = max(array(
- ini_get('max_input_vars'),
- ini_get('suhosin.request.max_vars'),
- ini_get('suhosin.post.max_vars'),
- ));
- $max_depth = max(array(
- ini_get('suhosin.request.max_array_depth'),
- ini_get('suhosin.post.max_array_depth'),
- ));
-
- // check request size limit
- if ($max_post && count($_POST, COUNT_RECURSIVE) >= $max_post) {
- rcube::raise_error(array(
- 'code' => 500, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Request size limit exceeded (one of max_input_vars/suhosin.request.max_vars/suhosin.post.max_vars)"
- ), true, false);
- $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
- }
- // check request depth limits
- else if ($max_depth && count($_POST['_header']) > $max_depth) {
- rcube::raise_error(array(
- 'code' => 500, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Request size limit exceeded (one of suhosin.request.max_array_depth/suhosin.post.max_array_depth)"
- ), true, false);
- $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
- }
- // filters set add action
- else if (!empty($_POST['_newset'])) {
- $name = rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true);
- $copy = rcube_utils::get_input_value('_copy', rcube_utils::INPUT_POST, true);
- $from = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST);
- $exceptions = $this->rc->config->get('managesieve_filename_exceptions');
- $kolab = $this->rc->config->get('managesieve_kolab_master');
- $name_uc = mb_strtolower($name);
- $list = $this->list_scripts();
-
- if (!$name) {
- $this->errors['name'] = $this->gettext('cannotbeempty');
- }
- else if (mb_strlen($name) > 128) {
- $this->errors['name'] = $this->gettext('nametoolong');
- }
- else if (!empty($exceptions) && in_array($name, (array)$exceptions)) {
- $this->errors['name'] = $this->gettext('namereserved');
- }
- else if (!empty($kolab) && in_array($name_uc, array('MASTER', 'USER', 'MANAGEMENT'))) {
- $this->errors['name'] = $this->gettext('namereserved');
- }
- else if (in_array($name, $list)) {
- $this->errors['name'] = $this->gettext('setexist');
- }
- else if ($from == 'file') {
- // from file
- if (is_uploaded_file($_FILES['_file']['tmp_name'])) {
- $file = file_get_contents($_FILES['_file']['tmp_name']);
- $file = preg_replace('/\r/', '', $file);
- // for security don't save script directly
- // check syntax before, like this...
- $this->sieve->load_script($file);
- if (!$this->save_script($name)) {
- $this->errors['file'] = $this->gettext('setcreateerror');
- }
- }
- else { // upload failed
- $err = $_FILES['_file']['error'];
-
- if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
- $msg = $this->rc->gettext(array('name' => 'filesizeerror',
- 'vars' => array('size' =>
- $this->rc->show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
- }
- else {
- $this->errors['file'] = $this->gettext('fileuploaderror');
- }
- }
- }
- else if (!$this->sieve->copy($name, $from == 'set' ? $copy : '')) {
- $error = 'managesieve.setcreateerror';
- }
-
- if (!$error && empty($this->errors)) {
- // Find position of the new script on the list
- $list[] = $name;
- asort($list, SORT_LOCALE_STRING);
- $list = array_values($list);
- $index = array_search($name, $list);
-
- $this->rc->output->show_message('managesieve.setcreated', 'confirmation');
- $this->rc->output->command('parent.managesieve_updatelist', 'setadd',
- array('name' => $name, 'index' => $index));
- } else if ($msg) {
- $this->rc->output->command('display_message', $msg, 'error');
- } else if ($error) {
- $this->rc->output->show_message($error, 'error');
- }
- }
- // filter add/edit action
- else if (isset($_POST['_name'])) {
- $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST, true));
- $fid = trim(rcube_utils::get_input_value('_fid', rcube_utils::INPUT_POST));
- $join = trim(rcube_utils::get_input_value('_join', rcube_utils::INPUT_POST));
-
- // and arrays
- $headers = rcube_utils::get_input_value('_header', rcube_utils::INPUT_POST);
- $cust_headers = rcube_utils::get_input_value('_custom_header', rcube_utils::INPUT_POST);
- $ops = rcube_utils::get_input_value('_rule_op', rcube_utils::INPUT_POST);
- $sizeops = rcube_utils::get_input_value('_rule_size_op', rcube_utils::INPUT_POST);
- $sizeitems = rcube_utils::get_input_value('_rule_size_item', rcube_utils::INPUT_POST);
- $sizetargets = rcube_utils::get_input_value('_rule_size_target', rcube_utils::INPUT_POST);
- $targets = rcube_utils::get_input_value('_rule_target', rcube_utils::INPUT_POST, true);
- $mods = rcube_utils::get_input_value('_rule_mod', rcube_utils::INPUT_POST);
- $mod_types = rcube_utils::get_input_value('_rule_mod_type', rcube_utils::INPUT_POST);
- $body_trans = rcube_utils::get_input_value('_rule_trans', rcube_utils::INPUT_POST);
- $body_types = rcube_utils::get_input_value('_rule_trans_type', rcube_utils::INPUT_POST, true);
- $comparators = rcube_utils::get_input_value('_rule_comp', rcube_utils::INPUT_POST);
- $act_types = rcube_utils::get_input_value('_action_type', rcube_utils::INPUT_POST, true);
- $mailboxes = rcube_utils::get_input_value('_action_mailbox', rcube_utils::INPUT_POST, true);
- $act_targets = rcube_utils::get_input_value('_action_target', rcube_utils::INPUT_POST, true);
- $area_targets = rcube_utils::get_input_value('_action_target_area', rcube_utils::INPUT_POST, true);
- $reasons = rcube_utils::get_input_value('_action_reason', rcube_utils::INPUT_POST, true);
- $addresses = rcube_utils::get_input_value('_action_addresses', rcube_utils::INPUT_POST, true);
- $intervals = rcube_utils::get_input_value('_action_interval', rcube_utils::INPUT_POST);
- $interval_types = rcube_utils::get_input_value('_action_interval_type', rcube_utils::INPUT_POST);
- $subject = rcube_utils::get_input_value('_action_subject', rcube_utils::INPUT_POST, true);
- $flags = rcube_utils::get_input_value('_action_flags', rcube_utils::INPUT_POST);
- $varnames = rcube_utils::get_input_value('_action_varname', rcube_utils::INPUT_POST);
- $varvalues = rcube_utils::get_input_value('_action_varvalue', rcube_utils::INPUT_POST);
- $varmods = rcube_utils::get_input_value('_action_varmods', rcube_utils::INPUT_POST);
- $notifyaddrs = rcube_utils::get_input_value('_action_notifyaddress', rcube_utils::INPUT_POST);
- $notifybodies = rcube_utils::get_input_value('_action_notifybody', rcube_utils::INPUT_POST);
- $notifymessages = rcube_utils::get_input_value('_action_notifymessage', rcube_utils::INPUT_POST);
- $notifyfrom = rcube_utils::get_input_value('_action_notifyfrom', rcube_utils::INPUT_POST);
- $notifyimp = rcube_utils::get_input_value('_action_notifyimportance', rcube_utils::INPUT_POST);
-
- // we need a "hack" for radiobuttons
- foreach ($sizeitems as $item)
- $items[] = $item;
-
- $this->form['disabled'] = $_POST['_disabled'] ? true : false;
- $this->form['join'] = $join=='allof' ? true : false;
- $this->form['name'] = $name;
- $this->form['tests'] = array();
- $this->form['actions'] = array();
-
- if ($name == '')
- $this->errors['name'] = $this->gettext('cannotbeempty');
- else {
- foreach($this->script as $idx => $rule)
- if($rule['name'] == $name && $idx != $fid) {
- $this->errors['name'] = $this->gettext('ruleexist');
- break;
- }
- }
-
- $i = 0;
- // rules
- if ($join == 'any') {
- $this->form['tests'][0]['test'] = 'true';
- }
- else {
- foreach ($headers as $idx => $header) {
- $header = $this->strip_value($header);
- $target = $this->strip_value($targets[$idx], true);
- $operator = $this->strip_value($ops[$idx]);
- $comparator = $this->strip_value($comparators[$idx]);
-
- if ($header == 'size') {
- $sizeop = $this->strip_value($sizeops[$idx]);
- $sizeitem = $this->strip_value($items[$idx]);
- $sizetarget = $this->strip_value($sizetargets[$idx]);
-
- $this->form['tests'][$i]['test'] = 'size';
- $this->form['tests'][$i]['type'] = $sizeop;
- $this->form['tests'][$i]['arg'] = $sizetarget;
-
- if ($sizetarget == '')
- $this->errors['tests'][$i]['sizetarget'] = $this->gettext('cannotbeempty');
- else if (!preg_match('/^[0-9]+(K|M|G)?$/i', $sizetarget.$sizeitem, $m)) {
- $this->errors['tests'][$i]['sizetarget'] = $this->gettext('forbiddenchars');
- $this->form['tests'][$i]['item'] = $sizeitem;
- }
- else
- $this->form['tests'][$i]['arg'] .= $m[1];
- }
- else if ($header == 'body') {
- $trans = $this->strip_value($body_trans[$idx]);
- $trans_type = $this->strip_value($body_types[$idx], true);
-
- if (preg_match('/^not/', $operator))
- $this->form['tests'][$i]['not'] = true;
- $type = preg_replace('/^not/', '', $operator);
-
- if ($type == 'exists') {
- $this->errors['tests'][$i]['op'] = true;
- }
-
- $this->form['tests'][$i]['test'] = 'body';
- $this->form['tests'][$i]['type'] = $type;
- $this->form['tests'][$i]['arg'] = $target;
-
- if ($target == '' && $type != 'exists')
- $this->errors['tests'][$i]['target'] = $this->gettext('cannotbeempty');
- else if (preg_match('/^(value|count)-/', $type) && !preg_match('/[0-9]+/', $target))
- $this->errors['tests'][$i]['target'] = $this->gettext('forbiddenchars');
-
- $this->form['tests'][$i]['part'] = $trans;
- if ($trans == 'content') {
- $this->form['tests'][$i]['content'] = $trans_type;
- }
- }
- else {
- $cust_header = $headers = $this->strip_value($cust_headers[$idx]);
- $mod = $this->strip_value($mods[$idx]);
- $mod_type = $this->strip_value($mod_types[$idx]);
-
- if (preg_match('/^not/', $operator))
- $this->form['tests'][$i]['not'] = true;
- $type = preg_replace('/^not/', '', $operator);
-
- if ($header == '...') {
- $headers = preg_split('/[\s,]+/', $cust_header, -1, PREG_SPLIT_NO_EMPTY);
-
- if (!count($headers))
- $this->errors['tests'][$i]['header'] = $this->gettext('cannotbeempty');
- else {
- foreach ($headers as $hr) {
- // RFC2822: printable ASCII except colon
- if (!preg_match('/^[\x21-\x39\x41-\x7E]+$/i', $hr)) {
- $this->errors['tests'][$i]['header'] = $this->gettext('forbiddenchars');
- }
- }
- }
-
- if (empty($this->errors['tests'][$i]['header']))
- $cust_header = (is_array($headers) && count($headers) == 1) ? $headers[0] : $headers;
- }
-
- if ($type == 'exists') {
- $this->form['tests'][$i]['test'] = 'exists';
- $this->form['tests'][$i]['arg'] = $header == '...' ? $cust_header : $header;
- }
- else {
- $test = 'header';
- $header = $header == '...' ? $cust_header : $header;
-
- if ($mod == 'address' || $mod == 'envelope') {
- $found = false;
- if (empty($this->errors['tests'][$i]['header'])) {
- foreach ((array)$header as $hdr) {
- if (!in_array(strtolower(trim($hdr)), $this->addr_headers))
- $found = true;
- }
- }
- if (!$found)
- $test = $mod;
- }
-
- $this->form['tests'][$i]['type'] = $type;
- $this->form['tests'][$i]['test'] = $test;
- $this->form['tests'][$i]['arg1'] = $header;
- $this->form['tests'][$i]['arg2'] = $target;
-
- if ($target == '')
- $this->errors['tests'][$i]['target'] = $this->gettext('cannotbeempty');
- else if (preg_match('/^(value|count)-/', $type) && !preg_match('/[0-9]+/', $target))
- $this->errors['tests'][$i]['target'] = $this->gettext('forbiddenchars');
-
- if ($mod) {
- $this->form['tests'][$i]['part'] = $mod_type;
- }
- }
- }
-
- if ($header != 'size' && $comparator) {
- if (preg_match('/^(value|count)/', $this->form['tests'][$i]['type']))
- $comparator = 'i;ascii-numeric';
-
- $this->form['tests'][$i]['comparator'] = $comparator;
- }
-
- $i++;
- }
- }
-
- $i = 0;
- // actions
- foreach($act_types as $idx => $type) {
- $type = $this->strip_value($type);
- $target = $this->strip_value($act_targets[$idx]);
-
- switch ($type) {
-
- case 'fileinto':
- case 'fileinto_copy':
- $mailbox = $this->strip_value($mailboxes[$idx], false, false);
- $this->form['actions'][$i]['target'] = $this->mod_mailbox($mailbox, 'in');
- if ($type == 'fileinto_copy') {
- $type = 'fileinto';
- $this->form['actions'][$i]['copy'] = true;
- }
- break;
-
- case 'reject':
- case 'ereject':
- $target = $this->strip_value($area_targets[$idx]);
- $this->form['actions'][$i]['target'] = str_replace("\r\n", "\n", $target);
-
- // if ($target == '')
-// $this->errors['actions'][$i]['targetarea'] = $this->gettext('cannotbeempty');
- break;
-
- case 'redirect':
- case 'redirect_copy':
- $this->form['actions'][$i]['target'] = $target;
-
- if ($this->form['actions'][$i]['target'] == '')
- $this->errors['actions'][$i]['target'] = $this->gettext('cannotbeempty');
- else if (!rcube_utils::check_email($this->form['actions'][$i]['target']))
- $this->errors['actions'][$i]['target'] = $this->gettext('noemailwarning');
-
- if ($type == 'redirect_copy') {
- $type = 'redirect';
- $this->form['actions'][$i]['copy'] = true;
- }
- break;
-
- case 'addflag':
- case 'setflag':
- case 'removeflag':
- $_target = array();
- if (empty($flags[$idx])) {
- $this->errors['actions'][$i]['target'] = $this->gettext('noflagset');
- }
- else {
- foreach ($flags[$idx] as $flag) {
- $_target[] = $this->strip_value($flag);
- }
- }
- $this->form['actions'][$i]['target'] = $_target;
- break;
-
- case 'vacation':
- $reason = $this->strip_value($reasons[$idx]);
- $interval_type = $interval_types[$idx] == 'seconds' ? 'seconds' : 'days';
- $this->form['actions'][$i]['reason'] = str_replace("\r\n", "\n", $reason);
- $this->form['actions'][$i]['subject'] = $subject[$idx];
- $this->form['actions'][$i]['addresses'] = explode(',', $addresses[$idx]);
- $this->form['actions'][$i][$interval_type] = $intervals[$idx];
-// @TODO: vacation :mime, :from, :handle
-
- if ($this->form['actions'][$i]['addresses']) {
- foreach($this->form['actions'][$i]['addresses'] as $aidx => $address) {
- $address = trim($address);
- if (!$address)
- unset($this->form['actions'][$i]['addresses'][$aidx]);
- else if(!rcube_utils::check_email($address)) {
- $this->errors['actions'][$i]['addresses'] = $this->gettext('noemailwarning');
- break;
- } else
- $this->form['actions'][$i]['addresses'][$aidx] = $address;
- }
- }
-
- if ($this->form['actions'][$i]['reason'] == '')
- $this->errors['actions'][$i]['reason'] = $this->gettext('cannotbeempty');
- if ($this->form['actions'][$i][$interval_type] && !preg_match('/^[0-9]+$/', $this->form['actions'][$i][$interval_type]))
- $this->errors['actions'][$i]['interval'] = $this->gettext('forbiddenchars');
- break;
-
- case 'set':
- $this->form['actions'][$i]['name'] = $varnames[$idx];
- $this->form['actions'][$i]['value'] = $varvalues[$idx];
- foreach ((array)$varmods[$idx] as $v_m) {
- $this->form['actions'][$i][$v_m] = true;
- }
-
- if (empty($varnames[$idx])) {
- $this->errors['actions'][$i]['name'] = $this->gettext('cannotbeempty');
- }
- else if (!preg_match('/^[0-9a-z_]+$/i', $varnames[$idx])) {
- $this->errors['actions'][$i]['name'] = $this->gettext('forbiddenchars');
- }
-
- if (!isset($varvalues[$idx]) || $varvalues[$idx] === '') {
- $this->errors['actions'][$i]['value'] = $this->gettext('cannotbeempty');
- }
- break;
-
- case 'notify':
- if (empty($notifyaddrs[$idx])) {
- $this->errors['actions'][$i]['address'] = $this->gettext('cannotbeempty');
- }
- else if (!rcube_utils::check_email($notifyaddrs[$idx])) {
- $this->errors['actions'][$i]['address'] = $this->gettext('noemailwarning');
- }
- if (!empty($notifyfrom[$idx]) && !rcube_utils::check_email($notifyfrom[$idx])) {
- $this->errors['actions'][$i]['from'] = $this->gettext('noemailwarning');
- }
- $this->form['actions'][$i]['address'] = $notifyaddrs[$idx];
- $this->form['actions'][$i]['body'] = $notifybodies[$idx];
- $this->form['actions'][$i]['message'] = $notifymessages[$idx];
- $this->form['actions'][$i]['from'] = $notifyfrom[$idx];
- $this->form['actions'][$i]['importance'] = $notifyimp[$idx];
- break;
- }
-
- $this->form['actions'][$i]['type'] = $type;
- $i++;
- }
-
- if (!$this->errors && !$error) {
- // zapis skryptu
- if (!isset($this->script[$fid])) {
- $fid = $this->sieve->script->add_rule($this->form);
- $new = true;
- } else
- $fid = $this->sieve->script->update_rule($fid, $this->form);
-
- if ($fid !== false)
- $save = $this->save_script();
-
- if ($save && $fid !== false) {
- $this->rc->output->show_message('managesieve.filtersaved', 'confirmation');
- if ($this->rc->task != 'mail') {
- $this->rc->output->command('parent.managesieve_updatelist',
- isset($new) ? 'add' : 'update',
- array(
- 'name' => rcube::Q($this->form['name']),
- 'id' => $fid,
- 'disabled' => $this->form['disabled']
- ));
- }
- else {
- $this->rc->output->command('managesieve_dialog_close');
- $this->rc->output->send('iframe');
- }
- }
- else {
- $this->rc->output->show_message('managesieve.filtersaveerror', 'error');
-// $this->rc->output->send();
- }
- }
- }
-
- $this->managesieve_send();
- }
-
- private function managesieve_send()
- {
- // Handle form action
- if (isset($_GET['_framed']) || isset($_POST['_framed'])) {
- if (isset($_GET['_newset']) || isset($_POST['_newset'])) {
- $this->rc->output->send('managesieve.setedit');
- }
- else {
- $this->rc->output->send('managesieve.filteredit');
- }
- } else {
- $this->rc->output->set_pagetitle($this->gettext('filters'));
- $this->rc->output->send('managesieve.managesieve');
- }
- }
-
- // return the filters list as HTML table
- function filters_list($attrib)
- {
- // add id to message list table if not specified
- if (!strlen($attrib['id']))
- $attrib['id'] = 'rcmfilterslist';
-
- // define list of cols to be displayed
- $a_show_cols = array('name');
-
- $result = $this->list_rules();
-
- // create XHTML table
- $out = $this->rc->table_output($attrib, $result, $a_show_cols, 'id');
-
- // set client env
- $this->rc->output->add_gui_object('filterslist', $attrib['id']);
- $this->rc->output->include_script('list.js');
-
- // add some labels to client
- $this->rc->output->add_label('managesieve.filterdeleteconfirm');
-
- return $out;
- }
-
- // return the filters list as <SELECT>
- function filtersets_list($attrib, $no_env = false)
- {
- // add id to message list table if not specified
- if (!strlen($attrib['id']))
- $attrib['id'] = 'rcmfiltersetslist';
-
- $list = $this->list_scripts();
-
- if ($list) {
- asort($list, SORT_LOCALE_STRING);
- }
-
- if (!empty($attrib['type']) && $attrib['type'] == 'list') {
- // define list of cols to be displayed
- $a_show_cols = array('name');
-
- if ($list) {
- foreach ($list as $idx => $set) {
- $scripts['S'.$idx] = $set;
- $result[] = array(
- 'name' => rcube::Q($set),
- 'id' => 'S'.$idx,
- 'class' => !in_array($set, $this->active) ? 'disabled' : '',
- );
- }
- }
-
- // create XHTML table
- $out = $this->rc->table_output($attrib, $result, $a_show_cols, 'id');
-
- $this->rc->output->set_env('filtersets', $scripts);
- $this->rc->output->include_script('list.js');
- }
- else {
- $select = new html_select(array('name' => '_set', 'id' => $attrib['id'],
- 'onchange' => $this->rc->task != 'mail' ? 'rcmail.managesieve_set()' : ''));
-
- if ($list) {
- foreach ($list as $set)
- $select->add($set, $set);
- }
-
- $out = $select->show($this->sieve->current);
- }
-
- // set client env
- if (!$no_env) {
- $this->rc->output->add_gui_object('filtersetslist', $attrib['id']);
- $this->rc->output->add_label('managesieve.setdeleteconfirm');
- }
-
- return $out;
- }
-
- function filter_frame($attrib)
- {
- if (!$attrib['id'])
- $attrib['id'] = 'rcmfilterframe';
-
- $attrib['name'] = $attrib['id'];
-
- $this->rc->output->set_env('contentframe', $attrib['name']);
- $this->rc->output->set_env('blankpage', $attrib['src'] ?
- $this->rc->output->abs_url($attrib['src']) : 'program/resources/blank.gif');
-
- return $this->rc->output->frame($attrib);
- }
-
- function filterset_form($attrib)
- {
- if (!$attrib['id'])
- $attrib['id'] = 'rcmfiltersetform';
-
- $out = '<form name="filtersetform" action="./" method="post" enctype="multipart/form-data">'."\n";
-
- $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $this->rc->task));
- $hiddenfields->add(array('name' => '_action', 'value' => 'plugin.managesieve-save'));
- $hiddenfields->add(array('name' => '_framed', 'value' => ($_POST['_framed'] || $_GET['_framed'] ? 1 : 0)));
- $hiddenfields->add(array('name' => '_newset', 'value' => 1));
-
- $out .= $hiddenfields->show();
-
- $name = rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST);
- $copy = rcube_utils::get_input_value('_copy', rcube_utils::INPUT_POST);
- $selected = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST);
-
- // filter set name input
- $input_name = new html_inputfield(array('name' => '_name', 'id' => '_name', 'size' => 30,
- 'class' => ($this->errors['name'] ? 'error' : '')));
-
- $out .= sprintf('<label for="%s"><b>%s:</b></label> %s<br /><br />',
- '_name', rcube::Q($this->gettext('filtersetname')), $input_name->show($name));
-
- $out .="\n<fieldset class=\"itemlist\"><legend>" . $this->gettext('filters') . ":</legend>\n";
- $out .= '<input type="radio" id="from_none" name="_from" value="none"'
- .(!$selected || $selected=='none' ? ' checked="checked"' : '').'></input>';
- $out .= sprintf('<label for="%s">%s</label> ', 'from_none', rcube::Q($this->gettext('none')));
-
- // filters set list
- $list = $this->list_scripts();
- $select = new html_select(array('name' => '_copy', 'id' => '_copy'));
-
- if (is_array($list)) {
- asort($list, SORT_LOCALE_STRING);
-
- if (!$copy)
- $copy = $_SESSION['managesieve_current'];
-
- foreach ($list as $set) {
- $select->add($set, $set);
- }
-
- $out .= '<br /><input type="radio" id="from_set" name="_from" value="set"'
- .($selected=='set' ? ' checked="checked"' : '').'></input>';
- $out .= sprintf('<label for="%s">%s:</label> ', 'from_set', rcube::Q($this->gettext('fromset')));
- $out .= $select->show($copy);
- }
-
- // script upload box
- $upload = new html_inputfield(array('name' => '_file', 'id' => '_file', 'size' => 30,
- 'type' => 'file', 'class' => ($this->errors['file'] ? 'error' : '')));
-
- $out .= '<br /><input type="radio" id="from_file" name="_from" value="file"'
- .($selected=='file' ? ' checked="checked"' : '').'></input>';
- $out .= sprintf('<label for="%s">%s:</label> ', 'from_file', rcube::Q($this->gettext('fromfile')));
- $out .= $upload->show();
- $out .= '</fieldset>';
-
- $this->rc->output->add_gui_object('sieveform', 'filtersetform');
-
- if ($this->errors['name'])
- $this->add_tip('_name', $this->errors['name'], true);
- if ($this->errors['file'])
- $this->add_tip('_file', $this->errors['file'], true);
-
- $this->print_tips();
-
- return $out;
- }
-
-
- function filter_form($attrib)
- {
- if (!$attrib['id'])
- $attrib['id'] = 'rcmfilterform';
-
- $fid = rcube_utils::get_input_value('_fid', rcube_utils::INPUT_GPC);
- $scr = isset($this->form) ? $this->form : $this->script[$fid];
-
- $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $this->rc->task));
- $hiddenfields->add(array('name' => '_action', 'value' => 'plugin.managesieve-save'));
- $hiddenfields->add(array('name' => '_framed', 'value' => ($_POST['_framed'] || $_GET['_framed'] ? 1 : 0)));
- $hiddenfields->add(array('name' => '_fid', 'value' => $fid));
-
- $out = '<form name="filterform" action="./" method="post">'."\n";
- $out .= $hiddenfields->show();
-
- // 'any' flag
- if (sizeof($scr['tests']) == 1 && $scr['tests'][0]['test'] == 'true' && !$scr['tests'][0]['not'])
- $any = true;
-
- // filter name input
- $field_id = '_name';
- $input_name = new html_inputfield(array('name' => '_name', 'id' => $field_id, 'size' => 30,
- 'class' => ($this->errors['name'] ? 'error' : '')));
-
- if ($this->errors['name'])
- $this->add_tip($field_id, $this->errors['name'], true);
-
- if (isset($scr))
- $input_name = $input_name->show($scr['name']);
- else
- $input_name = $input_name->show();
-
- $out .= sprintf("\n<label for=\"%s\"><b>%s:</b></label> %s\n",
- $field_id, rcube::Q($this->gettext('filtername')), $input_name);
-
- // filter set selector
- if ($this->rc->task == 'mail') {
- $out .= sprintf("\n&nbsp;<label for=\"%s\"><b>%s:</b></label> %s\n",
- $field_id, rcube::Q($this->gettext('filterset')),
- $this->filtersets_list(array('id' => 'sievescriptname'), true));
- }
-
- $out .= '<br /><br /><fieldset><legend>' . rcube::Q($this->gettext('messagesrules')) . "</legend>\n";
-
- // any, allof, anyof radio buttons
- $field_id = '_allof';
- $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'allof',
- 'onclick' => 'rule_join_radio(\'allof\')', 'class' => 'radio'));
-
- if (isset($scr) && !$any)
- $input_join = $input_join->show($scr['join'] ? 'allof' : '');
- else
- $input_join = $input_join->show();
-
- $out .= sprintf("%s<label for=\"%s\">%s</label>&nbsp;\n",
- $input_join, $field_id, rcube::Q($this->gettext('filterallof')));
-
- $field_id = '_anyof';
- $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'anyof',
- 'onclick' => 'rule_join_radio(\'anyof\')', 'class' => 'radio'));
-
- if (isset($scr) && !$any)
- $input_join = $input_join->show($scr['join'] ? '' : 'anyof');
- else
- $input_join = $input_join->show('anyof'); // default
-
- $out .= sprintf("%s<label for=\"%s\">%s</label>\n",
- $input_join, $field_id, rcube::Q($this->gettext('filteranyof')));
-
- $field_id = '_any';
- $input_join = new html_radiobutton(array('name' => '_join', 'id' => $field_id, 'value' => 'any',
- 'onclick' => 'rule_join_radio(\'any\')', 'class' => 'radio'));
-
- $input_join = $input_join->show($any ? 'any' : '');
-
- $out .= sprintf("%s<label for=\"%s\">%s</label>\n",
- $input_join, $field_id, rcube::Q($this->gettext('filterany')));
-
- $rows_num = isset($scr) ? sizeof($scr['tests']) : 1;
-
- $out .= '<div id="rules"'.($any ? ' style="display: none"' : '').'>';
- for ($x=0; $x<$rows_num; $x++)
- $out .= $this->rule_div($fid, $x);
- $out .= "</div>\n";
-
- $out .= "</fieldset>\n";
-
- // actions
- $out .= '<fieldset><legend>' . rcube::Q($this->gettext('messagesactions')) . "</legend>\n";
-
- $rows_num = isset($scr) ? sizeof($scr['actions']) : 1;
-
- $out .= '<div id="actions">';
- for ($x=0; $x<$rows_num; $x++)
- $out .= $this->action_div($fid, $x);
- $out .= "</div>\n";
-
- $out .= "</fieldset>\n";
-
- $this->print_tips();
-
- if ($scr['disabled']) {
- $this->rc->output->set_env('rule_disabled', true);
- }
- $this->rc->output->add_label(
- 'managesieve.ruledeleteconfirm',
- 'managesieve.actiondeleteconfirm'
- );
- $this->rc->output->add_gui_object('sieveform', 'filterform');
-
- return $out;
- }
-
- function rule_div($fid, $id, $div=true)
- {
- $rule = isset($this->form) ? $this->form['tests'][$id] : $this->script[$fid]['tests'][$id];
- $rows_num = isset($this->form) ? sizeof($this->form['tests']) : sizeof($this->script[$fid]['tests']);
-
- // headers select
- $select_header = new html_select(array('name' => "_header[]", 'id' => 'header'.$id,
- 'onchange' => 'rule_header_select(' .$id .')'));
- foreach($this->headers as $name => $val)
- $select_header->add(rcube::Q($this->gettext($name)), Q($val));
- if (in_array('body', $this->exts))
- $select_header->add(rcube::Q($this->gettext('body')), 'body');
- $select_header->add(rcube::Q($this->gettext('size')), 'size');
- $select_header->add(rcube::Q($this->gettext('...')), '...');
-
- // TODO: list arguments
- $aout = '';
-
- if ((isset($rule['test']) && in_array($rule['test'], array('header', 'address', 'envelope')))
- && !is_array($rule['arg1']) && in_array($rule['arg1'], $this->headers)
- ) {
- $aout .= $select_header->show($rule['arg1']);
- }
- else if ((isset($rule['test']) && $rule['test'] == 'exists')
- && !is_array($rule['arg']) && in_array($rule['arg'], $this->headers)
- ) {
- $aout .= $select_header->show($rule['arg']);
- }
- else if (isset($rule['test']) && $rule['test'] == 'size')
- $aout .= $select_header->show('size');
- else if (isset($rule['test']) && $rule['test'] == 'body')
- $aout .= $select_header->show('body');
- else if (isset($rule['test']) && $rule['test'] != 'true')
- $aout .= $select_header->show('...');
- else
- $aout .= $select_header->show();
-
- if (isset($rule['test']) && in_array($rule['test'], array('header', 'address', 'envelope'))) {
- if (is_array($rule['arg1']))
- $custom = implode(', ', $rule['arg1']);
- else if (!in_array($rule['arg1'], $this->headers))
- $custom = $rule['arg1'];
- }
- else if (isset($rule['test']) && $rule['test'] == 'exists') {
- if (is_array($rule['arg']))
- $custom = implode(', ', $rule['arg']);
- else if (!in_array($rule['arg'], $this->headers))
- $custom = $rule['arg'];
- }
-
- $tout = '<div id="custom_header' .$id. '" style="display:' .(isset($custom) ? 'inline' : 'none'). '">
- <input type="text" name="_custom_header[]" id="custom_header_i'.$id.'" '
- . $this->error_class($id, 'test', 'header', 'custom_header_i')
- .' value="' .rcube::Q($custom). '" size="15" />&nbsp;</div>' . "\n";
-
- // matching type select (operator)
- $select_op = new html_select(array('name' => "_rule_op[]", 'id' => 'rule_op'.$id,
- 'style' => 'display:' .($rule['test']!='size' ? 'inline' : 'none'),
- 'class' => 'operator_selector',
- 'onchange' => 'rule_op_select('.$id.')'));
- $select_op->add(rcube::Q($this->gettext('filtercontains')), 'contains');
- $select_op->add(rcube::Q($this->gettext('filternotcontains')), 'notcontains');
- $select_op->add(rcube::Q($this->gettext('filteris')), 'is');
- $select_op->add(rcube::Q($this->gettext('filterisnot')), 'notis');
- $select_op->add(rcube::Q($this->gettext('filterexists')), 'exists');
- $select_op->add(rcube::Q($this->gettext('filternotexists')), 'notexists');
- $select_op->add(rcube::Q($this->gettext('filtermatches')), 'matches');
- $select_op->add(rcube::Q($this->gettext('filternotmatches')), 'notmatches');
- if (in_array('regex', $this->exts)) {
- $select_op->add(rcube::Q($this->gettext('filterregex')), 'regex');
- $select_op->add(rcube::Q($this->gettext('filternotregex')), 'notregex');
- }
- if (in_array('relational', $this->exts)) {
- $select_op->add(rcube::Q($this->gettext('countisgreaterthan')), 'count-gt');
- $select_op->add(rcube::Q($this->gettext('countisgreaterthanequal')), 'count-ge');
- $select_op->add(rcube::Q($this->gettext('countislessthan')), 'count-lt');
- $select_op->add(rcube::Q($this->gettext('countislessthanequal')), 'count-le');
- $select_op->add(rcube::Q($this->gettext('countequals')), 'count-eq');
- $select_op->add(rcube::Q($this->gettext('countnotequals')), 'count-ne');
- $select_op->add(rcube::Q($this->gettext('valueisgreaterthan')), 'value-gt');
- $select_op->add(rcube::Q($this->gettext('valueisgreaterthanequal')), 'value-ge');
- $select_op->add(rcube::Q($this->gettext('valueislessthan')), 'value-lt');
- $select_op->add(rcube::Q($this->gettext('valueislessthanequal')), 'value-le');
- $select_op->add(rcube::Q($this->gettext('valueequals')), 'value-eq');
- $select_op->add(rcube::Q($this->gettext('valuenotequals')), 'value-ne');
- }
-
- // target input (TODO: lists)
-
- if (in_array($rule['test'], array('header', 'address', 'envelope'))) {
- $test = ($rule['not'] ? 'not' : '').($rule['type'] ? $rule['type'] : 'is');
- $target = $rule['arg2'];
- }
- else if ($rule['test'] == 'body') {
- $test = ($rule['not'] ? 'not' : '').($rule['type'] ? $rule['type'] : 'is');
- $target = $rule['arg'];
- }
- else if ($rule['test'] == 'size') {
- $test = '';
- $target = '';
- if (preg_match('/^([0-9]+)(K|M|G)?$/', $rule['arg'], $matches)) {
- $sizetarget = $matches[1];
- $sizeitem = $matches[2];
- }
- else {
- $sizetarget = $rule['arg'];
- $sizeitem = $rule['item'];
- }
- }
- else {
- $test = ($rule['not'] ? 'not' : '').$rule['test'];
- $target = '';
- }
-
- $tout .= $select_op->show($test);
- $tout .= '<input type="text" name="_rule_target[]" id="rule_target' .$id. '"
- value="' .rcube::Q($target). '" size="20" ' . $this->error_class($id, 'test', 'target', 'rule_target')
- . ' style="display:' . ($rule['test']!='size' && $rule['test'] != 'exists' ? 'inline' : 'none') . '" />'."\n";
-
- $select_size_op = new html_select(array('name' => "_rule_size_op[]", 'id' => 'rule_size_op'.$id));
- $select_size_op->add(rcube::Q($this->gettext('filterover')), 'over');
- $select_size_op->add(rcube::Q($this->gettext('filterunder')), 'under');
-
- $tout .= '<div id="rule_size' .$id. '" style="display:' . ($rule['test']=='size' ? 'inline' : 'none') .'">';
- $tout .= $select_size_op->show($rule['test']=='size' ? $rule['type'] : '');
- $tout .= '<input type="text" name="_rule_size_target[]" id="rule_size_i'.$id.'" value="'.$sizetarget.'" size="10" '
- . $this->error_class($id, 'test', 'sizetarget', 'rule_size_i') .' />
- <label><input type="radio" name="_rule_size_item['.$id.']" value=""'
- . (!$sizeitem ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('B').'</label>
- <label><input type="radio" name="_rule_size_item['.$id.']" value="K"'
- . ($sizeitem=='K' ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('KB').'</label>
- <label><input type="radio" name="_rule_size_item['.$id.']" value="M"'
- . ($sizeitem=='M' ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('MB').'</label>
- <label><input type="radio" name="_rule_size_item['.$id.']" value="G"'
- . ($sizeitem=='G' ? ' checked="checked"' : '') .' class="radio" />'.$this->rc->gettext('GB').'</label>';
- $tout .= '</div>';
-
- // Advanced modifiers (address, envelope)
- $select_mod = new html_select(array('name' => "_rule_mod[]", 'id' => 'rule_mod_op'.$id,
- 'onchange' => 'rule_mod_select(' .$id .')'));
- $select_mod->add(rcube::Q($this->gettext('none')), '');
- $select_mod->add(rcube::Q($this->gettext('address')), 'address');
- if (in_array('envelope', $this->exts))
- $select_mod->add(rcube::Q($this->gettext('envelope')), 'envelope');
-
- $select_type = new html_select(array('name' => "_rule_mod_type[]", 'id' => 'rule_mod_type'.$id));
- $select_type->add(rcube::Q($this->gettext('allparts')), 'all');
- $select_type->add(rcube::Q($this->gettext('domain')), 'domain');
- $select_type->add(rcube::Q($this->gettext('localpart')), 'localpart');
- if (in_array('subaddress', $this->exts)) {
- $select_type->add(rcube::Q($this->gettext('user')), 'user');
- $select_type->add(rcube::Q($this->gettext('detail')), 'detail');
- }
-
- $need_mod = $rule['test'] != 'size' && $rule['test'] != 'body';
- $mout = '<div id="rule_mod' .$id. '" class="adv" style="display:' . ($need_mod ? 'block' : 'none') .'">';
- $mout .= ' <span>';
- $mout .= rcube::Q($this->gettext('modifier')) . ' ';
- $mout .= $select_mod->show($rule['test']);
- $mout .= '</span>';
- $mout .= ' <span id="rule_mod_type' . $id . '"';
- $mout .= ' style="display:' . (in_array($rule['test'], array('address', 'envelope')) ? 'inline' : 'none') .'">';
- $mout .= rcube::Q($this->gettext('modtype')) . ' ';
- $mout .= $select_type->show($rule['part']);
- $mout .= '</span>';
- $mout .= '</div>';
-
- // Advanced modifiers (body transformations)
- $select_mod = new html_select(array('name' => "_rule_trans[]", 'id' => 'rule_trans_op'.$id,
- 'onchange' => 'rule_trans_select(' .$id .')'));
- $select_mod->add(rcube::Q($this->gettext('text')), 'text');
- $select_mod->add(rcube::Q($this->gettext('undecoded')), 'raw');
- $select_mod->add(rcube::Q($this->gettext('contenttype')), 'content');
-
- $mout .= '<div id="rule_trans' .$id. '" class="adv" style="display:' . ($rule['test'] == 'body' ? 'block' : 'none') .'">';
- $mout .= ' <span>';
- $mout .= rcube::Q($this->gettext('modifier')) . ' ';
- $mout .= $select_mod->show($rule['part']);
- $mout .= '<input type="text" name="_rule_trans_type[]" id="rule_trans_type'.$id
- . '" value="'.(is_array($rule['content']) ? implode(',', $rule['content']) : $rule['content'])
- .'" size="20" style="display:' . ($rule['part'] == 'content' ? 'inline' : 'none') .'"'
- . $this->error_class($id, 'test', 'part', 'rule_trans_type') .' />';
- $mout .= '</span>';
- $mout .= '</div>';
-
- // Advanced modifiers (body transformations)
- $select_comp = new html_select(array('name' => "_rule_comp[]", 'id' => 'rule_comp_op'.$id));
- $select_comp->add(rcube::Q($this->gettext('default')), '');
- $select_comp->add(rcube::Q($this->gettext('octet')), 'i;octet');
- $select_comp->add(rcube::Q($this->gettext('asciicasemap')), 'i;ascii-casemap');
- if (in_array('comparator-i;ascii-numeric', $this->exts)) {
- $select_comp->add(rcube::Q($this->gettext('asciinumeric')), 'i;ascii-numeric');
- }
-
- $mout .= '<div id="rule_comp' .$id. '" class="adv" style="display:' . ($rule['test'] != 'size' ? 'block' : 'none') .'">';
- $mout .= ' <span>';
- $mout .= rcube::Q($this->gettext('comparator')) . ' ';
- $mout .= $select_comp->show($rule['comparator']);
- $mout .= '</span>';
- $mout .= '</div>';
-
- // Build output table
- $out = $div ? '<div class="rulerow" id="rulerow' .$id .'">'."\n" : '';
- $out .= '<table><tr>';
- $out .= '<td class="advbutton">';
- $out .= '<a href="#" id="ruleadv' . $id .'" title="'. rcube::Q($this->gettext('advancedopts')). '"
- onclick="rule_adv_switch(' . $id .', this)" class="show">&nbsp;&nbsp;</a>';
- $out .= '</td>';
- $out .= '<td class="rowactions">' . $aout . '</td>';
- $out .= '<td class="rowtargets">' . $tout . "\n";
- $out .= '<div id="rule_advanced' .$id. '" style="display:none">' . $mout . '</div>';
- $out .= '</td>';
-
- // add/del buttons
- $out .= '<td class="rowbuttons">';
- $out .= '<a href="#" id="ruleadd' . $id .'" title="'. rcube::Q($this->gettext('add')). '"
- onclick="rcmail.managesieve_ruleadd(' . $id .')" class="button add"></a>';
- $out .= '<a href="#" id="ruledel' . $id .'" title="'. rcube::Q($this->gettext('del')). '"
- onclick="rcmail.managesieve_ruledel(' . $id .')" class="button del' . ($rows_num<2 ? ' disabled' : '') .'"></a>';
- $out .= '</td>';
- $out .= '</tr></table>';
-
- $out .= $div ? "</div>\n" : '';
-
- return $out;
- }
-
- function action_div($fid, $id, $div=true)
- {
- $action = isset($this->form) ? $this->form['actions'][$id] : $this->script[$fid]['actions'][$id];
- $rows_num = isset($this->form) ? sizeof($this->form['actions']) : sizeof($this->script[$fid]['actions']);
-
- $out = $div ? '<div class="actionrow" id="actionrow' .$id .'">'."\n" : '';
-
- $out .= '<table><tr><td class="rowactions">';
-
- // action select
- $select_action = new html_select(array('name' => "_action_type[$id]", 'id' => 'action_type'.$id,
- 'onchange' => 'action_type_select(' .$id .')'));
- if (in_array('fileinto', $this->exts))
- $select_action->add(rcube::Q($this->gettext('messagemoveto')), 'fileinto');
- if (in_array('fileinto', $this->exts) && in_array('copy', $this->exts))
- $select_action->add(rcube::Q($this->gettext('messagecopyto')), 'fileinto_copy');
- $select_action->add(rcube::Q($this->gettext('messageredirect')), 'redirect');
- if (in_array('copy', $this->exts))
- $select_action->add(rcube::Q($this->gettext('messagesendcopy')), 'redirect_copy');
- if (in_array('reject', $this->exts))
- $select_action->add(rcube::Q($this->gettext('messagediscard')), 'reject');
- else if (in_array('ereject', $this->exts))
- $select_action->add(rcube::Q($this->gettext('messagediscard')), 'ereject');
- if (in_array('vacation', $this->exts))
- $select_action->add(rcube::Q($this->gettext('messagereply')), 'vacation');
- $select_action->add(rcube::Q($this->gettext('messagedelete')), 'discard');
- if (in_array('imapflags', $this->exts) || in_array('imap4flags', $this->exts)) {
- $select_action->add(rcube::Q($this->gettext('setflags')), 'setflag');
- $select_action->add(rcube::Q($this->gettext('addflags')), 'addflag');
- $select_action->add(rcube::Q($this->gettext('removeflags')), 'removeflag');
- }
- if (in_array('variables', $this->exts)) {
- $select_action->add(rcube::Q($this->gettext('setvariable')), 'set');
- }
- if (in_array('enotify', $this->exts) || in_array('notify', $this->exts)) {
- $select_action->add(rcube::Q($this->gettext('notify')), 'notify');
- }
- $select_action->add(rcube::Q($this->gettext('rulestop')), 'stop');
-
- $select_type = $action['type'];
- if (in_array($action['type'], array('fileinto', 'redirect')) && $action['copy']) {
- $select_type .= '_copy';
- }
-
- $out .= $select_action->show($select_type);
- $out .= '</td>';
-
- // actions target inputs
- $out .= '<td class="rowtargets">';
- // shared targets
- $out .= '<input type="text" name="_action_target['.$id.']" id="action_target' .$id. '" '
- .'value="' .($action['type']=='redirect' ? rcube::Q($action['target'], 'strict', false) : ''). '" size="35" '
- .'style="display:' .($action['type']=='redirect' ? 'inline' : 'none') .'" '
- . $this->error_class($id, 'action', 'target', 'action_target') .' />';
- $out .= '<textarea name="_action_target_area['.$id.']" id="action_target_area' .$id. '" '
- .'rows="3" cols="35" '. $this->error_class($id, 'action', 'targetarea', 'action_target_area')
- .'style="display:' .(in_array($action['type'], array('reject', 'ereject')) ? 'inline' : 'none') .'">'
- . (in_array($action['type'], array('reject', 'ereject')) ? rcube::Q($action['target'], 'strict', false) : '')
- . "</textarea>\n";
-
- // vacation
- $vsec = in_array('vacation-seconds', $this->exts);
- $out .= '<div id="action_vacation' .$id.'" style="display:' .($action['type']=='vacation' ? 'inline' : 'none') .'">';
- $out .= '<span class="label">'. rcube::Q($this->gettext('vacationreason')) .'</span><br />'
- .'<textarea name="_action_reason['.$id.']" id="action_reason' .$id. '" '
- .'rows="3" cols="35" '. $this->error_class($id, 'action', 'reason', 'action_reason') . '>'
- . Q($action['reason'], 'strict', false) . "</textarea>\n";
- $out .= '<br /><span class="label">' .rcube::Q($this->gettext('vacationsubject')) . '</span><br />'
- .'<input type="text" name="_action_subject['.$id.']" id="action_subject'.$id.'" '
- .'value="' . (is_array($action['subject']) ? rcube::Q(implode(', ', $action['subject']), 'strict', false) : $action['subject']) . '" size="35" '
- . $this->error_class($id, 'action', 'subject', 'action_subject') .' />';
- $out .= '<br /><span class="label">' .rcube::Q($this->gettext('vacationaddresses')) . '</span><br />'
- .'<input type="text" name="_action_addresses['.$id.']" id="action_addr'.$id.'" '
- .'value="' . (is_array($action['addresses']) ? rcube::Q(implode(', ', $action['addresses']), 'strict', false) : $action['addresses']) . '" size="35" '
- . $this->error_class($id, 'action', 'addresses', 'action_addr') .' />';
- $out .= '<br /><span class="label">' . rcube::Q($this->gettext($vsec ? 'vacationinterval' : 'vacationdays')) . '</span><br />'
- .'<input type="text" name="_action_interval['.$id.']" id="action_interval'.$id.'" '
- .'value="' .rcube::Q(isset($action['seconds']) ? $action['seconds'] : $action['days'], 'strict', false) . '" size="2" '
- . $this->error_class($id, 'action', 'interval', 'action_interval') .' />';
- if ($vsec) {
- $out .= '&nbsp;<label><input type="radio" name="_action_interval_type['.$id.']" value="days"'
- . (!isset($action['seconds']) ? ' checked="checked"' : '') .' class="radio" />'.$this->gettext('days').'</label>'
- . '&nbsp;<label><input type="radio" name="_action_interval_type['.$id.']" value="seconds"'
- . (isset($action['seconds']) ? ' checked="checked"' : '') .' class="radio" />'.$this->gettext('seconds').'</label>';
- }
- $out .= '</div>';
-
- // flags
- $flags = array(
- 'read' => '\\Seen',
- 'answered' => '\\Answered',
- 'flagged' => '\\Flagged',
- 'deleted' => '\\Deleted',
- 'draft' => '\\Draft',
- );
- $flags_target = (array)$action['target'];
-
- $out .= '<div id="action_flags' .$id.'" style="display:'
- . (preg_match('/^(set|add|remove)flag$/', $action['type']) ? 'inline' : 'none') . '"'
- . $this->error_class($id, 'action', 'flags', 'action_flags') . '>';
- foreach ($flags as $fidx => $flag) {
- $out .= '<input type="checkbox" name="_action_flags[' .$id .'][]" value="' . $flag . '"'
- . (in_array_nocase($flag, $flags_target) ? 'checked="checked"' : '') . ' />'
- . rcube::Q($this->gettext('flag'.$fidx)) .'<br>';
- }
- $out .= '</div>';
-
- // set variable
- $set_modifiers = array(
- 'lower',
- 'upper',
- 'lowerfirst',
- 'upperfirst',
- 'quotewildcard',
- 'length'
- );
-
- $out .= '<div id="action_set' .$id.'" style="display:' .($action['type']=='set' ? 'inline' : 'none') .'">';
- $out .= '<span class="label">' .rcube::Q($this->gettext('setvarname')) . '</span><br />'
- .'<input type="text" name="_action_varname['.$id.']" id="action_varname'.$id.'" '
- .'value="' . rcube::Q($action['name']) . '" size="35" '
- . $this->error_class($id, 'action', 'name', 'action_varname') .' />';
- $out .= '<br /><span class="label">' .rcube::Q($this->gettext('setvarvalue')) . '</span><br />'
- .'<input type="text" name="_action_varvalue['.$id.']" id="action_varvalue'.$id.'" '
- .'value="' . rcube::Q($action['value']) . '" size="35" '
- . $this->error_class($id, 'action', 'value', 'action_varvalue') .' />';
- $out .= '<br /><span class="label">' .rcube::Q($this->gettext('setvarmodifiers')) . '</span><br />';
- foreach ($set_modifiers as $j => $s_m) {
- $s_m_id = 'action_varmods' . $id . $s_m;
- $out .= sprintf('<input type="checkbox" name="_action_varmods[%s][]" value="%s" id="%s"%s />%s<br>',
- $id, $s_m, $s_m_id,
- (array_key_exists($s_m, (array)$action) && $action[$s_m] ? ' checked="checked"' : ''),
- rcube::Q($this->gettext('var' . $s_m)));
- }
- $out .= '</div>';
-
- // notify
- // skip :options tag - not used by the mailto method
- $out .= '<div id="action_notify' .$id.'" style="display:' .($action['type']=='notify' ? 'inline' : 'none') .'">';
- $out .= '<span class="label">' .rcube::Q($this->gettext('notifyaddress')) . '</span><br />'
- .'<input type="text" name="_action_notifyaddress['.$id.']" id="action_notifyaddress'.$id.'" '
- .'value="' . rcube::Q($action['address']) . '" size="35" '
- . $this->error_class($id, 'action', 'address', 'action_notifyaddress') .' />';
- $out .= '<br /><span class="label">'. rcube::Q($this->gettext('notifybody')) .'</span><br />'
- .'<textarea name="_action_notifybody['.$id.']" id="action_notifybody' .$id. '" '
- .'rows="3" cols="35" '. $this->error_class($id, 'action', 'method', 'action_notifybody') . '>'
- . rcube::Q($action['body'], 'strict', false) . "</textarea>\n";
- $out .= '<br /><span class="label">' .rcube::Q($this->gettext('notifysubject')) . '</span><br />'
- .'<input type="text" name="_action_notifymessage['.$id.']" id="action_notifymessage'.$id.'" '
- .'value="' . rcube::Q($action['message']) . '" size="35" '
- . $this->error_class($id, 'action', 'message', 'action_notifymessage') .' />';
- $out .= '<br /><span class="label">' .rcube::Q($this->gettext('notifyfrom')) . '</span><br />'
- .'<input type="text" name="_action_notifyfrom['.$id.']" id="action_notifyfrom'.$id.'" '
- .'value="' . rcube::Q($action['from']) . '" size="35" '
- . $this->error_class($id, 'action', 'from', 'action_notifyfrom') .' />';
- $importance_options = array(
- 3 => 'notifyimportancelow',
- 2 => 'notifyimportancenormal',
- 1 => 'notifyimportancehigh'
- );
- $select_importance = new html_select(array(
- 'name' => '_action_notifyimportance[' . $id . ']',
- 'id' => '_action_notifyimportance' . $id,
- 'class' => $this->error_class($id, 'action', 'importance', 'action_notifyimportance')));
- foreach ($importance_options as $io_v => $io_n) {
- $select_importance->add(rcube::Q($this->gettext($io_n)), $io_v);
- }
- $out .= '<br /><span class="label">' . rcube::Q($this->gettext('notifyimportance')) . '</span><br />';
- $out .= $select_importance->show($action['importance'] ? $action['importance'] : 2);
- $out .= '</div>';
-
- // mailbox select
- if ($action['type'] == 'fileinto')
- $mailbox = $this->mod_mailbox($action['target'], 'out');
- else
- $mailbox = '';
-
- $select = $this->rc->folder_selector(array(
- 'realnames' => false,
- 'maxlength' => 100,
- 'id' => 'action_mailbox' . $id,
- 'name' => "_action_mailbox[$id]",
- 'style' => 'display:'.(!isset($action) || $action['type']=='fileinto' ? 'inline' : 'none')
- ));
- $out .= $select->show($mailbox);
- $out .= '</td>';
-
- // add/del buttons
- $out .= '<td class="rowbuttons">';
- $out .= '<a href="#" id="actionadd' . $id .'" title="'. rcube::Q($this->gettext('add')). '"
- onclick="rcmail.managesieve_actionadd(' . $id .')" class="button add"></a>';
- $out .= '<a href="#" id="actiondel' . $id .'" title="'. rcube::Q($this->gettext('del')). '"
- onclick="rcmail.managesieve_actiondel(' . $id .')" class="button del' . ($rows_num<2 ? ' disabled' : '') .'"></a>';
- $out .= '</td>';
-
- $out .= '</tr></table>';
-
- $out .= $div ? "</div>\n" : '';
-
- return $out;
- }
-
- private function genid()
- {
- return preg_replace('/[^0-9]/', '', microtime(true));
- }
-
- private function strip_value($str, $allow_html = false, $trim = true)
- {
- if (!$allow_html) {
- $str = strip_tags($str);
- }
-
- return $trim ? trim($str) : $str;
- }
-
- private function error_class($id, $type, $target, $elem_prefix='')
- {
- // TODO: tooltips
- if (($type == 'test' && ($str = $this->errors['tests'][$id][$target])) ||
- ($type == 'action' && ($str = $this->errors['actions'][$id][$target]))
- ) {
- $this->add_tip($elem_prefix.$id, $str, true);
- return ' class="error"';
- }
-
- return '';
- }
-
- private function add_tip($id, $str, $error=false)
- {
- if ($error)
- $str = html::span('sieve error', $str);
-
- $this->tips[] = array($id, $str);
- }
-
- private function print_tips()
- {
- if (empty($this->tips))
- return;
-
- $script = rcmail_output::JS_OBJECT_NAME.'.managesieve_tip_register('.json_encode($this->tips).');';
- $this->rc->output->add_script($script, 'foot');
- }
-
- /**
- * Converts mailbox name from/to UTF7-IMAP from/to internal Sieve encoding
- * with delimiter replacement.
- *
- * @param string $mailbox Mailbox name
- * @param string $mode Conversion direction ('in'|'out')
- *
- * @return string Mailbox name
- */
- private function mod_mailbox($mailbox, $mode = 'out')
- {
- $delimiter = $_SESSION['imap_delimiter'];
- $replace_delimiter = $this->rc->config->get('managesieve_replace_delimiter');
- $mbox_encoding = $this->rc->config->get('managesieve_mbox_encoding', 'UTF7-IMAP');
-
- if ($mode == 'out') {
- $mailbox = rcube_charset::convert($mailbox, $mbox_encoding, 'UTF7-IMAP');
- if ($replace_delimiter && $replace_delimiter != $delimiter)
- $mailbox = str_replace($replace_delimiter, $delimiter, $mailbox);
- }
- else {
- $mailbox = rcube_charset::convert($mailbox, 'UTF7-IMAP', $mbox_encoding);
- if ($replace_delimiter && $replace_delimiter != $delimiter)
- $mailbox = str_replace($delimiter, $replace_delimiter, $mailbox);
- }
-
- return $mailbox;
- }
-
- /**
- * List sieve scripts
- *
- * @return array Scripts list
- */
- public function list_scripts()
- {
- if ($this->list !== null) {
- return $this->list;
- }
-
- $this->list = $this->sieve->get_scripts();
-
- // Handle active script(s) and list of scripts according to Kolab's KEP:14
- if ($this->rc->config->get('managesieve_kolab_master')) {
-
- // Skip protected names
- foreach ((array)$this->list as $idx => $name) {
- $_name = strtoupper($name);
- if ($_name == 'MASTER')
- $master_script = $name;
- else if ($_name == 'MANAGEMENT')
- $management_script = $name;
- else if($_name == 'USER')
- $user_script = $name;
- else
- continue;
-
- unset($this->list[$idx]);
- }
-
- // get active script(s), read USER script
- if ($user_script) {
- $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
- $filename_regex = '/'.preg_quote($extension, '/').'$/';
- $_SESSION['managesieve_user_script'] = $user_script;
-
- $this->sieve->load($user_script);
-
- foreach ($this->sieve->script->as_array() as $rules) {
- foreach ($rules['actions'] as $action) {
- if ($action['type'] == 'include' && empty($action['global'])) {
- $name = preg_replace($filename_regex, '', $action['target']);
- $this->active[] = $name;
- }
- }
- }
- }
- // create USER script if it doesn't exist
- else {
- $content = "# USER Management Script\n"
- ."#\n"
- ."# This script includes the various active sieve scripts\n"
- ."# it is AUTOMATICALLY GENERATED. DO NOT EDIT MANUALLY!\n"
- ."#\n"
- ."# For more information, see http://wiki.kolab.org/KEP:14#USER\n"
- ."#\n";
- if ($this->sieve->save_script('USER', $content)) {
- $_SESSION['managesieve_user_script'] = 'USER';
- if (empty($this->master_file))
- $this->sieve->activate('USER');
- }
- }
- }
- else if (!empty($this->list)) {
- // Get active script name
- if ($active = $this->sieve->get_active()) {
- $this->active = array($active);
- }
-
- // Hide scripts from config
- $exceptions = $this->rc->config->get('managesieve_filename_exceptions');
- if (!empty($exceptions)) {
- $this->list = array_diff($this->list, (array)$exceptions);
- }
- }
-
- return $this->list;
- }
-
- /**
- * Removes sieve script
- *
- * @param string $name Script name
- *
- * @return bool True on success, False on failure
- */
- public function remove_script($name)
- {
- $result = $this->sieve->remove($name);
-
- // Kolab's KEP:14
- if ($result && $this->rc->config->get('managesieve_kolab_master')) {
- $this->deactivate_script($name);
- }
-
- return $result;
+ $engine = $this->get_engine();
+ $engine->save();
}
/**
- * Activates sieve script
- *
- * @param string $name Script name
- *
- * @return bool True on success, False on failure
+ * Initializes engine object
*/
- public function activate_script($name)
+ private function get_engine()
{
- // Kolab's KEP:14
- if ($this->rc->config->get('managesieve_kolab_master')) {
- $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
- $user_script = $_SESSION['managesieve_user_script'];
-
- // if the script is not active...
- if ($user_script && ($key = array_search($name, $this->active)) === false) {
- // ...rewrite USER file adding appropriate include command
- if ($this->sieve->load($user_script)) {
- $script = $this->sieve->script->as_array();
- $list = array();
- $regexp = '/' . preg_quote($extension, '/') . '$/';
-
- // Create new include entry
- $rule = array(
- 'actions' => array(
- 0 => array(
- 'target' => $name.$extension,
- 'type' => 'include',
- 'personal' => true,
- )));
+ if (!$this->engine) {
+ $this->load_config();
- // get all active scripts for sorting
- foreach ($script as $rid => $rules) {
- foreach ($rules['actions'] as $aid => $action) {
- if ($action['type'] == 'include' && empty($action['global'])) {
- $target = $extension ? preg_replace($regexp, '', $action['target']) : $action['target'];
- $list[] = $target;
- }
- }
- }
- $list[] = $name;
-
- // Sort and find current script position
- asort($list, SORT_LOCALE_STRING);
- $list = array_values($list);
- $index = array_search($name, $list);
-
- // add rule at the end of the script
- if ($index === false || $index == count($list)-1) {
- $this->sieve->script->add_rule($rule);
- }
- // add rule at index position
- else {
- $script2 = array();
- foreach ($script as $rid => $rules) {
- if ($rid == $index) {
- $script2[] = $rule;
- }
- $script2[] = $rules;
- }
- $this->sieve->script->content = $script2;
- }
-
- $result = $this->sieve->save();
- if ($result) {
- $this->active[] = $name;
- }
- }
- }
- }
- else {
- $result = $this->sieve->activate($name);
- if ($result)
- $this->active = array($name);
- }
+ // Add include path for internal classes
+ $include_path = $this->home . '/lib' . PATH_SEPARATOR;
+ $include_path .= ini_get('include_path');
+ set_include_path($include_path);
- return $result;
- }
-
- /**
- * Deactivates sieve script
- *
- * @param string $name Script name
- *
- * @return bool True on success, False on failure
- */
- public function deactivate_script($name)
- {
- // Kolab's KEP:14
- if ($this->rc->config->get('managesieve_kolab_master')) {
- $extension = $this->rc->config->get('managesieve_filename_extension', '.sieve');
- $user_script = $_SESSION['managesieve_user_script'];
-
- // if the script is active...
- if ($user_script && ($key = array_search($name, $this->active)) !== false) {
- // ...rewrite USER file removing appropriate include command
- if ($this->sieve->load($user_script)) {
- $script = $this->sieve->script->as_array();
- $name = $name.$extension;
-
- foreach ($script as $rid => $rules) {
- foreach ($rules['actions'] as $aid => $action) {
- if ($action['type'] == 'include' && empty($action['global'])
- && $action['target'] == $name
- ) {
- break 2;
- }
- }
- }
-
- // Entry found
- if ($rid < count($script)) {
- $this->sieve->script->delete_rule($rid);
- $result = $this->sieve->save();
- if ($result) {
- unset($this->active[$key]);
- }
- }
- }
- }
- }
- else {
- $result = $this->sieve->deactivate();
- if ($result)
- $this->active = array();
- }
-
- return $result;
- }
-
- /**
- * Saves current script (adding some variables)
- */
- public function save_script($name = null)
- {
- // Kolab's KEP:14
- if ($this->rc->config->get('managesieve_kolab_master')) {
- $this->sieve->script->set_var('EDITOR', self::PROGNAME);
- $this->sieve->script->set_var('EDITOR_VERSION', self::VERSION);
- }
-
- return $this->sieve->save($name);
- }
-
- /**
- * Returns list of rules from the current script
- *
- * @return array List of rules
- */
- public function list_rules()
- {
- $result = array();
- $i = 1;
-
- foreach ($this->script as $idx => $filter) {
- if ($filter['type'] != 'if') {
- continue;
- }
- $fname = $filter['name'] ? $filter['name'] : "#$i";
- $result[] = array(
- 'id' => $idx,
- 'name' => rcube::Q($fname),
- 'class' => $filter['disabled'] ? 'disabled' : '',
- );
- $i++;
+ $this->engine = new rcube_sieve_engine($this);
}
- return $result;
+ return $this->engine;
}
}
diff --git a/plugins/managesieve/package.xml b/plugins/managesieve/package.xml
index a0c38b82d..9c02957a5 100644
--- a/plugins/managesieve/package.xml
+++ b/plugins/managesieve/package.xml
@@ -26,7 +26,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -93,6 +93,7 @@
<file name="skins/classic/images/add.png" role="data"></file>
<file name="skins/classic/images/del.png" role="data"></file>
<file name="skins/classic/images/down_small.gif" role="data"></file>
+ <file name="skins/classic/images/erase.png" role="data"></file>
<file name="skins/classic/images/filter.png" role="data"></file>
<file name="skins/classic/images/up_small.gif" role="data"></file>
<file name="skins/larry/managesieve.css" role="data"></file>
@@ -103,10 +104,11 @@
<file name="skins/larry/images/add.png" role="data"></file>
<file name="skins/larry/images/del.png" role="data"></file>
<file name="skins/larry/images/down_small.gif" role="data"></file>
+ <file name="skins/larry/images/erase.png" role="data"></file>
<file name="skins/larry/images/up_small.gif" role="data"></file>
- <file name="managesieve.php" role="php"></file>
- <file name="lib/rcube_sieve.php" role="php"></file>
- <file name="lib/rcube_sieve_script.php" role="php"></file>
+ <file name="lib/Roundcube/rcube_sieve.php" role="php"></file>
+ <file name="lib/Roundcube/rcube_sieve_engine.php" role="php"></file>
+ <file name="lib/Roundcube/rcube_sieve_script.php" role="php"></file>
<file name="lib/Net/Sieve.php" role="php"></file>
<file name="config.inc.php.dist" role="data"></file>
</dir>
diff --git a/plugins/managesieve/skins/classic/images/erase.png b/plugins/managesieve/skins/classic/images/erase.png
new file mode 100644
index 000000000..ddd3a9782
--- /dev/null
+++ b/plugins/managesieve/skins/classic/images/erase.png
Binary files differ
diff --git a/plugins/managesieve/skins/classic/managesieve.css b/plugins/managesieve/skins/classic/managesieve.css
index 86a0d197d..59d88cb46 100644
--- a/plugins/managesieve/skins/classic/managesieve.css
+++ b/plugins/managesieve/skins/classic/managesieve.css
@@ -201,11 +201,30 @@ td.rowtargets
padding-top: 2px;
}
+td.rowtargets > div
+{
+ vertical-align: top;
+ margin-top: 2px;
+}
+
td.rowtargets div.adv
{
padding-top: 3px;
}
+td.rowtargets div.adv span.label
+{
+ display: inline-block;
+ padding-right: 10px;
+ min-width: 65px;
+}
+
+html.mozilla #filter-form select
+{
+ padding-top: 3px;
+ padding-bottom: 3px;
+}
+
input.disabled, input.disabled:hover
{
color: #999999;
@@ -226,6 +245,7 @@ input.radio
select.operator_selector
{
width: 200px;
+ vertical-align: top;
}
td.rowtargets span,
@@ -306,8 +326,78 @@ a.button.disabled
#filter-form textarea
{
font-size: 11px;
+ vertical-align: middle;
+}
+
+/* smart multi-row input field */
+.listarea
+{
+ border: 1px solid #666;
+ margin: 0;
+ padding: 1px;
+ display: inline-block;
+ max-height: 67px;
+ overflow-y: auto;
+}
+
+td.rowtargets > span.listarea
+{
+ vertical-align: top;
+ margin-top: 2px;
+}
+
+.listelement
+{
+ display: block;
+ white-space: nowrap;
+ background-color: #fff;
+ border-top: 1px solid #e2e2e2;
+ height: 16px;
+ padding: 0;
+ margin: 0;
+ overflow: hidden;
+ line-height: 16px;
}
+.listarea.error .listelement
+{
+ background-color: #FFFFC4;
+}
+
+.listelement:first-child
+{
+ border-top: none;
+}
+
+#filter-form .listelement input
+{
+ border: none;
+ border-radius: 0;
+ box-shadow: none;
+ outline: none;
+ vertical-align: top;
+ height: 16px;
+ padding-top: 0;
+ padding-bottom: 0;
+ line-height: 16px;
+ background-color: transparent;
+}
+
+.listelement input:focus
+{
+ box-shadow: none;
+}
+
+.listelement .reset
+{
+ display: inline-block;
+ width: 16px;
+ height: 16px;
+ background: url(images/erase.png) -1px 0 no-repeat #eee;
+ cursor: pointer;
+}
+
+
/* fixes for popup window */
body.iframe.mail
diff --git a/plugins/managesieve/skins/classic/templates/managesieve.html b/plugins/managesieve/skins/classic/templates/managesieve.html
index 71eebe105..869e3ac36 100644
--- a/plugins/managesieve/skins/classic/templates/managesieve.html
+++ b/plugins/managesieve/skins/classic/templates/managesieve.html
@@ -19,7 +19,7 @@
</style>
</head>
-<body onload="rcube_init_mail_ui()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -83,5 +83,9 @@
</ul>
</div>
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/plugins/managesieve/skins/larry/images/erase.png b/plugins/managesieve/skins/larry/images/erase.png
new file mode 100644
index 000000000..ddd3a9782
--- /dev/null
+++ b/plugins/managesieve/skins/larry/images/erase.png
Binary files differ
diff --git a/plugins/managesieve/skins/larry/managesieve.css b/plugins/managesieve/skins/larry/managesieve.css
index 099f05f0d..2144fe13f 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,
@@ -175,9 +175,23 @@ 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
@@ -205,6 +219,7 @@ input.radio
select.operator_selector
{
width: 200px;
+ vertical-align: top;
}
td.rowtargets span,
@@ -290,6 +305,13 @@ 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 */
@@ -306,6 +328,80 @@ 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 385c8890d..366515b06 100644
--- a/plugins/managesieve/tests/src/parser.out
+++ b/plugins/managesieve/tests/src/parser.out
@@ -1,4 +1,4 @@
-require ["fileinto","reject","envelope"];
+require ["envelope","fileinto","reject"];
# rule:[spam]
if header :contains "X-DSPAM-Result" "Spam"
{
diff --git a/plugins/managesieve/tests/src/parser_date b/plugins/managesieve/tests/src/parser_date
new file mode 100644
index 000000000..06b00333f
--- /dev/null
+++ b/plugins/managesieve/tests/src/parser_date
@@ -0,0 +1,21 @@
+require ["comparator-i;ascii-numeric","date","fileinto","relational"];
+# rule:[date]
+if allof (date :originalzone :value "ge" :comparator "i;ascii-numeric" "date" "hour" "09")
+{
+ fileinto "urgent";
+}
+# rule:[date-weekday]
+if date :is "received" "weekday" "0"
+{
+ fileinto "weekend";
+}
+# rule:[date-zone]
+if date :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00"
+{
+ stop;
+}
+# rule:[currentdate]
+if anyof (currentdate :is "weekday" "0", currentdate :value "lt" :comparator "i;ascii-numeric" "hour" "09", currentdate :value "ge" :comparator "i;ascii-numeric" "date" "2007-06-30")
+{
+ stop;
+}
diff --git a/plugins/managesieve/tests/src/parser_enotify_b b/plugins/managesieve/tests/src/parser_enotify_b
index 8854658f4..9a17eaf0c 100644
--- a/plugins/managesieve/tests/src/parser_enotify_b
+++ b/plugins/managesieve/tests/src/parser_enotify_b
@@ -1,4 +1,4 @@
-require ["envelope","variables","enotify"];
+require ["enotify","envelope","variables"];
# rule:[from]
if envelope :all :matches "from" "*"
{
diff --git a/plugins/managesieve/tests/src/parser_index b/plugins/managesieve/tests/src/parser_index
new file mode 100644
index 000000000..78aba9a55
--- /dev/null
+++ b/plugins/managesieve/tests/src/parser_index
@@ -0,0 +1,24 @@
+require ["comparator-i;ascii-numeric","date","fileinto","index","relational"];
+# rule:[index-header1]
+if header :index 1 :last :contains "X-DSPAM-Result" "Spam"
+{
+ fileinto "Spam";
+ stop;
+}
+# rule:[index-header2]
+if header :index 2 :contains ["From","To"] "test@domain.tld"
+{
+ discard;
+ stop;
+}
+# rule:[index-address]
+if address :index 1 :all :is "From" "nagios@domain.tld"
+{
+ fileinto "domain.tld";
+ stop;
+}
+# rule:[index-date]
+if date :index 1 :last :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00"
+{
+ stop;
+}
diff --git a/plugins/managesieve/tests/src/parser_notify_b b/plugins/managesieve/tests/src/parser_notify_b
index cf80a9701..9a3ca803c 100644
--- a/plugins/managesieve/tests/src/parser_notify_b
+++ b/plugins/managesieve/tests/src/parser_notify_b
@@ -1,4 +1,4 @@
-require ["envelope","variables","notify"];
+require ["envelope","notify","variables"];
# rule:[from]
if envelope :all :matches "from" "*"
{
diff --git a/plugins/managesieve/tests/src/parser_relational b/plugins/managesieve/tests/src/parser_relational
index 0a92fde54..92c5e1a8e 100644
--- a/plugins/managesieve/tests/src/parser_relational
+++ b/plugins/managesieve/tests/src/parser_relational
@@ -1,4 +1,4 @@
-require ["relational","comparator-i;ascii-numeric"];
+require ["comparator-i;ascii-numeric","relational"];
# 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 f106b796e..e44555096 100644
--- a/plugins/managesieve/tests/src/parser_subaddress
+++ b/plugins/managesieve/tests/src/parser_subaddress
@@ -1,4 +1,4 @@
-require ["envelope","subaddress","fileinto"];
+require ["envelope","fileinto","subaddress"];
if envelope :user "To" "postmaster"
{
fileinto "postmaster";
diff --git a/plugins/markasjunk/localization/el_GR.inc b/plugins/markasjunk/localization/el_GR.inc
index 78cfaf060..fb16a29ce 100644
--- a/plugins/markasjunk/localization/el_GR.inc
+++ b/plugins/markasjunk/localization/el_GR.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['buttontext'] = 'Junk';
+$labels['buttontext'] = 'Ανεπιθύμητα';
$labels['buttontitle'] = 'Σήμανση ως Ανεπιθύμητου';
$labels['reportedasjunk'] = 'Αναφέρθηκε ως Ανεπιθήμητο';
diff --git a/plugins/markasjunk/localization/gl_ES.inc b/plugins/markasjunk/localization/gl_ES.inc
index dd0c0ad40..d2a9e98b7 100644
--- a/plugins/markasjunk/localization/gl_ES.inc
+++ b/plugins/markasjunk/localization/gl_ES.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['buttontext'] = 'Junk';
+$labels['buttontext'] = 'Correo lixo';
$labels['buttontitle'] = 'Marcar como correo lixo';
$labels['reportedasjunk'] = 'Mensaxe marcada como correo lixo';
diff --git a/plugins/markasjunk/localization/lb_LU.inc b/plugins/markasjunk/localization/lb_LU.inc
new file mode 100644
index 000000000..eb211d66c
--- /dev/null
+++ b/plugins/markasjunk/localization/lb_LU.inc
@@ -0,0 +1,24 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/markasjunk/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Mark-As-Junk plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/
+*/
+
+$labels = 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 f0ea921ba..5389ae399 100644
--- a/plugins/markasjunk/localization/lv_LV.inc
+++ b/plugins/markasjunk/localization/lv_LV.inc
@@ -17,8 +17,8 @@
*/
$labels = array();
-$labels['buttontext'] = 'Junk';
-$labels['buttontitle'] = 'Iezīmēt kā mēstuli';
-$labels['reportedasjunk'] = 'Sekmīgi iezīmēta kā mēstule';
+$labels['buttontext'] = 'Mēstules';
+$labels['buttontitle'] = 'Atzīmēt kā mēstuli';
+$labels['reportedasjunk'] = 'Sekmīgi iatzīmēta kā mēstule';
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ko_KR.inc b/plugins/new_user_dialog/localization/ko_KR.inc
index 82240f37d..d9b519475 100644
--- a/plugins/new_user_dialog/localization/ko_KR.inc
+++ b/plugins/new_user_dialog/localization/ko_KR.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['identitydialogtitle'] = '수신자의 신원을 채우기 바랍니다.';
-$labels['identitydialoghint'] = '이 박스는 최초로 로그인할 때만 나타납니다.';
+$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
new file mode 100644
index 000000000..36da96e5e
--- /dev/null
+++ b/plugins/new_user_dialog/localization/lb_LU.inc
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
+*/
+
+$labels = 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 2e3642330..0447d995a 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 nosūtītāja identifikācijas informāciju';
-$labels['identitydialoghint'] = 'Šis logs parādīsies tikai pirmajā pieteikšanās reizē';
+$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ē.';
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/nl_NL.inc b/plugins/new_user_dialog/localization/nl_NL.inc
index 4d5d41185..c5d392f98 100644
--- a/plugins/new_user_dialog/localization/nl_NL.inc
+++ b/plugins/new_user_dialog/localization/nl_NL.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['identitydialogtitle'] = 'Vul uw correcte identiteitgegevens in a.u.b.';
-$labels['identitydialoghint'] = 'Dit scherm verschijnt enkel bij uw eerste login.';
+$labels['identitydialogtitle'] = 'Vul alstublieft uw afzendergegevens in.';
+$labels['identitydialoghint'] = 'Dit scherm verschijnt eenmalig bij uw eerste aanmelding.';
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/zh_CN.inc b/plugins/new_user_dialog/localization/zh_CN.inc
index 99b2de701..ca40173af 100644
--- a/plugins/new_user_dialog/localization/zh_CN.inc
+++ b/plugins/new_user_dialog/localization/zh_CN.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['identitydialogtitle'] = '请填写发送者标识';
+$labels['identitydialogtitle'] = '请填写发送人身份';
$labels['identitydialoghint'] = '本提示仅在第一次登录时显示。';
?> \ 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 871384e47..39a707638 100644
--- a/plugins/new_user_dialog/new_user_dialog.php
+++ b/plugins/new_user_dialog/new_user_dialog.php
@@ -10,10 +10,12 @@
* @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()
{
@@ -32,8 +34,9 @@ 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;
+ }
}
/**
@@ -86,7 +89,6 @@ class new_user_dialog extends rcube_plugin
'id' => 'newuserdialog',
'action' => $rcmail->url('plugin.newusersave'),
'method' => 'post'),
- html::tag('h3', null, rcube::Q($this->gettext('identitydialogtitle'))) .
html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) .
$table->show() .
html::p(array('class' => 'formbuttons'),
@@ -94,12 +96,23 @@ class new_user_dialog extends rcube_plugin
'class' => 'button mainaction', 'value' => $this->gettext('save'))))
));
+ $title = rcube::JQ($this->gettext('identitydialogtitle'));
+
// disable keyboard events for messages list (#1486726)
- $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();
+ $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'); }
", 'docready');
$this->include_stylesheet('newuserdialog.css');
@@ -107,16 +120,16 @@ class new_user_dialog extends rcube_plugin
}
/**
- * Handler for submitted form
+ * Handler for submitted form (ajax request)
*
* 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();
- $identities_level = intval($rcmail->config->get('identities_level', 0));
+ $rcmail = rcmail::get_instance();
+ $identity = $rcmail->user->get_identity();
+ $ident_level = intval($rcmail->config->get('identities_level', 0));
$save_data = array(
'name' => rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST),
@@ -126,20 +139,26 @@ class new_user_dialog extends rcube_plugin
);
// don't let the user alter the e-mail address if disabled by config
- if ($identities_level == 1 || $identities_level == 3)
+ if (in_array($ident_level, array(1,3,4))) {
$save_data['email'] = $identity['email'];
- else
- $save_data['email'] = rcube_utils::idn_to_ascii($save_data['email']);
+ }
- // save data if not empty
- if (!empty($save_data['name']) && !empty($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
$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->redirect('');
+ $rcmail->output->send();
}
}
-
-?>
diff --git a/plugins/new_user_dialog/package.xml b/plugins/new_user_dialog/package.xml
index 0bca1d9d4..68a929931 100644
--- a/plugins/new_user_dialog/package.xml
+++ b/plugins/new_user_dialog/package.xml
@@ -13,21 +13,16 @@
<email>roundcube@gmail.com</email>
<active>yes</active>
</lead>
- <date>2012-01-16</date>
- <time>17:00</time>
+ <date>2013-05-09</date>
<version>
- <release>1.5</release>
- <api>1.0</api>
+ <release>2.0</release>
+ <api>2.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
- <notes>
-- Use jquery UI to render the dialog
-- Fixed IDNA encoding/decoding of e-mail addresses (#1487909)
- </notes>
<contents>
<dir baseinstalldir="/" name="/">
<file name="new_user_dialog.php" role="php">
@@ -71,84 +66,4 @@
</required>
</dependencies>
<phprelease/>
- <changelog>
- <release>
- <date>2010-03-29</date>
- <time>13:20:00</time>
- <version>
- <release>1.0</release>
- <api>1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes></notes>
- </release>
- <release>
- <date>2010-05-13</date>
- <time>19:35:00</time>
- <version>
- <release>1.1</release>
- <api>1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes>
-- Fix space bar and backspace buttons not working (#1486726)
- </notes>
- </release>
- <release>
- <date>2010-05-27</date>
- <time>12:00:00</time>
- <version>
- <release>1.2</release>
- <api>1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes>
-- Add overlay box only to mail task main template
-- Fix possible error on form submission (#1486103)
- </notes>
- </release>
- <release>
- <date>2010-12-02</date>
- <time>12:00:00</time>
- <version>
- <release>1.3</release>
- <api>1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes>
-- Added setting of focus on name input
-- Added gl_ES translation
- </notes>
- </release>
- <release>
- <date>2012-01-16</date>
- <time>17:00:00</time>
- <version>
- <release>1.5</release>
- <api>1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes>- Use jquery UI to render the dialog</notes>
- </release>
- </changelog>
</package>
diff --git a/plugins/new_user_identity/new_user_identity.php b/plugins/new_user_identity/new_user_identity.php
index f98145b6c..bb0821a53 100644
--- a/plugins/new_user_identity/new_user_identity.php
+++ b/plugins/new_user_identity/new_user_identity.php
@@ -8,6 +8,7 @@
*
* @version @package_version@
* @author Kris Steinhoff
+ * @license GNU GPLv3+
*
* Example configuration:
*
@@ -33,8 +34,6 @@ 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) {
diff --git a/plugins/new_user_identity/package.xml b/plugins/new_user_identity/package.xml
index e50cd9255..45a3c4c8d 100644
--- a/plugins/new_user_identity/package.xml
+++ b/plugins/new_user_identity/package.xml
@@ -24,7 +24,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/newmail_notifier/localization/gl_ES.inc b/plugins/newmail_notifier/localization/gl_ES.inc
index 6c1129b31..8d105531e 100644
--- a/plugins/newmail_notifier/localization/gl_ES.inc
+++ b/plugins/newmail_notifier/localization/gl_ES.inc
@@ -16,14 +16,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/
*/
-$labels['basic'] = 'Display browser notifications on new message';
-$labels['desktop'] = 'Display desktop notifications on new message';
-$labels['sound'] = 'Play the sound on new message';
+$labels['basic'] = 'Amosar notificacións no navegador cando entre unha mensaxe nova';
+$labels['desktop'] = 'Amosar notificacións no escritorio cando chegue unha mensaxe nova';
+$labels['sound'] = 'Tocar un son cando chegue unha mensaxe nova';
$labels['test'] = 'Proba';
$labels['title'] = 'Novo Correo!';
-$labels['body'] = 'You\'ve received a new message.';
-$labels['testbody'] = 'This is a test notification.';
-$labels['desktopdisabled'] = 'Desktop notifications are disabled in your browser.';
+$labels['body'] = 'Recibiu unha mensaxe nova';
+$labels['testbody'] = 'Esta é unha notificación de proba';
+$labels['desktopdisabled'] = 'As notificacións de escritorio están desactivadas no seu navegador';
$labels['desktopunsupported'] = 'O teu navegador non soporta notificacións de escritorio.';
?>
diff --git a/plugins/newmail_notifier/localization/lb_LU.inc b/plugins/newmail_notifier/localization/lb_LU.inc
new file mode 100644
index 000000000..c4b014819
--- /dev/null
+++ b/plugins/newmail_notifier/localization/lb_LU.inc
@@ -0,0 +1,29 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/newmail_notifier/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New Mail Notifier plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/
+*/
+
+$labels['basic'] = 'Browser-Notifikatioun bei neiem Message uweisen';
+$labels['desktop'] = 'Desktop-Notifikatioun bei neiem Message uweisen';
+$labels['sound'] = 'Dësen Toun bei neiem Message spillen';
+$labels['test'] = 'Test';
+$labels['title'] = 'Nei E-Mail!';
+$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.';
+
+?>
diff --git a/plugins/newmail_notifier/localization/lv_LV.inc b/plugins/newmail_notifier/localization/lv_LV.inc
index 9df738b25..da9603cd5 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'] = '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['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['testbody'] = 'Šis ir testa paziņojums.';
-$labels['desktopdisabled'] = 'Darbvirsmas paziņojumi ir atslēgti Jūsu pārlūkprogrammā.';
-$labels['desktopunsupported'] = 'Jūsu pārlūkprogramma neatbalsta darbvirsmas paziņojumus.';
+$labels['desktopdisabled'] = 'Darbavirsmas paziņojumi Jūsu pārlūkprogrammā ir atslēgti.';
+$labels['desktopunsupported'] = 'Jūsu pārlūkprogramma neatbalsta darbavirsmas paziņojumus.';
?>
diff --git a/plugins/newmail_notifier/localization/nl_NL.inc b/plugins/newmail_notifier/localization/nl_NL.inc
index e18a6ff2d..01f97e4ce 100644
--- a/plugins/newmail_notifier/localization/nl_NL.inc
+++ b/plugins/newmail_notifier/localization/nl_NL.inc
@@ -16,14 +16,14 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/
*/
-$labels['basic'] = 'Toon browsermelding bij nieuw bericht';
-$labels['desktop'] = 'Toon desktopmelding bij nieuw bericht';
-$labels['sound'] = 'Speel geluid bij nieuw bericht';
+$labels['basic'] = 'Toon melding in browser bij nieuw bericht';
+$labels['desktop'] = 'Toon melding op bureaublad bij nieuw bericht';
+$labels['sound'] = 'Geluid afspelen bij nieuw bericht';
$labels['test'] = 'Test';
$labels['title'] = 'Nieuwe e-mail!';
$labels['body'] = 'U heeft een nieuw bericht ontvangen.';
$labels['testbody'] = 'Dit is een testmelding.';
-$labels['desktopdisabled'] = 'Desktopmeldingen zijn uitgeschakeld in uw browser.';
-$labels['desktopunsupported'] = 'Uw browser ondersteunt geen desktopmeldingen.';
+$labels['desktopdisabled'] = 'Bureaubladmeldingen zijn uitgeschakeld in uw browser.';
+$labels['desktopunsupported'] = 'Uw browser ondersteunt geen bureaubladmeldingen.';
?>
diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js
index 7c9b55ded..c398424b6 100644
--- a/plugins/newmail_notifier/newmail_notifier.js
+++ b/plugins/newmail_notifier/newmail_notifier.js
@@ -34,6 +34,13 @@ function newmail_notifier_stop(prop)
$('<link rel="shortcut icon" href="'+rcmail.env.favicon_href+'"/>').replaceAll('link[rel="shortcut icon"]');
rcmail.env.favicon_href = null;
}
+
+ // 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
@@ -49,6 +56,13 @@ function newmail_notifier_basic()
rcmail.env.favicon_href = oldlink.attr('href');
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
@@ -69,44 +83,79 @@ function newmail_notifier_sound()
}
}
-// Desktop notification (need Chrome or Firefox with a plugin)
+// Desktop notification
+// - Require Chrome or Firefox latest version (22+) / 21.0 or older with a plugin
function newmail_notifier_desktop(body)
{
- 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();
+
+/**
+ * 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;
}
- 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 dn = window.webkitNotifications,
- txt = rcmail.gettext('testbody', 'newmail_notifier');
+ var txt = rcmail.gettext('testbody', 'newmail_notifier');
- if (dn) {
- if (!dn.checkPermission())
- newmail_notifier_desktop(txt);
+ // 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');
+ });
+ }
else
- dn.requestPermission(function() {
- if (!newmail_notifier_desktop(txt))
- rcmail.display_message(rcmail.gettext('desktopdisabled', 'newmail_notifier'), 'error');
- });
+ // Everything fails, means the browser has no support
+ rcmail.display_message(rcmail.gettext('desktopunsupported', 'newmail_notifier'), 'error');
}
- else
- rcmail.display_message(rcmail.gettext('desktopunsupported', 'newmail_notifier'), 'error');
}
function newmail_notifier_test_basic()
@@ -118,3 +167,12 @@ 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 61f7bdbaa..ca1c2ff67 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 version 2
- * as published by the Free Software Foundation.
+ * 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, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
*/
class newmail_notifier extends rcube_plugin
diff --git a/plugins/newmail_notifier/overlay.ico b/plugins/newmail_notifier/overlay.ico
new file mode 100644
index 000000000..17eb61a05
--- /dev/null
+++ b/plugins/newmail_notifier/overlay.ico
Binary files differ
diff --git a/plugins/newmail_notifier/package.xml b/plugins/newmail_notifier/package.xml
index ea0fcd9c1..b8ef34933 100644
--- a/plugins/newmail_notifier/package.xml
+++ b/plugins/newmail_notifier/package.xml
@@ -28,7 +28,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/password/README b/plugins/password/README
index 25af8cbcd..af70156a6 100644
--- a/plugins/password/README
+++ b/plugins/password/README
@@ -1,31 +1,29 @@
-----------------------------------------------------------------------
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 version 2
- as published by the Free Software Foundation.
+ 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
+ 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.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
@version @package_version@
- @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
+ @author Aleksander Machniak <alec@alec.pl>
@author <see driver files for driver authors>
-----------------------------------------------------------------------
- 1. Configuration
- 2. Drivers
+ 1. Configuration
+ 2. Drivers
2.1. Database (sql)
2.2. Cyrus/SASL (sasl)
2.3. Poppassd/Courierpassd (poppassd)
@@ -44,7 +42,7 @@
2.16. DBMail (dbmail)
2.17. Expect (expect)
2.18. Samba (smb)
- 3. Driver API
+ 3. Driver API
1. Configuration
@@ -65,40 +63,40 @@
-------------------
You can specify which database to connect by 'password_db_dsn' option and
- what SQL query to execute by 'password_query'. See main.inc.php.dist file for
+ what SQL query to execute by 'password_query'. See config.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:
@@ -142,7 +140,7 @@
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.
@@ -150,13 +148,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:
@@ -192,8 +190,12 @@
2.6. cPanel (cpanel)
--------------------
- You can specify parameters for HTTP connection to cPanel's admin
- interface. See config.inc.php.dist file for more info.
+ 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.
2.7. XIMSS/Communigate (ximms)
diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist
index 16e3737d6..9256829aa 100644
--- a/plugins/password/config.inc.php.dist
+++ b/plugins/password/config.inc.php.dist
@@ -31,6 +31,10 @@ $rcmail_config['password_login_exceptions'] = null;
//$rcmail_config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
$rcmail_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.
+$rcmail_config['password_force_save'] = false;
+
// SQL Driver options
// ------------------
@@ -265,13 +269,7 @@ $rcmail_config['password_cpanel_username'] = 'username';
$rcmail_config['password_cpanel_password'] = 'password';
// The cPanel port to use
-$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';
+$rcmail_config['password_cpanel_port'] = 2087;
// XIMSS (Communigate server) Driver options
diff --git a/plugins/password/drivers/cpanel.php b/plugins/password/drivers/cpanel.php
index 79887109b..b71c33ec1 100644
--- a/plugins/password/drivers/cpanel.php
+++ b/plugins/password/drivers/cpanel.php
@@ -4,95 +4,43 @@
* cPanel Password Driver
*
* Driver that adds functionality to change the users cPanel password.
- * The cPanel PHP API code has been taken from: http://www.phpclasses.org/browse/package/3534.html
+ * Originally written by Fulvio Venturelli <fulvio@venturelli.org>
*
- * This driver has been tested with Hostmonster hosting and seems to work fine.
+ * 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
*
- * @version 2.0
- * @author Fulvio Venturelli <fulvio@venturelli.org>
+ * This driver has been tested with o2switch hosting and seems to work fine.
+ *
+ * @version 3.0
+ * @author Christian Chech <christian@chech.fr>
*/
class rcube_cpanel_password
{
public function save($curpas, $newpass)
{
+ require_once 'xmlapi.php';
+
$rcmail = rcmail::get_instance();
- // 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'] );
+ $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);
- if ($cPanel->setPassword($newpass)) {
+ if ($this->setPassword($_SESSION['username'], $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
@@ -101,16 +49,24 @@ class emailAccount
* @param string $password email account password
* @return bool
*/
- function setPassword($password)
+ function setPassword($address, $password)
{
- $data['email'] = $this->email;
- $data['domain'] = $this->domain;
+ if (strpos($address, '@')) {
+ list($data['email'], $data['domain']) = explode('@', $address);
+ }
+ else {
+ list($data['email'], $data['domain']) = array($address, '');
+ }
+
$data['password'] = $password;
- $response = $this->HTTP->getData('mail/dopasswdpop.html', $data);
- if (strpos($response, 'success') && !strpos($response, 'failure')) {
+ $query = $this->xmlapi->api2_query($this->cuser, 'Email', 'passwdpop', $data);
+ $query = json_decode($query, true);
+
+ if ($query['cpanelresult']['data'][0]['result'] == 1) {
return true;
}
+
return false;
}
}
diff --git a/plugins/password/drivers/directadmin.php b/plugins/password/drivers/directadmin.php
index 8bf0dc613..44ecea406 100644
--- a/plugins/password/drivers/directadmin.php
+++ b/plugins/password/drivers/directadmin.php
@@ -297,7 +297,6 @@ 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/pam.php b/plugins/password/drivers/pam.php
index 8cd94c737..4d0ba1656 100644
--- a/plugins/password/drivers/pam.php
+++ b/plugins/password/drivers/pam.php
@@ -11,7 +11,8 @@ class rcube_pam_password
{
function save($currpass, $newpass)
{
- $user = $_SESSION['username'];
+ $user = $_SESSION['username'];
+ $error = '';
if (extension_loaded('pam') || extension_loaded('pam_auth')) {
if (pam_auth($user, $currpass, $error, false)) {
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index e02bff146..7a51dfe44 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -34,8 +34,9 @@ class rcube_sql_password
$db = $rcmail->get_dbh();
}
- if ($err = $db->is_error())
+ if ($db->is_error()) {
return PASSWORD_ERROR;
+ }
// crypted password
if (strpos($sql, '%c') !== FALSE) {
@@ -183,8 +184,8 @@ class rcube_sql_password
$res = $db->query($sql, $sql_vars);
if (!$db->is_error()) {
- if (strtolower(substr(trim($query),0,6))=='select') {
- if ($result = $db->fetch_array($res))
+ if (strtolower(substr(trim($sql),0,6)) == 'select') {
+ if ($db->fetch_array($res))
return PASSWORD_SUCCESS;
} else {
// This is the good case: 1 row updated
diff --git a/plugins/password/drivers/xmail.php b/plugins/password/drivers/xmail.php
index 37abc3001..59e467c5b 100644
--- a/plugins/password/drivers/xmail.php
+++ b/plugins/password/drivers/xmail.php
@@ -67,7 +67,7 @@ class XMail {
function send($msg)
{
socket_write($this->socket,$msg);
- if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
+ if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
return false;
}
return true;
@@ -85,7 +85,7 @@ class XMail {
return false;
}
- if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
+ if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") {
socket_close($this->socket);
return false;
}
diff --git a/plugins/password/localization/gl_ES.inc b/plugins/password/localization/gl_ES.inc
index 245d1c634..93c505a6a 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 contrasinals non coinciden. Por favor, inténteo de novo.';
+$messages['passwordinconsistency'] = 'Os contrasinais non cadran. Por favor, inténteo outra vez.';
$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
new file mode 100644
index 000000000..9962aed28
--- /dev/null
+++ b/plugins/password/localization/lb_LU.inc
@@ -0,0 +1,37 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/password/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Password plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/
+*/
+
+$labels = 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.';
+$messages['passwordinconsistency'] = 'D\'Passwierder passen net, probéier wann ech gelift nach eng Kéier.';
+$messages['crypterror'] = 'Passwuert konnt net gespäichert ginn. Verschlësselungs-Funktioun feelt.';
+$messages['connecterror'] = 'Passwuert konnt net gespäichert ginn. Connectiouns-Feeler.';
+$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 650d31b2c..ac0e5da79 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'] = 'Vēlreiz jauno paroli:';
+$labels['confpasswd'] = 'Apstiprināt 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 nepareiza.';
+$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['passwordinconsistency'] = 'Paroles nesakrīt. Lūdzu, ievadiet vēlreiz.';
-$messages['crypterror'] = 'Nevarēja saglabāt jauno paroli. Trūkst kriptēšanas funkcija.';
+$messages['crypterror'] = 'Nevarēja saglabāt jauno paroli. Trūkst kriptēšanas funkcijas.';
$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 simbola garai.';
-$messages['passwordweak'] = 'Jaunajai parolei jāsatur vismaz viens cipars un punktuācijas simbols.';
-$messages['passwordforbidden'] = 'Password contains forbidden characters.';
+$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.';
?>
diff --git a/plugins/password/localization/nl_NL.inc b/plugins/password/localization/nl_NL.inc
index c2c4599bc..e5b634602 100644
--- a/plugins/password/localization/nl_NL.inc
+++ b/plugins/password/localization/nl_NL.inc
@@ -17,21 +17,21 @@
*/
$labels = array();
-$labels['changepasswd'] = 'Wijzig Wachtwoord';
-$labels['curpasswd'] = 'Huidig Wachtwoord:';
-$labels['newpasswd'] = 'Nieuw Wachtwoord:';
-$labels['confpasswd'] = 'Bevestig Nieuw Wachtwoord:';
+$labels['changepasswd'] = 'Wachtwoord wijzigen';
+$labels['curpasswd'] = 'Huidig wachtwoord:';
+$labels['newpasswd'] = 'Nieuw wachtwoord:';
+$labels['confpasswd'] = 'Bevestig nieuw wachtwoord:';
$messages = array();
-$messages['nopassword'] = 'Vul een wachtwoord in.';
-$messages['nocurpassword'] = 'vul het huidige wachtwoord in.';
+$messages['nopassword'] = 'Vul uw nieuwe wachtwoord in.';
+$messages['nocurpassword'] = 'Vul uw huidige wachtwoord in.';
$messages['passwordincorrect'] = 'Huidig wachtwoord is onjuist.';
$messages['passwordinconsistency'] = 'Wachtwoorden komen niet overeen, probeer het opnieuw.';
-$messages['crypterror'] = 'De server mist een functie om uw wachtwoord et beveiligen.';
-$messages['connecterror'] = 'Kan het nieuwe wachtwoord niet opslaan. Verbindingsfout.';
-$messages['internalerror'] = 'Uw wachtwoord kan niet worden opgeslagen.';
+$messages['crypterror'] = 'Nieuwe wachtwoord kan niet opgeslagen worden; de server mist een versleutelfunctie.';
+$messages['connecterror'] = 'Nieuwe wachtwoord kan niet opgeslagen worden; verbindingsfout.';
+$messages['internalerror'] = 'Uw nieuwe wachtwoord kan niet worden opgeslagen.';
$messages['passwordshort'] = 'Het wachtwoord moet minimaal $length tekens lang zijn.';
-$messages['passwordweak'] = 'Het wachtwoord moet minimaal één nummer en één leesteken bevatten.';
+$messages['passwordweak'] = 'Het wachtwoord moet minimaal één cijfer en één leesteken bevatten.';
$messages['passwordforbidden'] = 'Het wachtwoord bevat tekens die niet toegestaan zijn.';
?>
diff --git a/plugins/password/localization/zh_CN.inc b/plugins/password/localization/zh_CN.inc
index 5a15635e7..5d14926f2 100644
--- a/plugins/password/localization/zh_CN.inc
+++ b/plugins/password/localization/zh_CN.inc
@@ -24,13 +24,13 @@ $labels['confpasswd'] = '确认新密码:';
$messages = array();
$messages['nopassword'] = '请输入新密码。';
-$messages['nocurpassword'] = '请输入正确的密码。';
+$messages['nocurpassword'] = '请输入当前的密码。';
$messages['passwordincorrect'] = '当前密码不正确。';
$messages['passwordinconsistency'] = '两次输入的密码不一致,请重试。';
-$messages['crypterror'] = '无法保存新密码,因为加密功能不可用。';
-$messages['connecterror'] = '无法保存新密码,因为连接出错。';
+$messages['crypterror'] = '无法保存新密码,缺少加密功能。';
+$messages['connecterror'] = '无法保存新密码,连接出错。';
$messages['internalerror'] = '无法保存新密码。';
-$messages['passwordshort'] = '密码必须至少为 $length 位。';
+$messages['passwordshort'] = '密码至少为 $length 位。';
$messages['passwordweak'] = '密码必须至少包含一个数字和一个标点符号。';
$messages['passwordforbidden'] = '密码包含禁止使用的字符。';
diff --git a/plugins/password/package.xml b/plugins/password/package.xml
index 9a056dec6..16eda1ad0 100644
--- a/plugins/password/package.xml
+++ b/plugins/password/package.xml
@@ -15,19 +15,18 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
- <date>2012-11-15</date>
+ <date>2013-04-28</date>
<version>
- <release>3.2</release>
+ <release>3.4</release>
<api>2.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>
-- Fix wrong (non-specific) error message on crypt or connection error (#1488808)
-- Added option to define IMAP hosts that support password changes - password_hosts
+Added password_force_save option
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -347,5 +346,36 @@
- Added Samba password (#1488364)
</notes>
</release>
+ <release>
+ <date>2012-11-15</date>
+ <version>
+ <release>3.2</release>
+ <api>2.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+- Fix wrong (non-specific) error message on crypt or connection error (#1488808)
+- Added option to define IMAP hosts that support password changes - password_hosts
+ </notes>
+ </release>
+ <release>
+ <date>2013-03-30</date>
+ <version>
+ <release>3.3</release>
+ <api>2.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+Added new cPanel driver - fixes localization related issues (#1487015)
+ </notes>
+ </release>
</changelog>
</package>
diff --git a/plugins/password/password.php b/plugins/password/password.php
index 39020a0bf..f1a3e17b9 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -1,32 +1,26 @@
<?php
-/*
- +-------------------------------------------------------------------------+
- | Password Plugin for Roundcube |
- | @version @package_version@ |
- | |
- | Copyright (C) 2009-2010, Roundcube Dev. |
- | |
- | This program is free software; you can redistribute it and/or modify |
- | it under the terms of the GNU General Public License version 2 |
- | as published by the Free Software Foundation. |
- | |
- | This program is distributed in the hope that it will be useful, |
- | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- | GNU General Public License for more details. |
- | |
- | You should have received a copy of the GNU General Public License along |
- | with this program; if not, write to the Free Software Foundation, Inc., |
- | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
- | |
- +-------------------------------------------------------------------------+
- | Author: Aleksander Machniak <alec@alec.pl> |
- +-------------------------------------------------------------------------+
-
- $Id: index.php 2645 2009-06-15 07:01:36Z alec $
-
-*/
+/**
+ * Password Plugin for Roundcube
+ *
+ * @version @package_version@
+ * @author Aleksander Machniak <alec@alec.pl>
+ *
+ * Copyright (C) 2005-2013, The Roundcube Dev Team
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ */
define('PASSWORD_CRYPT_ERROR', 1);
define('PASSWORD_ERROR', 2);
@@ -147,7 +141,7 @@ class password extends rcube_plugin
$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) {
+ else if ($sespwd == $newpwd && !$rcmail->config->get('password_force_save')) {
$rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
}
// try to save the password
diff --git a/plugins/redundant_attachments/config.inc.php.dist b/plugins/redundant_attachments/config.inc.php.dist
index 6c317ead1..a0be3755e 100644
--- a/plugins/redundant_attachments/config.inc.php.dist
+++ b/plugins/redundant_attachments/config.inc.php.dist
@@ -6,8 +6,8 @@
// to use memcache as a fallback when write-master is unavailable.
$rcmail_config['redundant_attachments_memcache'] = false;
-// When memcache is used, attachment data expires after
-// specied TTL time in seconds (max.2592000). Default is 12 hours.
-$rcmail_config['redundant_attachments_memcache_ttl'] = 12 * 60 * 60;
+// Attachment data expires after specied TTL time in seconds (max.2592000).
+// Default is 12 hours.
+$rcmail_config['redundant_attachments_cache_ttl'] = 12 * 60 * 60;
?>
diff --git a/plugins/redundant_attachments/redundant_attachments.php b/plugins/redundant_attachments/redundant_attachments.php
index 4ebc8dad7..c0affad3c 100644
--- a/plugins/redundant_attachments/redundant_attachments.php
+++ b/plugins/redundant_attachments/redundant_attachments.php
@@ -68,13 +68,14 @@ class redundant_attachments extends filesystem_attachments
// load configuration
$this->load_config();
+ $ttl = 12 * 60 * 60; // 12 hours
+ $ttl = $rcmail->config->get('redundant_attachments_cache_ttl', $ttl);
+
// Init SQL cache (disable cache data serialization)
- $this->cache = $rcmail->get_cache($this->prefix, 'db', 0, false);
+ $this->cache = $rcmail->get_cache($this->prefix, 'db', $ttl, false);
// Init memcache (fallback) cache
if ($rcmail->config->get('redundant_attachments_memcache')) {
- $ttl = 12 * 60 * 60; // 12 hours
- $ttl = (int) $rcmail->config->get('redundant_attachments_memcache_ttl', $ttl);
$this->mem_cache = $rcmail->get_cache($this->prefix, 'memcache', $ttl, false);
}
diff --git a/plugins/show_additional_headers/package.xml b/plugins/show_additional_headers/package.xml
index 7297916c3..9ca60baa9 100644
--- a/plugins/show_additional_headers/package.xml
+++ b/plugins/show_additional_headers/package.xml
@@ -24,7 +24,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/show_additional_headers/show_additional_headers.php b/plugins/show_additional_headers/show_additional_headers.php
index 1375348c2..c2b0ca1d3 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/main.inc.php and add your desired headers:
+ * Enable the plugin in config.inc.php and add your desired headers:
* $rcmail_config['show_additional_headers'] = array('User-Agent');
*
* @version @package_version@
* @author Thomas Bruederli
- * @website http://roundcube.net
+ * @license GNU GPLv3+
*/
class show_additional_headers extends rcube_plugin
{
diff --git a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php b/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
index d5d0d47ec..e882a2f37 100644
--- a/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
+++ b/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
@@ -63,7 +63,7 @@ class squirrelmail_usercopy extends rcube_plugin
if ($this->prefs['___sig'.$i.'___'])
$ident_data['signature'] = $this->prefs['___sig'.$i.'___'];
// insert identity
- $identid = $rcmail->user->insert_identity($ident_data);
+ $rcmail->user->insert_identity($ident_data);
}
}
diff --git a/plugins/subscriptions_option/localization/gl_ES.inc b/plugins/subscriptions_option/localization/gl_ES.inc
index bbff10c3b..a273777da 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 suscripcións IMAP';
+$labels['useimapsubscriptions'] = 'Usar subscricións IMAP';
?>
diff --git a/plugins/subscriptions_option/localization/lb_LU.inc b/plugins/subscriptions_option/localization/lb_LU.inc
new file mode 100644
index 000000000..d9432634b
--- /dev/null
+++ b/plugins/subscriptions_option/localization/lb_LU.inc
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/subscriptions_option/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Subscriptions plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/
+*/
+
+$labels = array();
+$labels['useimapsubscriptions'] = 'IMAP-Abonnementer benotzen';
+
+?>
diff --git a/plugins/subscriptions_option/package.xml b/plugins/subscriptions_option/package.xml
index 79d44f8c2..04f2c1b3c 100644
--- a/plugins/subscriptions_option/package.xml
+++ b/plugins/subscriptions_option/package.xml
@@ -32,7 +32,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/subscriptions_option/subscriptions_option.php b/plugins/subscriptions_option/subscriptions_option.php
index 7678d8e94..284c048df 100644
--- a/plugins/subscriptions_option/subscriptions_option.php
+++ b/plugins/subscriptions_option/subscriptions_option.php
@@ -7,7 +7,7 @@
* 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/main.inc.php to enable the user option
+ * Add it to the plugins list in config.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:
* $rcmail_config['dont_override'] = array('use_subscriptions');
@@ -21,6 +21,7 @@
*
* @version @package_version@
* @author Ziba Scott
+ * @license GNU GPLv3+
*/
class subscriptions_option extends rcube_plugin
{
diff --git a/plugins/userinfo/localization/lb_LU.inc b/plugins/userinfo/localization/lb_LU.inc
new file mode 100644
index 000000000..d8394f6d8
--- /dev/null
+++ b/plugins/userinfo/localization/lb_LU.inc
@@ -0,0 +1,25 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/userinfo/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Userinfo plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/
+*/
+
+$labels = 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/nl_NL.inc b/plugins/userinfo/localization/nl_NL.inc
index 8c636e700..8c46ca6c4 100644
--- a/plugins/userinfo/localization/nl_NL.inc
+++ b/plugins/userinfo/localization/nl_NL.inc
@@ -19,7 +19,7 @@
$labels = array();
$labels['userinfo'] = 'Gebruikersinformatie';
$labels['created'] = 'Aangemaakt';
-$labels['lastlogin'] = 'Laatste login';
+$labels['lastlogin'] = 'Laatste aanmelding';
$labels['defaultidentity'] = 'Standaardidentiteit';
?> \ No newline at end of file
diff --git a/plugins/userinfo/localization/zh_CN.inc b/plugins/userinfo/localization/zh_CN.inc
index 265c0704a..2b06ab218 100644
--- a/plugins/userinfo/localization/zh_CN.inc
+++ b/plugins/userinfo/localization/zh_CN.inc
@@ -18,8 +18,8 @@
$labels = array();
$labels['userinfo'] = '用户信息';
-$labels['created'] = '创建';
-$labels['lastlogin'] = '最后登录';
+$labels['created'] = '创建于';
+$labels['lastlogin'] = '最近登录';
$labels['defaultidentity'] = '默认身份';
?> \ 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 b502c85c7..806f6bb7d 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 a tarxeta ao caderno de enderezos';
-$labels['vcardsavefailed'] = 'Non foi posible gardar a tarxeta';
+$labels['addvcardmsg'] = 'Engadir vCard ao caderno de enderezos';
+$labels['vcardsavefailed'] = 'Non foi posible gardar a vCard';
?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/lb_LU.inc b/plugins/vcard_attachments/localization/lb_LU.inc
new file mode 100644
index 000000000..b9d23eaa5
--- /dev/null
+++ b/plugins/vcard_attachments/localization/lb_LU.inc
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/vcard_attachments/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Vcard Attachments plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/
+*/
+
+$labels = 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/localization/zh_CN.inc b/plugins/vcard_attachments/localization/zh_CN.inc
index 6deb21da4..5ff81a806 100644
--- a/plugins/vcard_attachments/localization/zh_CN.inc
+++ b/plugins/vcard_attachments/localization/zh_CN.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['addvcardmsg'] = '添加 vCard 到地址簿中';
+$labels['addvcardmsg'] = '添加 vCard 至地址簿中';
$labels['vcardsavefailed'] = '无法保存 vCard';
?> \ No newline at end of file
diff --git a/plugins/vcard_attachments/vcard_attachments.php b/plugins/vcard_attachments/vcard_attachments.php
index 4905b373e..cf7e22d3a 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 $idx => $part) {
+ foreach ((array)$this->message->parts as $part) {
if ($this->is_vcard($part)) {
$this->vcard_parts[] = $part->mime_id;
$this->vcard_bodies[] = $part->mime_id;
@@ -63,7 +63,6 @@ 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));
diff --git a/plugins/virtuser_file/virtuser_file.php b/plugins/virtuser_file/virtuser_file.php
index 2c705b2d0..ed0eba189 100644
--- a/plugins/virtuser_file/virtuser_file.php
+++ b/plugins/virtuser_file/virtuser_file.php
@@ -3,7 +3,7 @@
/**
* File based User-to-Email and Email-to-User lookup
*
- * Add it to the plugins list in config/main.inc.php and set
+ * Add it to the plugins list in config.inc.php and set
* path to a virtuser table file to resolve user names and e-mail
* addresses
* $rcmail_config['virtuser_file'] = '';
@@ -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,25 +34,24 @@ class virtuser_file extends rcube_plugin
function user2email($p)
{
$r = $this->findinvirtual('/\s' . preg_quote($p['user'], '/') . '\s*$/');
- $result = array();
+ $result = array();
- for ($i=0; $i<count($r); $i++)
- {
- $arr = preg_split('/\s+/', $r[$i]);
+ for ($i=0; $i<count($r); $i++) {
+ $arr = preg_split('/\s+/', $r[$i]);
- if (count($arr) > 0 && strpos($arr[0], '@')) {
- $result[] = rcube_utils::idn_to_ascii(trim(str_replace('\\@', '@', $arr[0])));
+ if (count($arr) > 0 && strpos($arr[0], '@')) {
+ $result[] = rcube_utils::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;
}
/**
@@ -60,18 +59,18 @@ class virtuser_file extends rcube_plugin
*/
function email2user($p)
{
- $r = $this->findinvirtual('/^' . preg_quote($p['email'], '/') . '\s/');
+ $r = $this->findinvirtual('/^' . preg_quote($p['email'], '/') . '\s/');
- for ($i=0; $i<count($r); $i++) {
- $arr = preg_split('/\s+/', trim($r[$i]));
+ for ($i=0; $i<count($r); $i++) {
+ $arr = preg_split('/\s+/', trim($r[$i]));
- if (count($arr) > 0) {
- $p['user'] = trim($arr[count($arr)-1]);
- break;
- }
- }
+ if (count($arr) > 0) {
+ $p['user'] = trim($arr[count($arr)-1]);
+ break;
+ }
+ }
- return $p;
+ return $p;
}
/**
@@ -82,26 +81,25 @@ 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 b7ea565d8..9430bf69d 100644
--- a/plugins/virtuser_query/package.xml
+++ b/plugins/virtuser_query/package.xml
@@ -22,7 +22,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/plugins/virtuser_query/virtuser_query.php b/plugins/virtuser_query/virtuser_query.php
index 675eb7c1b..3181cda94 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/main.inc.php and set
+ * Add it to the plugins list in config.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,7 +12,7 @@
* The email query could optionally select identity data columns in specified order:
* name, organization, reply-to, bcc, signature, html_signature
*
- * $rcmail_config['virtuser_query'] = array('email' => '', 'user' => '', 'host' => '');
+ * $rcmail_config['virtuser_query'] = array('email' => '', 'user' => '', 'host' => '', 'alias' => '');
*
* 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.
@@ -23,6 +23,8 @@
* @version @package_version@
* @author Aleksander Machniak <alec@alec.pl>
* @author Steffen Vogel
+ * @author Tim Gerundt
+ * @license GNU GPLv3+
*/
class virtuser_query extends rcube_plugin
{
@@ -49,6 +51,9 @@ 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'));
+ }
}
}
@@ -59,7 +64,7 @@ class virtuser_query extends rcube_plugin
{
$dbh = $this->get_dbh();
- $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escapeSimple($p['user']), $this->config['email']));
+ $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escape($p['user']), $this->config['email']));
while ($sql_arr = $dbh->fetch_array($sql_result)) {
if (strpos($sql_arr[0], '@')) {
@@ -78,8 +83,9 @@ class virtuser_query extends rcube_plugin
$result[] = $sql_arr[0];
}
- if ($p['first'])
+ if ($p['first']) {
break;
+ }
}
}
@@ -95,7 +101,7 @@ class virtuser_query extends rcube_plugin
{
$dbh = $this->get_dbh();
- $sql_result = $dbh->query(preg_replace('/%m/', $dbh->escapeSimple($p['email']), $this->config['user']));
+ $sql_result = $dbh->query(preg_replace('/%m/', $dbh->escape($p['email']), $this->config['user']));
if ($sql_arr = $dbh->fetch_array($sql_result)) {
$p['user'] = $sql_arr[0];
@@ -111,7 +117,7 @@ class virtuser_query extends rcube_plugin
{
$dbh = $this->get_dbh();
- $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escapeSimple($p['user']), $this->config['host']));
+ $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escape($p['user']), $this->config['host']));
if ($sql_arr = $dbh->fetch_array($sql_result)) {
$p['host'] = $sql_arr[0];
@@ -121,6 +127,22 @@ class virtuser_query extends rcube_plugin
}
/**
+ * 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()
@@ -141,4 +163,3 @@ class virtuser_query extends rcube_plugin
}
}
-
diff --git a/plugins/zipdownload/localization/lb_LU.inc b/plugins/zipdownload/localization/lb_LU.inc
new file mode 100644
index 000000000..6721c51cb
--- /dev/null
+++ b/plugins/zipdownload/localization/lb_LU.inc
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+
+$labels = array();
+$labels['downloadall'] = 'All d\'Unhäng eroflueden';
+$labels['downloadfolder'] = 'Dossier eroflueden';
+
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php
index 7e132bfbb..59431267d 100644
--- a/plugins/zipdownload/zipdownload.php
+++ b/plugins/zipdownload/zipdownload.php
@@ -108,7 +108,7 @@ class zipdownload extends rcube_plugin
foreach ($message->attachments as $part) {
$pid = $part->mime_id;
$part = $message->mime_parts[$pid];
- $disp_name = $this->_convert_filename($part->filename, $part->charset);
+ $disp_name = $this->_convert_filename($part->filename);
if ($part->body) {
$orig_message_raw = $part->body;
@@ -169,7 +169,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 $n => $header) {
+ foreach ($a_headers as $header) {
if (empty($header))
continue;
@@ -199,7 +199,7 @@ class zipdownload extends rcube_plugin
$zip = new ZipArchive();
$zip->open($tmpfname, ZIPARCHIVE::OVERWRITE);
- foreach ($uids as $key => $uid){
+ foreach ($uids as $uid){
$headers = $imap->get_message_headers($uid);
$subject = rcube_mime::decode_mime_string((string)$headers->subject);
$subject = $this->_convert_filename($subject);
@@ -263,9 +263,9 @@ class zipdownload extends rcube_plugin
/**
* Helper function to convert filenames to the configured charset
*/
- private function _convert_filename($str, $from = RCUBE_CHARSET)
+ private function _convert_filename($str)
{
- $str = rcube_charset::convert($str, $from == '' ? RCUBE_CHARSET : $from, $this->charset);
+ $str = rcube_charset::convert($str, RCUBE_CHARSET, $this->charset);
return strtr($str, array(':'=>'', '/'=>'-'));
}
diff --git a/program/include/bc.php b/program/include/bc.php
index d8356338d..a7d7b5ac1 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 = rcmail::get_instance()->temp_gc();
+ rcmail::get_instance()->gc_temp();
}
function rcube_charset_convert($str, $from, $to=NULL)
@@ -287,7 +287,7 @@ function rcmail_remote_ip()
function rcube_check_referer()
{
- return rcmail::check_referer();
+ return rcube_utils::check_referer();
}
function rcube_timer()
@@ -405,6 +405,16 @@ 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 b32ae4e8e..919cc7682 100644
--- a/program/include/iniset.php
+++ b/program/include/iniset.php
@@ -24,21 +24,6 @@
define('RCMAIL_VERSION', '1.0-git');
define('RCMAIL_START', microtime(true));
-$config = array(
- // Some users are not using Installer, so we'll check some
- // critical PHP settings here. Only these, which doesn't provide
- // an error/warning in the logs later. See (#1486307).
- 'suhosin.session.encrypt' => 0,
- 'session.auto_start' => 0,
- 'file_uploads' => 1,
-);
-foreach ($config as $optname => $optval) {
- if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
- die("ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
- ."Check your PHP configuration (including php_admin_flag).");
- }
-}
-
if (!defined('INSTALL_PATH')) {
define('INSTALL_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
}
@@ -75,6 +60,11 @@ 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 1bde4034f..800eddac6 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -51,6 +51,7 @@ class rcmail extends rcube
*/
public $action = '';
public $comm_path = './';
+ public $filename = '';
private $address_books = array();
private $action_map = array();
@@ -65,12 +66,13 @@ 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()
+ static function get_instance($env = '')
{
if (!self::$instance || !is_a(self::$instance, 'rcmail')) {
- self::$instance = new rcmail();
+ self::$instance = new rcmail($env);
self::$instance->startup(); // init AFTER object was linked with self::$instance
}
@@ -86,6 +88,10 @@ 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();
@@ -98,7 +104,10 @@ class rcmail extends rcube
// reset some session parameters when changing task
if ($this->task != 'utils') {
- if ($this->session && $_SESSION['task'] != $this->task)
+ // we reset list page when switching to another task
+ // but only to the main task interface - empty action (#1489076)
+ // this will prevent from unintentional page reset on cross-task requests
+ if ($this->session && $_SESSION['task'] != $this->task && empty($this->action))
$this->session->remove('page');
// set current task to session
$_SESSION['task'] = $this->task;
@@ -159,7 +168,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 (in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
+ if (version_compare(PHP_VERSION, '5.5.0', '<') && in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8');
}
}
@@ -225,6 +234,11 @@ class rcmail extends rcube
}
if (!$contacts) {
+ // there's no default, just return
+ if ($default) {
+ return null;
+ }
+
self::raise_error(array(
'code' => 700, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -258,13 +272,13 @@ class rcmail extends rcube
*/
public function get_address_sources($writeable = false, $skip_hidden = false)
{
- $abook_type = strtolower($this->config->get('address_book_type'));
- $ldap_config = $this->config->get('ldap_public');
+ $abook_type = (string) $this->config->get('address_book_type');
+ $ldap_config = (array) $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 ($abook_type != 'ldap' && $abook_type != '') {
+ if (!empty($abook_type) && strtolower($abook_type) != 'ldap') {
if (!isset($this->address_books['0']))
$this->address_books['0'] = new rcube_contacts($this->db, $this->get_user_id());
$list['0'] = array(
@@ -277,8 +291,7 @@ class rcmail extends rcube
);
}
- if ($ldap_config) {
- $ldap_config = (array) $ldap_config;
+ if (!empty($ldap_config)) {
foreach ($ldap_config as $id => $prop) {
// handle misconfiguration
if (empty($prop) || !is_array($prop)) {
@@ -287,7 +300,7 @@ class rcmail extends rcube
$list[$id] = array(
'id' => $id,
'name' => html::quote($prop['name']),
- 'groups' => is_array($prop['groups']),
+ 'groups' => !empty($prop['groups']) || !empty($prop['group_filters']),
'readonly' => !$prop['writable'],
'hidden' => $prop['hidden'],
'autocomplete' => in_array($id, $autocomplete)
@@ -594,7 +607,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($user, $domain) = explode('@', $post_user);
+ list(, $domain) = explode('@', $post_user);
// direct match in default_host array
if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) {
@@ -698,28 +711,6 @@ 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
*
* @param mixed Either a string with the action or url parameters as key-value pairs
@@ -739,7 +730,7 @@ class rcmail extends rcube
$p['_task'] = $task;
unset($p['task']);
- $url = './';
+ $url = './' . $this->filename;
$delm = '?';
foreach (array_reverse($p) as $key => $val) {
if ($val !== '' && $val !== null) {
@@ -764,11 +755,6 @@ 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'))
@@ -929,189 +915,6 @@ 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,
- ));
-
- $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 (ini_get('safe_mode'))
- $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
*
* @return string Date
@@ -1165,7 +968,7 @@ class rcmail extends rcube
*/
public function table_output($attrib, $table_data, $a_show_cols, $id_col)
{
- $table = new html_table(/*array('cols' => count($a_show_cols))*/);
+ $table = new html_table($attrib);
// add table header
if (!$attrib['noheader']) {
@@ -1528,9 +1331,10 @@ 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 $key => $folder) {
+ foreach ($arrFolders as $folder) {
$title = null;
$folder_class = $this->folder_classname($folder['id']);
$is_collapsed = strpos($collapsed, '&'.rawurlencode($folder['id']).'&') !== false;
@@ -1616,7 +1420,7 @@ class rcmail extends rcube
{
$out = '';
- foreach ($arrFolders as $key => $folder) {
+ foreach ($arrFolders as $folder) {
// skip exceptions (and its subfolders)
if (!empty($opts['exceptions']) && in_array($folder['id'], $opts['exceptions'])) {
continue;
@@ -1684,8 +1488,10 @@ class rcmail extends rcube
*/
public function localize_foldername($name, $with_path = true)
{
+ $realnames = $this->config->get('show_real_foldernames');
+
// try to localize path of the folder
- if ($with_path) {
+ if ($with_path && !$realnames) {
$storage = $this->get_storage();
$delimiter = $storage->get_hierarchy_delimiter();
$path = explode($delimiter, $name);
@@ -1702,12 +1508,11 @@ class rcmail extends rcube
}
}
- if ($folder_class = $this->folder_classname($name)) {
+ if (!$realnames && ($folder_class = $this->folder_classname($name))) {
return $this->gettext($folder_class);
}
- else {
- return rcube_charset::convert($name, 'UTF7-IMAP');
- }
+
+ return rcube_charset::convert($name, 'UTF7-IMAP');
}
@@ -1762,11 +1567,7 @@ class rcmail extends rcube
$quota_result = (array) $quota;
$quota_result['type'] = isset($_SESSION['quota_display']) ? $_SESSION['quota_display'] : '';
- 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 ($quota['total'] > 0) {
if (!isset($quota['percent'])) {
$quota_result['percent'] = min(100, round(($quota['used']/max(1,$quota['total']))*100));
}
@@ -1785,7 +1586,8 @@ class rcmail extends rcube
}
}
else {
- $quota_result['title'] = $this->gettext('unknown');
+ $unlimited = $this->config->get('quota_zero_as_unlimited');
+ $quota_result['title'] = $this->gettext($unlimited ? 'unlimited' : 'unknown');
$quota_result['percent'] = 0;
}
@@ -1964,7 +1766,8 @@ class rcmail extends rcube
public function upload_init()
{
// Enable upload progress bar
- if (($seconds = $this->config->get('upload_progress')) && ini_get('apc.rfc1867')) {
+ $rfc1867 = filter_var(ini_get('apc.rfc1867'), FILTER_VALIDATE_BOOLEAN);
+ if ($rfc1867 && ($seconds = $this->config->get('upload_progress'))) {
if ($field_name = ini_get('apc.rfc1867_name')) {
$this->output->set_env('upload_progress_name', $field_name);
$this->output->set_env('upload_progress_time', (int) $seconds);
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index 6100269b9..998779509 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -67,11 +67,12 @@ 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'));
$this->set_env('cookie_path', ini_get('session.cookie_path'));
- $this->set_env('cookie_secure', ini_get('session.cookie_secure'));
+ $this->set_env('cookie_secure', filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN));
// load the correct skin (in case user-defined)
$skin = $this->config->get('skin');
@@ -105,7 +106,6 @@ class rcmail_output_html extends rcmail_output
));
}
-
/**
* Set environment variable
*
@@ -121,7 +121,6 @@ class rcmail_output_html extends rcmail_output
}
}
-
/**
* Getter for the current page title
*
@@ -145,17 +144,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('skins/'.$skin) && is_readable('skins/'.$skin)) {
- $skin_path = 'skins/'.$skin;
- $valid = true;
+ if (!empty($skin) && is_dir($path . $skin) && is_readable($path . $skin)) {
+ $skin_path = 'skins/' . $skin;
+ $valid = true;
}
else {
$skin_path = $this->config->get('skin_path');
@@ -183,13 +182,16 @@ class rcmail_output_html extends rcmail_output
$this->skin_paths[] = $skin_path;
// read meta file and check for dependecies
- $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']);
+ $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']);
+ }
}
}
-
/**
* Check if a specific template exists
*
@@ -198,16 +200,17 @@ class rcmail_output_html extends rcmail_output
*/
public function template_exists($name)
{
- $found = false;
foreach ($this->skin_paths as $skin_path) {
- $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;
+ $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;
+ }
}
- return $found;
- }
+ return false;
+ }
/**
* Find the given file in the current skin path stack
@@ -233,7 +236,6 @@ class rcmail_output_html extends rcmail_output
return false;
}
-
/**
* Register a GUI object to the client script
*
@@ -246,7 +248,6 @@ class rcmail_output_html extends rcmail_output
$this->add_script(self::JS_OBJECT_NAME.".gui_object('$obj', '$id');");
}
-
/**
* Call a client method
*
@@ -262,7 +263,6 @@ class rcmail_output_html extends rcmail_output
$this->js_commands[] = $cmd;
}
-
/**
* Add a localized label to the client environment
*/
@@ -277,7 +277,6 @@ class rcmail_output_html extends rcmail_output
}
}
-
/**
* Invoke display_message command
*
@@ -304,7 +303,6 @@ class rcmail_output_html extends rcmail_output
}
}
-
/**
* Delete all stored env variables and commands
*
@@ -327,7 +325,6 @@ class rcmail_output_html extends rcmail_output
$this->body = '';
}
-
/**
* Redirect to a certain url
*
@@ -343,7 +340,6 @@ 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
@@ -377,7 +373,6 @@ class rcmail_output_html extends rcmail_output
}
}
-
/**
* Process template and write to stdOut
*
@@ -413,7 +408,6 @@ 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)
*
@@ -538,7 +532,6 @@ class rcmail_output_html extends rcmail_output
}
}
-
/**
* Return executable javascript code for all registered commands
*
@@ -570,7 +563,6 @@ class rcmail_output_html extends rcmail_output
return $out;
}
-
/**
* Make URLs starting with a slash point to skin directory
*
@@ -590,7 +582,6 @@ class rcmail_output_html extends rcmail_output
return $str;
}
-
/**
* Show error page and terminate script execution
*
@@ -625,7 +616,6 @@ class rcmail_output_html extends rcmail_output
array($this, 'globals_callback'), $input);
}
-
/**
* Callback funtion for preg_replace_callback() in parse_with_globals()
*/
@@ -634,7 +624,6 @@ 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
@@ -646,7 +635,6 @@ class rcmail_output_html extends rcmail_output
array($this, 'file_callback'), $output);
}
-
/**
* Callback function for preg_replace_callback in write()
*
@@ -655,7 +643,7 @@ class rcmail_output_html extends rcmail_output
protected function file_callback($matches)
{
$file = $matches[3];
- $file[0] = preg_replace('!^/this/!', '/', $file[0]);
+ $file = preg_replace('!^/this/!', '/', $file);
// correct absolute paths
if ($file[0] == '/') {
@@ -672,7 +660,6 @@ class rcmail_output_html extends rcmail_output
return $matches[1] . '=' . $matches[2] . $file . $matches[4];
}
-
/**
* Public wrapper to dipp into template parsing.
*
@@ -689,7 +676,6 @@ class rcmail_output_html extends rcmail_output
return $input;
}
-
/**
* Parse for conditional tags
*
@@ -727,21 +713,18 @@ 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 eval("return (".$this->parse_expression($condition).");");
+ return $this->eval_expression($condition);
}
-
/**
* Inserts hidden field with CSRF-prevention-token into POST forms
*/
@@ -758,16 +741,16 @@ class rcmail_output_html extends rcmail_output
return $out;
}
-
/**
- * Parses expression and replaces variables
+ * Parse & evaluate a given expression and return its result.
+ *
+ * @param string Expression statement
*
- * @param string Expression statement
- * @return string Expression value
+ * @return mixed Expression result
*/
- protected function parse_expression($expression)
+ protected function eval_expression ($expression)
{
- return preg_replace(
+ $expression = preg_replace(
array(
'/session:([a-z0-9_]+)/i',
'/config:([a-z0-9_]+)(:([a-z0-9_]+))?/i',
@@ -779,16 +762,30 @@ class rcmail_output_html extends rcmail_output
),
array(
"\$_SESSION['\\1']",
- "\$this->app->config->get('\\1',rcube_utils::get_boolean('\\3'))",
- "\$this->env['\\1']",
+ "\$app->config->get('\\1',rcube_utils::get_boolean('\\3'))",
+ "\$env['\\1']",
"rcube_utils::get_input_value('\\1', rcube_utils::INPUT_GPC)",
"\$_COOKIE['\\1']",
- "\$this->browser->{'\\1'}",
+ "\$browser->{'\\1'}",
$this->template_name,
),
- $expression);
- }
+ $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);
+ }
/**
* Search for special tags in input and replace them
@@ -804,7 +801,6 @@ class rcmail_output_html extends rcmail_output
return preg_replace_callback('/<roundcube:([-_a-z]+)\s+((?:[^>]|\\\\>)+)(?<!\\\\)>/Ui', array($this, 'xml_command'), $input);
}
-
/**
* Callback function for parsing an xml command tag
* and turn it into real html content
@@ -839,7 +835,7 @@ class rcmail_output_html extends rcmail_output
// show a label
case 'label':
if ($attrib['expression'])
- $attrib['name'] = eval("return " . $this->parse_expression($attrib['expression']) .";");
+ $attrib['name'] = $this->eval_expression($attrib['expression']);
if ($attrib['name'] || $attrib['command']) {
// @FIXME: 'noshow' is useless, remove?
@@ -873,6 +869,7 @@ class rcmail_output_html extends rcmail_output
// include a file
case 'include':
$old_base_path = $this->base_path;
+ if (!empty($attrib['skin_path'])) $attrib['skinpath'] = $attrib['skin_path'];
if ($path = $this->get_skin_file($attrib['file'], $skin_path, $attrib['skinpath'])) {
$this->base_path = preg_replace('!plugins/\w+/!', '', $skin_path); // set base_path to core skin directory (not plugin's skin)
$path = realpath($path);
@@ -970,8 +967,7 @@ class rcmail_output_html extends rcmail_output
// return code for a specified eval expression
case 'exp':
- $value = $this->parse_expression($attrib['expression']);
- return eval("return html::quote($value);");
+ return html::quote($this->eval_expression($attrib['expression']));
// return variable
case 'var':
@@ -1008,12 +1004,13 @@ class rcmail_output_html extends rcmail_output
}
return html::quote($value);
- break;
+
+ case 'form':
+ return $this->form_tag($attrib);
}
return '';
}
-
/**
* Include a specific file and return it's contents
*
@@ -1030,7 +1027,6 @@ class rcmail_output_html extends rcmail_output
return $out;
}
-
/**
* Create and register a button
*
@@ -1186,7 +1182,6 @@ class rcmail_output_html extends rcmail_output
return $out;
}
-
/**
* Link an external script file
*
@@ -1217,7 +1212,6 @@ class rcmail_output_html extends rcmail_output
$this->script_files[$position][] = $file;
}
-
/**
* Add inline javascript code
*
@@ -1234,7 +1228,6 @@ class rcmail_output_html extends rcmail_output
}
}
-
/**
* Link an external css file
*
@@ -1245,7 +1238,6 @@ class rcmail_output_html extends rcmail_output
$this->css_files[] = $file;
}
-
/**
* Add HTML code to the page header
*
@@ -1256,7 +1248,6 @@ class rcmail_output_html extends rcmail_output
$this->header .= "\n" . $str;
}
-
/**
* Add HTML code to the page footer
* To be added right befor </body>
@@ -1268,7 +1259,6 @@ class rcmail_output_html extends rcmail_output
$this->footer .= "\n" . $str;
}
-
/**
* Process template and write to stdOut
*
@@ -1393,7 +1383,6 @@ class rcmail_output_html extends rcmail_output
}
}
-
/**
* Returns iframe object, registers some related env variables
*
@@ -1424,7 +1413,6 @@ class rcmail_output_html extends rcmail_output
/* ************* common functions delivering gui objects ************** */
-
/**
* Create a form tag with the necessary hidden fields
*
@@ -1446,12 +1434,11 @@ class rcmail_output_html extends rcmail_output
$attrib['noclose'] = true;
return html::tag('form',
- $attrib + array('action' => "./", 'method' => "get"),
+ $attrib + array('action' => $this->app->comm_path, 'method' => "get"),
$hidden . $content,
array('id','class','style','name','method','action','enctype','onsubmit'));
}
-
/**
* Build a form tag with a unique request token
*
@@ -1482,7 +1469,6 @@ class rcmail_output_html extends rcmail_output
return $this->form_tag($attrib, $hidden->show() . $content);
}
-
/**
* GUI object 'username'
* Showing IMAP username of the current session
@@ -1514,7 +1500,6 @@ class rcmail_output_html extends rcmail_output
return rcube_utils::idn_to_utf8($username);
}
-
/**
* GUI object 'loginform'
* Returns code for the webmail login form
@@ -1614,7 +1599,6 @@ class rcmail_output_html extends rcmail_output
return $out;
}
-
/**
* GUI object 'preloader'
* Loads javascript code for images preloading
@@ -1637,7 +1621,6 @@ class rcmail_output_html extends rcmail_output
}', 'docready');
}
-
/**
* GUI object 'searchform'
* Returns code for search function
@@ -1676,7 +1659,6 @@ class rcmail_output_html extends rcmail_output
return $out;
}
-
/**
* Builder for GUI object 'message'
*
@@ -1694,7 +1676,6 @@ class rcmail_output_html extends rcmail_output
return html::div($attrib, '');
}
-
/**
* GUI object 'charsetselector'
*
diff --git a/program/js/app.js b/program/js/app.js
index d194b7326..45a17d640 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -44,7 +44,9 @@ function rcube_webmail()
comm_path: './',
blankpage: 'program/resources/blank.gif',
recipients_separator: ',',
- recipients_delimiter: ', '
+ recipients_delimiter: ', ',
+ popup_width: 1150,
+ popup_width_small: 900
};
// create protected reference to myself
@@ -178,11 +180,6 @@ function rcube_webmail()
parent.rcmail.env.frame_lock = null;
}
- // Makes that reference to document.activeElement do not throw
- // "unspecified error" in IE9 (#1489008)
- if (this.env.framed && bw.ie)
- document.documentElement.focus();
-
// enable general commands
this.enable_command('close', 'logout', 'mail', 'addressbook', 'settings', 'save-pref',
'compose', 'undo', 'about', 'switch-task', 'menu-open', 'menu-save', true);
@@ -194,7 +191,7 @@ function rcube_webmail()
case 'mail':
// enable mail commands
- this.enable_command('list', 'checkmail', 'add-contact', 'search', 'reset-search', 'collapse-folder', true);
+ this.enable_command('list', 'checkmail', 'add-contact', 'search', 'reset-search', 'collapse-folder', 'import-messages', true);
if (this.gui_objects.messagelist) {
this.message_list = new rcube_list_widget(this.gui_objects.messagelist, {
@@ -232,7 +229,7 @@ function rcube_webmail()
this.set_button_titles();
this.env.message_commands = ['show', 'reply', 'reply-all', 'reply-list',
- 'moveto', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource',
+ 'move', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource',
'print', 'load-attachment', 'download-attachment', 'show-headers', 'hide-headers', 'download',
'forward', 'forward-inline', 'forward-attachment', 'change-format'];
@@ -258,7 +255,8 @@ function rcube_webmail()
}
}
else if (this.env.action == 'compose') {
- this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'cancel', 'toggle-editor', 'list-adresses', 'search', 'reset-search', 'extwin'];
+ this.env.address_group_stack = [];
+ this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'cancel', 'toggle-editor', 'list-adresses', 'pushgroup', 'search', 'reset-search', 'extwin'];
if (this.env.drafts_mailbox)
this.env.compose_commands.push('savedraft')
@@ -279,12 +277,15 @@ function rcube_webmail()
// init message compose form
this.init_messageform();
}
+ else if (this.env.action == 'get')
+ this.enable_command('download', 'print', true);
// show printing dialog
- else if (this.env.action == 'print' && this.env.uid)
+ else if (this.env.action == 'print' && this.env.uid) {
if (bw.safari)
setTimeout('window.print()', 10);
else
window.print();
+ }
// get unread count for each mailbox
if (this.gui_objects.mailboxlist) {
@@ -319,17 +320,19 @@ function rcube_webmail()
}
// detect browser capabilities
- if (!this.is_framed())
+ if (!this.is_framed() && !this.env.extwin)
this.browser_capabilities_check();
break;
case 'addressbook':
+ this.env.address_group_stack = [];
+
if (this.gui_objects.folderlist)
this.env.contactfolders = $.extend($.extend({}, this.env.address_sources), this.env.contactgroups);
this.enable_command('add', 'import', this.env.writable_source);
- this.enable_command('list', 'listgroup', 'listsearch', 'advanced-search', true);
+ this.enable_command('list', 'listgroup', 'pushgroup', 'popgroup', 'listsearch', 'advanced-search', true);
if (this.gui_objects.contactslist) {
this.contact_list = new rcube_list_widget(this.gui_objects.contactslist,
@@ -373,7 +376,7 @@ function rcube_webmail()
}
if (this.gui_objects.qsearchbox)
- this.enable_command('search', 'reset-search', 'moveto', true);
+ this.enable_command('search', 'reset-search', true);
break;
@@ -601,15 +604,16 @@ function rcube_webmail()
case 'extwin':
if (this.env.action == 'compose') {
- var form = this.gui_objects.messageform;
+ var form = this.gui_objects.messageform,
+ win = this.open_window('');
$("input[name='_action']", form).val('compose');
form.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 });
- form.target = this.open_window('', 1100, 900);
+ form.target = win.name;
form.submit();
}
else {
- this.open_window(this.env.permaurl, 900, 900);
+ this.open_window(this.env.permaurl, true);
}
break;
@@ -791,16 +795,18 @@ function rcube_webmail()
// mail task commands
case 'move':
- case 'moveto':
+ case 'moveto': // deprecated
if (this.task == 'mail')
this.move_messages(props);
else if (this.task == 'addressbook')
- this.copy_contact(null, props);
+ this.move_contacts(props);
break;
case 'copy':
if (this.task == 'mail')
this.copy_messages(props);
+ else if (this.task == 'addressbook')
+ this.copy_contacts(props);
break;
case 'mark':
@@ -862,11 +868,8 @@ function rcube_webmail()
// open attachment in frame if it's of a supported mimetype
if (command != 'download-attachment' && mimetype && this.env.mimetypes && $.inArray(mimetype, this.env.mimetypes) >= 0) {
- var attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', this.html_identifier('rcubemailattachment'+this.env.uid+props));
- if (attachment_win) {
- setTimeout(function(){ attachment_win.focus(); }, 10);
+ if (this.open_window(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1'))
break;
- }
}
this.goto_url('get', qstring+'&_download=1', false);
@@ -941,16 +944,13 @@ function rcube_webmail()
url._to = props;
}
else {
- // use contact_id passed as command parameter
- var n, len, a_cids = [];
+ var a_cids = [];
+ // use contact id passed as command parameter
if (props)
a_cids.push(props);
// get selected contacts
- else if (this.contact_list) {
- var selection = this.contact_list.get_selection();
- for (n=0, len=selection.length; n<len; n++)
- a_cids.push(selection[n]);
- }
+ else if (this.contact_list)
+ a_cids = this.contact_list.get_selection();
if (a_cids.length)
this.http_post('mailto', { _cid: a_cids.join(','), _source: this.env.source }, true);
@@ -985,8 +985,8 @@ function rcube_webmail()
// Reset the auto-save timer
clearTimeout(this.save_timer);
- // compose form did not change
- if (this.cmp_hash == this.compose_field_hash()) {
+ // compose form did not change (and draft wasn't saved already)
+ if (this.env.draft_id && this.cmp_hash == this.compose_field_hash()) {
this.auto_save_start();
break;
}
@@ -1008,7 +1008,7 @@ function rcube_webmail()
// Reset the auto-save timer
clearTimeout(this.save_timer);
- this.upload_file(props || this.gui_objects.uploadform);
+ this.upload_file(props || this.gui_objects.uploadform, 'upload');
break;
case 'insert-sig':
@@ -1052,10 +1052,12 @@ function rcube_webmail()
break;
case 'print':
- if (uid = this.get_single_uid()) {
- ref.printwin = window.open(this.env.comm_path+'&_action=print&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox)+(this.env.safemode ? '&_safe=1' : ''));
+ if (this.env.action == 'get') {
+ this.gui_objects.messagepartframe.contentWindow.print();
+ }
+ else if (uid = this.get_single_uid()) {
+ ref.printwin = this.open_window(this.env.comm_path+'&_action=print&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox)+(this.env.safemode ? '&_safe=1' : ''), true, true);
if (this.printwin) {
- setTimeout(function(){ ref.printwin.focus(); }, 20);
if (this.env.action != 'show')
this.mark_message('read', uid);
}
@@ -1063,15 +1065,15 @@ function rcube_webmail()
break;
case 'viewsource':
- if (uid = this.get_single_uid()) {
- ref.sourcewin = window.open(this.env.comm_path+'&_action=viewsource&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox));
- if (this.sourcewin)
- setTimeout(function(){ ref.sourcewin.focus(); }, 20);
- }
+ if (uid = this.get_single_uid())
+ this.open_window(this.env.comm_path+'&_action=viewsource&_uid='+uid+'&_mbox='+urlencode(this.env.mailbox), true, true);
break;
case 'download':
- if (uid = this.get_single_uid())
+ if (this.env.action == 'get') {
+ location.href = location.href.replace(/_frame=/, '_download=');
+ }
+ else if (uid = this.get_single_uid())
this.goto_url('viewsource', { _uid: uid, _mbox: this.env.mailbox, _save: 1 });
break;
@@ -1108,11 +1110,31 @@ function rcube_webmail()
}
break;
+ case 'pushgroup':
+ // add group ID to stack
+ this.env.address_group_stack.push(props.id);
+ if (obj && event)
+ rcube_event.cancel(event);
+
case 'listgroup':
this.reset_qsearch();
this.list_contacts(props.source, props.id);
break;
+ case 'popgroup':
+ if (this.env.address_group_stack.length > 1) {
+ this.env.address_group_stack.pop();
+ this.reset_qsearch();
+ this.list_contacts(props.source, this.env.address_group_stack[this.env.address_group_stack.length-1]);
+ }
+ break;
+
+ case 'import-messages':
+ var form = props || this.gui_objects.importform;
+ $('input[name="_unlock"]', form).val(this.set_busy(true, 'importwait'));
+ this.upload_file(form, 'import');
+ break;
+
case 'import':
if (this.env.action == 'import' && this.gui_objects.importform) {
var file = document.getElementById('rcmimportfile');
@@ -1187,6 +1209,7 @@ function rcube_webmail()
if (typeof cmd === 'string') {
this.commands[cmd] = enable;
this.set_button(cmd, (enable ? 'act' : 'pas'));
+ this.triggerEvent('enable-command', {command: cmd, status: enable});
}
// push array elements into commands array
else {
@@ -1329,7 +1352,7 @@ function rcube_webmail()
this.drag_menu = function(e, target)
{
var modkey = rcube_event.get_modifier(e),
- menu = this.gui_objects.message_dragmenu;
+ menu = this.gui_objects.dragmenu;
if (menu && modkey == SHIFT_KEY && this.commands['copy']) {
var pos = rcube_event.get_mouse_pos(e);
@@ -1343,7 +1366,7 @@ function rcube_webmail()
this.drag_menu_action = function(action)
{
- var menu = this.gui_objects.message_dragmenu;
+ var menu = this.gui_objects.dragmenu;
if (menu) {
$(menu).hide();
}
@@ -1458,8 +1481,12 @@ function rcube_webmail()
list.draglayer.hide();
this.drag_end(e);
- if (!this.drag_menu(e, target))
- this.command('moveto', target);
+ if (this.contact_list) {
+ if (!this.contacts_drag_menu(e, target))
+ this.command('move', target);
+ }
+ else if (!this.drag_menu(e, target))
+ this.command('move', target);
}
// reset 'pressed' buttons
@@ -1506,7 +1533,7 @@ function rcube_webmail()
}
}
// Multi-message commands
- this.enable_command('delete', 'moveto', 'copy', 'mark', 'forward', 'forward-attachment', list.selection.length > 0);
+ this.enable_command('delete', 'move', 'copy', 'mark', 'forward', 'forward-attachment', list.selection.length > 0);
// reset all-pages-selection
if (selected || (list.selection.length && list.selection.length != list.rowcount))
@@ -1514,7 +1541,7 @@ function rcube_webmail()
// start timer for message preview (wait for double click)
if (selected && this.env.contentframe && !list.multi_selecting && !this.dummy_select)
- this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
+ this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, this.dblclick_time);
else if (this.env.contentframe)
this.show_contentframe(false);
};
@@ -1530,12 +1557,13 @@ function rcube_webmail()
var win = this.get_frame_window(this.env.contentframe);
- if (win && win.location.href.indexOf(this.env.blankpage)>=0) {
+ if (win && win.location.href.indexOf(this.env.blankpage) >= 0) {
if (this.preview_timer)
clearTimeout(this.preview_timer);
if (this.preview_read_timer)
clearTimeout(this.preview_read_timer);
- this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
+
+ this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, this.dblclick_time);
}
};
@@ -1543,11 +1571,11 @@ function rcube_webmail()
{
if (this.preview_timer)
clearTimeout(this.preview_timer);
-
if (this.preview_read_timer)
clearTimeout(this.preview_read_timer);
var uid = list.get_single_selection();
+
if (uid && this.env.mailbox == this.env.drafts_mailbox)
this.open_compose_step({ _draft_uid: uid, _mbox: this.env.mailbox });
else if (uid)
@@ -1587,7 +1615,7 @@ function rcube_webmail()
this.msglist_set_coltypes = function(list)
{
- var i, found, name, cols = list.list.tHead.rows[0].cells;
+ var i, found, name, cols = list.thead.rows[0].cells;
this.env.coltypes = [];
@@ -1608,42 +1636,55 @@ function rcube_webmail()
this.check_droptarget = function(id)
{
- if (this.task == 'mail')
- return (this.env.mailboxes[id] && this.env.mailboxes[id].id != this.env.mailbox && !this.env.mailboxes[id].virtual) ? 1 : 0;
+ switch (this.task) {
+ case 'mail':
+ return (this.env.mailboxes[id] && this.env.mailboxes[id].id != this.env.mailbox && !this.env.mailboxes[id].virtual) ? 1 : 0;
- if (this.task == 'settings')
- return id != this.env.mailbox ? 1 : 0;
+ case 'settings':
+ return id != this.env.mailbox ? 1 : 0;
- if (this.task == 'addressbook') {
- if (id != this.env.source && this.env.contactfolders[id]) {
- // droptarget is a group - contact add to group action
- if (this.env.contactfolders[id].type == 'group') {
- var target_abook = this.env.contactfolders[id].source;
- if (this.env.contactfolders[id].id != this.env.group && !this.env.contactfolders[target_abook].readonly) {
- // search result may contain contacts from many sources
- return (this.env.selection_sources.length > 1 || $.inArray(target_abook, this.env.selection_sources) == -1) ? 2 : 1;
+ case 'addressbook':
+ var target;
+ if (id != this.env.source && (target = this.env.contactfolders[id])) {
+ // droptarget is a group
+ if (target.type == 'group') {
+ if (target.id != this.env.group && !this.env.contactfolders[target.source].readonly) {
+ var is_other = this.env.selection_sources.length > 1 || $.inArray(target.source, this.env.selection_sources) == -1;
+ return !is_other || this.commands.move ? 1 : 2;
+ }
+ }
+ // droptarget is a (writable) addressbook and it's not the source
+ else if (!target.readonly && (this.env.selection_sources.length > 1 || $.inArray(id, this.env.selection_sources) == -1)) {
+ return this.commands.move ? 1 : 2;
}
}
- // droptarget is a (writable) addressbook - contact copy action
- else if (!this.env.contactfolders[id].readonly) {
- // search result may contain contacts from many sources
- return (this.env.selection_sources.length > 1 || $.inArray(id, this.env.selection_sources) == -1) ? 2 : 0;
- }
- }
}
return 0;
};
- this.open_window = function(url, width, height)
+ // open popup window
+ this.open_window = function(url, small, toolbar)
{
- var w = Math.min(width, screen.width - 10),
- h = Math.min(height, screen.height - 100),
- l = (screen.width - w) / 2 + (screen.left || 0),
- t = Math.max(0, (screen.height - h) / 2 + (screen.top || 0) - 20),
- wname = 'rcmextwin' + new Date().getTime(),
- extwin = window.open(url + '&_extwin=1', wname,
- 'width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes,toolbar=no,status=no,location=no');
+ var wname = 'rcmextwin' + new Date().getTime();
+
+ url += (url.match(/\?/) ? '&' : '?') + '_extwin=1';
+
+ if (this.env.standard_windows)
+ extwin = window.open(url, wname);
+ else {
+ var win = this.is_framed() ? parent.window : window,
+ page = $(win),
+ page_width = page.width(),
+ page_height = bw.mz ? $('body', win).height() : page.height(),
+ w = Math.min(small ? this.env.popup_width_small : this.env.popup_width, page_width),
+ h = page_height, // always use same height
+ l = (win.screenLeft || win.screenX) + 20,
+ t = (win.screenTop || win.screenY) + 20,
+ extwin = window.open(url, wname,
+ 'width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes,location=no,scrollbars=yes'
+ +(toolbar ? ',toolbar=yes,menubar=yes,status=yes' : ',toolbar=no,menubar=no,status=no'));
+ }
// write loading... message to empty windows
if (!url && extwin.document) {
@@ -1652,10 +1693,8 @@ function rcube_webmail()
// focus window, delayed to bring to front
window.setTimeout(function() { extwin.focus(); }, 10);
- // position window with setTimeout for Chrome (#1488931)
- window.setTimeout(function() { extwin.moveTo(l,t); }, bw.chrome ? 100 : 10);
- return wname;
+ return extwin;
};
@@ -1739,10 +1778,7 @@ function rcube_webmail()
+ (flags.flagged ? ' flagged' : '')
+ (flags.unread_children && flags.seen && !this.env.autoexpand_threads ? ' unroot' : '')
+ (message.selected ? ' selected' : ''),
- // for performance use DOM instead of jQuery here
- row = document.createElement('tr');
-
- row.id = 'rcmrow'+uid;
+ row = { cols:[], style:{}, id:'rcmrow'+uid };
// message status icons
css_class = 'msgicon';
@@ -1806,8 +1842,7 @@ function rcube_webmail()
// add each submitted col
for (n in this.env.coltypes) {
c = this.env.coltypes[n];
- col = document.createElement('td');
- col.className = String(c).toLowerCase();
+ col = { className: String(c).toLowerCase() };
if (c == 'flag') {
css_class = (flags.flagged ? 'flagged' : 'unflagged');
@@ -1852,8 +1887,7 @@ function rcube_webmail()
html = cols[c];
col.innerHTML = html;
-
- row.appendChild(col);
+ row.cols.push(col);
}
list.insert_row(row, attop);
@@ -1954,7 +1988,7 @@ function rcube_webmail()
}
else {
if (!preview && this.env.message_extwin && !this.env.extwin)
- this.open_window(this.env.comm_path+url, 1000, 1200);
+ this.open_window(this.env.comm_path+url, true);
else
this.location_href(this.env.comm_path+url, target, true);
@@ -1980,14 +2014,18 @@ function rcube_webmail()
if (name && (frame = this.get_frame_element(name))) {
if (!show && (win = this.get_frame_window(name))) {
- if (win.location && win.location.href.indexOf(this.env.blankpage)<0)
- win.location.href = this.env.blankpage;
+ if (win.stop)
+ win.stop();
+ else // IE
+ win.document.execCommand('Stop');
+
+ win.location.href = this.env.blankpage;
}
else if (!bw.safari && !bw.konq)
$(frame)[show ? 'show' : 'hide']();
}
- if (!show && this.busy)
+ if (!show && this.env.frame_lock)
this.set_busy(false, null, this.env.frame_lock);
};
@@ -2115,12 +2153,12 @@ function rcube_webmail()
this.clear_message_list = function()
{
- this.env.messages = {};
- this.last_selected = 0;
+ this.env.messages = {};
+ this.last_selected = 0;
- this.show_contentframe(false);
- if (this.message_list)
- this.message_list.clear(true);
+ this.show_contentframe(false);
+ if (this.message_list)
+ this.message_list.clear(true);
};
// send remote request to load message list
@@ -2216,7 +2254,7 @@ function rcube_webmail()
if (root)
row = rows[root] ? rows[root].obj : null;
else
- row = this.message_list.list.tBodies[0].firstChild;
+ row = this.message_list.tbody.firstChild;
while (row) {
if (row.nodeType == 1 && (r = rows[row.uid])) {
@@ -2392,7 +2430,7 @@ function rcube_webmail()
this.delete_excessive_thread_rows = function()
{
var rows = this.message_list.rows,
- tbody = this.message_list.list.tBodies[0],
+ tbody = this.message_list.tbody,
row = tbody.firstChild,
cnt = this.env.pagesize + 1;
@@ -2565,7 +2603,7 @@ function rcube_webmail()
// Hide message command buttons until a message is selected
this.enable_command(this.env.message_commands, false);
- this._with_selected_messages('moveto', post_data, lock);
+ this._with_selected_messages('move', post_data, lock);
};
// delete selected messages from the current mailbox
@@ -2624,7 +2662,7 @@ function rcube_webmail()
this._with_selected_messages('delete', post_data);
};
- // Send a specifc moveto/delete request with UIDs of all selected messages
+ // Send a specifc move/delete request with UIDs of all selected messages
// @private
this._with_selected_messages = function(action, post_data, lock)
{
@@ -2666,7 +2704,7 @@ function rcube_webmail()
this.delete_excessive_thread_rows();
if (!lock) {
- msg = action == 'moveto' ? 'movingmessage' : 'deletingmessage';
+ msg = action == 'move' ? 'movingmessage' : 'deletingmessage';
lock = this.display_message(this.get_label(msg), 'loading');
}
@@ -2980,11 +3018,12 @@ function rcube_webmail()
// open new compose window
if (this.env.compose_extwin && !this.env.extwin) {
- this.open_window(url, 1150, 900);
+ this.open_window(url);
}
else {
this.redirect(url);
- window.resizeTo(Math.max(1150, $(window).width()), Math.max(900, $(window).height()));
+ if (this.env.extwin)
+ window.resizeTo(Math.max(this.env.popup_width, $(window).width()), $(window).height() + 24);
}
};
@@ -3026,7 +3065,7 @@ function rcube_webmail()
this.set_caret_pos(input_message, this.env.top_posting ? 0 : $(input_message).val().length);
// add signature according to selected identity
// if we have HTML editor, signature is added in callback
- if (input_from.prop('type') == 'select-one' && !this.env.opened_extwin) {
+ if (input_from.prop('type') == 'select-one') {
this.change_identity(input_from[0]);
}
}
@@ -3087,12 +3126,18 @@ function rcube_webmail()
this.compose_recipient_select = function(list)
{
- this.enable_command('add-recipient', list.selection.length > 0);
+ var id, n, recipients = 0;
+ for (n=0; n < list.selection.length; n++) {
+ id = list.selection[n];
+ if (this.env.contactdata[id])
+ recipients++;
+ }
+ this.enable_command('add-recipient', recipients);
};
this.compose_add_recipient = function(field)
{
- var recipients = [], input = $('#_'+field);
+ var recipients = [], input = $('#_'+field), delim = this.env.recipients_delimiter;
if (this.contact_list && this.contact_list.selection.length) {
for (var id, n=0; n < this.contact_list.selection.length; n++) {
@@ -3111,8 +3156,10 @@ function rcube_webmail()
}
if (recipients.length && input.length) {
- var oldval = input.val();
- input.val((oldval ? oldval + this.env.recipients_delimiter : '') + recipients.join(this.env.recipients_delimiter));
+ var oldval = input.val(), rx = new RegExp(RegExp.escape(delim) + '\\s*$');
+ if (oldval && !rx.test(oldval))
+ oldval += delim + ' ';
+ input.val(oldval + recipients.join(delim + ' ') + delim + ' ');
this.triggerEvent('add-recipient', { field:field, recipients:recipients });
}
};
@@ -3302,6 +3349,15 @@ function rcube_webmail()
this.set_draft_id = function(id)
{
+ var rc;
+
+ if (!this.env.draft_id && id && (rc = this.opener())) {
+ // refresh the drafts folder in opener window
+ if (rc.env.task == 'mail' && rc.env.action == '' && rc.env.mailbox == this.env.drafts_mailbox)
+ rc.command('checkmail');
+ }
+
+ this.env.draft_id = id;
$("input[name='_draft_saveid']").val(id);
};
@@ -3346,12 +3402,54 @@ function rcube_webmail()
if (!show_sig)
show_sig = this.env.show_sig;
- var cursor_pos, p = -1,
+ // first function execution
+ if (!this.env.identities_initialized) {
+ this.env.identities_initialized = true;
+ if (this.env.show_sig_later)
+ this.env.show_sig = true;
+ if (this.env.opened_extwin)
+ return;
+ }
+
+ var i, rx, cursor_pos, p = -1,
id = obj.options[obj.selectedIndex].value,
input_message = $("[name='_message']"),
message = input_message.val(),
is_html = ($("input[name='_is_html']").val() == '1'),
- sig = this.env.identity;
+ sig = this.env.identity,
+ delim = this.env.recipients_delimiter,
+ headers = ['replyto', 'bcc'];
+
+ // update reply-to/bcc fields with addresses defined in identities
+ for (i in headers) {
+ var key = headers[i],
+ old_val = sig && this.env.identities[sig] ? this.env.identities[sig][key] : '',
+ new_val = id && this.env.identities[id] ? this.env.identities[id][key] : '',
+ input = $('[name="_'+key+'"]'), input_val = input.val();
+
+ // remove old address(es)
+ if (old_val && input_val) {
+ rx = new RegExp('\\s*' + RegExp.escape(old_val) + '\\s*');
+ input_val = input_val.replace(rx, '');
+ }
+
+ // cleanup
+ rx = new RegExp(RegExp.escape(delim) + '\\s*' + RegExp(delim), 'g');
+ input_val = input_val.replace(rx, delim)
+ rx = new RegExp('^\\s*' + RegExp.escape(delim) + '\\s*$');
+ input_val = input_val.replace(rx, '')
+
+ // add new address(es)
+ if (new_val) {
+ rx = new RegExp(RegExp.escape(delim) + '\\s*$');
+ if (input_val && !rx.test(input_val))
+ input_val += delim + ' ';
+ input_val += new_val + delim + ' ';
+ }
+
+ if (old_val || new_val)
+ input.val(input_val).change();
+ }
// enable manual signature insert
if (this.env.signatures && this.env.signatures[id]) {
@@ -3367,7 +3465,7 @@ function rcube_webmail()
sig = this.env.signatures[sig].text;
sig = sig.replace(/\r\n/g, '\n');
- p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig);
+ p = this.env.top_posting ? message.indexOf(sig) : message.lastIndexOf(sig);
if (p >= 0)
message = message.substring(0, p) + message.substring(p+sig.length, message.length);
}
@@ -3376,7 +3474,7 @@ function rcube_webmail()
sig = this.env.signatures[id].text;
sig = sig.replace(/\r\n/g, '\n');
- if (this.env.sig_above) {
+ if (this.env.top_posting) {
if (p >= 0) { // in place of removed signature
message = message.substring(0, p) + sig + message.substring(p, message.length);
cursor_pos = p - 1;
@@ -3420,7 +3518,7 @@ function rcube_webmail()
sigElem = doc.createElement('div');
sigElem.setAttribute('id', '_rc_sig');
- if (this.env.sig_above) {
+ if (this.env.top_posting) {
// if no existing sig and top posting then insert at caret pos
editor.getWin().focus(); // correct focus in IE & Chrome
@@ -3451,8 +3549,8 @@ function rcube_webmail()
return true;
};
- // upload attachment file
- this.upload_file = function(form)
+ // upload (attachment) file
+ this.upload_file = function(form, action)
{
if (!form)
return false;
@@ -3479,7 +3577,7 @@ function rcube_webmail()
return;
}
- var frame_name = this.async_upload_form(form, 'upload', function(e) {
+ var frame_name = this.async_upload_form(form, action || 'upload', function(e) {
var d, content = '';
try {
if (this.contentDocument) {
@@ -3677,15 +3775,19 @@ function rcube_webmail()
this.env.search_id = null;
};
- this.sent_successfully = function(type, msg)
+ this.sent_successfully = function(type, msg, target)
{
this.display_message(msg, type);
if (this.env.extwin) {
- var opener_rc = this.opener();
+ var rc = this.opener();
this.lock_form(this.gui_objects.messageform);
- if (opener_rc)
- opener_rc.display_message(msg, type);
+ if (rc) {
+ rc.display_message(msg, type);
+ // refresh the folder where sent message was saved
+ if (target && rc.env.task == 'mail' && rc.env.action == '' && rc.env.mailbox == target)
+ rc.command('checkmail');
+ }
setTimeout(function(){ window.close() }, 1000);
}
else {
@@ -4057,43 +4159,55 @@ function rcube_webmail()
if (this.preview_timer)
clearTimeout(this.preview_timer);
- var n, id, sid, ref = this, writable = false,
+ var n, id, sid, contact, ref = this, writable = false,
source = this.env.source ? this.env.address_sources[this.env.source] : null;
+ // we don't have dblclick handler here, so use 200 instead of this.dblclick_time
if (id = list.get_single_selection())
this.preview_timer = setTimeout(function(){ ref.load_contact(id, 'show'); }, 200);
else if (this.env.contentframe)
this.show_contentframe(false);
if (list.selection.length) {
+ list.draggable = false;
+
// no source = search result, we'll need to detect if any of
// selected contacts are in writable addressbook to enable edit/delete
// we'll also need to know sources used in selection for copy
// and group-addmember operations (drag&drop)
this.env.selection_sources = [];
- if (!source) {
- for (n in list.selection) {
+
+ if (source) {
+ this.env.selection_sources.push(this.env.source);
+ }
+
+ for (n in list.selection) {
+ contact = list.data[list.selection[n]];
+ if (!source) {
sid = String(list.selection[n]).replace(/^[^-]+-/, '');
if (sid && this.env.address_sources[sid]) {
- writable = writable || !this.env.address_sources[sid].readonly;
+ writable = writable || (!this.env.address_sources[sid].readonly && !contact.readonly);
this.env.selection_sources.push(sid);
}
}
- this.env.selection_sources = $.unique(this.env.selection_sources);
- }
- else {
- this.env.selection_sources.push(this.env.source);
- writable = !source.readonly;
+ else {
+ writable = writable || (!source.readonly && !contact.readonly);
+ }
+
+ if (contact._type != 'group')
+ list.draggable = true;
}
+
+ this.env.selection_sources = $.unique(this.env.selection_sources);
}
// if a group is currently selected, and there is at least one contact selected
// thend we can enable the group-remove-selected command
- this.enable_command('group-remove-selected', this.env.group && list.selection.length > 0);
+ this.enable_command('group-remove-selected', this.env.group && list.selection.length > 0 && writable);
this.enable_command('compose', this.env.group || list.selection.length > 0);
- this.enable_command('export-selected', list.selection.length > 0);
+ this.enable_command('export-selected', 'copy', list.selection.length > 0);
this.enable_command('edit', id && writable);
- this.enable_command('delete', list.selection.length && writable);
+ this.enable_command('delete', 'move', list.selection.length > 0 && writable);
return false;
};
@@ -4121,11 +4235,29 @@ function rcube_webmail()
else if (!this.env.search_request)
folder = group ? 'G'+src+group : src;
- this.select_folder(folder, '', true);
-
this.env.source = src;
this.env.group = group;
+ // truncate groups listing stack
+ var index = $.inArray(this.env.group, this.env.address_group_stack);
+ if (index < 0)
+ this.env.address_group_stack = [];
+ else
+ this.env.address_group_stack = this.env.address_group_stack.slice(0,index);
+
+ // make sure the current group is on top of the stack
+ if (this.env.group) {
+ this.env.address_group_stack.push(this.env.group);
+
+ // mark the first group on the stack as selected in the directory list
+ folder = 'G'+src+this.env.address_group_stack[0];
+ }
+ else if (this.gui_objects.addresslist_title) {
+ $(this.gui_objects.addresslist_title).html(this.get_label('contacts'));
+ }
+
+ this.select_folder(folder, '', true);
+
// load contacts remotely
if (this.gui_objects.contactslist) {
this.list_contacts_remote(src, group, page);
@@ -4180,16 +4312,38 @@ function rcube_webmail()
this.list_contacts_clear = function()
{
+ this.contact_list.data = {};
this.contact_list.clear(true);
this.show_contentframe(false);
- this.enable_command('delete', false);
+ this.enable_command('delete', 'move', 'copy', false);
this.enable_command('compose', this.env.group ? true : false);
};
+ this.set_group_prop = function(prop)
+ {
+ if (this.gui_objects.addresslist_title) {
+ var boxtitle = $(this.gui_objects.addresslist_title).html(''); // clear contents
+
+ // add link to pop back to parent group
+ if (this.env.address_group_stack.length > 1) {
+ $('<a href="#list">...</a>')
+ .addClass('poplink')
+ .appendTo(boxtitle)
+ .click(function(e){ return ref.command('popgroup','',this); });
+ boxtitle.append('&nbsp;&raquo;&nbsp;');
+ }
+
+ boxtitle.append($('<span>'+prop.name+'</span>'));
+ }
+
+ this.triggerEvent('groupupdate', prop);
+ };
+
// load contact record
this.load_contact = function(cid, action, framed)
{
- var win, url = {}, target = window;
+ var win, url = {}, target = window,
+ rec = this.contact_list ? this.contact_list.data[cid] : null;
if (win = this.get_frame_window(this.env.contentframe)) {
url._framed = 1;
@@ -4199,7 +4353,9 @@ function rcube_webmail()
// load dummy content, unselect selected row(s)
if (!cid)
this.contact_list.clear_selection();
- this.enable_command('delete', 'compose', 'export-selected', cid);
+
+ this.enable_command('compose', rec && rec.email);
+ this.enable_command('export-selected', rec && rec._type != 'group');
}
else if (framed)
return false;
@@ -4229,14 +4385,38 @@ function rcube_webmail()
this.http_post('group-'+what+'members', post_data, lock);
};
- // copy a contact to the specified target (group or directory)
- this.copy_contact = function(cid, to)
+ this.contacts_drag_menu = function(e, to)
+ {
+ var dest = to.type == 'group' ? to.source : to.id,
+ source = this.env.source;
+
+ if (!this.env.address_sources[dest] || this.env.address_sources[dest].readonly)
+ return true;
+
+ // search result may contain contacts from many sources, but if there is only one...
+ if (source == '' && this.env.selection_sources.length == 1)
+ source = this.env.selection_sources[0];
+
+ if (to.type == 'group' && dest == source) {
+ var cid = this.contact_list.get_selection().join(',');
+ this.group_member_change('add', cid, dest, to.id);
+ return true;
+ }
+ // move action is not possible, "redirect" to copy if menu wasn't requested
+ else if (!this.commands.move && rcube_event.get_modifier(e) != SHIFT_KEY) {
+ this.copy_contacts(to);
+ return true;
+ }
+
+ return this.drag_menu(e, to);
+ };
+
+ // copy contact(s) to the specified target (group or directory)
+ this.copy_contacts = function(to)
{
var n, dest = to.type == 'group' ? to.source : to.id,
source = this.env.source,
- group = this.env.group ? this.env.group : '';
-
- if (!cid)
+ group = this.env.group ? this.env.group : '',
cid = this.contact_list.get_selection().join(',');
if (!cid || !this.env.address_sources[dest] || this.env.address_sources[dest].readonly)
@@ -4249,13 +4429,12 @@ function rcube_webmail()
// tagret is a group
if (to.type == 'group') {
if (dest == source)
- this.group_member_change('add', cid, dest, to.id);
- else {
- var lock = this.display_message(this.get_label('copyingcontact'), 'loading'),
- post_data = {_cid: cid, _source: this.env.source, _to: dest, _togid: to.id, _gid: group};
+ return;
- this.http_post('copy', post_data, lock);
- }
+ var lock = this.display_message(this.get_label('copyingcontact'), 'loading'),
+ post_data = {_cid: cid, _source: this.env.source, _to: dest, _togid: to.id, _gid: group};
+
+ this.http_post('copy', post_data, lock);
}
// target is an addressbook
else if (to.id != source) {
@@ -4266,19 +4445,53 @@ function rcube_webmail()
}
};
+ // move contact(s) to the specified target (group or directory)
+ this.move_contacts = function(to)
+ {
+ var dest = to.type == 'group' ? to.source : to.id,
+ source = this.env.source,
+ group = this.env.group ? this.env.group : '';
+
+ if (!this.env.address_sources[dest] || this.env.address_sources[dest].readonly)
+ return;
+
+ // search result may contain contacts from many sources, but if there is only one...
+ if (source == '' && this.env.selection_sources.length == 1)
+ source = this.env.selection_sources[0];
+
+ if (to.type == 'group') {
+ if (dest == source)
+ return;
+
+ this._with_selected_contacts('move', {_to: dest, _togid: to.id});
+ }
+ // target is an addressbook
+ else if (to.id != source)
+ this._with_selected_contacts('move', {_to: to.id});
+ };
+
+ // delete contact(s)
this.delete_contacts = function()
{
- var selection = this.contact_list.get_selection(),
- undelete = this.env.source && this.env.address_sources[this.env.source].undelete;
+ var undelete = this.env.source && this.env.address_sources[this.env.source].undelete;
- // exit if no mailbox specified or if selection is empty
- if (!(selection.length || this.env.cid) || (!undelete && !confirm(this.get_label('deletecontactconfirm'))))
+ if (!undelete && !confirm(this.get_label('deletecontactconfirm')))
return;
- var id, n, a_cids = [],
- post_data = {_source: this.env.source, _from: (this.env.action ? this.env.action : '')},
- lock = this.display_message(this.get_label('contactdeleting'), 'loading');
+ return this._with_selected_contacts('delete');
+ };
+
+ this._with_selected_contacts = function(action, post_data)
+ {
+ var selection = this.contact_list ? this.contact_list.get_selection() : [];
+
+ // exit if no mailbox specified or if selection is empty
+ if (!selection.length && !this.env.cid)
+ return;
+ var n, a_cids = [],
+ label = action == 'delete' ? 'contactdeleting' : 'movingcontact',
+ lock = this.display_message(this.get_label(label), 'loading');
if (this.env.cid)
a_cids.push(this.env.cid);
else {
@@ -4293,6 +4506,11 @@ function rcube_webmail()
this.show_contentframe(false);
}
+ if (!post_data)
+ post_data = {};
+
+ post_data._source = this.env.source;
+ post_data._from = this.env.action;
post_data._cid = a_cids.join(',');
if (this.env.group)
@@ -4303,13 +4521,13 @@ function rcube_webmail()
post_data._search = this.env.search_request;
// send request to server
- this.http_post('delete', post_data, lock)
+ this.http_post(action, post_data, lock)
return true;
};
// update a contact record in the list
- this.update_contact_row = function(cid, cols_arr, newcid, source)
+ this.update_contact_row = function(cid, cols_arr, newcid, source, data)
{
var c, row, list = this.contact_list;
@@ -4322,31 +4540,18 @@ function rcube_webmail()
newcid = newcid+'-'+source;
}
- if (list.rows[cid] && (row = list.rows[cid].obj)) {
- for (c=0; c<cols_arr.length; c++)
- if (row.cells[c])
- $(row.cells[c]).html(cols_arr[c]);
-
- // cid change
- if (newcid) {
- newcid = this.html_identifier(newcid);
- row.id = 'rcmrow' + newcid;
- list.remove_row(cid);
- list.init_row(row);
- list.selection[0] = newcid;
- row.style.display = '';
- }
- }
+ list.update_row(cid, cols_arr, newcid, true);
+ list.data[cid] = data;
};
// add row to contacts list
- this.add_contact_row = function(cid, cols, classes)
+ this.add_contact_row = function(cid, cols, classes, data)
{
if (!this.gui_objects.contactslist)
return false;
var c, col, list = this.contact_list,
- row = document.createElement('tr');
+ row = { cols:[] };
row.id = 'rcmrow'+this.html_identifier(cid);
row.className = 'contact ' + (classes || '');
@@ -4356,12 +4561,14 @@ function rcube_webmail()
// add each submitted col
for (c in cols) {
- col = document.createElement('td');
+ col = {};
col.className = String(c).toLowerCase();
col.innerHTML = cols[c];
- row.appendChild(col);
+ row.cols.push(col);
}
+ // store data in list member
+ list.data[cid] = data;
list.insert_row(row);
this.enable_command('export', list.rowcount > 0);
@@ -4465,11 +4672,22 @@ function rcube_webmail()
this.name_input.bind('keydown', function(e){ return rcmail.add_input_keydown(e); });
this.name_input_li = $('<li>').addClass(type).append(this.name_input);
- var li = type == 'contactsearch' ? $('li:last', this.gui_objects.folderlist) : $('ul.groups li:last', this.get_folder_li(this.env.source,'',true));
+ var ul, li;
+
+ // find list (UL) element
+ if (type == 'contactsearch')
+ ul = this.gui_objects.folderlist;
+ else
+ ul = $('ul.groups', this.get_folder_li(this.env.source,'',true));
+
+ // append to the list
+ li = $('li:last', ul);
if (li.length)
this.name_input_li.insertAfter(li);
- else
- this.name_input_li.appendTo(type == 'contactsearch' ? this.gui_objects.folderlist : $('ul.groups', this.get_folder_li(this.env.source,'',true)));
+ else {
+ this.name_input_li.appendTo(ul);
+ ul.show(); // make sure the list is visible
+ }
}
this.name_input.select().focus();
@@ -4526,11 +4744,13 @@ function rcube_webmail()
this.reset_add_input = function()
{
if (this.name_input) {
+ var li = this.name_input.parent();
if (this.env.group_renaming) {
- var li = this.name_input.parent();
li.children().last().show();
this.env.group_renaming = false;
}
+ else if ($('li', li.parent()).length == 1)
+ li.parent().hide();
this.name_input.remove();
@@ -4958,18 +5178,16 @@ function rcube_webmail()
this.update_identity_row = function(id, name, add)
{
- var row, col, list = this.identity_list,
+ var list = this.identity_list,
rid = this.html_identifier(id);
- if (list.rows[rid] && (row = list.rows[rid].obj)) {
- $(row.cells[0]).html(name);
- }
- else if (add) {
- row = $('<tr>').attr('id', 'rcmrow'+rid).get(0);
- col = $('<td>').addClass('mail').html(name).appendTo(row);
- list.insert_row(row);
+ if (add) {
+ list.insert_row({ id:'rcmrow'+rid, cols:[ { className:'mail', innerHTML:name } ] });
list.select(rid);
}
+ else {
+ list.update_row(rid, [ name ]);
+ }
};
@@ -5660,11 +5878,11 @@ function rcube_webmail()
};
// open a jquery UI dialog with the given content
- this.show_popup_dialog = function(html, title)
+ this.show_popup_dialog = function(html, title, buttons)
{
// forward call to parent window
if (this.is_framed()) {
- parent.rcmail.show_popup_dialog(html, title);
+ parent.rcmail.show_popup_dialog(html, title, buttons);
return;
}
@@ -5672,17 +5890,21 @@ function rcube_webmail()
.html(html)
.dialog({
title: title,
+ buttons: buttons,
modal: true,
resizable: true,
- width: 580,
+ width: 500,
close: function(event, ui) { $(this).remove() }
});
- // resize and center popup
- var win = $(window), w = win.width(), h = win.height(),
- width = popup.width(), height = popup.height();
- popup.dialog('option', { height: Math.min(h-40, height+50), width: Math.min(w-20, width+50) })
- .dialog('option', 'position', ['center', 'center']); // only works in a separate call (!?)
+ // resize and center popup
+ var win = $(window), w = win.width(), h = win.height(),
+ width = popup.width(), height = popup.height();
+
+ popup.dialog('option', {
+ height: Math.min(h - 40, height + 75 + (buttons ? 50 : 0)),
+ width: Math.min(w - 20, width + 20)
+ });
};
// enable/disable buttons for page shifting
@@ -5744,7 +5966,7 @@ function rcube_webmail()
this.set_message_coltypes = function(coltypes, repl, smart_col)
{
var list = this.message_list,
- thead = list ? list.list.tHead : null,
+ thead = list ? list.thead : null,
cell, col, n, len, th, tr;
this.env.coltypes = coltypes;
@@ -5757,14 +5979,14 @@ function rcube_webmail()
for (c=0, len=repl.length; c < len; c++) {
cell = document.createElement('td');
- cell.innerHTML = repl[c].html;
+ cell.innerHTML = repl[c].html || '';
if (repl[c].id) cell.id = repl[c].id;
if (repl[c].className) cell.className = repl[c].className;
tr.appendChild(cell);
}
th.appendChild(tr);
thead.parentNode.replaceChild(th, thead);
- thead = th;
+ list.thead = thead = th;
}
for (n=0, len=this.env.coltypes.length; n<len; n++) {
@@ -6174,7 +6396,7 @@ function rcube_webmail()
this.enable_command('export-selected', false);
}
- case 'moveto':
+ case 'move':
if (this.env.action == 'show') {
// re-enable commands on move/delete error
this.enable_command(this.env.message_commands, true);
@@ -6215,6 +6437,7 @@ function rcube_webmail()
if ((response.action == 'list' || response.action == 'search') && this.message_list) {
this.msglist_select(this.message_list);
+ this.message_list.resize();
this.triggerEvent('listupdate', { folder:this.env.mailbox, rowcount:this.message_list.rowcount });
}
}
@@ -6225,6 +6448,7 @@ function rcube_webmail()
this.enable_command('search-create', this.env.source == '');
this.enable_command('search-delete', this.env.search_id);
this.update_group_commands();
+ this.contact_list.resize();
this.triggerEvent('listupdate', { folder:this.env.source, rowcount:this.contact_list.rowcount });
}
}
@@ -6386,9 +6610,10 @@ function rcube_webmail()
url: ref.url(ref.env.filedrop.action||'upload', { _id:ref.env.compose_id||ref.env.cid||'', _uploadid:ts, _remote:1 }),
contentType: formdata ? false : 'multipart/form-data; boundary=' + boundary,
processData: false,
+ timeout: 0, // disable default timeout set in ajaxSetup()
data: formdata || multipart,
headers: {'X-Roundcube-Request': ref.env.request_token},
- beforeSend: function(xhr, s) { if (!formdata && xhr.sendAsBinary) xhr.send = xhr.sendAsBinary; },
+ xhr: function() { var xhr = jQuery.ajaxSettings.xhr(); if (!formdata && xhr.sendAsBinary) xhr.send = xhr.sendAsBinary; return xhr; },
success: function(data){ ref.http_response(data); },
error: function(o, status, err) { ref.http_error(o, status, err, null, 'attachment'); }
});
@@ -6428,7 +6653,7 @@ function rcube_webmail()
multipart += '; filename="' + (f.name_bin || file.name) + '"' + crlf;
multipart += 'Content-Length: ' + file.size + crlf;
multipart += 'Content-Type: ' + file.type + crlf + crlf;
- multipart += e.target.result + crlf;
+ multipart += reader.result + crlf;
multipart += dashdash + boundary + crlf;
if (j == last) // we're done, submit the data
diff --git a/program/js/common.js b/program/js/common.js
index 1075225b4..de07ec131 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -251,7 +251,7 @@ remove_listener: function(p)
},
/**
- * Prevent event propagation and bubbeling
+ * Prevent event propagation and bubbling
*/
cancel: function(evt)
{
@@ -298,8 +298,7 @@ addEventListener: function(evt, func, obj)
if (!this._events[evt])
this._events[evt] = [];
- var e = {func:func, obj:obj ? obj : window};
- this._events[evt][this._events[evt].length] = e;
+ this._events[evt].push({func:func, obj:obj ? obj : window});
},
/**
@@ -372,117 +371,6 @@ triggerEvent: function(evt, e)
}; // end rcube_event_engine.prototype
-
-/**
- * Roundcube generic layer (floating box) class
- *
- * @constructor
- */
-function rcube_layer(id, attributes)
-{
- this.name = id;
-
- // create a new layer in the current document
- this.create = function(arg)
- {
- var l = (arg.x) ? arg.x : 0,
- t = (arg.y) ? arg.y : 0,
- w = arg.width,
- h = arg.height,
- z = arg.zindex,
- vis = arg.vis,
- parent = arg.parent,
- obj = document.createElement('DIV');
-
- obj.id = this.name;
- obj.style.position = 'absolute';
- obj.style.visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden';
- obj.style.left = l+'px';
- obj.style.top = t+'px';
- if (w)
- obj.style.width = w.toString().match(/\%$/) ? w : w+'px';
- if (h)
- obj.style.height = h.toString().match(/\%$/) ? h : h+'px';
- if (z)
- obj.style.zIndex = z;
-
- if (parent)
- parent.appendChild(obj);
- else
- document.body.appendChild(obj);
-
- this.elm = obj;
- };
-
- // create new layer
- if (attributes != null) {
- this.create(attributes);
- this.name = this.elm.id;
- }
- else // just refer to the object
- this.elm = document.getElementById(id);
-
- if (!this.elm)
- return false;
-
-
- // ********* layer object properties *********
-
- this.css = this.elm.style;
- this.event = this.elm;
- this.width = this.elm.offsetWidth;
- this.height = this.elm.offsetHeight;
- this.x = parseInt(this.elm.offsetLeft);
- this.y = parseInt(this.elm.offsetTop);
- this.visible = (this.css.visibility=='visible' || this.css.visibility=='show' || this.css.visibility=='inherit') ? true : false;
-
-
- // ********* layer object methods *********
-
- // move the layer to a specific position
- this.move = function(x, y)
- {
- this.x = x;
- this.y = y;
- this.css.left = Math.round(this.x)+'px';
- this.css.top = Math.round(this.y)+'px';
- };
-
- // change the layers width and height
- this.resize = function(w,h)
- {
- this.css.width = w+'px';
- this.css.height = h+'px';
- this.width = w;
- this.height = h;
- };
-
- // show or hide the layer
- this.show = function(a)
- {
- if(a == 1) {
- this.css.visibility = 'visible';
- this.visible = true;
- }
- else if(a == 2) {
- this.css.visibility = 'inherit';
- this.visible = true;
- }
- else {
- this.css.visibility = 'hidden';
- this.visible = false;
- }
- };
-
- // write new content into a Layer
- this.write = function(cont)
- {
- this.elm.innerHTML = cont;
- };
-
-};
-
-
// check if input is a valid email address
// By Cal Henderson <cal@iamcal.com>
// http://code.iamcal.com/php/rfc822/
@@ -537,7 +425,7 @@ function rcube_clone_object(obj)
for (var key in obj) {
if (obj[key] && typeof obj[key] === 'object')
- out[key] = clone_object(obj[key]);
+ out[key] = rcube_clone_object(obj[key]);
else
out[key] = obj[key];
}
@@ -717,7 +605,7 @@ if (bw.ie) {
// jQuery plugin to emulate HTML5 placeholder attributes on input elements
jQuery.fn.placeholder = function(text) {
return this.each(function() {
- var elem = $(this);
+ var active = false, elem = $(this);
this.title = text;
// Try HTML5 placeholder attribute first
@@ -742,8 +630,9 @@ jQuery.fn.placeholder = function(text) {
elem[(active ? 'addClass' : 'removeClass')]('placeholder').attr('spellcheck', active);
});
- // Do not blur currently focused element
- if (this != document.activeElement)
+ // Do not blur currently focused element (catch exception: #1489008)
+ try { active = this == document.activeElement; } catch(e) {}
+ if (!active)
elem.blur();
}
});
diff --git a/program/js/editor.js b/program/js/editor.js
index 3782de869..e403d1f63 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -41,7 +41,7 @@ function rcmail_editor_init(config)
$.extend(conf, {
plugins: 'paste,tabfocus',
theme_advanced_buttons1: 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr,link,unlink,code,forecolor',
- theme_advanced_buttons2: ',fontselect,fontsizeselect'
+ theme_advanced_buttons2: 'fontselect,fontsizeselect'
});
else { // mail compose
$.extend(conf, {
@@ -80,7 +80,7 @@ function rcmail_editor_callback()
if (rcmail.env.default_font)
$(tinyMCE.get(rcmail.env.composebody).getBody()).css('font-family', rcmail.env.default_font);
- if (elem && elem.type == 'select-one' && !rcmail.env.opened_extwin) {
+ if (elem && elem.type == 'select-one') {
rcmail.change_identity(elem);
// Focus previously focused element
if (fe && fe.id != rcmail.env.composebody) {
diff --git a/program/js/jstz.min.js b/program/js/jstz.min.js
index 81c5057fd..d5f888cac 100644
--- a/program/js/jstz.min.js
+++ b/program/js/jstz.min.js
@@ -1,11 +1,2 @@
-var jstz=function(){var b=function(a){a=-a.getTimezoneOffset();return null!==a?a:0},c=function(){return b(new Date(2010,0,1,0,0,0,0))},f=function(){return b(new Date(2010,5,1,0,0,0,0))},e=function(){var a=c(),d=f(),b=c()-f();return new jstz.TimeZone(jstz.olson.timezones[0>b?a+",1":0<b?d+",1,s":a+",0"])};return{determine_timezone:function(){"undefined"!==typeof console&&console.log("jstz.determine_timezone() is deprecated and will be removed in an upcoming version. Please use jstz.determine() instead.");
-return e()},determine:e,date_is_dst:function(a){var d=5<a.getMonth()?f():c(),a=b(a);return 0!==d-a}}}();jstz.TimeZone=function(b){var c=null,c=b;"undefined"!==typeof jstz.olson.ambiguity_list[c]&&function(){for(var b=jstz.olson.ambiguity_list[c],e=b.length,a=0,d=b[0];a<e;a+=1)if(d=b[a],jstz.date_is_dst(jstz.olson.dst_start_dates[d])){c=d;break}}();return{name:function(){return c}}};jstz.olson={};
-jstz.olson.timezones={"-720,0":"Etc/GMT+12","-660,0":"Pacific/Pago_Pago","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax",
-"-240,0":"America/Santo_Domingo","-240,1,s":"America/Asuncion","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Argentina/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"Etc/GMT+2","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"Etc/UTC","0,1":"Europe/London","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,s":"Africa/Windhoek","120,1":"Asia/Beirut","120,0":"Africa/Johannesburg","180,1":"Europe/Moscow","180,0":"Asia/Baghdad",
-"210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Yerevan","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Kolkata","345,0":"Asia/Kathmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide",
-"600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Tarawa","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"};
-jstz.olson.dst_start_dates={"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"Atlantic/Stanley":new Date(2011,8,4,7,0,0,0),"America/Asuncion":new Date(2011,9,2,3,0,0,0),"America/Santiago":new Date(2011,9,9,3,0,0,0),"America/Campo_Grande":new Date(2011,9,16,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,
-2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2011,2,13,2,0,0,0),"America/New_York":new Date(2011,2,13,7,0,0,0),"Asia/Gaza":new Date(2011,2,26,23,0,0,0),"Asia/Beirut":new Date(2011,2,27,1,0,0,0),"Europe/Minsk":new Date(2011,2,27,2,0,0,0),"Europe/Helsinki":new Date(2011,2,27,4,0,0,0),"Europe/Istanbul":new Date(2011,2,28,5,0,0,0),"Asia/Damascus":new Date(2011,3,1,2,0,0,0),"Asia/Jerusalem":new Date(2011,3,1,6,0,0,0),"Africa/Cairo":new Date(2010,3,30,4,0,0,
-0),"Asia/Yerevan":new Date(2011,2,27,4,0,0,0),"Asia/Baku":new Date(2011,2,27,8,0,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"Pacific/Fiji":new Date(2010,11,29,23,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0)};
-jstz.olson.ambiguity_list={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Asuncion":["Atlantic/Stanley","America/Asuncion","America/Santiago","America/Campo_Grande"],"America/Montevideo":["America/Montevideo","America/Sao_Paulo"],"Asia/Beirut":"Asia/Gaza Asia/Beirut Europe/Minsk Europe/Helsinki Europe/Istanbul Asia/Damascus Asia/Jerusalem Africa/Cairo".split(" "),"Asia/Yerevan":["Asia/Yerevan","Asia/Baku"],"Pacific/Auckland":["Pacific/Auckland",
-"Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"]}; \ No newline at end of file
+/*! jsTimezoneDetect - v1.0.5 - 2013-04-01 */
+(function(e){var t=function(){"use strict";var e="s",n=2011,r=function(e){var t=-e.getTimezoneOffset();return t!==null?t:0},i=function(e,t,n){var r=new Date;return e!==undefined&&r.setFullYear(e),r.setDate(n),r.setMonth(t),r},s=function(e){return r(i(e,0,2))},o=function(e){return r(i(e,5,2))},u=function(e){var t=e.getMonth()>7?o(e.getFullYear()):s(e.getFullYear()),n=r(e);return t-n!==0},a=function(){var t=s(n),r=o(n),i=t-r;return i<0?t+",1":i>0?r+",1,"+e:t+",0"},f=function(){var e=a();return new t.TimeZone(t.olson.timezones[e])},l=function(e){var t=new Date(2010,6,15,1,0,0,0),n={"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"America/Asuncion":new Date(2012,9,7,3,0,0,0),"America/Santiago":new Date(2012,9,3,3,0,0,0),"America/Campo_Grande":new Date(2012,9,21,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2012,2,10,2,0,0,0),"America/New_York":new Date(2012,2,10,7,0,0,0),"Asia/Beirut":new Date(2011,2,27,1,0,0,0),"Europe/Helsinki":new Date(2011,2,27,4,0,0,0),"Europe/Istanbul":new Date(2011,2,28,5,0,0,0),"Asia/Damascus":new Date(2011,3,1,2,0,0,0),"Asia/Jerusalem":new Date(2011,3,1,6,0,0,0),"Asia/Gaza":new Date(2009,2,28,0,30,0,0),"Africa/Cairo":new Date(2009,3,25,0,30,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"Pacific/Fiji":new Date(2010,10,29,23,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0),"Europe/Moscow":t,"Asia/Yekaterinburg":t,"Asia/Omsk":t,"Asia/Krasnoyarsk":t,"Asia/Irkutsk":t,"Asia/Yakutsk":t,"Asia/Vladivostok":t,"Asia/Kamchatka":t,"Europe/Minsk":t,"Pacific/Apia":new Date(2010,10,1,1,0,0,0),"Australia/Perth":new Date(2008,10,1,1,0,0,0)};return n[e]};return{determine:f,date_is_dst:u,dst_start_for:l}}();t.TimeZone=function(e){"use strict";var n={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Santiago":["America/Santiago","America/Asuncion","America/Campo_Grande"],"America/Montevideo":["America/Montevideo","America/Sao_Paulo"],"Asia/Beirut":["Asia/Beirut","Europe/Helsinki","Europe/Istanbul","Asia/Damascus","Asia/Jerusalem","Asia/Gaza"],"Pacific/Auckland":["Pacific/Auckland","Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"],"Asia/Dubai":["Europe/Moscow"],"Asia/Dhaka":["Asia/Yekaterinburg"],"Asia/Jakarta":["Asia/Omsk"],"Asia/Shanghai":["Asia/Krasnoyarsk","Australia/Perth"],"Asia/Tokyo":["Asia/Irkutsk"],"Australia/Brisbane":["Asia/Yakutsk"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Tarawa":["Asia/Kamchatka"],"Pacific/Tongatapu":["Pacific/Apia"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"],"Asia/Baghdad":["Europe/Minsk"]},r=e,i=function(){var e=n[r],i=e.length,s=0,o=e[0];for(;s<i;s+=1){o=e[s];if(t.date_is_dst(t.dst_start_for(o))){r=o;return}}},s=function(){return typeof n[r]!="undefined"};return s()&&i(),{name:function(){return r}}},t.olson={},t.olson.timezones={"-720,0":"Pacific/Majuro","-660,0":"Pacific/Pago_Pago","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Santiago","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Argentina/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"America/Noronha","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"UTC","0,1":"Europe/London","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,s":"Africa/Windhoek","120,1":"Asia/Beirut","120,0":"Africa/Johannesburg","180,0":"Asia/Baghdad","180,1":"Europe/Moscow","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Baku","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Kolkata","345,0":"Asia/Kathmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Tarawa","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"},typeof exports!="undefined"?exports.jstz=t:e.jstz=t})(this); \ No newline at end of file
diff --git a/program/js/list.js b/program/js/list.js
index 9a531eaea..08e4444e1 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -30,6 +30,10 @@ function rcube_list_widget(list, p)
this.BACKSPACE_KEY = 8;
this.list = list ? list : null;
+ this.tagname = this.list ? this.list.nodeName.toLowerCase() : 'table';
+ this.thead;
+ this.tbody;
+ this.fixed_header;
this.frame = null;
this.rows = [];
this.selection = [];
@@ -55,8 +59,8 @@ function rcube_list_widget(list, p)
this.in_selection_before = false;
this.focused = false;
this.drag_mouse_start = null;
- this.dblclick_time = 600;
- this.row_init = function(){};
+ this.dblclick_time = 500; // default value on MS Windows is 500
+ this.row_init = function(){}; // @deprecated; use list.addEventListener('initrow') instead
// overwrite default paramaters
if (p && typeof p === 'object')
@@ -73,11 +77,19 @@ rcube_list_widget.prototype = {
*/
init: function()
{
- if (this.list && this.list.tBodies[0]) {
+ if (this.tagname == 'table' && this.list && this.list.tBodies[0]) {
+ this.thead = this.list.tHead;
+ this.tbody = this.list.tBodies[0];
+ }
+ else if (this.tagname != 'table' && this.list) {
+ this.tbody = this.list;
+ }
+
+ if (this.tbody) {
this.rows = [];
this.rowcount = 0;
- var r, len, rows = this.list.tBodies[0].rows;
+ var r, len, rows = this.tbody.childNodes;
for (r=0, len=rows.length; r<len; r++) {
this.init_row(rows[r]);
@@ -127,7 +139,8 @@ init_row: function(row)
if (document.all)
row.onselectstart = function() { return false; };
- this.row_init(this.rows[uid]);
+ this.row_init(this.rows[uid]); // legacy support
+ this.triggerEvent('initrow', this.rows[uid]);
}
},
@@ -137,16 +150,24 @@ init_row: function(row)
*/
init_header: function()
{
- if (this.list && this.list.tHead) {
+ if (this.thead) {
this.colcount = 0;
+ if (this.fixed_header) { // copy (modified) fixed header back to the actual table
+ $(this.list.tHead).replaceWith($(this.fixed_header).find('thead').clone());
+ $(this.list.tHead).find('tr td').attr('style', ''); // remove fixed widths
+ }
+ else if (this.list.className.indexOf('fixedheader') >= 0) {
+ this.init_fixed_header();
+ }
+
var col, r, p = this;
// add events for list columns moving
- if (this.column_movable && this.list.tHead && this.list.tHead.rows) {
- for (r=0; r<this.list.tHead.rows[0].cells.length; r++) {
+ if (this.column_movable && this.thead && this.thead.rows) {
+ for (r=0; r<this.thead.rows[0].cells.length; r++) {
if (this.column_fixed == r)
continue;
- col = this.list.tHead.rows[0].cells[r];
+ col = this.thead.rows[0].cells[r];
col.onmousedown = function(e){ return p.drag_column(e, this); };
this.colcount++;
}
@@ -154,16 +175,63 @@ init_header: function()
}
},
+init_fixed_header: function()
+{
+ var clone = $(this.list.tHead).clone();
+
+ if (!this.fixed_header) {
+ this.fixed_header = $('<table>')
+ .attr('class', this.list.className + ' fixedcopy')
+ .css({ position:'fixed' })
+ .append(clone)
+ .append('<tbody></tbody>');
+ $(this.list).before(this.fixed_header);
+
+ var me = this;
+ $(window).resize(function(){ me.resize() });
+ }
+ else {
+ $(this.fixed_header).find('thead').replaceWith(clone);
+ }
+
+ this.thead = clone.get(0);
+ this.resize();
+},
+
+resize: function()
+{
+ if (!this.fixed_header)
+ return;
+
+ var column_widths = [];
+
+ // get column widths from original thead
+ $(this.tbody).parent().find('thead tr td').each(function(index) {
+ column_widths[index] = $(this).width();
+ });
+
+ // apply fixed widths to fixed table header
+ $(this.thead).parent().width($(this.tbody).parent().width());
+ $(this.thead).find('tr td').each(function(index) {
+ $(this).css('width', column_widths[index]);
+ });
+},
/**
* Remove all list rows
*/
clear: function(sel)
{
- var tbody = document.createElement('tbody');
+ if (this.tagname == 'table') {
+ var tbody = document.createElement('tbody');
+ this.list.insertBefore(tbody, this.tbody);
+ this.list.removeChild(this.list.tBodies[1]);
+ this.tbody = tbody;
+ }
+ else {
+ $(this.row_tagname() + ':not(.thead)', this.tbody).remove();
+ }
- this.list.insertBefore(tbody, this.list.tBodies[0]);
- this.list.removeChild(this.list.tBodies[1]);
this.rows = [];
this.rowcount = 0;
@@ -181,12 +249,12 @@ clear: function(sel)
*/
remove_row: function(uid, sel_next)
{
- var obj = this.rows[uid] ? this.rows[uid].obj : null;
+ var node = this.rows[uid] ? this.rows[uid].obj : null;
- if (!obj)
+ if (!node)
return;
- obj.style.display = 'none';
+ node.style.display = 'none';
if (sel_next)
this.select_next();
@@ -199,12 +267,31 @@ remove_row: function(uid, sel_next)
/**
* Add row to the list and initialize it
*/
-insert_row: function(row, attop)
+insert_row: function(row, before)
{
- var tbody = this.list.tBodies[0];
+ var tbody = this.tbody;
+
+ // create a real dom node first
+ if (row.nodeName === undefined) {
+ // for performance reasons use DOM instead of jQuery here
+ var domrow = document.createElement(this.row_tagname());
+ if (row.id) domrow.id = row.id;
+ if (row.className) domrow.className = row.className;
+ if (row.style) $.extend(domrow.style, row.style);
+
+ for (var domcell, col, i=0; row.cols && i < row.cols.length; i++) {
+ col = row.cols[i];
+ domcell = document.createElement(this.col_tagname());
+ if (col.className) domcell.className = col.className;
+ if (col.innerHTML) domcell.innerHTML = col.innerHTML;
+ domrow.appendChild(domcell);
+ }
+
+ row = domrow;
+ }
- if (attop && tbody.rows.length)
- tbody.insertBefore(row, tbody.firstChild);
+ if (before && tbody.childNodes.length)
+ tbody.insertBefore(row, (typeof before == 'object' && before.parentNode == tbody) ? before : tbody.firstChild);
else
tbody.appendChild(row);
@@ -212,6 +299,28 @@ insert_row: function(row, attop)
this.rowcount++;
},
+/**
+ *
+ */
+update_row: function(id, cols, newid, select)
+{
+ var row = this.rows[id];
+ if (!row) return false;
+
+ var domrow = row.obj;
+ for (var domcell, col, i=0; cols && i < cols.length; i++) {
+ this.get_cell(domrow, i).html(cols[i]);
+ }
+
+ if (newid) {
+ delete this.rows[id];
+ domrow.id = 'rcmrow' + newid;
+ this.init_row(domrow);
+
+ if (select)
+ this.selection[0] = newid;
+ }
+},
/**
@@ -230,8 +339,9 @@ focus: function(e)
}
// Un-focus already focused elements (#1487123, #1487316, #1488600, #1488620)
+ // It looks that window.focus() does the job for all browsers, but not Firefox (#1489058)
$(':focus:not(body)').blur();
- $('iframe').each(function() { this.blur(); });
+ window.focus();
if (e || (e = window.event))
rcube_event.cancel(e);
@@ -270,8 +380,8 @@ drag_column: function(e, col)
this.add_dragfix();
// find selected column number
- for (var i=0; i<this.list.tHead.rows[0].cells.length; i++) {
- if (col == this.list.tHead.rows[0].cells[i]) {
+ for (var i=0; i<this.thead.rows[0].cells.length; i++) {
+ if (col == this.thead.rows[0].cells[i]) {
this.selected_column = i;
break;
}
@@ -434,6 +544,7 @@ collapse: function(row)
new_row = new_row.nextSibling;
}
+ this.resize();
this.triggerEvent('listupdate');
return false;
},
@@ -450,7 +561,7 @@ expand: function(row)
this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded, obj:row.obj });
}
else {
- var tbody = this.list.tBodies[0];
+ var tbody = this.tbody;
new_row = tbody.firstChild;
depth = 0;
last_expanded_parent_depth = 0;
@@ -482,6 +593,7 @@ expand: function(row)
new_row = new_row.nextSibling;
}
+ this.resize();
this.triggerEvent('listupdate');
return false;
},
@@ -503,7 +615,7 @@ collapse_all: function(row)
return false;
}
else {
- new_row = this.list.tBodies[0].firstChild;
+ new_row = this.tbody.firstChild;
depth = 0;
}
@@ -525,6 +637,7 @@ collapse_all: function(row)
new_row = new_row.nextSibling;
}
+ this.resize();
this.triggerEvent('listupdate');
return false;
},
@@ -542,7 +655,7 @@ expand_all: function(row)
this.triggerEvent('expandcollapse', { uid:row.uid, expanded:row.expanded, obj:row.obj });
}
else {
- new_row = this.list.tBodies[0].firstChild;
+ new_row = this.tbody.firstChild;
depth = 0;
}
@@ -563,6 +676,7 @@ expand_all: function(row)
new_row = new_row.nextSibling;
}
+ this.resize();
this.triggerEvent('listupdate');
return false;
},
@@ -610,7 +724,7 @@ get_prev_row: function()
get_first_row: function()
{
if (this.rowcount) {
- var i, len, rows = this.list.tBodies[0].rows;
+ var i, len, rows = this.tbody.childNodes;
for (i=0, len=rows.length-1; i<len; i++)
if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null)
@@ -623,7 +737,7 @@ get_first_row: function()
get_last_row: function()
{
if (this.rowcount) {
- var i, rows = this.list.tBodies[0].rows;
+ var i, rows = this.tbody.childNodes;
for (i=rows.length-1; i>=0; i--)
if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null)
@@ -633,6 +747,22 @@ get_last_row: function()
return null;
},
+row_tagname: function()
+{
+ var row_tagnames = { table:'tr', ul:'li', '*':'div' };
+ return row_tagnames[this.tagname] || row_tagnames['*'];
+},
+
+col_tagname: function()
+{
+ var col_tagnames = { table:'td', '*':'span' };
+ return col_tagnames[this.tagname] || col_tagnames['*'];
+},
+
+get_cell: function(row, index)
+{
+ return $(this.col_tagname(), row).eq(index);
+},
/**
* selects or unselects the proper row depending on the modifier key pressed
@@ -779,14 +909,20 @@ shift_select: function(id, control)
if (!this.rows[this.shift_start] || !this.selection.length)
this.shift_start = id;
- var n, from_rowIndex = this.rows[this.shift_start].obj.rowIndex,
- to_rowIndex = this.rows[id].obj.rowIndex,
- i = ((from_rowIndex < to_rowIndex)? from_rowIndex : to_rowIndex),
- j = ((from_rowIndex > to_rowIndex)? from_rowIndex : to_rowIndex);
+ var n, i, j, to_row = this.rows[id],
+ from_rowIndex = this._rowIndex(this.rows[this.shift_start].obj),
+ to_rowIndex = this._rowIndex(to_row.obj);
+
+ if (!to_row.expanded && to_row.has_children)
+ if (to_row = this.rows[(this.row_children(id)).pop()])
+ to_rowIndex = this._rowIndex(to_row.obj);
+
+ i = ((from_rowIndex < to_rowIndex) ? from_rowIndex : to_rowIndex),
+ j = ((from_rowIndex > to_rowIndex) ? from_rowIndex : to_rowIndex);
// iterate through the entire message list
for (n in this.rows) {
- if (this.rows[n].obj.rowIndex >= i && this.rows[n].obj.rowIndex <= j) {
+ if (this._rowIndex(this.rows[n].obj) >= i && this._rowIndex(this.rows[n].obj) <= j) {
if (!this.in_selection(n)) {
this.highlight_row(n, true);
}
@@ -799,6 +935,13 @@ shift_select: function(id, control)
}
},
+/**
+ * Helper method to emulate the rowIndex property of non-tr elements
+ */
+_rowIndex: function(obj)
+{
+ return (obj.rowIndex !== undefined) ? obj.rowIndex : $(obj).prevAll().length;
+},
/**
* Check if given id is part of the current selection
@@ -828,7 +971,7 @@ select_all: function(filter)
for (n in this.rows) {
if (!filter || this.rows[n][filter] == true) {
this.last_selected = n;
- this.highlight_row(n, true);
+ this.highlight_row(n, true, true);
}
else {
$(this.rows[n].obj).removeClass('selected').removeClass('unfocused');
@@ -923,7 +1066,7 @@ get_single_selection: function()
/**
* Highlight/unhighlight a row
*/
-highlight_row: function(id, multiple)
+highlight_row: function(id, multiple, norecur)
{
if (!this.rows[id])
return;
@@ -939,7 +1082,7 @@ highlight_row: function(id, multiple)
if (!this.in_selection(id)) { // select row
this.selection.push(id);
$(this.rows[id].obj).addClass('selected');
- if (!this.rows[id].expanded)
+ if (!norecur && !this.rows[id].expanded)
this.highlight_children(id, true);
}
else { // unselect row
@@ -949,7 +1092,7 @@ highlight_row: function(id, multiple)
this.selection = a_pre.concat(a_post);
$(this.rows[id].obj).removeClass('selected').removeClass('unfocused');
- if (!this.rows[id].expanded)
+ if (!norecur && !this.rows[id].expanded)
this.highlight_children(id, false);
}
}
@@ -967,7 +1110,7 @@ highlight_children: function(id, status)
for (i=0; i<len; i++) {
selected = this.in_selection(children[i]);
if ((status && !selected) || (!status && selected))
- this.highlight_row(children[i], true);
+ this.highlight_row(children[i], true, true);
}
},
@@ -1143,7 +1286,7 @@ drag_mouse_move: function(e)
this.draglayer.html('');
// get subjects of selected messages
- var i, n, obj;
+ var i, n, obj, me;
for (n=0; n<this.selection.length; n++) {
// only show 12 lines
if (n>12) {
@@ -1151,29 +1294,28 @@ drag_mouse_move: function(e)
break;
}
+ me = this;
if (obj = this.rows[this.selection[n]].obj) {
- for (i=0; i<obj.childNodes.length; i++) {
- if (obj.childNodes[i].nodeName == 'TD') {
- if (n == 0)
- this.drag_start_pos = $(obj.childNodes[i]).offset();
-
- if (this.subject_col < 0 || (this.subject_col >= 0 && this.subject_col == i)) {
- var subject = $(obj.childNodes[i]).text();
+ $('> '+this.col_tagname(), obj).each(function(i,elem){
+ if (n == 0)
+ me.drag_start_pos = $(elem).offset();
- if (!subject)
- break;
+ if (me.subject_col < 0 || (me.subject_col >= 0 && me.subject_col == i)) {
+ var subject = $(elem).text();
+ if (subject) {
// remove leading spaces
subject = $.trim(subject);
// truncate line to 50 characters
subject = (subject.length > 50 ? subject.substring(0, 50) + '...' : subject);
var entry = $('<div>').text(subject);
- this.draglayer.append(entry);
- break;
+ me.draglayer.append(entry);
}
+
+ return false; // break
}
- }
+ });
}
}
@@ -1228,7 +1370,7 @@ drag_mouse_up: function(e)
// remove temp divs
this.del_dragfix();
- this.triggerEvent('dragend');
+ this.triggerEvent('dragend', e);
return rcube_event.cancel(e);
},
@@ -1248,7 +1390,7 @@ column_drag_mouse_move: function(e)
if (!this.col_draglayer) {
var lpos = $(this.list).offset(),
- cells = this.list.tHead.rows[0].cells;
+ cells = this.thead.rows[0].cells;
// create dragging layer
this.col_draglayer = $('<div>').attr('id', 'rcmcoldraglayer')
@@ -1341,7 +1483,7 @@ column_drag_mouse_up: function(e)
}
}
- this.triggerEvent('column_dragend');
+ this.triggerEvent('column_dragend', e);
return rcube_event.cancel(e);
},
@@ -1404,7 +1546,11 @@ del_dragfix: function()
*/
column_replace: function(from, to)
{
- var len, cells = this.list.tHead.rows[0].cells,
+ // only supported for <table> lists
+ if (!this.thead || !this.thead.rows)
+ return;
+
+ var len, cells = this.thead.rows[0].cells,
elem = cells[from],
before = cells[to],
td = document.createElement('td');
@@ -1417,8 +1563,8 @@ column_replace: function(from, to)
cells[0].parentNode.replaceChild(elem, td);
// replace list cells
- for (r=0, len=this.list.tBodies[0].rows.length; r<len; r++) {
- row = this.list.tBodies[0].rows[r];
+ for (r=0, len=this.tbody.rows.length; r<len; r++) {
+ row = this.tbody.rows[r];
elem = row.cells[from];
before = row.cells[to];
@@ -1439,6 +1585,9 @@ column_replace: function(from, to)
else if (this.subject_col > from && to >= this.subject_col)
this.subject_col--;
+ if (this.fixed_header)
+ this.init_header();
+
this.triggerEvent('column_replace');
}
diff --git a/program/js/treelist.js b/program/js/treelist.js
index fec2d7f21..5913f44b4 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -23,552 +23,550 @@
*/
function rcube_treelist_widget(node, p)
{
- // apply some defaults to p
- p = $.extend({
- id_prefix: '',
- autoexpand: 1000,
- selectable: false,
- check_droptarget: function(node){ return !node.virtual }
- }, p || {});
-
- var container = $(node);
- var data = p.data || [];
- var indexbyid = {};
- var selection = null;
- var drag_active = false;
- var box_coords = {};
- var item_coords = [];
- var autoexpand_timer;
- var autoexpand_item;
- var body_scroll_top = 0;
- var list_scroll_top = 0;
- var me = this;
-
-
- /////// export public members and methods
-
- this.container = container;
- this.expand = expand;
- this.collapse = collapse;
- this.select = select;
- this.render = render;
- this.drag_start = drag_start;
- this.drag_end = drag_end;
- this.intersects = intersects;
- this.update = update_node;
- this.insert = insert;
- this.remove = remove;
- this.get_item = get_item;
- this.get_selection = get_selection;
-
-
- /////// startup code (constructor)
-
- // abort if node not found
- if (!container.length)
- return;
-
- if (p.data) {
- index_data({ children:data });
- }
- // load data from DOM
- else {
- update_data();
- }
-
- // register click handlers on list
- container.on('click', 'div.treetoggle', function(e){
- toggle(dom2id($(this).parent()));
- });
-
- container.on('click', 'li', function(e){
- var node = p.selectable ? indexbyid[dom2id($(this))] : null;
- if (node && !node.virtual) {
- select(node.id);
- e.stopPropagation();
- }
- });
-
-
- /////// private methods
-
- /**
- * Collaps a the node with the given ID
- */
- function collapse(id, recursive, set)
- {
- var node;
- if (node = indexbyid[id]) {
- node.collapsed = typeof set == 'undefined' || set;
- update_dom(node);
-
- // Work around a bug in IE6 and IE7, see #1485309
- if (window.bw && (bw.ie6 || bw.ie7) && node.collapsed) {
- id2dom(node.id).next().children('ul:visible').hide().show();
- }
-
- if (recursive && node.children) {
- for (var i=0; i < node.children.length; i++) {
- collapse(node.children[i].id, recursive, set);
- }
- }
-
- me.triggerEvent(node.collapsed ? 'collapse' : 'expand', node);
- }
- }
-
- /**
- * Expand a the node with the given ID
- */
- function expand(id, recursive)
- {
- collapse(id, recursive, false);
- }
-
- /**
- * Toggle collapsed state of a list node
- */
- function toggle(id, recursive)
- {
- var node;
- if (node = indexbyid[id]) {
- collapse(id, recursive, !node.collapsed);
- }
- }
-
- /**
- * Select a tree node by it's ID
- */
- function select(id)
- {
- if (selection) {
- id2dom(selection).removeClass('selected');
- selection = null;
- }
-
- var li = id2dom(id);
- if (li.length) {
- li.addClass('selected');
- selection = id;
- // TODO: expand all parent nodes if collapsed
- scroll_to_node(li);
- }
-
- me.triggerEvent('select', indexbyid[id]);
- }
-
- /**
- * Getter for the currently selected node ID
- */
- function get_selection()
- {
- return selection;
- }
-
- /**
- * Return the DOM element of the list item with the given ID
- */
- function get_item(id)
- {
- return id2dom(id).get(0);
- }
-
- /**
- * Insert the given node
- */
- function insert(node, parent_id, sort)
- {
- var li, parent_li,
- parent_node = parent_id ? indexbyid[parent_id] : null;
-
- // insert as child of an existing node
- if (parent_node) {
- if (!parent_node.children)
- parent_node.children = [];
-
- parent_node.children.push(node);
- parent_li = id2dom(parent_id);
-
- // re-render the entire subtree
- if (parent_node.children.length == 1) {
- render_node(parent_node, parent_li.parent(), parent_li);
- li = id2dom(node.id);
- }
- else {
- // append new node to parent's child list
- li = render_node(node, parent_li.children('ul').first());
- }
- }
- // insert at top level
- else {
- data.push(node);
- li = render_node(node, container);
- }
-
- indexbyid[node.id] = node;
-
- if (sort) {
- resort_node(li, typeof sort == 'string' ? '[class~="' + sort + '"]' : '');
- }
- }
-
- /**
- * Update properties of an existing node
- */
- function update_node(id, updates, sort)
- {
- var li, node = indexbyid[id];
- if (node) {
- li = id2dom(id);
-
- if (updates.id || updates.html || updates.children || updates.classes) {
- $.extend(node, updates);
- render_node(node, li.parent(), li);
- }
-
- if (node.id != id) {
- delete indexbyid[id];
- indexbyid[node.id] = node;
- }
-
- if (sort) {
- resort_node(li, typeof sort == 'string' ? '[class~="' + sort + '"]' : '');
- }
- }
- }
-
- /**
- * Helper method to sort the list of the given item
- */
- function resort_node(li, filter)
- {
- var first, sibling,
- myid = li.get(0).id,
- sortname = li.children().first().text().toUpperCase();
-
- li.parent().children('li' + filter).each(function(i, elem) {
- if (i == 0)
- first = elem;
- if (elem.id == myid) {
- // skip
- }
- else if (elem.id != myid && sortname >= $(elem).children().first().text().toUpperCase()) {
- sibling = elem;
- }
- else {
- return false;
- }
- });
-
- if (sibling) {
- li.insertAfter(sibling);
- }
- else if (first.id != myid) {
- li.insertBefore(first);
- }
-
- // reload data from dom
- update_data();
- }
-
- /**
- * Remove the item with the given ID
- */
- function remove(id)
- {
- var node, li;
- if (node = indexbyid[id]) {
- li = id2dom(id);
- li.remove();
-
- node.deleted = true;
- delete indexbyid[id];
-
- return true;
- }
-
- return false;
- }
-
- /**
- * (Re-)read tree data from DOM
- */
- function update_data()
- {
- data = walk_list(container);
- }
-
- /**
- * Apply the 'collapsed' status of the data node to the corresponding DOM element(s)
- */
- function update_dom(node)
- {
- var li = id2dom(node.id);
- li.children('ul').first()[(node.collapsed ? 'hide' : 'show')]();
- li.children('div.treetoggle').removeClass('collapsed expanded').addClass(node.collapsed ? 'collapsed' : 'expanded');
- me.triggerEvent('toggle', node);
- }
-
- /**
- * Render the tree list from the internal data structure
- */
- function render()
- {
- if (me.triggerEvent('renderBefore', data) === false)
- return;
-
- // remove all child nodes
- container.html('');
-
- // render child nodes
- for (var i=0; i < data.length; i++) {
- render_node(data[i], container);
- }
-
- me.triggerEvent('renderAfter', container);
- }
-
- /**
- * Render a specific node into the DOM list
- */
- function render_node(node, parent, replace)
- {
- if (node.deleted)
- return;
-
- var li = $('<li>')
- .attr('id', p.id_prefix + (p.id_encode ? p.id_encode(node.id) : node.id))
- .addClass((node.classes || []).join(' '));
-
- if (replace)
- replace.replaceWith(li);
- else
- li.appendTo(parent);
-
- if (typeof node.html == 'string') {
- li.html(node.html);
- }
- else if (typeof node.html == 'object') {
- li.append(node.html);
- }
-
- if (node.virtual)
- li.addClass('virtual');
- if (node.id == selection)
- li.addClass('selected');
-
- // add child list and toggle icon
- if (node.children && node.children.length) {
- $('<div class="treetoggle '+(node.collapsed ? 'collapsed' : 'expanded') + '">&nbsp;</div>').appendTo(li);
- var ul = $('<ul>').appendTo(li).attr('class', node.childlistclass);
- if (node.collapsed)
- ul.hide();
-
- for (var i=0; i < node.children.length; i++) {
- render_node(node.children[i], ul);
- }
- }
-
- return li;
- }
-
- /**
- * Recursively walk the DOM tree and build an internal data structure
- * representing the skeleton of this tree list.
- */
- function walk_list(ul)
- {
- var result = [];
- ul.children('li').each(function(i,e){
- var li = $(e), sublist = li.children('ul');
- var node = {
- id: dom2id(li),
- classes: li.attr('class').split(' '),
- virtual: li.hasClass('virtual'),
- html: li.children().first().get(0).outerHTML,
- children: walk_list(sublist)
- }
-
- if (sublist.length) {
- node.childlistclass = sublist.attr('class');
- }
- if (node.children.length) {
- node.collapsed = sublist.css('display') == 'none';
- }
- if (li.hasClass('selected')) {
- selection = node.id;
- }
-
- result.push(node);
- indexbyid[node.id] = node;
- })
-
- return result;
- }
-
- /**
- * Recursively walk the data tree and index nodes by their ID
- */
- function index_data(node)
- {
- if (node.id) {
- indexbyid[node.id] = node;
- }
- for (var c=0; node.children && c < node.children.length; c++) {
- index_data(node.children[c]);
- }
- }
-
- /**
- * Get the (stripped) node ID from the given DOM element
- */
- function dom2id(li)
- {
- var domid = li.attr('id').replace(new RegExp('^' + (p.id_prefix) || '%'), '');
- return p.id_decode ? p.id_decode(domid) : domid;
- }
-
- /**
- * Get the <li> element for the given node ID
- */
- function id2dom(id)
- {
- var domid = p.id_encode ? p.id_encode(id) : id;
- return $('#' + p.id_prefix + domid);
- }
-
- /**
- * Scroll the parent container to make the given list item visible
- */
- function scroll_to_node(li)
- {
- var scroller = container.parent(),
- current_offset = scroller.scrollTop(),
- rel_offset = li.offset().top - scroller.offset().top;
-
- if (rel_offset < 0 || rel_offset + li.height() > scroller.height())
- scroller.scrollTop(rel_offset + current_offset);
- }
-
- ///// drag & drop support
-
- /**
- * When dragging starts, compute absolute bounding boxes of the list and it's items
- * for faster comparisons while mouse is moving
- */
- function drag_start()
- {
- var li, item, height,
- pos = container.offset();
-
- body_scroll_top = bw.ie ? 0 : window.pageYOffset;
- list_scroll_top = container.parent().scrollTop();
-
- drag_active = true;
- box_coords = {
- x1: pos.left,
- y1: pos.top,
- x2: pos.left + container.width(),
- y2: pos.top + container.height()
- };
-
- item_coords = [];
- for (var id in indexbyid) {
- li = id2dom(id);
- item = li.children().first().get(0);
- if (height = item.offsetHeight) {
- pos = $(item).offset();
- item_coords[id] = {
- x1: pos.left,
- y1: pos.top,
- x2: pos.left + item.offsetWidth,
- y2: pos.top + height,
- on: id == autoexpand_item
- };
- }
- }
- }
-
- /**
- * Signal that dragging has stopped
- */
- function drag_end()
- {
- drag_active = false;
-
- if (autoexpand_timer) {
- clearTimeout(autoexpand_timer);
- autoexpand_timer = null;
- autoexpand_item = null;
- }
-
- $('li.droptarget', container).removeClass('droptarget');
- }
-
- /**
- * Determine if the given mouse coords intersect the list and one if its items
- */
- function intersects(mouse, highlight)
- {
- // offsets to compensate for scrolling while dragging a message
- var boffset = bw.ie ? -document.documentElement.scrollTop : body_scroll_top,
- moffset = list_scroll_top - container.parent().scrollTop(),
- result = null;
-
- mouse.top = mouse.y + -moffset - boffset;
-
- // no intersection with list bounding box
- if (mouse.x < box_coords.x1 || mouse.x >= box_coords.x2 || mouse.top < box_coords.y1 || mouse.top >= box_coords.y2) {
- // TODO: optimize performance for this operation
- $('li.droptarget', container).removeClass('droptarget');
- return result;
- }
-
- // check intersection with visible list items
- var pos, node;
- for (var id in item_coords) {
- pos = item_coords[id];
- if (mouse.x >= pos.x1 && mouse.x < pos.x2 && mouse.top >= pos.y1 && mouse.top < pos.y2) {
- node = indexbyid[id];
-
- // if the folder is collapsed, expand it after the configured time
- if (node.children && node.children.length && node.collapsed && p.autoexpand && autoexpand_item != id) {
- if (autoexpand_timer)
- clearTimeout(autoexpand_timer);
-
- autoexpand_item = id;
- autoexpand_timer = setTimeout(function() {
- expand(autoexpand_item);
- drag_start(); // re-calculate item coords
- autoexpand_item = null;
- }, p.autoexpand);
- }
- else if (autoexpand_timer && autoexpand_item != id) {
- clearTimeout(autoexpand_timer);
- autoexpand_item = null;
- autoexpand_timer = null;
- }
-
- // check if this item is accepted as drop target
- if (p.check_droptarget(node)) {
- if (highlight) {
- id2dom(id).addClass('droptarget');
- pos.on = true;
- }
- result = id;
- }
- else {
- result = null;
- }
- }
- else if (pos.on) {
- id2dom(id).removeClass('droptarget');
- pos.on = false;
- }
- }
-
- return result;
- }
+ // apply some defaults to p
+ p = $.extend({
+ id_prefix: '',
+ autoexpand: 1000,
+ selectable: false,
+ check_droptarget: function(node){ return !node.virtual }
+ }, p || {});
+
+ var container = $(node),
+ data = p.data || [],
+ indexbyid = {},
+ selection = null,
+ drag_active = false,
+ box_coords = {},
+ item_coords = [],
+ autoexpand_timer,
+ autoexpand_item,
+ body_scroll_top = 0,
+ list_scroll_top = 0,
+ me = this;
+
+
+ /////// export public members and methods
+
+ this.container = container;
+ this.expand = expand;
+ this.collapse = collapse;
+ this.select = select;
+ this.render = render;
+ this.drag_start = drag_start;
+ this.drag_end = drag_end;
+ this.intersects = intersects;
+ this.update = update_node;
+ this.insert = insert;
+ this.remove = remove;
+ this.get_item = get_item;
+ this.get_selection = get_selection;
+
+ /////// startup code (constructor)
+
+ // abort if node not found
+ if (!container.length)
+ return;
+
+ if (p.data)
+ index_data({ children:data });
+ // load data from DOM
+ else
+ update_data();
+
+ // register click handlers on list
+ container.on('click', 'div.treetoggle', function(e){
+ toggle(dom2id($(this).parent()));
+ });
+
+ container.on('click', 'li', function(e){
+ var node = p.selectable ? indexbyid[dom2id($(this))] : null;
+ if (node && !node.virtual) {
+ select(node.id);
+ e.stopPropagation();
+ }
+ });
+
+
+ /////// private methods
+
+ /**
+ * Collaps a the node with the given ID
+ */
+ function collapse(id, recursive, set)
+ {
+ var node;
+
+ if (node = indexbyid[id]) {
+ node.collapsed = typeof set == 'undefined' || set;
+ update_dom(node);
+
+ // Work around a bug in IE6 and IE7, see #1485309
+ if (window.bw && (bw.ie6 || bw.ie7) && node.collapsed) {
+ id2dom(node.id).next().children('ul:visible').hide().show();
+ }
+
+ if (recursive && node.children) {
+ for (var i=0; i < node.children.length; i++) {
+ collapse(node.children[i].id, recursive, set);
+ }
+ }
+
+ me.triggerEvent(node.collapsed ? 'collapse' : 'expand', node);
+ }
+ }
+
+ /**
+ * Expand a the node with the given ID
+ */
+ function expand(id, recursive)
+ {
+ collapse(id, recursive, false);
+ }
+
+ /**
+ * Toggle collapsed state of a list node
+ */
+ function toggle(id, recursive)
+ {
+ var node;
+ if (node = indexbyid[id]) {
+ collapse(id, recursive, !node.collapsed);
+ }
+ }
+
+ /**
+ * Select a tree node by it's ID
+ */
+ function select(id)
+ {
+ if (selection) {
+ id2dom(selection).removeClass('selected');
+ selection = null;
+ }
+
+ var li = id2dom(id);
+ if (li.length) {
+ li.addClass('selected');
+ selection = id;
+ // TODO: expand all parent nodes if collapsed
+ scroll_to_node(li);
+ }
+
+ me.triggerEvent('select', indexbyid[id]);
+ }
+
+ /**
+ * Getter for the currently selected node ID
+ */
+ function get_selection()
+ {
+ return selection;
+ }
+
+ /**
+ * Return the DOM element of the list item with the given ID
+ */
+ function get_item(id)
+ {
+ return id2dom(id).get(0);
+ }
+
+ /**
+ * Insert the given node
+ */
+ function insert(node, parent_id, sort)
+ {
+ var li, parent_li,
+ parent_node = parent_id ? indexbyid[parent_id] : null;
+
+ // insert as child of an existing node
+ if (parent_node) {
+ if (!parent_node.children)
+ parent_node.children = [];
+
+ parent_node.children.push(node);
+ parent_li = id2dom(parent_id);
+
+ // re-render the entire subtree
+ if (parent_node.children.length == 1) {
+ render_node(parent_node, parent_li.parent(), parent_li);
+ li = id2dom(node.id);
+ }
+ else {
+ // append new node to parent's child list
+ li = render_node(node, parent_li.children('ul').first());
+ }
+ }
+ // insert at top level
+ else {
+ data.push(node);
+ li = render_node(node, container);
+ }
+
+ indexbyid[node.id] = node;
+
+ if (sort) {
+ resort_node(li, typeof sort == 'string' ? '[class~="' + sort + '"]' : '');
+ }
+ }
+
+ /**
+ * Update properties of an existing node
+ */
+ function update_node(id, updates, sort)
+ {
+ var li, node = indexbyid[id];
+
+ if (node) {
+ li = id2dom(id);
+
+ if (updates.id || updates.html || updates.children || updates.classes) {
+ $.extend(node, updates);
+ render_node(node, li.parent(), li);
+ }
+
+ if (node.id != id) {
+ delete indexbyid[id];
+ indexbyid[node.id] = node;
+ }
+
+ if (sort) {
+ resort_node(li, typeof sort == 'string' ? '[class~="' + sort + '"]' : '');
+ }
+ }
+ }
+
+ /**
+ * Helper method to sort the list of the given item
+ */
+ function resort_node(li, filter)
+ {
+ var first, sibling,
+ myid = li.get(0).id,
+ sortname = li.children().first().text().toUpperCase();
+
+ li.parent().children('li' + filter).each(function(i, elem) {
+ if (i == 0)
+ first = elem;
+ if (elem.id == myid) {
+ // skip
+ }
+ else if (elem.id != myid && sortname >= $(elem).children().first().text().toUpperCase()) {
+ sibling = elem;
+ }
+ else {
+ return false;
+ }
+ });
+
+ if (sibling) {
+ li.insertAfter(sibling);
+ }
+ else if (first.id != myid) {
+ li.insertBefore(first);
+ }
+
+ // reload data from dom
+ update_data();
+ }
+
+ /**
+ * Remove the item with the given ID
+ */
+ function remove(id)
+ {
+ var node, li;
+
+ if (node = indexbyid[id]) {
+ li = id2dom(id);
+ li.remove();
+
+ node.deleted = true;
+ delete indexbyid[id];
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * (Re-)read tree data from DOM
+ */
+ function update_data()
+ {
+ data = walk_list(container);
+ }
+
+ /**
+ * Apply the 'collapsed' status of the data node to the corresponding DOM element(s)
+ */
+ function update_dom(node)
+ {
+ var li = id2dom(node.id);
+ li.children('ul').first()[(node.collapsed ? 'hide' : 'show')]();
+ li.children('div.treetoggle').removeClass('collapsed expanded').addClass(node.collapsed ? 'collapsed' : 'expanded');
+ me.triggerEvent('toggle', node);
+ }
+
+ /**
+ * Render the tree list from the internal data structure
+ */
+ function render()
+ {
+ if (me.triggerEvent('renderBefore', data) === false)
+ return;
+
+ // remove all child nodes
+ container.html('');
+
+ // render child nodes
+ for (var i=0; i < data.length; i++) {
+ render_node(data[i], container);
+ }
+
+ me.triggerEvent('renderAfter', container);
+ }
+
+ /**
+ * Render a specific node into the DOM list
+ */
+ function render_node(node, parent, replace)
+ {
+ if (node.deleted)
+ return;
+
+ var li = $('<li>')
+ .attr('id', p.id_prefix + (p.id_encode ? p.id_encode(node.id) : node.id))
+ .addClass((node.classes || []).join(' '));
+
+ if (replace)
+ replace.replaceWith(li);
+ else
+ li.appendTo(parent);
+
+ if (typeof node.html == 'string')
+ li.html(node.html);
+ else if (typeof node.html == 'object')
+ li.append(node.html);
+
+ if (node.virtual)
+ li.addClass('virtual');
+ if (node.id == selection)
+ li.addClass('selected');
+
+ // add child list and toggle icon
+ if (node.children && node.children.length) {
+ $('<div class="treetoggle '+(node.collapsed ? 'collapsed' : 'expanded') + '">&nbsp;</div>').appendTo(li);
+ var ul = $('<ul>').appendTo(li).attr('class', node.childlistclass);
+ if (node.collapsed)
+ ul.hide();
+
+ for (var i=0; i < node.children.length; i++) {
+ render_node(node.children[i], ul);
+ }
+ }
+
+ return li;
+ }
+
+ /**
+ * Recursively walk the DOM tree and build an internal data structure
+ * representing the skeleton of this tree list.
+ */
+ function walk_list(ul)
+ {
+ var result = [];
+ ul.children('li').each(function(i,e){
+ var li = $(e), sublist = li.children('ul');
+ var node = {
+ id: dom2id(li),
+ classes: li.attr('class').split(' '),
+ virtual: li.hasClass('virtual'),
+ html: li.children().first().get(0).outerHTML,
+ children: walk_list(sublist)
+ }
+
+ if (sublist.length) {
+ node.childlistclass = sublist.attr('class');
+ }
+ if (node.children.length) {
+ node.collapsed = sublist.css('display') == 'none';
+ }
+ if (li.hasClass('selected')) {
+ selection = node.id;
+ }
+
+ result.push(node);
+ indexbyid[node.id] = node;
+ })
+
+ return result;
+ }
+
+ /**
+ * Recursively walk the data tree and index nodes by their ID
+ */
+ function index_data(node)
+ {
+ if (node.id) {
+ indexbyid[node.id] = node;
+ }
+ for (var c=0; node.children && c < node.children.length; c++) {
+ index_data(node.children[c]);
+ }
+ }
+
+ /**
+ * Get the (stripped) node ID from the given DOM element
+ */
+ function dom2id(li)
+ {
+ var domid = li.attr('id').replace(new RegExp('^' + (p.id_prefix) || '%'), '');
+ return p.id_decode ? p.id_decode(domid) : domid;
+ }
+
+ /**
+ * Get the <li> element for the given node ID
+ */
+ function id2dom(id)
+ {
+ var domid = p.id_encode ? p.id_encode(id) : id;
+ return $('#' + p.id_prefix + domid);
+ }
+
+ /**
+ * Scroll the parent container to make the given list item visible
+ */
+ function scroll_to_node(li)
+ {
+ var scroller = container.parent(),
+ current_offset = scroller.scrollTop(),
+ rel_offset = li.offset().top - scroller.offset().top;
+
+ if (rel_offset < 0 || rel_offset + li.height() > scroller.height())
+ scroller.scrollTop(rel_offset + current_offset);
+ }
+
+ ///// drag & drop support
+
+ /**
+ * When dragging starts, compute absolute bounding boxes of the list and it's items
+ * for faster comparisons while mouse is moving
+ */
+ function drag_start()
+ {
+ var li, item, height,
+ pos = container.offset();
+
+ body_scroll_top = bw.ie ? 0 : window.pageYOffset;
+ list_scroll_top = container.parent().scrollTop();
+
+ drag_active = true;
+ box_coords = {
+ x1: pos.left,
+ y1: pos.top,
+ x2: pos.left + container.width(),
+ y2: pos.top + container.height()
+ };
+
+ item_coords = [];
+ for (var id in indexbyid) {
+ li = id2dom(id);
+ item = li.children().first().get(0);
+ if (height = item.offsetHeight) {
+ pos = $(item).offset();
+ item_coords[id] = {
+ x1: pos.left,
+ y1: pos.top,
+ x2: pos.left + item.offsetWidth,
+ y2: pos.top + height,
+ on: id == autoexpand_item
+ };
+ }
+ }
+ }
+
+ /**
+ * Signal that dragging has stopped
+ */
+ function drag_end()
+ {
+ drag_active = false;
+
+ if (autoexpand_timer) {
+ clearTimeout(autoexpand_timer);
+ autoexpand_timer = null;
+ autoexpand_item = null;
+ }
+
+ $('li.droptarget', container).removeClass('droptarget');
+ }
+
+ /**
+ * Determine if the given mouse coords intersect the list and one if its items
+ */
+ function intersects(mouse, highlight)
+ {
+ // offsets to compensate for scrolling while dragging a message
+ var boffset = bw.ie ? -document.documentElement.scrollTop : body_scroll_top,
+ moffset = list_scroll_top - container.parent().scrollTop(),
+ result = null;
+
+ mouse.top = mouse.y + -moffset - boffset;
+
+ // no intersection with list bounding box
+ if (mouse.x < box_coords.x1 || mouse.x >= box_coords.x2 || mouse.top < box_coords.y1 || mouse.top >= box_coords.y2) {
+ // TODO: optimize performance for this operation
+ $('li.droptarget', container).removeClass('droptarget');
+ return result;
+ }
+
+ // check intersection with visible list items
+ var pos, node;
+ for (var id in item_coords) {
+ pos = item_coords[id];
+ if (mouse.x >= pos.x1 && mouse.x < pos.x2 && mouse.top >= pos.y1 && mouse.top < pos.y2) {
+ node = indexbyid[id];
+
+ // if the folder is collapsed, expand it after the configured time
+ if (node.children && node.children.length && node.collapsed && p.autoexpand && autoexpand_item != id) {
+ if (autoexpand_timer)
+ clearTimeout(autoexpand_timer);
+
+ autoexpand_item = id;
+ autoexpand_timer = setTimeout(function() {
+ expand(autoexpand_item);
+ drag_start(); // re-calculate item coords
+ autoexpand_item = null;
+ }, p.autoexpand);
+ }
+ else if (autoexpand_timer && autoexpand_item != id) {
+ clearTimeout(autoexpand_timer);
+ autoexpand_item = null;
+ autoexpand_timer = null;
+ }
+
+ // check if this item is accepted as drop target
+ if (p.check_droptarget(node)) {
+ if (highlight) {
+ id2dom(id).addClass('droptarget');
+ pos.on = true;
+ }
+ result = id;
+ }
+ else {
+ result = null;
+ }
+ }
+ else if (pos.on) {
+ id2dom(id).removeClass('droptarget');
+ pos.on = false;
+ }
+ }
+
+ return result;
+ }
}
// use event processing functions from Roundcube's rcube_event_engine
diff --git a/program/lib/Mail/mime.php b/program/lib/Mail/mime.php
index 69a032cb8..e079af7e9 100644
--- a/program/lib/Mail/mime.php
+++ b/program/lib/Mail/mime.php
@@ -48,7 +48,7 @@
* @author Aleksander Machniak <alec@php.net>
* @copyright 2003-2006 PEAR <pear-group@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version Release: 1.8.7
+ * @version CVS: $Id$
* @link http://pear.php.net/package/Mail_mime
*
* This class is based on HTML Mime Mail class from
@@ -89,7 +89,7 @@ require_once 'Mail/mimePart.php';
* @author Sean Coates <sean@php.net>
* @copyright 2003-2006 PEAR <pear-group@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version Release: 1.8.7
+ * @version Release: @package_version@
* @link http://pear.php.net/package/Mail_mime
*/
class Mail_mime
@@ -254,6 +254,7 @@ class Mail_mime
$this->_txtbody .= $cont;
}
}
+
return true;
}
@@ -347,7 +348,7 @@ class Mail_mime
}
if (!$content_id) {
- $content_id = md5(uniqid(time()));
+ $content_id = preg_replace('/[^0-9a-zA-Z]/', '', uniqid(time(), true));
}
$this->_html_images[] = array(
@@ -429,8 +430,7 @@ class Mail_mime
if (!strlen($filename)) {
$msg = "The supplied filename for the attachment can't be empty";
- $err = PEAR::raiseError($msg);
- return $err;
+ return $this->_raiseError($msg);
}
$this->_parts[] = array(
@@ -465,16 +465,13 @@ class Mail_mime
{
// Check state of file and raise an error properly
if (!file_exists($file_name)) {
- $err = PEAR::raiseError('File not found: ' . $file_name);
- return $err;
+ return $this->_raiseError('File not found: ' . $file_name);
}
if (!is_file($file_name)) {
- $err = PEAR::raiseError('Not a regular file: ' . $file_name);
- return $err;
+ return $this->_raiseError('Not a regular file: ' . $file_name);
}
if (!is_readable($file_name)) {
- $err = PEAR::raiseError('File is not readable: ' . $file_name);
- return $err;
+ return $this->_raiseError('File is not readable: ' . $file_name);
}
// Temporarily reset magic_quotes_runtime and read file contents
@@ -500,7 +497,7 @@ class Mail_mime
* @return object The text mimePart object
* @access private
*/
- function _addTextPart(&$obj, $text)
+ function &_addTextPart(&$obj = null, $text = '')
{
$params['content_type'] = 'text/plain';
$params['encoding'] = $this->_build_params['text_encoding'];
@@ -509,11 +506,11 @@ class Mail_mime
if (is_object($obj)) {
$ret = $obj->addSubpart($text, $params);
- return $ret;
} else {
$ret = new Mail_mimePart($text, $params);
- return $ret;
}
+
+ return $ret;
}
/**
@@ -526,7 +523,7 @@ class Mail_mime
* @return object The html mimePart object
* @access private
*/
- function _addHtmlPart(&$obj)
+ function &_addHtmlPart(&$obj = null)
{
$params['content_type'] = 'text/html';
$params['encoding'] = $this->_build_params['html_encoding'];
@@ -535,11 +532,11 @@ class Mail_mime
if (is_object($obj)) {
$ret = $obj->addSubpart($this->_htmlbody, $params);
- return $ret;
} else {
$ret = new Mail_mimePart($this->_htmlbody, $params);
- return $ret;
}
+
+ return $ret;
}
/**
@@ -550,9 +547,8 @@ class Mail_mime
* @return object The multipart/mixed mimePart object
* @access private
*/
- function _addMixedPart()
+ function &_addMixedPart()
{
- $params = array();
$params['content_type'] = 'multipart/mixed';
$params['eol'] = $this->_build_params['eol'];
@@ -572,17 +568,18 @@ class Mail_mime
* @return object The multipart/mixed mimePart object
* @access private
*/
- function _addAlternativePart(&$obj)
+ function &_addAlternativePart(&$obj = null)
{
$params['content_type'] = 'multipart/alternative';
$params['eol'] = $this->_build_params['eol'];
if (is_object($obj)) {
- return $obj->addSubpart('', $params);
+ $ret = $obj->addSubpart('', $params);
} else {
$ret = new Mail_mimePart('', $params);
- return $ret;
}
+
+ return $ret;
}
/**
@@ -596,17 +593,18 @@ class Mail_mime
* @return object The multipart/mixed mimePart object
* @access private
*/
- function _addRelatedPart(&$obj)
+ function &_addRelatedPart(&$obj = null)
{
$params['content_type'] = 'multipart/related';
$params['eol'] = $this->_build_params['eol'];
if (is_object($obj)) {
- return $obj->addSubpart('', $params);
+ $ret = $obj->addSubpart('', $params);
} else {
$ret = new Mail_mimePart('', $params);
- return $ret;
}
+
+ return $ret;
}
/**
@@ -619,7 +617,7 @@ class Mail_mime
* @return object The image mimePart object
* @access private
*/
- function _addHtmlImagePart(&$obj, $value)
+ function &_addHtmlImagePart(&$obj, $value)
{
$params['content_type'] = $value['c_type'];
$params['encoding'] = 'base64';
@@ -650,7 +648,7 @@ class Mail_mime
* @return object The image mimePart object
* @access private
*/
- function _addAttachmentPart(&$obj, $value)
+ function &_addAttachmentPart(&$obj, $value)
{
$params['eol'] = $this->_build_params['eol'];
$params['filename'] = $value['name'];
@@ -700,9 +698,9 @@ class Mail_mime
*
* @param string $separation The separation between these two parts.
* @param array $params The Build parameters passed to the
- * &get() function. See &get for more info.
+ * get() function. See get() for more info.
* @param array $headers The extra headers that should be passed
- * to the &headers() function.
+ * to the headers() method.
* See that function for more info.
* @param bool $overwrite Overwrite the existing headers with new.
*
@@ -722,9 +720,7 @@ class Mail_mime
return $body;
}
- $head = $this->txtHeaders($headers, $overwrite);
- $mail = $head . $separation . $body;
- return $mail;
+ return $this->txtHeaders($headers, $overwrite) . $separation . $body;
}
/**
@@ -732,7 +728,7 @@ class Mail_mime
* mail delivery method.
*
* @param array $params The Build parameters passed to the
- * &get() function. See &get for more info.
+ * get() method. See get() for more info.
*
* @return mixed The e-mail body or PEAR error object
* @access public
@@ -748,9 +744,9 @@ class Mail_mime
*
* @param string $filename Output file location
* @param array $params The Build parameters passed to the
- * &get() function. See &get for more info.
+ * get() method. See get() for more info.
* @param array $headers The extra headers that should be passed
- * to the &headers() function.
+ * to the headers() function.
* See that function for more info.
* @param bool $overwrite Overwrite the existing headers with new.
*
@@ -762,8 +758,7 @@ class Mail_mime
{
// Check state of file and raise an error properly
if (file_exists($filename) && !is_writable($filename)) {
- $err = PEAR::raiseError('File is not writable: ' . $filename);
- return $err;
+ return $this->_raiseError('File is not writable: ' . $filename);
}
// Temporarily reset magic_quotes_runtime and read file contents
@@ -772,15 +767,13 @@ class Mail_mime
}
if (!($fh = fopen($filename, 'ab'))) {
- $err = PEAR::raiseError('Unable to open file: ' . $filename);
- return $err;
+ return $this->_raiseError('Unable to open file: ' . $filename);
}
// Write message headers into file (skipping Content-* headers)
$head = $this->txtHeaders($headers, $overwrite, true);
if (fwrite($fh, $head) === false) {
- $err = PEAR::raiseError('Error writing to file: ' . $filename);
- return $err;
+ return $this->_raiseError('Error writing to file: ' . $filename);
}
fclose($fh);
@@ -797,10 +790,10 @@ class Mail_mime
/**
* Writes (appends) the complete e-mail body into file.
- *
+ *
* @param string $filename Output file location
* @param array $params The Build parameters passed to the
- * &get() function. See &get for more info.
+ * get() method. See get() for more info.
*
* @return mixed True or PEAR error object
* @access public
@@ -810,8 +803,7 @@ class Mail_mime
{
// Check state of file and raise an error properly
if (file_exists($filename) && !is_writable($filename)) {
- $err = PEAR::raiseError('File is not writable: ' . $filename);
- return $err;
+ return $this->_raiseError('File is not writable: ' . $filename);
}
// Temporarily reset magic_quotes_runtime and read file contents
@@ -820,8 +812,7 @@ class Mail_mime
}
if (!($fh = fopen($filename, 'ab'))) {
- $err = PEAR::raiseError('Unable to open file: ' . $filename);
- return $err;
+ return $this->_raiseError('Unable to open file: ' . $filename);
}
// Write the rest of the message into file
@@ -844,7 +835,7 @@ class Mail_mime
* @return mixed The MIME message content string, null or PEAR error object
* @access public
*/
- function &get($params = null, $filename = null, $skip_head = false)
+ function get($params = null, $filename = null, $skip_head = false)
{
if (isset($params)) {
while (list($key, $value) = each($params)) {
@@ -1004,8 +995,7 @@ class Mail_mime
}
if (!isset($message)) {
- $ret = null;
- return $ret;
+ return null;
}
// Use saved boundary
@@ -1023,16 +1013,14 @@ class Mail_mime
return $headers;
}
$this->_headers = array_merge($this->_headers, $headers);
- $ret = null;
- return $ret;
+ return null;
} else {
$output = $message->encode($boundary, $skip_head);
if ($this->_isError($output)) {
return $output;
}
$this->_headers = array_merge($this->_headers, $output['headers']);
- $body = $output['body'];
- return $body;
+ return $output['body'];
}
}
@@ -1050,7 +1038,7 @@ class Mail_mime
* @return array Assoc array with the mime headers
* @access public
*/
- function &headers($xtra_headers = null, $overwrite = false, $skip_content = false)
+ function headers($xtra_headers = null, $overwrite = false, $skip_content = false)
{
// Add mime version header
$headers['MIME-Version'] = '1.0';
@@ -1473,7 +1461,7 @@ class Mail_mime
}
/**
- * PEAR::isError wrapper
+ * PEAR::isError implementation
*
* @param mixed $data Object
*
@@ -1490,4 +1478,18 @@ class Mail_mime
return false;
}
+ /**
+ * PEAR::raiseError implementation
+ *
+ * @param $message A text error message
+ *
+ * @return PEAR_Error Instance of PEAR_Error
+ * @access private
+ */
+ function _raiseError($message)
+ {
+ // PEAR::raiseError() is not PHP 5.4 compatible
+ return new PEAR_Error($message);
+ }
+
} // End of class
diff --git a/program/lib/Mail/mimePart.php b/program/lib/Mail/mimePart.php
index f3e75dd10..c6e9f4aa8 100644
--- a/program/lib/Mail/mimePart.php
+++ b/program/lib/Mail/mimePart.php
@@ -48,7 +48,7 @@
* @author Aleksander Machniak <alec@php.net>
* @copyright 2003-2006 PEAR <pear-group@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version Release: 1.8.7
+ * @version CVS: $Id$
* @link http://pear.php.net/package/Mail_mime
*/
@@ -70,7 +70,7 @@
* @author Aleksander Machniak <alec@php.net>
* @copyright 2003-2006 PEAR <pear-group@php.net>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version Release: 1.8.7
+ * @version Release: @package_version@
* @link http://pear.php.net/package/Mail_mime
*/
class Mail_mimePart
@@ -368,12 +368,12 @@ class Mail_mimePart
function encodeToFile($filename, $boundary=null, $skip_head=false)
{
if (file_exists($filename) && !is_writable($filename)) {
- $err = PEAR::raiseError('File is not writeable: ' . $filename);
+ $err = $this->_raiseError('File is not writeable: ' . $filename);
return $err;
}
if (!($fh = fopen($filename, 'ab'))) {
- $err = PEAR::raiseError('Unable to open file: ' . $filename);
+ $err = $this->_raiseError('Unable to open file: ' . $filename);
return $err;
}
@@ -456,7 +456,7 @@ class Mail_mimePart
* @param array $params The parameters for the subpart, same
* as the $params argument for constructor.
*
- * @return Mail_mimePart A reference to the part you just added. It is
+ * @return Mail_mimePart A reference to the part you just added. In PHP4, it is
* crucial if using multipart/* in your subparts that
* you use =& in your script when calling this function,
* otherwise you will not be able to add further subparts.
@@ -464,8 +464,8 @@ class Mail_mimePart
*/
function &addSubpart($body, $params)
{
- $this->_subparts[] = new Mail_mimePart($body, $params);
- return $this->_subparts[count($this->_subparts) - 1];
+ $this->_subparts[] = $part = new Mail_mimePart($body, $params);
+ return $part;
}
/**
@@ -511,12 +511,12 @@ class Mail_mimePart
function _getEncodedDataFromFile($filename, $encoding, $fh=null)
{
if (!is_readable($filename)) {
- $err = PEAR::raiseError('Unable to read file: ' . $filename);
+ $err = $this->_raiseError('Unable to read file: ' . $filename);
return $err;
}
if (!($fd = fopen($filename, 'rb'))) {
- $err = PEAR::raiseError('Could not open file: ' . $filename);
+ $err = $this->_raiseError('Could not open file: ' . $filename);
return $err;
}
@@ -648,7 +648,7 @@ class Mail_mimePart
}
/**
- * Encodes the paramater of a header.
+ * Encodes the parameter of a header.
*
* @param string $name The name of the header-parameter
* @param string $value The value of the paramter
@@ -1013,7 +1013,7 @@ class Mail_mimePart
$value = substr($value, $cutpoint);
$cutpoint = $maxLength;
// RFC 2047 specifies that any split header should
- // be seperated by a CRLF SPACE.
+ // be separated by a CRLF SPACE.
if ($output) {
$output .= $eol . ' ';
}
@@ -1055,7 +1055,7 @@ class Mail_mimePart
}
// RFC 2047 specifies that any split header should
- // be seperated by a CRLF SPACE
+ // be separated by a CRLF SPACE
if ($output) {
$output .= $eol . ' ';
}
@@ -1227,7 +1227,7 @@ class Mail_mimePart
}
/**
- * PEAR::isError wrapper
+ * PEAR::isError implementation
*
* @param mixed $data Object
*
@@ -1244,4 +1244,18 @@ class Mail_mimePart
return false;
}
+ /**
+ * PEAR::raiseError implementation
+ *
+ * @param $message A text error message
+ *
+ * @return PEAR_Error Instance of PEAR_Error
+ * @access private
+ */
+ function _raiseError($message)
+ {
+ // PEAR::raiseError() is not PHP 5.4 compatible
+ return new PEAR_Error($message);
+ }
+
} // End of class
diff --git a/program/lib/Net/Socket.php b/program/lib/Net/Socket.php
index dd1047c43..bf1d1bbcd 100644
--- a/program/lib/Net/Socket.php
+++ b/program/lib/Net/Socket.php
@@ -4,7 +4,7 @@
*
* PHP Version 4
*
- * Copyright (c) 1997-2003 The PHP Group
+ * Copyright (c) 1997-2013 The PHP Group
*
* This source file is subject to version 2.0 of the PHP license,
* that is bundled with this package in the file LICENSE, and is
@@ -23,7 +23,6 @@
* @author Chuck Hagenbuch <chuck@horde.org>
* @copyright 1997-2003 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP 2.02
- * @version CVS: $Id$
* @link http://pear.php.net/packages/Net_Socket
*/
@@ -77,11 +76,11 @@ class Net_Socket extends PEAR
var $port = 0;
/**
- * Number of seconds to wait on socket connections before assuming
+ * Number of seconds to wait on socket operations before assuming
* there's no more data. Defaults to no timeout.
- * @var integer $timeout
+ * @var integer|float $timeout
*/
- var $timeout = false;
+ var $timeout = null;
/**
* Number of bytes to read at a time in readLine() and
@@ -100,17 +99,17 @@ class Net_Socket extends PEAR
* Connect to the specified port. If called when the socket is
* already connected, it disconnects and connects again.
*
- * @param string $addr IP address or host name.
+ * @param string $addr IP address or host name (may be with protocol prefix).
* @param integer $port TCP port number.
* @param boolean $persistent (optional) Whether the connection is
* persistent (kept open between requests
* by the web server).
- * @param integer $timeout (optional) How long to wait for data.
+ * @param integer $timeout (optional) Connection socket timeout.
* @param array $options See options for stream_context_create.
*
* @access public
*
- * @return boolean | PEAR_Error True on success or a PEAR_Error on failure.
+ * @return boolean|PEAR_Error True on success or a PEAR_Error on failure.
*/
function connect($addr, $port = 0, $persistent = null,
$timeout = null, $options = null)
@@ -122,11 +121,10 @@ class Net_Socket extends PEAR
if (!$addr) {
return $this->raiseError('$addr cannot be empty');
- } elseif (strspn($addr, '.0123456789') == strlen($addr) ||
- strstr($addr, '/') !== false) {
- $this->addr = $addr;
+ } else if (strspn($addr, ':.0123456789') == strlen($addr)) {
+ $this->addr = strpos($addr, ':') !== false ? '['.$addr.']' : $addr;
} else {
- $this->addr = @gethostbyname($addr);
+ $this->addr = $addr;
}
$this->port = $port % 65536;
@@ -135,22 +133,17 @@ class Net_Socket extends PEAR
$this->persistent = $persistent;
}
- if ($timeout !== null) {
- $this->timeout = $timeout;
- }
-
$openfunc = $this->persistent ? 'pfsockopen' : 'fsockopen';
$errno = 0;
$errstr = '';
$old_track_errors = @ini_set('track_errors', 1);
+ if ($timeout <= 0) {
+ $timeout = @ini_get('default_socket_timeout');
+ }
+
if ($options && function_exists('stream_context_create')) {
- if ($this->timeout) {
- $timeout = $this->timeout;
- } else {
- $timeout = 0;
- }
$context = stream_context_create($options);
// Since PHP 5 fsockopen doesn't allow context specification
@@ -169,12 +162,7 @@ class Net_Socket extends PEAR
$errstr, $timeout, $context);
}
} else {
- if ($this->timeout) {
- $fp = @$openfunc($this->addr, $this->port, $errno,
- $errstr, $this->timeout);
- } else {
- $fp = @$openfunc($this->addr, $this->port, $errno, $errstr);
- }
+ $fp = @$openfunc($this->addr, $this->port, $errno, $errstr, $timeout);
}
if (!$fp) {
@@ -187,7 +175,7 @@ class Net_Socket extends PEAR
@ini_set('track_errors', $old_track_errors);
$this->fp = $fp;
-
+ $this->setTimeout();
return $this->setBlocking($this->blocking);
}
@@ -258,18 +246,31 @@ class Net_Socket extends PEAR
* expressed in the sum of seconds and microseconds
*
* @param integer $seconds Seconds.
- * @param integer $microseconds Microseconds.
+ * @param integer $microseconds Microseconds, optional.
*
* @access public
- * @return mixed true on success or a PEAR_Error instance otherwise
+ * @return mixed True on success or false on failure or
+ * a PEAR_Error instance when not connected
*/
- function setTimeout($seconds, $microseconds)
+ function setTimeout($seconds = null, $microseconds = null)
{
if (!is_resource($this->fp)) {
return $this->raiseError('not connected');
}
- return socket_set_timeout($this->fp, $seconds, $microseconds);
+ if ($seconds === null && $microseconds === null) {
+ $seconds = (int) $this->timeout;
+ $microseconds = (int) (($this->timeout - $seconds) * 1000000);
+ } else {
+ $this->timeout = $seconds + $microseconds/1000000;
+ }
+
+ if ($this->timeout > 0) {
+ return stream_set_timeout($this->fp, (int) $seconds, (int) $microseconds);
+ }
+ else {
+ return false;
+ }
}
/**
@@ -315,17 +316,20 @@ class Net_Socket extends PEAR
return $this->raiseError('not connected');
}
- return socket_get_status($this->fp);
+ return stream_get_meta_data($this->fp);
}
/**
* Get a specified line of data
*
- * @param int $size ??
+ * @param int $size Reading ends when size - 1 bytes have been read,
+ * or a newline or an EOF (whichever comes first).
+ * If no size is specified, it will keep reading from
+ * the stream until it reaches the end of the line.
*
* @access public
- * @return $size bytes of data from the socket, or a PEAR_Error if
- * not connected.
+ * @return mixed $size bytes of data from the socket, or a PEAR_Error if
+ * not connected. If an error occurs, FALSE is returned.
*/
function gets($size = null)
{
@@ -370,9 +374,10 @@ class Net_Socket extends PEAR
*
* @access public
* @return mixed If the socket is not connected, returns an instance of
- * PEAR_Error
- * If the write succeeds, returns the number of bytes written
+ * PEAR_Error.
+ * If the write succeeds, returns the number of bytes written.
* If the write fails, returns false.
+ * If the socket times out, returns an instance of PEAR_Error.
*/
function write($data, $blocksize = null)
{
@@ -381,7 +386,22 @@ class Net_Socket extends PEAR
}
if (is_null($blocksize) && !OS_WINDOWS) {
- return @fwrite($this->fp, $data);
+ $written = @fwrite($this->fp, $data);
+
+ // Check for timeout or lost connection
+ if (!$written) {
+ $meta_data = $this->getStatus();
+
+ if (!is_array($meta_data)) {
+ return $meta_data; // PEAR_Error
+ }
+
+ if (!empty($meta_data['timed_out'])) {
+ return $this->raiseError('timed out');
+ }
+ }
+
+ return $written;
} else {
if (is_null($blocksize)) {
$blocksize = 1024;
@@ -391,9 +411,22 @@ class Net_Socket extends PEAR
$size = strlen($data);
while ($pos < $size) {
$written = @fwrite($this->fp, substr($data, $pos, $blocksize));
+
+ // Check for timeout or lost connection
if (!$written) {
+ $meta_data = $this->getStatus();
+
+ if (!is_array($meta_data)) {
+ return $meta_data; // PEAR_Error
+ }
+
+ if (!empty($meta_data['timed_out'])) {
+ return $this->raiseError('timed out');
+ }
+
return $written;
}
+
$pos += $written;
}
@@ -407,7 +440,7 @@ class Net_Socket extends PEAR
* @param string $data Data to write
*
* @access public
- * @return mixed fputs result, or an error
+ * @return mixed fwrite() result, or PEAR_Error when not connected
*/
function writeLine($data)
{
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index 0640a9448..182ea1232 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -31,16 +31,25 @@ $config = array(
// critical PHP settings here. Only these, which doesn't provide
// an error/warning in the logs later. See (#1486307).
'mbstring.func_overload' => 0,
- 'suhosin.session.encrypt' => 0,
- 'session.auto_start' => 0,
- 'file_uploads' => 1,
'magic_quotes_runtime' => 0,
'magic_quotes_sybase' => 0, // #1488506
);
+
+// check these additional ini settings if not called via CLI
+if (php_sapi_name() != 'cli') {
+ $config += array(
+ 'suhosin.session.encrypt' => 0,
+ 'file_uploads' => 1,
+ );
+}
+
foreach ($config as $optname => $optval) {
- if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
- die("ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
- ."Check your PHP configuration (including php_admin_flag).");
+ $ini_optval = filter_var(ini_get($optname), FILTER_VALIDATE_BOOLEAN);
+ if ($optval != $ini_optval && @ini_set($optname, $optval) === false) {
+ $error = "ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
+ . "Check your PHP configuration (including php_admin_flag).";
+ if (defined('STDERR')) fwrite(STDERR, $error); else echo $error;
+ exit(1);
}
}
@@ -284,32 +293,6 @@ function is_ascii($str, $control_chars = true)
/**
- * Remove single and double quotes from a given string
- *
- * @param string Input value
- *
- * @return string Dequoted string
- */
-function strip_quotes($str)
-{
- return str_replace(array("'", '"'), '', $str);
-}
-
-
-/**
- * Remove new lines characters from given string
- *
- * @param string $str Input value
- *
- * @return string Stripped string
- */
-function strip_newlines($str)
-{
- return preg_replace('/[\r\n]/', '', $str);
-}
-
-
-/**
* Compose a valid representation of name and e-mail address
*
* @param string $email E-mail address
diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php
index 592720308..3e6e47a56 100644
--- a/program/lib/Roundcube/html.php
+++ b/program/lib/Roundcube/html.php
@@ -35,6 +35,7 @@ class html
public static $common_attrib = array('id','class','style','title','align');
public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script');
+
/**
* Constructor
*
@@ -217,7 +218,7 @@ class html
$attr = array('src' => $attr);
}
return self::tag('iframe', $attr, $cont, array_merge(self::$common_attrib,
- array('src','name','width','height','border','frameborder')));
+ array('src','name','width','height','border','frameborder','onload')));
}
/**
@@ -332,7 +333,16 @@ class html
*/
public static function quote($str)
{
- return @htmlspecialchars($str, ENT_COMPAT, RCUBE_CHARSET);
+ static $flags;
+
+ if (!$flags) {
+ $flags = ENT_COMPAT;
+ if (defined('ENT_SUBSTITUTE')) {
+ $flags |= ENT_SUBSTITUTE;
+ }
+ }
+
+ return @htmlspecialchars($str, $flags, RCUBE_CHARSET);
}
}
@@ -350,8 +360,8 @@ class html_inputfield extends html
protected $allowed = array(
'type','name','value','size','tabindex','autocapitalize',
'autocomplete','checked','onchange','onclick','disabled','readonly',
- 'spellcheck','results','maxlength','src','multiple','placeholder',
- 'autofocus',
+ 'spellcheck','results','maxlength','src','multiple','accept',
+ 'placeholder','autofocus',
);
/**
@@ -668,6 +678,11 @@ class html_table extends html
{
$default_attrib = self::$doctype == 'xhtml' ? array('summary' => '', 'border' => 0) : array();
$this->attrib = array_merge($attrib, $default_attrib);
+
+ if (!empty($attrib['tagname']) && $attrib['tagname'] != 'table') {
+ $this->tagname = $attrib['tagname'];
+ $this->allowed = self::$common_attrib;
+ }
}
/**
@@ -769,6 +784,11 @@ class html_table extends html
$index = $this->rowindex;
}
+ // make sure row object exists (#1489094)
+ if (!$this->rows[$index]) {
+ $this->rows[$index] = new stdClass;
+ }
+
$this->rows[$index]->attrib = $attr;
}
@@ -806,19 +826,20 @@ class html_table extends html
if (!empty($this->header)) {
$rowcontent = '';
foreach ($this->header as $c => $col) {
- $rowcontent .= self::tag('td', $col->attrib, $col->content);
+ $rowcontent .= self::tag($this->_col_tagname(), $col->attrib, $col->content);
}
- $thead = self::tag('thead', null, self::tag('tr', null, $rowcontent, parent::$common_attrib));
+ $thead = $this->tagname == 'table' ? self::tag('thead', null, self::tag('tr', null, $rowcontent, parent::$common_attrib)) :
+ self::tag($this->_row_tagname(), array('class' => 'thead'), $rowcontent, parent::$common_attrib);
}
foreach ($this->rows as $r => $row) {
$rowcontent = '';
foreach ($row->cells as $c => $col) {
- $rowcontent .= self::tag('td', $col->attrib, $col->content);
+ $rowcontent .= self::tag($this->_col_tagname(), $col->attrib, $col->content);
}
if ($r < $this->rowindex || count($row->cells)) {
- $tbody .= self::tag('tr', $row->attrib, $rowcontent, parent::$common_attrib);
+ $tbody .= self::tag($this->_row_tagname(), $row->attrib, $rowcontent, parent::$common_attrib);
}
}
@@ -827,7 +848,7 @@ class html_table extends html
}
// add <tbody>
- $this->content = $thead . self::tag('tbody', null, $tbody);
+ $this->content = $thead . ($this->tagname == 'table' ? self::tag('tbody', null, $tbody) : $tbody);
unset($this->attrib['cols'], $this->attrib['rowsonly']);
return parent::show();
@@ -852,4 +873,22 @@ class html_table extends html
$this->rowindex = 0;
}
+ /**
+ * Getter for the corresponding tag name for table row elements
+ */
+ private function _row_tagname()
+ {
+ static $row_tagnames = array('table' => 'tr', 'ul' => 'li', '*' => 'div');
+ return $row_tagnames[$this->tagname] ?: $row_tagnames['*'];
+ }
+
+ /**
+ * Getter for the corresponding tag name for table cell elements
+ */
+ private function _col_tagname()
+ {
+ static $col_tagnames = array('table' => 'td', '*' => 'span');
+ return $col_tagnames[$this->tagname] ?: $col_tagnames['*'];
+ }
+
}
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index 3ae511e1e..ce97cd0a5 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -99,20 +99,20 @@ class rcube
protected $texts;
protected $caches = array();
protected $shutdown_functions = array();
- protected $expunge_cache = false;
/**
* This implements the 'singleton' design pattern
*
* @param integer Options to initialize with this instance. See rcube::INIT_WITH_* constants
+ * @param string Environment name to run (e.g. live, dev, test)
*
* @return rcube The one and only instance
*/
- static function get_instance($mode = 0)
+ static function get_instance($mode = 0, $env = '')
{
if (!self::$instance) {
- self::$instance = new rcube();
+ self::$instance = new rcube($env);
self::$instance->init($mode);
}
@@ -123,10 +123,10 @@ class rcube
/**
* Private constructor
*/
- protected function __construct()
+ protected function __construct($env = '')
{
// load configuration
- $this->config = new rcube_config;
+ $this->config = new rcube_config($env);
$this->plugins = new rcube_dummy_plugin_api;
register_shutdown_function(array($this, 'shutdown'));
@@ -258,6 +258,39 @@ class rcube
/**
+ * Initialize and get shared cache object
+ *
+ * @param string $name Cache identifier
+ * @param bool $packed Enables/disables data serialization
+ *
+ * @return rcube_cache_shared Cache object
+ */
+ public function get_cache_shared($name, $packed=true)
+ {
+ $shared_name = "shared_$name";
+
+ if (!array_key_exists($shared_name, $this->caches)) {
+ $opt = strtolower($name) . '_cache';
+ $type = $this->config->get($opt);
+ $ttl = $this->config->get($opt . '_ttl');
+
+ if (!$type) {
+ // cache is disabled
+ return $this->caches[$shared_name] = null;
+ }
+
+ if ($ttl === null) {
+ $ttl = $this->config->get('shared_cache_ttl', '10d');
+ }
+
+ $this->caches[$shared_name] = new rcube_cache_shared($type, $name, $ttl, $packed);
+ }
+
+ return $this->caches[$shared_name];
+ }
+
+
+ /**
* Create SMTP object and connect to server
*
* @param boolean True if connection should be established
@@ -345,6 +378,7 @@ class rcube
'auth_pw' => $this->config->get("{$driver}_auth_pw"),
'debug' => (bool) $this->config->get("{$driver}_debug"),
'force_caps' => (bool) $this->config->get("{$driver}_force_caps"),
+ 'disabled_caps' => $this->config->get("{$driver}_disabled_caps"),
'timeout' => (int) $this->config->get("{$driver}_timeout"),
'skip_deleted' => (bool) $this->config->get('skip_deleted'),
'driver' => $driver,
@@ -405,6 +439,7 @@ class rcube
$sess_domain = $this->config->get('session_domain');
$sess_path = $this->config->get('session_path');
$lifetime = $this->config->get('session_lifetime', 0) * 60;
+ $is_secure = $this->config->get('use_https') || rcube_utils::https_check();
// set session domain
if ($sess_domain) {
@@ -419,34 +454,44 @@ class rcube
ini_set('session.gc_maxlifetime', $lifetime * 2);
}
- ini_set('session.cookie_secure', rcube_utils::https_check());
+ ini_set('session.cookie_secure', $is_secure);
ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid');
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
- ini_set('session.serialize_handler', 'php');
ini_set('session.cookie_httponly', 1);
// use database for storing session data
$this->session = new rcube_session($this->get_dbh(), $this->config);
- $this->session->register_gc_handler(array($this, 'temp_gc'));
- $this->session->register_gc_handler(array($this, 'cache_gc'));
-
+ $this->session->register_gc_handler(array($this, 'gc'));
$this->session->set_secret($this->config->get('des_key') . dirname($_SERVER['SCRIPT_NAME']));
$this->session->set_ip_check($this->config->get('ip_check'));
// start PHP session (if not in CLI mode)
if ($_SERVER['REMOTE_ADDR']) {
- session_start();
+ $this->session->start();
}
}
/**
+ * Garbage collector - cache/temp cleaner
+ */
+ public function gc()
+ {
+ rcube_cache::gc();
+ rcube_cache_shared::gc();
+ $this->get_storage()->cache_gc();
+
+ $this->gc_temp();
+ }
+
+
+ /**
* Garbage collector function for temp files.
* Remove temp files older than two days
*/
- public function temp_gc()
+ public function gc_temp()
{
$tmp = unslashify($this->config->get('temp_dir'));
$expire = time() - 172800; // expire in 48 hours
@@ -468,14 +513,21 @@ class rcube
/**
- * Garbage collector for cache entries.
- * Set flag to expunge caches on shutdown
+ * Runs garbage collector with probability based on
+ * session settings. This is intended for environments
+ * without a session.
*/
- public function cache_gc()
+ public function gc_run()
{
- // because this gc function is called before storage is initialized,
- // we just set a flag to expunge storage cache on shutdown.
- $this->expunge_cache = true;
+ $probability = (int) ini_get('session.gc_probability');
+ $divisor = (int) ini_get('session.gc_divisor');
+
+ if ($divisor > 0 && $probability > 0) {
+ $random = mt_rand(1, $divisor);
+ if ($random <= $probability) {
+ $this->gc();
+ }
+ }
}
@@ -859,6 +911,14 @@ class rcube
call_user_func($function);
}
+ // write session data as soon as possible and before
+ // closing database connection, don't do this before
+ // registered shutdown functions, they may need the session
+ // Note: this will run registered gc handlers (ie. cache gc)
+ if ($_SERVER['REMOTE_ADDR'] && is_object($this->session)) {
+ $this->session->write_close();
+ }
+
if (is_object($this->smtp)) {
$this->smtp->disconnect();
}
@@ -870,9 +930,6 @@ class rcube
}
if (is_object($this->storage)) {
- if ($this->expunge_cache) {
- $this->storage->expunge_cache();
- }
$this->storage->close();
}
}
@@ -1081,6 +1138,9 @@ class rcube
'message' => $arg->getMessage(),
);
}
+ else if (is_string($arg)) {
+ $arg = array('message' => $arg, 'type' => 'php');
+ }
if (empty($arg['code'])) {
$arg['code'] = 500;
@@ -1093,14 +1153,24 @@ class rcube
return;
}
- if (($log || $terminate) && $arg['type'] && $arg['message']) {
+ $cli = php_sapi_name() == 'cli';
+
+ if (($log || $terminate) && !$cli && $arg['type'] && $arg['message']) {
$arg['fatal'] = $terminate;
self::log_bug($arg);
}
- // display error page and terminate script
- if ($terminate && is_object(self::$instance->output)) {
- self::$instance->output->raise_error($arg['code'], $arg['message']);
+ // terminate script
+ if ($terminate) {
+ // display error page
+ if (is_object(self::$instance->output)) {
+ self::$instance->output->raise_error($arg['code'], $arg['message']);
+ }
+ else if ($cli) {
+ fwrite(STDERR, 'ERROR: ' . $arg['message']);
+ }
+
+ exit(1);
}
}
@@ -1139,7 +1209,7 @@ class rcube
if (!self::write_log('errors', $log_entry)) {
// send error to PHPs error handler if write_log didn't succeed
- trigger_error($arg_arr['message']);
+ trigger_error($arg_arr['message'], E_USER_WARNING);
}
}
@@ -1277,6 +1347,188 @@ class rcube
return $_SESSION['language'];
}
}
+
+ /**
+ * Unique Message-ID generator.
+ *
+ * @return string Message-ID
+ */
+ public function gen_message_id()
+ {
+ $local_part = md5(uniqid('rcube'.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);
+ }
+
+ /**
+ * 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,
+ ));
+
+ $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;
+ }
+
}
diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php
index cbc3c6773..4ed139c45 100644
--- a/program/lib/Roundcube/rcube_addressbook.php
+++ b/program/lib/Roundcube/rcube_addressbook.php
@@ -309,9 +309,14 @@ abstract class rcube_addressbook
* List all active contact groups of this source
*
* @param string Optional search string to match group name
+ * @param int Matching mode:
+ * 0 - partial (*abc*),
+ * 1 - strict (=),
+ * 2 - prefix (abc*)
+ *
* @return array Indexed list of contact groups, each a hash array
*/
- function list_groups($search = null)
+ function list_groups($search = null, $mode = 0)
{
/* empty for address books don't supporting groups */
return array();
@@ -370,9 +375,10 @@ abstract class rcube_addressbook
/**
* Add the given contact records the a certain group
*
- * @param string Group identifier
- * @param array List of contact identifiers to be added
- * @return int Number of contacts added
+ * @param string Group identifier
+ * @param array|string List of contact identifiers to be added
+ *
+ * @return int Number of contacts added
*/
function add_to_group($group_id, $ids)
{
@@ -383,9 +389,10 @@ abstract class rcube_addressbook
/**
* Remove the given contact records from a certain group
*
- * @param string Group identifier
- * @param array List of contact identifiers to be removed
- * @return int Number of deleted group members
+ * @param string Group identifier
+ * @param array|string List of contact identifiers to be removed
+ *
+ * @return int Number of deleted group members
*/
function remove_from_group($group_id, $ids)
{
@@ -425,7 +432,7 @@ abstract class rcube_addressbook
$out = array_merge($out, (array)$values);
}
else {
- list($f, $type) = explode(':', $c);
+ list(, $type) = explode(':', $c);
$out[$type] = array_merge((array)$out[$type], (array)$values);
}
}
@@ -528,17 +535,16 @@ abstract class rcube_addressbook
*/
public static function compose_contact_key($contact, $sort_col)
{
- $key = $contact[$sort_col] . ':' . $row['sourceid'];
+ $key = $contact[$sort_col] . ':' . $contact['sourceid'];
// add email to a key to not skip contacts with the same name (#1488375)
if (!empty($contact['email'])) {
- $key .= ':' . implode(':', (array)$contact['email']);
- }
+ $key .= ':' . implode(':', (array)$contact['email']);
+ }
- return $key;
+ return $key;
}
-
/**
* Compare search value with contact data
*
diff --git a/program/lib/Roundcube/rcube_cache.php b/program/lib/Roundcube/rcube_cache.php
index 92f12a8bf..a708cb292 100644
--- a/program/lib/Roundcube/rcube_cache.php
+++ b/program/lib/Roundcube/rcube_cache.php
@@ -38,6 +38,7 @@ class rcube_cache
private $type;
private $userid;
private $prefix;
+ private $table;
private $ttl;
private $packed;
private $index;
@@ -71,8 +72,9 @@ class rcube_cache
$this->db = function_exists('apc_exists'); // APC 3.1.4 required
}
else {
- $this->type = 'db';
- $this->db = $rcube->get_dbh();
+ $this->type = 'db';
+ $this->db = $rcube->get_dbh();
+ $this->table = $this->db->table_name('cache');
}
// convert ttl string to seconds
@@ -145,7 +147,7 @@ class rcube_cache
*/
function write($key, $data)
{
- return $this->write_record($key, $this->packed ? serialize($data) : $data);
+ return $this->write_record($key, $this->serialize($data));
}
@@ -192,20 +194,31 @@ class rcube_cache
*/
function expunge()
{
- if ($this->type == 'db' && $this->db) {
+ if ($this->type == 'db' && $this->db && $this->ttl) {
$this->db->query(
- "DELETE FROM ".$this->db->table_name('cache').
+ "DELETE FROM ".$this->table.
" WHERE user_id = ?".
" AND cache_key LIKE ?".
- " AND " . $this->db->unixtimestamp('created')." < ?",
+ " AND expires < " . $this->db->now(),
$this->userid,
- $this->prefix.'.%',
- time() - $this->ttl);
+ $this->prefix.'.%');
}
}
/**
+ * Remove expired records of all caches
+ */
+ static function gc()
+ {
+ $rcube = rcube::get_instance();
+ $db = $rcube->get_dbh();
+
+ $db->query("DELETE FROM " . $db->table_name('cache') . " WHERE expires < " . $db->now());
+ }
+
+
+ /**
* Writes the cache back to the DB.
*/
function close()
@@ -219,7 +232,7 @@ class rcube_cache
if ($this->cache_changes[$key]) {
// Make sure we're not going to write unchanged data
// by comparing current md5 sum with the sum calculated on DB read
- $data = $this->packed ? serialize($data) : $data;
+ $data = $this->serialize($data);
if (!$this->cache_sums[$key] || $this->cache_sums[$key] != md5($data)) {
$this->write_record($key, $data);
@@ -255,7 +268,7 @@ class rcube_cache
if ($data) {
$md5sum = md5($data);
- $data = $this->packed ? unserialize($data) : $data;
+ $data = $this->unserialize($data);
if ($nostore) {
return $data;
@@ -271,7 +284,7 @@ class rcube_cache
else {
$sql_result = $this->db->limitquery(
"SELECT data, cache_key".
- " FROM ".$this->db->table_name('cache').
+ " FROM " . $this->table.
" WHERE user_id = ?".
" AND cache_key = ?".
// for better performance we allow more records for one key
@@ -283,7 +296,7 @@ class rcube_cache
$key = substr($sql_arr['cache_key'], strlen($this->prefix)+1);
$md5sum = $sql_arr['data'] ? md5($sql_arr['data']) : null;
if ($sql_arr['data']) {
- $data = $this->packed ? unserialize($sql_arr['data']) : $sql_arr['data'];
+ $data = $this->unserialize($sql_arr['data']);
}
if ($nostore) {
@@ -326,7 +339,7 @@ class rcube_cache
// Remove NULL rows (here we don't need to check if the record exist)
if ($data == 'N;') {
$this->db->query(
- "DELETE FROM ".$this->db->table_name('cache').
+ "DELETE FROM " . $this->table.
" WHERE user_id = ?".
" AND cache_key = ?",
$this->userid, $key);
@@ -337,8 +350,10 @@ class rcube_cache
// update existing cache record
if ($key_exists) {
$result = $this->db->query(
- "UPDATE ".$this->db->table_name('cache').
- " SET created = ". $this->db->now().", data = ?".
+ "UPDATE " . $this->table.
+ " SET created = " . $this->db->now().
+ ", expires = " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL').
+ ", data = ?".
" WHERE user_id = ?".
" AND cache_key = ?",
$data, $this->userid, $key);
@@ -348,9 +363,9 @@ class rcube_cache
// for better performance we allow more records for one key
// so, no need to check if record exist (see rcube_cache::read_record())
$result = $this->db->query(
- "INSERT INTO ".$this->db->table_name('cache').
- " (created, user_id, cache_key, data)".
- " VALUES (".$this->db->now().", ?, ?, ?)",
+ "INSERT INTO " . $this->table.
+ " (created, expires, user_id, cache_key, data)".
+ " VALUES (" . $this->db->now() . ", " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL') . ", ?, ?, ?)",
$this->userid, $key, $data);
}
@@ -364,7 +379,6 @@ class rcube_cache
* @param string $key Cache key name or pattern
* @param boolean $prefix_mode Enable it to clear all keys starting
* with prefix specified in $key
- *
*/
private function remove_record($key=null, $prefix_mode=false)
{
@@ -412,7 +426,7 @@ class rcube_cache
}
$this->db->query(
- "DELETE FROM ".$this->db->table_name('cache').
+ "DELETE FROM " . $this->table.
" WHERE user_id = ?" . $where,
$this->userid);
}
@@ -553,4 +567,28 @@ class rcube_cache
// This way each cache will have its own index
return sprintf('%d:%s%s', $this->userid, $this->prefix, 'INDEX');
}
+
+ /**
+ * Serializes data for storing
+ */
+ private function serialize($data)
+ {
+ if ($this->type == 'db') {
+ return $this->db->encode($data, $this->packed);
+ }
+
+ return $this->packed ? serialize($data) : $data;
+ }
+
+ /**
+ * Unserializes serialized data
+ */
+ private function unserialize($data)
+ {
+ if ($this->type == 'db') {
+ return $this->db->decode($data, $this->packed);
+ }
+
+ return $this->packed ? @unserialize($data) : $data;
+ }
}
diff --git a/program/lib/Roundcube/rcube_cache_shared.php b/program/lib/Roundcube/rcube_cache_shared.php
new file mode 100644
index 000000000..8f2574046
--- /dev/null
+++ b/program/lib/Roundcube/rcube_cache_shared.php
@@ -0,0 +1,581 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | This file is part of the Roundcube Webmail client |
+ | Copyright (C) 2011-2013, The Roundcube Dev Team |
+ | Copyright (C) 2011-2013, Kolab Systems AG |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ | PURPOSE: |
+ | Shared (cross-user) caching engine |
+ +-----------------------------------------------------------------------+
+ | Author: Thomas Bruederli <roundcube@gmail.com> |
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ +-----------------------------------------------------------------------+
+*/
+
+
+/**
+ * Interface class for accessing Roundcube shared cache
+ *
+ * @package Framework
+ * @subpackage Cache
+ * @author Thomas Bruederli <roundcube@gmail.com>
+ * @author Aleksander Machniak <alec@alec.pl>
+ */
+class rcube_cache_shared
+{
+ /**
+ * Instance of database handler
+ *
+ * @var rcube_db|Memcache|bool
+ */
+ private $db;
+ private $type;
+ private $prefix;
+ private $ttl;
+ private $packed;
+ private $index;
+ private $table;
+ private $cache = array();
+ private $cache_changes = array();
+ private $cache_sums = array();
+
+
+ /**
+ * Object constructor.
+ *
+ * @param string $type Engine type ('db' or 'memcache' or 'apc')
+ * @param string $prefix Key name prefix
+ * @param string $ttl Expiration time of memcache/apc items
+ * @param bool $packed Enables/disabled data serialization.
+ * It's possible to disable data serialization if you're sure
+ * stored data will be always a safe string
+ */
+ function __construct($type, $prefix='', $ttl=0, $packed=true)
+ {
+ $rcube = rcube::get_instance();
+ $type = strtolower($type);
+
+ if ($type == 'memcache') {
+ $this->type = 'memcache';
+ $this->db = $rcube->get_memcache();
+ }
+ else if ($type == 'apc') {
+ $this->type = 'apc';
+ $this->db = function_exists('apc_exists'); // APC 3.1.4 required
+ }
+ else {
+ $this->type = 'db';
+ $this->db = $rcube->get_dbh();
+ $this->table = $this->db->table_name('cache_shared');
+ }
+
+ // convert ttl string to seconds
+ $ttl = get_offset_sec($ttl);
+ if ($ttl > 2592000) $ttl = 2592000;
+
+ $this->ttl = $ttl;
+ $this->packed = $packed;
+ $this->prefix = $prefix;
+ }
+
+
+ /**
+ * Returns cached value.
+ *
+ * @param string $key Cache key name
+ *
+ * @return mixed Cached value
+ */
+ function get($key)
+ {
+ if (!array_key_exists($key, $this->cache)) {
+ return $this->read_record($key);
+ }
+
+ return $this->cache[$key];
+ }
+
+
+ /**
+ * Sets (add/update) value in cache.
+ *
+ * @param string $key Cache key name
+ * @param mixed $data Cache data
+ */
+ function set($key, $data)
+ {
+ $this->cache[$key] = $data;
+ $this->cache_changed = true;
+ $this->cache_changes[$key] = true;
+ }
+
+
+ /**
+ * Returns cached value without storing it in internal memory.
+ *
+ * @param string $key Cache key name
+ *
+ * @return mixed Cached value
+ */
+ function read($key)
+ {
+ if (array_key_exists($key, $this->cache)) {
+ return $this->cache[$key];
+ }
+
+ return $this->read_record($key, true);
+ }
+
+
+ /**
+ * Sets (add/update) value in cache and immediately saves
+ * it in the backend, no internal memory will be used.
+ *
+ * @param string $key Cache key name
+ * @param mixed $data Cache data
+ *
+ * @param boolean True on success, False on failure
+ */
+ function write($key, $data)
+ {
+ return $this->write_record($key, $this->serialize($data));
+ }
+
+
+ /**
+ * Clears the cache.
+ *
+ * @param string $key Cache key name or pattern
+ * @param boolean $prefix_mode Enable it to clear all keys starting
+ * with prefix specified in $key
+ */
+ function remove($key=null, $prefix_mode=false)
+ {
+ // Remove all keys
+ if ($key === null) {
+ $this->cache = array();
+ $this->cache_changed = false;
+ $this->cache_changes = array();
+ $this->cache_sums = array();
+ }
+ // Remove keys by name prefix
+ else if ($prefix_mode) {
+ foreach (array_keys($this->cache) as $k) {
+ if (strpos($k, $key) === 0) {
+ $this->cache[$k] = null;
+ $this->cache_changes[$k] = false;
+ unset($this->cache_sums[$k]);
+ }
+ }
+ }
+ // Remove one key by name
+ else {
+ $this->cache[$key] = null;
+ $this->cache_changes[$key] = false;
+ unset($this->cache_sums[$key]);
+ }
+
+ // Remove record(s) from the backend
+ $this->remove_record($key, $prefix_mode);
+ }
+
+
+ /**
+ * Remove cache records older than ttl
+ */
+ function expunge()
+ {
+ if ($this->type == 'db' && $this->db && $this->ttl) {
+ $this->db->query(
+ "DELETE FROM " . $this->table
+ . " WHERE cache_key LIKE ?"
+ . " AND expires < " . $this->db->now(),
+ $this->prefix . '.%');
+ }
+ }
+
+
+ /**
+ * Remove expired records of all caches
+ */
+ static function gc()
+ {
+ $rcube = rcube::get_instance();
+ $db = $rcube->get_dbh();
+
+ $db->query("DELETE FROM " . $db->table_name('cache_shared') . " WHERE expires < " . $db->now());
+ }
+
+
+ /**
+ * Writes the cache back to the DB.
+ */
+ function close()
+ {
+ if (!$this->cache_changed) {
+ return;
+ }
+
+ foreach ($this->cache as $key => $data) {
+ // The key has been used
+ if ($this->cache_changes[$key]) {
+ // Make sure we're not going to write unchanged data
+ // by comparing current md5 sum with the sum calculated on DB read
+ $data = $this->serialize($data);
+
+ if (!$this->cache_sums[$key] || $this->cache_sums[$key] != md5($data)) {
+ $this->write_record($key, $data);
+ }
+ }
+ }
+
+ $this->write_index();
+ }
+
+
+ /**
+ * Reads cache entry.
+ *
+ * @param string $key Cache key name
+ * @param boolean $nostore Enable to skip in-memory store
+ *
+ * @return mixed Cached value
+ */
+ private function read_record($key, $nostore=false)
+ {
+ if (!$this->db) {
+ return null;
+ }
+
+ if ($this->type != 'db') {
+ if ($this->type == 'memcache') {
+ $data = $this->db->get($this->ckey($key));
+ }
+ else if ($this->type == 'apc') {
+ $data = apc_fetch($this->ckey($key));
+ }
+
+ if ($data) {
+ $md5sum = md5($data);
+ $data = $this->unserialize($data);
+
+ if ($nostore) {
+ return $data;
+ }
+
+ $this->cache_sums[$key] = $md5sum;
+ $this->cache[$key] = $data;
+ }
+ else {
+ $this->cache[$key] = null;
+ }
+ }
+ else {
+ $sql_result = $this->db->limitquery(
+ "SELECT data, cache_key".
+ " FROM " . $this->table .
+ " WHERE cache_key = ?".
+ // for better performance we allow more records for one key
+ // get the newer one
+ " ORDER BY created DESC",
+ 0, 1, $this->prefix . '.' . $key);
+
+ if ($sql_arr = $this->db->fetch_assoc($sql_result)) {
+ $md5sum = $sql_arr['data'] ? md5($sql_arr['data']) : null;
+ if ($sql_arr['data']) {
+ $data = $this->unserialize($sql_arr['data']);
+ }
+
+ if ($nostore) {
+ return $data;
+ }
+
+ $this->cache[$key] = $data;
+ $this->cache_sums[$key] = $md5sum;
+ }
+ else {
+ $this->cache[$key] = null;
+ }
+ }
+
+ return $this->cache[$key];
+ }
+
+
+ /**
+ * Writes single cache record into DB.
+ *
+ * @param string $key Cache key name
+ * @param mxied $data Serialized cache data
+ *
+ * @param boolean True on success, False on failure
+ */
+ private function write_record($key, $data)
+ {
+ if (!$this->db) {
+ return false;
+ }
+
+ if ($this->type == 'memcache' || $this->type == 'apc') {
+ return $this->add_record($this->ckey($key), $data);
+ }
+
+ $key_exists = array_key_exists($key, $this->cache_sums);
+ $key = $this->prefix . '.' . $key;
+
+ // Remove NULL rows (here we don't need to check if the record exist)
+ if ($data == 'N;') {
+ $this->db->query("DELETE FROM " . $this->table . " WHERE cache_key = ?", $key);
+ return true;
+ }
+
+ // update existing cache record
+ if ($key_exists) {
+ $result = $this->db->query(
+ "UPDATE " . $this->table .
+ " SET created = " . $this->db->now() .
+ ", expires = " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL') .
+ ", data = ?".
+ " WHERE cache_key = ?",
+ $data, $key);
+ }
+ // add new cache record
+ else {
+ // for better performance we allow more records for one key
+ // so, no need to check if record exist (see rcube_cache::read_record())
+ $result = $this->db->query(
+ "INSERT INTO ".$this->table.
+ " (created, expires, cache_key, data)".
+ " VALUES (".$this->db->now().", " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL') . ", ?, ?)",
+ $key, $data);
+ }
+
+ return $this->db->affected_rows($result);
+ }
+
+
+ /**
+ * Deletes the cache record(s).
+ *
+ * @param string $key Cache key name or pattern
+ * @param boolean $prefix_mode Enable it to clear all keys starting
+ * with prefix specified in $key
+ */
+ private function remove_record($key=null, $prefix_mode=false)
+ {
+ if (!$this->db) {
+ return;
+ }
+
+ if ($this->type != 'db') {
+ $this->load_index();
+
+ // Remove all keys
+ if ($key === null) {
+ foreach ($this->index as $key) {
+ $this->delete_record($key, false);
+ }
+ $this->index = array();
+ }
+ // Remove keys by name prefix
+ else if ($prefix_mode) {
+ foreach ($this->index as $k) {
+ if (strpos($k, $key) === 0) {
+ $this->delete_record($k);
+ }
+ }
+ }
+ // Remove one key by name
+ else {
+ $this->delete_record($key);
+ }
+
+ return;
+ }
+
+ // Remove all keys (in specified cache)
+ if ($key === null) {
+ $where = " WHERE cache_key LIKE " . $this->db->quote($this->prefix.'.%');
+ }
+ // Remove keys by name prefix
+ else if ($prefix_mode) {
+ $where = " WHERE cache_key LIKE " . $this->db->quote($this->prefix.'.'.$key.'%');
+ }
+ // Remove one key by name
+ else {
+ $where = " WHERE cache_key = " . $this->db->quote($this->prefix.'.'.$key);
+ }
+
+ $this->db->query("DELETE FROM " . $this->table . $where);
+ }
+
+
+ /**
+ * Adds entry into memcache/apc DB.
+ *
+ * @param string $key Cache key name
+ * @param mxied $data Serialized cache data
+ * @param bollean $index Enables immediate index update
+ *
+ * @param boolean True on success, False on failure
+ */
+ private function add_record($key, $data, $index=false)
+ {
+ if ($this->type == 'memcache') {
+ $result = $this->db->replace($key, $data, MEMCACHE_COMPRESSED, $this->ttl);
+ if (!$result) {
+ $result = $this->db->set($key, $data, MEMCACHE_COMPRESSED, $this->ttl);
+ }
+ }
+ else if ($this->type == 'apc') {
+ if (apc_exists($key)) {
+ apc_delete($key);
+ }
+ $result = apc_store($key, $data, $this->ttl);
+ }
+
+ // Update index
+ if ($index && $result) {
+ $this->load_index();
+
+ if (array_search($key, $this->index) === false) {
+ $this->index[] = $key;
+ $data = serialize($this->index);
+ $this->add_record($this->ikey(), $data);
+ }
+ }
+
+ return $result;
+ }
+
+
+ /**
+ * Deletes entry from memcache/apc DB.
+ */
+ private function delete_record($key, $index=true)
+ {
+ if ($this->type == 'memcache') {
+ // #1488592: use 2nd argument
+ $this->db->delete($this->ckey($key), 0);
+ }
+ else {
+ apc_delete($this->ckey($key));
+ }
+
+ if ($index) {
+ if (($idx = array_search($key, $this->index)) !== false) {
+ unset($this->index[$idx]);
+ }
+ }
+ }
+
+
+ /**
+ * Writes the index entry into memcache/apc DB.
+ */
+ private function write_index()
+ {
+ if (!$this->db) {
+ return;
+ }
+
+ if ($this->type == 'db') {
+ return;
+ }
+
+ $this->load_index();
+
+ // Make sure index contains new keys
+ foreach ($this->cache as $key => $value) {
+ if ($value !== null) {
+ if (array_search($key, $this->index) === false) {
+ $this->index[] = $key;
+ }
+ }
+ }
+
+ $data = serialize($this->index);
+ $this->add_record($this->ikey(), $data);
+ }
+
+
+ /**
+ * Gets the index entry from memcache/apc DB.
+ */
+ private function load_index()
+ {
+ if (!$this->db) {
+ return;
+ }
+
+ if ($this->index !== null) {
+ return;
+ }
+
+ $index_key = $this->ikey();
+
+ if ($this->type == 'memcache') {
+ $data = $this->db->get($index_key);
+ }
+ else if ($this->type == 'apc') {
+ $data = apc_fetch($index_key);
+ }
+
+ $this->index = $data ? unserialize($data) : array();
+ }
+
+
+ /**
+ * Creates cache key name (for memcache and apc)
+ *
+ * @param string $key Cache key name
+ *
+ * @return string Cache key
+ */
+ private function ckey($key)
+ {
+ return $this->prefix . ':' . $key;
+ }
+
+
+ /**
+ * Creates index cache key name (for memcache and apc)
+ *
+ * @return string Cache key
+ */
+ private function ikey()
+ {
+ // This way each cache will have its own index
+ return $this->prefix . 'INDEX';
+ }
+
+ /**
+ * Serializes data for storing
+ */
+ private function serialize($data)
+ {
+ if ($this->type == 'db') {
+ return $this->db->encode($data, $this->packed);
+ }
+
+ return $this->packed ? serialize($data) : $data;
+ }
+
+ /**
+ * Unserializes serialized data
+ */
+ private function unserialize($data)
+ {
+ if ($this->type == 'db') {
+ return $this->db->decode($data, $this->packed);
+ }
+
+ return $this->packed ? @unserialize($data) : $data;
+ }
+}
diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php
index 2190dc4c2..62567a0e0 100644
--- a/program/lib/Roundcube/rcube_config.php
+++ b/program/lib/Roundcube/rcube_config.php
@@ -26,6 +26,8 @@ class rcube_config
{
const DEFAULT_SKIN = 'larry';
+ private $env = '';
+ private $basedir = 'config/';
private $prop = array();
private $errors = array();
private $userprefs = array();
@@ -43,14 +45,21 @@ class rcube_config
'reply_mode' => 'top_posting',
'refresh_interval' => 'keep_alive',
'min_refresh_interval' => 'min_keep_alive',
+ 'messages_cache_ttl' => 'message_cache_lifetime',
+ 'redundant_attachments_cache_ttl' => 'redundant_attachments_memcache_ttl',
);
/**
* Object constructor
+ *
+ * @param string Environment suffix for config files to load
*/
- public function __construct()
+ public function __construct($env = '')
{
+ $this->env = $env;
+ $this->basedir = RCUBE_CONFIG_DIR;
+
$this->load();
// Defaults, that we do not require you to configure,
@@ -67,16 +76,26 @@ class rcube_config
*/
private function load()
{
- // load main config file
- if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'main.inc.php'))
- $this->errors[] = 'main.inc.php was not found.';
+ // Load default settings
+ if (!$this->load_from_file('defaults.inc.php')) {
+ $this->errors[] = 'defaults.inc.php was not found.';
+ }
- // load database config
- if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'db.inc.php'))
- $this->errors[] = 'db.inc.php was not found.';
+ // load main config file
+ if (!$this->load_from_file('config.inc.php')) {
+ // Old configuration files
+ if (!$this->load_from_file('main.inc.php') ||
+ !$this->load_from_file('db.inc.php')) {
+ $this->errors[] = 'config.inc.php was not found.';
+ }
+ else if (rand(1,100) == 10) { // log warning on every 100th request (average)
+ trigger_error("config.inc.php was not found. Please migrate your config by running bin/update.sh", E_USER_WARNING);
+ }
+ }
// load host-specific configuration
- $this->load_host_config();
+ if (!empty($_SERVER['HTTP_HOST']))
+ $this->load_host_config();
// set skin (with fallback to old 'skin_path' property)
if (empty($this->prop['skin'])) {
@@ -153,7 +172,7 @@ class rcube_config
}
if ($fname) {
- $this->load_from_file(RCUBE_CONFIG_DIR . $fname);
+ $this->load_from_file($fname);
}
}
@@ -162,19 +181,25 @@ class rcube_config
* Read configuration from a file
* and merge with the already stored config values
*
- * @param string $fpath Full path to the config file to be loaded
+ * @param string $file Name of the config file to be loaded
* @return booelan True on success, false on failure
*/
- public function load_from_file($fpath)
+ public function load_from_file($file)
{
- if (is_file($fpath) && is_readable($fpath)) {
+ $fpath = $this->resolve_path($file);
+ if ($fpath && is_file($fpath) && is_readable($fpath)) {
// use output buffering, we don't need any output here
ob_start();
include($fpath);
ob_end_clean();
- if (is_array($rcmail_config)) {
- $this->prop = array_merge($this->prop, $rcmail_config, $this->userprefs);
+ if (is_array($config)) {
+ $this->merge($config);
+ return true;
+ }
+ // deprecated name of config variable
+ else if (is_array($rcmail_config)) {
+ $this->merge($rcmail_config);
return true;
}
}
@@ -182,6 +207,26 @@ class rcube_config
return false;
}
+ /**
+ * Helper method to resolve the absolute path to the given config file.
+ * This also takes the 'env' property into account.
+ */
+ public function resolve_path($file, $use_env = true)
+ {
+ if (strpos($file, '/') === false) {
+ $file = realpath($this->basedir . '/' . $file);
+ }
+
+ // check if <file>-env.ini exists
+ if ($file && $use_env && !empty($this->env)) {
+ $envfile = preg_replace('/\.(inc.php)$/', '-' . $this->env . '.\\1', $file);
+ if (is_file($envfile))
+ return $envfile;
+ }
+
+ return $file;
+ }
+
/**
* Getter for a specific config parameter
@@ -195,9 +240,6 @@ class rcube_config
if (isset($this->prop[$name])) {
$result = $this->prop[$name];
}
- else if (isset($this->legacy_props[$name])) {
- return $this->get($this->legacy_props[$name], $def);
- }
else {
$result = $def;
}
@@ -241,6 +283,7 @@ class rcube_config
public function merge($prefs)
{
$this->prop = array_merge($this->prop, $prefs, $this->userprefs);
+ $this->fix_legacy_props();
}
@@ -273,6 +316,8 @@ class rcube_config
$this->userprefs = $prefs;
$this->prop = array_merge($this->prop, $prefs);
+ $this->fix_legacy_props();
+
// override timezone settings with client values
if ($this->prop['timezone'] == 'auto') {
$this->prop['_timezone_value'] = isset($_SESSION['timezone']) ? $this->client_timezone() : $this->prop['_timezone_value'];
@@ -435,4 +480,18 @@ class rcube_config
return date_default_timezone_get();
}
+ /**
+ * Convert legacy options into new ones
+ */
+ private function fix_legacy_props()
+ {
+ foreach ($this->legacy_props as $new => $old) {
+ if (isset($this->prop[$old])) {
+ if (!isset($this->prop[$new])) {
+ $this->prop[$new] = $this->prop[$old];
+ }
+ unset($this->prop[$old]);
+ }
+ }
+ }
}
diff --git a/program/lib/Roundcube/rcube_contacts.php b/program/lib/Roundcube/rcube_contacts.php
index c66e98687..3919cdc6e 100644
--- a/program/lib/Roundcube/rcube_contacts.php
+++ b/program/lib/Roundcube/rcube_contacts.php
@@ -137,16 +137,34 @@ class rcube_contacts extends rcube_addressbook
* List all active contact groups of this source
*
* @param string Search string to match group name
+ * @param int Matching mode:
+ * 0 - partial (*abc*),
+ * 1 - strict (=),
+ * 2 - prefix (abc*)
+ *
* @return array Indexed list of contact groups, each a hash array
*/
- function list_groups($search = null)
+ function list_groups($search = null, $mode = 0)
{
$results = array();
if (!$this->groups)
return $results;
- $sql_filter = $search ? " AND " . $this->db->ilike('name', '%'.$search.'%') : '';
+ if ($search) {
+ switch (intval($mode)) {
+ case 1:
+ $sql_filter = $this->db->ilike('name', $search);
+ break;
+ case 2:
+ $sql_filter = $this->db->ilike('name', $search . '%');
+ break;
+ default:
+ $sql_filter = $this->db->ilike('name', '%' . $search . '%');
+ }
+
+ $sql_filter = " AND $sql_filter";
+ }
$sql_result = $this->db->query(
"SELECT * FROM ".$this->db->table_name($this->db_groups).
@@ -626,10 +644,6 @@ class rcube_contacts extends rcube_addressbook
$insert_id = $this->db->insert_id($this->db_name);
}
- // also add the newly created contact to the active group
- if ($insert_id && $this->group_id)
- $this->add_to_group($this->group_id, $insert_id);
-
$this->cache = null;
return $insert_id;
@@ -883,9 +897,10 @@ class rcube_contacts extends rcube_addressbook
/**
* Add the given contact records the a certain group
*
- * @param string Group identifier
- * @param array List of contact identifiers to be added
- * @return int Number of contacts added
+ * @param string Group identifier
+ * @param array|string List of contact identifiers to be added
+ *
+ * @return int Number of contacts added
*/
function add_to_group($group_id, $ids)
{
@@ -930,9 +945,10 @@ class rcube_contacts extends rcube_addressbook
/**
* Remove the given contact records from a certain group
*
- * @param string Group identifier
- * @param array List of contact identifiers to be removed
- * @return int Number of deleted group members
+ * @param string Group identifier
+ * @param array|string List of contact identifiers to be removed
+ *
+ * @return int Number of deleted group members
*/
function remove_from_group($group_id, $ids)
{
diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php
index 0d3276b84..fb8d8f103 100644
--- a/program/lib/Roundcube/rcube_csv2vcard.php
+++ b/program/lib/Roundcube/rcube_csv2vcard.php
@@ -130,6 +130,21 @@ class rcube_csv2vcard
'work_state' => 'region:work',
'home_city_short' => 'locality:home',
'home_state_short' => 'region:home',
+
+ // Atmail
+ 'date_of_birth' => 'birthday',
+ 'email' => 'email:pref',
+ 'home_mobile' => 'phone:cell',
+ 'home_zip' => 'zipcode:home',
+ 'info' => 'notes',
+ 'user_photo' => 'photo',
+ 'url' => 'website:homepage',
+ 'work_company' => 'organization',
+ 'work_dept' => 'departament',
+ 'work_fax' => 'phone:work,fax',
+ 'work_mobile' => 'phone:work,cell',
+ 'work_title' => 'jobtitle',
+ 'work_zip' => 'zipcode:work',
);
/**
@@ -230,8 +245,29 @@ class rcube_csv2vcard
'work_phone' => "Work Phone",
'work_address' => "Work Address",
//'work_address_2' => "Work Address 2",
+ 'work_city' => "Work City",
'work_country' => "Work Country",
+ 'work_state' => "Work State",
'work_zipcode' => "Work ZipCode",
+
+ // Atmail
+ 'date_of_birth' => "Date of Birth",
+ 'email' => "Email",
+ //'email_2' => "Email2",
+ //'email_3' => "Email3",
+ //'email_4' => "Email4",
+ //'email_5' => "Email5",
+ 'home_mobile' => "Home Mobile",
+ 'home_zip' => "Home Zip",
+ 'info' => "Info",
+ 'user_photo' => "User Photo",
+ 'url' => "URL",
+ 'work_company' => "Work Company",
+ 'work_dept' => "Work Dept",
+ 'work_fax' => "Work Fax",
+ 'work_mobile' => "Work Mobile",
+ 'work_title' => "Work Title",
+ 'work_zip' => "Work Zip",
);
protected $local_label_map = array();
@@ -268,7 +304,6 @@ class rcube_csv2vcard
{
// convert to UTF-8
$head = substr($csv, 0, 4096);
- $fallback = rcube::get_instance()->config->get('default_charset', 'ISO-8859-1'); // fallback to Latin-1?
$charset = rcube_charset::detect($head, RCUBE_CHARSET);
$csv = rcube_charset::convert($csv, $charset);
$head = '';
@@ -276,7 +311,7 @@ class rcube_csv2vcard
$this->map = array();
// Parse file
- foreach (preg_split("/[\r\n]+/", $csv) as $i => $line) {
+ foreach (preg_split("/[\r\n]+/", $csv) as $line) {
$elements = $this->parse_line($line);
if (empty($elements)) {
continue;
@@ -353,6 +388,12 @@ class rcube_csv2vcard
if (!empty($this->local_label_map)) {
for ($i = 0; $i < $size; $i++) {
$label = $this->local_label_map[$elements[$i]];
+
+ // special localization label
+ if ($label && $label[0] == '_') {
+ $label = substr($label, 1);
+ }
+
if ($label && !empty($this->csv2vcard_map[$label])) {
$map2[$i] = $this->csv2vcard_map[$label];
}
@@ -384,9 +425,13 @@ class rcube_csv2vcard
$contact['birthday'] = $contact['birthday-y'] .'-' .$contact['birthday-m'] . '-' . $contact['birthday-d'];
}
+ // Empty dates, e.g. "0/0/00", "0000-00-00 00:00:00"
foreach (array('birthday', 'anniversary') as $key) {
- if (!empty($contact[$key]) && $contact[$key] == '0/0/00') { // @TODO: localization?
- unset($contact[$key]);
+ if (!empty($contact[$key])) {
+ $date = preg_replace('/[0[:^word:]]/', '', $contact[$key]);
+ if (empty($date)) {
+ unset($contact[$key]);
+ }
}
}
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index 49bbe5c6e..852070073 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -47,6 +47,7 @@ class rcube_db
'identifier_end' => '"',
);
+ const DEBUG_LINE_LENGTH = 4096;
/**
* Factory, returns driver-specific instance of the class
@@ -99,27 +100,15 @@ class rcube_db
$this->db_dsnw_array = self::parse_dsn($db_dsnw);
$this->db_dsnr_array = self::parse_dsn($db_dsnr);
-
- // Initialize driver class
- $this->init();
- }
-
- /**
- * Initialization of the object with driver specific code
- */
- protected function init()
- {
- // To be used by driver classes
}
/**
* Connect to specific database
*
- * @param array $dsn DSN for DB connections
- *
- * @return PDO database handle
+ * @param array $dsn DSN for DB connections
+ * @param string $mode Connection mode (r|w)
*/
- protected function dsn_connect($dsn)
+ protected function dsn_connect($dsn, $mode)
{
$this->db_error = false;
$this->db_error_msg = null;
@@ -128,7 +117,7 @@ class rcube_db
$dsn_string = $this->dsn_string($dsn);
$dsn_options = $this->dsn_options($dsn);
- if ($db_pconn) {
+ if ($this->db_pconn) {
$dsn_options[PDO::ATTR_PERSISTENT] = true;
}
@@ -157,9 +146,10 @@ class rcube_db
return null;
}
+ $this->dbh = $dbh;
+ $this->db_mode = $mode;
+ $this->db_connected = true;
$this->conn_configure($dsn, $dbh);
-
- return $dbh;
}
/**
@@ -182,16 +172,6 @@ class rcube_db
}
/**
- * Driver-specific database character set setting
- *
- * @param string $charset Character set name
- */
- protected function set_charset($charset)
- {
- $this->query("SET NAMES 'utf8'");
- }
-
- /**
* Connect to appropriate database depending on the operation
*
* @param string $mode Connection mode (r|w)
@@ -218,23 +198,14 @@ class rcube_db
$dsn = ($mode == 'r') ? $this->db_dsnr_array : $this->db_dsnw_array;
- $this->dbh = $this->dsn_connect($dsn);
- $this->db_connected = is_object($this->dbh);
+ $this->dsn_connect($dsn, $mode);
// use write-master when read-only fails
if (!$this->db_connected && $mode == 'r' && $this->is_replicated()) {
- $mode = 'w';
- $this->dbh = $this->dsn_connect($this->db_dsnw_array);
- $this->db_connected = is_object($this->dbh);
+ $this->dsn_connect($this->db_dsnw_array, 'w');
}
- if ($this->db_connected) {
- $this->db_mode = $mode;
- $this->set_charset('utf8');
- }
- else {
- $this->conn_failure = true;
- }
+ $this->conn_failure = !$this->db_connected;
}
/**
@@ -255,6 +226,11 @@ class rcube_db
protected function debug($query)
{
if ($this->options['debug_mode']) {
+ if (($len = strlen($query)) > self::DEBUG_LINE_LENGTH) {
+ $diff = $len - self::DEBUG_LINE_LENGTH;
+ $query = substr($query, 0, self::DEBUG_LINE_LENGTH)
+ . "... [truncated $diff bytes]";
+ }
rcube::write_log('sql', '[' . (++$this->db_index) . '] ' . $query . ';');
}
}
@@ -362,8 +338,10 @@ class rcube_db
*/
protected function _query($query, $offset, $numrows, $params)
{
+ $query = trim($query);
+
// Read or write ?
- $mode = preg_match('/^(select|show)/i', ltrim($query)) ? 'r' : 'w';
+ $mode = preg_match('/^(select|show|set)/i', $query) ? 'r' : 'w';
$this->db_connect($mode);
@@ -405,21 +383,25 @@ class rcube_db
$this->db_error_msg = null;
// send query
- $query = $this->dbh->query($query);
+ $result = $this->dbh->query($query);
- if ($query === false) {
+ if ($result === false) {
$error = $this->dbh->errorInfo();
- $this->db_error = true;
- $this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]);
- rcube::raise_error(array('code' => 500, 'type' => 'db',
- 'line' => __LINE__, 'file' => __FILE__,
- 'message' => $this->db_error_msg), true, false);
+ if (empty($this->options['ignore_key_errors']) || $error[0] != '23000') {
+ $this->db_error = true;
+ $this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]);
+
+ rcube::raise_error(array('code' => 500, 'type' => 'db',
+ 'line' => __LINE__, 'file' => __FILE__,
+ 'message' => $this->db_error_msg . " (SQL Query: $query)"
+ ), true, false);
+ }
}
- $this->last_result = $query;
+ $this->last_result = $result;
- return $query;
+ return $result;
}
/**
@@ -444,17 +426,20 @@ class rcube_db
*
* @param mixed $result Optional query handle
* @return mixed Number of rows or false on failure
+ * @deprecated This method shows very poor performance and should be avoided.
*/
public function num_rows($result = null)
{
if ($result || ($result === null && ($result = $this->last_result))) {
// repeat query with SELECT COUNT(*) ...
- if (preg_match('/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i', $result->queryString, $m)) {
+ if (preg_match('/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/ims', $result->queryString, $m)) {
$query = $this->dbh->query('SELECT COUNT(*) FROM ' . $m[1], PDO::FETCH_NUM);
return $query ? intval($query->fetchColumn(0)) : false;
}
else {
- return count($result->fetchAll());
+ $num = count($result->fetchAll());
+ $result->execute(); // re-execute query because there's no seek(0)
+ return $num;
}
}
@@ -631,6 +616,22 @@ class rcube_db
}
/**
+ * Escapes a string so it can be safely used in a query
+ *
+ * @param string $str A string to escape
+ *
+ * @return string Escaped string for use in a query
+ */
+ public function escape($str)
+ {
+ if (is_null($str)) {
+ return 'NULL';
+ }
+
+ return substr($this->quote($str), 1, -1);
+ }
+
+ /**
* Quotes a string so it can be safely used as a table or column name
*
* @param string $str Value to quote
@@ -645,6 +646,20 @@ class rcube_db
}
/**
+ * Escapes a string so it can be safely used in a query
+ *
+ * @param string $str A string to escape
+ *
+ * @return string Escaped string for use in a query
+ * @deprecated Replaced by rcube_db::escape
+ * @see rcube_db::escape
+ */
+ public function escapeSimple($str)
+ {
+ return $this->escape($str);
+ }
+
+ /**
* Quotes a string so it can be safely used as a table or column name
*
* @param string $str Value to quote
@@ -668,11 +683,19 @@ class rcube_db
/**
* Return SQL function for current time and date
*
+ * @param int $interval Optional interval (in seconds) to add/subtract
+ *
* @return string SQL function to use in query
*/
- public function now()
+ public function now($interval = 0)
{
- return "now()";
+ if ($interval) {
+ $add = ' ' . ($interval > 0 ? '+' : '-') . ' INTERVAL ';
+ $add .= $interval > 0 ? intval($interval) : intval($interval) * -1;
+ $add .= ' SECOND';
+ }
+
+ return "now()" . $add;
}
/**
@@ -755,12 +778,19 @@ class rcube_db
/**
* Encodes non-UTF-8 characters in string/array/object (recursive)
*
- * @param mixed $input Data to fix
+ * @param mixed $input Data to fix
+ * @param bool $serialized Enable serialization
*
* @return mixed Properly UTF-8 encoded data
*/
- public static function encode($input)
+ public static function encode($input, $serialized = false)
{
+ // use Base64 encoding to workaround issues with invalid
+ // or null characters in serialized string (#1489142)
+ if ($serialized) {
+ return base64_encode(serialize($input));
+ }
+
if (is_object($input)) {
foreach (get_object_vars($input) as $idx => $value) {
$input->$idx = self::encode($value);
@@ -771,6 +801,7 @@ class rcube_db
foreach ($input as $idx => $value) {
$input[$idx] = self::encode($value);
}
+
return $input;
}
@@ -780,12 +811,24 @@ class rcube_db
/**
* Decodes encoded UTF-8 string/object/array (recursive)
*
- * @param mixed $input Input data
+ * @param mixed $input Input data
+ * @param bool $serialized Enable serialization
*
* @return mixed Decoded data
*/
- public static function decode($input)
+ public static function decode($input, $serialized = false)
{
+ // use Base64 encoding to workaround issues with invalid
+ // or null characters in serialized string (#1489142)
+ if ($serialized) {
+ // Keep backward compatybility where base64 wasn't used
+ if (strpos(substr($input, 0, 16), ':') !== false) {
+ return self::decode(@unserialize($input));
+ }
+
+ return @unserialize(base64_decode($input));
+ }
+
if (is_object($input)) {
foreach (get_object_vars($input) as $idx => $value) {
$input->$idx = self::decode($value);
@@ -813,17 +856,26 @@ class rcube_db
{
$rcube = rcube::get_instance();
- // return table name if configured
- $config_key = 'db_table_'.$table;
-
- if ($name = $rcube->config->get($config_key)) {
- return $name;
+ // add prefix to the table name if configured
+ if ($prefix = $rcube->config->get('db_prefix')) {
+ return $prefix . $table;
}
return $table;
}
/**
+ * Set class option value
+ *
+ * @param string $name Option name
+ * @param mixed $value Option value
+ */
+ public function set_option($name, $value)
+ {
+ $this->options[$name] = $value;
+ }
+
+ /**
* MDB2 DSN string parser
*
* @param string $sequence Secuence name
diff --git a/program/lib/Roundcube/rcube_db_mssql.php b/program/lib/Roundcube/rcube_db_mssql.php
index 37a42678a..3c1b9d71f 100644
--- a/program/lib/Roundcube/rcube_db_mssql.php
+++ b/program/lib/Roundcube/rcube_db_mssql.php
@@ -29,38 +29,52 @@ class rcube_db_mssql extends rcube_db
public $db_provider = 'mssql';
/**
- * Driver initialization
+ * Object constructor
+ *
+ * @param string $db_dsnw DSN for read/write operations
+ * @param string $db_dsnr Optional DSN for read only operations
+ * @param bool $pconn Enables persistent connections
*/
- protected function init()
+ public function __construct($db_dsnw, $db_dsnr = '', $pconn = false)
{
+ parent::__construct($db_dsnw, $db_dsnr, $pconn);
+
$this->options['identifier_start'] = '[';
$this->options['identifier_end'] = ']';
}
/**
- * Character setting
+ * Driver-specific configuration of database connection
+ *
+ * @param array $dsn DSN for DB connections
+ * @param PDO $dbh Connection handler
*/
- protected function set_charset($charset)
+ protected function conn_configure($dsn, $dbh)
{
- // UTF-8 is default
+ // Set date format in case of non-default language (#1488918)
+ $this->query("SET DATEFORMAT ymd");
}
/**
* Return SQL function for current time and date
*
+ * @param int $interval Optional interval (in seconds) to add/subtract
+ *
* @return string SQL function to use in query
*/
- public function now()
+ public function now($interval = 0)
{
+ if ($interval) {
+ $interval = intval($interval);
+ return "dateadd(second, $interval, getdate())";
+ }
+
return "getdate()";
}
/**
* Return SQL statement to convert a field value into a unix timestamp
*
- * This method is deprecated and should not be used anymore due to limitations
- * of timestamp functions in Mysql (year 2038 problem)
- *
* @param string $field Field name
*
* @return string SQL statement to use in query
diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php
index 8ab6403c8..6fa5ad768 100644
--- a/program/lib/Roundcube/rcube_db_mysql.php
+++ b/program/lib/Roundcube/rcube_db_mysql.php
@@ -30,16 +30,40 @@ class rcube_db_mysql extends rcube_db
public $db_provider = 'mysql';
/**
- * Driver initialization/configuration
+ * Object constructor
+ *
+ * @param string $db_dsnw DSN for read/write operations
+ * @param string $db_dsnr Optional DSN for read only operations
+ * @param bool $pconn Enables persistent connections
*/
- protected function init()
+ public function __construct($db_dsnw, $db_dsnr = '', $pconn = false)
{
+ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+ rcube::raise_error(array('code' => 600, 'type' => 'db',
+ 'line' => __LINE__, 'file' => __FILE__,
+ 'message' => "MySQL driver requires PHP >= 5.3, current version is " . PHP_VERSION),
+ true, true);
+ }
+
+ parent::__construct($db_dsnw, $db_dsnr, $pconn);
+
// SQL identifiers quoting
$this->options['identifier_start'] = '`';
$this->options['identifier_end'] = '`';
}
/**
+ * Driver-specific configuration of database connection
+ *
+ * @param array $dsn DSN for DB connections
+ * @param PDO $dbh Connection handler
+ */
+ protected function conn_configure($dsn, $dbh)
+ {
+ $this->query("SET NAMES 'utf8'");
+ }
+
+ /**
* Abstract SQL statement for value concatenation
*
* @return string SQL statement to be used in query
@@ -127,7 +151,7 @@ class rcube_db_mysql extends rcube_db
$result[PDO::MYSQL_ATTR_FOUND_ROWS] = true;
// Enable AUTOCOMMIT mode (#1488902)
- $dsn_options[PDO::ATTR_AUTOCOMMIT] = true;
+ $result[PDO::ATTR_AUTOCOMMIT] = true;
return $result;
}
@@ -147,7 +171,7 @@ class rcube_db_mysql extends rcube_db
$result = $this->query('SHOW VARIABLES');
- while ($sql_arr = $this->fetch_array($result)) {
+ while ($row = $this->fetch_array($result)) {
$this->variables[$row[0]] = $row[1];
}
}
diff --git a/program/lib/Roundcube/rcube_db_pgsql.php b/program/lib/Roundcube/rcube_db_pgsql.php
index cf23c5e48..d72c9d6b3 100644
--- a/program/lib/Roundcube/rcube_db_pgsql.php
+++ b/program/lib/Roundcube/rcube_db_pgsql.php
@@ -29,6 +29,17 @@ class rcube_db_pgsql extends rcube_db
public $db_provider = 'postgres';
/**
+ * Driver-specific configuration of database connection
+ *
+ * @param array $dsn DSN for DB connections
+ * @param PDO $dbh Connection handler
+ */
+ protected function conn_configure($dsn, $dbh)
+ {
+ $this->query("SET NAMES 'utf8'");
+ }
+
+ /**
* Get last inserted record ID
*
* @param string $table Table name (to find the incremented sequence)
@@ -53,19 +64,20 @@ class rcube_db_pgsql extends rcube_db
/**
* Return correct name for a specific database sequence
*
- * @param string $sequence Secuence name
+ * @param string $table Table name
*
* @return string Translated sequence name
*/
- protected function sequence_name($sequence)
+ protected function sequence_name($table)
{
- $rcube = rcube::get_instance();
+ // Note: we support only one sequence per table
+ // Note: The sequence name must be <table_name>_seq
+ $sequence = $table . '_seq';
+ $rcube = rcube::get_instance();
// return sequence name if configured
- $config_key = 'db_sequence_'.$sequence;
-
- if ($name = $rcube->config->get($config_key)) {
- return $name;
+ if ($prefix = $rcube->config->get('db_prefix')) {
+ return $prefix . $sequence;
}
return $sequence;
@@ -74,9 +86,6 @@ class rcube_db_pgsql extends rcube_db
/**
* Return SQL statement to convert a field value into a unix timestamp
*
- * This method is deprecated and should not be used anymore due to limitations
- * of timestamp functions in Mysql (year 2038 problem)
- *
* @param string $field Field name
*
* @return string SQL statement to use in query
@@ -88,6 +97,24 @@ class rcube_db_pgsql extends rcube_db
}
/**
+ * Return SQL function for current time and date
+ *
+ * @param int $interval Optional interval (in seconds) to add/subtract
+ *
+ * @return string SQL function to use in query
+ */
+ public function now($interval = 0)
+ {
+ if ($interval) {
+ $add = ' ' . ($interval > 0 ? '+' : '-') . " interval '";
+ $add .= $interval > 0 ? intval($interval) : intval($interval) * -1;
+ $add .= " seconds'";
+ }
+
+ return "now()" . $add;
+ }
+
+ /**
* Return SQL statement for case insensitive LIKE
*
* @param string $column Field name
@@ -129,4 +156,38 @@ class rcube_db_pgsql extends rcube_db
return isset($this->variables[$varname]) ? $this->variables[$varname] : $default;
}
+ /**
+ * Returns PDO DSN string from DSN array
+ *
+ * @param array $dsn DSN parameters
+ *
+ * @return string DSN string
+ */
+ protected function dsn_string($dsn)
+ {
+ $params = array();
+ $result = 'pgsql:';
+
+ if ($dsn['hostspec']) {
+ $params[] = 'host=' . $dsn['hostspec'];
+ }
+ else if ($dsn['socket']) {
+ $params[] = 'host=' . $dsn['socket'];
+ }
+
+ if ($dsn['port']) {
+ $params[] = 'port=' . $dsn['port'];
+ }
+
+ if ($dsn['database']) {
+ $params[] = 'dbname=' . $dsn['database'];
+ }
+
+ if (!empty($params)) {
+ $result .= implode(';', $params);
+ }
+
+ return $result;
+ }
+
}
diff --git a/program/lib/Roundcube/rcube_db_sqlite.php b/program/lib/Roundcube/rcube_db_sqlite.php
index 145b8a371..b66c56097 100644
--- a/program/lib/Roundcube/rcube_db_sqlite.php
+++ b/program/lib/Roundcube/rcube_db_sqlite.php
@@ -29,13 +29,6 @@ class rcube_db_sqlite extends rcube_db
public $db_provider = 'sqlite';
/**
- * Database character set
- */
- protected function set_charset($charset)
- {
- }
-
- /**
* Prepare connection
*/
protected function conn_prepare($dsn)
@@ -56,10 +49,6 @@ class rcube_db_sqlite extends rcube_db
*/
protected function conn_configure($dsn, $dbh)
{
- // we emulate via callback some missing functions
- $dbh->sqliteCreateFunction('unix_timestamp', array('rcube_db_sqlite', 'sqlite_unix_timestamp'), 1);
- $dbh->sqliteCreateFunction('now', array('rcube_db_sqlite', 'sqlite_now'), 0);
-
// Initialize database structure in file is empty
if (!empty($dsn['database']) && !filesize($dsn['database'])) {
$data = file_get_contents(RCUBE_INSTALL_PATH . 'SQL/sqlite.initial.sql');
@@ -83,30 +72,32 @@ class rcube_db_sqlite extends rcube_db
}
/**
- * Callback for sqlite: unix_timestamp()
+ * Return SQL statement to convert a field value into a unix timestamp
+ *
+ * @param string $field Field name
+ *
+ * @return string SQL statement to use in query
+ * @deprecated
*/
- public static function sqlite_unix_timestamp($timestamp = '')
+ public function unixtimestamp($field)
{
- $timestamp = trim($timestamp);
- if (!$timestamp) {
- $ret = time();
- }
- else if (!preg_match('/^[0-9]+$/s', $timestamp)) {
- $ret = strtotime($timestamp);
- }
- else {
- $ret = $timestamp;
- }
-
- return $ret;
+ return "strftime('%s', $field)";
}
/**
- * Callback for sqlite: now()
+ * Return SQL function for current time and date
+ *
+ * @param int $interval Optional interval (in seconds) to add/subtract
+ *
+ * @return string SQL function to use in query
*/
- public static function sqlite_now()
+ public function now($interval = 0)
{
- return date("Y-m-d H:i:s");
+ if ($interval) {
+ $add = ($interval > 0 ? '+' : '') . intval($interval) . ' seconds';
+ }
+
+ return "datetime('now'" . ($add ? ",'$add'" : "") . ")";
}
/**
diff --git a/program/lib/Roundcube/rcube_db_sqlsrv.php b/program/lib/Roundcube/rcube_db_sqlsrv.php
index e5dfb1154..45c41cdaf 100644
--- a/program/lib/Roundcube/rcube_db_sqlsrv.php
+++ b/program/lib/Roundcube/rcube_db_sqlsrv.php
@@ -29,29 +29,46 @@ class rcube_db_sqlsrv extends rcube_db
public $db_provider = 'mssql';
/**
- * Driver initialization
+ * Object constructor
+ *
+ * @param string $db_dsnw DSN for read/write operations
+ * @param string $db_dsnr Optional DSN for read only operations
+ * @param bool $pconn Enables persistent connections
*/
- protected function init()
+ public function __construct($db_dsnw, $db_dsnr = '', $pconn = false)
{
+ parent::__construct($db_dsnw, $db_dsnr, $pconn);
+
$this->options['identifier_start'] = '[';
$this->options['identifier_end'] = ']';
}
/**
- * Database character set setting
+ * Driver-specific configuration of database connection
+ *
+ * @param array $dsn DSN for DB connections
+ * @param PDO $dbh Connection handler
*/
- protected function set_charset($charset)
+ protected function conn_configure($dsn, $dbh)
{
- // UTF-8 is default
+ // Set date format in case of non-default language (#1488918)
+ $this->query("SET DATEFORMAT ymd");
}
/**
* Return SQL function for current time and date
*
+ * @param int $interval Optional interval (in seconds) to add/subtract
+ *
* @return string SQL function to use in query
*/
- public function now()
+ public function now($interval = 0)
{
+ if ($interval) {
+ $interval = intval($interval);
+ return "dateadd(second, $interval, getdate())";
+ }
+
return "getdate()";
}
diff --git a/program/lib/Roundcube/rcube_enriched.php b/program/lib/Roundcube/rcube_enriched.php
index 8c628c912..12deb33ce 100644
--- a/program/lib/Roundcube/rcube_enriched.php
+++ b/program/lib/Roundcube/rcube_enriched.php
@@ -118,7 +118,7 @@ class rcube_enriched
$quoted = '';
$lines = explode('<br>', $a[2]);
- foreach ($lines as $n => $line)
+ foreach ($lines as $line)
$quoted .= '&gt;'.$line.'<br>';
$body = $a[1].'<span class="quotes">'.$quoted.'</span>'.$a[3];
diff --git a/program/lib/Roundcube/rcube_image.php b/program/lib/Roundcube/rcube_image.php
index a55ba1600..09bb4e81b 100644
--- a/program/lib/Roundcube/rcube_image.php
+++ b/program/lib/Roundcube/rcube_image.php
@@ -93,6 +93,10 @@ class rcube_image
$convert = $rcube->config->get('im_convert_path', false);
$props = $this->props();
+ if (empty($props)) {
+ return false;
+ }
+
if (!$filename) {
$filename = $this->image_file;
}
@@ -124,6 +128,7 @@ class rcube_image
}
if ($result === '') {
+ @chmod($filename, 0600);
return $type;
}
}
@@ -147,6 +152,10 @@ class rcube_image
return false;
}
+ if ($image === false) {
+ return false;
+ }
+
$scale = $size / max($props['width'], $props['height']);
// Imagemagick resize is implemented in shrinking mode (see -resize argument above)
@@ -183,6 +192,7 @@ class rcube_image
}
if ($result) {
+ @chmod($filename, 0600);
return $type;
}
}
@@ -223,6 +233,7 @@ class rcube_image
$result = rcube::exec($convert . ' 2>&1 -colorspace RGB -quality 75 {in} {type}:{out}', $p);
if ($result === '') {
+ @chmod($filename, 0600);
return true;
}
}
@@ -256,6 +267,7 @@ class rcube_image
}
if ($result) {
+ @chmod($filename, 0600);
return true;
}
}
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 0aa059c26..b60aefc5f 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -308,14 +308,7 @@ class rcube_imap extends rcube_storage
*/
public function set_folder($folder)
{
- if ($this->folder == $folder) {
- return;
- }
-
$this->folder = $folder;
-
- // clear messagecount cache for this folder
- $this->clear_messagecount($folder);
}
@@ -626,7 +619,7 @@ class rcube_imap extends rcube_storage
}
if ($mode == 'THREADS') {
- $res = $this->fetch_threads($folder, $force);
+ $res = $this->threads($folder);
$count = $res->count();
if ($status) {
@@ -656,11 +649,11 @@ class rcube_imap extends rcube_storage
$keys[] = 'ALL';
}
if ($status) {
- $keys[] = 'MAX';
+ $keys[] = 'MAX';
}
}
- // @TODO: if $force==false && $mode == 'ALL' we could try to use cache index here
+ // @TODO: if $mode == 'ALL' we could try to use cache index here
// get message count using (E)SEARCH
// not very performant but more precise (using UNDELETED)
@@ -791,7 +784,7 @@ class rcube_imap extends rcube_storage
$threads = $mcache->get_thread($folder);
}
else {
- $threads = $this->fetch_threads($folder);
+ $threads = $this->threads($folder);
}
return $this->fetch_thread_headers($folder, $threads, $page, $slice);
@@ -800,32 +793,47 @@ class rcube_imap extends rcube_storage
/**
* Method for fetching threads data
*
- * @param string $folder Folder name
- * @param bool $force Use IMAP server, no cache
+ * @param string $folder Folder name
*
* @return rcube_imap_thread Thread data object
*/
- function fetch_threads($folder, $force = false)
+ function threads($folder)
{
- if (!$force && ($mcache = $this->get_mcache_engine())) {
+ if ($mcache = $this->get_mcache_engine()) {
// don't store in self's internal cache, cache has it's own internal cache
return $mcache->get_thread($folder);
}
- if (empty($this->icache['threads'])) {
- if (!$this->check_connection()) {
- return new rcube_result_thread();
+ if (!empty($this->icache['threads'])) {
+ if ($this->icache['threads']->get_parameters('MAILBOX') == $folder) {
+ return $this->icache['threads'];
}
+ }
- // get all threads
- $result = $this->conn->thread($folder, $this->threading,
- $this->options['skip_deleted'] ? 'UNDELETED' : '', true);
+ // get all threads
+ $result = $this->threads_direct($folder);
- // add to internal (fast) cache
- $this->icache['threads'] = $result;
+ // add to internal (fast) cache
+ return $this->icache['threads'] = $result;
+ }
+
+
+ /**
+ * Method for direct fetching of threads data
+ *
+ * @param string $folder Folder name
+ *
+ * @return rcube_imap_thread Thread data object
+ */
+ function threads_direct($folder)
+ {
+ if (!$this->check_connection()) {
+ return new rcube_result_thread();
}
- return $this->icache['threads'];
+ // get all threads
+ return $this->conn->thread($folder, $this->threading,
+ $this->options['skip_deleted'] ? 'UNDELETED' : '', true);
}
@@ -981,7 +989,7 @@ class rcube_imap extends rcube_storage
// use memory less expensive (and quick) method for big result set
$index = clone $this->index('', $this->sort_field, $this->sort_order);
// get messages uids for one page...
- $index->slice($start_msg, min($cnt-$from, $this->page_size));
+ $index->slice($from, min($cnt-$from, $this->page_size));
if ($slice) {
$index->slice(-$slice, $slice);
@@ -1180,12 +1188,15 @@ class rcube_imap extends rcube_storage
* @param string $folder Folder to get index from
* @param string $sort_field Sort column
* @param string $sort_order Sort order [ASC, DESC]
+ * @param bool $no_threads Get not threaded index
+ * @param bool $no_search Get index not limited to search result (optionally)
*
* @return rcube_result_index|rcube_result_thread List of messages (UIDs)
*/
- public function index($folder = '', $sort_field = NULL, $sort_order = NULL)
- {
- if ($this->threading) {
+ public function index($folder = '', $sort_field = NULL, $sort_order = NULL,
+ $no_threads = false, $no_search = false
+ ) {
+ if (!$no_threads && $this->threading) {
return $this->thread_index($folder, $sort_field, $sort_order);
}
@@ -1197,43 +1208,50 @@ class rcube_imap extends rcube_storage
// we have a saved search result, get index from there
if ($this->search_string) {
- if ($this->search_threads) {
- $this->search($folder, $this->search_string, $this->search_charset, $this->sort_field);
+ if ($this->search_set->is_empty()) {
+ return new rcube_result_index($folder, '* SORT');
}
- // use message index sort as default sorting
- if (!$this->sort_field || $this->search_sorted) {
- if ($this->sort_field && $this->search_sort_field != $this->sort_field) {
- $this->search($folder, $this->search_string, $this->search_charset, $this->sort_field);
- }
+ // search result is an index with the same sorting?
+ if (($this->search_set instanceof rcube_result_index)
+ && ((!$this->sort_field && !$this->search_sorted) ||
+ ($this->search_sorted && $this->search_sort_field == $this->sort_field))
+ ) {
$index = $this->search_set;
}
- else if (!$this->check_connection()) {
- return new rcube_result_index();
- }
- else {
- $index = $this->conn->index($folder, $this->search_set->get(),
- $this->sort_field, $this->options['skip_deleted'], true, true);
+ // $no_search is enabled when we are not interested in
+ // fetching index for search result, e.g. to sort
+ // threaded search result we can use full mailbox index.
+ // This makes possible to use index from cache
+ else if (!$no_search) {
+ if (!$this->sort_field) {
+ // No sorting needed, just build index from the search result
+ // @TODO: do we need to sort by UID here?
+ $search = $this->search_set->get_compressed();
+ $index = new rcube_result_index($folder, '* ESEARCH ALL ' . $search);
+ }
+ else {
+ $index = $this->index_direct($folder, $this->search_charset,
+ $this->sort_field, $this->search_set);
+ }
}
- if ($this->sort_order != $index->get_parameters('ORDER')) {
- $index->revert();
- }
+ if (isset($index)) {
+ if ($this->sort_order != $index->get_parameters('ORDER')) {
+ $index->revert();
+ }
- return $index;
+ return $index;
+ }
}
// check local cache
if ($mcache = $this->get_mcache_engine()) {
- $index = $mcache->get_index($folder, $this->sort_field, $this->sort_order);
- }
- // fetch from IMAP server
- else {
- $index = $this->index_direct(
- $folder, $this->sort_field, $this->sort_order);
+ return $mcache->get_index($folder, $this->sort_field, $this->sort_order);
}
- return $index;
+ // fetch from IMAP server
+ return $this->index_direct($folder, $this->sort_field, $this->sort_order);
}
@@ -1241,22 +1259,24 @@ class rcube_imap extends rcube_storage
* Return sorted list of message UIDs ignoring current search settings.
* Doesn't uses cache by default.
*
- * @param string $folder Folder to get index from
- * @param string $sort_field Sort column
- * @param string $sort_order Sort order [ASC, DESC]
- * @param bool $skip_cache Disables cache usage
+ * @param string $folder Folder to get index from
+ * @param string $sort_field Sort column
+ * @param string $sort_order Sort order [ASC, DESC]
+ * @param rcube_result_* $search Optional messages set to limit the result
*
* @return rcube_result_index Sorted list of message UIDs
*/
- public function index_direct($folder, $sort_field = null, $sort_order = null, $skip_cache = true)
+ public function index_direct($folder, $sort_field = null, $sort_order = null, $search = null)
{
- if (!$skip_cache && ($mcache = $this->get_mcache_engine())) {
- $index = $mcache->get_index($folder, $sort_field, $sort_order);
+ if (!empty($search)) {
+ $search = $this->search_set->get_compressed();
}
+
// use message index sort as default sorting
- else if (!$sort_field) {
+ if (!$sort_field) {
// use search result from count() if possible
- if ($this->options['skip_deleted'] && !empty($this->icache['undeleted_idx'])
+ if (empty($search) && $this->options['skip_deleted']
+ && !empty($this->icache['undeleted_idx'])
&& $this->icache['undeleted_idx']->get_parameters('ALL') !== null
&& $this->icache['undeleted_idx']->get_parameters('MAILBOX') == $folder
) {
@@ -1266,8 +1286,12 @@ class rcube_imap extends rcube_storage
return new rcube_result_index();
}
else {
- $index = $this->conn->search($folder,
- 'ALL' .($this->options['skip_deleted'] ? ' UNDELETED' : ''), true);
+ $query = $this->options['skip_deleted'] ? 'UNDELETED' : '';
+ if ($search) {
+ $query = trim($query . ' UID ' . $search);
+ }
+
+ $index = $this->conn->search($folder, $query, true);
}
}
else if (!$this->check_connection()) {
@@ -1276,13 +1300,18 @@ class rcube_imap extends rcube_storage
// fetch complete message index
else {
if ($this->get_capability('SORT')) {
- $index = $this->conn->sort($folder, $sort_field,
- $this->options['skip_deleted'] ? 'UNDELETED' : '', true);
+ $query = $this->options['skip_deleted'] ? 'UNDELETED' : '';
+ if ($search) {
+ $query = trim($query . ' UID ' . $search);
+ }
+
+ $index = $this->conn->sort($folder, $sort_field, $query, true);
}
if (empty($index) || $index->is_error()) {
- $index = $this->conn->index($folder, "1:*", $sort_field,
- $this->options['skip_deleted'], false, true);
+ $index = $this->conn->index($folder, $search ? $search : "1:*",
+ $sort_field, $this->options['skip_deleted'],
+ $search ? true : false, true);
}
}
@@ -1315,7 +1344,7 @@ class rcube_imap extends rcube_storage
}
else {
// get all threads (default sort order)
- $threads = $this->fetch_threads($folder);
+ $threads = $this->threads($folder);
}
$this->set_sort_order($sort_field, $sort_order);
@@ -1326,9 +1355,10 @@ class rcube_imap extends rcube_storage
/**
- * Sort threaded result, using THREAD=REFS method
+ * Sort threaded result, using THREAD=REFS method if available.
+ * If not, use any method and re-sort the result in THREAD=REFS way.
*
- * @param rcube_result_thread $threads Threads result set
+ * @param rcube_result_thread $threads Threads result set
*/
protected function sort_threads($threads)
{
@@ -1340,17 +1370,16 @@ class rcube_imap extends rcube_storage
// THREAD=REFERENCES: sorting by sent date of root message
// THREAD=REFS: sorting by the most recent date in each thread
- if ($this->sort_field && ($this->sort_field != 'date' || $this->get_capability('THREAD') != 'REFS')) {
- $index = $this->index_direct($this->folder, $this->sort_field, $this->sort_order, false);
+ if ($this->threading != 'REFS' || ($this->sort_field && $this->sort_field != 'date')) {
+ $sortby = $this->sort_field ? $this->sort_field : 'date';
+ $index = $this->index($this->folder, $sortby, $this->sort_order, true, true);
if (!$index->is_empty()) {
$threads->sort($index);
}
}
- else {
- if ($this->sort_order != $threads->get_parameters('ORDER')) {
- $threads->revert();
- }
+ else if ($this->sort_order != $threads->get_parameters('ORDER')) {
+ $threads->revert();
}
}
@@ -1423,8 +1452,6 @@ class rcube_imap extends rcube_storage
*/
protected function search_index($folder, $criteria='ALL', $charset=NULL, $sort_field=NULL)
{
- $orig_criteria = $criteria;
-
if (!$this->check_connection()) {
if ($this->threading) {
return new rcube_result_thread();
@@ -2240,13 +2267,14 @@ class rcube_imap extends rcube_storage
/**
* Append a mail message (source) to a specific folder
*
- * @param string $folder Target folder
- * @param string $message The message source string or filename
- * @param string $headers Headers string if $message contains only the body
- * @param boolean $is_file True if $message is a filename
- * @param array $flags Message flags
- * @param mixed $date Message internal date
- * @param bool $binary Enables BINARY append
+ * @param string $folder Target folder
+ * @param string|array $message The message source string or filename
+ * or array (of strings and file pointers)
+ * @param string $headers Headers string if $message contains only the body
+ * @param boolean $is_file True if $message is a filename
+ * @param array $flags Message flags
+ * @param mixed $date Message internal date
+ * @param bool $binary Enables BINARY append
*
* @return int|bool Appended message UID or True on success, False on error
*/
@@ -2639,7 +2667,6 @@ class rcube_imap extends rcube_storage
if ($list_extended) {
// unsubscribe non-existent folders, remove from the list
- // we can do this only when LIST response is available
if (is_array($a_folders) && $name == '*' && !empty($this->conn->data['LIST'])) {
foreach ($a_folders as $idx => $folder) {
if (($opts = $this->conn->data['LIST'][$folder])
@@ -2652,19 +2679,14 @@ class rcube_imap extends rcube_storage
}
}
else {
- // unsubscribe non-existent folders, remove them from the list,
- // we can do this only when LIST response is available
- if (is_array($a_folders) && $name == '*' && !empty($this->conn->data['LIST'])) {
- foreach ($a_folders as $idx => $folder) {
- if (!isset($this->conn->data['LIST'][$folder])
- || in_array('\\Noselect', $this->conn->data['LIST'][$folder])
- ) {
- // Some servers returns \Noselect for existing folders
- if (!$this->folder_exists($folder)) {
- $this->conn->unsubscribe($folder);
- unset($a_folders[$idx]);
- }
- }
+ // unsubscribe non-existent folders, remove them from the list
+ if (is_array($a_folders) && !empty($a_folders) && $name == '*') {
+ $existing = $this->list_folders($root, $name);
+ $nonexisting = array_diff($a_folders, $existing);
+ $a_folders = array_diff($a_folders, $nonexisting);
+
+ foreach ($nonexisting as $folder) {
+ $this->conn->unsubscribe($folder);
}
}
}
@@ -2727,7 +2749,7 @@ class rcube_imap extends rcube_storage
// filter folders list according to rights requirements
if ($rights && $this->get_capability('ACL')) {
- $a_folders = $this->filter_rights($a_folders, $rights);
+ $a_mboxes = $this->filter_rights($a_mboxes, $rights);
}
// filter folders and sort them
@@ -2783,7 +2805,6 @@ class rcube_imap extends rcube_storage
*/
private function list_folders_update(&$result, $type = null)
{
- $delim = $this->get_hierarchy_delimiter();
$namespace = $this->get_namespace();
$search = array();
@@ -3372,7 +3393,6 @@ class rcube_imap extends rcube_storage
{
if (!empty($this->options['fetch_headers'])) {
$headers = explode(' ', $this->options['fetch_headers']);
- $headers = array_map('strtoupper', $headers);
}
else {
$headers = array();
@@ -3382,7 +3402,7 @@ class rcube_imap extends rcube_storage
$headers = array_merge($headers, $this->all_headers);
}
- return implode(' ', array_unique($headers));
+ return $headers;
}
@@ -3695,7 +3715,7 @@ class rcube_imap extends rcube_storage
{
if ($this->caching && !$this->cache) {
$rcube = rcube::get_instance();
- $ttl = $rcube->config->get('message_cache_lifetime', '10d');
+ $ttl = $rcube->config->get('imap_cache_ttl', '10d');
$this->cache = $rcube->get_cache('IMAP', $this->caching, $ttl);
}
@@ -3743,21 +3763,6 @@ class rcube_imap extends rcube_storage
}
}
- /**
- * Delete outdated cache entries
- */
- public function expunge_cache()
- {
- if ($this->mcache) {
- $ttl = rcube::get_instance()->config->get('message_cache_lifetime', '10d');
- $this->mcache->expunge($ttl);
- }
-
- if ($this->cache) {
- $this->cache->expunge();
- }
- }
-
/* --------------------------------
* message caching methods
@@ -3791,8 +3796,9 @@ class rcube_imap extends rcube_storage
if ($this->messages_caching && !$this->mcache) {
$rcube = rcube::get_instance();
if (($dbh = $rcube->get_dbh()) && ($userid = $rcube->get_user_id())) {
+ $ttl = $rcube->config->get('messages_cache_ttl', '10d');
$this->mcache = new rcube_imap_cache(
- $dbh, $this, $userid, $this->options['skip_deleted']);
+ $dbh, $this, $userid, $this->options['skip_deleted'], $ttl);
}
}
@@ -3814,6 +3820,15 @@ class rcube_imap extends rcube_storage
}
+ /**
+ * Delete outdated cache entries
+ */
+ function cache_gc()
+ {
+ rcube_imap_cache::gc();
+ }
+
+
/* --------------------------------
* protected methods
* --------------------------------*/
@@ -3847,7 +3862,7 @@ class rcube_imap extends rcube_storage
$delimiter = $this->get_hierarchy_delimiter();
// find default folders and skip folders starting with '.'
- foreach ($a_folders as $i => $folder) {
+ foreach ($a_folders as $folder) {
if ($folder[0] == '.') {
continue;
}
@@ -4107,9 +4122,9 @@ class rcube_imap extends rcube_storage
return $this->index($folder, $sort_field, $sort_order);
}
- public function message_index_direct($folder, $sort_field = null, $sort_order = null, $skip_cache = true)
+ public function message_index_direct($folder, $sort_field = null, $sort_order = null)
{
- return $this->index_direct($folder, $sort_field, $sort_order, $skip_cache);
+ return $this->index_direct($folder, $sort_field, $sort_order);
}
public function list_mailboxes($root='', $name='*', $filter=null, $rights=null, $skip_sort=false)
diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php
index 748474af2..061ac546d 100644
--- a/program/lib/Roundcube/rcube_imap_cache.php
+++ b/program/lib/Roundcube/rcube_imap_cache.php
@@ -49,6 +49,13 @@ class rcube_imap_cache
private $userid;
/**
+ * Expiration time in seconds
+ *
+ * @var int
+ */
+ private $ttl;
+
+ /**
* Internal (in-memory) cache
*
* @var array
@@ -83,13 +90,25 @@ class rcube_imap_cache
/**
* Object constructor.
+ *
+ * @param rcube_db $db DB handler
+ * @param rcube_imap $imap IMAP handler
+ * @param int $userid User identifier
+ * @param bool $skip_deleted skip_deleted flag
+ * @param string $ttl Expiration time of memcache/apc items
+ *
*/
- function __construct($db, $imap, $userid, $skip_deleted)
+ function __construct($db, $imap, $userid, $skip_deleted, $ttl=0)
{
+ // convert ttl string to seconds
+ $ttl = get_offset_sec($ttl);
+ if ($ttl > 2592000) $ttl = 2592000;
+
$this->db = $db;
$this->imap = $imap;
$this->userid = $userid;
$this->skip_deleted = $skip_deleted;
+ $this->ttl = $ttl;
}
@@ -215,9 +234,7 @@ class rcube_imap_cache
* Return messages thread.
* If threaded index doesn't exist or is invalid, will be updated.
*
- * @param string $mailbox Folder name
- * @param string $sort_field Sorting column
- * @param string $sort_order Sorting order (ASC|DESC)
+ * @param string $mailbox Folder name
*
* @return array Messages threaded index
*/
@@ -256,19 +273,11 @@ class rcube_imap_cache
if ($index === null) {
// Get mailbox data (UIDVALIDITY, counters, etc.) for status check
$mbox_data = $this->imap->folder_data($mailbox);
-
- if ($mbox_data['EXISTS']) {
- // get all threads (default sort order)
- $threads = $this->imap->fetch_threads($mailbox, true);
- }
- else {
- $threads = new rcube_result_thread($mailbox, '* THREAD');
- }
-
- $index['object'] = $threads;
+ // Get THREADS result
+ $index['object'] = $this->get_thread_data($mailbox, $mbox_data);
// insert/update
- $this->add_thread_row($mailbox, $threads, $mbox_data, $exists);
+ $this->add_thread_row($mailbox, $index['object'], $mbox_data, $exists);
}
$this->icache[$mailbox]['thread'] = $index;
@@ -407,8 +416,8 @@ class rcube_imap_cache
return;
}
- $msg = serialize($this->db->encode(clone $message));
$flags = 0;
+ $msg = clone $message;
if (!empty($message->flags)) {
foreach ($this->flags as $idx => $flag) {
@@ -417,30 +426,49 @@ class rcube_imap_cache
}
}
}
+
unset($msg->flags);
+ $msg = $this->db->encode($msg, true);
// update cache record (even if it exists, the update
// here will work as select, assume row exist if affected_rows=0)
if (!$force) {
$res = $this->db->query(
"UPDATE ".$this->db->table_name('cache_messages')
- ." SET flags = ?, data = ?, changed = ".$this->db->now()
+ ." SET flags = ?, data = ?, expires = " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL')
." WHERE user_id = ?"
." AND mailbox = ?"
." AND uid = ?",
$flags, $msg, $this->userid, $mailbox, (int) $message->uid);
- if ($this->db->affected_rows()) {
+ if ($this->db->affected_rows($res)) {
return;
}
}
+ $this->db->set_option('ignore_key_errors', true);
+
// insert new record
- $this->db->query(
+ $res = $this->db->query(
"INSERT INTO ".$this->db->table_name('cache_messages')
- ." (user_id, mailbox, uid, flags, changed, data)"
- ." VALUES (?, ?, ?, ?, ".$this->db->now().", ?)",
+ ." (user_id, mailbox, uid, flags, expires, data)"
+ ." VALUES (?, ?, ?, ?, ". ($this->ttl ? $this->db->now($this->ttl) : 'NULL') . ", ?)",
$this->userid, $mailbox, (int) $message->uid, $flags, $msg);
+
+ // race-condition, insert failed so try update (#1489146)
+ // thanks to ignore_key_errors "duplicate row" errors will be ignored
+ if ($force && !$res && !$this->db->is_error($res)) {
+ $this->db->query(
+ "UPDATE ".$this->db->table_name('cache_messages')
+ ." SET expires = " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL')
+ .", flags = ?, data = ?"
+ ." WHERE user_id = ?"
+ ." AND mailbox = ?"
+ ." AND uid = ?",
+ $flags, $msg, $this->userid, $mailbox, (int) $message->uid);
+ }
+
+ $this->db->set_option('ignore_key_errors', false);
}
@@ -481,7 +509,7 @@ class rcube_imap_cache
$this->db->query(
"UPDATE ".$this->db->table_name('cache_messages')
- ." SET changed = ".$this->db->now()
+ ." SET expires = ". ($this->ttl ? $this->db->now($this->ttl) : 'NULL')
.", flags = flags ".($enabled ? "+ $idx" : "- $idx")
." WHERE user_id = ?"
." AND mailbox = ?"
@@ -604,23 +632,21 @@ class rcube_imap_cache
/**
- * Delete cache entries older than TTL
- *
- * @param string $ttl Lifetime of message cache entries
+ * Delete expired cache entries
*/
- function expunge($ttl)
+ static function gc()
{
- // get expiration timestamp
- $ts = get_offset_time($ttl, -1);
+ $rcube = rcube::get_instance();
+ $db = $rcube->get_dbh();
- $this->db->query("DELETE FROM ".$this->db->table_name('cache_messages')
- ." WHERE changed < " . $this->db->fromunixtime($ts));
+ $db->query("DELETE FROM ".$db->table_name('cache_messages')
+ ." WHERE expires < " . $db->now());
- $this->db->query("DELETE FROM ".$this->db->table_name('cache_index')
- ." WHERE changed < " . $this->db->fromunixtime($ts));
+ $db->query("DELETE FROM ".$db->table_name('cache_index')
+ ." WHERE expires < " . $db->now());
- $this->db->query("DELETE FROM ".$this->db->table_name('cache_thread')
- ." WHERE changed < " . $this->db->fromunixtime($ts));
+ $db->query("DELETE FROM ".$db->table_name('cache_thread')
+ ." WHERE expires < " . $db->now());
}
@@ -639,7 +665,7 @@ class rcube_imap_cache
if ($sql_arr = $this->db->fetch_assoc($sql_result)) {
$data = explode('@', $sql_arr['data']);
- $index = @unserialize($data[0]);
+ $index = $this->db->decode($data[0], true);
unset($data[0]);
if (empty($index)) {
@@ -676,7 +702,7 @@ class rcube_imap_cache
if ($sql_arr = $this->db->fetch_assoc($sql_result)) {
$data = explode('@', $sql_arr['data']);
- $thread = @unserialize($data[0]);
+ $thread = $this->db->decode($data[0], true);
unset($data[0]);
if (empty($thread)) {
@@ -702,7 +728,7 @@ class rcube_imap_cache
$data, $mbox_data = array(), $exists = false, $modseq = null)
{
$data = array(
- serialize($data),
+ $this->db->encode($data, true),
$sort_field,
(int) $this->skip_deleted,
(int) $mbox_data['UIDVALIDITY'],
@@ -712,20 +738,38 @@ class rcube_imap_cache
$data = implode('@', $data);
if ($exists) {
- $sql_result = $this->db->query(
+ $res = $this->db->query(
"UPDATE ".$this->db->table_name('cache_index')
- ." SET data = ?, valid = 1, changed = ".$this->db->now()
+ ." SET data = ?, valid = 1, expires = " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL')
." WHERE user_id = ?"
." AND mailbox = ?",
$data, $this->userid, $mailbox);
+
+ if ($this->db->affected_rows($res)) {
+ return;
+ }
}
- else {
- $sql_result = $this->db->query(
- "INSERT INTO ".$this->db->table_name('cache_index')
- ." (user_id, mailbox, data, valid, changed)"
- ." VALUES (?, ?, ?, 1, ".$this->db->now().")",
- $this->userid, $mailbox, $data);
+
+ $this->db->set_option('ignore_key_errors', true);
+
+ $res = $this->db->query(
+ "INSERT INTO ".$this->db->table_name('cache_index')
+ ." (user_id, mailbox, valid, expires, data)"
+ ." VALUES (?, ?, 1, ". ($this->ttl ? $this->db->now($this->ttl) : 'NULL') .", ?)",
+ $this->userid, $mailbox, $data);
+
+ // race-condition, insert failed so try update (#1489146)
+ // thanks to ignore_key_errors "duplicate row" errors will be ignored
+ if (!$exists && !$res && !$this->db->is_error($res)) {
+ $res = $this->db->query(
+ "UPDATE ".$this->db->table_name('cache_index')
+ ." SET data = ?, valid = 1, expires = " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL')
+ ." WHERE user_id = ?"
+ ." AND mailbox = ?",
+ $data, $this->userid, $mailbox);
}
+
+ $this->db->set_option('ignore_key_errors', false);
}
@@ -735,28 +779,48 @@ class rcube_imap_cache
private function add_thread_row($mailbox, $data, $mbox_data = array(), $exists = false)
{
$data = array(
- serialize($data),
+ $this->db->encode($data, true),
(int) $this->skip_deleted,
(int) $mbox_data['UIDVALIDITY'],
(int) $mbox_data['UIDNEXT'],
);
$data = implode('@', $data);
+ $expires = ($this->ttl ? $this->db->now($this->ttl) : 'NULL');
+
if ($exists) {
- $sql_result = $this->db->query(
+ $res = $this->db->query(
"UPDATE ".$this->db->table_name('cache_thread')
- ." SET data = ?, changed = ".$this->db->now()
+ ." SET data = ?, expires = $expires"
." WHERE user_id = ?"
." AND mailbox = ?",
$data, $this->userid, $mailbox);
+
+ if ($this->db->affected_rows($res)) {
+ return;
+ }
}
- else {
- $sql_result = $this->db->query(
- "INSERT INTO ".$this->db->table_name('cache_thread')
- ." (user_id, mailbox, data, changed)"
- ." VALUES (?, ?, ?, ".$this->db->now().")",
- $this->userid, $mailbox, $data);
+
+ $this->db->set_option('ignore_key_errors', true);
+
+ $res = $this->db->query(
+ "INSERT INTO ".$this->db->table_name('cache_thread')
+ ." (user_id, mailbox, expires, data)"
+ ." VALUES (?, ?, $expires, ?)",
+ $this->userid, $mailbox, $data);
+
+ // race-condition, insert failed so try update (#1489146)
+ // thanks to ignore_key_errors "duplicate row" errors will be ignored
+ if (!$exists && !$res && !$this->db->is_error($res)) {
+ $this->db->query(
+ "UPDATE ".$this->db->table_name('cache_thread')
+ ." SET expires = $expires, data = ?"
+ ." WHERE user_id = ?"
+ ." AND mailbox = ?",
+ $data, $this->userid, $mailbox);
}
+
+ $this->db->set_option('ignore_key_errors', false);
}
@@ -983,7 +1047,7 @@ class rcube_imap_cache
$uids, true, array('FLAGS'), $index['modseq'], $qresync);
if (!empty($result)) {
- foreach ($result as $id => $msg) {
+ foreach ($result as $msg) {
$uid = $msg->uid;
// Remove deleted message
if ($this->skip_deleted && !empty($msg->flags['DELETED'])) {
@@ -1004,7 +1068,7 @@ class rcube_imap_cache
$this->db->query(
"UPDATE ".$this->db->table_name('cache_messages')
- ." SET flags = ?, changed = ".$this->db->now()
+ ." SET flags = ?, expires = " . ($this->ttl ? $this->db->now($this->ttl) : 'NULL')
." WHERE user_id = ?"
." AND mailbox = ?"
." AND uid = ?"
@@ -1032,17 +1096,18 @@ class rcube_imap_cache
}
}
- // Invalidate thread index (?)
- if (!$index['valid']) {
- $this->remove_thread($mailbox);
- }
-
$sort_field = $index['sort_field'];
$sort_order = $index['object']->get_parameters('ORDER');
$exists = true;
// Validate index
if (!$this->validate($mailbox, $index, $exists)) {
+ // Invalidate (remove) thread index
+ // if $exists=false it was already removed in validate()
+ if ($exists) {
+ $this->remove_thread($mailbox);
+ }
+
// Update index
$data = $this->get_index_data($mailbox, $sort_field, $sort_order, $mbox_data);
}
@@ -1067,7 +1132,7 @@ class rcube_imap_cache
*/
private function build_message($sql_arr)
{
- $message = $this->db->decode(unserialize($sql_arr['data']));
+ $message = $this->db->decode($sql_arr['data'], true);
if ($message) {
$message->flags = array();
@@ -1150,6 +1215,25 @@ class rcube_imap_cache
return $index;
}
+
+
+ /**
+ * Fetches thread data from IMAP server
+ */
+ private function get_thread_data($mailbox, $mbox_data = array())
+ {
+ if (empty($mbox_data)) {
+ $mbox_data = $this->imap->folder_data($mailbox);
+ }
+
+ if ($mbox_data['EXISTS']) {
+ // get all threads (default sort order)
+ return $this->imap->threads_direct($mailbox);
+ }
+
+ return new rcube_result_thread($mailbox, '* THREAD');
+ }
+
}
// for backward compat.
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index 2ac1355fd..920c7184a 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -72,6 +72,8 @@ class rcube_imap_generic
const COMMAND_CAPABILITY = 2;
const COMMAND_LASTLINE = 4;
+ const DEBUG_LINE_LENGTH = 4098; // 4KB + 2B for \r\n
+
/**
* Object constructor
*/
@@ -713,6 +715,10 @@ class rcube_imap_generic
$auth_method = 'CHECK';
}
+ if (!empty($this->prefs['disabled_caps'])) {
+ $this->prefs['disabled_caps'] = array_map('strtoupper', (array)$this->prefs['disabled_caps']);
+ }
+
$result = false;
// initialize connection
@@ -746,7 +752,7 @@ class rcube_imap_generic
}
if ($this->prefs['timeout'] <= 0) {
- $this->prefs['timeout'] = ini_get('default_socket_timeout');
+ $this->prefs['timeout'] = max(0, intval(ini_get('default_socket_timeout')));
}
// Connect
@@ -1077,7 +1083,7 @@ class rcube_imap_generic
}
if (!$this->data['READ-WRITE']) {
- $this->setError(self::ERROR_READONLY, "Mailbox is read-only", 'EXPUNGE');
+ $this->setError(self::ERROR_READONLY, "Mailbox is read-only");
return false;
}
@@ -1327,9 +1333,8 @@ class rcube_imap_generic
$folders[$mailbox] = array();
}
- // store LSUB options only if not empty, this way
- // we can detect a situation when LIST doesn't return specified folder
- if (!empty($opts) || $cmd == 'LIST') {
+ // store folder options
+ if ($cmd == 'LIST') {
// Add to options array
if (empty($this->data['LIST'][$mailbox]))
$this->data['LIST'][$mailbox] = $opts;
@@ -1561,11 +1566,12 @@ class rcube_imap_generic
}
// message IDs
- if (!empty($add))
+ if (!empty($add)) {
$add = $this->compressMessageSet($add);
+ }
list($code, $response) = $this->execute($return_uid ? 'UID SORT' : 'SORT',
- array("($field)", $encoding, 'ALL' . (!empty($add) ? ' '.$add : '')));
+ array("($field)", $encoding, !empty($add) ? $add : 'ALL'));
if ($code != self::ERROR_OK) {
$response = null;
@@ -1652,7 +1658,6 @@ class rcube_imap_generic
}
if (!empty($criteria)) {
- $modseq = stripos($criteria, 'MODSEQ') !== false;
$params .= ($params ? ' ' : '') . $criteria;
}
else {
@@ -1791,7 +1796,6 @@ class rcube_imap_generic
if ($skip_deleted && preg_match('/FLAGS \(([^)]+)\)/', $line, $matches)) {
$flags = explode(' ', strtoupper($matches[1]));
if (in_array('\\DELETED', $flags)) {
- $deleted[$id] = $id;
continue;
}
}
@@ -1936,7 +1940,7 @@ class rcube_imap_generic
}
if (!$this->data['READ-WRITE']) {
- $this->setError(self::ERROR_READONLY, "Mailbox is read-only", 'STORE');
+ $this->setError(self::ERROR_READONLY, "Mailbox is read-only");
return false;
}
@@ -1997,7 +2001,7 @@ class rcube_imap_generic
}
if (!$this->data['READ-WRITE']) {
- $this->setError(self::ERROR_READONLY, "Mailbox is read-only", 'STORE');
+ $this->setError(self::ERROR_READONLY, "Mailbox is read-only");
return false;
}
@@ -2158,21 +2162,25 @@ class rcube_imap_generic
else if ($name == 'RFC822') {
$result[$id]->body = $value;
}
- else if ($name == 'BODY') {
- $body = $this->tokenizeResponse($line, 1);
- if ($value[0] == 'HEADER.FIELDS')
- $headers = $body;
- else if (!empty($value))
- $result[$id]->bodypart[$value[0]] = $body;
+ else if (stripos($name, 'BODY[') === 0) {
+ $name = str_replace(']', '', substr($name, 5));
+
+ if ($name == 'HEADER.FIELDS') {
+ // skip ']' after headers list
+ $this->tokenizeResponse($line, 1);
+ $headers = $this->tokenizeResponse($line, 1);
+ }
+ else if (strlen($name))
+ $result[$id]->bodypart[$name] = $value;
else
- $result[$id]->body = $body;
+ $result[$id]->body = $value;
}
}
// create array with header field:data
if (!empty($headers)) {
$headers = explode("\n", trim($headers));
- foreach ($headers as $hid => $resln) {
+ foreach ($headers as $resln) {
if (ord($resln[0]) <= 32) {
$lines[$ln] .= (empty($lines[$ln]) ? '' : "\n") . trim($resln);
} else {
@@ -2180,7 +2188,7 @@ class rcube_imap_generic
}
}
- while (list($lines_key, $str) = each($lines)) {
+ foreach ($lines as $str) {
list($field, $string) = explode(':', $str, 2);
$field = strtolower($field);
@@ -2265,24 +2273,53 @@ class rcube_imap_generic
return $result;
}
- function fetchHeaders($mailbox, $message_set, $is_uid = false, $bodystr = false, $add = '')
+ /**
+ * Returns message(s) data (flags, headers, etc.)
+ *
+ * @param string $mailbox Mailbox name
+ * @param mixed $message_set Message(s) sequence identifier(s) or UID(s)
+ * @param bool $is_uid True if $message_set contains UIDs
+ * @param bool $bodystr Enable to add BODYSTRUCTURE data to the result
+ * @param array $add_headers List of additional headers
+ *
+ * @return bool|array List of rcube_message_header elements, False on error
+ */
+ function fetchHeaders($mailbox, $message_set, $is_uid = false, $bodystr = false, $add_headers = array())
{
$query_items = array('UID', 'RFC822.SIZE', 'FLAGS', 'INTERNALDATE');
- if ($bodystr)
+ $headers = array('DATE', 'FROM', 'TO', 'SUBJECT', 'CONTENT-TYPE', 'CC', 'REPLY-TO',
+ 'LIST-POST', 'DISPOSITION-NOTIFICATION-TO', 'X-PRIORITY');
+
+ if (!empty($add_headers)) {
+ $add_headers = array_map('strtoupper', $add_headers);
+ $headers = array_unique(array_merge($headers, $add_headers));
+ }
+
+ if ($bodystr) {
$query_items[] = 'BODYSTRUCTURE';
- $query_items[] = 'BODY.PEEK[HEADER.FIELDS ('
- . 'DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO X-PRIORITY'
- . ($add ? ' ' . trim($add) : '')
- . ')]';
+ }
+
+ $query_items[] = 'BODY.PEEK[HEADER.FIELDS (' . implode(' ', $headers) . ')]';
$result = $this->fetch($mailbox, $message_set, $is_uid, $query_items);
return $result;
}
- function fetchHeader($mailbox, $id, $uidfetch=false, $bodystr=false, $add='')
+ /**
+ * Returns message data (flags, headers, etc.)
+ *
+ * @param string $mailbox Mailbox name
+ * @param int $id Message sequence identifier or UID
+ * @param bool $is_uid True if $id is an UID
+ * @param bool $bodystr Enable to add BODYSTRUCTURE data to the result
+ * @param array $add_headers List of additional headers
+ *
+ * @return bool|rcube_message_header Message data, False on error
+ */
+ function fetchHeader($mailbox, $id, $is_uid = false, $bodystr = false, $add_headers = array())
{
- $a = $this->fetchHeaders($mailbox, $id, $uidfetch, $bodystr, $add);
+ $a = $this->fetchHeaders($mailbox, $id, $is_uid, $bodystr, $add_headers);
if (is_array($a)) {
return array_shift($a);
}
@@ -2446,6 +2483,7 @@ class rcube_imap_generic
$key = $this->nextTag();
$request = $key . ($is_uid ? ' UID' : '') . " FETCH $id ($fetch_mode.PEEK[$part]$partial)";
$result = false;
+ $found = false;
// send request
if (!$this->putLine($request)) {
@@ -2465,18 +2503,26 @@ class rcube_imap_generic
break;
}
- if (!preg_match('/^\* ([0-9]+) FETCH (.*)$/', $line, $m)) {
+ // skip irrelevant untagged responses (we have a result already)
+ if ($found || !preg_match('/^\* ([0-9]+) FETCH (.*)$/', $line, $m)) {
continue;
}
$line = $m[2];
- $last = substr($line, -1);
// handle one line response
- if ($line[0] == '(' && $last == ')') {
+ if ($line[0] == '(' && substr($line, -1) == ')') {
// tokenize content inside brackets
- $tokens = $this->tokenizeResponse(preg_replace('/(^\(|\$)/', '', $line));
- $result = count($tokens) == 1 ? $tokens[0] : false;
+ // the content can be e.g.: (UID 9844 BODY[2.4] NIL)
+ $tokens = $this->tokenizeResponse(preg_replace('/(^\(|\)$)/', '', $line));
+
+ for ($i=0; $i<count($tokens); $i+=2) {
+ if (preg_match('/^(BODY|BINARY)/i', $tokens[$i])) {
+ $result = $tokens[$i+1];
+ $found = true;
+ break;
+ }
+ }
if ($result !== false) {
if ($mode == 1) {
@@ -2494,8 +2540,13 @@ class rcube_imap_generic
else if (preg_match('/\{([0-9]+)\}$/', $line, $m)) {
$bytes = (int) $m[1];
$prev = '';
+ $found = true;
- while ($bytes > 0) {
+ // empty body
+ if (!$bytes) {
+ $result = '';
+ }
+ else while ($bytes > 0) {
$line = $this->readLine(8192);
if ($line === NULL) {
@@ -2577,11 +2628,11 @@ class rcube_imap_generic
/**
* Handler for IMAP APPEND command
*
- * @param string $mailbox Mailbox name
- * @param string $message Message content
- * @param array $flags Message flags
- * @param string $date Message internal date
- * @param bool $binary Enable BINARY append (RFC3516)
+ * @param string $mailbox Mailbox name
+ * @param string|array $message The message source string or array (of strings and file pointers)
+ * @param array $flags Message flags
+ * @param string $date Message internal date
+ * @param bool $binary Enable BINARY append (RFC3516)
*
* @return string|bool On success APPENDUID response (if available) or True, False on failure
*/
@@ -2595,13 +2646,28 @@ class rcube_imap_generic
$binary = $binary && $this->getCapability('BINARY');
$literal_plus = !$binary && $this->prefs['literal+'];
+ $len = 0;
+ $msg = is_array($message) ? $message : array(&$message);
+ $chunk_size = 512000;
+
+ for ($i=0, $cnt=count($msg); $i<$cnt; $i++) {
+ if (is_resource($msg[$i])) {
+ $stat = fstat($msg[$i]);
+ if ($stat === false) {
+ return false;
+ }
+ $len += $stat['size'];
+ }
+ else {
+ if (!$binary) {
+ $msg[$i] = str_replace("\r", '', $msg[$i]);
+ $msg[$i] = str_replace("\n", "\r\n", $msg[$i]);
+ }
- if (!$binary) {
- $message = str_replace("\r", '', $message);
- $message = str_replace("\n", "\r\n", $message);
+ $len += strlen($msg[$i]);
+ }
}
- $len = strlen($message);
if (!$len) {
return false;
}
@@ -2626,7 +2692,32 @@ class rcube_imap_generic
}
}
- if (!$this->putLine($message)) {
+ foreach ($msg as $msg_part) {
+ // file pointer
+ if (is_resource($msg_part)) {
+ rewind($msg_part);
+ while (!feof($msg_part) && $this->fp) {
+ $buffer = fread($msg_part, $chunk_size);
+ $this->putLine($buffer, false);
+ }
+ fclose($msg_part);
+ }
+ // string
+ else {
+ $size = strlen($msg_part);
+
+ // Break up the data by sending one chunk (up to 512k) at a time.
+ // This approach reduces our peak memory usage
+ for ($offset = 0; $offset < $size; $offset += $chunk_size) {
+ $chunk = substr($msg_part, $offset, $chunk_size);
+ if (!$this->putLine($chunk, false)) {
+ return false;
+ }
+ }
+ }
+ }
+
+ if (!$this->putLine('')) { // \r\n
return false;
}
@@ -2665,94 +2756,23 @@ class rcube_imap_generic
*/
function appendFromFile($mailbox, $path, $headers=null, $flags = array(), $date = null, $binary = false)
{
- unset($this->data['APPENDUID']);
-
- if ($mailbox === null || $mailbox === '') {
- return false;
- }
-
// open message file
- $in_fp = false;
if (file_exists(realpath($path))) {
- $in_fp = fopen($path, 'r');
+ $fp = fopen($path, 'r');
}
- if (!$in_fp) {
+ if (!$fp) {
$this->setError(self::ERROR_UNKNOWN, "Couldn't open $path for reading");
return false;
}
- $body_separator = "\r\n\r\n";
- $len = filesize($path);
-
- if (!$len) {
- return false;
- }
-
+ $message = array();
if ($headers) {
- $headers = preg_replace('/[\r\n]+$/', '', $headers);
- $len += strlen($headers) + strlen($body_separator);
- }
-
- $binary = $binary && $this->getCapability('BINARY');
- $literal_plus = !$binary && $this->prefs['literal+'];
-
- // build APPEND command
- $key = $this->nextTag();
- $request = "$key APPEND " . $this->escape($mailbox) . ' (' . $this->flagsToStr($flags) . ')';
- if (!empty($date)) {
- $request .= ' ' . $this->escape($date);
- }
- $request .= ' ' . ($binary ? '~' : '') . '{' . $len . ($literal_plus ? '+' : '') . '}';
-
- // send APPEND command
- if ($this->putLine($request)) {
- // Don't wait when LITERAL+ is supported
- if (!$literal_plus) {
- $line = $this->readReply();
-
- if ($line[0] != '+') {
- $this->parseResult($line, 'APPEND: ');
- return false;
- }
- }
-
- // send headers with body separator
- if ($headers) {
- $this->putLine($headers . $body_separator, false);
- }
-
- // send file
- while (!feof($in_fp) && $this->fp) {
- $buffer = fgets($in_fp, 4096);
- $this->putLine($buffer, false);
- }
- fclose($in_fp);
-
- if (!$this->putLine('')) { // \r\n
- return false;
- }
-
- // read response
- do {
- $line = $this->readLine();
- } while (!$this->startsWith($line, $key, true, true));
-
- // Clear internal status cache
- unset($this->data['STATUS:'.$mailbox]);
-
- if ($this->parseResult($line, 'APPEND: ') != self::ERROR_OK)
- return false;
- else if (!empty($this->data['APPENDUID']))
- return $this->data['APPENDUID'];
- else
- return true;
- }
- else {
- $this->setError(self::ERROR_COMMAND, "Unable to send command: $request");
+ $message[] = trim($headers, "\r\n") . "\r\n\r\n";
}
+ $message[] = $fp;
- return false;
+ return $this->append($mailbox, $message, $flags, $date, $binary);
}
/**
@@ -2970,7 +2990,7 @@ class rcube_imap_generic
}
foreach ($entries as $name => $value) {
- $entries[$name] = $this->escape($name) . ' ' . $this->escape($value);
+ $entries[$name] = $this->escape($name) . ' ' . $this->escape($value, true);
}
$entries = implode(' ', $entries);
@@ -3467,25 +3487,24 @@ class rcube_imap_generic
// Parenthesized list
case '(':
- case '[':
$str = substr($str, 1);
$result[] = self::tokenizeResponse($str);
break;
case ')':
- case ']':
$str = substr($str, 1);
return $result;
break;
- // String atom, number, NIL, *, %
+ // String atom, number, astring, NIL, *, %
default:
// empty string
if ($str === '' || $str === null) {
break 2;
}
- // excluded chars: SP, CTL, ), [, ]
- if (preg_match('/^([^\x00-\x20\x29\x5B\x5D\x7F]+)/', $str, $m)) {
+ // excluded chars: SP, CTL, ), DEL
+ // we do not exclude [ and ] (#1489223)
+ if (preg_match('/^([^\x00-\x20\x29\x7F]+)/', $str, $m)) {
$result[] = $m[1] == 'NIL' ? NULL : $m[1];
$str = substr($str, strlen($m[1]));
}
@@ -3502,7 +3521,7 @@ class rcube_imap_generic
if (is_array($element)) {
reset($element);
- while (list($key, $value) = each($element)) {
+ foreach ($element as $value) {
$string .= ' ' . self::r_implode($value);
}
}
@@ -3638,8 +3657,20 @@ class rcube_imap_generic
*/
static function strToTime($date)
{
- // support non-standard "GMTXXXX" literal
- $date = preg_replace('/GMT\s*([+-][0-9]+)/', '\\1', $date);
+ // Clean malformed data
+ $date = preg_replace(
+ array(
+ '/GMT\s*([+-][0-9]+)/', // support non-standard "GMTXXXX" literal
+ '/[^a-z0-9\x20\x09:+-]/i', // remove any invalid characters
+ '/\s*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*/i', // remove weekday names
+ ),
+ array(
+ '\\1',
+ '',
+ '',
+ ), $date);
+
+ $date = trim($date);
// if date parsing fails, we have a date in non-rfc format
// remove token from the end and try again
@@ -3664,6 +3695,10 @@ class rcube_imap_generic
$this->capability = explode(' ', strtoupper($str));
+ if (!empty($this->prefs['disabled_caps'])) {
+ $this->capability = array_diff($this->capability, $this->prefs['disabled_caps']);
+ }
+
if (!isset($this->prefs['literal+']) && in_array('LITERAL+', $this->capability)) {
$this->prefs['literal+'] = true;
}
@@ -3709,9 +3744,10 @@ class rcube_imap_generic
/**
* Set the value of the debugging flag.
*
- * @param boolean $debug New value for the debugging flag.
+ * @param boolean $debug New value for the debugging flag.
+ * @param callback $handler Logging handler function
*
- * @since 0.5-stable
+ * @since 0.5-stable
*/
function setDebug($debug, $handler = null)
{
@@ -3722,12 +3758,18 @@ class rcube_imap_generic
/**
* Write the given debug text to the current debug output handler.
*
- * @param string $message Debug mesage text.
+ * @param string $message Debug mesage text.
*
- * @since 0.5-stable
+ * @since 0.5-stable
*/
private function debug($message)
{
+ if (($len = strlen($message)) > self::DEBUG_LINE_LENGTH) {
+ $diff = $len - self::DEBUG_LINE_LENGTH;
+ $message = substr($message, 0, self::DEBUG_LINE_LENGTH)
+ . "... [truncated $diff bytes]";
+ }
+
if ($this->resourceid) {
$message = sprintf('[%s] %s', $this->resourceid, $message);
}
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index a2dd163e9..555a56471 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -3,8 +3,8 @@
/*
+-----------------------------------------------------------------------+
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2006-2012, The Roundcube Dev Team |
- | Copyright (C) 2011-2012, Kolab Systems AG |
+ | Copyright (C) 2006-2013, The Roundcube Dev Team |
+ | Copyright (C) 2011-2013, Kolab Systems AG |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -27,38 +27,50 @@
*/
class rcube_ldap extends rcube_addressbook
{
- /** public properties */
+ // public properties
public $primary_key = 'ID';
- public $groups = false;
- public $readonly = true;
- public $ready = false;
- public $group_id = 0;
- public $coltypes = array();
-
- /** private properties */
- protected $conn;
- protected $prop = array();
+ public $groups = false;
+ public $readonly = true;
+ public $ready = false;
+ public $group_id = 0;
+ public $coltypes = array();
+
+ // private properties
+ protected $ldap;
+ protected $prop = array();
protected $fieldmap = array();
+ protected $filter = '';
protected $sub_filter;
- protected $filter = '';
- protected $result = null;
- protected $ldap_result = null;
+ protected $result;
+ protected $ldap_result;
protected $mail_domain = '';
protected $debug = false;
- private $base_dn = '';
+ /**
+ * Group objectclass (lowercase) to member attribute mapping
+ *
+ * @var array
+ */
+ private static $group_types = array(
+ 'group' => 'member',
+ 'groupofnames' => 'member',
+ 'kolabgroupofnames' => 'member',
+ 'groupofuniquenames' => 'uniqueMember',
+ 'kolabgroupofuniquenames' => 'uniqueMember',
+ 'univentiongroup' => 'uniqueMember',
+ 'groupofurls' => null,
+ );
+
+ private $base_dn = '';
private $groups_base_dn = '';
- private $group_url = null;
+ private $group_url;
private $cache;
- private $vlv_active = false;
- private $vlv_count = 0;
-
/**
* Object constructor
*
- * @param array $p LDAP connection properties
+ * @param array $p LDAP connection properties
* @param boolean $debug Enables debug mode
* @param string $mail_domain Current user mail domain name
*/
@@ -66,8 +78,7 @@ class rcube_ldap extends rcube_addressbook
{
$this->prop = $p;
- if (isset($p['searchonly']))
- $this->searchonly = $p['searchonly'];
+ $fetch_attributes = array('objectClass');
// check if groups are configured
if (is_array($p['groups']) && count($p['groups'])) {
@@ -82,6 +93,21 @@ class rcube_ldap extends rcube_addressbook
$this->prop['groups']['name_attr'] = 'cn';
if (empty($this->prop['groups']['scope']))
$this->prop['groups']['scope'] = 'sub';
+
+ // add group name attrib to the list of attributes to be fetched
+ $fetch_attributes[] = $this->prop['groups']['name_attr'];
+ }
+ if (is_array($p['group_filters']) && count($p['group_filters'])) {
+ $this->groups = true;
+
+ foreach ($p['group_filters'] as $k => $group_filter) {
+ // set default name attribute to cn
+ if (empty($group_filter['name_attr']) && empty($this->prop['groups']['name_attr']))
+ $this->prop['group_filters'][$k]['name_attr'] = $group_filter['name_attr'] = 'cn';
+
+ if ($group_filter['name_attr'])
+ $fetch_attributes[] = $group_filter['name_attr'];
+ }
}
// fieldmap property is given
@@ -169,7 +195,7 @@ class rcube_ldap extends rcube_addressbook
// Build sub_fields filter
if (!empty($this->prop['sub_fields']) && is_array($this->prop['sub_fields'])) {
$this->sub_filter = '';
- foreach ($this->prop['sub_fields'] as $attr => $class) {
+ foreach ($this->prop['sub_fields'] as $class) {
if (!empty($class)) {
$class = is_array($class) ? array_pop($class) : $class;
$this->sub_filter .= '(objectClass=' . $class . ')';
@@ -186,7 +212,24 @@ class rcube_ldap extends rcube_addressbook
// initialize cache
$rcube = rcube::get_instance();
- $this->cache = $rcube->get_cache('LDAP.' . asciiwords($this->prop['name']), 'db', 600);
+ if ($cache_type = $rcube->config->get('ldap_cache', 'db')) {
+ $cache_ttl = $rcube->config->get('ldap_cache_ttl', '10m');
+ $cache_name = 'LDAP.' . asciiwords($this->prop['name']);
+
+ $this->cache = $rcube->get_cache($cache_name, $cache_type, $cache_ttl);
+ }
+
+ // determine which attributes to fetch
+ $this->prop['list_attributes'] = array_unique($fetch_attributes);
+ $this->prop['attributes'] = array_merge(array_values($this->fieldmap), $fetch_attributes);
+ foreach ($rcube->config->get('contactlist_fields') as $col) {
+ $this->prop['list_attributes'] = array_merge($this->prop['list_attributes'], $this->_map_field($col));
+ }
+
+ // initialize ldap wrapper object
+ $this->ldap = new rcube_ldap_generic($this->prop);
+ $this->ldap->set_cache($this->cache);
+ $this->ldap->set_debug($this->debug);
$this->_connect();
}
@@ -199,49 +242,18 @@ class rcube_ldap extends rcube_addressbook
{
$rcube = rcube::get_instance();
- if (!function_exists('ldap_connect'))
- rcube::raise_error(array('code' => 100, 'type' => 'ldap',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "No ldap support in this installation of PHP"),
- true, true);
-
- if (is_resource($this->conn))
+ if ($this->ready)
return true;
if (!is_array($this->prop['hosts']))
$this->prop['hosts'] = array($this->prop['hosts']);
- if (empty($this->prop['ldap_version']))
- $this->prop['ldap_version'] = 3;
-
// try to connect + bind for every host configured
// with OpenLDAP 2.x ldap_connect() always succeeds but ldap_bind will fail if host isn't reachable
// see http://www.php.net/manual/en/function.ldap-connect.php
foreach ($this->prop['hosts'] as $host) {
- $host = rcube_utils::idn_to_ascii(rcube_utils::parse_host($host));
- $hostname = $host.($this->prop['port'] ? ':'.$this->prop['port'] : '');
-
- $this->_debug("C: Connect [$hostname] [{$this->prop['name']}]");
-
- if ($lc = @ldap_connect($host, $this->prop['port'])) {
- if ($this->prop['use_tls'] === true)
- if (!ldap_start_tls($lc))
- continue;
-
- $this->_debug("S: OK");
-
- ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['ldap_version']);
- $this->prop['host'] = $host;
- $this->conn = $lc;
-
- if (!empty($this->prop['network_timeout']))
- ldap_set_option($lc, LDAP_OPT_NETWORK_TIMEOUT, $this->prop['network_timeout']);
-
- if (isset($this->prop['referrals']))
- ldap_set_option($lc, LDAP_OPT_REFERRALS, $this->prop['referrals']);
- }
- else {
- $this->_debug("S: NOT OK");
+ // skip host if connection failed
+ if (!$this->ldap->connect($host)) {
continue;
}
@@ -256,7 +268,7 @@ class rcube_ldap extends rcube_addressbook
$this->base_dn = $this->prop['base_dn'];
$this->groups_base_dn = ($this->prop['groups']['base_dn']) ?
- $this->prop['groups']['base_dn'] : $this->base_dn;
+ $this->prop['groups']['base_dn'] : $this->base_dn;
// User specific access, generate the proper values to use.
if ($this->prop['user_specific']) {
@@ -275,29 +287,46 @@ class rcube_ldap extends rcube_addressbook
$replaces = array('%dn' => '', '%dc' => $dc, '%d' => $d, '%fu' => $fu, '%u' => $u);
+ // Search for the dn to use to authenticate
if ($this->prop['search_base_dn'] && $this->prop['search_filter']) {
- if (!empty($this->prop['search_bind_dn']) && !empty($this->prop['search_bind_pw'])) {
- $this->bind($this->prop['search_bind_dn'], $this->prop['search_bind_pw']);
- }
-
- // Search for the dn to use to authenticate
- $this->prop['search_base_dn'] = strtr($this->prop['search_base_dn'], $replaces);
- $this->prop['search_filter'] = strtr($this->prop['search_filter'], $replaces);
+ $search_bind_dn = strtr($this->prop['search_bind_dn'], $replaces);
+ $search_base_dn = strtr($this->prop['search_base_dn'], $replaces);
+ $search_filter = strtr($this->prop['search_filter'], $replaces);
- $this->_debug("S: searching with base {$this->prop['search_base_dn']} for {$this->prop['search_filter']}");
+ $cache_key = 'DN.' . md5("$host:$search_bind_dn:$search_base_dn:$search_filter:"
+ .$this->prop['search_bind_pw']);
- $res = @ldap_search($this->conn, $this->prop['search_base_dn'], $this->prop['search_filter'], array('uid'));
- if ($res) {
- if (($entry = ldap_first_entry($this->conn, $res))
- && ($bind_dn = ldap_get_dn($this->conn, $entry))
- ) {
- $this->_debug("S: search returned dn: $bind_dn");
- $dn = ldap_explode_dn($bind_dn, 1);
- $replaces['%dn'] = $dn[0];
- }
+ if ($this->cache && ($dn = $this->cache->get($cache_key))) {
+ $replaces['%dn'] = $dn;
}
else {
- $this->_debug("S: ".ldap_error($this->conn));
+ $ldap = $this->ldap;
+ if (!empty($search_bind_dn) && !empty($this->prop['search_bind_pw'])) {
+ // To protect from "Critical extension is unavailable" error
+ // we need to use a separate LDAP connection
+ if (!empty($this->prop['vlv'])) {
+ $ldap = new rcube_ldap_generic($this->prop);
+ $ldap->set_debug($this->debug);
+ $ldap->set_cache($this->cache);
+ if (!$ldap->connect($host)) {
+ continue;
+ }
+ }
+
+ if (!$ldap->bind($search_bind_dn, $this->prop['search_bind_pw'])) {
+ continue; // bind failed, try next host
+ }
+ }
+
+ $res = $ldap->search($search_base_dn, $search_filter, 'sub', array('uid'));
+ if ($res) {
+ $res->rewind();
+ $replaces['%dn'] = $res->get_dn();
+ }
+
+ if ($ldap != $this->ldap) {
+ $ldap->close();
+ }
}
// DN not found
@@ -309,9 +338,13 @@ class rcube_ldap extends rcube_addressbook
'code' => 100, 'type' => 'ldap',
'file' => __FILE__, 'line' => __LINE__,
'message' => "DN not found using LDAP search."), true);
- return false;
+ continue;
}
}
+
+ if ($this->cache && !empty($replaces['%dn'])) {
+ $this->cache->set($cache_key, $replaces['%dn']);
+ }
}
// Replace the bind_dn and base_dn variables.
@@ -329,13 +362,13 @@ class rcube_ldap extends rcube_addressbook
}
else {
if (!empty($bind_dn)) {
- $this->ready = $this->bind($bind_dn, $bind_pass);
+ $this->ready = $this->ldap->bind($bind_dn, $bind_pass);
}
else if (!empty($this->prop['auth_cid'])) {
- $this->ready = $this->sasl_bind($this->prop['auth_cid'], $bind_pass, $bind_user);
+ $this->ready = $this->ldap->sasl_bind($this->prop['auth_cid'], $bind_pass, $bind_user);
}
else {
- $this->ready = $this->sasl_bind($bind_user, $bind_pass);
+ $this->ready = $this->ldap->sasl_bind($bind_user, $bind_pass);
}
}
@@ -346,10 +379,10 @@ class rcube_ldap extends rcube_addressbook
} // end foreach hosts
- if (!is_resource($this->conn)) {
+ if (!is_resource($this->ldap->conn)) {
rcube::raise_error(array('code' => 100, 'type' => 'ldap',
'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Could not connect to any LDAP server, last tried $hostname"), true);
+ 'message' => "Could not connect to any LDAP server, last tried $host"), true);
return false;
}
@@ -359,112 +392,47 @@ class rcube_ldap extends rcube_addressbook
/**
- * Bind connection with (SASL-) user and password
- *
- * @param string $authc Authentication user
- * @param string $pass Bind password
- * @param string $authz Autorization user
- *
- * @return boolean True on success, False on error
+ * Close connection to LDAP server
*/
- public function sasl_bind($authc, $pass, $authz=null)
+ function close()
{
- if (!$this->conn) {
- return false;
- }
-
- if (!function_exists('ldap_sasl_bind')) {
- rcube::raise_error(array('code' => 100, 'type' => 'ldap',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Unable to bind: ldap_sasl_bind() not exists"),
- true, true);
+ if ($this->ldap) {
+ $this->ldap->close();
}
-
- if (!empty($authz)) {
- $authz = 'u:' . $authz;
- }
-
- if (!empty($this->prop['auth_method'])) {
- $method = $this->prop['auth_method'];
- }
- else {
- $method = 'DIGEST-MD5';
- }
-
- $this->_debug("C: Bind [mech: $method, authc: $authc, authz: $authz] [pass: $pass]");
-
- if (ldap_sasl_bind($this->conn, NULL, $pass, $method, NULL, $authc, $authz)) {
- $this->_debug("S: OK");
- return true;
- }
-
- $this->_debug("S: ".ldap_error($this->conn));
-
- rcube::raise_error(array(
- 'code' => ldap_errno($this->conn), 'type' => 'ldap',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Bind failed for authcid=$authc ".ldap_error($this->conn)),
- true);
-
- return false;
}
/**
- * Bind connection with DN and password
- *
- * @param string Bind DN
- * @param string Bind password
+ * Returns address book name
*
- * @return boolean True on success, False on error
+ * @return string Address book name
*/
- public function bind($dn, $pass)
+ function get_name()
{
- if (!$this->conn) {
- return false;
- }
-
- $this->_debug("C: Bind [dn: $dn] [pass: $pass]");
-
- if (@ldap_bind($this->conn, $dn, $pass)) {
- $this->_debug("S: OK");
- return true;
- }
-
- $this->_debug("S: ".ldap_error($this->conn));
-
- rcube::raise_error(array(
- 'code' => ldap_errno($this->conn), 'type' => 'ldap',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Bind failed for dn=$dn: ".ldap_error($this->conn)),
- true);
-
- return false;
+ return $this->prop['name'];
}
/**
- * Close connection to LDAP server
+ * Set internal list page
+ *
+ * @param number Page number to list
*/
- function close()
+ function set_page($page)
{
- if ($this->conn)
- {
- $this->_debug("C: Close");
- ldap_unbind($this->conn);
- $this->conn = null;
- }
+ $this->list_page = (int)$page;
+ $this->ldap->set_vlv_page($this->list_page, $this->page_size);
}
-
/**
- * Returns address book name
+ * Set internal page size
*
- * @return string Address book name
+ * @param number Number of records to display on one page
*/
- function get_name()
+ function set_pagesize($size)
{
- return $this->prop['name'];
+ $this->page_size = (int)$size;
+ $this->ldap->set_vlv_page($this->list_page, $this->page_size);
}
@@ -524,16 +492,14 @@ class rcube_ldap extends rcube_addressbook
*/
function list_records($cols=null, $subset=0)
{
- if ($this->prop['searchonly'] && empty($this->filter) && !$this->group_id)
- {
+ if ($this->prop['searchonly'] && empty($this->filter) && !$this->group_id) {
$this->result = new rcube_result_set(0);
$this->result->searchonly = true;
return $this->result;
}
// fetch group members recursively
- if ($this->group_id && $this->group_data['dn'])
- {
+ if ($this->group_id && $this->group_data['dn']) {
$entries = $this->list_group_members($this->group_data['dn']);
// make list of entries unique and sort it
@@ -547,34 +513,34 @@ class rcube_ldap extends rcube_addressbook
$entries['count'] = count($entries);
$this->result = new rcube_result_set($entries['count'], ($this->list_page-1) * $this->page_size);
}
- else
- {
- // add general filter to query
- if (!empty($this->prop['filter']) && empty($this->filter))
- $this->set_search_set($this->prop['filter']);
+ else {
+ $prop = $this->group_id ? $this->group_data : $this->prop;
+
+ // use global search filter
+ if (!empty($this->filter))
+ $prop['filter'] = $this->filter;
// exec LDAP search if no result resource is stored
- if ($this->conn && !$this->ldap_result)
- $this->_exec_search();
+ if ($this->ready && !$this->ldap_result)
+ $this->ldap_result = $this->ldap->search($prop['base_dn'], $prop['filter'], $prop['scope'], $this->prop['attributes'], $prop);
// count contacts for this user
$this->result = $this->count();
// we have a search result resource
- if ($this->ldap_result && $this->result->count > 0)
- {
+ if ($this->ldap_result && $this->result->count > 0) {
// sorting still on the ldap server
- if ($this->sort_col && $this->prop['scope'] !== 'base' && !$this->vlv_active)
- ldap_sort($this->conn, $this->ldap_result, $this->sort_col);
+ if ($this->sort_col && $prop['scope'] !== 'base' && !$this->ldap->vlv_active)
+ $this->ldap_result->sort($this->sort_col);
// get all entries from the ldap server
- $entries = ldap_get_entries($this->conn, $this->ldap_result);
+ $entries = $this->ldap_result->entries();
}
} // end else
// start and end of the page
- $start_row = $this->vlv_active ? 0 : $this->result->first;
+ $start_row = $this->ldap->vlv_active ? 0 : $this->result->first;
$start_row = $subset < 0 ? $start_row + $this->page_size + $subset : $start_row;
$last_row = $this->result->first + $this->page_size;
$last_row = $subset != 0 ? $start_row + abs($subset) : $last_row;
@@ -599,43 +565,34 @@ class rcube_ldap extends rcube_addressbook
// fetch group object
if (empty($entries)) {
- $result = @ldap_read($this->conn, $dn, '(objectClass=*)', array('dn','objectClass','member','uniqueMember','memberURL'));
- if ($result === false)
- {
- $this->_debug("S: ".ldap_error($this->conn));
+ $attribs = array('dn','objectClass','member','uniqueMember','memberURL');
+ $entries = $this->ldap->read_entries($dn, '(objectClass=*)', $attribs);
+ if ($entries === false) {
return $group_members;
}
-
- $entries = @ldap_get_entries($this->conn, $result);
}
- for ($i=0; $i < $entries['count']; $i++)
- {
+ for ($i=0; $i < $entries['count']; $i++) {
$entry = $entries[$i];
+ $attrs = array();
- if (empty($entry['objectclass']))
- continue;
+ foreach ((array)$entry['objectclass'] as $objectclass) {
+ if (strtolower($objectclass) == 'groupofurls') {
+ $members = $this->_list_group_memberurl($dn, $entry, $count);
+ $group_members = array_merge($group_members, $members);
+ }
+ else if (($member_attr = $this->get_group_member_attr(array($objectclass), ''))
+ && ($member_attr = strtolower($member_attr)) && !in_array($member_attr, $attrs)
+ ) {
+ $members = $this->_list_group_members($dn, $entry, $member_attr, $count);
+ $group_members = array_merge($group_members, $members);
+ $attrs[] = $member_attr;
+ }
- foreach ((array)$entry['objectclass'] as $objectclass)
- {
- switch (strtolower($objectclass)) {
- case "group":
- case "groupofnames":
- case "kolabgroupofnames":
- $group_members = array_merge($group_members, $this->_list_group_members($dn, $entry, 'member', $count));
- break;
- case "groupofuniquenames":
- case "kolabgroupofuniquenames":
- $group_members = array_merge($group_members, $this->_list_group_members($dn, $entry, 'uniquemember', $count));
- break;
- case "groupofurls":
- $group_members = array_merge($group_members, $this->_list_group_memberurl($dn, $entry, $count));
- break;
+ if ($this->prop['sizelimit'] && count($group_members) > $this->prop['sizelimit']) {
+ break 2;
}
}
-
- if ($this->prop['sizelimit'] && count($group_members) > $this->prop['sizelimit'])
- break;
}
return array_filter($group_members);
@@ -654,28 +611,24 @@ class rcube_ldap extends rcube_addressbook
// Use the member attributes to return an array of member ldap objects
// NOTE that the member attribute is supposed to contain a DN
$group_members = array();
- if (empty($entry[$attr]))
+ if (empty($entry[$attr])) {
return $group_members;
+ }
// read these attributes for all members
- $attrib = $count ? array('dn') : array_values($this->fieldmap);
- $attrib[] = 'objectClass';
+ $attrib = $count ? array('dn','objectClass') : $this->prop['list_attributes'];
$attrib[] = 'member';
$attrib[] = 'uniqueMember';
$attrib[] = 'memberURL';
- for ($i=0; $i < $entry[$attr]['count']; $i++)
- {
+ $filter = $this->prop['groups']['member_filter'] ? $this->prop['groups']['member_filter'] : '(objectclass=*)';
+
+ for ($i=0; $i < $entry[$attr]['count']; $i++) {
if (empty($entry[$attr][$i]))
continue;
- $result = @ldap_read($this->conn, $entry[$attr][$i], '(objectclass=*)',
- $attrib, 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit']);
-
- $members = @ldap_get_entries($this->conn, $result);
- if ($members == false)
- {
- $this->_debug("S: ".ldap_error($this->conn));
+ $members = $this->ldap->read_entries($entry[$attr][$i], $filter, $attrib);
+ if ($members == false) {
$members = array();
}
@@ -701,34 +654,22 @@ class rcube_ldap extends rcube_addressbook
{
$group_members = array();
- for ($i=0; $i < $entry['memberurl']['count']; $i++)
- {
+ for ($i=0; $i < $entry['memberurl']['count']; $i++) {
// extract components from url
if (!preg_match('!ldap:///([^\?]+)\?\?(\w+)\?(.*)$!', $entry['memberurl'][$i], $m))
continue;
// add search filter if any
$filter = $this->filter ? '(&(' . $m[3] . ')(' . $this->filter . '))' : $m[3];
- $func = $m[2] == 'sub' ? 'ldap_search' : ($m[2] == 'base' ? 'ldap_read' : 'ldap_list');
-
- $attrib = $count ? array('dn') : array_values($this->fieldmap);
- if ($result = @$func($this->conn, $m[1], $filter,
- $attrib, 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit'])
- ) {
- $this->_debug("S: ".ldap_count_entries($this->conn, $result)." record(s) for ".$m[1]);
- }
- else {
- $this->_debug("S: ".ldap_error($this->conn));
- return $group_members;
- }
-
- $entries = @ldap_get_entries($this->conn, $result);
- for ($j = 0; $j < $entries['count']; $j++)
- {
- if ($nested_group_members = $this->list_group_members($entries[$j]['dn'], $count))
- $group_members = array_merge($group_members, $nested_group_members);
- else
- $group_members[] = $entries[$j];
+ $attrs = $count ? array('dn','objectClass') : $this->prop['list_attributes'];
+ if ($result = $this->ldap->search($m[1], $filter, $m[2], $attrs, $this->group_data)) {
+ $entries = $result->entries();
+ for ($j = 0; $j < $entries['count']; $j++) {
+ if (self::is_group_entry($entries[$j]) && ($nested_group_members = $this->list_group_members($entries[$j]['dn'], $count)))
+ $group_members = array_merge($group_members, $nested_group_members);
+ else
+ $group_members[] = $entries[$j];
+ }
}
}
@@ -764,14 +705,11 @@ class rcube_ldap extends rcube_addressbook
$mode = intval($mode);
// special treatment for ID-based search
- if ($fields == 'ID' || $fields == $this->primary_key)
- {
+ if ($fields == 'ID' || $fields == $this->primary_key) {
$ids = !is_array($value) ? explode(',', $value) : $value;
$result = new rcube_result_set();
- foreach ($ids as $id)
- {
- if ($rec = $this->get_record($id, true))
- {
+ foreach ($ids as $id) {
+ if ($rec = $this->get_record($id, true)) {
$result->add($rec);
$result->count++;
}
@@ -783,34 +721,20 @@ class rcube_ldap extends rcube_addressbook
$rcube = rcube::get_instance();
$list_fields = $rcube->config->get('contactlist_fields');
- if ($this->prop['vlv_search'] && $this->conn && join(',', (array)$fields) == join(',', $list_fields))
- {
- // add general filter to query
- if (!empty($this->prop['filter']) && empty($this->filter))
- $this->set_search_set($this->prop['filter']);
-
- // set VLV controls with encoded search string
- $this->_vlv_set_controls($this->prop, $this->list_page, $this->page_size, $value);
-
- $function = $this->_scope2func($this->prop['scope']);
- $this->ldap_result = @$function($this->conn, $this->base_dn, $this->filter ? $this->filter : '(objectclass=*)',
- array_values($this->fieldmap), 0, $this->page_size, (int)$this->prop['timelimit']);
-
+ if ($this->prop['vlv_search'] && $this->ready && join(',', (array)$fields) == join(',', $list_fields)) {
$this->result = new rcube_result_set(0);
- if (!$this->ldap_result) {
- $this->_debug("S: ".ldap_error($this->conn));
+ $search_suffix = $this->prop['fuzzy_search'] && $mode != 1 ? '*' : '';
+ $ldap_data = $this->ldap->search($this->base_dn, $this->prop['filter'], $this->prop['scope'], $this->prop['attributes'],
+ array('search' => $value . $search_suffix /*, 'sort' => $this->prop['sort'] */));
+ if ($ldap_data === false) {
return $this->result;
}
- $this->_debug("S: ".ldap_count_entries($this->conn, $this->ldap_result)." record(s)");
-
// get all entries of this page and post-filter those that really match the query
- $search = mb_strtolower($value);
- $entries = ldap_get_entries($this->conn, $this->ldap_result);
-
- for ($i = 0; $i < $entries['count']; $i++) {
- $rec = $this->_ldap2result($entries[$i]);
+ $search = mb_strtolower($value);
+ foreach ($ldap_data as $i => $entry) {
+ $rec = $this->_ldap2result($entry);
foreach ($fields as $f) {
foreach ((array)$rec[$f] as $val) {
if ($this->compare_search_value($f, $val, $search, $mode)) {
@@ -836,31 +760,27 @@ class rcube_ldap extends rcube_addressbook
}
}
- if ($fields == '*')
- {
+ if ($fields == '*') {
// search_fields are required for fulltext search
- if (empty($this->prop['search_fields']))
- {
+ if (empty($this->prop['search_fields'])) {
$this->set_error(self::ERROR_SEARCH, 'nofulltextsearch');
$this->result = new rcube_result_set();
return $this->result;
}
- if (is_array($this->prop['search_fields']))
- {
+ if (is_array($this->prop['search_fields'])) {
foreach ($this->prop['search_fields'] as $field) {
- $filter .= "($field=$wp" . $this->_quote_string($value) . "$ws)";
+ $filter .= "($field=$wp" . rcube_ldap_generic::quote_string($value) . "$ws)";
}
}
}
- else
- {
+ else {
foreach ((array)$fields as $idx => $field) {
$val = is_array($value) ? $value[$idx] : $value;
if ($attrs = $this->_map_field($field)) {
if (count($attrs) > 1)
$filter .= '(|';
foreach ($attrs as $f)
- $filter .= "($f=$wp" . $this->_quote_string($val) . "$ws)";
+ $filter .= "($f=$wp" . rcube_ldap_generic::quote_string($val) . "$ws)";
if (count($attrs) > 1)
$filter .= ')';
}
@@ -871,6 +791,8 @@ class rcube_ldap extends rcube_addressbook
// add required (non empty) fields filter
$req_filter = '';
foreach ((array)$required as $field) {
+ if (in_array($field, (array)$fields)) // required field is already in search filter
+ continue;
if ($attrs = $this->_map_field($field)) {
if (count($attrs) > 1)
$req_filter .= '(|';
@@ -893,7 +815,6 @@ class rcube_ldap extends rcube_addressbook
// set filter string and execute search
$this->set_search_set($filter);
- $this->_exec_search();
if ($select)
$this->list_records();
@@ -912,20 +833,20 @@ class rcube_ldap extends rcube_addressbook
function count()
{
$count = 0;
- if ($this->conn && $this->ldap_result) {
- $count = $this->vlv_active ? $this->vlv_count : ldap_count_entries($this->conn, $this->ldap_result);
+ if ($this->ldap_result) {
+ $count = $this->ldap_result->count();
}
else if ($this->group_id && $this->group_data['dn']) {
$count = count($this->list_group_members($this->group_data['dn'], true));
}
- else if ($this->conn) {
- // We have a connection but no result set, attempt to get one.
- if (empty($this->filter)) {
- // The filter is not set, set it.
- $this->filter = $this->prop['filter'];
- }
+ // We have a connection but no result set, attempt to get one.
+ else if ($this->ready) {
+ $prop = $this->group_id ? $this->group_data : $this->prop;
- $count = (int) $this->_exec_search(true);
+ if (!empty($this->filter)) { // Use global search filter
+ $prop['filter'] = $this->filter;
+ }
+ $count = $this->ldap->search($prop['base_dn'], $prop['filter'], $prop['scope'], array('dn'), $prop, true);
}
return new rcube_result_set($count, ($this->list_page-1) * $this->page_size);
@@ -955,28 +876,16 @@ class rcube_ldap extends rcube_addressbook
{
$res = $this->result = null;
- if ($this->conn && $dn)
- {
+ if ($this->ready && $dn) {
$dn = self::dn_decode($dn);
- $this->_debug("C: Read [dn: $dn] [(objectclass=*)]");
-
- if ($ldap_result = @ldap_read($this->conn, $dn, '(objectclass=*)', array_values($this->fieldmap))) {
- $this->_debug("S: OK");
-
- $entry = ldap_first_entry($this->conn, $ldap_result);
-
- if ($entry && ($rec = ldap_get_attributes($this->conn, $entry))) {
- $rec = array_change_key_case($rec, CASE_LOWER);
- }
- }
- else {
- $this->_debug("S: ".ldap_error($this->conn));
+ if ($rec = $this->ldap->get_entry($dn)) {
+ $rec = array_change_key_case($rec, CASE_LOWER);
}
// Use ldap_list to get subentries like country (c) attribute (#1488123)
if (!empty($rec) && $this->sub_filter) {
- if ($entries = $this->ldap_list($dn, $this->sub_filter, array_keys($this->prop['sub_fields']))) {
+ if ($entries = $this->ldap->list_entries($dn, $this->sub_filter, array_keys($this->prop['sub_fields']))) {
foreach ($entries as $entry) {
$lrec = array_change_key_case($entry, CASE_LOWER);
$rec = array_merge($lrec, $rec);
@@ -988,7 +897,7 @@ class rcube_ldap extends rcube_addressbook
// Add in the dn for the entry.
$rec['dn'] = $dn;
$res = $this->_ldap2result($rec);
- $this->result = new rcube_result_set();
+ $this->result = new rcube_result_set(1);
$this->result->add($res);
}
}
@@ -1035,7 +944,6 @@ class rcube_ldap extends rcube_addressbook
$mail_field = $this->fieldmap['email'];
// try to extract surname and firstname from displayname
- $reverse_map = array_flip($this->fieldmap);
$name_parts = preg_split('/[\s,.]+/', $save_data['name']);
if ($sn_field && $missing[$sn_field]) {
@@ -1102,12 +1010,12 @@ class rcube_ldap extends rcube_addressbook
}
// Build the new entries DN.
- $dn = $this->prop['LDAP_rdn'].'='.$this->_quote_string($newentry[$this->prop['LDAP_rdn']], true).','.$this->base_dn;
+ $dn = $this->prop['LDAP_rdn'].'='.rcube_ldap_generic::quote_string($newentry[$this->prop['LDAP_rdn']], true).','.$this->base_dn;
// Remove attributes that need to be added separately (child objects)
$xfields = array();
if (!empty($this->prop['sub_fields']) && is_array($this->prop['sub_fields'])) {
- foreach ($this->prop['sub_fields'] as $xf => $xclass) {
+ foreach (array_keys($this->prop['sub_fields']) as $xf) {
if (!empty($newentry[$xf])) {
$xfields[$xf] = $newentry[$xf];
unset($newentry[$xf]);
@@ -1115,19 +1023,19 @@ class rcube_ldap extends rcube_addressbook
}
}
- if (!$this->ldap_add($dn, $newentry)) {
+ if (!$this->ldap->add($dn, $newentry)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
foreach ($xfields as $xidx => $xf) {
- $xdn = $xidx.'='.$this->_quote_string($xf).','.$dn;
+ $xdn = $xidx.'='.rcube_ldap_generic::quote_string($xf).','.$dn;
$xf = array(
$xidx => $xf,
'objectClass' => (array) $this->prop['sub_fields'][$xidx],
);
- $this->ldap_add($xdn, $xf);
+ $this->ldap->add($xdn, $xf);
}
$dn = self::dn_encode($dn);
@@ -1170,7 +1078,7 @@ class rcube_ldap extends rcube_addressbook
}
}
- foreach ($this->fieldmap as $col => $fld) {
+ foreach ($this->fieldmap as $fld) {
if ($fld) {
$val = $ldap_data[$fld];
$old = $old_data[$fld];
@@ -1233,7 +1141,7 @@ class rcube_ldap extends rcube_addressbook
// Update the entry as required.
if (!empty($deletedata)) {
// Delete the fields.
- if (!$this->ldap_mod_del($dn, $deletedata)) {
+ if (!$this->ldap->mod_del($dn, $deletedata)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
@@ -1243,17 +1151,17 @@ class rcube_ldap extends rcube_addressbook
// Handle RDN change
if ($replacedata[$this->prop['LDAP_rdn']]) {
$newdn = $this->prop['LDAP_rdn'].'='
- .$this->_quote_string($replacedata[$this->prop['LDAP_rdn']], true)
+ .rcube_ldap_generic::quote_string($replacedata[$this->prop['LDAP_rdn']], true)
.','.$this->base_dn;
if ($dn != $newdn) {
$newrdn = $this->prop['LDAP_rdn'].'='
- .$this->_quote_string($replacedata[$this->prop['LDAP_rdn']], true);
+ .rcube_ldap_generic::quote_string($replacedata[$this->prop['LDAP_rdn']], true);
unset($replacedata[$this->prop['LDAP_rdn']]);
}
}
// Replace the fields.
if (!empty($replacedata)) {
- if (!$this->ldap_mod_replace($dn, $replacedata)) {
+ if (!$this->ldap->mod_replace($dn, $replacedata)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
@@ -1269,8 +1177,8 @@ class rcube_ldap extends rcube_addressbook
// remove sub-entries
if (!empty($subdeldata)) {
foreach ($subdeldata as $fld => $val) {
- $subdn = $fld.'='.$this->_quote_string($val).','.$dn;
- if (!$this->ldap_delete($subdn)) {
+ $subdn = $fld.'='.rcube_ldap_generic::quote_string($val).','.$dn;
+ if (!$this->ldap->delete($subdn)) {
return false;
}
}
@@ -1278,7 +1186,7 @@ class rcube_ldap extends rcube_addressbook
if (!empty($newdata)) {
// Add the fields.
- if (!$this->ldap_mod_add($dn, $newdata)) {
+ if (!$this->ldap->mod_add($dn, $newdata)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
@@ -1286,7 +1194,7 @@ class rcube_ldap extends rcube_addressbook
// Handle RDN change
if (!empty($newrdn)) {
- if (!$this->ldap_rename($dn, $newrdn, null, true)) {
+ if (!$this->ldap->rename($dn, $newrdn, null, true)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
@@ -1297,8 +1205,7 @@ class rcube_ldap extends rcube_addressbook
// change the group membership of the contact
if ($this->groups) {
$group_ids = $this->get_record_groups($dn);
- foreach ($group_ids as $group_id)
- {
+ foreach (array_keys($group_ids) as $group_id) {
$this->remove_from_group($group_id, $dn);
$this->add_to_group($group_id, $newdn);
}
@@ -1310,12 +1217,12 @@ class rcube_ldap extends rcube_addressbook
// add sub-entries
if (!empty($subnewdata)) {
foreach ($subnewdata as $fld => $val) {
- $subdn = $fld.'='.$this->_quote_string($val).','.$dn;
+ $subdn = $fld.'='.rcube_ldap_generic::quote_string($val).','.$dn;
$xf = array(
$fld => $val,
'objectClass' => (array) $this->prop['sub_fields'][$fld],
);
- $this->ldap_add($subdn, $xf);
+ $this->ldap->add($subdn, $xf);
}
}
@@ -1343,9 +1250,9 @@ class rcube_ldap extends rcube_addressbook
// Need to delete all sub-entries first
if ($this->sub_filter) {
- if ($entries = $this->ldap_list($dn, $this->sub_filter)) {
+ if ($entries = $this->ldap->list_entries($dn, $this->sub_filter)) {
foreach ($entries as $entry) {
- if (!$this->ldap_delete($entry['dn'])) {
+ if (!$this->ldap->delete($entry['dn'])) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
@@ -1354,7 +1261,7 @@ class rcube_ldap extends rcube_addressbook
}
// Delete the record.
- if (!$this->ldap_delete($dn)) {
+ if (!$this->ldap->delete($dn)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
@@ -1363,7 +1270,7 @@ class rcube_ldap extends rcube_addressbook
if ($this->groups) {
$dn = self::dn_encode($dn);
$group_ids = $this->get_record_groups($dn);
- foreach ($group_ids as $group_id) {
+ foreach (array_keys($group_ids) as $group_id) {
$this->remove_from_group($group_id, $dn);
}
}
@@ -1378,8 +1285,8 @@ class rcube_ldap extends rcube_addressbook
*/
function delete_all()
{
- //searching for contact entries
- $dn_list = $this->ldap_list($this->base_dn, $this->prop['filter'] ? $this->prop['filter'] : '(objectclass=*)');
+ // searching for contact entries
+ $dn_list = $this->ldap->list_entries($this->base_dn, $this->prop['filter'] ? $this->prop['filter'] : '(objectclass=*)');
if (!empty($dn_list)) {
foreach ($dn_list as $idx => $entry) {
@@ -1396,6 +1303,10 @@ class rcube_ldap extends rcube_addressbook
*/
protected function add_autovalues(&$attrs)
{
+ if (empty($this->prop['autovalues'])) {
+ return;
+ }
+
$attrvals = array();
foreach ($attrs as $k => $v) {
$attrvals['{'.$k.'}'] = is_array($v) ? $v[0] : $v;
@@ -1403,117 +1314,26 @@ class rcube_ldap extends rcube_addressbook
foreach ((array)$this->prop['autovalues'] as $lf => $templ) {
if (empty($attrs[$lf])) {
- // replace {attr} placeholders with concrete attribute values
- $templ = preg_replace('/\{\w+\}/', '', strtr($templ, $attrvals));
-
- if (strpos($templ, '(') !== false)
- $attrs[$lf] = eval("return ($templ);");
- else
- $attrs[$lf] = $templ;
- }
- }
- }
+ if (strpos($templ, '(') !== false) {
+ // replace {attr} placeholders with (escaped!) attribute values to be safely eval'd
+ $code = preg_replace('/\{\w+\}/', '', strtr($templ, array_map('addslashes', $attrvals)));
+ $fn = create_function('', "return ($code);");
+ if (!$fn) {
+ rcube::raise_error(array(
+ 'code' => 505, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Expression parse error on: ($code)"), true, false);
+ continue;
+ }
- /**
- * Execute the LDAP search based on the stored credentials
- */
- private function _exec_search($count = false)
- {
- if ($this->ready)
- {
- $filter = $this->filter ? $this->filter : '(objectclass=*)';
- $function = $this->_scope2func($this->prop['scope'], $ns_function);
-
- $this->_debug("C: Search [$filter][dn: $this->base_dn]");
-
- // when using VLV, we get the total count by...
- if (!$count && $function != 'ldap_read' && $this->prop['vlv'] && !$this->group_id) {
- // ...either reading numSubOrdinates attribute
- if ($this->prop['numsub_filter'] && ($result_count = @$ns_function($this->conn, $this->base_dn, $this->prop['numsub_filter'], array('numSubOrdinates'), 0, 0, 0))) {
- $counts = ldap_get_entries($this->conn, $result_count);
- for ($this->vlv_count = $j = 0; $j < $counts['count']; $j++)
- $this->vlv_count += $counts[$j]['numsubordinates'][0];
- $this->_debug("D: total numsubordinates = " . $this->vlv_count);
+ $attrs[$lf] = $fn();
}
- else if (!function_exists('ldap_parse_virtuallist_control')) // ...or by fetching all records dn and count them
- $this->vlv_count = $this->_exec_search(true);
-
- $this->vlv_active = $this->_vlv_set_controls($this->prop, $this->list_page, $this->page_size);
- }
-
- // only fetch dn for count (should keep the payload low)
- $attrs = $count ? array('dn') : array_values($this->fieldmap);
- if ($this->ldap_result = @$function($this->conn, $this->base_dn, $filter,
- $attrs, 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit'])
- ) {
- // when running on a patched PHP we can use the extended functions to retrieve the total count from the LDAP search result
- if ($this->vlv_active && function_exists('ldap_parse_virtuallist_control')) {
- if (ldap_parse_result($this->conn, $this->ldap_result,
- $errcode, $matcheddn, $errmsg, $referrals, $serverctrls)
- && $serverctrls // can be null e.g. in case of adm. limit error
- ) {
- ldap_parse_virtuallist_control($this->conn, $serverctrls,
- $last_offset, $this->vlv_count, $vresult);
- $this->_debug("S: VLV result: last_offset=$last_offset; content_count=$this->vlv_count");
- }
- else {
- $this->_debug("S: ".($errmsg ? $errmsg : ldap_error($this->conn)));
- }
+ else {
+ // replace {attr} placeholders with concrete attribute values
+ $attrs[$lf] = preg_replace('/\{\w+\}/', '', strtr($templ, $attrvals));
}
-
- $entries_count = ldap_count_entries($this->conn, $this->ldap_result);
- $this->_debug("S: $entries_count record(s)");
-
- return $count ? $entries_count : true;
- }
- else {
- $this->_debug("S: ".ldap_error($this->conn));
}
}
-
- return false;
- }
-
- /**
- * Choose the right PHP function according to scope property
- */
- private function _scope2func($scope, &$ns_function = null)
- {
- switch ($scope) {
- case 'sub':
- $function = $ns_function = 'ldap_search';
- break;
- case 'base':
- $function = $ns_function = 'ldap_read';
- break;
- default:
- $function = 'ldap_list';
- $ns_function = 'ldap_read';
- break;
- }
-
- return $function;
- }
-
- /**
- * Set server controls for Virtual List View (paginated listing)
- */
- private function _vlv_set_controls($prop, $list_page, $page_size, $search = null)
- {
- $sort_ctrl = array('oid' => "1.2.840.113556.1.4.473", 'value' => $this->_sort_ber_encode((array)$prop['sort']));
- $vlv_ctrl = array('oid' => "2.16.840.1.113730.3.4.9", 'value' => $this->_vlv_ber_encode(($offset = ($list_page-1) * $page_size + 1), $page_size, $search), 'iscritical' => true);
-
- $sort = (array)$prop['sort'];
- $this->_debug("C: set controls sort=" . join(' ', unpack('H'.(strlen($sort_ctrl['value'])*2), $sort_ctrl['value'])) . " ($sort[0]);"
- . " vlv=" . join(' ', (unpack('H'.(strlen($vlv_ctrl['value'])*2), $vlv_ctrl['value']))) . " ($offset/$page_size)");
-
- if (!ldap_set_option($this->conn, LDAP_OPT_SERVER_CONTROLS, array($sort_ctrl, $vlv_ctrl))) {
- $this->_debug("S: ".ldap_error($this->conn));
- $this->set_error(self::ERROR_SEARCH, 'vlvnotsupported');
- return false;
- }
-
- return true;
}
@@ -1522,12 +1342,20 @@ class rcube_ldap extends rcube_addressbook
*/
private function _ldap2result($rec)
{
- $out = array();
+ $out = array('_type' => 'person');
+ $fieldmap = $this->fieldmap;
if ($rec['dn'])
$out[$this->primary_key] = self::dn_encode($rec['dn']);
- foreach ($this->fieldmap as $rf => $lf)
+ // determine record type
+ if (self::is_group_entry($rec)) {
+ $out['_type'] = 'group';
+ $out['readonly'] = true;
+ $fieldmap['name'] = $this->group_data['name_attr'] ? $this->group_data['name_attr'] : $this->prop['groups']['name_attr'];
+ }
+
+ foreach ($fieldmap as $rf => $lf)
{
for ($i=0; $i < $rec[$lf]['count']; $i++) {
if (!($value = $rec[$lf][$i]))
@@ -1589,8 +1417,10 @@ class rcube_ldap extends rcube_addressbook
if (is_array($colprop['serialized'])) {
foreach ($colprop['serialized'] as $subtype => $delim) {
$key = $col.':'.$subtype;
- foreach ((array)$save_cols[$key] as $i => $val)
- $save_cols[$key][$i] = join($delim, array($val['street'], $val['locality'], $val['zipcode'], $val['country']));
+ foreach ((array)$save_cols[$key] as $i => $val) {
+ $values = array($val['street'], $val['locality'], $val['zipcode'], $val['country']);
+ $save_cols[$key][$i] = count(array_filter($values)) ? join($delim, $values) : null;
+ }
}
}
}
@@ -1628,11 +1458,11 @@ class rcube_ldap extends rcube_addressbook
{
// list of known attribute aliases
static $aliases = array(
- 'gn' => 'givenname',
+ 'gn' => 'givenname',
'rfc822mailbox' => 'email',
- 'userid' => 'uid',
- 'emailaddress' => 'email',
- 'pkcs9email' => 'email',
+ 'userid' => 'uid',
+ 'emailaddress' => 'email',
+ 'pkcs9email' => 'email',
);
list($name, $limit) = explode(':', $namev, 2);
@@ -1641,6 +1471,15 @@ class rcube_ldap extends rcube_addressbook
return (isset($aliases[$name]) ? $aliases[$name] : $name) . $suffix;
}
+ /**
+ * Determines whether the given LDAP entry is a group record
+ */
+ private static function is_group_entry($entry)
+ {
+ $classes = array_map('strtolower', (array)$entry['objectclass']);
+
+ return count(array_intersect(array_keys(self::$group_types), $classes)) > 0;
+ }
/**
* Prints debug info to the log
@@ -1657,55 +1496,27 @@ class rcube_ldap extends rcube_addressbook
* Activate/deactivate debug mode
*
* @param boolean $dbg True if LDAP commands should be logged
- * @access public
*/
function set_debug($dbg = true)
{
$this->debug = $dbg;
- }
-
- /**
- * Quotes attribute value string
- *
- * @param string $str Attribute value
- * @param bool $dn True if the attribute is a DN
- *
- * @return string Quoted string
- */
- private static function _quote_string($str, $dn=false)
- {
- // take firt entry if array given
- if (is_array($str))
- $str = reset($str);
-
- if ($dn)
- $replace = array(','=>'\2c', '='=>'\3d', '+'=>'\2b', '<'=>'\3c',
- '>'=>'\3e', ';'=>'\3b', '\\'=>'\5c', '"'=>'\22', '#'=>'\23');
- else
- $replace = array('*'=>'\2a', '('=>'\28', ')'=>'\29', '\\'=>'\5c',
- '/'=>'\2f');
-
- return strtr($str, $replace);
+ if ($this->ldap) {
+ $this->ldap->set_debug($dbg);
+ }
}
/**
* Setter for the current group
- * (empty, has to be re-implemented by extending class)
*/
function set_group($group_id)
{
- if ($group_id)
- {
- if (($group_cache = $this->cache->get('groups')) === null)
- $group_cache = $this->_fetch_groups();
-
+ if ($group_id) {
$this->group_id = $group_id;
- $this->group_data = $group_cache[$group_id];
+ $this->group_data = $this->get_group_entry($group_id);
}
- else
- {
+ else {
$this->group_id = 0;
$this->group_data = null;
}
@@ -1715,28 +1526,32 @@ class rcube_ldap extends rcube_addressbook
* List all active contact groups of this source
*
* @param string Optional search string to match group name
+ * @param int Matching mode:
+ * 0 - partial (*abc*),
+ * 1 - strict (=),
+ * 2 - prefix (abc*)
+ *
* @return array Indexed list of contact groups, each a hash array
*/
- function list_groups($search = null)
+ function list_groups($search = null, $mode = 0)
{
- if (!$this->groups)
+ if (!$this->groups) {
return array();
+ }
- // use cached list for searching
- $this->cache->expunge();
- if (!$search || ($group_cache = $this->cache->get('groups')) === null)
- $group_cache = $this->_fetch_groups();
+ $group_cache = $this->_fetch_groups();
+ $groups = array();
- $groups = array();
if ($search) {
- $search = mb_strtolower($search);
foreach ($group_cache as $group) {
- if (strpos(mb_strtolower($group['name']), $search) !== false)
+ if ($this->compare_search_value('name', $group['name'], $search, $mode)) {
$groups[] = $group;
+ }
}
}
- else
+ else {
$groups = $group_cache;
+ }
return array_values($groups);
}
@@ -1744,80 +1559,139 @@ class rcube_ldap extends rcube_addressbook
/**
* Fetch groups from server
*/
- private function _fetch_groups($vlv_page = 0)
+ private function _fetch_groups($vlv_page = null)
{
- $base_dn = $this->groups_base_dn;
- $filter = $this->prop['groups']['filter'];
- $name_attr = $this->prop['groups']['name_attr'];
+ // special case: list groups from 'group_filters' config
+ if ($vlv_page === null && !empty($this->prop['group_filters'])) {
+ $groups = array();
+
+ // list regular groups configuration as special filter
+ if (!empty($this->prop['groups']['filter'])) {
+ $id = '__groups__';
+ $groups[$id] = array('ID' => $id, 'name' => rcube_label('groups'), 'virtual' => true) + $this->prop['groups'];
+ }
+
+ foreach ($this->prop['group_filters'] as $id => $prop) {
+ $groups[$id] = $prop + array('ID' => $id, 'name' => ucfirst($id), 'virtual' => true, 'base_dn' => $this->base_dn);
+ }
+
+ return $groups;
+ }
+
+ if ($this->cache && $vlv_page === null && ($groups = $this->cache->get('groups')) !== null) {
+ return $groups;
+ }
+
+ $base_dn = $this->groups_base_dn;
+ $filter = $this->prop['groups']['filter'];
+ $name_attr = $this->prop['groups']['name_attr'];
$email_attr = $this->prop['groups']['email_attr'] ? $this->prop['groups']['email_attr'] : 'mail';
$sort_attrs = $this->prop['groups']['sort'] ? (array)$this->prop['groups']['sort'] : array($name_attr);
- $sort_attr = $sort_attrs[0];
+ $sort_attr = $sort_attrs[0];
- $this->_debug("C: Search [$filter][dn: $base_dn]");
+ $ldap = $this->ldap;
// use vlv to list groups
if ($this->prop['groups']['vlv']) {
$page_size = 200;
- if (!$this->prop['groups']['sort'])
+ if (!$this->prop['groups']['sort']) {
$this->prop['groups']['sort'] = $sort_attrs;
- $vlv_active = $this->_vlv_set_controls($this->prop['groups'], $vlv_page+1, $page_size);
+ }
+
+ $ldap = clone $this->ldap;
+ $ldap->set_config($this->prop['groups']);
+ $ldap->set_vlv_page($vlv_page+1, $page_size);
}
- $function = $this->_scope2func($this->prop['groups']['scope'], $ns_function);
- $res = @$function($this->conn, $base_dn, $filter, array_unique(array('dn', 'objectClass', $name_attr, $email_attr, $sort_attr)));
- if ($res === false)
- {
- $this->_debug("S: ".ldap_error($this->conn));
+ $attrs = array_unique(array('dn', 'objectClass', $name_attr, $email_attr, $sort_attr));
+ $ldap_data = $ldap->search($base_dn, $filter, $this->prop['groups']['scope'], $attrs, $this->prop['groups']);
+
+ if ($ldap_data === false) {
return array();
}
- $ldap_data = ldap_get_entries($this->conn, $res);
- $this->_debug("S: ".ldap_count_entries($this->conn, $res)." record(s)");
-
- $groups = array();
+ $groups = array();
$group_sortnames = array();
- $group_count = $ldap_data["count"];
- for ($i=0; $i < $group_count; $i++)
- {
- $group_name = is_array($ldap_data[$i][$name_attr]) ? $ldap_data[$i][$name_attr][0] : $ldap_data[$i][$name_attr];
- $group_id = self::dn_encode($group_name);
+ $group_count = $ldap_data->count();
+
+ foreach ($ldap_data as $entry) {
+ if (!$entry['dn']) // DN is mandatory
+ $entry['dn'] = $ldap_data->get_dn();
+
+ $group_name = is_array($entry[$name_attr]) ? $entry[$name_attr][0] : $entry[$name_attr];
+ $group_id = self::dn_encode($entry['dn']);
$groups[$group_id]['ID'] = $group_id;
- $groups[$group_id]['dn'] = $ldap_data[$i]['dn'];
+ $groups[$group_id]['dn'] = $entry['dn'];
$groups[$group_id]['name'] = $group_name;
- $groups[$group_id]['member_attr'] = $this->get_group_member_attr($ldap_data[$i]['objectclass']);
+ $groups[$group_id]['member_attr'] = $this->get_group_member_attr($entry['objectclass']);
// list email attributes of a group
- for ($j=0; $ldap_data[$i][$email_attr] && $j < $ldap_data[$i][$email_attr]['count']; $j++) {
- if (strpos($ldap_data[$i][$email_attr][$j], '@') > 0)
- $groups[$group_id]['email'][] = $ldap_data[$i][$email_attr][$j];
+ for ($j=0; $entry[$email_attr] && $j < $entry[$email_attr]['count']; $j++) {
+ if (strpos($entry[$email_attr][$j], '@') > 0)
+ $groups[$group_id]['email'][] = $entry[$email_attr][$j];
}
- $group_sortnames[] = mb_strtolower($ldap_data[$i][$sort_attr][0]);
+ $group_sortnames[] = mb_strtolower($entry[$sort_attr][0]);
}
// recursive call can exit here
- if ($vlv_page > 0)
+ if ($vlv_page > 0) {
return $groups;
+ }
// call recursively until we have fetched all groups
- while ($vlv_active && $group_count == $page_size)
- {
- $next_page = $this->_fetch_groups(++$vlv_page);
- $groups = array_merge($groups, $next_page);
+ while ($this->prop['groups']['vlv'] && $group_count == $page_size) {
+ $next_page = $this->_fetch_groups(++$vlv_page);
+ $groups = array_merge($groups, $next_page);
$group_count = count($next_page);
}
// when using VLV the list of groups is already sorted
- if (!$this->prop['groups']['vlv'])
+ if (!$this->prop['groups']['vlv']) {
array_multisort($group_sortnames, SORT_ASC, SORT_STRING, $groups);
+ }
// cache this
- $this->cache->set('groups', $groups);
+ if ($this->cache) {
+ $this->cache->set('groups', $groups);
+ }
return $groups;
}
/**
+ * Fetch a group entry from LDAP and save in local cache
+ */
+ private function get_group_entry($group_id)
+ {
+ $group_cache = $this->_fetch_groups();
+
+ // add group record to cache if it isn't yet there
+ if (!isset($group_cache[$group_id])) {
+ $name_attr = $this->prop['groups']['name_attr'];
+ $dn = self::dn_decode($group_id);
+
+ if ($list = $this->ldap->read_entries($dn, '(objectClass=*)', array('dn','objectClass','member','uniqueMember','memberURL',$name_attr,$this->fieldmap['email']))) {
+ $entry = $list[0];
+ $group_name = is_array($entry[$name_attr]) ? $entry[$name_attr][0] : $entry[$name_attr];
+ $group_cache[$group_id]['ID'] = $group_id;
+ $group_cache[$group_id]['dn'] = $dn;
+ $group_cache[$group_id]['name'] = $group_name;
+ $group_cache[$group_id]['member_attr'] = $this->get_group_member_attr($entry['objectclass']);
+ }
+ else {
+ $group_cache[$group_id] = false;
+ }
+
+ if ($this->cache) {
+ $this->cache->set('groups', $group_cache);
+ }
+ }
+
+ return $group_cache[$group_id];
+ }
+
+ /**
* Get group properties such as name and email address(es)
*
* @param string Group identifier
@@ -1825,10 +1699,7 @@ class rcube_ldap extends rcube_addressbook
*/
function get_group($group_id)
{
- if (($group_cache = $this->cache->get('groups')) === null)
- $group_cache = $this->_fetch_groups();
-
- $group_data = $group_cache[$group_id];
+ $group_data = $this->get_group_entry($group_id);
unset($group_data['dn'], $group_data['member_attr']);
return $group_data;
@@ -1842,24 +1713,24 @@ class rcube_ldap extends rcube_addressbook
*/
function create_group($group_name)
{
- $base_dn = $this->groups_base_dn;
- $new_dn = "cn=$group_name,$base_dn";
- $new_gid = self::dn_encode($group_name);
+ $new_dn = 'cn=' . rcube_ldap_generic::quote_string($group_name, true) . ',' . $this->groups_base_dn;
+ $new_gid = self::dn_encode($new_dn);
$member_attr = $this->get_group_member_attr();
- $name_attr = $this->prop['groups']['name_attr'] ? $this->prop['groups']['name_attr'] : 'cn';
-
- $new_entry = array(
+ $name_attr = $this->prop['groups']['name_attr'] ? $this->prop['groups']['name_attr'] : 'cn';
+ $new_entry = array(
'objectClass' => $this->prop['groups']['object_classes'],
$name_attr => $group_name,
$member_attr => '',
);
- if (!$this->ldap_add($new_dn, $new_entry)) {
+ if (!$this->ldap->add($new_dn, $new_entry)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
- $this->cache->remove('groups');
+ if ($this->cache) {
+ $this->cache->remove('groups');
+ }
return array('id' => $new_gid, 'name' => $group_name);
}
@@ -1872,19 +1743,18 @@ class rcube_ldap extends rcube_addressbook
*/
function delete_group($group_id)
{
- if (($group_cache = $this->cache->get('groups')) === null)
- $group_cache = $this->_fetch_groups();
-
- $base_dn = $this->groups_base_dn;
- $group_name = $group_cache[$group_id]['name'];
- $del_dn = "cn=$group_name,$base_dn";
+ $group_cache = $this->_fetch_groups();
+ $del_dn = $group_cache[$group_id]['dn'];
- if (!$this->ldap_delete($del_dn)) {
+ if (!$this->ldap->delete($del_dn)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
- $this->cache->remove('groups');
+ if ($this->cache) {
+ unset($group_cache[$group_id]);
+ $this->cache->set('groups', $group_cache);
+ }
return true;
}
@@ -1899,21 +1769,19 @@ class rcube_ldap extends rcube_addressbook
*/
function rename_group($group_id, $new_name, &$new_gid)
{
- if (($group_cache = $this->cache->get('groups')) === null)
- $group_cache = $this->_fetch_groups();
-
- $base_dn = $this->groups_base_dn;
- $group_name = $group_cache[$group_id]['name'];
- $old_dn = "cn=$group_name,$base_dn";
- $new_rdn = "cn=$new_name";
- $new_gid = self::dn_encode($new_name);
+ $group_cache = $this->_fetch_groups();
+ $old_dn = $group_cache[$group_id]['dn'];
+ $new_rdn = "cn=" . rcube_ldap_generic::quote_string($new_name, true);
+ $new_gid = self::dn_encode($new_rdn . ',' . $this->groups_base_dn);
- if (!$this->ldap_rename($old_dn, $new_rdn, null, true)) {
+ if (!$this->ldap->rename($old_dn, $new_rdn, null, true)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return false;
}
- $this->cache->remove('groups');
+ if ($this->cache) {
+ $this->cache->remove('groups');
+ }
return $new_name;
}
@@ -1921,66 +1789,71 @@ class rcube_ldap extends rcube_addressbook
/**
* Add the given contact records the a certain group
*
- * @param string Group identifier
- * @param array List of contact identifiers to be added
- * @return int Number of contacts added
+ * @param string Group identifier
+ * @param array|string List of contact identifiers to be added
+ *
+ * @return int Number of contacts added
*/
function add_to_group($group_id, $contact_ids)
{
- if (($group_cache = $this->cache->get('groups')) === null)
- $group_cache = $this->_fetch_groups();
+ $group_cache = $this->_fetch_groups();
+ $member_attr = $group_cache[$group_id]['member_attr'];
+ $group_dn = $group_cache[$group_id]['dn'];
+ $new_attrs = array();
- if (!is_array($contact_ids))
+ if (!is_array($contact_ids)) {
$contact_ids = explode(',', $contact_ids);
+ }
- $base_dn = $this->groups_base_dn;
- $group_name = $group_cache[$group_id]['name'];
- $member_attr = $group_cache[$group_id]['member_attr'];
- $group_dn = "cn=$group_name,$base_dn";
-
- $new_attrs = array();
- foreach ($contact_ids as $id)
+ foreach ($contact_ids as $id) {
$new_attrs[$member_attr][] = self::dn_decode($id);
+ }
- if (!$this->ldap_mod_add($group_dn, $new_attrs)) {
+ if (!$this->ldap->mod_add($group_dn, $new_attrs)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return 0;
}
- $this->cache->remove('groups');
+ if ($this->cache) {
+ $this->cache->remove('groups');
+ }
- return count($new_attrs['member']);
+ return count($new_attrs[$member_attr]);
}
/**
* Remove the given contact records from a certain group
*
- * @param string Group identifier
- * @param array List of contact identifiers to be removed
- * @return int Number of deleted group members
+ * @param string Group identifier
+ * @param array|string List of contact identifiers to be removed
+ *
+ * @return int Number of deleted group members
*/
function remove_from_group($group_id, $contact_ids)
{
- if (($group_cache = $this->cache->get('groups')) === null)
- $group_cache = $this->_fetch_groups();
-
- $base_dn = $this->groups_base_dn;
- $group_name = $group_cache[$group_id]['name'];
+ $group_cache = $this->_fetch_groups();
$member_attr = $group_cache[$group_id]['member_attr'];
- $group_dn = "cn=$group_name,$base_dn";
+ $group_dn = $group_cache[$group_id]['dn'];
+ $del_attrs = array();
- $del_attrs = array();
- foreach (explode(",", $contact_ids) as $id)
+ if (!is_array($contact_ids)) {
+ $contact_ids = explode(',', $contact_ids);
+ }
+
+ foreach ($contact_ids as $id) {
$del_attrs[$member_attr][] = self::dn_decode($id);
+ }
- if (!$this->ldap_mod_del($group_dn, $del_attrs)) {
+ if (!$this->ldap->mod_del($group_dn, $del_attrs)) {
$this->set_error(self::ERROR_SAVING, 'errorsaving');
return 0;
}
- $this->cache->remove('groups');
+ if ($this->cache) {
+ $this->cache->remove('groups');
+ }
- return count($del_attrs['member']);
+ return count($del_attrs[$member_attr]);
}
/**
@@ -1993,206 +1866,63 @@ class rcube_ldap extends rcube_addressbook
*/
function get_record_groups($contact_id)
{
- if (!$this->groups)
+ if (!$this->groups) {
return array();
+ }
$base_dn = $this->groups_base_dn;
$contact_dn = self::dn_decode($contact_id);
$name_attr = $this->prop['groups']['name_attr'] ? $this->prop['groups']['name_attr'] : 'cn';
$member_attr = $this->get_group_member_attr();
$add_filter = '';
+
if ($member_attr != 'member' && $member_attr != 'uniqueMember')
$add_filter = "($member_attr=$contact_dn)";
$filter = strtr("(|(member=$contact_dn)(uniqueMember=$contact_dn)$add_filter)", array('\\' => '\\\\'));
- $this->_debug("C: Search [$filter][dn: $base_dn]");
-
- $res = @ldap_search($this->conn, $base_dn, $filter, array($name_attr));
- if ($res === false)
- {
- $this->_debug("S: ".ldap_error($this->conn));
+ $ldap_data = $this->ldap->search($base_dn, $filter, 'sub', array('dn', $name_attr));
+ if ($res === false) {
return array();
}
- $ldap_data = ldap_get_entries($this->conn, $res);
- $this->_debug("S: ".ldap_count_entries($this->conn, $res)." record(s)");
$groups = array();
- for ($i=0; $i<$ldap_data["count"]; $i++)
- {
- $group_name = $ldap_data[$i][$name_attr][0];
- $group_id = self::dn_encode($group_name);
- $groups[$group_id] = $group_id;
+ foreach ($ldap_data as $entry) {
+ if (!$entry['dn'])
+ $entry['dn'] = $ldap_data->get_dn();
+ $group_name = $entry[$name_attr][0];
+ $group_id = self::dn_encode($entry['dn']);
+ $groups[$group_id] = $group_name;
}
+
return $groups;
}
/**
* Detects group member attribute name
*/
- private function get_group_member_attr($object_classes = array())
+ private function get_group_member_attr($object_classes = array(), $default = 'member')
{
if (empty($object_classes)) {
$object_classes = $this->prop['groups']['object_classes'];
}
+
if (!empty($object_classes)) {
foreach ((array)$object_classes as $oc) {
- switch (strtolower($oc)) {
- case 'group':
- case 'groupofnames':
- case 'kolabgroupofnames':
- $member_attr = 'member';
- break;
-
- case 'groupofuniquenames':
- case 'kolabgroupofuniquenames':
- $member_attr = 'uniqueMember';
- break;
+ if ($attr = self::$group_types[strtolower($oc)]) {
+ return $attr;
}
}
}
- if (!empty($member_attr)) {
- return $member_attr;
- }
-
if (!empty($this->prop['groups']['member_attr'])) {
return $this->prop['groups']['member_attr'];
}
- return 'member';
+ return $default;
}
/**
- * Generate BER encoded string for Virtual List View option
- *
- * @param integer List offset (first record)
- * @param integer Records per page
- * @return string BER encoded option value
- */
- private function _vlv_ber_encode($offset, $rpp, $search = '')
- {
- # this string is ber-encoded, php will prefix this value with:
- # 04 (octet string) and 10 (length of 16 bytes)
- # the code behind this string is broken down as follows:
- # 30 = ber sequence with a length of 0e (14) bytes following
- # 02 = type integer (in two's complement form) with 2 bytes following (beforeCount): 01 00 (ie 0)
- # 02 = type integer (in two's complement form) with 2 bytes following (afterCount): 01 18 (ie 25-1=24)
- # a0 = type context-specific/constructed with a length of 06 (6) bytes following
- # 02 = type integer with 2 bytes following (offset): 01 01 (ie 1)
- # 02 = type integer with 2 bytes following (contentCount): 01 00
-
- # whith a search string present:
- # 81 = type context-specific/constructed with a length of 04 (4) bytes following (the length will change here)
- # 81 indicates a user string is present where as a a0 indicates just a offset search
- # 81 = type context-specific/constructed with a length of 06 (6) bytes following
-
- # the following info was taken from the ISO/IEC 8825-1:2003 x.690 standard re: the
- # encoding of integer values (note: these values are in
- # two-complement form so since offset will never be negative bit 8 of the
- # leftmost octet should never by set to 1):
- # 8.3.2: If the contents octets of an integer value encoding consist
- # of more than one octet, then the bits of the first octet (rightmost) and bit 8
- # of the second (to the left of first octet) octet:
- # a) shall not all be ones; and
- # b) shall not all be zero
-
- if ($search)
- {
- $search = preg_replace('/[^-[:alpha:] ,.()0-9]+/', '', $search);
- $ber_val = self::_string2hex($search);
- $str = self::_ber_addseq($ber_val, '81');
- }
- else
- {
- # construct the string from right to left
- $str = "020100"; # contentCount
-
- $ber_val = self::_ber_encode_int($offset); // returns encoded integer value in hex format
-
- // calculate octet length of $ber_val
- $str = self::_ber_addseq($ber_val, '02') . $str;
-
- // now compute length over $str
- $str = self::_ber_addseq($str, 'a0');
- }
-
- // now tack on records per page
- $str = "020100" . self::_ber_addseq(self::_ber_encode_int($rpp-1), '02') . $str;
-
- // now tack on sequence identifier and length
- $str = self::_ber_addseq($str, '30');
-
- return pack('H'.strlen($str), $str);
- }
-
-
- /**
- * create ber encoding for sort control
- *
- * @param array List of cols to sort by
- * @return string BER encoded option value
- */
- private function _sort_ber_encode($sortcols)
- {
- $str = '';
- foreach (array_reverse((array)$sortcols) as $col) {
- $ber_val = self::_string2hex($col);
-
- # 30 = ber sequence with a length of octet value
- # 04 = octet string with a length of the ascii value
- $oct = self::_ber_addseq($ber_val, '04');
- $str = self::_ber_addseq($oct, '30') . $str;
- }
-
- // now tack on sequence identifier and length
- $str = self::_ber_addseq($str, '30');
-
- return pack('H'.strlen($str), $str);
- }
-
- /**
- * Add BER sequence with correct length and the given identifier
- */
- private static function _ber_addseq($str, $identifier)
- {
- $len = dechex(strlen($str)/2);
- if (strlen($len) % 2 != 0)
- $len = '0'.$len;
-
- return $identifier . $len . $str;
- }
-
- /**
- * Returns BER encoded integer value in hex format
- */
- private static function _ber_encode_int($offset)
- {
- $val = dechex($offset);
- $prefix = '';
-
- // check if bit 8 of high byte is 1
- if (preg_match('/^[89abcdef]/', $val))
- $prefix = '00';
-
- if (strlen($val)%2 != 0)
- $prefix .= '0';
-
- return $prefix . $val;
- }
-
- /**
- * Returns ascii string encoded in hex
- */
- private static function _string2hex($str)
- {
- $hex = '';
- for ($i=0; $i < strlen($str); $i++)
- $hex .= dechex(ord($str[$i]));
- return $hex;
- }
-
- /**
* HTML-safe DN string encoding
*
* @param string $str DN string
@@ -2219,130 +1949,4 @@ class rcube_ldap extends rcube_addressbook
return base64_decode($str);
}
- /**
- * Wrapper for ldap_add()
- */
- protected function ldap_add($dn, $entry)
- {
- $this->_debug("C: Add [dn: $dn]: ".print_r($entry, true));
-
- $res = ldap_add($this->conn, $dn, $entry);
- if ($res === false) {
- $this->_debug("S: ".ldap_error($this->conn));
- return false;
- }
-
- $this->_debug("S: OK");
- return true;
- }
-
- /**
- * Wrapper for ldap_delete()
- */
- protected function ldap_delete($dn)
- {
- $this->_debug("C: Delete [dn: $dn]");
-
- $res = ldap_delete($this->conn, $dn);
- if ($res === false) {
- $this->_debug("S: ".ldap_error($this->conn));
- return false;
- }
-
- $this->_debug("S: OK");
- return true;
- }
-
- /**
- * Wrapper for ldap_mod_replace()
- */
- protected function ldap_mod_replace($dn, $entry)
- {
- $this->_debug("C: Replace [dn: $dn]: ".print_r($entry, true));
-
- if (!ldap_mod_replace($this->conn, $dn, $entry)) {
- $this->_debug("S: ".ldap_error($this->conn));
- return false;
- }
-
- $this->_debug("S: OK");
- return true;
- }
-
- /**
- * Wrapper for ldap_mod_add()
- */
- protected function ldap_mod_add($dn, $entry)
- {
- $this->_debug("C: Add [dn: $dn]: ".print_r($entry, true));
-
- if (!ldap_mod_add($this->conn, $dn, $entry)) {
- $this->_debug("S: ".ldap_error($this->conn));
- return false;
- }
-
- $this->_debug("S: OK");
- return true;
- }
-
- /**
- * Wrapper for ldap_mod_del()
- */
- protected function ldap_mod_del($dn, $entry)
- {
- $this->_debug("C: Delete [dn: $dn]: ".print_r($entry, true));
-
- if (!ldap_mod_del($this->conn, $dn, $entry)) {
- $this->_debug("S: ".ldap_error($this->conn));
- return false;
- }
-
- $this->_debug("S: OK");
- return true;
- }
-
- /**
- * Wrapper for ldap_rename()
- */
- protected function ldap_rename($dn, $newrdn, $newparent = null, $deleteoldrdn = true)
- {
- $this->_debug("C: Rename [dn: $dn] [dn: $newrdn]");
-
- if (!ldap_rename($this->conn, $dn, $newrdn, $newparent, $deleteoldrdn)) {
- $this->_debug("S: ".ldap_error($this->conn));
- return false;
- }
-
- $this->_debug("S: OK");
- return true;
- }
-
- /**
- * Wrapper for ldap_list()
- */
- protected function ldap_list($dn, $filter, $attrs = array(''))
- {
- $list = array();
- $this->_debug("C: List [dn: $dn] [{$filter}]");
-
- if ($result = ldap_list($this->conn, $dn, $filter, $attrs)) {
- $list = ldap_get_entries($this->conn, $result);
-
- if ($list === false) {
- $this->_debug("S: ".ldap_error($this->conn));
- return array();
- }
-
- $count = $list['count'];
- unset($list['count']);
-
- $this->_debug("S: $count record(s)");
- }
- else {
- $this->_debug("S: ".ldap_error($this->conn));
- }
-
- return $list;
- }
-
}
diff --git a/program/lib/Roundcube/rcube_ldap_generic.php b/program/lib/Roundcube/rcube_ldap_generic.php
new file mode 100644
index 000000000..88378dc22
--- /dev/null
+++ b/program/lib/Roundcube/rcube_ldap_generic.php
@@ -0,0 +1,1049 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | Roundcube/rcube_ldap_generic.php |
+ | |
+ | This file is part of the Roundcube Webmail client |
+ | Copyright (C) 2006-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012-2013, Kolab Systems AG |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ | PURPOSE: |
+ | Provide basic functionality for accessing LDAP directories |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Thomas Bruederli <roundcube@gmail.com> |
+ | Aleksander Machniak <machniak@kolabsys.com> |
+ +-----------------------------------------------------------------------+
+*/
+
+
+/*
+ LDAP connection properties
+ --------------------------
+
+ $prop = array(
+ 'host' => '<ldap-server-address>',
+ // or
+ 'hosts' => array('directory.verisign.com'),
+ 'port' => 389,
+ 'use_tls' => true|false,
+ 'ldap_version' => 3, // using LDAPv3
+ 'auth_method' => '', // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
+ 'attributes' => array('dn'), // List of attributes to read from the server
+ 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
+ 'config_root_dn' => 'cn=config', // Root DN to read config (e.g. vlv indexes) from
+ '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.
+ 'network_timeout' => 10, // The timeout (in seconds) for connect + bind arrempts. This is only supported in PHP >= 5.3.0 with OpenLDAP 2.x
+ 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
+ );
+*/
+
+/**
+ * Model class to access an LDAP directories
+ *
+ * @package Framework
+ * @subpackage LDAP
+ */
+class rcube_ldap_generic
+{
+ const UPDATE_MOD_ADD = 1;
+ const UPDATE_MOD_DELETE = 2;
+ const UPDATE_MOD_REPLACE = 4;
+ const UPDATE_MOD_FULL = 7;
+
+ public $conn;
+ public $vlv_active = false;
+
+ /** private properties */
+ protected $cache = null;
+ protected $config = array();
+ protected $attributes = array('dn');
+ protected $entries = null;
+ protected $result = null;
+ protected $debug = false;
+ protected $list_page = 1;
+ protected $page_size = 10;
+ protected $vlv_config = null;
+
+
+ /**
+ * Object constructor
+ *
+ * @param array $p LDAP connection properties
+ */
+ function __construct($p)
+ {
+ $this->config = $p;
+
+ if (is_array($p['attributes']))
+ $this->attributes = $p['attributes'];
+
+ if (!is_array($p['hosts']) && !empty($p['host']))
+ $this->config['hosts'] = array($p['host']);
+ }
+
+ /**
+ * Activate/deactivate debug mode
+ *
+ * @param boolean $dbg True if LDAP commands should be logged
+ */
+ public function set_debug($dbg = true)
+ {
+ $this->debug = $dbg;
+ }
+
+ /**
+ * Set connection options
+ *
+ * @param mixed $opt Option name as string or hash array with multiple options
+ * @param mixed $val Option value
+ */
+ public function set_config($opt, $val = null)
+ {
+ if (is_array($opt))
+ $this->config = array_merge($this->config, $opt);
+ else
+ $this->config[$opt] = $value;
+ }
+
+ /**
+ * Enable caching by passing an instance of rcube_cache to be used by this object
+ *
+ * @param object rcube_cache Instance or False to disable caching
+ */
+ public function set_cache($cache_engine)
+ {
+ $this->cache = $cache_engine;
+ }
+
+ /**
+ * Set properties for VLV-based paging
+ *
+ * @param number $page Page number to list (starting at 1)
+ * @param number $size Number of entries to display on one page
+ */
+ public function set_vlv_page($page, $size = 10)
+ {
+ $this->list_page = $page;
+ $this->page_size = $size;
+ }
+
+ /**
+ * Establish a connection to the LDAP server
+ */
+ public function connect($host = null)
+ {
+ if (!function_exists('ldap_connect')) {
+ rcube::raise_error(array('code' => 100, 'type' => 'ldap',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "No ldap support in this installation of PHP"),
+ true);
+ return false;
+ }
+
+ if (is_resource($this->conn) && $this->config['host'] == $host)
+ return true;
+
+ if (empty($this->config['ldap_version']))
+ $this->config['ldap_version'] = 3;
+
+ // iterate over hosts if none specified
+ if (!$host) {
+ if (!is_array($this->config['hosts']))
+ $this->config['hosts'] = array($this->config['hosts']);
+
+ foreach ($this->config['hosts'] as $host) {
+ if ($this->connect($host)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // open connection to the given $host
+ $host = rcube_utils::idn_to_ascii(rcube_utils::parse_host($host));
+ $hostname = $host . ($this->config['port'] ? ':'.$this->config['port'] : '');
+
+ $this->_debug("C: Connect to $hostname [{$this->config['name']}]");
+
+ if ($lc = @ldap_connect($host, $this->config['port'])) {
+ if ($this->config['use_tls'] === true)
+ if (!ldap_start_tls($lc))
+ continue;
+
+ $this->_debug("S: OK");
+
+ ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->config['ldap_version']);
+ $this->config['host'] = $host;
+ $this->conn = $lc;
+
+ if (!empty($this->config['network_timeout']))
+ ldap_set_option($lc, LDAP_OPT_NETWORK_TIMEOUT, $this->config['network_timeout']);
+
+ if (isset($this->config['referrals']))
+ ldap_set_option($lc, LDAP_OPT_REFERRALS, $this->config['referrals']);
+ }
+ else {
+ $this->_debug("S: NOT OK");
+ }
+
+ if (!is_resource($this->conn)) {
+ rcube::raise_error(array('code' => 100, 'type' => 'ldap',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Could not connect to any LDAP server, last tried $hostname"),
+ true);
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Bind connection with (SASL-) user and password
+ *
+ * @param string $authc Authentication user
+ * @param string $pass Bind password
+ * @param string $authz Autorization user
+ *
+ * @return boolean True on success, False on error
+ */
+ public function sasl_bind($authc, $pass, $authz=null)
+ {
+ if (!$this->conn) {
+ return false;
+ }
+
+ if (!function_exists('ldap_sasl_bind')) {
+ rcube::raise_error(array('code' => 100, 'type' => 'ldap',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Unable to bind: ldap_sasl_bind() not exists"),
+ true);
+ return false;
+ }
+
+ if (!empty($authz)) {
+ $authz = 'u:' . $authz;
+ }
+
+ if (!empty($this->config['auth_method'])) {
+ $method = $this->config['auth_method'];
+ }
+ else {
+ $method = 'DIGEST-MD5';
+ }
+
+ $this->_debug("C: SASL Bind [mech: $method, authc: $authc, authz: $authz, pass: $pass]");
+
+ if (ldap_sasl_bind($this->conn, NULL, $pass, $method, NULL, $authc, $authz)) {
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ $this->_debug("S: ".ldap_error($this->conn));
+
+ rcube::raise_error(array(
+ 'code' => ldap_errno($this->conn), 'type' => 'ldap',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "SASL Bind failed for authcid=$authc ".ldap_error($this->conn)),
+ true);
+ return false;
+ }
+
+ /**
+ * Bind connection with DN and password
+ *
+ * @param string $dn Bind DN
+ * @param string $pass Bind password
+ *
+ * @return boolean True on success, False on error
+ */
+ public function bind($dn, $pass)
+ {
+ if (!$this->conn) {
+ return false;
+ }
+
+ $this->_debug("C: Bind $dn [pass: $pass]");
+
+ if (@ldap_bind($this->conn, $dn, $pass)) {
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ $this->_debug("S: ".ldap_error($this->conn));
+
+ rcube::raise_error(array(
+ 'code' => ldap_errno($this->conn), 'type' => 'ldap',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Bind failed for dn=$dn: ".ldap_error($this->conn)),
+ true);
+
+ return false;
+ }
+
+ /**
+ * Close connection to LDAP server
+ */
+ public function close()
+ {
+ if ($this->conn) {
+ $this->_debug("C: Close");
+ ldap_unbind($this->conn);
+ $this->conn = null;
+ }
+ }
+
+ /**
+ * Return the last result set
+ *
+ * @return object rcube_ldap_result Result object
+ */
+ function get_result()
+ {
+ return $this->result;
+ }
+
+ /**
+ * Get a specific LDAP entry, identified by its DN
+ *
+ * @param string $dn Record identifier
+ * @return array Hash array
+ */
+ function get_entry($dn)
+ {
+ $rec = null;
+
+ if ($this->conn && $dn) {
+ $this->_debug("C: Read $dn [(objectclass=*)]");
+
+ if ($ldap_result = @ldap_read($this->conn, $dn, '(objectclass=*)', $this->attributes)) {
+ $this->_debug("S: OK");
+
+ if ($entry = ldap_first_entry($this->conn, $ldap_result)) {
+ $rec = ldap_get_attributes($this->conn, $entry);
+ }
+ }
+ else {
+ $this->_debug("S: ".ldap_error($this->conn));
+ }
+
+ if (!empty($rec)) {
+ $rec['dn'] = $dn; // Add in the dn for the entry.
+ }
+ }
+
+ return $rec;
+ }
+
+ /**
+ * Execute the LDAP search based on the stored credentials
+ *
+ * @param string $base_dn The base DN to query
+ * @param string $filter The LDAP filter for search
+ * @param string $scope The LDAP scope (list|sub|base)
+ * @param array $attrs List of entry attributes to read
+ * @param array $prop Hash array with query configuration properties:
+ * - sort: array of sort attributes (has to be in sync with the VLV index)
+ * - search: search string used for VLV controls
+ * @param boolean $count_only Set to true if only entry count is requested
+ *
+ * @return mixed rcube_ldap_result object or number of entries (if count_only=true) or false on error
+ */
+ public function search($base_dn, $filter = '', $scope = 'sub', $attrs = array('dn'), $prop = array(), $count_only = false)
+ {
+ if (!$this->conn) {
+ return false;
+ }
+
+ if (empty($filter)) {
+ $filter = '(objectclass=*)';
+ }
+
+ $this->_debug("C: Search $base_dn for $filter");
+
+ $function = self::scope2func($scope, $ns_function);
+
+ // find available VLV index for this query
+ if (!$count_only && ($vlv_sort = $this->_find_vlv($base_dn, $filter, $scope, $prop['sort']))) {
+ // when using VLV, we get the total count by...
+ // ...either reading numSubOrdinates attribute
+ if (($sub_filter = $this->config['numsub_filter']) &&
+ ($result_count = @$ns_function($this->conn, $base_dn, $sub_filter, array('numSubOrdinates'), 0, 0, 0))
+ ) {
+ $counts = ldap_get_entries($this->conn, $result_count);
+ for ($vlv_count = $j = 0; $j < $counts['count']; $j++)
+ $vlv_count += $counts[$j]['numsubordinates'][0];
+ $this->_debug("D: total numsubordinates = " . $vlv_count);
+ }
+ // ...or by fetching all records dn and count them
+ else if (!function_exists('ldap_parse_virtuallist_control')) {
+ $vlv_count = $this->search($base_dn, $filter, $scope, array('dn'), $prop, true);
+ }
+
+ $this->vlv_active = $this->_vlv_set_controls($vlv_sort, $this->list_page, $this->page_size, $prop['search']);
+ }
+ else {
+ $this->vlv_active = false;
+ }
+
+ // only fetch dn for count (should keep the payload low)
+ if ($ldap_result = @$function($this->conn, $base_dn, $filter,
+ $attrs, 0, (int)$this->config['sizelimit'], (int)$this->config['timelimit'])
+ ) {
+ // when running on a patched PHP we can use the extended functions
+ // to retrieve the total count from the LDAP search result
+ if ($this->vlv_active && function_exists('ldap_parse_virtuallist_control')) {
+ if (ldap_parse_result($this->conn, $ldap_result, $errcode, $matcheddn, $errmsg, $referrals, $serverctrls)) {
+ ldap_parse_virtuallist_control($this->conn, $serverctrls, $last_offset, $vlv_count, $vresult);
+ $this->_debug("S: VLV result: last_offset=$last_offset; content_count=$vlv_count");
+ }
+ else {
+ $this->_debug("S: ".($errmsg ? $errmsg : ldap_error($this->conn)));
+ }
+ }
+ else if ($this->debug) {
+ $this->_debug("S: ".ldap_count_entries($this->conn, $ldap_result)." record(s) found");
+ }
+
+ $this->result = new rcube_ldap_result($this->conn, $ldap_result, $base_dn, $filter, $vlv_count);
+
+ return $count_only ? $this->result->count() : $this->result;
+ }
+ else {
+ $this->_debug("S: ".ldap_error($this->conn));
+ }
+
+ return false;
+ }
+
+ /**
+ * Modify an LDAP entry on the server
+ *
+ * @param string $dn Entry DN
+ * @param array $params Hash array of entry attributes
+ * @param int $mode Update mode (UPDATE_MOD_ADD | UPDATE_MOD_DELETE | UPDATE_MOD_REPLACE)
+ */
+ public function modify($dn, $parms, $mode = 255)
+ {
+ // TODO: implement this
+
+ return false;
+ }
+
+ /**
+ * Wrapper for ldap_add()
+ *
+ * @see ldap_add()
+ */
+ public function add($dn, $entry)
+ {
+ $this->_debug("C: Add $dn: ".print_r($entry, true));
+
+ $res = ldap_add($this->conn, $dn, $entry);
+ if ($res === false) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return false;
+ }
+
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ /**
+ * Wrapper for ldap_delete()
+ *
+ * @see ldap_delete()
+ */
+ public function delete($dn)
+ {
+ $this->_debug("C: Delete $dn");
+
+ $res = ldap_delete($this->conn, $dn);
+ if ($res === false) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return false;
+ }
+
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ /**
+ * Wrapper for ldap_mod_replace()
+ *
+ * @see ldap_mod_replace()
+ */
+ public function mod_replace($dn, $entry)
+ {
+ $this->_debug("C: Replace $dn: ".print_r($entry, true));
+
+ if (!ldap_mod_replace($this->conn, $dn, $entry)) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return false;
+ }
+
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ /**
+ * Wrapper for ldap_mod_add()
+ *
+ * @see ldap_mod_add()
+ */
+ public function mod_add($dn, $entry)
+ {
+ $this->_debug("C: Add $dn: ".print_r($entry, true));
+
+ if (!ldap_mod_add($this->conn, $dn, $entry)) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return false;
+ }
+
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ /**
+ * Wrapper for ldap_mod_del()
+ *
+ * @see ldap_mod_del()
+ */
+ public function mod_del($dn, $entry)
+ {
+ $this->_debug("C: Delete $dn: ".print_r($entry, true));
+
+ if (!ldap_mod_del($this->conn, $dn, $entry)) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return false;
+ }
+
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ /**
+ * Wrapper for ldap_rename()
+ *
+ * @see ldap_rename()
+ */
+ public function rename($dn, $newrdn, $newparent = null, $deleteoldrdn = true)
+ {
+ $this->_debug("C: Rename $dn to $newrdn");
+
+ if (!ldap_rename($this->conn, $dn, $newrdn, $newparent, $deleteoldrdn)) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return false;
+ }
+
+ $this->_debug("S: OK");
+ return true;
+ }
+
+ /**
+ * Wrapper for ldap_list() + ldap_get_entries()
+ *
+ * @see ldap_list()
+ * @see ldap_get_entries()
+ */
+ public function list_entries($dn, $filter, $attributes = array('dn'))
+ {
+ $list = array();
+ $this->_debug("C: List $dn [{$filter}]");
+
+ if ($result = ldap_list($this->conn, $dn, $filter, $attributes)) {
+ $list = ldap_get_entries($this->conn, $result);
+
+ if ($list === false) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return array();
+ }
+
+ $count = $list['count'];
+ unset($list['count']);
+
+ $this->_debug("S: $count record(s)");
+ }
+ else {
+ $this->_debug("S: ".ldap_error($this->conn));
+ }
+
+ return $list;
+ }
+
+ /**
+ * Wrapper for ldap_read() + ldap_get_entries()
+ *
+ * @see ldap_read()
+ * @see ldap_get_entries()
+ */
+ public function read_entries($dn, $filter, $attributes = null)
+ {
+ $this->_debug("C: Read $dn [{$filter}]");
+
+ if ($this->conn && $dn) {
+ if (!$attributes)
+ $attributes = $this->attributes;
+
+ $result = @ldap_read($this->conn, $dn, $filter, $attributes, 0, (int)$this->config['sizelimit'], (int)$this->config['timelimit']);
+ if ($result === false) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ return false;
+ }
+
+ $this->_debug("S: OK");
+ return ldap_get_entries($this->conn, $result);
+ }
+
+ return false;
+ }
+
+ /**
+ * Choose the right PHP function according to scope property
+ *
+ * @param string $scope The LDAP scope (sub|base|list)
+ * @param string $ns_function Function to be used for numSubOrdinates queries
+ * @return string PHP function to be used to query directory
+ */
+ public static function scope2func($scope, &$ns_function = null)
+ {
+ switch ($scope) {
+ case 'sub':
+ $function = $ns_function = 'ldap_search';
+ break;
+ case 'base':
+ $function = $ns_function = 'ldap_read';
+ break;
+ default:
+ $function = 'ldap_list';
+ $ns_function = 'ldap_read';
+ break;
+ }
+
+ return $function;
+ }
+
+ /**
+ * Convert the given scope integer value to a string representation
+ */
+ public static function scopeint2str($scope)
+ {
+ switch ($scope) {
+ case 2: return 'sub';
+ case 1: return 'one';
+ case 0: return 'base';
+ default: $this->_debug("Scope $scope is not a valid scope integer");
+ }
+
+ return '';
+ }
+
+ /**
+ * Escapes the given value according to RFC 2254 so that it can be safely used in LDAP filters.
+ *
+ * @param string $val Value to quote
+ * @return string The escaped value
+ */
+ public static function escape_value($val)
+ {
+ return strtr($str, array('*'=>'\2a', '('=>'\28', ')'=>'\29',
+ '\\'=>'\5c', '/'=>'\2f'));
+ }
+
+ /**
+ * Escapes a DN value according to RFC 2253
+ *
+ * @param string $dn DN value o quote
+ * @return string The escaped value
+ */
+ public static function escape_dn($dn)
+ {
+ return strtr($str, array(','=>'\2c', '='=>'\3d', '+'=>'\2b',
+ '<'=>'\3c', '>'=>'\3e', ';'=>'\3b', '\\'=>'\5c',
+ '"'=>'\22', '#'=>'\23'));
+ }
+
+ /**
+ * Normalize a LDAP result by converting entry attributes arrays into single values
+ *
+ * @param array $result LDAP result set fetched with ldap_get_entries()
+ * @return array Hash array with normalized entries, indexed by their DNs
+ */
+ public static function normalize_result($result)
+ {
+ if (!is_array($result)) {
+ return array();
+ }
+
+ $entries = array();
+ for ($i = 0; $i < $result['count']; $i++) {
+ $key = $result[$i]['dn'] ? $result[$i]['dn'] : $i;
+ $entries[$key] = self::normalize_entry($result[$i]);
+ }
+
+ return $entries;
+ }
+
+ /**
+ * Turn an LDAP entry into a regular PHP array with attributes as keys.
+ *
+ * @param array $entry Attributes array as retrieved from ldap_get_attributes() or ldap_get_entries()
+ * @return array Hash array with attributes as keys
+ */
+ public static function normalize_entry($entry)
+ {
+ $rec = array();
+ for ($i=0; $i < $entry['count']; $i++) {
+ $attr = $entry[$i];
+ if ($entry[$attr]['count'] == 1) {
+ switch ($attr) {
+ case 'objectclass':
+ $rec[$attr] = array(strtolower($entry[$attr][0]));
+ break;
+ default:
+ $rec[$attr] = $entry[$attr][0];
+ break;
+ }
+ }
+ else {
+ for ($j=0; $j < $entry[$attr]['count']; $j++) {
+ $rec[$attr][$j] = $entry[$attr][$j];
+ }
+ }
+ }
+
+ return $rec;
+ }
+
+ /**
+ * Set server controls for Virtual List View (paginated listing)
+ */
+ private function _vlv_set_controls($sort, $list_page, $page_size, $search = null)
+ {
+ $sort_ctrl = array('oid' => "1.2.840.113556.1.4.473", 'value' => self::_sort_ber_encode((array)$sort));
+ $vlv_ctrl = array('oid' => "2.16.840.1.113730.3.4.9", 'value' => self::_vlv_ber_encode(($offset = ($list_page-1) * $page_size + 1), $page_size, $search), 'iscritical' => true);
+
+ $this->_debug("C: Set controls sort=" . join(' ', unpack('H'.(strlen($sort_ctrl['value'])*2), $sort_ctrl['value'])) . " ($sort[0]);"
+ . " vlv=" . join(' ', (unpack('H'.(strlen($vlv_ctrl['value'])*2), $vlv_ctrl['value']))) . " ($offset/$page_size; $search)");
+
+ if (!ldap_set_option($this->conn, LDAP_OPT_SERVER_CONTROLS, array($sort_ctrl, $vlv_ctrl))) {
+ $this->_debug("S: ".ldap_error($this->conn));
+ $this->set_error(self::ERROR_SEARCH, 'vlvnotsupported');
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns unified attribute name (resolving aliases)
+ */
+ private static function _attr_name($namev)
+ {
+ // list of known attribute aliases
+ static $aliases = array(
+ 'gn' => 'givenname',
+ 'rfc822mailbox' => 'email',
+ 'userid' => 'uid',
+ 'emailaddress' => 'email',
+ 'pkcs9email' => 'email',
+ );
+
+ list($name, $limit) = explode(':', $namev, 2);
+ $suffix = $limit ? ':'.$limit : '';
+
+ return (isset($aliases[$name]) ? $aliases[$name] : $name) . $suffix;
+ }
+
+ /**
+ * Quotes attribute value string
+ *
+ * @param string $str Attribute value
+ * @param bool $dn True if the attribute is a DN
+ *
+ * @return string Quoted string
+ */
+ public static function quote_string($str, $dn=false)
+ {
+ // take firt entry if array given
+ if (is_array($str))
+ $str = reset($str);
+
+ if ($dn)
+ $replace = array(','=>'\2c', '='=>'\3d', '+'=>'\2b', '<'=>'\3c',
+ '>'=>'\3e', ';'=>'\3b', '\\'=>'\5c', '"'=>'\22', '#'=>'\23');
+ else
+ $replace = array('*'=>'\2a', '('=>'\28', ')'=>'\29', '\\'=>'\5c',
+ '/'=>'\2f');
+
+ return strtr($str, $replace);
+ }
+
+ /**
+ * Prints debug info to the log
+ */
+ private function _debug($str)
+ {
+ if ($this->debug && class_exists('rcube')) {
+ rcube::write_log('ldap', $str);
+ }
+ }
+
+
+ /***************** Virtual List View (VLV) related utility functions **************** */
+
+ /**
+ * Return the search string value to be used in VLV controls
+ */
+ private function _vlv_search($sort, $search)
+ {
+ foreach ($search as $attr => $value) {
+ if (!in_array(strtolower($attr), $sort)) {
+ $this->_debug("d: Cannot use VLV search using attribute not indexed: $attr (not in " . var_export($sort, true) . ")");
+ return null;
+ } else {
+ return $value;
+ }
+ }
+ }
+
+ /**
+ * Find a VLV index matching the given query attributes
+ *
+ * @return string Sort attribute or False if no match
+ */
+ private function _find_vlv($base_dn, $filter, $scope, $sort_attrs = null)
+ {
+ if (!$this->config['vlv'] || $scope == 'base') {
+ return false;
+ }
+
+ // get vlv config
+ $vlv_config = $this->_read_vlv_config();
+
+ if ($vlv = $vlv_config[$base_dn]) {
+ $this->_debug("D: Found a VLV for $base_dn");
+
+ if ($vlv['filter'] == strtolower($filter) || stripos($filter, '(&'.$vlv['filter'].'(') === 0) {
+ $this->_debug("D: Filter matches");
+ if ($vlv['scope'] == $scope) {
+ // Not passing any sort attributes means you don't care
+ if (empty($sort_attrs) || in_array($sort_attrs, $vlv['sort'])) {
+ return $vlv['sort'][0];
+ }
+ }
+ else {
+ $this->_debug("D: Scope does not match");
+ }
+ }
+ else {
+ $this->_debug("D: Filter does not match");
+ }
+ }
+ else {
+ $this->_debug("D: No VLV for $base_dn");
+ }
+
+ return false;
+ }
+
+ /**
+ * Return VLV indexes and searches including necessary configuration
+ * details.
+ */
+ private function _read_vlv_config()
+ {
+ if (empty($this->config['vlv']) || empty($this->config['config_root_dn'])) {
+ return array();
+ }
+ // return hard-coded VLV config
+ else if (is_array($this->config['vlv'])) {
+ return $this->config['vlv'];
+ }
+
+ // return cached result
+ if (is_array($this->vlv_config)) {
+ return $this->vlv_config;
+ }
+
+ if ($this->cache && ($cached_config = $this->cache->get('vlvconfig'))) {
+ $this->vlv_config = $cached_config;
+ return $this->vlv_config;
+ }
+
+ $this->vlv_config = array();
+
+ $ldap_result = ldap_search($this->conn, $this->config['config_root_dn'], '(objectclass=vlvsearch)', array('*'), 0, 0, 0);
+ $vlv_searches = new rcube_ldap_result($this->conn, $ldap_result, $this->config['config_root_dn'], '(objectclass=vlvsearch)');
+
+ if ($vlv_searches->count() < 1) {
+ $this->_debug("D: Empty result from search for '(objectclass=vlvsearch)' on '$config_root_dn'");
+ return array();
+ }
+
+ foreach ($vlv_searches->entries(true) as $vlv_search_dn => $vlv_search_attrs) {
+ // Multiple indexes may exist
+ $ldap_result = ldap_search($this->conn, $vlv_search_dn, '(objectclass=vlvindex)', array('*'), 0, 0, 0);
+ $vlv_indexes = new rcube_ldap_result($this->conn, $ldap_result, $vlv_search_dn, '(objectclass=vlvindex)');
+
+ // Reset this one for each VLV search.
+ $_vlv_sort = array();
+ foreach ($vlv_indexes->entries(true) as $vlv_index_dn => $vlv_index_attrs) {
+ $_vlv_sort[] = explode(' ', $vlv_index_attrs['vlvsort']);
+ }
+
+ $this->vlv_config[$vlv_search_attrs['vlvbase']] = array(
+ 'scope' => self::scopeint2str($vlv_search_attrs['vlvscope']),
+ 'filter' => strtolower($vlv_search_attrs['vlvfilter']),
+ 'sort' => $_vlv_sort,
+ );
+ }
+
+ // cache this
+ if ($this->cache)
+ $this->cache->set('vlvconfig', $this->vlv_config);
+
+ $this->_debug("D: Refreshed VLV config: " . var_export($this->vlv_config, true));
+
+ return $this->vlv_config;
+ }
+
+ /**
+ * Generate BER encoded string for Virtual List View option
+ *
+ * @param integer List offset (first record)
+ * @param integer Records per page
+ *
+ * @return string BER encoded option value
+ */
+ private static function _vlv_ber_encode($offset, $rpp, $search = '')
+ {
+ /*
+ this string is ber-encoded, php will prefix this value with:
+ 04 (octet string) and 10 (length of 16 bytes)
+ the code behind this string is broken down as follows:
+ 30 = ber sequence with a length of 0e (14) bytes following
+ 02 = type integer (in two's complement form) with 2 bytes following (beforeCount): 01 00 (ie 0)
+ 02 = type integer (in two's complement form) with 2 bytes following (afterCount): 01 18 (ie 25-1=24)
+ a0 = type context-specific/constructed with a length of 06 (6) bytes following
+ 02 = type integer with 2 bytes following (offset): 01 01 (ie 1)
+ 02 = type integer with 2 bytes following (contentCount): 01 00
+
+ with a search string present:
+ 81 = type context-specific/constructed with a length of 04 (4) bytes following (the length will change here)
+ 81 indicates a user string is present where as a a0 indicates just a offset search
+ 81 = type context-specific/constructed with a length of 06 (6) bytes following
+
+ The following info was taken from the ISO/IEC 8825-1:2003 x.690 standard re: the
+ encoding of integer values (note: these values are in
+ two-complement form so since offset will never be negative bit 8 of the
+ leftmost octet should never by set to 1):
+ 8.3.2: If the contents octets of an integer value encoding consist
+ of more than one octet, then the bits of the first octet (rightmost)
+ and bit 8 of the second (to the left of first octet) octet:
+ a) shall not all be ones; and
+ b) shall not all be zero
+ */
+
+ if ($search) {
+ $search = preg_replace('/[^-[:alpha:] ,.()0-9]+/', '', $search);
+ $ber_val = self::_string2hex($search);
+ $str = self::_ber_addseq($ber_val, '81');
+ }
+ else {
+ // construct the string from right to left
+ $str = "020100"; # contentCount
+
+ $ber_val = self::_ber_encode_int($offset); // returns encoded integer value in hex format
+
+ // calculate octet length of $ber_val
+ $str = self::_ber_addseq($ber_val, '02') . $str;
+
+ // now compute length over $str
+ $str = self::_ber_addseq($str, 'a0');
+ }
+
+ // now tack on records per page
+ $str = "020100" . self::_ber_addseq(self::_ber_encode_int($rpp-1), '02') . $str;
+
+ // now tack on sequence identifier and length
+ $str = self::_ber_addseq($str, '30');
+
+ return pack('H'.strlen($str), $str);
+ }
+
+ /**
+ * create ber encoding for sort control
+ *
+ * @param array List of cols to sort by
+ * @return string BER encoded option value
+ */
+ private static function _sort_ber_encode($sortcols)
+ {
+ $str = '';
+ foreach (array_reverse((array)$sortcols) as $col) {
+ $ber_val = self::_string2hex($col);
+
+ // 30 = ber sequence with a length of octet value
+ // 04 = octet string with a length of the ascii value
+ $oct = self::_ber_addseq($ber_val, '04');
+ $str = self::_ber_addseq($oct, '30') . $str;
+ }
+
+ // now tack on sequence identifier and length
+ $str = self::_ber_addseq($str, '30');
+
+ return pack('H'.strlen($str), $str);
+ }
+
+ /**
+ * Add BER sequence with correct length and the given identifier
+ */
+ private static function _ber_addseq($str, $identifier)
+ {
+ $len = dechex(strlen($str)/2);
+ if (strlen($len) % 2 != 0)
+ $len = '0'.$len;
+
+ return $identifier . $len . $str;
+ }
+
+ /**
+ * Returns BER encoded integer value in hex format
+ */
+ private static function _ber_encode_int($offset)
+ {
+ $val = dechex($offset);
+ $prefix = '';
+
+ // check if bit 8 of high byte is 1
+ if (preg_match('/^[89abcdef]/', $val))
+ $prefix = '00';
+
+ if (strlen($val)%2 != 0)
+ $prefix .= '0';
+
+ return $prefix . $val;
+ }
+
+ /**
+ * Returns ascii string encoded in hex
+ */
+ private static function _string2hex($str)
+ {
+ $hex = '';
+ for ($i=0; $i < strlen($str); $i++) {
+ $hex .= dechex(ord($str[$i]));
+ }
+ return $hex;
+ }
+
+}
diff --git a/program/lib/Roundcube/rcube_ldap_result.php b/program/lib/Roundcube/rcube_ldap_result.php
new file mode 100644
index 000000000..efc3331bc
--- /dev/null
+++ b/program/lib/Roundcube/rcube_ldap_result.php
@@ -0,0 +1,130 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | Roundcube/rcube_ldap_result.php |
+ | |
+ | This file is part of the Roundcube Webmail client |
+ | Copyright (C) 2006-2013, The Roundcube Dev Team |
+ | Copyright (C) 2013, Kolab Systems AG |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ | PURPOSE: |
+ | Model class that represents an LDAP search result |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Thomas Bruederli <roundcube@gmail.com> |
+ +-----------------------------------------------------------------------+
+*/
+
+
+/**
+ * Model class representing an LDAP search result
+ *
+ * @package Framework
+ * @subpackage LDAP
+ */
+class rcube_ldap_result implements Iterator
+{
+ public $conn;
+ public $ldap;
+ public $base_dn;
+ public $filter;
+
+ private $count = null;
+ private $current = null;
+ private $iteratorkey = 0;
+
+ /**
+ * Default constructor
+ *
+ * @param resource $conn LDAP link identifier
+ * @param resource $ldap LDAP result entry identifier
+ * @param string $base_dn Base DN used to get this result
+ * @param string $filter Filter query used to get this result
+ * @param integer $count Record count value (pre-calculated)
+ */
+ function __construct($conn, $ldap, $base_dn, $filter, $count = null)
+ {
+ $this->conn = $conn;
+ $this->ldap = $ldap;
+ $this->base_dn = $base_dn;
+ $this->filter = $filter;
+ $this->count = $count;
+ }
+
+ /**
+ * Wrapper for ldap_sort()
+ */
+ public function sort($attr)
+ {
+ return ldap_sort($this->conn, $this->ldap, $attr);
+ }
+
+ /**
+ * Get entries count
+ */
+ public function count()
+ {
+ if (!isset($this->count))
+ $this->count = ldap_count_entries($this->conn, $this->ldap);
+
+ return $this->count;
+ }
+
+ /**
+ * Wrapper for ldap_get_entries()
+ *
+ * @param boolean $normalize Optionally normalize the entries to a list of hash arrays
+ * @return array List of LDAP entries
+ */
+ public function entries($normalize = false)
+ {
+ $entries = ldap_get_entries($this->conn, $this->ldap);
+ return $normalize ? rcube_ldap_generic::normalize_result($entries) : $entries;
+ }
+
+ /**
+ * Wrapper for ldap_get_dn() using the current entry pointer
+ */
+ public function get_dn()
+ {
+ return $this->current ? ldap_get_dn($this->conn, $this->current) : null;
+ }
+
+
+ /*** Implements the PHP 5 Iterator interface to make foreach work ***/
+
+ function current()
+ {
+ $attrib = ldap_get_attributes($this->conn, $this->current);
+ $attrib['dn'] = ldap_get_dn($this->conn, $this->current);
+ return $attrib;
+ }
+
+ function key()
+ {
+ return $this->iteratorkey;
+ }
+
+ function rewind()
+ {
+ $this->iteratorkey = 0;
+ $this->current = ldap_first_entry($this->conn, $this->ldap);
+ }
+
+ function next()
+ {
+ $this->iteratorkey++;
+ $this->current = ldap_next_entry($this->conn, $this->current);
+ }
+
+ function valid()
+ {
+ return (bool)$this->current;
+ }
+
+}
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 42d7b9bbe..797ca185e 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -85,12 +85,13 @@ class rcube_message
$this->headers = $this->storage->get_message($uid);
- if (!$this->headers)
+ if (!$this->headers) {
return;
+ }
$this->mime = new rcube_mime($this->headers->charset);
- $this->subject = $this->mime->decode_mime_string($this->headers->subject);
+ $this->subject = $this->headers->get('subject');
list(, $this->sender) = each($this->mime->decode_address_list($this->headers->from, 1));
$this->set_safe((intval($_GET['_safe']) || $_SESSION['safe_messages'][$this->folder.':'.$uid]));
@@ -125,15 +126,11 @@ class rcube_message
*/
public function get_header($name, $raw = false)
{
- if (empty($this->headers))
+ if (empty($this->headers)) {
return null;
+ }
- if ($this->headers->$name)
- $value = $this->headers->$name;
- else if ($this->headers->others[$name])
- $value = $this->headers->others[$name];
-
- return $raw ? $value : $this->mime->decode_header($value);
+ return $this->headers->get($name, !$raw);
}
@@ -152,12 +149,13 @@ class rcube_message
* Compose a valid URL for getting a message part
*
* @param string $mime_id Part MIME-ID
+ * @param mixed $embed Mimetype class for parts to be embedded
* @return string URL or false if part does not exist
*/
public function get_part_url($mime_id, $embed = false)
{
if ($this->mime_parts[$mime_id])
- return $this->opt['get_url'] . '&_part=' . $mime_id . ($embed ? '&_embed=1' : '');
+ return $this->opt['get_url'] . '&_part=' . $mime_id . ($embed ? '&_embed=1&_mimeclass=' . $embed : '');
else
return false;
}
@@ -364,7 +362,7 @@ class rcube_message
// parse headers from message/rfc822 part
if (!isset($structure->headers['subject']) && !isset($structure->headers['from'])) {
- list($headers, $dump) = explode("\r\n\r\n", $this->get_part_content($structure->mime_id, null, true, 8192));
+ list($headers, ) = explode("\r\n\r\n", $this->get_part_content($structure->mime_id, null, true, 32768));
$structure->headers = rcube_mime::parse_headers($headers);
}
}
@@ -372,7 +370,8 @@ class rcube_message
$mimetype = $structure->mimetype;
// show message headers
- if ($recursive && is_array($structure->headers) && (isset($structure->headers['subject']) || isset($structure->headers['from']))) {
+ if ($recursive && is_array($structure->headers) &&
+ (isset($structure->headers['subject']) || $structure->headers['from'] || $structure->headers['to'])) {
$c = new stdClass;
$c->type = 'headers';
$c->headers = $structure->headers;
@@ -486,14 +485,6 @@ class rcube_message
$this->parts[] = $c;
}
- // add html part as attachment
- if ($html_part !== null && $structure->parts[$html_part] !== $print_part) {
- $html_part = $structure->parts[$html_part];
- $html_part->mimetype = 'text/html';
-
- $this->attachments[] = $html_part;
- }
-
// add unsupported/unrecognized parts to attachments list
if ($attach_part) {
$this->attachments[] = $structure->parts[$attach_part];
@@ -578,10 +569,6 @@ class rcube_message
if (!empty($mail_part->filename)) {
$this->attachments[] = $mail_part;
}
- // list html part as attachment (here the part is most likely inside a multipart/related part)
- else if ($this->parse_alternative && ($secondary_type == 'html' && !$this->opt['prefer_html'])) {
- $this->attachments[] = $mail_part;
- }
}
// part message/*
else if ($primary_type == 'message') {
@@ -657,7 +644,7 @@ class rcube_message
$img_regexp = '/^image\/(gif|jpe?g|png|tiff|bmp|svg)/';
foreach ($this->inline_parts as $inline_object) {
- $part_url = $this->get_part_url($inline_object->mime_id, true);
+ $part_url = $this->get_part_url($inline_object->mime_id, $inline_object->ctype_primary);
if (isset($inline_object->content_id))
$a_replaces['cid:'.$inline_object->content_id] = $part_url;
if ($inline_object->content_location) {
@@ -798,7 +785,7 @@ class rcube_message
$uupart->size = strlen($uupart->body);
$uupart->mime_id = 'uu.' . $part->mime_id . '.' . $pid;
- $ctype = rcube_mime::content_type($uupart->body, $uupart->filename, 'application/octet-stream', true);
+ $ctype = rcube_mime::file_content_type($uupart->body, $uupart->filename, 'application/octet-stream', true);
$uupart->mimetype = $ctype;
list($uupart->ctype_primary, $uupart->ctype_secondary) = explode('/', $ctype);
diff --git a/program/lib/Roundcube/rcube_message_header.php b/program/lib/Roundcube/rcube_message_header.php
index 274ae7f9f..2c5e2b6c8 100644
--- a/program/lib/Roundcube/rcube_message_header.php
+++ b/program/lib/Roundcube/rcube_message_header.php
@@ -215,7 +215,12 @@ class rcube_message_header
$value = $this->others[$name];
}
- return $decode ? rcube_mime::decode_header($value, $this->charset) : $value;
+ if ($decode) {
+ $value = rcube_mime::decode_header($value, $this->charset);
+ $value = rcube_charset::clean($value);
+ }
+
+ return $value;
}
/**
diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index b70d681c9..572540f47 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -127,10 +127,11 @@ class rcube_mime
* @param int $max List only this number of addresses
* @param boolean $decode Decode address strings
* @param string $fallback Fallback charset if none specified
+ * @param boolean $addronly Return flat array with e-mail addresses only
*
- * @return array Indexed list of addresses
+ * @return array Indexed list of addresses
*/
- static function decode_address_list($input, $max = null, $decode = true, $fallback = null)
+ static function decode_address_list($input, $max = null, $decode = true, $fallback = null, $addronly = false)
{
$a = self::parse_address_list($input, $decode, $fallback);
$out = array();
@@ -145,20 +146,21 @@ class rcube_mime
foreach ($a as $val) {
$j++;
$address = trim($val['address']);
- $name = trim($val['name']);
- if ($name && $address && $name != $address)
- $string = sprintf('%s <%s>', preg_match("/$special_chars/", $name) ? '"'.addcslashes($name, '"').'"' : $name, $address);
- else if ($address)
- $string = $address;
- else if ($name)
- $string = $name;
-
- $out[$j] = array(
- 'name' => $name,
- 'mailto' => $address,
- 'string' => $string
- );
+ if ($addronly) {
+ $out[$j] = $address;
+ }
+ else {
+ $name = trim($val['name']);
+ if ($name && $address && $name != $address)
+ $string = sprintf('%s <%s>', preg_match("/$special_chars/", $name) ? '"'.addcslashes($name, '"').'"' : $name, $address);
+ else if ($address)
+ $string = $address;
+ else if ($name)
+ $string = $name;
+
+ $out[$j] = array('name' => $name, 'mailto' => $address, 'string' => $string);
+ }
if ($max && $j==$max)
break;
@@ -359,6 +361,11 @@ class rcube_mime
$address = $m[1];
$name = '';
}
+ // special case (#1489092)
+ else if (preg_match('/(\s*<MAILER-DAEMON>)$/', $val, $m)) {
+ $address = 'MAILER-DAEMON';
+ $name = substr($val, 0, -strlen($m[1]));
+ }
else {
$name = $val;
}
@@ -476,9 +483,10 @@ class rcube_mime
$q_level = 0;
foreach ($text as $idx => $line) {
- if ($line[0] == '>') {
- // remove quote chars, store level in $q
- $line = preg_replace('/^>+/', '', $line, -1, $q);
+ if (preg_match('/^(>+)/', $line, $m)) {
+ // remove quote chars
+ $q = strlen($m[1]);
+ $line = preg_replace('/^>+/', '', $line);
// remove (optional) space-staffing
$line = preg_replace('/^ /', '', $line);
@@ -541,9 +549,10 @@ class rcube_mime
foreach ($text as $idx => $line) {
if ($line != '-- ') {
- if ($line[0] == '>') {
- // remove quote chars, store level in $level
- $line = preg_replace('/^>+/', '', $line, -1, $level);
+ if (preg_match('/^(>+)/', $line, $m)) {
+ // remove quote chars
+ $level = strlen($m[1]);
+ $line = preg_replace('/^>+/', '', $line);
// remove (optional) space-staffing and spaces before the line end
$line = preg_replace('/(^ | +$)/', '', $line);
$prefix = str_repeat('>', $level) . ' ';
@@ -564,82 +573,122 @@ class rcube_mime
/**
- * Improved wordwrap function.
+ * Improved wordwrap function with multibyte support.
+ * The code is based on Zend_Text_MultiByte::wordWrap().
*
- * @param string $string Text to wrap
- * @param int $width Line width
- * @param string $break Line separator
- * @param bool $cut Enable to cut word
- * @param string $charset Charset of $string
+ * @param string $string Text to wrap
+ * @param int $width Line width
+ * @param string $break Line separator
+ * @param bool $cut Enable to cut word
+ * @param string $charset Charset of $string
+ * @param bool $wrap_quoted When enabled quoted lines will not be wrapped
*
* @return string Text
*/
- public static function wordwrap($string, $width=75, $break="\n", $cut=false, $charset=null)
+ public static function wordwrap($string, $width=75, $break="\n", $cut=false, $charset=null, $wrap_quoted=true)
{
- if ($charset && function_exists('mb_internal_encoding')) {
+ // Note: Never try to use iconv instead of mbstring functions here
+ // Iconv's substr/strlen are 100x slower (#1489113)
+
+ if ($charset && $charset != RCUBE_CHARSET && function_exists('mb_internal_encoding')) {
mb_internal_encoding($charset);
}
- $para = preg_split('/\r?\n/', $string);
- $string = '';
+ // Convert \r\n to \n, this is our line-separator
+ $string = str_replace("\r\n", "\n", $string);
+ $separator = "\n"; // must be 1 character length
+ $result = array();
- while (count($para)) {
- $line = array_shift($para);
- if ($line[0] == '>') {
- $string .= $line . (count($para) ? $break : '');
- continue;
- }
+ while (($stringLength = mb_strlen($string)) > 0) {
+ $breakPos = mb_strpos($string, $separator, 0);
- $list = explode(' ', $line);
- $len = 0;
- while (count($list)) {
- $line = array_shift($list);
- $l = mb_strlen($line);
- $space = $len ? 1 : 0;
- $newlen = $len + $l + $space;
+ // quoted line (do not wrap)
+ if ($wrap_quoted && $string[0] == '>') {
+ if ($breakPos === $stringLength - 1 || $breakPos === false) {
+ $subString = $string;
+ $cutLength = null;
+ }
+ else {
+ $subString = mb_substr($string, 0, $breakPos);
+ $cutLength = $breakPos + 1;
+ }
+ }
+ // next line found and current line is shorter than the limit
+ else if ($breakPos !== false && $breakPos < $width) {
+ if ($breakPos === $stringLength - 1) {
+ $subString = $string;
+ $cutLength = null;
+ }
+ else {
+ $subString = mb_substr($string, 0, $breakPos);
+ $cutLength = $breakPos + 1;
+ }
+ }
+ else {
+ $subString = mb_substr($string, 0, $width);
- if ($newlen <= $width) {
- $string .= ($space ? ' ' : '').$line;
- $len += ($space + $l);
+ // last line
+ if ($breakPos === false && $subString === $string) {
+ $cutLength = null;
}
else {
- if ($l > $width) {
- if ($cut) {
- $start = 0;
- while ($l) {
- $str = mb_substr($line, $start, $width);
- $strlen = mb_strlen($str);
- $string .= ($len ? $break : '').$str;
- $start += $strlen;
- $l -= $strlen;
- $len = $strlen;
+ $nextChar = mb_substr($string, $width, 1);
+
+ if ($nextChar === ' ' || $nextChar === $separator) {
+ $afterNextChar = mb_substr($string, $width + 1, 1);
+
+ if ($afterNextChar === false) {
+ $subString .= $nextChar;
+ }
+
+ $cutLength = mb_strlen($subString) + 1;
+ }
+ else {
+ $spacePos = mb_strrpos($subString, ' ', 0);
+
+ if ($spacePos !== false) {
+ $subString = mb_substr($subString, 0, $spacePos);
+ $cutLength = $spacePos + 1;
+ }
+ else if ($cut === false && $breakPos === false) {
+ $subString = $string;
+ $cutLength = null;
+ }
+ else if ($cut === false) {
+ $spacePos = mb_strpos($string, ' ', 0);
+
+ if ($spacePos !== false && $spacePos < $breakPos) {
+ $subString = mb_substr($string, 0, $spacePos);
+ $cutLength = $spacePos + 1;
+ }
+ else {
+ $subString = mb_substr($string, 0, $breakPos);
+ $cutLength = $breakPos + 1;
}
}
else {
- $string .= ($len ? $break : '').$line;
- if (count($list)) {
- $string .= $break;
- }
- $len = 0;
+ $subString = mb_substr($subString, 0, $width);
+ $cutLength = $width;
}
}
- else {
- $string .= $break.$line;
- $len = $l;
- }
}
}
- if (count($para)) {
- $string .= $break;
+ $result[] = $subString;
+
+ if ($cutLength !== null) {
+ $string = mb_substr($string, $cutLength, ($stringLength - $cutLength));
+ }
+ else {
+ break;
}
}
- if ($charset && function_exists('mb_internal_encoding')) {
+ if ($charset && $charset != RCUBE_CHARSET && function_exists('mb_internal_encoding')) {
mb_internal_encoding(RCUBE_CHARSET);
}
- return $string;
+ return implode($break, $result);
}
@@ -746,7 +795,7 @@ class rcube_mime
}
foreach ($file_paths as $fp) {
- if (is_readable($fp)) {
+ if (@is_readable($fp)) {
$lines = file($fp, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
break;
}
@@ -769,11 +818,35 @@ class rcube_mime
// fallback to some well-known types most important for daily emails
if (empty($mime_types)) {
- $mime_extensions = @include(RCUBE_CONFIG_DIR . '/mimetypes.php');
- $mime_extensions += array('gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'tif' => 'image/tiff');
+ $mime_extensions = (array) @include(RCUBE_CONFIG_DIR . '/mimetypes.php');
- foreach ($mime_extensions as $ext => $mime)
+ foreach ($mime_extensions as $ext => $mime) {
$mime_types[$mime][] = $ext;
+ }
+ }
+
+ // Add some known aliases that aren't included by some mime.types (#1488891)
+ // the order is important here so standard extensions have higher prio
+ $aliases = array(
+ 'image/gif' => array('gif'),
+ 'image/png' => array('png'),
+ 'image/x-png' => array('png'),
+ 'image/jpeg' => array('jpg', 'jpeg', 'jpe'),
+ 'image/jpg' => array('jpg', 'jpeg', 'jpe'),
+ 'image/pjpeg' => array('jpg', 'jpeg', 'jpe'),
+ 'image/tiff' => array('tif'),
+ 'message/rfc822' => array('eml'),
+ 'text/x-mail' => array('eml'),
+ );
+
+ foreach ($aliases as $mime => $exts) {
+ $mime_types[$mime] = array_unique(array_merge((array) $mime_types[$mime], $exts));
+
+ foreach ($exts as $ext) {
+ if (!isset($mime_extensions[$ext])) {
+ $mime_extensions[$ext] = $mime;
+ }
+ }
}
return $mimetype ? $mime_types[$mimetype] : $mime_extensions;
diff --git a/program/lib/Roundcube/rcube_output.php b/program/lib/Roundcube/rcube_output.php
index b8ae86cf6..7ccf9a02e 100644
--- a/program/lib/Roundcube/rcube_output.php
+++ b/program/lib/Roundcube/rcube_output.php
@@ -162,7 +162,7 @@ abstract class rcube_output
header("Cache-Control: private, must-revalidate");
}
else {
- header("Cache-Control: private, no-cache, must-revalidate, post-check=0, pre-check=0");
+ header("Cache-Control: private, no-cache, no-store, must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");
}
}
diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php
index 9ea0f73d3..3153a8410 100644
--- a/program/lib/Roundcube/rcube_plugin.php
+++ b/program/lib/Roundcube/rcube_plugin.php
@@ -60,6 +60,14 @@ abstract class rcube_plugin
*/
public $noframe = false;
+ /**
+ * A list of config option names that can be modified
+ * by the user via user interface (with save-prefs command)
+ *
+ * @var array
+ */
+ public $allowed_prefs;
+
protected $home;
protected $urlbase;
private $mytask;
@@ -84,6 +92,16 @@ abstract class rcube_plugin
abstract function init();
/**
+ * Provide information about this
+ *
+ * @return array Meta information about a plugin or false if not implemented
+ */
+ public static function info()
+ {
+ return false;
+ }
+
+ /**
* Attempt to load the given plugin which is required for the current plugin
*
* @param string Plugin name
@@ -209,7 +227,7 @@ abstract class rcube_plugin
$rcube->load_language($lang, $add);
// add labels to client
- if ($add2client) {
+ if ($add2client && method_exists($rcube->output, 'add_label')) {
if (is_array($add2client)) {
$js_labels = array_map(array($this, 'label_map_callback'), $add2client);
}
@@ -222,6 +240,24 @@ abstract class rcube_plugin
}
/**
+ * Wrapper for add_label() adding the plugin ID as domain
+ */
+ public function add_label()
+ {
+ $rcube = rcube::get_instance();
+
+ if (method_exists($rcube->output, 'add_label')) {
+ $args = func_get_args();
+ if (count($args) == 1 && is_array($args[0])) {
+ $args = $args[0];
+ }
+
+ $args = array_map(array($this, 'label_map_callback'), $args);
+ $rcube->output->add_label($args);
+ }
+ }
+
+ /**
* Wrapper for rcube::gettext() adding the plugin ID as domain
*
* @param string $p Message identifier
@@ -372,6 +408,10 @@ abstract class rcube_plugin
*/
private function label_map_callback($key)
{
+ if (strpos($key, $this->ID.'.') === 0) {
+ return $key;
+ }
+
return $this->ID.'.'.$key;
}
}
diff --git a/program/lib/Roundcube/rcube_plugin_api.php b/program/lib/Roundcube/rcube_plugin_api.php
index 111c177d9..33f04eaa5 100644
--- a/program/lib/Roundcube/rcube_plugin_api.php
+++ b/program/lib/Roundcube/rcube_plugin_api.php
@@ -36,6 +36,7 @@ class rcube_plugin_api
public $task = '';
public $output;
public $handlers = array();
+ public $allowed_prefs = array();
protected $plugins = array();
protected $tasks = array();
@@ -202,6 +203,11 @@ class rcube_plugin_api
$plugin->init();
$this->plugins[$plugin_name] = $plugin;
}
+
+ if (!empty($plugin->allowed_prefs)) {
+ $this->allowed_prefs = array_merge($this->allowed_prefs, $plugin->allowed_prefs);
+ }
+
return true;
}
}
@@ -222,6 +228,119 @@ class rcube_plugin_api
}
/**
+ * Get information about a specific plugin.
+ * This is either provided my a plugin's info() method or extracted from a package.xml or a composer.json file
+ *
+ * @param string Plugin name
+ * @return array Meta information about a plugin or False if plugin was not found
+ */
+ public function get_info($plugin_name)
+ {
+ static $composer_lock, $license_uris = array(
+ 'Apache' => 'http://www.apache.org/licenses/LICENSE-2.0.html',
+ 'Apache-2' => 'http://www.apache.org/licenses/LICENSE-2.0.html',
+ 'Apache-1' => 'http://www.apache.org/licenses/LICENSE-1.0',
+ 'Apache-1.1' => 'http://www.apache.org/licenses/LICENSE-1.1',
+ 'GPL' => 'http://www.gnu.org/licenses/gpl.html',
+ 'GPLv2' => 'http://www.gnu.org/licenses/gpl-2.0.html',
+ 'GPL-2.0' => 'http://www.gnu.org/licenses/gpl-2.0.html',
+ 'GPLv3' => 'http://www.gnu.org/licenses/gpl-3.0.html',
+ 'GPL-3.0' => 'http://www.gnu.org/licenses/gpl-3.0.html',
+ 'GPL-3.0+' => 'http://www.gnu.org/licenses/gpl.html',
+ 'GPL-2.0+' => 'http://www.gnu.org/licenses/gpl.html',
+ 'LGPL' => 'http://www.gnu.org/licenses/lgpl.html',
+ 'LGPLv2' => 'http://www.gnu.org/licenses/lgpl-2.0.html',
+ 'LGPLv2.1' => 'http://www.gnu.org/licenses/lgpl-2.1.html',
+ 'LGPLv3' => 'http://www.gnu.org/licenses/lgpl.html',
+ 'LGPL-2.0' => 'http://www.gnu.org/licenses/lgpl-2.0.html',
+ 'LGPL-2.1' => 'http://www.gnu.org/licenses/lgpl-2.1.html',
+ 'LGPL-3.0' => 'http://www.gnu.org/licenses/lgpl.html',
+ 'LGPL-3.0+' => 'http://www.gnu.org/licenses/lgpl.html',
+ 'BSD' => 'http://opensource.org/licenses/bsd-license.html',
+ 'BSD-2-Clause' => 'http://opensource.org/licenses/BSD-2-Clause',
+ 'BSD-3-Clause' => 'http://opensource.org/licenses/BSD-3-Clause',
+ 'FreeBSD' => 'http://opensource.org/licenses/BSD-2-Clause',
+ 'MIT' => 'http://www.opensource.org/licenses/mit-license.php',
+ 'PHP' => 'http://opensource.org/licenses/PHP-3.0',
+ 'PHP-3' => 'http://www.php.net/license/3_01.txt',
+ 'PHP-3.0' => 'http://www.php.net/license/3_0.txt',
+ 'PHP-3.01' => 'http://www.php.net/license/3_01.txt',
+ );
+
+ $dir = dir($this->dir);
+ $fn = unslashify($dir->path) . DIRECTORY_SEPARATOR . $plugin_name . DIRECTORY_SEPARATOR . $plugin_name . '.php';
+ $info = false;
+
+ if (!class_exists($plugin_name))
+ include($fn);
+
+ if (class_exists($plugin_name))
+ $info = $plugin_name::info();
+
+ // fall back to composer.json file
+ if (!$info) {
+ $composer = INSTALL_PATH . "/plugins/$plugin_name/composer.json";
+ if (file_exists($composer) && ($json = @json_decode(file_get_contents($composer), true))) {
+ list($info['vendor'], $info['name']) = explode('/', $json['name']);
+ $info['license'] = $json['license'];
+ if ($license_uri = $license_uris[$info['license']])
+ $info['license_uri'] = $license_uri;
+ }
+
+ // read local composer.lock file (once)
+ if (!isset($composer_lock)) {
+ $composer_lock = @json_decode(@file_get_contents(INSTALL_PATH . "/composer.lock"), true);
+ if ($composer_lock['packages']) {
+ foreach ($composer_lock['packages'] as $i => $package) {
+ $composer_lock['installed'][$package['name']] = $package;
+ }
+ }
+ }
+
+ // load additional information from local composer.lock file
+ if ($lock = $composer_lock['installed'][$json['name']]) {
+ $info['version'] = $lock['version'];
+ $info['uri'] = $lock['homepage'] ? $lock['homepage'] : $lock['source']['uri'];
+ $info['src_uri'] = $lock['dist']['uri'] ? $lock['dist']['uri'] : $lock['source']['uri'];
+ }
+ }
+
+ // fall back to package.xml file
+ if (!$info) {
+ $package = INSTALL_PATH . "/plugins/$plugin_name/package.xml";
+ if (file_exists($package) && ($file = file_get_contents($package))) {
+ $doc = new DOMDocument();
+ $doc->loadXML($file);
+ $xpath = new DOMXPath($doc);
+ $xpath->registerNamespace('rc', "http://pear.php.net/dtd/package-2.0");
+
+ // XPaths of plugin metadata elements
+ $metadata = array(
+ 'name' => 'string(//rc:package/rc:name)',
+ 'version' => 'string(//rc:package/rc:version/rc:release)',
+ 'license' => 'string(//rc:package/rc:license)',
+ 'license_uri' => 'string(//rc:package/rc:license/@uri)',
+ 'src_uri' => 'string(//rc:package/rc:srcuri)',
+ 'uri' => 'string(//rc:package/rc:uri)',
+ );
+
+ foreach ($metadata as $key => $path) {
+ $info[$key] = $xpath->evaluate($path);
+ }
+
+ // dependent required plugins (can be used, but not included in config)
+ $deps = $xpath->evaluate('//rc:package/rc:dependencies/rc:required/rc:package/rc:name');
+ for ($i = 0; $i < $deps->length; $i++) {
+ $dn = $deps->item($i)->nodeValue;
+ $info['requires'][] = $dn;
+ }
+ }
+ }
+
+ return $info;
+ }
+
+ /**
* Allows a plugin object to register a callback for a certain hook
*
* @param string $hook Hook name
diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php
index 82ff8a804..646933b71 100644
--- a/program/lib/Roundcube/rcube_session.php
+++ b/program/lib/Roundcube/rcube_session.php
@@ -32,6 +32,7 @@ class rcube_session
private $ip;
private $start;
private $changed;
+ private $time_diff = 0;
private $reloaded = false;
private $unsets = array();
private $gc_handlers = array();
@@ -42,6 +43,7 @@ class rcube_session
private $secret = '';
private $ip_check = false;
private $logging = false;
+ private $storage;
private $memcache;
@@ -52,18 +54,21 @@ class rcube_session
{
$this->db = $db;
$this->start = microtime(true);
- $this->ip = $_SERVER['REMOTE_ADDR'];
+ $this->ip = rcube_utils::remote_addr();
$this->logging = $config->get('log_session', false);
$lifetime = $config->get('session_lifetime', 1) * 60;
$this->set_lifetime($lifetime);
// use memcache backend
- if ($config->get('session_storage', 'db') == 'memcache') {
+ $this->storage = $config->get('session_storage', 'db');
+ if ($this->storage == 'memcache') {
$this->memcache = rcube::get_instance()->get_memcache();
// set custom functions for PHP session management if memcache is available
if ($this->memcache) {
+ ini_set('session.serialize_handler', 'php');
+
session_set_save_handler(
array($this, 'open'),
array($this, 'close'),
@@ -79,7 +84,9 @@ class rcube_session
true, true);
}
}
- else {
+ else if ($this->storage != 'php') {
+ ini_set('session.serialize_handler', 'php');
+
// set custom functions for PHP session management
session_set_save_handler(
array($this, 'open'),
@@ -87,7 +94,23 @@ class rcube_session
array($this, 'db_read'),
array($this, 'db_write'),
array($this, 'db_destroy'),
- array($this, 'db_gc'));
+ array($this, 'gc'));
+ }
+ }
+
+
+ /**
+ * Wrapper for session_start()
+ */
+ public function start()
+ {
+ session_start();
+
+ // copy some session properties to object vars
+ if ($this->storage == 'php') {
+ $this->key = session_id();
+ $this->ip = $_SESSION['__IP'];
+ $this->changed = $_SESSION['__MTIME'];
}
}
@@ -116,6 +139,25 @@ class rcube_session
/**
+ * Wrapper for session_write_close()
+ */
+ public function write_close()
+ {
+ if ($this->storage == 'php') {
+ $_SESSION['__IP'] = $this->ip;
+ $_SESSION['__MTIME'] = time();
+ }
+
+ session_write_close();
+
+ // write_close() is called on script shutdown, see rcube::shutdown()
+ // execute cleanup functionality if enabled by session gc handler
+ // we do this after closing the session for better performance
+ $this->gc_shutdown();
+ }
+
+
+ /**
* Read session data from database
*
* @param string Session ID
@@ -125,14 +167,16 @@ class rcube_session
public function db_read($key)
{
$sql_result = $this->db->query(
- "SELECT vars, ip, changed FROM ".$this->db->table_name('session')
- ." WHERE sess_id = ?", $key);
+ "SELECT vars, ip, changed, " . $this->db->now() . " AS ts"
+ . " FROM " . $this->db->table_name('session')
+ . " WHERE sess_id = ?", $key);
if ($sql_result && ($sql_arr = $this->db->fetch_assoc($sql_result))) {
- $this->changed = strtotime($sql_arr['changed']);
- $this->ip = $sql_arr['ip'];
- $this->vars = base64_decode($sql_arr['vars']);
- $this->key = $key;
+ $this->time_diff = time() - strtotime($sql_arr['ts']);
+ $this->changed = strtotime($sql_arr['changed']);
+ $this->ip = $sql_arr['ip'];
+ $this->vars = base64_decode($sql_arr['vars']);
+ $this->key = $key;
return !empty($this->vars) ? (string) $this->vars : '';
}
@@ -152,8 +196,9 @@ class rcube_session
*/
public function db_write($key, $vars)
{
- $ts = microtime(true);
- $now = $this->db->fromunixtime((int)$ts);
+ $now = $this->db->now();
+ $table = $this->db->table_name('session');
+ $ts = microtime(true);
// no session row in DB (db_read() returns false)
if (!$this->key) {
@@ -171,22 +216,19 @@ class rcube_session
$newvars = $this->_fixvars($vars, $oldvars);
if ($newvars !== $oldvars) {
- $this->db->query(
- sprintf("UPDATE %s SET vars=?, changed=%s WHERE sess_id=?",
- $this->db->table_name('session'), $now),
- base64_encode($newvars), $key);
+ $this->db->query("UPDATE $table "
+ . "SET changed = $now, vars = ? WHERE sess_id = ?",
+ base64_encode($newvars), $key);
}
- else if ($ts - $this->changed > $this->lifetime / 2) {
- $this->db->query("UPDATE ".$this->db->table_name('session')
- ." SET changed=$now WHERE sess_id=?", $key);
+ else if ($ts - $this->changed + $this->time_diff > $this->lifetime / 2) {
+ $this->db->query("UPDATE $table SET changed = $now"
+ . " WHERE sess_id = ?", $key);
}
}
else {
- $this->db->query(
- sprintf("INSERT INTO %s (sess_id, vars, ip, created, changed) ".
- "VALUES (?, ?, ?, %s, %s)",
- $this->db->table_name('session'), $now, $now),
- $key, base64_encode($vars), (string)$this->ip);
+ $this->db->query("INSERT INTO $table (sess_id, vars, ip, created, changed)"
+ . " VALUES (?, ?, ?, $now, $now)",
+ $key, base64_encode($vars), (string)$this->ip);
}
return true;
@@ -203,10 +245,15 @@ class rcube_session
if (is_array($a_oldvars)) {
// remove unset keys on oldvars
foreach ((array)$this->unsets as $var) {
- $path = explode('.', $var);
- $k = array_pop($path);
- $node = &$this->get_node($path, $a_oldvars);
- unset($node[$k]);
+ if (isset($a_oldvars[$var])) {
+ unset($a_oldvars[$var]);
+ }
+ else {
+ $path = explode('.', $var);
+ $k = array_pop($path);
+ $node = &$this->get_node($path, $a_oldvars);
+ unset($node[$k]);
+ }
}
$newvars = $this->serialize(array_merge(
@@ -241,25 +288,6 @@ class rcube_session
/**
- * Garbage collecting function
- *
- * @param string Session lifetime in seconds
- * @return boolean True on success
- */
- public function db_gc($maxlifetime)
- {
- // just delete all expired sessions
- $this->db->query(
- sprintf("DELETE FROM %s WHERE changed < %s",
- $this->db->table_name('session'), $this->db->fromunixtime(time() - $maxlifetime)));
-
- $this->gc();
-
- return true;
- }
-
-
- /**
* Read session data from memcache
*
* @param string Session ID
@@ -335,11 +363,11 @@ class rcube_session
/**
* Execute registered garbage collector routines
*/
- public function gc()
+ public function gc($maxlifetime)
{
- foreach ($this->gc_handlers as $fct) {
- call_user_func($fct);
- }
+ // move gc execution to the script shutdown function
+ // see rcube::shutdown() and rcube_session::write_close()
+ return $this->gc_enabled = $maxlifetime;
}
@@ -361,6 +389,25 @@ class rcube_session
/**
+ * Garbage collector handler to run on script shutdown
+ */
+ protected function gc_shutdown()
+ {
+ if ($this->gc_enabled) {
+ // just delete all expired sessions
+ if ($this->storage == 'db') {
+ $this->db->query("DELETE FROM " . $this->db->table_name('session')
+ . " WHERE changed < " . $this->db->now(-$this->gc_enabled));
+ }
+
+ foreach ($this->gc_handlers as $fct) {
+ call_user_func($fct);
+ }
+ }
+ }
+
+
+ /**
* Generate and set new session id
*
* @param boolean $destroy If enabled the current session will be destroyed
@@ -402,7 +449,7 @@ class rcube_session
/**
* Unset a session variable
*
- * @param string Varibale name (can be a path denoting a certain node in the session array, e.g. compose.attachments.5)
+ * @param string Variable name (can be a path denoting a certain node in the session array, e.g. compose.attachments.5)
* @return boolean True on success
*/
public function remove($var=null)
@@ -413,10 +460,15 @@ class rcube_session
$this->unsets[] = $var;
- $path = explode('.', $var);
- $key = array_pop($path);
- $node = &$this->get_node($path, $_SESSION);
- unset($node[$key]);
+ if (isset($_SESSION[$var])) {
+ unset($_SESSION[$var]);
+ }
+ else {
+ $path = explode('.', $var);
+ $key = array_pop($path);
+ $node = &$this->get_node($path, $_SESSION);
+ unset($node[$key]);
+ }
return true;
}
@@ -428,7 +480,7 @@ class rcube_session
public function kill()
{
$this->vars = null;
- $this->ip = $_SERVER['REMOTE_ADDR']; // update IP (might have changed)
+ $this->ip = rcube_utils::remote_addr(); // update IP (might have changed)
$this->destroy(session_id());
rcube_utils::setcookie($this->cookiename, '-del-', time() - 60);
}
@@ -642,10 +694,10 @@ class rcube_session
function check_auth()
{
$this->cookie = $_COOKIE[$this->cookiename];
- $result = $this->ip_check ? $_SERVER['REMOTE_ADDR'] == $this->ip : true;
+ $result = $this->ip_check ? rcube_utils::remote_addr() == $this->ip : true;
if (!$result) {
- $this->log("IP check failed for " . $this->key . "; expected " . $this->ip . "; got " . $_SERVER['REMOTE_ADDR']);
+ $this->log("IP check failed for " . $this->key . "; expected " . $this->ip . "; got " . rcube_utils::remote_addr());
}
if ($result && $this->_mkcookie($this->now) != $this->cookie) {
diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php
index 5c7d2203c..60b1389ea 100644
--- a/program/lib/Roundcube/rcube_smtp.php
+++ b/program/lib/Roundcube/rcube_smtp.php
@@ -33,6 +33,8 @@ class rcube_smtp
// define headers delimiter
const SMTP_MIME_CRLF = "\r\n";
+ const DEBUG_LINE_LENGTH = 4098; // 4KB + 2B for \r\n
+
/**
* SMTP Connection and authentication
@@ -119,7 +121,7 @@ class rcube_smtp
}
// try to connect to server and exit on failure
- $result = $this->conn->connect($smtp_timeout);
+ $result = $this->conn->connect($CONFIG['smtp_timeout']);
if (PEAR::isError($result)) {
$this->response[] = "Connection failed: ".$result->getMessage();
@@ -327,6 +329,12 @@ class rcube_smtp
*/
public function debug_handler(&$smtp, $message)
{
+ if (($len = strlen($message)) > self::DEBUG_LINE_LENGTH) {
+ $diff = $len - self::DEBUG_LINE_LENGTH;
+ $message = substr($message, 0, self::DEBUG_LINE_LENGTH)
+ . "... [truncated $diff bytes]";
+ }
+
rcube::write_log('smtp', preg_replace('/\r\n$/', '', $message));
}
@@ -433,9 +441,9 @@ class rcube_smtp
$recipients = rcube_utils::explode_quoted_string(',', $recipients);
reset($recipients);
- while (list($k, $recipient) = each($recipients)) {
+ foreach ($recipients as $recipient) {
$a = rcube_utils::explode_quoted_string(' ', $recipient);
- while (list($k2, $word) = each($a)) {
+ foreach ($a as $word) {
if (strpos($word, "@") > 0 && $word[strlen($word)-1] != '"') {
$word = preg_replace('/^<|>$/', '', trim($word));
if (in_array($word, $addresses) === false) {
diff --git a/program/lib/Roundcube/rcube_spellchecker.php b/program/lib/Roundcube/rcube_spellchecker.php
index 816bcad2f..df4365223 100644
--- a/program/lib/Roundcube/rcube_spellchecker.php
+++ b/program/lib/Roundcube/rcube_spellchecker.php
@@ -84,6 +84,9 @@ class rcube_spellchecker
if ($this->engine == 'pspell') {
$this->matches = $this->_pspell_check($this->content);
}
+ else if ($this->engine == 'enchant') {
+ $this->matches = $this->_enchant_check($this->content);
+ }
else {
$this->matches = $this->_googie_check($this->content);
}
@@ -115,6 +118,9 @@ class rcube_spellchecker
if ($this->engine == 'pspell') {
return $this->_pspell_suggestions($word);
}
+ else if ($this->engine == 'enchant') {
+ return $this->_enchant_suggestions($word);
+ }
return $this->_googie_suggestions($word);
}
@@ -133,6 +139,9 @@ class rcube_spellchecker
if ($this->engine == 'pspell') {
return $this->_pspell_words($text, $is_html);
}
+ else if ($this->engine == 'enchant') {
+ return $this->_enchant_words($text, $is_html);
+ }
return $this->_googie_words($text, $is_html);
}
@@ -314,11 +323,6 @@ class rcube_spellchecker
if (!$this->plink) {
if (!extension_loaded('pspell')) {
$this->error = "Pspell extension not available";
- rcube::raise_error(array(
- 'code' => 500, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => $this->error), true, false);
-
return;
}
@@ -331,6 +335,141 @@ class rcube_spellchecker
}
+ /**
+ * Checks the text using enchant
+ *
+ * @param string $text Text content for spellchecking
+ */
+ private function _enchant_check($text)
+ {
+ // init spellchecker
+ $this->_enchant_init();
+
+ if (!$this->enchant_dictionary) {
+ return array();
+ }
+
+ // tokenize
+ $text = preg_split($this->separator, $text, NULL, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
+
+ $diff = 0;
+ $matches = array();
+
+ foreach ($text as $w) {
+ $word = trim($w[0]);
+ $pos = $w[1] - $diff;
+ $len = mb_strlen($word);
+
+ // skip exceptions
+ if ($this->is_exception($word)) {
+ }
+ else if (!enchant_dict_check($this->enchant_dictionary, $word)) {
+ $suggestions = enchant_dict_suggest($this->enchant_dictionary, $word);
+
+ if (sizeof($suggestions) > self::MAX_SUGGESTIONS) {
+ $suggestions = array_slice($suggestions, 0, self::MAX_SUGGESTIONS);
+ }
+
+ $matches[] = array($word, $pos, $len, null, $suggestions);
+ }
+
+ $diff += (strlen($word) - $len);
+ }
+
+ return $matches;
+ }
+
+
+ /**
+ * Returns the misspelled words
+ */
+ private function _enchant_words($text = null, $is_html=false)
+ {
+ $result = array();
+
+ if ($text) {
+ // init spellchecker
+ $this->_enchant_init();
+
+ if (!$this->enchant_dictionary) {
+ return array();
+ }
+
+ // With Enchant we don't need to get suggestions to return misspelled words
+ if ($is_html) {
+ $text = $this->html2text($text);
+ }
+
+ $text = preg_split($this->separator, $text, NULL, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
+
+ foreach ($text as $w) {
+ $word = trim($w[0]);
+
+ // skip exceptions
+ if ($this->is_exception($word)) {
+ continue;
+ }
+
+ if (!enchant_dict_check($this->enchant_dictionary, $word)) {
+ $result[] = $word;
+ }
+ }
+
+ return $result;
+ }
+
+ foreach ($this->matches as $m) {
+ $result[] = $m[0];
+ }
+
+ return $result;
+ }
+
+
+ /**
+ * Returns suggestions for misspelled word
+ */
+ private function _enchant_suggestions($word)
+ {
+ // init spellchecker
+ $this->_enchant_init();
+
+ if (!$this->enchant_dictionary) {
+ return array();
+ }
+
+ $suggestions = enchant_dict_suggest($this->enchant_dictionary, $word);
+
+ if (sizeof($suggestions) > self::MAX_SUGGESTIONS)
+ $suggestions = array_slice($suggestions, 0, self::MAX_SUGGESTIONS);
+
+ return is_array($suggestions) ? $suggestions : array();
+ }
+
+
+ /**
+ * Initializes PSpell dictionary
+ */
+ private function _enchant_init()
+ {
+ if (!$this->enchant_broker) {
+ if (!extension_loaded('enchant')) {
+ $this->error = "Enchant extension not available";
+ return;
+ }
+
+ $this->enchant_broker = enchant_broker_init();
+ }
+
+ if (!enchant_broker_dict_exists($this->enchant_broker, $this->lang)) {
+ $this->error = "Unable to load dictionary for selected language using Enchant";
+ return;
+ }
+
+ $this->enchant_dictionary = enchant_broker_request_dict($this->enchant_broker, $this->lang);
+ }
+
+
private function _googie_check($text)
{
// spell check uri is configured
@@ -372,9 +511,19 @@ class rcube_spellchecker
fclose($fp);
}
+ // parse HTTP response
+ if (preg_match('!^HTTP/1.\d (\d+)(.+)!', $store, $m)) {
+ $http_status = $m[1];
+ if ($http_status != '200')
+ $this->error = 'HTTP ' . $m[1] . $m[2];
+ }
+
if (!$store) {
$this->error = "Empty result from spelling engine";
}
+ else if (preg_match('/<spellresult error="([^"]+)"/', $store, $m) && $m[1]) {
+ $this->error = "Error code $m[1] returned";
+ }
preg_match_all('/<c o="([^"]*)" l="([^"]*)" s="([^"]*)">([^<]*)<\/c>/', $store, $matches, PREG_SET_ORDER);
@@ -588,7 +737,7 @@ class rcube_spellchecker
if (empty($plugin['abort'])) {
$dict = array();
- $this->rc->db->query(
+ $sql_result = $this->rc->db->query(
"SELECT data FROM ".$this->rc->db->table_name('dictionary')
." WHERE user_id ". ($plugin['userid'] ? "= ".$this->rc->db->quote($plugin['userid']) : "IS NULL")
." AND " . $this->rc->db->quoteIdentifier('language') . " = ?",
diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php
index 700d12ffb..4b336f210 100644
--- a/program/lib/Roundcube/rcube_storage.php
+++ b/program/lib/Roundcube/rcube_storage.php
@@ -540,12 +540,13 @@ abstract class rcube_storage
/**
* Append a mail message (source) to a specific folder.
*
- * @param string $folder Target folder
- * @param string $message The message source string or filename
- * @param string $headers Headers string if $message contains only the body
- * @param boolean $is_file True if $message is a filename
- * @param array $flags Message flags
- * @param mixed $date Message internal date
+ * @param string $folder Target folder
+ * @param string|array $message The message source string or filename
+ * or array (of strings and file pointers)
+ * @param string $headers Headers string if $message contains only the body
+ * @param boolean $is_file True if $message is a filename
+ * @param array $flags Message flags
+ * @param mixed $date Message internal date
*
* @return int|bool Appended message UID or True on success, False on error
*/
@@ -986,6 +987,6 @@ abstract class rcube_storage
/**
* Delete outdated cache entries
*/
- abstract function expunge_cache();
+ abstract function cache_gc();
} // end class rcube_storage
diff --git a/program/lib/Roundcube/rcube_string_replacer.php b/program/lib/Roundcube/rcube_string_replacer.php
index b8768bc98..0fc90a55a 100644
--- a/program/lib/Roundcube/rcube_string_replacer.php
+++ b/program/lib/Roundcube/rcube_string_replacer.php
@@ -95,12 +95,12 @@ class rcube_string_replacer
$attrib = (array)$this->options['link_attribs'];
$attrib['href'] = $url_prefix . $url;
- $i = $this->add($prefix . html::a($attrib, rcube::Q($url)) . $suffix);
+ $i = $this->add(html::a($attrib, rcube::Q($url)) . $suffix);
}
// Return valid link for recognized schemes, otherwise
// return the unmodified string for unrecognized schemes.
- return $i >= 0 ? $this->get_replacement($i) : $matches[0];
+ return $i >= 0 ? $prefix . $this->get_replacement($i) : $matches[0];
}
/**
diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php
index 505b190d1..5e9c9af80 100644
--- a/program/lib/Roundcube/rcube_user.php
+++ b/program/lib/Roundcube/rcube_user.php
@@ -495,9 +495,9 @@ class rcube_user
"INSERT INTO ".$dbh->table_name('users').
" (created, last_login, username, mail_host, language)".
" VALUES (".$dbh->now().", ".$dbh->now().", ?, ?, ?)",
- strip_newlines($data['user']),
- strip_newlines($data['host']),
- strip_newlines($data['language']));
+ $data['user'],
+ $data['host'],
+ $data['language']);
if ($user_id = $dbh->insert_id('users')) {
// create rcube_user instance to make plugin hooks work
@@ -517,7 +517,7 @@ class rcube_user
if (empty($user_email)) {
$user_email = strpos($data['user'], '@') ? $user : sprintf('%s@%s', $data['user'], $mail_domain);
}
- $email_list[] = strip_newlines($user_email);
+ $email_list[] = $user_email;
}
// identities_level check
else if (count($email_list) > 1 && $rcube->config->get('identities_level', 0) > 1) {
@@ -547,7 +547,6 @@ class rcube_user
$record['name'] = $user_name != $record['email'] ? $user_name : '';
}
- $record['name'] = strip_newlines($record['name']);
$record['user_id'] = $user_id;
$record['standard'] = $standard;
diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php
index 1ae782a25..cf87dedb7 100644
--- a/program/lib/Roundcube/rcube_utils.php
+++ b/program/lib/Roundcube/rcube_utils.php
@@ -360,12 +360,8 @@ class rcube_utils
return $value;
}
- // strip single quotes if magic_quotes_sybase is enabled
- if (ini_get('magic_quotes_sybase')) {
- $value = str_replace("''", "'", $value);
- }
// strip slashes if magic_quotes enabled
- else if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
+ if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
$value = stripslashes($value);
}
@@ -404,7 +400,7 @@ class rcube_utils
$out = array();
$src = $mode == self::INPUT_GET ? $_GET : ($mode == self::INPUT_POST ? $_POST : $_REQUEST);
- foreach ($src as $key => $value) {
+ foreach (array_keys($src) as $key) {
$fname = $key[0] == '_' ? substr($key, 1) : $key;
if ($ignore && !preg_match('/^(' . $ignore . ')$/', $fname)) {
$out[$fname] = self::get_input_value($key, $mode);
@@ -510,17 +506,24 @@ class rcube_utils
*/
public static function file2class($mimetype, $filename)
{
+ $mimetype = strtolower($mimetype);
+ $filename = strtolower($filename);
+
list($primary, $secondary) = explode('/', $mimetype);
$classes = array($primary ? $primary : 'unknown');
+
if ($secondary) {
$classes[] = $secondary;
}
- if (preg_match('/\.([a-z0-9]+)$/i', $filename, $m)) {
- $classes[] = $m[1];
+
+ if (preg_match('/\.([a-z0-9]+)$/', $filename, $m)) {
+ if (!in_array($m[1], $classes)) {
+ $classes[] = $m[1];
+ }
}
- return strtolower(join(" ", $classes));
+ return join(" ", $classes);
}
@@ -663,6 +666,21 @@ class rcube_utils
/**
+ * Returns the real remote IP address
+ *
+ * @return string Remote IP address
+ */
+ public static function remote_addr()
+ {
+ foreach (array('HTTP_X_FORWARDED_FOR','HTTP_X_REAL_IP','REMOTE_ADDR') as $prop) {
+ if (!empty($_SERVER[$prop]))
+ return $_SERVER[$prop];
+ }
+
+ return '';
+ }
+
+ /**
* Read a specific HTTP request header.
*
* @param string $name Header name
@@ -726,11 +744,23 @@ class rcube_utils
return mktime(0,0,0, intval($matches[2]), intval($matches[3]), intval($matches[1]));
}
else if (is_numeric($date)) {
- return $date;
+ return (int) $date;
}
- // support non-standard "GMTXXXX" literal
- $date = preg_replace('/GMT\s*([+-][0-9]+)/', '\\1', $date);
+ // Clean malformed data
+ $date = preg_replace(
+ array(
+ '/GMT\s*([+-][0-9]+)/', // support non-standard "GMTXXXX" literal
+ '/[^a-z0-9\x20\x09:+-]/i', // remove any invalid characters
+ '/\s*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*/i', // remove weekday names
+ ),
+ array(
+ '\\1',
+ '',
+ '',
+ ), $date);
+
+ $date = trim($date);
// if date parsing fails, we have a date in non-rfc format.
// remove token from the end and try again
@@ -743,7 +773,7 @@ class rcube_utils
$date = implode(' ', $d);
}
- return $ts;
+ return (int) $ts;
}
diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php
index de28767f8..a71305c4b 100644
--- a/program/lib/Roundcube/rcube_vcard.php
+++ b/program/lib/Roundcube/rcube_vcard.php
@@ -90,7 +90,7 @@ class rcube_vcard
*/
public function __construct($vcard = null, $charset = RCUBE_CHARSET, $detect = false, $fieldmap = array())
{
- if (!empty($fielmap)) {
+ if (!empty($fieldmap)) {
$this->extend_fieldmap($fieldmap);
}
@@ -481,7 +481,7 @@ class rcube_vcard
$vcard_block = '';
$in_vcard_block = false;
- foreach (preg_split("/[\r\n]+/", $data) as $i => $line) {
+ foreach (preg_split("/[\r\n]+/", $data) as $line) {
if ($in_vcard_block && !empty($line)) {
$vcard_block .= $line . "\n";
}
@@ -491,7 +491,9 @@ class rcube_vcard
if (preg_match('/^END:VCARD$/i', $line)) {
// parse vcard
$obj = new rcube_vcard(self::cleanup($vcard_block), $charset, true, self::$fieldmap);
- if (!empty($obj->displayname) || !empty($obj->email)) {
+ // FN and N is required by vCard format (RFC 2426)
+ // on import we can be less restrictive, let's addressbook decide
+ if (!empty($obj->displayname) || !empty($obj->surname) || !empty($obj->firstname) || !empty($obj->email)) {
$out[] = $obj;
}
@@ -712,9 +714,15 @@ class rcube_vcard
$value[] = $attrvalues;
}
else if (is_bool($attrvalues)) {
- // true means just tag, not tag=value, as in PHOTO;BASE64:...
+ // true means just a tag, not tag=value, as in PHOTO;BASE64:...
if ($attrvalues) {
- $attr .= strtoupper(";$attrname");
+ // vCard v3 uses ENCODING=B (#1489183)
+ if ($attrname == 'base64') {
+ $attr .= ";ENCODING=B";
+ }
+ else {
+ $attr .= strtoupper(";$attrname");
+ }
}
}
else {
@@ -782,9 +790,30 @@ class rcube_vcard
}
return $result;
}
+
+ $s = strtr($s, $rep2);
+ }
+
+ // some implementations (GMail) use non-standard backslash before colon (#1489085)
+ // we will handle properly any backslashed character - removing dummy backslahes
+ // return strtr($s, array("\r" => '', '\\\\' => '\\', '\n' => "\n", '\N' => "\n", '\,' => ',', '\;' => ';'));
+
+ $s = str_replace("\r", '', $s);
+ $pos = 0;
+
+ while (($pos = strpos($s, '\\', $pos)) !== false) {
+ $next = substr($s, $pos + 1, 1);
+ if ($next == 'n' || $next == 'N') {
+ $s = substr_replace($s, "\n", $pos, 2);
+ }
+ else {
+ $s = substr_replace($s, '', $pos, 1);
+ }
+
+ $pos += 1;
}
- return strtr($s, array("\r" => '', '\\\\' => '\\', '\n' => "\n", '\N' => "\n", '\,' => ',', '\;' => ';'));
+ return $s;
}
/**
diff --git a/program/lib/Roundcube/rcube_washtml.php b/program/lib/Roundcube/rcube_washtml.php
index 27dff9f48..6b2efcc78 100644
--- a/program/lib/Roundcube/rcube_washtml.php
+++ b/program/lib/Roundcube/rcube_washtml.php
@@ -113,10 +113,9 @@ class rcube_washtml
'type', 'rows', 'cols', 'disabled', 'readonly', 'checked', 'multiple', 'value'
);
- /* Block elements which could be empty but cannot be returned in short form (<tag />) */
- static $block_elements = array('div', 'p', 'pre', 'blockquote', 'a', 'font', 'center',
- 'table', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'dl', 'strong',
- 'i', 'b', 'u', 'span',
+ /* Elements which could be empty and be returned in short form (<tag />) */
+ static $void_elements = array('area', 'base', 'br', 'col', 'command', 'embed', 'hr',
+ 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'
);
/* State for linked objects in HTML */
@@ -134,12 +133,15 @@ class rcube_washtml
/* Ignore these HTML tags but process their content */
private $_ignore_elements = array();
- /* Block elements which could be empty but cannot be returned in short form (<tag />) */
- private $_block_elements = array();
+ /* Elements which could be empty and be returned in short form (<tag />) */
+ private $_void_elements = array();
/* Allowed HTML attributes */
private $_html_attribs = array();
+ /* Max nesting level */
+ private $max_nesting_level;
+
/**
* Class constructor
@@ -149,9 +151,9 @@ class rcube_washtml
$this->_html_elements = array_flip((array)$p['html_elements']) + array_flip(self::$html_elements) ;
$this->_html_attribs = array_flip((array)$p['html_attribs']) + array_flip(self::$html_attribs);
$this->_ignore_elements = array_flip((array)$p['ignore_elements']) + array_flip(self::$ignore_elements);
- $this->_block_elements = array_flip((array)$p['block_elements']) + array_flip(self::$block_elements);
+ $this->_void_elements = array_flip((array)$p['void_elements']) + array_flip(self::$void_elements);
- unset($p['html_elements'], $p['html_attribs'], $p['ignore_elements'], $p['block_elements']);
+ unset($p['html_elements'], $p['html_attribs'], $p['ignore_elements'], $p['void_elements']);
$this->config = $p + array('show_washed' => true, 'allow_remote' => false, 'cid_map' => array());
}
@@ -284,12 +286,26 @@ class rcube_washtml
* It output only allowed tags with allowed attributes
* and allowed inline styles
*/
- private function dumpHtml($node)
+ private function dumpHtml($node, $level = 0)
{
if (!$node->hasChildNodes()) {
return '';
}
+ $level++;
+
+ if ($this->max_nesting_level > 0 && $level == $this->max_nesting_level - 1) {
+ // log error message once
+ if (!$this->max_nesting_level_error) {
+ $this->max_nesting_level_error = true;
+ rcube::raise_error(array('code' => 500, 'type' => 'php',
+ 'line' => __LINE__, 'file' => __FILE__,
+ 'message' => "Maximum nesting level exceeded (xdebug.max_nesting_level={$this->max_nesting_level})"),
+ true, false);
+ }
+ return '<!-- ignored -->';
+ }
+
$node = $node->firstChild;
$dump = '';
@@ -299,19 +315,19 @@ class rcube_washtml
$tagName = strtolower($node->tagName);
if ($callback = $this->handlers[$tagName]) {
$dump .= call_user_func($callback, $tagName,
- $this->wash_attribs($node), $this->dumpHtml($node), $this);
+ $this->wash_attribs($node), $this->dumpHtml($node, $level), $this);
}
else if (isset($this->_html_elements[$tagName])) {
- $content = $this->dumpHtml($node);
+ $content = $this->dumpHtml($node, $level);
$dump .= '<' . $tagName . $this->wash_attribs($node) .
- ($content != '' || isset($this->_block_elements[$tagName]) ? ">$content</$tagName>" : ' />');
+ ($content === '' && isset($this->_void_elements[$tagName]) ? ' />' : ">$content</$tagName>");
}
else if (isset($this->_ignore_elements[$tagName])) {
$dump .= '<!-- ' . htmlspecialchars($tagName, ENT_QUOTES) . ' not allowed -->';
}
else {
$dump .= '<!-- ' . htmlspecialchars($tagName, ENT_QUOTES) . ' ignored -->';
- $dump .= $this->dumpHtml($node); // ignore tags not its content
+ $dump .= $this->dumpHtml($node, $level); // ignore tags not its content
}
break;
@@ -324,14 +340,14 @@ class rcube_washtml
break;
case XML_HTML_DOCUMENT_NODE:
- $dump .= $this->dumpHtml($node);
+ $dump .= $this->dumpHtml($node, $level);
break;
case XML_DOCUMENT_TYPE_NODE:
break;
default:
- $dump . '<!-- node type ' . $node->nodeType . ' -->';
+ $dump .= '<!-- node type ' . $node->nodeType . ' -->';
}
} while($node = $node->nextSibling);
@@ -358,6 +374,9 @@ class rcube_washtml
$this->config['base_url'] = '';
}
+ // Detect max nesting level (for dumpHTML) (#1489110)
+ $this->max_nesting_level = (int) @ini_get('xdebug.max_nesting_level');
+
@$node->loadHTML($html);
return $this->dumpHtml($node);
}
@@ -405,6 +424,7 @@ class rcube_washtml
rcube::raise_error(array('code' => 620, 'type' => 'php',
'line' => __LINE__, 'file' => __FILE__,
'message' => $errstr), true, false);
+
return '';
}
diff --git a/program/lib/utf8.class.php b/program/lib/utf8.class.php
index e0dc9e2bd..0446159c7 100644
--- a/program/lib/utf8.class.php
+++ b/program/lib/utf8.class.php
@@ -60,8 +60,8 @@ Class utf8 {
function loadCharset($charset) {
$charset = preg_replace(array('/^WINDOWS-*125([0-8])$/', '/^CP-/'), array('CP125\\1', 'CP'), $charset);
- if (isset($aliases[$charset]))
- $charset = $aliases[$charset];
+ if (isset($this->aliases[$charset]))
+ $charset = $this->aliases[$charset];
$this->charset = $charset;
diff --git a/program/localization/ar_SA/labels.inc b/program/localization/ar_SA/labels.inc
index 7dc8c15ad..bc1764b0f 100644
--- a/program/localization/ar_SA/labels.inc
+++ b/program/localization/ar_SA/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'المسودات';
$labels['sent'] = 'المرسل';
$labels['trash'] = 'المهملات';
$labels['junk'] = 'غير المرغوب';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'الموضوع';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'الصفحة الحالية';
$labels['unread'] = 'غير المقروءة';
$labels['flagged'] = 'موسوم';
$labels['unanswered'] = 'بلا رد';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'محذوف';
$labels['undeleted'] = 'غير محذوفة';
$labels['invert'] = 'عكس';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'وضع طريقة السرد';
$labels['folderactions'] = 'إجراءات المجلد...';
$labels['compact'] = 'ضغط';
$labels['empty'] = 'تفريغ';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'المساحة المستخدمة';
$labels['unknown'] = 'مجهول';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'استعادة البحث للافتراضي';
$labels['searchmod'] = 'أماكن البحث';
$labels['msgtext'] = 'كامل الرسالة';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'افتح في نافذة جديدة';
$labels['emlsave'] = 'تنزيل (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'عرض المجموعة الأخيرة';
$labels['group'] = 'مجموعة';
$labels['groups'] = 'المجموعات';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'العناوين الشخصية';
$labels['searchsave'] = 'حفظ البحث';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'إنشاء رسائل بنسق HTML';
$labels['htmlonreply'] = 'حال الرد على الرسائل بصيغة HTML فقط';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'توقيع HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'إظهار قسم المعاينة';
$labels['skin'] = 'شكل الواجهة';
$labels['logoutclear'] = 'إفراغ سلة المحذوفات عند الخروج';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'إزالة التوقيع من الرسالة
$labels['autoaddsignature'] = 'إضافة التوقيع آلياً';
$labels['newmessageonly'] = 'الرسالة الجديدة فقط';
$labels['replyandforwardonly'] = 'الردود والتمريرات فقط';
-$labels['replysignaturepos'] = 'إضافة التوقيع عند الرد أو التمرير';
-$labels['belowquote'] = 'بعد الاقتباس';
-$labels['abovequote'] = 'قبل الاقتباس';
$labels['insertsignature'] = 'إضافة التوقيع';
$labels['previewpanemarkread'] = 'تحديد الرسائل المُعاينة كمقروءة';
$labels['afternseconds'] = 'بعد $n ثواني';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'تجاهل الكلمات التي تحتوي
$labels['spellcheckignorecaps'] = 'تجاهل الكلمات التي بها أحرف كبيرة';
$labels['addtodict'] = 'إضافة إلى القامس';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ar_SA/messages.inc b/program/localization/ar_SA/messages.inc
index e10c83228..9429a3910 100644
--- a/program/localization/ar_SA/messages.inc
+++ b/program/localization/ar_SA/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'خطأ في قاعدة البيانات!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'تعذر تنفيذ العملية. المجلد للقراءة فقط.';
$messages['errornoperm'] = 'تعذر تنفيذ العملية. ليست لديك الصلاحية.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'طلب غير صالح! لم تحفظ أية بيانات.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'لم يعثر على أية رسائل في صندوق البريد هذا';
diff --git a/program/localization/ast/labels.inc b/program/localization/ast/labels.inc
index 996c6043f..8c1985eef 100644
--- a/program/localization/ast/labels.inc
+++ b/program/localization/ast/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Borradores';
$labels['sent'] = 'Unviaos';
$labels['trash'] = 'Papelera';
$labels['junk'] = 'Puxarra';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Asuntu';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Ensin lleer';
$labels['flagged'] = 'Marcáu';
$labels['unanswered'] = 'Ensin contestar';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Desaniciáu';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invertir';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Compautar';
$labels['empty'] = 'Vaciar';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Espaciu en discu';
$labels['unknown'] = 'desconocíu';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Anovar la búsqueda';
$labels['searchmod'] = 'Guetar modificadores';
$labels['msgtext'] = 'Mensax completu';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Abrir en una ventana nueva';
$labels['emlsave'] = 'Baxar (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Amosar l\'últimu grupu';
$labels['group'] = 'Group';
$labels['groups'] = 'Grupos';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Direiciones personales';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Facer el mensaxe n\'HTML';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'Firma HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Entever';
$labels['skin'] = 'Estilu';
$labels['logoutclear'] = 'Vaciar la papelera al zarrar la sesión';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ast/messages.inc b/program/localization/ast/messages.inc
index 135f70b73..9e415b8ec 100644
--- a/program/localization/ast/messages.inc
+++ b/program/localization/ast/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Fallu de la solicitú. Nun se guardaron datos.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Nun doi con mensaxes';
diff --git a/program/localization/az_AZ/labels.inc b/program/localization/az_AZ/labels.inc
index 60e861177..129315ec0 100644
--- a/program/localization/az_AZ/labels.inc
+++ b/program/localization/az_AZ/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Qaralamalar';
$labels['sent'] = 'Göndərilənlər';
$labels['trash'] = 'Səbət';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Mövzu';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Kopyala';
$labels['move'] = 'Köçür';
$labels['moveto'] = 'Burada köçür...';
$labels['download'] = 'Endir';
-$labels['open'] = 'Open';
+$labels['open'] = 'Aç';
$labels['showattachment'] = 'Göstər';
$labels['showanyway'] = 'İstənilən halda göstər';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Hazırki səhifəni';
$labels['unread'] = 'Oxunmamışları';
$labels['flagged'] = 'İşarəliləri';
$labels['unanswered'] = 'Cavabsızları';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Silinmişləri';
$labels['undeleted'] = 'Silinməyib';
$labels['invert'] = 'İnvertliləri';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Görünüş rejimi';
$labels['folderactions'] = 'Qovluq işləri...';
$labels['compact'] = 'Sıx';
$labels['empty'] = 'Boşalt';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disk istifadəsi';
$labels['unknown'] = 'naməlum';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Axtarışı yenilə';
$labels['searchmod'] = 'Axtarış variantları';
$labels['msgtext'] = 'Bütün məktub';
$labels['body'] = 'Mətn';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Yeni pəncərədə aç';
$labels['emlsave'] = 'Saxla (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Sadə mətn formatında göstər';
+$labels['changeformathtml'] = 'HTML formatında göstər';
// message compose
$labels['editasnew'] = 'Yeni kimi redaktə et';
@@ -338,8 +342,8 @@ $labels['composeto'] = 'Seçilmiş ünvanlara məktub yaz';
$labels['contactsfromto'] = '$count ünvanının $from - $to arası';
$labels['print'] = 'Çap et';
$labels['export'] = 'İxrac et';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Hamısını İxrac et';
+$labels['exportsel'] = 'Seçilmişləri İxrac et';
$labels['exportvcards'] = 'Ünvanları vCards formatında ixrac et';
$labels['newcontactgroup'] = 'Ünvanlar qrupunu yarat';
$labels['grouprename'] = 'Qruğun adını dəyişdir';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Sonuncunu göstər';
$labels['group'] = 'Qrup';
$labels['groups'] = 'Qruplar';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Şəxsi ünvanlar';
$labels['searchsave'] = 'Sorğunu saxla';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML-də mesaj yaz';
$labels['htmlonreply'] = 'yalnız HTML mesajlar ilə cavab';
$labels['htmlonreplyandforward'] = 'HTML məktuba cavab və yönəltmə zamanı';
$labels['htmlsignature'] = 'HTML imza';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Prevyu paneli göstər';
$labels['skin'] = 'İnterfeys stili';
$labels['logoutclear'] = 'Poçtdan çıxan zaman səbəti təmizlə';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Cavab zamanı imzanı sil';
$labels['autoaddsignature'] = 'İmzanı avtomatik əlavə et';
$labels['newmessageonly'] = 'yalnız yeni məktublarda';
$labels['replyandforwardonly'] = 'Yalnız cavab və yönəldilənlərdə';
-$labels['replysignaturepos'] = 'Cavab və yönəltmə zamanı imzanı bərkid';
-$labels['belowquote'] = 'sitatdan sonra';
-$labels['abovequote'] = 'sitatdan əvvəl';
$labels['insertsignature'] = 'İmza əlavə et';
$labels['previewpanemarkread'] = 'Baxılmış şəkilləri oxunmuş kimi qeyd et';
$labels['afternseconds'] = '$n saniyədən sonra';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Rəqəmlər ilə sözləri keç';
$labels['spellcheckignorecaps'] = 'Böyük hərfləri olan sözlərdən keç';
$labels['addtodict'] = 'Lüğətə əlavə et';
$labels['mailtoprotohandler'] = 'mailto: keçid üçün protokol qeyd et';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Məktubların yönəldilməsi';
$labels['inline'] = 'mətndə';
$labels['asattachment'] = 'fayl kimi';
diff --git a/program/localization/az_AZ/messages.inc b/program/localization/az_AZ/messages.inc
index 939827247..418f270be 100644
--- a/program/localization/az_AZ/messages.inc
+++ b/program/localization/az_AZ/messages.inc
@@ -17,20 +17,22 @@
*/
$messages = array();
-$messages['errortitle'] = 'Xəta baş verib!';
-$messages['loginfailed'] = 'Giriş uğursuz oldu';
-$messages['cookiesdisabled'] = 'Sizin brauzer kukiləri qəbul etmir';
-$messages['sessionerror'] = 'Sizin sessiya köhnəlib';
-$messages['storageerror'] = 'IMAP serverlə bağlantı alınmadı';
-$messages['servererror'] = 'Server xətası!';
-$messages['servererrormsg'] = 'Server xətası: $msg';
-$messages['dberror'] = 'Məlumatlar bazasında xəta!';
+$messages['errortitle'] = 'Xəta baş verdi!';
+$messages['loginfailed'] = 'Giriş uğursuz oldu.';
+$messages['cookiesdisabled'] = 'Sizin brauzer kukiləri qəbul etmir.';
+$messages['sessionerror'] = 'Sizin sessiya köhnəlib.';
+$messages['storageerror'] = 'IMAP serverlə bağlantı alınmadı.';
+$messages['servererror'] = 'Server Xətası!';
+$messages['servererrormsg'] = 'Server Xətası: $msg';
+$messages['dberror'] = 'Məlumatlar Bazasında Xəta!';
$messages['requesttimedout'] = 'Sorğunun gözləmə müddəti bitdi';
-$messages['errorreadonly'] = 'Əməliyyatı etmək mümkün deyil. Qovluq yalnız oxunuş üçündür.';
+$messages['errorreadonly'] = 'Əməliyyatı icra etmək mümkün deyil. Qovluq yalnız oxunuş üçündür.';
$messages['errornoperm'] = 'Əməliyyatı etmək mümkün deyil. Giriş qadağandır.';
+$messages['erroroverquota'] = 'Əməliyyat icra edilə bilinmir. Boş disk həcmi yoxdur.';
+$messages['erroroverquotadelete'] = 'Boş disk həcmi yoxdur. Məktubu silmək üçün SHIFT+DEL düyməsini istifadə edin.';
$messages['invalidrequest'] = 'Səhv sorğu! Məlumat yaddaşda qalmadı.';
-$messages['invalidhost'] = 'Səhv server adı';
-$messages['nomessagesfound'] = 'Poçt qutusunda məktub tapılmadı';
+$messages['invalidhost'] = 'Səhv server adı.';
+$messages['nomessagesfound'] = 'Poçt qutusunda məktub tapılmadı.';
$messages['loggedout'] = 'Çıxış uğurlu oldu. Sağ olun!';
$messages['mailboxempty'] = 'Poçt qutusu boşdur';
$messages['refreshing'] = 'Yenilənmə...';
diff --git a/program/localization/be_BE/labels.inc b/program/localization/be_BE/labels.inc
index db3893ced..56339a926 100644
--- a/program/localization/be_BE/labels.inc
+++ b/program/localization/be_BE/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Чарнавікі';
$labels['sent'] = 'Дасланыя';
$labels['trash'] = 'Сметніца';
$labels['junk'] = 'Спам';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Тэма';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Unread';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Compact';
$labels['empty'] = 'Empty';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disk usage';
$labels['unknown'] = 'unknown';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Reset search';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Show last page';
$labels['group'] = 'Group';
$labels['groups'] = 'Groups';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personal Addresses';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Show preview pane';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/be_BE/messages.inc b/program/localization/be_BE/messages.inc
index 0aaa4d4d7..73cdb3ed8 100644
--- a/program/localization/be_BE/messages.inc
+++ b/program/localization/be_BE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Памылка базы даных!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Немагчыма выканаць аперацыю. Тэчка даступна толькі для чытання.';
$messages['errornoperm'] = 'Немагчыма выканаць аперацыю. Адмоўлена ў доступе.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Не дзейсны запыт! Даныя не захаваныя.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'No messages found in this mailbox.';
diff --git a/program/localization/bg_BG/labels.inc b/program/localization/bg_BG/labels.inc
index fa92ec042..dd5be6e64 100644
--- a/program/localization/bg_BG/labels.inc
+++ b/program/localization/bg_BG/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Чернови';
$labels['sent'] = 'Изпратени';
$labels['trash'] = 'Кошче';
$labels['junk'] = 'Спам';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Заглавие';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Копиране';
$labels['move'] = 'Преместване';
$labels['moveto'] = 'Премести в...';
$labels['download'] = 'Изтегли';
-$labels['open'] = 'Open';
+$labels['open'] = 'Отвори';
$labels['showattachment'] = 'Показване';
$labels['showanyway'] = 'Показване въпреки това';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Страница';
$labels['unread'] = 'Нови';
$labels['flagged'] = 'Отбелязано';
$labels['unanswered'] = 'Без отговор';
+$labels['withattachment'] = 'С прикачен файл';
$labels['deleted'] = 'Изтрито';
$labels['undeleted'] = 'Не е изтрит';
$labels['invert'] = 'Инвертирай';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Кратък списък';
$labels['folderactions'] = 'Действия за папки...';
$labels['compact'] = 'Свиване';
$labels['empty'] = 'Изпразни';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Използвано място';
$labels['unknown'] = 'няма информация';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Изчисти търсенето и покажи в
$labels['searchmod'] = 'Търсене във';
$labels['msgtext'] = 'Цялото съобщение';
$labels['body'] = 'Основен текст';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Отвори в нов прозорец';
$labels['emlsave'] = 'Изтегли като .eml';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Покажи в опростен текстов формат';
+$labels['changeformathtml'] = 'Покажи в HTML формат';
// message compose
$labels['editasnew'] = 'Промени като ново';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Последна страница';
$labels['group'] = 'Група';
$labels['groups'] = 'Групи';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Лични адреси';
$labels['searchsave'] = 'Запази търсенето';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Писане на съобщениe като HTML';
$labels['htmlonreply'] = 'само при отговор на HTML събощения';
$labels['htmlonreplyandforward'] = 'само при препращане или отговор на HTML съобщение';
$labels['htmlsignature'] = 'HTML подпис';
+$labels['showemail'] = 'Показва email адрес с екранното име';
$labels['previewpane'] = 'Панел за преглед';
$labels['skin'] = 'Смяна изгледа на интерфейса';
$labels['logoutclear'] = 'Изчисти кошчето при изход';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Премахване на предишния
$labels['autoaddsignature'] = 'Автоматично добавяне на подпис';
$labels['newmessageonly'] = 'само на нови съобщения';
$labels['replyandforwardonly'] = 'само на отговори и препратени';
-$labels['replysignaturepos'] = 'Поставяне на подпис при отговор или препращане';
-$labels['belowquote'] = 'над цитатът';
-$labels['abovequote'] = 'под цитатът';
$labels['insertsignature'] = 'Вмъкване на подпис';
$labels['previewpanemarkread'] = 'Маркиране на прегледаните съобщения като прочетени';
$labels['afternseconds'] = 'след $n секунди';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Игнорирай думи съдържащ
$labels['spellcheckignorecaps'] = 'Игнорирай думи съдържащи единствено главни букви';
$labels['addtodict'] = 'Добави в речника';
$labels['mailtoprotohandler'] = 'Регистриран протокол за mailto: връзките';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Препращане на съобщения';
$labels['inline'] = 'вградено';
$labels['asattachment'] = 'като прикачен файл';
diff --git a/program/localization/bg_BG/messages.inc b/program/localization/bg_BG/messages.inc
index ead68921c..219772e74 100644
--- a/program/localization/bg_BG/messages.inc
+++ b/program/localization/bg_BG/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Грешка с базата данни!';
$messages['requesttimedout'] = 'Заявката е с изтекло време';
$messages['errorreadonly'] = 'Операцията не може да бъде изпълнена. Папката е с права само за четене';
$messages['errornoperm'] = 'Операцията не може да бъде изпълнена. Отказани права за достъп';
+$messages['erroroverquota'] = 'Невъзможно извършване на действието, няма достатъчно свободно дисково пространство.';
+$messages['erroroverquotadelete'] = 'Няма достатъчно свободно дисково пространство. Ползвайте SHIFT+DEL за да изтриете съобщение.';
$messages['invalidrequest'] = 'Невалидна заявка! Данните не са съхранени.';
$messages['invalidhost'] = 'Невалидно име на сървър';
$messages['nomessagesfound'] = 'Няма съобщения';
diff --git a/program/localization/bn_BD/labels.inc b/program/localization/bn_BD/labels.inc
index 0f20bba37..1273ef192 100644
--- a/program/localization/bn_BD/labels.inc
+++ b/program/localization/bn_BD/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'খসড়া';
$labels['sent'] = 'প্রেরিত(পাঠানো মেইল)';
$labels['trash'] = 'ডাস্টবিন';
$labels['junk'] = 'আজেবাজে মেইল';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'বিষয়';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'নাদেখা (unread)';
$labels['flagged'] = 'দাগানো (flagged)';
$labels['unanswered'] = 'উত্তর না দেওয়া গুলো';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'টাইটকরুন';
$labels['empty'] = 'খালিকরুন';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'ডিস্ক এ খালি যায়গা';
$labels['unknown'] = 'অজানা';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'নতুনকরে খুজুন';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'নতুন উইন্ডো তে দেখুন';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'শেষের গুলো দেখান';
$labels['group'] = 'Group';
$labels['groups'] = 'গ্রুপ';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'নিজের ঠিকানা';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML এ মেইল/চিঠি লিখুন';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML এ স্বাক্ষর';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'ছোটোকরে দেখার জায়গা';
$labels['skin'] = 'মেইলবক্স এর পুরোটার চেহারা';
$labels['logoutclear'] = 'বেরহবার সময় ডাস্টবিন অটোমেটিক খালি হবে';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/bn_BD/messages.inc b/program/localization/bn_BD/messages.inc
index eaa4024b1..44d5fcc60 100644
--- a/program/localization/bn_BD/messages.inc
+++ b/program/localization/bn_BD/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'এই মেইলবক্সে কোনো চিঠি নাই';
diff --git a/program/localization/br/labels.inc b/program/localization/br/labels.inc
index 95756e393..c88fd92a6 100644
--- a/program/localization/br/labels.inc
+++ b/program/localization/br/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Brouilhedoù';
$labels['sent'] = 'Kaset';
$labels['trash'] = 'Pod-lastez';
$labels['junk'] = 'Stroboù';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Sujed';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Na lennet';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Stummaat';
$labels['empty'] = 'Skarzhañ';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Implijadur pladenn';
$labels['unknown'] = 'Dianav';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Aderaouekaat ar glask';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Gwelout ar bajenn diwezhañ';
$labels['group'] = 'Group';
$labels['groups'] = 'Strolladoù';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Chomlec\'h personel';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Sevel ur c\'hemennad er furmad HTML';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'Sinadur HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Diskouez panel alberz';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/br/messages.inc b/program/localization/br/messages.inc
index 425dad996..c1988577d 100644
--- a/program/localization/br/messages.inc
+++ b/program/localization/br/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Fazi stlennvon !';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Kemennadoù ebet er voest lizhiri';
diff --git a/program/localization/bs_BA/labels.inc b/program/localization/bs_BA/labels.inc
index f2a871cdd..61989e6b3 100644
--- a/program/localization/bs_BA/labels.inc
+++ b/program/localization/bs_BA/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Skice';
$labels['sent'] = 'Poslano';
$labels['trash'] = 'Smeće';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Prikaži prava imena specijalnih foldera';
// message listing
$labels['subject'] = 'Naslov';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Trenutna stranica';
$labels['unread'] = 'Nepročitano';
$labels['flagged'] = 'Važno';
$labels['unanswered'] = 'Neodgovoreno';
+$labels['withattachment'] = 'Sa prilogom';
$labels['deleted'] = 'Obrisano';
$labels['undeleted'] = 'Nije obrisano';
$labels['invert'] = 'Izokreni';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Način prikaza liste';
$labels['folderactions'] = 'Akcije za foldere...';
$labels['compact'] = 'Optimiziraj';
$labels['empty'] = 'Isprazni';
+$labels['importmessages'] = 'Uvezi poruke';
$labels['quota'] = 'Zauzeće diska';
$labels['unknown'] = 'nepoznato';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Resetuj pretragu';
$labels['searchmod'] = 'Modifikacija pretrage';
$labels['msgtext'] = 'Cijela poruka';
$labels['body'] = 'Tijelo';
+$labels['type'] = 'Vrsta';
$labels['openinextwin'] = 'Otvori u novom prozoru';
$labels['emlsave'] = 'Preuzmi (.eml)';
@@ -222,7 +226,7 @@ $labels['mailreplyintro'] = '$date, $sender je napisao/la:';
$labels['originalmessage'] = 'Originalna poruka';
$labels['editidents'] = 'Uredi identitete';
-$labels['spellcheck'] = 'Spelovanje';
+$labels['spellcheck'] = 'Pravopis';
$labels['checkspelling'] = 'Provjera pravopisa';
$labels['resumeediting'] = 'Nastavi uređivanje';
$labels['revertto'] = 'Vrati na';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Prikaži zadnju stranicu';
$labels['group'] = 'Grupa';
$labels['groups'] = 'Grupe';
+$labels['listgroup'] = 'Izlistaj članove grupe';
$labels['personaladrbook'] = 'Lične adrese';
$labels['searchsave'] = 'Sačuvaj pretragu';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Piši HTML poruke';
$labels['htmlonreply'] = 'samo kao odgovor na HTML poruke';
$labels['htmlonreplyandforward'] = 'prilikom prosljeđivanja ili odgovaranja na HTML poruku';
$labels['htmlsignature'] = 'HTML potpis';
+$labels['showemail'] = 'Prikaži email adresu sa imenom';
$labels['previewpane'] = 'Prikaži pregled poruke';
$labels['skin'] = 'Skin interfejsa';
$labels['logoutclear'] = 'Očisti smeće prilikom odjavljivanja';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Prilikom odgovaranja na poruku, ukloni origin
$labels['autoaddsignature'] = 'Automatski dodaj potpis';
$labels['newmessageonly'] = 'samo za nove poruke';
$labels['replyandforwardonly'] = 'samo za odgovore i prosljeđivanja';
-$labels['replysignaturepos'] = 'Prilikom odgovaranja ili prosljeđivanja potpis ubaci';
-$labels['belowquote'] = 'ispod citata';
-$labels['abovequote'] = 'iznad citata';
$labels['insertsignature'] = 'Umetni potpis';
$labels['previewpanemarkread'] = 'Obilježi prikazane poruke kao pročitane';
$labels['afternseconds'] = 'nakon $n sekundi';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Zanemari riječi sa brojevima';
$labels['spellcheckignorecaps'] = 'Zanemari riječi napisane velikim slovima';
$labels['addtodict'] = 'Dodaj u rječnik';
$labels['mailtoprotohandler'] = 'Registruj upravljač protokola za mailto: linkovi';
+$labels['standardwindows'] = 'Tretiraj popup-ove kao standardne prozore';
$labels['forwardmode'] = 'Prosljeđivanje poruka';
$labels['inline'] = 'u istom redu';
$labels['asattachment'] = 'kao prilog';
diff --git a/program/localization/ca_ES/labels.inc b/program/localization/ca_ES/labels.inc
index 1bcb526ea..ca0129de4 100644
--- a/program/localization/ca_ES/labels.inc
+++ b/program/localization/ca_ES/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Esborranys';
$labels['sent'] = 'Enviats';
$labels['trash'] = 'Paperera';
$labels['junk'] = 'Correu brossa';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Assumpte';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Pàgina actual';
$labels['unread'] = 'No llegits';
$labels['flagged'] = 'Marcat';
$labels['unanswered'] = 'No respost';
+$labels['withattachment'] = 'Amb fitxer adjunt';
$labels['deleted'] = 'Suprimit';
$labels['undeleted'] = 'No s\'ha suprimit';
$labels['invert'] = 'Inverteix';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Mode de vista de llista';
$labels['folderactions'] = 'Accions de carpeta';
$labels['compact'] = 'Compacta';
$labels['empty'] = 'Buida';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Ús del disc';
$labels['unknown'] = 'desconegut';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Neteja cerca';
$labels['searchmod'] = 'Cerca modificadors';
$labels['msgtext'] = 'Missatge sencer';
$labels['body'] = 'Cos';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Obre a una nova finestra';
$labels['emlsave'] = 'Descarrega (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Mostra en format de text net';
+$labels['changeformathtml'] = 'Mostra en format HTML';
// message compose
$labels['editasnew'] = 'Edita com a nou';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Mostra la darrera pàgina';
$labels['group'] = 'Grup';
$labels['groups'] = 'Grups';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Llibreta d\'adreces';
$labels['searchsave'] = 'Desa la cerca';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Escriu missatges en HTML';
$labels['htmlonreply'] = 'només en resposta a missatges en HTML';
$labels['htmlonreplyandforward'] = 'en reenviament o resposta a missatge HTML';
$labels['htmlsignature'] = 'Signatura en HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Mostra el panell de previsualització';
$labels['skin'] = 'Aparença d\'interfície';
$labels['logoutclear'] = 'Buida la paperera al tancar la sessió';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Quan es contesti, suprimeix la signatura orig
$labels['autoaddsignature'] = 'Afegeix la signatura automàticament';
$labels['newmessageonly'] = 'només si és un missatge nou';
$labels['replyandforwardonly'] = 'només a respostes i reenviaments';
-$labels['replysignaturepos'] = 'Quan es contesti o reenviï, posa-hi la signatura';
-$labels['belowquote'] = 'sota les cometes';
-$labels['abovequote'] = 'sobre les cometes';
$labels['insertsignature'] = 'Inserta la signatura';
$labels['previewpanemarkread'] = 'Marca els missatges previsualitzats com a llegits';
$labels['afternseconds'] = 'després de $n segons';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignora paraules amb números';
$labels['spellcheckignorecaps'] = 'Ignora paraules amb lletres capitalitzades';
$labels['addtodict'] = 'Afegeix al diccionari';
$labels['mailtoprotohandler'] = 'Registra controlador de protocol pels enllaços mailto:';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Reenviament de missatges';
$labels['inline'] = 'en línia';
$labels['asattachment'] = 'com adjunt';
diff --git a/program/localization/ca_ES/messages.inc b/program/localization/ca_ES/messages.inc
index 5f0e1d609..70c3fbd0c 100644
--- a/program/localization/ca_ES/messages.inc
+++ b/program/localization/ca_ES/messages.inc
@@ -19,24 +19,26 @@
$messages = array();
$messages['errortitle'] = 'Hi ha hagut un error!';
$messages['loginfailed'] = 'L\'accés ha fallat.';
-$messages['cookiesdisabled'] = 'El vostre navegador no accepta cookies';
-$messages['sessionerror'] = 'La vostra sessió no existeix o ha expirat';
-$messages['storageerror'] = 'Error de conexió amb el servidor IMAP';
+$messages['cookiesdisabled'] = 'El vostre navegador no accepta cookies.';
+$messages['sessionerror'] = 'La vostra sessió no existeix o ha expirat.';
+$messages['storageerror'] = 'Error de connexió amb el servidor IMAP.';
$messages['servererror'] = 'Error del Servidor!';
$messages['servererrormsg'] = 'Error del Servidor: $msg';
$messages['dberror'] = 'Error a la Base de Dades!';
$messages['requesttimedout'] = 'S\'ha esgotat el temps de la sol·licitud';
$messages['errorreadonly'] = 'Impossible de realitzar l\'operació. La carpeta és de només lectura.';
$messages['errornoperm'] = 'Impossible de realitzar l\'operació. Permís denegat.';
-$messages['invalidrequest'] = 'Petició no vàlida! No s\'ha desat les dades.';
+$messages['erroroverquota'] = 'No s\'ha pogut completar l\'operació. No hi ha prou espai lliure al disc dur.';
+$messages['erroroverquotadelete'] = 'No hi ha prou espai lliure. Feu servir MAJÚS+SUPR per suprimir el missatge.';
+$messages['invalidrequest'] = 'Petició no vàlida! No s\'han desat les dades.';
$messages['invalidhost'] = 'Nom de servidor no vàlid.';
$messages['nomessagesfound'] = 'No s\'han trobat missatges en aquesta bústia.';
-$messages['loggedout'] = 'Heu tancat la sessió. A reveure!';
+$messages['loggedout'] = 'Heu tancat la sessió correctament. A reveure!';
$messages['mailboxempty'] = 'La bústia és buida.';
-$messages['refreshing'] = 'Refrescant...';
+$messages['refreshing'] = 'S\'està refrescant...';
$messages['loading'] = 'S\'està carregant…';
$messages['uploading'] = 'S\'està pujant el fitxer...';
-$messages['uploadingmany'] = 'S\'està pujant els fitxers...';
+$messages['uploadingmany'] = 'S\'estan pujant els fitxers...';
$messages['loadingdata'] = 'S\'estan carregant les dades...';
$messages['checkingmail'] = 'S’està comprovant si hi ha missatges nous…';
$messages['sendingmessage'] = 'S’està enviant el missatge…';
@@ -52,26 +54,26 @@ $messages['encryptedmessage'] = 'Aquest és un missatge xifrat i no pot ser most
$messages['nocontactsfound'] = 'No s\'ha trobat cap contacte.';
$messages['contactnotfound'] = 'No s\'ha trobat el contacte sol·licitat.';
$messages['contactsearchonly'] = 'Introduïu termes de cerca per trobar contactes';
-$messages['sendingfailed'] = 'Error enviant missatge.';
+$messages['sendingfailed'] = 'Error enviant el missatge.';
$messages['senttooquickly'] = 'Si us plau, espereu $sec segon(s) abans d\'enviar aquest missatge.';
$messages['errorsavingsent'] = 'Hi ha hagut un error mentre es desava el missatge enviat.';
-$messages['errorsaving'] = 'Hi ha hagut un error mentre es desava.';
+$messages['errorsaving'] = 'Hi ha hagut un error mentre s\'estava desant.';
$messages['errormoving'] = 'No s\'ha pogut moure el(s) missatge(s).';
$messages['errorcopying'] = 'No s\'ha pogut copiar el(s) missatge(s).';
-$messages['errordeleting'] = 'No s\'ha pogut suprimir el missatge.';
+$messages['errordeleting'] = 'No s\'ha pogut suprimir el(s) missatge(s).';
$messages['errormarking'] = 'No s\'ha pogut marcar el(s) missatge(s).';
-$messages['deletecontactconfirm'] = 'Esteu segurs de voler suprimir el(s) contacte(s) selecionat(s)?';
-$messages['deletegroupconfirm'] = 'Esteu segurs de voler suprimirr el grup seleccionat?';
-$messages['deletemessagesconfirm'] = 'Esteu segurs de voler suprimir el(s) missatge(s) selecionat(s)?';
+$messages['deletecontactconfirm'] = 'Esteu segurs de voler suprimir el(s) contacte(s) seleccionat(s)?';
+$messages['deletegroupconfirm'] = 'Esteu segurs de voler suprimir el grup seleccionat?';
+$messages['deletemessagesconfirm'] = 'Esteu segurs de voler suprimir el(s) missatge(s) seleccionat(s)?';
$messages['deletefolderconfirm'] = 'Esteu segurs de voler suprimir aquesta carpeta?';
$messages['purgefolderconfirm'] = 'Esteu segurs de voler suprimir tots els missatges d\'aquesta carpeta?';
$messages['contactdeleting'] = 'S\'està suprimint els contacte(s)...';
$messages['groupdeleting'] = 'S\'està suprimint el grup...';
$messages['folderdeleting'] = 'S\'està suprimint la carpeta...';
$messages['foldermoving'] = 'S\'està movent la carpeta...';
-$messages['foldersubscribing'] = 'S\'està subscribint la carpeta...';
-$messages['folderunsubscribing'] = 'S\'està cancelant la subscripció de la carpeta...';
-$messages['formincomplete'] = 'El formulari no ha estat emplenat totalment.';
+$messages['foldersubscribing'] = 'S\'està subscrivint la carpeta...';
+$messages['folderunsubscribing'] = 'S\'està cancel·lant la subscripció de la carpeta...';
+$messages['formincomplete'] = 'El formulari no ha estat emplenat completament.';
$messages['noemailwarning'] = 'Si us plau, introduïu una adreça de correu electrònic vàlida.';
$messages['nonamewarning'] = 'Si us plau, introduïu un nom.';
$messages['nopagesizewarning'] = 'Si us plau, introduïu una mida de pàgina.';
@@ -91,11 +93,11 @@ $messages['checking'] = 'S\'està comprovant...';
$messages['nospellerrors'] = 'No s\'han trobat errors d\'ortografia.';
$messages['folderdeleted'] = 'Carpeta suprimida correctament.';
$messages['foldersubscribed'] = 'Carpeta subscrita correctament.';
-$messages['folderunsubscribed'] = 'Carpeta desubscrita correctament.';
+$messages['folderunsubscribed'] = 'Carpeta de-subscrita correctament.';
$messages['folderpurged'] = 'La carpeta ha estat buidada correctament.';
$messages['folderexpunged'] = 'La carpeta ha estat compactada correctament.';
$messages['deletedsuccessfully'] = 'Suprimit correctament.';
-$messages['converting'] = 'S\'està traient format del missatge...';
+$messages['converting'] = 'S\'està traient el format del missatge...';
$messages['messageopenerror'] = 'No s\'ha pogut carregar el missatge del servidor.';
$messages['fileuploaderror'] = 'La pujada del fitxer ha fallat.';
$messages['filesizeerror'] = 'El fitxer pujat excedeix la mida màxima de $size.';
@@ -103,13 +105,13 @@ $messages['copysuccess'] = 'S\'han copiat $nr adreces correctament.';
$messages['copyerror'] = 'No s\'ha pogut copiar cap adreça.';
$messages['sourceisreadonly'] = 'Aquesta adreça és només de lectura.';
$messages['errorsavingcontact'] = 'No s\'ha pogut desar l\'adreça de contacte.';
-$messages['movingmessage'] = 'S\'està movent el missatge...';
-$messages['copyingmessage'] = 'S\'està copiant missatge...';
-$messages['copyingcontact'] = 'S\'està copiant els contacte(s)...';
-$messages['deletingmessage'] = 'S\'està suprimint els missatge(s)...';
-$messages['markingmessage'] = 'S\'està marcant els missatge(s)...';
-$messages['addingmember'] = 'S\'està afegint els contacte(s) al grup...';
-$messages['removingmember'] = 'S\'està suprimint els contacte(s) del grup...';
+$messages['movingmessage'] = 'S\'està movent missatge(s)...';
+$messages['copyingmessage'] = 'S\'està copiant missatge(s)...';
+$messages['copyingcontact'] = 'S\'està copiant contacte(s)...';
+$messages['deletingmessage'] = 'S\'està suprimint missatge(s)...';
+$messages['markingmessage'] = 'S\'està marcant missatge(s)...';
+$messages['addingmember'] = 'S\'està afegint contacte(s) al grup...';
+$messages['removingmember'] = 'S\'està suprimint contacte(s) del grup...';
$messages['receiptsent'] = 'Confirmació de lectura enviada correctament.';
$messages['errorsendingreceipt'] = 'No es pot enviar la confirmació.';
$messages['deleteidentityconfirm'] = 'Esteu segurs de voler suprimir aquesta identitat?';
@@ -132,16 +134,16 @@ $messages['smtpconnerror'] = 'Error SMTP ($code): La connexió al servidor ha fa
$messages['smtpautherror'] = 'Error SMTP ($code): La identificació ha fallat.';
$messages['smtpfromerror'] = 'Error SMTP ($code): No s\'ha pogut posar "$from" com a remitent ($msg).';
$messages['smtptoerror'] = 'Error SMTP ($code): No s\'ha pogut posar "$to" com a destinatari ($msg).';
-$messages['smtprecipientserror'] = 'Error SMTP: No s\'ha pogut analitzar la lista de destinataris.';
+$messages['smtprecipientserror'] = 'Error SMTP: No s\'ha pogut analitzar la llista de destinataris.';
$messages['smtperror'] = 'Error SMTP: $msg';
$messages['emailformaterror'] = 'Adreça de correu no vàlida: $email';
$messages['toomanyrecipients'] = 'Massa destinataris. Reduïu el nombre de destinataris a $max.';
$messages['maxgroupmembersreached'] = 'El nombre de membres del grup excedeix el màxim de $max.';
$messages['internalerror'] = 'Hi ha hagut un error intern. Si us plau torneu-ho a provar.';
-$messages['contactdelerror'] = 'No s\'ha pogut suprimir el(s) contacte(s).';
-$messages['contactdeleted'] = 'Contacte(s) suprimits(s) correctament.';
-$messages['contactrestoreerror'] = 'No s\'ha pogut restaurar el(s) contacte(s) suprimits(s).';
-$messages['contactrestored'] = 'Contacte(s) restaurats correctament.';
+$messages['contactdelerror'] = 'No s\'han pogut suprimir el(s) contacte(s).';
+$messages['contactdeleted'] = 'Contacte(s) suprimit(s) correctament.';
+$messages['contactrestoreerror'] = 'No s\'ha pogut restaurar el(s) contacte(s) suprimit(s).';
+$messages['contactrestored'] = 'Contacte(s) restaurat(s) correctament.';
$messages['groupdeleted'] = 'Grup suprimit correctament.';
$messages['grouprenamed'] = 'Grup reanomenat correctament.';
$messages['groupcreated'] = 'Grup creat correctament.';
@@ -149,7 +151,7 @@ $messages['savedsearchdeleted'] = 'S\'ha suprimit correctament la cerca desada.'
$messages['savedsearchdeleteerror'] = 'No s\'ha pogut suprimit la cerca desada.';
$messages['savedsearchcreated'] = 'S\'ha creat correctament la cerca desada.';
$messages['savedsearchcreateerror'] = 'No s\'ha pogut crear la cerca desada.';
-$messages['messagedeleted'] = 'Missatge(s) suprimits(s) correctament.';
+$messages['messagedeleted'] = 'Missatge(s) suprimit(s) correctament.';
$messages['messagemoved'] = 'Missatge(s) mogut(s) correctament.';
$messages['messagecopied'] = 'Missatge(s) copiat(s) correctament.';
$messages['messagemarked'] = 'Missatge(s) marcat(s) correctament.';
@@ -160,10 +162,10 @@ $messages['nametoolong'] = 'El nom és massa llarg.';
$messages['folderupdated'] = 'La carpeta ha estat actualitzada correctament.';
$messages['foldercreated'] = 'La carpeta ha estat creada correctament.';
$messages['invalidimageformat'] = 'No és un format d\'imatge vàlid.';
-$messages['mispellingsfound'] = 'S\'han detectat errors d\'ortografia al misstage.';
+$messages['mispellingsfound'] = 'S\'han detectat errors d\'ortografia al missatge.';
$messages['parentnotwritable'] = 'No s\'ha pogut crear/moure la carpeta dins de la carpeta ascendent seleccionada. No hi ha permisos d\'escriptura.';
$messages['messagetoobig'] = 'La part del missatge és massa gran per processar-la.';
-$messages['attachmentvalidationerror'] = 'ATENCIÓ! Aquest adjunt és sospitós perquè el seu tipus no coincideix amb el tipus declarat al missatge. Si no confies en l\'emissor, no l\'hauries d\'obrir al navegador perquè pot contenir elements maliciosos. <br/><br/><em>Expected: $expected; found: $detected</em>';
-$messages['noscriptwarning'] = 'Atenció: Aquest client de correu necessita Javascript! Per a poder fer-lo servir, has d\'activar Javascript a les opcions del navegador.';
+$messages['attachmentvalidationerror'] = 'ATENCIÓ! Aquest adjunt és sospitós perquè el seu tipus no coincideix amb el tipus declarat al missatge. Si no confieu en l\'emissor, no l\'hauríeu d\'obrir al navegador perquè pot contenir elements maliciosos. <br/><br/><em>S\'esperava: $expected; s\'ha trobat: $detected</em>';
+$messages['noscriptwarning'] = 'Atenció: Aquest client de correu necessita Javascript! Per a poder fer-lo servir, heu d\'activar Javascript a les opcions del navegador.';
?>
diff --git a/program/localization/cs_CZ/labels.inc b/program/localization/cs_CZ/labels.inc
index 2240065e7..b5cc093d8 100644
--- a/program/localization/cs_CZ/labels.inc
+++ b/program/localization/cs_CZ/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Rozepsané';
$labels['sent'] = 'Odeslané';
$labels['trash'] = 'Koš';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Zobrazit skutečná jména speciálních složek';
// message listing
$labels['subject'] = 'Předmět';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Aktuální stránka';
$labels['unread'] = 'Nepřečtené';
$labels['flagged'] = 'Označené';
$labels['unanswered'] = 'Neoznačené';
+$labels['withattachment'] = 'S přílohou';
$labels['deleted'] = 'Smazané';
$labels['undeleted'] = 'Nesmazáno';
$labels['invert'] = 'Převrátit';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Režim zobrazení seznamu';
$labels['folderactions'] = 'Akce se složkou...';
$labels['compact'] = 'Zmenšit';
$labels['empty'] = 'Vymazat';
+$labels['importmessages'] = 'Import zpráv';
$labels['quota'] = 'Využití schránky';
$labels['unknown'] = 'neznámý';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Zrušit vyhledávání';
$labels['searchmod'] = 'Parametry hledání';
$labels['msgtext'] = 'Celá zpráva';
$labels['body'] = 'Tělo';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Otevřít v novém okně';
$labels['emlsave'] = 'Stáhnout (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Zobrazit poslední zprávy';
$labels['group'] = 'Skupina';
$labels['groups'] = 'Skupiny';
+$labels['listgroup'] = ' Seznam členů skupiny';
$labels['personaladrbook'] = 'Osobní kontakty';
$labels['searchsave'] = 'Uložit hledání';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Vytvářet HTML zprávy';
$labels['htmlonreply'] = 'jen při odpovědi na HTML zprávy';
$labels['htmlonreplyandforward'] = 'při přeposlání nebo odpovědi na HTML zprávu';
$labels['htmlsignature'] = 'HTML podpis';
+$labels['showemail'] = 'Zobrazit e-mailovou adresu se skutečným jménem';
$labels['previewpane'] = 'Zobrazit panel náhledu';
$labels['skin'] = 'Vzhled';
$labels['logoutclear'] = 'Vyprázdnit koš při odhlášení';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Při odpovídání odstranit ze zprávy půvo
$labels['autoaddsignature'] = 'Automaticky přidat podpis';
$labels['newmessageonly'] = 'pouze k novým zprávám';
$labels['replyandforwardonly'] = 'jen k odpovědi a přeposílané zprávě';
-$labels['replysignaturepos'] = 'Při odpovídání nebo přeposílání zprávy vložit podpis';
-$labels['belowquote'] = 'pod citaci';
-$labels['abovequote'] = 'nad citaci';
$labels['insertsignature'] = 'Vložit podpis';
$labels['previewpanemarkread'] = 'Označit zobrazené zprávy jako přečtené';
$labels['afternseconds'] = 'po $n sekundách';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorovat slova obsahující čísla';
$labels['spellcheckignorecaps'] = 'Ignorovat slova psaná velkými písmeny';
$labels['addtodict'] = 'Přidat do slovníku';
$labels['mailtoprotohandler'] = 'Zaregistrovat handler pro odkazy „mailto:“';
+$labels['standardwindows'] = 'Zacházet s vyskakovacími okny jako se standardními okny';
$labels['forwardmode'] = 'Přeposlat zprávu';
$labels['inline'] = 'vloženě';
$labels['asattachment'] = 'jako přílohu';
diff --git a/program/localization/cs_CZ/messages.inc b/program/localization/cs_CZ/messages.inc
index cee1bd09a..59b2c6bd6 100644
--- a/program/localization/cs_CZ/messages.inc
+++ b/program/localization/cs_CZ/messages.inc
@@ -24,14 +24,16 @@ $messages['sessionerror'] = 'Vaše přihlášení je neplatné nebo vypršelo';
$messages['storageerror'] = 'Připojení na IMAP server selhalo';
$messages['servererror'] = 'Chyba serveru!';
$messages['servererrormsg'] = 'Chyba serveru: $msg';
-$messages['dberror'] = 'Chyba v databázi!';
+$messages['dberror'] = 'Chyba databáze!';
$messages['requesttimedout'] = 'Došlo k vypršení požadavku';
$messages['errorreadonly'] = 'Příkaz nelze provést, složka je určena jen ke čtení.';
$messages['errornoperm'] = 'Příkaz nelze provést, nemáte oprávnění.';
+$messages['erroroverquota'] = 'Příkaz nelze provést, není volné místo na disku.';
+$messages['erroroverquotadelete'] = 'Není volné místo na disku. Použijte SHIFT+DEL k odstranění zprávy.';
$messages['invalidrequest'] = 'Nesprávný požadavek. Data nebyla uložena.';
$messages['invalidhost'] = 'Špatné jméno serveru.';
$messages['nomessagesfound'] = 'Ve schránce nebyla nalezena žádná zpráva';
-$messages['loggedout'] = 'Byli jste úspěšně odhlášeni. Nashledanou!';
+$messages['loggedout'] = 'Byli jste úspěšně odhlášeni. Na shledanou!';
$messages['mailboxempty'] = 'Schránka je prázdná';
$messages['refreshing'] = 'Obnovuji...';
$messages['loading'] = 'Načítám...';
@@ -124,6 +126,8 @@ $messages['importwait'] = 'Importuji, prosím čekejte...';
$messages['importformaterror'] = 'Import se nezdařil! Typ souboru není podporován.';
$messages['importconfirm'] = 'Úspěšně naimportováno $inserted kontaktů, $skipped existujících záznamů přeskočeno: $names';
$messages['importconfirmskipped'] = '<b>Přeskočeno $skipped existujících položek</b>';
+$messages['importmessagesuccess'] = 'Úspěšně naimportováno $nr zpráv';
+$messages['importmessageerror'] = 'Import se nezdařil! Nahraný soubor není platnou zprávou nebo souborem mailboxu';
$messages['opnotpermitted'] = 'Operace není povolena!';
$messages['nofromaddress'] = 'Chybějící e-mailová adresa v označeném profilu';
$messages['editorwarning'] = 'Přepnutím do režimu prostého textu ztratíte veškeré formátování. Chcete pokračovat?';
diff --git a/program/localization/cy_GB/labels.inc b/program/localization/cy_GB/labels.inc
index 9b695e140..ca1f17426 100644
--- a/program/localization/cy_GB/labels.inc
+++ b/program/localization/cy_GB/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Drafftiau';
$labels['sent'] = 'Danfonwyd';
$labels['trash'] = 'Sbwriel';
$labels['junk'] = 'Sothach';
+$labels['show_real_foldernames'] = 'Dangos enwau go-iawn ar gyfer ffolderi arbennig';
// message listing
$labels['subject'] = 'Pwnc';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Copio';
$labels['move'] = 'Symud';
$labels['moveto'] = 'Symud i...';
$labels['download'] = 'Llwytho lawr';
-$labels['open'] = 'Open';
+$labels['open'] = 'Agor';
$labels['showattachment'] = 'Dangos';
$labels['showanyway'] = 'Dangos beth bynnag';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Tudalen gyfredol';
$labels['unread'] = 'Heb eu darllen';
$labels['flagged'] = 'Nodwyd';
$labels['unanswered'] = 'Heb ei ateb';
+$labels['withattachment'] = 'Gyda atodiad';
$labels['deleted'] = 'Dilewyd';
$labels['undeleted'] = 'Heb ei ddileu';
$labels['invert'] = 'Gwrth-droi';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Golwg rhestr';
$labels['folderactions'] = 'Gweithredoedd ffolder...';
$labels['compact'] = 'Crynhoi';
$labels['empty'] = 'Gwagio';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Defnydd';
$labels['unknown'] = 'anhysbys';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Ail-osod chwiliad';
$labels['searchmod'] = 'Addasyddion chwilio';
$labels['msgtext'] = 'Y neges yn llawn';
$labels['body'] = 'Corff';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Agor mewn ffenest newydd';
$labels['emlsave'] = 'Llwytho lawr (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Dangos mewn fformat testun plaen';
+$labels['changeformathtml'] = 'Dangos mewn fformat HTML';
// message compose
$labels['editasnew'] = 'Golygu fel neges newydd';
@@ -338,8 +342,8 @@ $labels['composeto'] = 'Ysgrifennu neges at';
$labels['contactsfromto'] = 'Cysylltiadau $from i $to o $count';
$labels['print'] = 'Argraffu';
$labels['export'] = 'Allforio';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Allforio popeth';
+$labels['exportsel'] = 'Allforio dewiswyd';
$labels['exportvcards'] = 'Allforio cysylltiadau mewn fformat vCard';
$labels['newcontactgroup'] = 'Creu grŵp cysylltiadau newydd';
$labels['grouprename'] = 'Ail-enwi grŵp';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Dangos y set olaf';
$labels['group'] = 'Grŵp';
$labels['groups'] = 'Grwpiau';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Cyfeiriadau Personol';
$labels['searchsave'] = 'Cadw chwiliad';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Ysgrifennu negeseuon HTML';
$labels['htmlonreply'] = 'wrth ateb i neges HTML yn unig';
$labels['htmlonreplyandforward'] = 'wrth ddanfon ymlaen neu ymateb i neges HTML';
$labels['htmlsignature'] = 'Llofnod HTML';
+$labels['showemail'] = 'Dangos cyfeiriad ebost gyda\'r enw gweledig';
$labels['previewpane'] = 'Dangos ffenest rhagolwg';
$labels['skin'] = 'Croen rhyngwyneb';
$labels['logoutclear'] = 'Clirio\'r Sbwriel wrth allgofnodi';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Wrth ateb, dileu\'r llofnod gwreiddiol o\'r n
$labels['autoaddsignature'] = 'Ychwanegu llofnod yn awtomatig';
$labels['newmessageonly'] = 'negeseuon newydd yn unig';
$labels['replyandforwardonly'] = 'atebion a danfon ymlaen yn unig';
-$labels['replysignaturepos'] = 'Wrth ateb neu ddanfon ymlaen, rhoi\'r llofnod';
-$labels['belowquote'] = 'o dan y dyfynniad';
-$labels['abovequote'] = 'uwchben y dyfynniad';
$labels['insertsignature'] = 'Mewnosod llofnod';
$labels['previewpanemarkread'] = 'Nodi negeseuon rhagolwg fel darllenwyd';
$labels['afternseconds'] = 'ar ôl $n eiliad';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Anwybyddu geiriau gyda rhifau';
$labels['spellcheckignorecaps'] = 'Anwybyddu geiriau sy\'n briflythrennau yn gyfangwbl';
$labels['addtodict'] = 'Ychwanegu i\'r geiriadur';
$labels['mailtoprotohandler'] = 'Cofrestru trafodwr protocol ar gyfer dolenni mailto:';
+$labels['standardwindows'] = 'Trin ffenestri naid fel ffenestri arferol';
$labels['forwardmode'] = 'Danfon neges ymlaen';
$labels['inline'] = 'mewnlin';
$labels['asattachment'] = 'fel atodiad';
diff --git a/program/localization/cy_GB/messages.inc b/program/localization/cy_GB/messages.inc
index 553422948..edadc3b45 100644
--- a/program/localization/cy_GB/messages.inc
+++ b/program/localization/cy_GB/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Gwall Cronfa Ddata!';
$messages['requesttimedout'] = 'Cais wedi dod i derfyn amser';
$messages['errorreadonly'] = 'Methwyd gweithredu. Mae\'r ffolder yn darllen-yn-unig';
$messages['errornoperm'] = 'Methwyd gweithredu. Gwrthodwyd caniatad';
+$messages['erroroverquota'] = 'Methwyd gweithredu. Nid oes gofod gwag ar y disg.';
+$messages['erroroverquotadelete'] = 'Dim gofod gwag ar y disg. Defnyddiwch SHIFT+DEL i ddileu neges.';
$messages['invalidrequest'] = 'Cais annilys! Ni chadwyd unrhyw wybodaeth.';
$messages['invalidhost'] = 'Enw gweinydd annilys.';
$messages['nomessagesfound'] = 'Dim negeseuon wedi eu canfod yn y blwch hwn';
diff --git a/program/localization/da_DK/labels.inc b/program/localization/da_DK/labels.inc
index cb4e3b55c..a5b9b3bc8 100644
--- a/program/localization/da_DK/labels.inc
+++ b/program/localization/da_DK/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Kladder';
$labels['sent'] = 'Sendt post';
$labels['trash'] = 'Papirkurv';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Emne';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Aktuel side';
$labels['unread'] = 'Ulæste';
$labels['flagged'] = 'Markeret';
$labels['unanswered'] = 'Ubesvaret';
+$labels['withattachment'] = 'Med vedhæftning';
$labels['deleted'] = 'Slettede';
$labels['undeleted'] = 'Ikke slettet';
$labels['invert'] = 'Invertér';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Listevisningsmode';
$labels['folderactions'] = 'Mappehandlinger...';
$labels['compact'] = 'Ryd op';
$labels['empty'] = 'Tøm';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Diskforbrug';
$labels['unknown'] = 'ukendt';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Nulstil søgning';
$labels['searchmod'] = 'Søgeparametre';
$labels['msgtext'] = 'Hele beskeden';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Åbn i nyt vindue';
$labels['emlsave'] = 'Download (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Vis i ren tekst format';
+$labels['changeformathtml'] = 'Vis i HTML format';
// message compose
$labels['editasnew'] = 'Redigér som ny';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Vis sidste side';
$labels['group'] = 'Gruppe';
$labels['groups'] = 'Grupper';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personlige adresser';
$labels['searchsave'] = 'Gem søgning';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Skriv HTML-besked';
$labels['htmlonreply'] = 'kun når jeg besvarer HTML-beskeder';
$labels['htmlonreplyandforward'] = 'ved videresendelse eller besvarelse af HTML beskeder';
$labels['htmlsignature'] = 'HTML-signatur';
+$labels['showemail'] = 'Vis email-adresse med vist navn';
$labels['previewpane'] = 'Forhåndsvisning';
$labels['skin'] = 'Brugerflade';
$labels['logoutclear'] = 'Tøm Papirkurv når jeg logger af';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Fjern original signatur fra besked, når der
$labels['autoaddsignature'] = 'Indsæt automatisk signatur';
$labels['newmessageonly'] = 'kun på nye beskeder';
$labels['replyandforwardonly'] = 'kun på svar og videresendelse af beskeder';
-$labels['replysignaturepos'] = 'Når beskeder besvares eller videresendes; indsæt signatur';
-$labels['belowquote'] = 'under det citerede';
-$labels['abovequote'] = 'over det citerede';
$labels['insertsignature'] = 'Indsæt signatur';
$labels['previewpanemarkread'] = 'Markér forhåndsviste beskeder som læst';
$labels['afternseconds'] = 'efter $n sekunder';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorer ord med tal';
$labels['spellcheckignorecaps'] = 'Ignorer ord hvor alle bogstaver er versaler';
$labels['addtodict'] = 'Tilføj til ordbog';
$labels['mailtoprotohandler'] = 'Registrer håndtering af \'mailto:\' links';
+$labels['standardwindows'] = 'Behandl popups som standardvinduer';
$labels['forwardmode'] = 'Videresendelse af besked';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'som vedhæftning';
diff --git a/program/localization/da_DK/messages.inc b/program/localization/da_DK/messages.inc
index 6b8ce1928..9a0b8e4a5 100644
--- a/program/localization/da_DK/messages.inc
+++ b/program/localization/da_DK/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database fejl!';
$messages['requesttimedout'] = 'Forespørgselstiden udløb';
$messages['errorreadonly'] = 'Kunne ikke udføre den ønskede handling. Mappen er skrivebeskyttet.';
$messages['errornoperm'] = 'Kunne ikke udføre den ønskede handling. Adgang nægtet.';
+$messages['erroroverquota'] = 'Kan ikke udføre handlingen. Der er ikke nok ledig diskplads.';
+$messages['erroroverquotadelete'] = 'Der er ikke nok ledig diskplads. Brug SHIFT+DEL til at slette en meddelelse.';
$messages['invalidrequest'] = 'Ugyldig forespørgsel! Ingen data blev gemt.';
$messages['invalidhost'] = 'Ugyldigt servernavn.';
$messages['nomessagesfound'] = 'Der blev ikke fundet nogen beskeder i denne postkasse.';
@@ -163,7 +165,7 @@ $messages['invalidimageformat'] = 'Ikke et gyldigt billedformat.';
$messages['mispellingsfound'] = 'Der er fundet stavefejl i beskeden.';
$messages['parentnotwritable'] = 'Kan ikke oprette/flytte mappe ind i valgt mappe. Ingen adgangsrettigheder.';
$messages['messagetoobig'] = 'Denne del af beskeden er for stor til at blive behandlet.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
+$messages['attachmentvalidationerror'] = 'ADVARSEL! Den vedhæftede fil er mistænkelig - Typen stemmer ikke overens med den oplyste type. Hvis du ikke har tillid til afsender, skal du ikke åbne filen da den kan indholde onsindet indhold. <br/><br/><em>Forventet: $expected; Fundet: $detected</em>';
$messages['noscriptwarning'] = 'Advarsel: Denne webmailclient kræver Javascript! For at kunne bruge den slå venligst Javascripts til i din browserindstillinger.';
?>
diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc
index 98bbd8837..67d42bb05 100644
--- a/program/localization/de_CH/labels.inc
+++ b/program/localization/de_CH/labels.inc
@@ -37,12 +37,13 @@ $labels['drafts'] = 'Entwürfe';
$labels['sent'] = 'Gesendet';
$labels['trash'] = 'Gelöscht';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Spezialordner nicht übersetzen';
// message listing
$labels['subject'] = 'Betreff';
-$labels['from'] = 'Absender';
+$labels['from'] = 'Von';
$labels['sender'] = 'Absender';
-$labels['to'] = 'Empfänger';
+$labels['to'] = 'An';
$labels['cc'] = 'Kopie (CC)';
$labels['bcc'] = 'Blind-Kopie';
$labels['replyto'] = 'Antwort an';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Aktuelle Seite';
$labels['unread'] = 'Ungelesene';
$labels['flagged'] = 'Markierte';
$labels['unanswered'] = 'Unbeantwortete';
+$labels['withattachment'] = 'Mit Anhang';
$labels['deleted'] = 'Gelöschte';
$labels['undeleted'] = 'Nicht gelöscht';
$labels['invert'] = 'Umkehren';
@@ -176,7 +178,7 @@ $labels['threaded'] = 'Gruppiert';
$labels['autoexpand_threads'] = 'Konversationen aufklappen';
$labels['do_expand'] = 'alle';
$labels['expand_only_unread'] = 'nur ungelesene';
-$labels['fromto'] = 'Sender/Empfänger';
+$labels['fromto'] = 'Von/An';
$labels['flag'] = 'Markierung';
$labels['attachment'] = 'Anhang';
$labels['nonesort'] = 'Keine';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Anzeigemodus';
$labels['folderactions'] = 'Ordneraktionen...';
$labels['compact'] = 'Packen';
$labels['empty'] = 'Leeren';
+$labels['importmessages'] = 'Nachrichten importieren';
$labels['quota'] = 'Verwendeter Speicherplatz';
$labels['unknown'] = 'unbekannt';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Löschen';
$labels['searchmod'] = 'Suchkriterien ändern';
$labels['msgtext'] = 'Ganze Nachricht';
$labels['body'] = 'Inhalt';
+$labels['type'] = 'Typ';
$labels['openinextwin'] = 'In neuem Fenster öffnen';
$labels['emlsave'] = 'Herunterladen (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Letzte Seite';
$labels['group'] = 'Gruppe';
$labels['groups'] = 'Gruppen';
+$labels['listgroup'] = 'Gruppenmitglieder anzeigen';
$labels['personaladrbook'] = 'Persönliches Adressbuch';
$labels['searchsave'] = 'Suche speichern';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML-Nachrichten verfassen';
$labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten';
$labels['htmlonreplyandforward'] = 'Antworten oder Weiterleiten einer HTML-Nachricht';
$labels['htmlsignature'] = 'HTML-Signatur';
+$labels['showemail'] = 'E-Mail-Adresse und Namen anzeigen';
$labels['previewpane'] = 'Nachrichtenvorschau anzeigen';
$labels['skin'] = 'Oberflächendesign';
$labels['logoutclear'] = 'Papierkorb beim Abmelden leeren';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Beim Antworten die Signatur der Originalnachr
$labels['autoaddsignature'] = 'Signatur automatisch einfügen';
$labels['newmessageonly'] = 'nur bei neuen Nachrichten';
$labels['replyandforwardonly'] = 'nur bei Antworten und Weiterleitungen';
-$labels['replysignaturepos'] = 'Beim Antworten oder Weiterleiten die Signatur';
-$labels['belowquote'] = 'unter der Originalnachricht einfügen';
-$labels['abovequote'] = 'über der Originalnachricht einfügen';
$labels['insertsignature'] = 'Signatur einfügen';
$labels['previewpanemarkread'] = 'Nachricht in Vorschau als gelesen markieren';
$labels['afternseconds'] = 'nach $n Sekunden';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Wörter mit Ziffern überspringen';
$labels['spellcheckignorecaps'] = 'Wörter überspringen, die nur aus Grossbuchstaben bestehen';
$labels['addtodict'] = 'Zum Wörterbuch hinzufügen';
$labels['mailtoprotohandler'] = 'Als Empfänger für mailto: Links einrichten';
+$labels['standardwindows'] = 'Popups als normale Browserfenster öffnen';
$labels['forwardmode'] = 'Weiterleiten einer Nachricht';
$labels['inline'] = 'eingebettet';
$labels['asattachment'] = 'als Anhang';
diff --git a/program/localization/de_CH/messages.inc b/program/localization/de_CH/messages.inc
index f3697a825..27175be9e 100644
--- a/program/localization/de_CH/messages.inc
+++ b/program/localization/de_CH/messages.inc
@@ -126,6 +126,8 @@ $messages['importwait'] = 'Daten werden importiert, bitte warten...';
$messages['importformaterror'] = 'Import fehlgeschlagen! Die hochgeladene Datei enthält keines der unterstützten Datenformate.';
$messages['importconfirm'] = '<b>Es wurden $inserted Adressen erfolgreich importiert</b>';
$messages['importconfirmskipped'] = '<b>$skipped bestehende Einträge wurden übersprungen</b>';
+$messages['importmessagesuccess'] = '$nr Nachricht(n) erfolgreich importiert';
+$messages['importmessageerror'] = 'Import fehlgeschlagen! Die hochgeladene Datei ist keine E-Mail-Nachricht oder Mailbox-Datei.';
$messages['opnotpermitted'] = 'Operation nicht erlaubt!';
$messages['nofromaddress'] = 'Fehlende E-Mail-Adresse in ausgewählter Identität.';
$messages['editorwarning'] = 'Beim Wechseln in den Texteditor gehen alle Textformatierungen verloren. Möchten Sie fortfahren?';
diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc
index 956e32aa4..662ad2c70 100644
--- a/program/localization/de_DE/labels.inc
+++ b/program/localization/de_DE/labels.inc
@@ -37,12 +37,13 @@ $labels['drafts'] = 'Entwürfe';
$labels['sent'] = 'Gesendet';
$labels['trash'] = 'Gelöscht';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Echte Namen für Spezialordner anzeigen';
// message listing
$labels['subject'] = 'Betreff';
-$labels['from'] = 'Absender';
+$labels['from'] = 'Von';
$labels['sender'] = 'Absender';
-$labels['to'] = 'Empfänger';
+$labels['to'] = 'An';
$labels['cc'] = 'Kopie';
$labels['bcc'] = 'Blindkopie';
$labels['replyto'] = 'Antwort an';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Aktuelle Seite';
$labels['unread'] = 'Ungelesene';
$labels['flagged'] = 'Markierte';
$labels['unanswered'] = 'Unbeantwortete';
+$labels['withattachment'] = 'Mit Anhang';
$labels['deleted'] = 'Gelöschte';
$labels['undeleted'] = 'Nicht gelöscht';
$labels['invert'] = 'Invertieren';
@@ -176,7 +178,7 @@ $labels['threaded'] = 'Gruppiert';
$labels['autoexpand_threads'] = 'Konversationen aufklappen';
$labels['do_expand'] = 'alle';
$labels['expand_only_unread'] = 'nur ungelesene';
-$labels['fromto'] = 'Sender/Empfänger';
+$labels['fromto'] = 'Von/An';
$labels['flag'] = 'Markierung';
$labels['attachment'] = 'Anhang';
$labels['nonesort'] = 'Keine';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Anzeigemodus';
$labels['folderactions'] = 'Ordneraktionen...';
$labels['compact'] = 'Packen';
$labels['empty'] = 'Leeren';
+$labels['importmessages'] = 'Nachrichten importieren';
$labels['quota'] = 'Speicherplatz';
$labels['unknown'] = 'unbekannt';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Suche zurücksetzen';
$labels['searchmod'] = 'Suchkriterien ändern';
$labels['msgtext'] = 'Nachricht';
$labels['body'] = 'Inhalt';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'In neuem Fenster öffnen';
$labels['emlsave'] = 'Lokal speichern (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Letzte Seite';
$labels['group'] = 'Gruppe';
$labels['groups'] = 'Gruppen';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Persönliches Adressbuch';
$labels['searchsave'] = 'Suchergebnisse speichern';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML-Nachrichten verfassen';
$labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten';
$labels['htmlonreplyandforward'] = 'beim Weiterleiten und Beantworten auf HTML-Nachrichten';
$labels['htmlsignature'] = 'HTML-Signatur';
+$labels['showemail'] = 'E-Mail-Adresse mit dem Display Namen anzeigen';
$labels['previewpane'] = 'Nachrichtenvorschau anzeigen';
$labels['skin'] = 'Oberflächendesign';
$labels['logoutclear'] = 'Papierkorb beim Abmelden leeren';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Beim Antworten Signatur der Originalnachricht
$labels['autoaddsignature'] = 'Signatur automatisch einfügen';
$labels['newmessageonly'] = 'nur bei neuen Nachrichten';
$labels['replyandforwardonly'] = 'nur bei Antworten und Weiterleitungen';
-$labels['replysignaturepos'] = 'Beim Antworten die Signatur';
-$labels['belowquote'] = 'unter der Originalnachricht einfügen';
-$labels['abovequote'] = 'über der Originalnachricht einfügen';
$labels['insertsignature'] = 'Signatur einfügen';
$labels['previewpanemarkread'] = 'Nachricht in Vorschau als gelesen markieren';
$labels['afternseconds'] = 'nach $n Sekunden';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Wörter mit Ziffern überspringen';
$labels['spellcheckignorecaps'] = 'Wörter überspringen, die nur aus Großbuchstaben bestehen';
$labels['addtodict'] = 'Zum Wörterbuch hinzufügen';
$labels['mailtoprotohandler'] = 'Als Empfänger für mailto: Links einrichten';
+$labels['standardwindows'] = 'Popups als Standard Windows behandeln';
$labels['forwardmode'] = 'Nachrichtenweiterleitung';
$labels['inline'] = 'eingebettet';
$labels['asattachment'] = 'als Anhang';
diff --git a/program/localization/de_DE/messages.inc b/program/localization/de_DE/messages.inc
index eeaba7db2..ba0936d28 100644
--- a/program/localization/de_DE/messages.inc
+++ b/program/localization/de_DE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Datenbankfehler!';
$messages['requesttimedout'] = 'Zeitüberschreitung der Anforderung';
$messages['errorreadonly'] = 'Die Aktion kann nicht ausgeführt werden. Der Ordner ist schreibgeschützt.';
$messages['errornoperm'] = 'Die Aktion kann nicht ausgeführt werden. Zugriff verweigert.';
+$messages['erroroverquota'] = 'Die Aktion kann nicht ausgeführt werden. Nicht genug freier Speicherplatz.';
+$messages['erroroverquotadelete'] = 'Nicht genug freier Speicherplatz. Verwenden sie SHIFT+ENTF um Nachrichten zu löschen.';
$messages['invalidrequest'] = 'Ungültige Anfrage! Es wurden keine Daten gespeichert.';
$messages['invalidhost'] = 'Ungültiger Server Name';
$messages['nomessagesfound'] = 'Keine Nachrichten in diesem Ordner.';
diff --git a/program/localization/el_GR/labels.inc b/program/localization/el_GR/labels.inc
index b3166730f..d3030e574 100644
--- a/program/localization/el_GR/labels.inc
+++ b/program/localization/el_GR/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Πρόχειρα';
$labels['sent'] = 'Απεσταλμένα';
$labels['trash'] = 'Κάδος Απορριμάτων';
$labels['junk'] = 'Ανεπιθύμητα';
+$labels['show_real_foldernames'] = 'Εμφάνιση πραγματικών ονομάτων για ειδικούς φακέλους';
// message listing
$labels['subject'] = 'Θέμα';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Αντιγραφή';
$labels['move'] = 'Μετακίνηση';
$labels['moveto'] = 'Μετακίνηση σε...';
$labels['download'] = 'Λήψη';
-$labels['open'] = 'Open';
+$labels['open'] = 'Ανοιγμα';
$labels['showattachment'] = 'Εμφάνιση';
$labels['showanyway'] = 'Εμφάνιση';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Τρέχουσα σελίδα';
$labels['unread'] = 'Μη αναγνωσμένο';
$labels['flagged'] = 'Σημειωμένο';
$labels['unanswered'] = 'Αναπάντητο';
+$labels['withattachment'] = 'Με επισύναψη';
$labels['deleted'] = 'Διεγραμμένο';
$labels['undeleted'] = 'Μη διεγραμμένο';
$labels['invert'] = 'Αναστροφή';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Προβολή σε λίστα';
$labels['folderactions'] = 'Ενέργειες στους φακέλους';
$labels['compact'] = 'Συμπίεση';
$labels['empty'] = 'Άδειασμα';
+$labels['importmessages'] = 'Εισαγωγή μηνυμάτων';
$labels['quota'] = 'Χρήση δίσκου';
$labels['unknown'] = 'άγνωστο';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Επαναφορά Αναζήτησης';
$labels['searchmod'] = 'Aλλαγή αναζήτησης';
$labels['msgtext'] = 'Σε όλο το μήνυμα';
$labels['body'] = 'Σώμα';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Άνοιγμα σε νέο παράθυρο';
$labels['emlsave'] = 'Λήψη αρχείου (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Εμφάνιση σε μορφή απλού κειμένου';
+$labels['changeformathtml'] = 'Εμφάνιση σε μορφή HTML';
// message compose
$labels['editasnew'] = 'Επεξεργασία σαν νέο';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Εμφάνιση της τελευταίας σελ
$labels['group'] = 'Ομάδα';
$labels['groups'] = 'Ομάδες';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Προσωπικές Διυθύνσεις';
$labels['searchsave'] = 'Αποθήκευση αναζήτησης';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Δημιουργία μηνύματος σε μορφή
$labels['htmlonreply'] = 'μόνο σε απάντηση μηνύματος μορφής HTML';
$labels['htmlonreplyandforward'] = 'σε προώθηση ή σε απάντηση σε HTML μήνυμα';
$labels['htmlsignature'] = 'Υπογραφή HTML';
+$labels['showemail'] = 'Εμφάνιση διεύθυνσης e-mail με το εμφανιζόμενο όνομα';
$labels['previewpane'] = 'Εμφάνιση προεπισκόπησης';
$labels['skin'] = 'Θέμα εμφάνισης';
$labels['logoutclear'] = 'Άδειασμα του κάδου στην έξοδο';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Όταν το μήνυμα είναι απά
$labels['autoaddsignature'] = 'Η υπογραφή να προστίθεται αυτόματα';
$labels['newmessageonly'] = 'μόνο στα νέα μηνύματα';
$labels['replyandforwardonly'] = 'μόνο στις απαντήσεις και προωθήσεις';
-$labels['replysignaturepos'] = 'Όταν γίνεται απάντηση ή προώθηση, η υπογραφή να τοποθετείτε';
-$labels['belowquote'] = 'πάνω από την παράθεση';
-$labels['abovequote'] = 'κάτω από την παράθεση';
$labels['insertsignature'] = 'Προσθήκη υπογραφής';
$labels['previewpanemarkread'] = 'Στα μηνύματα που έγινε προεπισκόπηση να μαρκάρονται σαν αναγνωσμένα';
$labels['afternseconds'] = 'μετά από $n δευτερόλεπτα';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Οι λέξεις που περιέχουν
$labels['spellcheckignorecaps'] = 'Οι λέξεις γραμμένες με ΚΕΦΑΛΑΙΑ να αγνοούνται';
$labels['addtodict'] = 'Προσθήκη στο λεξικό';
$labels['mailtoprotohandler'] = 'Καταχώρηση διαχείρισης πρωτοκόλλου δεσμών mailto:';
+$labels['standardwindows'] = 'Χειριστείτε τα αναδυόμενα παράθυρα ως πρότυπο των Windows';
$labels['forwardmode'] = 'Προώθηση μηνυμάτων';
$labels['inline'] = 'με εσνωμάτωση';
$labels['asattachment'] = 'σαν επισύναψη';
diff --git a/program/localization/el_GR/messages.inc b/program/localization/el_GR/messages.inc
index 542066efa..dc2499d8b 100644
--- a/program/localization/el_GR/messages.inc
+++ b/program/localization/el_GR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Σφάλμα βάσης δεδομένων!';
$messages['requesttimedout'] = 'Το αίτημα εξέπνευσε χρονικά';
$messages['errorreadonly'] = 'Η διαδικασία δεν μπορεί να ολοκληρωθεί. Ο φάκελος είναι μόνο για ανάγνωση.';
$messages['errornoperm'] = 'Η διαδικασία δεν μπορεί να ολοκληρωθεί. Άρνηση άδειας';
+$messages['erroroverquota'] = 'Δεν είναι δυνατή η εκτέλεση της λειτουργίας. Δεν υπάρχει ελεύθερος χώρος στο δίσκο. ';
+$messages['erroroverquotadelete'] = 'Δεν υπάρχει ελεύθερος χώρος στο δίσκο. Χρησιμοποιήστε το συνδυασμό πλήκτρων SHIFT DEL για να διαγράψετε ένα μήνυμα.';
$messages['invalidrequest'] = 'Λανθασμένο αίτημα! Δεν αποθηκεύτηκαν δεδομένα.';
$messages['invalidhost'] = 'Άκυρο όνομα εξυπηρετητή.';
$messages['nomessagesfound'] = 'Δε βρέθηκαν μηνύματα σε αυτή τη θυρίδα';
@@ -90,8 +92,8 @@ $messages['searching'] = 'Αναζήτηση...';
$messages['checking'] = 'Έλεγχος...';
$messages['nospellerrors'] = 'Δε βρέθηκαν ορθογραφικά λάθη';
$messages['folderdeleted'] = 'Ο φάκελος διαγράφηκε επιτυχώς';
-$messages['foldersubscribed'] = 'Folder successfully subscribed.';
-$messages['folderunsubscribed'] = 'Folder successfully unsubscribed.';
+$messages['foldersubscribed'] = 'Ο φάκελος εχει εγγραφεί με επιτυχία.';
+$messages['folderunsubscribed'] = 'Ο φάκελος διαγράφηκε επιτυχώς';
$messages['folderpurged'] = 'Ο φάκελος καθαρίστηκε με επιτυχία.';
$messages['folderexpunged'] = 'Ο φάκελος συμπιέστηκε με επιτυχία.';
$messages['deletedsuccessfully'] = 'Διαγραφή Επιτυχώς';
@@ -119,9 +121,9 @@ $messages['selectimportfile'] = 'Επιλέξτε αρχείο για ανέβα
$messages['addresswriterror'] = 'Η επιλεγμένη ατζέντα διευθύνσεων δεν είνα εγγράψιμη';
$messages['contactaddedtogroup'] = 'Οι επαφές προστέθηκαν στην ομάδα με επιτυχία.';
$messages['contactremovedfromgroup'] = 'Οι επαφές αφαιρέθηκαν από την ομάδα με επιτυχία.';
-$messages['nogroupassignmentschanged'] = 'No group assignments changed.';
+$messages['nogroupassignmentschanged'] = 'Οι αναθεσεις της ομαδας δεν αλλαξαν.';
$messages['importwait'] = 'Εισαγωγή, παρακαλώ περιμένετε...';
-$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
+$messages['importformaterror'] = 'Η εισαγωγή απέτυχε! Το αρχείο δεν είναι έγκυρο εισαγωγής δεδομένων.';
$messages['importconfirm'] = '<b>Εισήχθησαν $inserted επαφές με επιτυχία</b>';
$messages['importconfirmskipped'] = '<b>Παραλήφθηκαν $skipped υπάρχοντα αντικείμενα</b>';
$messages['opnotpermitted'] = 'Η λειτουργία δεν επιτρέπεται!';
@@ -140,30 +142,30 @@ $messages['maxgroupmembersreached'] = 'Ο αριθμός των μελών τη
$messages['internalerror'] = 'Προέκυψε ένα εσωτερικό σφάλμα. Παρακαλώ δοκιμάστε πάλι.';
$messages['contactdelerror'] = 'Δεν είναι δυνατή η διαγραφή της επαφής/ων';
$messages['contactdeleted'] = 'Η επαφή/ές διαγράφηκαν με επιτυχία.';
-$messages['contactrestoreerror'] = 'Could not restore deleted contact(s).';
-$messages['contactrestored'] = 'Contact(s) restored successfully.';
-$messages['groupdeleted'] = 'Group deleted successfully.';
-$messages['grouprenamed'] = 'Group renamed successfully.';
-$messages['groupcreated'] = 'Group created successfully.';
-$messages['savedsearchdeleted'] = 'Saved search deleted successfully.';
-$messages['savedsearchdeleteerror'] = 'Could not delete saved search.';
-$messages['savedsearchcreated'] = 'Saved search created successfully.';
-$messages['savedsearchcreateerror'] = 'Could not create saved search.';
-$messages['messagedeleted'] = 'Message(s) deleted successfully.';
-$messages['messagemoved'] = 'Message(s) moved successfully.';
-$messages['messagecopied'] = 'Message(s) copied successfully.';
-$messages['messagemarked'] = 'Message(s) marked successfully.';
-$messages['autocompletechars'] = 'Enter at least $min characters for autocompletion.';
-$messages['autocompletemore'] = 'More matching entries found. Please type more characters.';
-$messages['namecannotbeempty'] = 'Name cannot be empty.';
-$messages['nametoolong'] = 'Name is too long.';
-$messages['folderupdated'] = 'Folder updated successfully.';
-$messages['foldercreated'] = 'Folder created successfully.';
-$messages['invalidimageformat'] = 'Not a valid image format.';
-$messages['mispellingsfound'] = 'Spelling errors detected in the message.';
-$messages['parentnotwritable'] = 'Unable to create/move folder into selected parent folder. No access rights.';
-$messages['messagetoobig'] = 'The message part is too big to process it.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
-$messages['noscriptwarning'] = 'Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser\'s settings.';
+$messages['contactrestoreerror'] = 'Οι διαγραφημενη επαφη(ες) δεν μπορουν να επαναφερθουν.';
+$messages['contactrestored'] = 'Η επαφη(ες) επαναφερθηκαν.';
+$messages['groupdeleted'] = 'Η ομαδα διαγράφηκε επιτυχώς.';
+$messages['grouprenamed'] = 'Η ομαδα μετονομαστηκε επιτυχως.';
+$messages['groupcreated'] = 'Η ομαδα δημιουργηθηκε επιτυχως.';
+$messages['savedsearchdeleted'] = 'Η αποθηκευμένη αναζήτηση διαγράφηκε επιτυχως. ';
+$messages['savedsearchdeleteerror'] = 'Δεν ήταν δυνατή η διαγραφή της αποθηκευμένης αναζήτησης.';
+$messages['savedsearchcreated'] = 'Η αποθηκευμένη αναζητήση δημιουργήθηκε με επιτυχία. ';
+$messages['savedsearchcreateerror'] = 'Η αποθηκευμενη αναζητηση δεν μπορεσε να δημιουργηθει.';
+$messages['messagedeleted'] = 'Το μυνημα(τα) διαγραφηκαν επιτυχως.';
+$messages['messagemoved'] = 'Το μυνημα(τα) μετακινηθηκαν επιτυχως.';
+$messages['messagecopied'] = 'Το μυνημα(τα) αντιγραφθηκαν επιτυχως.';
+$messages['messagemarked'] = 'Το μυνημα(τα) μαρκαρισθηκαν επιτυχως.';
+$messages['autocompletechars'] = 'Εισάγετε τουλάχιστον $min χαρακτήρες για αυτόματη συμπλήρωση.';
+$messages['autocompletemore'] = 'Περισσότερες ταιριάστες καταχωρήσεις βρέθηκαν. Πληκτρολογείστε περισσότερους χαρακτήρες.';
+$messages['namecannotbeempty'] = 'Το ονομα δεν μπορεί να είναι κενό.';
+$messages['nametoolong'] = 'Το όνομα είναι πολύ μεγάλο.';
+$messages['folderupdated'] = 'Ο φάκελος ανανεωθηκε επιτυχώς.';
+$messages['foldercreated'] = 'Ο φάκελος δημιουργηθηκε επιτυχώς.';
+$messages['invalidimageformat'] = 'Μη έγκυρη μορφή εικόνας. ';
+$messages['mispellingsfound'] = 'Ορθογραφικά λάθη εντοπίστηκαν στο μήνυμα. ';
+$messages['parentnotwritable'] = 'Δεν είναι δυνατή η δημιουργία/μετακινήση φάκελου σε επιλεγμένο φάκελο γονέα. Κανένα δικαίωμα πρόσβασης. ';
+$messages['messagetoobig'] = 'Το τμήμα μήνυματος είναι πολύ μεγάλο για επεξεργασια. ';
+$messages['attachmentvalidationerror'] = 'ΠΡΟΕΙΔΟΠΟΊΗΣΗ! Αυτή η κατάσχεση είναι ύποπτη, επειδή ο τύπος δεν ταιριάζει με τον τύπο που δηλώνεται στο μήνυμα. Εάν δεν εμπιστεύεστε τον αποστολέα, δεν θα πρέπει να το ανοίγετε στο πρόγραμμα περιήγησης επειδή μπορεί να περιέχει κακόβουλο περιεχόμενο.<br/><br/><em>Expected: $expected; found: $detected</em> ';
+$messages['noscriptwarning'] = 'Προειδοποίηση : Αυτή η υπηρεσία webmail απαιτεί Javascript! Για να ΤΟ χρησιμοποιήσετε ενεργοποιήστε τΟ JavaScript στις ρυθμίσεις του browser σας. ';
?>
diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc
index 49b6be519..f903b0cf5 100644
--- a/program/localization/en_GB/labels.inc
+++ b/program/localization/en_GB/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Drafts';
$labels['sent'] = 'Sent';
$labels['trash'] = 'Deleted Items';
$labels['junk'] = 'Junk';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Subject';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Unread';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Compact';
$labels['empty'] = 'Empty';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disk usage';
$labels['unknown'] = 'unknown';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Reset search';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Show last set';
$labels['group'] = 'Group';
$labels['groups'] = 'Groups';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personal Addresses';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
$labels['htmlonreply'] = 'on reply to HTML message only';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Show preview pane';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalised';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/en_GB/messages.inc b/program/localization/en_GB/messages.inc
index f819147b0..21e7539b4 100644
--- a/program/localization/en_GB/messages.inc
+++ b/program/localization/en_GB/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'No messages found in this mailbox.';
diff --git a/program/localization/en_US/csv2vcard.inc b/program/localization/en_US/csv2vcard.inc
index 5412f7e20..e7b86795b 100644
--- a/program/localization/en_US/csv2vcard.inc
+++ b/program/localization/en_US/csv2vcard.inc
@@ -91,3 +91,20 @@ $map['work_phone'] = "Work Phone";
$map['work_address'] = "Work Address";
$map['work_country'] = "Work Country";
$map['work_zipcode'] = "Work ZipCode";
+
+// Atmail
+$map['date_of_birth'] = "Date of Birth";
+$map['email'] = "Email";
+$map['home_mobile'] = "Home Mobile";
+$map['home_zip'] = "Home Zip";
+$map['info'] = "Info";
+$map['user_photo'] = "User Photo";
+$map['url'] = "URL";
+$map['work_city'] = "Work City";
+$map['work_company'] = "Work Company";
+$map['work_dept'] = "Work Dept";
+$map['work_fax'] = "Work Fax";
+$map['work_mobile'] = "Work Mobile";
+$map['work_state'] = "Work State";
+$map['work_title'] = "Work Title";
+$map['work_zip'] = "Work Zip";
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 252e0ce68..1865bcb3d 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Drafts';
$labels['sent'] = 'Sent';
$labels['trash'] = 'Trash';
$labels['junk'] = 'Junk';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Subject';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Unread';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Compact';
$labels['empty'] = 'Empty';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disk usage';
$labels['unknown'] = 'unknown';
@@ -202,6 +205,8 @@ $labels['resetsearch'] = 'Reset search';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
+$labels['namex'] = 'Name';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +358,7 @@ $labels['lastpage'] = 'Show last page';
$labels['group'] = 'Group';
$labels['groups'] = 'Groups';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personal Addresses';
$labels['searchsave'] = 'Save search';
@@ -401,6 +407,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Show preview pane';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +461,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +477,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc
index f9b5e00a6..47b0f797d 100644
--- a/program/localization/en_US/messages.inc
+++ b/program/localization/en_US/messages.inc
@@ -101,13 +101,16 @@ $messages['converting'] = 'Removing formatting...';
$messages['messageopenerror'] = 'Could not load message from server.';
$messages['fileuploaderror'] = 'File upload failed.';
$messages['filesizeerror'] = 'The uploaded file exceeds the maximum size of $size.';
-$messages['copysuccess'] = 'Successfully copied $nr addresses.';
-$messages['copyerror'] = 'Could not copy any addresses.';
+$messages['copysuccess'] = 'Successfully copied $nr contacts.';
+$messages['movesuccess'] = 'Successfully moved $nr contacts.';
+$messages['copyerror'] = 'Could not copy any contacts.';
+$messages['moveerror'] = 'Could not move any contacts.';
$messages['sourceisreadonly'] = 'This address source is read only.';
$messages['errorsavingcontact'] = 'Could not save the contact address.';
$messages['movingmessage'] = 'Moving message(s)...';
$messages['copyingmessage'] = 'Copying message(s)...';
$messages['copyingcontact'] = 'Copying contact(s)...';
+$messages['movingcontact'] = 'Moving contact(s)...';
$messages['deletingmessage'] = 'Deleting message(s)...';
$messages['markingmessage'] = 'Marking message(s)...';
$messages['addingmember'] = 'Adding contact(s) to the group...';
@@ -126,6 +129,8 @@ $messages['importwait'] = 'Importing, please wait...';
$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
$messages['importconfirm'] = '<b>Successfully imported $inserted contacts</b>';
$messages['importconfirmskipped'] = '<b>Skipped $skipped existing entries</b>';
+$messages['importmessagesuccess'] = 'Successfully imported $nr messages';
+$messages['importmessageerror'] = 'Import failed! The uploaded file is not a valid message or mailbox file';
$messages['opnotpermitted'] = 'Operation not permitted!';
$messages['nofromaddress'] = 'Missing e-mail address in selected identity.';
$messages['editorwarning'] = 'Switching to the plain text editor will cause all text formatting to be lost. Do you wish to continue?';
diff --git a/program/localization/eo/labels.inc b/program/localization/eo/labels.inc
index 823fc25cb..3c2930c89 100644
--- a/program/localization/eo/labels.inc
+++ b/program/localization/eo/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Malnetujo';
$labels['sent'] = 'Senditujo';
$labels['trash'] = 'Rubujo';
$labels['junk'] = 'Spamujo';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Temo';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Nuna paĝo';
$labels['unread'] = 'Nelegitan';
$labels['flagged'] = 'Markita';
$labels['unanswered'] = 'Nerespondita';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Forigita';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Inversigu';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Dosierujo-agoj';
$labels['compact'] = 'Kompakta';
$labels['empty'] = 'Malplena';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Diskuzo';
$labels['unknown'] = 'nekonata';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Vakigu serĉon';
$labels['searchmod'] = 'Serĉ-opcioj';
$labels['msgtext'] = 'Tuta mesaĝo';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Malfermu en nova fenestro';
$labels['emlsave'] = 'Elŝutu (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Montru lastan';
$labels['group'] = 'Group';
$labels['groups'] = 'Grupoj';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Persona Adresoj';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Uzado de HTML-redaktilo';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML subskribo';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Montru antaŭrigardejon';
$labels['skin'] = 'Interfaco-etoso';
$labels['logoutclear'] = 'Malplenigu rubujon je eliro';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/eo/messages.inc b/program/localization/eo/messages.inc
index 32771733d..4d72fe54b 100644
--- a/program/localization/eo/messages.inc
+++ b/program/localization/eo/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Datumbaz-eraro!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Ne povis fari agon. Dosierujo estas nurlega';
$messages['errornoperm'] = 'Ne povis fari agon. Ne havas permeson.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Nevalida peto';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Neniu mesaĝo en ĉi tiu dosierujo';
diff --git a/program/localization/es_AR/labels.inc b/program/localization/es_AR/labels.inc
index 3e6793e51..5bc53f7f0 100644
--- a/program/localization/es_AR/labels.inc
+++ b/program/localization/es_AR/labels.inc
@@ -37,11 +37,12 @@ $labels['drafts'] = 'Borradores';
$labels['sent'] = 'Enviados';
$labels['trash'] = 'Papelera';
$labels['junk'] = 'Basura';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Asunto';
$labels['from'] = 'Remitente';
-$labels['sender'] = 'Sender';
+$labels['sender'] = 'Remitente';
$labels['to'] = 'Destinatario';
$labels['cc'] = 'Copia';
$labels['bcc'] = 'Cco';
@@ -52,21 +53,21 @@ $labels['size'] = 'Tamaño';
$labels['priority'] = 'Prioridad';
$labels['organization'] = 'Organización';
$labels['readstatus'] = 'Read status';
-$labels['listoptions'] = 'List options...';
+$labels['listoptions'] = 'Listar opciones...';
$labels['mailboxlist'] = 'Carpetas';
$labels['messagesfromto'] = 'Mensajes $from a $to de $count';
-$labels['threadsfromto'] = 'Threads $from to $to of $count';
+$labels['threadsfromto'] = '$from a $to de $count conversaciones';
$labels['messagenrof'] = 'Mensaje $nr de $count';
-$labels['fromtoshort'] = '$from – $to of $count';
+$labels['fromtoshort'] = '$from – $to de $count';
$labels['copy'] = 'Copiar';
$labels['move'] = 'Mover';
$labels['moveto'] = 'Mover a...';
$labels['download'] = 'Descargar';
$labels['open'] = 'Open';
-$labels['showattachment'] = 'Show';
-$labels['showanyway'] = 'Show it anyway';
+$labels['showattachment'] = 'Mostrar';
+$labels['showanyway'] = 'Mostrar esto siempre';
$labels['filename'] = 'Nombre del archivo';
$labels['filesize'] = 'Tamaño del archivo';
@@ -122,18 +123,18 @@ $labels['longdec'] = 'Diciembre';
$labels['today'] = 'Hoy';
// toolbar buttons
-$labels['refresh'] = 'Refresh';
+$labels['refresh'] = 'Actualizar';
$labels['checkmail'] = 'Revisar si hay nuevos mensajes';
$labels['compose'] = 'Escribir un mensaje';
$labels['writenewmessage'] = 'Crear nuevo mensaje';
-$labels['reply'] = 'Reply';
+$labels['reply'] = 'Responder';
$labels['replytomessage'] = 'Responder mensaje';
$labels['replytoallmessage'] = 'Responder al emisor y a todos los destinatarios';
-$labels['replyall'] = 'Reply all';
-$labels['replylist'] = 'Reply list';
-$labels['forward'] = 'Forward';
-$labels['forwardinline'] = 'Forward inline';
-$labels['forwardattachment'] = 'Forward as attachment';
+$labels['replyall'] = 'Responder a todos';
+$labels['replylist'] = 'Responder a lista';
+$labels['forward'] = 'Reenviar';
+$labels['forwardinline'] = 'Reenviar en linea';
+$labels['forwardattachment'] = 'Reenviar como adjunto';
$labels['forwardmessage'] = 'Reenviar mensaje';
$labels['deletemessage'] = 'Eliminar mensaje';
$labels['movemessagetotrash'] = 'Mover mensaje a la papelera';
@@ -144,16 +145,16 @@ $labels['nextmessage'] = 'Mostrar siguente mensaje';
$labels['lastmessage'] = 'Mostrar último mensaje';
$labels['backtolist'] = 'Volver a la lista de mensajes';
$labels['viewsource'] = 'Mostrar código';
-$labels['mark'] = 'Mark';
+$labels['mark'] = 'Marcar';
$labels['markmessages'] = 'Marcar mensajes';
$labels['markread'] = 'Como leído';
$labels['markunread'] = 'Como no leído';
$labels['markflagged'] = 'Como marcado';
$labels['markunflagged'] = 'Como no marcado';
-$labels['moreactions'] = 'More actions...';
-$labels['more'] = 'More';
-$labels['back'] = 'Back';
-$labels['options'] = 'Options';
+$labels['moreactions'] = 'Mas acciones...';
+$labels['more'] = 'Más';
+$labels['back'] = 'Atrás';
+$labels['options'] = 'Opciones';
$labels['select'] = 'Elija';
$labels['all'] = 'Todos';
@@ -162,36 +163,38 @@ $labels['currpage'] = 'Página actual';
$labels['unread'] = 'Sin leer';
$labels['flagged'] = 'Marcado';
$labels['unanswered'] = 'Sin respuesta';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Eliminado';
-$labels['undeleted'] = 'Not deleted';
+$labels['undeleted'] = 'No eliminado';
$labels['invert'] = 'Invertir';
$labels['filter'] = 'Filtrar';
-$labels['list'] = 'List';
-$labels['threads'] = 'Threads';
+$labels['list'] = 'Lista';
+$labels['threads'] = 'Conversaciones';
$labels['expand-all'] = 'Expandir Todos';
$labels['expand-unread'] = 'Expandir No Leidos';
$labels['collapse-all'] = 'Colapsar Todos';
-$labels['threaded'] = 'Threaded';
+$labels['threaded'] = 'Como conversaciones';
-$labels['autoexpand_threads'] = 'Expand message threads';
-$labels['do_expand'] = 'all threads';
+$labels['autoexpand_threads'] = 'Expandir mensajes en conversación';
+$labels['do_expand'] = 'todas las conversaciones';
$labels['expand_only_unread'] = 'solo con mensajes no leídos';
-$labels['fromto'] = 'From/To';
-$labels['flag'] = 'Flag';
+$labels['fromto'] = 'De/A';
+$labels['flag'] = 'Marca';
$labels['attachment'] = 'Adjunto';
$labels['nonesort'] = 'Ninguno';
$labels['sentdate'] = 'Fecha de Enviado';
$labels['arrival'] = 'Fecha de Recepción';
$labels['asc'] = 'Ascendente';
$labels['desc'] = 'Descendente';
-$labels['listcolumns'] = 'List columns';
-$labels['listsorting'] = 'Sorting column';
-$labels['listorder'] = 'Sorting order';
+$labels['listcolumns'] = 'Listar columnas';
+$labels['listsorting'] = 'Ordenar por';
+$labels['listorder'] = 'Ordenado por';
$labels['listmode'] = 'List view mode';
-$labels['folderactions'] = 'Folder actions...';
+$labels['folderactions'] = 'Acciones de carpeta...';
$labels['compact'] = 'Compactar';
$labels['empty'] = 'Vaciar';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Uso de disco';
$labels['unknown'] = 'desconocido';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Reajustar la búsqueda';
$labels['searchmod'] = 'Opciones de búsqueda';
$labels['msgtext'] = 'Mensaje completo';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Abrir en ventana nueva';
$labels['emlsave'] = 'Guardar (.eml)';
@@ -210,29 +214,29 @@ $labels['changeformathtml'] = 'Display in HTML format';
// message compose
$labels['editasnew'] = 'Editar como nuevo';
-$labels['send'] = 'Send';
+$labels['send'] = 'Enviar';
$labels['sendmessage'] = 'Enviar ahora el mensaje';
$labels['savemessage'] = 'Guardar como borrador';
$labels['addattachment'] = 'Añadir un archivo';
$labels['charset'] = 'Codificación';
$labels['editortype'] = 'Tipo de editor';
$labels['returnreceipt'] = 'Acuse de recibo';
-$labels['dsn'] = 'Delivery status notification';
-$labels['mailreplyintro'] = 'On $date, $sender wrote:';
-$labels['originalmessage'] = 'Original Message';
+$labels['dsn'] = 'Notificación de estado del envío';
+$labels['mailreplyintro'] = 'El $date, $sender escribió:';
+$labels['originalmessage'] = 'Mensaje original';
-$labels['editidents'] = 'Edit identities';
-$labels['spellcheck'] = 'Spell';
+$labels['editidents'] = 'Editar identidades';
+$labels['spellcheck'] = 'Gramática';
$labels['checkspelling'] = 'Revisar ortografía';
$labels['resumeediting'] = 'Continuar edición';
$labels['revertto'] = 'Revertir a';
-$labels['attach'] = 'Attach';
+$labels['attach'] = 'Adjuntar';
$labels['attachments'] = 'Adjuntos';
$labels['upload'] = 'Agregar';
-$labels['uploadprogress'] = '$percent ($current from $total)';
+$labels['uploadprogress'] = '$percent ($current de $total)';
$labels['close'] = 'Cerrar';
-$labels['messageoptions'] = 'Message options...';
+$labels['messageoptions'] = 'Opciones de mensaje...';
$labels['low'] = 'Bajo';
$labels['lowest'] = 'Bajísimo';
@@ -243,9 +247,9 @@ $labels['highest'] = 'Altísimo';
$labels['nosubject'] = '(sin asunto)';
$labels['showimages'] = 'Mostrar imágenes';
$labels['alwaysshow'] = 'Siempre mostrar imágenes de $sender';
-$labels['isdraft'] = 'This is a draft message.';
-$labels['andnmore'] = '$nr more...';
-$labels['togglemoreheaders'] = 'Show more message headers';
+$labels['isdraft'] = 'Este es un borrador.';
+$labels['andnmore'] = '$nr más...';
+$labels['togglemoreheaders'] = 'Mostrarme más encabezados de mensaje';
$labels['togglefullheaders'] = 'Toggle raw message headers';
$labels['htmltoggle'] = 'HTML';
@@ -269,68 +273,68 @@ $labels['receiptnote'] = 'Nota: Esta notificación sólo significa que su mensaj
$labels['name'] = 'Nombre completo';
$labels['firstname'] = 'Nombre';
$labels['surname'] = 'Apellido';
-$labels['middlename'] = 'Middle Name';
-$labels['nameprefix'] = 'Prefix';
-$labels['namesuffix'] = 'Suffix';
-$labels['nickname'] = 'Nickname';
-$labels['jobtitle'] = 'Job Title';
-$labels['department'] = 'Department';
-$labels['gender'] = 'Gender';
-$labels['maidenname'] = 'Maiden Name';
+$labels['middlename'] = 'Segundo nombre';
+$labels['nameprefix'] = 'Prefijo';
+$labels['namesuffix'] = 'Subfijo';
+$labels['nickname'] = 'Sobre nombre';
+$labels['jobtitle'] = 'Puesto';
+$labels['department'] = 'Departamento';
+$labels['gender'] = 'Sexo';
+$labels['maidenname'] = 'Apellido de soltera';
$labels['email'] = 'Correo';
-$labels['phone'] = 'Phone';
-$labels['address'] = 'Address';
-$labels['street'] = 'Street';
-$labels['locality'] = 'City';
-$labels['zipcode'] = 'ZIP Code';
-$labels['region'] = 'State/Province';
-$labels['country'] = 'Country';
-$labels['birthday'] = 'Birthday';
-$labels['anniversary'] = 'Anniversary';
-$labels['website'] = 'Website';
-$labels['instantmessenger'] = 'IM';
-$labels['notes'] = 'Notes';
-$labels['male'] = 'male';
-$labels['female'] = 'female';
-$labels['manager'] = 'Manager';
-$labels['assistant'] = 'Assistant';
-$labels['spouse'] = 'Spouse';
-$labels['allfields'] = 'All fields';
-$labels['search'] = 'Search';
-$labels['advsearch'] = 'Advanced Search';
-$labels['advanced'] = 'Advanced';
-$labels['other'] = 'Other';
-
-$labels['typehome'] = 'Home';
-$labels['typework'] = 'Work';
-$labels['typeother'] = 'Other';
-$labels['typemobile'] = 'Mobile';
-$labels['typemain'] = 'Main';
-$labels['typehomefax'] = 'Home Fax';
-$labels['typeworkfax'] = 'Work Fax';
-$labels['typecar'] = 'Car';
+$labels['phone'] = 'Teléfono';
+$labels['address'] = 'Dirección';
+$labels['street'] = 'Calle';
+$labels['locality'] = 'Ciudad';
+$labels['zipcode'] = 'Código Postal';
+$labels['region'] = 'Estado/Provincia';
+$labels['country'] = 'País';
+$labels['birthday'] = 'Cumpleaños';
+$labels['anniversary'] = 'Aniversario';
+$labels['website'] = 'Sitio Web';
+$labels['instantmessenger'] = 'Mensajería Instantanea';
+$labels['notes'] = 'Notas';
+$labels['male'] = 'masculino';
+$labels['female'] = 'femenino';
+$labels['manager'] = 'Administrador';
+$labels['assistant'] = 'Asistente';
+$labels['spouse'] = 'Cónygue';
+$labels['allfields'] = 'Todos los campos';
+$labels['search'] = 'Buscar';
+$labels['advsearch'] = 'Búsqueda Avanzada';
+$labels['advanced'] = 'Avanzado';
+$labels['other'] = 'Otro';
+
+$labels['typehome'] = 'Particular';
+$labels['typework'] = 'Laboral';
+$labels['typeother'] = 'Otro';
+$labels['typemobile'] = 'Móvil';
+$labels['typemain'] = 'Principal';
+$labels['typehomefax'] = 'Fax Particular';
+$labels['typeworkfax'] = 'Fax Laboral';
+$labels['typecar'] = 'Auto';
$labels['typepager'] = 'Pager';
$labels['typevideo'] = 'Video';
-$labels['typeassistant'] = 'Assistant';
-$labels['typehomepage'] = 'Home Page';
+$labels['typeassistant'] = 'Asistente';
+$labels['typehomepage'] = 'Página Personal';
$labels['typeblog'] = 'Blog';
-$labels['typeprofile'] = 'Profile';
+$labels['typeprofile'] = 'Perfil';
-$labels['addfield'] = 'Add field...';
+$labels['addfield'] = 'Agregar campo...';
$labels['addcontact'] = 'Añadir nuevo contacto';
$labels['editcontact'] = 'Editar contacto';
-$labels['contacts'] = 'Contacts';
-$labels['contactproperties'] = 'Contact properties';
-$labels['personalinfo'] = 'Personal information';
+$labels['contacts'] = 'Contactos';
+$labels['contactproperties'] = 'Propiedades del contacto';
+$labels['personalinfo'] = 'Información personal';
$labels['edit'] = 'Editar';
$labels['cancel'] = 'Cancelar';
$labels['save'] = 'Guardar';
$labels['delete'] = 'Eliminar';
-$labels['rename'] = 'Rename';
-$labels['addphoto'] = 'Add';
-$labels['replacephoto'] = 'Replace';
-$labels['uploadphoto'] = 'Upload photo';
+$labels['rename'] = 'Renombrar';
+$labels['addphoto'] = 'Agregar';
+$labels['replacephoto'] = 'Reemplazar';
+$labels['uploadphoto'] = 'Subir foto';
$labels['newcontact'] = 'Añadir nuevo contacto';
$labels['deletecontact'] = 'Eliminar contactos seleccionados';
@@ -342,9 +346,9 @@ $labels['exportall'] = 'Export all';
$labels['exportsel'] = 'Export selected';
$labels['exportvcards'] = 'Exportar contactos en format vCard';
$labels['newcontactgroup'] = 'Crear Nuevo Grupo de Contacto';
-$labels['grouprename'] = 'Rename group';
-$labels['groupdelete'] = 'Delete group';
-$labels['groupremoveselected'] = 'Remove selected contacts from group';
+$labels['grouprename'] = 'Renombrar grupo';
+$labels['groupdelete'] = 'Eliminar grupo';
+$labels['groupremoveselected'] = 'Remover del grupo los contactos seleccionados';
$labels['previouspage'] = 'Mostrar grupo anterior';
$labels['firstpage'] = 'Mostrar primer grupo';
@@ -353,22 +357,23 @@ $labels['lastpage'] = 'Mostrar último grupo';
$labels['group'] = 'Grupo';
$labels['groups'] = 'Grupos';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Direcciones personales';
-$labels['searchsave'] = 'Save search';
-$labels['searchdelete'] = 'Delete search';
+$labels['searchsave'] = 'Guardar búsqueda';
+$labels['searchdelete'] = 'Eliminar búsqueda';
$labels['import'] = 'Importar';
$labels['importcontacts'] = 'Importar contactos';
$labels['importfromfile'] = 'Importar desde el archivo:';
-$labels['importtarget'] = 'Add new contacts to address book:';
+$labels['importtarget'] = 'Agregar nuevos contactos a la libreta de direcciones:';
$labels['importreplace'] = 'Reemplazar completamente la lista de contactos';
-$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.';
+$labels['importdesc'] = 'Puedes subir contactos desde una libreta de direcciones existente.<br/>Actualmente soportamos la importación de direcciones utilizando el formato <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> o CSV (Valores Separados por Coma).';
$labels['done'] = 'Hecho';
// settings
$labels['settingsfor'] = 'Configuración para';
-$labels['about'] = 'About';
+$labels['about'] = 'Acerca de';
$labels['preferences'] = 'Preferencias';
$labels['userpreferences'] = 'Preferencias de usuario';
$labels['editpreferences'] = 'Editar preferencias de usuario';
@@ -385,8 +390,8 @@ $labels['defaultcharset'] = 'Juego de Caracteres por Defecto';
$labels['htmlmessage'] = 'Mensaje HTML';
$labels['messagepart'] = 'Part';
$labels['digitalsig'] = 'Digital Signature';
-$labels['dateformat'] = 'Date format';
-$labels['timeformat'] = 'Time format';
+$labels['dateformat'] = 'Formato de fecha';
+$labels['timeformat'] = 'Formato de tiempo';
$labels['prettydate'] = 'Fecha detallada';
$labels['setdefault'] = 'Seleccionar opción por defecto';
$labels['autodetect'] = 'Automático';
@@ -395,12 +400,13 @@ $labels['timezone'] = 'Zona horaria';
$labels['pagesize'] = 'Filas por página';
$labels['signature'] = 'Firma';
$labels['dstactive'] = 'Cambio de horario';
-$labels['showinextwin'] = 'Open message in a new window';
-$labels['composeextwin'] = 'Compose in a new window';
+$labels['showinextwin'] = 'Abrir mensaje en nueva ventana';
+$labels['composeextwin'] = 'Redactar en nueva ventana';
$labels['htmleditor'] = 'Componer mensaje en HTML';
-$labels['htmlonreply'] = 'on reply to HTML message';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
+$labels['htmlonreply'] = 'al responder un mensaje HTML';
+$labels['htmlonreplyandforward'] = 'al reenviar o responder un mensaje HTML';
$labels['htmlsignature'] = 'Firma HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Mostrar vista preliminar';
$labels['skin'] = 'Apariencia de la interfaz';
$labels['logoutclear'] = 'Vaciar papelera al cerrar sesión';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Al responder, eliminar la firma del mensaje o
$labels['autoaddsignature'] = 'Agregar la firma automáticamente';
$labels['newmessageonly'] = 'nuevos mensajes solamente';
$labels['replyandforwardonly'] = 'respuestas o reenvios solamente';
-$labels['replysignaturepos'] = 'Agregar firma al responder o reenviar';
-$labels['belowquote'] = 'debajo de la cita';
-$labels['abovequote'] = 'sobre la cita';
$labels['insertsignature'] = 'Insertar firma';
$labels['previewpanemarkread'] = 'Marcar mensajes previsualizados como leidos';
$labels['afternseconds'] = 'despues de $n segundos';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/es_AR/messages.inc b/program/localization/es_AR/messages.inc
index 167fbe290..1cec9f01d 100644
--- a/program/localization/es_AR/messages.inc
+++ b/program/localization/es_AR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Error en base de datos!';
$messages['requesttimedout'] = 'Tiempo de espera agotado';
$messages['errorreadonly'] = 'No se pudo realizar la operación. La carpeta es de sólo lectura.';
$messages['errornoperm'] = 'No se pudo realizar la operación. Permiso denegado.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Peteción invalida! No se guardó nada.';
$messages['invalidhost'] = 'Nombre de servidor inválido.';
$messages['nomessagesfound'] = 'No se han encontrado mensajes en esta casilla';
diff --git a/program/localization/es_ES/labels.inc b/program/localization/es_ES/labels.inc
index cbee58b6e..11d14fa08 100644
--- a/program/localization/es_ES/labels.inc
+++ b/program/localization/es_ES/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Borradores';
$labels['sent'] = 'Enviados';
$labels['trash'] = 'Papelera';
$labels['junk'] = 'SPAM';
+$labels['show_real_foldernames'] = 'Mostrar nombres reales para carpetas especiales';
// message listing
$labels['subject'] = 'Asunto';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Copiar';
$labels['move'] = 'Mover';
$labels['moveto'] = 'Mover a…';
$labels['download'] = 'Descargar';
-$labels['open'] = 'Open';
+$labels['open'] = 'Abrir';
$labels['showattachment'] = 'Mostrar';
$labels['showanyway'] = 'Mostrarlo de todos modos';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Página actual';
$labels['unread'] = 'Sin leer';
$labels['flagged'] = 'Señalado';
$labels['unanswered'] = 'Sin respuesta';
+$labels['withattachment'] = 'Con adjunto';
$labels['deleted'] = 'Eliminado';
$labels['undeleted'] = 'No eliminado';
$labels['invert'] = 'Invertir';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Modo de vista de lista';
$labels['folderactions'] = 'Acciones de bandeja...';
$labels['compact'] = 'Compactar';
$labels['empty'] = 'Vaciar';
+$labels['importmessages'] = 'Importar mensajes';
$labels['quota'] = 'Uso de disco';
$labels['unknown'] = 'desconocido';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Reiniciar la búsqueda';
$labels['searchmod'] = 'Opciones de búsqueda';
$labels['msgtext'] = 'Mensaje completo';
$labels['body'] = 'Cuerpo';
+$labels['type'] = 'Tipo';
$labels['openinextwin'] = 'Abrir en nueva ventana';
$labels['emlsave'] = 'Descargar (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Mostrar en formato de texto sencillo';
+$labels['changeformathtml'] = 'Mostrar en formato HTML';
// message compose
$labels['editasnew'] = 'Editar como nuevo';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Mostrar último grupo';
$labels['group'] = 'Grupo';
$labels['groups'] = 'Grupos';
+$labels['listgroup'] = 'Listar miembros del grupo';
$labels['personaladrbook'] = 'Direcciones personales';
$labels['searchsave'] = 'Guardar búsqueda';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Componer mensaje en HTML';
$labels['htmlonreply'] = 'sólo en respuesta a un mensaje HTML';
$labels['htmlonreplyandforward'] = 'en reenvío o respuesta al mensaje HTML';
$labels['htmlsignature'] = 'Firma HTML';
+$labels['showemail'] = 'Mostrar dirección de correo electrónico al visualizar el nombre';
$labels['previewpane'] = 'Mostrar vista preliminar';
$labels['skin'] = 'Apariencia de la interfaz';
$labels['logoutclear'] = 'Vaciar papelera al cerrar sesión';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Eliminar la firma original del mensaje al res
$labels['autoaddsignature'] = 'Añadir firma automáticamente';
$labels['newmessageonly'] = 'solamente mensaje nuevo';
$labels['replyandforwardonly'] = 'respuestas y reenvíos solamente';
-$labels['replysignaturepos'] = 'Colocar firma al responder o reenviar';
-$labels['belowquote'] = 'abajo del texto seleccionado';
-$labels['abovequote'] = 'arriba del texto seleccionado';
$labels['insertsignature'] = 'Insertar firma';
$labels['previewpanemarkread'] = 'Marcar mensaje previsualizado como leído';
$labels['afternseconds'] = 'después de $n segundos';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorar palabras con números';
$labels['spellcheckignorecaps'] = 'Ignorar palabras con todo mayúsculas';
$labels['addtodict'] = 'Añadir al diccionario';
$labels['mailtoprotohandler'] = 'Registrar controlador de protocolo para enlaces mailto:';
+$labels['standardwindows'] = 'Gestionar ventanas emergentes como ventanas estándar';
$labels['forwardmode'] = 'Reenvío de mensajes';
$labels['inline'] = 'en línea';
$labels['asattachment'] = 'como adjunto';
diff --git a/program/localization/es_ES/messages.inc b/program/localization/es_ES/messages.inc
index 6c031df29..d4bd81402 100644
--- a/program/localization/es_ES/messages.inc
+++ b/program/localization/es_ES/messages.inc
@@ -126,6 +126,8 @@ $messages['importwait'] = 'Importando, espere...';
$messages['importformaterror'] = '¡La importación falló! El fichero enviado no es un fichero válido de importación de datos';
$messages['importconfirm'] = '<b>Se han importado $inserted contactos correctamente</b>';
$messages['importconfirmskipped'] = '<b>Ignoradas $skipped entradas existentes</b>';
+$messages['importmessagesuccess'] = '$nr mensajes importados con éxito';
+$messages['importmessageerror'] = '¡Ha fallado la importación! El fichero subido no es un fichero válido de mensaje o buzón de correo';
$messages['opnotpermitted'] = '¡Operación no permitida!';
$messages['nofromaddress'] = 'El contacto seleccionado no tiene dirección de e-mail';
$messages['editorwarning'] = 'Cambiando a texto plano perderá el formato del mensaje. ¿Desea continuar?';
diff --git a/program/localization/et_EE/labels.inc b/program/localization/et_EE/labels.inc
index cb184b086..a8bc28403 100644
--- a/program/localization/et_EE/labels.inc
+++ b/program/localization/et_EE/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Mustandid';
$labels['sent'] = 'Saadetud';
$labels['trash'] = 'Prügikast';
$labels['junk'] = 'Rämps';
+$labels['show_real_foldernames'] = 'Näita eriliste kaustade päris nimesid';
// message listing
$labels['subject'] = 'Pealkiri';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Kopeeri';
$labels['move'] = 'Liiguta';
$labels['moveto'] = 'liiguta kausta...';
$labels['download'] = 'laadi arvutisse';
-$labels['open'] = 'Open';
+$labels['open'] = 'Ava';
$labels['showattachment'] = 'Näita';
$labels['showanyway'] = 'Näita ikka';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Praegune leht';
$labels['unread'] = 'Lugemata';
$labels['flagged'] = 'Märgistatud';
$labels['unanswered'] = 'Vastamata';
+$labels['withattachment'] = 'Koos manusega';
$labels['deleted'] = 'Kustutatud';
$labels['undeleted'] = 'Pole kustutatud';
$labels['invert'] = 'Vaheta';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Nimekirja vaatamise režiim';
$labels['folderactions'] = 'Kausta tegevused...';
$labels['compact'] = 'Tihenda';
$labels['empty'] = 'Tühjenda';
+$labels['importmessages'] = 'Impordi kirju';
$labels['quota'] = 'Kettakasutus';
$labels['unknown'] = 'teadmata';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Lähtesta otsing';
$labels['searchmod'] = 'Otsingu laiendid';
$labels['msgtext'] = 'Kogu kirjast';
$labels['body'] = 'Keha';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Ava uues aknas';
$labels['emlsave'] = 'Salvesta (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Näita lihttekstina';
+$labels['changeformathtml'] = 'Näita HTMLis';
// message compose
$labels['editasnew'] = 'Kasuta uue kirja põhjana';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Näita viimast komplekti';
$labels['group'] = 'Grupp';
$labels['groups'] = 'Grupid';
+$labels['listgroup'] = 'Näita grupi liikmeid';
$labels['personaladrbook'] = 'Isiklikud aadressid';
$labels['searchsave'] = 'Salvesta otsing';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Kasuta HTML redaktorit';
$labels['htmlonreply'] = 'vaid HTML-vormingus kirjale vastamisel';
$labels['htmlonreplyandforward'] = 'edastamisel või HTML kirjale vastates';
$labels['htmlsignature'] = 'HTML allkiri';
+$labels['showemail'] = 'Näita nime juures e-posti aadressi';
$labels['previewpane'] = 'Näita eelvaate akent';
$labels['skin'] = 'Kliendi välimus';
$labels['logoutclear'] = 'Tühjenda väljumisel prügikast';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Vastates eemalda kirjast esialgne allkiri';
$labels['autoaddsignature'] = 'Lisa allkiri automaatselt';
$labels['newmessageonly'] = 'ainult uutele';
$labels['replyandforwardonly'] = 'ainult vastates ja edastades';
-$labels['replysignaturepos'] = 'Vastates või edastades aseta allkiri';
-$labels['belowquote'] = 'tsiteeritu alla';
-$labels['abovequote'] = 'tsiteeritu kohale';
$labels['insertsignature'] = 'Sisesta allkiri';
$labels['previewpanemarkread'] = 'Märgi eelvaadatud kirjad loetuks';
$labels['afternseconds'] = '$n sekundi pärast';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignoreeri sõnu, milles on numbreid';
$labels['spellcheckignorecaps'] = 'Ignoreeri suurte tähtedega kirjutatud sõnu';
$labels['addtodict'] = 'Lisa sõnastikku';
$labels['mailtoprotohandler'] = 'Kasuta mailto: linkide avamisel';
+$labels['standardwindows'] = 'Käsitle hüpikaknaid tavaliste akendena';
$labels['forwardmode'] = 'Kirja edastamine';
$labels['inline'] = 'kirja sees';
$labels['asattachment'] = 'manusena';
diff --git a/program/localization/et_EE/messages.inc b/program/localization/et_EE/messages.inc
index 653b48be5..4d58b0a75 100644
--- a/program/localization/et_EE/messages.inc
+++ b/program/localization/et_EE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Andmebaasi tõrge!';
$messages['requesttimedout'] = 'Päring aegus';
$messages['errorreadonly'] = 'Operatsioon nurjus. Kaustale on vaid lugemisõigus';
$messages['errornoperm'] = 'Operatsioon nurjus. Ligipääsu õigused puuduvad';
+$messages['erroroverquota'] = 'Operatsioon nurjus. Ketas on täis.';
+$messages['erroroverquotadelete'] = 'Ketas on täis. Kirja kustutamiseks vajuta SHIFT+DEL.';
$messages['invalidrequest'] = 'Lubamatu päring! Andmeid ei salvestatud.';
$messages['invalidhost'] = 'Lubamatu serveri nimi.';
$messages['nomessagesfound'] = 'Postkast paistab tühi olevat';
@@ -124,6 +126,8 @@ $messages['importwait'] = 'Impordin, palun oota...';
$messages['importformaterror'] = 'Import nurjus! Laaditud fail ei sisalda sobilikke andmeid.';
$messages['importconfirm'] = '<b>Edukalt imporditud $inserted kontakti, $skipped olemasolevat sissekannet vahele jäetud</b>:<p><em>$names</em></p>';
$messages['importconfirmskipped'] = '<b> $skipped olemasolevat kirjet jäeti vahele</b>';
+$messages['importmessagesuccess'] = '$nr kirja edukalt imporditud';
+$messages['importmessageerror'] = 'Import nurjus! Laaditud fail ei ole kirja ega postkasti fail';
$messages['opnotpermitted'] = 'Tegevus pole lubatud!';
$messages['nofromaddress'] = 'Valitud identiteedil puudub e-posti aadress';
$messages['editorwarning'] = 'Klaarteksti redaktorile lülitamine kaotab kogu teksti vorminduse. Soovid jätkata?';
diff --git a/program/localization/eu_ES/labels.inc b/program/localization/eu_ES/labels.inc
index eb61f4c8c..fedce7de5 100644
--- a/program/localization/eu_ES/labels.inc
+++ b/program/localization/eu_ES/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Zirriborroak';
$labels['sent'] = 'Bidalitakoak';
$labels['trash'] = 'Zakarrontzia';
$labels['junk'] = 'Zabor-posta';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Gaia';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Uneko orrialdea';
$labels['unread'] = 'Irakurri gabeak';
$labels['flagged'] = 'Banderaduna';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Ezabatuak';
$labels['undeleted'] = 'Ezabatu gabeak';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Trinkotu';
$labels['empty'] = 'Hustu';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disko erabilera';
$labels['unknown'] = 'ezezaguna';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Bilaketa berrabiarazi';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Lehio berrian ireki';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Azken sorta ikusi';
$labels['group'] = 'Group';
$labels['groups'] = 'Taldeak';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Helbide pertsonalak';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML mezuak sortu';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML sinadura';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Aurrebista panela ikusi';
$labels['skin'] = 'Azal-interfazea';
$labels['logoutclear'] = 'Garbitu Zakarronzia irtetean';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/eu_ES/messages.inc b/program/localization/eu_ES/messages.inc
index 118f53ff6..a3985b233 100644
--- a/program/localization/eu_ES/messages.inc
+++ b/program/localization/eu_ES/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Ez da mezurik aurkitu posta kutxa honetan';
diff --git a/program/localization/fa_AF/labels.inc b/program/localization/fa_AF/labels.inc
index 6a4904d7e..38154c23c 100644
--- a/program/localization/fa_AF/labels.inc
+++ b/program/localization/fa_AF/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'نامه های ناتکمیل';
$labels['sent'] = 'ارسال شده';
$labels['trash'] = 'اشغال دانی';
$labels['junk'] = 'بیکاره';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'مضمون';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'ناخوانده';
$labels['flagged'] = 'نشانی شده';
$labels['unanswered'] = 'پیامهای جواب نداده شده';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'خلاصه';
$labels['empty'] = 'خالي';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = '‌طريقه استعمال ديسک';
$labels['unknown'] = 'نامعلوم';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'بازنشاندن جستجو';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'در پینجره ای جدید باز کنید';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'بسته اخير را نشان دهيد';
$labels['group'] = 'Group';
$labels['groups'] = 'گروه ها';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'ادرس های شخصي';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'پيغام ايچ ټي ام ايل رانوشته کن
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'امضای حساب ایمیل بشکل ایچ تی ام ال';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'چوکات پیشنما را نشان دهید';
$labels['skin'] = 'تمپلیت محیط کاربری';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/fa_AF/messages.inc b/program/localization/fa_AF/messages.inc
index aa479b9c6..4f3d4be55 100644
--- a/program/localization/fa_AF/messages.inc
+++ b/program/localization/fa_AF/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'هيچ پيغامی در اين صندوق پستي دريافت نه شد';
diff --git a/program/localization/fa_IR/labels.inc b/program/localization/fa_IR/labels.inc
index 8bba66c26..79bfbbe9d 100644
--- a/program/localization/fa_IR/labels.inc
+++ b/program/localization/fa_IR/labels.inc
@@ -22,7 +22,7 @@ $labels = array();
$labels['welcome'] = 'به $product خوش آمدید';
$labels['username'] = 'نام کاربری';
$labels['password'] = 'گذرواژه';
-$labels['server'] = 'سرور';
+$labels['server'] = 'سرویس‌دهنده';
$labels['login'] = 'ورود';
// taskbar
@@ -34,9 +34,10 @@ $labels['addressbook'] = 'دفتر نشانی';
// mailbox names
$labels['inbox'] = 'صندوق ورودی';
$labels['drafts'] = 'پیش‌نویس‌ها';
-$labels['sent'] = 'ارسال شده';
-$labels['trash'] = 'زباله‌دان';
+$labels['sent'] = 'فرستاده شده';
+$labels['trash'] = 'سطل آشغال';
$labels['junk'] = 'بنجل';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'موضوع';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'صفحه جاری';
$labels['unread'] = 'خوانده‌نشده';
$labels['flagged'] = 'پرچم‌دار';
$labels['unanswered'] = 'پاسخ داده نشده';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'حذف شده';
$labels['undeleted'] = 'حذف نشده';
$labels['invert'] = 'وارونه';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'نوع مشاهده فهرست';
$labels['folderactions'] = 'اعمال پوشه...';
$labels['compact'] = 'فشرده';
$labels['empty'] = 'خالی';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'فضای استفاده شده';
$labels['unknown'] = 'ناشناخته';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'جستجوی دوباره';
$labels['searchmod'] = 'اصلاحات جستجو';
$labels['msgtext'] = 'کل پیغام';
$labels['body'] = 'بدنه';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'باز کردن در پنجره‌ی جدید';
$labels['emlsave'] = 'بارگیری (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'نمایش در قالب متنی';
+$labels['changeformathtml'] = 'نمایش در قالب اچ‌تی‌ام‌ال';
// message compose
$labels['editasnew'] = 'ویرایش به عنوان جدید';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'نمایش صفحه آخر';
$labels['group'] = 'گروه';
$labels['groups'] = 'گروه‌ها';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'نشانی‌های شخصی';
$labels['searchsave'] = 'ذخیره جستجو';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML ‌نوشتن پیغام‌های';
$labels['htmlonreply'] = 'فقط در پاسخ به پیغام HTML';
$labels['htmlonreplyandforward'] = 'در بازگردانی یا پاسخ به پیغام‌های HTML';
$labels['htmlsignature'] = 'HTML امضای';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'نمایش قاب پیش‌نمایش';
$labels['skin'] = 'پوسته ظاهری';
$labels['logoutclear'] = 'تمیز کردن زباله دان هنگام برون‌رفت';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'هنگام پاسخ امضاء اصلی را
$labels['autoaddsignature'] = 'اضافه کردن خودکار امضاء';
$labels['newmessageonly'] = 'فقط پیغام جدید';
$labels['replyandforwardonly'] = 'فقط پاسخ‌ها و ارجاع‌ها';
-$labels['replysignaturepos'] = 'هنگام پاسخ یا ارجاع امضاء را قرار داده شود';
-$labels['belowquote'] = 'زیر نقل‌قول';
-$labels['abovequote'] = 'بالای نقل‌قول';
$labels['insertsignature'] = 'درج امضاء';
$labels['previewpanemarkread'] = 'نشانه‌گذاری پیغام‌های پیش مرور شده به عنوان خوانده شده';
$labels['afternseconds'] = 'بعد از $s ثانیه';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'نادیده گرفتن کلمات دارای
$labels['spellcheckignorecaps'] = 'نادیده گرفتن کلمات با حروف بزرگ';
$labels['addtodict'] = 'اضافه کردن به واژه‌نامه';
$labels['mailtoprotohandler'] = 'ثبت نگه‌دارنده پروتوکل برای mailto: پیوندها';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'بازگردانی پیغام';
$labels['inline'] = 'خطی';
$labels['asattachment'] = 'به عنوان پیوست';
diff --git a/program/localization/fa_IR/messages.inc b/program/localization/fa_IR/messages.inc
index 5db68b005..ff53c650e 100644
--- a/program/localization/fa_IR/messages.inc
+++ b/program/localization/fa_IR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'خطای پایگاه‌داده';
$messages['requesttimedout'] = 'زمان درخواست تمام شد';
$messages['errorreadonly'] = 'ناتوانی در انجام عملیات. پوشه فقط خواندنی است.';
$messages['errornoperm'] = 'ناتوانی در انجام عملیات. دسترسی وجود ندارد.';
+$messages['erroroverquota'] = 'ناتوانی در انجام عملیات. فضای دیسک خالی نیست.';
+$messages['erroroverquotadelete'] = 'فضای دیسک خالی نیست. برای حذف پیغام از SHIFT+DEL استفاده کنید.';
$messages['invalidrequest'] = 'درخواست نامعتبر! هیچ داده‌ای ذخیره نشد.';
$messages['invalidhost'] = 'نام سرور غیرمعتبر.';
$messages['nomessagesfound'] = 'هیچ پیغامی در این صندوق پیدا نشد.';
diff --git a/program/localization/fi_FI/labels.inc b/program/localization/fi_FI/labels.inc
index 62c2d6b07..ef0f0bff0 100644
--- a/program/localization/fi_FI/labels.inc
+++ b/program/localization/fi_FI/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Luonnokset';
$labels['sent'] = 'Lähetetyt';
$labels['trash'] = 'Roskakori';
$labels['junk'] = 'Roskaposti';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Aihe';
@@ -64,6 +65,7 @@ $labels['copy'] = 'Kopioi';
$labels['move'] = 'Siirrä';
$labels['moveto'] = 'siirrä kansioon...';
$labels['download'] = 'lataa';
+$labels['open'] = 'Avaa';
$labels['showattachment'] = 'Näytä';
$labels['showanyway'] = 'Näytä silti';
@@ -161,6 +163,7 @@ $labels['currpage'] = 'Nykyinen sivu';
$labels['unread'] = 'Lukemattomat';
$labels['flagged'] = 'Korostettu';
$labels['unanswered'] = 'Vastaamaton';
+$labels['withattachment'] = 'Liitteen kera';
$labels['deleted'] = 'Poistettu';
$labels['undeleted'] = 'Ei poistettu';
$labels['invert'] = 'Käännä';
@@ -191,6 +194,7 @@ $labels['listmode'] = 'Listausnäkymä';
$labels['folderactions'] = 'Kansiotoiminnot...';
$labels['compact'] = 'Tiivistä';
$labels['empty'] = 'Tyhjennä';
+$labels['importmessages'] = 'Tuo viestejä';
$labels['quota'] = 'Levytila';
$labels['unknown'] = 'tuntematon';
@@ -201,9 +205,12 @@ $labels['resetsearch'] = 'Nollaa haku';
$labels['searchmod'] = 'Hakukriteerit';
$labels['msgtext'] = 'Koko viesti';
$labels['body'] = 'Runko';
+$labels['type'] = 'Tyyppi';
$labels['openinextwin'] = 'Avaa uudessa ikkunassa';
$labels['emlsave'] = 'Tallenna (.eml)';
+$labels['changeformattext'] = 'Näytä raakatekstimuodossa';
+$labels['changeformathtml'] = 'Näytä HTML-muodossa';
// message compose
$labels['editasnew'] = 'Muokkaa uutena';
@@ -241,9 +248,9 @@ $labels['nosubject'] = '(ei otsikkoa)';
$labels['showimages'] = 'Näytä kuvat';
$labels['alwaysshow'] = 'Näytä aina lähettäjältä $sender saapuneet kuvat';
$labels['isdraft'] = 'Tämä on luonnosviesti.';
-$labels['andnmore'] = '$nr more...';
+$labels['andnmore'] = '$nr lisää...';
$labels['togglemoreheaders'] = 'Näytä lisää viestiotsakkeita';
-$labels['togglefullheaders'] = 'Toggle raw message headers';
+$labels['togglefullheaders'] = 'Viestin otsakkeet päällä/pois';
$labels['htmltoggle'] = 'HTML';
$labels['plaintoggle'] = 'Tavallinen teksti';
@@ -350,6 +357,7 @@ $labels['lastpage'] = 'Näytä viimeinen luettelo';
$labels['group'] = 'Ryhmä';
$labels['groups'] = 'Ryhmät';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Henkilökohtaiset osoitteet';
$labels['searchsave'] = 'Tallenna haku';
@@ -360,7 +368,7 @@ $labels['importcontacts'] = 'Tuo yhteystiedot';
$labels['importfromfile'] = 'Tuo tiedostosta:';
$labels['importtarget'] = 'Lisää uudet yhteystiedot osoitekirjaan:';
$labels['importreplace'] = 'Korvaa koko osoitekirja';
-$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.';
+$labels['importdesc'] = 'Voit tuoda yhteystietoja olemassa olevasta osoitekirjasta.<br/>Tuettuja muotoja ovat <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ja CSV (pilkuin erotetut arvot).';
$labels['done'] = 'Valmis';
// settings
@@ -396,8 +404,9 @@ $labels['showinextwin'] = 'Avaa viesti uudessa ikkunassa';
$labels['composeextwin'] = 'Lähetä viesti uudessa ikkunassa';
$labels['htmleditor'] = 'Kirjoita HTML-muodossa';
$labels['htmlonreply'] = 'Vain vastatessa HTML-viesteihin';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
+$labels['htmlonreplyandforward'] = 'välittäessä tai vastatessa HTML-viestiin';
$labels['htmlsignature'] = 'HTML-allekirjoitus';
+$labels['showemail'] = 'Näytä sähköpostiosoite näyttönimen kanssa';
$labels['previewpane'] = 'Näytä esikatselulehti';
$labels['skin'] = 'Käyttöliittymän teema';
$labels['logoutclear'] = 'Tyhjennä roskakori kirjautuessa ulos';
@@ -451,9 +460,6 @@ $labels['replyremovesignature'] = 'Vastattaessa poista alkuperäinen allekirjoit
$labels['autoaddsignature'] = 'Lisää allekirjoitus automaattisesti';
$labels['newmessageonly'] = 'vain uuteen viestiin';
$labels['replyandforwardonly'] = 'vain vastauksiin ja välityksiin';
-$labels['replysignaturepos'] = 'Vastattaessa tai välitettäessä laita allekirjoitus';
-$labels['belowquote'] = 'lainauksen alle';
-$labels['abovequote'] = 'lainauksen ylle';
$labels['insertsignature'] = 'Lisää allekirjoitus';
$labels['previewpanemarkread'] = 'Merkitse esikatsellut viestit luetuiksi';
$labels['afternseconds'] = '$n sekunnin jälkeen';
@@ -470,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Jätä huomiotta sanat, joissa on numeroita';
$labels['spellcheckignorecaps'] = 'Jätä huomiotta sanat, joissa kaikki kirjaimet on isoja';
$labels['addtodict'] = 'Lisää sanakirjaan';
$labels['mailtoprotohandler'] = 'Rekisteröi mailto:-linkkien protokollakäsitteljä';
+$labels['standardwindows'] = 'Käsittele popup-ikkunoita tavallisina ikkunoina';
$labels['forwardmode'] = 'Viestin välitys';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'liitteenä';
diff --git a/program/localization/fr_FR/csv2vcard.inc b/program/localization/fr_FR/csv2vcard.inc
new file mode 100644
index 000000000..bb77001b5
--- /dev/null
+++ b/program/localization/fr_FR/csv2vcard.inc
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | localization/<lang>/csv2vcard.inc |
+ | |
+ | Localization file of the Roundcube Webmail client |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ +-----------------------------------------------------------------------+
+*/
+
+// This is a list of CSV column names specified in CSV file header
+// These must be original texts used in Outlook/Thunderbird exported csv files
+// Encoding UTF-8
+
+$map = array();
+
+// MS Outlook 2010
+$map['anniversary'] = "Anniversaire de mariage ou fête";
+$map['assistants_name'] = "Nom de l''assistant(e)";
+$map['assistants_phone'] = "Téléphone de l''assistant(e)";
+$map['birthday'] = "Anniversaire";
+$map['business_city'] = "Ville (bureau)";
+$map['business_countryregion'] = "Pays/Région (bureau)";
+$map['business_fax'] = "Télécopie (bureau)";
+$map['business_phone'] = "Téléphone (bureau)";
+$map['business_phone_2'] = "Téléphone 2 (bureau)";
+$map['business_postal_code'] = "Code postal (bureau)";
+$map['business_state'] = "Dép/Région (bureau)";
+$map['business_street'] = "Rue (bureau)";
+$map['car_phone'] = "Téléphone (voiture)";
+$map['categories'] = "Catégories";
+$map['company'] = "Société";
+$map['department'] = "Service";
+$map['email_address'] = "Adresse de messagerie";
+$map['first_name'] = "Prénom";
+$map['gender'] = "Sexe";
+$map['home_city'] = "Ville (domicile)";
+$map['home_countryregion'] = "Pays/Région (domicile)";
+$map['home_fax'] = "Télécopie (domicile)";
+$map['home_phone'] = "Téléphone (domicile)";
+$map['home_phone_2'] = "Téléphone 2 (domicile)";
+$map['home_postal_code'] = "Code postal (domicile)";
+$map['home_state'] = "Dép/Région (domicile)";
+$map['home_street'] = "Rue (domicile)";
+$map['job_title'] = "Profession";
+$map['last_name'] = "Nom";
+$map['managers_name'] = "Manager's Name";
+$map['middle_name'] = "Deuxième prénom";
+$map['mobile_phone'] = "Tél. mobile";
+$map['notes'] = "Notes";
+$map['other_city'] = "Ville (autre)";
+$map['other_countryregion'] = "Pays/Région (autre)";
+$map['other_fax'] = "Télécopie (autre)";
+$map['other_phone'] = "Téléphone (autre)";
+$map['other_postal_code'] = "Code postal (autre)";
+$map['other_state'] = "Dép/Région (autre)";
+$map['other_street'] = "Rue (autre)";
+$map['pager'] = "Récepteur de radiomessagerie";
+$map['primary_phone'] = "Téléphone principal";
+$map['spouse'] = "Conjoint(e)";
+$map['suffix'] = "Suffixe";
+$map['title'] = "Titre";
+$map['web_page'] = "Page Web";
+
+// Thunderbird
+$map['birth_day'] = "Jour";
+$map['birth_month'] = "Mois";
+$map['birth_year'] = "Année de naissance";
+$map['display_name'] = "Nom à afficher";
+$map['fax_number'] = "Fax";
+$map['home_address'] = "Adresse privée";
+$map['home_country'] = "Région";
+$map['home_zipcode'] = "Code postal";
+$map['mobile_number'] = "Portable";
+$map['nickname'] = "Surnom";
+$map['organization'] = "Société";
+$map['pager_number'] = "Pager";
+$map['primary_email'] = "Adresse électronique principale";
+$map['secondary_email'] = "Adresse électronique secondaire";
+$map['web_page_1'] = "Site Web 1";
+$map['web_page_2'] = "Site Web 2";
+$map['work_phone'] = "Tél. professionnel";
+$map['work_address'] = "Adresse professionnelle";
+$map['work_country'] = "Région";
+$map['work_zipcode'] = "Code postal";
+
+// Other
+$map['_home_city'] = "Ville";
diff --git a/program/localization/fr_FR/labels.inc b/program/localization/fr_FR/labels.inc
index 4a78e565f..2a4f3a169 100644
--- a/program/localization/fr_FR/labels.inc
+++ b/program/localization/fr_FR/labels.inc
@@ -26,9 +26,9 @@ $labels['server'] = 'Serveur';
$labels['login'] = 'Connexion';
// taskbar
-$labels['logout'] = 'Quitter';
+$labels['logout'] = 'Déconnexion';
$labels['mail'] = 'Courriel';
-$labels['settings'] = 'Préférences';
+$labels['settings'] = 'Paramètres';
$labels['addressbook'] = 'Carnet d\'adresses';
// mailbox names
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Brouillons';
$labels['sent'] = 'Messages envoyés';
$labels['trash'] = 'Corbeille';
$labels['junk'] = 'Indésirables';
+$labels['show_real_foldernames'] = 'Montrer les noms réels pour les dossiers spéciaux';
// message listing
$labels['subject'] = 'Objet';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Copier';
$labels['move'] = 'Déplacer';
$labels['moveto'] = 'Déplacer vers...';
$labels['download'] = 'Télécharger';
-$labels['open'] = 'Open';
+$labels['open'] = 'Ouvrir';
$labels['showattachment'] = 'Afficher';
$labels['showanyway'] = 'Afficher quand même';
@@ -127,7 +128,7 @@ $labels['checkmail'] = 'Vérification des nouveaux messages';
$labels['compose'] = 'Composer un nouveau message';
$labels['writenewmessage'] = 'Écrire un nouveau message';
$labels['reply'] = 'Répondre';
-$labels['replytomessage'] = 'Répondre au message';
+$labels['replytomessage'] = 'Répondre à l\'expéditeur';
$labels['replytoallmessage'] = 'Répondre à tous';
$labels['replyall'] = 'Répondre à tous';
$labels['replylist'] = 'Répondre à la liste';
@@ -143,13 +144,13 @@ $labels['firstmessage'] = 'Voir le premier message';
$labels['nextmessage'] = 'Voir le message suivant';
$labels['lastmessage'] = 'Voir le dernier message';
$labels['backtolist'] = 'Retourner à la liste des messages';
-$labels['viewsource'] = 'Voir le source';
+$labels['viewsource'] = 'Voir la source';
$labels['mark'] = 'Marquer';
$labels['markmessages'] = 'Marquer les messages';
-$labels['markread'] = 'Comme lus';
-$labels['markunread'] = 'Comme non lus';
-$labels['markflagged'] = 'Comme suivi';
-$labels['markunflagged'] = 'Comme non-suivi';
+$labels['markread'] = 'Comme lu(s)';
+$labels['markunread'] = 'Comme non lu(s)';
+$labels['markflagged'] = 'Comme suivi(s)';
+$labels['markunflagged'] = 'Comme non-suivi(s)';
$labels['moreactions'] = 'Plus d\'actions...';
$labels['more'] = 'Plus';
$labels['back'] = 'Retour';
@@ -159,18 +160,19 @@ $labels['select'] = 'Sélectionner';
$labels['all'] = 'Tous';
$labels['none'] = 'Aucun';
$labels['currpage'] = 'Page courante';
-$labels['unread'] = 'Non lus';
-$labels['flagged'] = 'Marqué';
-$labels['unanswered'] = 'Non répondu';
-$labels['deleted'] = 'Supprimé';
-$labels['undeleted'] = 'Non supprimé';
+$labels['unread'] = 'Non lu(s)';
+$labels['flagged'] = 'Marqué(s)';
+$labels['unanswered'] = 'Non répondu(s)';
+$labels['withattachment'] = 'Avec pièce jointe';
+$labels['deleted'] = 'Supprimé(s)';
+$labels['undeleted'] = 'Non supprimé(s)';
$labels['invert'] = 'Inverser';
$labels['filter'] = 'Filtre';
$labels['list'] = 'Lister';
$labels['threads'] = 'Sujets';
-$labels['expand-all'] = 'Afficher Tous';
-$labels['expand-unread'] = 'Afficher Non-lus';
-$labels['collapse-all'] = 'Fermer Tous';
+$labels['expand-all'] = 'Tout afficher';
+$labels['expand-unread'] = 'Afficher non-lu(s)';
+$labels['collapse-all'] = 'Fermer tous';
$labels['threaded'] = 'Par sujet';
$labels['autoexpand_threads'] = 'Développer les sujets';
@@ -189,9 +191,10 @@ $labels['listsorting'] = 'Colonne de tri';
$labels['listorder'] = 'Ordre de tri';
$labels['listmode'] = 'Mode d\'affichage de la liste';
-$labels['folderactions'] = 'Actions du dossier';
+$labels['folderactions'] = 'Actions du dossier...';
$labels['compact'] = 'Compacter';
$labels['empty'] = 'Vider';
+$labels['importmessages'] = 'Importer des messages';
$labels['quota'] = 'Occupation disque';
$labels['unknown'] = 'inconnue';
@@ -202,17 +205,18 @@ $labels['resetsearch'] = 'Réinitialiser la recherche';
$labels['searchmod'] = 'Portée de la recherche';
$labels['msgtext'] = 'Message entier';
$labels['body'] = 'Corps';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Ouvrir dans une nouvelle fenêtre';
$labels['emlsave'] = 'Télécharger (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Afficher au format texte';
+$labels['changeformathtml'] = 'Afficher au format HTML';
// message compose
$labels['editasnew'] = 'Éditer en tant que nouveau message';
$labels['send'] = 'Envoyer';
-$labels['sendmessage'] = 'Envoyer';
-$labels['savemessage'] = 'Enregistrer';
+$labels['sendmessage'] = 'Envoyer un message';
+$labels['savemessage'] = 'Sauvegarder comme brouillon';
$labels['addattachment'] = 'Joindre un fichier';
$labels['charset'] = 'Encodage';
$labels['editortype'] = 'Type d\'éditeur';
@@ -222,14 +226,14 @@ $labels['mailreplyintro'] = 'Le $date, $sender a écrit :';
$labels['originalmessage'] = 'Message original';
$labels['editidents'] = 'Modifier les identités';
-$labels['spellcheck'] = 'Vérifier l\'orthographe';
+$labels['spellcheck'] = 'Orthographe';
$labels['checkspelling'] = 'Vérifier l\'orthographe';
$labels['resumeediting'] = 'Retourner à l\'édition';
$labels['revertto'] = 'Revenir à';
$labels['attach'] = 'Joindre';
$labels['attachments'] = 'Fichiers joints';
-$labels['upload'] = 'Joindre';
+$labels['upload'] = 'Transférer';
$labels['uploadprogress'] = '$percent ($current sur $total)';
$labels['close'] = 'Fermer';
$labels['messageoptions'] = 'Options du message';
@@ -249,7 +253,7 @@ $labels['togglemoreheaders'] = 'Afficher plus d\'en-têtes du message';
$labels['togglefullheaders'] = 'Afficher/Cacher l\'entête du message';
$labels['htmltoggle'] = 'HTML';
-$labels['plaintoggle'] = 'texte brut';
+$labels['plaintoggle'] = 'Texte brut';
$labels['savesentmessagein'] = 'Enregistrer le message envoyé dans';
$labels['dontsave'] = 'ne pas enregistrer';
$labels['maxuploadsize'] = 'La taille maximum autorisée pour un fichier est $size';
@@ -263,7 +267,7 @@ $labels['addfollowupto'] = 'Ajouter Faire suivre à';
$labels['mdnrequest'] = 'L\'expéditeur de ce message a demandé d\'être prévenu quand vous lirez ce message. Souhaitez-vous prévenir l\'expéditeur ?';
$labels['receiptread'] = 'Accusé de réception (lu)';
$labels['yourmessage'] = 'Ceci est un accusé de réception pour votre message';
-$labels['receiptnote'] = 'Note : Cet accusé de réception indique seulement que le message a été affiché sur l\'ordinateur du destinataire. Il n\'y a aucune garantie que le destinataire a lu ou compris le contenu du message.';
+$labels['receiptnote'] = 'Note : Cet accusé de réception indique seulement que le message a été affiché sur l\'ordinateur du destinataire. Il n\'y a aucune garantie que le destinataire ait lu ou compris le contenu du message.';
// address boook
$labels['name'] = 'Nom à afficher';
@@ -274,9 +278,9 @@ $labels['nameprefix'] = 'Préfixe';
$labels['namesuffix'] = 'Suffixe';
$labels['nickname'] = 'Surnom';
$labels['jobtitle'] = 'Fonction';
-$labels['department'] = 'Département';
+$labels['department'] = 'Service';
$labels['gender'] = 'Sexe';
-$labels['maidenname'] = 'Nom de naissance';
+$labels['maidenname'] = 'Nom de jeune fille';
$labels['email'] = 'Courriel';
$labels['phone'] = 'Téléphone';
$labels['address'] = 'Adresse';
@@ -317,7 +321,7 @@ $labels['typeblog'] = 'Blog';
$labels['typeprofile'] = 'Profil';
$labels['addfield'] = 'Ajouter un champ...';
-$labels['addcontact'] = 'Ajouter le contact sélectionné à votre Carnet d\'adresses';
+$labels['addcontact'] = 'Ajouter le contact sélectionné à votre carnet d\'adresses';
$labels['editcontact'] = 'Modifier le contact';
$labels['contacts'] = 'Contacts';
$labels['contactproperties'] = 'Propriétés du contact';
@@ -330,7 +334,7 @@ $labels['delete'] = 'Supprimer';
$labels['rename'] = 'Renommer';
$labels['addphoto'] = 'Ajouter';
$labels['replacephoto'] = 'Remplacer';
-$labels['uploadphoto'] = 'Envoyer une photo';
+$labels['uploadphoto'] = 'Transférer une photo';
$labels['newcontact'] = 'Créer un nouveau contact';
$labels['deletecontact'] = 'Supprimer les contacts sélectionnés';
@@ -344,7 +348,7 @@ $labels['exportvcards'] = 'Exporter les contacts au format vCard';
$labels['newcontactgroup'] = 'Créer un nouveau groupe de contacts';
$labels['grouprename'] = 'Renommer le groupe';
$labels['groupdelete'] = 'Supprimer le groupe';
-$labels['groupremoveselected'] = 'Retiré les contacts sélectionnés du groupe';
+$labels['groupremoveselected'] = 'Retirer les contacts sélectionnés du groupe';
$labels['previouspage'] = 'Montrer page précédente';
$labels['firstpage'] = 'Voir la première page';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Voir la dernière page';
$labels['group'] = 'Groupe';
$labels['groups'] = 'Groupes';
+$labels['listgroup'] = 'Liste des membres du groupe';
$labels['personaladrbook'] = 'Adresses personnelles';
$labels['searchsave'] = 'Enregistrer la recherche';
@@ -361,9 +366,9 @@ $labels['searchdelete'] = 'Supprimer la recherche';
$labels['import'] = 'Importer';
$labels['importcontacts'] = 'Importer les contacts';
$labels['importfromfile'] = 'Importer depuis un fichier :';
-$labels['importtarget'] = 'Ajouter de nouveaux contact au carnet d’adresse :';
-$labels['importreplace'] = 'Remplacer le carnet d\'adresse entier';
-$labels['importdesc'] = 'Vous pouvez télécharger des contacts à partir d\'un carnet d\'adresses existant.<br/>Nous supportons actuellement l\'importation d\'adresses à partir des format de données <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (comma -séparés).';
+$labels['importtarget'] = 'Ajouter de nouveaux contact au carnet d’adresses :';
+$labels['importreplace'] = 'Remplacer le carnet d\'adresses entier';
+$labels['importdesc'] = 'Vous pouvez transférer des contacts à partir d\'un carnet d\'adresses existant.<br/>Nous supportons actuellement l\'importation d\'adresses à partir des format de données <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (champs séparés par une virgule).';
$labels['done'] = 'Terminé';
// settings
@@ -401,12 +406,13 @@ $labels['htmleditor'] = 'Composer un message au format HTML';
$labels['htmlonreply'] = 'en réponse aux messages HTML uniquement';
$labels['htmlonreplyandforward'] = 'Transférer ou répondre au message HTML';
$labels['htmlsignature'] = 'Signature HTML';
+$labels['showemail'] = 'Montrer l\'adresse de courriel avec le nom complet';
$labels['previewpane'] = 'Afficher le panneau d\'aperçu';
$labels['skin'] = 'Thème de l\'interface';
$labels['logoutclear'] = 'Vider la corbeille à la déconnexion';
$labels['logoutcompact'] = 'Compacter la boite de réception à la déconnexion';
$labels['uisettings'] = 'Interface utilisateur';
-$labels['serversettings'] = 'Préférences du serveur';
+$labels['serversettings'] = 'Paramètres du serveur';
$labels['mailboxview'] = 'Vue du courrier';
$labels['mdnrequests'] = 'Notifications à l\'expéditeur';
$labels['askuser'] = 'demander à l\'utilisateur';
@@ -450,29 +456,27 @@ $labels['whenreplying'] = 'En répondant';
$labels['replyempty'] = 'Ne pas citer le message original';
$labels['replytopposting'] = 'commencer le nouveau message au-dessus de l\'original';
$labels['replybottomposting'] = 'commencer le nouveau message en-dessous de l\'original';
-$labels['replyremovesignature'] = 'En répondant, supprimer la signature d\'origine du message';
+$labels['replyremovesignature'] = 'Supprimer la signature d\'origine du message lors de la réponse';
$labels['autoaddsignature'] = 'Ajouter la signature automatiquement';
$labels['newmessageonly'] = 'nouveau message uniquement';
$labels['replyandforwardonly'] = 'réponses et transferts uniquement';
-$labels['replysignaturepos'] = 'En répondant ou en transférant, placer la signature';
-$labels['belowquote'] = 'en-dessous de la citation';
-$labels['abovequote'] = 'au-dessus de la citation';
$labels['insertsignature'] = 'Insérer la signature';
$labels['previewpanemarkread'] = 'Marquer les messages prévisualisés comme lus';
$labels['afternseconds'] = 'après $n secondes';
$labels['reqmdn'] = 'Toujours demander un avis de réception';
$labels['reqdsn'] = 'Toujours demander une notification d\'état de distribution';
$labels['replysamefolder'] = 'Placer les réponses dans le dossier du message auquel il est répondu';
-$labels['defaultabook'] = 'Carnet d\'adresse par défaut';
-$labels['autocompletesingle'] = 'Ne pas tenir compte des adresses emails alternatives dans l\'autoremplissage';
+$labels['defaultabook'] = 'Carnet d\'adresses par défaut';
+$labels['autocompletesingle'] = 'Ne pas tenir compte des adresses de courriel alternatives dans l\'autoremplissage';
$labels['listnamedisplay'] = 'Lister les contacts comme';
-$labels['spellcheckbeforesend'] = 'Vérifier l’orthographe avant l’envoie d’un message';
+$labels['spellcheckbeforesend'] = 'Vérifier l’orthographe avant l’envoi d’un message';
$labels['spellcheckoptions'] = 'Options du vérificateur d\'orthographe';
$labels['spellcheckignoresyms'] = 'Ignorer les mots avec des symboles';
$labels['spellcheckignorenums'] = 'Ignorer les mots avec des nombres';
$labels['spellcheckignorecaps'] = 'Ignorer les mots entièrement en majuscule';
$labels['addtodict'] = 'Ajouter au dictionnaire';
$labels['mailtoprotohandler'] = 'Enregistrer le gestionnaire de protocole pour les liens mailto:';
+$labels['standardwindows'] = 'Manipuler les menus surgissants comme des fenêtres standards';
$labels['forwardmode'] = 'Transfert des messages';
$labels['inline'] = 'dans le corps';
$labels['asattachment'] = 'en pièce jointe';
@@ -508,7 +512,7 @@ $labels['plugin'] = 'Plugin';
$labels['version'] = 'Version';
$labels['source'] = 'Source';
$labels['license'] = 'Licence';
-$labels['support'] = 'Support';
+$labels['support'] = 'Obtenir un support technique';
// units
$labels['B'] = 'o';
diff --git a/program/localization/fr_FR/messages.inc b/program/localization/fr_FR/messages.inc
index bd3fd2094..a736e103e 100644
--- a/program/localization/fr_FR/messages.inc
+++ b/program/localization/fr_FR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Erreur avec la base de donnée!';
$messages['requesttimedout'] = 'Délai de la requête expiré';
$messages['errorreadonly'] = 'Impossible d\'effectuer cette opération. Le dossier est en lecture seule';
$messages['errornoperm'] = 'Impossible d\'effectuer cette opération. Permission refusée';
+$messages['erroroverquota'] = 'Impossible d\'effectuer cette opération. Plus d\'espace libre.';
+$messages['erroroverquotadelete'] = 'Plus d\'espace libre. Utilisez SHIFT+DEL pour supprimer un message.';
$messages['invalidrequest'] = 'Requête invalide ! Aucune donnée n\'a été sauvegardée.';
$messages['invalidhost'] = 'Nom du serveur invalide.';
$messages['nomessagesfound'] = 'Cette boîte aux lettres ne contient aucun message.';
diff --git a/program/localization/fy_NL/labels.inc b/program/localization/fy_NL/labels.inc
index d04d7e89c..5ffd906eb 100644
--- a/program/localization/fy_NL/labels.inc
+++ b/program/localization/fy_NL/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Konsepten';
$labels['sent'] = 'Stjoerd';
$labels['trash'] = 'Jiskefet';
$labels['junk'] = 'Junk';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Ûnderwerp';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Unread';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Compact';
$labels['empty'] = 'Empty';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disk usage';
$labels['unknown'] = 'unknown';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Reset search';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Show last page';
$labels['group'] = 'Group';
$labels['groups'] = 'Groups';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personal Addresses';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Show preview pane';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/fy_NL/messages.inc b/program/localization/fy_NL/messages.inc
index 1dacf4adc..16f4c67bf 100644
--- a/program/localization/fy_NL/messages.inc
+++ b/program/localization/fy_NL/messages.inc
@@ -2,15 +2,172 @@
/*
+-----------------------------------------------------------------------+
- | localization/fy_NL/messages.inc |
+ | localization/<lang>/messages.inc |
| |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
+ | Localization file of the Roundcube Webmail client |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
| |
+-----------------------------------------------------------------------+
- | Author: unknown |
- +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/
*/
-$messages = array(); \ No newline at end of file
+$messages = array();
+$messages['errortitle'] = 'An error occurred!';
+$messages['loginfailed'] = 'Login failed.';
+$messages['cookiesdisabled'] = 'Your browser does not accept cookies.';
+$messages['sessionerror'] = 'Your session is invalid or expired.';
+$messages['storageerror'] = 'Connection to storage server failed.';
+$messages['servererror'] = 'Server Error!';
+$messages['servererrormsg'] = 'Server Error: $msg';
+$messages['dberror'] = 'Database Error!';
+$messages['requesttimedout'] = 'Request timed out';
+$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
+$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
+$messages['invalidrequest'] = 'Invalid request! No data was saved.';
+$messages['invalidhost'] = 'Invalid server name.';
+$messages['nomessagesfound'] = 'No messages found in this mailbox.';
+$messages['loggedout'] = 'You have successfully terminated the session. Good bye!';
+$messages['mailboxempty'] = 'Mailbox is empty.';
+$messages['refreshing'] = 'Refreshing...';
+$messages['loading'] = 'Loading...';
+$messages['uploading'] = 'Uploading file...';
+$messages['uploadingmany'] = 'Uploading files...';
+$messages['loadingdata'] = 'Loading data...';
+$messages['checkingmail'] = 'Checking for new messages...';
+$messages['sendingmessage'] = 'Sending message...';
+$messages['messagesent'] = 'Message sent successfully.';
+$messages['savingmessage'] = 'Saving message...';
+$messages['messagesaved'] = 'Message saved to Drafts.';
+$messages['successfullysaved'] = 'Successfully saved.';
+$messages['addedsuccessfully'] = 'Contact added successfully to address book.';
+$messages['contactexists'] = 'A contact with the same e-mail address already exists.';
+$messages['contactnameexists'] = 'A contact with the same name already exists.';
+$messages['blockedimages'] = 'To protect your privacy, remote images are blocked in this message.';
+$messages['encryptedmessage'] = 'This is an encrypted message and can not be displayed. Sorry!';
+$messages['nocontactsfound'] = 'No contacts found.';
+$messages['contactnotfound'] = 'The requested contact was not found.';
+$messages['contactsearchonly'] = 'Enter some search terms to find contacts';
+$messages['sendingfailed'] = 'Failed to send message.';
+$messages['senttooquickly'] = 'Please wait $sec sec(s). before sending this message.';
+$messages['errorsavingsent'] = 'An error occured while saving sent message.';
+$messages['errorsaving'] = 'An error occured while saving.';
+$messages['errormoving'] = 'Could not move the message(s).';
+$messages['errorcopying'] = 'Could not copy the message(s).';
+$messages['errordeleting'] = 'Could not delete the message(s).';
+$messages['errormarking'] = 'Could not mark the message(s).';
+$messages['deletecontactconfirm'] = 'Do you really want to delete selected contact(s)?';
+$messages['deletegroupconfirm'] = 'Do you really want to delete selected group?';
+$messages['deletemessagesconfirm'] = 'Do you really want to delete selected message(s)?';
+$messages['deletefolderconfirm'] = 'Do you really want to delete this folder?';
+$messages['purgefolderconfirm'] = 'Do you really want to delete all messages in this folder?';
+$messages['contactdeleting'] = 'Deleting contact(s)...';
+$messages['groupdeleting'] = 'Deleting group...';
+$messages['folderdeleting'] = 'Deleting folder...';
+$messages['foldermoving'] = 'Moving folder...';
+$messages['foldersubscribing'] = 'Subscribing folder...';
+$messages['folderunsubscribing'] = 'Unsubscribing folder...';
+$messages['formincomplete'] = 'The form was not completely filled out.';
+$messages['noemailwarning'] = 'Please enter a valid email address.';
+$messages['nonamewarning'] = 'Please enter a name.';
+$messages['nopagesizewarning'] = 'Please enter a page size.';
+$messages['nosenderwarning'] = 'Please enter sender e-mail address.';
+$messages['norecipientwarning'] = 'Please enter at least one recipient.';
+$messages['nosubjectwarning'] = 'The "Subject" field is empty. Would you like to enter one now?';
+$messages['nobodywarning'] = 'Send this message without text?';
+$messages['notsentwarning'] = 'Message has not been sent. Do you want to discard your message?';
+$messages['noldapserver'] = 'Please select an ldap server to search.';
+$messages['nosearchname'] = 'Please enter a contact name or email address.';
+$messages['notuploadedwarning'] = 'Not all attachments have been uploaded yet. Please wait or cancel the upload.';
+$messages['searchsuccessful'] = '$nr messages found.';
+$messages['contactsearchsuccessful'] = '$nr contacts found.';
+$messages['searchnomatch'] = 'Search returned no matches.';
+$messages['searching'] = 'Searching...';
+$messages['checking'] = 'Checking...';
+$messages['nospellerrors'] = 'No spelling errors found.';
+$messages['folderdeleted'] = 'Folder successfully deleted.';
+$messages['foldersubscribed'] = 'Folder successfully subscribed.';
+$messages['folderunsubscribed'] = 'Folder successfully unsubscribed.';
+$messages['folderpurged'] = 'Folder has successfully been emptied.';
+$messages['folderexpunged'] = 'Folder has successfully been compacted.';
+$messages['deletedsuccessfully'] = 'Successfully deleted.';
+$messages['converting'] = 'Removing formatting...';
+$messages['messageopenerror'] = 'Could not load message from server.';
+$messages['fileuploaderror'] = 'File upload failed.';
+$messages['filesizeerror'] = 'The uploaded file exceeds the maximum size of $size.';
+$messages['copysuccess'] = 'Successfully copied $nr addresses.';
+$messages['copyerror'] = 'Could not copy any addresses.';
+$messages['sourceisreadonly'] = 'This address source is read only.';
+$messages['errorsavingcontact'] = 'Could not save the contact address.';
+$messages['movingmessage'] = 'Moving message(s)...';
+$messages['copyingmessage'] = 'Copying message(s)...';
+$messages['copyingcontact'] = 'Copying contact(s)...';
+$messages['deletingmessage'] = 'Deleting message(s)...';
+$messages['markingmessage'] = 'Marking message(s)...';
+$messages['addingmember'] = 'Adding contact(s) to the group...';
+$messages['removingmember'] = 'Removing contact(s) from the group...';
+$messages['receiptsent'] = 'Successfully sent a read receipt.';
+$messages['errorsendingreceipt'] = 'Could not send the receipt.';
+$messages['deleteidentityconfirm'] = 'Do you really want to delete this identity?';
+$messages['nodeletelastidentity'] = 'You cannot delete this identity, it\'s your last one.';
+$messages['forbiddencharacter'] = 'Folder name contains a forbidden character.';
+$messages['selectimportfile'] = 'Please select a file to upload.';
+$messages['addresswriterror'] = 'The selected address book is not writeable.';
+$messages['contactaddedtogroup'] = 'Successfully added the contacts to this group.';
+$messages['contactremovedfromgroup'] = 'Successfully removed contacts from this group.';
+$messages['nogroupassignmentschanged'] = 'No group assignments changed.';
+$messages['importwait'] = 'Importing, please wait...';
+$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
+$messages['importconfirm'] = '<b>Successfully imported $inserted contacts</b>';
+$messages['importconfirmskipped'] = '<b>Skipped $skipped existing entries</b>';
+$messages['importmessagesuccess'] = 'Successfully imported $nr messages';
+$messages['importmessageerror'] = 'Import failed! The uploaded file is not a valid message or mailbox file';
+$messages['opnotpermitted'] = 'Operation not permitted!';
+$messages['nofromaddress'] = 'Missing e-mail address in selected identity.';
+$messages['editorwarning'] = 'Switching to the plain text editor will cause all text formatting to be lost. Do you wish to continue?';
+$messages['httpreceivedencrypterror'] = 'A fatal configuration error occurred. Contact your administrator immediately. <b>Your message can not be sent.</b>';
+$messages['smtpconnerror'] = 'SMTP Error ($code): Connection to server failed.';
+$messages['smtpautherror'] = 'SMTP Error ($code): Authentication failed.';
+$messages['smtpfromerror'] = 'SMTP Error ($code): Failed to set sender "$from" ($msg).';
+$messages['smtptoerror'] = 'SMTP Error ($code): Failed to add recipient "$to" ($msg).';
+$messages['smtprecipientserror'] = 'SMTP Error: Unable to parse recipients list.';
+$messages['smtperror'] = 'SMTP Error: $msg';
+$messages['emailformaterror'] = 'Invalid e-mail address: $email';
+$messages['toomanyrecipients'] = 'Too many recipients. Reduce the number of recipients to $max.';
+$messages['maxgroupmembersreached'] = 'The number of group members exceeds the maximum of $max.';
+$messages['internalerror'] = 'An internal error occured. Please try again.';
+$messages['contactdelerror'] = 'Could not delete contact(s).';
+$messages['contactdeleted'] = 'Contact(s) deleted successfully.';
+$messages['contactrestoreerror'] = 'Could not restore deleted contact(s).';
+$messages['contactrestored'] = 'Contact(s) restored successfully.';
+$messages['groupdeleted'] = 'Group deleted successfully.';
+$messages['grouprenamed'] = 'Group renamed successfully.';
+$messages['groupcreated'] = 'Group created successfully.';
+$messages['savedsearchdeleted'] = 'Saved search deleted successfully.';
+$messages['savedsearchdeleteerror'] = 'Could not delete saved search.';
+$messages['savedsearchcreated'] = 'Saved search created successfully.';
+$messages['savedsearchcreateerror'] = 'Could not create saved search.';
+$messages['messagedeleted'] = 'Message(s) deleted successfully.';
+$messages['messagemoved'] = 'Message(s) moved successfully.';
+$messages['messagecopied'] = 'Message(s) copied successfully.';
+$messages['messagemarked'] = 'Message(s) marked successfully.';
+$messages['autocompletechars'] = 'Enter at least $min characters for autocompletion.';
+$messages['autocompletemore'] = 'More matching entries found. Please type more characters.';
+$messages['namecannotbeempty'] = 'Name cannot be empty.';
+$messages['nametoolong'] = 'Name is too long.';
+$messages['folderupdated'] = 'Folder updated successfully.';
+$messages['foldercreated'] = 'Folder created successfully.';
+$messages['invalidimageformat'] = 'Not a valid image format.';
+$messages['mispellingsfound'] = 'Spelling errors detected in the message.';
+$messages['parentnotwritable'] = 'Unable to create/move folder into selected parent folder. No access rights.';
+$messages['messagetoobig'] = 'The message part is too big to process it.';
+$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
+$messages['noscriptwarning'] = 'Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser\'s settings.';
+
+?>
diff --git a/program/localization/ga_IE/labels.inc b/program/localization/ga_IE/labels.inc
index 7169a8800..9fffaf42a 100755
--- a/program/localization/ga_IE/labels.inc
+++ b/program/localization/ga_IE/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Dréachtaí';
$labels['sent'] = 'Amach';
$labels['trash'] = 'Bosca bruscair';
$labels['junk'] = 'Dramhaíl';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Ábhair';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Na rudaí nach bhuil corraithe';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Comhbhrúigh';
$labels['empty'] = 'Folmhaigh';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Toilleadh diosca atá athláimhe';
$labels['unknown'] = 'gan aithne';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Athshocraigh an cuardach';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Taispeáin an foireann deireanach';
$labels['group'] = 'Group';
$labels['groups'] = 'Grúpaí';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Seoltaí Pearsanta';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Scríobh teachtaireachta HTML';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'Mana clabhsúir HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Taispeáin an pána réamhamharc';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ga_IE/messages.inc b/program/localization/ga_IE/messages.inc
index 140b88639..70aa28a36 100755
--- a/program/localization/ga_IE/messages.inc
+++ b/program/localization/ga_IE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Ní bhfuair mé aon teachtaireacht i bosca postas seo';
diff --git a/program/localization/gl_ES/labels.inc b/program/localization/gl_ES/labels.inc
index 13fdfa793..c624c462e 100644
--- a/program/localization/gl_ES/labels.inc
+++ b/program/localization/gl_ES/labels.inc
@@ -37,11 +37,12 @@ $labels['drafts'] = 'Borradores';
$labels['sent'] = 'Enviados';
$labels['trash'] = 'Cubo do lixo';
$labels['junk'] = 'Correo lixo';
+$labels['show_real_foldernames'] = 'Amosar nomes reáis para cartafois especiáis';
// message listing
$labels['subject'] = 'Asunto';
$labels['from'] = 'Remitente';
-$labels['sender'] = 'Sender';
+$labels['sender'] = 'Remitente';
$labels['to'] = 'Destinatario';
$labels['cc'] = 'Copia (Cc)';
$labels['bcc'] = 'Copia oculta (Cco)';
@@ -58,15 +59,15 @@ $labels['mailboxlist'] = 'Cartafoles';
$labels['messagesfromto'] = 'Mensaxes da $from á $to de $count';
$labels['threadsfromto'] = 'Fíos do $from ao $to de $count';
$labels['messagenrof'] = 'Mensaxe $nr de $count';
-$labels['fromtoshort'] = '$from – $to of $count';
+$labels['fromtoshort'] = '$from - $to de $count';
$labels['copy'] = 'Copiar';
$labels['move'] = 'Mover';
$labels['moveto'] = 'Mover a...';
$labels['download'] = 'Descargar';
-$labels['open'] = 'Open';
-$labels['showattachment'] = 'Show';
-$labels['showanyway'] = 'Show it anyway';
+$labels['open'] = 'Abrir';
+$labels['showattachment'] = 'Amosar';
+$labels['showanyway'] = 'Amosala de tódolos xeitos';
$labels['filename'] = 'Nome de ficheiro';
$labels['filesize'] = 'Tamaño de ficheiro';
@@ -131,7 +132,7 @@ $labels['replytomessage'] = 'Respostar a mensaxe';
$labels['replytoallmessage'] = 'Respostar á lista ou ao remitente e a tódolos destinatarios';
$labels['replyall'] = 'Respostar a todos';
$labels['replylist'] = 'Respostar á lista de correo';
-$labels['forward'] = 'Forward';
+$labels['forward'] = 'Reenviar';
$labels['forwardinline'] = 'Reenviar inserido';
$labels['forwardattachment'] = 'Reenviar como anexo';
$labels['forwardmessage'] = 'Reenviar a mensaxe';
@@ -144,7 +145,7 @@ $labels['nextmessage'] = 'Amosar a seguinte mensaxe';
$labels['lastmessage'] = 'Amosar a última mensaxe';
$labels['backtolist'] = 'Voltar á lista de mensaxes';
$labels['viewsource'] = 'Ver código fonte';
-$labels['mark'] = 'Mark';
+$labels['mark'] = 'Marcar';
$labels['markmessages'] = 'Marcar mensaxes';
$labels['markread'] = 'Como lidas';
$labels['markunread'] = 'Como non lidas';
@@ -162,8 +163,9 @@ $labels['currpage'] = 'Páxina actual';
$labels['unread'] = 'Non lidas';
$labels['flagged'] = 'Marcadas';
$labels['unanswered'] = 'Non respostadas';
+$labels['withattachment'] = 'Con anexo';
$labels['deleted'] = 'Marcadas como eliminadas';
-$labels['undeleted'] = 'Not deleted';
+$labels['undeleted'] = 'Non borradas';
$labels['invert'] = 'Inverter';
$labels['filter'] = 'Filtrar';
$labels['list'] = 'Lista';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Modo de vista da lista';
$labels['folderactions'] = 'Accións cos cartafoles';
$labels['compact'] = 'Compactar';
$labels['empty'] = 'Baleirar';
+$labels['importmessages'] = 'Importar mensaxes';
$labels['quota'] = 'Uso de disco';
$labels['unknown'] = 'descoñecido';
@@ -201,16 +204,17 @@ $labels['quicksearch'] = 'Busca rápida';
$labels['resetsearch'] = 'Restablecer a busca';
$labels['searchmod'] = 'Modificadores de busca';
$labels['msgtext'] = 'Mensaxe enteira';
-$labels['body'] = 'Body';
+$labels['body'] = 'Corpo';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Abrir nunha nova fiestra';
$labels['emlsave'] = 'Gardar (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Amosar en texto plano';
+$labels['changeformathtml'] = 'Amosar en HTML';
// message compose
$labels['editasnew'] = 'Editar como nova';
-$labels['send'] = 'Send';
+$labels['send'] = 'Enviar';
$labels['sendmessage'] = 'Enviar a mensaxe agora';
$labels['savemessage'] = 'Gardar a mensaxe como borrador';
$labels['addattachment'] = 'Anexar un ficheiro';
@@ -222,12 +226,12 @@ $labels['mailreplyintro'] = 'O $date, $sender escribiu:';
$labels['originalmessage'] = 'Mensaxe orixinal';
$labels['editidents'] = 'Modificar identidades';
-$labels['spellcheck'] = 'Spell';
+$labels['spellcheck'] = 'Ortografía';
$labels['checkspelling'] = 'Revisar a ortografía';
$labels['resumeediting'] = 'Voltar á edición';
$labels['revertto'] = 'Voltar a';
-$labels['attach'] = 'Attach';
+$labels['attach'] = 'Anexar';
$labels['attachments'] = 'Ficheiros anexos';
$labels['upload'] = 'Cargar';
$labels['uploadprogress'] = '$percent ($current de $total)';
@@ -244,9 +248,9 @@ $labels['nosubject'] = '(Sen asunto)';
$labels['showimages'] = 'Amosar as imaxes';
$labels['alwaysshow'] = 'Amosar sempre as imaxes nas mensaxes de $sender';
$labels['isdraft'] = 'Esta mensaxe é un borrador';
-$labels['andnmore'] = '$nr more...';
-$labels['togglemoreheaders'] = 'Show more message headers';
-$labels['togglefullheaders'] = 'Toggle raw message headers';
+$labels['andnmore'] = '$nr máis...';
+$labels['togglemoreheaders'] = 'Amosar máis cabecerias';
+$labels['togglefullheaders'] = 'Conmutar cabeceiras en bruto';
$labels['htmltoggle'] = 'HTML';
$labels['plaintoggle'] = 'Só texto';
@@ -338,13 +342,13 @@ $labels['composeto'] = 'Redactar mensaxe para';
$labels['contactsfromto'] = 'Contactos do $from ao $to de $count';
$labels['print'] = 'Imprimir';
$labels['export'] = 'Exportar';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Exportar todas';
+$labels['exportsel'] = 'Exportar as seleccionadas';
$labels['exportvcards'] = 'Exportar os contactos en formato vCard';
$labels['newcontactgroup'] = 'Crear novo grupo de contactos';
$labels['grouprename'] = 'Mudar o nome do grupo';
$labels['groupdelete'] = 'Borrar o grupo';
-$labels['groupremoveselected'] = 'Remove selected contacts from group';
+$labels['groupremoveselected'] = 'Eliminar do grupo os contactos seleccionados';
$labels['previouspage'] = 'Amosar o grupo anterior';
$labels['firstpage'] = 'Amosar o primeiro grupo';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Amosar o último grupo';
$labels['group'] = 'Grupo';
$labels['groups'] = 'Grupos';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Enderezos persoais';
$labels['searchsave'] = 'Gardar procura';
@@ -363,7 +368,7 @@ $labels['importcontacts'] = 'Importar contactos';
$labels['importfromfile'] = 'Importar desde ficheiro:';
$labels['importtarget'] = 'Engadir contactos ao caderno de enderezos:';
$labels['importreplace'] = 'Substituír completamente o caderno de enderezos';
-$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.';
+$labels['importdesc'] = 'Pode cargar contactos desde un caderno de enderezos preexistente.<br/>Pódense importar enderezos en formato <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (valores separados por comas)';
$labels['done'] = 'Rematado';
// settings
@@ -383,8 +388,8 @@ $labels['edititem'] = 'Editar';
$labels['preferhtml'] = 'Prefiro HTML';
$labels['defaultcharset'] = 'Xogo de caracteres por omisión';
$labels['htmlmessage'] = 'Mensaxe HTML';
-$labels['messagepart'] = 'Part';
-$labels['digitalsig'] = 'Digital Signature';
+$labels['messagepart'] = 'Parte';
+$labels['digitalsig'] = 'Sinatura dixital';
$labels['dateformat'] = 'Formato da data';
$labels['timeformat'] = 'Formato da hora';
$labels['prettydate'] = 'Data decorada';
@@ -395,12 +400,13 @@ $labels['timezone'] = 'Zona horaria';
$labels['pagesize'] = 'Liñas por páxina';
$labels['signature'] = 'Sinatura';
$labels['dstactive'] = 'Cambio de hora según horario de verán';
-$labels['showinextwin'] = 'Open message in a new window';
-$labels['composeextwin'] = 'Compose in a new window';
+$labels['showinextwin'] = 'Abrir a mensaxe nunha nova xanela';
+$labels['composeextwin'] = 'Redactar nunha xanela nova';
$labels['htmleditor'] = 'Redactar mensaxes HTML';
$labels['htmlonreply'] = 'só cando se resposte a unha mensaxe HTML';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
+$labels['htmlonreplyandforward'] = 'ao reenviar ou respostar a unha mensaxe HTML';
$labels['htmlsignature'] = 'Sinatura HTML';
+$labels['showemail'] = 'Amosar enderezo de correo co nome en pantalla';
$labels['previewpane'] = 'Amosar previsualización';
$labels['skin'] = 'Aspecto da interface';
$labels['logoutclear'] = 'Baleirar o cubo do lixo ao saír';
@@ -418,14 +424,14 @@ $labels['readwhendeleted'] = 'Marcar a mensaxe como lida ao eliminar';
$labels['flagfordeletion'] = 'Marcar a mensaxe para eliminar no canto de eliminar';
$labels['skipdeleted'] = 'Non amosar as mensaxes marcadas como eliminadas';
$labels['deletealways'] = 'Eliminar as mensaxes aínda que non se poidan gardar no cubo do lixo';
-$labels['deletejunk'] = 'Directly delete messages in Junk';
+$labels['deletejunk'] = 'Borrar automáticamente as mensaxes no cartafol "Correo lixo"';
$labels['showremoteimages'] = 'Amosar as imaxes remotas';
$labels['fromknownsenders'] = 'de remitentes coñecidos';
$labels['always'] = 'sempre';
$labels['showinlineimages'] = 'Amosar as imaxes anexas baixo a mensaxe';
$labels['autosavedraft'] = 'Gardar borrador automáticamente';
$labels['everynminutes'] = 'cada $n minuto(s)';
-$labels['refreshinterval'] = 'Refresh (check for new messages, etc.)';
+$labels['refreshinterval'] = 'Refrescar (buscar novas mensaxes, etc)';
$labels['never'] = 'nunca';
$labels['immediately'] = 'de inmediato';
$labels['messagesdisplaying'] = 'Visualización das mensaxes';
@@ -447,35 +453,33 @@ $labels['maintenance'] = 'Mantemento';
$labels['newmessage'] = 'Mensaxes novas';
$labels['signatureoptions'] = 'Opcións da firma';
$labels['whenreplying'] = 'Ao respostar';
-$labels['replyempty'] = 'do not quote the original message';
+$labels['replyempty'] = 'non citar a mensaxe orixinal';
$labels['replytopposting'] = 'comezar a nova mensaxe enriba da orixinal';
$labels['replybottomposting'] = 'comezar a nova mensaxe embaixo da orixinal';
$labels['replyremovesignature'] = 'Eliminar a firma do remitente ao respostar';
$labels['autoaddsignature'] = 'Engadir firma automáticamente';
$labels['newmessageonly'] = 'só nas mensaxes novas';
$labels['replyandforwardonly'] = 'só nas respostas e reenvíos';
-$labels['replysignaturepos'] = 'Ao respostar ou reenviar colocar a firma';
-$labels['belowquote'] = 'embaixo do texto citado';
-$labels['abovequote'] = 'enriba do texto citado';
$labels['insertsignature'] = 'Engadir firma';
$labels['previewpanemarkread'] = 'Marcar como lidas as mensaxes previsualizadas';
$labels['afternseconds'] = 'logo de $n segundos';
$labels['reqmdn'] = 'Solicitar sempre unha notificación da entrega';
$labels['reqdsn'] = 'Solicitar sempre unha notificación do estado de envío';
$labels['replysamefolder'] = 'Deixar as respostas no cartafol onde está a mensaxe á que se responde';
-$labels['defaultabook'] = 'Default address book';
+$labels['defaultabook'] = 'Caderno de enderezos por defecto';
$labels['autocompletesingle'] = 'Ignorar as direccións alternativas no autocompletado';
-$labels['listnamedisplay'] = 'List contacts as';
+$labels['listnamedisplay'] = 'Listar os contactos coma';
$labels['spellcheckbeforesend'] = 'Revisar a ortografía antes de enviar unha mensaxe';
$labels['spellcheckoptions'] = 'Opción da revisión ortográfica';
$labels['spellcheckignoresyms'] = 'Ignorar as palabras con símbolos';
$labels['spellcheckignorenums'] = 'Ignorar as palabras con números';
$labels['spellcheckignorecaps'] = 'Ignorar as palabras escritas en maiúsculas';
$labels['addtodict'] = 'Engadir ao diccionario';
-$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
-$labels['forwardmode'] = 'Messages forwarding';
-$labels['inline'] = 'inline';
-$labels['asattachment'] = 'as attachment';
+$labels['mailtoprotohandler'] = 'Rexistrar o manexador de protocolo para as ligazóns "mailto:"';
+$labels['standardwindows'] = 'Manexar avisos emerxentes como xanelas estándar';
+$labels['forwardmode'] = 'Reenvio de mensaxes';
+$labels['inline'] = 'inserido';
+$labels['asattachment'] = 'coma anexo';
$labels['folder'] = 'Cartafol';
$labels['folders'] = 'Cartafoles';
@@ -503,7 +507,7 @@ $labels['sortasc'] = 'Orde ascendente';
$labels['sortdesc'] = 'Orde descendente';
$labels['undo'] = 'Desfacer';
-$labels['installedplugins'] = 'Installed plugins';
+$labels['installedplugins'] = 'Complementos instalados';
$labels['plugin'] = 'Complemento';
$labels['version'] = 'Versión';
$labels['source'] = 'Fonte';
diff --git a/program/localization/gl_ES/messages.inc b/program/localization/gl_ES/messages.inc
index 6f230bc89..8fc2cb424 100644
--- a/program/localization/gl_ES/messages.inc
+++ b/program/localization/gl_ES/messages.inc
@@ -17,7 +17,7 @@
*/
$messages = array();
-$messages['errortitle'] = 'An error occurred!';
+$messages['errortitle'] = 'Ocurreu un erro!';
$messages['loginfailed'] = 'O contrasinal ou o nome de usuario son incorrectos.';
$messages['cookiesdisabled'] = 'O seu navegador non acepta galletas.';
$messages['sessionerror'] = 'A súa sesión non é válida ou expirou.';
@@ -25,15 +25,17 @@ $messages['storageerror'] = 'Fallou a conexión co servidor IMAP.';
$messages['servererror'] = 'Erro do servidor!';
$messages['servererrormsg'] = 'Erro do servidor: $msg';
$messages['dberror'] = 'Erro na base de datos!';
-$messages['requesttimedout'] = 'Request timed out';
+$messages['requesttimedout'] = 'A petición expirou';
$messages['errorreadonly'] = 'Non foi posible realizar a operación. O cartafol é de só lectura.';
$messages['errornoperm'] = 'Non foi posible realizar a operación. Permiso denegado.';
+$messages['erroroverquota'] = 'Non se pode realizar a operación, non hai espacio no disco.';
+$messages['erroroverquotadelete'] = 'Non hai espacio no disco. Utilice Maiúsculas+Supr para borrar unha mensaxe.';
$messages['invalidrequest'] = 'Petición inválida!. Non se gardou ningún dato.';
-$messages['invalidhost'] = 'Invalid server name.';
+$messages['invalidhost'] = 'O nome do servidor non é válido.';
$messages['nomessagesfound'] = 'Non se atoparon mensaxes nesta caixa de correo.';
$messages['loggedout'] = 'Rematou correctamente a súa sesión. Ata logo!';
$messages['mailboxempty'] = 'A caixa de correo está vacía.';
-$messages['refreshing'] = 'Refreshing...';
+$messages['refreshing'] = 'A refrescar...';
$messages['loading'] = 'Cargando...';
$messages['uploading'] = 'Cargando ficheiro...';
$messages['uploadingmany'] = 'Cargando ficheiros...';
@@ -112,18 +114,20 @@ $messages['addingmember'] = 'Engadindo o(s) contacto(s) ao grupo...';
$messages['removingmember'] = 'Eliminando o(s) contacto(s) do grupo...';
$messages['receiptsent'] = 'A notificación da entrega enviouse correctamente.';
$messages['errorsendingreceipt'] = 'Non foi posible enviar a notificación da entrega.';
-$messages['deleteidentityconfirm'] = 'Do you really want to delete this identity?';
+$messages['deleteidentityconfirm'] = 'Quere eliminar esta identidade?';
$messages['nodeletelastidentity'] = 'Non pode eliminar esta identidade, é a última.';
$messages['forbiddencharacter'] = 'O nome do cartafol contén un carácter non válido.';
$messages['selectimportfile'] = 'Por favor, escolla un ficheiro para cargar.';
$messages['addresswriterror'] = 'Non se pode escribir no caderno de enderezos que escolleu.';
$messages['contactaddedtogroup'] = 'Engadiuse correctamente o contacto a este grupo.';
$messages['contactremovedfromgroup'] = 'Suprimiuse correctamente o contacto deste grupo.';
-$messages['nogroupassignmentschanged'] = 'No group assignments changed.';
+$messages['nogroupassignmentschanged'] = 'Non cambiou ningunha asignación de grupo.';
$messages['importwait'] = 'A importar. Por favor, agarde...';
-$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
+$messages['importformaterror'] = 'Fallou a importación! O ficheiro cargado non contén datos válidos.';
$messages['importconfirm'] = '<b>Importáronse correctamente $inserted contactos. Ignoráronse $skipped contactos que xa existían</b>:<p><em>$names</em></p>';
$messages['importconfirmskipped'] = '<b>Ignoráronse $skipped existing entradas</b>';
+$messages['importmessagesuccess'] = 'Importados $nr mensaxes con éxito';
+$messages['importmessageerror'] = 'Fallou a importación! O arquivo subido non é unha mensaxe válida ou un ficheiro de caixa de correo';
$messages['opnotpermitted'] = 'Operación non permitida!';
$messages['nofromaddress'] = 'Falta o enderezo de correo electrónico na identidade que escolleu.';
$messages['editorwarning'] = 'Se troca neste intre ao editor de texto plano, vai perder todo o formato do texto. Quere continuar?';
@@ -162,8 +166,8 @@ $messages['foldercreated'] = 'O cartafol creouse correctamente.';
$messages['invalidimageformat'] = 'O formato da imaxe non é válido.';
$messages['mispellingsfound'] = 'Atopáronse erros ortográficos na mensaxe.';
$messages['parentnotwritable'] = 'Non foi posible crear/mover o cartafol no cartafol padre escollido porque non ten permisos.';
-$messages['messagetoobig'] = 'The message part is too big to process it.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
-$messages['noscriptwarning'] = 'Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser\'s settings.';
+$messages['messagetoobig'] = 'A mensaxe é demasiado grande para procesala';
+$messages['attachmentvalidationerror'] = 'ATENCIÓN! Este anexo é sospeitoso porque o seu tipo non coincide o tipo declarado na mensaxe. Se non confía no remitente, non debería abrilo, porque podería conter un virus ou malware.<br/><br/><em>Tipo agardado: $expected; Tipo detectado: $detected</em>';
+$messages['noscriptwarning'] = 'Atención: Este servicio de correo web precisa de Javascript!. Por favor, active javascript nas opción do seu navegador.';
?>
diff --git a/program/localization/he_IL/labels.inc b/program/localization/he_IL/labels.inc
index 698b73493..7ad04ab4a 100644
--- a/program/localization/he_IL/labels.inc
+++ b/program/localization/he_IL/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'טיוטות';
$labels['sent'] = 'נשלח';
$labels['trash'] = 'אשפה';
$labels['junk'] = 'זבל';
+$labels['show_real_foldernames'] = 'הצגת שמות אמיתיים של תיקיות מיוחדות';
// message listing
$labels['subject'] = 'נושא';
@@ -133,7 +134,7 @@ $labels['replyall'] = 'מענה לכולם';
$labels['replylist'] = 'מענה לרשימת תפוצה';
$labels['forward'] = 'העברה';
$labels['forwardinline'] = 'העבר בגוף ההודעה';
-$labels['forwardattachment'] = 'העבר כקובץ מצורף';
+$labels['forwardattachment'] = 'העבר כצרופה';
$labels['forwardmessage'] = 'העבר הודעה';
$labels['deletemessage'] = 'מחיקה';
$labels['movemessagetotrash'] = 'השלכה לאשפה';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'דף נוכחי';
$labels['unread'] = 'לא נקראו';
$labels['flagged'] = 'מסומן';
$labels['unanswered'] = 'לא נענה';
+$labels['withattachment'] = 'עם צרופה';
$labels['deleted'] = 'נמחק';
$labels['undeleted'] = 'לא נמחק';
$labels['invert'] = 'היפוך הסימון';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'אופן הצגת רשימה';
$labels['folderactions'] = 'פעולות על תיקים';
$labels['compact'] = 'פינוי שטח לא מנוצל';
$labels['empty'] = 'ריקון';
+$labels['importmessages'] = 'ייבוא הודעות';
$labels['quota'] = 'ניצול קיבולת';
$labels['unknown'] = 'לא ידוע';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'ניקוי תיבת החיפוש';
$labels['searchmod'] = 'מאפייני חיפוש';
$labels['msgtext'] = 'כל ההודעה';
$labels['body'] = 'גוף ההודעה';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'פתיחה בחלון חדש';
$labels['emlsave'] = 'הורדת הודעה בפורמט EML';
@@ -228,7 +232,7 @@ $labels['resumeediting'] = 'המשך עריכה';
$labels['revertto'] = 'חזור למצב קודם';
$labels['attach'] = 'צירוף';
-$labels['attachments'] = 'קבצים מצורפים';
+$labels['attachments'] = 'צרופות';
$labels['upload'] = 'העלאה';
$labels['uploadprogress'] = '( $total מתוך $current ) $percent';
$labels['close'] = 'סגירה';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'הצגת הקבוצה האחרונה';
$labels['group'] = 'קבוצה';
$labels['groups'] = 'קבוצות';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'כתובות פרטיות';
$labels['searchsave'] = 'שמירת החיפוש';
@@ -403,6 +408,7 @@ $labels['htmleditor'] = 'יצירת הודעה מעוצבת';
$labels['htmlonreply'] = 'רק במענה להודעת HTML';
$labels['htmlonreplyandforward'] = 'להעביר או להשיב להודעה שהגיעה בפורמט HTML';
$labels['htmlsignature'] = 'חתימה מעוצבת';
+$labels['showemail'] = 'הצגת כתובת דוא"ל עם שם השולח';
$labels['previewpane'] = 'תצוגה מוקדמת';
$labels['skin'] = 'ערכת מראה';
$labels['logoutclear'] = 'ריקון סל אשפה ביציאה';
@@ -456,9 +462,6 @@ $labels['replyremovesignature'] = 'החתימה תוסר מההודעה המקו
$labels['autoaddsignature'] = 'הוספה אוטומטית של חתימה';
$labels['newmessageonly'] = 'הודעה חדשה בלבד';
$labels['replyandforwardonly'] = 'מענה והעברת הודעה בלבד';
-$labels['replysignaturepos'] = 'במענה או בהעברת הודעה, החתימה תופיע';
-$labels['belowquote'] = 'בסוף ההודעה המקורית';
-$labels['abovequote'] = 'בתחילת ההודעה המקורית';
$labels['insertsignature'] = 'שיבוץ חתימה';
$labels['previewpanemarkread'] = 'סימון הודעה שנצפתה כנקראה';
$labels['afternseconds'] = 'לאחר $n שניות';
@@ -475,6 +478,7 @@ $labels['spellcheckignorenums'] = 'התעלמות ממילים המכילות מ
$labels['spellcheckignorecaps'] = 'התעלמות ממילים עם אותציות ראשיות';
$labels['addtodict'] = 'הוספה למילון';
$labels['mailtoprotohandler'] = 'קביעת הפרוטוקול לטיפול בקישור מסוג mailto:links';
+$labels['standardwindows'] = 'חלונות קופצים יטופלו כחלונות רגילים';
$labels['forwardmode'] = 'הפנית הודעות';
$labels['inline'] = 'חלק מההודעה';
$labels['asattachment'] = 'כצרופה';
diff --git a/program/localization/he_IL/messages.inc b/program/localization/he_IL/messages.inc
index be4ef2824..37ebcea01 100644
--- a/program/localization/he_IL/messages.inc
+++ b/program/localization/he_IL/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = '! שגיאה במסד הנתונים';
$messages['requesttimedout'] = 'תם הזמן המוקצב לבקשה';
$messages['errorreadonly'] = 'לא ניתן לבצע הפעולה כי התיק ניתן לקריאה בלבד';
$messages['errornoperm'] = 'לא ניתן לבצע הפעולה כי אין הרשאה לבצעה';
+$messages['erroroverquota'] = 'לא ניתן לבצע הפעולה כי לא מקום פנוי על הדיסק';
+$messages['erroroverquotadelete'] = 'אין מקום פנוי על הדיסק. יש להשתמש ב SHIFT+DELETE כדי למחוק ההודעה';
$messages['invalidrequest'] = 'בקשה לא חוקית. המידע לא נשמר';
$messages['invalidhost'] = 'שם שרת לא חוקי';
$messages['nomessagesfound'] = 'לא נמצאו הודעות בתיבה זו';
@@ -124,6 +126,8 @@ $messages['importwait'] = 'ייבוא, נא להמתין..';
$messages['importformaterror'] = 'היבוא נכשל ! הקובץ שהועלה אינו מתאים.';
$messages['importconfirm'] = '<b>יובאו $inserted אנשי קשר, $skipped היו קיימים </b>:<p><em>$names</em></p>';
$messages['importconfirmskipped'] = '<b> דילוג של $skipped נתונים קיימים <b>';
+$messages['importmessagesuccess'] = 'יובאו בהצלחה $nr הודעות ';
+$messages['importmessageerror'] = 'היבוא נכשל ! הקובץ שהועלה אינו הודעה או קובץ הודעות במבנה מתאים';
$messages['opnotpermitted'] = 'פעולה אסורה!';
$messages['nofromaddress'] = 'לזהות שנבחרה חסרה כתובת דואר';
$messages['editorwarning'] = 'המעבר לעורך רגיל יגרום לאיבוד את העריכה הקיימת. האם להמשיך?';
diff --git a/program/localization/hi_IN/labels.inc b/program/localization/hi_IN/labels.inc
index 4564e1226..303e0b5fb 100644
--- a/program/localization/hi_IN/labels.inc
+++ b/program/localization/hi_IN/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'ड्राफ़ट';
$labels['sent'] = 'भेजा गया';
$labels['trash'] = 'रद्दी';
$labels['junk'] = 'स्पैम';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'विशय';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'अनदेखी';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'छोटा करें';
$labels['empty'] = 'मेल रद्दी में डालें';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'डिस्क उपयोग';
$labels['unknown'] = 'अज्ञात';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'खोज खाली करें';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'आखिरी बन्डल दिखाऐं'
$labels['group'] = 'Group';
$labels['groups'] = 'Groups';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personal Addresses';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'मेल ऐच-टी-ऐम-एल (HTML) मे ल
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'ऐच-टी-ऐम-एल (HTML) दस्तखत';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'झलक पट्टी दिखाऐं';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/hi_IN/messages.inc b/program/localization/hi_IN/messages.inc
index 328dbe00e..1d55f5c48 100644
--- a/program/localization/hi_IN/messages.inc
+++ b/program/localization/hi_IN/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'इस मेलबॉक्स में कोई मेल नहीं है';
diff --git a/program/localization/hr_HR/labels.inc b/program/localization/hr_HR/labels.inc
index bf5364653..4578fed2b 100644
--- a/program/localization/hr_HR/labels.inc
+++ b/program/localization/hr_HR/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Predlošci';
$labels['sent'] = 'Poslano';
$labels['trash'] = 'Smeće';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Naslov';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Trenutna stranica';
$labels['unread'] = 'Nepročitane';
$labels['flagged'] = 'Označene';
$labels['unanswered'] = 'Neodgovrene';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Obrisano';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Obrni';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Model pregleda listi';
$labels['folderactions'] = 'Akcije mapa';
$labels['compact'] = 'Kompresiranje';
$labels['empty'] = 'Isprazni';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Kvota';
$labels['unknown'] = 'nepoznato';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Prikaži sve poruke';
$labels['searchmod'] = 'Postavke pretrage';
$labels['msgtext'] = 'Cijela poruka';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Otvori u novom prozoru';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Zadnja strana';
$labels['group'] = 'Grupa';
$labels['groups'] = 'Grupe';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Privatna adresa';
$labels['searchsave'] = 'Pohrani pretragu';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Sastavi HTML poruke';
$labels['htmlonreply'] = 'odgovor samo na HTML poruke';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML potpis';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Prikaži područje pregleda';
$labels['skin'] = 'Tema izgleda';
$labels['logoutclear'] = 'Očisti smeće pri izlazu';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Kod odgovaranja, makni originalni potpis iz p
$labels['autoaddsignature'] = 'Automatski dodaj potpis';
$labels['newmessageonly'] = 'samo nova poruka';
$labels['replyandforwardonly'] = 'samo odgovori i proslijeđivanja';
-$labels['replysignaturepos'] = 'Kod downloada ili proslijeđivanja postavi potpis';
-$labels['belowquote'] = 'ispod citata';
-$labels['abovequote'] = 'iznad citata';
$labels['insertsignature'] = 'Umetni potpis';
$labels['previewpanemarkread'] = 'Obilježi pregledane poruke kao pročitane';
$labels['afternseconds'] = 'nakon $n sekundi';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignoriraj riječi koje sadrže brojeve';
$labels['spellcheckignorecaps'] = 'Ignoriraj riječi sa sa svim velikim slovima';
$labels['addtodict'] = 'Dodaj u rječnik';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/hr_HR/messages.inc b/program/localization/hr_HR/messages.inc
index c3a4f1779..3e6cc6daf 100644
--- a/program/localization/hr_HR/messages.inc
+++ b/program/localization/hr_HR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Greška baze podataka!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Nemoguća izvedba operacije. Mapa je samo za čitanje.';
$messages['errornoperm'] = 'Nemoguća izvedba operacije. Dozvola odbijena.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Nepravilan zahtijev! Podaci nisu spremljeni.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Nema poruka u sandučiću';
diff --git a/program/localization/hu_HU/labels.inc b/program/localization/hu_HU/labels.inc
index 96c43d146..abdc7e891 100644
--- a/program/localization/hu_HU/labels.inc
+++ b/program/localization/hu_HU/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Piszkozatok';
$labels['sent'] = 'Küldött levelek';
$labels['trash'] = 'Törölt elemek';
$labels['junk'] = 'Kéretlen levelek';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Tárgy';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Másolás';
$labels['move'] = 'Áthelyezés';
$labels['moveto'] = 'Áthelyezés...';
$labels['download'] = 'letöltés';
-$labels['open'] = 'Open';
+$labels['open'] = 'Megnyítás';
$labels['showattachment'] = 'Megjelenítés';
$labels['showanyway'] = 'Megjelnités mindenképpen';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Aktuális oldal';
$labels['unread'] = 'Olvasatlan';
$labels['flagged'] = 'Megjelölt';
$labels['unanswered'] = 'Megválaszolatlan';
+$labels['withattachment'] = 'Csatolmánnyal';
$labels['deleted'] = 'Törölt';
$labels['undeleted'] = 'Nem lett törölve';
$labels['invert'] = 'Invertálás';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Megjelenítési mód';
$labels['folderactions'] = 'Mappaműveletek...';
$labels['compact'] = 'Tömörítés';
$labels['empty'] = 'Kiürítés';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Helyfoglalás';
$labels['unknown'] = 'ismeretlen';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Alapállapot';
$labels['searchmod'] = 'Keresési opciók';
$labels['msgtext'] = 'Teljes üzenet';
$labels['body'] = 'Törzs';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Megnyitás új ablakban';
$labels['emlsave'] = 'Letöltés (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Megjelenítés sima szöveges formátumban';
+$labels['changeformathtml'] = 'Megjelenítés HTML formátumban';
// message compose
$labels['editasnew'] = 'Szerkesztés újként';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Utolsó oldal';
$labels['group'] = 'Csoport';
$labels['groups'] = 'Csoportok';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Személyes címjegyzék';
$labels['searchsave'] = 'Keresés mentése';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML üzenet írása';
$labels['htmlonreply'] = 'csak HTML üzenetre válaszolva';
$labels['htmlonreplyandforward'] = 'HTML üzenet továbbításakor vagy az arra való válaszoláskor';
$labels['htmlsignature'] = 'HTML aláírás';
+$labels['showemail'] = 'Az email címek megjelenítése a partner nevével';
$labels['previewpane'] = 'Előnézeti kép';
$labels['skin'] = 'Kinézet';
$labels['logoutclear'] = 'Törölt elemek mappa ürítése kilépéskor';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Válasznál az eredeti aláírás eltávolít
$labels['autoaddsignature'] = 'Aláírás automatikus hozzáadása';
$labels['newmessageonly'] = 'csak új üzenetnél';
$labels['replyandforwardonly'] = 'válasznál és továbbításnál';
-$labels['replysignaturepos'] = 'Válasznál és továbbításnál kerüljön az aláírás';
-$labels['belowquote'] = 'az idézett szöveg alá';
-$labels['abovequote'] = 'az idézett szöveg fölé';
$labels['insertsignature'] = 'Aláírás beillesztése';
$labels['previewpanemarkread'] = 'Előnézetben megjelent üzenetek megjelölése olvasottként';
$labels['afternseconds'] = '$n másodperc elteltével';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Számot tartalmazó szavak kihagyása';
$labels['spellcheckignorecaps'] = 'Csak nagybetűt tartalmazó szavak kihagyása';
$labels['addtodict'] = 'Hozzáadás a szótárhoz';
$labels['mailtoprotohandler'] = 'Beállítás a mailto: linkek kezelőjeként';
+$labels['standardwindows'] = 'A felugró ablakok használata szokásos ablakként';
$labels['forwardmode'] = 'Üzenet továbbítás';
$labels['inline'] = 'beágyazott';
$labels['asattachment'] = 'csatolmányként';
diff --git a/program/localization/hu_HU/messages.inc b/program/localization/hu_HU/messages.inc
index ee3e8a9a5..6528602a4 100644
--- a/program/localization/hu_HU/messages.inc
+++ b/program/localization/hu_HU/messages.inc
@@ -17,7 +17,7 @@
*/
$messages = array();
-$messages['errortitle'] = 'Hiba történt';
+$messages['errortitle'] = 'Hiba történt!';
$messages['loginfailed'] = 'Sikertelen bejelentkezés.';
$messages['cookiesdisabled'] = 'A böngésző nem támogatja a sütik használatát';
$messages['sessionerror'] = 'Érvénytelen vagy lejárt munkamenet';
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Adatbázishiba!';
$messages['requesttimedout'] = 'A kérés túllépte az időkorlátot';
$messages['errorreadonly'] = 'A műveletet nem sikerült végrehajtani. A mappa írásvédett.';
$messages['errornoperm'] = 'A műveletet nem sikerült végrehajtani. Hozzáférés megtagadva.';
+$messages['erroroverquota'] = 'A műveletet nem lehetett végrehajtani mivel nincs elég szabad hely a merevlemezen.';
+$messages['erroroverquotadelete'] = 'Nincs elég szabad hely a merevlemezen. A SHIFT+DEL billenytyű kombinációt használd az üzenet törléséhez.';
$messages['invalidrequest'] = 'Érvénytelen kérés! Az adatok nem lettek elmentve.';
$messages['invalidhost'] = 'Hibás szerver hoszt név';
$messages['nomessagesfound'] = 'A fiók nem tartalmaz leveleket';
diff --git a/program/localization/hy_AM/labels.inc b/program/localization/hy_AM/labels.inc
index 3612dc974..8ee9316c4 100644
--- a/program/localization/hy_AM/labels.inc
+++ b/program/localization/hy_AM/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Սևագրեր';
$labels['sent'] = 'Ուղարկված';
$labels['trash'] = 'Աղբարկղ';
$labels['junk'] = 'Թափոն';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Վերնագիր';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Առկա էջ';
$labels['unread'] = 'Չկարդացածը';
$labels['flagged'] = 'Նշված';
$labels['unanswered'] = 'Անպատասխան';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Ջնջված';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Փոխատեղել';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Ցուցակով տեսքի տարբերակը';
$labels['folderactions'] = 'Պանակի գործողություններ…';
$labels['compact'] = 'Սեղմել';
$labels['empty'] = 'Դատարկել';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Դիսկային տարածք';
$labels['unknown'] = 'անհայտ';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Վերսկսել որոնումը';
$labels['searchmod'] = 'Որոնման փոփոխիչներ';
$labels['msgtext'] = 'Ողջ հաղորդագրությունը';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Բացել նոր պատուհանում';
$labels['emlsave'] = 'Ներբեռնել (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Ցուցադրել վերջին էջը';
$labels['group'] = 'Խումբ';
$labels['groups'] = 'Խմբեր';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Անձնական հասցեներ';
$labels['searchsave'] = 'Պահպանել որոնումը';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Ստեղծել HTML նամակներ';
$labels['htmlonreply'] = 'միայն HTML հաղորդագրությանը պատասխանելիս';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML ստորագրություն';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Ցուցադրել պատուհանը';
$labels['skin'] = 'Տեսքի տարբերակ';
$labels['logoutclear'] = 'Դուրս գալուց դատարկել աղբարկղը';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Պատասխանելիս հեռացնել հ
$labels['autoaddsignature'] = 'Ավելացնել ստորագրություն';
$labels['newmessageonly'] = 'միայն նոր հաղորդագրություններում';
$labels['replyandforwardonly'] = 'պատասխաններում և փոխանցումներում';
-$labels['replysignaturepos'] = 'Ավելացնել ստորագրությունը պատասխանելիս կամ փոխանցելիս';
-$labels['belowquote'] = 'Մեջբերման ներքևում';
-$labels['abovequote'] = 'Մեջբերման վերևում';
$labels['insertsignature'] = 'Ներդնել ստորագրությունը';
$labels['previewpanemarkread'] = 'Նշել նախադիտված հաղորդագրությունները որպես ընթերցված';
$labels['afternseconds'] = '$n վարկյան հետո';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Անտեսել թվերով բառերը';
$labels['spellcheckignorecaps'] = 'Անտեսել լրիվ մեծատառ բառերը';
$labels['addtodict'] = 'Ավելացնել բառարանում';
$labels['mailtoprotohandler'] = 'mailto: հղումների սպասարկող';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/hy_AM/messages.inc b/program/localization/hy_AM/messages.inc
index bbb083a21..6b3f4ebe9 100644
--- a/program/localization/hy_AM/messages.inc
+++ b/program/localization/hy_AM/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Տվյալների շտեմարանի սխա՛լ';
$messages['requesttimedout'] = 'Հարցման թույլատրելի ժամանակը սպառվեց';
$messages['errorreadonly'] = 'Գործողությունը անհնար է։ Պանակը միայն ընթերցման համար է։';
$messages['errornoperm'] = 'Գործողության կատարման իրավունքը մերժված է։';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Սխալ հարցում, ապարդյուն։';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Այս փոստարկղում նամակներ չկան';
diff --git a/program/localization/ia/labels.inc b/program/localization/ia/labels.inc
index 89273c147..1cd614d35 100644
--- a/program/localization/ia/labels.inc
+++ b/program/localization/ia/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Drafts';
$labels['sent'] = 'Inviate';
$labels['trash'] = 'Trash';
$labels['junk'] = 'Junk';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Subjecto';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Non legite';
$labels['flagged'] = 'Marcate';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Delete';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Inverter';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Actiones de dossier...';
$labels['compact'] = 'Compacte';
$labels['empty'] = 'Vacue';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disk usage';
$labels['unknown'] = 'incognite';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Reinitialisar cerca';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Message complete';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Aperir in nove fenestra';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Show last page';
$labels['group'] = 'Gruppo';
$labels['groups'] = 'Gruppos';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Adresses personal';
$labels['searchsave'] = 'Salveguardar cerca';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'Signatura HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Show preview pane';
$labels['skin'] = 'Apparentia de interfacie';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automaticamente inserta signatura';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insertar signatura';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Adder al dictionario';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ia/messages.inc b/program/localization/ia/messages.inc
index fca8404b2..ebc6953d2 100644
--- a/program/localization/ia/messages.inc
+++ b/program/localization/ia/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Error de base de datos!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'No messages found in this mailbox.';
diff --git a/program/localization/id_ID/labels.inc b/program/localization/id_ID/labels.inc
index 4877434ed..73bb0156d 100644
--- a/program/localization/id_ID/labels.inc
+++ b/program/localization/id_ID/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Daftar tunggu';
$labels['sent'] = 'Terkirim';
$labels['trash'] = 'Surat Terhapus';
$labels['junk'] = 'Sampah';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Judul';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Halaman sekarang';
$labels['unread'] = 'Belum terbaca';
$labels['flagged'] = 'Ditandai';
$labels['unanswered'] = 'Belum terjawab';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Terhapus';
$labels['undeleted'] = 'Tidak terhapus';
$labels['invert'] = 'Sebaliknya';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Perlihatkan mode tinjauan';
$labels['folderactions'] = 'Tindakan pada folder...';
$labels['compact'] = 'Rampingkan';
$labels['empty'] = 'Kosong';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Penggunaan ruang';
$labels['unknown'] = 'Tidak dikenal';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Atur ulang pencarian';
$labels['searchmod'] = 'Peubah pencarian';
$labels['msgtext'] = 'Seluruh pesan';
$labels['body'] = 'Badan';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Buka dalam jendela baru';
$labels['emlsave'] = 'Unduh (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Perlihatkan himpunan terakhir';
$labels['group'] = 'Kelompok';
$labels['groups'] = 'Kelompok';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Alamat pribadi';
$labels['searchsave'] = 'Simpan pencarian';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Tulis pesan HTML';
$labels['htmlonreply'] = 'balasan untuk pesan HTML saja';
$labels['htmlonreplyandforward'] = 'ketika meneruskan atau membalas pesan HTML';
$labels['htmlsignature'] = 'Tandatangan HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Unjuk pratinjau';
$labels['skin'] = 'Tampilan antarmuka';
$labels['logoutclear'] = 'Bersihkan Tong Sampah saat keluar';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'ketika membalas pesan hapus tanda tangan dari
$labels['autoaddsignature'] = 'Otomatis tambahkan tanda tangan';
$labels['newmessageonly'] = 'Hanya untuk pesan baru';
$labels['replyandforwardonly'] = 'Hanya untuk dijawab dan diteruskan';
-$labels['replysignaturepos'] = 'ketika membalas atau meneruskan pesan tambahkan tanda tangan';
-$labels['belowquote'] = 'Dibawah kutipan';
-$labels['abovequote'] = 'Diatas kutipan';
$labels['insertsignature'] = 'Isi tanda tangan';
$labels['previewpanemarkread'] = 'Tandai pesan yang sudah dilihat';
$labels['afternseconds'] = 'setelah $n detik';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Abaikan kata-kata yang bernomor';
$labels['spellcheckignorecaps'] = 'Abaikan kata-kata dengan huruf besar semua';
$labels['addtodict'] = 'Tambahkan ke kamus';
$labels['mailtoprotohandler'] = 'Daftarkan pengampu protokol untuk link mailto:';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Meneruskan pesan';
$labels['inline'] = 'dalam surat';
$labels['asattachment'] = 'sebagai sisipan';
diff --git a/program/localization/id_ID/messages.inc b/program/localization/id_ID/messages.inc
index b604d0242..04d8242ad 100644
--- a/program/localization/id_ID/messages.inc
+++ b/program/localization/id_ID/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Basis data Error!';
$messages['requesttimedout'] = 'Permintaan melewati batas waktu';
$messages['errorreadonly'] = 'Tidak bisa melakukan operasi. Folder hanya bisa dibaca.';
$messages['errornoperm'] = 'Tidak bisa melakukan operasi. Ijin ditolak.';
+$messages['erroroverquota'] = 'Tidak dapat melakukan operasi. Disk penuh.';
+$messages['erroroverquotadelete'] = 'Disk penuh. Tekan SHIFT + DEL untuk menghapus pesan';
$messages['invalidrequest'] = 'Permintaan tidak valid! Tidak ada data yang tersimpan.';
$messages['invalidhost'] = 'Nama server invalid.';
$messages['nomessagesfound'] = 'Surat tidak ditemukan di kotak masuk ini';
diff --git a/program/localization/index.inc b/program/localization/index.inc
index bfb770cac..4b848dc49 100644
--- a/program/localization/index.inc
+++ b/program/localization/index.inc
@@ -70,6 +70,7 @@ $rcube_languages = array(
'ku' => 'Kurdish (Kurmancî)',
'lv_LV' => 'Latvian (Latviešu)',
'lt_LT' => 'Lithuanian (Lietuviškai)',
+ 'lb_LU' => 'Luxembourgish (Lëtzebuergesch)',
'mk_MK' => 'Macedonian (Македонски)',
'ms_MY' => 'Malay (Bahasa Melayu)',
'ml_IN' => 'Malayalam (മലയാളം)',
@@ -133,6 +134,7 @@ $rcube_language_aliases = array(
'kh' => 'km_KH',
'kh_KH' => 'km_KH',
'km' => 'km_KH',
+ 'lb' => 'lb_LU',
'ne' => 'ne_NP',
'no' => 'nn_NO',
'ms' => 'ms_MY',
diff --git a/program/localization/is_IS/labels.inc b/program/localization/is_IS/labels.inc
index c8d49bf23..c2859ce75 100644
--- a/program/localization/is_IS/labels.inc
+++ b/program/localization/is_IS/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Drög';
$labels['sent'] = 'Sent';
$labels['trash'] = 'Rusl';
$labels['junk'] = 'Ruslpóstur';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Titill';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Núverandi síða';
$labels['unread'] = 'Ólesið';
$labels['flagged'] = 'Flaggað';
$labels['unanswered'] = 'Ósvarað';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Eytt';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Umhverfa';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Listayfirlit';
$labels['folderactions'] = 'Möppuaðgerðir...';
$labels['compact'] = 'Pakka';
$labels['empty'] = 'Tæma';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Gagnamagn';
$labels['unknown'] = 'óþekkt';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Tæma leit';
$labels['searchmod'] = 'Leitarskilyrði';
$labels['msgtext'] = 'Allt skeytið';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Opna í nýjum glugga';
$labels['emlsave'] = 'Niðurhlaða (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Sýna síðustu síðu';
$labels['group'] = 'Hópur';
$labels['groups'] = 'Hópar';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Persónuleg heimilisföng';
$labels['searchsave'] = 'Vista leit';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Skrifa HTML-skeyti';
$labels['htmlonreply'] = 'sem svar við HTML-skeytum aðeins';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML-undirskrift';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Sýna forskoðunarglugga';
$labels['skin'] = 'Sniðmát á viðmóti';
$labels['logoutclear'] = 'Tæma rusl við útskráningu';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Þegar svarað fjarlægja upphaflega undirskr
$labels['autoaddsignature'] = 'Bæta undirskrift við sjálfkrafa';
$labels['newmessageonly'] = 'ný skeyti eingöngu';
$labels['replyandforwardonly'] = 'svör og áframsendingar eingöngu';
-$labels['replysignaturepos'] = 'Þegar skeytum er svarað eða áframsend setja undirskrift';
-$labels['belowquote'] = 'undir tilvitnun';
-$labels['abovequote'] = 'fyrir ofan tilvitnun';
$labels['insertsignature'] = 'Bæta undirskrift við';
$labels['previewpanemarkread'] = 'Merka forskoðuð skeyti sem lesin';
$labels['afternseconds'] = 'eftir $n sekúndur';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Hunsa orð með tölum';
$labels['spellcheckignorecaps'] = 'Hunsa orð sem eru í hástöfum';
$labels['addtodict'] = 'Bæta við orðalista';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/is_IS/messages.inc b/program/localization/is_IS/messages.inc
index 530e8008f..6e9f35af3 100644
--- a/program/localization/is_IS/messages.inc
+++ b/program/localization/is_IS/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Engin skeyti eru í þessu pósthólfi';
diff --git a/program/localization/it_IT/labels.inc b/program/localization/it_IT/labels.inc
index 97be929cf..55cd432f7 100644
--- a/program/localization/it_IT/labels.inc
+++ b/program/localization/it_IT/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Bozze';
$labels['sent'] = 'Inviata';
$labels['trash'] = 'Cestino';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Oggetto';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Pagina corrente';
$labels['unread'] = 'Non letti';
$labels['flagged'] = 'Contrassegnato';
$labels['unanswered'] = 'Senza risposta';
+$labels['withattachment'] = 'Con allegato';
$labels['deleted'] = 'Cancellato';
$labels['undeleted'] = 'Non eliminato';
$labels['invert'] = 'Inverti';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Modalità di visualizzazione';
$labels['folderactions'] = 'Operazioni cartella';
$labels['compact'] = 'Compatta';
$labels['empty'] = 'Svuota';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Spazio utilizzato';
$labels['unknown'] = 'sconosciuto';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Annulla ricerca';
$labels['searchmod'] = 'Ambito di ricerca';
$labels['msgtext'] = 'Intero messaggio';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Apri in una nuova finestra';
$labels['emlsave'] = 'Scarica (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Visualizza nel formato testo semplice';
+$labels['changeformathtml'] = 'Visualizza nel formato HTML';
// message compose
$labels['editasnew'] = 'Modifica come nuovo';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Ultima pagina';
$labels['group'] = 'Gruppo';
$labels['groups'] = 'Gruppi';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Rubrica Personale';
$labels['searchsave'] = 'Salva ricerca';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Scrivi i messaggi in HTML';
$labels['htmlonreply'] = 'solo in risposta a messaggi HTML';
$labels['htmlonreplyandforward'] = 'su inoltro o risposta a messaggi HTML';
$labels['htmlsignature'] = 'Firma in HTML';
+$labels['showemail'] = 'Visualizza indirizzi email con il nome visualizzato';
$labels['previewpane'] = 'Mostra l\'anteprima';
$labels['skin'] = 'Tema interfaccia';
$labels['logoutclear'] = 'Svuota il Cestino all\'uscita';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Quando rispondi, rimuovi la firma dal messagg
$labels['autoaddsignature'] = 'Aggiungi automaticamente la firma';
$labels['newmessageonly'] = 'solo ai nuovi messaggi';
$labels['replyandforwardonly'] = 'solo alle risposte e inoltri';
-$labels['replysignaturepos'] = 'In risposta o inoltro, posiziona la firma';
-$labels['belowquote'] = 'sotto la citazione';
-$labels['abovequote'] = 'sopra la citazione';
$labels['insertsignature'] = 'Inserisci firma';
$labels['previewpanemarkread'] = 'Segna i messagi in anteprima come letti';
$labels['afternseconds'] = 'dopo $n secondi';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignora le parole contenenti numeri';
$labels['spellcheckignorecaps'] = 'Ignora le parole con tutte le lettere maiuscole';
$labels['addtodict'] = 'Aggiungi al dizionario';
$labels['mailtoprotohandler'] = 'Registra gestore per mailto:';
+$labels['standardwindows'] = 'Gestisci i popup come finestre standard';
$labels['forwardmode'] = 'Inoltro messaggi';
$labels['inline'] = 'In linea';
$labels['asattachment'] = 'come allegato';
diff --git a/program/localization/it_IT/messages.inc b/program/localization/it_IT/messages.inc
index 66c248e74..80395b551 100644
--- a/program/localization/it_IT/messages.inc
+++ b/program/localization/it_IT/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Errore del database!';
$messages['requesttimedout'] = 'Richiesta scaduta';
$messages['errorreadonly'] = 'Impossibile eseguire l\'operazione. Cartella in sola lettura';
$messages['errornoperm'] = 'Impossibile eseguire l\'operazione. Permesso negato';
+$messages['erroroverquota'] = 'Impossibile eseguire l\'operazione. Spazio su disco non sufficiente.';
+$messages['erroroverquotadelete'] = 'Spazio su disco non sufficiente. Utilizza SHIFT+CANC per eliminare un messaggio.';
$messages['invalidrequest'] = 'Richiesta non valida! Nessun dato salvato.';
$messages['invalidhost'] = 'Nome del server non valido.';
$messages['nomessagesfound'] = 'Nessun messaggio trovato in questa cartella';
diff --git a/program/localization/ja_JP/labels.inc b/program/localization/ja_JP/labels.inc
index 685dba0b3..767aff23a 100644
--- a/program/localization/ja_JP/labels.inc
+++ b/program/localization/ja_JP/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = '下書き';
$labels['sent'] = '送信済み';
$labels['trash'] = 'ごみ箱';
$labels['junk'] = '迷惑メール';
+$labels['show_real_foldernames'] = '特殊フォルダーの実際の名前を表示';
// message listing
$labels['subject'] = '件名';
@@ -162,6 +163,7 @@ $labels['currpage'] = '現在のページ';
$labels['unread'] = '未読';
$labels['flagged'] = 'フラグ付き';
$labels['unanswered'] = '未返信';
+$labels['withattachment'] = '添付ファイルあり';
$labels['deleted'] = '削除済み';
$labels['undeleted'] = '削除済みでない';
$labels['invert'] = '反転';
@@ -192,6 +194,7 @@ $labels['listmode'] = '一覧表示モード';
$labels['folderactions'] = 'フォルダーの操作...';
$labels['compact'] = '圧縮';
$labels['empty'] = '空';
+$labels['importmessages'] = 'メッセージをインポート';
$labels['quota'] = 'ディスクの使用状況';
$labels['unknown'] = '不明';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = '検索を解除';
$labels['searchmod'] = '検索の条件';
$labels['msgtext'] = 'メッセージ全体';
$labels['body'] = '本文';
+$labels['type'] = 'Type';
$labels['openinextwin'] = '新しいウィンドウで開く';
$labels['emlsave'] = 'ダウンロード(.eml形式)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = '最後のページを表示';
$labels['group'] = 'グループ';
$labels['groups'] = 'グループ';
+$labels['listgroup'] = 'グループのメンバーを一覧';
$labels['personaladrbook'] = '個人の住所';
$labels['searchsave'] = '検索情報を保存';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = '作成時にHTMLメッセージを使用';
$labels['htmlonreply'] = '返信時にHTMLメッセージを使用';
$labels['htmlonreplyandforward'] = '転送またはHTMLメッセージへの返信';
$labels['htmlsignature'] = 'HTMLの署名';
+$labels['showemail'] = '電子メールアドレスを表示名と共に表示';
$labels['previewpane'] = 'プレビュー枠の表示';
$labels['skin'] = 'インターフェイスのスキン';
$labels['logoutclear'] = 'ログアウト時にごみ箱の内容を消去';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = '返信時に元の署名をメッセージか
$labels['autoaddsignature'] = '自動的に署名を付加';
$labels['newmessageonly'] = '新しいメッセージだけ';
$labels['replyandforwardonly'] = '返信と転送だけ';
-$labels['replysignaturepos'] = '返信や転送で署名を挿入する位置';
-$labels['belowquote'] = '引用の後';
-$labels['abovequote'] = '引用の前';
$labels['insertsignature'] = '署名を挿入';
$labels['previewpanemarkread'] = 'プレビューしたメッセージを既読に設定';
$labels['afternseconds'] = '$n秒後';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = '数字を含む単語を無視';
$labels['spellcheckignorecaps'] = 'すべて大文字の単語を無視';
$labels['addtodict'] = '辞書に追加';
$labels['mailtoprotohandler'] = 'mailto: のリンクを扱うプロトコル処理の登録';
+$labels['standardwindows'] = 'ポップアップを通常のウィンドウとして処理';
$labels['forwardmode'] = 'メッセージの転送形式';
$labels['inline'] = 'インライン';
$labels['asattachment'] = '添付ファイル';
diff --git a/program/localization/ja_JP/messages.inc b/program/localization/ja_JP/messages.inc
index 6c6008a55..f4dd0fceb 100644
--- a/program/localization/ja_JP/messages.inc
+++ b/program/localization/ja_JP/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'データベースのエラーです!';
$messages['requesttimedout'] = 'リクエストのタイムアウト';
$messages['errorreadonly'] = '操作を実行できませんでした。フォルダーは読み込み専用です。';
$messages['errornoperm'] = '操作を実行できませんでした。権限がありません。';
+$messages['erroroverquota'] = '操作を実行できませんでした。空きディスク容量がありません。';
+$messages['erroroverquotadelete'] = '空きディスク容量がありません。メッセージを削除するには SHIFT+DEL を使用してください。';
$messages['invalidrequest'] = '不正なリクエストです! データは保存していません。';
$messages['invalidhost'] = '正しくないサーバー名です。';
$messages['nomessagesfound'] = 'このフォルダーにはメッセージはありません。';
diff --git a/program/localization/ka_GE/labels.inc b/program/localization/ka_GE/labels.inc
index b3a712515..b0126c44e 100755
--- a/program/localization/ka_GE/labels.inc
+++ b/program/localization/ka_GE/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'დროებითი';
$labels['sent'] = 'გაგზავნილი';
$labels['trash'] = 'წაშლილი';
$labels['junk'] = 'სპამი';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'სათაური';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'მიმდინარე გვერდი';
$labels['unread'] = 'წაუკითხავი';
$labels['flagged'] = 'მონიშნული';
$labels['unanswered'] = 'უპასუხო';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'წაშლილი';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'შებრუნებული';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'შეკუმშვა';
$labels['empty'] = 'გაცარიელება';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'შეზღუდვა';
$labels['unknown'] = 'უცნობი';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'ძიების გასუფთავება'
$labels['searchmod'] = 'ძებნის ვარიანტები';
$labels['msgtext'] = 'ყველა შეტყობინება';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'გახსნა ახალ ფანჯარაში';
$labels['emlsave'] = 'გადმოწერა (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'ბოლოს ჩვენება';
$labels['group'] = 'ჯგუფი';
$labels['groups'] = 'ჯგუფები';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'პერსონალური მისამართები';
$labels['searchsave'] = 'ძებნის შენახვა';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'შეტყობინების შექმნა
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML ხელმოწერა';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'ჩვენება';
$labels['skin'] = 'ინტერფეისი';
$labels['logoutclear'] = 'წაშლილების გასუფთავება გამოსვლისას';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'წაიშალოს ხელმოწ
$labels['autoaddsignature'] = 'ავტომატურად დაემატოს ხელმოწერა';
$labels['newmessageonly'] = 'მხოლოდ ახალი შეტყობინება';
$labels['replyandforwardonly'] = 'მხოლოდ გადაგზავნის და პასუხის შემთხვევაში';
-$labels['replysignaturepos'] = 'მხოლოდ პასუხის ან გადაგზავნის შემთხვევაში გაყვეს ხელმოწერა';
-$labels['belowquote'] = 'ციტატის შემდეგ';
-$labels['abovequote'] = 'ციტატამდე';
$labels['insertsignature'] = 'ხელმოცერის ჩასმა';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = '$n წამის შემდეგ';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'ლექსიკონში დამატება';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ka_GE/messages.inc b/program/localization/ka_GE/messages.inc
index 7ad0b665b..754343fac 100755
--- a/program/localization/ka_GE/messages.inc
+++ b/program/localization/ka_GE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'მონაცემთა ბაზის შეცდ
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'მოქმედების შესრულება შეუძლებალია. წვდომა აკრძალულია.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'არასწორი მოთხოვნა! მონაცემების შენახვა არ მოხერხდა.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'არ არის ახალი შეტყობინება';
diff --git a/program/localization/km_KH/labels.inc b/program/localization/km_KH/labels.inc
index a344e60c2..bc2836a53 100644
--- a/program/localization/km_KH/labels.inc
+++ b/program/localization/km_KH/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'សំបុត្រពង្រៀង';
$labels['sent'] = 'សំបុត្រដែលបានបញ្ជូន';
$labels['trash'] = 'ធុងសំរាម';
$labels['junk'] = 'សំបុត្រមិនល្អ';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'ចំណងជើង';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'ទំព័រនេះ';
$labels['unread'] = 'មិនទាន់អាន';
$labels['flagged'] = 'មានកំណត់សំគាល់ដោយផ្កាយ';
$labels['unanswered'] = 'មិនទាន់ឆ្លើយតប';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'បានលុបរួច';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'បញ្ច្រស់';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'បង្ហាញជាតារាង';
$labels['folderactions'] = 'មុខងារថត';
$labels['compact'] = 'បង្រួម';
$labels['empty'] = 'ទទេរ';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'ទំហំសំបុត្រទាំងអស់ដែលមាន';
$labels['unknown'] = 'មិនស្គាល់';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'កំណត់លក្ខខ័ណ្ឌស្វ
$labels['searchmod'] = 'កែសំរួលលក្ខខ័ណ្ឌស្វែងរក';
$labels['msgtext'] = 'សំបុត្រទាំងមូល';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'បើកក្នុងវីនដូវថ្មី';
$labels['emlsave'] = 'រក្សាទុកទិន្នន័យជាឯកសារប្រភេទ(.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'ទំព័រចុងក្រោយ';
$labels['group'] = 'ក្រុម';
$labels['groups'] = 'ក្រុម';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'អាសយដ្ឋានផ្ទាល់ខ្លួន';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'សរសេរសំបុត្រតាមបែប
$labels['htmlonreply'] = 'ឆ្លើយតបសំបុត្រតាមបែប HTML';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'ហត្ថលេខាតាមបែប HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'បង្ហាញប្រអប់សំរាប់មើលសំបុត្រ';
$labels['skin'] = 'ការរចនាទំព័រ';
$labels['logoutclear'] = 'សំអាតធុងសំរាមពេលពិនិត្យចេញ';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'នៅ​ពេល​ឆ្លើយ​តប
$labels['autoaddsignature'] = 'បញ្ចូលហត្តលេខាដោយស្វ័យប្រវត្តិ';
$labels['newmessageonly'] = 'សំរាប់សំបុត្រថ្មីតែប៉ុណ្ណោះ';
$labels['replyandforwardonly'] = 'សំរាប់ឆើ្លយតប​និងផ្ញើបន្តតែ​ប៉ុណ្ណោះ';
-$labels['replysignaturepos'] = 'បញ្ចូលហត្តលេខានៅពេលឆើ្លយតប​និងផ្ញើបន្ត';
-$labels['belowquote'] = 'ពីក្រោមសម្រង់អត្ថបទ';
-$labels['abovequote'] = 'ពីលើសម្រង់អត្ថបទ';
$labels['insertsignature'] = 'បញ្ចូលហត្តលេខា';
$labels['previewpanemarkread'] = 'កំណត់សំបុត្រ​ដែល​បាន​បង្ហាញ​​ជា​សំបុត្របាន​អាន​រួច';
$labels['afternseconds'] = 'ក្រោយពី $n វិនាទី';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/km_KH/messages.inc b/program/localization/km_KH/messages.inc
index c9ede486e..1f629fa6c 100644
--- a/program/localization/km_KH/messages.inc
+++ b/program/localization/km_KH/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'មិនអាចប្រតិបត្តិបានពីព្រោះថតនេះត្រូវបានគេកំណត់សំរាប់តែមើល';
$messages['errornoperm'] = 'មិនអាចប្រតិបត្តិបានពីព្រោះមិនមានសិទ្ទគ្រប់គ្រាន់';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'មិនអាចរក្សាទុកទិន្នន័យបានពីព្រោះមានបញ្ហានៅពេលបញ្ជូនទិន្នន័យ';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'ពុំមានសំបុត្រក្នុងប្រអប់សំបុត្រនេះទេ';
diff --git a/program/localization/ko_KR/labels.inc b/program/localization/ko_KR/labels.inc
index 667fb422a..60a9275ac 100644
--- a/program/localization/ko_KR/labels.inc
+++ b/program/localization/ko_KR/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = '임시 보관함';
$labels['sent'] = '보낸 편지함';
$labels['trash'] = '휴지통';
$labels['junk'] = '스팸 편지함';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = '제목';
@@ -162,6 +163,7 @@ $labels['currpage'] = '현재 페이지';
$labels['unread'] = '읽지 않음';
$labels['flagged'] = '깃발로 표시됨';
$labels['unanswered'] = '답장하지 않음';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = '삭제됨';
$labels['undeleted'] = '삭제되지 않음';
$labels['invert'] = '반전';
@@ -192,6 +194,7 @@ $labels['listmode'] = '화면 모드 목록 보기';
$labels['folderactions'] = '폴더 명령';
$labels['compact'] = '간단하게';
$labels['empty'] = '비어 있음';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = '디스크 사용량';
$labels['unknown'] = '알 수 없음';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = '검색 재설정';
$labels['searchmod'] = '수정자 검색';
$labels['msgtext'] = '전체 메시지';
$labels['body'] = '본문';
+$labels['type'] = 'Type';
$labels['openinextwin'] = '새 창에서 열기';
$labels['emlsave'] = '다운로드(.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = '마지막 페이지 보기';
$labels['group'] = '그룹';
$labels['groups'] = '그룹';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = '개인 주소';
$labels['searchsave'] = '검색 저장';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML 메시지 작성';
$labels['htmlonreply'] = 'HTML 메시지 회신 시';
$labels['htmlonreplyandforward'] = '전달 또는 HTML 메시지 회신 시';
$labels['htmlsignature'] = 'HTML 서명';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = '미리보기 창 보기';
$labels['skin'] = '인터페이스 스킨';
$labels['logoutclear'] = '로그아웃할 때 휴지통 비우기';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = '회신 시 메시지에서 원문 서명을
$labels['autoaddsignature'] = '서명 자동으로 추가';
$labels['newmessageonly'] = '새로운 메시지에만';
$labels['replyandforwardonly'] = '회신 및 전달 시에만';
-$labels['replysignaturepos'] = '회신 또는 전달 시 서명 추가';
-$labels['belowquote'] = '인용문 하단';
-$labels['abovequote'] = '인용문 상단';
$labels['insertsignature'] = '서명 삽입';
$labels['previewpanemarkread'] = '미리 본 메시지를 읽음으로 표시';
$labels['afternseconds'] = '$n초 후';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = '숫자가 포함된 단어 무시';
$labels['spellcheckignorecaps'] = '모두 대문자로 표기된 단어 무시';
$labels['addtodict'] = '사전에 추가';
$labels['mailtoprotohandler'] = 'mailto: 링크의 프로토콜 처리자 등록';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = '메시지 전달';
$labels['inline'] = '본문 내용으로';
$labels['asattachment'] = '첨부파일로';
diff --git a/program/localization/ko_KR/messages.inc b/program/localization/ko_KR/messages.inc
index 4efd2f3d3..bf42c9c89 100644
--- a/program/localization/ko_KR/messages.inc
+++ b/program/localization/ko_KR/messages.inc
@@ -17,153 +17,156 @@
*/
$messages = array();
-$messages['errortitle'] = '에러가 발생!';
+$messages['errortitle'] = '오류 발생!';
$messages['loginfailed'] = '로그인이 실패하였습니다.';
-$messages['cookiesdisabled'] = '브라우저가 쿠키를 지원하지 않습니다';
-$messages['sessionerror'] = '세션이 유효하지 않거나 종료되었습니다';
+$messages['cookiesdisabled'] = '브라우저가 쿠키를 지원하지 않습니다.';
+$messages['sessionerror'] = '세션이 유효하지 않거나 종료되었습니다.';
$messages['storageerror'] = 'IMAP 서버 연결 실패';
-$messages['servererror'] = '서버 에러!';
-$messages['servererrormsg'] = '서버 에러: $msg';
-$messages['dberror'] = '데이터베이스 에러!';
+$messages['servererror'] = '서버 오류!';
+$messages['servererrormsg'] = '서버 오류: $msg';
+$messages['dberror'] = '데이터베이스 오류!';
$messages['requesttimedout'] = '요청 시간 초과';
-$messages['errorreadonly'] = '명령을 수행할 수 없습니다. 읽기전용 폴더.';
-$messages['errornoperm'] = '명령을 수행할 수 없습니다. 권한이 거부 됨.';
-$messages['invalidrequest'] = '잘못된 요청! 데이터는 저장되지 않았음.';
+$messages['errorreadonly'] = '명령을 수행할 수 없습니다. 읽기 전용 폴더임.';
+$messages['errornoperm'] = '명령을 수행할 수 없습니다. 권한이 거부됨.';
+$messages['erroroverquota'] = '작업을 수행할 수 없음. 여유 공간이 없음.';
+$messages['erroroverquotadelete'] = '여유 공간이 없음. SHIFT-DEL을 이용하여 메시지를 삭제하세요.';
+$messages['invalidrequest'] = '잘못된 요청! 데이터가 저장되지 않았음.';
$messages['invalidhost'] = '잘못된 서버 이름입니다.';
-$messages['nomessagesfound'] = '이 메일함에 메일이 없습니다';
-$messages['loggedout'] = '세션을 성공적으로 종료하였습니다. 안녕히 가십시오!';
-$messages['mailboxempty'] = '메일함이 비어있습니다';
-$messages['refreshing'] = '새로고침 중 ...';
+$messages['nomessagesfound'] = '이 메일함에 메일이 없습니다.';
+$messages['loggedout'] = '세션을 성공적으로 종료하였습니다. 안녕히 가세요!';
+$messages['mailboxempty'] = '메일함이 비어있습니다.';
+$messages['refreshing'] = '새로 고치는 중 ...';
$messages['loading'] = '불러오는 중...';
-$messages['uploading'] = '하나의 파일 올리기...';
-$messages['uploadingmany'] = '여러 파일 올리기...';
-$messages['loadingdata'] = '데이터 불러오는 중...';
-$messages['checkingmail'] = '새 메일 확인 중...';
-$messages['sendingmessage'] = '메일 보내는 중...';
-$messages['messagesent'] = '메일을 성공적으로 보냈습니다';
-$messages['savingmessage'] = '메일 저장 중...';
-$messages['messagesaved'] = '메일이 드래프트 폴더에 저장되었습니다';
-$messages['successfullysaved'] = '성공적으로 저장';
-$messages['addedsuccessfully'] = '연락처가 주소록에 성공적으로 추가되었습니다';
-$messages['contactexists'] = '이 메일로 지정된 연락처가 이미 있습니다';
-$messages['contactnameexists'] = '이미 존재하는 것과 동일한 이름의 연락처.';
-$messages['blockedimages'] = '보안 유지를 위해, 이 메일의 외부 이미지를 차단하였습니다';
-$messages['encryptedmessage'] = '이 메일은 암호화되어 볼 수 없습니다. 죄송합니다!';
-$messages['nocontactsfound'] = '연락처 없음';
-$messages['contactnotfound'] = '요청한 연락처가 없습니다';
-$messages['contactsearchonly'] = '연락처를 찾기 위해 검색 항목을 입력하세요.';
-$messages['sendingfailed'] = '메일을 보내지 못했습니다';
-$messages['senttooquickly'] = '이 메시지를 보내기 전에 $sec 초 동안 기다리십시오.';
-$messages['errorsavingsent'] = '보낸 메시지를 저장할 때 에러가 발생했습니다.';
-$messages['errorsaving'] = '저장 중 에러가 발생했습니다';
-$messages['errormoving'] = '메일을 옮길 수 없습니다';
-$messages['errorcopying'] = '메시지(들)를 복사할 수 없습니다.';
-$messages['errordeleting'] = '메일을 지울 수 없습니다';
-$messages['errormarking'] = '메시지(들)에 표시할 수 없습니다.';
-$messages['deletecontactconfirm'] = '정말 선택한 연락처들을 삭제하시겠습니까?';
-$messages['deletegroupconfirm'] = '정말로 선택한 그룹을 삭제하는 것을 원하십니까?';
-$messages['deletemessagesconfirm'] = '정말 선택한 메일들을 삭제하시겠습니까?';
-$messages['deletefolderconfirm'] = '정말 이 폴더를 삭제하시겠습니까?';
-$messages['purgefolderconfirm'] = '정말 이 폴더의 모든 메일을 삭제하시겠습니까?';
-$messages['contactdeleting'] = '연락처(들) 삭제 중...';
+$messages['uploading'] = '파일을 업로드하는 중...';
+$messages['uploadingmany'] = '파일을 업로드하는 중...';
+$messages['loadingdata'] = '데이터를 불러오는 중...';
+$messages['checkingmail'] = '새 메시지를 확인하는 중...';
+$messages['sendingmessage'] = '메시지를 보내는 중...';
+$messages['messagesent'] = '메시지를 성공적으로 보냈습니다.';
+$messages['savingmessage'] = '메시지를 저장하는 중...';
+$messages['messagesaved'] = '메시지가 임시 보관함에 저장되었습니다.';
+$messages['successfullysaved'] = '성공적으로 저장됨.';
+$messages['addedsuccessfully'] = '연락처가 주소록에 성공적으로 추가되었습니다.';
+$messages['contactexists'] = '연락처에 동일한 이메일 주소가 이미 존재합니다.';
+$messages['contactnameexists'] = '연락처에 동일한 이름이 이미 존재합니다.';
+$messages['blockedimages'] = '보안을 위해, 이 메시지의 외부 이미지를 차단하였습니다.';
+$messages['encryptedmessage'] = '이것은 암호화된 메시지며 표시할 수 없습니다. 죄송합니다!';
+$messages['nocontactsfound'] = '연락처를 찾을 수 없음.';
+$messages['contactnotfound'] = '요청한 연락처를 찾을 수 없었습니다.';
+$messages['contactsearchonly'] = '연락처를 찾기 위해 일부 검색용어를 입력하세요.';
+$messages['sendingfailed'] = '메시지 보내기를 실패하였음.';
+$messages['senttooquickly'] = '이 메시지를 보내기 전에 $sec초 동안 기다리세요.';
+$messages['errorsavingsent'] = '보낸 메시지를 저장하는 동안 오류가 발생했습니다.';
+$messages['errorsaving'] = '저장 중 오류가 발생했습니다.';
+$messages['errormoving'] = '메시지를 이동할 수 없었음.';
+$messages['errorcopying'] = '메시지를 복사할 수 없었음.';
+$messages['errordeleting'] = '메시지를 삭제할 수 없었음.';
+$messages['errormarking'] = '메시지를 표시할 수 없었음.';
+$messages['deletecontactconfirm'] = '정말 선택한 연락처를 삭제하시겠습니까?';
+$messages['deletegroupconfirm'] = '정말로 선택한 그룹을 삭제하시겠습니까?';
+$messages['deletemessagesconfirm'] = '정말로 선택한 메시지를 삭제하시겠습니까?';
+$messages['deletefolderconfirm'] = '정말로 이 폴더를 삭제하시겠습니까?';
+$messages['purgefolderconfirm'] = '정말로 이 폴더의 모든 메시지를 삭제하시겠습니까?';
+$messages['contactdeleting'] = '연락처 삭제 중...';
$messages['groupdeleting'] = '그룹 삭제 중...';
-$messages['folderdeleting'] = '폴더 지우는 중...';
-$messages['foldermoving'] = '폴더 옮기는 중...';
-$messages['foldersubscribing'] = '폴더의 구독을 활성화 하는 중...';
+$messages['folderdeleting'] = '폴더를 삭제하는 중...';
+$messages['foldermoving'] = '폴더를 이동하는 중...';
+$messages['foldersubscribing'] = '폴더를 구독하는 중...';
$messages['folderunsubscribing'] = '폴더의 구독을 취소하는 중...';
-$messages['formincomplete'] = '양식을 완전히 채우지 않았습니다';
-$messages['noemailwarning'] = '유효한 이메일 주소를 넣어주십시오';
-$messages['nonamewarning'] = '이름을 넣어주십시오';
-$messages['nopagesizewarning'] = '페이지 크기를 넣어주십시오';
-$messages['nosenderwarning'] = '발신자 이메일 주소를 넣어주십시오';
-$messages['norecipientwarning'] = '적어도 한 개 이상의 수신 주소를 넣어주십시오';
-$messages['nosubjectwarning'] = '"제목"이 없습니다. 제목을 넣으시겠습니까?';
-$messages['nobodywarning'] = '텍스트 없이 메일을 보낼까요?';
-$messages['notsentwarning'] = '메일을 보내지 않았습니다. 메일을 버리시겠습니까?';
-$messages['noldapserver'] = '검색할 LDAP 서버를 선택하세요';
-$messages['nosearchname'] = '연락처 이름이나 메일 주소를 넣으세요';
-$messages['notuploadedwarning'] = '아직 모든 첨부가 업로드되지 않았습니다. 기다리거나 업로드를 취소하기 바랍니다.';
-$messages['searchsuccessful'] = '$nr개의 메일 발견';
-$messages['contactsearchsuccessful'] = '$nr 연락처 발견됨.';
-$messages['searchnomatch'] = '검색 결과가 없습니다';
+$messages['formincomplete'] = '양식을 완전히 작성되지 않았습니다.';
+$messages['noemailwarning'] = '유효한 이메일 주소를 입력하시기 바랍니다.';
+$messages['nonamewarning'] = '이름을 입력하시기 바랍니다.';
+$messages['nopagesizewarning'] = '페이지 크기를 입력하시기 바랍니다.';
+$messages['nosenderwarning'] = '발신인 이메일 주소를 입력하시기 바랍니다.';
+$messages['norecipientwarning'] = '적어도 한 개 이상의 수신인 주소를 입력하시기 바랍니다.';
+$messages['nosubjectwarning'] = '"제목" 필드가 비어있습니다. 지금 입력하시겠습니까?';
+$messages['nobodywarning'] = '텍스트가 없는 메시지를 보내시겠습니까?';
+$messages['notsentwarning'] = '메시지를 보내지 못했습니다. 메시지를 폐기하시겠습니까?';
+$messages['noldapserver'] = '검색할 LDAP 서버를 선택하시기 바랍니다.';
+$messages['nosearchname'] = '연락처명이나 이메일 주소를 입력하시기 바랍니다.';
+$messages['notuploadedwarning'] = '아직 모든 첨부가 업로드되지 않았습니다. 기다리거나 업로드를 취소하시기 바랍니다.';
+$messages['searchsuccessful'] = '$nr개의 메시지를 찾음.';
+$messages['contactsearchsuccessful'] = '$nr개의 연락처를 찾음.';
+$messages['searchnomatch'] = '검색이 일치 항목을 찾지 못함.';
$messages['searching'] = '검색 중...';
-$messages['checking'] = '체크 중...';
-$messages['nospellerrors'] = '스펠링 에러가 없습니다';
-$messages['folderdeleted'] = '폴더를 성공적으로 삭제하였습니다';
-$messages['foldersubscribed'] = '폴더가 성공적으로 구독 됨.';
-$messages['folderunsubscribed'] = '폴더가 성공적으로 구독 취소 됨.';
-$messages['folderpurged'] = '폴더가 성공적으로 비워졌습니다.';
-$messages['folderexpunged'] = '폴더가 성공적으로 압축 되었습니다.';
-$messages['deletedsuccessfully'] = '성공적으로 삭제하였습니다';
-$messages['converting'] = '메일의 포맷을 지우는 중...';
-$messages['messageopenerror'] = '서버에서 메일을 가져올 수 없습니다';
-$messages['fileuploaderror'] = '파일 업로드 실패';
-$messages['filesizeerror'] = '올린 파일이 $size의 최대 크기를 초과했습니다';
-$messages['copysuccess'] = '$nr개의 주소를 성공적으로 복사했습니다';
-$messages['copyerror'] = '주소를 복사할 수 없습니다';
-$messages['sourceisreadonly'] = '이 주소 소스는 읽기 전용입니다';
-$messages['errorsavingcontact'] = '연락처 주소를 저장할 수 없습니다';
-$messages['movingmessage'] = '메시지 이동 중...';
-$messages['copyingmessage'] = '메시지(들) 복사 중...';
-$messages['copyingcontact'] = '연락처(들) 복사 중...';
-$messages['deletingmessage'] = '메시지(들) 삭제 중...';
-$messages['markingmessage'] = '메시지(들)에 표시 중...';
-$messages['addingmember'] = '그룹에 연락처(들)을 추가 중...';
-$messages['removingmember'] = '그룹으로 부터 연락처를 삭제 중...';
-$messages['receiptsent'] = '메일 읽음 확인을 보냈습니다';
-$messages['errorsendingreceipt'] = '읽음 확인을 보낼 수 없습니다';
+$messages['checking'] = '확인 중...';
+$messages['nospellerrors'] = '맞춤법 오류를 찾지 못함.';
+$messages['folderdeleted'] = '폴더를 성공적으로 삭제함.';
+$messages['foldersubscribed'] = '폴더를 성공적으로 구독함.';
+$messages['folderunsubscribed'] = '폴더를 성공적으로 구독 취소함.';
+$messages['folderpurged'] = '폴더를 성공적으로 비웠습니다.';
+$messages['folderexpunged'] = '폴더를 성공적으로 압축하였습니다.';
+$messages['deletedsuccessfully'] = '성공적으로 삭제함.';
+$messages['converting'] = '서식 설정 삭제 중...';
+$messages['messageopenerror'] = '서버에서 메시지를 불러올 수 없음.';
+$messages['fileuploaderror'] = '파일 업로드를 실패함.';
+$messages['filesizeerror'] = '업로드된 파일이 최대 크기인 $size를 초과하였습니다.';
+$messages['copysuccess'] = '$nr개의 주소를 성공적으로 복사함.';
+$messages['copyerror'] = '모든 주소를 복사할 수 없음.';
+$messages['sourceisreadonly'] = '이 주소의 소스는 읽기 전용입니다.';
+$messages['errorsavingcontact'] = '연락처의 주소를 저장할 수 없음.';
+$messages['movingmessage'] = '메시지를 이동하는 중...';
+$messages['copyingmessage'] = '메시지 복사하는 중...';
+$messages['copyingcontact'] = '연락처 복사하는 중...';
+$messages['deletingmessage'] = '메시지 삭제하는 중...';
+$messages['markingmessage'] = '메시지에 표시하는 중...';
+$messages['addingmember'] = '그룹에 연락처를 추가하는 중...';
+$messages['removingmember'] = '그룹에서 연락처를 삭제하는 중...';
+$messages['receiptsent'] = '읽음 확인을 보냄.';
+$messages['errorsendingreceipt'] = '읽음 확인을 보낼 수 없음.';
$messages['deleteidentityconfirm'] = '이 항목을 정말로 삭제 하시겠습니까?';
-$messages['nodeletelastidentity'] = '이 정보는 마지막 남은 것이므로 지울 수 없습니다';
-$messages['forbiddencharacter'] = '폴더 이름에 쓸 수 없는 문자가 포함되어 있습니다';
-$messages['selectimportfile'] = '업로드할 파일을 선택하세요';
-$messages['addresswriterror'] = '선택한 주소록은 쓸 수 없습니다';
-$messages['contactaddedtogroup'] = '이 그룹에 연락처를 성공적으로 추가 함.';
-$messages['contactremovedfromgroup'] = '이 그룹으로 부터 연락처를 성공적으로 제거 함.';
-$messages['nogroupassignmentschanged'] = '그룹 할당을 변경하지 못했습니다.';
-$messages['importwait'] = '가져오는 중, 기다리세요...';
-$messages['importformaterror'] = '가져 오기 실패! 업로드 한 파일은 가져올 수 없는 데이터 파일입니다.';
-$messages['importconfirm'] = '<b>$inserted 연락처를 성공적으로 가져왔고, $skipped 존재하는 항목은 건너뛰었습니다.</b>:<p><em>$names</em></p>';
-$messages['importconfirmskipped'] = '<b>$skipped 건의 기존 항목을 건너 뜀.</ b>';
-$messages['opnotpermitted'] = '작업이 허가되지 않았습니다!';
-$messages['nofromaddress'] = '선택한 신원에 이메일 주소가 없음';
-$messages['editorwarning'] = '일반 텍스트 편집기로 바꾸면 모든 서식이 사라집니다. 계속할까요?';
-$messages['httpreceivedencrypterror'] = '치명적인 설정 오류가 발생 되었음. 관리자에게 바로 연락을 취하세요.<b>메시지를 전송할 수 없습니다.</b>';
-$messages['smtpconnerror'] = 'SMTP 에러 ($code): 서버로의 연결이 실패 됨.';
-$messages['smtpautherror'] = 'SMTP 에러 ($code): 인증이 실패 됨.';
-$messages['smtpfromerror'] = 'SMTP 에러 ($code): 보낸 사람을 "$from"로 설정하는 것이 실패 됨 ($msg).';
-$messages['smtptoerror'] = 'SMTP 에러 ($code): 수신자 "$to"를 추가하는 데 실패 함 ($msg).';
-$messages['smtprecipientserror'] = 'SMTP 에러: 수신자 목록을 분석(parse)할 수 없음.';
-$messages['smtperror'] = 'SMTP 에러: $msg';
-$messages['emailformaterror'] = '잘못된 e-mail 주소: $email';
-$messages['toomanyrecipients'] = '수신자가 너무 많습니다. 수신자의 수를 $max로 줄이세요.';
-$messages['maxgroupmembersreached'] = '그룹 구성원의 수가 최대 인원 $max를 초과하였습니다.';
-$messages['internalerror'] = '내부 오류가 발생하였습니다. 다시 시도하기 바랍니다.';
-$messages['contactdelerror'] = '연락처(들)을 지울 수 없습니다.';
-$messages['contactdeleted'] = '연락처(들)이 성공적으로 제거 됨.';
-$messages['contactrestoreerror'] = '삭제된 연락처(들)을 복구할 수 없음.';
-$messages['contactrestored'] = '연락처(들)이 성공적으로 복구 됨.';
-$messages['groupdeleted'] = '그룹이 성공적으로 삭제 됨.';
-$messages['grouprenamed'] = '그룹명이 성공적으로 변경 됨.';
-$messages['groupcreated'] = '그룹이 성공적으로 생성 됨.';
-$messages['savedsearchdeleted'] = '저장 한 검색 정보를 삭제했습니다.';
-$messages['savedsearchdeleteerror'] = '저장 한 검색 정보를 삭제할 수 없습니다.';
-$messages['savedsearchcreated'] = '검색 정보를 만들었습니다.';
-$messages['savedsearchcreateerror'] = '검색 정보를 삭제할 수 없습니다.';
-$messages['messagedeleted'] = '메시지(들)이 성공적으로 삭제 됨.';
-$messages['messagemoved'] = '메시지(들)을 성공적으로 이동 함.';
-$messages['messagecopied'] = '메시지(들)을 성공적으로 복사 함.';
-$messages['messagemarked'] = '메시지(들)에 성공적으로 표시 함.';
-$messages['autocompletechars'] = '자동 완성을 위해서 적어도 $min 글자를 입력하세요.';
-$messages['autocompletemore'] = '많은 항목이 발견되었습니다. 더 많은 문자를 입력하세요.';
-$messages['namecannotbeempty'] = '이름이 비워져서는 안됩니다.';
+$messages['nodeletelastidentity'] = '이 신원은 마지막 하나이므로 삭제할 수 없습니다.';
+$messages['forbiddencharacter'] = '폴더명에 금지된 문자가 포함되어 있습니다.';
+$messages['selectimportfile'] = '업로드할 파일을 선택해주시기 바랍니다.';
+$messages['addresswriterror'] = '선택된 주소록은 쓰기가 불가능합니다.';
+$messages['contactaddedtogroup'] = '이 그룹에 연락처를 성공적으로 추가함.';
+$messages['contactremovedfromgroup'] = '이 그룹에서 연락처를 성공적으로 제거함.';
+$messages['nogroupassignmentschanged'] = '그룹 할당이 변경되지 않음.';
+$messages['importwait'] = '가져오는 중, 기다려주시기 바랍니다...';
+$messages['importformaterror'] = '가져오기를 실패함! 업로드된 파일은 유효하지 않은 가져오기 데이터 파일입니다.';
+$messages['importconfirm'] = '<b>$inserted 연락처를 성공적으로 가져옴<b>';
+$messages['importconfirmskipped'] = '<b>기존 기재사항인 $skipped을(를) 건너뜀</b>';
+$messages['opnotpermitted'] = '작업이 허가되지 않음!';
+$messages['nofromaddress'] = '선택된 신원에 이메일 주소 가 누락됨.';
+$messages['editorwarning'] = '일반 텍스트 편집기로 바꾸면 모든 텍스트 서식이 사라집니다. 계속하시겠습니까?';
+$messages['httpreceivedencrypterror'] = '치명적인 구성 오류가 발생하였습니다. 즉시 관리자에게 연락하세요.
+<b>메시지를 전송할 수 없습니다.</b>';
+$messages['smtpconnerror'] = 'SMTP 오류 ($code): 서버와의 연결을 실패함.';
+$messages['smtpautherror'] = 'SMTP 에러 ($code): 인증을 실패함.';
+$messages['smtpfromerror'] = 'SMTP 오류 ($code): 발신인을 "$from" ($msg)로 설정하는데 실패함.';
+$messages['smtptoerror'] = 'SMTP 오류 ($code): 수신인을 "$to" ($msg)에 추가하는데 실패함.';
+$messages['smtprecipientserror'] = 'SMTP 오류: 수신인 목록을 분석(parse)할 수 없음.';
+$messages['smtperror'] = 'SMTP 오류: $msg';
+$messages['emailformaterror'] = '유효하지 않은 이메일 주소: $email';
+$messages['toomanyrecipients'] = '수신인이 너무 많음. 수신인 수를 $max명으로 줄이세요.';
+$messages['maxgroupmembersreached'] = '그룹 구성원의 수가 최대 인원인 $max명을 초과합니다.';
+$messages['internalerror'] = '내부 오류가 발생함. 재시도 해주시기 바랍니다.';
+$messages['contactdelerror'] = '연락처를 삭제할 수 없음.';
+$messages['contactdeleted'] = '연락처가 성공적으로 삭제됨.';
+$messages['contactrestoreerror'] = '삭제된 연락처를 복구할 수 없음.';
+$messages['contactrestored'] = '연락처가 성공적으로 복구됨.';
+$messages['groupdeleted'] = '그룹이 성공적으로 삭제됨.';
+$messages['grouprenamed'] = '그룹명이 성공적으로 변경됨.';
+$messages['groupcreated'] = '그룹이 성공적으로 생성됨.';
+$messages['savedsearchdeleted'] = '저장된 검색이 성공적으로 삭제됨.';
+$messages['savedsearchdeleteerror'] = '저장된 정보를 삭제할 수 없었음.';
+$messages['savedsearchcreated'] = '저장된 검색이 성공적으로 생성됨.';
+$messages['savedsearchcreateerror'] = '저장된 검색을 생성할 수 없었음.';
+$messages['messagedeleted'] = '메시지가 성공적으로 삭제됨.';
+$messages['messagemoved'] = '메시지가 성공적으로 이동됨.';
+$messages['messagecopied'] = '메시지가 성공적으로 복사됨.';
+$messages['messagemarked'] = '메시지에 성공적으로 표시됨.';
+$messages['autocompletechars'] = '자동 완성을 위해서 적어도 $min개의 문자를 입력하세요.';
+$messages['autocompletemore'] = '더 많은 일치 항목이 발견됨. 더 많은 문자를 입력해주시기 바랍니다.';
+$messages['namecannotbeempty'] = '이름을 비워둘 수 없습니다.';
$messages['nametoolong'] = '이름이 너무 깁니다.';
-$messages['folderupdated'] = '폴더를 성공적으로 갱신 함.';
-$messages['foldercreated'] = '폴더를 성공적으로 생성 함.';
-$messages['invalidimageformat'] = '올바른 이미지 포멧이 아님.';
-$messages['mispellingsfound'] = '메시지에서 맞춤법 오류를 감지 하였음.';
-$messages['parentnotwritable'] = '선택한 부모 폴더에 폴더를 생성하거나 이동할 수 없음. 접근 권한이 없음.';
-$messages['messagetoobig'] = '처리하기에 너무 큰 메시지 입니다.';
-$messages['attachmentvalidationerror'] = '경고! 이 첨부 파일은 메시지의 선언 유형과 일치하지 않기때문에 의심됩니다. 보낸 사람을 믿을 수 없다면, 악성 코드를 포함하는지도 모르기 때문에 브라우저에서 열 수 없습니다. <br/><br/><em> 예측 한 종류 : $expected; 발견 한 종류 : $found</ em>';
-$messages['noscriptwarning'] = '경고: 이 웹 메일 서비스는 Javascript가 필요합니다! 사용하려면 Javascript를 브라우저 설정에서 활성화하십시오.';
+$messages['folderupdated'] = '폴더가 성공적으로 업데이트됨.';
+$messages['foldercreated'] = '폴더가 성공적으로 생성됨.';
+$messages['invalidimageformat'] = '유효한 이미지 형식이 아님.';
+$messages['mispellingsfound'] = '메시지에서 맞춤법 오류가 감지되었음.';
+$messages['parentnotwritable'] = '선택한 상위 폴더에 폴더를 생성/이동할 수 없음. 접근 권한이 없음.';
+$messages['messagetoobig'] = '메시지 부분이 처리하기에는 너무 큽니다.';
+$messages['attachmentvalidationerror'] = '경고! 이 첨부 파일의 유형이 메시지에서 선언된 유형과 일치하지 않기 때문에 의심됩니다. 발신인을 신뢰할 수 없을 경우, 악성 코드를 포함할 수도 있기 때문에 브라우저에서 열지 않는 것이 좋습니다. <br/><br/><em> 예상한 유형: $expected; 발견된 유형: $found</ em>';
+$messages['noscriptwarning'] = '경고: 이 웹 메일 서비스는 자바스크립트가 필요합니다! 이 기능을 사용하시려면 자바스크립트를 브라우저 설정에서 활성화하시기 바랍니다.';
?>
diff --git a/program/localization/ku/labels.inc b/program/localization/ku/labels.inc
index 5c6786502..6a3c16a5f 100644
--- a/program/localization/ku/labels.inc
+++ b/program/localization/ku/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Hilanînî';
$labels['sent'] = 'Şandî';
$labels['trash'] = 'Çop';
$labels['junk'] = 'Biikêrnehatî';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Mijar';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Nexwendî';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Kompakt';
$labels['empty'] = 'Vala Bike';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Bikaranîna dîskê';
$labels['unknown'] = 'nayê zanîn';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Lêgerînê reset bike';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Seta dawî nîşan bide';
$labels['group'] = 'Group';
$labels['groups'] = 'Kom';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Navnîşanên Takekesî';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Peyameke HTML biafirîne';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'Şanenava HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Panela berê nîşan bide';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ku/messages.inc b/program/localization/ku/messages.inc
index 6783209a3..9d219cbf5 100644
--- a/program/localization/ku/messages.inc
+++ b/program/localization/ku/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Di vê peyamdankê de tu peyam nehat dîtin';
diff --git a/program/localization/lb_LU/labels.inc b/program/localization/lb_LU/labels.inc
new file mode 100644
index 000000000..1dff3a9e7
--- /dev/null
+++ b/program/localization/lb_LU/labels.inc
@@ -0,0 +1,544 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | localization/<lang>/labels.inc |
+ | |
+ | Localization file of the Roundcube Webmail client |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/
+*/
+
+$labels = array();
+
+// login page
+$labels['welcome'] = 'Wëllkomm bei $product';
+$labels['username'] = 'Benotzernumm';
+$labels['password'] = 'Passwuert';
+$labels['server'] = 'Server';
+$labels['login'] = 'Aloggen';
+
+// taskbar
+$labels['logout'] = 'Ausloggen';
+$labels['mail'] = 'Mailen';
+$labels['settings'] = 'Astellungen';
+$labels['addressbook'] = 'Adressbuch';
+
+// mailbox names
+$labels['inbox'] = 'Mailbox';
+$labels['drafts'] = 'Brouillonen';
+$labels['sent'] = 'Verschéckt';
+$labels['trash'] = 'Poubelle';
+$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Richteg Nimm vu de speziellen Dossieren uweisen';
+
+// message listing
+$labels['subject'] = 'Sujet';
+$labels['from'] = 'Vun';
+$labels['sender'] = 'Geschéckt vun';
+$labels['to'] = 'Un';
+$labels['cc'] = 'CC';
+$labels['bcc'] = 'BCC';
+$labels['replyto'] = 'Äntwert un';
+$labels['followupto'] = 'Noverfollgung un';
+$labels['date'] = 'Datum';
+$labels['size'] = 'Gréisst';
+$labels['priority'] = 'Prioritéit';
+$labels['organization'] = 'Organisatioun';
+$labels['readstatus'] = 'Lies-Status';
+$labels['listoptions'] = 'Optiounen oplëschten';
+
+$labels['mailboxlist'] = 'Dossieren';
+$labels['messagesfromto'] = 'Messagen $from bis $to vun $count';
+$labels['threadsfromto'] = 'Diskussiounen $from bis $to vun $count';
+$labels['messagenrof'] = 'Message $nr vun $count';
+$labels['fromtoshort'] = '$from bis $to vun $count';
+
+$labels['copy'] = 'Kopéieren';
+$labels['move'] = 'Réckelen';
+$labels['moveto'] = 'Réckelen an...';
+$labels['download'] = 'Eroflueden';
+$labels['open'] = 'Opmaachen';
+$labels['showattachment'] = 'Weisen';
+$labels['showanyway'] = 'Trotzdeem weisen';
+
+$labels['filename'] = 'Numm vum Fichier';
+$labels['filesize'] = 'Gréisst vum Fichier';
+
+$labels['addtoaddressbook'] = 'An d\'Adressbuch setzen';
+
+// weekdays short
+$labels['sun'] = 'Son';
+$labels['mon'] = 'Méi';
+$labels['tue'] = 'Dën';
+$labels['wed'] = 'Don';
+$labels['thu'] = 'Fre';
+$labels['fri'] = 'Sam';
+$labels['sat'] = 'Son';
+
+// weekdays long
+$labels['sunday'] = 'Sonndeg';
+$labels['monday'] = 'Méindeg';
+$labels['tuesday'] = 'Dënschdeg';
+$labels['wednesday'] = 'Mëttwoch';
+$labels['thursday'] = 'Donneschdeg';
+$labels['friday'] = 'Freideg';
+$labels['saturday'] = 'Samschdeg';
+
+// months short
+$labels['jan'] = 'Jan';
+$labels['feb'] = 'Feb';
+$labels['mar'] = 'Mäe';
+$labels['apr'] = 'Abr';
+$labels['may'] = 'Mee';
+$labels['jun'] = 'Jun';
+$labels['jul'] = 'Jul';
+$labels['aug'] = 'Aug';
+$labels['sep'] = 'Sep';
+$labels['oct'] = 'Okt';
+$labels['nov'] = 'Nov';
+$labels['dec'] = 'Dez';
+
+// months long
+$labels['longjan'] = 'Januar';
+$labels['longfeb'] = 'Februar';
+$labels['longmar'] = 'Mäerz';
+$labels['longapr'] = 'Abrëll';
+$labels['longmay'] = 'Mee';
+$labels['longjun'] = 'Juni';
+$labels['longjul'] = 'Juli';
+$labels['longaug'] = 'August';
+$labels['longsep'] = 'September';
+$labels['longoct'] = 'Oktober';
+$labels['longnov'] = 'November';
+$labels['longdec'] = 'Dezember';
+
+$labels['today'] = 'Haut';
+
+// toolbar buttons
+$labels['refresh'] = 'Nei lueden';
+$labels['checkmail'] = 'Nei Messagen ofruffen';
+$labels['compose'] = 'Schreiwen';
+$labels['writenewmessage'] = 'Neie Message schreiwen';
+$labels['reply'] = 'Äntweren';
+$labels['replytomessage'] = 'Dem Ofsender äntweren';
+$labels['replytoallmessage'] = 'Dem Ofsender an allen Empfänger äntweren';
+$labels['replyall'] = 'U jiddwereen äntweren';
+$labels['replylist'] = 'Äntwert-Lëscht';
+$labels['forward'] = 'Weiderleeden';
+$labels['forwardinline'] = 'Am Message weiderleeden';
+$labels['forwardattachment'] = 'Als Unhank weiderleeden';
+$labels['forwardmessage'] = 'De Message weiderleeden';
+$labels['deletemessage'] = 'Message läschen';
+$labels['movemessagetotrash'] = 'Message an d\'Poubelle réckelen';
+$labels['printmessage'] = 'Dëse Message drécken';
+$labels['previousmessage'] = 'Message virdru weisen';
+$labels['firstmessage'] = 'Éischte Message weisen';
+$labels['nextmessage'] = 'Nächste Message weisen';
+$labels['lastmessage'] = 'Leschte Message weisen';
+$labels['backtolist'] = 'Zréck bei d\'Lëscht vun de Messagen';
+$labels['viewsource'] = 'Source weisen';
+$labels['mark'] = 'Markéieren';
+$labels['markmessages'] = 'Messagë markéieren';
+$labels['markread'] = 'Als gelies';
+$labels['markunread'] = 'Als ongelies';
+$labels['markflagged'] = 'Mat Fändel';
+$labels['markunflagged'] = 'Ouni Fändel';
+$labels['moreactions'] = 'Mei Aktiounen...';
+$labels['more'] = 'Méi';
+$labels['back'] = 'Zréck';
+$labels['options'] = 'Optiounen';
+
+$labels['select'] = 'Auswielen';
+$labels['all'] = 'All';
+$labels['none'] = 'Keng';
+$labels['currpage'] = 'Aktuell Säit';
+$labels['unread'] = 'Ongelies';
+$labels['flagged'] = 'Mat Fändel';
+$labels['unanswered'] = 'Net beäntwert';
+$labels['withattachment'] = 'Mat Unhank';
+$labels['deleted'] = 'Geläscht';
+$labels['undeleted'] = 'Net geläscht';
+$labels['invert'] = 'Ëmdréinen';
+$labels['filter'] = 'Filter';
+$labels['list'] = 'Lëscht';
+$labels['threads'] = 'Diskussiounen';
+$labels['expand-all'] = 'All opfächeren';
+$labels['expand-unread'] = 'Ongelies opfächeren';
+$labels['collapse-all'] = 'All zesummefächeren';
+$labels['threaded'] = 'Diskussiounen zesummefaassen';
+
+$labels['autoexpand_threads'] = 'Diskussiounen auserneefächeren';
+$labels['do_expand'] = 'All d\'Diskussiounen';
+$labels['expand_only_unread'] = 'just ongeliese Messagen';
+$labels['fromto'] = 'Vun/Un';
+$labels['flag'] = 'Fändel';
+$labels['attachment'] = 'Unhank';
+$labels['nonesort'] = 'Keng';
+$labels['sentdate'] = 'Verschéckt';
+$labels['arrival'] = 'Ukomm';
+$labels['asc'] = 'opsteigend';
+$labels['desc'] = 'ofsteigend';
+$labels['listcolumns'] = 'Kolonnen oplëschten';
+$labels['listsorting'] = 'Kolonne sortéieren';
+$labels['listorder'] = 'Sortéier-Reiefolleg';
+$labels['listmode'] = 'Oplëschtungs-Modus';
+
+$labels['folderactions'] = 'Dossiers-Aktiounen...';
+$labels['compact'] = 'Kompaktéieren';
+$labels['empty'] = 'Eidel';
+$labels['importmessages'] = 'Messagen importéieren';
+
+$labels['quota'] = 'Plazverbrauch';
+$labels['unknown'] = 'onbekannt';
+$labels['unlimited'] = 'onlimitéiert';
+
+$labels['quicksearch'] = 'Séier Sich';
+$labels['resetsearch'] = 'Sich zerécksetzen';
+$labels['searchmod'] = 'Sich-Parameter';
+$labels['msgtext'] = 'Ganze Message';
+$labels['body'] = 'Kierper';
+$labels['type'] = 'Typ';
+$labels['namex'] = 'Numm';
+
+$labels['openinextwin'] = 'An enger neier Fënster opmaachen';
+$labels['emlsave'] = 'Eroflueden (.eml)';
+$labels['changeformattext'] = 'Als Text ouni Formatéierungen uweisen';
+$labels['changeformathtml'] = 'Als formatéierten Text uweisen';
+
+// message compose
+$labels['editasnew'] = 'Als nei editéieren';
+$labels['send'] = 'Schécken';
+$labels['sendmessage'] = 'Message schécken';
+$labels['savemessage'] = 'Als Brouillon späicheren';
+$labels['addattachment'] = 'E Fichier drunhänken';
+$labels['charset'] = 'Zeechesaz';
+$labels['editortype'] = 'Editor-Typ';
+$labels['returnreceipt'] = 'Empfanksbestätegung';
+$labels['dsn'] = 'Empfanks-Status-Meldung';
+$labels['mailreplyintro'] = 'Den $date, $sender schreift:';
+$labels['originalmessage'] = 'Original-Message';
+
+$labels['editidents'] = 'Identitéiten editéieren';
+$labels['spellcheck'] = 'Orthographie';
+$labels['checkspelling'] = 'Orthographie kontrolléieren';
+$labels['resumeediting'] = 'Weider editéieren';
+$labels['revertto'] = 'Zréck bei';
+
+$labels['attach'] = 'Drunhänken';
+$labels['attachments'] = 'Unhäng';
+$labels['upload'] = 'Eroplueden';
+$labels['uploadprogress'] = '$percent ($current vun $total)';
+$labels['close'] = 'Zoumaachen';
+$labels['messageoptions'] = 'Message-Optiounen...';
+
+$labels['low'] = 'Niddreg';
+$labels['lowest'] = 'Am niddregsten';
+$labels['normal'] = 'Normal';
+$labels['high'] = 'Héich';
+$labels['highest'] = 'Am héchsten';
+
+$labels['nosubject'] = '(kee Sujet)';
+$labels['showimages'] = 'Biller uweisen';
+$labels['alwaysshow'] = 'Biller vun $sender ëmmer uweisen';
+$labels['isdraft'] = 'Dëst ass e Brouillon.';
+$labels['andnmore'] = '$nr more...';
+$labels['togglemoreheaders'] = 'Méi Message-Headeren uweisen';
+$labels['togglefullheaders'] = 'Réi Message-Headeren an-/ausblenden';
+
+$labels['htmltoggle'] = 'Text mat Formatéierungen';
+$labels['plaintoggle'] = 'Text ouni Formatéierungen';
+$labels['savesentmessagein'] = 'Dee verschéckte Message späicheren an';
+$labels['dontsave'] = 'net späicheren';
+$labels['maxuploadsize'] = 'Déi maximal erlaabte Fichiers-Gréisst ass $size';
+
+$labels['addcc'] = 'CC dobäisetzen';
+$labels['addbcc'] = 'BCC dobäisetzen';
+$labels['addreplyto'] = '"Äntwert un" dobäisetzen';
+$labels['addfollowupto'] = '"Noverfollgung un" dobäisetzen';
+
+// mdn
+$labels['mdnrequest'] = 'De Sender vun dësem Message huet gefrot fir informéiert ze gi wann de Message gelies gëtt. Wëlls du de Sender informéieren?';
+$labels['receiptread'] = 'Empfanksbestätegung (gelies)';
+$labels['yourmessage'] = 'Dëst ass eng Empfanksbestätegung fir Äre Message.';
+$labels['receiptnote'] = 'Bemierkung: Dës Bestätegung bezeit just datt de Message beim Empfänger ugewise ginn ass. Et gëtt keng Garantie dass den Empfänger den Inhalt vum Message gelies oder verstanen huet.';
+
+// address boook
+$labels['name'] = 'Ganzen Numm';
+$labels['firstname'] = 'Virnumm';
+$labels['surname'] = 'Nonumm';
+$labels['middlename'] = 'Mëttelnumm';
+$labels['nameprefix'] = 'Präfix';
+$labels['namesuffix'] = 'Suffix';
+$labels['nickname'] = 'Spëtznumm';
+$labels['jobtitle'] = 'Job-Titel';
+$labels['department'] = 'Departement';
+$labels['gender'] = 'Geschlecht';
+$labels['maidenname'] = 'Meedechersnumm';
+$labels['email'] = 'E-Mail';
+$labels['phone'] = 'Telefon';
+$labels['address'] = 'Adress';
+$labels['street'] = 'Strooss';
+$labels['locality'] = 'Uertschaft';
+$labels['zipcode'] = 'Postleitzuel';
+$labels['region'] = 'Staat';
+$labels['country'] = 'Land';
+$labels['birthday'] = 'Gebuertsdatum';
+$labels['anniversary'] = 'Anniversaire';
+$labels['website'] = 'Websäit';
+$labels['instantmessenger'] = 'Instant-Messenger';
+$labels['notes'] = 'Notizen';
+$labels['male'] = 'männlech';
+$labels['female'] = 'weiblech';
+$labels['manager'] = 'Manager';
+$labels['assistant'] = 'Assistent';
+$labels['spouse'] = 'Liewenspartner';
+$labels['allfields'] = 'All d\'Felder';
+$labels['search'] = 'Sichen';
+$labels['advsearch'] = 'Avancéiert Sich';
+$labels['advanced'] = 'Avancéiert';
+$labels['other'] = 'Aneres';
+
+$labels['typehome'] = 'Doheem';
+$labels['typework'] = 'Aarbecht';
+$labels['typeother'] = 'Aneres';
+$labels['typemobile'] = 'Mobil';
+$labels['typemain'] = 'Haapt';
+$labels['typehomefax'] = 'Fax Doheem';
+$labels['typeworkfax'] = 'Fax Aarbecht';
+$labels['typecar'] = 'Auto';
+$labels['typepager'] = 'Pager';
+$labels['typevideo'] = 'Video';
+$labels['typeassistant'] = 'Assistent';
+$labels['typehomepage'] = 'Websäit';
+$labels['typeblog'] = 'Blog';
+$labels['typeprofile'] = 'Profil';
+
+$labels['addfield'] = 'Feld dobäisetzen...';
+$labels['addcontact'] = 'Neie Kontakt dobäisetzen';
+$labels['editcontact'] = 'Kontakt editéieren';
+$labels['contacts'] = 'Kontakter';
+$labels['contactproperties'] = 'Kontakt-Eegeschaften';
+$labels['personalinfo'] = 'Perséinlech Informatioun';
+
+$labels['edit'] = 'Änneren';
+$labels['cancel'] = 'Ofbriechen';
+$labels['save'] = 'Späicheren';
+$labels['delete'] = 'Läschen';
+$labels['rename'] = 'Ëmbenennen';
+$labels['addphoto'] = 'Dobäisetzen';
+$labels['replacephoto'] = 'Ersetzen';
+$labels['uploadphoto'] = 'Foto eroplueden';
+
+$labels['newcontact'] = 'Nei Kontakt-Kaart erstellen';
+$labels['deletecontact'] = 'Déi ausgewielte Kontakter läschen';
+$labels['composeto'] = 'Mail schreiwen un';
+$labels['contactsfromto'] = 'Kontakter $from bis $to vun $count';
+$labels['print'] = 'Drécke';
+$labels['export'] = 'Exportéieren';
+$labels['exportall'] = 'All exportéieren';
+$labels['exportsel'] = 'Déi ausgewielten exportéieren';
+$labels['exportvcards'] = 'Kontakter am vCard-Format exportéieren';
+$labels['newcontactgroup'] = 'Nei Kontakt-Grupp erstellen';
+$labels['grouprename'] = 'Grupp ëmbenennen';
+$labels['groupdelete'] = 'Grupp läschen';
+$labels['groupremoveselected'] = 'Ausgewielte Kontakter aus Grupp eraushuele';
+
+$labels['previouspage'] = 'Säit virdru weisen';
+$labels['firstpage'] = 'Éischt Säit weisen';
+$labels['nextpage'] = 'Nächst Säit weisen';
+$labels['lastpage'] = 'Lescht Säit weisen';
+
+$labels['group'] = 'Grup';
+$labels['groups'] = 'Gruppen';
+$labels['listgroup'] = 'Gruppe-Memberen oplëschten';
+$labels['personaladrbook'] = 'Perséinlech Adressen';
+
+$labels['searchsave'] = 'Sich späicheren';
+$labels['searchdelete'] = 'Sich läschen';
+
+$labels['import'] = 'Importéieren';
+$labels['importcontacts'] = 'Kontakter importéieren';
+$labels['importfromfile'] = 'Aus Fichier importéieren:';
+$labels['importtarget'] = 'Nei Kontakter an d\'Adressbuch setzen:';
+$labels['importreplace'] = 'Dat ganzt Adressbuch ersetzen';
+$labels['importdesc'] = 'Du kanns Kontakter aus engem existéierenden Adressbuch eroplueden.<br/>Mir ënnerstëtze momentan en Adress-Import vum <a href="http://en.wikipedia.org/wiki/VCard">vCard</a>- oder CSV (mat Komma getrennt)-Date-Format.';
+$labels['done'] = 'Erleedegt';
+
+// settings
+$labels['settingsfor'] = 'Astellunge fir';
+$labels['about'] = 'Iwwert';
+$labels['preferences'] = 'Astellungen';
+$labels['userpreferences'] = 'Benotzer-Astellungen';
+$labels['editpreferences'] = 'Benotzer-Astellungen änneren';
+
+$labels['identities'] = 'Identitéiten';
+$labels['manageidentities'] = 'Identitéite fir dësen Account geréieren';
+$labels['newidentity'] = 'Nei Identitéit';
+
+$labels['newitem'] = 'Neit Element';
+$labels['edititem'] = 'Element änneren';
+
+$labels['preferhtml'] = 'HTML uweisen';
+$labels['defaultcharset'] = 'Standard Zeechesaz';
+$labels['htmlmessage'] = 'HTML-Message';
+$labels['messagepart'] = 'Deel';
+$labels['digitalsig'] = 'Digital Signatur';
+$labels['dateformat'] = 'Datums-Format';
+$labels['timeformat'] = 'Zäit-Format';
+$labels['prettydate'] = 'Schéin Daten';
+$labels['setdefault'] = 'Als standard definéieren';
+$labels['autodetect'] = 'Automatesch';
+$labels['language'] = 'Sprooch';
+$labels['timezone'] = 'Zäitzon';
+$labels['pagesize'] = 'Reie pro Säit';
+$labels['signature'] = 'Ënnerschrëft';
+$labels['dstactive'] = 'Summerzäit';
+$labels['showinextwin'] = 'Message an neier Fënster opmaache';
+$labels['composeextwin'] = 'An enger neier Fënster schreiwen';
+$labels['htmleditor'] = 'HTML-Messagë schreiwen';
+$labels['htmlonreply'] = 'bei Äntwert op e Message mat Formatéierungen';
+$labels['htmlonreplyandforward'] = 'bei Weiderleedung oder Äntwert op e Message mat Formatéierungen';
+$labels['htmlsignature'] = 'Formatéiert Ënnerschrëft';
+$labels['showemail'] = 'Email-Adress mat ganzem Numm uweisen';
+$labels['previewpane'] = 'Virschau-Panneau uweisen';
+$labels['skin'] = 'Opmaachung vum Interface';
+$labels['logoutclear'] = 'Poubelle beim Logout eidelmaachen';
+$labels['logoutcompact'] = 'Mailbox beim Logout eidelmaachen';
+$labels['uisettings'] = 'Benotzer-Interface';
+$labels['serversettings'] = 'Server-Astellungen';
+$labels['mailboxview'] = 'Mailbox-Usiicht';
+$labels['mdnrequests'] = 'Bei Ufro no Empfanksbestätegung';
+$labels['askuser'] = 'mech froen';
+$labels['autosend'] = 'Bestätegung schécken';
+$labels['autosendknown'] = 'Bestätegung u meng Kontakter schécken, anerefalls nofroen';
+$labels['autosendknownignore'] = 'Bestätegung u meng Kontakter schécken, anerefalls ignoréieren';
+$labels['ignore'] = 'ignoréieren';
+$labels['readwhendeleted'] = 'Beim Läschen de Message als gelies markéieren';
+$labels['flagfordeletion'] = 'De Message als "läschbar" markéieren amplaz en ze läschen';
+$labels['skipdeleted'] = 'Geläschte Messagen net uweisen';
+$labels['deletealways'] = 'Falls Messagen net an d\'Poubelle kënne geréckelt ginn, läsch se';
+$labels['deletejunk'] = 'Messagen am Spam-Dossier direkt läschen';
+$labels['showremoteimages'] = 'Biller an de Maile vun externe Serveren nolueden';
+$labels['fromknownsenders'] = 'vu bekannte Senderen';
+$labels['always'] = 'ëmmer';
+$labels['showinlineimages'] = 'Biller déi drunhänken ënnert dem Message uweisen';
+$labels['autosavedraft'] = 'Brouillon automatesch späicheren';
+$labels['everynminutes'] = 'all $n Minutt(en)';
+$labels['refreshinterval'] = 'Frësch lueden (nei Messagen ofruffen, etc.)';
+$labels['never'] = 'ni';
+$labels['immediately'] = 'direkt';
+$labels['messagesdisplaying'] = 'Messagen uweisen';
+$labels['messagescomposition'] = 'Messagë schreiwen';
+$labels['mimeparamfolding'] = 'Nimm vun den Unhäng';
+$labels['2231folding'] = 'Kompletten RFC 2231 (Thunderbird)';
+$labels['miscfolding'] = 'RFC 2047/2231 (Microsoft Outlook)';
+$labels['2047folding'] = 'Kompletten RFC 2047 (anerer)';
+$labels['force7bit'] = 'MIME-Kodéierung fir 8-Bit-Zeeche benotzen';
+$labels['advancedoptions'] = 'Avancéiert Optiounen';
+$labels['focusonnewmessage'] = 'Browser-Fënster fokusséiere wann en neie Message ukënnt';
+$labels['checkallfolders'] = 'Nei Messagen an allen Dossieren opruffen';
+$labels['displaynext'] = 'Nom Réckelen/Läsche vun engem Message deen nächsten uweisen';
+$labels['defaultfont'] = 'Standard-Schrëft fir e Message mat Formatéierungen';
+$labels['mainoptions'] = 'Haapt-Optiounen';
+$labels['browseroptions'] = 'Browser-Optiounen';
+$labels['section'] = 'Beräich';
+$labels['maintenance'] = 'Maintenance';
+$labels['newmessage'] = 'Neie Message';
+$labels['signatureoptions'] = 'Optioune vun der Ënnerschrëft';
+$labels['whenreplying'] = 'Bei enger Äntwert';
+$labels['replyempty'] = 'den Original-Message net zitéieren';
+$labels['replytopposting'] = 'neie Message iwwert dem Zitat ufänken';
+$labels['replybottomposting'] = 'neie Message ënnert dem Zitat ufänken';
+$labels['replyremovesignature'] = 'Bei enger Äntwert d\'Original-Ënnerschrëft aus dem Message huelen';
+$labels['autoaddsignature'] = 'Ënnerschrëft automatesch drasetzen';
+$labels['newmessageonly'] = 'just bei neie Messagen';
+$labels['replyandforwardonly'] = 'just bei Äntwerten a Weiderleedungen';
+$labels['insertsignature'] = 'Ënnerschrëft drasetzen';
+$labels['previewpanemarkread'] = 'D\'Messagen an der Virschau als gelies markéieren';
+$labels['afternseconds'] = 'no $n Sekonnen';
+$labels['reqmdn'] = 'Ëmmer eng Empfanksbestätegung ufroen';
+$labels['reqdsn'] = 'Ëmmer eng Empfanks-Status-Meldung ufroen';
+$labels['replysamefolder'] = 'Äntwert an de selweschten Dossier setze wéi de Message op dee geäntwert gëtt';
+$labels['defaultabook'] = 'Standard Adress-Buch';
+$labels['autocompletesingle'] = 'Alternativ Email-Adressen bei der automatescher Vervollstänneung iwwersprangen';
+$labels['listnamedisplay'] = 'Kontakter oplëschten als';
+$labels['spellcheckbeforesend'] = 'Orthographie kontrolléieren bevir de Message verschéckt gëtt';
+$labels['spellcheckoptions'] = 'Orthographie-Korrektur-Optiounen';
+$labels['spellcheckignoresyms'] = 'Wierder mat Symboler ignoréieren';
+$labels['spellcheckignorenums'] = 'Wierder mat Zuelen ignoréieren';
+$labels['spellcheckignorecaps'] = 'Wierder mat just Groussbuschtawen ignoréieren';
+$labels['addtodict'] = 'An den Dictionnaire setzen';
+$labels['mailtoprotohandler'] = 'Protokoll-Handhaber fir "mailto:"-Links registréieren';
+$labels['standardwindows'] = 'Popup-Fënstere wéi normal Fënstere behandelen';
+$labels['forwardmode'] = 'Messagë-Weiderleedung';
+$labels['inline'] = 'am Message';
+$labels['asattachment'] = 'als Unhank';
+
+$labels['folder'] = 'Dossier';
+$labels['folders'] = 'Dossieren';
+$labels['foldername'] = 'Dossiersnumm';
+$labels['subscribed'] = 'Abonnéiert';
+$labels['messagecount'] = 'Messagen';
+$labels['create'] = 'Erstellen';
+$labels['createfolder'] = 'Neien Dossier erstellen';
+$labels['managefolders'] = 'Dossieren geréieren';
+$labels['specialfolders'] = 'Speziell Dossieren';
+$labels['properties'] = 'Astellungen';
+$labels['folderproperties'] = 'Dossiers-Astellungen';
+$labels['parentfolder'] = 'Elteren-Dossier';
+$labels['location'] = 'Plaz';
+$labels['info'] = 'Informatioun';
+$labels['getfoldersize'] = 'Klick fir d\'Dossiers-Gréisst ze kréien';
+$labels['changesubscription'] = 'Klick fir den Abonnement ze änneren';
+$labels['foldertype'] = 'Dossiers-Typ';
+$labels['personalfolder'] = 'Privaten Dossier';
+$labels['otherfolder'] = 'Dossier vun anerem Benotzer';
+$labels['sharedfolder'] = 'Ëffentlechen Dossier';
+
+$labels['sortby'] = 'Sortéieren no';
+$labels['sortasc'] = 'Opsteigend sortéieren';
+$labels['sortdesc'] = 'Ofsteigend sortéieren';
+$labels['undo'] = 'Réckgängeg maachen';
+
+$labels['installedplugins'] = 'Installéiert Plugins';
+$labels['plugin'] = 'Plugin';
+$labels['version'] = 'Versioun';
+$labels['source'] = 'Source';
+$labels['license'] = 'Lizenz';
+$labels['support'] = 'Support ufroen';
+
+// units
+$labels['B'] = 'B';
+$labels['KB'] = 'kB';
+$labels['MB'] = 'MB';
+$labels['GB'] = 'GB';
+
+// character sets
+$labels['unicode'] = 'Unicode';
+$labels['english'] = 'Englesch';
+$labels['westerneuropean'] = 'West-Europäesch';
+$labels['easterneuropean'] = 'Ost-Europäesch';
+$labels['southeasterneuropean'] = 'Süd-Ost-Europäesch';
+$labels['baltic'] = 'Baltesch';
+$labels['cyrillic'] = 'Kyrilesch';
+$labels['arabic'] = 'Arabesch';
+$labels['greek'] = 'Griechesch';
+$labels['hebrew'] = 'Häbräesch';
+$labels['turkish'] = 'Türkesch';
+$labels['nordic'] = 'Nordesch';
+$labels['thai'] = 'Thai';
+$labels['celtic'] = 'Keltesch';
+$labels['vietnamese'] = 'Vietnamesesch';
+$labels['japanese'] = 'Japanesch';
+$labels['korean'] = 'Koreanesch';
+$labels['chinese'] = 'Chinesesch';
+
+?>
diff --git a/program/localization/lb_LU/messages.inc b/program/localization/lb_LU/messages.inc
new file mode 100644
index 000000000..5599f227b
--- /dev/null
+++ b/program/localization/lb_LU/messages.inc
@@ -0,0 +1,176 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | localization/<lang>/messages.inc |
+ | |
+ | Localization file of the Roundcube Webmail client |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/
+*/
+
+$messages = array();
+$messages['errortitle'] = 'Ee Feeler ass opgetrueden!';
+$messages['loginfailed'] = 'Login feelgeschloen.';
+$messages['cookiesdisabled'] = 'Däi Browser acceptéiert keng Cookien.';
+$messages['sessionerror'] = 'Deng Sessioun ass ongëlteg oder verfall.';
+$messages['storageerror'] = 'D\'Verbindung mam Späicher-Server ass feelgeschloen.';
+$messages['servererror'] = 'Server-Feeler!';
+$messages['servererrormsg'] = 'Server-Feeler: $msg';
+$messages['dberror'] = 'Datebank-Feeler!';
+$messages['requesttimedout'] = 'D\'Ufro huet ze laang gedauert';
+$messages['errorreadonly'] = 'D\'Operatioun kann net ofgeschloss ginn. Den Dossier ass schreifgeschützt.';
+$messages['errornoperm'] = 'D\'Operatioun kann net ofgeschloss ginn. Zougrëff verweigert.';
+$messages['erroroverquota'] = 'D\'Operatioun konnt net ausgefouert ginn. Et ass net méi genuch Plaz um Disk.';
+$messages['erroroverquotadelete'] = 'Et ass net méi genuch Plaz um Disk. Benotz Shift+Delete fir e message ze läschen.';
+$messages['invalidrequest'] = 'Ongëlteg Ufro! Et goufe keng Date gespäichert.';
+$messages['invalidhost'] = 'Ongëltege Server-Numm.';
+$messages['nomessagesfound'] = 'Keng Messagen an der Mailbox fonnt.';
+$messages['loggedout'] = 'Du hues dech erfollegräich ofgemellt. Äddi!';
+$messages['mailboxempty'] = 'D\'Mailbox ass eidel.';
+$messages['refreshing'] = 'Lueden nei...';
+$messages['loading'] = 'Lueden...';
+$messages['uploading'] = 'Fichier gëtt eropgelueden...';
+$messages['uploadingmany'] = 'Fichiere ginn eropgelueden...';
+$messages['loadingdata'] = 'Date gi gelueden..';
+$messages['checkingmail'] = 'Nei Messagë ginn ofgeruff...';
+$messages['sendingmessage'] = 'Message gëtt geschéckt...';
+$messages['messagesent'] = 'Message erfollegräich verschéckt.';
+$messages['savingmessage'] = 'Message gëtt gespäichert...';
+$messages['messagesaved'] = 'Message als Brouillon gespäichert.';
+$messages['successfullysaved'] = 'Erfollegräich gespäichert.';
+$messages['addedsuccessfully'] = 'Kontakt erfollegräich an d\'Adressbuch gesat.';
+$messages['contactexists'] = 'Et existéiert schon e Kontakt mat der selweschter E-Mail-Adress.';
+$messages['contactnameexists'] = 'Et existéiert schon e Kontakt mam selweschten Numm.';
+$messages['blockedimages'] = 'Fir deng Privatsphär ze schütze, gi Biller vun externe Serveren an dësem Message net gelueden.';
+$messages['encryptedmessage'] = 'Dëst ass e verschlësselte Message a kann net ugewise ginn. Et deet eis Leed!';
+$messages['nocontactsfound'] = 'Keng Kontakter fonnt.';
+$messages['contactnotfound'] = 'Den ugefrotene Kontakt gouf net fonnt.';
+$messages['contactsearchonly'] = 'Gëff e puer Sichbegrëffer a fir Kontakter ze fannen';
+$messages['sendingfailed'] = 'De Message konnt net verschéckt ginn.';
+$messages['senttooquickly'] = 'Waart wann ech gelift $sec Sekonn(en) bevir s du de Message verschécks. ';
+$messages['errorsavingsent'] = 'Beim Späichere vum verschéckte Message ass e Feeler opgetrueden';
+$messages['errorsaving'] = 'Beim Späicheren ass e Feeler opgetrueden.';
+$messages['errormoving'] = 'D\'Messagë konnten net verréckelt ginn.';
+$messages['errorcopying'] = 'D\'Messagë konnten net kopéiert ginn.';
+$messages['errordeleting'] = 'D\'Messagë konnten net geläscht ginn.';
+$messages['errormarking'] = 'D\'Messagë konnten net markéiert ginn.';
+$messages['deletecontactconfirm'] = 'Wëlls du wierklech déi ausgewielte Kontakter läschen?';
+$messages['deletegroupconfirm'] = 'Wëlls du wierklech déi ausgewielte Gruppe läschen?';
+$messages['deletemessagesconfirm'] = 'Wëlls du wierklech déi ausgewielte Messagë läschen?';
+$messages['deletefolderconfirm'] = 'Wëlls du dësen Dossier wierklech läschen?';
+$messages['purgefolderconfirm'] = 'Wëlls du wierklech all d\'Messagen an dësem Dossier läschen?';
+$messages['contactdeleting'] = 'Kontakter gi geläscht...';
+$messages['groupdeleting'] = 'Grupp gëtt geläscht...';
+$messages['folderdeleting'] = 'Dossier gëtt geläscht...';
+$messages['foldermoving'] = 'Dossier gëtt geréckelt...';
+$messages['foldersubscribing'] = 'Dossier gëtt abonnéiert...';
+$messages['folderunsubscribing'] = 'Dossier gëtt desabonnéiert...';
+$messages['formincomplete'] = 'De Formular war net komplett ausgefëlt.';
+$messages['noemailwarning'] = 'Gëff w.e.gl eng gëlteg Email-Adress an.';
+$messages['nonamewarning'] = 'Gëff w.e.gl en Numm an.';
+$messages['nopagesizewarning'] = 'Gëff w.e.gl eng Säitegréisst an.';
+$messages['nosenderwarning'] = 'Gëff w.e.gl d\'Adress vum Ofsender an.';
+$messages['norecipientwarning'] = 'Gëff w.e.gl op mannst een Empfänger an.';
+$messages['nosubjectwarning'] = 'D\'Feld "Sujet" ass eidel. Wëlls du elo eent uginn?';
+$messages['nobodywarning'] = 'Soll dëse Message ouni Text verschéckt ginn?';
+$messages['notsentwarning'] = 'De Message gouf net verschéckt. Wëlls du e verwerfen?';
+$messages['noldapserver'] = 'Wiel w.e.gl en LDAP-Server fir d\'Sich aus.';
+$messages['nosearchname'] = 'Gëff w.e.gl en Numm oder eng E-Mail-Adress fir de Kontakt an.';
+$messages['notuploadedwarning'] = 'Net all d\'Unhäng goufen eropgelueden. Waart w.e.gl e Moment oder briech den Upload of.';
+$messages['searchsuccessful'] = '$nr Messagë fonnt.';
+$messages['contactsearchsuccessful'] = '$nr Kontakter fonnt.';
+$messages['searchnomatch'] = 'D\'Sich huet keng Treffer bruecht.';
+$messages['searching'] = 'Sichen...';
+$messages['checking'] = 'Kontrolléieren...';
+$messages['nospellerrors'] = 'Et goufe keng Schreiffeeler fonnt.';
+$messages['folderdeleted'] = 'Dossier erfollegräich geläscht.';
+$messages['foldersubscribed'] = 'Dossier erfollegräich abonnéiert.';
+$messages['folderunsubscribed'] = 'Dossier erfollegräich desabonnéiert.';
+$messages['folderpurged'] = 'Dossier erfollegräich eidelgemaach.';
+$messages['folderexpunged'] = 'Dossier erfollegräich kompaktéiert.';
+$messages['deletedsuccessfully'] = 'Erfollegräich geläscht.';
+$messages['converting'] = 'Formatéierunge gi geläscht...';
+$messages['messageopenerror'] = 'Message konnt net vum Server geluede ginn.';
+$messages['fileuploaderror'] = 'Upload vum Fichier feelgeschloen.';
+$messages['filesizeerror'] = 'Den eropgeluedene Fichier ass méi grouss wéi déi maximal erlaabte Gréisst vun $size.';
+$messages['copysuccess'] = 'Et goufen erfollegräich $nr Kontakter kopéiert.';
+$messages['movesuccess'] = 'Et goufen erfollegräich $nr Kontakter geréckelt.';
+$messages['copyerror'] = 'Konnt d\'Kontakter net kopéieren';
+$messages['moveerror'] = 'Konnt d\'Kontakter net réckelen.';
+$messages['sourceisreadonly'] = 'D\'Adresse-Quell ass schreifgeschützt.';
+$messages['errorsavingcontact'] = 'D\'Kontakt-Adress konnt net gespäichert ginn.';
+$messages['movingmessage'] = 'Messagë gi geréckelt...';
+$messages['copyingmessage'] = 'Messagë gi kopéiert...';
+$messages['copyingcontact'] = 'Kontakter gi kopéiert...';
+$messages['movingcontact'] = 'Kontakter gi geréckelt...';
+$messages['deletingmessage'] = 'Messagë gi geläscht...';
+$messages['markingmessage'] = 'Messagë gi markéiert...';
+$messages['addingmember'] = 'Kontakter ginn an d\'grupp gesat...';
+$messages['removingmember'] = 'Kontakter ginn aus der Grupp erausgeholl...';
+$messages['receiptsent'] = 'Empfanksbestätegung erfollegräich verschéckt.';
+$messages['errorsendingreceipt'] = 'Konnt d\'Bestätegung net verschécken.';
+$messages['deleteidentityconfirm'] = 'Wëlls du dës Identitéit wierklech läschen?';
+$messages['nodeletelastidentity'] = 'Du kanns dës Identitéit net läschen, well et deng lescht ass.';
+$messages['forbiddencharacter'] = 'Den Numm vum Dossier enthält verbueden Zeechen.';
+$messages['selectimportfile'] = 'Wuel w.e.gl e Fichier aus fir eropzelueden.';
+$messages['addresswriterror'] = 'Dat ausgewieltent Adressbucht ass schreifgeschützt.';
+$messages['contactaddedtogroup'] = 'Kontakter erfollegräich an d\'Grupp gesat.';
+$messages['contactremovedfromgroup'] = 'Kontakter erfollegräich aus der Grupp erausgeholl.';
+$messages['nogroupassignmentschanged'] = 'Keng Gruppen-Zouuerdnung geännert.';
+$messages['importwait'] = 'Import leeft, ee Moment w.e.gl...';
+$messages['importformaterror'] = 'Import feelgeschloen! Den eropgeluedene Fichier ass kee gëltegen Date-Fichier.';
+$messages['importconfirm'] = '<b>$inserted Kontakter erfollegräich importéiert</b>';
+$messages['importconfirmskipped'] = '<b>$skipped existéierend Anträg iwwersprongen</b>';
+$messages['importmessagesuccess'] = 'Erfollegräich $nr Messagen importéiert';
+$messages['importmessageerror'] = 'Import feelgeschloen! Den eropgeluedene Fichier ass kee gëltege Message oder kee Mailbox-Fichier.';
+$messages['opnotpermitted'] = 'Operatioun net zougelooss!';
+$messages['nofromaddress'] = 'An der ausgewieltener Identitéit feelt d\'E-Mail-Adress.';
+$messages['editorwarning'] = 'Bei engem Wiessel op den Text-Editor ginn all d\'Formatéierunge verluer. Wëlls du sécher weidermaachen?';
+$messages['httpreceivedencrypterror'] = 'E fatale Konfiguratiouns-Feeler ass opgetrueden. Kontaktéier w.e.gl. den Administrator esou séier ewéi méiglech. <b>Däi Message kann net geschéckt ginn.</b> ';
+$messages['smtpconnerror'] = 'SMTP-Feeler ($code): Et konnt keng Verbindung mam Server hirgestallt ginn.';
+$messages['smtpautherror'] = 'SMTP-Feeler ($code): Authentifizéierung feelgeschloen.';
+$messages['smtpfromerror'] = 'SMTP-Feeler ($code): Den Ofsender "$from" konnt net gesat ginn ($msg).';
+$messages['smtptoerror'] = 'SMTP-Feeler ($code): Den Empfänger "$to" konnt net dobäigesat ginn ($msg).';
+$messages['smtprecipientserror'] = 'SMTP-Feeler: D\'Empfänger-Lëscht kann net verschafft ginn.';
+$messages['smtperror'] = 'SMTP-Feeler: $msg';
+$messages['emailformaterror'] = 'Ongëlteg E-Mail-Adress: $email';
+$messages['toomanyrecipients'] = 'Zevill Empfänger. Reduzéier d\'Zuel vun den Empfänger op $max.';
+$messages['maxgroupmembersreached'] = 'D\'Unzuel vu Gruppememberen iwwersteigt de Maximum vun $max.';
+$messages['internalerror'] = 'En interne Feeler ass opgetrueden. Probéier w.e.gl nach eng Kéier.';
+$messages['contactdelerror'] = 'Kontakter konnten net geläscht ginn.';
+$messages['contactdeleted'] = 'Kontakter erfollegräich geläscht.';
+$messages['contactrestoreerror'] = 'Déi geläschte Kontakter konnten net recuperéiert ginn.';
+$messages['contactrestored'] = 'Kontakter erfollegräich recuperéiert.';
+$messages['groupdeleted'] = 'Grupp erfollegräich geläscht.';
+$messages['grouprenamed'] = 'Grupp erfollegräich ëmbenannt.';
+$messages['groupcreated'] = 'Grupp erfollegräich creéiert.';
+$messages['savedsearchdeleted'] = 'Déi gespäicherte Sich gouf erfollegräich geläscht.';
+$messages['savedsearchdeleteerror'] = 'Déi gespäicherte Sich konnt net geläscht ginn.';
+$messages['savedsearchcreated'] = 'Déi gespäicherte Sich gouf erfollegräich erstallt.';
+$messages['savedsearchcreateerror'] = 'Déi gespäicherte Sich konnt net erstallt ginn.';
+$messages['messagedeleted'] = 'Messagen erfollegräich geläscht.';
+$messages['messagemoved'] = 'Messagen erfollegräich geréckelt.';
+$messages['messagecopied'] = 'Messagen erfollegräich kopéiert.';
+$messages['messagemarked'] = 'Messagen erfollegräich markéiert.';
+$messages['autocompletechars'] = 'Gëff e mimumum vun $min Zeechen u fir déi automatesch Vervollstänegung.';
+$messages['autocompletemore'] = 'Et goufe méi passend Treffer fonnt. Tipp w.e.gl. nach e puer Buschtawe méi.';
+$messages['namecannotbeempty'] = 'Den Numm kann net eidel sinn.';
+$messages['nametoolong'] = 'Den Numm ass ze laang.';
+$messages['folderupdated'] = 'Dossier erfollegräich aktualiséiert.';
+$messages['foldercreated'] = 'Dossier erfollegräich ugeluecht.';
+$messages['invalidimageformat'] = 'Kee gëltegt Bild-Format';
+$messages['mispellingsfound'] = 'Et goufe Schreiffeeler am Message fonnt.';
+$messages['parentnotwritable'] = 'Den Dossier konnt net am ausgewielten Dossier erstallt oder an den Dossier erageréckelt ginn. Keng Zougrëffsrechter.';
+$messages['messagetoobig'] = 'Den Messagen-Deel ass ze grouss fir verschafft ze ginn.';
+$messages['attachmentvalidationerror'] = 'WARNUNG! Dësen Unhank ass verdächteg well den tatsächlechen Typ vum Fichier net mam Typ deen am Message deklaréiert ass iwwertenee stëmmt. Falls du dem Ofsender net traus sollts du den Unhank net am Browser opmaache well e béisaartegen Inhalt enthaale kéint.<br/><br/><em>Erwaart: $expected; fonnt: $detected</em>';
+$messages['noscriptwarning'] = 'Warnung: Dëse Webmail brauch JavaScript! Fir de Service benotzen ze kënnen, aktivéier w.e.gl JavaScript an denge Browser-Astellungen.';
+
+?>
diff --git a/program/localization/lt_LT/labels.inc b/program/localization/lt_LT/labels.inc
index 376f9c771..31cb44d27 100644
--- a/program/localization/lt_LT/labels.inc
+++ b/program/localization/lt_LT/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Juodraščiai';
$labels['sent'] = 'Išsiųsti laiškai';
$labels['trash'] = 'Šiukšlinė';
$labels['junk'] = 'Brukalas';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Tema';
@@ -64,7 +65,7 @@ $labels['copy'] = 'Kopijuoti';
$labels['move'] = 'Perkelti';
$labels['moveto'] = 'Perkelti į…';
$labels['download'] = 'Parsisiųsti';
-$labels['open'] = 'Open';
+$labels['open'] = 'Atverti';
$labels['showattachment'] = 'Rodyti';
$labels['showanyway'] = 'Vistiek rodyti';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'matomus šiame puslapyje';
$labels['unread'] = 'neskaitytus';
$labels['flagged'] = 'su gairele';
$labels['unanswered'] = 'neatsakytus';
+$labels['withattachment'] = 'Su priedu';
$labels['deleted'] = 'pašalintus';
$labels['undeleted'] = 'Neištrintas';
$labels['invert'] = 'invertuoti';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Sąrašo rodymo veiksena';
$labels['folderactions'] = 'Veiksmai su aplankais…';
$labels['compact'] = 'Suglaudinti';
$labels['empty'] = 'Ištuštinti';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disko naudojimas';
$labels['unknown'] = 'nežinomas';
@@ -201,12 +204,13 @@ $labels['quicksearch'] = 'Sparčioji paieška';
$labels['resetsearch'] = 'Atšaukti paiešką';
$labels['searchmod'] = 'Paieškos modifikatoriai';
$labels['msgtext'] = 'Visas laiškas';
-$labels['body'] = 'Body';
+$labels['body'] = 'Laiško tekstas';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Atverti naujame lange';
$labels['emlsave'] = 'Parsisiųsti (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Rodyti grynojo teksto formatu';
+$labels['changeformathtml'] = 'Rodyti HTML formatu';
// message compose
$labels['editasnew'] = 'Redaguoti kaip naują';
@@ -338,8 +342,8 @@ $labels['composeto'] = 'Rašyti laišką';
$labels['contactsfromto'] = 'Adresatai nuo $from iki $to iš $count';
$labels['print'] = 'Spausdinti';
$labels['export'] = 'Eksportuoti';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Eksportuoti visus';
+$labels['exportsel'] = 'Eksportuoti pažymėtus';
$labels['exportvcards'] = 'Eksportuoti adresatus „vCard“ formatu';
$labels['newcontactgroup'] = 'Kurti adresatų grupę';
$labels['grouprename'] = 'Pervardinti grupę';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Rodyti paskutinį puslapį';
$labels['group'] = 'Grupė';
$labels['groups'] = 'Grupės';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Asmeniniai adresai';
$labels['searchsave'] = 'Įrašyti kaip radinių aplanką';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Laiškus kurti HTML formatu';
$labels['htmlonreply'] = 'tik atsakymus į HTML formato laiškus';
$labels['htmlonreplyandforward'] = 'atsakant į HTML laišką arba jį persiunčiant';
$labels['htmlsignature'] = 'HTML parašas';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Rodyti laiško peržiūros polangį';
$labels['skin'] = 'Grafinis apvalkalas';
$labels['logoutclear'] = 'Išvalyti Šiukšlinę atsijungiant';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Pašalinti cituojamame laiške esantį paraš
$labels['autoaddsignature'] = 'Automatiškai pridėti parašą';
$labels['newmessageonly'] = 'tik naujuose laiškuose';
$labels['replyandforwardonly'] = 'tik atsakymuose ir persiunčiamuose laiškuose';
-$labels['replysignaturepos'] = 'Atsakant ir persiunčiant laiškus, parašą pridėti';
-$labels['belowquote'] = 'po citata';
-$labels['abovequote'] = 'virš citatos';
$labels['insertsignature'] = 'Pridėti parašą';
$labels['previewpanemarkread'] = 'Peržiūros polangyje parodytus laiškus žymėti skaitytais';
$labels['afternseconds'] = 'praėjus $n sek.';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Nepaisyti žodžių su skaitmenimis';
$labels['spellcheckignorecaps'] = 'Nepaisyti žodžių vien iš didžiųjų raidžių';
$labels['addtodict'] = 'Įtraukti į žodyną';
$labels['mailtoprotohandler'] = 'Užregistruoti svetainę kaip dirbančią su „mailto:“ saitais';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Laiškų persiuntimo būdas';
$labels['inline'] = 'kaip citatą';
$labels['asattachment'] = 'kaip priedas';
diff --git a/program/localization/lt_LT/messages.inc b/program/localization/lt_LT/messages.inc
index 6a8e00239..df19c291b 100644
--- a/program/localization/lt_LT/messages.inc
+++ b/program/localization/lt_LT/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Duomenų bazės klaida!';
$messages['requesttimedout'] = 'Baigėsi užklausai skirtas laikas';
$messages['errorreadonly'] = 'Nepavyko atlikti veiksmo – aplankas prieinamas tik skaitymui.';
$messages['errornoperm'] = 'Nepavyko atlikti veiksmo – nepakanka teisių.';
+$messages['erroroverquota'] = 'Nepavyko atlikti veiksmo. Diske trūksta laisvos vietos.';
+$messages['erroroverquotadelete'] = 'Diske trūksta laisvos vietos. Laiškui pašalinti naudokite Lyg2+Šal (Shift+Del) klavišų kombinaciją.';
$messages['invalidrequest'] = 'Netinkama užklausa! Duomenys neišsaugoti.';
$messages['invalidhost'] = 'Negalimas serverio vardas.';
$messages['nomessagesfound'] = 'Šioje pašto dėžutėje laiškų nėra.';
diff --git a/program/localization/lv_LV/labels.inc b/program/localization/lv_LV/labels.inc
index a71d5e554..0fe5b0faf 100644
--- a/program/localization/lv_LV/labels.inc
+++ b/program/localization/lv_LV/labels.inc
@@ -23,50 +23,51 @@ $labels['welcome'] = 'Esiet laipni lūgti $product';
$labels['username'] = 'Lietotājvārds';
$labels['password'] = 'Parole';
$labels['server'] = 'Serveris';
-$labels['login'] = 'Pieslēgties';
+$labels['login'] = 'Autorizēties';
// taskbar
-$labels['logout'] = 'Atslēgties';
+$labels['logout'] = 'Iziet';
$labels['mail'] = 'E-pasts';
-$labels['settings'] = 'Personīgie iestatījumi';
+$labels['settings'] = 'Iestatījumi';
$labels['addressbook'] = 'Adrešu grāmata';
// mailbox names
$labels['inbox'] = 'Ienākošās';
$labels['drafts'] = 'Uzmetumi';
$labels['sent'] = 'Nosūtītās';
-$labels['trash'] = 'Miskaste';
+$labels['trash'] = 'Papīrgrozs';
$labels['junk'] = 'Mēstules';
+$labels['show_real_foldernames'] = 'Sistēmas mapēm rādīt īstos nosaukumus';
// message listing
$labels['subject'] = 'Temats';
$labels['from'] = 'No';
-$labels['sender'] = 'Sender';
+$labels['sender'] = 'Sūtītājs';
$labels['to'] = 'Kam';
$labels['cc'] = 'Cc';
$labels['bcc'] = 'Bcc';
-$labels['replyto'] = 'Reply-To';
-$labels['followupto'] = 'Followup-To';
+$labels['replyto'] = 'Atbildēt-Uz';
+$labels['followupto'] = 'Sekot-Uz';
$labels['date'] = 'Datums';
$labels['size'] = 'Izmērs';
$labels['priority'] = 'Prioritāte';
$labels['organization'] = 'Uzņēmums';
$labels['readstatus'] = 'Izlasīšanas statuss';
-$labels['listoptions'] = 'List options...';
+$labels['listoptions'] = 'Vēstuļu saraksta attēlošanas iestatījumi...';
$labels['mailboxlist'] = 'Mapes';
$labels['messagesfromto'] = 'Vēstules $from līdz $to no $count';
$labels['threadsfromto'] = 'Vijumi $from līdz $to no $count';
-$labels['messagenrof'] = '$nr. vēstule no $count';
-$labels['fromtoshort'] = '$from – $to of $count';
+$labels['messagenrof'] = '$nr. vēstule no $count';
+$labels['fromtoshort'] = '$from – $to no $count';
$labels['copy'] = 'Kopēt';
$labels['move'] = 'Pārvietot';
-$labels['moveto'] = 'pārvietot uz...';
+$labels['moveto'] = 'Pārvietot uz...';
$labels['download'] = 'lejupielādēt';
-$labels['open'] = 'Open';
-$labels['showattachment'] = 'Show';
-$labels['showanyway'] = 'Show it anyway';
+$labels['open'] = 'Atvērt';
+$labels['showattachment'] = 'Rādīt';
+$labels['showanyway'] = 'Vienalga rādīt';
$labels['filename'] = 'Faila nosaukums';
$labels['filesize'] = 'Faila izmērs';
@@ -122,76 +123,78 @@ $labels['longdec'] = 'Decembris';
$labels['today'] = 'Šodien';
// toolbar buttons
-$labels['refresh'] = 'Refresh';
-$labels['checkmail'] = 'Pārbaudīt pastu';
+$labels['refresh'] = 'Atjaunot';
+$labels['checkmail'] = 'Pārbaudīt e-pastu';
$labels['compose'] = 'Rakstīt vēstuli';
$labels['writenewmessage'] = 'Rakstīt jaunu vēstuli';
-$labels['reply'] = 'Reply';
-$labels['replytomessage'] = 'Atbildēt';
-$labels['replytoallmessage'] = 'Atbildēt sūtītājam un visiem saņēmējiem';
+$labels['reply'] = 'Atbildēt';
+$labels['replytomessage'] = 'Atbildēt sūtītājam';
+$labels['replytoallmessage'] = 'Atbildēt sūtītājam vai listei un visiem adresātiem';
$labels['replyall'] = 'Atbildēt visiem';
$labels['replylist'] = 'Atbildēt listei';
-$labels['forward'] = 'Forward';
+$labels['forward'] = 'Pārsūtīt';
$labels['forwardinline'] = 'Pārsūtīt iekļaujot vēstulē';
$labels['forwardattachment'] = 'Pārsūtīt kā pielikumu';
$labels['forwardmessage'] = 'Pārsūtīt vēstuli';
$labels['deletemessage'] = 'Dzēst vēstuli';
-$labels['movemessagetotrash'] = 'Pārvietot vēstuli uz miskasti';
-$labels['printmessage'] = 'izdrukāt';
+$labels['movemessagetotrash'] = 'Pārvietot vēstuli uz papīrgrozu';
+$labels['printmessage'] = 'Izdrukāt šo vēstuli';
$labels['previousmessage'] = 'Parādīt iepriekšējo vēstuli';
$labels['firstmessage'] = 'Parādīt pirmo vēstuli';
$labels['nextmessage'] = 'Parādīt nākamo vēstuli';
$labels['lastmessage'] = 'Parādīt pēdējo vēstuli';
$labels['backtolist'] = 'Atpakaļ uz vēstuļu sarakstu';
-$labels['viewsource'] = 'parādīt pirmtekstu';
-$labels['mark'] = 'Mark';
-$labels['markmessages'] = 'Marķēt vēstules kā:';
-$labels['markread'] = 'lasītas';
-$labels['markunread'] = 'nelasītas';
-$labels['markflagged'] = 'iezīmētas';
-$labels['markunflagged'] = 'neiezīmētas';
-$labels['moreactions'] = 'Citas darbības...';
-$labels['more'] = 'More';
-$labels['back'] = 'Back';
-$labels['options'] = 'Options';
-
-$labels['select'] = 'Iezīmēt';
-$labels['all'] = 'visas';
-$labels['none'] = 'Neviens';
+$labels['viewsource'] = 'Parādīt pirmtekstu';
+$labels['mark'] = 'Atzīmēt';
+$labels['markmessages'] = 'Atzīmēt vēstules kā:';
+$labels['markread'] = 'Kā lasītas';
+$labels['markunread'] = 'Kā nelasītas';
+$labels['markflagged'] = 'Kā atīmētas';
+$labels['markunflagged'] = 'Kā neatzīmētas';
+$labels['moreactions'] = 'Papildus darbības...';
+$labels['more'] = 'Vairāk';
+$labels['back'] = 'Atpakaļ';
+$labels['options'] = 'Opcijas';
+
+$labels['select'] = 'Atzīmēt';
+$labels['all'] = 'Visas';
+$labels['none'] = 'Nevienu';
$labels['currpage'] = 'Pašreizējā lapa';
-$labels['unread'] = 'nelasītās';
-$labels['flagged'] = 'iezīmētās';
-$labels['unanswered'] = 'neatbildētās';
-$labels['deleted'] = 'dzēstās';
-$labels['undeleted'] = 'Not deleted';
-$labels['invert'] = 'invertēt';
+$labels['unread'] = 'Nelasītās';
+$labels['flagged'] = 'Atzīmētās';
+$labels['unanswered'] = 'Neatbildētās';
+$labels['withattachment'] = 'Ar pielikumu';
+$labels['deleted'] = 'Dzēstās';
+$labels['undeleted'] = 'Nav izdzēstas';
+$labels['invert'] = 'Pretēji';
$labels['filter'] = 'Filtrēt';
-$labels['list'] = 'Saraksts';
-$labels['threads'] = 'Vijumi';
+$labels['list'] = 'Rādīt kā sarakstu';
+$labels['threads'] = 'Rādīt kā vijumus';
$labels['expand-all'] = 'Izvērst visus';
-$labels['expand-unread'] = 'Izvērst neizlasītos';
-$labels['collapse-all'] = 'Savērst visu';
-$labels['threaded'] = 'Savīts';
+$labels['expand-unread'] = 'Izvērst neizlasītās';
+$labels['collapse-all'] = 'Sakļaut visas';
+$labels['threaded'] = 'Rādīt vijumus';
$labels['autoexpand_threads'] = 'Izvērst vēstuļu vijumus';
-$labels['do_expand'] = 'visiem vijumiem';
-$labels['expand_only_unread'] = 'tikai tad, ja ir neizlasītas vēstules';
-$labels['fromto'] = 'Sūtītājs/Saņēmējs';
-$labels['flag'] = 'Iezīmēts';
+$labels['do_expand'] = 'visus vijumus';
+$labels['expand_only_unread'] = 'tikai ar neizlasītām vēstulēm';
+$labels['fromto'] = 'No/Kam';
+$labels['flag'] = 'Atzīmēt';
$labels['attachment'] = 'Pielikums';
-$labels['nonesort'] = 'Neviens';
+$labels['nonesort'] = 'Neviena';
$labels['sentdate'] = 'Nosūtīšanas datums';
$labels['arrival'] = 'Pienākšanas datums';
$labels['asc'] = 'augoša';
$labels['desc'] = 'dilstoša';
$labels['listcolumns'] = 'Saraksta kolonnas';
-$labels['listsorting'] = 'Kārtot pēc kolonnas';
+$labels['listsorting'] = 'Kārtošanas kolonnas';
$labels['listorder'] = 'Kārtošanas secība';
-$labels['listmode'] = 'Saraksta režīms';
+$labels['listmode'] = 'Attēlošanas veids';
$labels['folderactions'] = 'Darbības ar mapēm...';
-$labels['compact'] = 'saspiest';
-$labels['empty'] = 'iztukšot';
+$labels['compact'] = 'Saspiest';
+$labels['empty'] = 'Iztukšot';
+$labels['importmessages'] = 'Importēt vēstules';
$labels['quota'] = 'Kvota';
$labels['unknown'] = 'nezināms';
@@ -199,35 +202,36 @@ $labels['unlimited'] = 'neierobežots';
$labels['quicksearch'] = 'Ārtā meklēšana';
$labels['resetsearch'] = 'Atstatīt meklēšanu';
-$labels['searchmod'] = 'Meklēt laukos:';
-$labels['msgtext'] = 'Vēstules tekstā';
-$labels['body'] = 'Body';
+$labels['searchmod'] = 'Meklēšanas modifikatori:';
+$labels['msgtext'] = 'Visā vēstulē';
+$labels['body'] = 'Pamatteksts';
+$labels['type'] = 'Tips';
-$labels['openinextwin'] = 'atvērt jaunā logā';
+$labels['openinextwin'] = 'Atvērt jaunā logā';
$labels['emlsave'] = 'lejupielādēt (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Rādīt kā neformatētu tekstu';
+$labels['changeformathtml'] = 'Rādīt kā HTML formatētu';
// message compose
-$labels['editasnew'] = 'rediģēt kā jaunu';
-$labels['send'] = 'Send';
+$labels['editasnew'] = 'Rediģēt kā jaunu';
+$labels['send'] = 'Sūtīt';
$labels['sendmessage'] = 'Sūtīt vēstuli';
-$labels['savemessage'] = 'Saglabāt uzmetumu';
+$labels['savemessage'] = 'Saglabāt kā uzmetumu';
$labels['addattachment'] = 'Pievienot failu';
$labels['charset'] = 'Rakstzīmju kopa';
$labels['editortype'] = 'Redaktora tips';
$labels['returnreceipt'] = 'Saņemšanas apstiprinājums';
-$labels['dsn'] = 'Atskaite par piegādi';
+$labels['dsn'] = 'Piegādes atskaite';
$labels['mailreplyintro'] = '$sender @ $date rakstīja:';
$labels['originalmessage'] = 'Sākotnējā vēstule';
$labels['editidents'] = 'Rediģēt identitātes';
-$labels['spellcheck'] = 'Spell';
+$labels['spellcheck'] = 'Izrunāt';
$labels['checkspelling'] = 'Pārbaudīt pareizrakstību';
$labels['resumeediting'] = 'Turpināt rediģēšanu';
$labels['revertto'] = 'Atgriezt uz';
-$labels['attach'] = 'Attach';
+$labels['attach'] = 'Pievienot';
$labels['attachments'] = 'Pielikumi';
$labels['upload'] = 'Augšupielādēt';
$labels['uploadprogress'] = '$percent ($current no $total)';
@@ -240,13 +244,13 @@ $labels['normal'] = 'Normāla';
$labels['high'] = 'Augsta';
$labels['highest'] = 'Augstākā';
-$labels['nosubject'] = '(no subject)';
+$labels['nosubject'] = '(bez tēmas)';
$labels['showimages'] = 'Rādīt attēlus';
-$labels['alwaysshow'] = 'Vienmēr rādīt attēlus no $sender';
+$labels['alwaysshow'] = 'Vienmēr rādīt attēlus vēstulēs, kuras sūtījis $sender';
$labels['isdraft'] = 'Šis ir melnraksts.';
-$labels['andnmore'] = '$nr more...';
-$labels['togglemoreheaders'] = 'Show more message headers';
-$labels['togglefullheaders'] = 'Toggle raw message headers';
+$labels['andnmore'] = '$nr vairāk...';
+$labels['togglemoreheaders'] = 'Rādīt galvenes papildus informāciju';
+$labels['togglefullheaders'] = 'Slēpt galvenes papildus informāciju';
$labels['htmltoggle'] = 'HTML';
$labels['plaintoggle'] = 'Vienkāršs teksts';
@@ -256,14 +260,14 @@ $labels['maxuploadsize'] = 'Maksimālais atļautais faila izmērs ir $size';
$labels['addcc'] = 'Pievienot Cc';
$labels['addbcc'] = 'Pievienot Bcc';
-$labels['addreplyto'] = 'Pievienot Reply-To';
+$labels['addreplyto'] = 'Pievienot Atbildēt-Uz';
$labels['addfollowupto'] = 'Pievienot Followup-To';
// mdn
-$labels['mdnrequest'] = 'Šīs vēstules sūtītājs vēlas redzēt vēstules saņemšanas apstiprinājumu. Vai jūs vēlaties nosūtīt apstiprinājumu?';
+$labels['mdnrequest'] = 'Šīs vēstules sūtītājs vēlas redzēt vēstules saņemšanas apstiprinājumu. Vai Jūs vēlaties nosūtīt šo apstiprinājumu?';
$labels['receiptread'] = 'Saņemšanas apstiprinājums';
-$labels['yourmessage'] = 'Šīs ir jūsu vēstules saņemšanas apstiprinājums';
-$labels['receiptnote'] = 'Piezīme: Šīs apsiprinājums nozīmē tikai to, ka vēstule tika parādīta uz saņēmāja datora. Tas nenozīmē, ka saņēmējs ir izlasījis vai izpratis vēstules saturu.';
+$labels['yourmessage'] = 'Šis ir Jūsu nosūtītās vēstules saņemšanas apstiprinājums';
+$labels['receiptnote'] = 'Piezīme: Šis apsiprinājums nozīmē tikai to, ka vēstule tika parādīta uz saņēmāja datora. Tas nenozīmē, ka saņēmējs ir izlasījis vai sapratis vēstules saturu.';
// address boook
$labels['name'] = 'Uzrādītais vārds';
@@ -272,33 +276,33 @@ $labels['surname'] = 'Uzvārds';
$labels['middlename'] = 'Otrais vārds';
$labels['nameprefix'] = 'Prefikss';
$labels['namesuffix'] = 'Sufikss';
-$labels['nickname'] = 'Iesauka (nick)';
+$labels['nickname'] = 'Segvārds';
$labels['jobtitle'] = 'Amats';
$labels['department'] = 'Nodaļa';
$labels['gender'] = 'Dzimums';
-$labels['maidenname'] = 'Pirmslaulību uzvārds';
+$labels['maidenname'] = 'Pirmslaulības uzvārds';
$labels['email'] = 'E-pasts';
$labels['phone'] = 'Tālrunis';
$labels['address'] = 'Adrese';
$labels['street'] = 'Iela';
$labels['locality'] = 'Pilsēta';
-$labels['zipcode'] = 'Pasta kods';
+$labels['zipcode'] = 'Pasta indekss';
$labels['region'] = 'Novads';
$labels['country'] = 'Pilsēta';
$labels['birthday'] = 'Dzimšanas diena';
$labels['anniversary'] = 'Gadadiena';
-$labels['website'] = 'Web lapa';
+$labels['website'] = 'Mājaslapa';
$labels['instantmessenger'] = 'IM';
$labels['notes'] = 'Piezīmes';
$labels['male'] = 'vīrietis';
$labels['female'] = 'sieviete';
$labels['manager'] = 'Menedžeris';
$labels['assistant'] = 'Asistents';
-$labels['spouse'] = 'Laulātais draugs';
+$labels['spouse'] = 'Laulātais';
$labels['allfields'] = 'Visi lauki';
$labels['search'] = 'Meklēt';
$labels['advsearch'] = 'Paplašinātā meklēšana';
-$labels['advanced'] = 'Advanced';
+$labels['advanced'] = 'Paplašinātie iestatījumi';
$labels['other'] = 'Cits';
$labels['typehome'] = 'Mājas';
@@ -306,22 +310,22 @@ $labels['typework'] = 'Darbs';
$labels['typeother'] = 'Cits';
$labels['typemobile'] = 'Mobilais tālrunis';
$labels['typemain'] = 'Galvenais';
-$labels['typehomefax'] = 'Mājas Fax';
-$labels['typeworkfax'] = 'Darba Fax';
+$labels['typehomefax'] = 'Fakss mājās';
+$labels['typeworkfax'] = 'Fakss darbā';
$labels['typecar'] = 'Auto';
$labels['typepager'] = 'Peidžeris';
$labels['typevideo'] = 'Video';
$labels['typeassistant'] = 'Asistents';
-$labels['typehomepage'] = 'Web lapa';
+$labels['typehomepage'] = 'Mājaslapa';
$labels['typeblog'] = 'Blogs';
$labels['typeprofile'] = 'Profils';
$labels['addfield'] = 'Pievienot lauku...';
-$labels['addcontact'] = 'Pievienot iezīmēto ierakstu adrešu grāmatai';
-$labels['editcontact'] = 'Rediģēt adrešu grāmatas ierakstu';
+$labels['addcontact'] = 'Pievienot jaunu kontaktu';
+$labels['editcontact'] = 'Rediģēt kontaktu';
$labels['contacts'] = 'Kontakti';
$labels['contactproperties'] = 'Kontakta īpašības';
-$labels['personalinfo'] = 'Personiskā informācija';
+$labels['personalinfo'] = 'Personīgā informācija';
$labels['edit'] = 'Rediģēt';
$labels['cancel'] = 'Atcelt';
@@ -330,29 +334,30 @@ $labels['delete'] = 'Dzēst';
$labels['rename'] = 'Pārdēvēt';
$labels['addphoto'] = 'Pievienot';
$labels['replacephoto'] = 'Aizvietot';
-$labels['uploadphoto'] = 'Upload photo';
+$labels['uploadphoto'] = 'Augšupielādēt fotogrāfiju';
-$labels['newcontact'] = 'Izveidot jaunu ierakstu';
-$labels['deletecontact'] = 'Dzēst iezīmētos ierakstus';
+$labels['newcontact'] = 'Izveidot jaunu kontaktu';
+$labels['deletecontact'] = 'Dzēst atzīmētos kontaktus';
$labels['composeto'] = 'Rakstīt vēstuli';
-$labels['contactsfromto'] = 'Ieraksti $from līdz $to no $count';
+$labels['contactsfromto'] = 'Ieraksti no $from līdz $to - kopā $count';
$labels['print'] = 'Drukāt';
$labels['export'] = 'Eksportēt';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Eksportēt visu';
+$labels['exportsel'] = 'Eksportēt atzīmēto';
$labels['exportvcards'] = 'Eksportēt kontaktus vCard formātā';
$labels['newcontactgroup'] = 'Izveidot jaunu kontaktu grupu';
$labels['grouprename'] = 'Pārdēvēt grupu';
$labels['groupdelete'] = 'Izdzēst grupu';
-$labels['groupremoveselected'] = 'Remove selected contacts from group';
+$labels['groupremoveselected'] = 'Dzēst atzīmētos kontaktus no grupas';
-$labels['previouspage'] = 'Parādīt iepriekšējo kopu';
-$labels['firstpage'] = 'Parādīt pirmo kopu';
-$labels['nextpage'] = 'Parādīt nākamo kopu';
-$labels['lastpage'] = 'Parādīt pēdējo kopu';
+$labels['previouspage'] = 'Parādīt iepriekšējo lapu';
+$labels['firstpage'] = 'Parādīt pirmo lapu';
+$labels['nextpage'] = 'Parādīt nākamo lapu';
+$labels['lastpage'] = 'Parādīt pēdējo lapu';
$labels['group'] = 'Grupa';
$labels['groups'] = 'Grupas';
+$labels['listgroup'] = 'Rādīt grupas kontaktus';
$labels['personaladrbook'] = 'Personīgās adreses';
$labels['searchsave'] = 'Saglabāt meklēšanas pieprasījumu';
@@ -361,71 +366,72 @@ $labels['searchdelete'] = 'Dzēst saglabāto meklēšanas pieprasījumu';
$labels['import'] = 'Importēt';
$labels['importcontacts'] = 'Importēt kontaktus';
$labels['importfromfile'] = 'Importēt no faila:';
-$labels['importtarget'] = 'Pievienot jaunus kontaktus adrešu grāmatai';
+$labels['importtarget'] = 'Pievienot jaunus kontaktus adrešu grāmatai:';
$labels['importreplace'] = 'Aizvietot visu adrešu grāmatu';
-$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.';
+$labels['importdesc'] = 'Jūs varat ieimportēt kontaktus no jau esošas adrešu grāmatas.<br/>Uz doto brīdi tiek atbalstīti <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> vai CSV (ar komatu atdalītie) datu formāti.';
$labels['done'] = 'Pabeigts';
// settings
$labels['settingsfor'] = 'Iestatījumi';
$labels['about'] = 'Par';
$labels['preferences'] = 'Iestatījumi';
-$labels['userpreferences'] = 'Lietotāja preferences';
-$labels['editpreferences'] = 'Rediģēt lietotāja preferences';
+$labels['userpreferences'] = 'Lietotāja iestatījumi';
+$labels['editpreferences'] = 'Rediģēt iestatījumus';
$labels['identities'] = 'Identitātes';
-$labels['manageidentities'] = 'Rediģēt šī konta identitātes';
+$labels['manageidentities'] = 'Rediģēt identitātes';
$labels['newidentity'] = 'Jauna identitāte';
$labels['newitem'] = 'Jauns';
$labels['edititem'] = 'Rediģēt';
-$labels['preferhtml'] = 'Dot priekšroku HTML formatētām vēstulēm';
+$labels['preferhtml'] = 'Rādīt HTML formatētās vēstules';
$labels['defaultcharset'] = 'Noklusētā rakstzīmju kopa';
-$labels['htmlmessage'] = 'HTML vēstule';
-$labels['messagepart'] = 'Part';
-$labels['digitalsig'] = 'Digital Signature';
+$labels['htmlmessage'] = 'HTML formatēta vēstule';
+$labels['messagepart'] = 'Daļa';
+$labels['digitalsig'] = 'Digitālais paraksts';
$labels['dateformat'] = 'Datuma formāts';
$labels['timeformat'] = 'Laika formāts';
-$labels['prettydate'] = 'Formatēt datumus';
+$labels['prettydate'] = 'Rādīt īsos datumus';
$labels['setdefault'] = 'Uzlikt kā noklusēto';
-$labels['autodetect'] = 'Automātiski';
+$labels['autodetect'] = 'Automātiska';
$labels['language'] = 'Valoda';
$labels['timezone'] = 'Laika zona';
$labels['pagesize'] = 'Rindas lapā';
$labels['signature'] = 'Paraksts';
$labels['dstactive'] = 'Vasaras/ziemas laiks';
-$labels['showinextwin'] = 'Open message in a new window';
-$labels['composeextwin'] = 'Compose in a new window';
-$labels['htmleditor'] = 'Rakstīt HTML vēstules';
+$labels['showinextwin'] = 'Vēstules atvērt jaunā logā';
+$labels['composeextwin'] = 'Vēstuli rakstīt jaunā logā';
+$labels['htmleditor'] = 'Rakstīt HTML formatētas vēstules';
$labels['htmlonreply'] = 'tikai atbildot uz HTML formatētām vēstulēm';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
-$labels['htmlsignature'] = 'HTML paraksts';
+$labels['htmlonreplyandforward'] = 'tikai pārsūtot vai atbildot uz HTML formatētu vēstuli';
+$labels['htmlsignature'] = 'HTML formatēts paraksts';
+$labels['showemail'] = 'Pie vārda rādīt arī e-pasta adresi';
$labels['previewpane'] = 'Rādīt priekšskatījuma paneli';
-$labels['skin'] = 'Interfeisa izskats';
-$labels['logoutclear'] = 'Izejot no sistēmas, iztīrīt miskasti';
-$labels['logoutcompact'] = 'Izejot no sistēmas, saspiest iesūtni';
+$labels['skin'] = 'Saskarnes izskats';
+$labels['logoutclear'] = 'Izejot no e-pasta, iztīrīt papīrgrozu';
+$labels['logoutcompact'] = 'Izejot no e-pasta, saspiest iesūtni';
$labels['uisettings'] = 'Lietotāja saskarne';
$labels['serversettings'] = 'Servera iestatījumi';
$labels['mailboxview'] = 'Pastkastes skats';
$labels['mdnrequests'] = 'Vēstules izlasīšanas atskaites sūtīšana';
-$labels['askuser'] = 'jautāt lietotājam';
+$labels['askuser'] = 'jautāt man vai sūtīt';
$labels['autosend'] = 'sūtīt automātiski';
-$labels['autosendknown'] = 'automātiski sūtīt maniem kontaktiem, par citiem jautāt';
-$labels['autosendknownignore'] = 'automātiski sūtīt maniem kontaktiem, citiem nesūtīt';
-$labels['ignore'] = 'ignorēt';
-$labels['readwhendeleted'] = 'Atzīmēt dzēstās vēstules kā izlasītas';
-$labels['flagfordeletion'] = 'Dzēšot marķēt vēstules kā dzēstas, bet nedzēst';
+$labels['autosendknown'] = 'automātiski sūtīt ja pieprasītājs ir manos kontaktos, par citiem jautāt';
+$labels['autosendknownignore'] = 'automātiski sūtīt ja pieprasītājs ir manos kontaktos, citiem ignorēt un nesūtīt';
+$labels['ignore'] = 'ignorēt un nesūtīt';
+$labels['readwhendeleted'] = 'Dzēšot vēstules tās atzīmēt kā izlasītas';
+$labels['flagfordeletion'] = 'Dzēšot vēstules tās nedzēst, bet marķēt kā dzēšamas';
$labels['skipdeleted'] = 'Nerādīt dzēstās vēstules';
-$labels['deletealways'] = 'Izdzēst vēstules, ja tās neizdodas pārvietot uz miskasti';
-$labels['deletejunk'] = 'Directly delete messages in Junk';
-$labels['showremoteimages'] = 'Rādīt attēlus, kas atrodas uz cita servera';
-$labels['fromknownsenders'] = 'no zināmiem sūtītājiem';
+$labels['deletealways'] = 'Izdzēst vēstules, ja tās neizdodas pārvietot uz papīrgrozu';
+$labels['deletejunk'] = 'Automātiski dzēst vēstules no mēstuļu mapītes';
+$labels['showremoteimages'] = 'Rādīt vēstulēs attēlus, kuri atrodas uz cita servera';
+$labels['fromknownsenders'] = 'tikai no zināmiem sūtītājiem';
$labels['always'] = 'vienmēr';
$labels['showinlineimages'] = 'Rādīt pielikuma attēlus zem vēstules';
-$labels['autosavedraft'] = 'Automātiski saglabāt uzmetumu';
-$labels['everynminutes'] = 'ik pa $n minūti(ēm)';
-$labels['refreshinterval'] = 'Refresh (check for new messages, etc.)';
+$labels['autosavedraft'] = 'Automātiski saglabāt vēstules uzmetumu';
+$labels['everynminutes'] = 'ik pēc $n minūtes(ēm)';
+$labels['refreshinterval'] = 'Pārbaudīt jaunās vēstules';
$labels['never'] = 'nekad';
$labels['immediately'] = 'nekavējoties';
$labels['messagesdisplaying'] = 'Vēstuļu attēlošana';
@@ -435,47 +441,45 @@ $labels['2231folding'] = 'Pilns RFC 2231 (Thunderbird)';
$labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)';
$labels['2047folding'] = 'Pilns RFC 2047 (citi)';
$labels['force7bit'] = 'Izmantot MIME kodējumu 8-bitu simboliem';
-$labels['advancedoptions'] = 'Paplašināti iestatījumi';
-$labels['focusonnewmessage'] = 'Uztādīt pārlūka fokusu uz jaunu vēstuli';
-$labels['checkallfolders'] = 'Pārbaudīt visas mapes pēc jaunām vēstulēm';
-$labels['displaynext'] = 'Rādīt nākamo vēstuli pēc dzēšanas/pārvietošanas';
-$labels['defaultfont'] = 'Noklusētais fonts vēstulei HTML formātā';
+$labels['advancedoptions'] = 'Paplašinātie iestatījumi';
+$labels['focusonnewmessage'] = 'Uzstādīt pārlūka fokusu uz jaunu vēstuli';
+$labels['checkallfolders'] = 'Meklēt visās mapēs jaunās vēstules';
+$labels['displaynext'] = 'Pēc vēstules dzēšanas/pārvietošanas rādīt nākamo vēstuli';
+$labels['defaultfont'] = 'Noklusētais fonts vēstulēm HTML formātā';
$labels['mainoptions'] = 'Galvenie iestatījumi';
-$labels['browseroptions'] = 'Browser Options';
-$labels['section'] = 'Kategorija';
+$labels['browseroptions'] = 'Pārlūka iestatījumi';
+$labels['section'] = 'Sadaļa';
$labels['maintenance'] = 'Uzturēšana';
$labels['newmessage'] = 'Vēstuļu pienākšana';
$labels['signatureoptions'] = 'Paraksta iestatījumi';
$labels['whenreplying'] = 'Atbildot';
-$labels['replyempty'] = 'do not quote the original message';
+$labels['replyempty'] = 'neiekļaut vēstules sākotnējo tekstu';
$labels['replytopposting'] = 'sākt jaunu vēstuli virs oriģināla';
$labels['replybottomposting'] = 'sākt jaunu vēstuli zem oriģināla';
$labels['replyremovesignature'] = 'Atbildot izņemt oriģinālo parakstu no vēstules';
$labels['autoaddsignature'] = 'Automātiski pievienot parakstu';
-$labels['newmessageonly'] = 'tikai jaunas vēstules';
-$labels['replyandforwardonly'] = 'tikai atbildes un pārsūtījumi';
-$labels['replysignaturepos'] = 'Atbildot vai pārsūtot ievietot parakstu';
-$labels['belowquote'] = 'zem citāta';
-$labels['abovequote'] = 'virs citāta';
+$labels['newmessageonly'] = 'tikai jaunām vēstulēm';
+$labels['replyandforwardonly'] = 'tikai atbildēm un pārsūtījumiem';
$labels['insertsignature'] = 'Ievietot parakstu';
$labels['previewpanemarkread'] = 'Atzīmēt priekšskatītās vēstules kā lasītas';
$labels['afternseconds'] = 'pēc $n sekundēm';
-$labels['reqmdn'] = 'Vienmēr pieprasīt atskati par vēstules izlasīšanu';
-$labels['reqdsn'] = 'Vienmēr pieprasīt atskati par vēstules piegādāšanu saņēmēja serverim';
+$labels['reqmdn'] = 'Vienmēr pieprasīt saņemšanas apstiprinājumu';
+$labels['reqdsn'] = 'Vienmēr pieprasīt atskati par piegādi';
$labels['replysamefolder'] = 'Glabāt atbildes tajā pašā mapē, kurā ir vēstule, uz kuru tika atbildēts';
-$labels['defaultabook'] = 'Default address book';
-$labels['autocompletesingle'] = 'Automātiski aizpildot, izlaist alternatīvās e-pasta adreses';
-$labels['listnamedisplay'] = 'List contacts as';
-$labels['spellcheckbeforesend'] = 'Pārbaudīt pareizrakstību pirms vēstules nosūtīšanas';
+$labels['defaultabook'] = 'Noklusētā adrešu grāmata';
+$labels['autocompletesingle'] = 'Automātiski aizpildot, nerādīt alternatīvās e-pasta adreses';
+$labels['listnamedisplay'] = 'Rādīt kontaktus kā';
+$labels['spellcheckbeforesend'] = 'Pirms vēstules nosūtīšanas pārbaudīt pareizrakstību';
$labels['spellcheckoptions'] = 'Pareizrakstības iestatījumi';
$labels['spellcheckignoresyms'] = 'Ignorēt vārdus, kuri satur simbolus';
$labels['spellcheckignorenums'] = 'Ignorēt vārdus, kuri satur skaitļus';
$labels['spellcheckignorecaps'] = 'Ignorēt vārdus, kuri rakstīti ar lielajiem burtiem';
$labels['addtodict'] = 'Pievienot vārdnīcai';
-$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
-$labels['forwardmode'] = 'Messages forwarding';
-$labels['inline'] = 'inline';
-$labels['asattachment'] = 'as attachment';
+$labels['mailtoprotohandler'] = 'Atverot mailto: saites, lietot šo e-pasta programmu';
+$labels['standardwindows'] = 'Izlēcošie logi kā parasti logi';
+$labels['forwardmode'] = 'Vēstuļu pārsūtīšana';
+$labels['inline'] = 'iekļaujot';
+$labels['asattachment'] = 'kā pielikumu';
$labels['folder'] = 'Mapi';
$labels['folders'] = 'Mapes';
@@ -492,8 +496,8 @@ $labels['parentfolder'] = 'Virsmape';
$labels['location'] = 'Atrašanās vieta';
$labels['info'] = 'Informācija';
$labels['getfoldersize'] = 'Uzklikšķiniet, lai uzzinātu mapes izmēru';
-$labels['changesubscription'] = 'Uzklikšķiniet, lai mainītu abonēšanu';
-$labels['foldertype'] = 'Mapes veids';
+$labels['changesubscription'] = 'Uzklikšķiniet, lai mainītu abonēšanas iestatījumus';
+$labels['foldertype'] = 'Mapes tips';
$labels['personalfolder'] = 'Privāta mape';
$labels['otherfolder'] = 'Cita lietotāja mape';
$labels['sharedfolder'] = 'Publiska mape';
@@ -503,7 +507,7 @@ $labels['sortasc'] = 'Kārtot augošā secībā';
$labels['sortdesc'] = 'Kārtot dilstošā secībā';
$labels['undo'] = 'Atsaukt';
-$labels['installedplugins'] = 'Installed plugins';
+$labels['installedplugins'] = 'Uzstādītie spraudņi';
$labels['plugin'] = 'Spraudnis';
$labels['version'] = 'Versija';
$labels['source'] = 'Oriģināls';
@@ -517,7 +521,7 @@ $labels['MB'] = 'MB';
$labels['GB'] = 'GB';
// character sets
-$labels['unicode'] = 'Unikoda';
+$labels['unicode'] = 'Unikods';
$labels['english'] = 'Angļu';
$labels['westerneuropean'] = 'Rietumeiropas';
$labels['easterneuropean'] = 'Austrumeiropas';
diff --git a/program/localization/lv_LV/messages.inc b/program/localization/lv_LV/messages.inc
index d65976fa2..37ceb0463 100644
--- a/program/localization/lv_LV/messages.inc
+++ b/program/localization/lv_LV/messages.inc
@@ -17,153 +17,157 @@
*/
$messages = array();
-$messages['errortitle'] = 'An error occurred!';
-$messages['loginfailed'] = 'Neizdevās pieslēgties';
+$messages['errortitle'] = 'Radās kļūda!';
+$messages['loginfailed'] = 'Pieslēgties neizdevās';
$messages['cookiesdisabled'] = 'Jūsu pārlūkprogramma neatbalsta sīkdatnes (cookies)';
-$messages['sessionerror'] = 'Jūsu sessija ir beigusies';
+$messages['sessionerror'] = 'Jūsu sessija ir beigusies.';
$messages['storageerror'] = 'Neizdevās pieslēgties IMAP serverim';
-$messages['servererror'] = 'Servera kļūme.';
+$messages['servererror'] = 'Servera kļūda!';
$messages['servererrormsg'] = 'Servera kļūda: $msg';
$messages['dberror'] = 'Datubāzes kļūda!';
-$messages['requesttimedout'] = 'Request timed out';
-$messages['errorreadonly'] = 'Neizdevās veikt darbību: Mape ir tikai lasāma (read only).';
-$messages['errornoperm'] = 'Neizdevās veikt darbību: Piekļuve liegta.';
-$messages['invalidrequest'] = 'Nederīgs pieprasījums. Dati netika saglabāti.';
-$messages['invalidhost'] = 'Invalid server name.';
+$messages['requesttimedout'] = 'Pieprasījumam iestājās noilgums';
+$messages['errorreadonly'] = 'Neizdevās veikt darbību: mape ir tikai lasāma (read only)';
+$messages['errornoperm'] = 'Neizdevās veikt darbību: piekļuve liegta';
+$messages['erroroverquota'] = 'Operāciju veikt nav iespējams. Uz diska nav brīvas veitas.';
+$messages['erroroverquotadelete'] = 'Uz diska nav brīvas vietas. Lai dzēstu vēstuli, lietojiet SHIFT+DEL.';
+$messages['invalidrequest'] = 'Nederīgs pieprasījums! Dati netika saglabāti ...';
+$messages['invalidhost'] = 'Nederīgs servera nosaukums';
$messages['nomessagesfound'] = 'Šajā pastkastē nav vēstuļu';
-$messages['loggedout'] = 'Jūs esat veiksmīgi atslēdzies no sistēmas';
-$messages['mailboxempty'] = 'Pastkaste tukša';
-$messages['refreshing'] = 'Refreshing...';
+$messages['loggedout'] = 'Jūs esat veiksmīgi atslēdzies no sistēmas. Uz redzēšanos!';
+$messages['mailboxempty'] = 'Pastkaste ir tukša';
+$messages['refreshing'] = 'Atjauno...';
$messages['loading'] = 'Notiek ielāde...';
-$messages['uploading'] = 'Notiek faila augšupielāde...';
+$messages['uploading'] = 'Augšupielāde failu...';
$messages['uploadingmany'] = 'Augšupielādē failus...';
-$messages['loadingdata'] = 'Tiek ielādēti dati...';
-$messages['checkingmail'] = 'Notiek pasta pārbaude...';
-$messages['sendingmessage'] = 'Tiek sūtīta vēstule...';
+$messages['loadingdata'] = 'Ielādē datus...';
+$messages['checkingmail'] = 'Notiek pasta pārbaude ...';
+$messages['sendingmessage'] = 'Tiek sūtīta vēstule ...';
$messages['messagesent'] = 'Vēstule nosūtīta veiksmīgi';
-$messages['savingmessage'] = 'Vēstule tiek saglabāta...';
-$messages['messagesaved'] = 'Vēstule saglabāta pie uzmetumiem';
-$messages['successfullysaved'] = 'Iestatījumi veiksmīgi saglabāti';
-$messages['addedsuccessfully'] = 'Ieraksts veiksmīgi pievienots adrešu grāmatai';
-$messages['contactexists'] = 'Ieraksts ar šādu e-pasta adresi jau eksistē';
+$messages['savingmessage'] = 'Vēstule tiek saglabāta ...';
+$messages['messagesaved'] = 'Vēstule saglabāta Uzmetumos';
+$messages['successfullysaved'] = 'Veiksmīgi saglabāts.';
+$messages['addedsuccessfully'] = 'Kontakts veiksmīgi pievienots adrešu grāmatai';
+$messages['contactexists'] = 'Kontakts ar šādu e-pasta adresi jau eksistē';
$messages['contactnameexists'] = 'Kontakts ar šādu vārdu jau eksistē.';
-$messages['blockedimages'] = 'Drošības nolūkos attēli, kas tiek ielādēti no cita servera, šajā vēstulē ir bloķēti';
-$messages['encryptedmessage'] = 'Šī ir šifrēta vēstule un diemžēl nevar tikt parādīta';
-$messages['nocontactsfound'] = 'Ieraksti netika atrasti';
-$messages['contactnotfound'] = 'Prasītais kontakts nav atrasts';
-$messages['contactsearchonly'] = 'Ievadiet meklēšanas kritērijus, lai atrastu kontaktus';
+$messages['blockedimages'] = 'Drošības nolūkos attēli, kuri tiek ielādēti no cita servera, šajā vēstulē ir bloķēti';
+$messages['encryptedmessage'] = 'Atvainojiet - šī ir šifrēta vēstule un diemžēl nevar tikt parādīta ...';
+$messages['nocontactsfound'] = 'Kontakti netika atrasti';
+$messages['contactnotfound'] = 'Pieprasītais kontakts nav atrasts';
+$messages['contactsearchonly'] = 'Lai atrastu kontaktus, ievadiet meklēšanas kritērijus';
$messages['sendingfailed'] = 'Vēstule netika nosūtīta';
$messages['senttooquickly'] = 'Lūdzu uzgaidiet $sec sekundi(-es) pirms sūtiet šo vēstuli';
-$messages['errorsavingsent'] = 'Notika kļūda saglabājot nosūtīto vēstuli';
-$messages['errorsaving'] = 'Saglabājot vēstuli notikusi kļūme, vēstule netika saglabāta';
-$messages['errormoving'] = 'Vēstule netika pārvietota';
-$messages['errorcopying'] = 'Neizdevās pārkopēt vēstules.';
-$messages['errordeleting'] = 'Vēstule netika dzēsta';
-$messages['errormarking'] = 'Nebija iespējams iezīmēt vēstuli';
-$messages['deletecontactconfirm'] = 'Vai tiešām vēlaties dzēst iezīmēto(ās) kontaktpersonas?';
+$messages['errorsavingsent'] = 'Saglabājot vēstuli notika kļūda - vēstule netika saglabāta';
+$messages['errorsaving'] = 'Saglabājot notika kļūda';
+$messages['errormoving'] = 'Vēstule(s) netika pārvietota(s)';
+$messages['errorcopying'] = 'Vēstules pārkopēt neizdevās';
+$messages['errordeleting'] = 'Vēstules izdzēst neizdevās';
+$messages['errormarking'] = 'Iezīmēt vēstules nebija iespējams';
+$messages['deletecontactconfirm'] = 'Vai tiešām vēlaties dzēst iezīmētās kontaktpersonas?';
$messages['deletegroupconfirm'] = 'Vai tiešām vēlaties dzēst atzīmēto grupu?';
-$messages['deletemessagesconfirm'] = 'Vai tiešām vēlaties dzēst iezīmēto(ās) vēstules?';
+$messages['deletemessagesconfirm'] = 'Vai tiešām vēlaties dzēst iezīmētās vēstules?';
$messages['deletefolderconfirm'] = 'Vai tiešām vēlaties dzēst šo mapi?';
-$messages['purgefolderconfirm'] = 'Vai tiešām vēlaties dzēst visas vēstules, kas atrodas šajā mapē?';
-$messages['contactdeleting'] = 'Kontakts(-i) tiek dzēsti...';
+$messages['purgefolderconfirm'] = 'Vai tiešām vēlaties dzēst visas vēstules, kuras atrodas šajā mapē?';
+$messages['contactdeleting'] = 'Dzēš kontaktus...';
$messages['groupdeleting'] = 'Dzēš grupu...';
$messages['folderdeleting'] = 'Dzēš mapi...';
-$messages['foldermoving'] = 'Pārvietoju mapi...';
+$messages['foldermoving'] = 'Pārvieto mapi...';
$messages['foldersubscribing'] = 'Pieslēdz mapi...';
$messages['folderunsubscribing'] = 'Atslēdz mapi...';
-$messages['formincomplete'] = 'Formulārs nav pilnībā aizpildīts';
-$messages['noemailwarning'] = 'Lūdzu ievadiet pareizu e-pasta adresi';
+$messages['formincomplete'] = 'Forma nav pilnībā aizpildīta';
+$messages['noemailwarning'] = 'Lūdzu ievadiet korektu e-pasta adresi';
$messages['nonamewarning'] = 'Lūdzu ievadiet vārdu';
$messages['nopagesizewarning'] = 'Lūdzu ievadiet lapas izmēru';
-$messages['nosenderwarning'] = 'Lūdzu ievadiet saņēmēja e-pasta adresi';
+$messages['nosenderwarning'] = 'Lūdzu ievadiet sūtītāja e-pasta adresi';
$messages['norecipientwarning'] = 'Lūdzu ievadiet vismaz vienu saņēmēju';
$messages['nosubjectwarning'] = 'Lauks "temats" ir tukšs. Vai vēlaties to aizpildīt tagad?';
-$messages['nobodywarning'] = 'Sūtīt vēstuli bez satura teksta?';
-$messages['notsentwarning'] = 'Vēstule netika nosūtīta. Vai tiešām vēlaties atcelt vēstules rakstīsanu?';
-$messages['noldapserver'] = 'Lūdzu izvēlaties LDAP serveri';
+$messages['nobodywarning'] = 'Sūtīt vēstuli bez teksta?';
+$messages['notsentwarning'] = 'Vēstule netika nosūtīta. Vai tiešām vēlaties atcelt vēstules rakstīšanu?';
+$messages['noldapserver'] = 'Lai meklētu, lūdzu izvēlaties LDAP serveri';
$messages['nosearchname'] = 'Lūdzu ievadiet kontaktpersonas vārdu vai e-pasta adresi';
-$messages['notuploadedwarning'] = 'Visi pielikumi vēl nav augšupielādēti. Lūdzu uzgaidiet vai atceļiet augšupielādi!';
+$messages['notuploadedwarning'] = 'Visi pielikumi vēl nav augšupielādēti - lūdzu uzgaidiet vai atceļiet augšupielādi';
$messages['searchsuccessful'] = 'Atrastas $nr vēstules';
-$messages['contactsearchsuccessful'] = 'Atrasti $nr kontakti.';
-$messages['searchnomatch'] = 'Meklēšanā nekas netika atrasts';
-$messages['searching'] = 'Notiek meklēšana...';
-$messages['checking'] = 'Notiek pārbaude...';
-$messages['nospellerrors'] = 'Netika atrastas pareizrakstības kļudas';
+$messages['contactsearchsuccessful'] = 'Atrasti $nr kontakti';
+$messages['searchnomatch'] = 'Meklējot nekas netika atrasts';
+$messages['searching'] = 'Meklē...';
+$messages['checking'] = 'Pārbauda...';
+$messages['nospellerrors'] = 'Pareizrakstības kļūdas netika atrastas';
$messages['folderdeleted'] = 'Mape veiksmīgi izdzēsta';
$messages['foldersubscribed'] = 'Mape veiksmīgi pieslēgta.';
$messages['folderunsubscribed'] = 'Mape veiksmīgi atslēgta.';
$messages['folderpurged'] = 'Mape tika veiksmīgi iztukšota.';
-$messages['folderexpunged'] = 'Mape tika veiksmīgi saspiesta.';
+$messages['folderexpunged'] = 'Mape saspiesta veiksmīgi';
$messages['deletedsuccessfully'] = 'Veiksmīgi izdzēsts';
-$messages['converting'] = 'Tiek novākts vēstules formatējums...';
+$messages['converting'] = 'Tiek noņemts vēstules formatējums...';
$messages['messageopenerror'] = 'Nevarēja ielādēt vēstuli no servera';
-$messages['fileuploaderror'] = 'Neizdevās ielādēt failu';
-$messages['filesizeerror'] = 'Ielādētais fails pārsniedz pieļaujamo $size apjomu';
-$messages['copysuccess'] = 'Veiksmīgi nokopētas $nr vēstules';
-$messages['copyerror'] = 'Nevarēja nokopēt nevienu adresi';
+$messages['fileuploaderror'] = 'Faila augšupielāde neveiksmīga';
+$messages['filesizeerror'] = 'Augšupielādētais fails pārsniedz pieļaujamo $size izmēru.';
+$messages['copysuccess'] = 'Veiksmīgi nokopētas $nr adreses.';
+$messages['copyerror'] = 'Nevarēja nokopēt nevienu adresi.';
$messages['sourceisreadonly'] = 'Adreses avots ir lasīšanas režīmā tikai';
-$messages['errorsavingcontact'] = 'Nevarēja saglabāt kontakta adreses';
-$messages['movingmessage'] = 'Pārvietoju vēstules...';
+$messages['errorsavingcontact'] = 'Kontakta adresi nevarēja saglabāt.';
+$messages['movingmessage'] = 'Pārvieto vēstules...';
$messages['copyingmessage'] = 'Kopē vēstules...';
$messages['copyingcontact'] = 'Kopē kontaktus...';
$messages['deletingmessage'] = 'Dzēš vēstules...';
$messages['markingmessage'] = 'Atzīmē vēstules...';
-$messages['addingmember'] = 'Pievieno kontaktu(s) grupai...';
-$messages['removingmember'] = 'Atvieno kontaktu(s) no grupas...';
-$messages['receiptsent'] = 'Saņemšanas apstiprinājums nosūtīts';
-$messages['errorsendingreceipt'] = 'Neizdevās nosūtīt apstiprinājumu';
-$messages['deleteidentityconfirm'] = 'Vai tiešām vēlaties dzēst šo identitāti?';
-$messages['nodeletelastidentity'] = 'Šo identitāti nevar izdzēst, tā ir pati pēdējā.';
-$messages['forbiddencharacter'] = 'Mapes nosaukums satur aizliegtus simbolus';
-$messages['selectimportfile'] = 'Lūdzu izvēlieties failu, ko vēlaties augšupielādēt';
-$messages['addresswriterror'] = 'Izvēlētās adrešu grāmatas datus nevar labot';
+$messages['addingmember'] = 'Kontaktus pievieno grupai...';
+$messages['removingmember'] = 'Kontaktus atvieno no grupas...';
+$messages['receiptsent'] = 'Saņemšanas apstiprinājums nosūtīts veiksmīgi.';
+$messages['errorsendingreceipt'] = 'Neizdevās nosūtīt saņemšanas apstiprinājumu.';
+$messages['deleteidentityconfirm'] = 'Vai Jūs tiešām vēlaties dzēst šo identitāti?';
+$messages['nodeletelastidentity'] = 'Šo identitāti nav iespējams izdzēst, jo tā ir pati pēdējā.';
+$messages['forbiddencharacter'] = 'Mapes nosaukums satur aizliegtus simbolus.';
+$messages['selectimportfile'] = 'Lūdzu norādiet failu, kuru vēlaties augšupielādēt.';
+$messages['addresswriterror'] = 'Izvēlētās adrešu grāmatas datus nav iespējams rediģēt.';
$messages['contactaddedtogroup'] = 'Kontakti tika veiksmīgi pievienoti šai grupai.';
$messages['contactremovedfromgroup'] = 'Kontakti tika veiksmīgi atvienoti no šīs grupas.';
-$messages['nogroupassignmentschanged'] = 'No group assignments changed.';
+$messages['nogroupassignmentschanged'] = 'Grupā nekas netika mainīts.';
$messages['importwait'] = 'Importēju, lūdzu uzgaidiet...';
-$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
-$messages['importconfirm'] = '<b>Veiksmīgi ieimportēti $inserted kontakti, netika importēti $skipped esoši ieraksti</b>:<p><em>$names</em></p>';
+$messages['importformaterror'] = 'Imports neizdevās! Augšupielādētais fails nav derīgs importam.';
+$messages['importconfirm'] = '<b>Veiksmīgi ieimportēti $inserted kontakti</b>';
$messages['importconfirmskipped'] = '<b>Izlaida $skipped jau eksistējošus ierakstus</b>';
+$messages['importmessagesuccess'] = 'Veiksmīgi ieimportētas $nr vēstules';
+$messages['importmessageerror'] = 'Importēšanas kļūda! Augšupielādētā datne satur nekorektus datus';
$messages['opnotpermitted'] = 'Darbība nav atļauta!';
-$messages['nofromaddress'] = 'Izvēlētajai identitātei nav norādīta e-pasta adrese';
-$messages['editorwarning'] = 'Pārslēdzoties uz vienkāršotu teksta redaktoru, tiks pazaudēts esošais teksta formatējums. Vai vēlaties turpināt?';
-$messages['httpreceivedencrypterror'] = 'Kļūme. Lūdzu sazinieties ar administratoru. <b>Nav iespējams nosūtīt vēstuli.</b>';
+$messages['nofromaddress'] = 'Izvēlētajai identitātei nav norādīta e-pasta adrese.';
+$messages['editorwarning'] = 'Pārslēdzoties uz vienkāršotu teksta redaktoru, tiks pazaudēts esošais teksta formatējums. Vai tiešām vēlaties turpināt?';
+$messages['httpreceivedencrypterror'] = 'Notika kritiska kļūme. Lūdzu nekavējoties sazinieties ar Jūsu administratoru. <b>Jūsu vēstuli nosūtīt nav iespējams.</b>';
$messages['smtpconnerror'] = 'SMTP kļūme ($code): Neizdevās pieslēgties serverim';
-$messages['smtpautherror'] = 'SMTP kļūme ($code): Neizdevās autentificēties';
-$messages['smtpfromerror'] = 'SMTP kļūme ($code): Neizdevās iestatīt sūtītāju "$from" ($msg)';
-$messages['smtptoerror'] = 'SMTP kļūme ($code): Neizdevās pievienot saņēmēju "$to" ($msg)';
-$messages['smtprecipientserror'] = 'SMTP kļūme: Nav iespējams parsēt saņēmēju sarakstu';
-$messages['smtperror'] = 'SMTP kļūme: $msg';
+$messages['smtpautherror'] = 'SMTP kļūda ($code): Neizdevās autorizēties.';
+$messages['smtpfromerror'] = 'SMTP kļūda ($code): Neizdevās iestatīt sūtītāju "$from" ($msg).';
+$messages['smtptoerror'] = 'SMTP kļūda ($code): Neizdevās pievienot saņēmēju "$to" ($msg).';
+$messages['smtprecipientserror'] = 'SMTP kļūda: Nav iespējams aptrādāt saņēmēju sarakstu.';
+$messages['smtperror'] = 'SMTP kļūda: $msg';
$messages['emailformaterror'] = 'Nepareiza e-pasta adrese: $email';
$messages['toomanyrecipients'] = 'Pārāk daudz saņēmēju. Samaziniet skaitu līdz $max.';
$messages['maxgroupmembersreached'] = 'Grupas dalībnieku skaits pārsniedz limitu $max.';
-$messages['internalerror'] = 'Servera iekšējā kļūda. Lūdzu mēģiniet vēlreiz.';
-$messages['contactdelerror'] = 'Neizdevās izdzēst kontaktu(s).';
-$messages['contactdeleted'] = 'Kontakti veiksmīgi izdzēsti.';
-$messages['contactrestoreerror'] = 'Neizdevās atjaunot izdzēstos kontaktus.';
-$messages['contactrestored'] = 'Kontakti veiksmīgi atjaunoti.';
-$messages['groupdeleted'] = 'Grupa veiksmīgi izdzēsta.';
-$messages['grouprenamed'] = 'Grupa veiksmīgi pārdēvēta.';
-$messages['groupcreated'] = 'Grupa veiksmīgi izveidota.';
-$messages['savedsearchdeleted'] = 'Saglabātais meklēšanas pieprasījums veiksmīgi dzēsts.';
-$messages['savedsearchdeleteerror'] = 'Neizdevās nodzēst saglabāto meklēšanas pieprasījumu.';
-$messages['savedsearchcreated'] = 'Saglabātais meklēšanas pieprasījums veiksmīgi saglabāts.';
-$messages['savedsearchcreateerror'] = 'Neizdevās saglabāt meklēšanas pieprasījumu.';
+$messages['internalerror'] = 'Notika servera iekšējā kļūda. Lūdzu mēģiniet vēlreiz.';
+$messages['contactdelerror'] = 'Kontaktus izdzēst neizdevās.';
+$messages['contactdeleted'] = 'Kontakti izdzēsti veiksmīgi.';
+$messages['contactrestoreerror'] = 'Izdzēstos kontaktus atjaunot neizdevās.';
+$messages['contactrestored'] = 'Kontakti atjaunoti veiksmīgi.';
+$messages['groupdeleted'] = 'Grupa izdzēsta veiksmīgi.';
+$messages['grouprenamed'] = 'Grupa pārdēvēta veiksmīgi.';
+$messages['groupcreated'] = 'Grupa izveidota veiksmīgi.';
+$messages['savedsearchdeleted'] = 'Saglabātais meklēšanas pieprasījums izdzēsts veiksmīgi.';
+$messages['savedsearchdeleteerror'] = 'Saglabāto meklēšanas pieprasījumu izdzēst neizdevās.';
+$messages['savedsearchcreated'] = 'Saglabātais meklēšanas pieprasījums saglabāts veiksmīgi.';
+$messages['savedsearchcreateerror'] = 'Meklēšanas pieprasījumu izveidot neizdevās.';
$messages['messagedeleted'] = 'Vēstule(s) veiksmīgi izdzēsta(s).';
$messages['messagemoved'] = 'Vēstule(s) veiksmīgi pārvietota(s).';
$messages['messagecopied'] = 'Vēstule(s) veiksmīgi pārkopēta(s).';
-$messages['messagemarked'] = 'Vēstule(s) veiksmīgi iezīmēta(s).';
-$messages['autocompletechars'] = 'Ievadiet vismaz $min burtus, lai meklētu automātiski.';
-$messages['autocompletemore'] = 'Atrasti vairāki ieraksti. Papildiniet meklēšanas kritēriju.';
+$messages['messagemarked'] = 'Vēstule(s) veiksmīgi atzīmēta(s).';
+$messages['autocompletechars'] = 'Lai automātiski meklētu, ievadiet vismaz $min burtus.';
+$messages['autocompletemore'] = 'Atrasti vairāki ieraksti. Papildiniet meklēšanas kritēriju ar vairāk burtiem.';
$messages['namecannotbeempty'] = 'Lūdzu ievadiet vārdu.';
-$messages['nametoolong'] = 'Vārds ir par garu.';
+$messages['nametoolong'] = 'Vārds ir pārāk garš.';
$messages['folderupdated'] = 'Mape vieksmīgi atjaunota.';
$messages['foldercreated'] = 'Mape veiksmīgi izveidota.';
$messages['invalidimageformat'] = 'Nederīgs attēla formāts.';
$messages['mispellingsfound'] = 'Vēstulē atrastas pareizrakstības kļūdas.';
-$messages['parentnotwritable'] = 'Neizdevās izveidot/pārvietot mapi uz atzīmēto virsmapi. Nav piekļuves tiesību.';
-$messages['messagetoobig'] = 'Vēstule ir pārāk liela, lai to varētu apstrādāt.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
-$messages['noscriptwarning'] = 'Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser\'s settings.';
+$messages['parentnotwritable'] = 'Neizdevās izveidot/pārvietot mapi atzīmētajā virsmapē. Nav piekļuves tiesību.';
+$messages['messagetoobig'] = 'Vēstule daļa ir pārāk liela, lai to varētu apstrādāt.';
+$messages['attachmentvalidationerror'] = 'BRĪDINĀJUMS! Šis pielikums ir aizdomīgs, jo tā tips neatbilst tipam, kurš ir uzrādīts e-pasta ziņojumā. Ja jūs neuzticaties sūtītājam, šo failu Jums vaļā vērt nevajadzētu, jo tas var saturēt ļaunprātīgu saturu. <br/><br/><em>Būtu jābūt: $expected; Bet ir: $detected</em>';
+$messages['noscriptwarning'] = 'Uzmanību: lai lasītu e-pastus, Jūsu pārlūkprogrammā jābūt ieslēgtiem JavaScript.';
?>
diff --git a/program/localization/mk_MK/labels.inc b/program/localization/mk_MK/labels.inc
index c8190276e..519df5823 100755
--- a/program/localization/mk_MK/labels.inc
+++ b/program/localization/mk_MK/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Непратени';
$labels['sent'] = 'Пратени';
$labels['trash'] = 'Корпа';
$labels['junk'] = 'Ѓубре';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Наслов';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Непрочитани';
$labels['flagged'] = 'Обележано';
$labels['unanswered'] = 'Неодговорено';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Избришано';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Обратно';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Компактно';
$labels['empty'] = 'Испразни';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Искористен простор';
$labels['unknown'] = 'непознато';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Ново пребарување';
$labels['searchmod'] = 'Модификатори на пребарувањето';
$labels['msgtext'] = 'Цело писмо';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Отвори во нов прозорец';
$labels['emlsave'] = 'Преземи (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Прикажи ја последната стран
$labels['group'] = 'Group';
$labels['groups'] = 'Групи';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Лични адреси';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Пиши HTML порака';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML потпис';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Прикажи прозорец за преглед';
$labels['skin'] = 'Модел на изгледот';
$labels['logoutclear'] = 'Исчисти ја Кантата при излез';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'При одговарање отстрани
$labels['autoaddsignature'] = 'Автоматски додавај потпис';
$labels['newmessageonly'] = 'само нови писма';
$labels['replyandforwardonly'] = 'само одгорови и препраќања';
-$labels['replysignaturepos'] = 'При одговарање или препраќање стави потпис';
-$labels['belowquote'] = 'под цитираното';
-$labels['abovequote'] = 'над цитираното';
$labels['insertsignature'] = 'Вметни потпис';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/mk_MK/messages.inc b/program/localization/mk_MK/messages.inc
index c14370b14..f7a8d9a12 100755
--- a/program/localization/mk_MK/messages.inc
+++ b/program/localization/mk_MK/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Неважечко барање! Податоците не се зачувани.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Немате писма во ова сандаче';
diff --git a/program/localization/ml_IN/labels.inc b/program/localization/ml_IN/labels.inc
index 463256c0e..7d3fdc501 100644
--- a/program/localization/ml_IN/labels.inc
+++ b/program/localization/ml_IN/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'പൂര്‍ത്തിയാകാത്തവ';
$labels['sent'] = 'അയച്ചവ';
$labels['trash'] = 'ചവറ്റുകുട്ട';
$labels['junk'] = 'ആവശ്യമില്ലാത്തവ';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'വിഷയം';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'നിലവിലുളള പേജ്';
$labels['unread'] = 'വായിക്കാത്തത്';
$labels['flagged'] = 'അടയാളപ്പെടുത്തിയവ';
$labels['unanswered'] = 'മറുപടി കൊടുക്കാത്ത';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'മായ്ച്ചവ';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'തലതിരിക്കുക';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'ചുരുക്കു';
$labels['empty'] = 'ശൂന്യം';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'ഡിസ്ക്ക് ഉപയോഗം';
$labels['unknown'] = 'അറിയാത്ത';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Reset search';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'മുഴുവന്‍ സന്ദേശവും';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'പുതിയ വിന്‍ഡോയില്‍ തുറക്കുക';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Show last page';
$labels['group'] = 'കൂട്ടം';
$labels['groups'] = 'കൂട്ടങ്ങള്‍';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'സ്വകാര്യ വിലാസങ്ങള്‍';
$labels['searchsave'] = 'തിരയല്‍ സൂക്ഷിക്കുക';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML സന്ദേശങ്ങള്‍ രചിക
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Show preview pane';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'പുതിയ സന്ദേശം മാത്രം';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'ഉദ്ധാരണത്തിനു താഴെ';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = '$n നിമിഷങ്ങള്‍ കഴിഞ്ഞു്';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'അക്കങ്ങള്‍ ഉള്ള
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'നിഘണ്ടുവില്‍ ചേര്‍ക്കുക';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ml_IN/messages.inc b/program/localization/ml_IN/messages.inc
index 85dc43d77..28eb22be2 100644
--- a/program/localization/ml_IN/messages.inc
+++ b/program/localization/ml_IN/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'പ്രവര്‍ത്തനം തടസപ്പെട്ടു . അനുമതി നിഷേധിക്കപെട്ടിരിക്കുന്നു';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'അസാധുവായ അപേക്ഷ ! ഒരു രേഖയും സൂക്ഷിച്ചിട്ടില്ല';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'No messages found in this mailbox.';
diff --git a/program/localization/mr_IN/labels.inc b/program/localization/mr_IN/labels.inc
index 804fb5651..d26583d4d 100755
--- a/program/localization/mr_IN/labels.inc
+++ b/program/localization/mr_IN/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'मसुदा';
$labels['sent'] = 'पाठवलेले';
$labels['trash'] = 'कचरा पेटी';
$labels['junk'] = 'नको असलेले कचरा संदेश';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'विषय';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'सध्‍याचे पान';
$labels['unread'] = 'न वाचलेले';
$labels['flagged'] = 'खूण लावलेले';
$labels['unanswered'] = 'उत्तर न दिलेले';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'काढून टाकलेला(ले)';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'उलट करा';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'यादी दर्शक पध्‍दत';
$labels['folderactions'] = 'फोल्डर कृती..';
$labels['compact'] = 'छोटा';
$labels['empty'] = 'रिकामा';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'डिस्कचा वापर';
$labels['unknown'] = 'माहित नसलेला';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'परत शोध';
$labels['searchmod'] = 'बदलकर्त्‍यांना शोधा';
$labels['msgtext'] = 'संपूर्ण संदेश';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'नवीन खिडकी उघडा';
$labels['emlsave'] = 'इएमएल स्‍वरूपात उतरवून घ्या';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'शेवटचा संच दाखवा';
$labels['group'] = 'गट';
$labels['groups'] = 'अनेक गट';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'वैयक्तिक पत्ते';
$labels['searchsave'] = 'शोध जतन करा';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'एच टी एम एल संदेश तया
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'एच टी एम एल सही';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'प्रक्रियापूर्व तावदान दाखवा';
$labels['skin'] = 'दृष्य गोष्टी';
$labels['logoutclear'] = 'खात्यातून बाहेर पडतांना कचरा पेटी साफ करा';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'उत्‍तर देताना मु
$labels['autoaddsignature'] = 'आपोआप सही करा';
$labels['newmessageonly'] = 'फक्‍त नवीन संदेश';
$labels['replyandforwardonly'] = 'फक्‍त उत्‍तरे आ‍णी पुढे पाठवलेले संदेश';
-$labels['replysignaturepos'] = 'उत्‍तर देताना किंवा पुढे पाठवताना सही करा';
-$labels['belowquote'] = 'उतारया खाली';
-$labels['abovequote'] = 'उतारयाच्‍या वर';
$labels['insertsignature'] = 'सही मध्‍ये टाका';
$labels['previewpanemarkread'] = 'प्रदर्शित संदेश पाहीले अशी खुण करा';
$labels['afternseconds'] = '$n क्षणानंतर';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/mr_IN/messages.inc b/program/localization/mr_IN/messages.inc
index 98edd7efd..bc4097fb5 100755
--- a/program/localization/mr_IN/messages.inc
+++ b/program/localization/mr_IN/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'माहितीसाठा चूक !';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'कृती करण्यास असमर्थ, फोल्डर फक्त बघण्यासाठी';
$messages['errornoperm'] = 'कृती करण्यास असमर्थ, परवानगी अमान्य';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'अवैध विनंती! माहिती साठवलेली नाही.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'या खात्यामधे कोणताही संदेश आलेला नाही';
diff --git a/program/localization/ms_MY/labels.inc b/program/localization/ms_MY/labels.inc
index 43884e986..a6bdfbfa0 100644
--- a/program/localization/ms_MY/labels.inc
+++ b/program/localization/ms_MY/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Draf';
$labels['sent'] = 'Hantar';
$labels['trash'] = 'Tong Sampah';
$labels['junk'] = 'Junk';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Subjek';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Muka terkini';
$labels['unread'] = 'Belum dibaca';
$labels['flagged'] = 'Ditanda';
$labels['unanswered'] = 'Belum dijawab';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Telah dipadam';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Songsangkan';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Mod senarai paparan';
$labels['folderactions'] = 'Aksi folder';
$labels['compact'] = 'Kompak';
$labels['empty'] = 'Kosong';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Penggunaan cakera';
$labels['unknown'] = 'tidak diketahui';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Set semula carian';
$labels['searchmod'] = 'Pengubah carian';
$labels['msgtext'] = 'Keseluruhan mesej';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Buka dalam tetingkap baru';
$labels['emlsave'] = 'Muat-turun (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Papar set akhir';
$labels['group'] = 'Group';
$labels['groups'] = 'Kumpulan';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Alamat-alamat Peribadi';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Karang mesej HTML';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'Tandatangan HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Pamer ruang previu';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Kosongkan Tong sampah ketika keluar';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ms_MY/messages.inc b/program/localization/ms_MY/messages.inc
index 0cddd6749..72d2e3075 100644
--- a/program/localization/ms_MY/messages.inc
+++ b/program/localization/ms_MY/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Tiada mesej dijumpai dalam kotak mel ini';
diff --git a/program/localization/nb_NO/labels.inc b/program/localization/nb_NO/labels.inc
index ecbe8545e..b5c8ce4c6 100644
--- a/program/localization/nb_NO/labels.inc
+++ b/program/localization/nb_NO/labels.inc
@@ -37,11 +37,12 @@ $labels['drafts'] = 'Kladd';
$labels['sent'] = 'Sendt';
$labels['trash'] = 'Slettet';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Emne';
$labels['from'] = 'Avsender';
-$labels['sender'] = 'Sender';
+$labels['sender'] = 'Avsender';
$labels['to'] = 'Mottaker';
$labels['cc'] = 'Kopi til';
$labels['bcc'] = 'Blindkopi til';
@@ -64,6 +65,7 @@ $labels['copy'] = 'Kopier';
$labels['move'] = 'Flytt';
$labels['moveto'] = 'flytt til...';
$labels['download'] = 'last ned';
+$labels['open'] = 'Åpen';
$labels['showattachment'] = 'Vis';
$labels['showanyway'] = 'Vis likevel';
@@ -161,6 +163,7 @@ $labels['currpage'] = 'Gjeldende side';
$labels['unread'] = 'Uleste';
$labels['flagged'] = 'Flagget';
$labels['unanswered'] = 'Ubesvarte';
+$labels['withattachment'] = 'Med vedlegg';
$labels['deleted'] = 'Slettet';
$labels['undeleted'] = 'Ikke slettet';
$labels['invert'] = 'Inverter';
@@ -191,6 +194,7 @@ $labels['listmode'] = 'Listevisningsmodus';
$labels['folderactions'] = 'Mappehandlinger...';
$labels['compact'] = 'Rydd opp';
$labels['empty'] = 'Tøm';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Plassforbruk';
$labels['unknown'] = 'ukjent';
@@ -200,10 +204,13 @@ $labels['quicksearch'] = 'Hurtigsøk';
$labels['resetsearch'] = 'Nullstill søk';
$labels['searchmod'] = 'Søke felt';
$labels['msgtext'] = 'Hele meldingen';
-$labels['body'] = 'Body';
+$labels['body'] = 'Meldingstekst';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Åpne i nytt vindu';
$labels['emlsave'] = 'Last ned (.eml)';
+$labels['changeformattext'] = 'Vis i ren tekst';
+$labels['changeformathtml'] = 'Vis i HTML';
// message compose
$labels['editasnew'] = 'Rediger som ny';
@@ -335,8 +342,8 @@ $labels['composeto'] = 'Skriv e-post til';
$labels['contactsfromto'] = 'Kontakter $from til $to av $count';
$labels['print'] = 'Skriv ut';
$labels['export'] = 'Eksporter';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Eksporter alle';
+$labels['exportsel'] = 'Eksporter valgte';
$labels['exportvcards'] = 'Eksporter kontakter i vCard-format';
$labels['newcontactgroup'] = 'Opprett ny kontaktgruppe';
$labels['grouprename'] = 'Endre navn på gruppe';
@@ -350,6 +357,7 @@ $labels['lastpage'] = 'Vis siste sett';
$labels['group'] = 'Gruppe';
$labels['groups'] = 'Grupper';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Egne adresser';
$labels['searchsave'] = 'Lagre søk';
@@ -380,7 +388,7 @@ $labels['edititem'] = 'Rediger punkt';
$labels['preferhtml'] = 'Foretrekk HTML';
$labels['defaultcharset'] = 'Standard tegnsett';
$labels['htmlmessage'] = 'HTML-melding';
-$labels['messagepart'] = 'Part';
+$labels['messagepart'] = 'Del';
$labels['digitalsig'] = 'Digital signatur';
$labels['dateformat'] = 'Datoformat';
$labels['timeformat'] = 'Tidsformat';
@@ -398,6 +406,7 @@ $labels['htmleditor'] = 'Bruk HTML-editor';
$labels['htmlonreply'] = 'ved svar på HTML-melding';
$labels['htmlonreplyandforward'] = 'ved videresending av eller svar på HTML-melding';
$labels['htmlsignature'] = 'HTML-signatur';
+$labels['showemail'] = 'Vis e-postadresse sammen med visningsnavn';
$labels['previewpane'] = 'Forhåndsvisning';
$labels['skin'] = 'Utseende';
$labels['logoutclear'] = 'Tøm søppel ved utlogging';
@@ -451,9 +460,6 @@ $labels['replyremovesignature'] = 'Fjern orginalsignaturen i svar på melding';
$labels['autoaddsignature'] = 'Legg til signatur';
$labels['newmessageonly'] = 'kun på nye meldinger';
$labels['replyandforwardonly'] = 'kun i svar og videresendinger';
-$labels['replysignaturepos'] = 'Plassering av signatur ved svar eller videresending';
-$labels['belowquote'] = 'over sitert melding';
-$labels['abovequote'] = 'under sitert melding';
$labels['insertsignature'] = 'Sett inn signatur';
$labels['previewpanemarkread'] = 'Merk forhåndsviste meldinger som lest';
$labels['afternseconds'] = 'etter $n sekunder';
@@ -470,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorer ord med tall';
$labels['spellcheckignorecaps'] = 'Ignorer ord med kun store bokstaver';
$labels['addtodict'] = 'Legg til i ordbok';
$labels['mailtoprotohandler'] = 'Registrer protokollhåndtering for mailto-lenker';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Meldinger videresendes';
$labels['inline'] = 'i teksten';
$labels['asattachment'] = 'som vedlegg';
diff --git a/program/localization/nb_NO/messages.inc b/program/localization/nb_NO/messages.inc
index 939d1da76..7785f474a 100644
--- a/program/localization/nb_NO/messages.inc
+++ b/program/localization/nb_NO/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Databasefeil!';
$messages['requesttimedout'] = 'Forespørselen har fått et tidsavbrudd';
$messages['errorreadonly'] = 'Kunne ikke utføre handlingen. Mappen kan kun leses.';
$messages['errornoperm'] = 'Kan ikke utføre operasjon. Nektet tilgang.';
+$messages['erroroverquota'] = 'Kunne ikke utføre handlingen, tomt for diskplass.';
+$messages['erroroverquotadelete'] = 'Ingen ledig plass på disk. Bruk SHIFT+DEL for å slette en melding.';
$messages['invalidrequest'] = 'Ugyldig forespørsel! Ingen data ble lagret.';
$messages['invalidhost'] = 'Ugyldig servernavn.';
$messages['nomessagesfound'] = 'Det ble ikke funnet noen meldinger i denne mappen';
diff --git a/program/localization/ne_NP/labels.inc b/program/localization/ne_NP/labels.inc
index 26be68f35..5f69e1916 100644
--- a/program/localization/ne_NP/labels.inc
+++ b/program/localization/ne_NP/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'ड्राफ्टहरू';
$labels['sent'] = 'पठईएका मेलहरु';
$labels['trash'] = 'रद्दी टोकरी';
$labels['junk'] = 'स्पाम';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'विषय';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'नपढिएका |';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'छोटो गर्नुहोस';
$labels['empty'] = 'खाली गर्ने';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'डिस्कको उपभोग';
$labels['unknown'] = 'अज्ञात';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'पन: खोज';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'अन्तिम सेट देखाउनु
$labels['group'] = 'Group';
$labels['groups'] = 'समूहहरु';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'व्यक्तिगत ठेगानाहरु';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'ऐच-टी-ऐम-एल (HTML) मेल लखन
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'ऐच-टी-ऐम-एल (HTML) हस्ताक्षर';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'पूर्व दृष्य देखाउनुहोस';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ne_NP/messages.inc b/program/localization/ne_NP/messages.inc
index 0c764ba8a..c5214bb0f 100644
--- a/program/localization/ne_NP/messages.inc
+++ b/program/localization/ne_NP/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'यो मेलबक्स मा कुनै मेल छैन';
diff --git a/program/localization/nl_BE/labels.inc b/program/localization/nl_BE/labels.inc
index 82cf3a023..1e6bb2d2f 100644
--- a/program/localization/nl_BE/labels.inc
+++ b/program/localization/nl_BE/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Concepten';
$labels['sent'] = 'Verzonden berichten';
$labels['trash'] = 'Prullenbak';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Onderwerp';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Huidige pagina';
$labels['unread'] = 'Ongelezen';
$labels['flagged'] = 'Geselecteerd';
$labels['unanswered'] = 'Onbeantwoord';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Verwijderd';
$labels['undeleted'] = 'Niet verwijderd';
$labels['invert'] = 'Selectie omkeren';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Lijstweergave mode';
$labels['folderactions'] = 'Acties voor map...';
$labels['compact'] = 'Comprimeren';
$labels['empty'] = 'Legen';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Gebruikte schijfruimte';
$labels['unknown'] = 'onbekend';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Zoek opnieuw';
$labels['searchmod'] = 'Zoekopties';
$labels['msgtext'] = 'Volledig bericht';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Openen in een nieuw venster';
$labels['emlsave'] = 'Opslaan (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Toon laatste';
$labels['group'] = 'Groep';
$labels['groups'] = 'Groepen';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personlijke adressen';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML berichten opmaken';
$labels['htmlonreply'] = 'enkel bij beantwoorden van een HTML bericht';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML handtekening';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Toon voorbeeldvenster';
$labels['skin'] = 'Opmaakprofiel';
$labels['logoutclear'] = 'Prullenbak legen bij uitloggen';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Verwijder handtekening uit het origneel bij b
$labels['autoaddsignature'] = 'Handtekening automatisch toevoegen';
$labels['newmessageonly'] = 'alleen bij nieuwe berichten';
$labels['replyandforwardonly'] = 'alleen bij beantwoorden en doorsturen';
-$labels['replysignaturepos'] = 'Ondertekening plaatsen bij beantwoorden of doorsturen';
-$labels['belowquote'] = 'onder het citaat';
-$labels['abovequote'] = 'boven het citaat';
$labels['insertsignature'] = 'Handtekening invoegen';
$labels['previewpanemarkread'] = 'Markeer voorbeeldbericht als gelezen';
$labels['afternseconds'] = 'Na $n seconden';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/nl_BE/messages.inc b/program/localization/nl_BE/messages.inc
index 7e61c97c8..d87329dc3 100644
--- a/program/localization/nl_BE/messages.inc
+++ b/program/localization/nl_BE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Fout!';
$messages['requesttimedout'] = 'Aanvraag verlopen';
$messages['errorreadonly'] = 'Kon opdracht niet uitvoeren. Map is alleen-lezen.';
$messages['errornoperm'] = 'Kon opdracht niet uitvoeren. Toegang geweigerd.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Ongeldige aanvraag! Er zijn geen gegevens opgeslagen.';
$messages['invalidhost'] = 'Ongeldige server.';
$messages['nomessagesfound'] = 'Er zijn geen berichten in deze map...';
diff --git a/program/localization/nl_NL/labels.inc b/program/localization/nl_NL/labels.inc
index 2d34a5135..8a6f994fa 100644
--- a/program/localization/nl_NL/labels.inc
+++ b/program/localization/nl_NL/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Concepten';
$labels['sent'] = 'Verzonden';
$labels['trash'] = 'Prullenbak';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Toon echte namen voor speciale mappen';
// message listing
$labels['subject'] = 'Onderwerp';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Huidige pagina';
$labels['unread'] = 'Ongelezen';
$labels['flagged'] = 'Gemarkeerd';
$labels['unanswered'] = 'Onbeantwoord';
+$labels['withattachment'] = 'Met bijlage';
$labels['deleted'] = 'Verwijderd';
$labels['undeleted'] = 'Niet verwijderd';
$labels['invert'] = 'Selectie omkeren';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Lijstweergave';
$labels['folderactions'] = 'Mapacties...';
$labels['compact'] = 'Opschonen';
$labels['empty'] = 'Legen';
+$labels['importmessages'] = 'Berichten importeren';
$labels['quota'] = 'Opslagverbruik';
$labels['unknown'] = 'onbekend';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Wis zoekopdracht';
$labels['searchmod'] = 'Zoekopties';
$labels['msgtext'] = 'Gehele bericht';
$labels['body'] = 'Inhoud';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Openen in een nieuw venster';
$labels['emlsave'] = 'Opslaan (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Laatste pagina';
$labels['group'] = 'Groep';
$labels['groups'] = 'Groepen';
+$labels['listgroup'] = 'Toon groepsleden';
$labels['personaladrbook'] = 'Persoonlijk adresboek';
$labels['searchsave'] = 'Zoekopdracht opslaan';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Berichten opstellen in HTML-opmaak';
$labels['htmlonreply'] = 'alleen bij beantwoorden van HTML-berichten';
$labels['htmlonreplyandforward'] = 'bij doorsturen of beantwoorden van een HTML-bericht';
$labels['htmlsignature'] = 'HTML-ondertekening';
+$labels['showemail'] = 'Toon e-mailadressen met weergavenaam';
$labels['previewpane'] = 'Toon voorbeeldvenster';
$labels['skin'] = 'Interfacestijl';
$labels['logoutclear'] = 'Prullenbak legen bij uitloggen';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Verwijder oorspronkelijke ondertekening van b
$labels['autoaddsignature'] = 'Ondertekening automatisch toevoegen';
$labels['newmessageonly'] = 'alleen bij nieuwe berichten';
$labels['replyandforwardonly'] = 'alleen bij antwoorden en doorsturen';
-$labels['replysignaturepos'] = 'Ondertekening plaatsen bij antwoorden of doorsturen';
-$labels['belowquote'] = 'onder het citaat';
-$labels['abovequote'] = 'boven het citaat';
$labels['insertsignature'] = 'Ondertekening invoegen';
$labels['previewpanemarkread'] = 'Markeer voorbeeldberichten als gelezen';
$labels['afternseconds'] = 'na $n seconden';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Negeer woorden met cijfers';
$labels['spellcheckignorecaps'] = 'Negeer woorden welke volledig uit hoofdletters bestaan';
$labels['addtodict'] = 'Voeg toe aan woordenboek';
$labels['mailtoprotohandler'] = 'Registreer protocolhandler voor mailto: links';
+$labels['standardwindows'] = 'Behandel pop-ups als normale vensters';
$labels['forwardmode'] = 'Berichten doorsturen';
$labels['inline'] = 'invoegen';
$labels['asattachment'] = 'als bijlage';
diff --git a/program/localization/nn_NO/labels.inc b/program/localization/nn_NO/labels.inc
index 725919d14..5934a01d9 100644
--- a/program/localization/nn_NO/labels.inc
+++ b/program/localization/nn_NO/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Kladd';
$labels['sent'] = 'Sendt';
$labels['trash'] = 'Sletta';
$labels['junk'] = 'Søppel';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Emne';
@@ -64,6 +65,7 @@ $labels['copy'] = 'Kopier';
$labels['move'] = 'Flytt';
$labels['moveto'] = 'flytt til …';
$labels['download'] = 'Last ned';
+$labels['open'] = 'Open';
$labels['showattachment'] = 'Vis';
$labels['showanyway'] = 'Vis likevel';
@@ -161,6 +163,7 @@ $labels['currpage'] = 'Gjeldande side';
$labels['unread'] = 'Uleste';
$labels['flagged'] = 'Flagga';
$labels['unanswered'] = 'Ikkje svara';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Sletta';
$labels['undeleted'] = 'Ikkje sletta';
$labels['invert'] = 'Inverter';
@@ -191,6 +194,7 @@ $labels['listmode'] = 'Listevisningmodus';
$labels['folderactions'] = 'Mappehandlingar';
$labels['compact'] = 'Kompakt';
$labels['empty'] = 'Tom';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Plassbruk';
$labels['unknown'] = 'ukjend';
@@ -201,9 +205,12 @@ $labels['resetsearch'] = 'Tilbakestill søk';
$labels['searchmod'] = 'Søkeutsagn';
$labels['msgtext'] = 'Heile eposten';
$labels['body'] = 'Meldingstekst';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Opna i nytt vindauga';
$labels['emlsave'] = 'Last ned (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
// message compose
$labels['editasnew'] = 'Rediger som ny';
@@ -335,8 +342,8 @@ $labels['composeto'] = 'Ny melding til';
$labels['contactsfromto'] = 'Kontaktar $from til $to av $count';
$labels['print'] = 'Skriv ut';
$labels['export'] = 'Eksport';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Eksporter alle';
+$labels['exportsel'] = 'Eksporter valde';
$labels['exportvcards'] = 'Eksporter kontaktar i vCard-format';
$labels['newcontactgroup'] = 'Lag ny kontaktgruppe';
$labels['grouprename'] = 'Endre namn på gruppe';
@@ -350,6 +357,7 @@ $labels['lastpage'] = 'Siste side';
$labels['group'] = 'Gruppe';
$labels['groups'] = 'Gruppar';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personlege adresser';
$labels['searchsave'] = 'Lagre søk';
@@ -398,6 +406,7 @@ $labels['htmleditor'] = 'Lag HTML-meldingar';
$labels['htmlonreply'] = 'ved svar på HTML-melding';
$labels['htmlonreplyandforward'] = 'ved vidaresending av eller svar på HTML-melding';
$labels['htmlsignature'] = 'HTML-signatur';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Vis førehandsvisningsboks';
$labels['skin'] = 'Bunad';
$labels['logoutclear'] = 'Fjern alt i «sletta element» ved utlogging';
@@ -451,9 +460,6 @@ $labels['replyremovesignature'] = 'Fjern den original signatur frå eposten når
$labels['autoaddsignature'] = 'Legg signatur til automatisk';
$labels['newmessageonly'] = 'berre på nye epostar';
$labels['replyandforwardonly'] = 'berre på svar og vidaresending';
-$labels['replysignaturepos'] = 'Når du svarar eller sender vidare, plasser signaturen';
-$labels['belowquote'] = 'nedanfor siteringa';
-$labels['abovequote'] = 'oppanfor siteringa';
$labels['insertsignature'] = 'Sett inn signatur';
$labels['previewpanemarkread'] = 'Merk forehandsviste epostar som leste';
$labels['afternseconds'] = 'etter $n sekund';
@@ -470,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorer ord med tal';
$labels['spellcheckignorecaps'] = 'Ignorer ord med berre store bokstavar';
$labels['addtodict'] = 'Legg til i ordliste';
$labels['mailtoprotohandler'] = 'Registrer protokollhandsaming for mailto-lenkjer';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Meldingar vidaresendast';
$labels['inline'] = 'i teksten';
$labels['asattachment'] = 'som vedlegg';
diff --git a/program/localization/nn_NO/messages.inc b/program/localization/nn_NO/messages.inc
index e82beaf93..3dce30b98 100644
--- a/program/localization/nn_NO/messages.inc
+++ b/program/localization/nn_NO/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Databasefeil!';
$messages['requesttimedout'] = 'Førespurnaden fekk tidsavbrot';
$messages['errorreadonly'] = 'Klarte ikkje utføra handlinga. Mappa kan berre lesast.';
$messages['errornoperm'] = 'Klarte ikkje utføra handlinga. Nekta tilgang.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Eg forstår ingen ting! Ingen data lagra.';
$messages['invalidhost'] = 'Ugyldig tenarnamn.';
$messages['nomessagesfound'] = 'Ingen meldingar i denne postkassa.';
diff --git a/program/localization/pl_PL/labels.inc b/program/localization/pl_PL/labels.inc
index 7a4248830..d7b9cd2d4 100644
--- a/program/localization/pl_PL/labels.inc
+++ b/program/localization/pl_PL/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Kopie robocze';
$labels['sent'] = 'Wysłane';
$labels['trash'] = 'Kosz';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Pokaż prawdziwe nazwy dla folderów specjalnych';
// message listing
$labels['subject'] = 'Temat';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Bieżąca strona';
$labels['unread'] = 'Nieprzeczytane';
$labels['flagged'] = 'Oznaczone';
$labels['unanswered'] = 'Bez odpowiedzi';
+$labels['withattachment'] = 'Z załącznikiem';
$labels['deleted'] = 'Usunięte';
$labels['undeleted'] = 'Nieusunięte';
$labels['invert'] = 'Odwróć';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Typ listy';
$labels['folderactions'] = 'Działania na folderach...';
$labels['compact'] = 'Porządkuj';
$labels['empty'] = 'Opróżnij';
+$labels['importmessages'] = 'Import wiadomości';
$labels['quota'] = 'Użyte miejsce';
$labels['unknown'] = 'nieznane';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Wyczyść filtr';
$labels['searchmod'] = 'Parametry wyszukiwania';
$labels['msgtext'] = 'Cała wiadomość';
$labels['body'] = 'Treść';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Otwórz w nowym oknie';
$labels['emlsave'] = 'Pobierz (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Ostatnia strona';
$labels['group'] = 'Grupa';
$labels['groups'] = 'Grupy';
+$labels['listgroup'] = 'Członkowie grupy';
$labels['personaladrbook'] = 'Kontakty osobiste';
$labels['searchsave'] = 'Zapisz wyszukiwanie';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Twórz wiadomości HTML';
$labels['htmlonreply'] = 'tylko w odpowiedzi na wiadomość HTML';
$labels['htmlonreplyandforward'] = 'podczas przesyłania dalej lub odpowiedzi na wiadomość HTML';
$labels['htmlsignature'] = 'Podpis w HTML';
+$labels['showemail'] = 'Pokazuj adres e-mail wraz z nazwą/opisem';
$labels['previewpane'] = 'Pokaż podgląd wiadomości';
$labels['skin'] = 'Wygląd interfejsu';
$labels['logoutclear'] = 'Przy wylogowaniu opróżnij Kosz';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Podczas odpowiedzi usuń podpis z cytowanej t
$labels['autoaddsignature'] = 'Automatycznie wstaw podpis';
$labels['newmessageonly'] = 'tylko dla nowych wiadomości';
$labels['replyandforwardonly'] = 'tylko dla przekazywania i odpowiedzi';
-$labels['replysignaturepos'] = 'Podczas odpowiedzi wstaw podpis';
-$labels['belowquote'] = 'poniżej cytowanej treści';
-$labels['abovequote'] = 'ponad cytowaną treścią';
$labels['insertsignature'] = 'Wstaw podpis';
$labels['previewpanemarkread'] = 'Oznacz podglądane wiadomości jako przeczytane';
$labels['afternseconds'] = 'po $n sekundach';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignoruj słowa zawierające cyfry';
$labels['spellcheckignorecaps'] = 'Ignoruj słowa pisane wielkimi literami';
$labels['addtodict'] = 'Dodaj do słownika';
$labels['mailtoprotohandler'] = 'Zainstaluj obsługę linków mailto:';
+$labels['standardwindows'] = 'Traktuj okna wyskakujące jako standardowe okna';
$labels['forwardmode'] = 'Przekazywanie wiadomości';
$labels['inline'] = 'w treści';
$labels['asattachment'] = 'jako załącznik';
diff --git a/program/localization/pl_PL/messages.inc b/program/localization/pl_PL/messages.inc
index 68e33fa1b..3cac0c426 100644
--- a/program/localization/pl_PL/messages.inc
+++ b/program/localization/pl_PL/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Błąd bazy danych!';
$messages['requesttimedout'] = 'Upłynął limit czasu żądania';
$messages['errorreadonly'] = 'Nie można wykonać operacji. Folder tylko do odczytu.';
$messages['errornoperm'] = 'Nie można wykonać operacji. Brak uprawnień.';
+$messages['erroroverquota'] = 'Nie można wykonać operacji. Brak miejsca na dysku.';
+$messages['erroroverquotadelete'] = 'Brak miejsca na dysku. Użyj SHIFT+DEL aby usunąć wiadomość.';
$messages['invalidrequest'] = 'Błędne żądanie! Nie zapisano danych.';
$messages['invalidhost'] = 'Błędna nazwa serwera.';
$messages['nomessagesfound'] = 'Brak wiadomości w skrzynce.';
@@ -43,7 +45,7 @@ $messages['sendingmessage'] = 'Wysyłanie wiadomości...';
$messages['messagesent'] = 'Wiadomość została wysłana.';
$messages['savingmessage'] = 'Zapisywanie wiadomości...';
$messages['messagesaved'] = 'Wiadomość została zapisana w folderze Kopie robocze.';
-$messages['successfullysaved'] = 'Zapisano.';
+$messages['successfullysaved'] = 'Zapisano pomyślnie.';
$messages['addedsuccessfully'] = 'Kontakt został dodany.';
$messages['contactexists'] = 'Kontakt o podanym adresie e-mail już istnieje!';
$messages['contactnameexists'] = 'Kontakt z podaną nazwą już istnieje!';
@@ -124,6 +126,8 @@ $messages['importwait'] = 'Importowanie, proszę czekać...';
$messages['importformaterror'] = 'Import nieudany! Użyty plik nie jest poprawnym plikiem importu danych.';
$messages['importconfirm'] = '<b>Pomyślnie dodano $inserted kontaktów, pominięto $skipped istniejących wpisów</b>:<p><em>$names</em></p>.';
$messages['importconfirmskipped'] = '<b>Pominięto $skipped istniejących wpisów.</b>';
+$messages['importmessagesuccess'] = 'Pomyślnie zaimportowano następującą liczbę wiadomości: $nr';
+$messages['importmessageerror'] = 'Import nieudany! Wgrywany plik nie jest poprawną wiadomością lub plikiem skrzynki pocztowej';
$messages['opnotpermitted'] = 'Niedozwolona operacja!';
$messages['nofromaddress'] = 'Brak adresu e-mail w wybranej tożsamości.';
$messages['editorwarning'] = 'Zmiana edytora spowoduje utratę formatowania tekstu. Czy jesteś pewien, że chcesz to zrobić?';
diff --git a/program/localization/ps/labels.inc b/program/localization/ps/labels.inc
index 05f6c3d32..d5e513419 100755
--- a/program/localization/ps/labels.inc
+++ b/program/localization/ps/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'بارليک';
$labels['sent'] = 'لېږل شوي ليکونه';
$labels['trash'] = 'کثافت دانۍ';
$labels['junk'] = 'جنک';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'مضمون';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'نالوستي';
$labels['flagged'] = 'بې کاره';
$labels['unanswered'] = 'ناځواب شوي';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'کېښکلی';
$labels['empty'] = 'تش';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'ټيکلي لارښود';
$labels['unknown'] = 'نامعلوم';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'د پلټنې بياسمون';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'په نوي کړکۍ کې پرانيزه';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'پای غونډ وښيه';
$labels['group'] = 'Group';
$labels['groups'] = 'ډلې';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'ځاني پتې';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'ايچ ټي‌ام ايل استوزي وليکه';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'ايچ ټي ام ايل لاسليک';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'پخوانی چوکاټ وښييه';
$labels['skin'] = 'انټرفيس بڼه';
$labels['logoutclear'] = 'کثافت داني د وتنې په وخت کې پاکه کړه';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ps/messages.inc b/program/localization/ps/messages.inc
index c133b8c0e..d3a8483ee 100755
--- a/program/localization/ps/messages.inc
+++ b/program/localization/ps/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'ليکبکس کې هېڅ استوزي ونه مونده';
diff --git a/program/localization/pt_BR/labels.inc b/program/localization/pt_BR/labels.inc
index 55068df5b..e70ae35b9 100644
--- a/program/localization/pt_BR/labels.inc
+++ b/program/localization/pt_BR/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Rascunhos';
$labels['sent'] = 'Enviados';
$labels['trash'] = 'Lixeira';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Exibir o nome real das pastas de sistema';
// message listing
$labels['subject'] = 'Assunto';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Página atual';
$labels['unread'] = 'Não lidas';
$labels['flagged'] = 'Marcadas';
$labels['unanswered'] = 'Não respondidas';
+$labels['withattachment'] = 'Com anexo';
$labels['deleted'] = 'Excluídas';
$labels['undeleted'] = 'Não excluídas';
$labels['invert'] = 'Inverter';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Visualização em lista';
$labels['folderactions'] = 'Ações para as pastas...';
$labels['compact'] = 'Compactar';
$labels['empty'] = 'Esvaziar';
+$labels['importmessages'] = 'Importar mensagens';
$labels['quota'] = 'Uso de disco';
$labels['unknown'] = 'desconhecido';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Limpar pesquisa';
$labels['searchmod'] = 'Opções da pesquisa';
$labels['msgtext'] = 'Mensagem inteira';
$labels['body'] = 'Conteúdo';
+$labels['type'] = 'Tipo';
$labels['openinextwin'] = 'Abrir em nova janela';
$labels['emlsave'] = 'Baixar (formato .eml)';
@@ -266,7 +270,7 @@ $labels['yourmessage'] = 'Esta é uma confirmação de leitura da sua mensagem';
$labels['receiptnote'] = 'Nota: Esta confirmação de leitura somente informa que a mensagem foi aberta no computador do destinatário. Não há garantia que o destinatário tenha lido ou compreendido o conteúdo da mensagem.';
// address boook
-$labels['name'] = 'Nome de exibição';
+$labels['name'] = 'Nome';
$labels['firstname'] = 'Primeiro Nome';
$labels['surname'] = 'Sobrenome';
$labels['middlename'] = 'Segundo Nome';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Última Página';
$labels['group'] = 'Grupo';
$labels['groups'] = 'Grupos';
+$labels['listgroup'] = 'Listar membros do grupo';
$labels['personaladrbook'] = 'Endereços pessoais';
$labels['searchsave'] = 'Salvar pesquisa';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Criar mensagens em HTML';
$labels['htmlonreply'] = 'em resposta à mensagem em HTML somente';
$labels['htmlonreplyandforward'] = 'em resposta ou encaminhamento de mensagem em HTML';
$labels['htmlsignature'] = 'Assinatura em HTML';
+$labels['showemail'] = 'Exibir o endereço de email junto ao nome de exibição';
$labels['previewpane'] = 'Exibir pré-visualização';
$labels['skin'] = 'Aparência da interface (tema)';
$labels['logoutclear'] = 'Esvaziar a Lixeira ao sair';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Remover assinatura original da mensagem ao re
$labels['autoaddsignature'] = 'Adicionar assinatura automaticamente';
$labels['newmessageonly'] = 'somente em novas mensagens';
$labels['replyandforwardonly'] = 'somente em respostas e encaminhamentos';
-$labels['replysignaturepos'] = 'Inserir assinatura ao responder ou encaminhar';
-$labels['belowquote'] = 'abaixo da citação';
-$labels['abovequote'] = 'acima da citação';
$labels['insertsignature'] = 'Inserir assinatura';
$labels['previewpanemarkread'] = 'Marcar mensagens pré-visualizadas como lidas';
$labels['afternseconds'] = 'depois de $n segundos';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorar palavras com números';
$labels['spellcheckignorecaps'] = 'Ignorar palavras com todas letras maiúsculas';
$labels['addtodict'] = 'Adicionar ao dicionário';
$labels['mailtoprotohandler'] = 'Associar links de e-mail (mailto:) para envio de mensagem através do webmail';
+$labels['standardwindows'] = 'Usar popups como janelas do navegador';
$labels['forwardmode'] = 'Encaminhamento de mensagens';
$labels['inline'] = 'Em linha (no corpo da mensagem)';
$labels['asattachment'] = 'como anexo';
@@ -485,7 +489,7 @@ $labels['messagecount'] = 'Mensagens';
$labels['create'] = 'Criar';
$labels['createfolder'] = 'Criar nova pasta';
$labels['managefolders'] = 'Gerenciar pastas';
-$labels['specialfolders'] = 'Pastas especiais';
+$labels['specialfolders'] = 'Pastas de sistema';
$labels['properties'] = 'Propriedades';
$labels['folderproperties'] = 'Propriedades da pasta';
$labels['parentfolder'] = 'Pasta pai';
diff --git a/program/localization/pt_BR/messages.inc b/program/localization/pt_BR/messages.inc
index f734c7fbd..6ec481b8f 100644
--- a/program/localization/pt_BR/messages.inc
+++ b/program/localization/pt_BR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Erro no banco de dados!';
$messages['requesttimedout'] = 'Tempo da requisição esgotado';
$messages['errorreadonly'] = 'Não foi possível realizar a operação. Pasta somente leitura';
$messages['errornoperm'] = 'Não foi possível realizar a operação. Acesso negado';
+$messages['erroroverquota'] = 'Não foi possível realizar a operação. Não há espaço disponível.';
+$messages['erroroverquotadelete'] = 'Não há espaço disponível. Utilize SHIFT+DEL para apagar a mensagem.';
$messages['invalidrequest'] = 'Requisição inválida! Nenhum dado foi salvo.';
$messages['invalidhost'] = 'Endereço de servidor inválido.';
$messages['nomessagesfound'] = 'Nenhuma mensagem encontrada nessa caixa de mensagens';
diff --git a/program/localization/pt_PT/labels.inc b/program/localization/pt_PT/labels.inc
index 62fa8bbb4..cc4c534e0 100644
--- a/program/localization/pt_PT/labels.inc
+++ b/program/localization/pt_PT/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Rascunhos';
$labels['sent'] = 'Itens Enviados';
$labels['trash'] = 'Reciclagem';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Mostrar nomes reais para as pastas especiais';
// message listing
$labels['subject'] = 'Assunto';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Página actual';
$labels['unread'] = 'Não lidas';
$labels['flagged'] = 'Sinalizadas';
$labels['unanswered'] = 'Não respondidas';
+$labels['withattachment'] = 'Com anexo';
$labels['deleted'] = 'Eliminadas';
$labels['undeleted'] = 'Não eliminada';
$labels['invert'] = 'Inverter selecção';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Modo de visualização';
$labels['folderactions'] = 'Acções para pastas...';
$labels['compact'] = 'Compactar';
$labels['empty'] = 'Esvaziar';
+$labels['importmessages'] = 'Importar mensagens';
$labels['quota'] = 'Espaço utilizado';
$labels['unknown'] = 'desconhecido';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Limpar pesquisa';
$labels['searchmod'] = 'Pesquisar em';
$labels['msgtext'] = 'Mensagem completa';
$labels['body'] = 'Corpo';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Abrir numa nova janela';
$labels['emlsave'] = 'Guardar como (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Última página';
$labels['group'] = 'Grupo';
$labels['groups'] = 'Grupos';
+$labels['listgroup'] = 'Lista de membros do grupo';
$labels['personaladrbook'] = 'Endereços pessoais';
$labels['searchsave'] = 'Guardar pesquisa';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Escrever mensagens em HTML';
$labels['htmlonreply'] = 'apenas em resposta a mensagens HTML';
$labels['htmlonreplyandforward'] = 'no reencaminhamento ou resposta de mensagem em HTML';
$labels['htmlsignature'] = 'Assinatura em HTML';
+$labels['showemail'] = 'Mostrar endereço de e-mail com o nome a exibir';
$labels['previewpane'] = 'Mostrar pré-visualização';
$labels['skin'] = 'Aspecto [tema]';
$labels['logoutclear'] = 'Esvaziar a Reciclagem ao sair';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Ao responder, remover a assinatura original d
$labels['autoaddsignature'] = 'Adicionar assinatura automaticamente';
$labels['newmessageonly'] = 'apenas em novas mensagens';
$labels['replyandforwardonly'] = 'apenas em respostas e reenvios';
-$labels['replysignaturepos'] = 'Ao responder ou reencaminhar colocar assinatura';
-$labels['belowquote'] = 'depois da citação';
-$labels['abovequote'] = 'antes da citação';
$labels['insertsignature'] = 'Inserir assinatura';
$labels['previewpanemarkread'] = 'Marcar mensagem como lida';
$labels['afternseconds'] = 'após $n segundos';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorar palavras com números';
$labels['spellcheckignorecaps'] = 'Ignorar palavras em maiúsculas';
$labels['addtodict'] = 'Adicionar ao dicionário';
$labels['mailtoprotohandler'] = 'Registar manipulador de protocolo para mailto: links';
+$labels['standardwindows'] = 'Lidar com popups como janelas padrão';
$labels['forwardmode'] = 'Reencaminhamento de mensagens';
$labels['inline'] = 'em linha';
$labels['asattachment'] = 'como anexo';
diff --git a/program/localization/pt_PT/messages.inc b/program/localization/pt_PT/messages.inc
index 638b0fcdd..88b96e60e 100644
--- a/program/localization/pt_PT/messages.inc
+++ b/program/localization/pt_PT/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Erro na base de dados!';
$messages['requesttimedout'] = 'A solicitação expirou';
$messages['errorreadonly'] = 'Não foi possível efectuar a operação. A pasta é só de leitura.';
$messages['errornoperm'] = 'Não tem permissões para efectuar esta operação.';
+$messages['erroroverquota'] = 'Não foi possível executar a operação. Não há espaço livre em disco.';
+$messages['erroroverquotadelete'] = 'Não há espaço livre em disco. Use SHIFT + DEL para eliminar algumas mensagens.';
$messages['invalidrequest'] = 'Pedido inválido! Não foi guardada nenhuma informação.';
$messages['invalidhost'] = 'Nome do servidor inválido.';
$messages['nomessagesfound'] = 'Não existem mensagens nesta pasta.';
diff --git a/program/localization/ro_RO/labels.inc b/program/localization/ro_RO/labels.inc
index 0dcd97919..4f6ddb1fa 100644
--- a/program/localization/ro_RO/labels.inc
+++ b/program/localization/ro_RO/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Ciorne';
$labels['sent'] = 'Trimise';
$labels['trash'] = 'Gunoi';
$labels['junk'] = 'Spam';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Subiect';
@@ -46,25 +47,25 @@ $labels['to'] = 'Destinatar';
$labels['cc'] = 'Copie (CC)';
$labels['bcc'] = 'Copie oarbă (BCC)';
$labels['replyto'] = 'Răspunde la';
-$labels['followupto'] = 'Followup-To';
+$labels['followupto'] = 'Followup La';
$labels['date'] = 'Data';
$labels['size'] = 'Mărime';
$labels['priority'] = 'Prioritate';
$labels['organization'] = 'Organizaţie';
-$labels['readstatus'] = 'Starea de citit';
+$labels['readstatus'] = 'Citit/Necitit';
$labels['listoptions'] = 'Listează opţiunile...';
$labels['mailboxlist'] = 'Dosare';
$labels['messagesfromto'] = 'Mesaje de la $from până la $to din $count';
$labels['threadsfromto'] = 'Grupuri de la $from până la $to din $count';
-$labels['messagenrof'] = '$nr mesaje din $count';
+$labels['messagenrof'] = 'Mesajul $nr din $count';
$labels['fromtoshort'] = '$from - $to din $count';
$labels['copy'] = 'Copiază';
$labels['move'] = 'Mută';
$labels['moveto'] = 'Mută in...';
$labels['download'] = 'Descarcă';
-$labels['open'] = 'Open';
+$labels['open'] = 'Deschide';
$labels['showattachment'] = 'Arată';
$labels['showanyway'] = 'Arată oricum';
@@ -127,22 +128,22 @@ $labels['checkmail'] = 'Verifică mesaje noi';
$labels['compose'] = 'Scrie un mesaj';
$labels['writenewmessage'] = 'Scrie mesaj nou';
$labels['reply'] = 'Răspunde';
-$labels['replytomessage'] = 'Răspunde la mesaj';
+$labels['replytomessage'] = 'Răspunde expeditorului';
$labels['replytoallmessage'] = 'Răspunde la toţi';
$labels['replyall'] = 'Răspunde la toţi';
-$labels['replylist'] = 'Lista de răspuns';
+$labels['replylist'] = 'Răspunde listei';
$labels['forward'] = 'Înaintează';
$labels['forwardinline'] = 'Înaintează ca citat';
$labels['forwardattachment'] = 'Înaintează ca ataşament';
$labels['forwardmessage'] = 'Trimite mesajul mai departe';
-$labels['deletemessage'] = 'Trimite mesajul la gunoi';
+$labels['deletemessage'] = 'Șterge mesajul';
$labels['movemessagetotrash'] = 'Mută mesajul la gunoi';
$labels['printmessage'] = 'Listează mesajul';
$labels['previousmessage'] = 'Afişează mesajul anterior';
$labels['firstmessage'] = 'Afişează primul mesaj';
$labels['nextmessage'] = 'Afişează următorul mesaj';
$labels['lastmessage'] = 'Afişează ultimul mesaj';
-$labels['backtolist'] = 'Înapoi la lista cu mesaje';
+$labels['backtolist'] = 'Înapoi la mesaje';
$labels['viewsource'] = 'Afişează sursa';
$labels['mark'] = 'Marchează';
$labels['markmessages'] = 'Marchează mesajele';
@@ -157,11 +158,12 @@ $labels['options'] = 'Opţiuni';
$labels['select'] = 'Selectează';
$labels['all'] = 'Toate';
-$labels['none'] = 'Fără sortare';
+$labels['none'] = 'Niciunul';
$labels['currpage'] = 'Pagina curentă';
$labels['unread'] = 'Necitite';
$labels['flagged'] = 'Marcat';
$labels['unanswered'] = 'Fără răspuns';
+$labels['withattachment'] = 'Cu atașament';
$labels['deleted'] = 'Şterse';
$labels['undeleted'] = 'Nu a fost șters';
$labels['invert'] = 'Inversează';
@@ -189,9 +191,10 @@ $labels['listsorting'] = 'Sortează după';
$labels['listorder'] = 'Ordinea de sortare';
$labels['listmode'] = 'Mod de vizualizare';
-$labels['folderactions'] = 'Actiuni asupra folder-ului...';
+$labels['folderactions'] = 'Acțiuni dosar...';
$labels['compact'] = 'Compactează';
$labels['empty'] = 'Goleşte';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Spaţiu folosit';
$labels['unknown'] = 'necunoscut';
@@ -202,17 +205,18 @@ $labels['resetsearch'] = 'Anulează căutarea';
$labels['searchmod'] = 'Parametrii de căutare';
$labels['msgtext'] = 'Tot mesajul';
$labels['body'] = 'Corp';
+$labels['type'] = 'Type';
-$labels['openinextwin'] = 'Deschide într-o fereastră nouă';
+$labels['openinextwin'] = 'Deschide în fereastră nouă';
$labels['emlsave'] = 'Salvează în format .eml';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Afișează în format text';
+$labels['changeformathtml'] = 'Afișează în format HTML';
// message compose
$labels['editasnew'] = 'Editează ca nou';
$labels['send'] = 'Trimite';
$labels['sendmessage'] = 'Trimite mesaj';
-$labels['savemessage'] = 'Salvează această ciornă';
+$labels['savemessage'] = 'Salvează ciornă';
$labels['addattachment'] = 'Ataşează fişier';
$labels['charset'] = 'Set de caractere';
$labels['editortype'] = 'Tip de editor';
@@ -243,21 +247,21 @@ $labels['highest'] = 'Cea mai mare';
$labels['nosubject'] = '(fără subiect)';
$labels['showimages'] = 'Afişează imagini';
$labels['alwaysshow'] = 'Afişează întotdeauna imaginile de la $sender';
-$labels['isdraft'] = 'Acesta este un mesaj schiţă.';
+$labels['isdraft'] = 'Acest mesaj este o ciornă.';
$labels['andnmore'] = '$nr mai multe...';
$labels['togglemoreheaders'] = 'Arată mai mult din antet';
$labels['togglefullheaders'] = 'Arată mai puțin din antet';
$labels['htmltoggle'] = 'HTML';
$labels['plaintoggle'] = 'Text simplu';
-$labels['savesentmessagein'] = 'Salvează mesajele în';
+$labels['savesentmessagein'] = 'Salvează mesajele trimise în';
$labels['dontsave'] = 'Nu salva';
-$labels['maxuploadsize'] = 'Mărimea maximă admisă a fişierului este $size';
+$labels['maxuploadsize'] = 'Mărimea maxim admisă a fişierului este $size';
-$labels['addcc'] = 'Adaugă Cc';
-$labels['addbcc'] = 'Adaugă Bcc';
+$labels['addcc'] = 'Adaugă CC';
+$labels['addbcc'] = 'Adaugă BCC';
$labels['addreplyto'] = 'Adaugă Raspunde-La';
-$labels['addfollowupto'] = 'Adaugă Followup-To';
+$labels['addfollowupto'] = 'Adaugă Followup-La';
// mdn
$labels['mdnrequest'] = 'Expeditorul acestui mesaj a solicitat să fie notificat la cititrea mesajului. Doriţi să notificaţi expeditorul?';
@@ -266,7 +270,7 @@ $labels['yourmessage'] = 'Aceasta este o confirmare de primire a mesajului dumne
$labels['receiptnote'] = 'Notă: Această confirmare doar vă informează că mesajul a fost afişat pe calculatorul destinatarului. Nu există nici o garanţie că destinatarul a citit sau a inţeles conţinutul mesajului.';
// address boook
-$labels['name'] = 'Numele Contactului';
+$labels['name'] = 'Numele Contact';
$labels['firstname'] = 'Nume';
$labels['surname'] = 'Prenume';
$labels['middlename'] = 'Iniţiala tatălui';
@@ -280,11 +284,11 @@ $labels['maidenname'] = 'Nume de fată';
$labels['email'] = 'E-Mail';
$labels['phone'] = 'Telefon';
$labels['address'] = 'Adresă';
-$labels['street'] = 'Stradă';
+$labels['street'] = 'Strada';
$labels['locality'] = 'Oraș';
$labels['zipcode'] = 'Cod poştal';
$labels['region'] = 'Stat/Judeţ';
-$labels['country'] = 'Țară';
+$labels['country'] = 'Țara';
$labels['birthday'] = 'Ziua de naştere:';
$labels['anniversary'] = 'Aniversare';
$labels['website'] = 'Pagină web';
@@ -301,8 +305,8 @@ $labels['advsearch'] = 'Căutare avansată';
$labels['advanced'] = 'Avansat';
$labels['other'] = 'Altele';
-$labels['typehome'] = 'Pagina Principală';
-$labels['typework'] = 'Servici';
+$labels['typehome'] = 'Acasă';
+$labels['typework'] = 'Serviciu';
$labels['typeother'] = 'Altele';
$labels['typemobile'] = 'Mobil';
$labels['typemain'] = 'Principal';
@@ -317,7 +321,7 @@ $labels['typeblog'] = 'Blog';
$labels['typeprofile'] = 'Profil';
$labels['addfield'] = 'Adaugă câmp...';
-$labels['addcontact'] = 'Adaugă contactul selectat în agendă';
+$labels['addcontact'] = 'Adaugă contact nou';
$labels['editcontact'] = 'Modifică contact';
$labels['contacts'] = 'Contacte';
$labels['contactproperties'] = 'Proprietăţile contactului...';
@@ -330,7 +334,7 @@ $labels['delete'] = 'Şterge';
$labels['rename'] = 'Redenumeşte';
$labels['addphoto'] = 'Adaugă';
$labels['replacephoto'] = 'Înlocuiește';
-$labels['uploadphoto'] = 'Încarcă poya';
+$labels['uploadphoto'] = 'Încarcă imagine';
$labels['newcontact'] = 'Creează contact nou';
$labels['deletecontact'] = 'Şterge contactul selectat';
@@ -347,12 +351,13 @@ $labels['groupdelete'] = 'Șterge grupul';
$labels['groupremoveselected'] = 'Șterge contactele selectate din grup';
$labels['previouspage'] = 'Pagina anterioară';
-$labels['firstpage'] = 'Arată primul set';
+$labels['firstpage'] = 'Prima pagină';
$labels['nextpage'] = 'Pagina următoare';
-$labels['lastpage'] = 'Arată ultimul set';
+$labels['lastpage'] = 'Ultima pagină';
$labels['group'] = 'Grup';
$labels['groups'] = 'Grupuri';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Adrese personale';
$labels['searchsave'] = 'Salvează căutarea';
@@ -363,7 +368,7 @@ $labels['importcontacts'] = 'Importă contacte';
$labels['importfromfile'] = 'Importă din fişier:';
$labels['importtarget'] = 'Adaugă contactele noi în agenda:';
$labels['importreplace'] = 'Înlocuieşte întreaga agendă';
-$labels['importdesc'] = 'Puteți încărcat contacte dintr-o agendă existentă.<br/>Momentan este suportat importul în formatul <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> sau în formatul CSV (comma-separated).';
+$labels['importdesc'] = 'Puteți încărca contacte dintr-o agendă existentă.<br/>Momentan este suportat importul în formatul <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> sau în formatul CSV (comma-separated).';
$labels['done'] = 'Finalizat';
// settings
@@ -394,13 +399,14 @@ $labels['language'] = 'Limba';
$labels['timezone'] = 'Fus orar';
$labels['pagesize'] = 'Rânduri pe pagină';
$labels['signature'] = 'Semnătură';
-$labels['dstactive'] = 'Reglare automată oră de vară';
+$labels['dstactive'] = 'Reglare ora de vară';
$labels['showinextwin'] = 'Deschide mesajul în fereastră nouă';
$labels['composeextwin'] = 'Compune mesajul în fereastră nouă';
$labels['htmleditor'] = 'Scrie mesaje HTML';
$labels['htmlonreply'] = 'la răspunsul doar către un mesaj HTML';
$labels['htmlonreplyandforward'] = 'la trimitere mai departe sau la răspuns la mesaj HTML';
$labels['htmlsignature'] = 'Semnatură HTML';
+$labels['showemail'] = 'Arată adresa email alături de nume afișat';
$labels['previewpane'] = 'Previzualizare mail';
$labels['skin'] = 'Temă interfaţă';
$labels['logoutclear'] = 'Goleşte Coşul de Gunoi la deconectare';
@@ -409,15 +415,15 @@ $labels['uisettings'] = 'Interfaţă utilizator';
$labels['serversettings'] = 'Configuraţii server';
$labels['mailboxview'] = 'Afişare căsuţă poştală';
$labels['mdnrequests'] = 'Notificări expeditor';
-$labels['askuser'] = 'întreabă utilizatorul';
+$labels['askuser'] = 'întreabă-mă';
$labels['autosend'] = 'trimite automat';
$labels['autosendknown'] = 'trimite confirmarea de primire către contactele mele, în rest întreabă-mă';
$labels['autosendknownignore'] = 'trimite confirmarea de primire către contactele mele, în rest ignoră';
$labels['ignore'] = 'ignoră';
-$labels['readwhendeleted'] = 'Marchează mesajul ca şi citit la ştergere';
+$labels['readwhendeleted'] = 'Marchează mesajul ca citit la ştergere';
$labels['flagfordeletion'] = 'Marchează mesajul pentru ştergere în loc de a-l şterge direct';
$labels['skipdeleted'] = 'Nu arăta mesajele şterse';
-$labels['deletealways'] = 'Dacă mutarea mesajelor în coş eşuează, se vor şterge';
+$labels['deletealways'] = 'Dacă mutarea mesajelor în Coş eşuează, șterge-le';
$labels['deletejunk'] = 'Șterge direct mesajele în Junk';
$labels['showremoteimages'] = 'Arată imaginile care nu fac parte din e-mail';
$labels['fromknownsenders'] = 'de la expeditori cunoscuţi';
@@ -441,7 +447,7 @@ $labels['checkallfolders'] = 'Verifică toate dosarele pentru mesaje noi';
$labels['displaynext'] = 'După ştergerea sau mutarea unui mesaj afişează-l pe următorul din listă';
$labels['defaultfont'] = 'Font-ul implicit al mesajului HTML';
$labels['mainoptions'] = 'Opţiuni principale';
-$labels['browseroptions'] = 'Optiuni browser';
+$labels['browseroptions'] = 'Opțiuni browser';
$labels['section'] = 'Secţiune';
$labels['maintenance'] = 'Mentenanţă';
$labels['newmessage'] = 'Mesaj nou';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Când răspundeţi, se şterge semnătura ori
$labels['autoaddsignature'] = 'Adăugarea automată a semnăturii';
$labels['newmessageonly'] = 'numai la mesajele noi';
$labels['replyandforwardonly'] = 'numai la răspunsuri si cele trimise mai departe';
-$labels['replysignaturepos'] = 'Când răspundeţi sau trimiteţi mai departe, semnătura se va plasa';
-$labels['belowquote'] = 'dedesubtul citatului';
-$labels['abovequote'] = 'deasupra citatului';
$labels['insertsignature'] = 'Introduce o semnătură';
$labels['previewpanemarkread'] = 'Marchează mesajele previzualizate ca citite';
$labels['afternseconds'] = 'după $n secunde';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignoră cuvintele cu numere';
$labels['spellcheckignorecaps'] = 'Ignoră cuvintele din litere mari';
$labels['addtodict'] = 'Adaugă la dicţionar';
$labels['mailtoprotohandler'] = 'Îregistrează handler protocol pentru mailto: link-uri';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Trimitere mai departe mesaj';
$labels['inline'] = 'într-e linii';
$labels['asattachment'] = 'ca atașament';
diff --git a/program/localization/ro_RO/messages.inc b/program/localization/ro_RO/messages.inc
index 68d1ab6a7..96b9de593 100644
--- a/program/localization/ro_RO/messages.inc
+++ b/program/localization/ro_RO/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Eroare bază de date!';
$messages['requesttimedout'] = 'Timpul alocat cereri a expirat';
$messages['errorreadonly'] = 'Nu se poate efectua operaţia. Dosarul este doar-citire.';
$messages['errornoperm'] = 'Nu se poate efectua operaţia. Acces interzis.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Solicitare invalidă! Datele nu au fost salvate.';
$messages['invalidhost'] = 'Hosname invalid';
$messages['nomessagesfound'] = 'Nu a fost găsit nici un mesaj în această căsuţă poştală';
diff --git a/program/localization/ru_RU/labels.inc b/program/localization/ru_RU/labels.inc
index 6b6d0c6bd..d2b8e75c4 100644
--- a/program/localization/ru_RU/labels.inc
+++ b/program/localization/ru_RU/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Черновики';
$labels['sent'] = 'Отправленные';
$labels['trash'] = 'Корзина';
$labels['junk'] = 'СПАМ';
+$labels['show_real_foldernames'] = 'Показывать настоящие названия специальных папок';
// message listing
$labels['subject'] = 'Тема';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Текущая страница';
$labels['unread'] = 'Непрочитанные';
$labels['flagged'] = 'Помеченные';
$labels['unanswered'] = 'Неотвеченные';
+$labels['withattachment'] = 'С вложением';
$labels['deleted'] = 'Удаленное';
$labels['undeleted'] = 'Не удалено';
$labels['invert'] = 'Инвертное';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Режим просмотра';
$labels['folderactions'] = 'Операции над папкой...';
$labels['compact'] = 'Сжать';
$labels['empty'] = 'Опустошить';
+$labels['importmessages'] = 'Импорт сообщений';
$labels['quota'] = 'Квота';
$labels['unknown'] = 'неизвестно';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Сброс';
$labels['searchmod'] = 'Варианты поиска';
$labels['msgtext'] = 'Всё сообщение';
$labels['body'] = 'Тело письма';
+$labels['type'] = 'Тип';
$labels['openinextwin'] = 'Открыть в новом окне';
$labels['emlsave'] = 'Сохранить (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Показать последнюю страниц
$labels['group'] = 'Группа';
$labels['groups'] = 'Группы';
+$labels['listgroup'] = 'Список членов группы';
$labels['personaladrbook'] = 'Персональные адреса';
$labels['searchsave'] = 'Сохранить запрос';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Создавать сообщения в HTML';
$labels['htmlonreply'] = 'только в ответ на сообщение в HTML';
$labels['htmlonreplyandforward'] = 'при пересылке или ответе на HTML сообщение';
$labels['htmlsignature'] = 'Подпись в HTML';
+$labels['showemail'] = 'Показывать адрес электронной почты и имя адресата';
$labels['previewpane'] = 'Показать панель превью';
$labels['skin'] = 'Стиль оформления';
$labels['logoutclear'] = 'Очищать корзину при выходе';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Удалить подпись при отве
$labels['autoaddsignature'] = 'Автоматически добавлять подпись';
$labels['newmessageonly'] = 'только в новых сообщениях';
$labels['replyandforwardonly'] = 'только в ответах и пересылках';
-$labels['replysignaturepos'] = 'Прикрепить подпись при ответе и пересылке';
-$labels['belowquote'] = 'после цитаты';
-$labels['abovequote'] = 'до цитаты';
$labels['insertsignature'] = 'Вставить подпись';
$labels['previewpanemarkread'] = 'Отмечать просмотренные сообщения как прочитанные';
$labels['afternseconds'] = 'через $n секунд';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Пропускать слова с цифра
$labels['spellcheckignorecaps'] = 'Пропускать слова из прописных букв';
$labels['addtodict'] = 'Добавить в словарь';
$labels['mailtoprotohandler'] = 'Зарегистрировать обработчик для ссылок mailto:';
+$labels['standardwindows'] = 'Обрабатывать всплывающие окна как обычные';
$labels['forwardmode'] = 'Пересылка сообщений';
$labels['inline'] = 'в тексте';
$labels['asattachment'] = 'как вложение';
diff --git a/program/localization/ru_RU/messages.inc b/program/localization/ru_RU/messages.inc
index 0693887c0..f9c8c433a 100644
--- a/program/localization/ru_RU/messages.inc
+++ b/program/localization/ru_RU/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Ошибка базы данных!';
$messages['requesttimedout'] = 'Превышено время ожидания запроса';
$messages['errorreadonly'] = 'Невозможно выполнить операцию. Папка доступна только для чтения';
$messages['errornoperm'] = 'Невозможно выполнить операцию. Доступ запрещён';
+$messages['erroroverquota'] = 'Невозможно выполнить операцию. Нет свободного места на диске.';
+$messages['erroroverquotadelete'] = 'Нет свободного места на диске. Используйте SHIFT+DEL для удаления сообщения.';
$messages['invalidrequest'] = 'Неверный запрос! Информация не сохранена.';
$messages['invalidhost'] = 'Неверное имя сервера.';
$messages['nomessagesfound'] = 'Сообщений не найдено';
diff --git a/program/localization/si_LK/labels.inc b/program/localization/si_LK/labels.inc
index eddc01b57..92d33d3b7 100644
--- a/program/localization/si_LK/labels.inc
+++ b/program/localization/si_LK/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'කටු සටහන්';
$labels['sent'] = 'යැවූ';
$labels['trash'] = 'ඉවතලන බඳුන';
$labels['junk'] = 'සුන්බුන්';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'මාතෘකාව';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'දැනට ඇති පිටුව';
$labels['unread'] = 'නොකියවූ';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'මකා දැමූ';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'බහාලුම් ක්‍රියා...';
$labels['compact'] = 'සංයුක්ත';
$labels['empty'] = 'හිස්';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Disk usage';
$labels['unknown'] = 'නොදනී';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'සෙවුම යලි පිහිටවීම';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'සම්පූර්ණ පණිවිඩය';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'නව කවුළුවක විවෘත කරන්න';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'අවසාන පිටුව පෙන්වන
$labels['group'] = 'කණ්ඩායම';
$labels['groups'] = 'කණ්ඩායම්';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'පුද්ගලික ලිපිනය';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML පණිවිඩයක් සෑදීම';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML අත්සන';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'පූර්වදර්ශන කොටස පෙන්නන්න';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'ස්වයංක්‍රීයව අත්සන ඇතුලත් කරන්න';
$labels['newmessageonly'] = 'අලුත් පණිවිඩය පමණක්';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'අත්සන ඇතුලත් කරන්න';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'තත්පර $nකට පසු';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'අංක සහිත වචන නොසල
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'ශබ්ද කෝෂයට එක් කරන්න';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/si_LK/messages.inc b/program/localization/si_LK/messages.inc
index b8ecab335..c3828bc64 100644
--- a/program/localization/si_LK/messages.inc
+++ b/program/localization/si_LK/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'දත්ත ගබඩාවේ දෝෂය!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'ලියුම් පෙට්ටියේ පනිවුඩ නැත';
diff --git a/program/localization/sk_SK/labels.inc b/program/localization/sk_SK/labels.inc
index 7b993e77a..465252409 100644
--- a/program/localization/sk_SK/labels.inc
+++ b/program/localization/sk_SK/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Rozpísané';
$labels['sent'] = 'Odoslané';
$labels['trash'] = 'Kôš';
$labels['junk'] = 'Nevyžiadaná pošta';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Predmet';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Aktuálna stránka';
$labels['unread'] = 'Neprečítané';
$labels['flagged'] = 'Označené';
$labels['unanswered'] = 'Neoznačené';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Zmazané';
$labels['undeleted'] = 'Nevymazané';
$labels['invert'] = 'Prevrátiť';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Režim zobrazenia zoznamu';
$labels['folderactions'] = 'Akcie so zložkou...';
$labels['compact'] = 'Zhustiť priečinok';
$labels['empty'] = 'Vyprázdniť';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Zaplnenie schránky';
$labels['unknown'] = 'neznáme';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Vyčistiť vyhľadávanie';
$labels['searchmod'] = 'Parametre hľadanie';
$labels['msgtext'] = 'Celá správa';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Otvoriť v novom okne';
$labels['emlsave'] = 'Stiahnuť';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Posledná stránka';
$labels['group'] = 'Skupina';
$labels['groups'] = 'Skupiny';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Osobné adresy';
$labels['searchsave'] = 'Uložiť vyhľadávanie';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Vytvoriť HTML správu';
$labels['htmlonreply'] = 'len v odpovedi na HTML správy';
$labels['htmlonreplyandforward'] = 'pri preposielaní alebo odpovedi na HTML správu';
$labels['htmlsignature'] = 'HTML podpis';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Ukázať náhľad';
$labels['skin'] = 'Vzhľad';
$labels['logoutclear'] = 'Vyprázdniť kôš pri odhlásení';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Pri odpovedaní odstrániť zo správy pôvod
$labels['autoaddsignature'] = 'Automaticky pridať podpis';
$labels['newmessageonly'] = 'iba k novým správam';
$labels['replyandforwardonly'] = 'len k odpovede a preposílanej správe';
-$labels['replysignaturepos'] = 'Pri odpovedaní alebo preposielanie správy vložiť podpis';
-$labels['belowquote'] = 'nad citáciu';
-$labels['abovequote'] = 'pod citáciu';
$labels['insertsignature'] = 'Vložit podpis';
$labels['previewpanemarkread'] = 'Označiť zobrazenej správy ako prečítané';
$labels['afternseconds'] = 'po $n sekundách';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorovať slová s číslami';
$labels['spellcheckignorecaps'] = 'Ignorovať slová písané veľkými písmenami';
$labels['addtodict'] = 'Pridať do slovníka';
$labels['mailtoprotohandler'] = 'Zaregistrovať handler pre odkazy „mailto:“';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Preposielanie správ';
$labels['inline'] = 'v tele spávy';
$labels['asattachment'] = 'ako príloha';
diff --git a/program/localization/sk_SK/messages.inc b/program/localization/sk_SK/messages.inc
index f0ee82978..a6f319db6 100644
--- a/program/localization/sk_SK/messages.inc
+++ b/program/localization/sk_SK/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Databázová chyba!';
$messages['requesttimedout'] = 'Čas požiadavky vypršal';
$messages['errorreadonly'] = 'Nemožno vykonať operáciu. Adresár je len na čítanie';
$messages['errornoperm'] = 'Nemožno vykonať operáciu. Prístup odmietnutý';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Chybný požiadavek. Žiadne údaje neboli uložené.';
$messages['invalidhost'] = 'Neplatný názov servera';
$messages['nomessagesfound'] = 'Vo Vašej schránke nie je žiadna správa';
diff --git a/program/localization/sl_SI/labels.inc b/program/localization/sl_SI/labels.inc
index 70150e4d9..c33ea479c 100644
--- a/program/localization/sl_SI/labels.inc
+++ b/program/localization/sl_SI/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Osnutki';
$labels['sent'] = 'Poslano';
$labels['trash'] = 'Smeti';
$labels['junk'] = 'Nezaželena sporočila';
+$labels['show_real_foldernames'] = 'Prikaži prava imena za posebne mape';
// message listing
$labels['subject'] = 'Zadeva';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Trenutna stran';
$labels['unread'] = 'Neprebrano';
$labels['flagged'] = 'Označeno';
$labels['unanswered'] = 'Neoznačeno';
+$labels['withattachment'] = 'S priponko';
$labels['deleted'] = 'Izbrisano';
$labels['undeleted'] = 'Ni izbrisano';
$labels['invert'] = 'Zamenjaj';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Način prikaza seznama';
$labels['folderactions'] = 'Upravljanje map...';
$labels['compact'] = 'Stisni';
$labels['empty'] = 'Izprazni';
+$labels['importmessages'] = 'Uvozi sporočila';
$labels['quota'] = 'Poraba prostora';
$labels['unknown'] = 'neznana';
@@ -202,11 +205,12 @@ $labels['resetsearch'] = 'Prekliči iskanje';
$labels['searchmod'] = 'Spremembe iskanja';
$labels['msgtext'] = 'Celotno sporočilo';
$labels['body'] = 'Vsebina sporočila';
+$labels['type'] = 'Tip';
$labels['openinextwin'] = 'Odpri v novem oknu';
$labels['emlsave'] = 'Prenos datoteke (.eml)';
-$labels['changeformattext'] = 'Display in plain text format';
-$labels['changeformathtml'] = 'Display in HTML format';
+$labels['changeformattext'] = 'Prikaži kot golo besedilo';
+$labels['changeformathtml'] = 'Prikaži v formatu HTML';
// message compose
$labels['editasnew'] = 'Uredi kot novo';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Zadnja stran';
$labels['group'] = 'Skupina';
$labels['groups'] = 'Skupine';
+$labels['listgroup'] = 'Izpiši seznam članov skupine';
$labels['personaladrbook'] = 'Stiki';
$labels['searchsave'] = 'Shrani iskanje';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Sestavi sporočila z obogatenim besedilom';
$labels['htmlonreply'] = 'le pri odgovoru na sporočila z obogatenim besedilom';
$labels['htmlonreplyandforward'] = 'le pri posredovanju ali odgovoru na sporočila z obogatenim besedilom';
$labels['htmlsignature'] = 'Podpis z obogatenim besedilom';
+$labels['showemail'] = 'Prikaži e-naslove poleg imen';
$labels['previewpane'] = 'Prikaži predogled';
$labels['skin'] = 'Tema uporabniškega vmesnika';
$labels['logoutclear'] = 'Izprazni mapo Smeti ob odjavi';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Pri odgovoru na sporočilo odstrani izvorni p
$labels['autoaddsignature'] = 'Samodejno dodaj podpis';
$labels['newmessageonly'] = 'samo novim sporočilom';
$labels['replyandforwardonly'] = 'samo k odgovorom in posredovanim sporočilom';
-$labels['replysignaturepos'] = 'Pri odgovoru ali posredovanju sporočila vstavi podpis';
-$labels['belowquote'] = 'pod citiran tekst';
-$labels['abovequote'] = 'nad citiran tekst';
$labels['insertsignature'] = 'Vstavi podpis';
$labels['previewpanemarkread'] = 'Označi predogledana sporočila kot prebrana';
$labels['afternseconds'] = 'po $n sekundah';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ne upoštevaj besed, ki vsebujejo številke';
$labels['spellcheckignorecaps'] = 'Ne upoštevaj besed, ki vsebujejo samo velike črke';
$labels['addtodict'] = 'Dodaj v slovar';
$labels['mailtoprotohandler'] = 'Registriraj upravljavca protokola za e-naslov: povezave';
+$labels['standardwindows'] = 'Prikaži pojavna okna kot običajna';
$labels['forwardmode'] = 'Posredovanje sporočil';
$labels['inline'] = 'medvrstično';
$labels['asattachment'] = 'Kot priponka';
diff --git a/program/localization/sl_SI/messages.inc b/program/localization/sl_SI/messages.inc
index 3fd113b0d..dc731d01b 100644
--- a/program/localization/sl_SI/messages.inc
+++ b/program/localization/sl_SI/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Napaka v bazi';
$messages['requesttimedout'] = 'Zahteva je potekla';
$messages['errorreadonly'] = 'Operacije ni bilo mogoče izvršiti. Mapa je na voljo samo za branje.';
$messages['errornoperm'] = 'Operacije ni bilo mogoče izvršiti. Dostop zavrnjen.';
+$messages['erroroverquota'] = 'Operacije ni mogoče izvršiti. Diskovni prostor je zaseden.';
+$messages['erroroverquotadelete'] = 'Zmanjkalo je diskovnega prostora. Za izbris sporočila porabite tipki SHIFT+DEL.';
$messages['invalidrequest'] = 'Neveljavna zahteva. Podatki niso bili shranjeni.';
$messages['invalidhost'] = 'Nepravilno ime strežnika';
$messages['nomessagesfound'] = 'V poštnem predalu ni sporočil.';
@@ -119,11 +121,13 @@ $messages['selectimportfile'] = 'Izberite datoteko, ki jo želite prenesti';
$messages['addresswriterror'] = 'Izbran imenik ni zapisljiv';
$messages['contactaddedtogroup'] = 'Stik je bil uspešno dodan v skupino';
$messages['contactremovedfromgroup'] = 'Stik je bil uspešno izbrisan iz skupine';
-$messages['nogroupassignmentschanged'] = 'No group assignments changed.';
+$messages['nogroupassignmentschanged'] = 'Dodeljevanje skupini ni bilo spremenjeno.';
$messages['importwait'] = 'Uvažanje poteka...';
$messages['importformaterror'] = 'Uvoz ni uspel! Uvožena datoteka ni pravega formata.';
$messages['importconfirm'] = '<b>Uspešno uvoženi $inserted stiki, $skipped stikov že obstaja v imeniku</b>:<p><em>$names</em></p>';
$messages['importconfirmskipped'] = '<b>Preskočeni že obstoječi vnosi $skipped </b>';
+$messages['importmessagesuccess'] = 'Upešno ste uvozili $nr sporočil.';
+$messages['importmessageerror'] = 'Uvoz je spodletel. Naložena datoteka ni veljavno sporočilo ali poštna datoteka';
$messages['opnotpermitted'] = 'Operacija ni dovoljena.';
$messages['nofromaddress'] = 'V izbrani identiteti manjka elektronski naslov.';
$messages['editorwarning'] = 'Preklop v splošen urejevalnik onemogoča uporabo izbranih nastavitev oblikovanja. Želite nadaljevati?';
@@ -163,7 +167,7 @@ $messages['invalidimageformat'] = 'Neveljaven format slike';
$messages['mispellingsfound'] = 'V sporočilu so bile najdene napake v črkovanju';
$messages['parentnotwritable'] = 'Podmape v tej mapi ni bilo mogoče ustvariti/premakniti. Nimate pravic.';
$messages['messagetoobig'] = 'Sporočilo je preveliko za obdelavo.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
+$messages['attachmentvalidationerror'] = 'OPOZORILO! Priponka vsebuje sumljivo vsebino, saj tip priponke ne ustreza tipu, določenemu v sporočilu. Če ne zaupate pošiljatelju, priponke v brskalniku ne odpirajte, saj lahko vsebuje zlonamerno vsebino. <br/><br/><em>Pričakovano: $expected; Najdeno: $detected</em>';
$messages['noscriptwarning'] = 'Opozorilo: Ta spletna stran zahteva Javascript! Za uporabo jo vključite v nastavitvah vašega brskalnika.';
?>
diff --git a/program/localization/sq_AL/labels.inc b/program/localization/sq_AL/labels.inc
index 52ff45cd6..e2cb6791b 100644
--- a/program/localization/sq_AL/labels.inc
+++ b/program/localization/sq_AL/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Drafte';
$labels['sent'] = 'Dërguar';
$labels['trash'] = 'Fshirë';
$labels['junk'] = 'Reklama';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Tema';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'Palexuar';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Deleted';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Zvogëlo';
$labels['empty'] = 'Boshatis';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Përdorimi i diskut';
$labels['unknown'] = 'i panjohur';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Pastro kërkimin';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Shfaq grupin e fundit';
$labels['group'] = 'Group';
$labels['groups'] = 'Grupet';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Adresat Personale';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Shkruaj mesazhe HTML';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'Nënshkrimi HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Shiko si duket';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'Automatically add signature';
$labels['newmessageonly'] = 'new message only';
$labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'Insert signature';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/sq_AL/messages.inc b/program/localization/sq_AL/messages.inc
index 46e7197e0..56bb9feb2 100644
--- a/program/localization/sq_AL/messages.inc
+++ b/program/localization/sq_AL/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'Nuk ka mesazhe në këtë kuti postare';
diff --git a/program/localization/sr_CS/labels.inc b/program/localization/sr_CS/labels.inc
index 1e84735e6..4bdf25020 100644
--- a/program/localization/sr_CS/labels.inc
+++ b/program/localization/sr_CS/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'U pripremi';
$labels['sent'] = 'Послате';
$labels['trash'] = 'Канта';
$labels['junk'] = 'Смеће';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Наслов';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Тренутна страница';
$labels['unread'] = 'Непрочитане';
$labels['flagged'] = 'Означено';
$labels['unanswered'] = 'Неодговорено';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Обрисано';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'Уведи';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Лист режим приказивања';
$labels['folderactions'] = 'Поставке фасцикле';
$labels['compact'] = 'Компакција';
$labels['empty'] = 'Испразни';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Квота';
$labels['unknown'] = 'непозната';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Прикажи све поруке';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Цела порука';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Отвори у новом прозору';
$labels['emlsave'] = 'Довнлоад (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Прикажи последњи скуп';
$labels['group'] = 'Група';
$labels['groups'] = 'Групе';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Личне адресе';
$labels['searchsave'] = 'Сачувај претрагу';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Састави HTML поруке';
$labels['htmlonreply'] = 'само при одговору на HTML поруку';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML потпис';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Прикажи панел за преглед';
$labels['skin'] = 'Интерфејс';
$labels['logoutclear'] = 'Избриши смеће при логовању';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'При одговору одстрани ор
$labels['autoaddsignature'] = 'Аутоматски додај потпис';
$labels['newmessageonly'] = 'само нове поруке';
$labels['replyandforwardonly'] = 'само одговори и прослеђивања';
-$labels['replysignaturepos'] = 'При одговору или прослеђивању додај потпис';
-$labels['belowquote'] = 'испод квоте';
-$labels['abovequote'] = 'изнад квоте';
$labels['insertsignature'] = 'Убаци потпис';
$labels['previewpanemarkread'] = 'Прегледану поруку означи као прочитану';
$labels['afternseconds'] = 'након $n секунди';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'игнориши речи са бројев
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Додај у речник';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/sr_CS/messages.inc b/program/localization/sr_CS/messages.inc
index 7ffbbd34a..32007e6f2 100644
--- a/program/localization/sr_CS/messages.inc
+++ b/program/localization/sr_CS/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Грешка у бази података!';
$messages['requesttimedout'] = 'Захтев је истекао';
$messages['errorreadonly'] = 'Не може да изврши операцију. Фасцикла се може само читати.';
$messages['errornoperm'] = 'Извршење операције није могуће. Одбијен захтев за дозволу.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Погрешан захтев! Подаци нису сачувани.';
$messages['invalidhost'] = 'Погрешно име сервера.';
$messages['nomessagesfound'] = 'Немате порука у сандучету.';
diff --git a/program/localization/sv_SE/labels.inc b/program/localization/sv_SE/labels.inc
index c1a91cf82..7169aeba8 100644
--- a/program/localization/sv_SE/labels.inc
+++ b/program/localization/sv_SE/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Utkast';
$labels['sent'] = 'Skickat';
$labels['trash'] = 'Papperskorg';
$labels['junk'] = 'Skräp';
+$labels['show_real_foldernames'] = 'Visa verkliga namn på särskilda kataloger';
// message listing
$labels['subject'] = 'Ämne';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Sida';
$labels['unread'] = 'Olästa';
$labels['flagged'] = 'Flaggade';
$labels['unanswered'] = 'Obesvarade';
+$labels['withattachment'] = 'Med bilaga';
$labels['deleted'] = 'Borttagna';
$labels['undeleted'] = 'Inte borttaget';
$labels['invert'] = 'Invertera';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Visningsläge';
$labels['folderactions'] = 'Hantera kataloger';
$labels['compact'] = 'Packa';
$labels['empty'] = 'Töm';
+$labels['importmessages'] = 'Importera meddelanden';
$labels['quota'] = 'Diskutrymme';
$labels['unknown'] = 'okänt';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Återställ sökning';
$labels['searchmod'] = 'Sökalternativ';
$labels['msgtext'] = 'Hela meddelandet';
$labels['body'] = 'Innehåll';
+$labels['type'] = 'Typ';
$labels['openinextwin'] = 'Öppna i nytt fönster';
$labels['emlsave'] = 'Spara (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Visa sista sidan';
$labels['group'] = 'Grupp';
$labels['groups'] = 'Kontaktgrupper';
+$labels['listgroup'] = 'Visa gruppmedlemmar';
$labels['personaladrbook'] = 'Personliga adresser';
$labels['searchsave'] = 'Lägg till sökning';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Skriv meddelanden i HTML-format';
$labels['htmlonreply'] = 'Endast vid svar på meddelande i HTML-format';
$labels['htmlonreplyandforward'] = 'Vid svar på eller vidarebefordran av meddelande i HTML-format';
$labels['htmlsignature'] = 'HTML-signatur';
+$labels['showemail'] = 'Visa namn och adress';
$labels['previewpane'] = 'Visa meddelandefältet';
$labels['skin'] = 'Stilmall för användargränssnitt';
$labels['logoutclear'] = 'Töm papperskorgen vid utloggning';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Ta bort befintlig signatur från meddelandet
$labels['autoaddsignature'] = 'Infoga signatur automatiskt';
$labels['newmessageonly'] = 'Vid nytt meddelande';
$labels['replyandforwardonly'] = 'Vid svar och vidarebefordran';
-$labels['replysignaturepos'] = 'Vid svar eller vidarebefordran infoga signatur';
-$labels['belowquote'] = 'Nedanför befintligt meddelande';
-$labels['abovequote'] = 'Ovanför befintligt meddelande';
$labels['insertsignature'] = 'Infoga signatur';
$labels['previewpanemarkread'] = 'Märk meddelande som läst vid visning';
$labels['afternseconds'] = 'Efter $n sekunder';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignorera ord med siffror';
$labels['spellcheckignorecaps'] = 'Ignorera ord med enbart stora bokstäver';
$labels['addtodict'] = 'Lägg till i ordlista';
$labels['mailtoprotohandler'] = 'Ange program för hantering av mailto-länkar';
+$labels['standardwindows'] = 'Hantera popup-rutor som standardfönster';
$labels['forwardmode'] = 'Vidarebefordra meddelande';
$labels['inline'] = 'Infogat';
$labels['asattachment'] = 'Bilaga';
diff --git a/program/localization/sv_SE/messages.inc b/program/localization/sv_SE/messages.inc
index 65ee6827d..63dddc548 100644
--- a/program/localization/sv_SE/messages.inc
+++ b/program/localization/sv_SE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Databasfel!';
$messages['requesttimedout'] = 'Begäran tog för lång tid';
$messages['errorreadonly'] = 'Åtgärden kunde inte utföras. Katalogen är skrivskyddad';
$messages['errornoperm'] = 'Åtgärden kunde inte utföras. Otillräcklig befogenhet';
+$messages['erroroverquota'] = 'Åtgärden kunde inte utföras. Otillräckligt lagringsutrymme.';
+$messages['erroroverquotadelete'] = 'Otillräckligt lagringsutrymme. Tryck på SHIFT och DEL för att ta bort ett meddelande.';
$messages['invalidrequest'] = 'Ogiltig begäran! Informationen sparades inte.';
$messages['invalidhost'] = 'Ogiltigt servernamn.';
$messages['nomessagesfound'] = 'Inga meddelanden';
diff --git a/program/localization/ta_IN/labels.inc b/program/localization/ta_IN/labels.inc
index 1cbffb588..197e80606 100644
--- a/program/localization/ta_IN/labels.inc
+++ b/program/localization/ta_IN/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'வரைவுகள்';
$labels['sent'] = 'அனுப்பிய அஞ்சல்';
$labels['trash'] = 'குப்பை';
$labels['junk'] = 'எரிதம்';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'தலைப்பு';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Current page';
$labels['unread'] = 'படிக்காதது';
$labels['flagged'] = 'நட்சத்திரமிட்டது';
$labels['unanswered'] = 'பதிலளிக்காதது';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'நீக்கியது';
$labels['undeleted'] = 'Not deleted';
$labels['invert'] = 'தலைகீழ்';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'குறுகிய';
$labels['empty'] = 'காலி';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'பயன்பாட்டு அளவு';
$labels['unknown'] = 'தெரியாத';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'தேடலை மறுஅமை';
$labels['searchmod'] = 'மாற்றிகளை தேடு';
$labels['msgtext'] = 'முழு செய்தி';
$labels['body'] = 'Body';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'புது சாளரத்தில் திற';
$labels['emlsave'] = 'பதிவிறக்கு (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'கடைசி குழுவை காட்ட
$labels['group'] = 'Group';
$labels['groups'] = 'குழுக்கள்';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'சுய முகவரி';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML செய்திகளை எழுது';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'HTML கையொப்பம்';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'முந்திய பாத்தியை காட்டு';
$labels['skin'] = 'முகப்பு தோற்றம்';
$labels['logoutclear'] = 'வெளியேறும் போது குப்பையை காலி செய்';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'பதிலளிக்கும் பே
$labels['autoaddsignature'] = 'தானாக கையொப்பத்தை சேர்';
$labels['newmessageonly'] = 'புது செய்தி மட்டும்';
$labels['replyandforwardonly'] = 'பதிலளிப்பு முன்அனுப்பு மட்டும்';
-$labels['replysignaturepos'] = 'பதிலளிக்கும் போதும் முன்அனுப்பும் போதும் கையோப்பமிடு';
-$labels['belowquote'] = 'மேற்கோளுக்கு கீழே';
-$labels['abovequote'] = 'மேற்கோளுக்கு மேலே';
$labels['insertsignature'] = 'கையோப்பமிடு';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
diff --git a/program/localization/ta_IN/messages.inc b/program/localization/ta_IN/messages.inc
index c06765435..65e611f88 100644
--- a/program/localization/ta_IN/messages.inc
+++ b/program/localization/ta_IN/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'செல்லாத வேண்டுகோள்! எந்த தரவும் சேமிக்கப்படவில்லை.';
$messages['invalidhost'] = 'Invalid server name.';
$messages['nomessagesfound'] = 'இந்த தபால் பெட்டியில் எந்த தரவும் சேமிக்கப்படவில்லை';
diff --git a/program/localization/th_TH/labels.inc b/program/localization/th_TH/labels.inc
index 93f2304e1..85b091e5b 100644
--- a/program/localization/th_TH/labels.inc
+++ b/program/localization/th_TH/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'กล่องจดหมายร่าง';
$labels['sent'] = 'กล่องขาออก';
$labels['trash'] = 'ถังขยะ';
$labels['junk'] = 'กล่องจดหมายขยะ';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'หัวจดหมาย';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'หน้าปัจจุบัน';
$labels['unread'] = 'จดหมายที่ไม่ได้อ่าน';
$labels['flagged'] = 'Flagged';
$labels['unanswered'] = 'ยังไม่ได้ตอบ';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'ลบแล้ว';
$labels['undeleted'] = 'ยังไม่ได้ลบ';
$labels['invert'] = 'Invert';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'List view mode';
$labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'แบบย่อ';
$labels['empty'] = 'ว่างเปล่า';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'พื้นที่ใช้งาน';
$labels['unknown'] = 'ไม่ทราบ';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'ล้างการค้นหา';
$labels['searchmod'] = 'Search modifiers';
$labels['msgtext'] = 'Entire message';
$labels['body'] = 'เนื้อหา';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Open in new window';
$labels['emlsave'] = 'Download (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Show last page';
$labels['group'] = 'Group';
$labels['groups'] = 'Groups';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Personal Addresses';
$labels['searchsave'] = 'Save search';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'เขียนจดหมายแบบ HTML';
$labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = 'ลายมือชื่อแบบ HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'แสดงหน้าต่างตัวอย่างแสดงผล';
$labels['skin'] = 'Interface skin';
$labels['logoutclear'] = 'Clear Trash on logout';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
$labels['autoaddsignature'] = 'เพิ่มลายเซ็นต์เข้าไปอัตโนมัติ';
$labels['newmessageonly'] = 'เฉพาะข้อความใหม่เท่านั้น';
$labels['replyandforwardonly'] = 'ตอบกลับและส่งต่อเท่านั้น';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
$labels['insertsignature'] = 'แทรกลายเซ็นต์';
$labels['previewpanemarkread'] = 'Mark previewed messages as read';
$labels['afternseconds'] = 'after $n seconds';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ignore words with numbers';
$labels['spellcheckignorecaps'] = 'Ignore words with all letters capitalized';
$labels['addtodict'] = 'Add to dictionary';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'เป็นไฟล์แนบ';
diff --git a/program/localization/th_TH/messages.inc b/program/localization/th_TH/messages.inc
index 1b78b7d60..826930c0e 100644
--- a/program/localization/th_TH/messages.inc
+++ b/program/localization/th_TH/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'เกิดข้อผิดพลาดเกี่
$messages['requesttimedout'] = 'Request timed out';
$messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
$messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Invalid request! No data was saved.';
$messages['invalidhost'] = 'ชื่อเซิร์ฟเวอร์ไม่ถูกต้อง';
$messages['nomessagesfound'] = 'ไม่มีจดหมายในกล่องจดหมายนี้';
diff --git a/program/localization/tr_TR/labels.inc b/program/localization/tr_TR/labels.inc
index d8e9e20cf..c62c5c079 100644
--- a/program/localization/tr_TR/labels.inc
+++ b/program/localization/tr_TR/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Taslaklar';
$labels['sent'] = 'Giden';
$labels['trash'] = 'Çöp';
$labels['junk'] = 'İstenmeyen';
+$labels['show_real_foldernames'] = 'Özel klasörler için gerçek isimleri göster';
// message listing
$labels['subject'] = 'Konu';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Şimdiki sayfa';
$labels['unread'] = 'Okunmamışları';
$labels['flagged'] = 'İşaretlenmişleri';
$labels['unanswered'] = 'Yanıtlanmamışları';
+$labels['withattachment'] = 'Eklenti ile';
$labels['deleted'] = 'Silinmişleri';
$labels['undeleted'] = 'Silinmemiş';
$labels['invert'] = 'Seçimi Tersine Çevir';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Liste görünümü';
$labels['folderactions'] = 'Klasör eylemleri...';
$labels['compact'] = 'Sıklaştır';
$labels['empty'] = 'Boşalt';
+$labels['importmessages'] = 'Mesajları içe aktar';
$labels['quota'] = 'Disk kullanımı';
$labels['unknown'] = 'bilinmeyen';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Aramayı bitir';
$labels['searchmod'] = 'Arama detayları';
$labels['msgtext'] = 'Tüm posta gövdesi';
$labels['body'] = 'Gövde';
+$labels['type'] = 'Tip';
$labels['openinextwin'] = 'Yeni pencerede aç';
$labels['emlsave'] = 'İndir (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Sonuncuyu göster';
$labels['group'] = 'Grup';
$labels['groups'] = 'Gruplar';
+$labels['listgroup'] = 'Grup üyelerini listele';
$labels['personaladrbook'] = 'Adresler';
$labels['searchsave'] = 'Aramayı kaydet';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'HTML postaları oluştur';
$labels['htmlonreply'] = 'sadece HTML postaları yanıtlarken';
$labels['htmlonreplyandforward'] = 'HTML biçimindeki posta yanıtlandığında veye iletildiğinde';
$labels['htmlsignature'] = 'HTML imza';
+$labels['showemail'] = 'Eposta adresini görünüm ismi ile görüntüle';
$labels['previewpane'] = 'Önizleme panelini göster';
$labels['skin'] = 'Arayüz görünümü';
$labels['logoutclear'] = 'Oturumu kapatınca Çöpü temizle';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'Yanıtlarken önceki imzaları sil';
$labels['autoaddsignature'] = 'Otomatik olarak imza ekle';
$labels['newmessageonly'] = 'sadece yeni postalarda';
$labels['replyandforwardonly'] = 'sadece yanıtlar ve yönlendirmelerde';
-$labels['replysignaturepos'] = 'Yanıtlarken veya yönlendirirken imzayı yerleştir';
-$labels['belowquote'] = 'alıntının altına';
-$labels['abovequote'] = 'alıntının üstüne';
$labels['insertsignature'] = 'İmza ekle';
$labels['previewpanemarkread'] = 'Önzilemede görünen postaları okunmuş işaretle';
$labels['afternseconds'] = '$n saniye sonra';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'İçinde rakam geçen kelimleri göz ardı et
$labels['spellcheckignorecaps'] = 'Tümü büyük harf olan kelimleri göz ardı et';
$labels['addtodict'] = 'Sözlüğe Ekle';
$labels['mailtoprotohandler'] = 'mailto: bağlantıları için protokol işleyici kayıt et';
+$labels['standardwindows'] = 'Popup pencerelerini standart pencere olarak yönet';
$labels['forwardmode'] = 'Posta yönlendirme';
$labels['inline'] = 'postanın içinde';
$labels['asattachment'] = 'ek olarak';
diff --git a/program/localization/tr_TR/messages.inc b/program/localization/tr_TR/messages.inc
index 3b451d556..3f728b523 100644
--- a/program/localization/tr_TR/messages.inc
+++ b/program/localization/tr_TR/messages.inc
@@ -126,6 +126,8 @@ $messages['importwait'] = 'Aktarılıyor, lütfen bekleyin...';
$messages['importformaterror'] = 'İçe aktarım başarısız. Yüklenen dosya geçerli bir içe aktarım dosyası değil.';
$messages['importconfirm'] = '<b>$inserted kişi başarıyla aktarıldı</b>';
$messages['importconfirmskipped'] = '<b>Var olan $skipped girdi atlandı</b>';
+$messages['importmessagesuccess'] = '$nr adet mesaj başarıyla içe aktarıldı';
+$messages['importmessageerror'] = 'İçe aktarım başarısız. Yüklenen dosya geçerli bir içe aktarım dosyası değil.';
$messages['opnotpermitted'] = 'Bu işleme izin verilmedi!';
$messages['nofromaddress'] = 'Seçili kimlikte e-posta adresi yok';
$messages['editorwarning'] = 'Düz metin düzenleyiciye geçmek, metin üzerindeki bütün biçimlendirmeleri kaldıracak. Devam etmek istiyor musunuz?';
diff --git a/program/localization/uk_UA/labels.inc b/program/localization/uk_UA/labels.inc
index 35be96cab..6ff37ee21 100644
--- a/program/localization/uk_UA/labels.inc
+++ b/program/localization/uk_UA/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Чернетки';
$labels['sent'] = 'Надіслані';
$labels['trash'] = 'Кошик';
$labels['junk'] = 'Спам';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Тема';
@@ -162,6 +163,7 @@ $labels['currpage'] = 'Поточна сторінка';
$labels['unread'] = 'Непрочитані';
$labels['flagged'] = 'Із зірочкою';
$labels['unanswered'] = 'Без відповіді';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Видалені';
$labels['undeleted'] = 'Не видалено';
$labels['invert'] = 'Інвертувати виділення';
@@ -192,6 +194,7 @@ $labels['listmode'] = 'Режим перегляду';
$labels['folderactions'] = 'Операції з папкою...';
$labels['compact'] = 'Стиснути';
$labels['empty'] = 'Спорожнити';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Використано';
$labels['unknown'] = 'невідомо';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = 'Очистити пошук';
$labels['searchmod'] = 'Де шукати';
$labels['msgtext'] = 'В усьому листі';
$labels['body'] = 'Тіло повідомлення';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Відкрити в новому вікні';
$labels['emlsave'] = 'Зберегти (.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = 'Остання сторінка';
$labels['group'] = 'Група';
$labels['groups'] = 'Групи';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Персональні адреси';
$labels['searchsave'] = 'Зберегти пошук';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = 'Створювати листи в HTML';
$labels['htmlonreply'] = 'тільки у відповідь на HTML повідомлення';
$labels['htmlonreplyandforward'] = 'під час пересилання або відповіді на повідомлення HTML';
$labels['htmlsignature'] = 'Підпис в HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Показати панель перегляду';
$labels['skin'] = 'Тема';
$labels['logoutclear'] = 'Очищати кошик при виході';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = 'При відповіді видаляти п
$labels['autoaddsignature'] = 'Автоматично додавати підпис';
$labels['newmessageonly'] = 'тільки до нових листів';
$labels['replyandforwardonly'] = 'тільки при відповідях та пересилках';
-$labels['replysignaturepos'] = 'При відповідях чи пересилках додавати підпис';
-$labels['belowquote'] = 'після цитати';
-$labels['abovequote'] = 'перед цитатою';
$labels['insertsignature'] = 'Додати підпис';
$labels['previewpanemarkread'] = 'Позначити переглянуті листи як прочитані';
$labels['afternseconds'] = 'через $n секунд';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Ігнорувати слова із числ
$labels['spellcheckignorecaps'] = 'Ігнорувати слова із великими буквами';
$labels['addtodict'] = 'Додати до словника';
$labels['mailtoprotohandler'] = 'Зареєструвати обробник для посилань mailto';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Пересилання повідомлень';
$labels['inline'] = 'у тексті';
$labels['asattachment'] = 'як вкладення';
diff --git a/program/localization/uk_UA/messages.inc b/program/localization/uk_UA/messages.inc
index 522f1f4fc..521492d99 100644
--- a/program/localization/uk_UA/messages.inc
+++ b/program/localization/uk_UA/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Помилка бази даних!';
$messages['requesttimedout'] = 'Тайм-аут запиту';
$messages['errorreadonly'] = 'Неможливо виконати операцію. Папка доступна тільки для читання.';
$messages['errornoperm'] = 'Неможливо виконати операцію. Доступ заборонено';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Невірний запит! Дані не збережено.';
$messages['invalidhost'] = 'Невірне ім\'я серверу.';
$messages['nomessagesfound'] = 'Листів не знайдено';
diff --git a/program/localization/vi_VN/labels.inc b/program/localization/vi_VN/labels.inc
index 00d04b46b..aad0dafe6 100644
--- a/program/localization/vi_VN/labels.inc
+++ b/program/localization/vi_VN/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Thư nháp';
$labels['sent'] = 'Đã gửi';
$labels['trash'] = 'Sọt rác';
$labels['junk'] = 'Thư rác';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = 'Tiêu đề';
@@ -64,6 +65,7 @@ $labels['copy'] = 'Sao chép';
$labels['move'] = 'Di Chuyển';
$labels['moveto'] = 'Di chuyển tới...';
$labels['download'] = 'Tải về';
+$labels['open'] = 'Open';
$labels['showattachment'] = 'Hiển thị';
$labels['showanyway'] = 'Tiếp tục hiển thị';
@@ -161,6 +163,7 @@ $labels['currpage'] = 'Trang hiện tại';
$labels['unread'] = 'Chưa đọc';
$labels['flagged'] = 'Đã đánh dấu';
$labels['unanswered'] = 'Chưa trả lời';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = 'Đã xóa';
$labels['undeleted'] = 'Chưa xóa được';
$labels['invert'] = 'Đảo ngược';
@@ -191,6 +194,7 @@ $labels['listmode'] = 'Xem dạng danh sách';
$labels['folderactions'] = 'Thao tác với thư mục';
$labels['compact'] = 'Nén';
$labels['empty'] = 'Trống';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = 'Lượng đĩa sử dụng';
$labels['unknown'] = 'Không rõ';
@@ -201,9 +205,12 @@ $labels['resetsearch'] = 'Thiết lập lại tìm kiếm';
$labels['searchmod'] = 'Tìm kiếm với từ khóa và ký tự đặc biệt [() : " - ]';
$labels['msgtext'] = 'Toàn bộ thư';
$labels['body'] = 'Nội dung thư';
+$labels['type'] = 'Type';
$labels['openinextwin'] = 'Mở trong khung cửa mới';
$labels['emlsave'] = 'Tải về theo định dạng .eml';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
// message compose
$labels['editasnew'] = 'Sửa như một email mới';
@@ -335,8 +342,8 @@ $labels['composeto'] = 'Soạn thư cho';
$labels['contactsfromto'] = 'Liên hệ từ $from - $to / $count';
$labels['print'] = 'In ra';
$labels['export'] = 'Trích xuất';
-$labels['exportall'] = 'Export all';
-$labels['exportsel'] = 'Export selected';
+$labels['exportall'] = 'Xuất tất cả';
+$labels['exportsel'] = 'Xuất mục chọn';
$labels['exportvcards'] = 'Tải dữ liệu máy theo định dạng vCard';
$labels['newcontactgroup'] = 'Tạo nhóm liên lạc mới';
$labels['grouprename'] = 'Đổi tên nhóm';
@@ -350,6 +357,7 @@ $labels['lastpage'] = 'Hiển thị trang cuối';
$labels['group'] = 'Nhóm';
$labels['groups'] = 'Các nhóm';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = 'Các địa chỉ cá nhân';
$labels['searchsave'] = 'Lưu tìm kiếm';
@@ -398,6 +406,7 @@ $labels['htmleditor'] = 'Soạn thư dạng HTML';
$labels['htmlonreply'] = 'Chỉ trả lời lại bằng thư HTML';
$labels['htmlonreplyandforward'] = 'Khi chuyển tiếp hoặc trả lời thư theo định dạng HTML';
$labels['htmlsignature'] = 'Chữ ký HTML';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = 'Hiển thị ô Xem thử';
$labels['skin'] = 'Bề mặt giao diện';
$labels['logoutclear'] = 'Xóa sạch rác khi thoát';
@@ -451,9 +460,6 @@ $labels['replyremovesignature'] = 'Khi trả lời bỏ chữ ký cũ khỏi n
$labels['autoaddsignature'] = 'Tự động thêm chữ ký';
$labels['newmessageonly'] = 'chỉ thư mới';
$labels['replyandforwardonly'] = 'chỉ trả lời và chuyển tiếp thư';
-$labels['replysignaturepos'] = 'Khi trả lời hoặc chuyển tiếp thư thêm vào chữ ký';
-$labels['belowquote'] = 'Dưới phần nội dung cũ';
-$labels['abovequote'] = 'trên phần nội dung cũ';
$labels['insertsignature'] = 'Chèn chữ ký';
$labels['previewpanemarkread'] = 'Đánh dẫu thư xem thử là đã đọc';
$labels['afternseconds'] = 'sau $n giây';
@@ -470,6 +476,7 @@ $labels['spellcheckignorenums'] = 'Bỏ qua các từ kèm số';
$labels['spellcheckignorecaps'] = 'Bỏ qua các từ được viết hoa';
$labels['addtodict'] = 'Thêm vào từ điển';
$labels['mailtoprotohandler'] = 'Xác định cách xử lý giao thức mailto: liên kết';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Chuyển tiếp thư';
$labels['inline'] = 'nội tuyến';
$labels['asattachment'] = 'dạng gửi kèm';
diff --git a/program/localization/vi_VN/messages.inc b/program/localization/vi_VN/messages.inc
index 1d5f5f84c..50bf71846 100644
--- a/program/localization/vi_VN/messages.inc
+++ b/program/localization/vi_VN/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Lỗi cơ sở dữ liệu';
$messages['requesttimedout'] = 'Yêu cầu hết hạn';
$messages['errorreadonly'] = 'Không thể thực hiện thao tác. Thư mục chỉ cho phép đọc.';
$messages['errornoperm'] = 'Bạn không đủ quyền hạn để thực hiện thao tác này.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
$messages['invalidrequest'] = 'Yêu cầu không hợp lệ! Không có dữ liệu nào được lưu.';
$messages['invalidhost'] = 'Sai thông tin máy chủ';
$messages['nomessagesfound'] = 'Không thấy có thư nào trong hộp thư này.';
diff --git a/program/localization/zh_CN/labels.inc b/program/localization/zh_CN/labels.inc
index 9b79283b1..b568a7008 100644
--- a/program/localization/zh_CN/labels.inc
+++ b/program/localization/zh_CN/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = '草稿箱';
$labels['sent'] = '已发送邮件';
$labels['trash'] = '已删除邮件';
$labels['junk'] = '垃圾邮件';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = '主题';
@@ -162,6 +163,7 @@ $labels['currpage'] = '当前页';
$labels['unread'] = '未读邮件';
$labels['flagged'] = '已标记邮件';
$labels['unanswered'] = '未回复邮件';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = '已删除邮件';
$labels['undeleted'] = '未删除邮件';
$labels['invert'] = '反选';
@@ -192,6 +194,7 @@ $labels['listmode'] = '列表视图样式';
$labels['folderactions'] = '文件夹操作...';
$labels['compact'] = '压缩';
$labels['empty'] = '清空';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = '邮箱容量';
$labels['unknown'] = '未知';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = '清空';
$labels['searchmod'] = '修改搜索';
$labels['msgtext'] = '整封邮件';
$labels['body'] = '正文';
+$labels['type'] = 'Type';
$labels['openinextwin'] = '在新窗口中打开';
$labels['emlsave'] = '下载(.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = '最后一页';
$labels['group'] = '分组';
$labels['groups'] = '分组';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = '个人通讯录';
$labels['searchsave'] = '保存搜索';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = '使用 HTML 编辑器';
$labels['htmlonreply'] = '仅当回复 HTML 邮件';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
$labels['htmlsignature'] = '使用 HTML 签名';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = '显示预览窗口';
$labels['skin'] = '界面皮肤';
$labels['logoutclear'] = '退出时清空回收站';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = '当回复时从邮件移除原始签名';
$labels['autoaddsignature'] = '自动插入签名';
$labels['newmessageonly'] = '仅新邮件';
$labels['replyandforwardonly'] = '仅回复和转发邮件';
-$labels['replysignaturepos'] = '当回复或转发时插入签名';
-$labels['belowquote'] = '位于原文下方';
-$labels['abovequote'] = '位于原文上方';
$labels['insertsignature'] = '插入签名';
$labels['previewpanemarkread'] = '标记预览邮件为已读';
$labels['afternseconds'] = '$n 秒之后';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = '忽略带数字的单词';
$labels['spellcheckignorecaps'] = '忽略所有大写字母的单词';
$labels['addtodict'] = '添加到字典中';
$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = '邮件转发方式';
$labels['inline'] = '内嵌';
$labels['asattachment'] = '作为附件';
diff --git a/program/localization/zh_TW/labels.inc b/program/localization/zh_TW/labels.inc
index 488a7ab2d..7726da5dd 100644
--- a/program/localization/zh_TW/labels.inc
+++ b/program/localization/zh_TW/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = '草稿匣';
$labels['sent'] = '寄件備份';
$labels['trash'] = '垃圾桶';
$labels['junk'] = '垃圾郵件';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
// message listing
$labels['subject'] = '主旨';
@@ -162,6 +163,7 @@ $labels['currpage'] = '目前頁面';
$labels['unread'] = '未讀取的郵件';
$labels['flagged'] = '已加標記的郵件';
$labels['unanswered'] = '未回覆的郵件';
+$labels['withattachment'] = 'With attachment';
$labels['deleted'] = '已刪除的郵件';
$labels['undeleted'] = '未刪除的郵件';
$labels['invert'] = '反選';
@@ -192,6 +194,7 @@ $labels['listmode'] = '清單檢視模式';
$labels['folderactions'] = '資料夾動作...';
$labels['compact'] = '壓縮';
$labels['empty'] = '清空';
+$labels['importmessages'] = 'Import messages';
$labels['quota'] = '磁碟使用量';
$labels['unknown'] = '未知';
@@ -202,6 +205,7 @@ $labels['resetsearch'] = '重設搜尋';
$labels['searchmod'] = '修改搜尋';
$labels['msgtext'] = '整封郵件';
$labels['body'] = '內文';
+$labels['type'] = 'Type';
$labels['openinextwin'] = '在新視窗開啟';
$labels['emlsave'] = '下載(.eml)';
@@ -353,6 +357,7 @@ $labels['lastpage'] = '顯示最後一頁';
$labels['group'] = '群組';
$labels['groups'] = '群組';
+$labels['listgroup'] = 'List group members';
$labels['personaladrbook'] = '個人通訊錄';
$labels['searchsave'] = '儲存搜尋結果';
@@ -401,6 +406,7 @@ $labels['htmleditor'] = '使用 HTML 撰寫郵件';
$labels['htmlonreply'] = '只有在回覆HTML信件時';
$labels['htmlonreplyandforward'] = '只有在轉寄或回覆HTML信件時';
$labels['htmlsignature'] = 'HTML 簽名檔';
+$labels['showemail'] = 'Show email address with display name';
$labels['previewpane'] = '顯示預覽窗格';
$labels['skin'] = '版面風格';
$labels['logoutclear'] = '登出時清空垃圾桶';
@@ -454,9 +460,6 @@ $labels['replyremovesignature'] = '回覆時移除原有簽名檔';
$labels['autoaddsignature'] = '自動附加簽名';
$labels['newmessageonly'] = '只有新訊息';
$labels['replyandforwardonly'] = '只有回覆或轉寄';
-$labels['replysignaturepos'] = '當回覆或轉寄時附上簽名檔';
-$labels['belowquote'] = '引用的下方';
-$labels['abovequote'] = '引用的上方';
$labels['insertsignature'] = '插入簽名檔';
$labels['previewpanemarkread'] = '標示已預覽訊息為已讀取';
$labels['afternseconds'] = '$n 秒之後';
@@ -473,6 +476,7 @@ $labels['spellcheckignorenums'] = '忽略數字';
$labels['spellcheckignorecaps'] = '忽略大寫字母';
$labels['addtodict'] = '加入詞典';
$labels['mailtoprotohandler'] = '註冊mailto:協定處理程式';
+$labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = '郵件轉寄方式';
$labels['inline'] = '放入內文';
$labels['asattachment'] = '當成附件';
diff --git a/program/localization/zh_TW/messages.inc b/program/localization/zh_TW/messages.inc
index f0f92c848..5605ba815 100644
--- a/program/localization/zh_TW/messages.inc
+++ b/program/localization/zh_TW/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = '資料庫錯誤!';
$messages['requesttimedout'] = '要求逾時';
$messages['errorreadonly'] = '動作無法完成。資料夾唯讀';
$messages['errornoperm'] = '動作無法完成。權限不符';
+$messages['erroroverquota'] = '動作無法完成。硬碟空間不夠';
+$messages['erroroverquotadelete'] = '硬碟空間不夠,請使用SHIFT+DEL來刪除訊息';
$messages['invalidrequest'] = '要求無效!未儲存任何資料。';
$messages['invalidhost'] = '無效的伺服器名稱';
$messages['nomessagesfound'] = '此郵件匣沒有任何郵件';
diff --git a/program/steps/addressbook/copy.inc b/program/steps/addressbook/copy.inc
index 480a9b52e..d4387194a 100644
--- a/program/steps/addressbook/copy.inc
+++ b/program/steps/addressbook/copy.inc
@@ -57,10 +57,16 @@ foreach ($cids as $source => $cid)
foreach ($cid as $cid) {
$a_record = $CONTACTS->get_record($cid, true);
+ // avoid copying groups
+ if ($a_record['_type'] == 'group')
+ continue;
+
// Check if contact exists, if so, we'll need it's ID
// Note: Some addressbooks allows empty email address field
- if (!empty($a_record['email']))
- $result = $TARGET->search('email', $a_record['email'], 1, true, true);
+ // @TODO: should we check all email addresses?
+ $email = $CONTACTS->get_col_values('email', $a_record, true);
+ if (!empty($email))
+ $result = $TARGET->search('email', $email[0], 1, true, true);
else if (!empty($a_record['name']))
$result = $TARGET->search('name', $a_record['name'], 1, true, true);
else
@@ -114,7 +120,7 @@ foreach ($cids as $source => $cid)
}
}
-if ($success == 0)
+if (!$success)
$OUTPUT->show_message($errormsg, 'error');
else
$OUTPUT->show_message('copysuccess', 'notice', array('nr' => $success));
diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc
index 56118583c..3bb2ef500 100644
--- a/program/steps/addressbook/delete.inc
+++ b/program/steps/addressbook/delete.inc
@@ -68,48 +68,14 @@ foreach ($cids as $source => $cid)
$page = isset($_SESSION['page']) ? $_SESSION['page'] : 1;
// update saved search after data changed
-if (($search_request = $_REQUEST['_search']) && isset($_SESSION['search'][$search_request])) {
- $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
- $afields = $RCMAIL->config->get('contactlist_fields');
- $search = (array)$_SESSION['search'][$search_request];
- $records = array();
-
- // Get records from all sources (refresh search)
- foreach ($search as $s => $set) {
- $source = $RCMAIL->get_address_book($s);
-
- // reset page
- $source->set_page(1);
- $source->set_pagesize(9999);
- $source->set_search_set($set);
-
- // get records
- $result = $source->list_records($afields);
-
- if (!$result->count) {
- unset($search[$s]);
- continue;
- }
-
- while ($row = $result->next()) {
- $row['sourceid'] = $s;
- $key = rcube_addressbook::compose_contact_key($row, $sort_col);
- $records[$key] = $row;
- }
- unset($result);
-
- $search[$s] = $source->get_search_set();
- }
-
- $_SESSION['search'][$search_request] = $search;
-
+if (($records = rcmail_search_update(true)) !== false) {
// create resultset object
$count = count($records);
$first = ($page-1) * $PAGE_SIZE;
$result = new rcube_result_set($count, $first);
+ $pages = ceil((count($records) + $delcnt) / $PAGE_SIZE);
// get records from the next page to add to the list
- $pages = ceil((count($records) + $delcnt) / $PAGE_SIZE);
if ($_GET['_from'] != 'show' && $pages > 1 && $page < $pages) {
// sort the records
ksort($records, SORT_LOCALE_STRING);
diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc
index 15bf8b0d4..761f26b75 100644
--- a/program/steps/addressbook/export.inc
+++ b/program/steps/addressbook/export.inc
@@ -138,7 +138,9 @@ header('Content-Disposition: attachment; filename="contacts.vcf"');
while ($result && ($row = $result->next())) {
// we already have a vcard record
if ($row['vcard'] && $row['name']) {
- $row['vcard'] = preg_replace('/\r?\n/', rcube_vcard::$eol, $row['vcard']);
+ // fix folding and end-of-line chars
+ $row['vcard'] = preg_replace('/\r|\n\s+/', '', $row['vcard']);
+ $row['vcard'] = preg_replace('/\n/', rcube_vcard::$eol, $row['vcard']);
echo rcube_vcard::rfc2425_fold($row['vcard']) . rcube_vcard::$eol;
}
// copy values into vcard object
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index ffc0b3b92..8ec581f9a 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -167,7 +167,7 @@ function rcmail_set_sourcename($abook)
// get address book name (for display)
if ($abook && $_SESSION['addressbooks_count'] > 1) {
$name = $abook->get_name();
- if (!$name && $source == 0) {
+ if (!$name) {
$name = rcube_label('personaladrbook');
}
$OUTPUT->set_env('sourcename', html_entity_decode($name, ENT_COMPAT, 'UTF-8'));
@@ -183,7 +183,6 @@ function rcmail_directory_list($attrib)
$attrib['id'] = 'rcmdirectorylist';
$out = '';
- $local_id = '0';
$jsdata = array();
$line_templ = html::tag('li', array(
@@ -270,7 +269,6 @@ function rcmail_contact_groups($args)
$groups_html = '';
$groups = $RCMAIL->get_address_book($args['source'])->list_groups();
- $js_id = $RCMAIL->JQ($args['source']);
if (!empty($groups)) {
$line_templ = html::tag('li', array(
@@ -283,7 +281,6 @@ function rcmail_contact_groups($args)
$is_collapsed = strpos($RCMAIL->config->get('collapsed_abooks',''), '&'.rawurlencode($args['source']).'&') !== false;
$args['out'] .= html::div('treetoggle ' . ($is_collapsed ? 'collapsed' : 'expanded'), '&nbsp;');
- $jsdata = array();
foreach ($groups as $group) {
$groups_html .= sprintf($line_templ,
rcube_utils::html_identifier('G' . $args['source'] . $group['ID'], true),
@@ -297,7 +294,7 @@ function rcmail_contact_groups($args)
}
$args['out'] .= html::tag('ul',
- array('class' => 'groups', 'style' => ($is_collapsed ? "display:none;" : null)),
+ array('class' => 'groups', 'style' => ($is_collapsed || empty($groups) ? "display:none;" : null)),
$groups_html);
return $args;
@@ -310,7 +307,7 @@ function rcmail_contacts_list($attrib)
global $CONTACTS, $OUTPUT;
// define list of cols to be displayed
- $a_show_cols = array('name');
+ $a_show_cols = array('name','action');
// add id to message list table if not specified
if (!strlen($attrib['id']))
@@ -325,7 +322,7 @@ function rcmail_contacts_list($attrib)
$OUTPUT->include_script('list.js');
// add some labels to client
- $OUTPUT->add_label('deletecontactconfirm', 'copyingcontact', 'contactdeleting');
+ $OUTPUT->add_label('deletecontactconfirm', 'copyingcontact', 'movingcontact', 'contactdeleting');
return $out;
}
@@ -339,31 +336,73 @@ function rcmail_js_contacts_list($result, $prefix='')
return;
// define list of cols to be displayed
- $a_show_cols = array('name');
+ $a_show_cols = array('name','action');
while ($row = $result->next()) {
+ $row['CID'] = $row['ID'];
+ $row['email'] = reset(rcube_addressbook::get_col_values('email', $row, true));
+
+ $source_id = $OUTPUT->get_env('source');
$a_row_cols = array();
- $classes = array('person'); // org records will follow some day
+ $classes = array($row['_type'] ? $row['_type'] : 'person');
// build contact ID with source ID
if (isset($row['sourceid'])) {
$row['ID'] = $row['ID'].'-'.$row['sourceid'];
+ $source_id = $row['sourceid'];
}
// format each col
foreach ($a_show_cols as $col) {
- $val = $col == 'name' ? rcube_addressbook::compose_list_name($row) : $row[$col];
- $a_row_cols[$col] = Q($val);
+ $val = '';
+ switch ($col) {
+ case 'name':
+ $val = Q(rcube_addressbook::compose_list_name($row));
+ break;
+
+ case 'action':
+ if ($row['_type'] == 'group') {
+ $val = html::a(array(
+ 'href' => '#list',
+ 'rel' => $row['ID'],
+ 'title' => rcube_label('listgroup'),
+ 'onclick' => sprintf("return %s.command('pushgroup',{'source':'%s','id':'%s'},this,event)", JS_OBJECT_NAME, $source_id, $row['CID']),
+ ), '&raquo;');
+ }
+ else
+ $val = '&nbsp;';
+ break;
+
+ default:
+ $val = Q($row[$col]);
+ break;
+ }
+
+ $a_row_cols[$col] = $val;
}
if ($row['readonly'])
$classes[] = 'readonly';
- $OUTPUT->command($prefix.'add_contact_row', $row['ID'], $a_row_cols, join(' ', $classes));
+ $OUTPUT->command($prefix.'add_contact_row', $row['ID'], $a_row_cols, join(' ', $classes), array_intersect_key($row, array('ID'=>1,'readonly'=>1,'_type'=>1,'email'=>1,'name'=>1)));
}
}
+function rcmail_contacts_list_title($attrib)
+{
+ global $OUTPUT;
+
+ $attrib += array('label' => 'contacts', 'id' => 'rcmabooklisttitle', 'tag' => 'span');
+ unset($attrib['name']);
+
+ $OUTPUT->add_gui_object('addresslist_title', $attrib['id']);
+ $OUTPUT->add_label('contacts');
+
+ return html::tag($attrib['tag'], $attrib, rcube_label($attrib['label']), html::$common_attrib);
+}
+
+
// similar function as /steps/settings/identities.inc::rcmail_identity_frame()
function rcmail_contact_frame($attrib)
{
@@ -432,7 +471,7 @@ function rcmail_get_type_label($type)
function rcmail_contact_form($form, $record, $attrib = null)
{
- global $RCMAIL, $CONFIG;
+ global $RCMAIL;
// Allow plugins to modify contact form content
$plugin = $RCMAIL->plugins->exec_hook('contact_form', array(
@@ -441,7 +480,7 @@ function rcmail_contact_form($form, $record, $attrib = null)
$form = $plugin['form'];
$record = $plugin['record'];
$edit_mode = $RCMAIL->action != 'show';
- $del_button = $attrib['deleteicon'] ? html::img(array('src' => $CONFIG['skin_path'] . $attrib['deleteicon'], 'alt' => rcube_label('delete'))) : rcube_label('delete');
+ $del_button = $attrib['deleteicon'] ? html::img(array('src' => $RCMAIL->output->get_skin_file($attrib['deleteicon']), 'alt' => rcube_label('delete'))) : rcube_label('delete');
unset($attrib['deleteicon']);
$out = '';
@@ -554,22 +593,13 @@ function rcmail_contact_form($form, $record, $attrib = null)
// iterate over possible subtypes and collect values with their subtype
if (is_array($colprop['subtypes'])) {
$values = $subtypes = array();
- foreach ($colprop['subtypes'] as $i => $st) {
- $newval = false;
- if ($record[$field.':'.$st]) {
- $subtypes[count($values)] = $st;
- $newval = $record[$field.':'.$st];
- }
- else if ($i == 0 && $record[$field]) {
- $subtypes[count($values)] = $st;
- $newval = $record[$field];
- }
- if ($newval !== false) {
- if (is_array($newval) && isset($newval[0]))
- $values = array_merge($values, $newval);
- else
- $values[] = $newval;
+ foreach (rcube_addressbook::get_col_values($field, $record) as $st => $vals) {
+ foreach((array)$vals as $value) {
+ $i = count($values);
+ $subtypes[$i] = $st;
+ $values[$i] = $value;
}
+ // TODO: add $st to $select_subtype if missing ?
}
}
else {
@@ -707,12 +737,15 @@ function rcmail_contact_form($form, $record, $attrib = null)
function rcmail_contact_photo($attrib)
{
- global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG;
+ global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL;
if ($result = $CONTACTS->get_result())
$record = $result->first();
- $photo_img = $attrib['placeholder'] ? $CONFIG['skin_path'] . $attrib['placeholder'] : 'program/resources/blank.gif';
+ $photo_img = $attrib['placeholder'] ? $RCMAIL->output->get_skin_file($attrib['placeholder']) : 'program/resources/blank.gif';
+ if ($record['_type'] == 'group' && $attrib['placeholdergroup'])
+ $photo_img = $RCMAIL->output->get_skin_file($attrib['placeholdergroup']);
+
$RCMAIL->output->set_env('photo_placeholder', $photo_img);
unset($attrib['placeholder']);
@@ -746,6 +779,54 @@ function rcmail_format_date_col($val)
return format_date($val, $RCMAIL->config->get('date_format', 'Y-m-d'), false);
}
+/**
+ * Updates saved search after data changed
+ */
+function rcmail_search_update($return = false)
+{
+ global $RCMAIL;
+
+ if (($search_request = $_REQUEST['_search']) && isset($_SESSION['search'][$search_request])) {
+ $search = (array)$_SESSION['search'][$search_request];
+ $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
+ $afields = $return ? $RCMAIL->config->get('contactlist_fields') : array('name', 'email');
+ $records = array();
+
+ foreach ($search as $s => $set) {
+ $source = $RCMAIL->get_address_book($s);
+
+ // reset page
+ $source->set_page(1);
+ $source->set_pagesize(9999);
+ $source->set_search_set($set);
+
+ // get records
+ $result = $source->list_records($afields);
+
+ if (!$result->count) {
+ unset($search[$s]);
+ continue;
+ }
+
+ if ($return) {
+ while ($row = $result->next()) {
+ $row['sourceid'] = $s;
+ $key = rcube_addressbook::compose_contact_key($row, $sort_col);
+ $records[$key] = $row;
+ }
+ unset($result);
+ }
+
+ $search[$s] = $source->get_search_set();
+ }
+
+ $_SESSION['search'][$search_request] = $search;
+
+ return $records;
+ }
+
+ return false;
+}
/**
* Returns contact ID(s) and source(s) from GET/POST data
@@ -787,7 +868,7 @@ function rcmail_get_cids($filter = null)
}
}
else {
- if (substr($id, -($got_source+1)) == "-$source") {
+ if (substr($id, -($got_source+1)) === "-$source") {
$id = substr($id, 0, -($got_source+1));
}
$result[$source][] = $id;
@@ -803,6 +884,7 @@ $OUTPUT->add_handlers(array(
'directorylist' => 'rcmail_directory_list',
// 'groupslist' => 'rcmail_contact_groups',
'addresslist' => 'rcmail_contacts_list',
+ 'addresslisttitle' => 'rcmail_contacts_list_title',
'addressframe' => 'rcmail_contact_frame',
'recordscountdisplay' => 'rcmail_rowcount_display',
'searchform' => array($OUTPUT, 'search_form')
diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc
index df07d64bc..915aac884 100644
--- a/program/steps/addressbook/import.inc
+++ b/program/steps/addressbook/import.inc
@@ -88,7 +88,7 @@ function rcmail_import_confirm($attrib)
$content = html::p(null, rcube_label(array(
'name' => 'importconfirm',
- 'nr' => $IMORT_STATS->inserted,
+ 'nr' => $IMPORT_STATS->inserted,
'vars' => $vars,
)) . ($IMPORT_STATS->names ? ':' : '.'));
@@ -98,7 +98,7 @@ function rcmail_import_confirm($attrib)
if ($IMPORT_STATS->skipped) {
$content .= html::p(null, rcube_label(array(
'name' => 'importconfirmskipped',
- 'nr' => $IMORT_STATS->skipped,
+ 'nr' => $IMPORT_STATS->skipped,
'vars' => $vars,
)) . ':');
$content .= html::p('em', join(', ', array_map('Q', $IMPORT_STATS->skipped_names)));
@@ -209,6 +209,15 @@ if (is_array($_FILES['_file'])) {
foreach ($vcards as $vcard) {
$a_record = $vcard->get_assoc();
+ // Generate contact's display name (must be before validation), the same we do in save.inc
+ if (empty($a_record['name'])) {
+ $a_record['name'] = rcube_addressbook::compose_display_name($a_record, true);
+ // Reset it if equals to email address (from compose_display_name())
+ if ($a_record['name'] == $a_record['email'][0]) {
+ $a_record['name'] = '';
+ }
+ }
+
// skip invalid (incomplete) entries
if (!$CONTACTS->validate($a_record, true)) {
$IMPORT_STATS->invalid++;
@@ -250,7 +259,7 @@ if (is_array($_FILES['_file'])) {
if ($success) {
$IMPORT_STATS->inserted++;
- $IMPORT_STATS->names[] = $vcard->displayname ? $vcard->displayname : $email;
+ $IMPORT_STATS->names[] = $a_record['name'] ? $a_record['name'] : $email;
}
else {
$IMPORT_STATS->errors++;
diff --git a/program/steps/addressbook/list.inc b/program/steps/addressbook/list.inc
index 1bb28658b..aca58d279 100644
--- a/program/steps/addressbook/list.inc
+++ b/program/steps/addressbook/list.inc
@@ -19,47 +19,20 @@
+-----------------------------------------------------------------------+
*/
-$afields = $RCMAIL->config->get('contactlist_fields');
+if (!empty($_GET['_page']))
+ $page = intval($_GET['_page']);
+else
+ $page = !empty($_SESSION['page']) ? $_SESSION['page'] : 1;
-// Use search result
-if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))
-{
- $search = (array)$_SESSION['search'][$_REQUEST['_search']];
- $records = array();
-
- if (!empty($_GET['_page']))
- $page = intval($_GET['_page']);
- else
- $page = isset($_SESSION['page']) ? $_SESSION['page'] : 1;
-
- $_SESSION['page'] = $page;
- $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
-
- // Get records from all sources
- foreach ($search as $s => $set) {
- $source = $RCMAIL->get_address_book($s);
-
- // reset page
- $source->set_page(1);
- $source->set_pagesize(9999);
- $source->set_search_set($set);
-
- // get records
- $result = $source->list_records($afields);
-
- while ($row = $result->next()) {
- $row['sourceid'] = $s;
- $key = rcube_addressbook::compose_contact_key($row, $sort_col);
- $records[$key] = $row;
- }
- unset($result);
- }
+$_SESSION['page'] = $page;
+// Use search result
+if (($records = rcmail_search_update(true)) !== false) {
// sort the records
ksort($records, SORT_LOCALE_STRING);
// create resultset object
- $count = count($records);
+ $count = count($records);
$first = ($page-1) * $PAGE_SIZE;
$result = new rcube_result_set($count, $first);
@@ -72,6 +45,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search
}
// List selected directory
else {
+ $afields = $RCMAIL->config->get('contactlist_fields');
$CONTACTS = rcmail_contact_source(null, true);
// get contacts for this user
@@ -81,6 +55,11 @@ else {
$OUTPUT->show_message('contactsearchonly', 'notice');
$OUTPUT->command('command', 'advanced-search');
}
+
+ if ($CONTACTS->group_id) {
+ $OUTPUT->command('set_group_prop', array('ID' => $CONTACTS->group_id)
+ + array_intersect_key((array)$CONTACTS->get_group($CONTACTS->group_id), array('name'=>1,'email'=>1)));
+ }
}
// update message count display
diff --git a/program/steps/addressbook/move.inc b/program/steps/addressbook/move.inc
new file mode 100644
index 000000000..f8204e9ee
--- /dev/null
+++ b/program/steps/addressbook/move.inc
@@ -0,0 +1,208 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | program/steps/addressbook/move.inc |
+ | |
+ | This file is part of the Roundcube Webmail client |
+ | Copyright (C) 2007-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ | PURPOSE: |
+ | Move a contact record from one direcotry to another |
+ +-----------------------------------------------------------------------+
+ | Author: Thomas Bruederli <roundcube@gmail.com> |
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ +-----------------------------------------------------------------------+
+*/
+
+// only process ajax requests
+if (!$OUTPUT->ajax_call) {
+ return;
+}
+
+$cids = rcmail_get_cids();
+$target = get_input_value('_to', RCUBE_INPUT_POST);
+$target_group = get_input_value('_togid', RCUBE_INPUT_POST);
+
+$all = 0;
+$deleted = 0;
+$success = 0;
+$errormsg = 'moveerror';
+$maxnum = $RCMAIL->config->get('max_group_members', 0);
+$page = !empty($_SESSION['page']) ? $_SESSION['page'] : 1;
+
+foreach ($cids as $source => $source_cids) {
+ // Something wrong, target not specified
+ if (!strlen($target)) {
+ break;
+ }
+
+ // It maight happen when moving records from search result
+ // Do nothing, go to next source
+ if ((string)$target === (string)$source) {
+ continue;
+ }
+
+ $CONTACTS = $RCMAIL->get_address_book($source);
+ $TARGET = $RCMAIL->get_address_book($target);
+
+ if (!$TARGET || !$TARGET->ready || $TARGET->readonly) {
+ break;
+ }
+
+ if (!$CONTACTS || !$CONTACTS->ready || $CONTACTS->readonly) {
+ continue;
+ }
+
+ $ids = array();
+
+ foreach ($source_cids as $idx => $cid) {
+ $a_record = $CONTACTS->get_record($cid, true);
+
+ // avoid moving groups
+ if ($a_record['_type'] == 'group') {
+ unset($source_cids[$idx]);
+ continue;
+ }
+
+ // Check if contact exists, if so, we'll need it's ID
+ // Note: Some addressbooks allows empty email address field
+ // @TODO: should we check all email addresses?
+ $email = $CONTACTS->get_col_values('email', $a_record, true);
+ if (!empty($email))
+ $result = $TARGET->search('email', $email[0], 1, true, true);
+ else if (!empty($a_record['name']))
+ $result = $TARGET->search('name', $a_record['name'], 1, true, true);
+ else
+ $result = new rcube_result_set();
+
+ // insert contact record
+ if (!$result->count) {
+ $plugin = $RCMAIL->plugins->exec_hook('contact_create', array(
+ 'record' => $a_record, 'source' => $target, 'group' => $target_group));
+
+ if (!$plugin['abort']) {
+ if ($insert_id = $TARGET->insert($plugin['record'], false)) {
+ $ids[] = $insert_id;
+ $success++;
+ }
+ }
+ else if ($plugin['result']) {
+ $ids = array_merge($ids, $plugin['result']);
+ $success++;
+ }
+ }
+ else {
+ $record = $result->first();
+ $ids[] = $record['ID'];
+ $errormsg = empty($a_record['email']) ? 'contactnameexists' : 'contactexists';
+ }
+ }
+
+ // remove source contacts
+ if ($success && !empty($source_cids)) {
+ $all += count($source_cids);
+ $plugin = $RCMAIL->plugins->exec_hook('contact_delete', array(
+ 'id' => $source_cids, 'source' => $source));
+
+ $del_status = !$plugin['abort'] ? $CONTACTS->delete($source_cids) : $plugin['result'];
+
+ if ($del_status) {
+ $deleted += $del_status;
+ }
+ }
+
+ // assign to group
+ if ($target_group && $TARGET->groups && !empty($ids)) {
+ $plugin = $RCMAIL->plugins->exec_hook('group_addmembers', array(
+ 'group_id' => $target_group, 'ids' => $ids, 'source' => $target));
+
+ if (!$plugin['abort']) {
+ $TARGET->reset();
+ $TARGET->set_group($target_group);
+
+ if ($maxnum && ($TARGET->count()->count + count($plugin['ids']) > $maxnum)) {
+ $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum));
+ $OUTPUT->send();
+ }
+
+ if (($cnt = $TARGET->add_to_group($target_group, $plugin['ids'])) && $cnt > $success)
+ $success = $cnt;
+ }
+ else if ($plugin['result']) {
+ $success = $plugin['result'];
+ }
+
+ $errormsg = $plugin['message'] ? $plugin['message'] : 'moveerror';
+ }
+}
+
+if (!$deleted || $deleted != $all) {
+ // update saved search after data changed
+ if ($deleted) {
+ rcmail_search_update();
+ }
+ $OUTPUT->command('list_contacts');
+}
+else {
+ // update saved search after data changed
+ if (($records = rcmail_search_update(true)) !== false) {
+ // create resultset object
+ $count = count($records);
+ $first = ($page-1) * $PAGE_SIZE;
+ $result = new rcube_result_set($count, $first);
+ $pages = ceil((count($records) + $delcnt) / $PAGE_SIZE);
+
+ // get records from the next page to add to the list
+ if ($_GET['_from'] != 'show' && $pages > 1 && $page < $pages) {
+ // sort the records
+ ksort($records, SORT_LOCALE_STRING);
+
+ $first += $PAGE_SIZE;
+ // create resultset object
+ $res = new rcube_result_set($count, $first - $deleted);
+
+ if ($PAGE_SIZE < $count) {
+ $records = array_slice($records, $first - $deleted, $deleted);
+ }
+
+ $res->records = array_values($records);
+ $records = $res;
+ }
+ else {
+ unset($records);
+ }
+ }
+ else {
+ // count contacts for this user
+ $result = $CONTACTS->count();
+ // get records from the next page to add to the list
+ $pages = ceil(($result->count + $deleted) / $PAGE_SIZE);
+
+ if ($_GET['_from'] != 'show' && $pages > 1 && $page < $pages) {
+ $CONTACTS->set_page($page);
+ $records = $CONTACTS->list_records(null, -$deleted);
+ }
+ }
+
+ // update message count display
+ $OUTPUT->set_env('pagecount', ceil($result->count / $PAGE_SIZE));
+ $OUTPUT->command('set_rowcount', rcmail_get_rowcount_text($result));
+
+ // add new rows from next page (if any)
+ if (!empty($records)) {
+ rcmail_js_contacts_list($records);
+ }
+}
+
+if (!$success)
+ $OUTPUT->show_message($errormsg, 'error');
+else
+ $OUTPUT->show_message('movesuccess', 'notice', array('nr' => $success));
+
+// send response
+$OUTPUT->send();
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 8cab6e817..e7e5efc63 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -134,11 +134,11 @@ if (!empty($cid))
$record['email'] = reset($CONTACTS->get_col_values('email', $record, true));
$record['name'] = rcube_addressbook::compose_list_name($record);
- foreach (array('name', 'email') as $col)
+ foreach (array('name') as $col)
$a_js_cols[] = Q((string)$record[$col]);
// update the changed col in list
- $OUTPUT->command('parent.update_contact_row', $cid, $a_js_cols, $newcid, $source);
+ $OUTPUT->command('parent.update_contact_row', $cid, $a_js_cols, $newcid, $source, $record);
// show confirmation
$OUTPUT->show_message('successfullysaved', 'confirmation', null, false);
@@ -192,7 +192,7 @@ else {
if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($counts->count + 1 > $maxnum))
$OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum));
- $CONTACTS->add_to_group($gid, $plugin['ids']);
+ $CONTACTS->add_to_group($plugin['group_id'], $plugin['ids']);
}
}
else
diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc
index 16be89f94..950764bb1 100644
--- a/program/steps/addressbook/show.inc
+++ b/program/steps/addressbook/show.inc
@@ -101,8 +101,6 @@ function rcmail_contact_head($attrib)
return false;
}
- $microformats = array('name' => 'fn', 'email' => 'email');
-
$form = array(
'head' => array( // section 'head' is magic!
'content' => array(
@@ -177,7 +175,7 @@ function rcmail_contact_details($attrib)
}
-function rcmail_render_email_value($email, $col)
+function rcmail_render_email_value($email)
{
return html::a(array(
'href' => 'mailto:' . $email,
@@ -188,7 +186,7 @@ function rcmail_render_email_value($email, $col)
}
-function rcmail_render_url_value($url, $col)
+function rcmail_render_url_value($url)
{
$prefix = preg_match('!^(http|ftp)s?://!', $url) ? '' : 'http://';
return html::a(array(
@@ -209,9 +207,8 @@ function rcmail_contact_record_groups($contact_id)
return '';
}
- $table = new html_table(array('cols' => 2, 'cellspacing' => 0, 'border' => 0));
-
- $members = $CONTACTS->get_record_groups($contact_id);
+ $members = $CONTACTS->get_record_groups($contact_id);
+ $table = new html_table(array('cols' => 2, 'cellspacing' => 0, 'border' => 0));
$checkbox = new html_checkbox(array('name' => '_gid[]',
'class' => 'groupmember', 'disabled' => $CONTACTS->readonly));
@@ -223,7 +220,7 @@ function rcmail_contact_record_groups($contact_id)
}
$hiddenfields = new html_hiddenfield(array('name' => '_source', 'value' => get_input_value('_source', RCUBE_INPUT_GPC)));
- $hiddenfields->add(array('name' => '_cid', 'value' => $record['ID']));
+ $hiddenfields->add(array('name' => '_cid', 'value' => $contact_id));
$form_start = $RCMAIL->output->request_form(array(
'name' => "form", 'method' => "post",
diff --git a/program/steps/addressbook/undo.inc b/program/steps/addressbook/undo.inc
index 9c171143c..c23bd1cb6 100644
--- a/program/steps/addressbook/undo.inc
+++ b/program/steps/addressbook/undo.inc
@@ -46,30 +46,7 @@ foreach ((array)$undo['data'] as $source => $cid)
}
// update saved search after data changed
-if ($delcnt && ($search_request = $_REQUEST['_search']) && isset($_SESSION['search'][$search_request])) {
- $search = (array)$_SESSION['search'][$search_request];
-
- foreach ($search as $s => $set) {
- $source = $RCMAIL->get_address_book($s);
-
- // reset page
- $source->set_page(1);
- $source->set_pagesize(9999);
- $source->set_search_set($set);
-
- // get records
- $result = $source->list_records(array('name', 'email'));
-
- if (!$result->count) {
- unset($search[$s]);
- continue;
- }
-
- $search[$s] = $source->get_search_set();
- }
-
- $_SESSION['search'][$search_request] = $search;
-}
+rcmail_search_update();
$RCMAIL->session->remove('contact_undo');
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc
index 55579814c..f9e8d71a4 100644
--- a/program/steps/mail/autocomplete.inc
+++ b/program/steps/mail/autocomplete.inc
@@ -102,7 +102,7 @@ if (!empty($book_types) && strlen($search)) {
// also list matching contact groups
if ($abook->groups && count($contacts) < $MAXNUM) {
- foreach ($abook->list_groups($search) as $group) {
+ foreach ($abook->list_groups($search, $mode) as $group) {
$abook->reset();
$abook->set_group($group['ID']);
$group_prop = $abook->get_group($group['ID']);
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index 3649d148c..8c0b1ffc0 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -81,9 +81,10 @@ foreach ($a_mailboxes as $mbox_name) {
if (empty($_GET['_list']))
continue;
- // get overall message count; allow caching because rcube_storage::folder_status() did a refresh
+ // get overall message count; allow caching because rcube_storage::folder_status()
+ // did a refresh but only in list mode
$list_mode = $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL';
- $all_count = $RCMAIL->storage->count($mbox_name, $list_mode, false, false);
+ $all_count = $RCMAIL->storage->count($mbox_name, $list_mode, $list_mode == 'THREADS', false);
$page = $RCMAIL->storage->get_page();
$page_size = $RCMAIL->storage->get_pagesize();
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index c166eb74e..9ffde8a57 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -139,12 +139,11 @@ if (!empty($CONFIG['drafts_mbox'])) {
}
// set current mailbox in client environment
$OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder());
-$OUTPUT->set_env('sig_above', $RCMAIL->config->get('sig_above', false));
$OUTPUT->set_env('top_posting', intval($RCMAIL->config->get('reply_mode')) > 0);
$OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ',')));
// default font for HTML editor
-$font = rcube_fontdefs($RCMAIL->config->get('default_font', 'Verdana'));
+$font = rcube_fontdefs($RCMAIL->config->get('default_font'));
if ($font && !is_array($font)) {
$OUTPUT->set_env('default_font', $font);
}
@@ -152,6 +151,7 @@ if ($font && !is_array($font)) {
// get reference message and set compose mode
if ($msg_uid = $COMPOSE['param']['draft_uid']) {
$compose_mode = RCUBE_COMPOSE_DRAFT;
+ $OUTPUT->set_env('draft_id', $msg_uid);
$RCMAIL->storage->set_folder($CONFIG['drafts_mbox']);
}
else if ($msg_uid = $COMPOSE['param']['reply_uid']) {
@@ -170,6 +170,9 @@ $OUTPUT->set_env('compose_mode', $compose_mode);
$config_show_sig = $RCMAIL->config->get('show_sig', 1);
if ($compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT) {
// don't add signature in draft/edit mode, we'll also not remove the old-one
+ // but only on page display, later we should be able to change identity/sig (#1489229)
+ if ($config_show_sig == 1 || $config_show_sig == 2)
+ $OUTPUT->set_env('show_sig_later', true);
}
else if ($config_show_sig == 1)
$OUTPUT->set_env('show_sig', true);
@@ -219,10 +222,10 @@ if (!empty($msg_uid) && empty($COMPOSE['as_attachment']))
$COMPOSE['param']['sent_mbox'] = $sent_folder;
}
}
- else if ($compose_mode == RCUBE_COMPOSE_DRAFT) {
- if ($MESSAGE->headers->others['x-draft-info']) {
+ else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) {
+ if ($compose_mode == RCUBE_COMPOSE_DRAFT && ($draft_info = $MESSAGE->headers->get('x-draft-info'))) {
// get reply_uid/forward_uid to flag the original message when sending
- $info = rcmail_draftinfo_decode($MESSAGE->headers->others['x-draft-info']);
+ $info = rcmail_draftinfo_decode($draft_info);
if ($info['type'] == 'reply')
$COMPOSE['reply_uid'] = $info['uid'];
@@ -239,10 +242,10 @@ if (!empty($msg_uid) && empty($COMPOSE['as_attachment']))
}
}
- if ($MESSAGE->headers->in_reply_to)
- $COMPOSE['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>';
+ if ($in_reply_to = $MESSAGE->headers->get('in-reply-to'))
+ $COMPOSE['reply_msgid'] = '<' . $in_reply_to . '>';
- $COMPOSE['references'] = $MESSAGE->headers->references;
+ $COMPOSE['references'] = $MESSAGE->headers->references;
}
}
else {
@@ -327,6 +330,20 @@ foreach ($parts as $header) {
$fvalue .= $v;
if ($v = $MESSAGE->headers->cc)
$fvalue .= (!empty($fvalue) ? $separator : '') . $v;
+ // Use Sender header (#1489011)
+ if (($v = $MESSAGE->headers->get('Sender', false)) && strpos($v, '-bounces@') === false)
+ $fvalue .= (!empty($fvalue) ? $separator : '') . $v;
+
+ // When To: and Reply-To: are the same we add From: address to the list (#1489037)
+ if ($v = $MESSAGE->headers->from) {
+ $from = rcube_mime::decode_address_list($v, null, false, $MESSAGE->headers->charset, true);
+ $to = rcube_mime::decode_address_list($MESSAGE->headers->to, null, false, $MESSAGE->headers->charset, true);
+ $replyto = rcube_mime::decode_address_list($MESSAGE->headers->replyto, null, false, $MESSAGE->headers->charset, true);
+
+ if (count($replyto) && !count(array_diff($to, $replyto)) && count(array_diff($from, $to))) {
+ $fvalue .= (!empty($fvalue) ? $separator : '') . $v;
+ }
+ }
}
}
else if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) {
@@ -386,7 +403,7 @@ function rcmail_compose_headers($attrib)
{
global $MESSAGE;
- list($form_start, $form_end) = get_form_tags($attrib);
+ list($form_start,) = get_form_tags($attrib);
$out = '';
$part = strtolower($attrib['part']);
@@ -450,7 +467,7 @@ function rcmail_compose_headers($attrib)
function rcmail_compose_header_from($attrib)
{
- global $MESSAGE, $OUTPUT, $RCMAIL, $compose_mode;
+ global $MESSAGE, $OUTPUT, $RCMAIL, $COMPOSE, $compose_mode;
// pass the following attributes to the form class
$field_attrib = array('name' => '_from');
@@ -461,7 +478,8 @@ function rcmail_compose_header_from($attrib)
if (count($MESSAGE->identities))
{
$a_signatures = array();
- $separator = $RCMAIL->config->get('sig_above')
+ $identities = array();
+ $separator = intval($RCMAIL->config->get('reply_mode')) > 0
&& ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- ';
$field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)";
@@ -498,12 +516,21 @@ function rcmail_compose_header_from($attrib)
$a_signatures[$identity_id]['text'] = $text;
$a_signatures[$identity_id]['html'] = $html;
}
+
+ // add bcc and reply-to
+ if (!empty($sql_arr['reply-to'])) {
+ $identities[$identity_id]['replyto'] = $sql_arr['reply-to'];
+ }
+ if (!empty($sql_arr['bcc'])) {
+ $identities[$identity_id]['bcc'] = $sql_arr['bcc'];
+ }
}
- $out = $select_from->show($MESSAGE->compose['from']);
+ $out = $select_from->show((int)$MESSAGE->compose['from']);
// add signatures to client
$OUTPUT->set_env('signatures', $a_signatures);
+ $OUTPUT->set_env('identities', $identities);
}
// no identities, display text input field
else {
@@ -553,7 +580,7 @@ function rcmail_message_is_html()
function rcmail_prepare_message_body()
{
- global $RCMAIL, $MESSAGE, $COMPOSE, $compose_mode, $LINE_LENGTH, $HTML_MODE;
+ global $RCMAIL, $MESSAGE, $COMPOSE, $compose_mode, $HTML_MODE;
// use posted message body
if (!empty($_POST['_message'])) {
@@ -571,16 +598,33 @@ function rcmail_prepare_message_body()
rcmail_write_forward_attachments();
}
// reply/edit/draft/forward
- else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || $RCMAIL->config->get('reply_mode') != -1)) {
- $isHtml = rcmail_compose_editor_mode();
+ else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || intval($RCMAIL->config->get('reply_mode')) != -1)) {
+ $isHtml = rcmail_compose_editor_mode();
+ $messages = array();
if (!empty($MESSAGE->parts)) {
+ // collect IDs of message/rfc822 parts
+ if ($compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT) {
+ foreach ($MESSAGE->attachments as $part) {
+ if ($part->mimetype == 'message/rfc822') {
+ $messages[] = $part->mime_id;
+ }
+ }
+ }
+
foreach ($MESSAGE->parts as $part) {
// skip no-content and attachment parts (#1488557)
if ($part->type != 'content' || !$part->size || $MESSAGE->is_attachment($part)) {
continue;
}
+ // skip all content parts inside the message/rfc822 part in DRAFT/EDIT mode
+ foreach ($messages as $mimeid) {
+ if (strpos($part->mime_id, $mimeid . '.') === 0) {
+ continue 2;
+ }
+ }
+
if ($part_body = rcmail_compose_part_body($part, $isHtml)) {
$body .= ($body ? ($isHtml ? '<br/>' : "\n") : '') . $part_body;
}
@@ -626,7 +670,7 @@ function rcmail_prepare_message_body()
function rcmail_compose_part_body($part, $isHtml = false)
{
- global $RCMAIL, $MESSAGE, $compose_mode;
+ global $RCMAIL, $MESSAGE, $LINE_LENGTH, $compose_mode;
// Check if we have enough memory to handle the message in it
// #1487424: we need up to 10x more memory than the body
@@ -663,6 +707,11 @@ function rcmail_compose_part_body($part, $isHtml = false)
$body = rcmail_remove_signature($body);
}
}
+
+ if ($part->ctype_parameters['format'] == 'flowed') {
+ $body = rcube_mime::unfold_flowed($body);
+ }
+
// add HTML formatting
$body = rcmail_plain_body($body);
if ($body) {
@@ -702,7 +751,7 @@ function rcmail_compose_part_body($part, $isHtml = false)
function rcmail_compose_body($attrib)
{
- global $RCMAIL, $CONFIG, $OUTPUT, $MESSAGE, $compose_mode, $LINE_LENGTH, $HTML_MODE, $MESSAGE_BODY;
+ global $RCMAIL, $CONFIG, $OUTPUT, $MESSAGE, $compose_mode, $HTML_MODE, $MESSAGE_BODY;
list($form_start, $form_end) = get_form_tags($attrib);
unset($attrib['form']);
@@ -886,8 +935,7 @@ function rcmail_create_forward_body($body, $bodyIsHtml)
if (!isset($COMPOSE['forward_attachments']) && is_array($MESSAGE->mime_parts))
$cid_map = rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml);
- $date = format_date($MESSAGE->headers->date, $RCMAIL->config->get('date_long'));
- $charset = $RCMAIL->output->get_charset();
+ $date = format_date($MESSAGE->headers->date, $RCMAIL->config->get('date_long'));
if (!$bodyIsHtml) {
$prefix = "\n\n\n-------- " . rcube_label('originalmessage') . " --------\n";
@@ -941,7 +989,7 @@ function rcmail_create_forward_body($body, $bodyIsHtml)
function rcmail_create_draft_body($body, $bodyIsHtml)
{
- global $MESSAGE, $OUTPUT, $COMPOSE;
+ global $MESSAGE, $COMPOSE;
/**
* add attachments
@@ -989,39 +1037,50 @@ function rcmail_write_compose_attachments(&$message, $bodyIsHtml)
global $RCMAIL, $COMPOSE, $compose_mode;
$loaded_attachments = array();
- foreach ((array)$COMPOSE['attachments'] as $id => $attachment) {
+ foreach ((array)$COMPOSE['attachments'] as $attachment) {
$loaded_attachments[$attachment['name'] . $attachment['mimetype']] = $attachment;
}
- $cid_map = $messages = array();
+ $cid_map = array();
+ $messages = array();
+
foreach ((array)$message->mime_parts as $pid => $part)
{
if ($part->disposition == 'attachment' || ($part->disposition == 'inline' && $bodyIsHtml) || $part->filename) {
- if (($part->ctype_primary == 'message' && $bodyIsHtml) || $part->ctype_primary == 'multipart') {
+ // skip parts that aren't valid attachments
+ if ($part->ctype_primary == 'multipart' || $part->mimetype == 'application/ms-tnef') {
continue;
}
- if ($part->mimetype == 'application/ms-tnef') {
+ // skip message attachments in reply mode
+ if ($part->ctype_primary == 'message' && $compose_mode == RCUBE_COMPOSE_REPLY) {
continue;
}
- // skip inline images when forwarding in plain text
- if ($part->content_id && !$bodyIsHtml && $compose_mode == RCUBE_COMPOSE_FORWARD) {
+ // skip inline images when forwarding in text mode
+ if ($part->content_id && $part->disposition == 'inline' && !$bodyIsHtml && $compose_mode == RCUBE_COMPOSE_FORWARD) {
continue;
}
- $skip = false;
+ // skip message/rfc822 attachments on forwards (#1489214)
+ // Thunderbird when forwarding in inline mode displays such attachments
+ // and skips any attachments from inside of such part, this however
+ // skipped e.g. images used in HTML body or other attachments. So,
+ // better to skip .eml attachments but not their content (included files).
if ($part->mimetype == 'message/rfc822') {
+ if ($compose_mode == RCUBE_COMPOSE_FORWARD) {
+ continue;
+ }
$messages[] = $part->mime_id;
- } else if ($messages) {
+ }
+ else if ($compose_mode != RCUBE_COMPOSE_FORWARD) {
// skip attachments included in message/rfc822 attachment (#1486487)
foreach ($messages as $mimeid)
- if (strpos($part->mime_id, $mimeid.'.') === 0) {
- $skip = true;
- break;
+ if (strpos($part->mime_id, $mimeid . '.') === 0) {
+ continue 2;
}
}
- if (!$skip && (($attachment = $loaded_attachments[rcmail_attachment_name($part) . $part->mimetype])
- || ($attachment = rcmail_save_attachment($message, $pid)))) {
+ if (($attachment = $loaded_attachments[rcmail_attachment_name($part) . $part->mimetype])
+ || ($attachment = rcmail_save_attachment($message, $pid))) {
$COMPOSE['attachments'][$attachment['id']] = $attachment;
if ($bodyIsHtml && ($part->content_id || $part->content_location)) {
$url = sprintf('%s&_id=%s&_action=display-attachment&_file=rcmfile%s',
@@ -1074,7 +1133,7 @@ function rcmail_write_forward_attachments()
$names = array();
$loaded_attachments = array();
- foreach ((array)$COMPOSE['attachments'] as $id => $attachment) {
+ foreach ((array)$COMPOSE['attachments'] as $attachment) {
$loaded_attachments[$attachment['name'] . $attachment['mimetype']] = $attachment;
}
@@ -1209,10 +1268,11 @@ function rcmail_save_image($path, $mimetype='')
// handle attachments in memory
$data = file_get_contents($path);
+ $name = rcmail_basename($path);
$attachment = array(
'group' => $COMPOSE['id'],
- 'name' => rcmail_basename($path),
+ 'name' => $name,
'mimetype' => $mimetype ? $mimetype : rc_mime_content_type($path, $name),
'data' => $data,
'size' => strlen($data),
@@ -1482,7 +1542,7 @@ function rcmail_editor_selector($attrib)
$select->add(Q(rcube_label('plaintoggle')), 'plain');
return $select->show($useHtml ? 'html' : 'plain');
-
+/*
foreach ($choices as $value => $text) {
$attrib['id'] = '_' . $value;
$attrib['value'] = $value;
@@ -1490,6 +1550,7 @@ function rcmail_editor_selector($attrib)
}
return $selector;
+*/
}
diff --git a/program/steps/mail/copy.inc b/program/steps/mail/copy.inc
index a72378b0e..876657485 100644
--- a/program/steps/mail/copy.inc
+++ b/program/steps/mail/copy.inc
@@ -24,10 +24,10 @@ if (!$OUTPUT->ajax_call)
return;
// move messages
-if (!empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) {
- $uids = get_input_value('_uid', RCUBE_INPUT_POST);
+if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) {
+ $uids = get_input_value('_uid', RCUBE_INPUT_POST);
$target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true);
+ $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true);
$copied = $RCMAIL->storage->copy_message($uids, $target, $mbox);
@@ -47,7 +47,7 @@ if (!empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) {
}
// unknown action or missing query param
else {
- exit;
+ $OUTPUT->show_message('internalerror', 'error');
}
// send response
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index da01e6cbf..ae23d4a6d 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -120,7 +120,7 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
if (!$OUTPUT->ajax_call)
$OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash',
'movingmessage', 'copyingmessage', 'deletingmessage', 'markingmessage',
- 'copy', 'move', 'quota');
+ 'copy', 'move', 'quota', 'replyall', 'replylist', 'importwait');
$pagetitle = $RCMAIL->localize_foldername($RCMAIL->storage->mod_folder($mbox_name), true);
$pagetitle = str_replace($delimiter, " \xC2\xBB ", $pagetitle);
@@ -128,6 +128,40 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
$OUTPUT->set_pagetitle($pagetitle);
}
+// register UI objects
+$OUTPUT->add_handlers(array(
+ 'mailboxlist' => 'rcmail_mailbox_list',
+ 'messages' => 'rcmail_message_list',
+ 'messagecountdisplay' => 'rcmail_messagecount_display',
+ 'quotadisplay' => 'rcmail_quota_display',
+ 'mailboxname' => 'rcmail_mailbox_name_display',
+ 'messageheaders' => 'rcmail_message_headers',
+ 'messagefullheaders' => 'rcmail_message_full_headers',
+ 'messagebody' => 'rcmail_message_body',
+ 'messagecontentframe' => 'rcmail_messagecontent_frame',
+ 'messageimportform' => 'rcmail_message_import_form',
+ 'searchfilter' => 'rcmail_search_filter',
+ 'searchform' => array($OUTPUT, 'search_form'),
+));
+
+// register action aliases
+$RCMAIL->register_action_map(array(
+ 'refresh' => 'check_recent.inc',
+ 'preview' => 'show.inc',
+ 'print' => 'show.inc',
+ 'move' => 'move_del.inc',
+ 'delete' => 'move_del.inc',
+ 'send' => 'sendmail.inc',
+ 'expunge' => 'folders.inc',
+ 'purge' => 'folders.inc',
+ 'remove-attachment' => 'attachments.inc',
+ 'display-attachment' => 'attachments.inc',
+ 'upload' => 'attachments.inc',
+ 'group-expand' => 'autocomplete.inc',
+));
+
+
+
/**
* Returns 'to' if current folder is configured Sent or Drafts
* or their subfolders, otherwise returns 'from'.
@@ -224,7 +258,7 @@ function rcmail_message_list($attrib)
if (!in_array('threads', $a_show_cols))
array_unshift($a_show_cols, 'threads');
- $skin_path = $_SESSION['skin_path'] = $CONFIG['skin_path'];
+ $_SESSION['skin_path'] = $CONFIG['skin_path'];
// set client env
$OUTPUT->add_gui_object('messagelist', $attrib['id']);
@@ -236,15 +270,13 @@ function rcmail_message_list($attrib)
$OUTPUT->include_script('list.js');
- $thead = '';
- foreach (rcmail_message_list_head($attrib, $a_show_cols) as $cell)
- $thead .= html::tag('td', array('class' => $cell['className'], 'id' => $cell['id']), $cell['html']);
+ $table = new html_table($attrib);
+ if (!$attrib['noheader']) {
+ foreach (rcmail_message_list_head($attrib, $a_show_cols) as $cell)
+ $table->add_header(array('class' => $cell['className'], 'id' => $cell['id']), $cell['html']);
+ }
- return html::tag('table',
- $attrib,
- html::tag('thead', null, html::tag('tr', null, $thead)) .
- html::tag('tbody', null, ''),
- array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary'));
+ return $table->show();
}
@@ -291,7 +323,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
$thead = $head_replace ? rcmail_message_list_head($_SESSION['list_attrib'], $a_show_cols) : NULL;
// get name of smart From/To column in folder context
- if (($f = array_search('fromto', $a_show_cols)) !== false) {
+ if (array_search('fromto', $a_show_cols) !== false) {
$smart_col = rcmail_message_list_smart_column_name();
}
@@ -307,7 +339,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
}
// loop through message headers
- foreach ($a_headers as $n => $header) {
+ foreach ($a_headers as $header) {
if (empty($header))
continue;
@@ -381,7 +413,6 @@ function rcmail_message_list_head($attrib, $a_show_cols)
global $RCMAIL;
$skin_path = $_SESSION['skin_path'];
- $image_tag = html::img(array('src' => "%s%s", 'alt' => "%s"));
// check to see if we have some settings for sorting
$sort_col = $_SESSION['sort_col'];
@@ -417,7 +448,7 @@ function rcmail_message_list_head($attrib, $a_show_cols)
$cells = array();
// get name of smart From/To column in folder context
- if (($f = array_search('fromto', $a_show_cols)) !== false) {
+ if (array_search('fromto', $a_show_cols) !== false) {
$smart_col = rcmail_message_list_smart_column_name();
}
@@ -738,8 +769,13 @@ function rcmail_print_body($part, $p = array())
unset($data['body']);
// plaintext postprocessing
- if ($part->ctype_secondary == 'plain')
- $body = rcmail_plain_body($body, $part->ctype_parameters['format'] == 'flowed');
+ if ($part->ctype_secondary == 'plain') {
+ if ($part->ctype_secondary == 'plain' && $part->ctype_parameters['format'] == 'flowed') {
+ $body = rcube_mime::unfold_flowed($body);
+ }
+
+ $body = rcmail_plain_body($body);
+ }
// allow post-processing of the message body
$data = $RCMAIL->plugins->exec_hook('message_part_after',
@@ -753,11 +789,10 @@ function rcmail_print_body($part, $p = array())
* Handle links and citation marks in plain text message
*
* @param string Plain text string
- * @param boolean Text uses format=flowed
*
* @return string Formatted HTML string
*/
-function rcmail_plain_body($body, $flowed=false)
+function rcmail_plain_body($body)
{
global $RCMAIL;
@@ -782,53 +817,17 @@ function rcmail_plain_body($body, $flowed=false)
if ($q > $quote_level) {
$body[$n] = $replacer->get_replacement($replacer->add(
str_repeat('<blockquote>', $q - $quote_level))) . $body[$n];
+ $last = $n;
}
else if ($q < $quote_level) {
$body[$n] = $replacer->get_replacement($replacer->add(
str_repeat('</blockquote>', $quote_level - $q))) . $body[$n];
- }
- else if ($flowed) {
- // previous line is flowed
- if (isset($body[$last]) && $body[$n]
- && $body[$last][strlen($body[$last])-1] == ' ') {
- // merge lines
- $body[$last] .= $body[$n];
- unset($body[$n]);
- }
- else {
- $last = $n;
- }
+ $last = $n;
}
}
else {
$q = 0;
- if ($flowed) {
- // sig separator - line is fixed
- if ($body[$n] == '-- ') {
- $last = $last_sig = $n;
- }
- else {
- // remove space-stuffing
- if ($body[$n][0] == ' ')
- $body[$n] = substr($body[$n], 1);
-
- // previous line is flowed?
- if (isset($body[$last]) && $body[$n]
- && $last !== $last_sig
- && $body[$last][strlen($body[$last])-1] == ' '
- ) {
- $body[$last] .= $body[$n];
- unset($body[$n]);
- }
- else {
- $last = $n;
- }
- }
- if ($quote_level > 0)
- $body[$last] = $replacer->get_replacement($replacer->add(
- str_repeat('</blockquote>', $quote_level))) . $body[$last];
- }
- else if ($quote_level > 0)
+ if ($quote_level > 0)
$body[$n] = $replacer->get_replacement($replacer->add(
str_repeat('</blockquote>', $quote_level))) . $body[$n];
}
@@ -898,8 +897,8 @@ function rcmail_washtml_callback($tagname, $attrib, $content, $washtml)
* return table with message headers
*/
function rcmail_message_headers($attrib, $headers=null)
- {
- global $OUTPUT, $MESSAGE, $PRINT_MODE, $RCMAIL;
+{
+ global $MESSAGE, $PRINT_MODE, $RCMAIL;
static $sa_attrib;
// keep header table attrib
@@ -937,7 +936,7 @@ function rcmail_message_headers($attrib, $headers=null)
$value = $headers[$hkey];
else if ($headers['others'][$hkey])
$value = $headers['others'][$hkey];
- else
+ else if (!$attrib['valueof'])
continue;
if (in_array($hkey, $exclude_headers))
@@ -1084,7 +1083,7 @@ function rcmail_message_body($attrib)
$header_attrib[$regs[1]] = $value;
if (!empty($MESSAGE->parts)) {
- foreach ($MESSAGE->parts as $i => $part) {
+ foreach ($MESSAGE->parts as $part) {
if ($part->type == 'headers') {
$out .= html::div('message-partheaders', rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : null, $part->headers));
}
@@ -1196,7 +1195,7 @@ function rcmail_message_body($attrib)
html::a($show_link + array('class' => 'image-link', 'style' => sprintf('width:%dpx', $thumbnail_size)),
html::img(array(
'class' => 'image-thumbnail',
- 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, true) . '&_thumb=1',
+ 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image') . '&_thumb=1',
'title' => $attach_prop->filename,
'alt' => $attach_prop->filename,
'style' => sprintf('max-width:%dpx; max-height:%dpx', $thumbnail_size, $thumbnail_size),
@@ -1216,7 +1215,7 @@ function rcmail_message_body($attrib)
html::tag('legend', 'image-filename', Q($attach_prop->filename)) .
html::p(array('align' => "center"),
html::img(array(
- 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, true),
+ 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image'),
'title' => $attach_prop->filename,
'alt' => $attach_prop->filename,
)))
@@ -1442,7 +1441,8 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
$c = count($a_parts);
$j = 0;
$out = '';
- $allvalues = array();
+ $allvalues = array();
+ $show_email = $RCMAIL->config->get('message_show_email');
if ($addicon && !isset($_SESSION['writeable_abook'])) {
$_SESSION['writeable_abook'] = $RCMAIL->get_address_sources(true) ? true : false;
@@ -1453,9 +1453,10 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
$name = $part['name'];
$mailto = $part['mailto'];
$string = $part['string'];
+ $valid = check_email($mailto, false);
// phishing email prevention (#1488981), e.g. "valid@email.addr <phishing@email.addr>"
- if ($name && $name != $mailto && strpos($name, '@')) {
+ if (!$show_email && $valid && $name && $name != $mailto && strpos($name, '@')) {
$name = '';
}
@@ -1471,15 +1472,23 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
// for printing we display all addresses
continue;
}
- else if (check_email($part['mailto'], false)) {
+ else if ($valid) {
if ($linked) {
- $address = html::a(array(
- 'href' => 'mailto:'.$mailto,
- 'onclick' => sprintf("return %s.command('compose','%s',this)", JS_OBJECT_NAME, JQ($mailto)),
- 'title' => $mailto,
- 'class' => "rcmContactAddress",
- ),
- Q($name ? $name : $mailto));
+ $attrs = array(
+ 'href' => 'mailto:' . $mailto,
+ 'onclick' => sprintf("return %s.command('compose','%s',this)", JS_OBJECT_NAME, JQ($mailto)),
+ 'class' => "rcmContactAddress",
+ );
+
+ if ($show_email && $name && $mailto) {
+ $content = Q($name ? sprintf('%s <%s>', $name, $mailto) : $mailto);
+ }
+ else {
+ $content = Q($name ? $name : $mailto);
+ $attrs['title'] = $mailto;
+ }
+
+ $address = html::a($attrs, $content);
}
else {
$address = html::span(array('title' => $mailto, 'class' => "rcmContactAddress"),
@@ -1504,7 +1513,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
if ($name)
$address .= Q($name);
if ($mailto)
- $address .= (strlen($address) ? ' ' : '') . sprintf('&lt;%s&gt;', Q($mailto));
+ $address = trim($address . ' ' . Q($name ? sprintf('<%s>', $mailto) : $mailto));
}
$address = html::span('adr', $address);
@@ -1543,11 +1552,11 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
/**
* Wrap text to a given number of characters per line
* but respect the mail quotation of replies messages (>).
- * Finally add another quotation level by prpending the lines
+ * Finally add another quotation level by prepending the lines
* with >
*
* @param string Text to wrap
- * @param int The line width
+ * @param int The line width
* @return string The wrapped text
*/
function rcmail_wrap_and_quote($text, $length = 72)
@@ -1563,7 +1572,7 @@ function rcmail_wrap_and_quote($text, $length = 72)
$line = '>' . rtrim($line);
else if (mb_strlen($line) > $max) {
$newline = '';
- foreach(explode("\n", rc_wordwrap($line, $length - 2)) as $l) {
+ foreach (explode("\n", rc_wordwrap($line, $length - 2)) as $l) {
if (strlen($l))
$newline .= '> ' . $l . "\n";
else
@@ -1606,45 +1615,6 @@ function rcmail_draftinfo_decode($str)
}
-function rcmail_message_part_controls($attrib)
-{
- global $MESSAGE, $RCMAIL;
-
- $part = asciiwords(get_input_value('_part', RCUBE_INPUT_GPC));
- if (!is_object($MESSAGE) || !is_array($MESSAGE->parts) || !($_GET['_uid'] && $_GET['_part']) || !$MESSAGE->mime_parts[$part])
- return '';
-
- $part = $MESSAGE->mime_parts[$part];
- $table = new html_table(array('cols' => 3));
-
- $filename = rcmail_attachment_name($part);
-
- if (!empty($filename)) {
- $table->add('title', Q(rcube_label('filename')));
- $table->add('header', Q($filename));
- $table->add('download-link', html::a(array('href' => './?'.str_replace('_frame=', '_download=', $_SERVER['QUERY_STRING'])), Q(rcube_label('download'))));
- }
-
- $table->add('title', Q(rcube_label('filesize')));
- $table->add('header', Q($RCMAIL->message_part_size($part)));
-
- return $table->show($attrib);
-}
-
-
-function rcmail_message_part_frame($attrib)
-{
- global $MESSAGE;
-
- $part = $MESSAGE->mime_parts[asciiwords(get_input_value('_part', RCUBE_INPUT_GPC))];
- $ctype_primary = strtolower($part->ctype_primary);
-
- $attrib['src'] = './?' . str_replace('_frame=', ($ctype_primary=='text' ? '_embed=' : '_preload='), $_SERVER['QUERY_STRING']);
-
- return html::iframe($attrib);
-}
-
-
/**
* clear message composing settings
*/
@@ -1732,8 +1702,7 @@ function rcmail_send_mdn($message, &$smtp_error)
$sent = rcmail_deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file, $options);
- if ($sent)
- {
+ if ($sent) {
$RCMAIL->storage->set_flag($message->uid, 'MDNSENT');
return true;
}
@@ -1814,9 +1783,12 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r
// Try Return-Path
if ($from_idx === null && ($return_path = $MESSAGE->headers->others['return-path'])) {
foreach ($identities as $idx => $ident) {
- if (strpos($return_path, str_replace('@', '=', $ident['email_ascii']).'@') !== false) {
- $from_idx = $idx;
- break;
+ $ident = str_replace('@', '=', $ident['email_ascii']) . '@';
+ foreach ((array)$return_path as $path) {
+ if (strpos($path, $ident) !== false) {
+ $from_idx = $idx;
+ break 2;
+ }
}
}
}
@@ -1851,8 +1823,7 @@ function rcmail_fix_mimetype($name)
// application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608
if (preg_match('/^application\/pdf.+/', $name))
$name = 'application/pdf';
-
- // treat image/pjpeg as image/jpeg
+ // treat image/pjpeg (image/pjpg, image/jpg) as image/jpeg (#1489097)
else if (preg_match('/^image\/p?jpe?g$/', $name))
$name = 'image/jpeg';
@@ -1899,13 +1870,15 @@ function rcmail_search_filter($attrib)
$attrib['onchange'] = JS_OBJECT_NAME.'.filter_mailbox(this.value)';
- /*
- RFC3501 (6.4.4): 'ALL', 'RECENT',
- 'ANSWERED', 'DELETED', 'FLAGGED', 'SEEN',
- 'UNANSWERED', 'UNDELETED', 'UNFLAGGED', 'UNSEEN',
- 'NEW', // = (RECENT UNSEEN)
- 'OLD' // = NOT RECENT
- */
+ // Content-Type values of messages with attachments
+ // the same as in app.js:add_message_row()
+ $ctypes = array('application/', 'multipart/m', 'multipart/signed', 'multipart/report');
+
+ // Build search string of "with attachment" filter
+ $attachment = str_repeat(' OR', count($ctypes)-1);
+ foreach ($ctypes as $type) {
+ $attachment .= ' HEADER Content-Type ' . rcube_imap_generic::escape($type);
+ }
$select_filter = new html_select($attrib);
$select_filter->add(rcube_label('all'), 'ALL');
@@ -1916,6 +1889,7 @@ function rcmail_search_filter($attrib)
$select_filter->add(rcube_label('deleted'), 'DELETED');
$select_filter->add(rcube_label('undeleted'), 'UNDELETED');
}
+ $select_filter->add(rcube_label('withattachment'), $attachment);
$select_filter->add(rcube_label('priority').': '.rcube_label('highest'), 'HEADER X-PRIORITY 1');
$select_filter->add(rcube_label('priority').': '.rcube_label('high'), 'HEADER X-PRIORITY 2');
$select_filter->add(rcube_label('priority').': '.rcube_label('normal'), 'NOT HEADER X-PRIORITY 1 NOT HEADER X-PRIORITY 2 NOT HEADER X-PRIORITY 4 NOT HEADER X-PRIORITY 5');
@@ -1945,35 +1919,37 @@ function rcmail_message_error($uid=null)
$RCMAIL->output->send('messageerror');
}
-// register UI objects
-$OUTPUT->add_handlers(array(
- 'mailboxlist' => 'rcmail_mailbox_list',
- 'messages' => 'rcmail_message_list',
- 'messagecountdisplay' => 'rcmail_messagecount_display',
- 'quotadisplay' => 'rcmail_quota_display',
- 'mailboxname' => 'rcmail_mailbox_name_display',
- 'messageheaders' => 'rcmail_message_headers',
- 'messagefullheaders' => 'rcmail_message_full_headers',
- 'messagebody' => 'rcmail_message_body',
- 'messagecontentframe' => 'rcmail_messagecontent_frame',
- 'messagepartframe' => 'rcmail_message_part_frame',
- 'messagepartcontrols' => 'rcmail_message_part_controls',
- 'searchfilter' => 'rcmail_search_filter',
- 'searchform' => array($OUTPUT, 'search_form'),
-));
+function rcmail_message_import_form($attrib = array())
+{
+ global $OUTPUT;
-// register action aliases
-$RCMAIL->register_action_map(array(
- 'refresh' => 'check_recent.inc',
- 'preview' => 'show.inc',
- 'print' => 'show.inc',
- 'moveto' => 'move_del.inc',
- 'delete' => 'move_del.inc',
- 'send' => 'sendmail.inc',
- 'expunge' => 'folders.inc',
- 'purge' => 'folders.inc',
- 'remove-attachment' => 'attachments.inc',
- 'display-attachment' => 'attachments.inc',
- 'upload' => 'attachments.inc',
- 'group-expand' => 'autocomplete.inc',
-));
+ // set defaults
+ $attrib += array('id' => 'rcmImportform', 'buttons' => 'yes');
+
+ // Get filesize, enable upload progress bar
+ $max_filesize = rcube_upload_init();
+
+ $button = new html_inputfield(array('type' => 'button'));
+ $fileinput = new html_inputfield(array(
+ 'type' => 'file',
+ 'name' => '_file[]',
+ 'size' => $attrib['attachmentfieldsize'],
+ 'multiple' => 'multiple',
+ 'accept' => ".eml, .mbox, message/rfc822, text/*",
+ ));
+
+ $out = html::div($attrib,
+ $OUTPUT->form_tag(array('id' => $attrib['id'].'Frm', 'method' => 'post', 'enctype' => 'multipart/form-data'),
+ html::tag('input', array('type' => 'hidden', 'name' => '_unlock', 'value' => '')) .
+ html::div(null, $fileinput->show()) .
+ html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) .
+ (get_boolean($attrib['buttons']) ? html::div('buttons',
+ $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' .
+ $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('import-messages', this.form)"))
+ ) : '')
+ )
+ );
+
+ $OUTPUT->add_gui_object('importform', $attrib['id'].'Frm');
+ return $out;
+}
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 23dc22b7c..a27e788a3 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -22,7 +22,7 @@
// show loading page
if (!empty($_GET['_preload'])) {
- $url = preg_replace('/([&?]+)_preload=/', '\\1_embed=', $_SERVER['REQUEST_URI']);
+ $url = preg_replace('/([&?]+)_preload=/', '\\1_mimewarning=1&_embed=', $_SERVER['REQUEST_URI']);
$message = rcube_label('loadingdata');
header('Content-Type: text/html; charset=' . RCMAIL_CHARSET);
@@ -38,19 +38,34 @@ ob_end_clean();
// similar code as in program/steps/mail/show.inc
if (!empty($_GET['_uid'])) {
+ $uid = get_input_value('_uid', RCUBE_INPUT_GET);
$RCMAIL->config->set('prefer_html', true);
- $MESSAGE = new rcube_message(get_input_value('_uid', RCUBE_INPUT_GET));
+ $MESSAGE = new rcube_message($uid);
}
// check connection status
check_storage_status();
+$part_id = get_input_value('_part', RCUBE_INPUT_GPC);
+
// show part page
if (!empty($_GET['_frame'])) {
- if (($part_id = get_input_value('_part', RCUBE_INPUT_GPC)) && ($part = $MESSAGE->mime_parts[$part_id])) {
- $OUTPUT->set_pagetitle(rcmail_attachment_name($part));
+ if ($part_id && ($part = $MESSAGE->mime_parts[$part_id])) {
+ $filename = rcmail_attachment_name($part);
+ $OUTPUT->set_pagetitle($filename);
}
+ // register UI objects
+ $OUTPUT->add_handlers(array(
+ 'messagepartframe' => 'rcmail_message_part_frame',
+ 'messagepartcontrols' => 'rcmail_message_part_controls',
+ ));
+
+ $OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder());
+ $OUTPUT->set_env('uid', $uid);
+ $OUTPUT->set_env('part', $part_id);
+ $OUTPUT->set_env('filename', $filename);
+
$OUTPUT->send('messagepart');
exit;
}
@@ -62,9 +77,10 @@ else if ($_GET['_thumb']) {
$thumbnail_size = $RCMAIL->config->get('image_thumbnail_size', 240);
$temp_dir = $RCMAIL->config->get('temp_dir');
list(,$ext) = explode('/', $part->mimetype);
- $cache_basename = $temp_dir . '/' . md5($MESSAGE->headers->messageID . $part->mime_id . ':' . $RCMAIL->user->ID . ':' . $thumbnail_size);
- $cache_file = $cache_basename . '.' . $ext;
$mimetype = $part->mimetype;
+ $file_ident = $MESSAGE->headers->messageID . ':' . $part->mime_id . ':' . $part->size . ':' . $part->mimetype;
+ $cache_basename = $temp_dir . '/' . md5($file_ident . ':' . $RCMAIL->user->ID . ':' . $thumbnail_size);
+ $cache_file = $cache_basename . '.' . $ext;
// render thumbnail image if not done yet
if (!is_file($cache_file)) {
@@ -91,12 +107,9 @@ else if ($_GET['_thumb']) {
exit;
}
-else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
-
- if ($part = $MESSAGE->mime_parts[$pid]) {
- $ctype_primary = strtolower($part->ctype_primary);
- $ctype_secondary = strtolower($part->ctype_secondary);
- $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary);
+else if (strlen($part_id)) {
+ if ($part = $MESSAGE->mime_parts[$part_id]) {
+ $mimetype = rcmail_fix_mimetype($part->mimetype);
// allow post-processing of the message body
$plugin = $RCMAIL->plugins->exec_hook('message_part_get',
@@ -106,7 +119,7 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
exit;
// overwrite modified vars from plugin
- $mimetype = $plugin['mimetype'];
+ $mimetype = $plugin['mimetype'];
$extensions = rcube_mime::get_mime_extensions($mimetype);
if ($plugin['body'])
@@ -118,7 +131,7 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
$file_extension = strtolower(pathinfo($part->filename, PATHINFO_EXTENSION));
// 1. compare filename suffix with expected suffix derived from mimetype
- $valid = $file_extension && in_array($file_extension, (array)$extensions);
+ $valid = $file_extension && in_array($file_extension, (array)$extensions) || !empty($_REQUEST['_mimeclass']);
// 2. detect the real mimetype of the attachment part and compare it with the stated mimetype and filename extension
if ($valid || !$file_extension || $mimetype == 'application/octet-stream' || $mimetype == 'text/plain') {
@@ -145,6 +158,10 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
$extensions = rcube_mime::get_mime_extensions($real_mimetype);
$valid_extension = (!$file_extension || in_array($file_extension, (array)$extensions));
+ // ignore filename extension if mimeclass matches (#1489029)
+ if (!empty($_REQUEST['_mimeclass']) && $real_ctype_primary == $_REQUEST['_mimeclass'])
+ $valid_extension = true;
+
// fix mimetype for images wrongly declared as octet-stream
if ($mimetype == 'application/octet-stream' && strpos($real_mimetype, 'image/') === 0 && $valid_extension)
$mimetype = $real_mimetype;
@@ -157,22 +174,32 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
// show warning if validity checks failed
if (!$valid) {
- $OUTPUT = new rcmail_html_page();
- $OUTPUT->write(html::tag('html', null, html::tag('body', 'embed',
- html::div(array('class' => 'rcmail-inline-message rcmail-inline-warning'),
- rcube_label(array(
- 'name' => 'attachmentvalidationerror',
- 'vars' => array(
- 'expected' => $mimetype . ($file_extension ? "(.$file_extension)" : ''),
- 'detected' => $real_mimetype . ($extensions[0] ? "(.$extensions[0])" : ''),
+ // send blocked.gif for expected images
+ if (empty($_REQUEST['_mimewarning']) && strpos($mimetype, 'image/') === 0) {
+ // Do not cache. Failure might be the result of a misconfiguration, thus real content should be returned once fixed.
+ $OUTPUT->nocacheing_headers();
+ header("Content-Type: image/gif");
+ header("Content-Transfer-Encoding: binary");
+ readfile(INSTALL_PATH . 'program/resources/blocked.gif');
+ }
+ else { // html warning with a button to load the file anyway
+ $OUTPUT = new rcmail_html_page();
+ $OUTPUT->write(html::tag('html', null, html::tag('body', 'embed',
+ html::div(array('class' => 'rcmail-inline-message rcmail-inline-warning'),
+ rcube_label(array(
+ 'name' => 'attachmentvalidationerror',
+ 'vars' => array(
+ 'expected' => $mimetype . ($file_extension ? "(.$file_extension)" : ''),
+ 'detected' => $real_mimetype . ($extensions[0] ? "(.$extensions[0])" : ''),
+ )
+ )) .
+ html::p(array('class' => 'rcmail-inline-buttons'),
+ html::tag('button',
+ array('onclick' => "location.href='" . $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))) . "'"),
+ rcube_label('showanyway')))
)
- )) .
- html::p(array('class' => 'rcmail-inline-buttons'),
- html::tag('button',
- array('onclick' => "location.href='" . $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))) . "'"),
- rcube_label('showanyway')))
- )
- )));
+ )));
+ }
exit;
}
}
@@ -202,7 +229,6 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) {
header("Content-Type: text/$ctype_secondary; charset=" . ($part->charset ? $part->charset : RCMAIL_CHARSET));
}
else {
- $mimetype = rcmail_fix_mimetype($mimetype);
header("Content-Type: $mimetype");
header("Content-Transfer-Encoding: binary");
}
@@ -366,7 +392,9 @@ else {
header('HTTP/1.1 404 Not Found');
exit;
-
+/**
+ * Handles nicely storage connection errors
+ */
function check_storage_status()
{
$error = rcmail::get_instance()->storage->get_error_code();
@@ -398,3 +426,49 @@ function check_storage_status()
exit;
}
}
+
+/**
+ * Attachment properties table
+ */
+function rcmail_message_part_controls($attrib)
+{
+ global $MESSAGE, $RCMAIL;
+
+ $part = asciiwords(get_input_value('_part', RCUBE_INPUT_GPC));
+ if (!is_object($MESSAGE) || !is_array($MESSAGE->parts)
+ || !($_GET['_uid'] && $_GET['_part']) || !$MESSAGE->mime_parts[$part]
+ ) {
+ return '';
+ }
+
+ $part = $MESSAGE->mime_parts[$part];
+ $table = new html_table(array('cols' => 2));
+
+ $table->add('title', Q(rcube_label('namex')).':');
+ $table->add('header', Q(rcmail_attachment_name($part)));
+
+ $table->add('title', Q(rcube_label('type')).':');
+ $table->add('header', Q($part->mimetype));
+
+ $table->add('title', Q(rcube_label('size')).':');
+ $table->add('header', Q($RCMAIL->message_part_size($part)));
+
+ return $table->show($attrib);
+}
+
+/**
+ * Attachment preview frame
+ */
+function rcmail_message_part_frame($attrib)
+{
+ global $MESSAGE, $RCMAIL;
+
+ $part = $MESSAGE->mime_parts[asciiwords(get_input_value('_part', RCUBE_INPUT_GPC))];
+ $ctype_primary = strtolower($part->ctype_primary);
+
+ $attrib['src'] = './?' . str_replace('_frame=', ($ctype_primary=='text' ? '_embed=' : '_preload='), $_SERVER['QUERY_STRING']);
+
+ $RCMAIL->output->add_gui_object('messagepartframe', $attrib['id']);
+
+ return html::iframe($attrib);
+}
diff --git a/program/steps/mail/import.inc b/program/steps/mail/import.inc
new file mode 100644
index 000000000..f7e7a3eb8
--- /dev/null
+++ b/program/steps/mail/import.inc
@@ -0,0 +1,105 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | program/steps/mail/import.inc |
+ | |
+ | This file is part of the Roundcube Webmail client |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ | PURPOSE: |
+ | Save the uploaded file(s) as messages to the current IMAP folder |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Thomas Bruederli <roundcube@gmail.com> |
+ +-----------------------------------------------------------------------+
+*/
+
+// clear all stored output properties (like scripts and env vars)
+$OUTPUT->reset();
+
+if (is_array($_FILES['_file'])) {
+ $imported = 0;
+
+ foreach ((array)$_FILES['_file']['tmp_name'] as $i => $filepath) {
+ // Process uploaded file if there is no error
+ $err = $_FILES['_file']['error'][$i];
+
+ if (!$err) {
+ // check file content type first
+ list($mtype_primary,) = explode('/', rc_mime_content_type($filepath, $_FILES['_file']['name'][$i], $_FILES['_file']['type'][$i]));
+ if (!in_array($mtype_primary, array('text','message'))) {
+ $OUTPUT->show_message('importmessageerror', 'error');
+ continue;
+ }
+
+ // read the first few lines to detect header-like structure
+ $fp = fopen($filepath, 'r');
+ do { $line = fgets($fp); }
+ while ($line !== false && trim($line) == '');
+
+ if (!preg_match('/^From\s+-/', $line) && !preg_match('/^[a-z-_]+:\s+.+/i', $line)) {
+ $OUTPUT->show_message('importmessageerror', 'error');
+ continue;
+ }
+
+ $message = $lastline = '';
+ fseek($fp, 0);
+ while (($line = fgets($fp)) !== false) {
+ // importing mbox file, split by From - lines
+ if (preg_match('/^From\s+-/', $line) && $lastline == '') {
+ if (!empty($message)) {
+ if ($RCMAIL->storage->save_message(null, rtrim($message))) {
+ $imported++;
+ }
+ else {
+ rcube::raise_error("Failed to import message to " . $RCMAIL->storage->get_folder(), false, true);
+ }
+ $message = '';
+ }
+ continue;
+ }
+
+ $message .= $line;
+ $lastline = rtrim($line);
+ }
+
+ if (!empty($message) && $RCMAIL->storage->save_message(null, rtrim($message))) {
+ $imported++;
+ }
+ }
+
+ if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
+ $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
+ }
+ else if ($err) {
+ $OUTPUT->show_message('fileuploaderror', 'error');
+ }
+ } // end foreach
+
+ if ($imported) {
+ $OUTPUT->show_message(rcube_label(array('name' => 'importmessagesuccess', 'nr' => $imported, 'vars' => array('nr' => $imported))), 'confirmation');
+ $OUTPUT->command('command', 'list');
+ }
+ else {
+ $OUTPUT->show_message('importmessageerror', 'error');
+ }
+}
+else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+ // if filesize exceeds post_max_size then $_FILES array is empty,
+ // show filesizeerror instead of fileuploaderror
+ if ($maxsize = ini_get('post_max_size'))
+ $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes($maxsize)))));
+ else
+ $msg = rcube_label('fileuploaderror');
+
+ $OUTPUT->command('display_message', $msg, 'error');
+}
+
+// send html page with JS calls as response
+$OUTPUT->send('iframe');
+
diff --git a/program/steps/mail/list_contacts.inc b/program/steps/mail/list_contacts.inc
index 7e3b349cd..dab146431 100644
--- a/program/steps/mail/list_contacts.inc
+++ b/program/steps/mail/list_contacts.inc
@@ -19,10 +19,10 @@
+-----------------------------------------------------------------------+
*/
-$afields = $RCMAIL->config->get('contactlist_fields');
-$sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
-$page_size = $RCMAIL->config->get('addressbook_pagesize', $RCMAIL->config->get('pagesize', 50));
-$page = max(1, intval($_GET['_page']));
+$afields = $RCMAIL->config->get('contactlist_fields');
+$addr_sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
+$page_size = $RCMAIL->config->get('addressbook_pagesize', $RCMAIL->config->get('pagesize', 50));
+$list_page = max(1, intval($_GET['_page']));
// Use search result
if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']])) {
@@ -42,7 +42,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search
while ($row = $result->next()) {
$row['sourceid'] = $s;
- $key = rcube_addressbook::compose_contact_key($row, $sort_col);
+ $key = rcube_addressbook::compose_contact_key($row, $addr_sort_col);
$records[$key] = $row;
}
unset($result);
@@ -53,7 +53,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search
// create resultset object
$count = count($records);
- $first = ($page-1) * $page_size;
+ $first = ($list_page-1) * $page_size;
$result = new rcube_result_set($count, $first);
// we need only records for current page
@@ -71,10 +71,13 @@ else {
if ($CONTACTS && $CONTACTS->ready) {
// set list properties
$CONTACTS->set_pagesize($page_size);
- $CONTACTS->set_page($page);
+ $CONTACTS->set_page($list_page);
+ if ($group_id = get_input_value('_gid', RCUBE_INPUT_GPC)) {
+ $CONTACTS->set_group($group_id);
+ }
// list groups of this source (on page one)
- if ($CONTACTS->groups && $CONTACTS->list_page == 1) {
+ else if ($CONTACTS->groups && $CONTACTS->list_page == 1) {
foreach ($CONTACTS->list_groups() as $group) {
$CONTACTS->reset();
$CONTACTS->set_group($group['ID']);
@@ -89,6 +92,19 @@ else {
'contactgroup' => html::span(array('title' => $email), Q($group['name']))), 'group');
}
}
+ // make virtual groups clickable to list their members
+ else if ($group_prop['virtual']) {
+ $row_id = 'G'.$group['ID'];
+ $OUTPUT->command('add_contact_row', $row_id, array(
+ 'contactgroup' => html::a(array(
+ 'href' => '#list',
+ 'rel' => $row['ID'],
+ 'title' => rcube_label('listgroup'),
+ 'onclick' => sprintf("return %s.command('pushgroup',{'source':'%s','id':'%s'},this,event)", JS_OBJECT_NAME, $source, $group['ID']),
+ ), Q($group['name']) . '&nbsp;' . html::span('action', '&raquo;'))),
+ 'group',
+ array('ID' => $group['ID'], 'name' => $group['name'], 'virtual' => true));
+ }
// show group with count
else if (($result = $CONTACTS->count()) && $result->count) {
$row_id = 'E'.$group['ID'];
@@ -97,10 +113,12 @@ else {
'contactgroup' => Q($group['name'] . ' (' . intval($result->count) . ')')), 'group');
}
}
+
+ $CONTACTS->reset();
+ $CONTACTS->set_group(0);
}
// get contacts for this user
- $CONTACTS->set_group(0);
$result = $CONTACTS->list_records($afields);
}
}
@@ -118,10 +136,13 @@ else if (!empty($result) && $result->count > 0) {
foreach ($emails as $i => $email) {
$row_id = $row['ID'].$i;
$jsresult[$row_id] = format_email_recipient($email, $name);
+ $classname = $row['_type'] == 'group' ? 'group' : 'person';
+ $keyname = $row['_type'] == 'group' ? 'contactgroup' : 'contact';
+
$OUTPUT->command('add_contact_row', $row_id, array(
- 'contact' => html::span(array('title' => $email), Q($name ? $name : $email) .
+ $keyname => html::span(array('title' => $email), Q($name ? $name : $email) .
($name && count($emails) > 1 ? '&nbsp;' . html::span('email', Q($email)) : '')
- )), 'person');
+ )), $classname);
}
}
}
diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc
index c220fc5c4..dfc892ea1 100644
--- a/program/steps/mail/mark.inc
+++ b/program/steps/mail/mark.inc
@@ -113,7 +113,7 @@ if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_va
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count), $mbox);
if ($threading) {
- $count = get_input_value('_count', RCUBE_INPUT_POST);
+ $count = get_input_value('_count', RCUBE_INPUT_POST);
}
// add new rows from next page (if any)
@@ -125,9 +125,9 @@ if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_va
}
}
}
-
- $OUTPUT->send();
+}
+else {
+ $OUTPUT->show_message('internalerror', 'error');
}
-exit;
-
+$OUTPUT->send();
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index 3fc6ac5a7..f15cd2460 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -29,7 +29,7 @@ $old_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL');
$old_pages = ceil($old_count / $RCMAIL->storage->get_pagesize());
// move messages
-if ($RCMAIL->action == 'moveto' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) {
+if ($RCMAIL->action == 'move' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) {
$count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST))));
$target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true);
$mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true);
@@ -74,6 +74,8 @@ else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) {
}
// unknown action or missing query param
else {
+ $OUTPUT->show_message('internalerror', 'error');
+ $OUTPUT->send();
exit;
}
@@ -124,7 +126,7 @@ else
rcmail_set_unseen_count($mbox, $unseen_count);
}
- if ($RCMAIL->action == 'moveto' && strlen($target)) {
+ if ($RCMAIL->action == 'move' && strlen($target)) {
rcmail_send_unread_count($target, true);
}
diff --git a/program/steps/mail/search_contacts.inc b/program/steps/mail/search_contacts.inc
index 2e6bb12f8..6a30ad1f5 100644
--- a/program/steps/mail/search_contacts.inc
+++ b/program/steps/mail/search_contacts.inc
@@ -19,16 +19,15 @@
+-----------------------------------------------------------------------+
*/
-$search = get_input_value('_q', RCUBE_INPUT_GPC, true);
-$sources = $RCMAIL->get_address_sources();
-$search_mode = (int) $RCMAIL->config->get('addressbook_search_mode');
-$sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
-$afields = $RCMAIL->config->get('contactlist_fields');
+$search = get_input_value('_q', RCUBE_INPUT_GPC, true);
+$sources = $RCMAIL->get_address_sources();
+$search_mode = (int) $RCMAIL->config->get('addressbook_search_mode');
+$addr_sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name');
+$afields = $RCMAIL->config->get('contactlist_fields');
+$page_size = $RCMAIL->config->get('addressbook_pagesize', $RCMAIL->config->get('pagesize', 50));
+$records = array();
+$search_set = array();
-$page = 1;
-$page_size = $RCMAIL->config->get('addressbook_pagesize', $RCMAIL->config->get('pagesize', 50));
-
-$records = $search_set = array();
foreach ($sources as $s) {
$source = $RCMAIL->get_address_book($s['id']);
$source->set_page(1);
@@ -46,7 +45,7 @@ foreach ($sources as $s) {
while ($row = $result->next()) {
$row['sourceid'] = $s['id'];
- $key = rcube_addressbook::compose_contact_key($row, $sort_col);
+ $key = rcube_addressbook::compose_contact_key($row, $addr_sort_col);
$records[$key] = $row;
}
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index eb0ba89c6..cf22a2af9 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -255,6 +255,33 @@ function rcmail_email_input_format($mailto, $count=false, $check=true)
}
+function rcmail_generic_message_footer($isHtml)
+{
+ global $CONFIG;
+
+ if ($isHtml && !empty($CONFIG['generic_message_footer_html'])) {
+ $file = $CONFIG['generic_message_footer_html'];
+ $html_footer = true;
+ }
+ else {
+ $file = $CONFIG['generic_message_footer'];
+ $html_footer = false;
+ }
+
+ if ($file && realpath($file)) {
+ // sanity check
+ if (!preg_match('/\.(php|ini|conf)$/', $file) && strpos($file, '/etc/') === false) {
+ $footer = file_get_contents($file);
+ if ($isHtml && !$html_footer)
+ $footer = '<pre>' . $footer . '</pre>';
+ return $footer;
+ }
+ }
+
+ return false;
+}
+
+
/****** compose message ********/
if (strlen($_POST['_draft_saveid']) > 3)
@@ -364,10 +391,6 @@ if (!empty($mailcc)) {
if (!empty($mailbcc)) {
$headers['Bcc'] = $mailbcc;
}
-if (!empty($identity_arr['bcc']) && stripos($headers['Bcc'], $identity_arr['bcc']) === false) {
- $headers['Bcc'] = ($headers['Bcc'] ? $headers['Bcc'].', ' : '') . $identity_arr['bcc'];
- $RECIPIENT_COUNT ++;
-}
if (($max_recipients = (int) $RCMAIL->config->get('max_recipients')) > 0) {
if ($RECIPIENT_COUNT > $max_recipients) {
@@ -385,9 +408,6 @@ if (!empty($identity_arr['organization'])) {
if (!empty($_POST['_replyto'])) {
$headers['Reply-To'] = rcmail_email_input_format(get_input_value('_replyto', RCUBE_INPUT_POST, TRUE, $message_charset));
}
-else if (!empty($identity_arr['reply-to'])) {
- $headers['Reply-To'] = rcmail_email_input_format($identity_arr['reply-to'], false, true);
-}
if (!empty($headers['Reply-To'])) {
$headers['Mail-Reply-To'] = $headers['Reply-To'];
}
@@ -452,7 +472,7 @@ $isHtml = (bool) get_input_value('_is_html', RCUBE_INPUT_POST);
$message_body = get_input_value('_message', RCUBE_INPUT_POST, TRUE, $message_charset);
if ($isHtml) {
- $font = rcube_fontdefs($RCMAIL->config->get('default_font', 'Verdana'));
+ $font = rcube_fontdefs($RCMAIL->config->get('default_font'));
$bstyle = $font && is_string($font) ? " style='font-family: $font'" : '';
// append doctype and html/body wrappers
@@ -466,7 +486,7 @@ if (!$savedraft) {
$message_body = preg_replace('/\s*id="_rc_sig"/', '', $message_body);
// add inline css for blockquotes
- $bstyle = 'padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%';
+ $bstyle = 'padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px';
$message_body = preg_replace('/<blockquote>/',
'<blockquote type="cite" style="'.$bstyle.'">', $message_body);
}
@@ -490,19 +510,10 @@ if (!$savedraft) {
}
// generic footer for all messages
- if ($isHtml && !empty($CONFIG['generic_message_footer_html'])) {
- $footer = file_get_contents(realpath($CONFIG['generic_message_footer_html']));
- $footer = rcube_charset_convert($footer, RCMAIL_CHARSET, $message_charset);
- }
- else if (!empty($CONFIG['generic_message_footer'])) {
- $footer = file_get_contents(realpath($CONFIG['generic_message_footer']));
+ if ($footer = rcmail_generic_message_footer($isHtml)) {
$footer = rcube_charset_convert($footer, RCMAIL_CHARSET, $message_charset);
- if ($isHtml)
- $footer = '<pre>'.$footer.'</pre>';
- }
-
- if ($footer)
$message_body .= "\r\n" . $footer;
+ }
}
if ($isHtml) {
@@ -820,6 +831,6 @@ else {
if ($store_folder && !$saved)
$OUTPUT->command('sent_successfully', 'error', rcube_label('errorsavingsent'));
else
- $OUTPUT->command('sent_successfully', 'confirmation', rcube_label('messagesent'));
+ $OUTPUT->command('sent_successfully', 'confirmation', rcube_label('messagesent'), $store_target);
$OUTPUT->send('iframe');
}
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 552c180f5..59f4d55e1 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -109,14 +109,14 @@ if ($uid) {
$OUTPUT->set_env('skip_deleted', true);
if ($CONFIG['display_next'])
$OUTPUT->set_env('display_next', true);
- if ($MESSAGE->headers->others['list-post'])
+ if ($MESSAGE->headers->get('list-post', false))
$OUTPUT->set_env('list_post', true);
if ($CONFIG['forward_attachment'])
$OUTPUT->set_env('forward_attachment', true);
if (!$OUTPUT->ajax_call)
$OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash',
- 'movingmessage', 'deletingmessage', 'markingmessage');
+ 'movingmessage', 'deletingmessage', 'markingmessage', 'replyall', 'replylist');
$prefer_html = $RCMAIL->config->get('prefer_html');
if ($MESSAGE->has_html_part()) {
@@ -228,11 +228,11 @@ function rcmail_remote_objects_msg()
function rcmail_message_buttons()
{
- global $MESSAGE, $RCMAIL, $CONFIG;
+ global $RCMAIL;
$mbox = $RCMAIL->storage->get_folder();
$delim = $RCMAIL->storage->get_hierarchy_delimiter();
- $dbox = $CONFIG['drafts_mbox'];
+ $dbox = $RCMAIL->config->get('drafts_mbox');
// the message is not a draft
if ($mbox != $dbox && strpos($mbox, $dbox.$delim) !== 0) {
@@ -275,9 +275,13 @@ function rcmail_contact_exists($email)
if ($email) {
// @TODO: search in all address books?
$CONTACTS = $RCMAIL->get_address_book(-1, true);
- $existing = $CONTACTS->search('email', $email, true, false);
- if ($existing->count)
- return true;
+
+ if (is_object($CONTACTS)) {
+ $existing = $CONTACTS->search('email', $email, true, false);
+ if ($existing->count) {
+ return true;
+ }
+ }
}
return false;
diff --git a/program/steps/settings/about.inc b/program/steps/settings/about.inc
index 9b13402f1..0fdefddda 100644
--- a/program/steps/settings/about.inc
+++ b/program/steps/settings/about.inc
@@ -40,17 +40,28 @@ function rcmail_plugins_list($attrib)
$attrib['id'] = 'rcmpluginlist';
$plugins = array_filter((array) $RCMAIL->config->get('plugins'));
- $plugins = array_flip($plugins);
+ $plugin_info = array();
- foreach ($plugins as $name => $plugin) {
- rcube_plugin_data($name, $plugins);
+ foreach ($plugins as $name) {
+ if ($info = $RCMAIL->plugins->get_info($name))
+ $plugin_info[$name] = $info;
}
- if (empty($plugins)) {
+ // load info from required plugins, too
+ foreach ($plugin_info as $name => $info) {
+ if (is_array($info['required']) && !empty($info['required'])) {
+ foreach ($info['required'] as $req_name) {
+ if (!isset($plugin_info[$req_name]) && ($req_info = $RCMAIL->plugins->get_info($req_name)))
+ $plugin_info[$req_name] = $req_info;
+ }
+ }
+ }
+
+ if (empty($plugin_info)) {
return '';
}
- ksort($plugins, SORT_LOCALE_STRING);
+ ksort($plugin_info, SORT_LOCALE_STRING);
$table = new html_table($attrib);
@@ -60,8 +71,8 @@ function rcmail_plugins_list($attrib)
$table->add_header('license', rcube_label('license'));
$table->add_header('source', rcube_label('source'));
- foreach ($plugins as $name => $data) {
- $uri = $data['srcuri'] ? $data['srcuri'] : $data['uri'];
+ foreach ($plugin_info as $name => $data) {
+ $uri = $data['src_uri'] ? $data['src_uri'] : $data['uri'];
if ($uri && stripos($uri, 'http') !== 0) {
$uri = 'http://' . $uri;
}
@@ -78,48 +89,6 @@ function rcmail_plugins_list($attrib)
return $table->show();
}
-function rcube_plugin_data($name, &$plugins = array())
-{
- // XPaths of plugin metadata elements
- $metadata = array(
- 'name' => 'string(//rc:package/rc:name)',
- 'version' => 'string(//rc:package/rc:version/rc:release)',
- 'license' => 'string(//rc:package/rc:license)',
- 'license_uri' => 'string(//rc:package/rc:license/@uri)',
- 'srcuri' => 'string(//rc:package/rc:srcuri)',
- 'uri' => 'string(//rc:package/rc:uri)',
- );
-
- $package = INSTALL_PATH . "/plugins/$name/package.xml";
- if (file_exists($package) && ($file = file_get_contents($package))) {
- $doc = new DOMDocument();
- $doc->loadXML($file);
- $xpath = new DOMXPath($doc);
- $xpath->registerNamespace('rc', "http://pear.php.net/dtd/package-2.0");
- $data = array();
-
- foreach ($metadata as $key => $path) {
- $data[$key] = $xpath->evaluate($path);
- }
-
- $plugins[$name] = $data;
-
- // dependent required plugins (can be used, but not included in config)
- $deps = $xpath->evaluate('//rc:package/rc:dependencies/rc:required/rc:package/rc:name');
- $cnt = $deps->length;
-
- for ($i=0; $i<$cnt; $i++) {
- $dn = $deps->item($i)->nodeValue;
- if (!array_key_exists($dn, $plugins)) {
- rcube_plugin_data($dn, $plugins);
- }
- }
- }
- else {
- unset($plugins[$name]);
- }
-}
-
$OUTPUT->set_pagetitle(rcube_label('about'));
diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc
index cd2372790..fdb38e602 100644
--- a/program/steps/settings/edit_folder.inc
+++ b/program/steps/settings/edit_folder.inc
@@ -78,7 +78,7 @@ function rcmail_folder_form($attrib)
// Location (name)
if ($options['protected']) {
- $foldername = Q(str_replace($delimiter, ' &raquo; ', rcmail_localize_folderpath($mbox_imap)));
+ $foldername = str_replace($delimiter, ' &raquo; ', Q(rcmail_localize_folderpath($mbox_imap)));
}
else if ($options['norename']) {
$foldername = Q($folder);
diff --git a/program/steps/settings/edit_prefs.inc b/program/steps/settings/edit_prefs.inc
index 971ed60b6..468e4994d 100644
--- a/program/steps/settings/edit_prefs.inc
+++ b/program/steps/settings/edit_prefs.inc
@@ -40,7 +40,7 @@ function rcmail_user_prefs_form($attrib)
$out = $form_start;
- foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $idx => $block) {
+ foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $block) {
if (!empty($block['options'])) {
$table = new html_table(array('cols' => 2));
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 0c7d9063f..6d116e7d2 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -232,16 +232,16 @@ function rcube_subscription_form($attrib)
// add any necessary "virtual" parent folders
if ($parent_folder && !isset($seen[$parent_folder])) {
for ($i=1; $i<=$level; $i++) {
- $ancestor_folder = join($delimiter, array_slice($foldersplit, 0, $i));
- if ($ancestor_folder && !$seen[$ancestor_folder]++) {
- $ancestor_name = rcube_charset_convert($foldersplit[$i-1], 'UTF7-IMAP');
- $list_folders[] = array(
+ $ancestor_folder = join($delimiter, array_slice($foldersplit, 0, $i));
+ if ($ancestor_folder && !$seen[$ancestor_folder]++) {
+ $ancestor_name = rcube_charset_convert($foldersplit[$i-1], 'UTF7-IMAP');
+ $list_folders[] = array(
'id' => $ancestor_folder,
'name' => $ancestor_name,
'level' => $i-1,
'virtual' => true,
);
- }
+ }
}
}
@@ -283,7 +283,6 @@ function rcube_subscription_form($attrib)
$noselect = false;
$classes = array($i%2 ? 'even' : 'odd');
- $folder_js = Q($folder['id']);
$folder_utf8 = rcube_charset_convert($folder['id'], 'UTF7-IMAP');
$display_folder = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $folder['level'])
. Q($protected ? rcmail_localize_foldername($folder['id']) : $folder['name']);
@@ -292,7 +291,8 @@ function rcube_subscription_form($attrib)
$classes[] = 'virtual';
}
- if (!$protected) {
+ // Check \Noselect flag (of existing folder)
+ if (!$protected && in_array($folder['id'], $a_unsubscribed)) {
$attrs = $STORAGE->folder_attributes($folder['id']);
$noselect = in_array('\\Noselect', $attrs);
}
@@ -394,7 +394,7 @@ function rcmail_rename_folder($oldname, $newname)
$a_threaded = (array) $RCMAIL->config->get('message_threading', array());
$oldprefix = '/^' . preg_quote($oldname . $delimiter, '/') . '/';
- foreach ($a_threaded as $key => $val) {
+ foreach (array_keys($a_threaded) as $key) {
if ($key == $oldname) {
unset($a_threaded[$key]);
$a_threaded[$newname] = true;
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 2f726c7e8..dbc9b3ce2 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -19,927 +19,1175 @@
+-----------------------------------------------------------------------+
*/
-if (!$OUTPUT->ajax_call)
- $OUTPUT->set_pagetitle(rcube_label('preferences'));
-
+if (!$OUTPUT->ajax_call) {
+ $OUTPUT->set_pagetitle(rcube_label('preferences'));
+}
// similar function as /steps/settings/identities.inc::rcmail_identity_frame()
function rcmail_preferences_frame($attrib)
{
- global $OUTPUT;
+ global $OUTPUT;
- if (!$attrib['id'])
- $attrib['id'] = 'rcmprefsframe';
+ if (!$attrib['id']) {
+ $attrib['id'] = 'rcmprefsframe';
+ }
- return $OUTPUT->frame($attrib, true);
+ return $OUTPUT->frame($attrib, true);
}
function rcmail_sections_list($attrib)
{
- global $RCMAIL;
+ global $RCMAIL;
- // add id to message list table if not specified
- if (!strlen($attrib['id']))
- $attrib['id'] = 'rcmsectionslist';
+ // add id to message list table if not specified
+ if (!strlen($attrib['id'])) {
+ $attrib['id'] = 'rcmsectionslist';
+ }
- list($list, $cols) = rcmail_user_prefs();
+ list($list, $cols) = rcmail_user_prefs();
- // create XHTML table
- $out = rcube_table_output($attrib, $list, $cols, 'id');
+ // create XHTML table
+ $out = rcube_table_output($attrib, $list, $cols, 'id');
- // set client env
- $RCMAIL->output->add_gui_object('sectionslist', $attrib['id']);
- $RCMAIL->output->include_script('list.js');
+ // set client env
+ $RCMAIL->output->add_gui_object('sectionslist', $attrib['id']);
+ $RCMAIL->output->include_script('list.js');
- return $out;
+ return $out;
}
function rcmail_identities_list($attrib)
{
- global $OUTPUT, $RCMAIL;
+ global $OUTPUT, $RCMAIL;
- // add id to message list table if not specified
- if (!strlen($attrib['id']))
- $attrib['id'] = 'rcmIdentitiesList';
+ // add id to message list table if not specified
+ if (!strlen($attrib['id'])) {
+ $attrib['id'] = 'rcmIdentitiesList';
+ }
- // get identities list and define 'mail' column
- $list = $RCMAIL->user->list_identities();
- foreach ($list as $idx => $row)
- $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>');
+ // get identities list and define 'mail' column
+ $list = $RCMAIL->user->list_identities();
+ foreach ($list as $idx => $row) {
+ $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>');
+ }
- // get all identites from DB and define list of cols to be displayed
- $plugin = $RCMAIL->plugins->exec_hook('identities_list', array(
- 'list' => $list,
- 'cols' => array('mail')));
+ // get all identites from DB and define list of cols to be displayed
+ $plugin = $RCMAIL->plugins->exec_hook('identities_list', array(
+ 'list' => $list,
+ 'cols' => array('mail')
+ ));
- // @TODO: use <UL> instead of <TABLE> for identities list
- // create XHTML table
- $out = rcube_table_output($attrib, $plugin['list'], $plugin['cols'], 'identity_id');
+ // @TODO: use <UL> instead of <TABLE> for identities list
+ // create XHTML table
+ $out = rcube_table_output($attrib, $plugin['list'], $plugin['cols'], 'identity_id');
- // set client env
- $OUTPUT->add_gui_object('identitieslist', $attrib['id']);
+ // set client env
+ $OUTPUT->add_gui_object('identitieslist', $attrib['id']);
- return $out;
+ return $out;
}
// similar function as in /steps/addressbook/edit.inc
function get_form_tags($attrib, $action, $id = null, $hidden = null)
{
- global $EDIT_FORM, $RCMAIL;
-
- $form_start = $form_end = '';
-
- if (empty($EDIT_FORM)) {
- $request_key = $action . (isset($id) ? '.'.$id : '');
- $form_start = $RCMAIL->output->request_form(array(
- 'name' => 'form',
- 'method' => 'post',
- 'task' => $RCMAIL->task,
- 'action' => $action,
- 'request' => $request_key,
- 'noclose' => true
- ) + $attrib);
-
- if (is_array($hidden)) {
- $hiddenfields = new html_hiddenfield($hidden);
- $form_start .= $hiddenfields->show();
- }
+ global $EDIT_FORM, $RCMAIL;
+
+ $form_start = $form_end = '';
+
+ if (empty($EDIT_FORM)) {
+ $request_key = $action . (isset($id) ? '.'.$id : '');
+ $form_start = $RCMAIL->output->request_form(array(
+ 'name' => 'form',
+ 'method' => 'post',
+ 'task' => $RCMAIL->task,
+ 'action' => $action,
+ 'request' => $request_key,
+ 'noclose' => true
+ ) + $attrib);
+
+ if (is_array($hidden)) {
+ $hiddenfields = new html_hiddenfield($hidden);
+ $form_start .= $hiddenfields->show();
+ }
- $form_end = !strlen($attrib['form']) ? '</form>' : '';
+ $form_end = !strlen($attrib['form']) ? '</form>' : '';
- $EDIT_FORM = !empty($attrib['form']) ? $attrib['form'] : 'form';
- $RCMAIL->output->add_gui_object('editform', $EDIT_FORM);
- }
+ $EDIT_FORM = !empty($attrib['form']) ? $attrib['form'] : 'form';
+ $RCMAIL->output->add_gui_object('editform', $EDIT_FORM);
+ }
- return array($form_start, $form_end);
+ return array($form_start, $form_end);
}
-function rcmail_user_prefs($current=null)
+function rcmail_user_prefs($current = null)
{
- global $RCMAIL;
-
- $sections['general'] = array('id' => 'general', 'section' => rcube_label('uisettings'));
- $sections['mailbox'] = array('id' => 'mailbox', 'section' => rcube_label('mailboxview'));
- $sections['mailview'] = array('id' => 'mailview','section' => rcube_label('messagesdisplaying'));
- $sections['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition'));
- $sections['addressbook'] = array('id' => 'addressbook','section' => rcube_label('addressbook'));
- $sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders'));
- $sections['server'] = array('id' => 'server', 'section' => rcube_label('serversettings'));
-
- // hook + define list cols
- $plugin = $RCMAIL->plugins->exec_hook('preferences_sections_list',
- array('list' => $sections, 'cols' => array('section')));
-
- $sections = $plugin['list'];
-
- $config = $RCMAIL->config->all();
- $no_override = array_flip($RCMAIL->config->get('dont_override', array()));
-
- foreach ($sections as $idx => $sect) {
-
- if ($current && $sect['id'] != $current)
- continue;
-
- $blocks = array();
-
- switch ($sect['id']) {
- // general
- case 'general':
-
- $blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
- );
-
- // language selection
- if (!isset($no_override['language'])) {
- $a_lang = $RCMAIL->list_languages();
- asort($a_lang);
-
- $field_id = 'rcmfd_lang';
- $select_lang = new html_select(array('name' => '_language', 'id' => $field_id));
- $select_lang->add(array_values($a_lang), array_keys($a_lang));
-
- $blocks['main']['options']['language'] = array(
- 'title' => html::label($field_id, Q(rcube_label('language'))),
- 'content' => $select_lang->show($RCMAIL->user->language),
- );
- }
-
- // timezone selection
- if (!isset($no_override['timezone'])) {
- $field_id = 'rcmfd_timezone';
- $select_timezone = new html_select(array('name' => '_timezone', 'id' => $field_id));
- $select_timezone->add(rcube_label('autodetect'), 'auto');
-
- $zones = array();
- foreach (DateTimeZone::listIdentifiers() as $i => $tzs) {
- try {
- $tz = new DateTimeZone($tzs);
- $date = new DateTime('2012-12-21', $tz);
- $offset = $date->format('Z') + 45000;
- $sortkey = sprintf('%06d.%s', $offset, $tzs);
- $zones[$sortkey] = array($tzs, $date->format('P'));
- }
- catch (Exception $e) {}
- }
-
- ksort($zones);
- foreach ($zones as $zone) {
- list($tzs, $offset) = $zone;
- $select_timezone->add('(GMT ' . $offset . ') ' . strtr($tzs, '_', ' '), $tzs);
- }
-
- $blocks['main']['options']['timezone'] = array(
- 'title' => html::label($field_id, Q(rcube_label('timezone'))),
- 'content' => $select_timezone->show((string)$config['timezone']),
- );
- }
-
- // date/time formatting
- if (!isset($no_override['time_format'])) {
- $reftime = mktime(7,30,0);
- $field_id = 'rcmfd_time_format';
- $select_time = new html_select(array('name' => '_time_format', 'id' => $field_id));
- foreach ((array)$RCMAIL->config->get('time_formats', array('G:i', 'H:i', 'g:i a', 'h:i A')) as $choice)
- $select_time->add(date($choice, $reftime), $choice);
-
- $blocks['main']['options']['time_format'] = array(
- 'title' => html::label($field_id, Q(rcube_label('timeformat'))),
- 'content' => $select_time->show($RCMAIL->config->get('time_format')),
- );
- }
-
- if (!isset($no_override['date_format'])) {
- $refdate = mktime(12,30,0,7,24);
- $field_id = 'rcmfd_date_format';
- $select_date = new html_select(array('name' => '_date_format', 'id' => $field_id));
- foreach ((array)$RCMAIL->config->get('date_formats', array('Y-m-d','d-m-Y','Y/m/d','m/d/Y','d/m/Y','d.m.Y','j.n.Y')) as $choice)
- $select_date->add(date($choice, $refdate), $choice);
-
- $blocks['main']['options']['date_format'] = array(
- 'title' => html::label($field_id, Q(rcube_label('dateformat'))),
- 'content' => $select_date->show($config['date_format']),
- );
- }
+ global $RCMAIL;
- // MM: Show checkbox for toggling 'pretty dates'
- if (!isset($no_override['prettydate'])) {
- $field_id = 'rcmfd_prettydate';
- $input_prettydate = new html_checkbox(array('name' => '_pretty_date', 'id' => $field_id, 'value' => 1));
+ $sections['general'] = array('id' => 'general', 'section' => rcube_label('uisettings'));
+ $sections['mailbox'] = array('id' => 'mailbox', 'section' => rcube_label('mailboxview'));
+ $sections['mailview'] = array('id' => 'mailview','section' => rcube_label('messagesdisplaying'));
+ $sections['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition'));
+ $sections['addressbook'] = array('id' => 'addressbook','section' => rcube_label('addressbook'));
+ $sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders'));
+ $sections['server'] = array('id' => 'server', 'section' => rcube_label('serversettings'));
- $blocks['main']['options']['prettydate'] = array(
- 'title' => html::label($field_id, Q(rcube_label('prettydate'))),
- 'content' => $input_prettydate->show($config['prettydate']?1:0),
- );
- }
+ // hook + define list cols
+ $plugin = $RCMAIL->plugins->exec_hook('preferences_sections_list',
+ array('list' => $sections, 'cols' => array('section')));
- if (!isset($no_override['refresh_interval'])) {
- $field_id = 'rcmfd_refresh_interval';
- $select_refresh_interval = new html_select(array('name' => '_refresh_interval', 'id' => $field_id));
+ $sections = $plugin['list'];
+ $config = $RCMAIL->config->all();
+ $no_override = array_flip((array)$RCMAIL->config->get('dont_override'));
- $select_refresh_interval->add(rcube_label('never'), 0);
- foreach (array(1, 3, 5, 10, 15, 30, 60) as $min) {
- if (!$config['min_refresh_interval'] || $config['min_refresh_interval'] <= $min * 60) {
- $label = rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min)));
- $select_refresh_interval->add($label, $min);
+ foreach ($sections as $idx => $sect) {
+ if ($current && $sect['id'] != $current) {
+ continue;
}
- }
- $blocks['main']['options']['refresh_interval'] = array(
- 'title' => html::label($field_id, Q(rcube_label('refreshinterval'))),
- 'content' => $select_refresh_interval->show($config['refresh_interval']/60),
- );
- }
-
- // show drop-down for available skins
- if (!isset($no_override['skin'])) {
- $skins = rcmail_get_skins();
-
- if (count($skins) > 1) {
- $field_id = 'rcmfd_skin';
- $input_skin = new html_radiobutton(array('name'=>'_skin'));
-
- $blocks['skin'] = array('name' => Q(rcube_label('skin')),);
-
- foreach($skins as $skin) {
- $thumbnail = "./skins/$skin/thumbnail.png";
- if (!is_file($thumbnail))
- $thumbnail = './program/resources/blank.gif';
-
- $skinname = ucfirst($skin);
- $author_link = $license_link = '';
- $meta = @json_decode(@file_get_contents("./skins/$skin/meta.json"), true);
- if (is_array($meta) && $meta['name']) {
- $skinname = $meta['name'];
- $author_link = $meta['url'] ? html::a(array('href' => $meta['url'], 'target' => '_blank'), Q($meta['author'])) : Q($meta['author']);
- $license_link = $meta['license-url'] ? html::a(array('href' => $meta['license-url'], 'target' => '_blank'), Q($meta['license'])) : Q($meta['license']);
- }
-
- $blocks['skin']['options'][$skin]['content'] = html::label(array('class' => 'skinselection'),
- html::span('skinitem', $input_skin->show($config['skin'], array('value' => $skin, 'id' => $field_id.$skin))) .
- html::span('skinitem', html::img(array('src' => $thumbnail, 'class' => 'skinthumbnail', 'alt' => $skin, 'width' => 64, 'height' => 64))) .
- html::span('skinitem', html::span('skinname', Q($skinname)) . html::br() .
- html::span('skinauthor', $author_link ? 'by ' . $author_link : '') . html::br() .
- html::span('skinlicense', $license_link ? rcube_label('license').':&nbsp;' . $license_link : ''))
- );
+ $blocks = array();
+
+ switch ($sect['id']) {
+
+ // general
+ case 'general':
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'skin' => array('name' => Q(rcube_label('skin'))),
+ 'browser' => array('name' => Q(rcube_label('browseroptions'))),
+ );
+
+ // language selection
+ if (!isset($no_override['language'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $a_lang = $RCMAIL->list_languages();
+ asort($a_lang);
+
+ $field_id = 'rcmfd_lang';
+ $select = new html_select(array('name' => '_language', 'id' => $field_id));
+ $select->add(array_values($a_lang), array_keys($a_lang));
+
+ $blocks['main']['options']['language'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('language'))),
+ 'content' => $select->show($RCMAIL->user->language),
+ );
+ }
+
+ // timezone selection
+ if (!isset($no_override['timezone'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_timezone';
+ $select = new html_select(array('name' => '_timezone', 'id' => $field_id));
+ $select->add(rcube_label('autodetect'), 'auto');
+
+ $zones = array();
+ foreach (DateTimeZone::listIdentifiers() as $i => $tzs) {
+ try {
+ $tz = new DateTimeZone($tzs);
+ $date = new DateTime('2012-12-21', $tz);
+ $offset = $date->format('Z') + 45000;
+ $sortkey = sprintf('%06d.%s', $offset, $tzs);
+ $zones[$sortkey] = array($tzs, $date->format('P'));
+ }
+ catch (Exception $e) {}
+ }
+
+ ksort($zones);
+
+ foreach ($zones as $zone) {
+ list($tzs, $offset) = $zone;
+ $select->add('(GMT ' . $offset . ') ' . strtr($tzs, '_', ' '), $tzs);
+ }
+
+ $blocks['main']['options']['timezone'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('timezone'))),
+ 'content' => $select->show((string)$config['timezone']),
+ );
+ }
+
+ // date/time formatting
+ if (!isset($no_override['time_format'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $reftime = mktime(7,30,0);
+ $defaults = array('G:i', 'H:i', 'g:i a', 'h:i A');
+ $formats = (array)$RCMAIL->config->get('time_formats', $defaults);
+ $field_id = 'rcmfd_time_format';
+ $select = new html_select(array('name' => '_time_format', 'id' => $field_id));
+
+ foreach ($formats as $choice) {
+ $select->add(date($choice, $reftime), $choice);
+ }
+
+ $blocks['main']['options']['time_format'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('timeformat'))),
+ 'content' => $select->show($RCMAIL->config->get('time_format')),
+ );
+ }
+
+ if (!isset($no_override['date_format'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $refdate = mktime(12,30,0,7,24);
+ $defaults = array('Y-m-d','d-m-Y','Y/m/d','m/d/Y','d/m/Y','d.m.Y','j.n.Y');
+ $formats = (array)$RCMAIL->config->get('date_formats', $defaults);
+ $field_id = 'rcmfd_date_format';
+ $select = new html_select(array('name' => '_date_format', 'id' => $field_id));
+
+ foreach ($formats as $choice) {
+ $select->add(date($choice, $refdate), $choice);
+ }
+
+ $blocks['main']['options']['date_format'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('dateformat'))),
+ 'content' => $select->show($config['date_format']),
+ );
+ }
+
+ // Show checkbox for toggling 'pretty dates'
+ if (!isset($no_override['prettydate'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_prettydate';
+ $input = new html_checkbox(array('name' => '_pretty_date', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['prettydate'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('prettydate'))),
+ 'content' => $input->show($config['prettydate']?1:0),
+ );
+ }
+
+ if (!isset($no_override['refresh_interval'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_refresh_interval';
+ $select = new html_select(array('name' => '_refresh_interval', 'id' => $field_id));
+
+ $select->add(rcube_label('never'), 0);
+ foreach (array(1, 3, 5, 10, 15, 30, 60) as $min) {
+ if (!$config['min_refresh_interval'] || $config['min_refresh_interval'] <= $min * 60) {
+ $label = rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min)));
+ $select->add($label, $min);
+ }
+ }
+
+ $blocks['main']['options']['refresh_interval'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('refreshinterval'))),
+ 'content' => $select->show($config['refresh_interval']/60),
+ );
+ }
+
+ // show drop-down for available skins
+ if (!isset($no_override['skin'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $skins = rcmail_get_skins();
+
+ if (count($skins) > 1) {
+ $field_id = 'rcmfd_skin';
+ $input = new html_radiobutton(array('name'=>'_skin'));
+
+ foreach ($skins as $skin) {
+ $thumbnail = "./skins/$skin/thumbnail.png";
+ if (!is_file($thumbnail))
+ $thumbnail = './program/resources/blank.gif';
+
+ $skinname = ucfirst($skin);
+ $author_link = $license_link = '';
+ $meta = @json_decode(@file_get_contents("./skins/$skin/meta.json"), true);
+
+ if (is_array($meta) && $meta['name']) {
+ $skinname = $meta['name'];
+ $author_link = $meta['url'] ? html::a(array('href' => $meta['url'], 'target' => '_blank'), Q($meta['author'])) : Q($meta['author']);
+ $license_link = $meta['license-url'] ? html::a(array('href' => $meta['license-url'], 'target' => '_blank'), Q($meta['license'])) : Q($meta['license']);
+ }
+
+ $blocks['skin']['options'][$skin]['content'] = html::label(array('class' => 'skinselection'),
+ html::span('skinitem', $input->show($config['skin'], array('value' => $skin, 'id' => $field_id.$skin))) .
+ html::span('skinitem', html::img(array('src' => $thumbnail, 'class' => 'skinthumbnail', 'alt' => $skin, 'width' => 64, 'height' => 64))) .
+ html::span('skinitem', html::span('skinname', Q($skinname)) . html::br() .
+ html::span('skinauthor', $author_link ? 'by ' . $author_link : '') . html::br() .
+ html::span('skinlicense', $license_link ? rcube_label('license').':&nbsp;' . $license_link : ''))
+ );
+ }
+ }
+ }
+
+ // standard_windows option decides if new windows should be
+ // opened as popups or standard windows (which can be handled by browsers as tabs)
+ if (!isset($no_override['standard_windows'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_standard_windows';
+ $checkbox = new html_checkbox(array('name' => '_standard_windows', 'id' => $field_id, 'value' => 1));
+
+ $blocks['browser']['options']['standard_windows'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('standardwindows'))),
+ 'content' => $checkbox->show($config['standard_windows']?1:0),
+ );
+ }
+
+ if ($current) {
+ $product_name = $RCMAIL->config->get('product_name', 'Roundcube Webmail');
+ $RCMAIL->output->add_script(sprintf("%s.check_protocol_handler('%s', '#mailtoprotohandler');",
+ JS_OBJECT_NAME, JQ($product_name)), 'foot');
+ }
+
+ $blocks['browser']['options']['mailtoprotohandler'] = array(
+ 'content' => html::a(array(
+ 'href' => '#',
+ 'id' => 'mailtoprotohandler'), Q(rcube_label('mailtoprotohandler'))),
+ );
+
+ break;
+
+ // Mailbox view (mail screen)
+ case 'mailbox':
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'new_message' => array('name' => Q(rcube_label('newmessage'))),
+ );
+
+ // show config parameter for preview pane
+ if (!isset($no_override['preview_pane'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_preview';
+ $input = new html_checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1,
+ 'onchange' => "$('#rcmfd_preview_pane_mark_read').prop('disabled', !this.checked)"));
+
+ $blocks['main']['options']['preview_pane'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('previewpane'))),
+ 'content' => $input->show($config['preview_pane']?1:0),
+ );
+ }
+
+ // show config parameter for preview pane auto mark as read delay
+ if (!isset($no_override['preview_pane_mark_read'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ // apply default if config option is not set at all
+ $config['preview_pane_mark_read'] = $RCMAIL->config->get('preview_pane_mark_read', 0);
+
+ $field_id = 'rcmfd_preview_pane_mark_read';
+ $select = new html_select(array('name' => '_preview_pane_mark_read', 'id' => $field_id,
+ 'disabled' => $config['preview_pane']?0:1));
+
+ $select->add(rcube_label('never'), '-1');
+ $select->add(rcube_label('immediately'), 0);
+
+ foreach (array(5, 10, 20, 30) as $sec) {
+ $label = rcube_label(array('name' => 'afternseconds', 'vars' => array('n' => $sec)));
+ $select->add($label, $sec);
+ }
+
+ $blocks['main']['options']['preview_pane_mark_read'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('previewpanemarkread'))),
+ 'content' => $select->show(intval($config['preview_pane_mark_read'])),
+ );
+ }
+
+ if (!isset($no_override['mdn_requests'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_mdn_requests';
+ $select = new html_select(array('name' => '_mdn_requests', 'id' => $field_id));
+ $select->add(rcube_label('askuser'), 0);
+ $select->add(rcube_label('autosend'), 1);
+ $select->add(rcube_label('autosendknown'), 3);
+ $select->add(rcube_label('autosendknownignore'), 4);
+ $select->add(rcube_label('ignore'), 2);
+
+ $blocks['main']['options']['mdn_requests'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('mdnrequests'))),
+ 'content' => $select->show($config['mdn_requests']),
+ );
+ }
+
+ if (!isset($no_override['autoexpand_threads'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $storage = $RCMAIL->get_storage();
+ $supported = $storage->get_capability('THREAD');
+
+ if ($supported) {
+ $field_id = 'rcmfd_autoexpand_threads';
+ $select = new html_select(array('name' => '_autoexpand_threads', 'id' => $field_id));
+ $select->add(rcube_label('never'), 0);
+ $select->add(rcube_label('do_expand'), 1);
+ $select->add(rcube_label('expand_only_unread'), 2);
+
+ $blocks['main']['options']['autoexpand_threads'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('autoexpand_threads'))),
+ 'content' => $select->show($config['autoexpand_threads']),
+ );
+ }
+ }
+
+ // show page size selection
+ if (!isset($no_override['mail_pagesize'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_mail_pagesize';
+ $input = new html_inputfield(array('name' => '_mail_pagesize', 'id' => $field_id, 'size' => 5));
+ $size = intval($config['mail_pagesize'] ? $config['mail_pagesize'] : $config['pagesize']);
+
+ $blocks['main']['options']['pagesize'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('pagesize'))),
+ 'content' => $input->show($size ? $size : 50),
+ );
+ }
+
+ if (!isset($no_override['check_all_folders'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_check_all_folders';
+ $input = new html_checkbox(array('name' => '_check_all_folders', 'id' => $field_id, 'value' => 1));
+
+ $blocks['new_message']['options']['check_all_folders'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('checkallfolders'))),
+ 'content' => $input->show($config['check_all_folders']?1:0),
+ );
+ }
+ break;
+
+ // Message viewing
+ case 'mailview':
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ );
+
+ // show checkbox to open message view in new window
+ if (!isset($no_override['message_extwin'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_message_extwin';
+ $input = new html_checkbox(array('name' => '_message_extwin', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['message_extwin'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('showinextwin'))),
+ 'content' => $input->show($config['message_extwin']?1:0),
+ );
+ }
+
+ // show checkbox to show email instead of name
+ if (!isset($no_override['message_show_email'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_message_show_email';
+ $input = new html_checkbox(array('name' => '_message_show_email', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['message_show_email'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('showemail'))),
+ 'content' => $input->show($config['message_show_email']?1:0),
+ );
+ }
+
+ // show checkbox for HTML/plaintext messages
+ if (!isset($no_override['prefer_html'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_htmlmsg';
+ $input = new html_checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1,
+ 'onchange' => "$('#rcmfd_show_images').prop('disabled', !this.checked).val(0)"));
+
+ $blocks['main']['options']['prefer_html'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('preferhtml'))),
+ 'content' => $input->show($config['prefer_html']?1:0),
+ );
+ }
+
+ if (!isset($no_override['default_charset'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_default_charset';
+
+ $blocks['main']['options']['default_charset'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('defaultcharset'))),
+ 'content' => $RCMAIL->output->charset_selector(array(
+ 'name' => '_default_charset', 'selected' => $config['default_charset']
+ )));
+ }
+
+ if (!isset($no_override['show_images'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_show_images';
+ $input = new html_select(array('name' => '_show_images', 'id' => $field_id,
+ 'disabled' => !$config['prefer_html']));
+
+ $input->add(rcube_label('never'), 0);
+ $input->add(rcube_label('fromknownsenders'), 1);
+ $input->add(rcube_label('always'), 2);
+
+ $blocks['main']['options']['show_images'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('showremoteimages'))),
+ 'content' => $input->show($config['prefer_html'] ? $config['show_images'] : 0),
+ );
+ }
+
+ if (!isset($no_override['inline_images'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_inline_images';
+ $input = new html_checkbox(array('name' => '_inline_images', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['inline_images'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('showinlineimages'))),
+ 'content' => $input->show($config['inline_images']?1:0),
+ );
+ }
+
+ // "display after delete" checkbox
+ if (!isset($no_override['display_next'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_displaynext';
+ $input = new html_checkbox(array('name' => '_display_next', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['display_next'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('displaynext'))),
+ 'content' => $input->show($config['display_next']?1:0),
+ );
+ }
+ break;
+
+ // Mail composition
+ case 'compose':
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'sig' => array('name' => Q(rcube_label('signatureoptions'))),
+ 'spellcheck' => array('name' => Q(rcube_label('spellcheckoptions'))),
+ );
+
+ // show checkbox to compose messages in a new window
+ if (!isset($no_override['compose_extwin'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfdcompose_extwin';
+ $input = new html_checkbox(array('name' => '_compose_extwin', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['compose_extwin'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('composeextwin'))),
+ 'content' => $input->show($config['compose_extwin']?1:0),
+ );
+ }
+
+ if (!isset($no_override['htmleditor'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_htmleditor';
+ $select = new html_select(array('name' => '_htmleditor', 'id' => $field_id));
+
+ $select->add(rcube_label('never'), 0);
+ $select->add(rcube_label('always'), 1);
+ $select->add(rcube_label('htmlonreply'), 2);
+ $select->add(rcube_label('htmlonreplyandforward'), 3);
+
+ $blocks['main']['options']['htmleditor'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('htmleditor'))),
+ 'content' => $select->show(intval($config['htmleditor'])),
+ );
+ }
+
+ if (!isset($no_override['draft_autosave'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_autosave';
+ $select = new html_select(array('name' => '_draft_autosave', 'id' => $field_id, 'disabled' => empty($config['drafts_mbox'])));
+
+ $select->add(rcube_label('never'), 0);
+ foreach (array(1, 3, 5, 10) as $i => $min) {
+ $label = rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min)));
+ $select->add($label, $min*60);
+ }
+
+ $blocks['main']['options']['draft_autosave'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('autosavedraft'))),
+ 'content' => $select->show($config['draft_autosave']),
+ );
+ }
+
+ if (!isset($no_override['mime_param_folding'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_param_folding';
+ $select = new html_select(array('name' => '_mime_param_folding', 'id' => $field_id));
+
+ $select->add(rcube_label('2231folding'), 0);
+ $select->add(rcube_label('miscfolding'), 1);
+ $select->add(rcube_label('2047folding'), 2);
+
+ $blocks['main']['options']['mime_param_folding'] = array(
+ 'advanced' => true,
+ 'title' => html::label($field_id, Q(rcube_label('mimeparamfolding'))),
+ 'content' => $select->show($config['mime_param_folding']),
+ );
+ }
+
+ if (!isset($no_override['force_7bit'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_force_7bit';
+ $input = new html_checkbox(array('name' => '_force_7bit', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['force_7bit'] = array(
+ 'advanced' => true,
+ 'title' => html::label($field_id, Q(rcube_label('force7bit'))),
+ 'content' => $input->show($config['force_7bit']?1:0),
+ );
+ }
+
+ if (!isset($no_override['mdn_default'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_mdn_default';
+ $input = new html_checkbox(array('name' => '_mdn_default', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['mdn_default'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('reqmdn'))),
+ 'content' => $input->show($config['mdn_default']?1:0),
+ );
+ }
+
+ if (!isset($no_override['dsn_default'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_dsn_default';
+ $input = new html_checkbox(array('name' => '_dsn_default', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['dsn_default'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('reqdsn'))),
+ 'content' => $input->show($config['dsn_default']?1:0),
+ );
+ }
+
+ if (!isset($no_override['reply_same_folder'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_reply_same_folder';
+ $input = new html_checkbox(array('name' => '_reply_same_folder', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['reply_same_folder'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('replysamefolder'))),
+ 'content' => $input->show($config['reply_same_folder']?1:0),
+ );
+ }
+
+ if (!isset($no_override['reply_mode'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_reply_mode';
+ $select = new html_select(array('name' => '_reply_mode', 'id' => $field_id));
+
+ $select->add(rcube_label('replyempty'), -1);
+ $select->add(rcube_label('replybottomposting'), 0);
+ $select->add(rcube_label('replytopposting'), 1);
+
+ $blocks['main']['options']['reply_mode'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('whenreplying'))),
+ 'content' => $select->show(intval($config['reply_mode'])),
+ );
+ }
+
+ if (!isset($no_override['spellcheck_before_send']) && $config['enable_spellcheck']) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_spellcheck_before_send';
+ $input = new html_checkbox(array('name' => '_spellcheck_before_send', 'id' => $field_id, 'value' => 1));
+
+ $blocks['spellcheck']['options']['spellcheck_before_send'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('spellcheckbeforesend'))),
+ 'content' => $input->show($config['spellcheck_before_send']?1:0),
+ );
+ }
+
+ if ($config['enable_spellcheck']) {
+ if (!$current) {
+ continue 2;
+ }
+
+ foreach (array('syms', 'nums', 'caps') as $key) {
+ $key = 'spellcheck_ignore_'.$key;
+ if (!isset($no_override[$key])) {
+ $input = new html_checkbox(array('name' => '_'.$key, 'id' => 'rcmfd_'.$key, 'value' => 1));
+
+ $blocks['spellcheck']['options'][$key] = array(
+ 'title' => html::label($field_id, Q(rcube_label(str_replace('_', '', $key)))),
+ 'content' => $input->show($config[$key]?1:0),
+ );
+ }
+ }
+ }
+
+ if (!isset($no_override['show_sig'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_show_sig';
+ $select = new html_select(array('name' => '_show_sig', 'id' => $field_id));
+
+ $select->add(rcube_label('never'), 0);
+ $select->add(rcube_label('always'), 1);
+ $select->add(rcube_label('newmessageonly'), 2);
+ $select->add(rcube_label('replyandforwardonly'), 3);
+
+ $blocks['sig']['options']['show_sig'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('autoaddsignature'))),
+ 'content' => $select->show($RCMAIL->config->get('show_sig', 1)),
+ );
+ }
+
+ if (!isset($no_override['strip_existing_sig'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_strip_existing_sig';
+ $input = new html_checkbox(array('name' => '_strip_existing_sig', 'id' => $field_id, 'value' => 1));
+
+ $blocks['sig']['options']['strip_existing_sig'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('replyremovesignature'))),
+ 'content' => $input->show($config['strip_existing_sig']?1:0),
+ );
+ }
+
+ if (!isset($no_override['forward_attachment'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_forward_attachment';
+ $select = new html_select(array('name' => '_forward_attachment', 'id' => $field_id));
+
+ $select->add(rcube_label('inline'), 0);
+ $select->add(rcube_label('asattachment'), 1);
+
+ $blocks['main']['options']['forward_attachment'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('forwardmode'))),
+ 'content' => $select->show(intval($config['forward_attachment'])),
+ );
+ }
+
+ if (!isset($no_override['default_font'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_default_font';
+ $fonts = rcube_fontdefs();
+ $selected = $config['default_font'];
+
+ $select = '<select name="_default_font" id="'.$field_id.'">';
+ $select .= '<option value=""' . (!$selected ? ' selected="selected"' : '') . '>---</option>';
+ foreach ($fonts as $fname => $font) {
+ $select .= '<option value="'.$fname.'"'
+ . ($fname == $selected ? ' selected="selected"' : '')
+ . ' style=\'font-family: ' . $font . '\'>'
+ . Q($fname) . '</option>';
+ }
+ $select .= '</select>';
+
+ $blocks['main']['options']['default_font'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('defaultfont'))),
+ 'content' => $select
+ );
+ }
+ break;
+
+ // Addressbook config
+ case 'addressbook':
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ );
+
+ if (!isset($no_override['default_addressbook'])
+ && (!$current || ($books = $RCMAIL->get_address_sources(true, true)))
+ ) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_default_addressbook';
+ $select = new html_select(array('name' => '_default_addressbook', 'id' => $field_id));
+
+ foreach ($books as $book) {
+ $select->add(html_entity_decode($book['name'], ENT_COMPAT, 'UTF-8'), $book['id']);
+ }
+
+ $blocks['main']['options']['default_addressbook'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('defaultabook'))),
+ 'content' => $select->show($config['default_addressbook']),
+ );
+ }
+
+ // show addressbook listing mode selection
+ if (!isset($no_override['addressbook_name_listing'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_addressbook_name_listing';
+ $select = new html_select(array('name' => '_addressbook_name_listing', 'id' => $field_id));
+
+ $select->add(rcube_label('name'), 0);
+ $select->add(rcube_label('firstname') . ' ' . rcube_label('surname'), 1);
+ $select->add(rcube_label('surname') . ' ' . rcube_label('firstname'), 2);
+ $select->add(rcube_label('surname') . ', ' . rcube_label('firstname'), 3);
+
+ $blocks['main']['options']['list_name_listing'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('listnamedisplay'))),
+ 'content' => $select->show($config['addressbook_name_listing']),
+ );
+ }
+
+ // show addressbook sort column
+ if (!isset($no_override['addressbook_sort_col'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_addressbook_sort_col';
+ $select = new html_select(array('name' => '_addressbook_sort_col', 'id' => $field_id));
+
+ $select->add(rcube_label('name'), 'name');
+ $select->add(rcube_label('firstname'), 'firstname');
+ $select->add(rcube_label('surname'), 'surname');
+
+ $blocks['main']['options']['sort_col'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('listsorting'))),
+ 'content' => $select->show($config['addressbook_sort_col']),
+ );
+ }
+
+ // show addressbook page size selection
+ if (!isset($no_override['addressbook_pagesize'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_addressbook_pagesize';
+ $input = new html_inputfield(array('name' => '_addressbook_pagesize', 'id' => $field_id, 'size' => 5));
+ $size = intval($config['addressbook_pagesize'] ? $config['addressbook_pagesize'] : $config['pagesize']);
+
+ $blocks['main']['options']['pagesize'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('pagesize'))),
+ 'content' => $input->show($size ? $size : 50),
+ );
+ }
+
+ if (!isset($no_override['autocomplete_single'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_autocomplete_single';
+ $checkbox = new html_checkbox(array('name' => '_autocomplete_single', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['autocomplete_single'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('autocompletesingle'))),
+ 'content' => $checkbox->show($config['autocomplete_single']?1:0),
+ );
+ }
+ break;
+
+ // Special IMAP folders
+ case 'folders':
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ );
+
+ if (!isset($no_override['show_real_foldernames'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'show_real_foldernames';
+ $input = new html_checkbox(array('name' => '_show_real_foldernames', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['show_real_foldernames'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('show_real_foldernames'))),
+ 'content' => $input->show($config['show_real_foldernames']?1:0),
+ );
+ }
+
+ // Configure special folders
+ if (!isset($no_override['default_folders']) && $current) {
+ $select = rcmail_mailbox_select(array(
+ 'noselection' => '---',
+ 'realnames' => true,
+ 'maxlength' => 30,
+ 'folder_filter' => 'mail',
+ 'folder_rights' => 'w',
+ // #1486114, #1488279
+ 'onchange' => "if ($(this).val() == 'INBOX') $(this).val('')",
+ ));
+ }
+
+ if (!isset($no_override['drafts_mbox'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $blocks['main']['options']['drafts_mbox'] = array(
+ 'title' => Q(rcube_label('drafts')),
+ 'content' => $select->show($config['drafts_mbox'], array('name' => "_drafts_mbox")),
+ );
+ }
+
+ if (!isset($no_override['sent_mbox'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $blocks['main']['options']['sent_mbox'] = array(
+ 'title' => Q(rcube_label('sent')),
+ 'content' => $select->show($config['sent_mbox'], array('name' => "_sent_mbox")),
+ );
+ }
+
+ if (!isset($no_override['junk_mbox'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $blocks['main']['options']['junk_mbox'] = array(
+ 'title' => Q(rcube_label('junk')),
+ 'content' => $select->show($config['junk_mbox'], array('name' => "_junk_mbox")),
+ );
+ }
+
+ if (!isset($no_override['trash_mbox'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $blocks['main']['options']['trash_mbox'] = array(
+ 'title' => Q(rcube_label('trash')),
+ 'content' => $select->show($config['trash_mbox'], array('name' => "_trash_mbox")),
+ );
+ }
+ break;
+
+ // Server settings
+ case 'server':
+ $blocks = array(
+ 'main' => array('name' => Q(rcube_label('mainoptions'))),
+ 'maintenance' => array('name' => Q(rcube_label('maintenance'))),
+ );
+
+ if (!isset($no_override['read_when_deleted'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_read_deleted';
+ $input = new html_checkbox(array('name' => '_read_when_deleted', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['read_when_deleted'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('readwhendeleted'))),
+ 'content' => $input->show($config['read_when_deleted']?1:0),
+ );
+ }
+
+ if (!isset($no_override['flag_for_deletion'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_flag_for_deletion';
+ $input = new html_checkbox(array('name' => '_flag_for_deletion', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['flag_for_deletion'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('flagfordeletion'))),
+ 'content' => $input->show($config['flag_for_deletion']?1:0),
+ );
+ }
+
+ // don't show deleted messages
+ if (!isset($no_override['skip_deleted'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_skip_deleted';
+ $input = new html_checkbox(array('name' => '_skip_deleted', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['skip_deleted'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('skipdeleted'))),
+ 'content' => $input->show($config['skip_deleted']?1:0),
+ );
+ }
+
+ if (!isset($no_override['delete_always'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_delete_always';
+ $input = new html_checkbox(array('name' => '_delete_always', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['delete_always'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('deletealways'))),
+ 'content' => $input->show($config['delete_always']?1:0),
+ );
+ }
+
+ if (!isset($no_override['delete_junk'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_delete_junk';
+ $input = new html_checkbox(array('name' => '_delete_junk', 'id' => $field_id, 'value' => 1));
+
+ $blocks['main']['options']['delete_junk'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('deletejunk'))),
+ 'content' => $input->show($config['delete_junk']?1:0),
+ );
+ }
+
+ // Trash purging on logout
+ if (!isset($no_override['logout_purge'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_logout_purge';
+ $input = new html_checkbox(array('name' => '_logout_purge', 'id' => $field_id, 'value' => 1));
+
+ $blocks['maintenance']['options']['logout_purge'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('logoutclear'))),
+ 'content' => $input->show($config['logout_purge']?1:0),
+ );
+ }
+
+ // INBOX compacting on logout
+ if (!isset($no_override['logout_expunge'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_logout_expunge';
+ $input = new html_checkbox(array('name' => '_logout_expunge', 'id' => $field_id, 'value' => 1));
+
+ $blocks['maintenance']['options']['logout_expunge'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('logoutcompact'))),
+ 'content' => $input->show($config['logout_expunge']?1:0),
+ );
+ }
}
- }
- }
-
- $product_name = $RCMAIL->config->get('product_name', 'Roundcube Webmail');
- $RCMAIL->output->add_script(sprintf("%s.check_protocol_handler('%s', '#mailtoprotohandler');",
- JS_OBJECT_NAME, JQ($product_name)), 'foot');
-
- $blocks['browser'] = array(
- 'name' => Q(rcube_label('browseroptions')),
- 'options' => array('mailtoprotohandler' => array(
- 'content' => html::a(array(
- 'href' => '#',
- 'id' => 'mailtoprotohandler'), Q(rcube_label('mailtoprotohandler'))),
- )),
- );
-
- break;
-
- // Mailbox view (mail screen)
- case 'mailbox':
-
- $blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
- 'new_message' => array('name' => Q(rcube_label('newmessage'))),
- );
-
- // show config parameter for preview pane
- if (!isset($no_override['preview_pane'])) {
- $field_id = 'rcmfd_preview';
- $input_preview = new html_checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1,
- 'onchange' => "$('#rcmfd_preview_pane_mark_read').prop('disabled', !this.checked)"));
-
- $blocks['main']['options']['preview_pane'] = array(
- 'title' => html::label($field_id, Q(rcube_label('previewpane'))),
- 'content' => $input_preview->show($config['preview_pane']?1:0),
- );
- }
-
- // show config parameter for preview pane auto mark as read delay
- if (!isset($no_override['preview_pane_mark_read'])) {
- // apply default if config option is not set at all
- $config['preview_pane_mark_read'] = $RCMAIL->config->get('preview_pane_mark_read', 0);
-
- $field_id = 'rcmfd_preview_pane_mark_read';
- $select_delay = new html_select(array('name' => '_preview_pane_mark_read', 'id' => $field_id,
- 'disabled' => $config['preview_pane']?0:1));
-
- $select_delay->add(rcube_label('never'), '-1');
- $select_delay->add(rcube_label('immediately'), 0);
- foreach(array(5, 10, 20, 30) as $sec)
- $select_delay->add(rcube_label(array('name' => 'afternseconds', 'vars' => array('n' => $sec))), $sec);
-
- $blocks['main']['options']['preview_pane_mark_read'] = array(
- 'title' => html::label($field_id, Q(rcube_label('previewpanemarkread'))),
- 'content' => $select_delay->show(intval($config['preview_pane_mark_read'])),
- );
- }
-
- if (!isset($no_override['mdn_requests'])) {
- $field_id = 'rcmfd_mdn_requests';
- $select_mdn_requests = new html_select(array('name' => '_mdn_requests', 'id' => $field_id));
- $select_mdn_requests->add(rcube_label('askuser'), 0);
- $select_mdn_requests->add(rcube_label('autosend'), 1);
- $select_mdn_requests->add(rcube_label('autosendknown'), 3);
- $select_mdn_requests->add(rcube_label('autosendknownignore'), 4);
- $select_mdn_requests->add(rcube_label('ignore'), 2);
-
- $blocks['main']['options']['mdn_requests'] = array(
- 'title' => html::label($field_id, Q(rcube_label('mdnrequests'))),
- 'content' => $select_mdn_requests->show($config['mdn_requests']),
- );
- }
-
- $storage = $RCMAIL->get_storage();
- $threading_supported = $storage->get_capability('THREAD');
-
- if (!isset($no_override['autoexpand_threads']) && $threading_supported) {
- $field_id = 'rcmfd_autoexpand_threads';
- $select_autoexpand_threads = new html_select(array('name' => '_autoexpand_threads', 'id' => $field_id));
- $select_autoexpand_threads->add(rcube_label('never'), 0);
- $select_autoexpand_threads->add(rcube_label('do_expand'), 1);
- $select_autoexpand_threads->add(rcube_label('expand_only_unread'), 2);
-
- $blocks['main']['options']['autoexpand_threads'] = array(
- 'title' => html::label($field_id, Q(rcube_label('autoexpand_threads'))),
- 'content' => $select_autoexpand_threads->show($config['autoexpand_threads']),
- );
- }
-
- // show page size selection
- if (!isset($no_override['mail_pagesize'])) {
- $field_id = 'rcmfd_mail_pagesize';
- $input_pagesize = new html_inputfield(array('name' => '_mail_pagesize', 'id' => $field_id, 'size' => 5));
-
- $size = intval($config['mail_pagesize'] ? $config['mail_pagesize'] : $config['pagesize']);
-
- $blocks['main']['options']['pagesize'] = array(
- 'title' => html::label($field_id, Q(rcube_label('pagesize'))),
- 'content' => $input_pagesize->show($size ? $size : 50),
- );
- }
- if (!isset($no_override['check_all_folders'])) {
- $field_id = 'rcmfd_check_all_folders';
- $input_check_all = new html_checkbox(array('name' => '_check_all_folders', 'id' => $field_id, 'value' => 1));
-
- $blocks['new_message']['options']['check_all_folders'] = array(
- 'title' => html::label($field_id, Q(rcube_label('checkallfolders'))),
- 'content' => $input_check_all->show($config['check_all_folders']?1:0),
- );
- }
-
- break;
-
- // Message viewing
- case 'mailview':
-
- $blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
- );
-
- // show checkbox to open message view in new window
- if (!isset($no_override['message_extwin'])) {
- $field_id = 'rcmfd_message_extwin';
- $input_msgextwin = new html_checkbox(array('name' => '_message_extwin', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['message_extwin'] = array(
- 'title' => html::label($field_id, Q(rcube_label('showinextwin'))),
- 'content' => $input_msgextwin->show($config['message_extwin']?1:0),
- );
- }
-
- // show checkbox for HTML/plaintext messages
- if (!isset($no_override['prefer_html'])) {
- $field_id = 'rcmfd_htmlmsg';
- $input_preferhtml = new html_checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1,
- 'onchange' => "$('#rcmfd_show_images').prop('disabled', !this.checked).val(0)"));
-
- $blocks['main']['options']['prefer_html'] = array(
- 'title' => html::label($field_id, Q(rcube_label('preferhtml'))),
- 'content' => $input_preferhtml->show($config['prefer_html']?1:0),
- );
- }
-
- if (!isset($no_override['default_charset'])) {
- $field_id = 'rcmfd_default_charset';
-
- $blocks['main']['options']['default_charset'] = array(
- 'title' => html::label($field_id, Q(rcube_label('defaultcharset'))),
- 'content' => $RCMAIL->output->charset_selector(array(
- 'name' => '_default_charset', 'selected' => $config['default_charset']
- ))
- );
- }
-
- if (!isset($no_override['show_images'])) {
- $field_id = 'rcmfd_show_images';
- $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id,
- 'disabled' => !$config['prefer_html']));
- $input_show_images->add(rcube_label('never'), 0);
- $input_show_images->add(rcube_label('fromknownsenders'), 1);
- $input_show_images->add(rcube_label('always'), 2);
-
- $blocks['main']['options']['show_images'] = array(
- 'title' => html::label($field_id, Q(rcube_label('showremoteimages'))),
- 'content' => $input_show_images->show($config['prefer_html'] ? $config['show_images'] : 0),
- );
- }
-
- if (!isset($no_override['inline_images'])) {
- $field_id = 'rcmfd_inline_images';
- $input_inline_images = new html_checkbox(array('name' => '_inline_images', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['inline_images'] = array(
- 'title' => html::label($field_id, Q(rcube_label('showinlineimages'))),
- 'content' => $input_inline_images->show($config['inline_images']?1:0),
- );
- }
-
- // "display after delete" checkbox
- if (!isset($no_override['display_next'])) {
- $field_id = 'rcmfd_displaynext';
- $input_displaynext = new html_checkbox(array('name' => '_display_next', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['display_next'] = array(
- 'title' => html::label($field_id, Q(rcube_label('displaynext'))),
- 'content' => $input_displaynext->show($config['display_next']?1:0),
- );
- }
-
- break;
-
- // Mail composition
- case 'compose':
-
- $blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
- 'sig' => array('name' => Q(rcube_label('signatureoptions'))),
- 'spellcheck' => array('name' => Q(rcube_label('spellcheckoptions'))),
- );
-
- // show checkbox to compose messages in a new window
- if (!isset($no_override['compose_extwin'])) {
- $field_id = 'rcmfdcompose_extwin';
- $input_compextwin = new html_checkbox(array('name' => '_compose_extwin', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['compose_extwin'] = array(
- 'title' => html::label($field_id, Q(rcube_label('composeextwin'))),
- 'content' => $input_compextwin->show($config['compose_extwin']?1:0),
- );
- }
-
- if (!isset($no_override['htmleditor'])) {
- $field_id = 'rcmfd_htmleditor';
- $select_htmleditor = new html_select(array('name' => '_htmleditor', 'id' => $field_id));
- $select_htmleditor->add(rcube_label('never'), 0);
- $select_htmleditor->add(rcube_label('always'), 1);
- $select_htmleditor->add(rcube_label('htmlonreply'), 2);
- $select_htmleditor->add(rcube_label('htmlonreplyandforward'), 3);
-
- $blocks['main']['options']['htmleditor'] = array(
- 'title' => html::label($field_id, Q(rcube_label('htmleditor'))),
- 'content' => $select_htmleditor->show(intval($config['htmleditor'])),
- );
- }
-
- if (!isset($no_override['draft_autosave'])) {
- $field_id = 'rcmfd_autosave';
- $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => $field_id, 'disabled' => empty($config['drafts_mbox'])));
- $select_autosave->add(rcube_label('never'), 0);
- foreach (array(1, 3, 5, 10) as $i => $min)
- $select_autosave->add(rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min))), $min*60);
-
- $blocks['main']['options']['draft_autosave'] = array(
- 'title' => html::label($field_id, Q(rcube_label('autosavedraft'))),
- 'content' => $select_autosave->show($config['draft_autosave']),
- );
- }
-
- if (!isset($no_override['mime_param_folding'])) {
- $field_id = 'rcmfd_param_folding';
- $select_param_folding = new html_select(array('name' => '_mime_param_folding', 'id' => $field_id));
- $select_param_folding->add(rcube_label('2231folding'), 0);
- $select_param_folding->add(rcube_label('miscfolding'), 1);
- $select_param_folding->add(rcube_label('2047folding'), 2);
-
- $blocks['main']['options']['mime_param_folding'] = array(
- 'advanced' => true,
- 'title' => html::label($field_id, Q(rcube_label('mimeparamfolding'))),
- 'content' => $select_param_folding->show($config['mime_param_folding']),
- );
- }
- if (!isset($no_override['force_7bit'])) {
- $field_id = 'rcmfd_force_7bit';
- $input_7bit = new html_checkbox(array('name' => '_force_7bit', 'id' => $field_id, 'value' => 1));
+ $found = false;
+ $data = $RCMAIL->plugins->exec_hook('preferences_list',
+ array('section' => $sect['id'], 'blocks' => $blocks, 'current' => $current));
- $blocks['main']['options']['force_7bit'] = array(
- 'title' => html::label($field_id, Q(rcube_label('force7bit'))),
- 'content' => $input_7bit->show($config['force_7bit']?1:0),
- );
- }
-
- if (!isset($no_override['mdn_default'])) {
- $field_id = 'rcmfd_mdn_default';
- $input_mdn = new html_checkbox(array('name' => '_mdn_default', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['mdn_default'] = array(
- 'title' => html::label($field_id, Q(rcube_label('reqmdn'))),
- 'content' => $input_mdn->show($config['mdn_default']?1:0),
- );
- }
-
- if (!isset($no_override['dsn_default'])) {
- $field_id = 'rcmfd_dsn_default';
- $input_dsn = new html_checkbox(array('name' => '_dsn_default', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['dsn_default'] = array(
- 'title' => html::label($field_id, Q(rcube_label('reqdsn'))),
- 'content' => $input_dsn->show($config['dsn_default']?1:0),
- );
- }
-
- if (!isset($no_override['reply_same_folder'])) {
- $field_id = 'rcmfd_reply_same_folder';
- $input_reply_same_folder = new html_checkbox(array('name' => '_reply_same_folder', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['reply_same_folder'] = array(
- 'title' => html::label($field_id, Q(rcube_label('replysamefolder'))),
- 'content' => $input_reply_same_folder->show($config['reply_same_folder']?1:0),
- );
- }
-
- if (!isset($no_override['reply_mode'])) {
- $field_id = 'rcmfd_reply_mode';
- $select_replymode = new html_select(array('name' => '_reply_mode', 'id' => $field_id,
- 'onchange' => "\$('#rcmfd_sig_above').attr('disabled',this.selectedIndex<2)"));
- $select_replymode->add(rcube_label('replyempty'), -1);
- $select_replymode->add(rcube_label('replybottomposting'), 0);
- $select_replymode->add(rcube_label('replytopposting'), 1);
-
- $blocks['main']['options']['reply_mode'] = array(
- 'title' => html::label($field_id, Q(rcube_label('whenreplying'))),
- 'content' => $select_replymode->show(intval($config['reply_mode'])),
- );
- }
-
- if (!isset($no_override['spellcheck_before_send']) && $config['enable_spellcheck']) {
- $field_id = 'rcmfd_spellcheck_before_send';
- $input_spellcheck = new html_checkbox(array('name' => '_spellcheck_before_send', 'id' => $field_id, 'value' => 1));
-
- $blocks['spellcheck']['options']['spellcheck_before_send'] = array(
- 'title' => html::label($field_id, Q(rcube_label('spellcheckbeforesend'))),
- 'content' => $input_spellcheck->show($config['spellcheck_before_send']?1:0),
- );
- }
-
- if ($config['enable_spellcheck']) {
- foreach (array('syms', 'nums', 'caps') as $key) {
- $key = 'spellcheck_ignore_'.$key;
- if (!isset($no_override[$key])) {
- $input_spellcheck = new html_checkbox(array('name' => '_'.$key, 'id' => 'rcmfd_'.$key, 'value' => 1));
-
- $blocks['spellcheck']['options'][$key] = array(
- 'title' => html::label($field_id, Q(rcube_label(str_replace('_', '', $key)))),
- 'content' => $input_spellcheck->show($config[$key]?1:0),
- );
+ // create output
+ foreach ($data['blocks'] as $block) {
+ if (!empty($block['content']) || !empty($block['options'])) {
+ $found = true;
+ break;
+ }
}
- }
- }
- if (!isset($no_override['show_sig'])) {
- $field_id = 'rcmfd_show_sig';
- $select_show_sig = new html_select(array('name' => '_show_sig', 'id' => $field_id));
- $select_show_sig->add(rcube_label('never'), 0);
- $select_show_sig->add(rcube_label('always'), 1);
- $select_show_sig->add(rcube_label('newmessageonly'), 2);
- $select_show_sig->add(rcube_label('replyandforwardonly'), 3);
-
- $blocks['sig']['options']['show_sig'] = array(
- 'title' => html::label($field_id, Q(rcube_label('autoaddsignature'))),
- 'content' => $select_show_sig->show($RCMAIL->config->get('show_sig', 1)),
- );
+ if (!$found)
+ unset($sections[$idx]);
+ else
+ $sections[$idx]['blocks'] = $data['blocks'];
}
- if (!isset($no_override['sig_above'])) {
- $field_id = 'rcmfd_sig_above';
- $select_sigabove = new html_select(array('name' => '_sig_above', 'id' => $field_id, 'disabled' => $config['reply_mode'] < 1));
- $select_sigabove->add(rcube_label('belowquote'), 0);
- $select_sigabove->add(rcube_label('abovequote'), 1);
-
- $blocks['sig']['options']['sig_above'] = array(
- 'title' => html::label($field_id, Q(rcube_label('replysignaturepos'))),
- 'content' => $select_sigabove->show($config['sig_above']?1:0),
- );
- }
-
- if (!isset($no_override['strip_existing_sig'])) {
- $field_id = 'rcmfd_strip_existing_sig';
- $input_stripexistingsig = new html_checkbox(array('name' => '_strip_existing_sig', 'id' => $field_id, 'value' => 1));
-
- $blocks['sig']['options']['strip_existing_sig'] = array(
- 'title' => html::label($field_id, Q(rcube_label('replyremovesignature'))),
- 'content' => $input_stripexistingsig->show($config['strip_existing_sig']?1:0),
- );
- }
-
- if (!isset($no_override['forward_attachment'])) {
- $field_id = 'rcmfd_forward_attachment';
- $select = new html_select(array('name' => '_forward_attachment', 'id' => $field_id));
- $select->add(rcube_label('inline'), 0);
- $select->add(rcube_label('asattachment'), 1);
-
- $blocks['main']['options']['forward_attachment'] = array(
- 'title' => html::label($field_id, Q(rcube_label('forwardmode'))),
- 'content' => $select->show(intval($config['forward_attachment'])),
- );
- }
-
- if (!isset($no_override['default_font'])) {
- $field_id = 'rcmfd_default_font';
- $fonts = rcube_fontdefs();
- $default_font = $config['default_font'] ? $config['default_font'] : 'Verdana';
-
- $select = '<select name="_default_font" id="'.$field_id.'">';
- foreach ($fonts as $fname => $font)
- $select .= '<option value="'.$fname.'"'
- . ($fname == $default_font ? ' selected="selected"' : '')
- . ' style=\'font-family: ' . $font . '\'>'
- . Q($fname) . '</option>';
- $select .= '</select>';
-
- $blocks['main']['options']['default_font'] = array(
- 'title' => html::label($field_id, Q(rcube_label('defaultfont'))),
- 'content' => $select
- );
- }
-
- break;
-
-
- // Addressbook config
- case 'addressbook':
-
- $blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
- );
-
- if (!isset($no_override['default_addressbook'])
- && ($books = $RCMAIL->get_address_sources(true, true))
- ) {
- $field_id = 'rcmfd_default_addressbook';
- $select_abook = new html_select(array('name' => '_default_addressbook', 'id' => $field_id));
-
- foreach ($books as $book) {
- $select_abook->add(html_entity_decode($book['name'], ENT_COMPAT, 'UTF-8'), $book['id']);
- }
-
- $blocks['main']['options']['default_addressbook'] = array(
- 'title' => html::label($field_id, Q(rcube_label('defaultabook'))),
- 'content' => $select_abook->show($config['default_addressbook']),
- );
- }
-
- // show addressbook listing mode selection
- if (!isset($no_override['addressbook_name_listing'])) {
- $field_id = 'rcmfd_addressbook_name_listing';
- $select_listing = new html_select(array('name' => '_addressbook_name_listing', 'id' => $field_id));
- $select_listing->add(rcube_label('name'), 0);
- $select_listing->add(rcube_label('firstname') . ' ' . rcube_label('surname'), 1);
- $select_listing->add(rcube_label('surname') . ' ' . rcube_label('firstname'), 2);
- $select_listing->add(rcube_label('surname') . ', ' . rcube_label('firstname'), 3);
-
- $blocks['main']['options']['list_name_listing'] = array(
- 'title' => html::label($field_id, Q(rcube_label('listnamedisplay'))),
- 'content' => $select_listing->show($config['addressbook_name_listing']),
- );
- }
-
- // show addressbook sort column
- if (!isset($no_override['addressbook_sort_col'])) {
- $field_id = 'rcmfd_addressbook_sort_col';
- $select_sort = new html_select(array('name' => '_addressbook_sort_col', 'id' => $field_id));
- $select_sort->add(rcube_label('name'), 'name');
- $select_sort->add(rcube_label('firstname'), 'firstname');
- $select_sort->add(rcube_label('surname'), 'surname');
-
- $blocks['main']['options']['sort_col'] = array(
- 'title' => html::label($field_id, Q(rcube_label('listsorting'))),
- 'content' => $select_sort->show($config['addressbook_sort_col']),
- );
- }
-
- // show addressbook page size selection
- if (!isset($no_override['addressbook_pagesize'])) {
- $field_id = 'rcmfd_addressbook_pagesize';
- $input_pagesize = new html_inputfield(array('name' => '_addressbook_pagesize', 'id' => $field_id, 'size' => 5));
-
- $size = intval($config['addressbook_pagesize'] ? $config['addressbook_pagesize'] : $config['pagesize']);
-
- $blocks['main']['options']['pagesize'] = array(
- 'title' => html::label($field_id, Q(rcube_label('pagesize'))),
- 'content' => $input_pagesize->show($size ? $size : 50),
- );
- }
-
- if (!isset($no_override['autocomplete_single'])) {
- $field_id = 'rcmfd_autocomplete_single';
- $checkbox = new html_checkbox(array('name' => '_autocomplete_single', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['autocomplete_single'] = array(
- 'title' => html::label($field_id, Q(rcube_label('autocompletesingle'))),
- 'content' => $checkbox->show($config['autocomplete_single']?1:0),
- );
- }
-
- break;
-
- // Special IMAP folders
- case 'folders':
-
- $blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
- );
-
- // Configure special folders
- if (!isset($no_override['default_folders'])) {
- // load folders list only when needed
- if ($current) {
- $select = rcmail_mailbox_select(array(
- 'noselection' => '---',
- 'realnames' => true,
- 'maxlength' => 30,
- 'folder_filter' => 'mail',
- 'folder_rights' => 'w',
- // #1486114, #1488279
- 'onchange' => "if ($(this).val() == 'INBOX') $(this).val('')",
- ));
- }
- else // dummy select
- $select = new html_select();
-
- if (!isset($no_override['drafts_mbox']))
- $blocks['main']['options']['drafts_mbox'] = array(
- 'title' => Q(rcube_label('drafts')),
- 'content' => $select->show($config['drafts_mbox'], array('name' => "_drafts_mbox")),
- );
-
- if (!isset($no_override['sent_mbox']))
- $blocks['main']['options']['sent_mbox'] = array(
- 'title' => Q(rcube_label('sent')),
- 'content' => $select->show($config['sent_mbox'], array('name' => "_sent_mbox")),
- );
-
- if (!isset($no_override['junk_mbox']))
- $blocks['main']['options']['junk_mbox'] = array(
- 'title' => Q(rcube_label('junk')),
- 'content' => $select->show($config['junk_mbox'], array('name' => "_junk_mbox")),
- );
-
- if (!isset($no_override['trash_mbox']))
- $blocks['main']['options']['trash_mbox'] = array(
- 'title' => Q(rcube_label('trash')),
- 'content' => $select->show($config['trash_mbox'], array('name' => "_trash_mbox")),
- );
- }
-
- break;
-
- // Server settings
- case 'server':
-
- $blocks = array(
- 'main' => array('name' => Q(rcube_label('mainoptions'))),
- 'maintenance' => array('name' => Q(rcube_label('maintenance'))),
- );
-
- if (!isset($no_override['read_when_deleted'])) {
- $field_id = 'rcmfd_read_deleted';
- $input_readdeleted = new html_checkbox(array('name' => '_read_when_deleted', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['read_when_deleted'] = array(
- 'title' => html::label($field_id, Q(rcube_label('readwhendeleted'))),
- 'content' => $input_readdeleted->show($config['read_when_deleted']?1:0),
- );
- }
-
- if (!isset($no_override['flag_for_deletion'])) {
- $field_id = 'rcmfd_flag_for_deletion';
- $input_flagfordeletion = new html_checkbox(array('name' => '_flag_for_deletion', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['flag_for_deletion'] = array(
- 'title' => html::label($field_id, Q(rcube_label('flagfordeletion'))),
- 'content' => $input_flagfordeletion->show($config['flag_for_deletion']?1:0),
- );
- }
-
- // don't show deleted messages
- if (!isset($no_override['skip_deleted'])) {
- $field_id = 'rcmfd_skip_deleted';
- $input_purge = new html_checkbox(array('name' => '_skip_deleted', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['skip_deleted'] = array(
- 'title' => html::label($field_id, Q(rcube_label('skipdeleted'))),
- 'content' => $input_purge->show($config['skip_deleted']?1:0),
- );
- }
-
- if (!isset($no_override['delete_always'])) {
- $field_id = 'rcmfd_delete_always';
- $input_delete_always = new html_checkbox(array('name' => '_delete_always', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['delete_always'] = array(
- 'title' => html::label($field_id, Q(rcube_label('deletealways'))),
- 'content' => $input_delete_always->show($config['delete_always']?1:0),
- );
- }
-
- if (!isset($no_override['delete_junk'])) {
- $field_id = 'rcmfd_delete_junk';
- $input_delete_junk = new html_checkbox(array('name' => '_delete_junk', 'id' => $field_id, 'value' => 1));
-
- $blocks['main']['options']['delete_junk'] = array(
- 'title' => html::label($field_id, Q(rcube_label('deletejunk'))),
- 'content' => $input_delete_junk->show($config['delete_junk']?1:0),
- );
- }
-
- // Trash purging on logout
- if (!isset($no_override['logout_purge'])) {
- $field_id = 'rcmfd_logout_purge';
- $input_purge = new html_checkbox(array('name' => '_logout_purge', 'id' => $field_id, 'value' => 1));
-
- $blocks['maintenance']['options']['logout_purge'] = array(
- 'title' => html::label($field_id, Q(rcube_label('logoutclear'))),
- 'content' => $input_purge->show($config['logout_purge']?1:0),
- );
- }
-
- // INBOX compacting on logout
- if (!isset($no_override['logout_expunge'])) {
- $field_id = 'rcmfd_logout_expunge';
- $input_expunge = new html_checkbox(array('name' => '_logout_expunge', 'id' => $field_id, 'value' => 1));
-
- $blocks['maintenance']['options']['logout_expunge'] = array(
- 'title' => html::label($field_id, Q(rcube_label('logoutcompact'))),
- 'content' => $input_expunge->show($config['logout_expunge']?1:0),
- );
- }
-
- break;
- }
-
- $data = $RCMAIL->plugins->exec_hook('preferences_list', array('section' => $sect['id'], 'blocks' => $blocks));
- $found = false;
-
- // create output
- foreach ($data['blocks'] as $block) {
- if (!empty($block['content']) || !empty($block['options'])) {
- $found = true;
- break;
- }
- }
-
- if (!$found)
- unset($sections[$idx]);
- else
- $sections[$idx]['blocks'] = $data['blocks'];
- }
-
- return array($sections, $plugin['cols']);
+ return array($sections, $plugin['cols']);
}
function rcmail_get_skins()
{
- $path = 'skins';
- $skins = array();
-
- $dir = opendir($path);
+ $path = RCUBE_INSTALL_PATH . 'skins';
+ $skins = array();
+ $dir = opendir($path);
- if (!$dir)
- return false;
+ if (!$dir) {
+ return false;
+ }
- while (($file = readdir($dir)) !== false)
- {
- $filename = $path.'/'.$file;
- if (!preg_match('/^\./', $file) && is_dir($filename) && is_readable($filename))
- $skins[] = $file;
- }
+ while (($file = readdir($dir)) !== false) {
+ $filename = $path.'/'.$file;
+ if (!preg_match('/^\./', $file) && is_dir($filename) && is_readable($filename)) {
+ $skins[] = $file;
+ }
+ }
- closedir($dir);
+ closedir($dir);
- return $skins;
+ return $skins;
}
@@ -989,9 +1237,9 @@ function rcmail_update_folder_row($name, $oldname=null, $subscribe=false, $class
// register UI objects
$OUTPUT->add_handlers(array(
- 'prefsframe' => 'rcmail_preferences_frame',
- 'sectionslist' => 'rcmail_sections_list',
- 'identitieslist' => 'rcmail_identities_list',
+ 'prefsframe' => 'rcmail_preferences_frame',
+ 'sectionslist' => 'rcmail_sections_list',
+ 'identitieslist' => 'rcmail_identities_list',
));
// register action aliases
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 5daab0d24..19edb41d4 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -34,6 +34,7 @@ switch ($CURR_SECTION)
'time_format' => isset($_POST['_time_format']) ? get_input_value('_time_format', RCUBE_INPUT_POST) : ($CONFIG['time_format'] ? $CONFIG['time_format'] : 'H:i'),
'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE,
'refresh_interval' => isset($_POST['_refresh_interval']) ? intval($_POST['_refresh_interval'])*60 : $CONFIG['refresh_interval'],
+ 'standard_windows' => isset($_POST['_standard_windows']) ? TRUE : FALSE,
'skin' => isset($_POST['_skin']) ? get_input_value('_skin', RCUBE_INPUT_POST) : $CONFIG['skin'],
);
@@ -60,6 +61,7 @@ switch ($CURR_SECTION)
case 'mailview':
$a_user_prefs = array(
'message_extwin' => intval($_POST['_message_extwin']),
+ 'message_show_email' => isset($_POST['_message_show_email']) ? TRUE : FALSE,
'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE,
'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE,
'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0,
@@ -86,7 +88,6 @@ switch ($CURR_SECTION)
'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1,
'reply_mode' => isset($_POST['_reply_mode']) ? intval($_POST['_reply_mode']) : 0,
'strip_existing_sig' => isset($_POST['_strip_existing_sig']),
- 'sig_above' => !empty($_POST['_sig_above']) && $_POST['_reply_mode'] > 0,
'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST),
'forward_attachment' => !empty($_POST['_forward_attachment']),
);
@@ -119,6 +120,8 @@ switch ($CURR_SECTION)
case 'folders':
$a_user_prefs = array(
+ 'show_real_foldernames' =>
+ isset($_POST['_show_real_foldernames']) ? TRUE : FALSE,
'drafts_mbox' => get_input_value('_drafts_mbox', RCUBE_INPUT_POST, true),
'sent_mbox' => get_input_value('_sent_mbox', RCUBE_INPUT_POST, true),
'junk_mbox' => get_input_value('_junk_mbox', RCUBE_INPUT_POST, true),
@@ -158,7 +161,7 @@ switch ($CURR_SECTION)
$a_user_prefs['timezone'] = (string) $a_user_prefs['timezone'];
if (isset($a_user_prefs['refresh_interval']) && !empty($CONFIG['min_refresh_interval'])) {
- if ($a_user_prefs['refresh_interval'] > $CONFIG['min_refresh_interval']) {
+ if ($a_user_prefs['refresh_interval'] < $CONFIG['min_refresh_interval']) {
$a_user_prefs['refresh_interval'] = $CONFIG['min_refresh_interval'];
}
}
diff --git a/program/steps/utils/save_pref.inc b/program/steps/utils/save_pref.inc
index b550ad7ef..7def8733d 100644
--- a/program/steps/utils/save_pref.inc
+++ b/program/steps/utils/save_pref.inc
@@ -21,6 +21,22 @@
$name = get_input_value('_name', RCUBE_INPUT_POST);
$value = get_input_value('_value', RCUBE_INPUT_POST);
+$whitelist = array(
+ 'preview_pane',
+ 'list_cols',
+ 'collapsed_folders',
+ 'collapsed_abooks',
+);
+
+if (!in_array($name, array_merge($whitelist, $RCMAIL->plugins->allowed_prefs))) {
+ raise_error(array('code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => sprintf("Hack attempt detected (user: %s)", $RCMAIL->get_user_name())),
+ true, false);
+
+ $OUTPUT->reset();
+ $OUTPUT->send();
+}
// save preference value
$RCMAIL->user->save_prefs(array($name => $value));
diff --git a/program/steps/utils/spell.inc b/program/steps/utils/spell.inc
index a0dd35d27..38e4ca285 100644
--- a/program/steps/utils/spell.inc
+++ b/program/steps/utils/spell.inc
@@ -42,6 +42,13 @@ else {
$result = $spellchecker->get_xml();
}
+if ($err = $spellchecker->error()) {
+ rcube::raise_error(array('code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => sprintf("Spell check engine error: " . $err)),
+ true, false);
+}
+
// set response length
header("Content-Length: " . strlen($result));
diff --git a/program/steps/utils/spell_html.inc b/program/steps/utils/spell_html.inc
index 861e4ba48..96b41e230 100644
--- a/program/steps/utils/spell_html.inc
+++ b/program/steps/utils/spell_html.inc
@@ -46,6 +46,11 @@ else if ($request['method'] == 'learnWord') {
}
if ($error = $spellchecker->error()) {
+ rcube::raise_error(array('code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => sprintf("Spell check engine error: " . $error)),
+ true, false);
+
echo '{"error":{"errstr":"' . addslashes($error) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}';
exit;
}
diff --git a/skins/classic/addressbook.css b/skins/classic/addressbook.css
index 5afa4592f..415142e0c 100644
--- a/skins/classic/addressbook.css
+++ b/skins/classic/addressbook.css
@@ -224,6 +224,37 @@
-o-text-overflow: ellipsis;
}
+#contacts-table .contact.readonly td
+{
+ font-style: italic;
+}
+
+#contacts-table td.name
+{
+ width: 95%;
+}
+
+#contacts-table td.action
+{
+ width: 12px;
+ padding: 0px 6px 0 4px;
+ text-align: right;
+}
+
+#contacts-table td.action a
+{
+ font-size: 16px;
+ font-weight: bold;
+ font-style: normal;
+ text-decoration: none;
+ color: #333;
+}
+
+#contacts-table .selected td.action a
+{
+ color: #fff;
+}
+
#contacts-box
{
position: absolute;
diff --git a/skins/classic/common.css b/skins/classic/common.css
index 1f62fbe07..3c322f0ed 100644
--- a/skins/classic/common.css
+++ b/skins/classic/common.css
@@ -283,6 +283,15 @@ body > #message a
text-decoration: underline;
}
+body.extwin #closelink
+{
+ position: absolute;
+ top: 5px;
+ right: 20px;
+ text-align: right;
+ z-index:100;
+}
+
.box
{
border: 1px solid #999;
diff --git a/skins/classic/embed.css b/skins/classic/embed.css
index b9715c77c..6d2c63c6a 100644
--- a/skins/classic/embed.css
+++ b/skins/classic/embed.css
@@ -14,12 +14,16 @@
font-size: 14px;
color: #000;
margin-bottom: .8em;
- min-height: 20px;
+ min-height: 30px;
padding: 10px 10px 6px 46px;
background: url(images/display/icons.png) 6px 3px no-repeat #F7FDCB;
border: 1px solid #C2D071;
}
+.rcmail-inline-warning {
+ background-position: 6px -92px;
+}
+
.rcmail-inline-message > button {
margin-left: 1em;
vertical-align: baseline;
diff --git a/skins/classic/functions.js b/skins/classic/functions.js
index 499783b3f..af561c37b 100644
--- a/skins/classic/functions.js
+++ b/skins/classic/functions.js
@@ -94,7 +94,7 @@ function rcube_mail_ui()
messagemenu: {id:'messagemenu'},
attachmentmenu: {id:'attachmentmenu'},
listmenu: {id:'listmenu', editable:1},
- dragmessagemenu:{id:'dragmessagemenu', sticky:1},
+ dragmenu: {id:'dragmenu', sticky:1},
groupmenu: {id:'groupoptionsmenu', above:1},
mailboxmenu: {id:'mailboxoptionsmenu', above:1},
composemenu: {id:'composeoptionsmenu', editable:1, overlap:1},
@@ -162,9 +162,9 @@ show_popupmenu: function(popup, show)
}
},
-dragmessagemenu: function(show)
+dragmenu: function(show)
{
- this.popups.dragmessagemenu.obj[show?'show':'hide']();
+ this.popups.dragmenu.obj[show?'show':'hide']();
},
forwardmenu: function(show)
@@ -492,14 +492,18 @@ switch_preview_pane: function(elem)
/* Message composing */
init_compose_form: function()
{
- var f, field, fields = ['cc', 'bcc', 'replyto', 'followupto'],
+ var f, v, field, fields = ['cc', 'bcc', 'replyto', 'followupto'],
div = document.getElementById('compose-div'),
headers_div = document.getElementById('compose-headers-div');
// Show input elements with non-empty value
for (f=0; f<fields.length; f++) {
- if ((field = $('#_'+fields[f])) && field.length && field.val() != '')
- rcmail_ui.show_header_form(fields[f]);
+ v = fields[f]; field = $('#_'+v);
+ if (field.length) {
+ field.on('change', {v:v}, function(e) { if (this.value) rcmail_ui.show_header_form(e.data.v); });
+ if (field.val() != '')
+ rcmail_ui.show_header_form(v);
+ }
}
// prevent from form data loss when pressing ESC key in IE
@@ -617,14 +621,130 @@ prev_sibling: function(elm)
while (ps && ps.nodeType == 3)
ps = ps.previousSibling;
return ps;
+},
+
+enable_command: function(p)
+{
+ if (p.command == 'reply-list') {
+ var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
+ $('a.button.replyAll').attr('title', label);
+ }
}
};
/**
- * Scroller
+ * Roundcube generic layer (floating box) class
+ *
+ * @constructor
*/
+function rcube_layer(id, attributes)
+{
+ this.name = id;
+ // create a new layer in the current document
+ this.create = function(arg)
+ {
+ var l = (arg.x) ? arg.x : 0,
+ t = (arg.y) ? arg.y : 0,
+ w = arg.width,
+ h = arg.height,
+ z = arg.zindex,
+ vis = arg.vis,
+ parent = arg.parent,
+ obj = document.createElement('DIV');
+
+ obj.id = this.name;
+ obj.style.position = 'absolute';
+ obj.style.visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden';
+ obj.style.left = l+'px';
+ obj.style.top = t+'px';
+ if (w)
+ obj.style.width = w.toString().match(/\%$/) ? w : w+'px';
+ if (h)
+ obj.style.height = h.toString().match(/\%$/) ? h : h+'px';
+ if (z)
+ obj.style.zIndex = z;
+
+ if (parent)
+ parent.appendChild(obj);
+ else
+ document.body.appendChild(obj);
+
+ this.elm = obj;
+ };
+
+ // create new layer
+ if (attributes != null) {
+ this.create(attributes);
+ this.name = this.elm.id;
+ }
+ else // just refer to the object
+ this.elm = document.getElementById(id);
+
+ if (!this.elm)
+ return false;
+
+
+ // ********* layer object properties *********
+
+ this.css = this.elm.style;
+ this.event = this.elm;
+ this.width = this.elm.offsetWidth;
+ this.height = this.elm.offsetHeight;
+ this.x = parseInt(this.elm.offsetLeft);
+ this.y = parseInt(this.elm.offsetTop);
+ this.visible = (this.css.visibility=='visible' || this.css.visibility=='show' || this.css.visibility=='inherit') ? true : false;
+
+
+ // ********* layer object methods *********
+
+ // move the layer to a specific position
+ this.move = function(x, y)
+ {
+ this.x = x;
+ this.y = y;
+ this.css.left = Math.round(this.x)+'px';
+ this.css.top = Math.round(this.y)+'px';
+ };
+
+ // change the layers width and height
+ this.resize = function(w,h)
+ {
+ this.css.width = w+'px';
+ this.css.height = h+'px';
+ this.width = w;
+ this.height = h;
+ };
+
+ // show or hide the layer
+ this.show = function(a)
+ {
+ if(a == 1) {
+ this.css.visibility = 'visible';
+ this.visible = true;
+ }
+ else if(a == 2) {
+ this.css.visibility = 'inherit';
+ this.visible = true;
+ }
+ else {
+ this.css.visibility = 'hidden';
+ this.visible = false;
+ }
+ };
+
+ // write new content into a Layer
+ this.write = function(cont)
+ {
+ this.elm.innerHTML = cont;
+ };
+
+};
+
+/**
+ * Scroller
+ */
function rcmail_scroller(list, top, bottom)
{
var ref = this;
@@ -664,31 +784,37 @@ function rcmail_scroller(list, top, bottom)
function iframe_events()
{
// this==iframe
- var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
- rcube_event.add_listener({ element: doc, object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
+ try {
+ var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
+ rcube_event.add_listener({ element: doc, object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
+ }
+ catch (e) {
+ // catch possible "Permission denied" error in IE
+ };
};
// Abbreviate mailbox names to fit width of the container
function rcube_render_mailboxlist()
{
- var list = $('#mailboxlist > li a, #mailboxlist ul:visible > li a');
+ var list = $('#mailboxlist > li > a, #mailboxlist ul:visible > li > a');
// it's too slow with really big number of folders, especially on IE
- if (list.length > (bw.ie ? 25 : 100))
+ if (list.length > (bw.ie && bw.vendver < 9 ? 40 : 100))
return;
- list.each(function(){
+ list.each(function() {
var elem = $(this),
text = elem.data('text');
if (!text) {
- text = elem.text().replace(/\s+\(.+$/, '');
+ text = elem.text().replace(/\s+\([0-9]+\)$/, '');
elem.data('text', text);
}
+
if (text.length < 6)
return;
- var abbrev = fit_string_to_size(text, elem, elem.width() - elem.children('span.unreadcount').width());
+ var abbrev = fit_string_to_size(text, elem, elem.width() - elem.children('span.unreadcount').width() - 16);
if (abbrev != text)
elem.attr('title', text);
elem.contents().filter(function(){ return (this.nodeType == 3); }).get(0).data = abbrev;
@@ -698,19 +824,23 @@ function rcube_render_mailboxlist()
// inspired by https://gist.github.com/24261/7fdb113f1e26111bd78c0c6fe515f6c0bf418af5
function fit_string_to_size(str, elem, len)
{
- var w, span, result = str, ellip = '...';
+ var w, span, $span, result = str, ellip = '...';
if (!rcmail.env.tmp_span) {
// it should be appended to elem to use the same css style
// but for performance reasons we'll append it to body (once)
- span = $('<b>').css({visibility: 'hidden', padding: '0px'})
+ span = $('<b>').css({visibility: 'hidden', padding: '0px',
+ 'font-family': elem.css('font-family'),
+ 'font-size': elem.css('font-size')})
.appendTo($('body', document)).get(0);
rcmail.env.tmp_span = span;
}
else {
span = rcmail.env.tmp_span;
}
- span.innerHTML = result;
+
+ $span = $(span);
+ $span.text(result);
// on first run, check if string fits into the length already.
w = span.offsetWidth;
@@ -723,7 +853,7 @@ function fit_string_to_size(str, elem, len)
while (true) {
offLeft = mid - cut;
offRight = mid + cut;
- span.innerHTML = str.substring(0,offLeft) + ellip + str.substring(offRight);
+ $span.text(str.substring(0,offLeft) + ellip + str.substring(offRight));
// break loop if string fits size
if (offLeft < 3 || span.offsetWidth)
@@ -787,7 +917,7 @@ function percent_indicator(obj, data)
var bar2 = $('<div>');
bar2.css({position: 'absolute', top: pos.top + 1, left: pos.left + 1,
width: width + 'px', height: height + 'px', zIndex: 98})
- .addClass('quota_bg');
+ .addClass('quota_bg');
if (quota >= limit_high) {
main.addClass(' quota_text_high');
@@ -810,8 +940,8 @@ function percent_indicator(obj, data)
// Optional parameters used by TinyMCE
var rcmail_editor_settings = {
- skin : "default", // "default", "o2k7"
- skin_variant : "" // "", "silver", "black"
+ skin: "default", // "default", "o2k7"
+ skin_variant: "" // "", "silver", "black"
};
var rcmail_ui;
@@ -822,45 +952,52 @@ function rcube_init_mail_ui()
rcube_event.add_listener({ object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
rcube_event.add_listener({ object:rcmail_ui, method:'body_keydown', event:'keydown' });
- if (rcmail.env.quota_content)
- update_quota(rcmail.env.quota_content);
- rcmail.addEventListener('setquota', update_quota);
-
- $('iframe').load(iframe_events)
- .contents().mouseup(function(e){rcmail_ui.body_mouseup(e)});
-
- if (rcmail.env.task == 'mail') {
- rcmail.addEventListener('menu-open', 'menu_open', rcmail_ui);
- rcmail.addEventListener('menu-save', 'menu_save', rcmail_ui);
- rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui);
- rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui);
- rcmail.gui_object('message_dragmenu', 'dragmessagemenu');
-
- if (rcmail.gui_objects.mailboxlist) {
- rcmail.addEventListener('responseaftermark', rcube_render_mailboxlist);
- rcmail.addEventListener('responseaftergetunread', rcube_render_mailboxlist);
- rcmail.addEventListener('responseaftercheck-recent', rcube_render_mailboxlist);
- rcmail.addEventListener('aftercollapse-folder', rcube_render_mailboxlist);
+ rcmail.addEventListener('init', function() {
+ if (rcmail.env.quota_content)
+ update_quota(rcmail.env.quota_content);
+ rcmail.addEventListener('setquota', update_quota);
+
+ $('iframe').load(iframe_events)
+ .contents().mouseup(function(e){rcmail_ui.body_mouseup(e)});
+
+ if (rcmail.env.task == 'mail') {
+ rcmail.addEventListener('enable-command', 'enable_command', rcmail_ui);
+ rcmail.addEventListener('menu-open', 'menu_open', rcmail_ui);
+ rcmail.addEventListener('menu-save', 'menu_save', rcmail_ui);
+ rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui);
+ rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui);
+ rcmail.gui_object('dragmenu', 'dragmenu');
+
+ if (rcmail.gui_objects.mailboxlist) {
+ rcmail.treelist.addEventListener('expand', rcube_render_mailboxlist);
+ rcmail.addEventListener('responseaftermark', rcube_render_mailboxlist);
+ rcmail.addEventListener('responseaftergetunread', rcube_render_mailboxlist);
+ rcmail.addEventListener('responseaftercheck-recent', rcube_render_mailboxlist);
+ rcmail.addEventListener('responseafterrefresh', rcube_render_mailboxlist);
+ rcmail.addEventListener('afterimport-messages', function(){ rcmail_ui.show_popup('uploadform', false); });
+
+ new rcmail_scroller('#mailboxlist-content', '#mailboxlist-title', '#mailboxlist-footer');
+ }
- new rcmail_scroller('#mailboxlist-content', '#mailboxlist-title', '#mailboxlist-footer');
+ if (rcmail.env.action == 'compose')
+ rcmail_ui.init_compose_form();
+ else if (rcmail.env.action == 'show' || rcmail.env.action == 'preview')
+ // add menu link for each attachment
+ $('#attachment-list > li[id^="attach"]').each(function() {
+ $(this).append($('<a class="drop">').click(function() { rcmail_ui.show_attachmentmenu(this); }));
+ });
}
+ else if (rcmail.env.task == 'addressbook') {
+ rcmail.addEventListener('afterupload-photo', function(){ rcmail_ui.show_popup('uploadform', false); });
- if (rcmail.env.action == 'compose')
- rcmail_ui.init_compose_form();
- else if (rcmail.env.action == 'show' || rcmail.env.action == 'preview')
- // add menu link for each attachment
- $('#attachment-list > li[id^="attach"]').each(function() {
- $(this).append($('<a class="drop">').click(function() { rcmail_ui.show_attachmentmenu(this); }));
- });
- }
- else if (rcmail.env.task == 'addressbook') {
- rcmail.addEventListener('afterupload-photo', function(){ rcmail_ui.show_popup('uploadform', false); });
+ if (rcmail.gui_objects.folderlist)
+ new rcmail_scroller('#directorylist-content', '#directorylist-title', '#directorylist-footer');
- if (rcmail.gui_objects.folderlist)
- new rcmail_scroller('#directorylist-content', '#directorylist-title', '#directorylist-footer');
- }
- else if (rcmail.env.task == 'settings') {
- if (rcmail.gui_objects.subscriptionlist)
- new rcmail_scroller('#folderlist-content', '#folderlist-title', '#folderlist-footer');
- }
+ rcmail.gui_object('dragmenu', 'dragmenu');
+ }
+ else if (rcmail.env.task == 'settings') {
+ if (rcmail.gui_objects.subscriptionlist)
+ new rcmail_scroller('#folderlist-content', '#folderlist-title', '#folderlist-footer');
+ }
+ });
}
diff --git a/skins/classic/images/contactgroup.png b/skins/classic/images/contactgroup.png
new file mode 100644
index 000000000..c46383255
--- /dev/null
+++ b/skins/classic/images/contactgroup.png
Binary files differ
diff --git a/skins/classic/images/favicon.ico b/skins/classic/images/favicon.ico
index b3bd18c12..9ef2f3b9e 100644
--- a/skins/classic/images/favicon.ico
+++ b/skins/classic/images/favicon.ico
Binary files differ
diff --git a/skins/classic/images/mail_toolbar.png b/skins/classic/images/mail_toolbar.png
index e68035da5..4a8431715 100644
--- a/skins/classic/images/mail_toolbar.png
+++ b/skins/classic/images/mail_toolbar.png
Binary files differ
diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html
index bd14f490f..8f8efd291 100644
--- a/skins/classic/includes/messagetoolbar.html
+++ b/skins/classic/includes/messagetoolbar.html
@@ -21,7 +21,7 @@
<roundcube:button name="markmenulink" id="markmenulink" type="link" class="button markmessage" title="markmessages" onclick="rcmail_ui.show_popup('markmenu');return false" content=" " />
<roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="moreactions" onclick="rcmail_ui.show_popup('messagemenu');return false" content=" " />
<roundcube:if condition="template:name == 'message'" />
-<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" folder_filter="mail" />
+<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('move', this.options[this.selectedIndex].value)" class="mboxlist" folder_filter="mail" />
<roundcube:endif />
</div>
diff --git a/skins/classic/mail.css b/skins/classic/mail.css
index 7c350ca3d..b8cc9f351 100644
--- a/skins/classic/mail.css
+++ b/skins/classic/mail.css
@@ -107,6 +107,14 @@
background-position: -192px -32px;
}
+#messagetoolbar a.print {
+ background-position: -224px 0;
+}
+
+#messagetoolbar a.printSel {
+ background-position: -224px -32px;
+}
+
#messagetoolbar a.markmessage {
background-position: -256px 0;
}
@@ -155,6 +163,14 @@
background-position: -416px -32px;
}
+#messagetoolbar a.download {
+ background-position: -480px 0;
+}
+
+#messagetoolbar a.downloadSel {
+ background-position: -480px -32px;
+}
+
#messagetoolbar select.mboxlist
{
position: relative;
@@ -284,10 +300,38 @@
#messagepartcontainer
{
position: absolute;
- top: 80px;
- left: 20px;
- right: 20px;
- bottom: 20px;
+ top: 0;
+ left: 170px;
+ right: 0;
+ bottom: 0;
+}
+
+#messagepartheader
+{
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 160px;
+ border: 1px solid #999999;
+ background-color: #F9F9F9;
+ overflow: hidden;
+}
+
+#messagepartheader table
+{
+ width: 100%;
+ table-layout: fixed;
+}
+
+#messagepartheader table td
+{
+ text-overflow: ellipsis;
+}
+
+#messagepartheader table td.title
+{
+ width: 60px;
}
#mailcontframe
@@ -329,31 +373,7 @@
height: 100%;
min-height: 100%; /* Chrome 14 bug */
border: 1px solid #999999;
- background-color: #F9F9F9;
-}
-
-
-#partheader
-{
- position: absolute;
- top: 10px;
- left: 220px;
- right: 20px;
- height: 40px;
-}
-
-#partheader table td
-{
- padding-left: 2px;
- padding-right: 4px;
- vertical-align: middle;
- font-size: 11px;
-}
-
-#partheader table td.title
-{
- color: #666666;
- font-weight: bold;
+ background-color: #fff;
}
@@ -611,14 +631,22 @@ body.messagelist
background-color: #F9F9F9;
}
-#messagelist
+table.messagelist
{
width: 100%;
display: table;
table-layout: fixed;
+ border-collapse: collapse;
+ border-spacing: 0;
+ z-index: 1;
}
-#messagelist thead tr td
+table.messagelist.fixedcopy
+{
+ z-index: 2;
+}
+
+.messagelist thead tr td
{
height: 20px;
padding: 0 4px 0 2px;
@@ -630,23 +658,23 @@ body.messagelist
font-weight: bold;
}
-#messagelist thead tr td.sortedASC,
-#messagelist thead tr td.sortedDESC
+.messagelist thead tr td.sortedASC,
+.messagelist thead tr td.sortedDESC
{
background-position: 0 -26px;
}
-#messagelist thead tr td.sortedASC a
+.messagelist thead tr td.sortedASC a
{
background: url(images/icons/sort.gif) right 0 no-repeat;
}
-#messagelist thead tr td.sortedDESC a
+.messagelist thead tr td.sortedDESC a
{
background: url(images/icons/sort.gif) right -14px no-repeat;
}
-#messagelist thead tr td a
+.messagelist thead tr td a
{
display: block;
width: auto !important;
@@ -655,18 +683,19 @@ body.messagelist
text-decoration: none;
}
-#messagelist thead tr td.size
+.messagelist thead tr td.size.sortedASC a,
+.messagelist thead tr td.size.sortedDESC a
{
- text-align: left;
+ padding-right: 18px;
}
-#messagelist thead tr td.subject
+.messagelist thead tr td.subject
{
padding-left: 18px;
width: 99%;
}
-#messagelist tbody tr td
+.messagelist tbody tr td
{
height: 20px;
padding: 0;
@@ -680,7 +709,7 @@ body.messagelist
cursor: default;
}
-#messagelist tbody tr td a
+.messagelist tbody tr td a
{
color: #000;
text-decoration: none;
@@ -688,53 +717,53 @@ body.messagelist
cursor: inherit;
}
-#messagelist td img
+.messagelist td img
{
vertical-align: middle;
display: inline-block;
}
-#messagelist tbody tr td.flag,
-#messagelist tbody tr td.status,
-#messagelist tbody tr td.subject span.status
+.messagelist tbody tr td.flag,
+.messagelist tbody tr td.status,
+.messagelist tbody tr td.subject span.status
{
cursor: pointer;
}
-#messagelist tr td.flag span,
-#messagelist tr td.status span,
-#messagelist tr td.attachment span,
-#messagelist tr td.priority span
+.messagelist tr td.flag span,
+.messagelist tr td.status span,
+.messagelist tr td.attachment span,
+.messagelist tr td.priority span
{
display: block;
width: 15px;
}
-#messagelist tr td div.collapsed,
-#messagelist tr td div.expanded,
-#messagelist tr td.threads div.listmenu,
-#messagelist tr td.attachment span.attachment,
-#messagelist tr td.attachment span.report,
-#messagelist tr td.priority span.priority,
-#messagelist tr td.priority span.prio1,
-#messagelist tr td.priority span.prio2,
-#messagelist tr td.priority span.prio3,
-#messagelist tr td.priority span.prio4,
-#messagelist tr td.priority span.prio5,
-#messagelist tr td.flag span.flagged,
-#messagelist tr td.flag span.unflagged,
-#messagelist tr td.flag span.unflagged:hover,
-#messagelist tr td.status span.status,
-#messagelist tr td.status span.msgicon,
-#messagelist tr td.status span.deleted,
-#messagelist tr td.status span.unread,
-#messagelist tr td.status span.unreadchildren,
-#messagelist tr td.subject span.msgicon,
-#messagelist tr td.subject span.deleted,
-#messagelist tr td.subject span.unread,
-#messagelist tr td.subject span.replied,
-#messagelist tr td.subject span.forwarded,
-#messagelist tr td.subject span.unreadchildren
+.messagelist tr td div.collapsed,
+.messagelist tr td div.expanded,
+.messagelist tr td.threads div.listmenu,
+.messagelist tr td.attachment span.attachment,
+.messagelist tr td.attachment span.report,
+.messagelist tr td.priority span.priority,
+.messagelist tr td.priority span.prio1,
+.messagelist tr td.priority span.prio2,
+.messagelist tr td.priority span.prio3,
+.messagelist tr td.priority span.prio4,
+.messagelist tr td.priority span.prio5,
+.messagelist tr td.flag span.flagged,
+.messagelist tr td.flag span.unflagged,
+.messagelist tr td.flag span.unflagged:hover,
+.messagelist tr td.status span.status,
+.messagelist tr td.status span.msgicon,
+.messagelist tr td.status span.deleted,
+.messagelist tr td.status span.unread,
+.messagelist tr td.status span.unreadchildren,
+.messagelist tr td.subject span.msgicon,
+.messagelist tr td.subject span.deleted,
+.messagelist tr td.subject span.unread,
+.messagelist tr td.subject span.replied,
+.messagelist tr td.subject span.forwarded,
+.messagelist tr td.subject span.unreadchildren
{
display: inline-block;
vertical-align: middle;
@@ -743,212 +772,212 @@ body.messagelist
background: url(images/messageicons.png) center no-repeat;
}
-#messagelist tr td.attachment span.attachment
+.messagelist tr td.attachment span.attachment
{
background-position: 0 -170px;
}
-#messagelist tr td.attachment span.report
+.messagelist tr td.attachment span.report
{
background-position: 0 -255px;
}
-#messagelist tr td.priority span.priority
+.messagelist tr td.priority span.priority
{
background-position: 0 -309px;
}
-#messagelist tr td.priority span.prio5
+.messagelist tr td.priority span.prio5
{
background-position: 0 -358px;
}
-#messagelist tr td.priority span.prio4
+.messagelist tr td.priority span.prio4
{
background-position: 0 -340px;
}
-#messagelist tr td.priority span.prio3
+.messagelist tr td.priority span.prio3
{
background-position: 0 -324px;
}
-#messagelist tr td.priority span.prio2
+.messagelist tr td.priority span.prio2
{
background-position: 0 -309px;
}
-#messagelist tr td.priority span.prio1
+.messagelist tr td.priority span.prio1
{
background-position: 0 -290px;
}
-#messagelist tr td.flag span.flagged
+.messagelist tr td.flag span.flagged
{
background-position: 0 -153px;
}
-#messagelist tr td.flag span.unflagged:hover
+.messagelist tr td.flag span.unflagged:hover
{
background-position: 0 -136px;
}
-#messagelist tr td.subject span.msgicon,
-#messagelist tr td.subject span.unreadchildren
+.messagelist tr td.subject span.msgicon,
+.messagelist tr td.subject span.unreadchildren
{
background-position: 0 -51px;
margin: 0 2px;
}
-#messagelist tr td.subject span.replied
+.messagelist tr td.subject span.replied
{
background-position: 0 -85px;
}
-#messagelist tr td.subject span.forwarded
+.messagelist tr td.subject span.forwarded
{
background-position: 0 -68px;
}
-#messagelist tr td.subject span.replied.forwarded
+.messagelist tr td.subject span.replied.forwarded
{
background-position: 0 -102px;
}
-#messagelist tr td.status span.msgicon,
-#messagelist tr td.flag span.unflagged,
-#messagelist tr td.status span.unreadchildren
+.messagelist tr td.status span.msgicon,
+.messagelist tr td.flag span.unflagged,
+.messagelist tr td.status span.unreadchildren
{
background-position: 0 17px; /* no icon */
}
-#messagelist tr td.status span.msgicon:hover
+.messagelist tr td.status span.msgicon:hover
{
background-position: 0 -272px;
}
-#messagelist tr td.status span.deleted,
-#messagelist tr td.subject span.deleted
+.messagelist tr td.status span.deleted,
+.messagelist tr td.subject span.deleted
{
background-position: 0 -187px;
}
-#messagelist tr td.status span.status,
-#messagelist tr td.status span.unread,
-#messagelist tr td.subject span.unread
+.messagelist tr td.status span.status,
+.messagelist tr td.status span.unread,
+.messagelist tr td.subject span.unread
{
background-position: 0 -119px;
}
-#messagelist tr td div.collapsed
+.messagelist tr td div.collapsed
{
background-position: 0 -221px;
cursor: pointer;
}
-#messagelist tr td div.expanded
+.messagelist tr td div.expanded
{
background-position: 0 -204px;
cursor: pointer;
}
-#messagelist tr td.threads div.listmenu
+.messagelist tr td.threads div.listmenu
{
background-position: 0 -238px;
cursor: pointer;
}
-#messagelist tbody tr td.subject
+.messagelist tbody tr td.subject
{
width: 99%;
}
-#messagelist tbody tr td.subject a
+.messagelist tbody tr td.subject a
{
cursor: default;
vertical-align: middle; /* #1487091 */
}
/* thread parent message with unread children */
-#messagelist tbody tr.unroot td.subject a
+.messagelist tbody tr.unroot td.subject a
{
text-decoration: underline;
}
-#messagelist tr td.attachment,
-#messagelist tr td.threads,
-#messagelist tr td.status,
-#messagelist tr td.flag,
-#messagelist tr td.priority
+.messagelist tr td.attachment,
+.messagelist tr td.threads,
+.messagelist tr td.status,
+.messagelist tr td.flag,
+.messagelist tr td.priority
{
width: 17px;
padding: 0 0 0 2px;
}
-#messagelist tr td.size
+.messagelist tr td.size
{
width: 60px;
text-align: right;
padding: 0 2px;
}
-#messagelist tr td.fromto,
-#messagelist tr td.from,
-#messagelist tr td.to,
-#messagelist tr td.cc,
-#messagelist tr td.replyto
+.messagelist tr td.fromto,
+.messagelist tr td.from,
+.messagelist tr td.to,
+.messagelist tr td.cc,
+.messagelist tr td.replyto
{
width: 180px;
padding: 0 2px;
}
-#messagelist tr td.date
+.messagelist tr td.date
{
width: 118px;
padding: 0 2px;
}
-#messagelist tr.message
+.messagelist tr.message
{
background-color: #FFF;
}
-#messagelist tr.unread
+.messagelist tr.unread
{
font-weight: bold;
background-color: #FFFFFF;
}
-#messagelist tr.flagged td,
-#messagelist tr.flagged td a
+.messagelist tr.flagged td,
+.messagelist tr.flagged td a
{
color: #CC0000;
}
-#messagelist tr.selected td
+.messagelist tr.selected td
{
color: #FFFFFF;
background-color: #CC3333;
}
-#messagelist tr.unfocused td
+.messagelist tr.unfocused td
{
color: #FFFFFF;
background-color: #929292;
}
-#messagelist tr.selected td a
+.messagelist tr.selected td a
{
color: #FFFFFF;
}
-#messagelist tr.unfocused td a
+.messagelist tr.unfocused td a
{
color: #FFFFFF;
}
-#messagelist tr.deleted td,
-#messagelist tr.deleted td a
+.messagelist tr.deleted td,
+.messagelist tr.deleted td a
{
color: #CCCCCC;
}
@@ -1600,16 +1629,19 @@ input.from_address
vertical-align: middle;
}
+#upload-form,
#attachment-form
{
padding: 6px;
}
+#upload-form div,
#attachment-form div
{
padding: 2px;
}
+#upload-form div.buttons,
#attachment-form div.buttons
{
margin-top: 4px;
@@ -1687,6 +1719,14 @@ input.from_address
-o-text-overflow: ellipsis;
}
+#contacts-table td span.email
+{
+ display: inline;
+ color: #ccc;
+ font-style: italic;
+ margin-left: 0.5em;
+}
+
#abookcountbar
{
margin-top: 4px;
diff --git a/skins/classic/print.css b/skins/classic/print.css
index 34125b0d3..d7e332dba 100644
--- a/skins/classic/print.css
+++ b/skins/classic/print.css
@@ -136,3 +136,32 @@ div.message-part blockquote blockquote blockquote
border-left: 2px solid #bb0000;
border-right: 2px solid #bb0000;
}
+
+p.image-attachment
+{
+ position: relative;
+ padding: 1em;
+ border-top: 1px solid #ccc;
+}
+
+p.image-attachment a.image-link
+{
+ float: left;
+ display: block;
+ margin-right: 2em;
+ min-width: 160px;
+ min-height: 60px;
+ text-align: center;
+}
+
+p.image-attachment .image-filename
+{
+ display: block;
+ line-height: 1.6em;
+}
+
+p.image-attachment .attachment-links
+{
+ display: none;
+}
+
diff --git a/skins/classic/settings.css b/skins/classic/settings.css
index c918e3c18..2433f5040 100644
--- a/skins/classic/settings.css
+++ b/skins/classic/settings.css
@@ -85,6 +85,8 @@
{
font-weight: bold;
text-align: right;
+ width: 1%;
+ white-space: nowrap;
}
#bottomboxes
@@ -253,3 +255,15 @@ div.crop
{
overflow: auto;
}
+
+#rcmfd_signature
+{
+ width: 99%;
+ min-width: 390px;
+}
+
+#rcmfd_signature_toolbar1 td,
+#rcmfd_signature_toolbar2 td
+{
+ width: auto;
+}
diff --git a/skins/classic/templates/about.html b/skins/classic/templates/about.html
index 519acf773..429dfcf5f 100644
--- a/skins/classic/templates/about.html
+++ b/skins/classic/templates/about.html
@@ -7,11 +7,15 @@
</head>
<body>
+<roundcube:if condition="!request:_framed" />
+
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
<roundcube:include file="/includes/settingstabs.html" />
<div id="mainscreen" class="box darkbg crop">
+<roundcube:endif />
+
<div class="readtext">
<div id="license">
<roundcube:object name="aboutcontent" />
@@ -29,7 +33,10 @@ Some <a href="http://roundcube.net/license">exceptions</a> for skins &amp; plugi
<roundcube:object name="pluginlist" id="pluginlist" class="records-table" cellspacing="0" />
</div>
+
+<roundcube:if condition="!request:_framed" />
</div>
+<roundcube:endif />
</body>
</html>
diff --git a/skins/classic/templates/addressbook.html b/skins/classic/templates/addressbook.html
index 9d959d5ef..429b83438 100644
--- a/skins/classic/templates/addressbook.html
+++ b/skins/classic/templates/addressbook.html
@@ -9,6 +9,7 @@
#addresslist { width: <roundcube:exp expression="!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter-5 : 245" />px; }
#contacts-box { left: <roundcube:exp expression="!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter+5 : 255" />px;
<roundcube:exp expression="browser:ie ? ('width:expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter+5 : 255).')+\\'px\\');') : ''" />
+}
#directorylistbox { width: <roundcube:exp expression="!empty(cookie:addressviewsplitterd) ? cookie:addressviewsplitterd-5 : 195" />px; }
#addressscreen { left: <roundcube:exp expression="!empty(cookie:addressviewsplitterd) ? cookie:addressviewsplitterd+5 : 205" />px;
<roundcube:exp expression="browser:ie ? ('width:expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:addressviewsplitterd) ? cookie:addressviewsplitterd+5 : 205).')+\\'px\\');') : ''" />
@@ -16,7 +17,7 @@
</style>
</head>
-<body onload="rcube_init_mail_ui()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -74,7 +75,7 @@
<div id="addressscreen">
<div id="addresslist">
-<div class="boxtitle"><roundcube:label name="contacts" /></div>
+<roundcube:object name="addresslisttitle" label="contacts" tag="div" class="boxtitle" />
<div class="boxlistcontent">
<roundcube:object name="addresslist" id="contacts-table" class="records-table" cellspacing="0" summary="Contacts list" noheader="true" />
</div>
@@ -115,5 +116,16 @@
</ul>
</div>
+<div id="dragmenu" class="popupmenu">
+ <ul>
+ <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li>
+ <li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li>
+ </ul>
+</div>
+
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html
index 5b0b47924..5e259e11c 100644
--- a/skins/classic/templates/compose.html
+++ b/skins/classic/templates/compose.html
@@ -16,10 +16,10 @@
</style>
</head>
<roundcube:if condition="env:extwin" />
-<body class="extwin" onload="rcube_init_mail_ui()">
+<body class="extwin">
<roundcube:object name="message" id="message" />
<roundcube:else />
-<body onload="rcube_init_mail_ui()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
<roundcube:endif />
@@ -44,7 +44,7 @@
<roundcube:button name="messageoptions" id="composemenulink" type="link" class="button messagemenu" title="messageoptions" onclick="rcmail_ui.show_popup('composemenu', true);return false" content=" " />
</div>
-<form name="form" action="./" method="post">
+<roundcube:form name="form" method="post">
<div id="mainscreen">
@@ -197,5 +197,9 @@
<roundcube:object name="composeAttachmentForm" id="attachment-form" attachmentFieldSize="40" class="popupmenu" />
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/skins/classic/templates/contact.html b/skins/classic/templates/contact.html
index d74a78b27..8be112b49 100644
--- a/skins/classic/templates/contact.html
+++ b/skins/classic/templates/contact.html
@@ -13,7 +13,7 @@
<div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:var name="env:sourcename" /></div>
<roundcube:endif />
- <div id="contactphoto"><roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" /></div>
+ <div id="contactphoto"><roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" placeholderGroup="/images/contactgroup.png" /></div>
<roundcube:object name="contacthead" id="contacthead" />
<div style="clear:both"></div>
<div id="contacttabs">
diff --git a/skins/classic/templates/contactadd.html b/skins/classic/templates/contactadd.html
index 05cc8aa82..bad6daf28 100644
--- a/skins/classic/templates/contactadd.html
+++ b/skins/classic/templates/contactadd.html
@@ -5,11 +5,11 @@
<roundcube:include file="/includes/links.html" />
<script type="text/javascript" src="/functions.js"></script>
</head>
-<body class="iframe" onload="rcube_init_mail_ui()">
+<body class="iframe">
<div id="contact-title" class="boxtitle"><roundcube:label name="addcontact" /></div>
<div id="contact-details" class="boxcontent">
-<form name="editform" method="post" action="./">
+<roundcube:form name="editform" method="post">
<roundcube:if condition="strlen(env:sourcename)" />
<div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:object name="sourceselector" class="hint" id="sourceselect" /></div>
<roundcube:endif />
@@ -35,7 +35,10 @@
<roundcube:object name="photoUploadForm" id="upload-form" size="30" class="popupmenu" />
<roundcube:object name="fileDropArea" id="contactpic" />
-<script type="text/javascript">rcube_init_tabs('contacttabs')</script>
+<script type="text/javascript">
+rcube_init_tabs('contacttabs');
+rcube_init_mail_ui();
+</script>
</body>
</html>
diff --git a/skins/classic/templates/contactedit.html b/skins/classic/templates/contactedit.html
index db8599ac6..c51cbf296 100644
--- a/skins/classic/templates/contactedit.html
+++ b/skins/classic/templates/contactedit.html
@@ -5,11 +5,11 @@
<roundcube:include file="/includes/links.html" />
<script type="text/javascript" src="/functions.js"></script>
</head>
-<body class="iframe" onload="rcube_init_mail_ui()">
+<body class="iframe">
<div id="contact-title" class="boxtitle"><roundcube:label name="editcontact" /></div>
<div id="contact-details" class="boxcontent">
-<form name="editform" method="post" action="./">
+<roundcube:form name="editform" method="post">
<roundcube:if condition="strlen(env:sourcename)" />
<div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:var name="env:sourcename" /></div>
<roundcube:endif />
@@ -35,7 +35,10 @@
<roundcube:object name="photoUploadForm" id="upload-form" size="30" class="popupmenu" />
<roundcube:object name="fileDropArea" id="contactpic" />
-<script type="text/javascript">rcube_init_tabs('contacttabs')</script>
+<script type="text/javascript">
+rcube_init_tabs('contacttabs');
+rcube_init_mail_ui();
+</script>
</body>
</html>
diff --git a/skins/classic/templates/folders.html b/skins/classic/templates/folders.html
index 1ae8809ec..f86be092b 100644
--- a/skins/classic/templates/folders.html
+++ b/skins/classic/templates/folders.html
@@ -12,7 +12,7 @@
}
</style>
</head>
-<body onload="rcube_init_mail_ui()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -58,5 +58,9 @@
</ul>
</div>
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/skins/classic/templates/login.html b/skins/classic/templates/login.html
index cca2bd934..2dacd48ff 100644
--- a/skins/classic/templates/login.html
+++ b/skins/classic/templates/login.html
@@ -15,7 +15,7 @@
<div class="boxtitle"><roundcube:label name="welcome" /></div>
<div class="boxcontent">
-<form name="form" action="./" method="post">
+<roundcube:form name="form" method="post">
<roundcube:object name="loginform" form="form" />
<p style="text-align:center;"><input type="submit" class="button mainaction" value="<roundcube:label name='login' />" /></p>
diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html
index c7010e87c..10aebc96d 100644
--- a/skins/classic/templates/mail.html
+++ b/skins/classic/templates/mail.html
@@ -18,7 +18,7 @@
}
</style>
</head>
-<body onload="rcube_init_mail_ui()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -55,6 +55,7 @@
<div id="messagelistcontainer" class="boxlistcontent" style="top:0">
<roundcube:object name="messages"
id="messagelist"
+ class="messagelist fixedheader"
cellspacing="0"
columns=""
summary="Message list"
@@ -130,9 +131,9 @@
<roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" width="13" height="13" />
</div>
-<div id="dragmessagemenu" class="popupmenu">
+<div id="dragmenu" class="popupmenu">
<ul>
- <li><roundcube:button command="moveto" onclick="return rcmail.drag_menu_action('moveto')" label="move" classAct="active" /></li>
+ <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li>
<li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li>
</ul>
</div>
@@ -140,7 +141,8 @@
<div id="mailboxoptionsmenu" class="popupmenu">
<ul>
<li><roundcube:button command="expunge" type="link" label="compact" classAct="active" /></li>
- <li class="separator_below"><roundcube:button command="purge" type="link" label="empty" classAct="active" /></li>
+ <li><roundcube:button command="purge" type="link" label="empty" classAct="active" /></li>
+ <li class="separator_below"><roundcube:button name="messageimport" type="link" class="active" label="importmessages" id="uploadformlink" onclick="rcmail_ui.show_popup('uploadform', true); return false" /></li>
<li><roundcube:button command="folders" task="settings" type="link" label="managefolders" classAct="active" /></li>
<roundcube:container name="mailboxoptions" id="mailboxoptionsmenu" />
</ul>
@@ -204,5 +206,11 @@
</div>
</div>
+<roundcube:object name="messageimportform" id="upload-form" attachmentFieldSize="40" class="popupmenu" />
+
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/skins/classic/templates/message.html b/skins/classic/templates/message.html
index 11e58c711..757c0a635 100644
--- a/skins/classic/templates/message.html
+++ b/skins/classic/templates/message.html
@@ -13,10 +13,10 @@
</style>
</head>
<roundcube:if condition="env:extwin" />
-<body class="extwin" onload="rcube_init_mail_ui()">
+<body class="extwin">
<roundcube:object name="message" id="message" />
<roundcube:else />
-<body onload="rcube_init_mail_ui()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -81,5 +81,9 @@
</ul>
</div>
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/skins/classic/templates/messageerror.html b/skins/classic/templates/messageerror.html
index d02508942..eb8c7e058 100644
--- a/skins/classic/templates/messageerror.html
+++ b/skins/classic/templates/messageerror.html
@@ -27,7 +27,7 @@
</style>
</head>
-<body onload="rcube_init_mail_ui()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -61,6 +61,10 @@
rcmail.add_onload('mailviewsplitv.init()');
</script>
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
<roundcube:endif />
diff --git a/skins/classic/templates/messagepart.html b/skins/classic/templates/messagepart.html
index ce7dbe2e1..9f2215679 100644
--- a/skins/classic/templates/messagepart.html
+++ b/skins/classic/templates/messagepart.html
@@ -3,23 +3,39 @@
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
+<script type="text/javascript" src="/splitter.js"></script>
+<script type="text/javascript" src="/functions.js"></script>
+<style type="text/css">
+#messagepartheader { width: <roundcube:exp expression="!empty(cookie:mailpartsplitter) ? cookie:mailpartsplitter-5 : 170" />px; }
+#messagepartcontainer { left: <roundcube:exp expression="!empty(cookie:mailpartsplitter) ? cookie:mailpartsplitter+5 : 180" />px;
+<roundcube:exp expression="browser:ie ? ('width: expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:mailpartsplitter) ? cookie:mailpartsplitter+5 : 180).')+\\'px\\');') : ''" />
+}
+</style>
</head>
<body class="extwin">
+<roundcube:object name="message" id="message" />
-<roundcube:include file="/includes/header.html" />
-
-<div id="partheader">
-<roundcube:object name="messagePartControls" cellpadding="2" cellspacing="0" />
-
-<div style="position:absolute; top:2px; right:0; width:12em; text-align:right">
- [<a href="#close" class="closelink" onclick="self.close()"><roundcube:label name="close" /></a>]
+<div id="messagetoolbar">
+ <roundcube:button command="download" type="link" class="button download" classAct="button download" classSel="button downloadSel" title="download" content=" " />
+ <roundcube:button command="print" type="link" class="button print" classAct="button print" classSel="button printSel" title="print" content=" " />
+ <roundcube:container name="toolbar" id="messagetoolbar" />
</div>
-</div>
-
-<div id="messagepartcontainer">
-<roundcube:object name="messagePartFrame" id="messagepartframe" width="100%" height="100%" />
+<div id="mainscreen">
+ <div id="messagepartheader">
+ <div class="boxtitle" /><roundcube:label name="properties" /></div>
+ <div class="boxlistcontent">
+ <roundcube:object name="messagePartControls" class="records-table" cellspacing="0" />
+ </div>
+ </div>
+ <div id="messagepartcontainer">
+ <roundcube:object name="messagePartFrame" id="messagepartframe" width="100%" height="100%" />
+ </div>
</div>
+<script type="text/javascript">
+var mailpartsplit = new rcube_splitter({id:'mailpartsplitter', p1: 'messagepartheader', p2: 'messagepartcontainer', orientation: 'v', relative: true, start: 165});
+rcmail.add_onload('mailpartsplit.init()');
+</script>
</body>
</html>
diff --git a/skins/classic/templates/messagepreview.html b/skins/classic/templates/messagepreview.html
index 80dbe381a..b42a06342 100644
--- a/skins/classic/templates/messagepreview.html
+++ b/skins/classic/templates/messagepreview.html
@@ -6,7 +6,7 @@
<script type="text/javascript" src="/splitter.js"></script>
<script type="text/javascript" src="/functions.js"></script>
</head>
-<body class="iframe" onload="rcube_init_mail_ui()">
+<body class="iframe">
<div class="messageheaderbox">
<div id="messagelinks">
@@ -34,5 +34,9 @@
</ul>
</div>
+<script type="text/javascript">
+rcube_init_mail_ui();
+</script>
+
</body>
</html>
diff --git a/skins/larry/addressbook.css b/skins/larry/addressbook.css
index ff3951497..090e54c7b 100644
--- a/skins/larry/addressbook.css
+++ b/skins/larry/addressbook.css
@@ -75,10 +75,6 @@
text-overflow: ellipsis;
}
-#contacts-table .contact.readonly td {
- font-style: italic;
-}
-
#directorylist li.addressbook a {
background-position: 6px -766px;
}
@@ -131,6 +127,28 @@
left: 20px;
}
+#contacts-table .contact.readonly td {
+ font-style: italic;
+}
+
+#contacts-table td.name {
+ width: 95%;
+}
+
+#contacts-table td.action {
+ width: 24px;
+ padding: 4px;
+}
+
+#contacts-table td.action a {
+ display: block;
+ width: 16px;
+ height: 14px;
+ text-indent: -5000px;
+ overflow: hidden;
+ background: url(images/listicons.png) -2px -1180px no-repeat;
+}
+
#contacts-table .contact td.name {
background-position: 6px -1603px;
}
@@ -141,6 +159,29 @@
font-weight: bold;
}
+#contacts-table .group td.name {
+ background-position: 6px -1555px;
+}
+
+#contacts-table .group.selected td.name,
+#contacts-table .group.unfocused td.name {
+ background-position: 6px -1579px;
+ font-weight: bold;
+}
+
+#addresslist .boxtitle {
+ padding-right: 95px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+#addresslist .boxtitle a.poplink {
+ color: #004458;
+ font-size: 14px;
+ line-height: 12px;
+ text-decoration: none;
+}
+
#contact-frame {
position: absolute;
top: 0;
diff --git a/skins/larry/ie7hacks.css b/skins/larry/ie7hacks.css
index 6d7af4787..fc4713361 100644
--- a/skins/larry/ie7hacks.css
+++ b/skins/larry/ie7hacks.css
@@ -41,6 +41,7 @@ a.deletebutton,
.boxfooter .listbutton .inner,
.attachmentslist li a.delete,
.attachmentslist li a.cancelupload,
+#contacts-table td.action a,
.previewheader .iconlink,
.minimal #taskbar .button-inner {
/* workaround for text-indent which also offsets the background image */
diff --git a/skins/larry/images/buttons.png b/skins/larry/images/buttons.png
index 54bee0156..9f8f44536 100644
--- a/skins/larry/images/buttons.png
+++ b/skins/larry/images/buttons.png
Binary files differ
diff --git a/skins/larry/images/contactgroup.png b/skins/larry/images/contactgroup.png
new file mode 100644
index 000000000..8303cf02f
--- /dev/null
+++ b/skins/larry/images/contactgroup.png
Binary files differ
diff --git a/skins/larry/images/favicon.ico b/skins/larry/images/favicon.ico
index b3bd18c12..9ef2f3b9e 100644
--- a/skins/larry/images/favicon.ico
+++ b/skins/larry/images/favicon.ico
Binary files differ
diff --git a/skins/larry/images/listicons.png b/skins/larry/images/listicons.png
index f4505d4fa..e4ffef660 100644
--- a/skins/larry/images/listicons.png
+++ b/skins/larry/images/listicons.png
Binary files differ
diff --git a/skins/larry/includes/header.html b/skins/larry/includes/header.html
index f2efb8e06..c8b3b26f6 100644
--- a/skins/larry/includes/header.html
+++ b/skins/larry/includes/header.html
@@ -2,7 +2,7 @@
<div id="topline">
<div class="topleft">
<roundcube:container name="topline-left" id="topline-left" />
- <roundcube:button name="about" type="link" label="about" class="about-link" onclick="UI.show_about(this);return false" />
+ <roundcube:button name="about" type="link" label="about" class="about-link" onclick="UI.show_about(this);return false" condition="!env:extwin" />
<roundcube:if condition="config:support_url" />
<a href="<roundcube:var name='config:support_url' />" target="_blank" class="support-link" id="supportlink"><roundcube:label name="support" /></a>
<roundcube:endif />
@@ -14,7 +14,7 @@
<span class="username"><roundcube:object name="username" /></span>
<roundcube:button command="logout" label="logout" class="button-logout" />
<roundcube:elseif condition="env:extwin" />
- <roundcube:button command="close" label="close" class="closelink" />
+ <roundcube:button name="close" type="link" label="close" class="closelink" onclick="self.close()" />
<roundcube:endif />
</div>
</div>
@@ -35,5 +35,3 @@
<br style="clear:both" />
</div>
-
-
diff --git a/skins/larry/mail.css b/skins/larry/mail.css
index b5f0822a3..b65b08112 100644
--- a/skins/larry/mail.css
+++ b/skins/larry/mail.css
@@ -2,7 +2,7 @@
* Roundcube webmail styles for the Email section
*
* Copyright (c) 2012, The Roundcube Dev Team
- * Screendesign by FLINT / B�ro f�r Gestaltung, bueroflint.com
+ * Screendesign by FLINT / Büro für Gestaltung, bueroflint.com
*
* The contents are subject to the Creative Commons Attribution-ShareAlike
* License. It is allowed to copy, distribute, transmit and to adapt the work
@@ -54,6 +54,10 @@
border-top: none;
}
+#composeview-right #mailview-bottom {
+ border-radius: 0 0 4px 4px;
+}
+
#folderlist-header {
width: 100%;
height: 12px;
@@ -75,6 +79,12 @@
overflow: auto;
}
+/* Real browsers accept this (not IE) */
+html>/**/body #messagelist {
+ overflow: auto;
+ overflow-x: hidden;
+}
+
#messagelistfooter {
position: absolute;
bottom: 0;
@@ -212,6 +222,46 @@ a.iconbutton.threadmode.selected {
background-position: 6px -1723px;
}
+#mailboxlist li.mailbox ul li.drafts > a {
+ background-position: 23px -238px;
+}
+
+#mailboxlist li.mailbox ul li.drafts.selected > a {
+ background-position: 23px -262px;
+}
+
+#mailboxlist li.mailbox ul li.sent > a {
+ background-position: 23px -286px;
+}
+
+#mailboxlist li.mailbox ul li.sent.selected > a {
+ background-position: 23px -310px;
+}
+
+#mailboxlist li.mailbox ul li.junk > a {
+ background-position: 23px -334px;
+}
+
+#mailboxlist li.mailbox ul li.junk.selected > a {
+ background-position: 23px -358px;
+}
+
+#mailboxlist li.mailbox ul li.trash > a {
+ background-position: 23px -382px;
+}
+
+#mailboxlist li.mailbox ul li.trash.selected > a {
+ background-position: 23px -406px;
+}
+
+#mailboxlist li.mailbox ul li.archive > a {
+ background-position: 23px -1699px;
+}
+
+#mailboxlist li.mailbox ul li.archive.selected > a {
+ background-position: 23px -1723px;
+}
+
#mailboxlist li.unread {
font-weight: bold;
}
@@ -384,7 +434,6 @@ a.iconbutton.threadmode.selected {
position: absolute;
right: 0;
top: 0;
- width: 400px;
}
#mailpreviewtoggle {
@@ -404,141 +453,154 @@ a.iconbutton.threadmode.selected {
/*** message list ***/
-#messagelist thead td:first-child {
+/* this is necessary to make FF3 display borders */
+body:-moz-last-node #messagelist {
+ border-collapse: separate;
+}
+
+table.messagelist {
+ z-index: 1;
+}
+
+table.messagelist.fixedcopy {
+ z-index: 2;
+}
+
+.messagelist thead td:first-child {
border-radius: 4px 0 0 0; /* for Chrome */
}
-#messagelist tr td.attachment,
-#messagelist tr td.threads,
-#messagelist tr td.status,
-#messagelist tr td.flag,
-#messagelist tr td.priority {
+.messagelist tr td.attachment,
+.messagelist tr td.threads,
+.messagelist tr td.status,
+.messagelist tr td.flag,
+.messagelist tr td.priority {
width: 20px;
padding: 2px 3px;
}
-.webkit #messagelist tr td.attachment,
-.webkit #messagelist tr td.threads,
-.webkit #messagelist tr td.status,
-.webkit #messagelist tr td.flag,
-.webkit #messagelist tr td.priority {
+.webkit .messagelist tr td.attachment,
+.webkit .messagelist tr td.threads,
+.webkit .messagelist tr td.status,
+.webkit .messagelist tr td.flag,
+.webkit .messagelist tr td.priority {
width: 26px;
}
-#messagelist tr td.threads {
+.messagelist tr td.threads {
width: 26px;
}
-.webkit #messagelist tr td.threads {
+.webkit .messagelist tr td.threads {
width: 30px;
}
-#messagelist tr td.threads,
-#messagelist tr td.threads + td {
+.messagelist tr td.threads,
+.messagelist tr td.threads + td {
border-left: 0;
}
-#messagelist tr td.size {
+.messagelist tr td.size {
width: 60px;
text-align: right;
}
-#messagelist thead tr td.size {
+.messagelist thead tr td.size {
text-align: left;
}
-#messagelist tr td.fromto,
-#messagelist tr td.from,
-#messagelist tr td.to,
-#messagelist tr td.cc,
-#messagelist tr td.replyto {
+.messagelist tr td.fromto,
+.messagelist tr td.from,
+.messagelist tr td.to,
+.messagelist tr td.cc,
+.messagelist tr td.replyto {
width: 200px;
}
-#messagelist tr td.date {
+.messagelist tr td.date {
width: 135px;
}
-#messagelist tr.message {
+.messagelist tr.message {
/* background-color: #fff; */
}
-#messagelist tr.thread.expanded td {
+.messagelist tr.thread.expanded td {
background-color: #ededed;
}
-#messagelist tr.unread {
+.messagelist tr.unread {
font-weight: bold;
/* background-color: #fff; */
}
-#messagelist tr.flagged td,
-#messagelist tr.flagged td a {
+.messagelist tr.flagged td,
+.messagelist tr.flagged td a {
color: #f30;
}
-#messagelist thead tr td.sortedASC a,
-#messagelist thead tr td.sortedDESC a {
+.messagelist thead tr td.sortedASC a,
+.messagelist thead tr td.sortedDESC a {
color: #004458;
text-decoration: underline;
background: url(images/listicons.png) right -912px no-repeat;
}
-#messagelist thead tr td.sortedASC a {
+.messagelist thead tr td.sortedASC a {
background-position: right -944px;
}
-#messagelist td img {
+.messagelist td img {
vertical-align: middle;
display: inline-block;
}
-#messagelist tbody td a {
+.messagelist tbody td a {
color: #333;
text-decoration: none;
white-space: nowrap;
cursor: default;
}
-#messagelist tbody tr td.flag,
-#messagelist tbody tr td.status,
-#messagelist tbody tr td.subject span.status {
+.messagelist tbody tr td.flag,
+.messagelist tbody tr td.status,
+.messagelist tbody tr td.subject span.status {
cursor: pointer;
}
-#messagelist tr td.flag span,
-#messagelist tr td.status span,
-#messagelist tr td.attachment span,
-#messagelist tr td.priority span {
+.messagelist tr td.flag span,
+.messagelist tr td.status span,
+.messagelist tr td.attachment span,
+.messagelist tr td.priority span {
display: block;
width: 20px;
}
-#messagelist tr td div.collapsed,
-#messagelist tr td div.expanded,
-#messagelist tr td.threads div.listmenu,
-#messagelist tr td.attachment span.attachment,
-#messagelist tr td.attachment span.report,
-#messagelist tr td.priority span.priority,
-#messagelist tr td.priority span.prio1,
-#messagelist tr td.priority span.prio2,
-#messagelist tr td.priority span.prio3,
-#messagelist tr td.priority span.prio4,
-#messagelist tr td.priority span.prio5,
-#messagelist tr td.flag span.flagged,
-#messagelist tr td.flag span.unflagged,
-#messagelist tr td.flag span.unflagged:hover,
-#messagelist tr td.status span.status,
-#messagelist tr td.status span.msgicon,
-#messagelist tr td.status span.deleted,
-#messagelist tr td.status span.unread,
-#messagelist tr td.status span.unreadchildren,
-#messagelist tr td.subject span.msgicon,
-#messagelist tr td.subject span.deleted,
-#messagelist tr td.subject span.unread,
-#messagelist tr td.subject span.replied,
-#messagelist tr td.subject span.forwarded,
-#messagelist tr td.subject span.unreadchildren {
+.messagelist tr td div.collapsed,
+.messagelist tr td div.expanded,
+.messagelist tr td.threads div.listmenu,
+.messagelist tr td.attachment span.attachment,
+.messagelist tr td.attachment span.report,
+.messagelist tr td.priority span.priority,
+.messagelist tr td.priority span.prio1,
+.messagelist tr td.priority span.prio2,
+.messagelist tr td.priority span.prio3,
+.messagelist tr td.priority span.prio4,
+.messagelist tr td.priority span.prio5,
+.messagelist tr td.flag span.flagged,
+.messagelist tr td.flag span.unflagged,
+.messagelist tr td.flag span.unflagged:hover,
+.messagelist tr td.status span.status,
+.messagelist tr td.status span.msgicon,
+.messagelist tr td.status span.deleted,
+.messagelist tr td.status span.unread,
+.messagelist tr td.status span.unreadchildren,
+.messagelist tr td.subject span.msgicon,
+.messagelist tr td.subject span.deleted,
+.messagelist tr td.subject span.unread,
+.messagelist tr td.subject span.replied,
+.messagelist tr td.subject span.forwarded,
+.messagelist tr td.subject span.unreadchildren {
display: inline-block;
vertical-align: middle;
height: 18px;
@@ -547,135 +609,135 @@ a.iconbutton.threadmode.selected {
background: url(images/listicons.png) -100px 0 no-repeat;
}
-#messagelist tbody tr td.attachment span.attachment {
+.messagelist tbody tr td.attachment span.attachment {
background-position: 0 -996px;
}
-#messagelist thead tr td.attachment span.attachment {
+.messagelist thead tr td.attachment span.attachment {
background-position: -24px -997px;
}
-#messagelist tbody tr td.attachment span.report {
+.messagelist tbody tr td.attachment span.report {
background-position: -24px -1116px;
}
-#messagelist tr td.priority span.prio5 {
+.messagelist tr td.priority span.prio5 {
background-position: 0 -1905px;
}
-#messagelist tr td.priority span.prio4 {
+.messagelist tr td.priority span.prio4 {
background-position: 0 -1885px;
}
-#messagelist tr td.priority span.prio2 {
+.messagelist tr td.priority span.prio2 {
background-position: 0 -1865px;
}
-#messagelist tr td.priority span.prio1 {
+.messagelist tr td.priority span.prio1 {
background-position: 0 -1845px;
}
-#messagelist tbody tr td.flag span.flagged {
+.messagelist tbody tr td.flag span.flagged {
background-position: 0 -1036px;
}
-#messagelist thead tr td.flag span.flagged {
+.messagelist thead tr td.flag span.flagged {
background-position: -24px -1036px;
}
-#messagelist tr td.status span.msgicon:hover {
+.messagelist tr td.status span.msgicon:hover {
background-position: -23px -1056px;
}
-#messagelist tr td.flag span.unflagged:hover {
+.messagelist tr td.flag span.unflagged:hover {
background-position: -23px -1076px;
}
-#messagelist tr td.subject span.msgicon,
-#messagelist tr td.subject span.unreadchildren {
+.messagelist tr td.subject span.msgicon,
+.messagelist tr td.subject span.unreadchildren {
background-position: 0 -1056px;
margin: 0 1px 0 0;
width: 24px;
}
-#messagelist tr td.subject span.replied {
+.messagelist tr td.subject span.replied {
background-position: 0 -1076px;
}
-#messagelist tr td.subject span.forwarded {
+.messagelist tr td.subject span.forwarded {
background-position: 0 -1096px;
}
-#messagelist tr td.subject span.replied.forwarded {
+.messagelist tr td.subject span.replied.forwarded {
background-position: 0 -1116px;
}
-#messagelist tr td.status span.msgicon,
-#messagelist tr td.flag span.unflagged,
-#messagelist tr td.status span.unreadchildren {
+.messagelist tr td.status span.msgicon,
+.messagelist tr td.flag span.unflagged,
+.messagelist tr td.status span.unreadchildren {
background-position: 0 1056px; /* no icon */
}
/*
-#messagelist tr td.status span.msgicon:hover {
+.messagelist tr td.status span.msgicon:hover {
background-position: 0 -272px;
}
*/
-#messagelist tr td.status span.deleted,
-#messagelist tr td.status span.deleted:hover,
-#messagelist tr td.subject span.deleted {
+.messagelist tr td.status span.deleted,
+.messagelist tr td.status span.deleted:hover,
+.messagelist tr td.subject span.deleted {
background-position: -22px -1096px;
}
-#messagelist tr td.status span.status,
-#messagelist tr td.status span.unread,
-#messagelist tr td.subject span.unread,
-#messagelist tr td.status span.unread:hover {
+.messagelist tr td.status span.status,
+.messagelist tr td.status span.unread,
+.messagelist tr td.subject span.unread,
+.messagelist tr td.status span.unread:hover {
background-position: 0 -1016px;
}
-#messagelist thead tr td.status span.status {
+.messagelist thead tr td.status span.status {
background-position: -24px -1016px;
}
-#messagelist tr td div.collapsed {
+.messagelist tr td div.collapsed {
background-position: 0 -1137px;
cursor: pointer;
}
-#messagelist tr td div.expanded {
+.messagelist tr td div.expanded {
background-position: 0 -1157px;
cursor: pointer;
}
-#messagelist tr td.threads div.listmenu {
+.messagelist tr td.threads div.listmenu {
background-position: 0 -976px;
cursor: pointer;
width: 26px;
}
-#messagelist thead tr td.subject,
-#messagelist tbody tr td.subject {
+.messagelist thead tr td.subject,
+.messagelist tbody tr td.subject {
width: 99%;
white-space: nowrap;
}
-#messagelist tbody tr td.subject a {
+.messagelist tbody tr td.subject a {
cursor: default;
vertical-align: middle; /* #1487091 */
}
/* thread parent message with unread children */
-#messagelist tbody tr.unroot td.subject a {
+.messagelist tbody tr.unroot td.subject a {
text-decoration: underline;
}
/**** tree indicators ****/
-#messagelist tbody tr td span.branch div {
+.messagelist tbody tr td span.branch div {
display: inline-block;
}
-#messagelist tbody tr td span.branch div.tree {
+.messagelist tbody tr td span.branch div.tree {
width: 15px;
}
@@ -709,7 +771,6 @@ a.iconbutton.threadmode.selected {
}
#messageheader,
-#partheader,
#composeheaders {
position: relative;
padding: 3px 0;
@@ -868,7 +929,7 @@ div.more-headers {
}
div.hide-headers {
- background-position: center -1600px;
+ background-position: center -1590px;
}
#all-headers {
@@ -931,6 +992,10 @@ div.hide-headers {
border-radius: 3px;
}
+#messageheader .message-headers {
+ min-height: 60px;
+}
+
#messageheader #contactphoto {
display: block;
position: absolute;
@@ -1140,8 +1205,8 @@ div.message-partheaders .headers-table td.header {
#messagepartcontainer {
position: absolute;
- top: 60px;
- left: 0;
+ top: 42px;
+ left: 232px;
right: 0;
bottom: 0;
}
@@ -1152,6 +1217,30 @@ div.message-partheaders .headers-table td.header {
height: 100%;
}
+#messagepartheader {
+ position: absolute;
+ top: 42px;
+ left: 0;
+ width: 220px;
+ bottom: 0;
+}
+
+#messagepartheader table {
+ table-layout: fixed;
+ overflow: hidden;
+}
+
+#messagepartheader table td {
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
+
+#messagepartheader table td.title {
+ width: 60px;
+ padding-right: 0;
+}
+
+
/*** message composition ***/
#composeview-left {
@@ -1230,6 +1319,19 @@ div.message-partheaders .headers-table td.header {
text-overflow: ellipsis;
}
+#contacts-table td.contactgroup a {
+ color: #376572;
+ text-decoration: none;
+}
+
+#contacts-table td.contactgroup a span {
+ display: inline-block;
+ font-size: 16px;
+ font-weight: bold;
+ line-height: 11px;
+ margin-left: 0.3em;
+}
+
#contacts-table tr:first-child td {
border-top: 0;
}
diff --git a/skins/larry/print.css b/skins/larry/print.css
index 6481ea9e6..a56c9b938 100644
--- a/skins/larry/print.css
+++ b/skins/larry/print.css
@@ -123,3 +123,28 @@ div.message-part blockquote blockquote blockquote {
border-left: 2px solid #b00;
border-right: 2px solid #b00;
}
+
+p.image-attachment {
+ position: relative;
+ padding: 1em;
+ border-top: 1px solid #ccc;
+}
+
+p.image-attachment a.image-link {
+ float: left;
+ display: block;
+ margin-right: 2em;
+ min-width: 160px;
+ min-height: 60px;
+ text-align: center;
+}
+
+p.image-attachment .image-filename {
+ display: block;
+ line-height: 1.6em;
+}
+
+p.image-attachment .attachment-links {
+ display: none;
+}
+
diff --git a/skins/larry/settings.css b/skins/larry/settings.css
index 1734b55e5..59037ac76 100644
--- a/skins/larry/settings.css
+++ b/skins/larry/settings.css
@@ -267,3 +267,13 @@ img.skinthumbnail {
.webkit #pluginlist td.source {
width: 9em;
}
+
+#rcmfd_signature {
+ width: 99%;
+ min-width: 390px;
+}
+
+#rcmfd_signature_toolbar1 td,
+#rcmfd_signature_toolbar2 td {
+ width: auto;
+}
diff --git a/skins/larry/styles.css b/skins/larry/styles.css
index cfbf9ac5f..ec4f3047c 100644
--- a/skins/larry/styles.css
+++ b/skins/larry/styles.css
@@ -690,17 +690,6 @@ a.iconlink.upload {
opacity: 0.999;
}
-.partwin #topline {
- position: absolute;
- right: 6px;
- top: 18px;
- width: auto;
- z-index: 100;
- background: transparent;
- background: none;
- border: 0;
-}
-
.minimal #topline a.button-logout {
display: none;
}
@@ -883,10 +872,6 @@ a.iconlink.upload {
top: 102px;
}
-.partwin #mainscreen {
- top: 60px
-}
-
.extwin #mainscreen {
top: 40px;
}
@@ -896,7 +881,7 @@ a.iconlink.upload {
}
#mainscreen .offset {
- margin-top: 42px;
+ top: 42px;
}
.uibox {
@@ -1059,6 +1044,10 @@ table.listing tr.droptarget td {
background-color: #e8e798;
}
+.listbox table.listing {
+ background-color: #d9ecf4;
+}
+
table.listing,
table.layout {
border: 0;
@@ -1813,6 +1802,10 @@ ul.proplist li {
background-position: 0 -1745px;
}
+.toolbar a.button.download {
+ background-position: center -1906px;
+}
+
a.menuselector {
display: inline-block;
border: 1px solid #ababab;
@@ -1858,6 +1851,7 @@ select.decorated {
filter: alpha(opacity=0);
-khtml-appearance: none;
-webkit-appearance: none;
+ border: 0;
}
html.opera select.decorated {
@@ -1873,6 +1867,7 @@ select.decorated option {
text-shadow: 0px 1px 1px #333;
padding: 4px 6px;
outline: none;
+ cursor: default;
}
diff --git a/skins/larry/templates/about.html b/skins/larry/templates/about.html
index 301c301a9..e2bd0b019 100644
--- a/skins/larry/templates/about.html
+++ b/skins/larry/templates/about.html
@@ -4,7 +4,11 @@
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
</head>
+<roundcube:if condition="request:_framed" />
+<body class="iframe fullheight">
+<roundcube:else />
<body class="ui-widget-content">
+<roundcube:endif />
<div class="readtext">
<roundcube:object name="aboutcontent" />
diff --git a/skins/larry/templates/addressbook.html b/skins/larry/templates/addressbook.html
index 401640f1f..b33ebd999 100644
--- a/skins/larry/templates/addressbook.html
+++ b/skins/larry/templates/addressbook.html
@@ -50,7 +50,7 @@
<!-- contacts list -->
<div id="addresslist" class="uibox listbox">
-<h2 class="boxtitle"><roundcube:label name="contacts" /></h2>
+<roundcube:object name="addresslisttitle" label="contacts" tag="h2" class="boxtitle" />
<div class="scroller withfooter">
<roundcube:object name="addresslist" id="contacts-table" class="listing" noheader="true" />
</div>
@@ -106,6 +106,13 @@
</ul>
</div>
+<div id="dragcontactmenu" class="popupmenu">
+ <ul class="toolbarmenu">
+ <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li>
+ <li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li>
+ </ul>
+</div>
+
<roundcube:include file="/includes/footer.html" />
</body>
diff --git a/skins/larry/templates/compose.html b/skins/larry/templates/compose.html
index 9cfe7fe4c..09eafe73b 100644
--- a/skins/larry/templates/compose.html
+++ b/skins/larry/templates/compose.html
@@ -65,7 +65,7 @@
<div id="composeview-right">
-<form name="form" action="./" method="post" id="compose-content" class="uibox">
+<roundcube:form name="form" method="post" id="compose-content" class="uibox">
<!-- message headers -->
<div id="composeheaders">
diff --git a/skins/larry/templates/contact.html b/skins/larry/templates/contact.html
index d252049cd..59fe6f79f 100644
--- a/skins/larry/templates/contact.html
+++ b/skins/larry/templates/contact.html
@@ -13,7 +13,7 @@
<div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:var name="env:sourcename" /></div>
<roundcube:endif />
- <div id="contactphoto"><roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" /></div>
+ <div id="contactphoto"><roundcube:object name="contactphoto" id="contactpic" placeholder="/images/contactpic.png" placeholderGroup="/images/contactgroup.png" /></div>
<roundcube:object name="contacthead" id="contacthead" />
<br style="clear:both" />
diff --git a/skins/larry/templates/contactedit.html b/skins/larry/templates/contactedit.html
index f84936635..3467ebe8e 100644
--- a/skins/larry/templates/contactedit.html
+++ b/skins/larry/templates/contactedit.html
@@ -11,7 +11,7 @@
<roundcube:else /><roundcube:label name="editcontact" />
<roundcube:endif /></h1>
-<form name="editform" method="post" action="./" id="contact-details" class="boxcontent">
+<roundcube:form name="editform" method="post" id="contact-details" class="boxcontent">
<roundcube:if condition="strlen(env:sourcename)" />
<div id="sourcename"><roundcube:label name="addressbook" />: <roundcube:var name="env:sourcename" condition="env:action!='add'" /><roundcube:object name="sourceselector" id="sourceselect" condition="env:action=='add'" /></div>
<roundcube:endif />
diff --git a/skins/larry/templates/login.html b/skins/larry/templates/login.html
index a605eb7fe..6e56ee2fd 100644
--- a/skins/larry/templates/login.html
+++ b/skins/larry/templates/login.html
@@ -11,7 +11,7 @@
<div class="box-inner">
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" />
-<form name="form" action="./" method="post">
+<roundcube:form name="form" method="post">
<roundcube:object name="loginform" form="form" size="40" />
<p class="formbuttons"><input type="submit" class="button mainaction" value="<roundcube:label name='login' />" /></p>
diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html
index 85cd5203b..6015054d3 100644
--- a/skins/larry/templates/mail.html
+++ b/skins/larry/templates/mail.html
@@ -70,7 +70,7 @@
<div id="messagelistcontainer" class="boxlistcontent">
<roundcube:object name="messages"
id="messagelist"
- class="records-table sortheader"
+ class="records-table messagelist sortheader fixedheader"
optionsmenuIcon="true" />
</div>
@@ -140,7 +140,7 @@
<div id="dragmessagemenu" class="popupmenu">
<ul class="toolbarmenu">
- <li><roundcube:button command="moveto" onclick="return rcmail.drag_menu_action('moveto')" label="move" classAct="active" /></li>
+ <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li>
<li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li>
</ul>
</div>
@@ -148,7 +148,8 @@
<div id="mailboxmenu" class="popupmenu">
<ul class="toolbarmenu" id="mailboxoptionsmenu">
<li><roundcube:button command="expunge" type="link" label="compact" classAct="active" /></li>
- <li class="separator_below"><roundcube:button command="purge" type="link" label="empty" classAct="active" /></li>
+ <li><roundcube:button command="purge" type="link" label="empty" classAct="active" /></li>
+ <li><roundcube:button name="messageimport" type="link" class="active" label="importmessages" onclick="UI.show_uploadform()" /></li>
<li><roundcube:button command="folders" task="settings" type="link" label="managefolders" classAct="active" /></li>
<roundcube:container name="mailboxoptions" id="mailboxoptionsmenu" />
</ul>
@@ -226,6 +227,14 @@
</div>
</div>
+<div id="upload-dialog" class="propform popupdialog" title="<roundcube:label name='importmessages' />">
+ <roundcube:object name="messageimportform" id="uploadform" attachmentFieldSize="40" buttons="no" />
+ <div class="formbuttons">
+ <roundcube:button command="import-messages" type="input" class="button mainaction" label="upload" />
+ <roundcube:button name="close" type="input" class="button" label="cancel" onclick="UI.show_uploadform()" />
+ </div>
+</div>
+
<roundcube:include file="/includes/footer.html" />
</body>
diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html
index 0e19afa40..6937b00af 100644
--- a/skins/larry/templates/message.html
+++ b/skins/larry/templates/message.html
@@ -17,7 +17,7 @@
<roundcube:endif />
<roundcube:include file="/includes/mailtoolbar.html" />
<div class="toolbarselect">
- <roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mailboxlist decorated" folder_filter="mail" />
+ <roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('move', this.options[this.selectedIndex].value)" class="mailboxlist decorated" folder_filter="mail" />
</div>
</div>
@@ -44,7 +44,9 @@
<span class="moreheaderstoggle"></span>
<h2 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h2>
+<div class="message-headers">
<roundcube:object name="messageHeaders" class="headers-table" addicon="/images/addcontact.png" exclude="subject" max="20" />
+</div>
<roundcube:object name="messageFullHeaders" id="full-headers" />
<!-- record navigation -->
@@ -88,7 +90,7 @@
</div><!-- end mainscreen -->
-<div id="attachmentmenu" class="popupmenu dropdown">
+<div id="attachmentmenu" class="popupmenu">
<ul class="toolbarmenu">
<li><roundcube:button command="open-attachment" id="attachmenuopen" type="link" label="open" class="icon" classAct="icon active" innerclass="icon extwin" /></li>
<li><roundcube:button command="download-attachment" id="attachmenudownload" type="link" label="download" class="icon" classAct="icon active" innerclass="icon download" /></li>
diff --git a/skins/larry/templates/messagepart.html b/skins/larry/templates/messagepart.html
index dbb4940de..d0e3a808d 100644
--- a/skins/larry/templates/messagepart.html
+++ b/skins/larry/templates/messagepart.html
@@ -4,33 +4,35 @@
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
</head>
-<body class="partwin">
+<body class="extwin noscroll">
-<div id="header">
-<div id="topline">
- <div class="topright">
- <a href="#close" class="closelink" onclick="self.close()"><roundcube:label name="close" /></a>
- </div>
-</div>
+<roundcube:include file="/includes/header.html" />
-<div id="topnav">
- <roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" />
-</div>
+<div id="mainscreen">
-<br style="clear:both" />
+<div id="messagetoolbar" class="toolbar fullwidth">
+ <roundcube:button command="download" type="link" class="button download disabled" classAct="button download" classSel="button download pressed" label="download" />
+ <roundcube:button command="print" type="link" class="button print disabled" classAct="button print" classSel="button print pressed" label="print" />
+ <roundcube:container name="toolbar" id="messagetoolbar" />
</div>
-<div id="mainscreen">
-
-<div id="partheader" class="uibox">
-<roundcube:object name="messagePartControls" class="headers-table" />
+<div id="messagepartheader" class="uibox listbox">
+ <h2 class="boxtitle"><roundcube:label name="properties" /></h2>
+ <div class="scroller">
+ <roundcube:object name="messagePartControls" class="listing" />
+ </div>
</div>
<div id="messagepartcontainer" class="uibox">
-<roundcube:object name="messagePartFrame" id="messagepartframe" frameborder="0" />
+ <div class="iframebox">
+ <roundcube:object name="messagePartFrame" id="messagepartframe" frameborder="0" />
+ </div>
+ <roundcube:object name="message" id="message" class="statusbar" />
</div>
</div>
+<roundcube:include file="/includes/footer.html" />
+
</body>
</html>
diff --git a/skins/larry/templates/messagepreview.html b/skins/larry/templates/messagepreview.html
index b2af03485..f69f65125 100644
--- a/skins/larry/templates/messagepreview.html
+++ b/skins/larry/templates/messagepreview.html
@@ -62,7 +62,7 @@
</div>
</div>
-<div id="attachmentmenu" class="popupmenu dropdown">
+<div id="attachmentmenu" class="popupmenu">
<ul class="toolbarmenu">
<li><roundcube:button command="open-attachment" id="attachmenuopen" type="link" label="open" class="icon" classAct="icon active" innerclass="icon extwin" /></li>
<li><roundcube:button command="download-attachment" id="attachmenudownload" type="link" label="download" class="icon" classAct="icon active" innerclass="icon download" /></li>
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index 58e03fbdc..e5733bd23 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -19,7 +19,7 @@ function rcube_mail_ui()
searchmenu: { editable:1, callback:searchmenu },
attachmentmenu: { },
listoptions: { editable:1 },
- dragmessagemenu: { sticky:1 },
+ dragmenu: { sticky:1 },
groupmenu: { above:1 },
mailboxmenu: { above:1 },
spellmenu: { callback: spellmenu },
@@ -38,10 +38,12 @@ function rcube_mail_ui()
this.init_tabs = init_tabs;
this.show_about = show_about;
this.show_popup = show_popup;
+ this.add_popup = add_popup;
this.set_searchmod = set_searchmod;
this.show_uploadform = show_uploadform;
this.show_header_row = show_header_row;
this.hide_header_row = hide_header_row;
+ this.update_quota = update_quota;
// set minimal mode on small screens (don't wait for document.ready)
@@ -88,14 +90,15 @@ function rcube_mail_ui()
var dragmenu = $('#dragmessagemenu');
if (dragmenu.length) {
- rcmail.gui_object('message_dragmenu', 'dragmessagemenu');
- popups.dragmessagemenu = dragmenu;
+ rcmail.gui_object('dragmenu', 'dragmessagemenu');
+ popups.dragmenu = dragmenu;
}
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
+ rcmail.addEventListener('enable-command', enable_command);
rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); });
rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); });
- $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false });
+ $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(); return false });
// add menu link for each attachment
$('#attachment-list > li').each(function() {
@@ -109,10 +112,14 @@ function rcube_mail_ui()
layout_composeview();
// Show input elements with non-empty value
- var field, fields = ['cc', 'bcc', 'replyto', 'followupto'];
- for (var f=0; f < fields.length; f++) {
- if ((field = $('#_'+fields[f])) && field.length && field.val() != '')
- show_header_row(fields[f], true);
+ var f, v, field, fields = ['cc', 'bcc', 'replyto', 'followupto'];
+ for (f=0; f < fields.length; f++) {
+ v = fields[f]; field = $('#_'+v);
+ if (field.length) {
+ field.on('change', {v: v}, function(e) { if (this.value) show_header_row(e.data.v, true); });
+ if (field.val() != '')
+ show_header_row(v, true);
+ }
}
$('#composeoptionstoggle').click(function(){
@@ -144,6 +151,12 @@ function rcube_mail_ui()
new rcube_scroller('#folderlist-content', '#folderlist-header', '#folderlist-footer');
rcmail.addEventListener('setquota', update_quota);
+ rcmail.addEventListener('enable-command', enable_command);
+ rcmail.addEventListener('afterimport-messages', show_uploadform);
+ }
+ else if (rcmail.env.action == 'get') {
+ new rcube_splitter({ id:'mailpartsplitterv', p1:'#messagepartheader', p2:'#messagepartcontainer',
+ orientation:'v', relative:true, start:226, min:150, size:12}).init();
}
if ($('#mailview-left').length) {
@@ -182,6 +195,8 @@ function rcube_mail_ui()
/*** addressbook task ***/
else if (rcmail.env.task == 'addressbook') {
rcmail.addEventListener('afterupload-photo', show_uploadform);
+ rcmail.addEventListener('beforepushgroup', push_contactgroup);
+ rcmail.addEventListener('beforepopgroup', pop_contactgroup);
if (rcmail.env.action == '') {
new rcube_splitter({ id:'addressviewsplitterd', p1:'#addressview-left', p2:'#addressview-right',
@@ -191,12 +206,12 @@ function rcube_mail_ui()
new rcube_scroller('#directorylist-content', '#directorylist-header', '#directorylist-footer');
}
- }
- // set min-width to show all toolbar buttons
- var screen = $('.minwidth');
- if (screen.length) {
- screen.css('min-width', $('.toolbar').width() + $('#quicksearchbar').parent().width() + 20);
+ var dragmenu = $('#dragcontactmenu');
+ if (dragmenu.length) {
+ rcmail.gui_object('dragmenu', 'dragcontactmenu');
+ popups.dragmenu = dragmenu;
+ }
}
// turn a group of fieldsets into tabs
@@ -210,6 +225,7 @@ function rcube_mail_ui()
}
var select = $(this),
+ parent = select.parent(),
height = Math.max(select.height(), 26) - 2,
width = select.width() - 22,
title = $('option', this).first().text();
@@ -224,19 +240,23 @@ function rcube_mail_ui()
overlay.children().width(width).height(height).css('line-height', (height - 1) + 'px');
- select.change(function() {
- var val = $('option:selected', this).text();
- $(this).next().children().html(val);
- });
-
- var parent = select.parent();
if (parent.css('position') != 'absolute')
parent.css('position', 'relative');
// re-set original select width to fix click action and options width in some browsers
- select.width(overlay.width());
+ select.width(overlay.width())
+ .change(function() {
+ var val = $('option:selected', this).text();
+ $(this).next().children().text(val);
+ });
});
+ // set min-width to show all toolbar buttons
+ var screen = $('body > div.minwidth');
+ if (screen.length) {
+ screen.css('min-width', $('.toolbar').width() + $('#quicksearchbar').width() + $('#searchfilter').width() + 30);
+ }
+
$(document.body)
.bind('mouseup', body_mouseup)
.bind('keyup', function(e){
@@ -250,8 +270,13 @@ function rcube_mail_ui()
$('iframe').load(function(e){
// this = iframe
- var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
- $(doc).mouseup(body_mouseup);
+ try {
+ var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
+ $(doc).mouseup(body_mouseup);
+ }
+ catch (e) {
+ // catch possible "Permission denied" error in IE
+ };
})
.contents().mouseup(body_mouseup);
@@ -429,6 +454,30 @@ function rcube_mail_ui()
}
+ function enable_command(p)
+ {
+ if (p.command == 'reply-list') {
+ var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
+ if (rcmail.env.action == 'preview')
+ $('a.button.replyall').attr('title', label);
+ else
+ $('a.button.reply-all').text(label).attr('title', label);
+ }
+ }
+
+
+ /**
+ * Register a popup menu
+ */
+ function add_popup(popup, config)
+ {
+ var obj = popups[popup] = $('#'+popup);
+ obj.appendTo(document.body); // move it to top for proper absolute positioning
+
+ if (obj.length)
+ popupconfig[popup] = $.extend(popupconfig[popup] || {}, config || {});
+ }
+
/**
* Trigger for popup menus
*/
@@ -436,7 +485,7 @@ function rcube_mail_ui()
{
// auto-register menu object
if (config || !popupconfig[popup])
- popupconfig[popup] = $.extend(popupconfig[popup] || {}, config);
+ add_popup(popup, config);
var visible = show_popupmenu(popup, show),
config = popupconfig[popup];
@@ -551,8 +600,11 @@ function rcube_mail_ui()
mailviewsplit.handle.hide();
}
- if (visible && uid && rcmail.message_list)
- rcmail.message_list.scrollto(uid);
+ if (rcmail.message_list) {
+ if (visible && uid)
+ rcmail.message_list.scrollto(uid);
+ rcmail.message_list.resize();
+ }
rcmail.command('save-pref', { name:'preview_pane', value:(visible?1:0) });
}
@@ -561,7 +613,7 @@ function rcube_mail_ui()
/**
* Switch between short and full headers display in message preview
*/
- function toggle_preview_headers(button)
+ function toggle_preview_headers()
{
$('#preview-shortheaders').toggle();
var full = $('#preview-allheaders').toggle(),
@@ -702,8 +754,6 @@ function rcube_mail_ui()
$('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').prop('checked', true);
$('input[name="sort_ord"][value="DESC"]').prop('checked', rcmail.env.sort_order == 'DESC');
$('input[name="sort_ord"][value="ASC"]').prop('checked', rcmail.env.sort_order != 'DESC');
- $('input[name="view"][value="thread"]').prop('checked', rcmail.env.threading ? true : false);
- $('input[name="view"][value="list"]').prop('checked', rcmail.env.threading ? false : true);
// set checkboxes
$('input[name="list_col[]"]').each(function() {
@@ -718,7 +768,8 @@ function rcube_mail_ui()
close: function() {
$dialog.dialog('destroy').hide();
},
- width: 650
+ minWidth: 500,
+ width: $dialog.width()+25
}).show();
}
@@ -732,11 +783,10 @@ function rcube_mail_ui()
var sort = $('input[name="sort_col"]:checked').val(),
ord = $('input[name="sort_ord"]:checked').val(),
- thread = $('input[name="view"]:checked').val(),
cols = $('input[name="list_col[]"]:checked')
.map(function(){ return this.value; }).get();
- rcmail.set_list_options(cols, sort, ord, thread == 'thread' ? 1 : 0);
+ rcmail.set_list_options(cols, sort, ord, rcmail.env.threading);
}
@@ -788,6 +838,35 @@ function rcube_mail_ui()
});
}
+ function push_contactgroup(p)
+ {
+ // lets the contacts list swipe to the left, nice!
+ var table = $('#contacts-table'),
+ scroller = table.parent().css('overflow', 'hidden');
+
+ table.clone()
+ .css({ position:'absolute', top:'0', left:'0', width:table.width()+'px', 'z-index':10 })
+ .appendTo(scroller)
+ .animate({ left: -(table.width()+5) + 'px' }, 300, 'swing', function(){
+ $(this).remove();
+ scroller.css('overflow', 'auto')
+ });
+ }
+
+ function pop_contactgroup(p)
+ {
+ // lets the contacts list swipe to the left, nice!
+ var table = $('#contacts-table'),
+ scroller = table.parent().css('overflow', 'hidden'),
+ clone = table.clone().appendTo(scroller);
+
+ table.css({ position:'absolute', top:'0', left:-(table.width()+5) + 'px', width:table.width()+'px', height:table.height()+'px', 'z-index':10 })
+ .animate({ left:'0' }, 300, 'linear', function(){
+ clone.remove();
+ $(this).css({ position:'relative', left:'0', width:'100%', height:'auto', 'z-index':1 });
+ scroller.css('overflow', 'auto')
+ });
+ }
function show_uploadform()
{
@@ -798,7 +877,7 @@ function rcube_mail_ui()
$dialog.dialog('close');
return;
}
-
+
// add icons to clone file input field
if (rcmail.env.action == 'compose' && !$dialog.data('extended')) {
$('<a>')
diff --git a/tests/Framework/ImapGeneric.php b/tests/Framework/ImapGeneric.php
index 2f9b6d10f..af73158e5 100644
--- a/tests/Framework/ImapGeneric.php
+++ b/tests/Framework/ImapGeneric.php
@@ -35,4 +35,27 @@ class Framework_ImapGeneric extends PHPUnit_Framework_TestCase
$this->assertSame(array(1, 2, 3), $result);
$this->assertCount(3, $result);
}
+
+ /**
+ * Test for tokenizeResponse
+ */
+ function test_tokenizeResponse()
+ {
+ $response = "test brack[et] {1}\r\na {0}\r\n (item1 item2)";
+
+ $result = rcube_imap_generic::tokenizeResponse($response, 1);
+ $this->assertSame("test", $result);
+
+ $result = rcube_imap_generic::tokenizeResponse($response, 1);
+ $this->assertSame("brack[et]", $result);
+
+ $result = rcube_imap_generic::tokenizeResponse($response, 1);
+ $this->assertSame("a", $result);
+
+ $result = rcube_imap_generic::tokenizeResponse($response, 1);
+ $this->assertSame("", $result);
+
+ $result = rcube_imap_generic::tokenizeResponse($response, 1);
+ $this->assertSame(array('item1', 'item2'), $result);
+ }
}
diff --git a/tests/Framework/Mime.php b/tests/Framework/Mime.php
index 1f9a8c58f..4db1856be 100644
--- a/tests/Framework/Mime.php
+++ b/tests/Framework/Mime.php
@@ -39,6 +39,8 @@ class Framework_Mime extends PHPUnit_Framework_TestCase
19 => 'Test <"test test"@domain.tld>',
20 => '<"test test"@domain.tld>',
21 => '"test test"@domain.tld',
+ // invalid (#1489092)
+ 22 => '"John Doe @ SomeBusinessName" <MAILER-DAEMON>',
);
$results = array(
@@ -64,6 +66,8 @@ class Framework_Mime extends PHPUnit_Framework_TestCase
19 => array(1, 'Test', '"test test"@domain.tld'),
20 => array(1, '', '"test test"@domain.tld'),
21 => array(1, '', '"test test"@domain.tld'),
+ // invalid (#1489092)
+ 22 => array(1, 'John Doe @ SomeBusinessName', 'MAILER-DAEMON'),
);
foreach ($headers as $idx => $header) {
@@ -142,4 +146,62 @@ class Framework_Mime extends PHPUnit_Framework_TestCase
$this->assertEquals($unfolded, rcube_mime::unfold_flowed($flowed), "Test correct unfolding of quoted lines");
}
+
+ /**
+ * Test wordwrap()
+ */
+ function test_wordwrap()
+ {
+ $samples = array(
+ array(
+ array("aaaa aaaa\n aaaa"),
+ "aaaa aaaa\n aaaa",
+ ),
+ array(
+ array("123456789 123456789 123456789 123", 29),
+ "123456789 123456789 123456789\n123",
+ ),
+ array(
+ array("123456789 3456789 123456789", 29),
+ "123456789 3456789 123456789",
+ ),
+ array(
+ array("123456789 123456789 123456789 123", 29),
+ "123456789 123456789 123456789\n 123",
+ ),
+ array(
+ array("abc", 1, "\n", true),
+ "a\nb\nc",
+ ),
+ array(
+ array("ąść", 1, "\n", true, 'UTF-8'),
+ "ą\nś\nć",
+ ),
+ array(
+ array(">abc\n>def", 2, "\n", true),
+ ">abc\n>def",
+ ),
+ array(
+ array("abc def", 3, "-"),
+ "abc-def",
+ ),
+ array(
+ array("----------------------------------------------------------------------------------------\nabc def123456789012345", 76),
+ "----------------------------------------------------------------------------------------\nabc def123456789012345",
+ ),
+ array(
+ array("-------\nabc def", 5),
+ "-------\nabc\ndef",
+ ),
+ array(
+ array("http://xx.xxx.xx.xxx:8080/addressbooks/roundcubexxxxx%40xxxxxxxxxxxxxxxxxxxxxxx.xx.xx/testing/", 70),
+ "http://xx.xxx.xx.xxx:8080/addressbooks/roundcubexxxxx%40xxxxxxxxxxxxxxxxxxxxxxx.xx.xx/testing/",
+ ),
+ );
+
+ foreach ($samples as $sample) {
+ $this->assertEquals($sample[1], call_user_func_array(array('rcube_mime', 'wordwrap'), $sample[0]), "Test text wrapping");
+ }
+ }
+
}
diff --git a/tests/Framework/StringReplacer.php b/tests/Framework/StringReplacer.php
index 95c59221b..dc7638734 100644
--- a/tests/Framework/StringReplacer.php
+++ b/tests/Framework/StringReplacer.php
@@ -37,6 +37,8 @@ class Framework_StringReplacer extends PHPUnit_Framework_TestCase
array('http://link.com?(link)', '<a href="http://link.com?(link)">http://link.com?(link)</a>'),
array('http://<test>', 'http://<test>'),
array('http://', 'http://'),
+ array('1@1.com www.domain.tld', '<a href="mailto:1@1.com">1@1.com</a> <a href="http://www.domain.tld">www.domain.tld</a>'),
+ array(' www.domain.tld ', ' <a href="http://www.domain.tld">www.domain.tld</a> '),
);
}
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index 7c1e92ac8..abfb7cb65 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -195,6 +195,23 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
}
/**
+ * Check rcube_utils::explode_quoted_string()
+ */
+ function test_explode_quoted_string()
+ {
+ $data = array(
+ '"a,b"' => array('"a,b"'),
+ '"a,b","c,d"' => array('"a,b"','"c,d"'),
+ '"a,\\"b",d' => array('"a,\\"b"', 'd'),
+ );
+
+ foreach ($data as $text => $res) {
+ $result = rcube_utils::explode_quoted_string(',', $text);
+ $this->assertSame($res, $result);
+ }
+ }
+
+ /**
* Check rcube_utils::explode_quoted_string() compat. with explode()
*/
function test_explode_quoted_string_compat()
@@ -229,4 +246,52 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
}
}
+ /**
+ * rcube:utils::file2class()
+ */
+ function test_file2class()
+ {
+ $test = array(
+ array('', '', 'unknown'),
+ array('text', 'text', 'text'),
+ array('image/png', 'image.png', 'image png'),
+ );
+
+ foreach ($test as $v) {
+ $result = rcube_utils::file2class($v[0], $v[1]);
+ $this->assertSame($v[2], $result);
+ }
+ }
+
+ /**
+ * rcube:utils::strtotime()
+ */
+ function test_strtotime()
+ {
+ $test = array(
+ '1' => 1,
+ '' => 0,
+ );
+
+ foreach ($test as $datetime => $ts) {
+ $result = rcube_utils::strtotime($datetime);
+ $this->assertSame($ts, $result);
+ }
+ }
+
+ /**
+ * rcube:utils::normalize _string()
+ */
+ function test_normalize_string()
+ {
+ $test = array(
+ '' => '',
+ 'abc def' => 'abc def',
+ );
+
+ foreach ($test as $input => $output) {
+ $result = rcube_utils::normalize_string($input);
+ $this->assertSame($output, $result);
+ }
+ }
}
diff --git a/tests/Framework/VCard.php b/tests/Framework/VCard.php
index 15aa5d816..3353b5b13 100644
--- a/tests/Framework/VCard.php
+++ b/tests/Framework/VCard.php
@@ -65,6 +65,20 @@ class Framework_VCard extends PHPUnit_Framework_TestCase
$this->assertEquals("prefix", $vcard['prefix'], "Decode backslash character");
}
+ /**
+ * Backslash parsing test (#1489085)
+ */
+ function test_parse_five()
+ {
+ $vcard = "BEGIN:VCARD\nVERSION:3.0\nN:last\\\\\\a;fir\\nst\nURL:http\\://domain.tld\nEND:VCARD";
+ $vcard = new rcube_vcard($vcard, null);
+ $vcard = $vcard->get_assoc();
+
+ $this->assertEquals("last\\a", $vcard['surname'], "Decode dummy backslash character");
+ $this->assertEquals("fir\nst", $vcard['firstname'], "Decode backslash character");
+ $this->assertEquals("http://domain.tld", $vcard['website:other'][0], "Decode dummy backslash character");
+ }
+
function test_import()
{
$input = file_get_contents($this->_srcpath('apple.vcf'));
diff --git a/tests/Framework/Washtml.php b/tests/Framework/Washtml.php
index cd443266f..cb7234314 100644
--- a/tests/Framework/Washtml.php
+++ b/tests/Framework/Washtml.php
@@ -47,7 +47,7 @@ class Framework_Washtml extends PHPUnit_Framework_TestCase
$html = "<!--[if gte mso 10]><p>p1</p><!--><p>p2</p>";
$washed = $washer->wash($html);
- $this->assertEquals('<!-- html ignored --><!-- body ignored --><p>p2</p>', $washed, "HTML conditional comments (#1489004)");
+ $this->assertEquals('<!-- node type 8 --><!-- html ignored --><!-- body ignored --><p>p2</p>', $washed, "HTML conditional comments (#1489004)");
$html = "<!--TestCommentInvalid><p>test</p>";
$washed = $washer->wash($html);
@@ -55,4 +55,17 @@ class Framework_Washtml extends PHPUnit_Framework_TestCase
$this->assertEquals('<!-- html ignored --><!-- body ignored --><p>test</p>', $washed, "HTML invalid comments (#1487759)");
}
+ /**
+ * Test fixing of invalid self-closing elements (#1489137)
+ */
+ function test_self_closing()
+ {
+ $html = "<textarea>test";
+
+ $washer = new rcube_washtml;
+ $washed = $washer->wash($html);
+
+ $this->assertRegExp('|<textarea>test</textarea>|', $washed, "Self-closing textarea (#1489137)");
+ }
+
}
diff --git a/tests/Selenium/bootstrap.php b/tests/Selenium/bootstrap.php
index 6611e8feb..e8b186a1e 100644
--- a/tests/Selenium/bootstrap.php
+++ b/tests/Selenium/bootstrap.php
@@ -27,7 +27,7 @@ if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(dirname(__FILE__)
define('TESTS_DIR', dirname(__FILE__) . '/');
if (@is_dir(TESTS_DIR . 'config')) {
- define('RCMAIL_CONFIG_DIR', TESTS_DIR . 'config');
+ define('RCUBE_CONFIG_DIR', TESTS_DIR . 'config');
}
require_once(INSTALL_PATH . 'program/include/iniset.php');
@@ -38,7 +38,7 @@ if (set_include_path($include_path) === false) {
die("Fatal error: ini_set/set_include_path does not work.");
}
-$rcmail = rcube::get_instance();
+$rcmail = rcube::get_instance('test');
define('TESTS_URL', $rcmail->config->get('tests_url'));
define('TESTS_BROWSER', $rcmail->config->get('tests_browser', 'firefox'));
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 40659ebf0..192997d0d 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -27,12 +27,12 @@ if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(dirname(__FILE__)
define('TESTS_DIR', dirname(__FILE__) . '/');
if (@is_dir(TESTS_DIR . 'config')) {
- define('RCMAIL_CONFIG_DIR', TESTS_DIR . 'config');
+ define('RCUBE_CONFIG_DIR', TESTS_DIR . 'config');
}
require_once(INSTALL_PATH . 'program/include/iniset.php');
-rcmail::get_instance()->config->set('devel_mode', false);
+rcmail::get_instance('test')->config->set('devel_mode', false);
// Extend include path so some plugin test won't fail
$include_path = ini_get('include_path') . PATH_SEPARATOR . TESTS_DIR . '..';
diff --git a/tests/src/Csv2vcard/tb_plain.csv b/tests/src/Csv2vcard/tb_plain.csv
index 94ea766c0..4c4af14ca 100644
--- a/tests/src/Csv2vcard/tb_plain.csv
+++ b/tests/src/Csv2vcard/tb_plain.csv
@@ -1,2 +1,2 @@
First Name,Last Name,Display Name,Nickname,Primary Email,Secondary Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile Number,Home Address,Home Address 2,Home City,Home State,Home ZipCode,Home Country,Work Address,Work Address 2,Work City,Work State,Work ZipCode,Work Country,Job Title,Department,Organization,Web Page 1,Web Page 2,Birth Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes,
-Firstname,Lastname,Displayname,Nick,test@domain.tld,next@domain.tld,,phone work,phone home,fax,pager,mobile,Priv address,,City,region,xx-xxx,USA,Addr work,,city,region,33-333,Poland,title,department,Organization,http://page.com,http://webpage.tld,1970,11,15,,,,,,
+Firstname,Lastname,Displayname,Nick,test@domain.tld,next@domain.tld,,phone work,phone home,fax,pager,mobile,Priv address,,City,region,xx-xxx,USA,Addr work,,Wcity,Wstate,33-333,Poland,title,department,Organization,http://page.com,http://webpage.tld,1970,11,15,,,,,,
diff --git a/tests/src/Csv2vcard/tb_plain.vcf b/tests/src/Csv2vcard/tb_plain.vcf
index b001c3924..2aa91adf8 100644
--- a/tests/src/Csv2vcard/tb_plain.vcf
+++ b/tests/src/Csv2vcard/tb_plain.vcf
@@ -16,5 +16,5 @@ URL;TYPE=homepage:http://page.com
URL;TYPE=other:http://webpage.tld
BDAY;VALUE=date:1970-11-15
ADR;TYPE=home:;;Priv address;City;region;xx-xxx;USA
-ADR;TYPE=work:;;Addr work;;;33-333;Poland
+ADR;TYPE=work:;;Addr work;Wcity;Wstate;33-333;Poland
END:VCARD
diff --git a/tests/src/format-flowed-unfolded.txt b/tests/src/format-flowed-unfolded.txt
index 14e526be4..0af9b7130 100644
--- a/tests/src/format-flowed-unfolded.txt
+++ b/tests/src/format-flowed-unfolded.txt
@@ -5,7 +5,7 @@ X
On XX.YY.YYYY Y:YY, Somebody wrote:
> This part is a reply wihtout any flowing lines. rcube_mime::unfold_flowed()
-> has to be careful with empty quoted lines because they might end with a
+>> has to be careful with empty quoted lines because they might end with a
> space but still shouldn't be considered as flowed!
>
> The above empty line should persist after unfolding.
diff --git a/tests/src/format-flowed.txt b/tests/src/format-flowed.txt
index 359a41aec..da36064e0 100644
--- a/tests/src/format-flowed.txt
+++ b/tests/src/format-flowed.txt
@@ -7,7 +7,7 @@ X
On XX.YY.YYYY Y:YY, Somebody wrote:
> This part is a reply wihtout any flowing lines. rcube_mime::unfold_flowed()
-> has to be careful with empty quoted lines because they might end with a
+>> has to be careful with empty quoted lines because they might end with a
> space but still shouldn't be considered as flowed!
>
> The above empty line should persist after unfolding.