[git] web/bugs.git branch master updated. 6299778
| From: | rasmus@php.net | Date: | Sat, 18 Feb 2012 07:14:28 +0000 |
| Subject: | [git] web/bugs.git branch master updated. 6299778 | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-13070@lists.php.net to get a copy of this message | ||
The branch, master on web/bugs.git has been updated
via 6299778a30bad58431f4af30bde486f0e5e8db29 (commit)
from a088d2ebb0b033ffd2656e502eeeaaf87b3ee19e (commit)
http://git.php.net/?p=web/bugs.git;a=log;h=6299778a30bad58431f4af30bde486f0e5e8db29;hp=a088d2ebb0b033ffd2656e502eeeaaf87b3ee19e
Summary of changes:
include/functions.php | 3 +++
www/index.php | 15 +++++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
-- Log ----------------------------------------
commit 6299778a30bad58431f4af30bde486f0e5e8db29
Author: Rasmus Lerdorf <rasmus@php.net>
Date: Fri Feb 17 23:05:48 2012 -0800
Add random open bug fetching link (/random)
diff --git a/include/functions.php b/include/functions.php
index 9f1fc5e..35eac1c 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -157,16 +157,19 @@ function bugs_authenticate (&$user, &$pw, &$logged_in,
&$user_flags)
$user = $_SESSION["user"];
$user_flags = BUGS_DEV_USER;
$logged_in = 'developer';
+ $auth_user = new stdClass;
$auth_user->handle = $user;
$auth_user->email = "{$user}@php.net";
$auth_user->name = $user;
} elseif ($user != '' && $pw != '' && verify_password($user,
$pw)) {
$user_flags = BUGS_DEV_USER;
$logged_in = 'developer';
+ $auth_user = new stdClass;
$auth_user->handle = $user;
$auth_user->email = "{$user}@php.net";
$auth_user->name = $user;
} else {
+ $auth_user = new stdClass;
$auth_user->email = isset($_POST['in']['email']) ?
$_POST['in']['email'] : '';
$auth_user->handle = '';
$auth_user->name = '';
diff --git a/www/index.php b/www/index.php
index 1165285..4cefb0a 100644
--- a/www/index.php
+++ b/www/index.php
@@ -14,6 +14,15 @@ if ($id) {
exit;
}
+if($_SERVER['REQUEST_URI'] == '/random') {
+ $query = "select id from bugdb where status!='Closed' and status!='Not a
bug' and status!='Duplicate' and status!='Spam' and status!='Wont
fix' order by rand() limit 1";
+
+ $result = $dbh->prepare($query)->execute();
+ $id = $result->fetchRow();
+ redirect("bug.php?id={$id[0]}");
+ exit;
+}
+
response_header('Bugs');
?>
@@ -62,6 +71,12 @@ at the top of the page for a basic default search. Read the
<a href="search-howto.php">search howto</a> for instructions on
how search works.</p>
+<p>If you have 10 minutes to kill and you want to help us out, grab a
+random open bug and see if you can help resolve it. We have made it
+easy. Hit <a href="<?php echo $site_method?>://<?php echo
$site_url?>/random">
+<?php echo $site_method?>://<?php echo $site_url?>/random</a> to go directly
+to a random open bug.</p>
+
<p>Common searches</p>
<ul>
<?php
Thank you for your contribution.