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


PHP Issue::exists方法代码示例

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


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

示例1: GetURI

 public static function GetURI($p_publicationId, $p_languageId, $p_issueNo = null, $p_sectionNo = null, $p_articleNo = null)
 {
     $languageObj = new Language($p_languageId);
     if (!$languageObj->exists()) {
         return new PEAR_Error(getGS('Language does not exist.'));
     }
     $uri = $GLOBALS['Campsite']['SUBDIR'] . '/' . $languageObj->getCode() . '/';
     if (!is_null($p_issueNo) && is_null($p_articleNo)) {
         $issueObj = new Issue($p_publicationId, $p_languageId, $p_issueNo);
         if (!$issueObj->exists()) {
             return new PEAR_Error(getGS('Issue does not exist.'));
         }
         $uri .= $issueObj->getUrlName() . '/';
     }
     if (!is_null($p_sectionNo) && is_null($p_articleNo)) {
         $sectionObj = new Section($p_publicationId, $p_issueNo, $p_languageId, $p_sectionNo);
         if (!$sectionObj->exists()) {
             return new PEAR_Error(getGS('Section does not exist.'));
         }
         $uri .= $sectionObj->getUrlName() . '/';
     }
     if (!is_null($p_articleNo)) {
         $articleObj = new Article($p_languageId, $p_articleNo);
         if (!$articleObj->exists()) {
             return new PEAR_Error(getGS('Article does not exist.'));
         }
         $issueObj = new Issue($p_publicationId, $p_languageId, $articleObj->getIssueNumber());
         $sectionObj = new Section($p_publicationId, $articleObj->getIssueNumber(), $p_languageId, $articleObj->getSectionNumber());
         $uri .= $issueObj->getUrlName() . '/';
         $uri .= $sectionObj->getUrlName() . '/';
         $uri .= $articleObj->getUrlName() . '/';
     }
     return $uri;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:34,代码来源:ShortURL.php

示例2: setIssueAndChanges

 public function setIssueAndChanges(Issue $issue, array $old_values)
 {
     $this->Issue = $issue;
     $this->exists = $issue->exists();
     $this->modified = $issue->getModified();
     $this->old_values = $old_values;
 }
开发者ID:jackbravo,项目名称:amaranto,代码行数:7,代码来源:IssueActivity.class.php

示例3: GetURI

 public static function GetURI($p_publicationId, $p_languageId, $p_issueNo = null, $p_sectionNo = null, $p_articleNo = null)
 {
     $translator = \Zend_Registry::get('container')->getService('translator');
     $languageObj = new Language($p_languageId);
     if (!$languageObj->exists()) {
         return new PEAR_Error($translator->trans('Language does not exist.'));
     }
     $uri = '/' . $languageObj->getCode() . '/';
     if (!is_null($p_issueNo) && is_null($p_articleNo)) {
         $issueObj = new Issue($p_publicationId, $p_languageId, $p_issueNo);
         if (!$issueObj->exists()) {
             return new PEAR_Error($translator->trans('Issue does not exist.'));
         }
         $uri .= $issueObj->getUrlName() . '/';
     }
     if (!is_null($p_sectionNo) && is_null($p_articleNo)) {
         $sectionObj = new Section($p_publicationId, $p_issueNo, $p_languageId, $p_sectionNo);
         if (!$sectionObj->exists()) {
             return new PEAR_Error($translator->trans('Section does not exist.'));
         }
         $uri .= $sectionObj->getUrlName() . '/';
     }
     if (!is_null($p_articleNo)) {
         $articleObj = new Article($p_languageId, $p_articleNo);
         if (!$articleObj->exists()) {
             return new PEAR_Error($translator->trans('Article does not exist.'));
         }
         $issueObj = new Issue($p_publicationId, $p_languageId, $articleObj->getIssueNumber());
         $sectionObj = new Section($p_publicationId, $articleObj->getIssueNumber(), $p_languageId, $articleObj->getSectionNumber());
         $uri .= $issueObj->getUrlName() . '/';
         $uri .= $sectionObj->getUrlName() . '/';
         $uri .= $articleObj->getUrlName() . '/';
     }
     return $uri;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:35,代码来源:ShortURL.php

示例4: validateIssueNumbers

function validateIssueNumbers()
{
    $issues = explode(',', $_REQUEST['values']);
    $check_project = $_REQUEST['check_project'] != 0;
    $exclude_issue = isset($_REQUEST['exclude_issue']) ? $_REQUEST['exclude_issue'] : null;
    $exclude_duplicates = isset($_REQUEST['exclude_duplicates']) ? $_REQUEST['exclude_duplicates'] == 1 : false;
    $bad_issues = array();
    foreach ($issues as $issue_id) {
        if ($issue_id != '' && !Issue::exists($issue_id, $check_project) || $exclude_issue == $issue_id || $exclude_duplicates && Issue::isDuplicate($issue_id)) {
            $bad_issues[] = $issue_id;
        }
    }
    if (count($bad_issues)) {
        return implode(', ', $bad_issues);
    } else {
        return 'ok';
    }
}
开发者ID:korusdipl,项目名称:eventum,代码行数:18,代码来源:validate.php

示例5: getTeamConsistencyErrors

 /**
  * Get consistency errors
  * @param int $teamid
  * @return mixed[]
  */
 private function getTeamConsistencyErrors($teamid)
 {
     if (self::$logger->isDebugEnabled()) {
         self::$logger->debug("getTeamConsistencyErrors teamid={$teamid}");
     }
     // get team projects
     $issueList = TeamCache::getInstance()->getTeam($teamid)->getTeamIssueList(true, false);
     if (self::$logger->isDebugEnabled()) {
         self::$logger->debug("getTeamConsistencyErrors nbIssues=" . count($issueList));
     }
     #$ccheck = new ConsistencyCheck2($issueList);
     $ccheck = new ConsistencyCheck2($issueList, $teamid);
     $cerrList = $ccheck->check();
     $cerrs = NULL;
     if (count($cerrList) > 0) {
         $i = 0;
         foreach ($cerrList as $cerr) {
             $i += 1;
             if (NULL != $cerr->userId) {
                 $user = UserCache::getInstance()->getUser($cerr->userId);
             } else {
                 $user = NULL;
             }
             if (Issue::exists($cerr->bugId)) {
                 $issue = IssueCache::getInstance()->getIssue($cerr->bugId);
                 $summary = $issue->getSummary();
                 $projName = $issue->getProjectName();
                 $refExt = $issue->getTcId();
             } else {
                 $summary = '';
                 $projName = '';
             }
             $cerrs[$i] = array('userName' => isset($user) ? $user->getName() : '', 'issueURL' => NULL == $cerr->bugId ? '' : Tools::issueInfoURL($cerr->bugId, $summary), 'mantisURL' => NULL == $cerr->bugId ? '' : Tools::mantisIssueURL($cerr->bugId, $summary, true), 'extRef' => NULL == $refExt ? '' : $refExt, 'date' => NULL == $cerr->timestamp ? '' : date("Y-m-d", $cerr->timestamp), 'status' => NULL == $cerr->status ? '' : Constants::$statusNames[$cerr->status], 'severity' => $cerr->getLiteralSeverity(), 'project' => $projName, 'desc' => $cerr->desc, 'summary' => $summary);
         }
     }
     return $cerrs;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:42,代码来源:check.php

示例6: Issue

 if (!$publicationObj->exists()) {
     camp_html_display_error(getGS('Publication does not exist.'), $backLink);
     exit;
 }
 $f_issue_number = $articleObj->getIssueNumber();
 $issueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);
 if (!$issueObj->exists()) {
     camp_html_display_error(getGS('No such issue.'), $backLink);
     exit;
 }
 //$translationIssueObj = new Issue($f_publication_id, $f_translation_language, $f_issue_number);
 $translationIssueObj = $issueObj->copy(null, $issueObj->getIssueNumber(), $f_translation_language);
 if (!$translationIssueObj) {
     $translationIssueObj = new Issue($f_publication_id, $f_translation_language, $f_issue_number);
 }
 if (!$translationIssueObj->exists()) {
     if (!$g_user->hasPermission("ManageIssue")) {
         camp_html_add_msg(getGS('An issue must be created for the selected language but you do not have the right to create an issue.'));
         camp_html_goto_page($backLink);
     }
     foreach ($issueObj->getData() as $field => $fieldValue) {
         if ($field != 'IdLanguage') {
             $translationIssueObj->setProperty($field, $fieldValue, false);
         }
     }
     $f_issue_name = Input::Get('f_issue_name', 'string', '');
     if ($f_issue_name != '') {
         $translationIssueObj->setName($f_issue_name);
     }
     $f_issue_urlname = Input::Get('f_issue_urlname', 'string', $issueObj->getUrlName());
     if ($f_issue_urlname == "") {
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:do_translate.php

示例7: putGS

        $displayLanguages[$language->getLanguageId()] = $language->getNativeName();
    }
}
asort($displayLanguages);
foreach ($displayLanguages as $tmpLangId => $nativeName) {
    camp_html_select_option($tmpLangId, $f_language_selected, $nativeName);
}
?>
	</SELECT>
	</TD>
</TR>
<?php 
$canCreate = true;
if ($f_language_selected > 0 && $f_issue_number > 0) {
    // Every article must live inside a cooresponding issue of the same language.
    if (!$translationIssueObj->exists()) {
        if ($g_user->hasPermission("ManageIssue")) {
            // If a section needs to be translated, but the user doesnt have the permission
            // to create a section, then we dont want to display anything here.  Even
            // if they can create the issue, they still need to create a cooresponding section.
            // If they dont have the permission to do that, then no use in creating the issue.
            if ($translationSectionObj->exists() || $g_user->hasPermission("ManageSection")) {
                ?>
<TR>
	<TD colspan="2" align="left" style="padding-left: 40px; padding-right: 40px; padding-top: 20px;"><strong><?php 
                putGS("An issue must be created for the selected language.  Please enter the issue name and URL name.");
                ?>
</strong></TD>
</TR>
<TR>
	<TD ALIGN="RIGHT" ><?php 
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:translate.php

示例8: checkTimetracksOnRemovedIssues

 /**
  * for all timetracks of the team, check that the Mantis issue exist.
  * @return ConsistencyError2[]
  */
 public function checkTimetracksOnRemovedIssues()
 {
     $cerrList = array();
     if (NULL != $this->teamId) {
         $team = TeamCache::getInstance()->getTeam($this->teamId);
         $userList = $team->getMembers();
         $formatedUsers = implode(', ', array_keys($userList));
         $query = "SELECT * " . "FROM `codev_timetracking_table` " . "WHERE date >= " . $team->getDate() . " " . "AND userid IN ({$formatedUsers}) ";
         #"AND    0 = (SELECT COUNT(id) FROM `mantis_bug_table` WHERE id='codev_timetracking_table.bugid' ) ";
         $result = SqlWrapper::getInstance()->sql_query($query);
         if (!$result) {
             echo "<span style='color:red'>ERROR: Query FAILED</span>";
             exit;
         }
         while ($row = SqlWrapper::getInstance()->sql_fetch_object($result)) {
             if (!Issue::exists($row->bugid)) {
                 $cerr = new ConsistencyError2($row->bugid, $row->userid, NULL, $row->date, T_("Timetrack found on a task that does not exist in Mantis DB (duration = {$row->duration})."));
                 $cerr->severity = ConsistencyError2::severity_error;
                 $cerrList[] = $cerr;
             }
         }
     }
     return $cerrList;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:28,代码来源:consistency_check2.class.php

示例9: createIssueFromEmail

 /**
  * Creates a new issue from an email if appropriate. Also returns if this message is related
  * to a previous message.
  *
  * @param   array   $info An array of info about the email account.
  * @param   string  $headers The headers of the email.
  * @param   string  $message_body The body of the message.
  * @param   string  $date The date this message was sent
  * @param   string  $from The name and email address of the sender.
  * @param   string  $subject The subject of this message.
  * @param   array   $to An array of to addresses
  * @param   array   $cc An array of cc addresses
  * @return  array   An array of information about the message
  */
 public function createIssueFromEmail($info, $headers, $message_body, $date, $from, $subject, $to, $cc)
 {
     $should_create_issue = false;
     $issue_id = '';
     $associate_email = '';
     $type = 'email';
     $parent_id = '';
     $customer_id = false;
     $contact_id = false;
     $contract_id = false;
     $severity = false;
     // we can't trust the in-reply-to from the imap c-client, so let's
     // try to manually parse that value from the full headers
     $references = Mail_Helper::getAllReferences($headers);
     $message_id = Mail_Helper::getMessageID($headers, $message_body);
     $workflow = Workflow::getIssueIDforNewEmail($info['ema_prj_id'], $info, $headers, $message_body, $date, $from, $subject, $to, $cc);
     if (is_array($workflow)) {
         if (isset($workflow['customer_id'])) {
             $customer_id = $workflow['customer_id'];
         }
         if (isset($workflow['contract_id'])) {
             $contract_id = $workflow['contract_id'];
         }
         if (isset($workflow['contact_id'])) {
             $contact_id = $workflow['contact_id'];
         }
         if (isset($workflow['severity'])) {
             $severity = $workflow['severity'];
         }
         if (isset($workflow['should_create_issue'])) {
             $should_create_issue = $workflow['should_create_issue'];
         } else {
             $should_create_issue = true;
         }
     } elseif ($workflow == 'new') {
         $should_create_issue = true;
     } elseif (is_numeric($workflow)) {
         $issue_id = $workflow;
     } else {
         $setup = Setup::load();
         if (@$setup['subject_based_routing']['status'] == 'enabled') {
             // Look for issue ID in the subject line
             // look for [#XXXX] in the subject line
             if (preg_match("/\\[#(\\d+)\\]( Note| BLOCKED)*/", $subject, $matches)) {
                 $should_create_issue = false;
                 $issue_id = $matches[1];
                 if (!Issue::exists($issue_id, false)) {
                     $issue_id = '';
                 } elseif (!empty($matches[2])) {
                     $type = 'note';
                 }
             } else {
                 $should_create_issue = true;
             }
         } else {
             // - if this email is a reply:
             if (count($references) > 0) {
                 foreach ($references as $reference_msg_id) {
                     //  -> check if the replied email exists in the database:
                     if (Note::exists($reference_msg_id)) {
                         // note exists
                         // get what issue it belongs too.
                         $issue_id = Note::getIssueByMessageID($reference_msg_id);
                         $should_create_issue = false;
                         $type = 'note';
                         $parent_id = Note::getIDByMessageID($reference_msg_id);
                         break;
                     } elseif (self::exists($reference_msg_id) || Issue::getIssueByRootMessageID($reference_msg_id) != false) {
                         // email or issue exists
                         $issue_id = self::getIssueByMessageID($reference_msg_id);
                         if (empty($issue_id)) {
                             $issue_id = Issue::getIssueByRootMessageID($reference_msg_id);
                         }
                         if (empty($issue_id)) {
                             // parent email isn't associated with issue.
                             //      --> create new issue, associate current email and replied email to this issue
                             $should_create_issue = true;
                             $associate_email = $reference_msg_id;
                         } else {
                             // parent email is associated with issue:
                             //      --> associate current email with existing issue
                             $should_create_issue = false;
                         }
                         break;
                     } else {
                         //  no matching note, email or issue:
//.........这里部分代码省略.........
开发者ID:korusdipl,项目名称:eventum,代码行数:101,代码来源:class.support.php

示例10: dirname

// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 51 Franklin Street, Suite 330                                          |
// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: Raul Raat <raul.raat@delfi.ee>                              |
// | Authors: Elan Ruusamäe <glen@delfi.ee>                               |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../../init.php';
// check login
Auth::checkAuthentication(APP_COOKIE);
$field_name = !empty($_POST['field_name']) ? $_POST['field_name'] : null;
$issue_id = !empty($_POST['issue_id']) ? (int) $_POST['issue_id'] : null;
// check if correct issue id was sent
if (!$issue_id || !Issue::exists($issue_id)) {
    die('Invalid issue_id');
}
$usr_id = Auth::getUserID();
// check if user role is above "Standard User"
if (User::getRoleByUser($usr_id, Issue::getProjectID($issue_id)) < User::getRoleID('Standard User')) {
    die('Forbidden');
}
// check if user can acess the issue
if (!Issue::canAccess($issue_id, $usr_id)) {
    die('Forbidden');
}
switch ($field_name) {
    case 'expected_resolution_date':
        $day = Misc::escapeInteger($_POST['day']);
        $month = Misc::escapeInteger($_POST['month']);
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:update.php

示例11: updateAssociatedIssuesRelations

 /**
  * Update the issue associations
  *
  * @param int $issue_id issue to associate
  * @param array $associated_issues issue_id's to associate with
  */
 private function updateAssociatedIssuesRelations($issue_id, $associated_issues)
 {
     global $errors;
     // trim and remove empty values
     $associated_issues = array_filter(array_map(function ($s) {
         return trim($s);
     }, $associated_issues));
     // make sure all associated issues are valid (and in this project)
     foreach ($associated_issues as $i => $iss_id) {
         if ($iss_id == $issue_id) {
             // skip issue itself
             unset($associated_issues[$i]);
             continue;
         }
         if (!Issue::exists($iss_id, false)) {
             $error = ev_gettext('Issue #%s does not exist and was removed from the list of associated issues.', $iss_id);
             $errors['Associated Issues'][] = $error;
             unset($associated_issues[$i]);
         }
     }
     // this reindexes the array and removes duplicates filled by user
     $associated_issues = array_unique($associated_issues);
     $current = self::getDetails($issue_id);
     $association_diff = Misc::arrayDiff($current['associated_issues'], $associated_issues);
     if (!$association_diff) {
         // no diffs, return back
         return;
     }
     $usr_id = Auth::getUserID();
     // go through the new associations, if association already exists, skip it
     $associations_to_remove = $current['associated_issues'];
     if (count($associated_issues) > 0) {
         foreach ($associated_issues as $associated_id) {
             if (!in_array($associated_id, $current['associated_issues'])) {
                 self::addAssociation($issue_id, $associated_id, $usr_id);
             } else {
                 // already assigned, remove this user from list of issues to remove
                 unset($associations_to_remove[array_search($associated_id, $associations_to_remove)]);
             }
         }
     }
     if ($associations_to_remove) {
         foreach ($associations_to_remove as $associated_id) {
             self::deleteAssociation($issue_id, $associated_id);
         }
     }
 }
开发者ID:korusdipl,项目名称:eventum,代码行数:53,代码来源:class.issue.php

示例12: Issue

}

if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), $_SERVER['REQUEST_URI']);
	exit;
}

$issueObj = new Issue($Pub, $Language, $Issue);
$publicationObj = new Publication($Pub);
$sectionObj = new Section($Pub, $Issue, $Language, $Section);

if (!$publicationObj->exists()) {
    camp_html_display_error(getGS('Publication does not exist.'));
    exit;
}
if (!$issueObj->exists()) {
	camp_html_display_error(getGS('No such issue.'));
	exit;
}

$correct = true;
$modified = false;

$errors = array();
if ($cName == "") {
	camp_html_add_msg(getGS('You must fill in the $1 field.','"'.getGS('Name').'"'));
}
if ($cShortName == "")  {
	camp_html_add_msg(getGS('You must fill in the $1 field.','"'.getGS('URL Name').'"'));
}
$isValidShortName = camp_is_valid_url_name($cShortName);
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_edit.php

示例13: createIssueFromEmail

 /**
  * Creates a new issue from an email if appropriate. Also returns if this message is related
  * to a previous message.
  *
  * @access  private
  * @param   array   $info An array of info about the email account.
  * @param   string  $headers The headers of the email.
  * @param   string  $message_body The body of the message.
  * @param   string  $date The date this message was sent
  * @param   string  $from The name and email address of the sender.
  * @param   string  $subject The subject of this message.
  * @return  array   An array of information about the message
  */
 function createIssueFromEmail($info, $headers, $message_body, $date, $from, $subject)
 {
     $should_create_issue = false;
     $issue_id = '';
     $associate_email = '';
     $type = 'email';
     $parent_id = '';
     // we can't trust the in-reply-to from the imap c-client, so let's
     // try to manually parse that value from the full headers
     $references = Mail_API::getAllReferences($headers);
     $message_id = Mail_API::getMessageID($headers, $message_body);
     $setup = Setup::load();
     if (@$setup['subject_based_routing']['status'] == 'enabled' && preg_match("/\\[#(\\d+)\\]( Note| BLOCKED)*/", $subject, $matches)) {
         $should_create_issue = false;
         $issue_id = $matches[1];
         if (!Issue::exists($issue_id, false)) {
             $issue_id = '';
         } elseif (!empty($matches[2])) {
             $type = 'note';
         }
     } else {
         // - if this email is a reply:
         if (count($references) > 0) {
             foreach ($references as $reference_msg_id) {
                 //  -> check if the replied email exists in the database:
                 if (Note::exists($reference_msg_id)) {
                     // note exists
                     // get what issue it belongs too.
                     $issue_id = Note::getIssueByMessageID($reference_msg_id);
                     $should_create_issue = false;
                     $type = 'note';
                     $parent_id = Note::getIDByMessageID($reference_msg_id);
                     break;
                 } elseif (Support::exists($reference_msg_id) || Issue::getIssueByRootMessageID($reference_msg_id) != false) {
                     // email or issue exists
                     $issue_id = Support::getIssueByMessageID($reference_msg_id);
                     if (empty($issue_id)) {
                         $issue_id = Issue::getIssueByRootMessageID($reference_msg_id);
                     }
                     if (empty($issue_id)) {
                         // parent email isn't associated with issue.
                         //      --> create new issue, associate current email and replied email to this issue
                         $should_create_issue = true;
                         $associate_email = $reference_msg_id;
                     } else {
                         // parent email is associated with issue:
                         //      --> associate current email with existing issue
                         $should_create_issue = false;
                     }
                     break;
                 } else {
                     //  no matching note, email or issue:
                     //    => create new issue and associate current email with it
                     $should_create_issue = true;
                 }
             }
         } else {
             // - if this email is not a reply:
             //  -> create new issue and associate current email with it
             $should_create_issue = true;
         }
         if (empty($issue_id)) {
             $issue_id = Issue::getIssueBy($subject, 'iss_summary');
             if (!empty($issue_id)) {
                 $should_create_issue = false;
             }
         }
     }
     $sender_email = Mail_API::getEmailAddress($from);
     // only create a new issue if this email is coming from a known customer
     if ($should_create_issue && $info['ema_issue_auto_creation_options']['only_known_customers'] == 'yes' && Customer::hasCustomerIntegration($info['ema_prj_id'])) {
         list($customer_id, ) = Customer::getCustomerIDByEmails($info['ema_prj_id'], array($sender_email));
         if (empty($customer_id)) {
             $should_create_issue = false;
         }
     }
     // check whether we need to create a new issue or not
     if ($info['ema_issue_auto_creation'] == 'enabled' && $should_create_issue) {
         $options = Email_Account::getIssueAutoCreationOptions($info['ema_id']);
         Auth::createFakeCookie(APP_SYSTEM_USER_ID, $info['ema_prj_id']);
         $issue_id = Issue::createFromEmail($info['ema_prj_id'], APP_SYSTEM_USER_ID, $from, Mime_Helper::fixEncoding($subject), $message_body, @$options['category'], $options['priority'], @$options['users'], $date, $message_id);
         // associate any existing replied-to email with this new issue
         if (!empty($associate_email) && !empty($reference_issue_id)) {
             $reference_sup_id = Support::getIDByMessageID($associate_email);
             Support::associate(APP_SYSTEM_USER_ID, $issue_id, array($reference_sup_id));
         }
     }
//.........这里部分代码省略.........
开发者ID:juliogallardo1326,项目名称:proc,代码行数:101,代码来源:class.support.php

示例14: dirname

// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com>                             |
// | Authors: Elan Ruusamäe <glen@delfi.ee>                               |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('close.tpl.html');
Auth::checkAuthentication(APP_COOKIE);
$usr_id = Auth::getUserID();
$prj_id = Auth::getCurrentProject();
$role_id = Auth::getCurrentRole();
$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') {
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:close.php

示例15: GetPublicationDates

 /**
  * @param int $p_publicationId
  *
  * @param int $p_languageId
  *
  * @param int $p_skipCache
  *
  *
  * @return mixed
  *      array of issue publication dates
  *      null if query does not match any issue
  */
 public static function GetPublicationDates($p_publicationId, $p_languageId, $p_skipCache = false)
 {
     global $g_ado_db;
     $queryStr = 'SELECT Number FROM Issues ' . 'WHERE IdPublication = ' . $p_publicationId . ' AND ' . 'IdLanguage = ' . $p_languageId . " AND Published = 'Y'";
     $rows = $g_ado_db->GetAll($queryStr);
     $dates = array();
     if (is_array($rows)) {
         foreach ($rows as $row) {
             $tmpObj = new Issue($p_publicationId, $p_languageId, $row['Number']);
             if ($tmpObj->exists()) {
                 $dates[] = $tmpObj->getPublicationDate();
             }
         }
     }
     if (empty($dates)) {
         return null;
     }
     return array_unique($dates);
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:Issue.php


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