示例#1
0
文件: trans.php 项目: stof/pearweb
<?php

auth_require('pear.dev');
require_once 'notes/ManualNotes.class.php';
$manualNotes = new Manual_Notes();
$action = '';
if (isset($_REQUEST['action'])) {
    $action = strtolower($_REQUEST['action']);
}
switch ($action) {
    case 'makedocbug':
        if (isset($_GET['noteId'])) {
            $noteId = (int) $_GET['noteId'];
            $note = $manualNotes->getSingleCommentById($noteId);
            $registered = 1;
            $package = getPackageNameForId($note['page_url']);
            $package_name = is_null($package) ? 'Documentation' : $package;
            $bug_type = 'Documentation Problem';
            $email = $auth_user->email;
            $handle = $auth_user->handle;
            $sdesc = 'User note that is a documentation problem';
            $ldesc = 'Manual page: ' . $note['page_url'] . "\n" . 'Note submitter:' . "\n";
            if (!empty($note['user_handle'])) {
                $ldesc .= user_link($note['user_handle'], true);
            } else {
                include_once 'bugs/pear-bugs-utils.php';
                $ldesc .= PEAR_Bugs_Utils::spamProtect($note['user_name'], 'text');
            }
            $ldesc .= "\n\n" . str_replace('<br />', '', $dbh->escapeSimple(html_entity_decode($note['note_text'])));
            $package_version = null;
            $php_version = 'Irrelevant';
示例#2
0
<?php

auth_require('pear.dev');
$status = isset($_GET['status']) && $_GET['status'] == 'yes' ? 'approved' : false;
$ajax = isset($_GET['ajax']) && $_GET['ajax'] == 'yes' ? true : false;
$id = isset($_GET['noteId']) ? (int) $_GET['noteId'] : '';
if (!$id) {
    response_footer();
    exit;
}
require_once 'notes/ManualNotes.class.php';
$manualNotes = new Manual_Notes();
$noteContent = $manualNotes->getSingleCommentById($id);
include PEARWEB_TEMPLATEDIR . '/notes/view-full-note.tpl.php';