svn: /pear/pearweb/trunk/include/ pear-class-license.php pear-config.php
| From: | Daniel O'Connor | Date: | Tue, 23 Feb 2010 11:09:13 +0000 |
| Subject: | svn: /pear/pearweb/trunk/include/ pear-class-license.php pear-config.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9206@lists.php.net to get a copy of this message | ||
clockwerx Tue, 23 Feb 2010 11:09:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=295403
Log:
Bug #16747 Broken license links
Bug: http://pear.php.net/bugs/16747 (unknown)
Changed paths:
U pear/pearweb/trunk/include/pear-class-license.php
U pear/pearweb/trunk/include/pear-config.php
Modified: pear/pearweb/trunk/include/pear-class-license.php
===================================================================
--- pear/pearweb/trunk/include/pear-class-license.php 2010-02-23 11:07:39 UTC (rev 295402)
+++ pear/pearweb/trunk/include/pear-class-license.php 2010-02-23 11:09:13 UTC (rev 295403)
@@ -55,7 +55,7 @@
*/
public static function normalize($license)
{
- $normalized = $license;
+ $normalized = trim($license);
switch (strtolower($license)) {
case 'php':
@@ -202,59 +202,45 @@
*/
public static function getLink($license)
{
- $link = null;
+ $normalised = self::normalize($license);
- switch (self::normalize($license)) {
+ switch ($normalised) {
+
case 'PHP':
- $link = 'http://www.php.net/license';
- break;
+ return 'http://www.php.net/license';
case 'PHP 2.02':
- $license = 'http://www.php.net/license/2_02.txt';
- break;
+ return 'http://www.php.net/license/2_02.txt';
case 'PHP 3.01':
- $license = 'http://www.php.net/license/3_01.txt';
- break;
+ return 'http://www.php.net/license/3_01.txt';
case 'LGPL':
- $license = 'http://www.gnu.org/copyleft/lesser.html';
- break;
+ return 'http://www.gnu.org/copyleft/lesser.html';
case 'LGPL 2.1':
- $license = 'http://www.gnu.org/licenses/lgpl-2.1.html';
- break;
+ return 'http://www.gnu.org/licenses/lgpl-2.1.html';
case 'LGPL 3':
- $license = 'http://www.gnu.org/licenses/lgpl-3.0.html';
- break;
+ return 'http://www.gnu.org/licenses/lgpl-3.0.html';
case 'BSD':
- $license = 'http://www.opensource.org/licenses/bsd-license.php';
- break;
+ return 'http://www.opensource.org/licenses/bsd-license.php';
case 'MIT':
- $license = 'http://www.opensource.org/licenses/mit-license.php';
- break;
+ return 'http://www.opensource.org/licenses/mit-license.php';
case 'GPL':
- $license = 'http://www.gnu.org/copyleft/gpl.html';
- break;
+ return 'http://www.gnu.org/copyleft/gpl.html';
case 'Apache 2.0':
- $license = 'http://www.opensource.org/licenses/apache2.0.php';
- break;
+ return 'http://www.opensource.org/licenses/apache2.0.php';
case 'W3C':
- $license = 'http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231';
- break;
-
- default:
- $license = null;
- break;
+ return 'http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231';
}
- return $license;
+ return null;
}
/**
Modified: pear/pearweb/trunk/include/pear-config.php
===================================================================
--- pear/pearweb/trunk/include/pear-config.php 2010-02-23 11:07:39 UTC (rev 295402)
+++ pear/pearweb/trunk/include/pear-config.php 2010-02-23 11:09:13 UTC (rev 295403)
@@ -86,9 +86,9 @@
*/
define('PEAR_APIDOC_DIR', '/home/pear/packages/apidoc/');
// Where patches can be found
- define('PEAR_PATCHES', '/home/pear/pearweb/patches/');
+ define('PEAR_PATCHES', '/home/clockwerx/pear-svn/pearweb/trunk/patches/');
// Where proposed patches reside
- define('PEAR_CVS', '/home/pear/pearweb/patches/cvs/');
+ define('PEAR_CVS', '/home/clockwerx/pear-svn/pearweb/trunk/patches/cvs/');
/**
* PEPr: the address of the PEAR Developer email list
*
@@ -112,7 +112,7 @@
} else {
// Where pearweb's temporary files should be stored
define('PEAR_TMPDIR', '/var/tmp/pear');
- define('PEAR_PATCHTRACKER_TMPDIR', '/home/pear/pearweb/patches/');
+ define('PEAR_PATCHTRACKER_TMPDIR',
'/home/clockwerx/pear-svn/pearweb/trunk/patches/');
}
// Where pearweb's temporary CVS files should be stored