From 7e95a3ee6c6f09e0440d6375ddd128a329d02058 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 23 Dec 2008 13:53:13 +0000 Subject: [PATCH] merge in r9090, r9170, r9174, r9179 git-svn-id: file:///svn/phpbb/trunk@9214 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_modules.php | 2 ++ phpBB/includes/session.php | 10 ++++++---- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- phpBB/styles/prosilver/template/mcp_front.html | 2 +- phpBB/styles/prosilver/template/memberlist_search.html | 4 ++-- 5 files changed, 12 insertions(+), 8 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&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '', - 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '') + 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '') ); // Display not already displayed Attachments for this post, we already parsed them. ;) diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html index 9e8d0bba40..6f048d1a2d 100644 --- a/phpBB/styles/prosilver/template/mcp_front.html +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -129,7 +129,7 @@ - {L_NO_ENTRIES} + {L_NO_ENTRIES} diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 1d1d45bf8e..6546bee8dd 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -66,8 +66,8 @@ function insert_single(user)
-
-
+
+