Update of /cvsroot/fink/web/pdb
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv7633
Modified Files:
Tag: redesign_pdb
list.php maintainer.php nomaintainer.php search.php
section.php
Log Message:
Replaced list.php, maintainer.php, nomaintainer.php, search.php and section.php
with redirects
Index: section.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/section.php,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- section.php 23 Nov 2003 16:55:16 -0000 1.10
+++ section.php 10 Feb 2007 14:08:55 -0000 1.10.2.1
@@ -1,73 +1,24 @@
-<?
-$title = "Package Database - Section ";
+<?php
+$title = "Package Database - Obsolete page";
$cvs_author = '$Author$';
$cvs_date = '$Date$';
-$uses_pathinfo = 1;
-include "header.inc";
-$section = $pispec;
-?>
-
-<?
-if ($section == "-") {
-?>
-<p><b>No section specified.</b></p>
-<?
-} else { /* if (no section) */
-?>
-
-<h1>Archive Section <? print $section ?></h1>
-
-<?
-/* Add some special case bundle splitoffs */
-if($section == "games")
-{
- $sectionquery = " (section='$section' OR parentname REGEXP
'kdegames3|kdetoys3') ";
-} else if($section == "graphics")
-{
- $sectionquery = " (section='$section' OR parentname='kdegraphics3') ";
-} else if($section == "sound")
-{
- $sectionquery = " (section='$section' OR parentname='kdemultimedia3') ";
-} else if($section == "utils")
-{
- $sectionquery = " (section='$section' OR parentname='kdeutils3') ".
- " AND (parentname IS NULL OR parentname !=
'webmin') ";
-} else
-$sectionquery = " section='$section' ";
-
-$q = "SELECT name,descshort FROM package WHERE ". $sectionquery .
- " AND !(name REGEXP '.*-(dev|shlibs|bin|common|doc)$') ".
- "AND latest=1 ORDER BY name ASC";
-$rs = mysql_query($q, $dbh);
-if (!$rs) {
- print '<p><b>error during query:</b> '.mysql_error().'</p>';
-} else {
- $count = mysql_num_rows($rs);
-
-?>
-
-<p>Found <? print $count ?> packages in section <? print $section ?>:</p>
-
-<ul>
-<?
- while ($row = mysql_fetch_array($rs)) {
- $desc = " - ".$row[descshort];
- if (substr($desc,3,1) == "[" || substr($desc,3,1) == "<")
- $desc = "";
- print '<li><a
href="'.$pdbroot.'package.php/'.$row[name].'">'.$row[name].'</a>'.$desc."</li>\n";
- }
-?>
-</ul>
-<?
+/* check path info */
+$PATH_INFO = $HTTP_SERVER_VARS["PATH_INFO"];
+if (ereg("^/([a-zA-Z0-9_.+-]+)$", $PATH_INFO, $r)) {
+ $section = $r[1];
+} elseif (ereg("^/([a-zA-Z0-9_.+-]+/[a-zA-Z0-9_.+-]+)$", $PATH_INFO, $r)) {
+ $section = $r[1];
}
-} /* if (no section) */
-?>
+$server = $_SERVER['SERVER_NAME'];
+$location = "pdb/browse.php";
-<p><a href="<? print $pdbroot ?>sections.php">Back to section list</a></p>
+if (isset($section)) {
+ $location .= "?section=" . $section;
+}
+// This page is obsolete. We redirect to browse.php
+header("Location: http://$server/$location");
-<?
-include "footer.inc";
?>
Index: maintainer.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/maintainer.php,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- maintainer.php 25 Oct 2005 00:57:52 -0000 1.2
+++ maintainer.php 10 Feb 2007 14:08:55 -0000 1.2.2.1
@@ -1,55 +1,17 @@
<?
-$title = "Package Database - Maintainer ";
+$title = "Package Database - Obsolete page";
$cvs_author = '$Author$';
$cvs_date = '$Date$';
-include "header.inc";
-?>
-
-<?
-if (!isset($_GET['maintainer'])) {
-?>
-<p><b>No maintainer specified.</b></p>
-<?
-} else { /* if (no maintainer) */
-$maintainer = htmlspecialchars($_GET['maintainer']);
-?>
-
-<h1>Packages maintained by <? print $maintainer ?></h1>
-
-<?
-$q = "SELECT name,descshort FROM package WHERE maintainer LIKE
'%$maintainer%'".
- " AND !(name REGEXP '.*-(dev|shlibs|bin|common|doc)$') ".
- "AND latest=1 ORDER BY name ASC";
-$rs = mysql_query($q, $dbh);
-if (!$rs) {
- print '<p><b>error during query:</b> '.mysql_error().'</p>';
-} else {
- $count = mysql_num_rows($rs);
-
-?>
-
-<p>Found <? print $count ?> packages maintained by <? print $maintainer ?>:</p>
+$server = $_SERVER['SERVER_NAME'];
+$location = "pdb/browse.php";
-<ul>
-<?
- while ($row = mysql_fetch_array($rs)) {
- $desc = " - ".$row[descshort];
- if (substr($desc,3,1) == "[" || substr($desc,3,1) == "<")
- $desc = "";
- print '<li><a
href="'.$pdbroot.'package.php/'.$row[name].'">'.$row[name].'</a>'.$desc."</li>\n";
- }
-?>
-</ul>
-<?
+if (isset($_GET['maintainer'])) {
+ $maintainer = htmlspecialchars($_GET['maintainer']);
+ $location .= "?maintainer=" . $maintainer;
}
-} /* if (no maintainer) */
-?>
-
-<!-- <p><a href="<? print $pdbroot ?>sections.php">Back to section
list</a></p> -->
-
+// This page is obsolete. We redirect to browse.php
+header("Location: http://" . $server . "/" . $location);
-<?
-include "footer.inc";
?>
Index: search.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/search.php,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -d -r1.9 -r1.9.2.1
--- search.php 11 Feb 2005 06:11:30 -0000 1.9
+++ search.php 10 Feb 2007 14:08:55 -0000 1.9.2.1
@@ -1,144 +1,12 @@
<?
-$title = "Package Database - Contents Search";
+$title = "Package Database - Obsolete page";
$cvs_author = '$Author$';
$cvs_date = '$Date$';
-include "header.inc";
-
-$summary = ereg_replace(" ", "", param(summary));
-$filename = ereg_replace(" ", "", param(filename));
-
-if (ereg("[^a-zA-Z0-9_.+-]", $summary) || ereg("[^a-zA-Z0-9_.+-]", $filename))
{
-print "yes\n";
-?>
- <h1>Package Search</h1>
-
- <form action="search.php" method="GET">
- <p>Search package summaries: <input type="text" name="summary"
size="15" value="<?
- print $summary ?>">
- </p>
-
-<?
-if (param(c))
-{
-?>
- <p>Search package contents: <input type="text" name="filename"
size="15" value="<?
- print $filename ?>">
- <input type="submit" value="Search">
- </p>
-<?
-}
-?>
-</form>
-
-<p>You have entered a search text that contains invalid characters.</p>
-
-<?
-} else { /* $search_key valid */
-?>
-
- <h1>Package Search</h1>
-
- <form action="search.php" method="GET">
- <p>Search package summaries: <input type="text" name="summary"
size="15" value="<?
- print $summary ?>">
- </p>
-
-<?
-if (param(c))
-{
-?>
- <p>Search package contents: <input type="text" name="filename"
size="15" value="<?
- print $filename ?>">
- <input type=checkbox name=ignoredirs>Ignore Dirs
- <input type="submit" value="Search">
- </p>
-<?
-}
-?>
-
-</form>
-
-<?
-
-if(param(order)) {
- $sortorder = param(order);
- print "order $sortorder ";
-} else {
- if(param(filename))
- $sortorder = "filename";
- else if (param(summary))
- $sortorder = "name";
-}
-
-if (param(filename)) {
-
- if(param(ignoredirs)){
- $directories = " AND fileperms REGEXP '^[^d]' ";
- }
- $dosearch = 1;
- $q = "SELECT
filename,filepath,fileperms,filesize,pkghash,version,contentspackages.package,contentspackages.release
".
- "FROM contents,contentspackages ".
- "WHERE contents.file_id=contentspackages.file_id ".
- "AND filename LIKE '%$filename%' ". $directories .
- "ORDER BY $sortorder";
- # ASC LIMIT 0,50";
-} else if (param(summary)) {
- $dosearch = 1;
- $q = "SELECT name,descshort FROM package ".
- "WHERE (name LIKE '%$summary%' OR descshort LIKE '%$summary%') ".
- "AND latest=1 ORDER BY $sortorder ASC";
-}
-
-if($dosearch) {
-
- $rs = mysql_query($q, $dbh);
- if (!$rs) {
- print '<p><b>error during query:</b> '.mysql_error().'</p>';
- } else {
- $count = mysql_num_rows($rs);
- param(summary) ? $search_key = param(summary) : $search_key =
param(filename);
- if ($count == 0) {
- print "<p>Found no packages that match $search_key.</p>";
- } elseif ($count == 1) {
- print "<p>Found 1 package that matches $search_key:</p>";
- } else {
- print "<p>Found $count packages that match $search_key:</p>";
- }
- if ($count > 0) {
- if(param(filename)) {
- print 'Sort: <a
href="'.$pdbroot."search.php?filename=$filename&summary=$summary&order=package\">Package</a>
- ";
- print '<a
href="'.$pdbroot."search.php?filename=$filename&summary=$summary&order=filepath,filename\">Filename</a>";
- } else {
- print 'Sort: <a
href="'.$pdbroot."search.php?filename=$filename&summary=$summary&order=name\">Package</a>
- ";
- print '<a
href="'.$pdbroot."search.php?filename=$filename&summary=$summary&order=descshort\">Summary</a>";
- }
-
- print "<ul>"; while ($row = mysql_fetch_array($rs)) {
- $row["name"] ? $name = $row["name"] : $name = $row["package"];
- $vers = $row["version"];
- $tree = $row["release"];
- $row[descshort] ? $desc = " - $row[descshort]" : $desc = " - $vers -
$row[filepath]";
- if(! param(summary)) {
- print '<li><a
href="'.$pdbroot."packagedetails.php?tree=$tree&pkg=$name&version=$vers\">".$name.'</a>'.$desc."</li>\n";
- } else {
- print '<li><a
href="'.$pdbroot."package.php/$name\">".$name.'</a>'.$desc."</li>\n";
- }
- }
- print "</ul>\n";
- }
- }
-} elseif ($have_key) {
- print "<p>No search string entered.</p>\n";
-}
-
-
-} /* $search_key valid */
-?>
+$server = $_SERVER['SERVER_NAME'];
+$location = "pdb/browse.php";
-<script type="text/javascript" language="JavaScript"
src="http://db3.net-filter.com/script/13500.js"></script>
-<noscript><img
src="http://db3.net-filter.com/db.php?id=13500&page=unknown"
alt=""></noscript>
+// This page is obsolete. We redirect to browse.php
+header("Location: http://" . $server . "/" . $location);
-<?
-include "footer.inc";
?>
Index: nomaintainer.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/nomaintainer.php,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- nomaintainer.php 1 Aug 2006 16:06:51 -0000 1.10
+++ nomaintainer.php 10 Feb 2007 14:08:55 -0000 1.10.2.1
@@ -1,64 +1,12 @@
-<?
-$title = "Package Database";
+<?php
+$title = "Package Database - Obsolete page";
$cvs_author = '$Author$';
$cvs_date = '$Date$';
-include "header.inc";
-
-if (!param(distro)) {
- $distro_sql = "AND (release LIKE 'current-10.3%' OR release LIKE
'current-10.4%')";
- $distro_txt = ' in the 10.3 and 10.4 releases';
-} else if (!strcmp(param(distro),"all")) {
- $distro_sql = '';
- $distro_txt = '';
-} else if (ereg("[^a-zA-Z0-9_.+-]",param(distro))) {
- print '<p><b>error during query:</b> invalid distro</p>';
- $distro_sql = '';
- $distro_txt = '';
-} else {
- $distro_sql = "AND release LIKE 'current-".param(distro)."%'";
- $distro_txt = ' in the '.param(distro). ' release';
-}
-
-$q = "SELECT name,descshort FROM package ".
- "WHERE maintainer LIKE '%None%' AND latest=1 AND parentname IS NULL ".
- "$distro_sql ORDER BY name ASC";
-$rs = mysql_query($q, $dbh);
-if (!$rs) {
- print '<p><b>error during query:</b> '.mysql_error().'</p>';
-} else {
- $count = mysql_num_rows($rs);
-?>
-
-
-<h1>Packages without Maintainers</h1>
-
-<p>
-This is a list of packages that need a new maintainer, because the original
-maintainer who brought the package to Fink is no longer able to maintain
-it. If you are interested in taking on one of these packages, and you are
-not already a core Fink developer, please <a
-href="mailto:fink-develATlistsDOTsourceforgeDOTnet">contact the Fink
-developers</a> and volunteer!</p>
-<p>Core Fink developers are welcome to adopt a package by changing the
-maintainer name in the package's .info file to their own.</p>
-
-<p>Found <? print $count ?> packages without maintainers<? print $distro_txt
?>:</p>
+$server = $_SERVER['SERVER_NAME'];
+$location = "pdb/browse.php?maintainer=None&nochildren=on";
-<ul>
-<?
- while ($row = mysql_fetch_array($rs)) {
- $desc = " - ".$row[descshort];
- if (substr($desc,3,1) == "[" || substr($desc,3,1) == "<")
- $desc = "";
- print '<li><a
href="'.$pdbroot.'package.php/'.$row[name].'">'.$row[name].'</a>'.$desc."</li>\n";
- }
-?>
-</ul>
-<?
-}
-?>
+// This page is obsolete. We redirect to browse.php
+header("Location: http://$server/$location");
-<?
-include "footer.inc";
?>
Index: list.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/list.php,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- list.php 25 Oct 2005 00:59:07 -0000 1.6
+++ list.php 10 Feb 2007 14:08:55 -0000 1.6.2.1
@@ -1,47 +1,12 @@
-<?
-$title = "Package Database";
+<?php
+$title = "Package Database - Obsolete page";
$cvs_author = '$Author$';
$cvs_date = '$Date$';
-include "header.inc";
-?>
-
-
-<h1>All Packages By Name</h1>
-
-<p>
-This is a complete list of the packages in the Fink package database.
-Note that it lists all packages, including the unstable tree and
-the latest <a
href="http://fink.sourceforge.net/doc/cvsaccess/index.php">packages from
-CVS</a>.
-</p>
-
-<?
-$q = "SELECT name,descshort FROM package ".
- "WHERE latest=1 ORDER BY name ASC";
-$rs = mysql_query($q, $dbh);
-if (!$rs) {
- print '<p><b>error during query:</b> '.mysql_error().'</p>';
-} else {
- $count = mysql_num_rows($rs);
-?>
-
-<p>Found <? print $count ?> packages:</p>
+$server = $_SERVER['SERVER_NAME'];
+$location = "pdb/browse.php";
-<ul>
-<?
- while ($row = mysql_fetch_array($rs)) {
- $desc = " - ".$row[descshort];
- if (substr($desc,3,1) == "[" || substr($desc,3,1) == "<")
- $desc = "";
- print '<li><a
href="package.php/'.$row[name].'">'.$row[name].'</a>'.$desc."</li>\n";
- }
-?>
-</ul>
-<?
-}
-?>
+// This page is obsolete. We redirect to browse.php
+header("Location: http://$server/$location");
-<?
-include "footer.inc";
?>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits