cvs: pearweb /public_html/bugs bug-pwd-finder.php report.php roadmap.php search.php stats.php

From: Date: Tue, 25 Mar 2008 02:31:54 +0000
Subject: cvs: pearweb /public_html/bugs bug-pwd-finder.php report.php roadmap.php search.php stats.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7381@lists.php.net to get a copy of this message
dufuz Tue Mar 25 02:31:54 2008 UTC Modified files: /pearweb/public_html/bugs bug-pwd-finder.php report.php roadmap.php search.php stats.php Log: Use PEAR_Bugs_Utils where suitable $site to SITE or PEAR_CHANNELNAME where it applies remove rines() query fixes

http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/bug-pwd-finder.php?r1=1.16&r2=1.17&diff_format=u Index: pearweb/public_html/bugs/bug-pwd-finder.php diff -u pearweb/public_html/bugs/bug-pwd-finder.php:1.16 pearweb/public_html/bugs/bug-pwd-finder.php:1.17 --- pearweb/public_html/bugs/bug-pwd-finder.php:1.16 Tue Feb 5 17:32:38 2008 +++ pearweb/public_html/bugs/bug-pwd-finder.php Tue Mar 25 02:31:54 2008 @@ -15,11 +15,12 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: bug-pwd-finder.php,v 1.16 2008/02/05 17:32:38 dufuz Exp $ + * @version $Id: bug-pwd-finder.php,v 1.17 2008/03/25 02:31:54 dufuz Exp $ */ // Obtain common includes require_once './include/prepend.inc'; +require_once 'bugs/pear-bugs-utils.php'; $errors = array(); $success = ''; @@ -47,7 +48,7 @@ if ($resp) { $success = 'The password for bug report #' . $bug_id . ' has been sent to ' - . spam_protect($row['email'], 'text'); + . PEAR_Bugs_Utils::spamProtect($row['email'], 'text'); } else { $errors[] = 'Sorry. Mail can not be sent at this time. Please try again later.'; } http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/report.php?r1=1.125&r2=1.126&diff_format=u Index: pearweb/public_html/bugs/report.php diff -u pearweb/public_html/bugs/report.php:1.125 pearweb/public_html/bugs/report.php:1.126 --- pearweb/public_html/bugs/report.php:1.125 Tue Feb 5 21:23:53 2008 +++ pearweb/public_html/bugs/report.php Tue Mar 25 02:31:54 2008 @@ -17,7 +17,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: report.php,v 1.125 2008/02/05 21:23:53 dufuz Exp $ + * @version $Id: report.php,v 1.126 2008/03/25 02:31:54 dufuz Exp $ */ // Obtain common includes @@ -83,7 +83,7 @@ */ if (isset($auth_user) && auth_check('pear.dev')) { require_once 'pear-database-maintainer.php'; - $m = maintainer::get(rinse($_POST['in']['package_name']), false, true); + $m = maintainer::get($_POST['in']['package_name'], false, true); if (isset($m[$auth_user->handle]) && in_array($m[$auth_user->handle]['role'], array('lead', 'developer'))) { @@ -99,7 +99,7 @@ $_POST['in']['did_luser_search'] = 1; // search for a match using keywords from the subject - $sdesc = rinse($_POST['in']['sdesc']); + $sdesc = $_POST['in']['sdesc']; /* * If they are filing a feature request, @@ -321,62 +321,64 @@ $report = ''; $report .= 'From: ' . $_POST['in']['handle'] . "\n"; - $report .= 'Operating system: ' . rinse($_POST['in']['php_os']) . "\n"; - $report .= 'Package version: ' . rinse($_POST['in']['package_version']) . "\n"; - $report .= 'PHP version: ' . rinse($_POST['in']['php_version']) . "\n"; + $report .= 'Operating system: ' . $_POST['in']['php_os'] . "\n"; + $report .= 'Package version: ' . $_POST['in']['package_version'] . "\n"; + $report .= 'PHP version: ' . $_POST['in']['php_version'] . "\n"; $report .= 'Package: ' . $_POST['in']['package_name'] . "\n"; $report .= 'Bug Type: ' . $_POST['in']['bug_type'] . "\n"; $report .= 'Bug description: '; - $fdesc = rinse($fdesc); - $sdesc = rinse($_POST['in']['sdesc']); + $fdesc = $fdesc; + $sdesc = $_POST['in']['sdesc']; $ascii_report = "$report$sdesc\n\n" . wordwrap($fdesc); $ascii_report .= "\n-- \nEdit bug report at "; - $ascii_report .= "http://$site.php.net/bugs/bug.php?id=$cid&edit="; + $ascii_report .= "http://" . PEAR_CHANNELNAME . "/bugs/bug.php?id=$cid&edit="; - list($mailto, $mailfrom) = get_package_mail($_POST['in']['package_name']); - - $email = rinse($_POST['in']['email']); - $protected_email = '"' . spam_protect($email, 'text') . '"'; + include_once 'pear-bugs-utils.php'; + $pbu = new PEAR_Bugs_Utils; + list($mailto, $mailfrom) = $pbu->getPackageMail($_POST['in']['package_name']); + + $email = $_POST['in']['email']; + require_once 'bugs/pear-bugs-utils.php'; + $protected_email = '"' . PEAR_Bugs_Utils::spamProtect($email, 'text') . '"'; $protected_email .= '<' . $mailfrom . '>'; $extra_headers = 'From: ' . $protected_email . "\n"; $extra_headers .= 'X-PHP-BugTracker: PEARbug' . "\n"; $extra_headers .= 'X-PHP-Bug: ' . $cid . "\n"; - $extra_headers .= 'X-PHP-Type: ' . rinse($_POST['in']['bug_type']) . "\n"; - $extra_headers .= 'X-PHP-PackageVersion: ' . rinse($_POST['in']['package_version']) . "\n"; - $extra_headers .= 'X-PHP-Version: ' . rinse($_POST['in']['php_version']) . "\n"; - $extra_headers .= 'X-PHP-Category: ' . rinse($_POST['in']['package_name']) . "\n"; - $extra_headers .= 'X-PHP-OS: ' . rinse($_POST['in']['php_os']) . "\n"; + $extra_headers .= 'X-PHP-Type: ' . $_POST['in']['bug_type'] . "\n"; + $extra_headers .= 'X-PHP-PackageVersion: ' . $_POST['in']['package_version'] . "\n"; + $extra_headers .= 'X-PHP-Version: ' . $_POST['in']['php_version'] . "\n"; + $extra_headers .= 'X-PHP-Category: ' . $_POST['in']['package_name'] . "\n"; + $extra_headers .= 'X-PHP-OS: ' . $_POST['in']['php_os'] . "\n"; $extra_headers .= 'X-PHP-Status: Open' . "\n"; - $extra_headers .= 'Message-ID: <bug-' . $cid . '@'.$site.'.php.net>'; + $extra_headers .= 'Message-ID: <bug-' . $cid . '@' . PEAR_CHANNELNAME . '>'; $type = @$types[$_POST['in']['bug_type']]; if (!DEVBOX) { // mail to package developers - @mail($mailto, "[$siteBig-BUG] $type #$cid [NEW]: $sdesc", + @mail($mailto, "[" . SITE_BIG . "-BUG] $type #$cid [NEW]: $sdesc", $ascii_report . "1\n-- \n$dev_extra", $extra_headers, '-f ' . PEAR_BOUNCE_EMAIL); // mail to reporter, only if the reporter is also not the package maintainer if (strpos($mailto, $email) !== false) { - @mail($email, "[$siteBig-BUG] $type #$cid: $sdesc", + @mail($email, "[" . SITE_BIG . "-BUG] $type #$cid: $sdesc", $ascii_report . "2\n", - "From: $siteBig Bug Database <$mailfrom>\n" . + "From: " . SITE_BIG . " Bug Database <$mailfrom>\n" . "X-PHP-Bug: $cid\n" . - "Message-ID: <bug-$cid@$site.php.net>", + "Message-ID: <bug-$cid@" . PEAR_CHANNELNAME . ">", '-f ' . PEAR_BOUNCE_EMAIL); } } if (!empty($_POST['in']['addpatch'])) { - localRedirect('patch-add.php?bug=' . $cid . '&email=' . - $_POST['in']['email']); + localRedirect('patch-add.php?bug=' . $cid . '&email=' . $_POST['in']['email']); } elseif (!isset($buggie) && !empty($_POST['in']['addpatch'])) { - require_once 'bugs/pear-bug-accountrequest.php'; - $r = new PEAR_Bug_Accountrequest(); - $info = $r->sendPatchEmail($cid, $patchrevision, + //FIXME This is possible not needed anymore, look into it + require_once 'bugs/pear-bugs-utils.php'; + PEAR_Bugs_Utils::sendPatchEmail($cid, $patchrevision, $_POST['in']['package_name'], $auth_user->handle); } localRedirect('bug.php?id=' . $cid . '&thanks=4'); http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/roadmap.php?r1=1.28&r2=1.29&diff_format=u Index: pearweb/public_html/bugs/roadmap.php diff -u pearweb/public_html/bugs/roadmap.php:1.28 pearweb/public_html/bugs/roadmap.php:1.29 --- pearweb/public_html/bugs/roadmap.php:1.28 Tue Jan 22 06:21:19 2008 +++ pearweb/public_html/bugs/roadmap.php Tue Mar 25 02:31:54 2008 @@ -154,7 +154,7 @@ if (isset($_POST['importbugs'])) { // Fetch the last release date include_once 'pear-database-package.php'; - $releaseDate = package::getRecent(1, rinse($_GET['package'])); + $releaseDate = package::getRecent(1, $_GET['package']); if (PEAR::isError($releaseDate)) { break; } @@ -163,14 +163,14 @@ FROM bugdb LEFT JOIN packages ON packages.name = bugdb.package_name WHERE bugdb.registered IN(1,0) - AND bugdb.package_name = ' . $dbh->quoteSmart(rinse($_GET['package'])) . ' + AND bugdb.package_name = ? AND bugdb.status IN' . " ('Closed', 'Duplicate', 'Bogus', 'Wont Fix', 'Suspended') AND (UNIX_TIMESTAMP('" . $releaseDate[0]['releasedate'] . "') < UNIX_TIMESTAMP(bugdb.ts2))" . 'AND (bugdb.bug_type = "Bug" OR bugdb.bug_type="Documentation Problem")'; $link = Bug_DataObject::bugDB('bugdb_roadmap_link'); - $res =& $dbh->query($query); + $res =& $dbh->query($query, array($_GET['package'])); while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) { $link->id = $row['id']; $link->delete(); http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/search.php?r1=1.100&r2=1.101&diff_format=u Index: pearweb/public_html/bugs/search.php diff -u pearweb/public_html/bugs/search.php:1.100 pearweb/public_html/bugs/search.php:1.101 --- pearweb/public_html/bugs/search.php:1.100 Sat Jan 26 18:45:05 2008 +++ pearweb/public_html/bugs/search.php Tue Mar 25 02:31:54 2008 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: search.php,v 1.100 2008/01/26 18:45:05 dufuz Exp $ + * @version $Id: search.php,v 1.101 2008/03/25 02:31:54 dufuz Exp $ */ // Obtain common includes @@ -160,7 +160,7 @@ // Fetch the last release date include_once 'pear-database-package.php'; - $releaseDate = package::getRecent(1, rinse($package_name[0])); + $releaseDate = package::getRecent(1, $package_name[0]); if (PEAR::isError($releaseDate)) { break; } @@ -188,7 +188,7 @@ $where_clause .= $sql_search; if (count($ignored) > 0 ) { $warnings[] = 'The following words were ignored: ' . - rinse(implode(', ', array_unique($ignored))); + implode(', ', array_unique($ignored)); } } @@ -367,10 +367,10 @@ '?cmd=display' . $package_name_string . $package_nname_string . - '&amp;search_for=' . urlencode(rinse($search_for)) . - '&amp;php_os=' . urlencode(rinse($php_os)) . + '&amp;search_for=' . urlencode($search_for) . + '&amp;php_os=' . urlencode($php_os) . '&amp;boolean=' . $boolean_search . - '&amp;author_email='. urlencode(rinse($author_email)) . + '&amp;author_email='. urlencode($author_email) . '&amp;bug_type=' . $bug_type . '&amp;bug_age=' . $bug_age . '&amp;bug_updated=' . $bug_updated . @@ -403,7 +403,7 @@ show_bugs_menu($package_name, $status); } - $link .= '&amp;status=' . urlencode(rinse($status)); + $link .= '&amp;status=' . urlencode($status); $package_count = count($package_name); ?> @@ -551,7 +551,7 @@ <td><input type="text" name="assign" value="<?php echo clean($assign);?>" /> <?php if ($auth_user) { - $u = rinse(htmlspecialchars($_REQUEST['PEAR_USER'])); + $u = htmlspecialchars($_REQUEST['PEAR_USER']); print "<input type=\"button\" value=\"set to $u\" onclick=\"form.assign.value='$u'\" />"; } ?> @@ -575,7 +575,7 @@ <td><input accesskey="m" type="text" name="author_email" value="<?php echo clean($author_email); ?>" /> <?php if ($auth_user) { - $u = rinse(htmlspecialchars($_REQUEST['PEAR_USER'])); + $u = htmlspecialchars($_REQUEST['PEAR_USER']); print "<input type=\"button\" value=\"set to $u\" onclick=\"form.author_email.value='$u'\" />"; } ?> http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/stats.php?r1=1.57&r2=1.58&diff_format=u Index: pearweb/public_html/bugs/stats.php diff -u pearweb/public_html/bugs/stats.php:1.57 pearweb/public_html/bugs/stats.php:1.58 --- pearweb/public_html/bugs/stats.php:1.57 Sat Dec 29 00:24:35 2007 +++ pearweb/public_html/bugs/stats.php Tue Mar 25 02:31:54 2008 @@ -14,14 +14,12 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: stats.php,v 1.57 2007/12/29 00:24:35 dufuz Exp $ + * @version $Id: stats.php,v 1.58 2008/03/25 02:31:54 dufuz Exp $ */ // Obtain common includes require_once './include/prepend.inc'; -error_reporting(E_ALL ^ E_NOTICE); - response_header('Bugs Stats'); $dbh->setFetchMode(DB_FETCHMODE_ASSOC);
« previous php.pear.core (#7381) next »