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


PHP Support::getSequenceByID方法代码示例

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


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

示例1: getExcerpts

 public function getExcerpts()
 {
     if (count($this->matches) < 1) {
         return false;
     }
     $excerpt_options = array('query_mode' => $this->match_mode, 'before_match' => $this->excerpt_placeholder . '-before', 'after_match' => $this->excerpt_placeholder . '-after', 'allow_empty' => true);
     $excerpts = array();
     foreach ($this->matches as $issue_id => $matches) {
         $excerpt = array('issue' => array(), 'email' => array(), 'phone' => array(), 'note' => array());
         foreach ($matches as $match) {
             if ($match['index'] == 'issue') {
                 $issue = Issue::getDetails($issue_id);
                 $documents = array($issue['iss_summary']);
                 $res = $this->sphinx->BuildExcerpts($documents, 'issue_stemmed', $this->keywords, $excerpt_options);
                 if ($res[0] != $issue['iss_summary']) {
                     $excerpt['issue']['summary'] = self::cleanUpExcerpt($res[0]);
                 }
                 $documents = array($issue['iss_original_description']);
                 $res = $this->sphinx->BuildExcerpts($documents, 'issue_stemmed', $this->keywords, $excerpt_options);
                 if ($res[0] != $issue['iss_original_description']) {
                     $excerpt['issue']['description'] = self::cleanUpExcerpt($res[0]);
                     error_log(print_r($excerpt['issue']['description'], 1));
                 }
             } elseif ($match['index'] == 'email') {
                 $email = Support::getEmailDetails(null, $match['match_id']);
                 $documents = array($email['sup_subject'] . "\n" . $email['message']);
                 $res = $this->sphinx->BuildExcerpts($documents, 'email_stemmed', $this->keywords, $excerpt_options);
                 $excerpt['email'][Support::getSequenceByID($match['match_id'])] = self::cleanUpExcerpt($res[0]);
             } elseif ($match['index'] == 'phone') {
                 $phone_call = Phone_Support::getDetails($match['match_id']);
                 $documents = array($phone_call['phs_description']);
                 $res = $this->sphinx->BuildExcerpts($documents, 'phonesupport_stemmed', $this->keywords, $excerpt_options);
                 $excerpt['phone'][] = self::cleanUpExcerpt($res[0]);
             } elseif ($match['index'] == 'note') {
                 $note = Note::getDetails($match['match_id']);
                 $documents = array($note['not_title'] . "\n" . $note['not_note']);
                 $res = $this->sphinx->BuildExcerpts($documents, 'note_stemmed', $this->keywords, $excerpt_options);
                 $note_seq = Note::getNoteSequenceNumber($issue_id, $match['match_id']);
                 $excerpt['note'][$note_seq] = self::cleanUpExcerpt($res[0]);
             }
         }
         foreach ($excerpt as $key => $val) {
             if (count($val) < 1) {
                 unset($excerpt[$key]);
             }
         }
         $excerpts[$issue_id] = $excerpt;
     }
     return $excerpts;
 }
开发者ID:korusdipl,项目名称:eventum,代码行数:50,代码来源:class.sphinx_fulltext_search.php

示例2: dirname

// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com>                             |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$usr_id = Auth::getUserID();
$prj_id = Auth::getCurrentProject();
$tpl = new Template_Helper();
$tpl->setTemplate('view_email.tpl.html');
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$issue_id = Support::getIssueFromEmail($_GET['id']);
if ($issue_id != 0 && !Issue::canAccess($issue_id, $usr_id) || $issue_id == 0 && User::getRoleByUser($usr_id, $prj_id) < User::ROLE_USER) {
    $tpl->setTemplate('permission_denied.tpl.html');
    $tpl->displayTemplate();
    exit;
}
$email = Support::getEmailDetails($_GET['ema_id'], $_GET['id']);
$email['seb_body'] = str_replace('&amp;nbsp;', '&nbsp;', $email['seb_body']);
$tpl->assign(array('email' => $email, 'issue_id' => $issue_id, 'extra_title' => ev_gettext('Issue #%1$s Email #%3$s: %2$s', $issue_id, $email['sup_subject'], Support::getSequenceByID($_GET['id'])), 'email_accounts' => Email_Account::getAssocList(array_keys(Project::getAssocList(Auth::getUserID())), true), 'recipients' => Mail_Queue::getMessageRecipients(array('customer_email', 'other_email'), $_GET['id'])));
if (@$_GET['cat'] == 'list_emails') {
    $sides = Support::getListingSides($_GET['id']);
    $tpl->assign(array('previous' => $sides['previous'], 'next' => $sides['next']));
} elseif (@$_GET['cat'] == 'move_email' && Auth::getCurrentRole() >= User::getRoleID('Standard User')) {
    $res = Support::moveEmail(@$_GET['id'], @$_GET['ema_id'], @$_GET['new_ema_id']);
    $tpl->assign('move_email_result', $res);
    $tpl->assign('current_user_prefs', Prefs::get(Auth::getUserID()));
} else {
    $sides = Support::getIssueSides($issue_id, $_GET['id']);
    $tpl->assign(array('previous' => $sides['previous'], 'next' => $sides['next']));
}
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:view_email.php


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