Skip to content

Commit

Permalink
Merge pull request #2069 from rtCamp/fix/sortting-not-working-pre-rel…
Browse files Browse the repository at this point in the history
…ease

Fix: Sorting not working by Title and Size
  • Loading branch information
kartikmehta8 authored Sep 16, 2024
2 parents 2db114a + d6e3a1c commit 447369f
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 447369f

Please sign in to comment.