Module: appdb Branch: master Commit: 37505dbac7b5c844d7239b7abd508885bcea25c5 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=37505dbac7b5c844d7239b7ab...
Author: Rosanne DiMesio dimesio@earthlink.net Date: Tue Aug 22 09:53:38 2017 -0500
Add Subscription to Licenses
Signed-off-by: Rosanne DiMesio dimesio@earthlink.net Signed-off-by: Jeremy Newman jnewman@codeweavers.com
---
include/version.php | 5 +++-- tables/alter.sql | 2 +- tables/appdb_tables.sql | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/version.php b/include/version.php index db38601..23f5df9 100644 --- a/include/version.php +++ b/include/version.php @@ -20,6 +20,7 @@ define("LICENSE_DEMO", "Demo"); define("LICENSE_RETAIL", "Retail"); define('LICENSE_FREETOUSE', 'Free to use'); define('LICENSE_FREETOSHARE', 'Free to use and share'); +define('LICENSE_SUBSCRIPTION', 'Subscription');
/** * Version class for handling versions. @@ -1392,7 +1393,7 @@ EOT; /* Returns an array containing the different software licences */ public static function getLicenses() { - return array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREETOUSE, + return array(LICENSE_RETAIL, LICENSE_SUBSCRIPTION, LICENSE_FREETOUSE, LICENSE_FREETOSHARE, LICENSE_DEMO, LICENSE_SHAREWARE); }
@@ -1426,7 +1427,7 @@ EOT; /* In order to prevent MySQL injections. Returns matched license */ public static function checkLicense($sLicense) { - $aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREETOUSE, + $aLicense = array(LICENSE_RETAIL, LICENSE_SUBSCRIPTION, LICENSE_FREETOUSE, LICENSE_FREETOSHARE, LICENSE_DEMO, LICENSE_SHAREWARE);
foreach($aLicense as $sElement) diff --git a/tables/alter.sql b/tables/alter.sql index 0e977b2..508e3c8 100644 --- a/tables/alter.sql +++ b/tables/alter.sql @@ -1,3 +1,3 @@ /* append to this file when changes are required to the live db */ /* it will be cleared when the changes go live */ - +ALTER TABLE `appVersion` CHANGE `license` `license` ENUM('Retail','Subscription','Open Source','Demo','Shareware','Free to use','Free to use and share'); diff --git a/tables/appdb_tables.sql b/tables/appdb_tables.sql index 30af6ca..3330bab 100644 --- a/tables/appdb_tables.sql +++ b/tables/appdb_tables.sql @@ -59,7 +59,7 @@ create table appVersion ( ratingRelease text, submitTime datetime NOT NULL, submitterId int(11) NOT NULL default '0', - license enum('Retail','Open Source','Demo','Shareware','Free to use','Free to use and share'), + license enum('Retail','Subscription','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', hasMaintainer enum('true','false') NOT NULL default 'false',