Skip to content

Commit

Permalink
Tree sorting in templates file tree
Browse files Browse the repository at this point in the history
This is a weird one and I cant say I fully understand it but this resolves the problem described below.

If you have a large number of files in a folder then when you look at the list of files in the tree you will see that they are not in alphabetical order. They are in alphabetical order "in groups" which is why you need more than usual files to see it.

To test copy a folder with a lot files to `templates\protostar\html`

I used this folder as a source `administrator\components\com_templates\views\template\tmpl`

Now when you view the file tree in the template component you will see the sirting is wrong as per screenshot

Apply this PR and retest and the sirting is as expected.
  • Loading branch information
brianteeman committed Aug 6, 2019
1 parent 7faa14f commit 0485656
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
Expand Up @@ -8,7 +8,7 @@
*/

defined('_JEXEC') or die;
ksort($this->files, SORT_STRING);
ksort($this->files, SORT_NATURAL);
?>

<ul class='nav nav-list directory-tree'>
Expand Down
30 changes: 0 additions & 30 deletions administrator/manifests/packages/pkg_weblinks.xml

This file was deleted.

0 comments on commit 0485656

Please sign in to comment.