本文整理汇总了PHP中Release::getAssocList方法的典型用法代码示例。如果您正苦于以下问题:PHP Release::getAssocList方法的具体用法?PHP Release::getAssocList怎么用?PHP Release::getAssocList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Release
的用法示例。
在下文中一共展示了Release::getAssocList方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
if (count($item) == 1) {
$email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($item[0]), $item[0]);
$tpl->assign(array('issue_summary' => $email_details['sup_subject'], 'issue_description' => $email_details['seb_body']));
// also auto pre-fill the customer contact text fields
if (CRM::hasCustomerIntegration($prj_id)) {
$sender_email = Mail_Helper::getEmailAddress($email_details['sup_from']);
try {
$contact = $crm->getContactByEmail($sender_email);
$tpl->assign('contact_details', $contact->getDetails());
} catch (CRMException $e) {
}
}
}
}
}
$tpl->assign(array('cats' => Category::getAssocList($prj_id), 'priorities' => Priority::getAssocList($prj_id), 'severities' => Severity::getList($prj_id), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'releases' => Release::getAssocList($prj_id), 'custom_fields' => Custom_Field::getListByProject($prj_id, 'report_form'), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'max_attachment_bytes' => Attachment::getMaxAttachmentSize(true), 'field_display_settings' => Project::getFieldDisplaySettings($prj_id), 'groups' => Group::getAssocList($prj_id), 'products' => Product::getList(false)));
$prefs = Prefs::get($usr_id);
$tpl->assign('user_prefs', $prefs);
$tpl->assign('zones', Date_Helper::getTimezoneList());
if (Auth::getCurrentRole() == User::getRoleID('Customer')) {
$crm = CRM::getInstance(Auth::getCurrentProject());
$customer_contact_id = User::getCustomerContactID($usr_id);
$contact = $crm->getContact($customer_contact_id);
$customer_id = Auth::getCurrentCustomerID();
$customer = $crm->getCustomer($customer_id);
// TODOCRM: Pull contacts via ajax when user selects contract
$tpl->assign(array('customer_id' => $customer_id, 'contact_id' => $customer_contact_id, 'customer' => $customer, 'contact' => $contact));
}
$clone_iss_id = isset($_GET['clone_iss_id']) ? (int) $_GET['clone_iss_id'] : null;
if ($clone_iss_id && Access::canCloneIssue($clone_iss_id, $usr_id)) {
$tpl->assign(Issue::getCloneIssueTemplateVariables($clone_iss_id));
示例2: elseif
} elseif (!Issue::canAccess($issue_id, $usr_id)) {
$tpl->assign("auth_user", 'denied');
} else {
$associated_projects = @array_keys(Project::getAssocList($usr_id));
if (empty($details) || $details['iss_prj_id'] != $prj_id) {
$tpl->assign('issue', '');
} else {
// check if the requested issue is a part of one of the projects
// associated with this user
if (!@in_array($details['iss_prj_id'], $associated_projects)) {
$tpl->assign("auth_customer", 'denied');
} else {
$options = Issue::saveSearchParams();
$sides = Issue::getSides($issue_id, $options);
// check if scheduled release should be displayed
$releases = Release::getAssocList($prj_id);
if (count($releases) > 0) {
$show_releases = 1;
} else {
$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)));
示例3: array
// customers should not be able to see this page
$role_id = Auth::getCurrentRole();
if ($role_id < User::getRoleID('Standard User')) {
Auth::redirect(APP_RELATIVE_URL . "list.php");
}
$prj_id = Auth::getCurrentProject();
// generate options for assign list. If there are groups and user is above a customer, include groups
$groups = Group::getAssocList($prj_id);
$users = Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer'));
$assign_options = array("" => "Any", "-1" => "un-assigned", "-2" => "myself and un-assigned");
if (User::getGroupID(Auth::getUserID()) != '') {
$assign_options['-3'] = 'myself and my group';
$assign_options['-4'] = 'myself, un-assigned and my group';
}
if (count($groups) > 0 && $role_id > User::getRoleID("Customer")) {
foreach ($groups as $grp_id => $grp_name) {
$assign_options["grp:{$grp_id}"] = "Group: " . $grp_name;
}
}
$assign_options += $users;
$tpl->assign(array("cats" => Category::getAssocList($prj_id), "priorities" => Priority::getList($prj_id), "status" => Status::getAssocStatusList($prj_id), "users" => $assign_options, "releases" => Release::getAssocList($prj_id, TRUE), "custom" => Filter::getListing($prj_id), "custom_fields" => Custom_Field::getListByProject($prj_id, ''), "reporters" => Project::getReporters($prj_id)));
if (!empty($HTTP_GET_VARS["custom_id"])) {
$check_perm = true;
if (Filter::isGlobal($HTTP_GET_VARS["custom_id"])) {
if ($role_id >= User::getRoleID('Manager')) {
$check_perm = false;
}
}
$tpl->assign("options", Filter::getDetails($HTTP_GET_VARS["custom_id"], $check_perm));
}
$tpl->displayTemplate();
示例4: getAssocRelease
/**
* Method used to get an associative array of the list of releases and the
* total number of issues associated with each of them.
*
* @access public
* @return array List of releases
*/
function getAssocRelease()
{
$prj_id = Auth::getCurrentProject();
$list = Release::getAssocList($prj_id);
$stats = array();
foreach ($list as $pre_id => $pre_title) {
$stmt = "SELECT\n COUNT(*) AS total_items\n FROM\n " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue\n WHERE\n iss_prj_id={$prj_id} AND\n iss_pre_id=" . $pre_id;
$res = (int) $GLOBALS["db_api"]->dbh->getOne($stmt);
if ($res > 0) {
$stats[$pre_title] = $res;
}
}
arsort($stats);
return $stats;
}
示例5: base64_encode
$tpl->assign('csv_data', base64_encode(@$list['csv']));
$tpl->assign('match_modes', Search::getMatchModes());
$tpl->assign('supports_excerpts', Search::doesBackendSupportExcerpts());
$tpl->assign('columns', Display_Column::getColumnsToDisplay($prj_id, 'list_issues'));
$tpl->assign('priorities', Priority::getAssocList($prj_id));
$tpl->assign('severities', Severity::getAssocList($prj_id));
$tpl->assign('status', Status::getAssocStatusList($prj_id));
$tpl->assign('assign_options', $assign_options);
$tpl->assign('custom', Filter::getAssocList($prj_id));
$tpl->assign('csts', Filter::getListing(true));
$tpl->assign('active_filters', Filter::getActiveFilters($options));
$tpl->assign('categories', Category::getAssocList($prj_id));
$tpl->assign('releases', Release::getAssocList($prj_id, true));
$tpl->assign('reporters', Project::getReporters($prj_id));
$tpl->assign(array('products' => Product::getAssocList(false)));
$prefs = Prefs::get($usr_id);
$tpl->assign('refresh_rate', $prefs['list_refresh_rate'] * 60);
$tpl->assign('refresh_page', 'list.php');
// items needed for bulk update tool
if (Auth::getCurrentRole() > User::getRoleID('Developer')) {
$tpl->assign('users', $users);
if (Workflow::hasWorkflowIntegration($prj_id)) {
$open_statuses = Workflow::getAllowedStatuses($prj_id);
} else {
$open_statuses = Status::getAssocStatusList($prj_id, false);
}
$tpl->assign('open_status', $open_statuses);
$tpl->assign('closed_status', Status::getClosedAssocList($prj_id));
$tpl->assign('available_releases', Release::getAssocList($prj_id));
}
$tpl->displayTemplate();
示例6: array
// generate options for assign list. If there are groups and user is above a customer, include groups
$groups = Group::getAssocList($prj_id);
$users = Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer'));
$assign_options = array('' => ev_gettext('Any'), '-1' => ev_gettext('un-assigned'), '-2' => ev_gettext('myself and un-assigned'));
if (Auth::isAnonUser()) {
unset($assign_options['-2']);
} elseif (User::getGroupID(Auth::getUserID()) != '') {
$assign_options['-3'] = ev_gettext('myself and my group');
$assign_options['-4'] = ev_gettext('myself, un-assigned and my group');
}
if (count($groups) > 0 && $role_id > User::getRoleID('Customer')) {
foreach ($groups as $grp_id => $grp_name) {
$assign_options["grp:{$grp_id}"] = 'Group: ' . $grp_name;
}
}
$assign_options += $users;
$tpl->assign(array('cats' => Category::getAssocList($prj_id), 'priorities' => Priority::getList($prj_id), 'severities' => Severity::getList($prj_id), 'status' => Status::getAssocStatusList($prj_id), 'users' => $assign_options, 'releases' => Release::getAssocList($prj_id, true), 'custom' => Filter::getListing($prj_id), 'custom_fields' => Custom_Field::getListByProject($prj_id, ''), 'reporters' => Project::getReporters($prj_id), 'products' => Product::getAssocList(false)));
if (!empty($_GET['custom_id'])) {
$check_perm = true;
if (Filter::isGlobal($_GET['custom_id'])) {
if ($role_id >= User::getRoleID('Manager')) {
$check_perm = false;
}
}
$options = Filter::getDetails($_GET['custom_id'], $check_perm);
} else {
$options = array();
$options['cst_rows'] = APP_DEFAULT_PAGER_SIZE;
}
$tpl->assign('options', $options);
$tpl->displayTemplate();
示例7: getAssocRelease
/**
* Method used to get an associative array of the list of releases and the
* total number of issues associated with each of them.
*
* @param boolean $hide_closed If closed issues should be hidden.
* @return array List of releases
*/
public static function getAssocRelease($hide_closed = true)
{
$prj_id = Auth::getCurrentProject();
$list = Release::getAssocList($prj_id);
$stats = array();
foreach ($list as $pre_id => $pre_title) {
$stmt = 'SELECT
COUNT(*) AS total_items
FROM
{{%issue}},
{{%status}}
WHERE
iss_sta_id = sta_id AND
iss_prj_id=? AND
iss_pre_id=?';
if ($hide_closed) {
$stmt .= ' AND
sta_is_closed = 0';
}
$res = (int) DB_Helper::getInstance()->getOne($stmt, array($prj_id, $pre_id));
if ($res > 0) {
$stats[$pre_title] = $res;
}
}
arsort($stats);
return $stats;
}
示例8: list
}
// if we are dealing with just one message, use the subject line as the
// summary for the issue, and the body as the description
if (count($HTTP_GET_VARS["item"]) == 1) {
$email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($HTTP_GET_VARS["item"][0]), $HTTP_GET_VARS["item"][0]);
$tpl->assign(array('issue_summary' => $email_details['sup_subject'], 'issue_description' => $email_details['message']));
// also auto pre-fill the customer contact text fields
if (Customer::hasCustomerIntegration($prj_id)) {
$sender_email = Mail_API::getEmailAddress($email_details['sup_from']);
list(, $contact_id) = Customer::getCustomerIDByEmails($prj_id, array($sender_email));
if (!empty($contact_id)) {
$tpl->assign("contact_details", Customer::getContactDetails($prj_id, $contact_id));
}
}
}
}
}
$tpl->assign(array("cats" => Category::getAssocList($prj_id), "priorities" => Priority::getAssocList($prj_id), "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "releases" => Release::getAssocList($prj_id), "custom_fields" => Custom_Field::getListByProject($prj_id, 'report_form'), "max_attachment_size" => Attachment::getMaxAttachmentSize(), "field_display_settings" => Project::getFieldDisplaySettings($prj_id), "groups" => Group::getAssocList($prj_id)));
$setup = Setup::load();
$tpl->assign("allow_unassigned_issues", @$setup["allow_unassigned_issues"]);
$prefs = Prefs::get($usr_id);
$tpl->assign("user_prefs", $prefs);
$tpl->assign("zones", Date_API::getTimezoneList());
if (User::getRole(Auth::getCurrentRole()) == "Customer") {
$customer_contact_id = User::getCustomerContactID($usr_id);
$tpl->assign("contact_details", Customer::getContactDetails($prj_id, $customer_contact_id));
$customer_id = User::getCustomerID($usr_id);
$tpl->assign("contacts", Customer::getContactEmailAssocList($prj_id, $customer_id));
$tpl->assign(array("customer_id" => User::getCustomerID($usr_id), "contact_id" => User::getCustomerContactID($usr_id)));
}
$tpl->displayTemplate();