Split freeware licence in two

This commit is contained in:
Alexander Nicolaysen Sørnes
2008-01-06 13:20:40 +01:00
committed by Chris Morgan
parent 93f59469f8
commit 04057ee34b
2 changed files with 7 additions and 6 deletions

View File

@@ -15,10 +15,11 @@ require_once(BASE."include/monitor.php");
require_once(BASE."include/vote.php"); require_once(BASE."include/vote.php");
define("LICENSE_OPENSOURCE", "Open Source"); define("LICENSE_OPENSOURCE", "Open Source");
define("LICENSE_FREEWARE", "Freeware");
define("LICENSE_SHAREWARE", "Shareware"); define("LICENSE_SHAREWARE", "Shareware");
define("LICENSE_DEMO", "Demo"); define("LICENSE_DEMO", "Demo");
define("LICENSE_RETAIL", "Retail"); define("LICENSE_RETAIL", "Retail");
define('LICENSE_FREETOUSE', 'Free to use');
define('LICENSE_FREETOSHARE', 'Free to use and share');
/** /**
* Version class for handling versions. * Version class for handling versions.
@@ -1366,8 +1367,8 @@ class version {
$sReturn = "<select name=\"sLicense\">\n"; $sReturn = "<select name=\"sLicense\">\n";
$sReturn .= "<option value=\"\">Choose . . .</option>\n"; $sReturn .= "<option value=\"\">Choose . . .</option>\n";
$aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREEWARE, $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREETOUSE,
LICENSE_DEMO, LICENSE_SHAREWARE); LICENSE_FREETOSHARE, LICENSE_DEMO, LICENSE_SHAREWARE);
$iMax = count($aLicense); $iMax = count($aLicense);
for($i = 0; $i < $iMax; $i++) for($i = 0; $i < $iMax; $i++)
@@ -1389,8 +1390,8 @@ class version {
/* In order to prevent MySQL injections. Returns matched license */ /* In order to prevent MySQL injections. Returns matched license */
public static function checkLicense($sLicense) public static function checkLicense($sLicense)
{ {
$aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREEWARE, $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREETOUSE,
LICENSE_DEMO, LICENSE_SHAREWARE); LICENSE_FREETOSHARE, LICENSE_DEMO, LICENSE_SHAREWARE);
foreach($aLicense as $sElement) foreach($aLicense as $sElement)
{ {

View File

@@ -58,7 +58,7 @@ create table appVersion (
ratingRelease text, ratingRelease text,
submitTime datetime NOT NULL, submitTime datetime NOT NULL,
submitterId int(11) NOT NULL default '0', submitterId int(11) NOT NULL default '0',
license enum('Retail','Open Source','Freeware','Demo','Shareware'), license enum('Retail','Open Source','Demo','Shareware','Free to use','Free to use and share'),
obsoleteBy int(11) NOT NULL default '0', obsoleteBy int(11) NOT NULL default '0',
state enum('accepted','queued','rejected','pending','deleted') NOT NULL default 'accepted', state enum('accepted','queued','rejected','pending','deleted') NOT NULL default 'accepted',
key(versionId), key(versionId),