Esempio n. 1
0
}
require "{$ROOT_DIR}/include/classes/bug_patchtracker.php";
$patchinfo = new Bug_Patchtracker();
if (!($buginfo = bugs_get_bug($bug_id))) {
    response_header('Error :: invalid bug selected');
    display_bug_error("Invalid bug #{$bug_id} selected");
    response_footer();
    exit;
}
if (!bugs_has_access($bug_id, $buginfo, $pw, $user_flags)) {
    response_header('Error :: No access to bug selected');
    display_bug_error("You have no access to bug #{$bug_id}");
    response_footer();
    exit;
}
$pseudo_pkgs = get_pseudo_packages(false);
if (isset($patch_name) && isset($revision)) {
    if ($revision == 'latest') {
        $revisions = $patchinfo->listRevisions($buginfo['id'], $patch_name);
        if (isset($revisions[0])) {
            $revision = $revisions[0][0];
        }
    }
    $path = $patchinfo->getPatchFullpath($bug_id, $patch_name, $revision);
    if (!file_exists($path)) {
        response_header('Error :: no such patch/revision');
        display_bug_error('Invalid patch/revision specified');
        response_footer();
        exit;
    }
    require_once 'HTTP.php';
Esempio n. 2
0
session_start();
// Obtain common includes
require_once '../include/prepend.php';
response_header('Bugs Stats');
$titles = array('Closed' => 'Closed', 'Open' => 'Open', 'Critical' => 'Crit', 'Verified' => 'Verified', 'Analyzed' => 'Analyzed', 'Assigned' => 'Assigned', 'Feedback' => 'Fdbk', 'No Feedback' => 'No Fdbk', 'Suspended' => 'Susp', 'Not a bug' => 'Not a bug', 'Duplicate' => 'Dupe', 'Wont fix' => 'Wont Fix');
$rev = isset($_GET['rev']) ? $_GET['rev'] : 1;
$sort_by = isset($_GET['sort_by']) ? $_GET['sort_by'] : 'Open';
$total = 0;
$row = array();
$pkg = array();
$pkg_tmp = array();
$pkg_total = array();
$pkg_names = array();
$all = array();
$pseudo = true;
$pseudo_pkgs = get_pseudo_packages($site);
if (!array_key_exists($sort_by, $titles)) {
    $sort_by = 'Open';
}
$where = '';
if (empty($_GET['bug_type']) || $_GET['bug_type'] == 'All') {
    $bug_type = 'All';
} else {
    $bug_type = $_GET['bug_type'];
    $where = ' AND bug_type = ' . $dbh->quote($bug_type);
}
$query = "\n\tSELECT b.package_name, b.status, COUNT(*) AS quant\n\tFROM bugdb AS b\n\tWHERE 1 = 1 {$where}\n\tGROUP BY b.package_name, b.status\n\tORDER BY b.package_name, b.status\n";
$result = $dbh->prepare($query)->execute();
while ($row = $result->fetchRow(MDB2_FETCHMODE_ASSOC)) {
    $pkg_tmp[$row['status']][$row['package_name']] = $row['quant'];
    @($pkg_total[$row['package_name']] += $row['quant']);
Esempio n. 3
0
<?php

// Obtain common includes
require_once '../include/prepend.php';
// Start session
session_start();
// Init variables
$errors = array();
$ok_to_submit_report = false;
$project = !empty($_GET['project']) ? $_GET['project'] : false;
$pseudo_pkgs = get_pseudo_packages($project, false);
// false == no read-only packages included
// Authenticate
bugs_authenticate($user, $pw, $logged_in, $user_flags);
$is_trusted_developer = $user_flags & BUGS_TRUSTED_DEV;
$is_security_developer = $user_flags & BUGS_SECURITY_DEV;
require "{$ROOT_DIR}/include/php_versions.php";
// captcha is not necessary if the user is logged in
if (!$logged_in) {
    require_once 'Text/CAPTCHA/Numeral.php';
    $numeralCaptcha = new Text_CAPTCHA_Numeral();
}
// Handle input
if (isset($_POST['in'])) {
    $errors = incoming_details_are_valid($_POST['in'], 1, $logged_in);
    // Check if session answer is set, then compare it with the post captcha value.
    // If it's not the same, then it's an incorrect password.
    if (!$logged_in) {
        if (!isset($_SESSION['answer'])) {
            $errors[] = 'Please enable cookies so the Captcha system can work';
        } elseif ($_POST['captcha'] != $_SESSION['answer']) {
Esempio n. 4
0
    }
    $query .= "AND bug_type NOT IN({$excluded})";
    $res = $dbh->prepare($query)->execute(array());
    $row = $res->fetchRow(MDB2_FETCHMODE_ORDERED);
    return $row[0];
}
// Input
if (!isset($_GET['phpver'])) {
    echo "<h3>Bug stats for both <a href='lstats.php?phpver=5'>PHP 5</a> and <a href='lstats.php?phpver=6'>PHP 6</a>:</h3>\n<pre>\n";
} else {
    $phpver = (int) $_GET['phpver'];
    echo "<h3>Bug stats for PHP {$phpver}:</h3>\n<pre>\n";
}
if (isset($_GET['per_category'])) {
    $project = !empty($_GET['project']) ? $_GET['project'] : false;
    $pseudo_pkgs = get_pseudo_packages($project);
    $totals = array();
    foreach ($pseudo_pkgs as $category => $data) {
        $count = get_status_count("status NOT IN('to be documented', 'closed', 'not a bug', 'duplicate', 'wont fix', 'no feedback')", $category);
        if ($count > 0) {
            $totals[$category] = $count;
        }
    }
    arsort($totals);
    foreach ($totals as $category => $total) {
        status_print($category, $total, 40);
    }
} else {
    foreach ($tla as $status => $short) {
        if (!in_array($status, array('Duplicate'))) {
            $count = get_status_count($status);