Commit:    e7e77cf62306f504c654fd1383ed6bca2809833e
Author:    Hannes Magnusson <[email protected]>         Sun, 29 Dec 2013 
21:03:20 -0800
Parents:   72e7bc7e2e8c1531026dc88c651c7aebd281d954
Branches:  master

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

Log:
Drop the geo coordinates from PEAR, its exceptionally slow and noone uses it

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


Diff:
diff --git a/include/misc.php b/include/misc.php
index 49825f4..78b1ffb 100644
--- a/include/misc.php
+++ b/include/misc.php
@@ -68,18 +68,6 @@ function findGitHubUser($fullname)
     return $retval;
 }
 
-function findPEARUser($username)
-{
-    $geo = getDOMNodeFrom("http://pear.php.net/map/locationREST.php?handle="; . 
$username, "based_near");
-    if (!$geo) {
-        return;
-    }
-    return array(
-        "lat"  => $geo->getAttribute("geo:lat"),
-        "long" => $geo->getAttribute("geo:long"),
-    );
-}
-
 function cached($url, $options = false, $ctx = null)
 {
     $tmpdir = sys_get_temp_dir();
diff --git a/user.php b/user.php
index acd48b1..12aaf9f 100644
--- a/user.php
+++ b/user.php
@@ -9,12 +9,10 @@ $USERNAME = filter_input(INPUT_GET, "username", 
FILTER_SANITIZE_ENCODED, FILTER_
 site_header("Developers Profile Pages; $USERNAME");
 
 $NFO      = findPHPUser($USERNAME);
-$PEAR     = findPEARUser($USERNAME);
 $GITHUB   = findGitHubUser($NFO["name"]);
 $KARMA    = findKarma($USERNAME);
 $PROFILE  = findPHPUserProfile($USERNAME);
-$email    = $NFO["enable"] ? $NFO["username"].'@php.net' : "";
-$location = isset($PEAR["long"], $PEAR["lat"]) ? $PEAR["lat"] . ", " . 
$PEAR["long"] : null;
+$email    = $NFO["username"].'@php.net';
 ?>
 
 <section class="mainscreen">
@@ -70,12 +68,6 @@ if (isset($GITHUB["location"])) {
        <dd><?php echo $GITHUB["location"] ?></dd>
 <?php } ?>
 
-<?php if (isset($PEAR["long"], $PEAR["lat"])) { ?>
-    <dt>Geo location</dt>
-       <?php $q = urlencode($location) ?>
-    <dd><a href="http://maps.google.com/?q=<?php echo $q ?>"><span 
property="geo:lat"><?php echo $PEAR["lat"]?></span>, <span 
property="geo:long"><?php echo $PEAR["long"]?></span></a></dt>
-<?php } ?>
-
 </dl>
 
 <?php if ($PROFILE) { ?>
@@ -97,14 +89,14 @@ if (isset($GITHUB["location"])) {
     </ul>
 <?php } ?>
 
-<?php if ($NFO["notes"]) { ?>
+<?php if (!empty($NFO["notes"])) { ?>
     <h2 id="notes">Notes:</h2>
-<?php } ?>
-<?php foreach($NFO["notes"] as $note) { ?>
+    <?php foreach($NFO["notes"] as $note) { ?>
     <div class="note">
         <?php echo $note["entered"] ?>:
         <?php echo htmlspecialchars($note["note"], ENT_QUOTES, 'UTF-8'); ?>
     </div>
+    <?php } ?>
 <?php } ?>
 </div>


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

Reply via email to