From e594d23f7998ab587bd662fc5bc93d5dd513ef0f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 6 Oct 2013 15:53:53 +0200 Subject: [PATCH] [remove/format_birthday] Remove useless function format_birthday() B3P-RM-FORMAT_BIRTHDAY --- root/portal/includes/functions.php | 33 ------------------------------ 1 file changed, 33 deletions(-) diff --git a/root/portal/includes/functions.php b/root/portal/includes/functions.php index dc9b31b9..e5c8734b 100644 --- a/root/portal/includes/functions.php +++ b/root/portal/includes/functions.php @@ -526,39 +526,6 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite return $page_string; } -/** -* Format user date for the Birthday block -* Note: this function is used as we already added timezones, etc -* -* borrowed from Upcoming Birthday Mod -* @author: lefty -* changed to work outside session.php by B3P -* @function: format_dateucb -*/ - -function format_birthday($date, $format = false) -{ - global $user; - - $lang_dates = $user->lang['datetime']; - $format = (!$format) ? $user->data['user_dateformat'] : $format; - - // Short representation of month in format - if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false)) - { - $lang_dates['May'] = $lang_dates['May_short']; - } - unset($lang_dates['May_short']); - - // We need to create a UNIX timestamp for date() - $day = substr($date, 0, strpos($date, '-')); - $month = substr($date, (strpos($date, '-')+1), 2); - $year = substr($date, -4); - $birthday_time = mktime(0, 0, 0, $month, $day, $year); - - return strtr(@date(str_replace('|', '', $format), $birthday_time), $lang_dates); -} - /** * Check if table exists * @copyright (c) 2007 phpBB Group