Skip to content

Commit

Permalink
Reversie #1663 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Studio384 committed Jun 13, 2018
1 parent 436475c commit 9e9ebdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion backstage/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<div class="container">
<h2 class="clearfix"><span class="version-name">Emerald Update 9 <small>2.0.9</small></span></h2>
<ul class="changes">
<li><div class="stater"><em class="state state-system"><?php _e('System', 'luna') ?></em></div><?php _e('Profiles now show time in function of the profile\'s user', 'luna') ?></li>
<li><div class="stater"><em class="state state-system"><?php _e('System', 'luna') ?></em></div><?php _e('Further improvements for PHP 7.2 support', 'luna') ?></li>
<li><div class="stater"><em class="state state-note"><?php _e('Changed', 'luna') ?></em></div><?php _e('Updates some string to reflect current situations', 'luna') ?></li>
<li><div class="stater"><em class="state state-improved"><?php _e('Improved', 'luna') ?></em></div><?php _e('Site descriptions can now be up to 300 characters long instead of 255', 'luna') ?></li>
Expand Down
11 changes: 3 additions & 8 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1135,24 +1135,19 @@ function is_subforum($id, $self_subforum = '0') {
//
// Format a time string according to $time_format and time zones
//
function format_time($timestamp, $date_only = false, $date_format = null, $time_format = null, $time_only = false, $no_text = false, $user = null) {
function format_time($timestamp, $date_only = false, $date_format = null, $time_format = null, $time_only = false, $no_text = false) {
global $luna_config, $luna_user, $forum_date_formats, $forum_time_formats;

if ($timestamp == '')
return __('Never', 'luna');

if (is_null($user))
$user = $pun_user;

$diff = ($user['timezone'] + $user['dst']) * 3600;

$now = time();

if(is_null($date_format))
$date_format = $forum_date_formats[$user['date_format']];
$date_format = $forum_date_formats[$luna_user['date_format']];

if(is_null($time_format))
$time_format = $forum_time_formats[$user['time_format']];
$time_format = $forum_time_formats[$luna_user['time_format']];

$date = date($date_format, $timestamp);
$today = date($date_format, $now);
Expand Down
4 changes: 2 additions & 2 deletions themes/Fifteen/views/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
echo "\t\t\t\t\t\t\t\t".'<option value="'.$key.'"';
if ($user['time_format'] == $key)
echo ' selected';
echo '>'. format_time(time(), false, null, $time_format, true, true, $user);
echo '>'. format_time(time(), false, null, $time_format, true, true);
if ($key == 0)
echo ' ('.__('Default', 'luna').')';
echo "</option>\n";
Expand All @@ -449,7 +449,7 @@
echo "\t\t\t\t\t\t\t\t".'<option value="'.$key.'"';
if ($user['date_format'] == $key)
echo ' selected';
echo '>'. format_time(time(), true, $date_format, null, false, true, $user);
echo '>'. format_time(time(), true, $date_format, null, false, true);
if ($key == 0)
echo ' ('.__('Default', 'luna').')';
echo "</option>\n";
Expand Down

0 comments on commit 9e9ebdd

Please sign in to comment.