Bug #5713 [Asn->Bgs]: license should be a drop down
| From: | pajoye@php.net | Date: | Sat, 18 Feb 2006 14:07:51 +0000 |
| Subject: | Bug #5713 [Asn->Bgs]: license should be a drop down | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-4800@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=5713&edit=1
ID: 5713
Updated by: pajoye@php.net
Reported By: lsmith at php dot net
-Status: Assigned
+Status: Bogus
Id: 5713
Type: Bug
Package: Web Site
Operating System: irrelevant
PHP Version: Irrelevant
Assigned To: mj
New Comment:
Sorry, but your problem does not imply a bug in PEAR itself. For a
list of more appropriate places to ask for help using PEAR, please
visit http://pear.php.net/support/ as this bug system is
not the
appropriate forum for asking support questions.
Thank you for your interest in PEAR.
I agree with Martin here, but either the PEAR Group or QA should review
the licenses for every new package.
Previous Comments:
------------------------------------------------------------------------
[2005-10-18 15:18:53] lsmith at php dot net
either way .. get_license_link() suffers form the same issue ..
------------------------------------------------------------------------
[2005-10-18 15:07:10] mj at php dot net
I don't think that converting the text box into a select field is a
wise idea, because we allow *all* BSD-style licenses for PEAR packages
and thus everybody could come up with some flavour of the original BSD
license which would be not included in our select field. Another
problem is that we would have to maintain a huge number of entries for
the field because usually every license exists in different versions.
(Think of PHP 2.02 vs. 3.0.)
------------------------------------------------------------------------
[2005-10-18 14:54:20] mj at php dot net
As a start, the packages table on pear.php.net has been altered so that
the license field now takes up to 50 characters.
------------------------------------------------------------------------
[2005-10-18 12:16:10] lsmith at php dot net
alternatively:
http://pooteeweet.org/pearweb/pearweb_license.diff
------------------------------------------------------------------------
[2005-10-18 12:12:41] lsmith at php dot net
Since I am still a pearweb n00b .. with no local pearweb running ..
here goes a diff ..
Index: public_html/package-edit.php
===================================================================
RCS file: /repository/pearweb/public_html/package-edit.php,v
retrieving revision 1.35
diff -w -b -r1.35 package-edit.php
216c216,225
< <?php $form->displayText('license', $row['license'], 50, 20);
?>
---
> <?php
> $sth = $dbh->query('SELECT name FROM licenses ORDER BY name');
>
> while ($license_row = $sth->fetchRow(DB_FETCHMODE_ASSOC)) {
> $rows[$license_row['name']] = $license_row['name'];
> }
> $form->displaySelect("license", $rows, (int)$row['license']);
> ?>
>
> <?php $form->displayText('license', $row['license'], 50, 50);
> ?>
Index: public_html/package-new.php
===================================================================
RCS file: /repository/pearweb/public_html/package-new.php,v
retrieving revision 1.35
diff -w -b -r1.35 package-new.php
120a121
> $licenses = $dbh->getAssoc("SELECT name AS id,name FROM licenses
ORDER BY name");
128c129,131
< $bb->horizHeadRow("License", $form->returnText("license",
get("license"), 20));
---
> $lics = $form->returnSelect("license", $licenses, get("license"),
1,
> "--Select License--");
> $bb->horizHeadRow("License", $lics);
Index: sql/packages.sql
===================================================================
RCS file: /repository/pearweb/sql/packages.sql,v
retrieving revision 1.17
diff -w -b -r1.17 packages.sql
11c11
< license varchar(20) default NULL,
---
> license varchar(50) default NULL,
Index: include/pear-format-html.php
===================================================================
RCS file: /repository/pearweb/include/pear-format-html.php,v
retrieving revision 1.176
diff -w -b -r1.176 pear-format-html.php
701,721c701,702
< switch ($license) {
<
< case 'PHP License' :
< case 'PHP 2.02' :
< $link = 'http://www.php.net/license/2_02.txt';
< break;
<
< case 'GPL' :
< case 'GNU General Public License' :
< $link = 'http://www.gnu.org/licenses/gpl.html';
< break;
<
< case 'LGPL' :
< case 'GNU Lesser General Public License' :
< $link = 'http://www.gnu.org/licenses/lgpl.html';
< break;
<
< default :
< $link = '';
< break;
< }
---
> global $dbh;
> $link = $dbh->getOne("SELECT link FROM licenses WHERE name = ?",
array($license));
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=5713
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=5713&edit=1