56 if (isset(self::$global_mail_services_cache[self::CACHE_TYPE_REF_ID]) &&
57 null !== self::$global_mail_services_cache[self::CACHE_TYPE_REF_ID]) {
62 if (!MAIL_SETTINGS_ID) {
65 SELECT object_reference.ref_id FROM object_reference, tree, object_data
66 WHERE tree.parent = %s
67 AND object_data.type = %s
68 AND object_reference.ref_id = tree.child
69 AND object_reference.obj_id = object_data.obj_id',
70 array(
'integer',
'text'),
71 array(SYSTEM_FOLDER_ID,
'mail')
103 isset(self::$global_mail_services_cache[self::CACHE_TYPE_NEW_MAILS][$usr_id]) &&
104 null !== self::$global_mail_services_cache[self::CACHE_TYPE_NEW_MAILS][$usr_id]) {
110 SELECT COUNT(mail_id) cnt FROM mail
114 array(
'integer',
'integer',
'text'),
115 array(
'0', $usr_id,
'unread')
122 SELECT COUNT(mail_id) cnt FROM mail m,mail_obj_data mo
123 WHERE m.user_id = mo.user_id
124 AND m.folder_id = mo.obj_id
127 AND m.m_status = %s',
128 array(
'text',
'integer',
'text'),
129 array(
'inbox', $usr_id,
'unread')
132 $row2 =
$DIC->database()->fetchAssoc(
$res);
An exception for terminatinating execution or to throw for unit testing.
Class for global mail information (e.g.
static getMailObjectRefId()
Determines the reference id of the mail object and stores this information in a local cache variable.
static getNumberOfNewMailsByUserId($usr_id)
Determines the number of new mails for the passed user id and stores this information in a local cach...
const CACHE_TYPE_NEW_MAILS
static $global_mail_services_cache
foreach($_POST as $key=> $value) $res