/** * Just decides whether or not to send in background * @param mixed $to string or array...the type of address (email, task ID, user ID) is specified below * @param integer $to_type type of $to address * @param integer $type type of notification * @param array $data additional info needed for notification * @access public * @return bool */ function send($to, $to_type, $type, $data = array()) { global $fs; $proj = new Project(0); $data['project'] = $proj; $data['notify_type'] = $type; if ($fs->prefs['send_background'] && $to_type != ADDRESS_EMAIL) { return Notifications::send_later($to, $to_type, $type, $data); } else { return Notifications::send_now($to, $to_type, $type, $data); } }