Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Listing module (Auflistung) has problem with expression in column list and where clauses #6337

@ghost

Description

(3.1.4)
When using an expression like

company,concat(lastname,', ',firstname) as "Name",city,phone

in the list_info field, column headings are incorrect.
mod_listing-head-with-expr

Caused in mod_listing.php - splitting the field list on commas fails here.
Solution: move THEAD code after TBODY code and use the column names actually returned by the query.

Note: A virtual column (like Nameabove) can still not be used in the query mask.
Solution: rewrite SQL generation for this case (subquery).

Also, inserting a condition like

1=1 OR 1=0

into the list_where fields results in wrong results as soon as a query mask ist added (the query mask condition is ignored). Any OR condition goes wrong.
Cause: the query mask condition is appended by AND, resulting in

1=1 OR 1=0 AND condition

which is TRUE always. It should read

(1=1 OR 1=0) AND condition

Same for list_info_where

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions