You are here

function video_update in Video 5

Same name and namespace in other branches
  1. 6 video.module \video_update()
  2. 6.2 video.module \video_update()

Hook

Return value

TRUE on success, FALSE on error

File

./video.module, line 784
Display video in Quicktime MOV, Realmedia RM, Flash FLV & SWF, or Windows Media WMV formats.

Code

function video_update($node) {
  if ($node->revision) {

    //If a new node revision is being added then insert a new row.
    return video_insert($node);
  }
  else {
    $node->serialized_data = serialize($node->serial_data);

    //Serialize the data for insertion into the database.
    return db_query("UPDATE {video} SET vidfile='%s', size=%d, videox=%d, videoy=%d, video_bitrate=%d, audio_bitrate=%d, audio_sampling_rate=%d, audio_channels='%s', playtime_seconds=%d, disable_multidownload=%d, download_folder='%s', use_play_folder=%d, serialized_data='%s' WHERE vid = %d", $node->vidfile, $node->size, $node->videox, $node->videoy, $node->video_bitrate, $node->audio_bitrate, $node->audio_sampling_rate, $node->audio_channels, $node->playtime_seconds, $node->disable_multidownload, $node->download_folder, $node->use_play_folder, $node->serialized_data, $node->vid);
  }
}