cvs: pearweb /include/pepr pepr.php /public_html/pepr index.php pepr-overview.php pepr-proposal-delete.php

From: Date: Thu, 15 Jun 2006 19:39:03 +0000
Subject: cvs: pearweb /include/pepr pepr.php /public_html/pepr index.php pepr-overview.php pepr-proposal-delete.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-40725@lists.php.net to get a copy of this message
mj Thu Jun 15 19:39:03 2006 UTC Modified files: /pearweb/include/pepr pepr.php /pearweb/public_html/pepr index.php pepr-overview.php pepr-proposal-delete.php Log: * Move /pepr/pepr-overview.php to /pepr/index.php # pepr-overview.php will be replaced by a redirect rule in the Apache # configuration after these changes are available on pear.php.net.

http://cvs.php.net/viewcvs.cgi/pearweb/include/pepr/pepr.php?r1=1.63&r2=1.64&diff_format=u Index: pearweb/include/pepr/pepr.php diff -u pearweb/include/pepr/pepr.php:1.63 pearweb/include/pepr/pepr.php:1.64 --- pearweb/include/pepr/pepr.php:1.63 Thu Apr 6 21:03:22 2006 +++ pearweb/include/pepr/pepr.php Thu Jun 15 19:39:03 2006 @@ -22,7 +22,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: pepr.php,v 1.63 2006/04/06 21:03:22 pajoye Exp $ + * @version $Id: pepr.php,v 1.64 2006/06/15 19:39:03 mj Exp $ */ /**#@+ @@ -86,12 +86,12 @@ { global $proposalStatiMap; $items = array( - 'All' => array('url' => 'pepr-overview.php?filter=', + 'All' => array('url' => 'index.php?filter=', 'title' => 'All' ) ); foreach ($proposalStatiMap as $status => $name) { - $items[$name] = array('url' => 'pepr-overview.php?filter='.$status, + $items[$name] = array('url' => 'index.php?filter='.$status, 'title' => $name ); } http://cvs.php.net/viewcvs.cgi/pearweb/public_html/pepr/index.php?r1=1.3&r2=1.4&diff_format=u Index: pearweb/public_html/pepr/index.php diff -u pearweb/public_html/pepr/index.php:1.3 pearweb/public_html/pepr/index.php:1.4 --- pearweb/public_html/pepr/index.php:1.3 Wed Jan 26 12:40:07 2005 +++ pearweb/public_html/pepr/index.php Thu Jun 15 19:39:03 2006 @@ -1,7 +1,9 @@ <?php - /** - * Redirects hits from /pepr/ to /pepr/pepr-overview.php. + * Displays a list of all proposals. + * + * The <var>$proposalStatiMap</var> array is defined in + * pearweb/include/pepr/pepr.php. * * This source file is subject to version 3.0 of the PHP license, * that is bundled with this package in the file LICENSE, and is @@ -17,9 +19,131 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: index.php,v 1.3 2005/01/26 12:40:07 pajoye Exp $ + * @version $Id: index.php,v 1.4 2006/06/15 19:39:03 mj Exp $ + */ + +/** + * Obtain the common functions and classes. */ +require_once 'pepr/pepr.php'; + +if (isset($_GET['filter']) && isset($proposalStatiMap[$_GET['filter']])) { + $selectStatus = $_GET['filter']; +} else { + $selectStatus = ''; +} + +if ($selectStatus != '') { + $order = ' pkg_category ASC, pkg_name ASC'; +} + +if (isset($_GET['search'])) { + $searchString = trim($_GET['search']); + $searchString = preg_replace('/;/', '', $searchString); + $proposals = proposal::search($searchString); + $searchPostfix = '_search_'.urlencode($searchString); +} else { + $proposals =& proposal::getAll($dbh, @$selectStatus, null, @$order); + $searchPostfix = ''; +} + +response_header('PEPr :: Package Proposals'); + +echo '<h1>Package Proposals</h1>' . "\n"; +if ($selectStatus == '') { + echo "<p>"; + echo "PEPr is PEAR's system for managing the process of submitting "; + echo "new packages. If you would like to submit your own package, "; + echo "please have a look at the <a href=\"/manual/en/guide-newmaint.php\">New Maintainer's Guide</a>."; + echo "</p>"; + echo "<p>"; + echo "<a href='/feeds/pepr$searchPostfix.rss'>Aggregate this.</a>"; + echo "</p>"; +} + +display_overview_nav(); + +echo "<ul>"; + +$last_status = false; + +$finishedCounter = 0; + +foreach ($proposals as $proposal) { + if ($proposal->getStatus() != $last_status) { + echo "</ul>"; + if ($last_status !== false) { + echo "<p>"; + echo "<a href='/feeds/pepr_".$last_status.".rss'>Aggregate this.</a>"; + echo "</p>"; + } + echo '<h2 name="' . $proposal->getStatus() . '" id="'; + echo $proposal->getStatus() . '">'; + echo '&raquo; ' . htmlspecialchars($proposal->getStatus(true)); + echo "</h2>\n"; + echo "<ul>"; + $last_status = $proposal->getStatus(); + } + $prpCat = $proposal->pkg_category; + if ($selectStatus != '' && (!isset($lastChar) || $lastChar != $prpCat{0})) { + $lastChar = $prpCat{0}; + echo '</ul>'; + echo "<h3>$lastChar</h3>"; + echo '<ul>'; + } + if ($proposal->getStatus() == 'finished' && $selectStatus != 'finished') { + if (++$finishedCounter == 10) { + break; + } + } + if (!isset($users[$proposal->user_handle])) { + $users[$proposal->user_handle] = user::info($proposal->user_handle); + } + + $already_voted = false; + if (isset($auth_user) && $proposal->getStatus(true) == "Called for Votes") { + $proposal->getVotes($dbh); + + if (in_array($auth_user->handle, array_keys($proposal->votes))) { + $already_voted = true; + } + } + + echo "<li>"; + if ($already_voted) { + echo '(Already voted) '; + } + print_link('pepr-proposal-show.php?id=' . $proposal->id, + htmlspecialchars($proposal->pkg_category) . ' :: ' + . htmlspecialchars($proposal->pkg_name)); + echo ' by '; + print_link('/user/' . htmlspecialchars($proposal->user_handle), + htmlspecialchars($users[$proposal->user_handle]['name'])); + switch ($proposal->getStatus()) { + case 'proposal': + echo ' &nbsp;(<a href="pepr-comments-show.php?id=' . $proposal->id; + echo '">Comments</a>)'; + break; + case 'vote': + case 'finished': + $voteSums = ppVote::getSum($dbh, $proposal->id); + echo ' &nbsp;(<a href="pepr-votes-show.php?id=' . $proposal->id; + echo '">Vote</a> sum: <strong>' . $voteSums['all'] . '</strong>'; + echo '<small>, ' . $voteSums['conditional']; + echo ' conditional</small>)'; + } + echo "</li>\n"; +} + +if ($selectStatus == '' && isset($proposal) && $proposal->getStatus() == 'finished') { + print_link('/pepr/?filter=finished', 'All finished proposals'); +} -localRedirect('pepr-overview.php'); +echo "</ul>"; -?> +if (isset($proposal)) { + echo "<p>"; + echo "<a href='/feeds/pepr_".@$proposal->getStatus().".rss'>Aggregate this.</a>"; + echo "</p>"; +} +response_footer(); http://cvs.php.net/viewcvs.cgi/pearweb/public_html/pepr/pepr-overview.php?r1=1.14&r2=1.15&diff_format=u Index: pearweb/public_html/pepr/pepr-overview.php diff -u pearweb/public_html/pepr/pepr-overview.php:1.14 pearweb/public_html/pepr/pepr-overview.php:1.15 --- pearweb/public_html/pepr/pepr-overview.php:1.14 Wed Jan 26 12:40:07 2005 +++ pearweb/public_html/pepr/pepr-overview.php Thu Jun 15 19:39:03 2006 @@ -1,152 +1,2 @@ <?php - -/** - * Displays a list of all proposals. - * - * The <var>$proposalStatiMap</var> array is defined in - * pearweb/include/pepr/pepr.php. - * - * This source file is subject to version 3.0 of the PHP license, - * that is bundled with this package in the file LICENSE, and is - * available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. - * If you did not receive a copy of the PHP license and are unable to - * obtain it through the world-wide-web, please send a note to - * license@php.net so we can mail you a copy immediately. - * - * @category pearweb - * @package PEPr - * @author Tobias Schlitt <toby@php.net> - * @author Daniel Convissor <danielc@php.net> - * @copyright Copyright (c) 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: pepr-overview.php,v 1.14 2005/01/26 12:40:07 pajoye Exp $ - */ - -/** - * Obtain the common functions and classes. - */ -require_once 'pepr/pepr.php'; - -if (isset($_GET['filter']) && isset($proposalStatiMap[$_GET['filter']])) { - $selectStatus = $_GET['filter']; -} else { - $selectStatus = ''; -} - -if ($selectStatus != '') { - $order = ' pkg_category ASC, pkg_name ASC'; -} - -if (isset($_GET['search'])) { - $searchString = trim($_GET['search']); - $searchString = preg_replace('/;/', '', $searchString); - $proposals = proposal::search($searchString); - $searchPostfix = '_search_'.urlencode($searchString); -} else { - $proposals =& proposal::getAll($dbh, @$selectStatus, null, @$order); - $searchPostfix = ''; -} - -response_header('PEPr :: Package Proposals'); - -echo '<h1>Package Proposals</h1>' . "\n"; -if ($selectStatus == '') { - echo "<p>"; - echo "PEPr is PEAR's system for managing the process of submitting "; - echo "new packages. If you would like to submit your own package, "; - echo "please have a look at the <a href=\"/manual/en/guide-newmaint.php\">New Maintainer's Guide</a>."; - echo "</p>"; - echo "<p>"; - echo "<a href='/feeds/pepr$searchPostfix.rss'>Aggregate this.</a>"; - echo "</p>"; -} - -display_overview_nav(); - -echo "<ul>"; - -$last_status = false; - -$finishedCounter = 0; - -foreach ($proposals as $proposal) { - if ($proposal->getStatus() != $last_status) { - echo "</ul>"; - if ($last_status !== false) { - echo "<p>"; - echo "<a href='/feeds/pepr_".$last_status.".rss'>Aggregate this.</a>"; - echo "</p>"; - } - echo '<h2 name="' . $proposal->getStatus() . '" id="'; - echo $proposal->getStatus() . '">'; - echo '&raquo; ' . htmlspecialchars($proposal->getStatus(true)); - echo "</h2>\n"; - echo "<ul>"; - $last_status = $proposal->getStatus(); - } - $prpCat = $proposal->pkg_category; - if ($selectStatus != '' && (!isset($lastChar) || $lastChar != $prpCat{0})) { - $lastChar = $prpCat{0}; - echo '</ul>'; - echo "<h3>$lastChar</h3>"; - echo '<ul>'; - } - if ($proposal->getStatus() == 'finished' && $selectStatus != 'finished') { - if (++$finishedCounter == 10) { - break; - } - } - if (!isset($users[$proposal->user_handle])) { - $users[$proposal->user_handle] = user::info($proposal->user_handle); - } - - $already_voted = false; - if (isset($auth_user) && $proposal->getStatus(true) == "Called for Votes") { - $proposal->getVotes($dbh); - - if (in_array($auth_user->handle, array_keys($proposal->votes))) { - $already_voted = true; - } - } - - echo "<li>"; - if ($already_voted) { - echo '(Already voted) '; - } - print_link('pepr-proposal-show.php?id=' . $proposal->id, - htmlspecialchars($proposal->pkg_category) . ' :: ' - . htmlspecialchars($proposal->pkg_name)); - echo ' by '; - print_link('/user/' . htmlspecialchars($proposal->user_handle), - htmlspecialchars($users[$proposal->user_handle]['name'])); - switch ($proposal->getStatus()) { - case 'proposal': - echo ' &nbsp;(<a href="pepr-comments-show.php?id=' . $proposal->id; - echo '">Comments</a>)'; - break; - case 'vote': - case 'finished': - $voteSums = ppVote::getSum($dbh, $proposal->id); - echo ' &nbsp;(<a href="pepr-votes-show.php?id=' . $proposal->id; - echo '">Vote</a> sum: <strong>' . $voteSums['all'] . '</strong>'; - echo '<small>, ' . $voteSums['conditional']; - echo ' conditional</small>)'; - } - echo "</li>\n"; -} - -if ($selectStatus == '' && isset($proposal) && $proposal->getStatus() == 'finished') { - print_link('pepr-overview.php?filter=finished', 'All finished proposals'); -} - -echo "</ul>"; - -if (isset($proposal)) { - echo "<p>"; - echo "<a href='/feeds/pepr_".@$proposal->getStatus().".rss'>Aggregate this.</a>"; - echo "</p>"; -} -response_footer(); - -?> +localRedirect("index.php"); http://cvs.php.net/viewcvs.cgi/pearweb/public_html/pepr/pepr-proposal-delete.php?r1=1.14&r2=1.15&diff_format=u Index: pearweb/public_html/pepr/pepr-proposal-delete.php diff -u pearweb/public_html/pepr/pepr-proposal-delete.php:1.14 pearweb/public_html/pepr/pepr-proposal-delete.php:1.15 --- pearweb/public_html/pepr/pepr-proposal-delete.php:1.14 Fri Sep 9 14:46:50 2005 +++ pearweb/public_html/pepr/pepr-proposal-delete.php Thu Jun 15 19:39:03 2006 @@ -17,7 +17,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: pepr-proposal-delete.php,v 1.14 2005/09/09 14:46:50 pajoye Exp $ + * @version $Id: pepr-proposal-delete.php,v 1.15 2006/06/15 19:39:03 mj Exp $ */ /** @@ -32,7 +32,7 @@ echo "<h1>Delete Proposal</h1>\n"; report_success('Proposal deleted successfully.'); echo '<p>'; - print_link('/pepr/pepr-overview.php', 'Back to PEPr Home Page'); + print_link('/pepr/', 'Back to PEPr Home Page'); echo "</p>\n"; response_footer(); exit;
« previous php.pear.cvs (#40725) next »