|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-10-18 06:27 UTC] lsmith@php.net
Description: ------------ The license field should be a drop down with all allowed choices. Also there should be a note somewhere on pearweb that the license listed on the package choice is irrelevant if the license headers in the actual source code is different. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
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));