Update of /cvsroot/fink/web/pdb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4965
Modified Files:
package.php
Log Message:
Modify the package script to always show the latest maintainer. This might not be
pretty, but it seems to work. I hope someone can have a closer look. Thanks
Index: package.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/package.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- package.php 31 Mar 2004 07:01:54 -0000 1.23
+++ package.php 10 Jul 2004 14:59:06 -0000 1.24
@@ -24,7 +24,9 @@
<?
$q = "SELECT * FROM package WHERE name='$package' ORDER BY latest DESC";
+$qmaintainer = "SELECT * FROM package WHERE name='$package' AND latest=1";
$rs = mysql_query($q, $dbh);
+$qs = mysql_query($qmaintainer, $dbh);
if (!$rs) {
print '<p><b>error during query:</b> '.mysql_error().'</p>';
} else {
@@ -37,6 +39,8 @@
}
$row = $lastrow;
+$maintainer = mysql_fetch_row($qs);
+
it_start2();
it_item2("Tree", "Stable", "Unstable");
for ($i = 0; $i < sizeof($releases); $i++) {
@@ -61,10 +65,10 @@
it_item("Section:", '<a
href="'.$pdbroot.'section.php/'.$row[section].'">'.$row[section].'</a>');
// Get the maintainer field, and try to parse out the email address
- if ($row[maintainer]) {
- $maintainer = $row[maintainer];
- preg_match("/^(.+?)\s*<(\S+)>/", $maintainer, $matches);
- $maintainer = $matches[1];
+ if ($maintainer[8]) {
+ $maintainers = $maintainer[8];
+ preg_match("/^(.+?)\s*<(\S+)>/", $maintainers, $matches);
+ $maintainers = $matches[1];
$email = $matches[2];
} else {
$maintainer = "unknown";
@@ -72,7 +76,7 @@
// If there was an email specified, make the maintainer field a mailto: link
if ($email) {
$email = str_replace(array("@","."), array("AT","DOT"), $email);
- it_item("Maintainer:", '<a
href="'.$pdbroot.'maintainer.php?maintainer='.$maintainer.'">'.$maintainer.'
<'.$email.'>'.'</a>');
+ it_item("Maintainer:", '<a
href="'.$pdbroot.'maintainer.php?maintainer='.$maintainers.'">'.$maintainers.'
<'.$email.'>'.'</a>');
# it_item("Maintainer:", '<a href="mailto:'.$email.'">'.$maintainer.'</a>');
} else {
it_item("Maintainer:", '<a
href="'.$pdbroot.'maintainer.php?maintainer='.$maintainer.'">'.$maintainer.'</a>');
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits