Changeset 5860 in subversion
- Timestamp:
- Feb 7, 2012 4:42:51 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/release-0.7/plugins/newmail_notifier/newmail_notifier.php
r5452 r5860 4 4 * New Mail Notifier plugin 5 5 * 6 * Supports t womethods of notification:6 * Supports three methods of notification: 7 7 * 1. Basic - focus browser window and change favicon 8 8 * 2. Sound - play wav file … … 10 10 * supported by Chrome and Firefox with 'HTML5 Notifications' plugin) 11 11 * 12 * @version 0. 312 * @version 0.4 13 13 * @author Aleksander Machniak <alec@alec.pl> 14 14 * … … 133 133 function notify($args) 134 134 { 135 // Already notified or non-automatic check 135 136 if ($this->notified || !empty($_GET['_refresh'])) { 136 137 return $args; 138 } 139 140 // Get folders to skip checking for 141 if (empty($this->exceptions)) { 142 $this->delimiter = $this->rc->imap->get_hierarchy_delimiter(); 143 foreach (array('drafts_mbox', 'sent_mbox') as $folder) { 144 $folder = $this->rc->config->get($folder); 145 if (strlen($folder) && $folder != 'INBOX') { 146 $this->exceptions[] = $folder; 147 } 148 } 149 } 150 151 $mbox = $args['mailbox']; 152 153 // Skip exception (sent/drafts) folders (and their subfolders) 154 foreach ($this->exceptions as $folder) { 155 if (strpos($mbox.$this->delimiter, $folder.$this->delimiter) === 0) { 156 return $args; 157 } 137 158 } 138 159
Note: See TracChangeset
for help on using the changeset viewer.
