rtMedia for WordPress, BuddyPress and bbPress - Version 2.3.1

Version Description

  • Default permission for album creation in groups set to admin.
  • Fixed the warning on the "New Post" about the MYSQL query.
Download this release

Release Info

Developer gagan0123
Plugin Icon 128x128 rtMedia for WordPress, BuddyPress and bbPress
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3 to 2.3.1

includes/bp-media-actions.php CHANGED
@@ -121,30 +121,32 @@ function bp_media_delete_activity_handler($args){
121
return;
122
123
$activity_id=$args['id'];
124
- $query="SELECT post_id from $wpdb->postmeta WHERE meta_key='bp_media_child_activity' AND meta_value=$activity_id";
125
- $result=$wpdb->get_results($query);
126
- if(!(is_array($result)&& count($result)==1 ))
127
- return;
128
- $post_id=$result[0]->post_id;
129
- try{
130
- $post = get_post($post_id);
131
- if(!isset($post->post_type))
132
- return false;
133
- switch($post->post_type){
134
- case 'attachment':
135
- $media = new BP_Media_Host_Wordpress($post_id);
136
- $media->delete_media();
137
- break;
138
- case 'bp_media_album':
139
- $album = new BP_Media_Album($post_id);
140
- $album->delete_album();
141
- break;
142
- default:
143
- wp_delete_post($post_id);
144
}
145
- }
146
- catch(Exception $e){
147
- error_log('Media tried to delete was already deleted');
148
}
149
}
150
add_action('bp_before_activity_delete', 'bp_media_delete_activity_handler');
121
return;
122
123
$activity_id=$args['id'];
124
+ if(intval($activity_id)){
125
+ $query="SELECT post_id from $wpdb->postmeta WHERE meta_key='bp_media_child_activity' AND meta_value={$activity_id}";
126
+ $result=$wpdb->get_results($query);
127
+ if(!(is_array($result)&& count($result)==1 ))
128
+ return;
129
+ $post_id=$result[0]->post_id;
130
+ try{
131
+ $post = get_post($post_id);
132
+ if(!isset($post->post_type))
133
+ return false;
134
+ switch($post->post_type){
135
+ case 'attachment':
136
+ $media = new BP_Media_Host_Wordpress($post_id);
137
+ $media->delete_media();
138
+ break;
139
+ case 'bp_media_album':
140
+ $album = new BP_Media_Album($post_id);
141
+ $album->delete_album();
142
+ break;
143
+ default:
144
+ wp_delete_post($post_id);
145
+ }
146
+ }
147
+ catch(Exception $e){
148
+ error_log('Media tried to delete was already deleted');
149
}
150
}
151
}
152
add_action('bp_before_activity_delete', 'bp_media_delete_activity_handler');
includes/bp-media-groups-loader.php CHANGED
@@ -317,16 +317,16 @@ function bp_media_groups_user_can_create_album($group_id, $user_id = 0){
317
$current_level = groups_get_groupmeta($group_id,'bp_media_group_control_level');
318
switch($current_level){
319
case 'all':
320
- return groups_is_user_member($user_id, $group_id);
321
break;
322
case 'moderators':
323
- return groups_is_user_mod($user_id, $group_id);
324
break;
325
case 'admin':
326
return groups_is_user_admin($user_id, $group_id);
327
break;
328
default :
329
- return false;
330
}
331
return false;
332
}
317
$current_level = groups_get_groupmeta($group_id,'bp_media_group_control_level');
318
switch($current_level){
319
case 'all':
320
+ return groups_is_user_member($user_id, $group_id)||groups_is_user_mod($user_id, $group_id)||groups_is_user_admin($user_id, $group_id);
321
break;
322
case 'moderators':
323
+ return groups_is_user_mod($user_id, $group_id)||groups_is_user_admin($user_id, $group_id);
324
break;
325
case 'admin':
326
return groups_is_user_admin($user_id, $group_id);
327
break;
328
default :
329
+ return groups_is_user_admin($user_id, $group_id);
330
}
331
return false;
332
}
loader.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: BuddyPress Media
4
Plugin URI: http://rtcamp.com/buddypress-media/
5
Description: This plugin adds missing media rich features like photos, videos and audios uploading to BuddyPress which are essential if you are building social network, seriously!
6
- Version: 2.3
7
Author: rtCamp
8
Author URI: http://rtcamp.com
9
*/
3
Plugin Name: BuddyPress Media
4
Plugin URI: http://rtcamp.com/buddypress-media/
5
Description: This plugin adds missing media rich features like photos, videos and audios uploading to BuddyPress which are essential if you are building social network, seriously!
6
+ Version: 2.3.1
7
Author: rtCamp
8
Author URI: http://rtcamp.com
9
*/
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
=== BuddyPress Media ===
2
- Contributors: rtcamp, rahul286, gagan0123, umeshnevase
3
Donate link: http://rtcamp.com/donate
4
Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node
5
License: GPLv2 or later
6
License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
Requires at least: 3.3.2
8
Tested up to: 3.4.2
9
- Stable tag: 2.3
10
11
Adds Photos, Music, Videos & Albums to your BuddyPress. Supports mobile devices (iPhone/iPad, etc) and automatic audio/video conversion.
12
@@ -73,6 +73,10 @@ Please visit [BuddyPress Media's Features page](http://rtcamp.com/buddypress-med
73
74
Please visit [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/ "Visit BuddyPress Media's Features page") to get some details about future releases.
75
76
= 2.3 =
77
* Groups Media feature added
78
* Featured image selection in albums
1
=== BuddyPress Media ===
2
+ Contributors: rtcamp, rahul286, gagan0123, umeshnevase, suhasgirgaonkar, neerukoul
3
Donate link: http://rtcamp.com/donate
4
Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node
5
License: GPLv2 or later
6
License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
Requires at least: 3.3.2
8
Tested up to: 3.4.2
9
+ Stable tag: 2.3.1
10
11
Adds Photos, Music, Videos & Albums to your BuddyPress. Supports mobile devices (iPhone/iPad, etc) and automatic audio/video conversion.
12
73
74
Please visit [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/ "Visit BuddyPress Media's Features page") to get some details about future releases.
75
76
+ = 2.3.1 =
77
+ * Default permission for album creation in groups set to admin.
78
+ * Fixed the warning on the "New Post" about the MYSQL query.
79
+
80
= 2.3 =
81
* Groups Media feature added
82
* Featured image selection in albums