Commit fdc6874d authored by anthonylindsay's avatar anthonylindsay

Got rid of redundant form function in favour of drupal_get_form

parent 550cca7c
......@@ -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,23 +177,14 @@ 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,
);
return $items;
}
/**
* 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().
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment