Commit: fe4c5e81f570c4dfb9c0bc4530bc3d955ab579d4 Author: Kalle Sommer Nielsen <ka...@php.net> Sun, 23 Dec 2018 06:09:07 +0100 Parents: 03b4871fa3d916c662b8a88fec03e8a7c2690079 Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=fe4c5e81f570c4dfb9c0bc4530bc3d955ab579d4 Log: Minor cleanup Changed paths: M www/fix.php M www/gh-pull-add.php M www/patch-add.php M www/patch-display.php M www/report.php M www/rpc.php Diff: diff --git a/www/fix.php b/www/fix.php index f1be1db..66f552d 100644 --- a/www/fix.php +++ b/www/fix.php @@ -33,8 +33,6 @@ if (!is_array($bug)) { // If bug exists, continue.. $RESOLVE_REASONS = $FIX_VARIATIONS = $errors = []; -$is_trusted_developer = ($user_flags & BUGS_TRUSTED_DEV); - if ($logged_in != 'developer') { $errors[] = 'The username or password you supplied was incorrect.'; } diff --git a/www/gh-pull-add.php b/www/gh-pull-add.php index 1821d9e..4e31f5f 100644 --- a/www/gh-pull-add.php +++ b/www/gh-pull-add.php @@ -38,9 +38,6 @@ if (!($buginfo = $bugRepository->findOneById($bug_id))) { $package_name = $buginfo['package_name']; -// Authenticate -$is_trusted_developer = ($user_flags & BUGS_TRUSTED_DEV); - // captcha is not necessary if the user is logged in if (!$logged_in) { $captcha = new Captcha(); diff --git a/www/patch-add.php b/www/patch-add.php index f0eaf26..6be26ba 100644 --- a/www/patch-add.php +++ b/www/patch-add.php @@ -44,8 +44,6 @@ if (!($buginfo = $bugRepository->findOneById($bug_id))) { $package_name = $buginfo['package_name']; -$is_trusted_developer = ($user_flags & BUGS_TRUSTED_DEV); - // captcha is not necessary if the user is logged in if (!$logged_in) { $captcha = new Captcha(); diff --git a/www/patch-display.php b/www/patch-display.php index 863c386..57dd490 100644 --- a/www/patch-display.php +++ b/www/patch-display.php @@ -26,8 +26,6 @@ if (!isset($_GET['bug_id']) && !isset($_GET['bug'])) { exit; } -$is_trusted_developer = ($user_flags & BUGS_TRUSTED_DEV); - $canpatch = ($logged_in == 'developer'); $revision = isset($_GET['revision']) ? $_GET['revision'] : null; diff --git a/www/report.php b/www/report.php index 408dfdf..49fb1f9 100644 --- a/www/report.php +++ b/www/report.php @@ -22,9 +22,6 @@ $pseudo_pkgs = $packageRepository->findEnabled($_GET['project'] ?? ''); // 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 @@ -74,7 +71,7 @@ if (isset($_POST['in'])) { $where_clause = "WHERE package_name != 'Feature/Change Request'"; - if (!$is_security_developer) { + if (!($user_flags & BUGS_SECURITY_DEV)) { $where_clause .= " AND private = 'N' "; } @@ -87,7 +84,7 @@ if (isset($_POST['in'])) { $possible_duplicates = $dbh->prepare($query)->execute()->fetchAll(); - if (count($possible_duplicates) == 0) { + if (!$possible_duplicates) { $ok_to_submit_report = true; } else { response_header("Report - Confirm", $packageAffectedScript); diff --git a/www/rpc.php b/www/rpc.php index 1430c7a..dca690a 100644 --- a/www/rpc.php +++ b/www/rpc.php @@ -31,8 +31,6 @@ if (isset($_POST['MAGIC_COOKIE'])) { bugs_authenticate($user, $pwd, $logged_in, $user_flags); -$is_trusted_developer = ($user_flags & BUGS_TRUSTED_DEV); - if (empty($auth_user->handle)) { echo json_encode(['result' => ['error' => 'Invalid user or password']]); exit; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php