theme_filelog_format function , line 88 references a non-existent date format 'large', should be 'long'

88 if (in_array($f['date_format'], array('small', 'large', 'medium'))) {
89   $entry['timestamp'] = format_date($entry['timestamp'], $f['date_format'], '', NULL, 'en');
90 }
91 else {
92   $entry['timestamp'] = format_date($entry['timestamp'], 'custom', $f['date_format'], NULL, 'en');
93 }

This means that if the date_format key of $f == 'long', it falls through to line 92 which then interprets 'long' as a custom date format with the following effect:

l = 'A full textual representation of the day of the week'
o = Literal o
n = 'Numeric representation of a month, without leading zeros'
g = '12-hour format of an hour without leading zeros'

Therefore on May 12th at 1:55pm, my log entry timestamps say Thursdayo51

Now that I take a closer look, a similar mix up has happened where the code references date format 'small' instead of 'short'.

In order to fix this line 88 needs to change to:

88 if (in_array($f['date_format'], array('short', 'long', 'medium'))) {

Comments

grahamu’s picture

I have just realised that my bug report above is wrong. The 'small' and 'large' formats are correct, I must have had these confused with something else when I thought they were incorrect.

This issue should be closed.

cburschka’s picture

Issue summary: View changes
Status: Active » Closed (outdated)