aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp
diff options
context:
space:
mode:
author3Di <three3di@hotmail.it>2019-03-23 05:09:17 +0100
committerGitHub <noreply@github.com>2019-03-23 05:09:17 +0100
commit6921565efe4674c51eb08326313cfca3349eedd5 (patch)
treedabee12a9a81fe778be6769c5f1abc5be36ab9cf /phpBB/includes/mcp
parent6c1664f6d3b85c1b4d620870444c8f4b82b08e57 (diff)
parent0d04f53f374db12a1a285992a9c789a836848b3e (diff)
downloadforums-6921565efe4674c51eb08326313cfca3349eedd5.tar
forums-6921565efe4674c51eb08326313cfca3349eedd5.tar.gz
forums-6921565efe4674c51eb08326313cfca3349eedd5.tar.bz2
forums-6921565efe4674c51eb08326313cfca3349eedd5.tar.xz
forums-6921565efe4674c51eb08326313cfca3349eedd5.zip
Merge branch '3.2.x' into ticket/15948
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r--phpBB/includes/mcp/mcp_ban.php5
-rw-r--r--phpBB/includes/mcp/mcp_front.php5
-rw-r--r--phpBB/includes/mcp/mcp_logs.php4
-rw-r--r--phpBB/includes/mcp/mcp_main.php34
-rw-r--r--phpBB/includes/mcp/mcp_notes.php4
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php4
-rw-r--r--phpBB/includes/mcp/mcp_queue.php4
-rw-r--r--phpBB/includes/mcp/mcp_reports.php4
-rw-r--r--phpBB/includes/mcp/mcp_topic.php6
-rw-r--r--phpBB/includes/mcp/mcp_warn.php4
10 files changed, 48 insertions, 26 deletions
diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php
index b878b1af0a..8797f06db8 100644
--- a/phpBB/includes/mcp/mcp_ban.php
+++ b/phpBB/includes/mcp/mcp_ban.php
@@ -34,7 +34,10 @@ class mcp_ban
}
// Include the admin banning interface...
- include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);
+ if (!class_exists('acp_ban'))
+ {
+ include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);
+ }
$bansubmit = $request->is_set_post('bansubmit');
$unbansubmit = $request->is_set_post('unbansubmit');
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index aeb716c1f9..918a98734b 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -290,7 +290,10 @@ function mcp_front_view($id, $mode, $action)
if ($total)
{
- include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
+ if (!function_exists('get_recipient_strings'))
+ {
+ include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
+ }
$sql_ary = array(
'SELECT' => 'r.report_id, r.report_time, p.msg_id, p.message_subject, p.message_time, p.to_address, p.bcc_address, p.message_attachment, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id',
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 049f24b262..79f9d35ebe 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -28,9 +28,9 @@ class mcp_logs
var $u_action;
var $p_master;
- function __construct(&$p_master)
+ function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
function main($id, $mode)
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 5319d1560b..065e9bba12 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -28,9 +28,9 @@ class mcp_main
var $p_master;
var $u_action;
- function __construct(&$p_master)
+ function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
function main($id, $mode)
@@ -174,7 +174,10 @@ class mcp_main
switch ($mode)
{
case 'front':
- include($phpbb_root_path . 'includes/mcp/mcp_front.' . $phpEx);
+ if (!function_exists('mcp_front_view'))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_front.' . $phpEx);
+ }
$user->add_lang('acp/common');
@@ -185,7 +188,10 @@ class mcp_main
break;
case 'forum_view':
- include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx);
+ if (!function_exists('mcp_forum_view'))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx);
+ }
$user->add_lang('viewforum');
@@ -208,7 +214,10 @@ class mcp_main
break;
case 'topic_view':
- include($phpbb_root_path . 'includes/mcp/mcp_topic.' . $phpEx);
+ if (!function_exists('mcp_topic_view'))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_topic.' . $phpEx);
+ }
mcp_topic_view($id, $mode, $action);
@@ -217,7 +226,10 @@ class mcp_main
break;
case 'post_details':
- include($phpbb_root_path . 'includes/mcp/mcp_post.' . $phpEx);
+ if (!function_exists('mcp_post_details'))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_post.' . $phpEx);
+ }
mcp_post_details($id, $mode, $action);
@@ -414,6 +426,7 @@ function change_topic_type($action, $topic_ids)
if (confirm_box(true))
{
+
/**
* Perform additional actions before changing topic(s) type
*
@@ -430,6 +443,8 @@ function change_topic_type($action, $topic_ids)
);
extract($phpbb_dispatcher->trigger_event('core.mcp_change_topic_type_before', compact($vars)));
+ $db->sql_transaction('begin');
+
$sql = 'UPDATE ' . TOPICS_TABLE . "
SET topic_type = $new_topic_type
WHERE " . $db->sql_in_set('topic_id', $topic_ids);
@@ -441,13 +456,10 @@ function change_topic_type($action, $topic_ids)
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
$db->sql_query($sql);
-
- $sql = 'UPDATE ' . TOPICS_TABLE . "
- SET topic_type = $new_topic_type
- WHERE " . $db->sql_in_set('topic_id', $topic_ids);
- $db->sql_query($sql);
}
+ $db->sql_transaction('commit');
+
$success_msg = (count($topic_ids) == 1) ? 'TOPIC_TYPE_CHANGED' : 'TOPICS_TYPE_CHANGED';
if (count($topic_ids))
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index 12b116e495..a4c2356a43 100644
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -28,9 +28,9 @@ class mcp_notes
var $p_master;
var $u_action;
- function __construct(&$p_master)
+ function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
function main($id, $mode)
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
index ba89733bfe..eecfe9cbc8 100644
--- a/phpBB/includes/mcp/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -28,9 +28,9 @@ class mcp_pm_reports
var $p_master;
var $u_action;
- function __construct(&$p_master)
+ function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
function main($id, $mode)
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index a95c8fad44..dec583f6f4 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -28,9 +28,9 @@ class mcp_queue
var $p_master;
var $u_action;
- public function __construct(&$p_master)
+ public function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
public function main($id, $mode)
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index b4018184a7..4600257344 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -28,9 +28,9 @@ class mcp_reports
var $p_master;
var $u_action;
- function __construct(&$p_master)
+ function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
function main($id, $mode)
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 9c63245982..68a65aafdd 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -93,7 +93,11 @@ function mcp_topic_view($id, $mode, $action)
// Restore or pprove posts?
if (($action == 'restore' || $action == 'approve') && $auth->acl_get('m_approve', $topic_info['forum_id']))
{
- include($phpbb_root_path . 'includes/mcp/mcp_queue.' . $phpEx);
+ if (!class_exists('mcp_queue'))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_queue.' . $phpEx);
+ }
+
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 888069ef5d..df175133fc 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -28,9 +28,9 @@ class mcp_warn
var $p_master;
var $u_action;
- function __construct(&$p_master)
+ function __construct($p_master)
{
- $this->p_master = &$p_master;
+ $this->p_master = $p_master;
}
function main($id, $mode)