Server IP : 23.254.227.96 / Your IP : 216.73.216.7 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/root/usr/local/cwpsrv/var/services/roundcube/program/steps/mail/ |
Upload File : |
<?php /** +-----------------------------------------------------------------------+ | This file is part of the Roundcube Webmail client | | | | Copyright (C) The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | | | | PURPOSE: | | Check all mailboxes for unread messages and update GUI | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli <roundcube@gmail.com> | +-----------------------------------------------------------------------+ */ $a_folders = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail'); if (!empty($a_folders)) { $current = $RCMAIL->storage->get_folder(); $inbox = ($current == 'INBOX'); $trash = $RCMAIL->config->get('trash_mbox'); $check_all = (bool)$RCMAIL->config->get('check_all_folders'); foreach ($a_folders as $mbox) { $unseen_old = rcmail_get_unseen_count($mbox); if (!$check_all && $unseen_old !== null && $mbox != $current) { $unseen = $unseen_old; } else { $unseen = $RCMAIL->storage->count($mbox, 'UNSEEN', $unseen_old === null); } // call it always for current folder, so it can update counter // after possible message status change when opening a message // not in preview frame if ($unseen || $unseen_old === null || $mbox == $current) { $OUTPUT->command('set_unread_count', $mbox, $unseen, $inbox && $mbox_row == 'INBOX'); } rcmail_set_unseen_count($mbox, $unseen); // set trash folder state if ($mbox === $trash) { $OUTPUT->command('set_trash_count', $RCMAIL->storage->count($mbox, 'EXISTS')); } } } $OUTPUT->send();