From 96cc8c7cb96a9a92df114e1aa61acfd1ce26e0d1 Mon Sep 17 00:00:00 2001 From: Fabio Varesano Date: Sat, 25 Jun 2005 18:07:45 +0000 Subject: Removed a bug wich let multiply video link on blocks. --- video.module | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/video.module b/video.module index 0c12726..82d2a28 100644 --- a/video.module +++ b/video.module @@ -192,7 +192,7 @@ function video_block($op = "list", $delta = 0) { function video_block_list($type = 'top') { $orderby = ($type == 'new') ? 'n.created' : 'v.clicks'; - return node_title_list(db_query_range(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n, {video} v WHERE n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER by $orderby DESC"),0, 10)); + return node_title_list(db_query_range(db_rewrite_sql("SELECT DISTINCT (n.nid) , n.title FROM {node} n INNER JOIN {video} v WHERE n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER by $orderby DESC"),0, 10)); } @@ -257,12 +257,5 @@ function theme_video_play($node, $main = 0) return theme("page", $output, t("Playing")." ".$node->title); } -function theme_video_content($node, $main = 0) { - $output = "
\n"; - $output .= theme_video_node_short($node); - $output .= "
\n"; - $node->body = $output; - return $node; -} ?> -- cgit v1.2.3