aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_display.php10
-rw-r--r--phpBB/includes/functions_download.php14
-rw-r--r--phpBB/includes/functions_privmsgs.php9
-rw-r--r--phpBB/phpbb/event/kernel_exception_subscriber.php2
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php2
-rw-r--r--phpBB/styles/prosilver/template/jumpbox.html35
-rw-r--r--phpBB/styles/prosilver/theme/common.css4
8 files changed, 51 insertions, 27 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 8996c0e766..39d22254a2 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2188,7 +2188,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&') . 'confirm_key=' . $confirm_key;
$template->assign_vars(array(
- 'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],
+ 'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang($title, 1),
'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
'YES_VALUE' => $user->lang['YES'],
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 53d485cae3..498d468983 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -729,6 +729,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
*/
function generate_forum_rules(&$forum_data)
{
+ if ($forum_data['forum_rules'])
+ {
+ $forum_data['forum_rules'] = generate_text_for_display($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options']);
+ }
+
if (!$forum_data['forum_rules'] && !$forum_data['forum_rules_link'])
{
return;
@@ -736,11 +741,6 @@ function generate_forum_rules(&$forum_data)
global $template;
- if ($forum_data['forum_rules'])
- {
- $forum_data['forum_rules'] = generate_text_for_display($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options']);
- }
-
$template->assign_vars(array(
'S_FORUM_RULES' => true,
'U_FORUM_RULES' => $forum_data['forum_rules_link'],
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index d61ce3d098..d68709f2f8 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -689,6 +689,8 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
*/
function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
{
+ global $phpbb_dispatcher;
+
if (!$auth->acl_get('u_pm_download'))
{
send_status_line(403, 'Forbidden');
@@ -697,6 +699,18 @@ function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
$allowed = phpbb_download_check_pm_auth($db, $user_id, $msg_id);
+ /**
+ * Event to modify PM attachments download auth
+ *
+ * @event core.modify_pm_attach_download_auth
+ * @var bool allowed Whether the user is allowed to download from that PM or not
+ * @var int msg_id The id of the PM to download from
+ * @var int user_id The user id for auth check
+ * @since 3.1.11-RC1
+ */
+ $vars = array('allowed', 'msg_id', 'user_id');
+ extract($phpbb_dispatcher->trigger_event('core.modify_pm_attach_download_auth', compact($vars)));
+
if (!$allowed)
{
send_status_line(403, 'Forbidden');
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 69c3dad9e6..a54d753787 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -889,9 +889,16 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
SET pm_unread = 0
WHERE msg_id = $msg_id
AND user_id = $user_id
- AND folder_id = $folder_id";
+ AND folder_id = $folder_id
+ AND pm_unread = 1";
$db->sql_query($sql);
+ // If the message is already marked as read, we just skip the rest to avoid negative PM count
+ if (!$db->sql_affectedrows())
+ {
+ return;
+ }
+
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_unread_privmsg = user_unread_privmsg - 1
WHERE user_id = $user_id";
diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php
index 3c7375dadf..b7a54f2608 100644
--- a/phpBB/phpbb/event/kernel_exception_subscriber.php
+++ b/phpBB/phpbb/event/kernel_exception_subscriber.php
@@ -63,7 +63,7 @@ class kernel_exception_subscriber implements EventSubscriberInterface
$exception = $event->getException();
$message = $exception->getMessage();
- $this->type_caster->set_var($message, $message, 'string', false, false);
+ $this->type_caster->set_var($message, $message, 'string', true, false);
if ($exception instanceof \phpbb\exception\exception_interface)
{
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index f62daefdd9..a310c67359 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -311,7 +311,7 @@ class factory implements \phpbb\textformatter\cache_interface
{
$configurator->Emoticons->set(
$row['code'],
- '<img class="smilies" src="{$T_SMILIES_PATH}/' . htmlspecialchars($row['smiley_url']) . '" alt="{.}" title="' . htmlspecialchars($row['emotion']) . '"/>'
+ '<img class="smilies" src="{$T_SMILIES_PATH}/' . htmlspecialchars($row['smiley_url']) . '" width="' . $row['smiley_width'] . '" height="' . $row['smiley_height'] . '" alt="{.}" title="' . htmlspecialchars($row['emotion']) . '"/>'
);
}
diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html
index 0c40e85783..724a963264 100644
--- a/phpBB/styles/prosilver/template/jumpbox.html
+++ b/phpBB/styles/prosilver/template/jumpbox.html
@@ -1,49 +1,50 @@
-<!-- IF S_VIEWTOPIC -->
+<div class="action-bar actions-jump">
+ <!-- IF S_VIEWTOPIC -->
<p class="jumpbox-return">
<a href="{U_VIEW_FORUM}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" accesskey="r">
<i class="icon fa-angle-{S_CONTENT_FLOW_BEGIN} fa-fw icon-black" aria-hidden="true"></i><span>{L_RETURN_TO_FORUM}</span>
</a>
</p>
-<!-- ELSEIF S_VIEWFORUM -->
+ <!-- ELSEIF S_VIEWFORUM -->
<p class="jumpbox-return">
<a href="{U_INDEX}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" accesskey="r">
<i class="icon fa-angle-{S_CONTENT_FLOW_BEGIN} fa-fw icon-black" aria-hidden="true"></i><span>{L_RETURN_TO_INDEX}</span>
</a>
</p>
-<!-- ELSEIF SEARCH_TOPIC -->
+ <!-- ELSEIF SEARCH_TOPIC -->
<p class="jumpbox-return">
<a class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}" accesskey="r">
<i class="icon fa-angle-{S_CONTENT_FLOW_BEGIN} fa-fw icon-black" aria-hidden="true"></i><span>{L_RETURN_TO_TOPIC}</span>
</a>
</p>
-<!-- ELSEIF S_SEARCH_ACTION -->
+ <!-- ELSEIF S_SEARCH_ACTION -->
<p class="jumpbox-return">
<a class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">
<i class="icon fa-angle-{S_CONTENT_FLOW_BEGIN} fa-fw icon-black" aria-hidden="true"></i><span>{L_GO_TO_SEARCH_ADV}</span>
</a>
</p>
-<!-- ENDIF -->
-
-<!-- IF S_DISPLAY_JUMPBOX -->
+ <!-- ENDIF -->
+ <!-- IF S_DISPLAY_JUMPBOX -->
<div class="jumpbox dropdown-container dropdown-container-right<!-- IF not S_IN_MCP --> dropdown-up<!-- ENDIF --> dropdown-{S_CONTENT_FLOW_BEGIN} dropdown-button-control" id="jumpbox">
- <span title="<!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->" class="button button-secondary dropdown-trigger dropdown-select">
- <span><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF --></span>
- <span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span>
- </span>
+ <span title="<!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->" class="button button-secondary dropdown-trigger dropdown-select">
+ <span><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF --></span>
+ <span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span>
+ </span>
<div class="dropdown">
<div class="pointer"><div class="pointer-inner"></div></div>
<ul class="dropdown-contents">
- <!-- BEGIN jumpbox_forums -->
+ <!-- BEGIN jumpbox_forums -->
<!-- IF jumpbox_forums.FORUM_ID neq -1 -->
- <li><a href="{jumpbox_forums.LINK}" class="<!-- IF jumpbox_forums.level -->jumpbox-sub-link<!-- ELSEIF jumpbox_forums.S_IS_CAT -->jumpbox-cat-link<!-- ELSE -->jumpbox-forum-link<!-- ENDIF -->"><!-- BEGIN level --><span class="spacer"></span><!-- END level --> <span><!-- IF jumpbox_forums.level --> &#8627; &nbsp;<!-- ENDIF --> {jumpbox_forums.FORUM_NAME}</span></a></li>
+ <li><a href="{jumpbox_forums.LINK}" class="<!-- IF jumpbox_forums.level -->jumpbox-sub-link<!-- ELSEIF jumpbox_forums.S_IS_CAT -->jumpbox-cat-link<!-- ELSE -->jumpbox-forum-link<!-- ENDIF -->"><!-- BEGIN level --><span class="spacer"></span><!-- END level --> <span><!-- IF jumpbox_forums.level --> &#8627; &nbsp;<!-- ENDIF --> {jumpbox_forums.FORUM_NAME}</span></a></li>
<!-- ENDIF -->
- <!-- END jumpbox_forums -->
+ <!-- END jumpbox_forums -->
</ul>
</div>
</div>
-<!-- ELSE -->
- <br /><br />
-<!-- ENDIF -->
+ <!-- ELSE -->
+ </br></br>
+ <!-- ENDIF -->
+</div>
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 8368fc158c..ee585e6abf 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -88,7 +88,9 @@ p.right {
}
p.jumpbox-return {
- margin-top: 1em;
+ margin-top: 10px;
+ margin-bottom: 0;
+ float: left;
}
b, strong {