aboutsummaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorHeshan <heshan@heidisoft.com>2011-03-17 12:41:33 +0530
committerHeshan <heshan@heidisoft.com>2011-03-17 12:41:33 +0530
commitc2132e3e04247ef8d39540161be895a9ceec63fd (patch)
tree5002fcc29777790e39b12681989e70e0052fefe1 /includes
parent8ba51e62308276de5240e8ee3569e41f29c36ada (diff)
downloadvideo-c2132e3e04247ef8d39540161be895a9ceec63fd.tar.gz
video-c2132e3e04247ef8d39540161be895a9ceec63fd.tar.bz2
Adding node publish only conversion is completed.
Diffstat (limited to 'includes')
-rw-r--r--includes/transcoder.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/transcoder.inc b/includes/transcoder.inc
index b17786b..dd8a47e 100644
--- a/includes/transcoder.inc
+++ b/includes/transcoder.inc
@@ -102,13 +102,19 @@ class video_transcoder {
$video->presets = $presets;
$output = $this->transcoder->convert_video($video);
// if successfully converted the video then update the status to publish
- if ($output && variable_get('video_publish_on_complete', TRUE))
- // Update our node id to published. We do not do a node_load as it causes editing problems when saving.
+ if ($output && variable_get('video_publish_on_complete', TRUE)) {
+ // Update our node id to published. We do not do a node_load as it causes editing problems when saving.
db_update('node')
->fields(array(
'status' => NODE_PUBLISHED))
->condition('nid', $video->nid, '=')
->execute();
+ db_update('node_revision')
+ ->fields(array(
+ 'status' => NODE_PUBLISHED))
+ ->condition('nid', $video->nid, '=')
+ ->execute();
+ }
return $output;
}