[AppDB] Add Subscription to Licenses

Rosanne DiMesio dimesio at earthlink.net
Tue Aug 22 09:53:38 CDT 2017


Signed-off-by: Rosanne DiMesio <dimesio at earthlink.net>
---
 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',
-- 
2.12.3




More information about the wine-patches mailing list