Example #1
0
 /**
  * Any closing work to be done.
  */
 function prepare_end()
 {
     global $show;
     $issueperms = $this->factory->browsing_perms;
     $vbulletin =& $this->registry;
     if ($issueperms['generalpermissions'] & $vbulletin->pt_bitfields['general']['canmanage']) {
         $this->note['noteipaddress'] = $this->note['noteipaddress'] ? htmlspecialchars_uni(long2ip($this->note['noteipaddress'])) : '';
     } else {
         $this->note['noteipaddress'] = '';
     }
     $show['edit_note'] = can_edit_issue_note($this->issue, $this->note, $issueperms);
     $show['edit_history'] = ($this->note['lasteditdate'] and $show['edit_note']);
     $show['reply_note'] = (($this->issue['state'] == 'open' or $issueperms['postpermissions'] & $vbulletin->pt_bitfields['post']['cancloseissue']) and $this->note['visible'] != 'deleted');
     $this->note['newflag'] = $this->note['dateline'] > issue_lastview($this->issue);
 }
Example #2
0
        $xml->close_group();
        $xml->close_group();
        $xml->print_xml();
    } else {
        $vbulletin->url = 'project.php?' . $vbulletin->session->vars['sessionurl'] . 'projectid=' . $project['projectid'];
        eval(print_standard_redirect('project_markread'));
    }
}
// #######################################################################
if ($_REQUEST['do'] == 'notehistory') {
    $vbulletin->input->clean_array_gpc('r', array('issuenoteid' => TYPE_UINT));
    $issuenote = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "pt_issuenote\r\n\t\tWHERE issuenoteid = " . $vbulletin->GPC['issuenoteid'] . "\r\n\t");
    $issue = verify_issue($issuenote['issueid']);
    $project = verify_project($issue['projectid']);
    $issueperms = fetch_project_permissions($vbulletin->userinfo, $project['projectid'], $issue['issuetypeid']);
    if (!can_edit_issue_note($issue, $issuenote, $issueperms)) {
        print_no_permission();
    }
    require_once DIR . '/includes/class_bbcode.php';
    $bbcode =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
    require_once DIR . '/includes/functions_pt_notehistory.php';
    $edit_history = '';
    $previous_edits =& fetch_note_history($issuenote['issuenoteid']);
    while ($history = $db->fetch_array($previous_edits)) {
        $edit_history .= build_history_bit($history, $bbcode);
    }
    if ($edit_history === '') {
        standard_error(fetch_error('invalidid', $vbphrase['issue_note'], $vbulletin->options['contactuslink']));
    }
    $current_message = $bbcode->parse($issuenote['pagetext'], 'pt');
    // navbar and output