summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Lindsay2014-10-19 09:41:53 (GMT)
committerAnthony Lindsay2014-10-19 09:41:53 (GMT)
commitfdc6874d979f12085ff24e6f34bf7c55204cc6c2 (patch)
treeba5aba7cb7fdb6a24dfb6ed34ba27681d6d36d77
parent550cca7ca92f28aa59a0aefd862fabb20d7fb9da (diff)
Got rid of redundant form function in favour of drupal_get_form
-rw-r--r--commerce_popular_products.module15
1 files changed, 3 insertions, 12 deletions
diff --git a/commerce_popular_products.module b/commerce_popular_products.module
index 08701cd..0efcb26 100644
--- a/commerce_popular_products.module
+++ b/commerce_popular_products.module
@@ -137,8 +137,8 @@ function commerce_popular_products_block_view($delta = '') {
$block['subject'] = check_plain(variable_get('commerce_popular_products_title'));
$block['content'] = commerce_popular_products_get_content();
break;
-
}
+
return $block;
}
@@ -177,7 +177,8 @@ function commerce_popular_products_menu() {
$items['admin/commerce/config/popular-products'] = array(
'title' => 'Popular Commerce Products settings',
'description' => 'Manage settings for defining a popular products block.',
- 'page callback' => 'commerce_popular_products_settings',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('commerce_popular_products_settings_form'),
'access arguments' => array('Configure store settings '),
'type' => MENU_NORMAL_ITEM,
);
@@ -185,16 +186,6 @@ function commerce_popular_products_menu() {
}
/**
- * Menu callback to produce the Settings Page.
- */
-function commerce_popular_products_settings() {
- $output = '<p>' . t('Here you can define which product types are ranked for popularity & the period over which they are ranked.') . '</p>';
- $form = drupal_get_form('commerce_popular_products_settings_form');
- $output .= render($form);
- return $output;
-}
-
-/**
* Implements hook_form().
*
* Produces the Settings Page form.