com web/people: Github API v2 has gone so I'm deleting it - hopefully not forever: include/misc.php user.php
| From: | sobak@php.net | Date: | Wed, 09 Apr 2014 05:18:55 +0000 |
| Subject: | com web/people: Github API v2 has gone so I'm deleting it - hopefully not forever: include/misc.php user.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-19178@lists.php.net to get a copy of this message | ||
Commit: 5f18f43af3d39955f293a58b55a234ec58f3d5fe
Author: Sobak <msobaczewski@gmail.com> Wed, 9 Apr 2014 07:18:55 +0200
Parents: 6fc05b014991360e9674340a212f5a7a32a01b2b
Branches: master
Link: http://git.php.net/?p=web/people.git;a=commitdiff;h=5f18f43af3d39955f293a58b55a234ec58f3d5fe
Log:
Github API v2 has gone so I'm deleting it - hopefully not forever
Changed paths:
M include/misc.php
M user.php
Diff:
diff --git a/include/misc.php b/include/misc.php
index 86fdfcf..a039d6c 100644
--- a/include/misc.php
+++ b/include/misc.php
@@ -62,32 +62,6 @@ function findPHPUser($username)
error("No such user");
}
-function findGitHubUser($fullname)
-{
- // Hiding this for now, since nothing here can be trusted as real. Names are not unique. :)
- // Possible todo: Allow users to customize this via master/people.
- return false;
- $username = getDOMNodeFrom("http://github.com/api/v2/xml/user/search/"
. urlencode($fullname), "username");
- if (!$username) {
- return;
- }
-
- $content = file_get_contents("http://github.com/api/v2/xml/user/show/"
. $username->nodeValue);
-
- $r = new XMLReader;
- $r->XML($content);
-
- $retval = array();
- while($r->read()) {
- if ($r->nodeType == XMLReader::ELEMENT) {
- $key = $r->name;
- } elseif ($r->nodeType == XMLReader::TEXT) {
- $retval[$key] = $r->value;
- }
- }
- return $retval;
-}
-
function cached($url, $options = false, $ctx = null)
{
$tmpdir = sys_get_temp_dir();
diff --git a/user.php b/user.php
index 9e0f30f..77fa063 100644
--- a/user.php
+++ b/user.php
@@ -9,7 +9,6 @@ $USERNAME = filter_input(INPUT_GET, "username", FILTER_SANITIZE_ENCODED,
FILTER_
site_header("Developers Profile Pages; $USERNAME");
$NFO = findPHPUser($USERNAME);
-$GITHUB = findGitHubUser($NFO["name"]);
$KARMA = findKarma($USERNAME);
$PROFILE = findPHPUserProfile($USERNAME);
$BUGS = findAssignedBugs($USERNAME);
@@ -32,22 +31,7 @@ if ($NFO["name"]) {
}
?>
(<span property="foaf:nick"><?php echo
$NFO["username"]?></span>)
- a member of <a href="http://www.php.net"
rel="foaf:Organization">PHP</a>
-<?php
-if (isset($GITHUB["company"])) {
- echo ', currently working for ', $GITHUB["company"];
-}
-if (isset($GITHUB["location"])) {
- echo ', living in ';
- if ($location) {
- $q = urlencode($location);
- echo '<a href="http://maps.google.com/?q=', $q,
'">', $GITHUB["location"], '</a>';
- } else {
- echo $GITHUB["location"];
- }
-}
-?>
-.
+ a member of <a href="http://www.php.net"
rel="foaf:Organization">PHP</a>.
</dd>
<?php if ($email) { ?>
<dt>Email</dt>