Commit:    83510346f5fc37a823221ee42bf8e41fd5735caf
Author:    Hannes Magnusson <[email protected]>         Tue, 31 Dec 2013 
14:05:45 -0800
Parents:   1b91d94b58e9366c22b047f84dafd3a949961ea9
Branches:  master

Link:       
http://git.php.net/?p=web/people.git;a=commitdiff;h=83510346f5fc37a823221ee42bf8e41fd5735caf

Log:
List (open) assigned bugs

Changed paths:
  M  include/misc.php
  M  user.php


Diff:
diff --git a/include/misc.php b/include/misc.php
index f258add..86fdfcf 100644
--- a/include/misc.php
+++ b/include/misc.php
@@ -132,6 +132,21 @@ function findPHPUserProfile($username)
     return $json["html"];
 }
 
+function findAssignedBugs($username)
+{
+    $url = 
"https://bugs.php.net/rss/search.php?status=Open&cmd=display&assign=$username";;
+    $contents = cached($url);
+    $sxe = simplexml_load_string($contents);
+    $items = array();
+    foreach($sxe->item as $item) {
+        $items[] = array(
+            "title" => $item->title,
+            "link"  => $item->link,
+        );
+    }
+    return $items;
+}
+
 function error($errormsg)
 {
     echo '<p class="warning error">', $errormsg, "</p></section>";
diff --git a/user.php b/user.php
index 12aaf9f..d7c2268 100644
--- a/user.php
+++ b/user.php
@@ -12,6 +12,7 @@ $NFO      = findPHPUser($USERNAME);
 $GITHUB   = findGitHubUser($NFO["name"]);
 $KARMA    = findKarma($USERNAME);
 $PROFILE  = findPHPUserProfile($USERNAME);
+$BUGS     = findAssignedBugs($USERNAME);
 $email    = $NFO["username"].'@php.net';
 ?>
 
@@ -89,6 +90,15 @@ if (isset($GITHUB["location"])) {
     </ul>
 <?php } ?>
 
+<?php if ($BUGS) { ?>
+    <h2 id="bugs">Assigned (open) bugs:</h2>
+    <ul>
+    <?php foreach ($BUGS as $bug) { ?>
+        <li><a href="<?php echo $bug["link"]?>"><?php echo $bug["title"] 
?></a></li>
+    <?php } ?>
+    </ul>
+<?php } ?>
+
 <?php if (!empty($NFO["notes"])) { ?>
     <h2 id="notes">Notes:</h2>
     <?php foreach($NFO["notes"] as $note) { ?>


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to