summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBojan Zivanovic2013-08-07 19:25:04 (GMT)
committer Bojan Zivanovic2013-08-07 19:25:04 (GMT)
commite3f50539b6aff511be0ebae162ffb4553290c161 (patch)
tree0ea275e8b14b3dbbe2924990f3e0a0f025cbe534
parent97be956eb2f59b2a120d6f1bf9ef9a15d08f3432 (diff)
Start using commerce_license_product_types().
-rw-r--r--commerce_file.module3
-rw-r--r--includes/commerce_file.admin.inc3
2 files changed, 2 insertions, 4 deletions
diff --git a/commerce_file.module b/commerce_file.module
index 59bc4e0..8dc540d 100644
--- a/commerce_file.module
+++ b/commerce_file.module
@@ -538,8 +538,7 @@ function commerce_file_product_types() {
$file_product_types = variable_get('commerce_file_product_types', array());
$file_product_types = array_filter($file_product_types);
// Return only those $file_product_types that are still licensable.
- $license_product_types = variable_get('commerce_license_product_types', array());
- $license_product_types = array_filter($license_product_types);
+ $license_product_types = commerce_license_product_types();
return array_intersect($file_product_types, $license_product_types);
}
diff --git a/includes/commerce_file.admin.inc b/includes/commerce_file.admin.inc
index 997ade3..62369d0 100644
--- a/includes/commerce_file.admin.inc
+++ b/includes/commerce_file.admin.inc
@@ -16,8 +16,7 @@ function commerce_file_settings_form($form, &$form_state) {
);
// Create a list of licensable product types and their labels.
- $license_product_types = variable_get('commerce_license_product_types', array());
- $license_product_types = array_filter($license_product_types);
+ $license_product_types = commerce_license_product_types();
$product_types = array();
foreach (commerce_product_type_options_list() as $type => $label) {
if (in_array($type, $license_product_types)) {