cvs: pearweb /public_html package-changelog.php package-info.php package-stats.php release-upload.php rss.php weeklynews.php
| From: | Martin Jansen | Date: | Sat, 12 Jul 2003 10:42:08 +0000 |
| Subject: | cvs: pearweb /public_html package-changelog.php package-info.php package-stats.php release-upload.php rss.php weeklynews.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-11463@lists.php.net to get a copy of this message | ||
mj Sat Jul 12 06:42:08 2003 EDT
Modified files:
/pearweb/public_html package-changelog.php package-info.php
package-stats.php rss.php weeklynews.php
release-upload.php
Log:
* Don't use the ID of a package
Index: pearweb/public_html/package-changelog.php diff -u pearweb/public_html/package-changelog.php:1.6 pearweb/public_html/package-changelog.php:1.7 --- pearweb/public_html/package-changelog.php:1.6 Sun Mar 30 11:06:01 2003 +++ pearweb/public_html/package-changelog.php Sat Jul 12 06:42:07 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: package-changelog.php,v 1.6 2003/03/30 16:06:01 mj Exp $ + $Id: package-changelog.php,v 1.7 2003/07/12 10:42:07 mj Exp $ */ // expected url vars: pacid package @@ -36,7 +36,7 @@ $name = $pkg['name']; response_header("$name Changelog"); -print '<p>' . make_link("package-info.php?pacid=$pacid", 'Return') . '</p>'; +print '<p>' . make_link("/" . $name, 'Return') . '</p>'; $bb = new Borderbox("$name Changelog"); if (count($pkg['releases']) == 0) { @@ -62,6 +62,6 @@ print "</table>\n"; } $bb->end(); -print '<p>' . make_link("package-info.php?pacid=$pacid", 'Return') . '</p>'; +print '<p>' . make_link("/" . $name, 'Return') . '</p>'; response_footer(); ?> Index: pearweb/public_html/package-info.php diff -u pearweb/public_html/package-info.php:1.35 pearweb/public_html/package-info.php:1.36 --- pearweb/public_html/package-info.php:1.35 Sat Jul 12 06:33:23 2003 +++ pearweb/public_html/package-info.php Sat Jul 12 06:42:07 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: package-info.php,v 1.35 2003/07/12 10:33:23 mj Exp $ + $Id: package-info.php,v 1.36 2003/07/12 10:42:07 mj Exp $ */ // {{{ setup, queries @@ -346,7 +346,7 @@ foreach ($deps as $row) { // Print link if it's a PEAR package and it's in the db if ($row['type'] == 'pkg' AND $pid = $dbh->getOne(sprintf("SELECT id FROM packages WHERE name = '%s'", $row['name']))) { - $row['name'] = sprintf('<a href="package-info.php?pacid=%s">%s</a>', $pid, $row['name']); + $row['name'] = sprintf('<a href="/%s">%s</a>', $row['name'], $row['name']); } if (isset($rel_trans[$row['relation']])) { Index: pearweb/public_html/package-stats.php diff -u pearweb/public_html/package-stats.php:1.40 pearweb/public_html/package-stats.php:1.41 --- pearweb/public_html/package-stats.php:1.40 Tue Jul 8 02:21:23 2003 +++ pearweb/public_html/package-stats.php Sat Jul 12 06:42:07 2003 @@ -16,7 +16,7 @@ | Authors: Martin Jansen <mj@php.net> | | Richard Heyes <richard@php.net> | +----------------------------------------------------------------------+ - $Id: package-stats.php,v 1.40 2003/07/08 06:21:23 jon Exp $ + $Id: package-stats.php,v 1.41 2003/07/12 10:42:07 mj Exp $ */ require_once "HTML/Form.php"; @@ -133,7 +133,7 @@ $info = package::info($_GET['pid']); - echo "<h2>Statistics for package \"<a href=\"package-info.php?pacid=".$_GET['pid']."\">" . $info['name'] . "</a>\"</h2>\n"; + echo "<h2>Statistics for package \"<a href=\"/" . $info['name'] . "\">" . $info['name'] . "</a>\"</h2>\n"; $bb = new Borderbox("General statistics"); echo "Number of releases: <b>" . count($info['releases']) . "</b><br />\n"; echo "Total downloads: <b>" . number_format(statistics::package($_GET['pid']), 0, '.', ',') . "</b><br />\n"; @@ -155,7 +155,7 @@ (isset($_GET['rid']) ? $_GET['rid'] : '')); foreach ($release_statistics as $key => $value) { - $version = make_link('package-info.php?pacid=' . $_GET['pid'] . + $version = make_link('package-info.php?package=' . $info['name'] . '&release=' . $value['version'], $value['version']); echo '<tr>'; echo '<td>' . $version . '</td>'; @@ -181,6 +181,7 @@ $releases = $dbh->getAll('SELECT id, version FROM releases WHERE package = ' . $_GET['pid'], DB_FETCHMODE_ASSOC); ?> <br /><br /> + <script language="JavaScript" type="text/javascript"> <!-- function clearGraphList() @@ -240,6 +241,7 @@ } //--> </script> + <form name="graph_control" action="#"> <input type="hidden" name="pid" value="<?php echo @$_GET['pid']; ?>" /> <input type="hidden" name="rid" value="<?php echo @$_GET['rid']; ?>" /> @@ -376,8 +378,8 @@ $row['package'] = ""; } else { $lastPackage = $row['package']; - $row['package'] = "<a href=\"package-info.php?pacid=" . - $row['pid'] . "\">" . + $row['package'] = "<a href=\"package-info.php?package=" . + $info['name'] . "\">" . $row['package'] . "</a>\n"; } Index: pearweb/public_html/rss.php diff -u pearweb/public_html/rss.php:1.11 pearweb/public_html/rss.php:1.12 --- pearweb/public_html/rss.php:1.11 Sat Jun 14 15:26:56 2003 +++ pearweb/public_html/rss.php Sat Jul 12 06:42:08 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ - $Id: rss.php,v 1.11 2003/06/14 19:26:56 mj Exp $ + $Id: rss.php,v 1.12 2003/07/12 10:42:08 mj Exp $ */ /** @@ -59,8 +59,8 @@ echo " <item>\n"; echo " <title>" . $release['name'] . " " . $release['version'] . "</title>\n"; echo " <pubDate>" . $release['releasedate'] . "</pubDate>\n"; - printf(" <link>http://pear.php.net/package-info.php?pacid=%s&version=%s</link>\n", - $release['id'], + printf(" <link>http://pear.php.net/package-info.php?package=%s&version=%s</link>\n", + $release['name'], $release['version'] ); Index: pearweb/public_html/weeklynews.php diff -u pearweb/public_html/weeklynews.php:1.16 pearweb/public_html/weeklynews.php:1.17 --- pearweb/public_html/weeklynews.php:1.16 Sun Mar 30 11:06:01 2003 +++ pearweb/public_html/weeklynews.php Sat Jul 12 06:42:08 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: Alan Knowles <alan@akbkhome.com> | +----------------------------------------------------------------------+ - $Id: weeklynews.php,v 1.16 2003/03/30 16:06:01 mj Exp $ + $Id: weeklynews.php,v 1.17 2003/07/12 10:42:08 mj Exp $ */ @@ -157,7 +157,7 @@ $desc .= '...'; } $out .= "<tr><td valign='top' class='compact'>"; - $out .= "<h3><a href=\"/package-info.php?pacid=$id&release=$version\">"; + $out .= "<h3><a href=\"/package-info.php?package=$name&release=$version\">"; $out .= "$name</a></H3> ". nl2br($description); $out .= "<P><B>".getText("Release")." $version - $state</B> <i>$releasedate:</i><BR>". nl2br($releasenotes); $out .= "</td></tr>"; Index: pearweb/public_html/release-upload.php diff -u pearweb/public_html/release-upload.php:1.31 pearweb/public_html/release-upload.php:1.32 --- pearweb/public_html/release-upload.php:1.31 Sun Mar 30 11:06:01 2003 +++ pearweb/public_html/release-upload.php Sat Jul 12 06:42:08 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: release-upload.php,v 1.31 2003/03/30 16:06:01 mj Exp $ + $Id: release-upload.php,v 1.32 2003/07/12 10:42:08 mj Exp $ */ auth_require(); @@ -70,7 +70,8 @@ if (PEAR::isError($pacid)) { display_error($pacid->getMessage()); break; } - if (!checkUser($_COOKIE['PEAR_USER'], $pacid)) { + if (!user::isAdmin($_COOKIE['PEAR_USER']) && + !user::maintains($_COOKIE['PEAR_USER'], $pacid, "lead")) { display_error("You don't have permissions to upload this release."); break; } @@ -107,7 +108,7 @@ print "has been completed successfully and the promoting cycle for it has started.<br /><br />"; print '<center>'. - make_link("package-info.php?pacid=$pacid", 'Visit package home') . + make_link("/" . $info['package'], 'Visit package home') . '</center>'; $display_form = $display_verification = false;
Index: pearweb/public_html/package-changelog.php diff -u pearweb/public_html/package-changelog.php:1.6 pearweb/public_html/package-changelog.php:1.7 --- pearweb/public_html/package-changelog.php:1.6 Sun Mar 30 11:06:01 2003 +++ pearweb/public_html/package-changelog.php Sat Jul 12 06:42:07 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: package-changelog.php,v 1.6 2003/03/30 16:06:01 mj Exp $ + $Id: package-changelog.php,v 1.7 2003/07/12 10:42:07 mj Exp $ */ // expected url vars: pacid package @@ -36,7 +36,7 @@ $name = $pkg['name']; response_header("$name Changelog"); -print '<p>' . make_link("package-info.php?pacid=$pacid", 'Return') . '</p>'; +print '<p>' . make_link("/" . $name, 'Return') . '</p>'; $bb = new Borderbox("$name Changelog"); if (count($pkg['releases']) == 0) { @@ -62,6 +62,6 @@ print "</table>\n"; } $bb->end(); -print '<p>' . make_link("package-info.php?pacid=$pacid", 'Return') . '</p>'; +print '<p>' . make_link("/" . $name, 'Return') . '</p>'; response_footer(); ?> Index: pearweb/public_html/package-info.php diff -u pearweb/public_html/package-info.php:1.35 pearweb/public_html/package-info.php:1.36 --- pearweb/public_html/package-info.php:1.35 Sat Jul 12 06:33:23 2003 +++ pearweb/public_html/package-info.php Sat Jul 12 06:42:07 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: package-info.php,v 1.35 2003/07/12 10:33:23 mj Exp $ + $Id: package-info.php,v 1.36 2003/07/12 10:42:07 mj Exp $ */ // {{{ setup, queries @@ -346,7 +346,7 @@ foreach ($deps as $row) { // Print link if it's a PEAR package and it's in the db if ($row['type'] == 'pkg' AND $pid = $dbh->getOne(sprintf("SELECT id FROM packages WHERE name = '%s'", $row['name']))) { - $row['name'] = sprintf('<a href="package-info.php?pacid=%s">%s</a>', $pid, $row['name']); + $row['name'] = sprintf('<a href="/%s">%s</a>', $row['name'], $row['name']); } if (isset($rel_trans[$row['relation']])) { Index: pearweb/public_html/package-stats.php diff -u pearweb/public_html/package-stats.php:1.40 pearweb/public_html/package-stats.php:1.41 --- pearweb/public_html/package-stats.php:1.40 Tue Jul 8 02:21:23 2003 +++ pearweb/public_html/package-stats.php Sat Jul 12 06:42:07 2003 @@ -16,7 +16,7 @@ | Authors: Martin Jansen <mj@php.net> | | Richard Heyes <richard@php.net> | +----------------------------------------------------------------------+ - $Id: package-stats.php,v 1.40 2003/07/08 06:21:23 jon Exp $ + $Id: package-stats.php,v 1.41 2003/07/12 10:42:07 mj Exp $ */ require_once "HTML/Form.php"; @@ -133,7 +133,7 @@ $info = package::info($_GET['pid']); - echo "<h2>Statistics for package \"<a href=\"package-info.php?pacid=".$_GET['pid']."\">" . $info['name'] . "</a>\"</h2>\n"; + echo "<h2>Statistics for package \"<a href=\"/" . $info['name'] . "\">" . $info['name'] . "</a>\"</h2>\n"; $bb = new Borderbox("General statistics"); echo "Number of releases: <b>" . count($info['releases']) . "</b><br />\n"; echo "Total downloads: <b>" . number_format(statistics::package($_GET['pid']), 0, '.', ',') . "</b><br />\n"; @@ -155,7 +155,7 @@ (isset($_GET['rid']) ? $_GET['rid'] : '')); foreach ($release_statistics as $key => $value) { - $version = make_link('package-info.php?pacid=' . $_GET['pid'] . + $version = make_link('package-info.php?package=' . $info['name'] . '&release=' . $value['version'], $value['version']); echo '<tr>'; echo '<td>' . $version . '</td>'; @@ -181,6 +181,7 @@ $releases = $dbh->getAll('SELECT id, version FROM releases WHERE package = ' . $_GET['pid'], DB_FETCHMODE_ASSOC); ?> <br /><br /> + <script language="JavaScript" type="text/javascript"> <!-- function clearGraphList() @@ -240,6 +241,7 @@ } //--> </script> + <form name="graph_control" action="#"> <input type="hidden" name="pid" value="<?php echo @$_GET['pid']; ?>" /> <input type="hidden" name="rid" value="<?php echo @$_GET['rid']; ?>" /> @@ -376,8 +378,8 @@ $row['package'] = ""; } else { $lastPackage = $row['package']; - $row['package'] = "<a href=\"package-info.php?pacid=" . - $row['pid'] . "\">" . + $row['package'] = "<a href=\"package-info.php?package=" . + $info['name'] . "\">" . $row['package'] . "</a>\n"; } Index: pearweb/public_html/rss.php diff -u pearweb/public_html/rss.php:1.11 pearweb/public_html/rss.php:1.12 --- pearweb/public_html/rss.php:1.11 Sat Jun 14 15:26:56 2003 +++ pearweb/public_html/rss.php Sat Jul 12 06:42:08 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ - $Id: rss.php,v 1.11 2003/06/14 19:26:56 mj Exp $ + $Id: rss.php,v 1.12 2003/07/12 10:42:08 mj Exp $ */ /** @@ -59,8 +59,8 @@ echo " <item>\n"; echo " <title>" . $release['name'] . " " . $release['version'] . "</title>\n"; echo " <pubDate>" . $release['releasedate'] . "</pubDate>\n"; - printf(" <link>http://pear.php.net/package-info.php?pacid=%s&version=%s</link>\n", - $release['id'], + printf(" <link>http://pear.php.net/package-info.php?package=%s&version=%s</link>\n", + $release['name'], $release['version'] ); Index: pearweb/public_html/weeklynews.php diff -u pearweb/public_html/weeklynews.php:1.16 pearweb/public_html/weeklynews.php:1.17 --- pearweb/public_html/weeklynews.php:1.16 Sun Mar 30 11:06:01 2003 +++ pearweb/public_html/weeklynews.php Sat Jul 12 06:42:08 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: Alan Knowles <alan@akbkhome.com> | +----------------------------------------------------------------------+ - $Id: weeklynews.php,v 1.16 2003/03/30 16:06:01 mj Exp $ + $Id: weeklynews.php,v 1.17 2003/07/12 10:42:08 mj Exp $ */ @@ -157,7 +157,7 @@ $desc .= '...'; } $out .= "<tr><td valign='top' class='compact'>"; - $out .= "<h3><a href=\"/package-info.php?pacid=$id&release=$version\">"; + $out .= "<h3><a href=\"/package-info.php?package=$name&release=$version\">"; $out .= "$name</a></H3> ". nl2br($description); $out .= "<P><B>".getText("Release")." $version - $state</B> <i>$releasedate:</i><BR>". nl2br($releasenotes); $out .= "</td></tr>"; Index: pearweb/public_html/release-upload.php diff -u pearweb/public_html/release-upload.php:1.31 pearweb/public_html/release-upload.php:1.32 --- pearweb/public_html/release-upload.php:1.31 Sun Mar 30 11:06:01 2003 +++ pearweb/public_html/release-upload.php Sat Jul 12 06:42:08 2003 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: release-upload.php,v 1.31 2003/03/30 16:06:01 mj Exp $ + $Id: release-upload.php,v 1.32 2003/07/12 10:42:08 mj Exp $ */ auth_require(); @@ -70,7 +70,8 @@ if (PEAR::isError($pacid)) { display_error($pacid->getMessage()); break; } - if (!checkUser($_COOKIE['PEAR_USER'], $pacid)) { + if (!user::isAdmin($_COOKIE['PEAR_USER']) && + !user::maintains($_COOKIE['PEAR_USER'], $pacid, "lead")) { display_error("You don't have permissions to upload this release."); break; } @@ -107,7 +108,7 @@ print "has been completed successfully and the promoting cycle for it has started.<br /><br />"; print '<center>'. - make_link("package-info.php?pacid=$pacid", 'Visit package home') . + make_link("/" . $info['package'], 'Visit package home') . '</center>'; $display_form = $display_verification = false;