Просмотр исходного кода

#1819 Orgs/Persons: incorrect order in search by category

Alex Trofimov 8 лет назад
Родитель
Сommit
f26a83a512

+ 2 - 2
modules/boonex/channels/classes/BxCnlSearchResult.php

@@ -48,7 +48,7 @@ class BxCnlSearchResult extends BxBaseModGroupsSearchResult
                 ),
             ),
             'paginate' => array('perPage' => getParam('bx_channels_per_page_browse'), 'start' => 0),
-            'sorting' => 'none',
+            'sorting' => 'last',
             'rss' => array(
                 'title' => '',
                 'link' => '',
@@ -161,7 +161,7 @@ class BxCnlSearchResult extends BxBaseModGroupsSearchResult
         case 'recommended':
             return array('order' => ' ORDER BY RAND() ');
         case 'none':
-            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+            return array();
         case 'top':
             return array('order' => ' ORDER BY `bx_cnl_data`.`views` DESC ');
         case 'last':

+ 2 - 2
modules/boonex/events/classes/BxEventsSearchResult.php

@@ -48,7 +48,7 @@ class BxEventsSearchResult extends BxBaseModGroupsSearchResult
                 ),
             ),
             'paginate' => array('perPage' => getParam('bx_events_per_page_browse'), 'start' => 0),
-            'sorting' => 'none',
+            'sorting' => 'last',
             'rss' => array(
                 'title' => '',
                 'link' => '',
@@ -186,7 +186,7 @@ class BxEventsSearchResult extends BxBaseModGroupsSearchResult
         case 'recommended':
             return array('order' => ' ORDER BY RAND() ');
         case 'none':
-            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+            return array();
         case 'top':
             return array('order' => ' ORDER BY `bx_events_data`.`views` DESC ');
         case 'last':

+ 2 - 2
modules/boonex/groups/classes/BxGroupsSearchResult.php

@@ -48,7 +48,7 @@ class BxGroupsSearchResult extends BxBaseModGroupsSearchResult
                 ),
             ),
             'paginate' => array('perPage' => getParam('bx_groups_per_page_browse'), 'start' => 0),
-            'sorting' => 'none',
+            'sorting' => 'last',
             'rss' => array(
                 'title' => '',
                 'link' => '',
@@ -185,7 +185,7 @@ class BxGroupsSearchResult extends BxBaseModGroupsSearchResult
         case 'recommended':
             return array('order' => ' ORDER BY RAND() ');
         case 'none':
-            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+            return array();
         case 'top':
             return array('order' => ' ORDER BY `bx_groups_data`.`views` DESC ');
         case 'last':

+ 3 - 3
modules/boonex/organizations/classes/BxOrgsSearchResult.php

@@ -50,7 +50,7 @@ class BxOrgsSearchResult extends BxBaseModGroupsSearchResult
                 ),
             ),
             'paginate' => array('perPage' => getParam('bx_organizations_per_page_browse'), 'start' => 0),
-            'sorting' => 'none',
+            'sorting' => 'active',
             'rss' => array(
                 'title' => '',
                 'link' => '',
@@ -207,8 +207,8 @@ class BxOrgsSearchResult extends BxBaseModGroupsSearchResult
                 return array('order' => ' ORDER BY `bx_organizations_data`.`featured` DESC ');
             case 'recommended':
                 return array('order' => ' ORDER BY RAND() ');
-	        case 'none':
-	            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+            case 'none':
+                return array();
 			case 'active':
 	            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
 			case 'online':

+ 3 - 3
modules/boonex/persons/classes/BxPersonsSearchResult.php

@@ -49,7 +49,7 @@ class BxPersonsSearchResult extends BxBaseModProfileSearchResult
                 ),
             ),
             'paginate' => array('perPage' => getParam('bx_persons_per_page_browse'), 'start' => 0),
-            'sorting' => 'none',
+            'sorting' => 'active',
             'rss' => array(
                 'title' => '',
                 'link' => '',
@@ -175,8 +175,8 @@ class BxPersonsSearchResult extends BxBaseModProfileSearchResult
                 return array('order' => ' ORDER BY `bx_persons_data`.`featured` DESC ');
             case 'recommended':
                 return array('order' => ' ORDER BY RAND() ');
-	        case 'none':
-	            return array();
+            case 'none':
+                return array();
 	        case 'active':
 	            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
 			case 'online':

+ 2 - 2
modules/boonex/spaces/classes/BxSpacesSearchResult.php

@@ -48,7 +48,7 @@ class BxSpacesSearchResult extends BxBaseModGroupsSearchResult
                 ),
             ),
             'paginate' => array('perPage' => getParam('bx_spaces_per_page_browse'), 'start' => 0),
-            'sorting' => 'none',
+            'sorting' => 'last',
             'rss' => array(
                 'title' => '',
                 'link' => '',
@@ -189,7 +189,7 @@ class BxSpacesSearchResult extends BxBaseModGroupsSearchResult
         case 'recommended':
             return array('order' => ' ORDER BY RAND() ');
         case 'none':
-            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+            return array();
         case 'top':
             return array('order' => ' ORDER BY `bx_spaces_data`.`views` DESC ');
         case 'last':