--- mp_products.module.org 2009-02-12 03:41:21.000000000 +0000 +++ mp_products.module 2009-02-28 14:01:48.000000000 +0000 @@ -40,22 +40,24 @@ case 'view': $link = ''; if (user_access('view own products')) { - $link .= l(t('Click here to view your products.'), 'user/'. $account->uid .'/selling/'); + $link .= l(t('Click here to view your products.'), 'user/'. $account->uid .'/selling/') .'
'; } if (module_exists(mp_orders) && user_access('fulfill own orders')) { - $link .= '
'. l(t('Click here to fulfill your orders.'), 'user/'. $account->uid .'/selling/fulfill'); + $link .= l(t('Click here to fulfill your orders.'), 'user/'. $account->uid .'/selling/fulfill') .'
'; } if (module_exists(mp_reports) && user_access('view own reports')) { - $link .= '
'. l(t('Click here to view your sales reports.'), 'user/'. $account->uid .'/selling/reports'); + $link .= l(t('Click here to view your sales reports.'), 'user/'. $account->uid .'/selling/reports') .'
'; + } + if ($link != "") { + $account->content['products'] = array( + '#type' => 'user_profile_category', + '#title' => t('Selling'), + 'link' => array( + '#value' => $link, + '#type' => 'user_profile_item', + ), + ); } - $account->content['products'] = array( - '#type' => 'user_profile_category', - '#title' => t('Selling'), - 'link' => array( - '#value' => $link, - '#type' => 'user_profile_item', - ), - ); break; } }