Index: service_links.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/service_links/service_links.module,v retrieving revision 1.26.4.9 diff -u -p -r1.26.4.9 service_links.module --- service_links.module 14 Nov 2009 00:41:31 -0000 1.26.4.9 +++ service_links.module 18 Jan 2010 18:32:49 -0000 @@ -184,6 +184,7 @@ function service_links_block($op = 'list $style = variable_get('service_links_block_style', SERVICE_LINKS_STYLE_IMAGE_AND_TEXT); $block['content'] = theme('service_links_block_format', service_links_render($node, FALSE, $style), $style); break; + case 'service_links_fisheye': $block['subject'] = t('Bookmark/Search this post'); $block['content'] = theme('service_links_fisheye_format', service_links_render($node, FALSE, SERVICE_LINKS_STYLE_FISHEYE)); @@ -351,9 +352,11 @@ function service_links_render($node, $no case 0: $short_url = $url; break; + case 1: $short_url = service_links_short_url($url, $node->nid); break; + case 2: $short_url = service_links_short_url($url, $node->nid); $url = $short_url; @@ -383,7 +386,9 @@ function service_links_render($node, $no 'title' => $node->title, ); - if ($style > 0) $settings['style'] = $style; + if ($style > 0) { + $settings['style'] = $style; + } foreach($services as $service_id => $service) { $links['weight'][] = isset($settings['link_weight'][$service_id]) ? $settings['link_weight'][$service_id] : 0; @@ -424,8 +429,10 @@ function service_links_render($node, $no ); } - if (!empty($links['link'])) array_multisort($links['weight'], $links['link']); - return $links['link']; + if (!empty($links['link'])) { + array_multisort($links['weight'], $links['link']); + } + return !empty($links['link']) ? $links['link'] : array(); } function theme_service_links_build_link($text, $url = array(), $image = NULL, $nodelink, $style, $attributes = array()) { @@ -490,12 +497,19 @@ function theme_service_links_node_format } function theme_service_links_block_format($items, $style = SERVICE_LINKS_STYLE_IMAGE_AND_TEXT) { + if (empty($items)) { + return; + } switch ($style) { case SERVICE_LINKS_STYLE_IMAGE: - return implode($items, ' '); + $output = implode($items, ' '); + break; + + default: + $output = theme('item_list', array_values($items)); break; } - return '