Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit d9bde5d

Browse files
committed
Fix file replacement on activity
1 parent aee8ba0 commit d9bde5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

admin/rt-transcoder-handler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ public function usage_widget() {
672672
* @return url
673673
*/
674674
public function add_media_thumbnails( $post_array ) {
675-
675+
g
676676
$defaults = array(
677677
'post_id' => '',
678678
'job_for' => '',
@@ -836,6 +836,7 @@ public function add_transcoded_files( $file_post_array, $attachment_id, $job_for
836836
$download_url = urldecode( urldecode( $file ) );
837837
$new_wp_attached_file_pathinfo = pathinfo( $download_url );
838838
$post_mime_type = 'mp4' === $new_wp_attached_file_pathinfo['extension'] ? 'video/mp4' : 'audio/mp3';
839+
$attachemnt_url = wp_get_attachment_url( $attachment_id );
839840
try {
840841
$response = function_exists( 'vip_safe_wp_remote_get' ) ? vip_safe_wp_remote_get( $download_url ) : wp_remote_get( $download_url ); // @codingStandardsIgnoreLine
841842
} catch ( Exception $e ) {
@@ -907,7 +908,6 @@ public function add_transcoded_files( $file_post_array, $attachment_id, $job_for
907908
if ( 'rtmedia' === $job_for ) {
908909
$activity_id = $media[0]->activity_id;
909910
if ( $activity_id ) {
910-
$attachemnt_url = wp_get_attachment_url( $attachment_id );
911911
$content = $wpdb->get_var( $wpdb->prepare( "SELECT content FROM {$wpdb->base_prefix}bp_activity WHERE id = %d", $activity_id ) );
912912

913913
/* for WordPress backward compatibility */

0 commit comments

Comments
 (0)