jcampbell1 / simple-file-manager

A Simple PHP file manager. The code is a single php file.
MIT License
914 stars 502 forks source link

Feature request: Possibility to choose which column is filtered first #98

Closed PlayBoy31 closed 4 years ago

PlayBoy31 commented 5 years ago

Hello

Can someone implement a possibility to select which column is filtered by default.

Actually, its filtered by the file name and there is no way to change it. (For my usage I want to filter by Modified time)

ikwyl6 commented 5 years ago

Try this. You can change 'SORT_DESC' to 'SORT_ASC'.. You can change the 'mtime' to 'name' or 'size' to have it default sort by that column. Info sorting from: https://stackoverflow.com/questions/1597736/how-to-sort-an-array-of-associative-arrays-by-value-of-a-given-key-in-php

index.mtime-descending.diff.txt

ikwyl6 commented 4 years ago

When I submitted the diff file I was very new to git/github so I didn’t know at the time how to fork and submit a PR. You really should comment and state that you’ve added this feature using a new commit (and reference that commit in these comments before you close the issue) so it tracks things correctly.