-
Notifications
You must be signed in to change notification settings - Fork 194
fix(other): fix some GitHub module issues #1739
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1317,6 +1317,10 @@ public function process() { | |
| $folders = array_map(function($ds) { return $ds['folder']; }, $data_sources); | ||
| } | ||
|
|
||
| if (empty($ids)) { | ||
| return; | ||
| } | ||
|
|
||
| list($sort, $reverse) = process_sort_arg($this->request->get['sort'], $this->user_config->get('default_sort_order_setting', 'arrival')); | ||
|
|
||
| if (isset($this->request->post['list_path'])) { | ||
|
|
@@ -1363,6 +1367,9 @@ public function process() { | |
| foreach ($ids as $key => $id) { | ||
| $details = Hm_IMAP_List::dump($id); | ||
| $mailbox = Hm_IMAP_List::get_connected_mailbox($id, $this->cache); | ||
| if (!$mailbox) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like we are masking a deeper problem. Why would the mailbox be not present? If there is a problem connecting or something else, we should send feedback to the user, at least. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Let me investigate more deeper about this ! |
||
| continue; | ||
| } | ||
| if($this->get('list_path') == 'snoozed' && !$mailbox->folder_exists('Snoozed')) { | ||
| continue; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method outputs some data which other modules expect to use. If you return early, that output data will not be available. What is the problem of ids being empty? The code that follows should just work and output some empty/default data.