Module: appdb Branch: master Commit: 04057ee34b027abd5479645f4d7e90e83083ddee URL: http://source.winehq.org/git/appdb.git/?a=commit;h=04057ee34b027abd5479645f4... Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sun Jan 6 13:20:40 2008 +0100 Split freeware licence in two --- include/version.php | 11 ++++++----- tables/appdb_tables.sql | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/version.php b/include/version.php index d3ebff3..6c25c68 100644 --- a/include/version.php +++ b/include/version.php @@ -15,10 +15,11 @@ require_once(BASE."include/monitor.php"); require_once(BASE."include/vote.php"); define("LICENSE_OPENSOURCE", "Open Source"); -define("LICENSE_FREEWARE", "Freeware"); define("LICENSE_SHAREWARE", "Shareware"); define("LICENSE_DEMO", "Demo"); define("LICENSE_RETAIL", "Retail"); +define('LICENSE_FREETOUSE', 'Free to use'); +define('LICENSE_FREETOSHARE', 'Free to use and share'); /** * Version class for handling versions. @@ -1366,8 +1367,8 @@ class version { $sReturn = "<select name=\"sLicense\">\n"; $sReturn .= "<option value=\"\">Choose . . .</option>\n"; - $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREEWARE, - LICENSE_DEMO, LICENSE_SHAREWARE); + $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREETOUSE, + LICENSE_FREETOSHARE, LICENSE_DEMO, LICENSE_SHAREWARE); $iMax = count($aLicense); for($i = 0; $i < $iMax; $i++) @@ -1389,8 +1390,8 @@ class version { /* In order to prevent MySQL injections. Returns matched license */ public static function checkLicense($sLicense) { - $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREEWARE, - LICENSE_DEMO, LICENSE_SHAREWARE); + $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREETOUSE, + LICENSE_FREETOSHARE, LICENSE_DEMO, LICENSE_SHAREWARE); foreach($aLicense as $sElement) { diff --git a/tables/appdb_tables.sql b/tables/appdb_tables.sql index 5f486e7..2b3a479 100644 --- a/tables/appdb_tables.sql +++ b/tables/appdb_tables.sql @@ -58,7 +58,7 @@ create table appVersion ( ratingRelease text, submitTime datetime NOT NULL, 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', state enum('accepted','queued','rejected','pending','deleted') NOT NULL default 'accepted', key(versionId),