Index: avatar_selection.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/avatar_selection/avatar_selection.module,v retrieving revision 1.1.2.20.2.14 diff -u -r1.1.2.20.2.14 avatar_selection.module --- avatar_selection.module 7 Apr 2008 11:00:58 -0000 1.1.2.20.2.14 +++ avatar_selection.module 7 Apr 2008 13:18:54 -0000 @@ -353,7 +353,8 @@ // Remove ones already in use if necessary. if (!empty($user) && variable_get('avatar_selection_distinctive_avatars', FALSE)) { - $result = db_query("SELECT DISTINCT avs.avatar FROM {avatar_selection} avs LEFT JOIN {users} u ON u.picture = avs.avatar WHERE u.picture IS NOT NULL AND u.uid <> %d", $user->uid); + $dir = file_create_path('avatar_selection'); + $result = db_query("SELECT DISTINCT avs.avatar FROM {avatar_selection} avs LEFT JOIN {users} u ON u.picture = concat('%s/', avs.avatar) WHERE u.picture IS NOT NULL AND u.uid <> %d", $dir, $user->uid); while ($avatar = db_fetch_object($result)) { $avs_image = $avatar->avatar; unset($avatars[$avs_image]);