Commit 4a1ef3e1 authored by Shrikey's avatar Shrikey
Browse files

Implemented the suggestions of the coder module and removed an unnecessary commented function

parent a846cfad
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -8,16 +8,10 @@ function uc_catalog_template_theme($existing, $type, $theme, $path){
  return array(
    'ubercart_catalog' => array(
      'template'   => 'ubercart_catalog',
      'arguments'  => array('catalog' => null, 'sub_categories' => null, 'products' => null, 'pager' => null),
      'arguments'  => array('catalog' => NULL, 'sub_categories' => NULL, 'products' => NULL, 'pager' => NULL),
    ),
  );
}
/*
function uc_catalog_template_preprocess(&$vars, $hook) {
  if($hook=='ubercart-catalog') {
    $vars['template_files'][] = 'ubercart-catalog';
  }
}*/

function uc_catalog_template_theme_registry_alter(&$theme_registry) {
  if (!empty($theme_registry['uc_catalog_browse'])) {
@@ -86,7 +80,8 @@ function uc_catalog_template_form_alter(&$form, $form_state, $form_id) {
        the module "Ubercart catalog template". To customize the catalog layout, copy 
        @ubercart-catalog-template/ubercart-catalog.tpl.php to your theme and edit this.', 
              array('@ubercart-catalog-template' => drupal_get_path('module', 'uc_catalog_template'))), 'warning', FALSE);
    } else {
    }
    else {
      drupal_set_message(t('The module "Ubercart catalog template" has limited the options available below.'), 'warning', FALSE);
      unset($form['catalog-top-level']['uc_catalog_show_subcategories']);
      unset($form['catalog-top-level']['uc_catalog_category_columns']);