This twig filter removes scheme (only http and https are supported) and
pass the result to removeWww filter to also remove 'www.' at the
beginning of an url.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
I use a kind of hacky way to convert the user locale (defined with 2 letters, like `fr`) into a local with 5 letters (like `fr_FR`). I guess it should work on most of the case..
Twig Global function are called globally. This means even on a query to the api.
Using a function we can decide when we want to call it.
Also, remove previous `COUNT(e.id)` since it doesn't work on PostgreSQL ...
Instead of performing a complex select (to retrieve all data for entry, etc...) just select the counter and retrieve it.
Down from ~50ms to ~30ms on the unread page (with 500 items)