aboutsummaryrefslogtreecommitdiff
path: root/plugins/video_image
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2007-01-14 13:13:36 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2007-01-14 13:13:36 +0000
commitb672efbca9d447a0605366ffaa44099a207d3529 (patch)
tree96942535e4a914cd289a54a861a578ff13a8772a /plugins/video_image
parent018f720fc65b950e14db154f83e83137a86011c8 (diff)
downloadvideo-b672efbca9d447a0605366ffaa44099a207d3529.tar.gz
video-b672efbca9d447a0605366ffaa44099a207d3529.tar.bz2
Some fixes.
Diffstat (limited to 'plugins/video_image')
-rw-r--r--plugins/video_image/video_image.module8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/video_image/video_image.module b/plugins/video_image/video_image.module
index 4c134eb..850781a 100644
--- a/plugins/video_image/video_image.module
+++ b/plugins/video_image/video_image.module
@@ -109,8 +109,8 @@ function video_image_nodeapi(&$node, $op, $teaser) {
$image->name = $node->name;
$image->created = $node->created;
$image->type = 'image';
- $image->status = _video_image_publish_thumbnails();
- $image->promote = _video_image_promote_thumbnails();
+ //$image->status = _video_image_publish_thumbnails();
+ //$image->promote = _video_image_promote_thumbnails();
if (!$field_name && module_exists('video_ffmpeg_helper') && variable_get('video_ffmpeg_helper_auto_thumbnail', false)) {
$image->title = $_SESSION['video_upload_file']->filename;
$field_name = _video_ffmpeg_helper_auto_thumbnail($node);
@@ -125,6 +125,10 @@ function video_image_nodeapi(&$node, $op, $teaser) {
if (!form_get_errors()) {
$image = node_submit($image);
node_save($image);
+
+ // needed to set the correct status and promote values if the user does not have enought permissions. Is there a better solution???
+ db_query('UPDATE {node} SET status = %d, promote = %d WHERE nid = %d AND vid = %d', _video_image_publish_thumbnails(), _video_image_promote_thumbnails(), $image->nid, $image->vid);
+
$node->iid = $node->serial_data['iid'] = $image->nid;
$_SESSION['video_upload_file']->iid = $image->nid;
$node->new_image = TRUE;