Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]Displaying multiple messages with the same content for a given a… #1106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions lib/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,6 @@ public function module_is_supported($name) {
return in_array(strtolower($name), $this->config->get_modules(true), true);
}

public function save_hm_msgs() {
$msgs = Hm_Msgs::get();
if (!empty($msgs)) {
Hm_Msgs::flush();
$this->session->secure_cookie($this->request, 'hm_msgs', base64_encode(json_encode($msgs)));
}
}

/**
* Handler modules need to override this method to do work
Expand Down
3 changes: 2 additions & 1 deletion modules/core/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ var Hm_Ajax_Request = function() { return {
Hm_Ajax.err_condition = false;
Hm_Notices.hide(true);
}
if (res.router_user_msgs && !$.isEmptyObject(res.router_user_msgs)) {
if (res.router_user_msgs && !$.isEmptyObject(res.router_user_msgs)) {
var hm_msg = Hm_Utils.json_encode(res.router_user_msgs);
Hm_Notices.show(res.router_user_msgs);
}
if (res.folder_status) {
Expand Down
1 change: 0 additions & 1 deletion modules/github/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public function process() {
else {
Hm_Msgs::add('ERRAn Error Occurred');
}
$this->save_hm_msgs();
Hm_Dispatch::page_redirect('?page=servers');
}
}
Expand Down
6 changes: 0 additions & 6 deletions modules/imap/handler_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,6 @@ public function process() {
elseif (count($moved) == 0) {
Hm_Msgs::add('ERRUnable to move/copy selected messages');
}
if ($form['imap_move_action'] == 'move' && $form['imap_move_page'] == 'message') {
$this->save_hm_msgs();
}
$this->out('move_count', $moved);
}
}
Expand Down Expand Up @@ -875,7 +872,6 @@ public function process() {
Hm_Msgs::add('Message deleted');
$this->out('imap_delete_error', false);
}
$this->save_hm_msgs();
}
}
}
Expand Down Expand Up @@ -940,7 +936,6 @@ public function process() {
Hm_Msgs::add('ERRAn error occurred archiving the message');
}
}
$this->save_hm_msgs();
}
}

Expand Down Expand Up @@ -1020,7 +1015,6 @@ public function process() {
$msg = 'ERRFailed to snooze selected messages';
}
Hm_Msgs::add($msg);
$this->save_hm_msgs();
}
}

Expand Down
2 changes: 0 additions & 2 deletions modules/nux/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ public function process() {
else {
Hm_Msgs::add('ERRAn Error Occurred');
}
$this->save_hm_msgs();
Hm_Dispatch::page_redirect('?page=servers');
}
}
Expand Down Expand Up @@ -196,7 +195,6 @@ public function process() {
$this->session->record_unsaved('SMTP server added');
$this->session->secure_cookie($this->request, 'hm_reload_folders', '1');
Hm_Msgs::add('E-mail account successfully added');
$this->save_hm_msgs();
$this->session->close_early();
$this->out('nux_account_added', true);
if ($this->module_is_supported('imap_folders')) {
Expand Down
1 change: 0 additions & 1 deletion modules/wordpress/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ public function process() {
else {
Hm_Msgs::add('ERRAn Error Occured');
}
$this->save_hm_msgs();
Hm_Dispatch::page_redirect('?page=servers');
}
}
Expand Down