update docs and UPGRADE file to 1.6
[phpfspot.git] / phpfspot.class.php
index 39bace3f0ec99210183219e1d3d5c0c86f5c6814..d7a76c3a50d9cfd80830dda1553a87f6007d9b52 100644 (file)
@@ -227,8 +227,9 @@ class PHPFSPOT {
       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']))
-         $_SESSION['sort_order'] = 'date_desc';
+         $_SESSION['sort_order'] = $this->cfg->sort_order;
 
       if(!isset($_SESSION['searchfor_tag']))
          $_SESSION['searchfor_tag'] = '';
@@ -2748,7 +2749,7 @@ class PHPFSPOT {
             return " ORDER BY p.rating ASC, t.name ASC";
             break;
          case 'rate_desc':
-            return " ORDER BY p.rating DESC, t.name DESC";
+            return " ORDER BY p.rating DESC, t.name ASC";
             break;
       }