Closed (fixed)
Project:
Birthdays
Version:
4.7.x-1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2007 at 12:59 UTC
Updated:
23 Apr 2008 at 12:51 UTC
In the code for upcoming birthdays, when there aren't enough results this year, the uid part is missing in the returned array.
This is solved in HEAD, but not in the release for 4-7. Can you please commit the patch (see last line)?
// If less than $limit results returned, look at next year
$query = 'SELECT dob.uid, users.name, substring(birthday,6,2) as `month`, right(birthday, 2) as `day`';
$query .= 'FROM {dob}, {users} WHERE users.uid = dob.uid AND DAYOFYEAR(birthday) >= 0 ';
$query .= 'order by month, day limit 0,' . ($limit - db_num_rows($result));
$result = db_query($query);
while ($user = db_fetch_object($result)) {
$month = _get_shortmonth($user->month);
$birthdays[] = array('name' => $user->name, 'uid' => $user->uid, 'day' => $user->day, 'month' => $month);
}
Comments
Comment #1
maartenvg commentedComment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.