Page tree
Skip to end of metadata
Go to start of metadata

  As an administrator, you can configure the sort order which determines how files lists are displayed in the User Portal.

  • By default, the ASCII sort order is used because this is what is provided by the MongoDB backend.
  • This default can be changed in FileCloud Server version 12.0 and later.

The types of sorting orders you can choose from are ASCII and Natural.

ASCII Sort OrderNatural Sort Order
  1. Folders sorted on numerals.
  2. Folders sorted on uppercase letters.
  3. Folders sorted on lowercase letters.
  4. Files sorted on numerals.
  5. Files sorted on uppercase letters.
  6. Files sorted on lowercase letters.
  1. Folders sorted on numerals.
  2. Folders sorted without case sensitivity.
  3. Files sorted on numerals.
  4. Files sorted without case sensitivity.
 (lightbulb) This is the default sort order when listing files in FileCloud.(lightbulb)  This option uses a case-insensitive ordering of entries in the file list.


To switch from ASCII to Natural sort order:


 1. Prepare for the Natural Sort Order

In FileCloud Server version 12.0 and later, any new files and folders created will automatically use the natural sort order.

  • However when a FileCloud server is upgraded, it will still have files created from older FileCloud versions.
  • These files are not automatically prepared for natural sorting.

To enable natural sorting on all the unprepared items,

  1. Run the following command from the command line:
    1. On Linux

      # cd /var/www/resources/backup
      # php ./preparenaturalsort.php
    2. On Windows

      > cd c:\xampp\htdocs\resources/backup 
      > C:\xampp\php\php.exe ./preparenaturalsort.php
  2. This command can be run multiple times if needed to make sure there are no unprepared items.


 

 2. Enable the Natural Sort Order


Once the system is fully prepared, enable natural sorting by setting the following key in the file  WWWROOT\config\cloudconfig.php .

define("TONIDOCLOUD_NATURALORDER_SORTING", 1);

Natural sorting can be disabled by setting the key value to 0 or completely removing it.



  • No labels