aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_modules.php2
-rw-r--r--phpBB/includes/session.php10
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
3 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 70b3c621c8..eb36916344 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -661,6 +661,8 @@ class acp_modules
$iteration++;
}
+ $db->sql_freeresult($result);
+
unset($padding_store);
return $module_list;
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 6c76bd311c..7e7fbfb8ac 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1984,7 +1984,8 @@ class user extends session
static $date_cache;
$format = (!$format) ? $this->date_format : $format;
- $delta = time() - $gmepoch;
+ $now = time();
+ $delta = $now - $gmepoch;
if (!isset($date_cache[$format]))
{
@@ -2004,10 +2005,11 @@ class user extends session
}
}
- // Show date < 1 hour ago as 'xx min ago'
- if ($delta <= 3600 && $delta && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
+ // Show date <= 1 hour ago as 'xx min ago'
+ // A small tolerence is given for times in the future and times in the future but in the same minute are displayed as '< than a minute ago'
+ if ($delta <= 3600 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
{
- return $this->lang(array('datetime', 'AGO'), (int) floor($delta / 60));
+ return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
}
if (!$midnight)
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index bb2c2c6f03..8b249ab66a 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -220,7 +220,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
- 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
+ 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
);
// Display not already displayed Attachments for this post, we already parsed them. ;)