I am not sure to qualify this as bug or enhancement, however, as the change proposed seems to be quite obvious I finally set it as bug. Sorry if I was mistaken

There several lines in the module where a SELECT COUNT(*) is performed but , even so easy sentence a ORDER BY statement is added to the end of the line : one example:

db_result(db_query("SELECT count(*) FROM {avatar_selection} avs LEFT JOIN {users} u ON u.picture = concat('%s/', avs.avatar) LEFT JOIN {avatar_selection_roles} avsr ON avs.aid = avsr.aid WHERE u.picture IS NULL AND avsr.rid IS NULL OR avsr.rid IN (". db_placeholders($user_roles) .") ORDER BY .......", $dir, $user_roles));

I just simply removed the clausules ORDER BY in my postgresql drupal installation and it works. I guess that this will work also in MySQL because I don¡t understand why is needed an ORDER BY in a SELECT count alike sentence.

This represents a few line modifications and AVATAR_SELECTION can support PostgreSQL

Comments

stella’s picture

Status: Active » Fixed

Fixed, thanks! It'll be included in the next dev release, available later today.

Cheers,
Stella

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

stella’s picture

Released in 6.x-1.6.