Exemple #1
0
<?php

require_once '../includes/functions.inc.php';
require_once '../includes/admin.inc.php';
if (isset($_POST['comid'])) {
    $comid = $_POST['comid'];
    $comment = comment_load($comid);
    if ($comment['Comment_Hide_Name'] == 0) {
        hide_comment($comid);
    } elseif ($comment['Comment_Hide_Name'] == 1) {
        unhide_comment($comid);
    }
}
Exemple #2
0
// if the user is not registered, this might be spam, don't display
if (!$bug['registered'] && !auth_check('pear.dev')) {
    response_header('User has not confirmed identity');
    report_error('The user who submitted this bug has not yet confirmed ' . 'their email address.  ');
    echo '<p>If you submitted this bug, please check your email.</p>' . '<p><strong>If you do not have a confirmation message</strong>, <a href="resend-request-email.php?' . 'handle=' . urlencode($bug['bughandle']) . '">click here to re-send</a>.  MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to <a href="mailto:' . PEAR_DEV_EMAIL . '">' . PEAR_DEV_EMAIL . '</a> to request the confirmation link.  All bugs/comments/patches associated with this
        email address will be deleted
                within 48 hours if the account request is not confirmed!</p>';
    response_footer();
    exit;
}
$previous = $current = array();
// Delete comment
if ($edit === 1 && isset($auth_user) && $auth_user && $auth_user->registered) {
    $addon = '';
    if (isset($_GET['hide_comment']) && auth_check('pear.dev')) {
        hide_comment($id, (int) $_GET['hide_comment']);
        $addon = '&thanks=1';
    }
    if (isset($_GET['show_comment']) && auth_check('pear.bug.admin')) {
        show_comment($id, (int) $_GET['show_comment']);
        $addon = '&thanks=1';
    }
    if (isset($_GET['delete_comment']) && auth_check('pear.bug.admin')) {
        delete_comment($id, (int) $_GET['delete_comment']);
        $addon = '&thanks=1';
    }
    if ($addon !== '') {
        localRedirect("bug.php?id={$id}&edit=1{$addon}");
        exit;
    }
}