View Issue Details

IDProjectCategoryView StatusLast Update
0019792phpList 3 applicationInterface - Frontendpublic04-03-19 09:19
ReporterRayEdmons Assigned To 
Status resolvedResolutionfixed 
Product Version3.3.9 
Target Version3.4.0Fixed in Version3.4.0 
Summary0019792: Adhere to admin-defined list order on subscribe pages when public categories are used
DescriptionA subscriber page with more than one list will show them ordered by their listorder, then name.
/app/public_html/lists/admin/subscribelib2.php, line 822:
Sql_query("SELECT * FROM {$GLOBALS['tables']['list']} $subselect order by listorder, name")

However if $GLOBALS['showCat'] is set and true, lists are only ordered by category (line 752-3):
        $catresult = Sql_query(sprintf('select * from %s %s order by category',
            $GLOBALS['tables']['list'], $subselect));

This results in the lists being broken into categories but then are just displayed in the 'natural' order given by the database.

Can this be changed so that lists continue to be ordered by category, but are then also sorted by listname and name, so that the orders are the same whether they are categorised or not?
I think this can be done by changing line 752-3 from:
        $catresult = Sql_query(sprintf('select * from %s %s order by category',
            $GLOBALS['tables']['list'], $subselect));
        $catresult = Sql_query(sprintf('select * from %s %s order by category, listorder, name',
            $GLOBALS['tables']['list'], $subselect));
Steps To ReproduceWith a fresh install of 3.3.9:
1. Create 4 lists in order, e.g. List A, B, C, D. Set them all as public.
2. Create 2 Categories, e.g. Cat 1, Cat 2
3. Categorise lists A B to Cat 1, and C and D to Cat 2
4. Create a subscriber page set to 'Display lists in labelled categories' and select Lists A, B, C and D
The subscriber page will appear as in Fig. 1.
5. Set the order for List A and C to '2' and for List B and D to '1'
The subscriber page continues to appear as in Fig. 1.

With the change recommended in the description, the lists would appear as in Fig. 2.
TagsNo tags attached.



01-03-19 02:23


fig1.png (6,422 bytes)   
fig1.png (6,422 bytes)   
fig2.png (6,454 bytes)   
fig2.png (6,454 bytes)