aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2019-12-05 10:14:46 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2019-12-05 10:15:54 +0100
commitd3749538f1692af50ee340da1d942d4b963f5c40 (patch)
tree2604536cca4e894da27e93261bfc8c604a78e29a /phpBB
parent3002cee42a922c0c90788aa9a8da5ad274773b6a (diff)
downloadforums-d3749538f1692af50ee340da1d942d4b963f5c40.tar
forums-d3749538f1692af50ee340da1d942d4b963f5c40.tar.gz
forums-d3749538f1692af50ee340da1d942d4b963f5c40.tar.bz2
forums-d3749538f1692af50ee340da1d942d4b963f5c40.tar.xz
forums-d3749538f1692af50ee340da1d942d4b963f5c40.zip
[ticket/16247] Quote PM has no identifier
PHPBB3-16247
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php5
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php2
-rw-r--r--phpBB/phpbb/textformatter/s9e/quote_helper.php6
-rw-r--r--phpBB/styles/prosilver/template/bbcode.html4
4 files changed, 16 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 06baa279a5..87a8c91fd2 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -999,7 +999,10 @@ function compose_pm($id, $mode, $action, $user_folders = array())
{
$quote_attributes['post_id'] = $post['msg_id'];
}
-
+ if ($action === 'quote')
+ {
+ $quote_attributes['msg_id'] = $post['msg_id'];
+ }
/** @var \phpbb\language\language $language */
$language = $phpbb_container->get('language');
/** @var \phpbb\textformatter\utils_interface $text_formatter_utils */
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index dca1c78d40..024bad4dd6 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -90,6 +90,8 @@ class factory implements \phpbb\textformatter\cache_interface
post_id={UINT;optional}
post_url={URL;optional;postFilter=#false}
profile_url={URL;optional;postFilter=#false}
+ msg_id={UINT;optional}
+ msg_url={URL;optional;postFilter=#false}
time={UINT;optional}
url={URL;optional}
user_id={UINT;optional}
diff --git a/phpBB/phpbb/textformatter/s9e/quote_helper.php b/phpBB/phpbb/textformatter/s9e/quote_helper.php
index 86c33c7591..dc01883c43 100644
--- a/phpBB/phpbb/textformatter/s9e/quote_helper.php
+++ b/phpBB/phpbb/textformatter/s9e/quote_helper.php
@@ -40,6 +40,7 @@ class quote_helper
public function __construct(\phpbb\user $user, $root_path, $php_ext)
{
$this->post_url = append_sid($root_path . 'viewtopic.' . $php_ext, 'p={POST_ID}#p{POST_ID}', false);
+ $this->msg_url = append_sid($root_path . 'ucp.' . $php_ext, 'i=pm&mode=view&p={MSG_ID}', false);
$this->profile_url = append_sid($root_path . 'memberlist.' . $php_ext, 'mode=viewprofile&u={USER_ID}', false);
$this->user = $user;
}
@@ -53,6 +54,7 @@ class quote_helper
public function inject_metadata($xml)
{
$post_url = $this->post_url;
+ $msg_url = $this->msg_url;
$profile_url = $this->profile_url;
$user = $this->user;
@@ -65,6 +67,10 @@ class quote_helper
{
$attributes['post_url'] = str_replace('{POST_ID}', $attributes['post_id'], $post_url);
}
+ if (isset($attributes['msg_id']))
+ {
+ $attributes['msg_url'] = str_replace('{MSG_ID}', $attributes['msg_id'], $msg_url);
+ }
if (isset($attributes['time']))
{
$attributes['date'] = $user->format_date($attributes['time']);
diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html
index 940c0ace29..0b7dcdf7eb 100644
--- a/phpBB/styles/prosilver/template/bbcode.html
+++ b/phpBB/styles/prosilver/template/bbcode.html
@@ -37,6 +37,10 @@
<xsl:text> </xsl:text>
<a href="{@post_url}" data-post-id="{@post_id}" onclick="if(document.getElementById(hash.substr(1)))href=hash">&#8593;</a>
</xsl:if>
+ <xsl:if test="@msg_url">
+ <xsl:text> </xsl:text>
+ <a href="{@msg_url}" data-msg-id="{@msg_id}" onclick="if(document.getElementById(hash.substr(1)))href=hash">&#8593;</a>
+ </xsl:if>
<xsl:if test="@date">
<div class="responsive-hide"><xsl:value-of select="@date"/></div>
</xsl:if>