issue125, make initial sort-order configureable
[phpfspot.git] / phpfspot.class.php
index ae5879076de025ef0f45b73406335518a5370fbf..4bc3266d734731a10025f44d9c528d7f0193438e 100644 (file)
@@ -227,8 +227,9 @@ class PHPFSPOT {
       if(!isset($_SESSION['tag_condition']))
          $_SESSION['tag_condition'] = 'or';
 
       if(!isset($_SESSION['tag_condition']))
          $_SESSION['tag_condition'] = 'or';
 
+      /* if sort-order has not been set yet, get the one specified in the config */
       if(!isset($_SESSION['sort_order']))
       if(!isset($_SESSION['sort_order']))
-         $_SESSION['sort_order'] = 'date_desc';
+         $_SESSION['sort_order'] = $this->cfg->sort_order;
 
       if(!isset($_SESSION['searchfor_tag']))
          $_SESSION['searchfor_tag'] = '';
 
       if(!isset($_SESSION['searchfor_tag']))
          $_SESSION['searchfor_tag'] = '';