diff --git a/root/portal/modules/portal_birthday_list.php b/root/portal/modules/portal_birthday_list.php
index 9a2e5a45..583fb875 100644
--- a/root/portal/modules/portal_birthday_list.php
+++ b/root/portal/modules/portal_birthday_list.php
@@ -61,7 +61,8 @@ class portal_birthday_list_module
while ($cache_days > 0)
{
$day = getdate(time() + 86400 * $cache_days + $user->timezone + $user->dst - date('Z'));
- $sql_days .= " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $day['mday'], $day['mon'])) . "%'";
+ $like_expression = $db->sql_like_expression($db->any_char . (sprintf('%2d-%2d-', $day['mday'], $day['mon'])) . $db->any_char);
+ $sql_days .= " OR u.user_birthday " . $like_expression . "";
$cache_days--;
}
@@ -92,21 +93,19 @@ class portal_birthday_list_module
{
if (substr($row['user_birthday'], 0, 6) == $today)
{
- $birthday_list .= '
' . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) . '';
- if ($age = (int) substr($row['user_birthday'], -4))
- {
- $birthday_list .= ' (' . ($now['year'] - $age) . ')';
- }
- $birthday_list .= '
';
+ $birthday_list = true;
+ $template->assign_block_vars('board3_birthday_list', array(
+ 'USER' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'AGE' => ($age = (int) substr($row['user_birthday'], -4)) ? ' (' . ($now['year'] - $age) . ')' : '',
+ ));
}
elseif ($config['board3_birthdays_ahead_' . $module_id] > 0)
{
- $birthday_ahead_list .= '
' . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) . '';
- if ($age = (int) substr($row['user_birthday'], -4))
- {
- $birthday_ahead_list .= ' (' . ($now['year'] - $age) . ')';
- }
- $birthday_ahead_list .= '
';
+ $birthday_ahead_list = true;
+ $template->assign_block_vars('board3_birthday_ahead_list', array(
+ 'USER' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'AGE' => ($age = (int) substr($row['user_birthday'], -4)) ? ' (' . ($now['year'] - $age) . ')' : '',
+ ));
}
}
$db->sql_freeresult($result);
diff --git a/root/styles/prosilver/template/portal/modules/birthdays_side.html b/root/styles/prosilver/template/portal/modules/birthdays_side.html
index 60eca421..83f4a7be 100644
--- a/root/styles/prosilver/template/portal/modules/birthdays_side.html
+++ b/root/styles/prosilver/template/portal/modules/birthdays_side.html
@@ -1,6 +1,17 @@
{$LR_BLOCK_H_L} {$TITLE}{$LR_BLOCK_H_R}
- {L_CONGRATULATIONS}:
{BIRTHDAY_LIST}
+ {L_CONGRATULATIONS}:
+
+
+
+
+
+ {board3_birthday_list.USER}
+
+
+ {board3_birthday_list.AGE}
+
+
{L_NO_BIRTHDAYS}
@@ -9,7 +20,17 @@
{L_BIRTHDAYS_AHEAD}
- {BIRTHDAYS_AHEAD_LIST}
+
+
+
+
+
+ {board3_birthday_ahead_list.USER}
+
+
+ {board3_birthday_ahead_list.AGE}
+
+
{L_NO_BIRTHDAYS_AHEAD}
diff --git a/root/styles/subsilver2/template/portal/modules/birthdays_side.html b/root/styles/subsilver2/template/portal/modules/birthdays_side.html
index a8c516f4..8c1cf575 100644
--- a/root/styles/subsilver2/template/portal/modules/birthdays_side.html
+++ b/root/styles/subsilver2/template/portal/modules/birthdays_side.html
@@ -3,7 +3,18 @@