Merge branch 'master' of /var/cache/git/phpfspot
[phpfspot.git] / phpfspot.class.php
index d39356a3bde197d09a427d24f18e663cf493b1c6..d7a76c3a50d9cfd80830dda1553a87f6007d9b52 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'] = '';