Skip to content

Commit

Permalink
Trigger 'refresh' hook in mail view
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascube committed Mar 10, 2013
1 parent 8b77164 commit 65de001
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions program/steps/mail/check_recent.inc
Expand Up @@ -115,4 +115,7 @@ foreach ($a_mailboxes as $mbox_name) {
}
}

// trigger refresh hook
$RCMAIL->plugins->exec_hook('refresh', array());

$OUTPUT->send();

3 comments on commit 65de001

@alecpl
Copy link
Member

@alecpl alecpl commented on 65de001 Mar 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good finding, but maybe would be better to move the code calling refresh in index.php a little bit earlier, e.g. before reading func.inc file, so exec_hook() here wouldn't be needed.

@thomascube
Copy link
Member Author

@thomascube thomascube commented on 65de001 Mar 10, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alecpl
Copy link
Member

@alecpl alecpl commented on 65de001 Mar 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, your solution works, but... The problem is (was) that line 294 in index.php is not executed because of $OUTPUT->send() at the end of check_recent.inc file. So, another solution is to exec refresh hook (in index.php) before execution is stopped by any action. The third option is to remove $OUTPUT->send() in check_recent.inc.

Please sign in to comment.