cvs: pearweb /public_html account-info.php

From: Date: Fri, 13 Mar 2009 15:53:10 +0000
Subject: cvs: pearweb /public_html account-info.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-8267@lists.php.net to get a copy of this message
dufuz Fri Mar 13 15:53:10 2009 UTC Modified files: /pearweb/public_html account-info.php Log: no need to show bug stats if the person doesn't have a pear.dev karam http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-info.php?r1=1.67&r2=1.68&diff_format=u Index: pearweb/public_html/account-info.php diff -u pearweb/public_html/account-info.php:1.67 pearweb/public_html/account-info.php:1.68 --- pearweb/public_html/account-info.php:1.67 Fri Jan 2 02:00:27 2009 +++ pearweb/public_html/account-info.php Fri Mar 13 15:53:10 2009 @@ -15,11 +15,12 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-info.php,v 1.67 2009/01/02 02:00:27 dufuz Exp $ + $Id: account-info.php,v 1.68 2009/03/13 15:53:10 dufuz Exp $ */ // Details about PEAR accounts +require_once 'Damblan/Karma.php'; require_once 'Damblan/URL.php'; require_once 'HTTP.php'; $site = new Damblan_URL(); @@ -184,28 +185,30 @@ echo '</li>' . "\n"; } -echo ' <li>Bug Statistics: <br />' . "\n"; -echo ' <ul>' . "\n"; - -require 'bugs/pear-bugs.php'; -$bugs = new PEAR_Bugs; -$info = $bugs->developerBugStats($handle); -echo ' <li>Rank: <strong><a href="/bugs/stats_dev.php">#' . $info['rank'] . ' of ' . count($info['rankings']) . '</a></strong> developers who have fixed bugs <strong>(' . - $info['alltime'] . ' fixed bugs)</strong></li>' . "\n"; -echo ' <li>Average age of open bugs: <strong>' . $info['openage'] . ' days</strong></li>' . "\n"; -$url = '/bugs/search.php?handle=' . $handle . '&cmd=display&bug_type=Bug&status=OpenFeedback&showmenu=1'; -echo ' <li>Number of open bugs: <strong><a href="' . $url . '">' . $info['opencount'] . '</a></strong></li>' . "\n"; -echo ' <li>Assigned bugs relative to all maintained packages bugs: <strong>' . - round($info['assigned'] * 100) . '%</strong></li>' . "\n"; -echo ' <li>Number of submitted patches: <strong>' . - $info['patches'] . '</strong></li>' . "\n"; -echo ' <li>Number of bugs opened using account: <strong>' . - $info['opened'] . '</strong></li>' . "\n"; -echo ' <li>Number of bug comments using account: <strong>' . - $info['commented'] . '</strong></li>' . "\n"; -echo ' </ul>' . "\n"; -echo ' </li>' . "\n"; - +$karma =& new Damblan_Karma($dbh); +if ($karma->has($handle, 'pear.dev')) { + echo ' <li>Bug Statistics: <br />' . "\n"; + echo ' <ul>' . "\n"; + + require 'bugs/pear-bugs.php'; + $bugs = new PEAR_Bugs; + $info = $bugs->developerBugStats($handle); + echo ' <li>Rank: <strong><a href="/bugs/stats_dev.php">#' . $info['rank'] . ' of ' . count($info['rankings']) . '</a></strong> developers who have fixed bugs <strong>(' . + $info['alltime'] . ' fixed bugs)</strong></li>' . "\n"; + echo ' <li>Average age of open bugs: <strong>' . $info['openage'] . ' days</strong></li>' . "\n"; + $url = '/bugs/search.php?handle=' . $handle . '&cmd=display&bug_type=Bug&status=OpenFeedback&showmenu=1'; + echo ' <li>Number of open bugs: <strong><a href="' . $url . '">' . $info['opencount'] . '</a></strong></li>' . "\n"; + echo ' <li>Assigned bugs relative to all maintained packages bugs: <strong>' . + round($info['assigned'] * 100) . '%</strong></li>' . "\n"; + echo ' <li>Number of submitted patches: <strong>' . + $info['patches'] . '</strong></li>' . "\n"; + echo ' <li>Number of bugs opened using account: <strong>' . + $info['opened'] . '</strong></li>' . "\n"; + echo ' <li>Number of bug comments using account: <strong>' . + $info['commented'] . '</strong></li>' . "\n"; + echo ' </ul>' . "\n"; + echo ' </li>' . "\n"; +} ?> </ul>

« previous php.pear.core (#8267) next »