Skip to content

Commit 84c387d

Browse files
authored
Merge pull request #1126 from Ercogx/feature/add-config-for-reverse-sorting
Add config to output files in reverse
2 parents 9091f98 + 51e70cc commit 84c387d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/LfmPath.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ public function sortByColumn($arr_items)
213213
return strcasecmp($a->{$key_to_sort}, $b->{$key_to_sort});
214214
});
215215

216+
if (config('lfm.is_reverse_view', false)) {
217+
return array_reverse($arr_items);
218+
}
219+
216220
return $arr_items;
217221
}
218222

src/config/lfm.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@
122122
// Item Columns
123123
'item_columns' => ['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'],
124124

125+
// Output files in reverse
126+
'is_reverse_view' => false,
127+
125128
/*
126129
|--------------------------------------------------------------------------
127130
| Thumbnail

0 commit comments

Comments
 (0)