aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2005-06-25 18:07:45 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2005-06-25 18:07:45 +0000
commit96cc8c7cb96a9a92df114e1aa61acfd1ce26e0d1 (patch)
tree91ce3756cfb8d082f86a79a81c11b31a4a16f5d3
parent2d9f9d67fcbd3cddd47068faeb38ad4047574bbf (diff)
downloadvideo-96cc8c7cb96a9a92df114e1aa61acfd1ce26e0d1.tar.gz
video-96cc8c7cb96a9a92df114e1aa61acfd1ce26e0d1.tar.bz2
Removed a bug wich let multiply
video link on blocks.
-rw-r--r--video.module9
1 files changed, 1 insertions, 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 = "<div id=\"tablezone\">\n";
- $output .= theme_video_node_short($node);
- $output .= "</div>\n";
- $node->body = $output;
- return $node;
-}
?>