Aleksander Machniak
2012-12-07 8b748de4ec5e48c7cc0e3f4942669c369710830e
Plugin API: add 'check_recent' hook with possibility to control folders list used on check-recent action
1 files modified
7 ■■■■ changed files
program/steps/mail/check_recent.inc 7 ●●●● patch | view | raw | blame | history
program/steps/mail/check_recent.inc
@@ -34,9 +34,14 @@
}
else {
    $a_mailboxes = (array) $current;
    if ($a_mailboxes[0] != 'INBOX')
    if ($current != 'INBOX') {
        $a_mailboxes[] = 'INBOX';
}
}
// Control folders list from a plugin
$plugin      = $RCMAIL->plugins->exec_hook('check_recent', array('folders' => $a_mailboxes, 'all' => $check_all));
$a_mailboxes = $plugin['folders'];
// check recent/unseen counts
foreach ($a_mailboxes as $mbox_name) {