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])
66 SELECT object_reference.ref_id FROM object_reference, tree, object_data
67 WHERE tree.parent = %s
68 AND object_data.type = %s
69 AND object_reference.ref_id = tree.child
70 AND object_reference.obj_id = object_data.obj_id',
71 array(
'integer',
'text'),
72 array(SYSTEM_FOLDER_ID,
'mail'));
106 if(isset(self::$global_mail_services_cache[self::CACHE_TYPE_NEW_MAILS][$usr_id]) &&
107 null !== self::$global_mail_services_cache[self::CACHE_TYPE_NEW_MAILS][$usr_id])
114 SELECT COUNT(mail_id) cnt FROM mail
118 array(
'integer',
'integer',
'text'),
119 array(
'0', $usr_id,
'unread'));
124 SELECT COUNT(mail_id) cnt FROM mail m,mail_obj_data mo
125 WHERE m.user_id = mo.user_id
126 AND m.folder_id = mo.obj_id
129 AND m.m_status = %s',
130 array(
'text',
'integer',
'text'),
131 array(
'inbox', $usr_id,
'unread'));
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