diff --git a/contrib/webserver/piler-nginx.conf b/contrib/webserver/piler-nginx.conf index 062cce54..c6fd503f 100644 --- a/contrib/webserver/piler-nginx.conf +++ b/contrib/webserver/piler-nginx.conf @@ -44,6 +44,7 @@ server { rewrite /audit-helper.php /index.php?route=audit/helper; rewrite /message.php /index.php?route=message/view; rewrite /bulkrestore.php /index.php?route=message/bulkrestore; + rewrite /bulkremove.php /index.php?route=message/bulkremove; rewrite /bulkpdf.php /index.php?route=message/bulkpdf; rewrite /folders.php /index.php?route=folder/list&; rewrite /settings.php /index.php?route=user/settings; diff --git a/webui/.htaccess b/webui/.htaccess index 80f90d0a..6213a948 100644 --- a/webui/.htaccess +++ b/webui/.htaccess @@ -8,6 +8,7 @@ RewriteRule ^search-helper.php /index.php?route=search/helper [L] RewriteRule ^audit-helper.php /index.php?route=audit/helper [L] RewriteRule ^message.php /index.php?route=message/view [L] RewriteRule ^bulkrestore.php /index.php?route=message/bulkrestore [L] +RewriteRule ^bulkremove.php /index.php?route=message/bulkremove [L] RewriteRule ^bulkpdf.php /index.php?route=message/bulkpdf [L] RewriteRule ^folders.php /index.php?route=folder/list& [QSA,L] RewriteRule ^settings.php /index.php?route=user/settings [L] diff --git a/webui/config.php b/webui/config.php index 5a0a42ae..505e81aa 100644 --- a/webui/config.php +++ b/webui/config.php @@ -144,6 +144,7 @@ $config['MEMCACHED_ENABLED'] = 0; $config['PASSWORD_CHANGE_ENABLED'] = 0; $config['ENABLE_STATISTICS'] = 1; $config['ENABLE_HISTORY'] = 1; +$config['ENABLE_DELETE'] = 0; $config['ENABLE_REMOTE_IMAGES'] = '0'; $config['ENABLE_ON_THE_FLY_VERIFICATION'] = 0; $config['ENABLE_LDAP_IMPORT_FEATURE'] = 0; diff --git a/webui/controller/message/bulkremove.php b/webui/controller/message/bulkremove.php new file mode 100644 index 00000000..50fd1716 --- /dev/null +++ b/webui/controller/message/bulkremove.php @@ -0,0 +1,55 @@ +id = "content"; + $this->template = "message/bulkremove.tpl"; + $this->layout = "common/layout-empty"; + + $session = Registry::get('session'); + $request = Registry::get('request'); + $db = Registry::get('db'); + + $this->load->model('search/search'); + $this->load->model('search/message'); + //$this->load->model('message/remove'); + + $this->load->model('user/user'); + + + $this->document->title = $this->data['text_message']; + + if(!isset($this->request->post['idlist']) || $this->request->post['idlist'] == '') { die("no idlist parameter given"); } + + $idlist = $this->model_search_search->check_your_permission_by_id_list(explode(",", $this->request->post['idlist'])); + + + $this->data['username'] = Registry::get('username'); + + $this->model_search_message->connect_to_pilergetd(); + + foreach($idlist as $id) { + + AUDIT(ACTION_REMOVE_MESSAGE, '', '', $id, ''); + + $piler_id = $this->model_search_message->get_piler_id_by_id($id); + +syslog(LOG_INFO, "removing $piler_id"); + + $x = 1; + + if($x == 1) { $this->data['removed']++; } + } + + $this->model_search_message->disconnect_from_pilergetd(); + + $this->render(); + } + + +} + +?> diff --git a/webui/language/de/messages.php b/webui/language/de/messages.php index 19e0334c..7c595c34 100644 --- a/webui/language/de/messages.php +++ b/webui/language/de/messages.php @@ -483,4 +483,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses"; $_['text_storage'] = "Storage"; $_['text_legal_hold'] = "Legal hold"; +$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!'; + ?> diff --git a/webui/language/en/messages.php b/webui/language/en/messages.php index a1f59e6c..ea4cbdac 100644 --- a/webui/language/en/messages.php +++ b/webui/language/en/messages.php @@ -479,4 +479,6 @@ $_['text_ldap_delete_confirm_message'] = 'Do you wish to delete the LDAP entry'; $_['text_customer_delete_confirm_message'] = 'Do you wish to delete the customer'; $_['text_with_selected'] = 'With Selected'; +$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!'; + ?> diff --git a/webui/language/es/messages.php b/webui/language/es/messages.php index fe68e1f1..7eefacf4 100644 --- a/webui/language/es/messages.php +++ b/webui/language/es/messages.php @@ -482,4 +482,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses"; $_['text_storage'] = "Storage"; $_['text_legal_hold'] = "Legal hold"; +$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!'; + ?> diff --git a/webui/language/fr/messages.php b/webui/language/fr/messages.php index 6b5df0ea..2ae1c4aa 100644 --- a/webui/language/fr/messages.php +++ b/webui/language/fr/messages.php @@ -479,4 +479,6 @@ $_['text_with_selected'] = 'Selection'; $_['text_storage'] = "Stockage"; $_['text_legal_hold'] = "Legal hold"; +$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!'; + ?> diff --git a/webui/language/hu/messages.iso-8859-2.php b/webui/language/hu/messages.iso-8859-2.php index 39a4a8fc..314fab2f 100644 --- a/webui/language/hu/messages.iso-8859-2.php +++ b/webui/language/hu/messages.iso-8859-2.php @@ -481,4 +481,6 @@ $_['text_ldap_delete_confirm_message'] = 'T $_['text_customer_delete_confirm_message'] = 'Törölni akarja az ügyfelet'; $_['text_with_selected'] = 'Kiválasztott levelek'; +$_['text_compliance_warning'] = 'A törlés funkció engedélyezett, ezért az archívum NEM teljesíti a megfelelőséget!'; + ?> diff --git a/webui/language/hu/messages.php b/webui/language/hu/messages.php index 6d8fefc7..352bac59 100644 --- a/webui/language/hu/messages.php +++ b/webui/language/hu/messages.php @@ -481,4 +481,6 @@ $_['text_ldap_delete_confirm_message'] = 'Törölni akarja az LDAP bejegyzĂ©st'; $_['text_customer_delete_confirm_message'] = 'Törölni akarja az ĂĽgyfelet'; $_['text_with_selected'] = 'Kiválasztott levelek'; +$_['text_compliance_warning'] = 'A törlĂ©s funkciĂł engedĂ©lyezett, ezĂ©rt az archĂ­vum NEM teljesĂ­ti a megfelelĹ‘sĂ©get!'; + ?> diff --git a/webui/language/pt/messages.php b/webui/language/pt/messages.php index 13fbfe0a..7281cd44 100644 --- a/webui/language/pt/messages.php +++ b/webui/language/pt/messages.php @@ -472,4 +472,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses"; $_['text_storage'] = "Storage"; $_['text_legal_hold'] = "Legal hold"; +$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!'; + ?> diff --git a/webui/language/ru/messages.php b/webui/language/ru/messages.php index e22220ee..a7cb622f 100644 --- a/webui/language/ru/messages.php +++ b/webui/language/ru/messages.php @@ -480,4 +480,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses"; $_['text_storage'] = "Storage"; $_['text_legal_hold'] = "Legal hold"; +$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!'; + ?> diff --git a/webui/language/tr/messages.php b/webui/language/tr/messages.php index 28ab75f7..74bb6fae 100644 --- a/webui/language/tr/messages.php +++ b/webui/language/tr/messages.php @@ -480,4 +480,6 @@ $_['text_assigned_email_addresses'] = "Assigned email addresses"; $_['text_storage'] = "Storage"; $_['text_legal_hold'] = "Legal hold"; +$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!'; + ?> diff --git a/webui/view/javascript/piler-in.js b/webui/view/javascript/piler-in.js index 0dc28104..db1c65ce 100644 --- a/webui/view/javascript/piler-in.js +++ b/webui/view/javascript/piler-in.js @@ -340,6 +340,27 @@ var Piler = }, + bulk_remove_messages:function(msg) + { + Piler.log("[bulk_remove_messages]"); + + Piler.poor_mans_keepalive_for_dummy_browsers(); + + var idlist = Piler.get_selected_messages_list(); + + if(!idlist) return; + + jQuery.ajax('/bulkremove.php', { + data: { idlist: idlist }, + type: "POST" + }) + .done( function( a ) {}) + .fail(function( a, b ) { alert("Problem retrieving XML data:" + b) }); + + Piler.show_message('messagebox1', msg, 0.8); + }, + + bulk_restore_messages:function(msg, email) { Piler.log("[bulk_restore_messages]", email); diff --git a/webui/view/theme/default/templates/common/layout-search.tpl b/webui/view/theme/default/templates/common/layout-search.tpl index 96ab08ae..2417696f 100644 --- a/webui/view/theme/default/templates/common/layout-search.tpl +++ b/webui/view/theme/default/templates/common/layout-search.tpl @@ -72,7 +72,7 @@
- + style="background: #faafbe;" />
diff --git a/webui/view/theme/default/templates/login/login.tpl b/webui/view/theme/default/templates/login/login.tpl index ad853b4d..3f0b58d4 100644 --- a/webui/view/theme/default/templates/login/login.tpl +++ b/webui/view/theme/default/templates/login/login.tpl @@ -57,6 +57,10 @@

+ +

+ +

diff --git a/webui/view/theme/default/templates/message/bulkremove.tpl b/webui/view/theme/default/templates/message/bulkremove.tpl new file mode 100644 index 00000000..0cc39555 --- /dev/null +++ b/webui/view/theme/default/templates/message/bulkremove.tpl @@ -0,0 +1 @@ +

:

diff --git a/webui/view/theme/default/templates/search/helper.tpl b/webui/view/theme/default/templates/search/helper.tpl index 3a234009..fa251769 100644 --- a/webui/view/theme/default/templates/search/helper.tpl +++ b/webui/view/theme/default/templates/search/helper.tpl @@ -132,9 +132,12 @@   + +
+
@@ -150,6 +153,7 @@ " onclick="Piler.bulk_restore_messages('', '');" title=""> +
diff --git a/webui/view/theme/mobile/templates/common/layout-search.tpl b/webui/view/theme/mobile/templates/common/layout-search.tpl index 2f730134..cf9ad8d3 100644 --- a/webui/view/theme/mobile/templates/common/layout-search.tpl +++ b/webui/view/theme/mobile/templates/common/layout-search.tpl @@ -71,7 +71,7 @@ - + style="background: #faafbe;" /> diff --git a/webui/view/theme/mobile/templates/login/login.tpl b/webui/view/theme/mobile/templates/login/login.tpl index 30581a78..cb9398e7 100644 --- a/webui/view/theme/mobile/templates/login/login.tpl +++ b/webui/view/theme/mobile/templates/login/login.tpl @@ -60,6 +60,10 @@

+ +

+ +

diff --git a/webui/view/theme/mobile/templates/message/bulkremove.tpl b/webui/view/theme/mobile/templates/message/bulkremove.tpl new file mode 100644 index 00000000..0cc39555 --- /dev/null +++ b/webui/view/theme/mobile/templates/message/bulkremove.tpl @@ -0,0 +1 @@ +

:

diff --git a/webui/view/theme/mobile/templates/search/helper.tpl b/webui/view/theme/mobile/templates/search/helper.tpl index c9835e9f..f9a25172 100644 --- a/webui/view/theme/mobile/templates/search/helper.tpl +++ b/webui/view/theme/mobile/templates/search/helper.tpl @@ -115,6 +115,8 @@ + +