function oa_notification_skip in Open Atrium Notifications 7.2
Return whether notification should be skipped.
Notifications can be disabled for the session or for a single page load. Set the session value to disable it for a session (directly) or pass TRUE to this function for just this page load.
Parameters
$value: (optional) Set whether notification should be skipped for this page load.
Return value
TRUE if notifications should skipped for this page load FALSE if notifications are enabled.
7 calls to oa_notification_skip()
- oa_notifications_form_submit in ./
oa_notifications.module - Submit handler for node edit form to save notification values Only executes on node ADD form (new nodes)
- oa_notifications_get_notifications in ./
oa_notifications.module - Return the resolved list of all users to be notified on a piece of content.
- oa_notifications_node_insert in ./
oa_notifications.module - Implements hook_node_insert().
- oa_notifications_node_update in ./
oa_notifications.module - Implements hook_node_update().
- oa_notifications_reset in ./
oa_notifications.module - Reset any notification flag saved in session.
File
- ./
oa_notifications.module, line 1142
Code
function oa_notification_skip($value = NULL) {
$skip =& drupal_static(__FUNCTION__, FALSE);
if (isset($value)) {
$skip = $value;
if (drupal_session_started()) {
if ($value) {
$_SESSION[SKIP_FLAG] = $value;
}
elseif (isset($_SESSION[SKIP_FLAG])) {
unset($_SESSION[SKIP_FLAG]);
}
}
}
return $skip || !empty($_SESSION[SKIP_FLAG]);
}