- Affected version
- 2.2.2
PHP:
$mediaItems = $this->sourceDb->fetchAll("
SELECT
p.*,
c.cattype,
c.ismember,
IF(u.username IS NULL, p.user, u.username) AS username,
u.email
I am not 100% sure if this is always the case, but at least on one database that we importet column
users.user
is not null but mostly contain s empty strings, so the above IF condition fails and the empty string is being taken, although photos.user is not empty in all cases.This causes automatically created albums to havename "No title"
Changing the query part to
F(u.username IS NULL OR u.username = '', p.user, u.username) AS username
seems to fix this.