From 2a41355776b1c1bc82255b5712267b0368b51d10 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 04 Dec 2008 05:21:34 -0500
Subject: [PATCH] - Added 'show_images' option, removed 'addrbook_show_images' (#1485597)

---
 program/localization/bg_BG/labels.inc |    1 
 program/localization/cy_GB/labels.inc |    1 
 program/localization/fr_FR/labels.inc |    1 
 program/localization/sk_SK/labels.inc |    1 
 program/steps/mail/show.inc           |   27 ++++++++-----
 program/localization/de_CH/labels.inc |    1 
 program/localization/es_ES/labels.inc |    1 
 program/localization/it_IT/labels.inc |    1 
 program/localization/mk_MK/labels.inc |    1 
 program/localization/ca_ES/labels.inc |    1 
 program/localization/en_GB/labels.inc |    1 
 program/localization/de_DE/labels.inc |    1 
 installer/rcube_install.php           |    1 
 program/localization/pt_BR/labels.inc |    1 
 program/localization/da_DK/labels.inc |    1 
 program/localization/zh_TW/labels.inc |    1 
 program/localization/ja_JP/labels.inc |    1 
 program/steps/settings/func.inc       |   15 ++++---
 program/localization/pl_PL/labels.inc |    4 +
 program/localization/ru_RU/labels.inc |    1 
 program/localization/cs_CZ/labels.inc |    1 
 program/localization/fa/labels.inc    |    1 
 program/localization/nn_NO/labels.inc |    1 
 CHANGELOG                             |    4 ++
 program/localization/az_AZ/labels.inc |    1 
 program/localization/he_IL/labels.inc |    1 
 config/main.inc.php.dist              |    7 ++-
 program/localization/gl_ES/labels.inc |    1 
 program/localization/nl_NL/labels.inc |    1 
 program/steps/settings/save_prefs.inc |    4 +-
 program/localization/lt_LT/labels.inc |    1 
 program/localization/eu_ES/labels.inc |    1 
 program/localization/fi_FI/labels.inc |    1 
 program/localization/et_EE/labels.inc |    1 
 program/localization/pt_PT/labels.inc |    1 
 program/localization/hu_HU/labels.inc |    1 
 program/localization/en_US/labels.inc |    4 +
 program/localization/tr_TR/labels.inc |    1 
 program/localization/zh_CN/labels.inc |    1 
 program/localization/ar_SA/labels.inc |    1 
 program/localization/hr_HR/labels.inc |    1 
 program/localization/eo/labels.inc    |    1 
 program/localization/id_ID/labels.inc |    1 
 43 files changed, 43 insertions(+), 58 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 95bab76..88329d0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
 CHANGELOG RoundCube Webmail
 ---------------------------
 
+2008/12/04 (alec)
+----------
+- Added 'show_images' option, removed 'addrbook_show_images' (#1485597)
+
 2008/11/28 (thomasb)
 ----------
 - Option to check for new mails in all folders (#1484374)
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index b2c0056..e78b91e 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -352,8 +352,11 @@
 // prefer displaying HTML messages
 $rcmail_config['prefer_html'] = TRUE;
 
-// display images in mail from known senders
-$rcmail_config['addrbook_show_images'] = FALSE;
+// 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;
 
 // compose html formatted messages by default
 $rcmail_config['htmleditor'] = FALSE;
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index a20a990..4bef17e 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -37,6 +37,7 @@
     'skin_path' => 'skin',
     'locale_string' => 'language',
     'multiple_identities' => 'identities_level',
+    'addrbook_show_images' => 'show_images',
   );
   
   // these config options are optional or can be set to null
diff --git a/program/localization/ar_SA/labels.inc b/program/localization/ar_SA/labels.inc
index fe21697..a996169 100644
--- a/program/localization/ar_SA/labels.inc
+++ b/program/localization/ar_SA/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'حجم الملف';
 $labels['preferhtml'] = 'تفضيل صيغة HTML';
 $labels['htmlmessage'] = 'رسالة بنسق HTML';
-$labels['showknownimages'] = 'أظهر الصّور من المرسلين المعروفين';
 $labels['prettydate'] = 'تواريخ منمقة';
 $labels['addtoaddressbook'] = 'إضافة إلى دفتر العناوين';
 $labels['sun'] = 'أح';
diff --git a/program/localization/az_AZ/labels.inc b/program/localization/az_AZ/labels.inc
index 81bf29a..d57a6d5 100644
--- a/program/localization/az_AZ/labels.inc
+++ b/program/localization/az_AZ/labels.inc
@@ -50,7 +50,6 @@
 $labels['filesize'] = 'Fayl Ölçüsü';
 $labels['preferhtml'] = 'HTML göstərməyi dəstəklə';
 $labels['htmlmessage'] = 'HTML Mesaj';
-$labels['showknownimages'] = 'Tanınmış qrafikləri göstər';
 $labels['prettydate'] = 'Tarixi qısaltaraq göstər';
 $labels['addtoaddressbook'] = 'Ünvan Kitabçasına Əlavə Et';
 $labels['sun'] = 'B';
diff --git a/program/localization/bg_BG/labels.inc b/program/localization/bg_BG/labels.inc
index 37439b8..d05be74 100644
--- a/program/localization/bg_BG/labels.inc
+++ b/program/localization/bg_BG/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Размер на файла';
 $labels['preferhtml'] = 'Показвай първо HTML версия';
 $labels['htmlmessage'] = 'HTML съобщение';
-$labels['showknownimages'] = 'Показвай изображения от известни податели';
 $labels['prettydate'] = 'Кратки дати';
 $labels['addtoaddressbook'] = 'Добави в адресната книга';
 $labels['sun'] = 'Нед';
diff --git a/program/localization/ca_ES/labels.inc b/program/localization/ca_ES/labels.inc
index 7aaea55..d076d6a 100644
--- a/program/localization/ca_ES/labels.inc
+++ b/program/localization/ca_ES/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Grandària de fitxer';
 $labels['preferhtml'] = 'Preferisc HTML';
 $labels['htmlmessage'] = 'Missatge HTML';
-$labels['showknownimages'] = 'Mostrar imatges dels remitents coneguts';
 $labels['prettydate'] = 'Dates curtes';
 $labels['addtoaddressbook'] = 'Afegir a contactes';
 $labels['sun'] = 'DG';
diff --git a/program/localization/cs_CZ/labels.inc b/program/localization/cs_CZ/labels.inc
index eeb0730..01ac402 100644
--- a/program/localization/cs_CZ/labels.inc
+++ b/program/localization/cs_CZ/labels.inc
@@ -54,7 +54,6 @@
 $labels['filesize'] = 'Velikost přílohy';
 $labels['preferhtml'] = 'Upřednostňovat HTML zobrazení';
 $labels['htmlmessage'] = 'HTML zpráva';
-$labels['showknownimages'] = 'Ukazovat obrázky v mailech od neznámých odesilatelů';
 $labels['prettydate'] = 'Hezčí datum';
 $labels['addtoaddressbook'] = 'Přidat do adresáře';
 $labels['sun'] = 'Ne';
diff --git a/program/localization/cy_GB/labels.inc b/program/localization/cy_GB/labels.inc
index 97dcb06..9da7ce9 100644
--- a/program/localization/cy_GB/labels.inc
+++ b/program/localization/cy_GB/labels.inc
@@ -49,7 +49,6 @@
 $labels['filesize'] = 'Maint ffeil';
 $labels['preferhtml'] = 'Dangos HTML';
 $labels['htmlmessage'] = 'Neges HTML';
-$labels['showknownimages'] = 'Dangos lluniau gan anfonwyr cyfarwydd';
 $labels['prettydate'] = 'Dyddiadau pert';
 $labels['addtoaddressbook'] = 'Ychwanegu i\'r llyfr cyfeiriadau';
 $labels['sun'] = 'Sul';
diff --git a/program/localization/da_DK/labels.inc b/program/localization/da_DK/labels.inc
index 75f1417..0f16b49 100644
--- a/program/localization/da_DK/labels.inc
+++ b/program/localization/da_DK/labels.inc
@@ -54,7 +54,6 @@
 $labels['filesize'] = 'Filstørrelse';
 $labels['preferhtml'] = 'Foretræk HTML';
 $labels['htmlmessage'] = 'HTML-besked';
-$labels['showknownimages'] = 'Vis billeder fra kendte afsendere';
 $labels['prettydate'] = 'Pæn datovisning';
 $labels['addtoaddressbook'] = 'Tilføj til adressebogen';
 $labels['sun'] = 'Søn';
diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc
index b05dcf7..f45ad8d 100644
--- a/program/localization/de_CH/labels.inc
+++ b/program/localization/de_CH/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Dateigrösse';
 $labels['preferhtml'] = 'HTML bevorzugen';
 $labels['htmlmessage'] = 'HTML Nachricht';
-$labels['showknownimages'] = 'Zeige Bilder von bekannten Absendern an';
 $labels['prettydate'] = 'Kurze Datumsanzeige';
 $labels['addtoaddressbook'] = 'Ins Adressbuch übernehmen';
 $labels['sun'] = 'So';
diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc
index 10636e0..cd88a6b 100644
--- a/program/localization/de_DE/labels.inc
+++ b/program/localization/de_DE/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'Dateigröße';
 $labels['preferhtml'] = 'HTML anzeigen';
 $labels['htmlmessage'] = 'HTML-Nachricht';
-$labels['showknownimages'] = 'Zeige Bilder von bekannten Absendern an';
 $labels['prettydate'] = 'Kurze Datumsanzeige';
 $labels['addtoaddressbook'] = 'Ins Adressbuch übernehmen';
 $labels['sun'] = 'So';
diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc
index deecde1..6c12082 100644
--- a/program/localization/en_GB/labels.inc
+++ b/program/localization/en_GB/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'File size';
 $labels['preferhtml'] = 'Display HTML';
 $labels['htmlmessage'] = 'HTML Message';
-$labels['showknownimages'] = 'Show images from known senders';
 $labels['prettydate'] = 'Pretty dates';
 $labels['addtoaddressbook'] = 'Add to address book';
 $labels['sun'] = 'Sun';
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 142dd71..8cff8a5 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -66,7 +66,6 @@
 
 $labels['preferhtml'] = 'Display HTML';
 $labels['htmlmessage'] = 'HTML Message';
-$labels['showknownimages'] = 'Show images from known senders';
 $labels['prettydate'] = 'Pretty dates';
 
 $labels['addtoaddressbook'] = 'Add to address book';
@@ -281,6 +280,9 @@
 $labels['readwhendeleted'] = 'Mark the message as read on delete';
 $labels['flagfordeletion'] = 'Flag the message for deletion instead of delete';
 $labels['skipdeleted'] = 'Do not show deleted messages';
+$labels['showremoteimages'] = 'Display remote inline images';
+$labels['fromknownsenders'] = 'from known senders';
+$labels['always'] = 'always';
 $labels['showinlineimages'] = 'Display attached images below the message';
 $labels['autosavedraft']  = 'Automatically save draft';
 $labels['everynminutes']  = 'every $n minutes';
diff --git a/program/localization/eo/labels.inc b/program/localization/eo/labels.inc
index 51bb544..52327f7 100644
--- a/program/localization/eo/labels.inc
+++ b/program/localization/eo/labels.inc
@@ -50,7 +50,6 @@
 $labels['filesize'] = 'Dosiergrando';
 $labels['preferhtml'] = 'Montru HTML';
 $labels['htmlmessage'] = 'HTML Mesaĝo';
-$labels['showknownimages'] = 'Montru bildojn de konataj sendantoj';
 $labels['prettydate'] = 'Agrablaj Datoj';
 $labels['addtoaddressbook'] = 'Aldonu al adresaro';
 $labels['sun'] = 'Dim';
diff --git a/program/localization/es_ES/labels.inc b/program/localization/es_ES/labels.inc
index 48318ae..ca5b7fc 100644
--- a/program/localization/es_ES/labels.inc
+++ b/program/localization/es_ES/labels.inc
@@ -55,7 +55,6 @@
 $labels['filesize'] = 'Tamaño del archivo';
 $labels['preferhtml'] = 'Prefiero HTML';
 $labels['htmlmessage'] = 'Mensaje HTML';
-$labels['showknownimages'] = 'Muestra imágenes de remitentes conocidos';
 $labels['prettydate'] = 'Fecha detallada';
 $labels['addtoaddressbook'] = 'Añadir a contactos';
 $labels['sun'] = 'Dom';
diff --git a/program/localization/et_EE/labels.inc b/program/localization/et_EE/labels.inc
index 0959540..74f8519 100644
--- a/program/localization/et_EE/labels.inc
+++ b/program/localization/et_EE/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'Faili suurus';
 $labels['preferhtml'] = 'Eelista HTMLi';
 $labels['htmlmessage'] = 'HTML kirjad';
-$labels['showknownimages'] = 'Näita tuntud saatjate kirjades pilte';
 $labels['prettydate'] = 'Kenad kuupäevad';
 $labels['addtoaddressbook'] = 'Lisa aadressiraamatusse';
 $labels['sun'] = 'P';
diff --git a/program/localization/eu_ES/labels.inc b/program/localization/eu_ES/labels.inc
index ff887c4..bb7f4cf 100644
--- a/program/localization/eu_ES/labels.inc
+++ b/program/localization/eu_ES/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'Fitxategi Tamaina';
 $labels['preferhtml'] = 'HTML nahiago';
 $labels['htmlmessage'] = 'HTML Mezua';
-$labels['showknownimages'] = 'Bidaltzaile ezagunen imajinak ikusi';
 $labels['prettydate'] = 'Data politak';
 $labels['addtoaddressbook'] = 'Helbide liburura gehitu';
 $labels['sun'] = 'Iga';
diff --git a/program/localization/fa/labels.inc b/program/localization/fa/labels.inc
index 99cb5b0..83b36dc 100644
--- a/program/localization/fa/labels.inc
+++ b/program/localization/fa/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'اندازه‌ی پرونده';
 $labels['preferhtml'] = 'HTML نمایش';
 $labels['htmlmessage'] = 'HTML پیغام';
-$labels['showknownimages'] = 'نمایش عکسها از فرستندگان شناخته شده';
 $labels['prettydate'] = 'تاریخ‌های زیبا';
 $labels['addtoaddressbook'] = 'افزودن به دفتر نشانی‌ها';
 $labels['sun'] = 'یکشنبه';
diff --git a/program/localization/fi_FI/labels.inc b/program/localization/fi_FI/labels.inc
index 7b29530..24b9393 100644
--- a/program/localization/fi_FI/labels.inc
+++ b/program/localization/fi_FI/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Tiedoston koko';
 $labels['preferhtml'] = 'Käytä HTML:aa';
 $labels['htmlmessage'] = 'HTML-viesti';
-$labels['showknownimages'] = 'Näytä tunnetuilta lähettäjiltä saapuneet kuvat';
 $labels['prettydate'] = 'Nätit päiväykset';
 $labels['addtoaddressbook'] = 'Lisää osoitekirjaan';
 $labels['sun'] = 'Su';
diff --git a/program/localization/fr_FR/labels.inc b/program/localization/fr_FR/labels.inc
index 439f8ea..dba9785 100644
--- a/program/localization/fr_FR/labels.inc
+++ b/program/localization/fr_FR/labels.inc
@@ -54,7 +54,6 @@
 $labels['filesize'] = 'Taille du fichier';
 $labels['preferhtml'] = 'Afficher en HTML';
 $labels['htmlmessage'] = 'Message en HTML';
-$labels['showknownimages'] = 'Afficher les images des expéditeurs connus';
 $labels['prettydate'] = 'Affichage court des dates';
 $labels['addtoaddressbook'] = 'Ajouter au carnet d\'adresses';
 $labels['sun'] = 'Dim';
diff --git a/program/localization/gl_ES/labels.inc b/program/localization/gl_ES/labels.inc
index f7c2cb6..7db8e2c 100644
--- a/program/localization/gl_ES/labels.inc
+++ b/program/localization/gl_ES/labels.inc
@@ -49,7 +49,6 @@
 $labels['filesize'] = 'Tamaño de ficheiro';
 $labels['preferhtml'] = 'Prefiro HTML';
 $labels['htmlmessage'] = 'Mensaxe HTML';
-$labels['showknownimages'] = 'Mostrar as imaxes nos correos de remitentes coñecidos.';
 $labels['prettydate'] = 'Data decorada';
 $labels['addtoaddressbook'] = 'Engadir ao caderno de enderezos';
 $labels['sun'] = 'Dom';
diff --git a/program/localization/he_IL/labels.inc b/program/localization/he_IL/labels.inc
index 0fbcd95..6a2220e 100644
--- a/program/localization/he_IL/labels.inc
+++ b/program/localization/he_IL/labels.inc
@@ -50,7 +50,6 @@
 $labels['filesize'] = 'גודל קובץ';
 $labels['preferhtml'] = 'הצגת HTML';
 $labels['htmlmessage'] = 'תוכן HTML';
-$labels['showknownimages'] = 'הצגת תמונות ממקור ידוע';
 $labels['prettydate'] = 'תאריכים מעוצבים';
 $labels['addtoaddressbook'] = 'הוספה לפנקס כתובות';
 $labels['sun'] = 'יום א';
diff --git a/program/localization/hr_HR/labels.inc b/program/localization/hr_HR/labels.inc
index 2639ad3..bd7bbf9 100644
--- a/program/localization/hr_HR/labels.inc
+++ b/program/localization/hr_HR/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'Veličina datoteke';
 $labels['preferhtml'] = 'HTML format u prednosti';
 $labels['htmlmessage'] = 'HTML format poruke';
-$labels['showknownimages'] = 'Prikaži poruke od poznatih pošiljatelja';
 $labels['prettydate'] = 'Formatiran datum';
 $labels['addtoaddressbook'] = 'Dodaj u imenik';
 $labels['sun'] = 'Ned';
diff --git a/program/localization/hu_HU/labels.inc b/program/localization/hu_HU/labels.inc
index 58b69b8..397a98c 100644
--- a/program/localization/hu_HU/labels.inc
+++ b/program/localization/hu_HU/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'File mérete';
 $labels['preferhtml'] = 'HTML megjelenítés';
 $labels['htmlmessage'] = 'HTML üzenet';
-$labels['showknownimages'] = 'Képek megjelenítése ismert Feladó esetén';
 $labels['prettydate'] = 'Rövid dátumok';
 $labels['addtoaddressbook'] = 'Hozzáadás a címjegyzékhez';
 $labels['sun'] = 'Vas';
diff --git a/program/localization/id_ID/labels.inc b/program/localization/id_ID/labels.inc
index 91ca85f..de2f0e3 100644
--- a/program/localization/id_ID/labels.inc
+++ b/program/localization/id_ID/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'Ukuran berkas';
 $labels['preferhtml'] = 'Lebih suka HTML';
 $labels['htmlmessage'] = 'Pesan HTML';
-$labels['showknownimages'] = 'Tampilakn gambar dari pengirim yang dikenal';
 $labels['prettydate'] = 'Tanggal cantik';
 $labels['addtoaddressbook'] = 'Tambahkan ke buku tamu';
 $labels['sun'] = 'Min';
diff --git a/program/localization/it_IT/labels.inc b/program/localization/it_IT/labels.inc
index 7036e9e..33c3d83 100644
--- a/program/localization/it_IT/labels.inc
+++ b/program/localization/it_IT/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Dimensione file';
 $labels['preferhtml'] = 'Mostra HTML';
 $labels['htmlmessage'] = 'Messaggio HTML';
-$labels['showknownimages'] = 'Mostra immagini da mittenti conosciuti';
 $labels['prettydate'] = 'Date più leggibili';
 $labels['addtoaddressbook'] = 'Aggiungi alla rubrica';
 $labels['sun'] = 'Dom';
diff --git a/program/localization/ja_JP/labels.inc b/program/localization/ja_JP/labels.inc
index 62405e1..93e8602 100644
--- a/program/localization/ja_JP/labels.inc
+++ b/program/localization/ja_JP/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'ファイルサイズ';
 $labels['preferhtml'] = 'HTMLを表示';
 $labels['htmlmessage'] = 'HTMLメール';
-$labels['showknownimages'] = ' 登録済み送信者の画像を表示';
 $labels['prettydate'] = '簡易な日付表示';
 $labels['addtoaddressbook'] = 'アドレス帳に追加';
 $labels['sun'] = '日';
diff --git a/program/localization/lt_LT/labels.inc b/program/localization/lt_LT/labels.inc
index 2a05db8..0781595 100644
--- a/program/localization/lt_LT/labels.inc
+++ b/program/localization/lt_LT/labels.inc
@@ -52,7 +52,6 @@
 $labels['filesize'] = 'Bylos dydis';
 $labels['preferhtml'] = 'Rodyti HTML';
 $labels['htmlmessage'] = 'HTML Laiškas';
-$labels['showknownimages'] = 'Rodyti žinomų siuntėjų paveikslėlius';
 $labels['prettydate'] = 'Gražios datos';
 $labels['addtoaddressbook'] = 'Įtraukti į adresų knygą';
 $labels['sun'] = 'Sek';
diff --git a/program/localization/mk_MK/labels.inc b/program/localization/mk_MK/labels.inc
index b86b7ca..c796e57 100755
--- a/program/localization/mk_MK/labels.inc
+++ b/program/localization/mk_MK/labels.inc
@@ -51,7 +51,6 @@
 $labels['filesize'] = 'Големина на датотеката';
 $labels['preferhtml'] = 'Прикажи во HTML';
 $labels['htmlmessage'] = 'HTML Порака';
-$labels['showknownimages'] = 'Прикажи ги сликите од непознат праќач';
 $labels['prettydate'] = 'Убави дати';
 $labels['addtoaddressbook'] = 'Додади во именик';
 $labels['sun'] = 'Нед';
diff --git a/program/localization/nl_NL/labels.inc b/program/localization/nl_NL/labels.inc
index 0c4851f..034bfd1 100644
--- a/program/localization/nl_NL/labels.inc
+++ b/program/localization/nl_NL/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Bestandsgrootte';
 $labels['preferhtml'] = 'Toon HTML';
 $labels['htmlmessage'] = 'HTML-Bericht';
-$labels['showknownimages'] = 'Toon afbeeldingen van bekende afzenders';
 $labels['prettydate'] = 'Gebruiksvriendelijke data';
 $labels['addtoaddressbook'] = 'Toevoegen aan adresboek';
 $labels['sun'] = 'Zo';
diff --git a/program/localization/nn_NO/labels.inc b/program/localization/nn_NO/labels.inc
index f131945..414ca53 100644
--- a/program/localization/nn_NO/labels.inc
+++ b/program/localization/nn_NO/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Filstorleik';
 $labels['preferhtml'] = 'Føretrekk HTML';
 $labels['htmlmessage'] = 'HTML-melding';
-$labels['showknownimages'] = 'Vis bilete frå kjende sendarar';
 $labels['prettydate'] = 'Pene datoar';
 $labels['addtoaddressbook'] = 'Legg til i adressebok';
 $labels['sun'] = 'Sun';
diff --git a/program/localization/pl_PL/labels.inc b/program/localization/pl_PL/labels.inc
index 0d0727b..495c6e2 100644
--- a/program/localization/pl_PL/labels.inc
+++ b/program/localization/pl_PL/labels.inc
@@ -57,7 +57,9 @@
 $labels['filesize'] = 'Rozmiar pliku';
 $labels['preferhtml'] = 'Domyślny HTML';
 $labels['htmlmessage'] = 'Wiadomość HTML';
-$labels['showknownimages'] = 'Wyświetlaj obrazki od znanych nadawców';
+$labels['showremoteimages'] = 'Wyświetlaj obrazki w wiadomościach';
+$labels['fromknownsenders'] = 'od znanych nadawców';
+$labels['always'] = 'zawsze';
 $labels['prettydate'] = 'Ładne daty';
 $labels['showinlineimages'] = 'Wyświetlaj załączone obrazki pod treścią wiadomości';
 $labels['messagesdisplaying'] = 'Wyświetlanie wiadomości';
diff --git a/program/localization/pt_BR/labels.inc b/program/localization/pt_BR/labels.inc
index 9e05ac8..c7f5c8c 100644
--- a/program/localization/pt_BR/labels.inc
+++ b/program/localization/pt_BR/labels.inc
@@ -70,7 +70,6 @@
 
 $labels['preferhtml'] = 'Exibir mensagens em HTML';
 $labels['htmlmessage'] = 'Mensagem HTML';
-$labels['showknownimages'] = 'Exibir imagens de remetentes conhecidos';
 $labels['prettydate'] = 'Exibir datas amigáveis';
 
 $labels['addtoaddressbook'] = 'Incluir no catálogo de endereços';
diff --git a/program/localization/pt_PT/labels.inc b/program/localization/pt_PT/labels.inc
index 9e7c6ee..28d94ad 100644
--- a/program/localization/pt_PT/labels.inc
+++ b/program/localization/pt_PT/labels.inc
@@ -55,7 +55,6 @@
 $labels['filesize'] = 'Tamanho';
 $labels['preferhtml'] = 'Prefere HTML';
 $labels['htmlmessage'] = 'Mensagem HTML';
-$labels['showknownimages'] = 'Mostrar imagens de remetentes conhecidos';
 $labels['prettydate'] = 'Formatar datas';
 $labels['addtoaddressbook'] = 'Adicionar à lista de contactos';
 $labels['sun'] = 'Dom';
diff --git a/program/localization/ru_RU/labels.inc b/program/localization/ru_RU/labels.inc
index d18f6a6..23a0319 100644
--- a/program/localization/ru_RU/labels.inc
+++ b/program/localization/ru_RU/labels.inc
@@ -54,7 +54,6 @@
 $labels['filesize'] = 'Размер файла';
 $labels['preferhtml'] = 'Предпочитать HTML';
 $labels['htmlmessage'] = 'Сообщение HTML';
-$labels['showknownimages'] = 'Показывать изображения от известных отправителей';
 $labels['prettydate'] = 'Красивые даты';
 $labels['addtoaddressbook'] = 'Добавить в контакты';
 $labels['sun'] = 'Вс';
diff --git a/program/localization/sk_SK/labels.inc b/program/localization/sk_SK/labels.inc
index 764c9a3..edbd655 100644
--- a/program/localization/sk_SK/labels.inc
+++ b/program/localization/sk_SK/labels.inc
@@ -54,7 +54,6 @@
 $labels['filesize'] = 'Veľkosť súboru';
 $labels['preferhtml'] = 'Uprednostniť HTML zobrazenie';
 $labels['htmlmessage'] = 'HTML správa';
-$labels['showknownimages'] = 'Zobraziť obrázky v správach od známych odosielateľov';
 $labels['prettydate'] = 'Krajší dátum';
 $labels['addtoaddressbook'] = 'Pridať do adresára';
 $labels['sun'] = 'Ne';
diff --git a/program/localization/tr_TR/labels.inc b/program/localization/tr_TR/labels.inc
index 62b251e..d7da2e0 100644
--- a/program/localization/tr_TR/labels.inc
+++ b/program/localization/tr_TR/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = 'Dosya Boyutu';
 $labels['preferhtml'] = 'HTML görüntüle';
 $labels['htmlmessage'] = 'HTML Posta';
-$labels['showknownimages'] = 'Bilinen göndericilerden gelen resimleri göster';
 $labels['prettydate'] = 'Tarihi kısaltarak göster';
 $labels['addtoaddressbook'] = 'Adres Defterine Ekle';
 $labels['sun'] = 'Paz';
diff --git a/program/localization/zh_CN/labels.inc b/program/localization/zh_CN/labels.inc
index bbcc68a..d1766b7 100644
--- a/program/localization/zh_CN/labels.inc
+++ b/program/localization/zh_CN/labels.inc
@@ -53,7 +53,6 @@
 $labels['filesize'] = '文件大小';
 $labels['preferhtml'] = '以 HTML 格式显示';
 $labels['htmlmessage'] = 'HTML 邮件';
-$labels['showknownimages'] = '显示已知的发件人的邮件中的图片';
 $labels['prettydate'] = '短日期格式';
 $labels['addtoaddressbook'] = '添加到通讯录';
 $labels['sun'] = '日';
diff --git a/program/localization/zh_TW/labels.inc b/program/localization/zh_TW/labels.inc
index 25e48a3..e6b108d 100644
--- a/program/localization/zh_TW/labels.inc
+++ b/program/localization/zh_TW/labels.inc
@@ -68,7 +68,6 @@
 
 $labels['preferhtml'] = '使用 HTML 顯示';
 $labels['htmlmessage'] = 'HTML 郵件';
-$labels['showknownimages'] = '已知的寄件者顯示圖片';
 $labels['prettydate'] = '簡短日期顯示';
 
 $labels['addtoaddressbook'] = '新增至通訊錄';
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 89da3b1..99eeb39 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -42,15 +42,22 @@
     
   $mbox_name = $IMAP->get_mailbox_name();
   
-  // check known senders to display images
-  if (!$MESSAGE->is_safe 
-      && !empty($MESSAGE->sender['mailto'])
-      && $RCMAIL->config->get('addrbook_show_images')
-      && $MESSAGE->has_html_part()) {
-    $CONTACTS = new rcube_contacts($DB, $_SESSION['user_id']);
-    
-    if ($CONTACTS->search('email', $MESSAGE->sender['mailto'], true, false)->count) {
-      $MESSAGE->set_safe(true);
+  // show images?
+  $show_images = $RCMAIL->config->get('show_images');
+  if(!$MESSAGE->is_safe
+	&& !empty($show_images)
+	&& $MESSAGE->has_html_part())
+  {
+    switch($show_images) {
+      case '1': // known senders only
+        $CONTACTS = new rcube_contacts($DB, $_SESSION['user_id']);
+	if ($CONTACTS->search('email', $MESSAGE->sender['mailto'], true, false)->count) {
+          $MESSAGE->set_safe(true);
+	  }
+      break;
+      case '2': // always
+        $MESSAGE->set_safe(true);
+      break;
     }
   }
 
@@ -204,7 +211,7 @@
   $msg .= html::a(array('href' => "#loadimages", 'onclick' => JS_OBJECT_NAME.".command('load-images')"), Q(rcube_label('showimages')));
   
   // add link to save sender in addressbook and reload message
-  if ($MESSAGE->sender['mailto'] && $RCMAIL->config->get('addrbook_show_images')) {
+  if ($MESSAGE->sender['mailto'] && $RCMAIL->config->get('show_images') == 1) {
     $msg .= ' ' . html::a(array('href' => "#alwaysload", 'onclick' => JS_OBJECT_NAME.".command('always-load')", 'style' => "white-space:nowrap"),
       Q(rcube_label(array('name' => 'alwaysshow', 'vars' => array('sender' => $MESSAGE->sender['mailto'])))));
   }
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 6a158b9..e25a187 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -210,14 +210,15 @@
     $table->add(null, $input_preferhtml->show($config['prefer_html']?1:0));
   }
 
-  // show checkbox for displaying images from people in the addressbook
-  if (!isset($no_override['addrbook_show_images'])) {
-    $field_id = 'rcmfd_addrbook_show_images';
-    $input_addrbook_show_images = new html_checkbox(array('name' => '_addrbook_show_images', 'id' => $field_id,
-      'value' => 1, 'disabled' => $config['prefer_html']?0:1));
+  if (!isset($no_override['show_images'])) {
+    $field_id = 'rcmfd_show_images';
+    $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id));
+    $input_show_images->add(rcube_label('never'), 0);
+    $input_show_images->add(rcube_label('fromknownsenders'), 1);
+    $input_show_images->add(rcube_label('always'), 2);
 
-    $table->add('title', html::label($field_id, Q(rcube_label('showknownimages'))));
-    $table->add(null, $input_addrbook_show_images->show($config['addrbook_show_images']?1:0));
+    $table->add('title', html::label($field_id, Q(rcube_label('showremoteimages'))));
+    $table->add(null, $input_show_images->show($config['show_images']));
   }
 
   if (!isset($no_override['inline_images'])) {
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 023ffff..09cf63d 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -26,7 +26,6 @@
   'pagesize'     => is_numeric($_POST['_pagesize']) ? max(2, intval($_POST['_pagesize'])) : $CONFIG['pagesize'],
   'prettydate'   => isset($_POST['_pretty_date']) ? TRUE : FALSE,
   'prefer_html'  => isset($_POST['_prefer_html']) ? TRUE : FALSE,
-  'addrbook_show_images' => isset($_POST['_addrbook_show_images']) ? TRUE : FALSE,
   'htmleditor'   => isset($_POST['_htmleditor']) ? TRUE : FALSE,
   'inline_images'   => isset($_POST['_inline_images']) ? TRUE : FALSE,
   'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE,
@@ -37,6 +36,7 @@
   'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE,
   'logout_expunge' => isset($_POST['_logout_expunge']) ? TRUE : FALSE,
   'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0,
+  'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0,
   'keep_alive' => isset($_POST['_keep_alive']) ? intval($_POST['_keep_alive'])*60 : $CONFIG['keep_alive'],
   'check_all_folders' => isset($_POST['_check_all_folders']) ? TRUE : FALSE,
   'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0,
@@ -87,9 +87,9 @@
       $a_user_prefs['keep_alive'] = min($CONFIG['session_lifetime']*60, $a_user_prefs['keep_alive']);
 }
 
+
 if ($USER->save_prefs($a_user_prefs))
   $OUTPUT->show_message('successfullysaved', 'confirmation');
-
 
 // go to next step
 rcmail_overwrite_action('preferences');

--
Gitblit v1.9.1