aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build_helper.php2
-rw-r--r--phpBB/docs/events.md112
-rw-r--r--phpBB/includes/acp/acp_forums.php10
-rw-r--r--phpBB/includes/acp/acp_inactive.php2
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/acp/auth.php4
-rw-r--r--phpBB/includes/bbcode.php2
-rw-r--r--phpBB/includes/diff/diff.php22
-rw-r--r--phpBB/includes/diff/renderer.php2
-rw-r--r--phpBB/includes/functions_compress.php4
-rw-r--r--phpBB/includes/functions_content.php2
-rw-r--r--phpBB/includes/functions_messenger.php12
-rw-r--r--phpBB/includes/functions_module.php2
-rw-r--r--phpBB/includes/functions_transfer.php8
-rw-r--r--phpBB/includes/hooks/index.php2
-rw-r--r--phpBB/includes/mcp/mcp_logs.php2
-rw-r--r--phpBB/includes/mcp/mcp_main.php20
-rw-r--r--phpBB/includes/mcp/mcp_notes.php2
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php2
-rw-r--r--phpBB/includes/mcp/mcp_queue.php2
-rw-r--r--phpBB/includes/mcp/mcp_reports.php2
-rw-r--r--phpBB/includes/mcp/mcp_warn.php2
-rw-r--r--phpBB/includes/message_parser.php2
-rw-r--r--phpBB/includes/questionnaire/questionnaire.php4
-rw-r--r--phpBB/includes/sphinxapi.php44
-rw-r--r--phpBB/includes/ucp/ucp_main.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm.php6
-rw-r--r--phpBB/language/en/email/forum_notify.txt1
-rw-r--r--phpBB/language/en/email/newtopic_notify.txt1
-rw-r--r--phpBB/language/en/email/topic_notify.txt1
-rw-r--r--phpBB/language/en/ucp.php1
-rw-r--r--phpBB/language/en/viewtopic.php1
-rw-r--r--phpBB/phpbb/install/helper/database.php2
-rw-r--r--phpBB/phpbb/notification/manager.php31
-rw-r--r--phpBB/phpbb/notification/method/board.php2
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html2
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html2
-rw-r--r--phpBB/styles/prosilver/template/memberlist_view.html2
-rw-r--r--phpBB/styles/prosilver/template/search_results.html8
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html6
-rw-r--r--phpBB/styles/prosilver/template/viewonline_body.html2
-rw-r--r--phpBB/viewtopic.php8
-rw-r--r--tests/cache/cache_memory.php2
43 files changed, 250 insertions, 100 deletions
diff --git a/build/build_helper.php b/build/build_helper.php
index ff93c22a12..c33e2419c6 100644
--- a/build/build_helper.php
+++ b/build/build_helper.php
@@ -33,7 +33,7 @@ class build_package
var $status_begun = false;
var $num_dots = 0;
- function build_package($versions, $verbose = false)
+ function __construct($versions, $verbose = false)
{
$this->versions = $versions;
$this->verbose = $verbose;
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index d673cea8c1..de3952cafc 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -750,6 +750,20 @@ forumlist_body_last_post_title_prepend
* Since: 3.1.0-a1
* Purpose: Add content before the post title of the latest post in a forum on the forum list.
+forumlist_body_last_poster_username_append
+===
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to last poster username of member
+
+forumlist_body_last_poster_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to last poster username of member
+
forumlist_body_subforum_link_append
===
* Locations:
@@ -1272,6 +1286,20 @@ memberlist_view_user_statistics_before
* Since: 3.1.0-a1
* Purpose: Add entries before the user statistics part of any user profile
+memberlist_view_username_append
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to username of member
+
+memberlist_view_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to username of member
+
memberlist_view_zebra_after
===
* Locations:
@@ -1931,6 +1959,20 @@ search_results_header_before
* Since: 3.1.4-RC1
* Purpose: Add content before the header of the search results.
+search_results_last_post_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to last post author username of member
+
+search_results_last_post_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to last post author username of member
+
search_results_post_after
===
* Locations:
@@ -1938,6 +1980,20 @@ search_results_post_after
* Since: 3.1.0-b3
* Purpose: Add data after search result posts
+search_results_post_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to post author username of member
+
+search_results_post_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to post author username of member
+
search_results_post_before
===
* Locations:
@@ -1973,6 +2029,20 @@ search_results_topic_after
* Since: 3.1.0-b4
* Purpose: Add data after search result topics
+search_results_topic_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to topic author username of member
+
+search_results_topic_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to topic author username of member
+
search_results_topic_before
===
* Locations:
@@ -2392,6 +2462,34 @@ ucp_friend_list_after
* Since: 3.1.0-a4
* Purpose: Add optional elements after list of friends in UCP
+viewforum_body_last_post_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to last post author username of member
+
+viewforum_body_last_post_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to last post author username of member
+
+viewforum_body_topic_author_username_append
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to topic author username of member
+
+viewforum_body_topic_author_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to topic author username of member
+
viewforum_body_topic_row_after
===
* Locations:
@@ -2525,6 +2623,20 @@ viewforum_forum_title_before
* Since: 3.1.5-RC1
* Purpose: Add content directly before the forum title on the View forum screen
+viewonline_body_username_append
+===
+* Locations:
+ + styles/prosilver/template/viewonline_body.html
+* Since: 3.2.4-RC1
+* Purpose: Append information to username of member
+
+viewonline_body_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/viewonline_body.html
+* Since: 3.2.4-RC1
+* Purpose: Prepend information to username of member
+
viewtopic_print_head_append
===
* Locations:
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 13d74f0811..be5a7a2f26 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1541,6 +1541,16 @@ class acp_forums
$table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+ /**
+ * Perform additional actions before move forum content
+ *
+ * @event core.acp_manage_forums_move_content_sql_before
+ * @var array table_ary Array of tables from which forum_id will be updated
+ * @since 3.2.4-RC1
+ */
+ $vars = array('table_ary');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_move_content_sql_before', compact($vars)));
+
foreach ($table_ary as $table)
{
$sql = "UPDATE $table
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 6026f44ede..66f0d2116c 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -24,7 +24,7 @@ class acp_inactive
var $u_action;
var $p_master;
- function acp_inactive(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 60afccdc22..205ce20bc3 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -24,7 +24,7 @@ class acp_users
var $u_action;
var $p_master;
- function acp_users(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 58da3b922f..b414a3121a 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -27,7 +27,7 @@ class auth_admin extends \phpbb\auth\auth
/**
* Init auth settings
*/
- function auth_admin()
+ function __construct()
{
global $db, $cache;
@@ -819,7 +819,7 @@ class auth_admin extends \phpbb\auth\auth
// Because we just changed the options and also purged the options cache, we instantly update/regenerate it for later calls to succeed.
$this->acl_options = array();
- $this->auth_admin();
+ $this->__construct();
return true;
}
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 239e5c8ad6..c00f9bd207 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -37,7 +37,7 @@ class bbcode
* Constructor
* Init bbcode cache entries if bitfield is specified
*/
- function bbcode($bitfield = '')
+ function __construct($bitfield = '')
{
if ($bitfield)
{
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index 68c6c6e6a8..d8ae9d77ac 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -50,7 +50,7 @@ class diff
* @param array &$to_content An array of strings.
* @param bool $preserve_cr If true, \r is replaced by a new line in the diff output
*/
- function diff(&$from_content, &$to_content, $preserve_cr = true)
+ function __construct(&$from_content, &$to_content, $preserve_cr = true)
{
$diff_engine = new diff_engine();
$this->_edits = $diff_engine->diff($from_content, $to_content, $preserve_cr);
@@ -330,14 +330,14 @@ class mapped_diff extends diff
* compared when computing the diff.
* @param array $mapped_to_lines This array should have the same number of elements as $to_lines.
*/
- function mapped_diff(&$from_lines, &$to_lines, &$mapped_from_lines, &$mapped_to_lines)
+ function __construct(&$from_lines, &$to_lines, &$mapped_from_lines, &$mapped_to_lines)
{
if (count($from_lines) != count($mapped_from_lines) || count($to_lines) != count($mapped_to_lines))
{
return false;
}
- parent::diff($mapped_from_lines, $mapped_to_lines);
+ parent::__construct($mapped_from_lines, $mapped_to_lines);
$xi = $yi = 0;
for ($i = 0; $i < count($this->_edits); $i++)
@@ -394,7 +394,7 @@ class diff_op
*/
class diff_op_copy extends diff_op
{
- function diff_op_copy($orig, $final = false)
+ function __construct($orig, $final = false)
{
if (!is_array($final))
{
@@ -419,7 +419,7 @@ class diff_op_copy extends diff_op
*/
class diff_op_delete extends diff_op
{
- function diff_op_delete($lines)
+ function __construct($lines)
{
$this->orig = $lines;
$this->final = false;
@@ -440,7 +440,7 @@ class diff_op_delete extends diff_op
*/
class diff_op_add extends diff_op
{
- function diff_op_add($lines)
+ function __construct($lines)
{
$this->final = $lines;
$this->orig = false;
@@ -461,7 +461,7 @@ class diff_op_add extends diff_op
*/
class diff_op_change extends diff_op
{
- function diff_op_change($orig, $final)
+ function __construct($orig, $final)
{
$this->orig = $orig;
$this->final = $final;
@@ -498,7 +498,7 @@ class diff3 extends diff
* @param bool $preserve_cr If true, \r\n and bare \r are replaced by a new line
* in the diff output
*/
- function diff3(&$orig, &$final1, &$final2, $preserve_cr = true)
+ function __construct(&$orig, &$final1, &$final2, $preserve_cr = true)
{
$diff_engine = new diff_engine();
@@ -754,7 +754,7 @@ class diff3 extends diff
*/
class diff3_op
{
- function diff3_op($orig = false, $final1 = false, $final2 = false)
+ function __construct($orig = false, $final1 = false, $final2 = false)
{
$this->orig = $orig ? $orig : array();
$this->final1 = $final1 ? $final1 : array();
@@ -1066,7 +1066,7 @@ class diff3_op
*/
class diff3_op_copy extends diff3_op
{
- function diff3_op_copy($lines = false)
+ function __construct($lines = false)
{
$this->orig = $lines ? $lines : array();
$this->final1 = &$this->orig;
@@ -1092,7 +1092,7 @@ class diff3_op_copy extends diff3_op
*/
class diff3_block_builder
{
- function diff3_block_builder()
+ function __construct()
{
$this->_init();
}
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index c12ff3b7d5..8a8b0c295e 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -56,7 +56,7 @@ class diff_renderer
/**
* Constructor.
*/
- function diff_renderer($params = array())
+ function __construct($params = array())
{
foreach ($params as $param => $value)
{
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index 77e03ee449..e86da77b38 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -210,7 +210,7 @@ class compress_zip extends compress
/**
* Constructor
*/
- function compress_zip($mode, $file)
+ function __construct($mode, $file)
{
global $phpbb_filesystem;
@@ -569,7 +569,7 @@ class compress_tar extends compress
/**
* Constructor
*/
- function compress_tar($mode, $file, $type = '')
+ function __construct($mode, $file, $type = '')
{
global $phpbb_filesystem;
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index e124bd46e6..43dce036a3 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -1672,7 +1672,7 @@ class bitfield
{
var $data;
- function bitfield($bitfield = '')
+ function __construct($bitfield = '')
{
$this->data = base64_decode($bitfield);
}
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 40654b7988..4f0d40031d 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -37,7 +37,7 @@ class messenger
/**
* Constructor
*/
- function messenger($use_queue = true)
+ function __construct($use_queue = true)
{
global $config;
@@ -379,6 +379,12 @@ class messenger
$this->subject = (($this->subject != '') ? $this->subject : $user->lang['NO_EMAIL_SUBJECT']);
}
+ if (preg_match('#^(List-Unsubscribe:(.*?))$#m', $this->msg, $match))
+ {
+ $this->extra_headers[] = $match[1];
+ $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
+ }
+
if ($drop_header)
{
$this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
@@ -787,7 +793,7 @@ class queue
/**
* constructor
*/
- function queue()
+ function __construct()
{
global $phpEx, $phpbb_root_path, $phpbb_filesystem, $phpbb_container;
@@ -1323,7 +1329,7 @@ class smtp_class
var $backtrace = false;
var $backtrace_log = array();
- function smtp_class()
+ function __construct()
{
// Always create a backtrace for admins to identify SMTP problems
$this->backtrace = true;
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 3563a646e8..88dafc4300 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -40,7 +40,7 @@ class p_master
* Constuctor
* Set module include path
*/
- function p_master($include_path = false)
+ function __construct($include_path = false)
{
global $phpbb_root_path;
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index 67ce2211e7..7427b89917 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -38,7 +38,7 @@ class transfer
/**
* Constructor - init some basic values
*/
- function transfer()
+ function __construct()
{
global $phpbb_root_path;
@@ -264,7 +264,7 @@ class ftp extends transfer
/**
* Standard parameters for FTP session
*/
- function ftp($host, $username, $password, $root_path, $port = 21, $timeout = 10)
+ function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)
{
$this->host = $host;
$this->port = $port;
@@ -512,7 +512,7 @@ class ftp_fsock extends transfer
/**
* Standard parameters for FTP session
*/
- function ftp_fsock($host, $username, $password, $root_path, $port = 21, $timeout = 10)
+ function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)
{
$this->host = $host;
$this->port = $port;
@@ -529,7 +529,7 @@ class ftp_fsock extends transfer
}
// Init some needed values
- $this->transfer();
+ parent::__construct();
return;
}
diff --git a/phpBB/includes/hooks/index.php b/phpBB/includes/hooks/index.php
index 805e0eea1a..821242cbf4 100644
--- a/phpBB/includes/hooks/index.php
+++ b/phpBB/includes/hooks/index.php
@@ -44,7 +44,7 @@ class phpbb_hook
*
* @param array $valid_hooks array containing the hookable functions/methods
*/
- function phpbb_hook($valid_hooks)
+ function __construct($valid_hooks)
{
foreach ($valid_hooks as $_null => $method)
{
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index cbc84e8c64..049f24b262 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -28,7 +28,7 @@ class mcp_logs
var $u_action;
var $p_master;
- function mcp_logs(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 2133bd9a19..196d2f995f 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -28,7 +28,7 @@ class mcp_main
var $p_master;
var $u_action;
- function mcp_main(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
@@ -1458,6 +1458,24 @@ function mcp_fork_topic($topic_ids)
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_post_id = $db->sql_nextid();
+ /**
+ * Perform actions after forked topic is created.
+ *
+ * @event core.mcp_main_fork_sql_after
+ * @var int new_topic_id The newly created topic ID
+ * @var int to_forum_id The forum ID where the forked topic has been moved to
+ * @var int new_post_id The newly created post ID
+ * @var array row Post data
+ * @since 3.2.4-RC1
+ */
+ $vars = array(
+ 'new_topic_id',
+ 'to_forum_id',
+ 'new_post_id',
+ 'row',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_main_fork_sql_after', compact($vars)));
+
switch ($row['post_visibility'])
{
case ITEM_APPROVED:
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index 67f59bd618..12b116e495 100644
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -28,7 +28,7 @@ class mcp_notes
var $p_master;
var $u_action;
- function mcp_notes(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
index c17b9985af..ba89733bfe 100644
--- a/phpBB/includes/mcp/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -28,7 +28,7 @@ class mcp_pm_reports
var $p_master;
var $u_action;
- function mcp_pm_reports(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 4f1f9bb990..a95c8fad44 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -28,7 +28,7 @@ class mcp_queue
var $p_master;
var $u_action;
- public function mcp_queue(&$p_master)
+ public function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 78f497c275..a1386e5d7e 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -28,7 +28,7 @@ class mcp_reports
var $p_master;
var $u_action;
- function mcp_reports(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 0e80372f43..888069ef5d 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -28,7 +28,7 @@ class mcp_warn
var $p_master;
var $u_action;
- function mcp_warn(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index d67bc69591..c12f2ab1aa 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1139,7 +1139,7 @@ class parse_message extends bbcode_firstpass
/**
* Init - give message here or manually
*/
- function parse_message($message = '')
+ function __construct($message = '')
{
// Init BBCode UID
$this->bbcode_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);
diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php
index ee6d0ee2a6..5a27124bf9 100644
--- a/phpBB/includes/questionnaire/questionnaire.php
+++ b/phpBB/includes/questionnaire/questionnaire.php
@@ -40,7 +40,7 @@ class phpbb_questionnaire_data_collector
*
* @param string
*/
- function phpbb_questionnaire_data_collector($install_id)
+ function __construct($install_id)
{
$this->install_id = $install_id;
$this->providers = array();
@@ -223,7 +223,7 @@ class phpbb_questionnaire_phpbb_data_provider
*
* @param array $config
*/
- function phpbb_questionnaire_phpbb_data_provider($config)
+ function __construct($config)
{
// generate a unique id if necessary
if (empty($config['questionnaire_unique_id']))
diff --git a/phpBB/includes/sphinxapi.php b/phpBB/includes/sphinxapi.php
index 5e1f131ac2..b63a85a90f 100644
--- a/phpBB/includes/sphinxapi.php
+++ b/phpBB/includes/sphinxapi.php
@@ -126,7 +126,7 @@ define ( "SPH_GROUPBY_ATTRPAIR", 5 );
function sphPackI64 ( $v )
{
assert ( is_numeric($v) );
-
+
// x64
if ( PHP_INT_SIZE>=8 )
{
@@ -138,7 +138,7 @@ function sphPackI64 ( $v )
if ( is_int($v) )
return pack ( "NN", $v < 0 ? -1 : 0, $v );
- // x32, bcmath
+ // x32, bcmath
if ( function_exists("bcmul") )
{
if ( bccomp ( $v, 0 ) == -1 )
@@ -175,16 +175,16 @@ function sphPackI64 ( $v )
function sphPackU64 ( $v )
{
assert ( is_numeric($v) );
-
+
// x64
if ( PHP_INT_SIZE>=8 )
{
assert ( $v>=0 );
-
+
// x64, int
if ( is_int($v) )
return pack ( "NN", $v>>32, $v&0xFFFFFFFF );
-
+
// x64, bcmath
if ( function_exists("bcmul") )
{
@@ -192,12 +192,12 @@ function sphPackU64 ( $v )
$l = bcmod ( $v, 4294967296 );
return pack ( "NN", $h, $l );
}
-
+
// x64, no-bcmath
$p = max ( 0, strlen($v) - 13 );
$lo = (int)substr ( $v, $p );
$hi = (int)substr ( $v, 0, $p );
-
+
$m = $lo + $hi*1316134912;
$l = $m % 4294967296;
$h = $hi*2328 + (int)($m/4294967296);
@@ -208,7 +208,7 @@ function sphPackU64 ( $v )
// x32, int
if ( is_int($v) )
return pack ( "NN", 0, $v );
-
+
// x32, bcmath
if ( function_exists("bcmul") )
{
@@ -221,7 +221,7 @@ function sphPackU64 ( $v )
$p = max(0, strlen($v) - 13);
$lo = (float)substr($v, $p);
$hi = (float)substr($v, 0, $p);
-
+
$m = $lo + $hi*1316134912.0;
$q = floor($m / 4294967296.0);
$l = $m - ($q * 4294967296.0);
@@ -277,11 +277,11 @@ function sphUnpackU64 ( $v )
// x32, bcmath
if ( function_exists("bcmul") )
return bcadd ( $lo, bcmul ( $hi, "4294967296" ) );
-
+
// x32, no-bcmath
$hi = (float)$hi;
$lo = (float)$lo;
-
+
$q = floor($hi/10000000.0);
$r = $hi - $q*10000000.0;
$m = $lo + $r*4967296.0;
@@ -324,7 +324,7 @@ function sphUnpackI64 ( $v )
return $lo;
return sprintf ( "%.0f", $lo - 4294967296.0 );
}
-
+
$neg = "";
$c = 0;
if ( $hi<0 )
@@ -333,7 +333,7 @@ function sphUnpackI64 ( $v )
$lo = ~$lo;
$c = 1;
$neg = "-";
- }
+ }
$hi = sprintf ( "%u", $hi );
$lo = sprintf ( "%u", $lo );
@@ -345,7 +345,7 @@ function sphUnpackI64 ( $v )
// x32, no-bcmath
$hi = (float)$hi;
$lo = (float)$lo;
-
+
$q = floor($hi/10000000.0);
$r = $hi - $q*10000000.0;
$m = $lo + $r*4967296.0;
@@ -427,7 +427,7 @@ class SphinxClient
/////////////////////////////////////////////////////////////////////////////
/// create a new client object and fill defaults
- function SphinxClient ()
+ function __construct ()
{
// per-client-object settings
$this->_host = "localhost";
@@ -510,7 +510,7 @@ class SphinxClient
$this->_path = $host;
return;
}
-
+
assert ( is_int($port) );
$this->_host = $host;
$this->_port = $port;
@@ -590,14 +590,14 @@ class SphinxClient
$fp = @fsockopen ( $host, $port, $errno, $errstr );
else
$fp = @fsockopen ( $host, $port, $errno, $errstr, $this->_timeout );
-
+
if ( !$fp )
{
if ( $this->_path )
$location = $this->_path;
else
$location = "{$this->_host}:{$this->_port}";
-
+
$errstr = trim ( $errstr );
$this->_error = "connection to $location failed (errno=$errno, msg=$errstr)";
$this->_connerror = true;
@@ -1236,7 +1236,7 @@ class SphinxClient
if ( $type==SPH_ATTR_FLOAT )
{
list(,$uval) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
- list(,$fval) = unpack ( "f*", pack ( "L", $uval ) );
+ list(,$fval) = unpack ( "f*", pack ( "L", $uval ) );
$attrvals[$attr] = $fval;
continue;
}
@@ -1264,7 +1264,7 @@ class SphinxClient
} else if ( $type==SPH_ATTR_STRING )
{
$attrvals[$attr] = substr ( $response, $p, $val );
- $p += $val;
+ $p += $val;
} else
{
$attrvals[$attr] = sphFixUint($val);
@@ -1345,7 +1345,7 @@ class SphinxClient
if ( !isset($opts["passage_boundary"]) ) $opts["passage_boundary"] = "none";
if ( !isset($opts["emit_zones"]) ) $opts["emit_zones"] = false;
if ( !isset($opts["load_files_scattered"]) ) $opts["load_files_scattered"] = false;
-
+
/////////////////
// build request
@@ -1634,7 +1634,7 @@ class SphinxClient
fclose ( $this->_socket );
$this->_socket = false;
-
+
return true;
}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index f8a80b3324..ec652a5e45 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -28,7 +28,7 @@ class ucp_main
var $p_master;
var $u_action;
- function ucp_main(&$p_master)
+ function __construct(&$p_master)
{
$this->p_master = &$p_master;
}
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index d145d66f59..fa374c15c8 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -170,6 +170,12 @@ class ucp_pm
trigger_error('NO_AUTH_READ_MESSAGE');
}
+ if ($view == 'print' && (!$config['print_pm'] || !$auth->acl_get('u_pm_printpm')))
+ {
+ send_status_line(403, 'Forbidden');
+ trigger_error('NO_AUTH_PRINT_MESSAGE');
+ }
+
// Do not allow hold messages to be seen
if ($folder_id == PRIVMSGS_HOLD_BOX)
{
diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt
index ccae82c862..1dfe8c652d 100644
--- a/phpBB/language/en/email/forum_notify.txt
+++ b/phpBB/language/en/email/forum_notify.txt
@@ -1,4 +1,5 @@
Subject: Forum post notification - "{FORUM_NAME}"
+List-Unsubscribe: <{U_STOP_WATCHING_FORUM}>
Hello {USERNAME},
diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt
index 12e0bb8393..0dfc9e43b4 100644
--- a/phpBB/language/en/email/newtopic_notify.txt
+++ b/phpBB/language/en/email/newtopic_notify.txt
@@ -1,4 +1,5 @@
Subject: New topic notification - "{FORUM_NAME}"
+List-Unsubscribe: <{U_STOP_WATCHING_FORUM}>
Hello {USERNAME},
diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt
index 20b86ee729..92bf85806e 100644
--- a/phpBB/language/en/email/topic_notify.txt
+++ b/phpBB/language/en/email/topic_notify.txt
@@ -1,4 +1,5 @@
Subject: Topic reply notification - "{TOPIC_TITLE}"
+List-Unsubscribe: <{U_STOP_WATCHING_TOPIC}>
Hello {USERNAME},
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 5056e23d24..64b624ff3f 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -377,6 +377,7 @@ $lang = array_merge($lang, array(
'NO_AUTH_PROFILEINFO' => 'You are not authorised to change your profile information.',
'NO_AUTH_READ_HOLD_MESSAGE' => 'You are not authorised to read private messages that are on hold.',
'NO_AUTH_READ_MESSAGE' => 'You are not authorised to read private messages.',
+ 'NO_AUTH_PRINT_MESSAGE' => 'You are not authorised to print private messages.',
'NO_AUTH_READ_REMOVED_MESSAGE' => 'You are not able to read this message because it was removed by the author.',
'NO_AUTH_SEND_MESSAGE' => 'You are not authorised to send private messages.',
'NO_AUTH_SIGNATURE' => 'You are not authorised to define a signature.',
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
index 5890eecdb6..5d127acb3d 100644
--- a/phpBB/language/en/viewtopic.php
+++ b/phpBB/language/en/viewtopic.php
@@ -88,6 +88,7 @@ $lang = array_merge($lang, array(
'NO_UNREAD_POSTS' => 'There are no new unread posts for this topic.',
'NO_VOTE_OPTION' => 'You must specify an option when voting.',
'NO_VOTES' => 'No votes',
+ 'NO_AUTH_PRINT_TOPIC' => 'You are not authorised to print topics.',
'POLL_ENDED_AT' => 'Poll ended at %s',
'POLL_RUN_TILL' => 'Poll runs till %s',
diff --git a/phpBB/phpbb/install/helper/database.php b/phpBB/phpbb/install/helper/database.php
index 21af652f9d..fa5a10c6fc 100644
--- a/phpBB/phpbb/install/helper/database.php
+++ b/phpBB/phpbb/install/helper/database.php
@@ -76,7 +76,7 @@ class database
'LABEL' => 'Oracle',
'SCHEMA' => 'oracle',
'MODULE' => 'oci8',
- 'DELIM' => '/',
+ 'DELIM' => ';',
'DRIVER' => 'phpbb\db\driver\oracle',
'AVAILABLE' => true,
'2.0.x' => false,
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index ac6bb3c6da..52c650df5d 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -899,32 +899,19 @@ class manager
*/
public function get_notification_type_id($notification_type_name)
{
- $notification_type_ids = $this->cache->get('notification_type_ids');
-
- $this->db->sql_transaction('begin');
-
- if ($notification_type_ids === false)
+ $sql = 'SELECT notification_type_id, notification_type_name
+ FROM ' . $this->notification_types_table;
+ $result = $this->db->sql_query($sql, 604800); // cache for one week
+ while ($row = $this->db->sql_fetchrow($result))
{
- $notification_type_ids = array();
-
- $sql = 'SELECT notification_type_id, notification_type_name
- FROM ' . $this->notification_types_table;
- $result = $this->db->sql_query($sql);
- while ($row = $this->db->sql_fetchrow($result))
- {
- $notification_type_ids[$row['notification_type_name']] = (int) $row['notification_type_id'];
- }
- $this->db->sql_freeresult($result);
-
- $this->cache->put('notification_type_ids', $notification_type_ids);
+ $notification_type_ids[$row['notification_type_name']] = (int) $row['notification_type_id'];
}
+ $this->db->sql_freeresult($result);
if (!isset($notification_type_ids[$notification_type_name]))
{
if (!isset($this->notification_types[$notification_type_name]) && !isset($this->notification_types['notification.type.' . $notification_type_name]))
{
- $this->db->sql_transaction('rollback');
-
throw new \phpbb\notification\exception('NOTIFICATION_TYPE_NOT_EXIST', array($notification_type_name));
}
@@ -934,13 +921,13 @@ class manager
));
$this->db->sql_query($sql);
+ // expose new notification type ID for this request
$notification_type_ids[$notification_type_name] = (int) $this->db->sql_nextid();
- $this->cache->put('notification_type_ids', $notification_type_ids);
+ // destroy cache, we have a new addition which we have to to load next time
+ $this->cache->destroy('sql', $this->notification_types_table);
}
- $this->db->sql_transaction('commit');
-
return $notification_type_ids[$notification_type_name];
}
diff --git a/phpBB/phpbb/notification/method/board.php b/phpBB/phpbb/notification/method/board.php
index 931b252daa..faa53576e0 100644
--- a/phpBB/phpbb/notification/method/board.php
+++ b/phpBB/phpbb/notification/method/board.php
@@ -394,6 +394,6 @@ class board extends \phpbb\notification\method\base
WHERE notification_type_id = ' . (int) $notification_type_id;
$this->db->sql_query($sql);
- $this->cache->destroy('notification_type_ids');
+ $this->cache->destroy('sql', $this->notification_types_table);
}
}
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
index eab6528ca4..eed27b5131 100644
--- a/phpBB/styles/prosilver/template/forumlist_body.html
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -95,7 +95,7 @@
<!-- EVENT forumlist_body_last_post_title_prepend -->
<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
<!-- ENDIF -->
- {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
+ {L_POST_BY_AUTHOR} <!-- EVENT forumlist_body_last_poster_username_prepend -->{forumrow.LAST_POSTER_FULL}<!-- EVENT forumlist_body_last_poster_username_append -->
<!-- IF not S_IS_BOT -->
<a href="{forumrow.U_LAST_POST}" title="{L_VIEW_LATEST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span>
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 255e6746e1..cedc5031c7 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -88,7 +88,7 @@
<!-- IF not S_LEADERS_SET -->
<th class="name" data-dfn="{L_RANK}{L_COMMA_SEPARATOR}{L_USERNAME}"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP -->{L_GROUP_MEMBERS}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
<th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
- <th class="info"><!-- BEGIN custom_fields --><!-- IF not custom_fields.S_FIRST_ROW -->{L_COMMA_SEPARATOR} <!-- ENDIF -->{custom_fields.PROFILE_FIELD_NAME}<!-- END custom_fields --></th>
+ <th class="info">{% for field in custom_fields %}{% if not loop.first %}{L_COMMA_SEPARATOR} {% endif %}{{ field.PROFILE_FIELD_NAME }}{% endfor %}</th>
<th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th>
<!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
<!-- ELSEIF S_SHOW_GROUP -->
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
index a7439bc759..debf64cba2 100644
--- a/phpBB/styles/prosilver/template/memberlist_view.html
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -21,7 +21,7 @@
<dl class="left-box details profile-details">
<dt>{L_USERNAME}{L_COLON}</dt>
<dd>
- <!-- IF USER_COLOR --><span style="color: {USER_COLOR}; font-weight: bold;"><!-- ELSE --><span><!-- ENDIF -->{USERNAME}</span>
+ <!-- EVENT memberlist_view_username_prepend --><!-- IF USER_COLOR --><span style="color: {USER_COLOR}; font-weight: bold;"><!-- ELSE --><span><!-- ENDIF -->{USERNAME}</span><!-- EVENT memberlist_view_username_append -->
<!-- IF U_EDIT_SELF --> [ <a href="{U_EDIT_SELF}">{L_EDIT_PROFILE}</a> ]<!-- ENDIF -->
<!-- IF U_USER_ADMIN --> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]<!-- ENDIF -->
<!-- IF U_USER_BAN --> [ <a href="{U_USER_BAN}">{L_USER_BAN}</a> ]<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index b6755e3d4a..d4dc6aa97e 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -108,7 +108,7 @@
<!-- IF not S_IS_BOT -->
<div class="responsive-show" style="display: none;">
- {L_LAST_POST} {L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL} &laquo; <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{searchresults.LAST_POST_TIME}</a>
+ {L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT search_results_last_post_author_username_prepend -->{searchresults.LAST_POST_AUTHOR_FULL}<!-- EVENT search_results_last_post_author_username_append --> &laquo; <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{searchresults.LAST_POST_TIME}</a>
<br />{L_POSTED} {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
</div>
<!-- IF searchresults.TOPIC_REPLIES --><span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></span><!-- ENDIF -->
@@ -117,7 +117,7 @@
<div class="responsive-hide left-box">
<!-- IF searchresults.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i><!-- ENDIF -->
<!-- IF searchresults.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
- {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
+ {L_POST_BY_AUTHOR} <!-- EVENT search_results_topic_author_username_prepend -->{searchresults.TOPIC_AUTHOR_FULL}<!-- EVENT search_results_topic_author_username_append --> &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
</div>
<!-- IF .searchresults.pagination -->
@@ -142,7 +142,7 @@
<dd class="posts">{searchresults.TOPIC_REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="views">{searchresults.TOPIC_VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<dd class="lastpost">
- <span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}
+ <span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} <!-- EVENT search_results_last_post_author_username_prepend -->{searchresults.LAST_POST_AUTHOR_FULL}<!-- EVENT search_results_last_post_author_username_append -->
<!-- IF not S_IS_BOT -->
<a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
@@ -181,7 +181,7 @@
<!-- ELSE -->
<dl class="postprofile">
<!-- EVENT search_results_postprofile_before -->
- <dt class="author">{L_POST_BY_AUTHOR} {searchresults.POST_AUTHOR_FULL}</dt>
+ <dt class="author">{L_POST_BY_AUTHOR} <!-- EVENT search_results_post_author_username_prepend -->{searchresults.POST_AUTHOR_FULL}<!-- EVENT search_results_post_author_username_append --></dt>
<dd class="search-result-date">{searchresults.POST_DATE}</dd>
<dd>{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd>
<dd>{L_TOPIC}{L_COLON} <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index b5e12cdde4..bf659bb663 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -186,7 +186,7 @@
<!-- IF not S_IS_BOT -->
<div class="responsive-show" style="display: none;">
- {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
+ {L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_last_post_author_username_prepend -->{topicrow.LAST_POST_AUTHOR_FULL}<!-- EVENT viewforum_body_last_post_author_username_append --> &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
</div>
<!-- IF topicrow.REPLIES -->
@@ -197,7 +197,7 @@
<div class="topic-poster responsive-hide left-box">
<!-- IF topicrow.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i><!-- ENDIF -->
<!-- IF topicrow.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
- {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ {L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_topic_author_username_prepend -->{topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}<!-- EVENT viewforum_body_topic_author_username_append -->
<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> &raquo; {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
</div>
@@ -223,7 +223,7 @@
<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<dd class="lastpost">
- <span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
+ <span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_last_post_author_username_prepend -->{topicrow.LAST_POST_AUTHOR_FULL}<!-- EVENT viewforum_body_last_post_author_username_append -->
<!-- IF not S_IS_BOT and topicrow.U_LAST_POST -->
<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html
index dd0ca72502..c019977179 100644
--- a/phpBB/styles/prosilver/template/viewonline_body.html
+++ b/phpBB/styles/prosilver/template/viewonline_body.html
@@ -29,7 +29,7 @@
<tbody>
<!-- BEGIN user_row -->
<tr class="<!-- IF user_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <td>{user_row.USERNAME_FULL}<!-- IF user_row.USER_IP --> <span style="float: {S_CONTENT_FLOW_END};">{L_IP}{L_COLON} <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></span><!-- ENDIF -->
+ <td><!-- EVENT viewonline_body_username_prepend -->{user_row.USERNAME_FULL}<!-- EVENT viewonline_body_username_append --><!-- IF user_row.USER_IP --> <span style="float: {S_CONTENT_FLOW_END};">{L_IP}{L_COLON} <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></span><!-- ENDIF -->
<!-- IF user_row.USER_BROWSER --><br />{user_row.USER_BROWSER}<!-- ENDIF --></td>
<td class="info"><a href="{user_row.U_FORUM_LOCATION}">{user_row.FORUM_LOCATION}</a></td>
<td class="active">{user_row.LASTUPDATE}</td>
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 28e00dc6fa..0cbb5284c7 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -342,6 +342,12 @@ if (($topic_data['topic_type'] != POST_NORMAL) && $topic_data['topic_time_limit'
// Setup look and feel
$user->setup('viewtopic', $topic_data['forum_style']);
+if ($view == 'print' && !$auth->acl_get('f_print', $forum_id))
+{
+ send_status_line(403, 'Forbidden');
+ trigger_error('NO_AUTH_PRINT_TOPIC');
+}
+
$overrides_f_read_check = false;
$overrides_forum_password_check = false;
$topic_tracking_info = isset($topic_tracking_info) ? $topic_tracking_info : null;
@@ -2115,7 +2121,7 @@ for ($i = 0, $end = count($post_list); $i < $end; ++$i)
array(
'ID' => 'pm',
'NAME' => $user->lang['SEND_PRIVATE_MESSAGE'],
- 'U_CONTACT' => $u_pm,
+ 'U_CONTACT' => $post_row['U_PM'],
),
array(
'ID' => 'email',
diff --git a/tests/cache/cache_memory.php b/tests/cache/cache_memory.php
index 806edb963a..565e9a48eb 100644
--- a/tests/cache/cache_memory.php
+++ b/tests/cache/cache_memory.php
@@ -18,7 +18,7 @@ class phpbb_cache_memory extends \phpbb\cache\driver\memory
/**
* Set cache path
*/
- function phpbb_cache_memory()
+ function __construct()
{
}