summaryrefslogtreecommitdiff
path: root/plugins/zipdownload
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/zipdownload')
-rw-r--r--plugins/zipdownload/CHANGELOG34
-rw-r--r--plugins/zipdownload/localization/ar.inc20
-rw-r--r--plugins/zipdownload/localization/ar_SA.inc20
-rw-r--r--plugins/zipdownload/localization/az_AZ.inc3
-rw-r--r--plugins/zipdownload/localization/be_BE.inc20
-rw-r--r--plugins/zipdownload/localization/bg_BG.inc20
-rw-r--r--plugins/zipdownload/localization/br.inc3
-rw-r--r--plugins/zipdownload/localization/bs_BA.inc3
-rw-r--r--plugins/zipdownload/localization/ca_ES.inc7
-rw-r--r--plugins/zipdownload/localization/cs_CZ.inc3
-rw-r--r--plugins/zipdownload/localization/cy_GB.inc3
-rw-r--r--plugins/zipdownload/localization/da_DK.inc3
-rw-r--r--plugins/zipdownload/localization/de_CH.inc3
-rw-r--r--plugins/zipdownload/localization/de_DE.inc3
-rw-r--r--plugins/zipdownload/localization/el_GR.inc20
-rw-r--r--plugins/zipdownload/localization/en_CA.inc20
-rw-r--r--plugins/zipdownload/localization/en_GB.inc3
-rw-r--r--plugins/zipdownload/localization/eo.inc20
-rw-r--r--plugins/zipdownload/localization/es_419.inc20
-rw-r--r--plugins/zipdownload/localization/es_AR.inc3
-rw-r--r--plugins/zipdownload/localization/es_ES.inc3
-rw-r--r--plugins/zipdownload/localization/et_EE.inc3
-rw-r--r--plugins/zipdownload/localization/eu_ES.inc20
-rw-r--r--plugins/zipdownload/localization/fa_AF.inc20
-rw-r--r--plugins/zipdownload/localization/fa_IR.inc3
-rw-r--r--plugins/zipdownload/localization/fi_FI.inc20
-rw-r--r--plugins/zipdownload/localization/fr_FR.inc3
-rw-r--r--plugins/zipdownload/localization/gl_ES.inc5
-rw-r--r--plugins/zipdownload/localization/he_IL.inc3
-rw-r--r--plugins/zipdownload/localization/hu_HU.inc3
-rw-r--r--plugins/zipdownload/localization/id_ID.inc20
-rw-r--r--plugins/zipdownload/localization/it_IT.inc3
-rw-r--r--plugins/zipdownload/localization/ja_JP.inc3
-rw-r--r--plugins/zipdownload/localization/km_KH.inc3
-rw-r--r--plugins/zipdownload/localization/ko_KR.inc20
-rw-r--r--plugins/zipdownload/localization/lb_LU.inc3
-rw-r--r--plugins/zipdownload/localization/lt_LT.inc3
-rw-r--r--plugins/zipdownload/localization/lv_LV.inc20
-rw-r--r--plugins/zipdownload/localization/nb_NO.inc3
-rw-r--r--plugins/zipdownload/localization/nl_NL.inc3
-rw-r--r--plugins/zipdownload/localization/nn_NO.inc3
-rw-r--r--plugins/zipdownload/localization/pl_PL.inc3
-rw-r--r--plugins/zipdownload/localization/pt_BR.inc3
-rw-r--r--plugins/zipdownload/localization/pt_PT.inc3
-rw-r--r--plugins/zipdownload/localization/ro_RO.inc7
-rw-r--r--plugins/zipdownload/localization/ru_RU.inc3
-rw-r--r--plugins/zipdownload/localization/sk_SK.inc5
-rw-r--r--plugins/zipdownload/localization/sl_SI.inc20
-rw-r--r--plugins/zipdownload/localization/sr_CS.inc3
-rw-r--r--plugins/zipdownload/localization/sv_SE.inc3
-rw-r--r--plugins/zipdownload/localization/tr_TR.inc3
-rw-r--r--plugins/zipdownload/localization/uk_UA.inc20
-rw-r--r--plugins/zipdownload/localization/vi_VN.inc3
-rw-r--r--plugins/zipdownload/localization/zh_CN.inc20
-rw-r--r--plugins/zipdownload/localization/zh_TW.inc3
-rw-r--r--plugins/zipdownload/zipdownload.php522
56 files changed, 613 insertions, 406 deletions
diff --git a/plugins/zipdownload/CHANGELOG b/plugins/zipdownload/CHANGELOG
deleted file mode 100644
index 32b878e76..000000000
--- a/plugins/zipdownload/CHANGELOG
+++ /dev/null
@@ -1,34 +0,0 @@
-Roundcube Webmail ZipDownload
-=============================
-
-2012-09-20
-==========
- * Added style for new Larry skin
- * Made plugin work with 0.8 version of Roundcube
- * Save attachments to temp files before adding to zip archive (memory!)
-
-2011 03 12
-==========
- * Convert charset for filenames inside zip
-
-2010 08 30
-==========
- * Get all messages in folder, not just the first page
-
-2010 08 12
-==========
- * Use $.inArray() instead of Array.indexOf()
-
-2010 08 07
-==========
- * Add the ability to download a folder as zip
- * Add the ability to download selection of messages as zip
- * Add config file to control download options
-
-2010 05 29
-==========
- * Remove tnef_decode, now done by message class (r3680)
-
-2010 02 21
-==========
- * First version \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ar.inc b/plugins/zipdownload/localization/ar.inc
new file mode 100644
index 000000000..c5857c96c
--- /dev/null
+++ b/plugins/zipdownload/localization/ar.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'تنزيل كل المرفقات';
+$labels['downloadfolder'] = 'تنزيل المجلد';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ar_SA.inc b/plugins/zipdownload/localization/ar_SA.inc
new file mode 100644
index 000000000..dd5f5f349
--- /dev/null
+++ b/plugins/zipdownload/localization/ar_SA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'تحميل جميع المرفقات';
+$labels['downloadfolder'] = 'تحميل المجلد';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/az_AZ.inc b/plugins/zipdownload/localization/az_AZ.inc
index e23eaa1f6..af785b48d 100644
--- a/plugins/zipdownload/localization/az_AZ.inc
+++ b/plugins/zipdownload/localization/az_AZ.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Bütün qoşmaları endir';
$labels['downloadfolder'] = 'Qovluğu endir';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/be_BE.inc b/plugins/zipdownload/localization/be_BE.inc
new file mode 100644
index 000000000..7c6fb3876
--- /dev/null
+++ b/plugins/zipdownload/localization/be_BE.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Спампаваць усе далучэнні';
+$labels['downloadfolder'] = 'Спампаваць папку';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/bg_BG.inc b/plugins/zipdownload/localization/bg_BG.inc
new file mode 100644
index 000000000..69f91f6f2
--- /dev/null
+++ b/plugins/zipdownload/localization/bg_BG.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Изтегляне на всички прикачени файлове';
+$labels['downloadfolder'] = 'Изтегляне на папка';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/br.inc b/plugins/zipdownload/localization/br.inc
index 6e6cdb342..0d7da382b 100644
--- a/plugins/zipdownload/localization/br.inc
+++ b/plugins/zipdownload/localization/br.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Pellgargañ an holl stagadennoù';
$labels['downloadfolder'] = 'Pellgargañ an teuliad';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/bs_BA.inc b/plugins/zipdownload/localization/bs_BA.inc
index 8c727987d..ea72831af 100644
--- a/plugins/zipdownload/localization/bs_BA.inc
+++ b/plugins/zipdownload/localization/bs_BA.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Preuzmi sve priloge';
$labels['downloadfolder'] = 'Preuzmi folder';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ca_ES.inc b/plugins/zipdownload/localization/ca_ES.inc
index 423dae2fd..bf5640ec6 100644
--- a/plugins/zipdownload/localization/ca_ES.inc
+++ b/plugins/zipdownload/localization/ca_ES.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
-$labels['downloadall'] = 'Descarregar tots els adjunts';
-$labels['downloadfolder'] = 'Descarregar carpeta';
-
+$labels['downloadall'] = 'Descarrega tots els adjunts';
+$labels['downloadfolder'] = 'Descarrega la carpeta';
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/cs_CZ.inc b/plugins/zipdownload/localization/cs_CZ.inc
index 07f9676ac..d96b1f570 100644
--- a/plugins/zipdownload/localization/cs_CZ.inc
+++ b/plugins/zipdownload/localization/cs_CZ.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Stáhnout všechny přílohy';
$labels['downloadfolder'] = 'Stáhnout složku';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/cy_GB.inc b/plugins/zipdownload/localization/cy_GB.inc
index 412fd2261..3c9fc7580 100644
--- a/plugins/zipdownload/localization/cy_GB.inc
+++ b/plugins/zipdownload/localization/cy_GB.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Llwytho lawr holl atodiadau';
$labels['downloadfolder'] = 'Ffolder llwytho lawr';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/da_DK.inc b/plugins/zipdownload/localization/da_DK.inc
index ced645ab2..9e29018d5 100644
--- a/plugins/zipdownload/localization/da_DK.inc
+++ b/plugins/zipdownload/localization/da_DK.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Download alle som .zip-fil';
$labels['downloadfolder'] = 'Download folder som .zip-fil';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/de_CH.inc b/plugins/zipdownload/localization/de_CH.inc
index 6106c2c72..978c221b0 100644
--- a/plugins/zipdownload/localization/de_CH.inc
+++ b/plugins/zipdownload/localization/de_CH.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Alle Anhänge herunterladen';
$labels['downloadfolder'] = 'Ordner herunterladen';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/de_DE.inc b/plugins/zipdownload/localization/de_DE.inc
index 6106c2c72..978c221b0 100644
--- a/plugins/zipdownload/localization/de_DE.inc
+++ b/plugins/zipdownload/localization/de_DE.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Alle Anhänge herunterladen';
$labels['downloadfolder'] = 'Ordner herunterladen';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/el_GR.inc b/plugins/zipdownload/localization/el_GR.inc
new file mode 100644
index 000000000..2a12b5da0
--- /dev/null
+++ b/plugins/zipdownload/localization/el_GR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Λυψη ολων των συννημενων';
+$labels['downloadfolder'] = 'Λυψη φακελου';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/en_CA.inc b/plugins/zipdownload/localization/en_CA.inc
new file mode 100644
index 000000000..48a8d9bcb
--- /dev/null
+++ b/plugins/zipdownload/localization/en_CA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Download all attachments';
+$labels['downloadfolder'] = 'Download folder';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/en_GB.inc b/plugins/zipdownload/localization/en_GB.inc
index aee8a5e15..48a8d9bcb 100644
--- a/plugins/zipdownload/localization/en_GB.inc
+++ b/plugins/zipdownload/localization/en_GB.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Download all attachments';
$labels['downloadfolder'] = 'Download folder';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/eo.inc b/plugins/zipdownload/localization/eo.inc
new file mode 100644
index 000000000..bc6ef9d69
--- /dev/null
+++ b/plugins/zipdownload/localization/eo.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Elŝuti ĉiujn kunsendaĵojn';
+$labels['downloadfolder'] = 'Elŝuti dosierujon';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/es_419.inc b/plugins/zipdownload/localization/es_419.inc
new file mode 100644
index 000000000..a25e34266
--- /dev/null
+++ b/plugins/zipdownload/localization/es_419.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Descargar todos los archivos adjuntos';
+$labels['downloadfolder'] = 'Descargar carpeta';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/es_AR.inc b/plugins/zipdownload/localization/es_AR.inc
index 6240e3bce..9f20f5561 100644
--- a/plugins/zipdownload/localization/es_AR.inc
+++ b/plugins/zipdownload/localization/es_AR.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Descargar Todo';
$labels['downloadfolder'] = 'Descargar carpeta';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/es_ES.inc b/plugins/zipdownload/localization/es_ES.inc
index 315362f1c..22db2cda9 100644
--- a/plugins/zipdownload/localization/es_ES.inc
+++ b/plugins/zipdownload/localization/es_ES.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Descargar todos los adjuntos';
$labels['downloadfolder'] = 'Descargar carpeta';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/et_EE.inc b/plugins/zipdownload/localization/et_EE.inc
index 6f03e33c0..969658bc2 100644
--- a/plugins/zipdownload/localization/et_EE.inc
+++ b/plugins/zipdownload/localization/et_EE.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Laadi alla kõik manused';
$labels['downloadfolder'] = 'Allalaadimiste kaust';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/eu_ES.inc b/plugins/zipdownload/localization/eu_ES.inc
new file mode 100644
index 000000000..0be09c8b2
--- /dev/null
+++ b/plugins/zipdownload/localization/eu_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Deskargatu eranskin guztiak';
+$labels['downloadfolder'] = 'Deskargatu karpeta';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/fa_AF.inc b/plugins/zipdownload/localization/fa_AF.inc
new file mode 100644
index 000000000..57bb55ea4
--- /dev/null
+++ b/plugins/zipdownload/localization/fa_AF.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'بارگزاری همه ضمیمه ها';
+$labels['downloadfolder'] = 'بارگزاری پوشه';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/fa_IR.inc b/plugins/zipdownload/localization/fa_IR.inc
index 41585688e..46007a0fb 100644
--- a/plugins/zipdownload/localization/fa_IR.inc
+++ b/plugins/zipdownload/localization/fa_IR.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'بارگیری همه پیوست‌ها';
$labels['downloadfolder'] = 'بارگیری پوشه';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/fi_FI.inc b/plugins/zipdownload/localization/fi_FI.inc
new file mode 100644
index 000000000..7e2c3137d
--- /dev/null
+++ b/plugins/zipdownload/localization/fi_FI.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Lataa kaikki liitteet';
+$labels['downloadfolder'] = 'Lataa kansio';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/fr_FR.inc b/plugins/zipdownload/localization/fr_FR.inc
index 307f0b2f6..993e1421b 100644
--- a/plugins/zipdownload/localization/fr_FR.inc
+++ b/plugins/zipdownload/localization/fr_FR.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Télécharger toutes les pièces jointes';
$labels['downloadfolder'] = 'Télécharger le répertoire';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/gl_ES.inc b/plugins/zipdownload/localization/gl_ES.inc
index 3925fca5b..91fc14651 100644
--- a/plugins/zipdownload/localization/gl_ES.inc
+++ b/plugins/zipdownload/localization/gl_ES.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
-$labels['downloadall'] = 'Descargar tódolos adxuntos';
+$labels['downloadall'] = 'Descargar todos os adxuntos';
$labels['downloadfolder'] = 'Descargar o cartafol';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/he_IL.inc b/plugins/zipdownload/localization/he_IL.inc
index 0ba0fcff8..0df6191fa 100644
--- a/plugins/zipdownload/localization/he_IL.inc
+++ b/plugins/zipdownload/localization/he_IL.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'להוריד את כל הצרופות';
$labels['downloadfolder'] = 'תיקיית צרופות';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/hu_HU.inc b/plugins/zipdownload/localization/hu_HU.inc
index 7b8ce85dc..85179e5a6 100644
--- a/plugins/zipdownload/localization/hu_HU.inc
+++ b/plugins/zipdownload/localization/hu_HU.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Összes csatolmány letöltése';
$labels['downloadfolder'] = 'Könyvtár letöltése';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/id_ID.inc b/plugins/zipdownload/localization/id_ID.inc
new file mode 100644
index 000000000..2ff3c87df
--- /dev/null
+++ b/plugins/zipdownload/localization/id_ID.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Unduh semua lampiran';
+$labels['downloadfolder'] = 'Folder download';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/it_IT.inc b/plugins/zipdownload/localization/it_IT.inc
index 4ea8a543d..882e354d9 100644
--- a/plugins/zipdownload/localization/it_IT.inc
+++ b/plugins/zipdownload/localization/it_IT.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Scarica tutti gli allegati';
$labels['downloadfolder'] = 'Scarica cartella';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ja_JP.inc b/plugins/zipdownload/localization/ja_JP.inc
index c606658b4..a0388808d 100644
--- a/plugins/zipdownload/localization/ja_JP.inc
+++ b/plugins/zipdownload/localization/ja_JP.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'すべての添付ファイルをダウンロード';
$labels['downloadfolder'] = 'ダウンロード先のフォルダー';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/km_KH.inc b/plugins/zipdownload/localization/km_KH.inc
index 722e0c8ce..9a4593e18 100644
--- a/plugins/zipdownload/localization/km_KH.inc
+++ b/plugins/zipdownload/localization/km_KH.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'ទាញយក ឯកសារភ្ជាប់ទាំងអស់';
$labels['downloadfolder'] = 'ទាញយក ថតឯកសារ';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ko_KR.inc b/plugins/zipdownload/localization/ko_KR.inc
new file mode 100644
index 000000000..cae831353
--- /dev/null
+++ b/plugins/zipdownload/localization/ko_KR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = '모든 첨부파일을 다운로드';
+$labels['downloadfolder'] = '다운로드 폴더';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/lb_LU.inc b/plugins/zipdownload/localization/lb_LU.inc
index 6721c51cb..434b064dd 100644
--- a/plugins/zipdownload/localization/lb_LU.inc
+++ b/plugins/zipdownload/localization/lb_LU.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'All d\'Unhäng eroflueden';
$labels['downloadfolder'] = 'Dossier eroflueden';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/lt_LT.inc b/plugins/zipdownload/localization/lt_LT.inc
index 08a5818cd..9b4a13310 100644
--- a/plugins/zipdownload/localization/lt_LT.inc
+++ b/plugins/zipdownload/localization/lt_LT.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Atsisiųsti visus priedus';
$labels['downloadfolder'] = 'Atsisiųsti aplanką';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/lv_LV.inc b/plugins/zipdownload/localization/lv_LV.inc
new file mode 100644
index 000000000..b23417abc
--- /dev/null
+++ b/plugins/zipdownload/localization/lv_LV.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Lejupielādēt visus pielikumus';
+$labels['downloadfolder'] = 'Lejupielādēt mapi';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/nb_NO.inc b/plugins/zipdownload/localization/nb_NO.inc
index 637df9063..a0b076bf4 100644
--- a/plugins/zipdownload/localization/nb_NO.inc
+++ b/plugins/zipdownload/localization/nb_NO.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Last ned alle vedlegg';
$labels['downloadfolder'] = 'Nedlastningsmappe';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/nl_NL.inc b/plugins/zipdownload/localization/nl_NL.inc
index 174dd0f8d..43aa442f3 100644
--- a/plugins/zipdownload/localization/nl_NL.inc
+++ b/plugins/zipdownload/localization/nl_NL.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Alle bijlagen downloaden';
$labels['downloadfolder'] = 'Map downloaden';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/nn_NO.inc b/plugins/zipdownload/localization/nn_NO.inc
index 637df9063..a0b076bf4 100644
--- a/plugins/zipdownload/localization/nn_NO.inc
+++ b/plugins/zipdownload/localization/nn_NO.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Last ned alle vedlegg';
$labels['downloadfolder'] = 'Nedlastningsmappe';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/pl_PL.inc b/plugins/zipdownload/localization/pl_PL.inc
index b0880c062..7cf192e1d 100644
--- a/plugins/zipdownload/localization/pl_PL.inc
+++ b/plugins/zipdownload/localization/pl_PL.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Pobierz wszystkie jako ZIP';
$labels['downloadfolder'] = 'Pobierz folder';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/pt_BR.inc b/plugins/zipdownload/localization/pt_BR.inc
index 7f80777b4..86dee11f2 100644
--- a/plugins/zipdownload/localization/pt_BR.inc
+++ b/plugins/zipdownload/localization/pt_BR.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Baixar todos os anexos';
$labels['downloadfolder'] = 'Pasta de baixar arquivos';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/pt_PT.inc b/plugins/zipdownload/localization/pt_PT.inc
index 8a5afeb06..4b7441927 100644
--- a/plugins/zipdownload/localization/pt_PT.inc
+++ b/plugins/zipdownload/localization/pt_PT.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Guardar todos os anexos';
$labels['downloadfolder'] = 'Guardar pasta';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ro_RO.inc b/plugins/zipdownload/localization/ro_RO.inc
index 7cba54d32..a676799d5 100644
--- a/plugins/zipdownload/localization/ro_RO.inc
+++ b/plugins/zipdownload/localization/ro_RO.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
-$labels['downloadall'] = 'Descarca toate atasamentele.';
-$labels['downloadfolder'] = 'Dosar de descărcare';
-
+$labels['downloadall'] = 'Descarcă toate atașamentele';
+$labels['downloadfolder'] = 'Descarcă dosar';
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/ru_RU.inc b/plugins/zipdownload/localization/ru_RU.inc
index 0b58fa7fa..b6286a177 100644
--- a/plugins/zipdownload/localization/ru_RU.inc
+++ b/plugins/zipdownload/localization/ru_RU.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Загрузить все вложения';
$labels['downloadfolder'] = 'Загрузить папку';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/sk_SK.inc b/plugins/zipdownload/localization/sk_SK.inc
index b26059cb9..4c918528f 100644
--- a/plugins/zipdownload/localization/sk_SK.inc
+++ b/plugins/zipdownload/localization/sk_SK.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Stiahnuť všetky prílohy';
-$labels['downloadfolder'] = 'Priečinok na sťahovanie';
-
+$labels['downloadfolder'] = 'Priečinok pre stiahnuté súbory';
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/sl_SI.inc b/plugins/zipdownload/localization/sl_SI.inc
new file mode 100644
index 000000000..07caeacbc
--- /dev/null
+++ b/plugins/zipdownload/localization/sl_SI.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Prenesi vse priponke';
+$labels['downloadfolder'] = 'Prenesi mapo';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/sr_CS.inc b/plugins/zipdownload/localization/sr_CS.inc
index b8d63b3f5..55d64b91f 100644
--- a/plugins/zipdownload/localization/sr_CS.inc
+++ b/plugins/zipdownload/localization/sr_CS.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Преузми све прилоге';
$labels['downloadfolder'] = 'Фасцикла за преузимање';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/sv_SE.inc b/plugins/zipdownload/localization/sv_SE.inc
index db8a1a368..d9c4f5da6 100644
--- a/plugins/zipdownload/localization/sv_SE.inc
+++ b/plugins/zipdownload/localization/sv_SE.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Hämta alla bifogade filer';
$labels['downloadfolder'] = 'Hämta katalog';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/tr_TR.inc b/plugins/zipdownload/localization/tr_TR.inc
index bfdf98a6c..a4dbec57b 100644
--- a/plugins/zipdownload/localization/tr_TR.inc
+++ b/plugins/zipdownload/localization/tr_TR.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Tüm ek dosyaları indir';
$labels['downloadfolder'] = 'klasörü indir';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/uk_UA.inc b/plugins/zipdownload/localization/uk_UA.inc
new file mode 100644
index 000000000..6232e9a2c
--- /dev/null
+++ b/plugins/zipdownload/localization/uk_UA.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = 'Завантажити всі вкладення';
+$labels['downloadfolder'] = 'Завантажити теку';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/vi_VN.inc b/plugins/zipdownload/localization/vi_VN.inc
index a91b32010..b9fdd3e43 100644
--- a/plugins/zipdownload/localization/vi_VN.inc
+++ b/plugins/zipdownload/localization/vi_VN.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = 'Tải tất cả đính kèm về';
$labels['downloadfolder'] = 'Tải giữ liệu về';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/zh_CN.inc b/plugins/zipdownload/localization/zh_CN.inc
new file mode 100644
index 000000000..dfa8db34a
--- /dev/null
+++ b/plugins/zipdownload/localization/zh_CN.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/zipdownload/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail Zipdownload plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
+*/
+$labels['downloadall'] = '下载全部附件';
+$labels['downloadfolder'] = '下载文件夹';
+?> \ No newline at end of file
diff --git a/plugins/zipdownload/localization/zh_TW.inc b/plugins/zipdownload/localization/zh_TW.inc
index cc8d673a1..44107c634 100644
--- a/plugins/zipdownload/localization/zh_TW.inc
+++ b/plugins/zipdownload/localization/zh_TW.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/
*/
-
-$labels = array();
$labels['downloadall'] = '下載所有附件';
$labels['downloadfolder'] = '下載資料夾';
-
?> \ No newline at end of file
diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php
index 59431267d..3bab286c5 100644
--- a/plugins/zipdownload/zipdownload.php
+++ b/plugins/zipdownload/zipdownload.php
@@ -12,261 +12,273 @@
*/
class zipdownload extends rcube_plugin
{
- public $task = 'mail';
- private $charset = 'ASCII';
-
- /**
- * Plugin initialization
- */
- public function init()
- {
- // check requirements first
- if (!class_exists('ZipArchive', false)) {
- rcmail::raise_error(array(
- 'code' => 520, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "php_zip extension is required for the zipdownload plugin"), true, false);
- return;
- }
-
- $rcmail = rcmail::get_instance();
-
- $this->load_config();
- $this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET);
- $this->add_texts('localization');
-
- if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview'))
- $this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink'));
-
- $this->register_action('plugin.zipdownload.zip_attachments', array($this, 'download_attachments'));
- $this->register_action('plugin.zipdownload.zip_messages', array($this, 'download_selection'));
- $this->register_action('plugin.zipdownload.zip_folder', array($this, 'download_folder'));
-
- if ($rcmail->config->get('zipdownload_folder', false) || $rcmail->config->get('zipdownload_selection', false)) {
- $this->include_script('zipdownload.js');
- $this->api->output->set_env('zipdownload_selection', $rcmail->config->get('zipdownload_selection', false));
-
- if ($rcmail->config->get('zipdownload_folder', false) && ($rcmail->action == '' || $rcmail->action == 'show')) {
- $zipdownload = $this->api->output->button(array('command' => 'plugin.zipdownload.zip_folder', 'type' => 'link', 'classact' => 'active', 'content' => $this->gettext('downloadfolder')));
- $this->api->add_content(html::tag('li', array('class' => 'separator_above'), $zipdownload), 'mailboxoptions');
- }
- }
- }
-
- /**
- * Place a link/button after attachments listing to trigger download
- */
- public function attachment_ziplink($p)
- {
- $rcmail = rcmail::get_instance();
-
- // only show the link if there is more than the configured number of attachments
- if (substr_count($p['content'], '<li') > $rcmail->config->get('zipdownload_attachments', 1)) {
- $href = $rcmail->url(array(
- '_action' => 'plugin.zipdownload.zip_attachments',
- '_mbox' => $rcmail->output->env['mailbox'],
- '_uid' => $rcmail->output->env['uid'],
- ));
-
- $link = html::a(array('href' => $href, 'class' => 'button zipdownload'),
- rcube::Q($this->gettext('downloadall'))
- );
-
- // append link to attachments list, slightly different in some skins
- switch (rcmail::get_instance()->config->get('skin')) {
- case 'classic':
- $p['content'] = str_replace('</ul>', html::tag('li', array('class' => 'zipdownload'), $link) . '</ul>', $p['content']);
- break;
-
- default:
- $p['content'] .= $link;
- break;
- }
-
- $this->include_stylesheet($this->local_skin_path() . '/zipdownload.css');
- }
-
- return $p;
- }
-
- /**
- * Handler for attachment download action
- */
- public function download_attachments()
- {
- $rcmail = rcmail::get_instance();
- $imap = $rcmail->storage;
- $temp_dir = $rcmail->config->get('temp_dir');
- $tmpfname = tempnam($temp_dir, 'zipdownload');
- $tempfiles = array($tmpfname);
- $message = new rcube_message(rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET));
-
- // open zip file
- $zip = new ZipArchive();
- $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE);
-
- foreach ($message->attachments as $part) {
- $pid = $part->mime_id;
- $part = $message->mime_parts[$pid];
- $disp_name = $this->_convert_filename($part->filename);
-
- if ($part->body) {
- $orig_message_raw = $part->body;
- $zip->addFromString($disp_name, $orig_message_raw);
- }
- else {
- $tmpfn = tempnam($temp_dir, 'zipattach');
- $tmpfp = fopen($tmpfn, 'w');
- $imap->get_message_part($message->uid, $part->mime_id, $part, null, $tmpfp, true);
- $tempfiles[] = $tmpfn;
- fclose($tmpfp);
- $zip->addFile($tmpfn, $disp_name);
- }
-
- }
-
- $zip->close();
-
- $filename = ($message->subject ? $message->subject : 'roundcube') . '.zip';
- $this->_deliver_zipfile($tmpfname, $filename);
-
- // delete temporary files from disk
- foreach ($tempfiles as $tmpfn)
- unlink($tmpfn);
-
- exit;
- }
-
- /**
- * Handler for message download action
- */
- public function download_selection()
- {
- if (isset($_REQUEST['_uid'])) {
- $uids = explode(",", rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GPC));
-
- if (sizeof($uids) > 0)
- $this->_download_messages($uids);
- }
- }
-
- /**
- * Handler for folder download action
- */
- public function download_folder()
- {
- $imap = rcmail::get_instance()->storage;
- $mbox_name = $imap->get_folder();
-
- // initialize searching result if search_filter is used
- if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') {
- $imap->search($mbox_name, $_SESSION['search_filter'], RCUBE_CHARSET);
- }
-
- // fetch message headers for all pages
- $uids = array();
- if ($count = $imap->count($mbox_name, $imap->get_threading() ? 'THREADS' : 'ALL', FALSE)) {
- for ($i = 0; ($i * $imap->get_pagesize()) <= $count; $i++) {
- $a_headers = $imap->list_messages($mbox_name, ($i + 1));
-
- foreach ($a_headers as $header) {
- if (empty($header))
- continue;
-
- array_push($uids, $header->uid);
- }
- }
- }
-
- if (sizeof($uids) > 0)
- $this->_download_messages($uids);
- }
-
- /**
- * Helper method to packs all the given messages into a zip archive
- *
- * @param array List of message UIDs to download
- */
- private function _download_messages($uids)
- {
- $rcmail = rcmail::get_instance();
- $imap = $rcmail->storage;
- $temp_dir = $rcmail->config->get('temp_dir');
- $tmpfname = tempnam($temp_dir, 'zipdownload');
- $tempfiles = array($tmpfname);
-
- // open zip file
- $zip = new ZipArchive();
- $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE);
-
- foreach ($uids as $uid){
- $headers = $imap->get_message_headers($uid);
- $subject = rcube_mime::decode_mime_string((string)$headers->subject);
- $subject = $this->_convert_filename($subject);
- $subject = substr($subject, 0, 16);
-
- if (isset($subject) && $subject !="")
- $disp_name = $subject . ".eml";
- else
- $disp_name = "message_rfc822.eml";
-
- $disp_name = $uid . "_" . $disp_name;
-
- $tmpfn = tempnam($temp_dir, 'zipmessage');
- $tmpfp = fopen($tmpfn, 'w');
- $imap->get_raw_body($uid, $tmpfp);
- $tempfiles[] = $tmpfn;
- fclose($tmpfp);
- $zip->addFile($tmpfn, $disp_name);
- }
-
- $zip->close();
-
- $this->_deliver_zipfile($tmpfname, $imap->get_folder() . '.zip');
-
- // delete temporary files from disk
- foreach ($tempfiles as $tmpfn)
- unlink($tmpfn);
-
- exit;
- }
-
- /**
- * Helper method to send the zip archive to the browser
- */
- private function _deliver_zipfile($tmpfname, $filename)
- {
- $browser = new rcube_browser;
- $rcmail = rcmail::get_instance();
-
- $rcmail->output->nocacheing_headers();
-
- if ($browser->ie && $browser->ver < 7)
- $filename = rawurlencode(abbreviate_string($filename, 55));
- else if ($browser->ie)
- $filename = rawurlencode($filename);
- else
- $filename = addcslashes($filename, '"');
-
- // send download headers
- header("Content-Type: application/octet-stream");
- if ($browser->ie)
- header("Content-Type: application/force-download");
-
- // don't kill the connection if download takes more than 30 sec.
- @set_time_limit(0);
- header("Content-Disposition: attachment; filename=\"". $filename ."\"");
- header("Content-length: " . filesize($tmpfname));
- readfile($tmpfname);
- }
-
- /**
- * Helper function to convert filenames to the configured charset
- */
- private function _convert_filename($str)
- {
+ public $task = 'mail';
+ private $charset = 'ASCII';
+
+ /**
+ * Plugin initialization
+ */
+ public function init()
+ {
+ // check requirements first
+ if (!class_exists('ZipArchive', false)) {
+ rcmail::raise_error(array(
+ 'code' => 520,
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "php_zip extension is required for the zipdownload plugin"), true, false);
+ return;
+ }
+
+ $rcmail = rcmail::get_instance();
+
+ $this->load_config();
+ $this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET);
+ $this->add_texts('localization');
+
+ if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview')) {
+ $this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink'));
+ }
+
+ $this->register_action('plugin.zipdownload.zip_attachments', array($this, 'download_attachments'));
+ $this->register_action('plugin.zipdownload.zip_messages', array($this, 'download_selection'));
+ $this->register_action('plugin.zipdownload.zip_folder', array($this, 'download_folder'));
+
+ if (($selection = $rcmail->config->get('zipdownload_selection')) || $rcmail->config->get('zipdownload_folder')) {
+ $this->include_script('zipdownload.js');
+ $this->api->output->set_env('zipdownload_selection', $selection);
+
+ if ($rcmail->config->get('zipdownload_folder', false) && ($rcmail->action == '' || $rcmail->action == 'show')) {
+ $zipdownload = $this->api->output->button(array('command' => 'plugin.zipdownload.zip_folder', 'type' => 'link', 'classact' => 'active', 'content' => $this->gettext('downloadfolder')));
+ $this->api->add_content(html::tag('li', array('class' => 'separator_above'), $zipdownload), 'mailboxoptions');
+ }
+ }
+ }
+
+ /**
+ * Place a link/button after attachments listing to trigger download
+ */
+ public function attachment_ziplink($p)
+ {
+ $rcmail = rcmail::get_instance();
+
+ // only show the link if there is more than the configured number of attachments
+ if (substr_count($p['content'], '<li') > $rcmail->config->get('zipdownload_attachments', 1)) {
+ $href = $rcmail->url(array(
+ '_action' => 'plugin.zipdownload.zip_attachments',
+ '_mbox' => $rcmail->output->env['mailbox'],
+ '_uid' => $rcmail->output->env['uid'],
+ ));
+
+ $link = html::a(array('href' => $href, 'class' => 'button zipdownload'),
+ rcube::Q($this->gettext('downloadall'))
+ );
+
+ // append link to attachments list, slightly different in some skins
+ switch (rcmail::get_instance()->config->get('skin')) {
+ case 'classic':
+ $p['content'] = str_replace('</ul>', html::tag('li', array('class' => 'zipdownload'), $link) . '</ul>', $p['content']);
+ break;
+
+ default:
+ $p['content'] .= $link;
+ break;
+ }
+
+ $this->include_stylesheet($this->local_skin_path() . '/zipdownload.css');
+ }
+
+ return $p;
+ }
+
+ /**
+ * Handler for attachment download action
+ */
+ public function download_attachments()
+ {
+ $rcmail = rcmail::get_instance();
+ $imap = $rcmail->get_storage();
+ $temp_dir = $rcmail->config->get('temp_dir');
+ $tmpfname = tempnam($temp_dir, 'zipdownload');
+ $tempfiles = array($tmpfname);
+ $message = new rcube_message(rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET));
+
+ // open zip file
+ $zip = new ZipArchive();
+ $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE);
+
+ foreach ($message->attachments as $part) {
+ $pid = $part->mime_id;
+ $part = $message->mime_parts[$pid];
+ $filename = $part->filename;
+
+ if ($filename === null || $filename === '') {
+ $ext = (array) rcube_mime::get_mime_extensions($part->mimetype);
+ $ext = array_shift($ext);
+ $filename = $rcmail->gettext('messagepart') . ' ' . $pid;
+ if ($ext) {
+ $filename .= '.' . $ext;
+ }
+ }
+
+ $disp_name = $this->_convert_filename($filename);
+
+ if ($part->body) {
+ $orig_message_raw = $part->body;
+ $zip->addFromString($disp_name, $orig_message_raw);
+ }
+ else {
+ $tmpfn = tempnam($temp_dir, 'zipattach');
+ $tmpfp = fopen($tmpfn, 'w');
+ $imap->get_message_part($message->uid, $part->mime_id, $part, null, $tmpfp, true);
+ $tempfiles[] = $tmpfn;
+ fclose($tmpfp);
+ $zip->addFile($tmpfn, $disp_name);
+ }
+ }
+
+ $zip->close();
+
+ $filename = ($message->subject ? $message->subject : 'roundcube') . '.zip';
+ $this->_deliver_zipfile($tmpfname, $filename);
+
+ // delete temporary files from disk
+ foreach ($tempfiles as $tmpfn) {
+ unlink($tmpfn);
+ }
+
+ exit;
+ }
+
+ /**
+ * Handler for message download action
+ */
+ public function download_selection()
+ {
+ if (isset($_REQUEST['_uid'])) {
+ $uids = explode(",", rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GPC));
+
+ if (sizeof($uids) > 0) {
+ $this->_download_messages($uids);
+ }
+ }
+ }
+
+ /**
+ * Handler for folder download action
+ */
+ public function download_folder()
+ {
+ $imap = rcmail::get_instance()->get_storage();
+ $mbox_name = $imap->get_folder();
+
+ // initialize searching result if search_filter is used
+ if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') {
+ $imap->search($mbox_name, $_SESSION['search_filter'], RCUBE_CHARSET);
+ }
+
+ // fetch message headers for all pages
+ $uids = array();
+ if ($count = $imap->count($mbox_name, $imap->get_threading() ? 'THREADS' : 'ALL', FALSE)) {
+ for ($i = 0; ($i * $imap->get_pagesize()) <= $count; $i++) {
+ $a_headers = $imap->list_messages($mbox_name, ($i + 1));
+
+ foreach ($a_headers as $header) {
+ if (empty($header))
+ continue;
+
+ array_push($uids, $header->uid);
+ }
+ }
+ }
+
+ if (sizeof($uids) > 0)
+ $this->_download_messages($uids);
+ }
+
+ /**
+ * Helper method to packs all the given messages into a zip archive
+ *
+ * @param array List of message UIDs to download
+ */
+ private function _download_messages($uids)
+ {
+ $rcmail = rcmail::get_instance();
+ $imap = $rcmail->get_storage();
+ $temp_dir = $rcmail->config->get('temp_dir');
+ $tmpfname = tempnam($temp_dir, 'zipdownload');
+ $tempfiles = array($tmpfname);
+
+ // open zip file
+ $zip = new ZipArchive();
+ $zip->open($tmpfname, ZIPARCHIVE::OVERWRITE);
+
+ foreach ($uids as $uid){
+ $headers = $imap->get_message_headers($uid);
+ $subject = rcube_mime::decode_mime_string((string)$headers->subject);
+ $subject = $this->_convert_filename($subject);
+ $subject = substr($subject, 0, 16);
+
+ $disp_name = ($subject ? $subject : 'message_rfc822') . ".eml";
+ $disp_name = $uid . "_" . $disp_name;
+
+ $tmpfn = tempnam($temp_dir, 'zipmessage');
+ $tmpfp = fopen($tmpfn, 'w');
+ $imap->get_raw_body($uid, $tmpfp);
+ $tempfiles[] = $tmpfn;
+ fclose($tmpfp);
+ $zip->addFile($tmpfn, $disp_name);
+ }
+
+ $zip->close();
+
+ $this->_deliver_zipfile($tmpfname, $imap->get_folder() . '.zip');
+
+ // delete temporary files from disk
+ foreach ($tempfiles as $tmpfn) {
+ unlink($tmpfn);
+ }
+
+ exit;
+ }
+
+ /**
+ * Helper method to send the zip archive to the browser
+ */
+ private function _deliver_zipfile($tmpfname, $filename)
+ {
+ $browser = new rcube_browser;
+ $rcmail = rcmail::get_instance();
+
+ $rcmail->output->nocacheing_headers();
+
+ if ($browser->ie && $browser->ver < 7)
+ $filename = rawurlencode(abbreviate_string($filename, 55));
+ else if ($browser->ie)
+ $filename = rawurlencode($filename);
+ else
+ $filename = addcslashes($filename, '"');
+
+ // send download headers
+ header("Content-Type: application/octet-stream");
+ if ($browser->ie) {
+ header("Content-Type: application/force-download");
+ }
+
+ // don't kill the connection if download takes more than 30 sec.
+ @set_time_limit(0);
+ header("Content-Disposition: attachment; filename=\"". $filename ."\"");
+ header("Content-length: " . filesize($tmpfname));
+ readfile($tmpfname);
+ }
+
+ /**
+ * Helper function to convert filenames to the configured charset
+ */
+ private function _convert_filename($str)
+ {
$str = rcube_charset::convert($str, RCUBE_CHARSET, $this->charset);
- return strtr($str, array(':'=>'', '/'=>'-'));
- }
+ return strtr($str, array(':'=>'', '/'=>'-'));
+ }
}