当前位置: 首页>>代码示例>>PHP>>正文


PHP Notification::getSubscribers方法代码示例

本文整理汇总了PHP中Notification::getSubscribers方法的典型用法代码示例。如果您正苦于以下问题:PHP Notification::getSubscribers方法的具体用法?PHP Notification::getSubscribers怎么用?PHP Notification::getSubscribers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Notification的用法示例。


在下文中一共展示了Notification::getSubscribers方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isset

if ($cat == 'reply') {
    $details = Issue::getReplyDetails($_GET['issue_id']);
    if ($details != '') {
        $header = Misc::formatReplyPreamble($details['created_date_ts'], $details['reporter']);
        $details['seb_body'] = $header . Misc::formatReply($details['description']);
        $details['sup_from'] = Mail_Helper::getFormattedName($details['reporter'], $details['reporter_email']);
        $tpl->assign(array('email' => $details, 'parent_email_id' => 0, 'extra_title' => 'Issue #' . $_GET['issue_id'] . ': Reply'));
    }
}
if (!empty($issue_id)) {
    // list the available statuses
    $tpl->assign('statuses', Status::getAssocStatusList($prj_id, false));
    $tpl->assign('current_issue_status', Issue::getStatusID($issue_id));
    // set if the current user is allowed to send emails on this issue or not
    $sender_details = User::getDetails($usr_id);
    $tpl->assign('can_send_email', Support::isAllowedToEmail($issue_id, $sender_details['usr_email']));
    $tpl->assign('subscribers', Notification::getSubscribers($issue_id, 'emails'));
}
if (!empty($_GET['ema_id']) || !empty($_POST['ema_id'])) {
    $ema_id = isset($_GET['ema_id']) ? (int) $_GET['ema_id'] : (isset($_POST['ema_id']) ? (int) $_POST['ema_id'] : null);
    $tpl->assign('ema_id', $ema_id);
}
$user_prefs = Prefs::get($usr_id);
// list of users to display in the lookup field in the To: and Cc: fields
$t = Project::getAddressBook($prj_id, $issue_id);
$tpl->assign(array('from' => User::getFromHeader($usr_id), 'assoc_users' => $t, 'assoc_emails' => array_keys($t), 'canned_responses' => Email_Response::getAssocList($prj_id), 'js_canned_responses' => Email_Response::getAssocListBodies($prj_id), 'current_user_prefs' => $user_prefs, 'issue_access' => Access::getIssueAccessArray($issue_id, $usr_id), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'max_attachment_bytes' => Attachment::getMaxAttachmentSize(true)));
// don't add signature if it already exists. Note: This won't handle multiple user duplicate sigs.
if (@(!empty($draft['emd_body'])) && $user_prefs['auto_append_email_sig'] == 1 && strpos($draft['emd_body'], $user_prefs['email_signature']) !== false) {
    $tpl->assign('body_has_sig_already', 1);
}
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:send.php

示例2: elseif

    if (!@empty($HTTP_POST_VARS['new_status'])) {
        $res = Issue::setStatus($issue_id, $HTTP_POST_VARS['new_status']);
        if ($res != -1) {
            $new_status = Status::getStatusTitle($HTTP_POST_VARS['new_status']);
            History::add($issue_id, $usr_id, History::getTypeID('status_changed'), "Status changed to '{$new_status}' by " . User::getFullName($usr_id));
        }
    }
    $res = Note::insert($usr_id, $issue_id);
    $tpl->assign("post_result", $res);
    // enter the time tracking entry about this phone support entry
    if (!empty($HTTP_POST_VARS['time_spent'])) {
        $HTTP_POST_VARS['issue_id'] = $issue_id;
        $HTTP_POST_VARS['category'] = $HTTP_POST_VARS['time_category'];
        $HTTP_POST_VARS['summary'] = 'Time entry inserted when sending an internal note.';
        Time_Tracking::insertEntry();
    }
} elseif (@$HTTP_GET_VARS["cat"] == "reply") {
    if (!@empty($HTTP_GET_VARS["id"])) {
        $note = Note::getDetails($HTTP_GET_VARS["id"]);
        $date = Misc::formatReplyDate($note["timestamp"]);
        $header = "\n\n\nOn {$date}, " . $note["not_from"] . " wrote:\n>\n";
        $note["not_body"] = $header . Misc::formatReply($note["not_note"]);
        $tpl->bulkAssign(array("note" => $note, "parent_note_id" => $HTTP_GET_VARS["id"]));
        $reply_subject = Mail_API::removeExcessRe($note['not_title']);
    }
}
if (empty($reply_subject)) {
    $reply_subject = 'Re: ' . $details['iss_summary'];
}
$tpl->assign(array('from' => User::getFromHeader($usr_id), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'current_user_prefs' => Prefs::get($usr_id), 'subscribers' => Notification::getSubscribers($issue_id, false, User::getRoleID("Standard User")), 'statuses' => Status::getAssocStatusList($prj_id, false), 'current_issue_status' => Issue::getStatusID($issue_id), 'time_categories' => Time_Tracking::getAssocCategories(), 'note_category_id' => Time_Tracking::getCategoryID('Note Discussion'), 'reply_subject' => $reply_subject));
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:post_note.php

示例3: isset

$issue_id = isset($_POST['issue_id']) ? (int) $_POST['issue_id'] : (isset($_GET['id']) ? (int) $_GET['id'] : null);
$tpl->assign('extra_title', "Close Issue #{$issue_id}");
$tpl->assign('user_prefs', Prefs::get($usr_id));
if (!Issue::exists($issue_id, false)) {
    $tpl->assign('no_issue', true);
    $tpl->displayTemplate();
    exit;
} elseif ($role_id == User::getRoleID('customer') || !Issue::canAccess($issue_id, $usr_id)) {
    $tpl->assign('auth_customer', 'denied');
    $tpl->displayTemplate();
    exit;
}
$details = Issue::getDetails($issue_id);
$notification_list = Notification::getSubscribers($issue_id, 'closed');
$tpl->assign('notification_list_all', $notification_list['all']);
$notification_list_internal = Notification::getSubscribers($issue_id, 'closed', User::getRoleID('Standard User'));
$tpl->assign('notification_list_internal', $notification_list_internal['all']);
$cat = isset($_REQUEST['cat']) ? (string) $_REQUEST['cat'] : null;
if ($cat == 'close') {
    Custom_Field::updateValues();
    $res = Issue::close(Auth::getUserID(), $issue_id, $_REQUEST['send_notification'], $_REQUEST['resolution'], $_REQUEST['status'], $_REQUEST['reason'], @$_REQUEST['notification_list']);
    if (!empty($_POST['time_spent'])) {
        $date = (array) $_POST['date'];
        $ttc_id = (int) $_POST['category'];
        $iss_id = (int) $_POST['issue_id'];
        $time_spent = (int) $_POST['time_spent'];
        $summary = 'Time entry inserted when closing issue.';
        Time_Tracking::addTimeEntry($iss_id, $ttc_id, $time_spent, $date, $summary);
    }
    if (CRM::hasCustomerIntegration($prj_id) && isset($details['contract'])) {
        $crm = CRM::getInstance($prj_id);
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:close.php

示例4:

     $show_releases = 0;
 }
 // get if categories should be displayed
 $cats = Category::getList($prj_id);
 if (count($cats) > 0) {
     $show_category = 1;
 } else {
     $show_category = 0;
 }
 $cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE);
 if (!empty($auto_switched_from)) {
     $tpl->assign(array("project_auto_switched" => 1, "old_project" => Project::getName($auto_switched_from)));
 }
 $setup = Setup::load();
 $tpl->assign("allow_unassigned_issues", @$setup["allow_unassigned_issues"]);
 $tpl->assign(array('next_issue' => @$sides['next'], 'previous_issue' => @$sides['previous'], 'subscribers' => Notification::getSubscribers($issue_id), 'custom_fields' => Custom_Field::getListByIssue($prj_id, $issue_id), 'files' => Attachment::getList($issue_id), 'emails' => Support::getEmailsByIssue($issue_id), 'zones' => Date_API::getTimezoneList(), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'ema_id' => Email_Account::getEmailAccount(), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'show_releases' => $show_releases, 'show_category' => $show_category, 'categories' => Category::getAssocList($prj_id), 'quarantine' => Issue::getQuarantineInfo($issue_id)));
 if ($role_id != User::getRoleID('customer')) {
     if (@$_REQUEST['show_all_drafts'] == 1) {
         $show_all_drafts = true;
     } else {
         $show_all_drafts = false;
     }
     if (Workflow::hasWorkflowIntegration($prj_id)) {
         $statuses = Workflow::getAllowedStatuses($prj_id, $issue_id);
         // if currently selected release is not on list, go ahead and add it.
     } else {
         $statuses = Status::getAssocStatusList($prj_id);
     }
     if (!empty($details['iss_sta_id']) && empty($statuses[$details['iss_sta_id']])) {
         $statuses[$details['iss_sta_id']] = Status::getStatusTitle($details['iss_sta_id']);
     }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:view.php

示例5: array

if (!isset($issue_fields_display['percent_complete']) || $issue_fields_display['percent_complete'] != false) {
    $columns[0][] = array('title' => ev_gettext('Percentage Complete'), 'data' => (empty($details['iss_percent_complete']) ? 0 : $details['iss_percent_complete']) . '%', 'field' => 'percentage_complete');
}
$columns[0][] = array('title' => ev_gettext('Reporter'), 'field' => 'reporter');
$products = Product::getAssocList(false);
if (count($products) > 0) {
    $columns[0][] = array('title' => ev_gettext('Product'), 'field' => 'product');
    $columns[0][] = array('title' => ev_gettext('Product Version'), 'field' => 'product_version');
}
$columns[0][] = array('title' => ev_gettext('Assignment'), 'data' => $details['assignments'], 'field' => 'assignment');
$columns[1][] = array('title' => ev_gettext('Notification List'), 'field' => 'notification_list');
$columns[1][] = array('title' => ev_gettext('Submitted Date'), 'data' => $details['iss_created_date']);
$columns[1][] = array('title' => ev_gettext('Last Updated Date'), 'data' => $details['iss_updated_date']);
$columns[1][] = array('title' => ev_gettext('Associated Issues'), 'field' => 'associated_issues');
if (!isset($issue_fields_display['expected_resolution']) || $issue_fields_display['expected_resolution'] != false) {
    $columns[1][] = array('title' => ev_gettext('Expected Resolution Date'), 'field' => 'expected_resolution');
}
if (!isset($issue_fields_display['estimated_dev_time']) || $issue_fields_display['estimated_dev_time'] != false) {
    $columns[1][] = array('title' => ev_gettext('Estimated Dev. Time'), 'data' => $details['iss_dev_time'] . empty($details['iss_dev_time']) ? '' : ' hours', 'field' => 'estimated_dev_time');
}
if ($role_id > User::getRoleID('Customer')) {
    $columns[1][] = array('title' => ev_gettext('Duplicates'), 'field' => 'duplicates', 'title_bgcolor' => APP_INTERNAL_COLOR);
    $columns[1][] = array('title' => ev_gettext('Authorized Repliers'), 'field' => 'authorized_repliers', 'title_bgcolor' => APP_INTERNAL_COLOR);
}
$groups = Group::getAssocList($prj_id);
if ($role_id > User::getRoleID('Customer') && count($groups) > 0) {
    $columns[1][] = array('title' => ev_gettext('Group'), 'data' => isset($details['group']) ? $details['group']['grp_name'] : '', 'title_bgcolor' => APP_INTERNAL_COLOR);
}
$tpl->assign(array('subscribers' => Notification::getSubscribers($issue_id), 'categories' => $categories, 'priorities' => $priorities, 'severities' => $severities, 'status' => $statuses, 'releases' => $releases, 'resolutions' => Resolution::getAssocList(), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'one_week_ts' => time() + 7 * Date_Helper::DAY, 'groups' => Group::getAssocList($prj_id), 'current_year' => date('Y'), 'products' => Product::getList(false), 'grid' => $columns));
$tpl->assign('usr_role_id', User::getRoleByUser($usr_id, $prj_id));
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:update.php

示例6: array

 $columns[1][] = array('title' => ev_gettext('Associated Issues'), 'field' => 'associated_issues');
 if (!isset($issue_fields_display['expected_resolution']) || $issue_fields_display['expected_resolution'] != false) {
     $columns[1][] = array('title' => ev_gettext('Expected Resolution Date'), 'field' => 'expected_resolution');
 }
 if (!isset($issue_fields_display['estimated_dev_time']) || $issue_fields_display['estimated_dev_time'] != false) {
     $columns[1][] = array('title' => ev_gettext('Estimated Dev. Time'), 'data' => empty($details['iss_dev_time']) ? '' : $details['iss_dev_time'] . ' hours', 'field' => 'estimated_dev_time');
 }
 if ($role_id > User::getRoleID('Customer')) {
     $columns[1][] = array('title' => ev_gettext('Duplicates'), 'field' => 'duplicates', 'title_bgcolor' => APP_INTERNAL_COLOR);
     $columns[1][] = array('title' => ev_gettext('Authorized Repliers'), 'field' => 'authorized_repliers', 'title_bgcolor' => APP_INTERNAL_COLOR);
 }
 $groups = Group::getAssocList($prj_id);
 if ($role_id > User::getRoleID('Customer') && count($groups) > 0) {
     $columns[1][] = array('title' => ev_gettext('Group'), 'data' => isset($details['group']) ? $details['group']['grp_name'] : '', 'title_bgcolor' => APP_INTERNAL_COLOR);
 }
 $tpl->assign(array('next_issue' => @$sides['next'], 'previous_issue' => @$sides['previous'], 'subscribers' => Notification::getSubscribers($issue_id), 'custom_fields' => Custom_Field::getListByIssue($prj_id, $issue_id), 'files' => Attachment::getList($issue_id), 'emails' => Support::getEmailsByIssue($issue_id), 'zones' => Date_Helper::getTimezoneList(), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'ema_id' => Email_Account::getEmailAccount(), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'quarantine' => Issue::getQuarantineInfo($issue_id), 'grid' => $columns, 'can_update' => Issue::canUpdate($issue_id, $usr_id), 'enabled_partners' => Partner::getPartnersByProject($prj_id), 'partners' => Partner::getPartnersByIssue($issue_id), 'issue_access' => Access::getIssueAccessArray($issue_id, $usr_id), 'is_user_notified' => Notification::isUserNotified($issue_id, $usr_id)));
 if ($role_id != User::getRoleID('customer')) {
     if (@$_COOKIE['show_all_drafts'] == 1) {
         $show_all_drafts = true;
     } else {
         $show_all_drafts = false;
     }
     if (Workflow::hasWorkflowIntegration($prj_id)) {
         $statuses = Workflow::getAllowedStatuses($prj_id, $issue_id);
         // if currently selected release is not on list, go ahead and add it.
     } else {
         $statuses = Status::getAssocStatusList($prj_id, false);
     }
     if (!empty($details['iss_sta_id']) && empty($statuses[$details['iss_sta_id']])) {
         $statuses[$details['iss_sta_id']] = Status::getStatusTitle($details['iss_sta_id']);
     }
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:view.php

示例7: array

    if (@$HTTP_POST_VARS["cat"] == "update") {
        $res = Issue::update($HTTP_POST_VARS["issue_id"]);
        $tpl->assign("update_result", $res);
        if (Issue::hasDuplicates($HTTP_POST_VARS["issue_id"])) {
            $tpl->assign("has_duplicates", "yes");
        }
    }
    $prj_id = Auth::getCurrentProject();
    $setup = Setup::load();
    $tpl->assign("allow_unassigned_issues", @$setup["allow_unassigned_issues"]);
    // if currently selected release is in the past, manually add it to list
    $releases = Release::getAssocList($prj_id);
    if ($details["iss_pre_id"] != 0 && empty($releases[$details["iss_pre_id"]])) {
        $releases = array($details["iss_pre_id"] => $details["pre_title"]) + $releases;
    }
    if (Workflow::hasWorkflowIntegration($prj_id)) {
        $statuses = Workflow::getAllowedStatuses($prj_id, $issue_id);
        // if currently selected release is not on list, go ahead and add it.
    } else {
        $statuses = Status::getAssocStatusList($prj_id, false);
    }
    if (!empty($details['iss_sta_id']) && empty($statuses[$details['iss_sta_id']])) {
        $statuses[$details['iss_sta_id']] = Status::getStatusTitle($details['iss_sta_id']);
    }
    $tpl->assign(array("subscribers" => Notification::getSubscribers($issue_id), "categories" => Category::getAssocList($prj_id), "priorities" => Priority::getAssocList($prj_id), "status" => $statuses, "releases" => $releases, "resolutions" => Resolution::getAssocList(), "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "assoc_issues" => array_map("htmlspecialchars", array()), "one_week_ts" => time() + 7 * DAY, "allow_unassigned_issues" => @$setup["allow_unassigned_issues"], "groups" => Group::getAssocList($prj_id)));
    $cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE);
    if (!empty($cookie['auto_switched_from'])) {
        $tpl->assign(array("project_auto_switched" => 1, "old_project" => Project::getName($cookie['auto_switched_from'])));
    }
}
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:update.php


注:本文中的Notification::getSubscribers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。