From d6e3a1ced15e31162c0f926529a3d634cb792fc3 Mon Sep 17 00:00:00 2001 From: Kartik Mehta Date: Tue, 10 Sep 2024 09:38:12 +0530 Subject: [PATCH] Fix: sorting not working for size and title --- app/helper/RTMediaModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helper/RTMediaModel.php b/app/helper/RTMediaModel.php index 3e408f17e..0b5ed5f9a 100755 --- a/app/helper/RTMediaModel.php +++ b/app/helper/RTMediaModel.php @@ -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(