Skip to content

Commit

Permalink
Merge pull request #2066 from rtCamp/fix/sorting-not-working
Browse files Browse the repository at this point in the history
Fix sorting for size and title of media.
  • Loading branch information
kartikmehta8 authored Sep 6, 2024
2 parents 853d0d5 + b64b0fd commit 11406b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helper/RTMediaModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function get( $columns, $offset = false, $per_page = false, $order_by = '
}
$qgroup_by = ' ';

$allowed_order_columns = array( 'media_id', 'date', 'name' ); // Define allowed columns.
$allowed_order_columns = array( 'media_id', 'media_title','file_size'); // Define allowed columns.
list( $order_column, $order_direction ) = explode( ' ', $order_by . ' ' ); // Default to space if no direction provided.

if ( ! in_array( strtolower( $order_column ), $allowed_order_columns ) || ! in_array(
Expand Down

0 comments on commit 11406b5

Please sign in to comment.