pwg_db_real_escape_string($video['title']), 'author' => pwg_db_real_escape_string($video['author']), 'is_gvideo' => 1, ); if ( !empty($video['description']) ) { $updates['comment'] = pwg_db_real_escape_string($video['description']); } if ( !empty($video['tags']) ) { set_tags(get_tag_ids(str_replace("'", "\'", implode(',', $video['tags']))), $image_id); } single_update( IMAGES_TABLE, $updates, array('id' => $image_id), true ); // register video $insert = array( 'picture_id' => $image_id, 'url' => $video['url'], 'type' => $video['type'], 'video_id' => $video['video_id'], 'width' => '', 'height' => '', 'autoplay' => '', ); single_insert( GVIDEO_TABLE, $insert ); array_push($page['infos'], $url.' : '.l10n('Video successfully added')); } } ?>