aboutsummaryrefslogtreecommitdiff
path: root/video.module
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2006-09-18 23:10:59 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2006-09-18 23:10:59 +0000
commitd7b1524caa8aa292df7dfea0bead120df68ea5cb (patch)
tree7e4788f6db769d9e74a7995659b857c5dcaeb1c2 /video.module
parentcf552cda168ad0c9bcf70df09c25d24e3658c792 (diff)
downloadvideo-d7b1524caa8aa292df7dfea0bead120df68ea5cb.tar.gz
video-d7b1524caa8aa292df7dfea0bead120df68ea5cb.tar.bz2
Patch #83233 by Robrecht Jacques (http://drupal.org/user/22598):
video doesn't work together with db_rewrite_sql well: use "join on" instead of "where table1, table2" to be db_rewrite_sql compatible Bug #82365 reported by moshe weitzman (http://drupal.org/user/23): "You have to insert a valid file size for this video." - video_upload.module Solved a little error wich always ask to put a size even if the video was uploaded.
Diffstat (limited to 'video.module')
-rw-r--r--video.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/video.module b/video.module
index b17d33e..e16868a 100644
--- a/video.module
+++ b/video.module
@@ -584,7 +584,7 @@ function video_validate($node) {
}
//Make sure file size is valid.
$path = getcwd() . '/' . $node->vidfile; //Local path to video file.
- if (!isset($node->size) || !is_numeric($node->size) || $node->size < 0) { //If the file is not local or a number then set error.
+ if ((!isset($node->size) || !is_numeric($node->size) || $node->size < 0) && !$_SESSION['video_upload_file']) { //If the file is not local or not a valid number then set error. $_SESSION check needed for video_upload functionality
form_set_error('size', t('You have to insert a valid file size for this video.'));
}
@@ -749,7 +749,7 @@ function video_block_list($delta = 0) {
$orderby = 'RAND()';
break;
}
- return node_title_list(db_query_range(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n, {video} v WHERE n.vid = v.vid AND n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER BY $orderby DESC"),0, $count));
+ return node_title_list(db_query_range(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n INNER JOIN {video} v ON n.vid = v.vid WHERE n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER BY $orderby DESC"),0, $count));
}
/****************************************************