Skip to content

Commit 86acdc2

Browse files
authored
Merge pull request #2048 from rtCamp/develop
Version update v4.6.19
2 parents 2502149 + 8f838e6 commit 86acdc2

File tree

6 files changed

+77
-49
lines changed

6 files changed

+77
-49
lines changed

README.md

+30-25
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
138138
2. BuddyPress Settings
139139
3. Media Types Settings
140140
4. Media Size Settings
141-
5. Privacy Settings
141+
5. Privacy Settings
142142
6. Other Setiings
143143
7. Export/Import Settings
144144
8. Media View
@@ -152,6 +152,11 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
152152

153153
## Changelog ##
154154

155+
### 4.6.19 [April 16, 2024] ###
156+
* Fixed
157+
* Fixed shortcode security issue.
158+
159+
155160
### 4.6.18 [January 16, 2024] ###
156161

157162
* Fixed
@@ -182,9 +187,9 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
182187

183188
* Fixed
184189

185-
* Fixed PHP deprecation warnings.
186-
* Fixed BuddyPress Versioning issue
187-
* Fixed Security issue.
190+
* Fixed PHP deprecation warnings.
191+
* Fixed BuddyPress Versioning issue
192+
* Fixed Security issue.
188193
* Fixed Video player UI issues.
189194

190195
### 4.6.15 [September 4, 2023] ###
@@ -214,29 +219,29 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
214219
### 4.6.13 [December 12, 2022] ###
215220

216221
* Enhancement
217-
222+
218223
* Compatible with WordPress latest version 6.1.1
219-
* Compatible with PHP 8.0.0
224+
* Compatible with PHP 8.0.0
220225
* Refactored code base.
221226

222227
* Fixed
223-
228+
224229
* Fixed save settings not working issue.
225230
* Fixed media tab not visible on groups page.
226231

227-
232+
228233
### 4.6.12 [June 16, 2022] ###
229234

230235
* Enhancement
231236

232-
* Compatible with BP-Rewrites latest version.
237+
* Compatible with BP-Rewrites latest version.
233238
* Compatible with with WordPress latest version 6.0.
234239

235240
* Fixed
236241

237-
* UI/UX Issues.
238-
* Fixed album count issue for non-admin user and group albums.
239-
* Fixed Video thumbnail issue.
242+
* UI/UX Issues.
243+
* Fixed album count issue for non-admin user and group albums.
244+
* Fixed Video thumbnail issue.
240245

241246

242247
### 4.6.11 [April 27, 2022] ###
@@ -257,12 +262,12 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
257262

258263
* Enhancement
259264

260-
* Compatible with latest of WordPress v5.9.
261-
* Compatible with latest version of BuddyPress v10.0.0.
265+
* Compatible with latest of WordPress v5.9.
266+
* Compatible with latest version of BuddyPress v10.0.0.
262267

263268
* New Feature
264269

265-
* Edit media option on activity stream with [BuddyPress Edit Activity](https://wordpress.org/support/plugin/buddypress-edit-activity/).
270+
* Edit media option on activity stream with [BuddyPress Edit Activity](https://wordpress.org/support/plugin/buddypress-edit-activity/).
266271

267272
* Fixed
268273

@@ -275,14 +280,14 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
275280

276281
* Enhancement
277282

278-
* Added album search functionality.
283+
* Added album search functionality.
279284
* Added capability to group admin and mod to edit/delete the album.
280285

281286
* FIXED
282287

283-
* UI/UX issues.
284-
* Able to upload media to comment if the activity steam option is disabled.
285-
* Fixed pagination issue.
288+
* UI/UX issues.
289+
* Able to upload media to comment if the activity steam option is disabled.
290+
* Fixed pagination issue.
286291
* Fixed RTL issues.
287292

288293
### 4.6.8 [October 26, 2021] ###
@@ -406,8 +411,8 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
406411
* Add new class on activity page based on the uploaded media type
407412

408413
* FIXED
409-
* Post Update button issue with BuddyPress Nouveau template
410-
* Issue when user uploads the media with link in comment on buddypress activity
414+
* Post Update button issue with BuddyPress Nouveau template
415+
* Issue when user uploads the media with link in comment on buddypress activity
411416

412417
### 4.5.8 [August 6, 2019] ###
413418

@@ -432,8 +437,8 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
432437
* Issue of entering text in text area when Direct Upload and Upload terms enabled together
433438
* UI of pagination button height and text field
434439
* Export/Import button issue in Firefox browser
435-
* Issue of direct upload and media was not opening in lightbox with TwentySeventeen theme v2.1
436-
* Empty space issue for generated activity when media is uploaded without adding text
440+
* Issue of direct upload and media was not opening in lightbox with TwentySeventeen theme v2.1
441+
* Empty space issue for generated activity when media is uploaded without adding text
437442
* Other Errors, Warnings and notices
438443
* Group Activity media are not shown in Group Media tab with BuddyPress Nouveau Template
439444
* User’s name autosuggestion
@@ -495,11 +500,11 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
495500
* NEW
496501

497502
* Added JavaScript hook to handle uploader slide event [Doc](https://rtmedia.io/docs/developers/hooks/rtmedia-js-hooks/#rtmediajsuploaderslideaftergalleryreload)
498-
503+
499504
* ENHANCEMENT
500505

501506
* Added translation support for “Search Media” string
502-
507+
503508
* FIXED
504509

505510
* PHP notices

app/helper/RTMediaModel.php

+14
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,20 @@ public function get( $columns, $offset = false, $per_page = false, $order_by = '
122122
}
123123
$qgroup_by = ' ';
124124

125+
$allowed_order_columns = array( 'media_id', 'date', 'name' ); // Define allowed columns.
126+
list( $order_column, $order_direction ) = explode( ' ', $order_by . ' ' ); // Default to space if no direction provided.
127+
128+
if ( ! in_array( strtolower( $order_column ), $allowed_order_columns ) || ! in_array(
129+
strtolower( $order_direction ),
130+
array(
131+
'asc',
132+
'desc',
133+
'',
134+
)
135+
) ) {
136+
$order_by = 'media_id desc'; // Default order.
137+
}
138+
125139
if ( $order_by ) {
126140
$order_by = esc_sql( $order_by );
127141
$qorder_by = " ORDER BY {$this->table_name}.{$order_by}";

app/main/routers/query/RTMediaQuery.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,8 @@ public function &query( $query ) {
632632
$this->query['activity_id'] = array( 'value' );
633633
global $wpdb;
634634
// todo cache.
635-
$sql_query = "select id from {$wpdb->prefix}bp_activity where item_id = 0 and type = 'rtmedia_update'";
636-
$this->query['activity_id']['value'] = $wpdb->get_col( $sql_query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
635+
$sql_query = $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}bp_activity WHERE item_id = %d AND type = %s", 0, 'rtmedia_update' );
636+
$this->query['activity_id']['value'] = $wpdb->get_col( $sql_query );
637637
}
638638

639639
if ( isset( $this->query ) && isset( $this->query['global'] ) ) {

index.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
44
* Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
55
* Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
6-
* Version: 4.6.18
6+
* Version: 4.6.19
77
* Author: rtCamp
88
* Text Domain: buddypress-media
99
* Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
@@ -19,7 +19,7 @@
1919
/**
2020
* The version of the plugin
2121
*/
22-
define( 'RTMEDIA_VERSION', '4.6.18' );
22+
define( 'RTMEDIA_VERSION', '4.6.1' );
2323
}
2424

2525
if ( ! defined( 'RTMEDIA_PATH' ) ) {
@@ -144,4 +144,4 @@ function rtmedia_plugin_deactivate() {
144144
require_once 'app/main/RTMediaUploadTerms.php';
145145

146146
// Require deactivation survey installer.
147-
require_once RTMEDIA_PATH . '/lib/deactivation-survey/deactivation-survey.php';
147+
require_once RTMEDIA_PATH . '/lib/deactivation-survey/deactivation-survey.php';

languages/buddypress-media.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.18\n"
5+
"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.19\n"
66
"Report-Msgid-Bugs-To: https://rtmedia.io/support/\n"
7-
"POT-Creation-Date: 2024-01-16 04:41:16+00:00\n"
7+
"POT-Creation-Date: 2024-04-16 07:27:16+00:00\n"
88
"MIME-Version: 1.0\n"
99
"Content-Type: text/plain; charset=utf-8\n"
1010
"Content-Transfer-Encoding: 8bit\n"

readme.txt

+26-17
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ License: GPLv2 or later
55
License URI: http://www.gnu.org/licenses/gpl-2.0.html
66
Requires at least: WordPress 4.1
77
Tested up to: 6.4.2
8-
Stable tag: 4.6.18
8+
Stable tag: 4.6.19
99

1010
Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
1111

@@ -119,7 +119,7 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
119119
2. BuddyPress Settings
120120
3. Media Types Settings
121121
4. Media Size Settings
122-
5. Privacy Settings
122+
5. Privacy Settings
123123
6. Other Setiings
124124
7. Export/Import Settings
125125
8. Media View
@@ -133,6 +133,12 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
133133

134134
== Changelog ==
135135

136+
= 4.6.19 [April 16, 2024] =
137+
138+
* Fixed
139+
140+
* Fixed shortcode security issue.
141+
136142
= 4.6.18 [January 16, 2024] =
137143

138144
* Fixed
@@ -195,13 +201,13 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
195201
= 4.6.13 [December 12, 2022] =
196202

197203
* Enhancement
198-
204+
199205
* Compatible with WordPress latest version 6.1.1
200-
* Compatible with PHP 8.0.0
206+
* Compatible with PHP 8.0.0
201207
* Refactored code base.
202208

203209
* Fixed
204-
210+
205211
* Fixed save settings not working issue.
206212
* Fixed media tab not visible on groups page.
207213

@@ -210,14 +216,14 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
210216

211217
* Enhancement
212218

213-
* Compatible with BP-Rewrites latest version.
219+
* Compatible with BP-Rewrites latest version.
214220
* Compatible with with WordPress latest version 6.0.
215221

216222
* Fixed
217223

218-
* UI/UX Issues.
219-
* Fixed album count issue for non-admin user and group albums.
220-
* Fixed Video thumbnail issue.
224+
* UI/UX Issues.
225+
* Fixed album count issue for non-admin user and group albums.
226+
* Fixed Video thumbnail issue.
221227

222228
= 4.6.11 [April 27, 2022] =
223229

@@ -237,12 +243,12 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
237243

238244
* Enhancement
239245

240-
* Compatible with WordPress latest version v5.9.
241-
* Compatible with latest version of BuddyPress v10.0.0.
246+
* Compatible with WordPress latest version v5.9.
247+
* Compatible with latest version of BuddyPress v10.0.0.
242248

243249
* New Feature
244250

245-
* Edit media option on activity stream with BuddyPress Edit Activity.
251+
* Edit media option on activity stream with BuddyPress Edit Activity.
246252

247253
* Fixed
248254

@@ -255,15 +261,15 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
255261

256262
* Enhancement
257263

258-
* Added album search functionality.
264+
* Added album search functionality.
259265
* Added capability to group admin and mod to edit/delete the album.
260266

261267
* FIXED
262268

263-
* UI/UX issues.
264-
* Able to upload media to comment if the activity steam option is disabled.
265-
* Fixed pagination issue.
266-
* Fixed RTL issues.
269+
* UI/UX issues.
270+
* Able to upload media to comment if the activity steam option is disabled.
271+
* Fixed pagination issue.
272+
* Fixed RTL issues.
267273

268274

269275
= 4.6.8 [October 26, 2021] =
@@ -1884,6 +1890,9 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
18841890

18851891
== Upgrade Notice ==
18861892

1893+
= 4.6.19 =
1894+
rtMedia 4.6.19 with shortcode security fixes.
1895+
18871896
= 4.6.18 =
18881897
rtMedia 4.6.18 with fixes related to group media.
18891898

0 commit comments

Comments
 (0)