mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge pull request #4058 from marc1706/ticket/13454
[ticket/13454] Remove unused variables, globals, and parameters * marc1706/ticket/13454: [ticket/13454] Add excessively removed code back [ticket/13454] Remove more unused variables [ticket/13454] Remove double semi-colons [ticket/13454] Remove unused variables [ticket/13454] Fix code sniffer complaints [ticket/13454] Fix a few issues introduced by overdeleting stuff [ticket/13454] Remove unused variables [ticket/13454] Remove unused variables [ticket/13454] Remove unused variables [ticket/13454] Remove unused variables
This commit is contained in:
commit
b2324607ad
106 changed files with 240 additions and 454 deletions
|
@ -389,7 +389,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
||||||
foreach ($sql_subary as $sql)
|
foreach ($sql_subary as $sql)
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) VALUES ($sql)";
|
$sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) VALUES ($sql)";
|
||||||
$result = $db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
$sql = '';
|
$sql = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,7 +397,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
||||||
if ($sql != '')
|
if ($sql != '')
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) $sql";
|
$sql = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_setting) $sql";
|
||||||
$result = $db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
||||||
case 'delete':
|
case 'delete':
|
||||||
foreach ($sql_subary as $sql)
|
foreach ($sql_subary as $sql)
|
||||||
{
|
{
|
||||||
$result = $db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
$sql = '';
|
$sql = '';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -143,7 +143,7 @@ function filldb($newposts)
|
||||||
if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0))
|
if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0))
|
||||||
{
|
{
|
||||||
// create a new topic 1 in 30 times (or when there are none);
|
// create a new topic 1 in 30 times (or when there are none);
|
||||||
$topic = make_topic($userid, "Testing topic $i", $forum);
|
make_topic($userid, "Testing topic $i", $forum);
|
||||||
$forum_topic_count[$forum]++;
|
$forum_topic_count[$forum]++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -19,7 +19,7 @@ if (!headers_sent())
|
||||||
function unicode_to_utf8($string)
|
function unicode_to_utf8($string)
|
||||||
{
|
{
|
||||||
$utf8 = '';
|
$utf8 = '';
|
||||||
$chars = array();
|
|
||||||
for ($i = 0; $i < strlen($string); $i++)
|
for ($i = 0; $i < strlen($string); $i++)
|
||||||
{
|
{
|
||||||
if (isset($string[$i + 5]) && substr($string, $i, 2) == '\\u' && ctype_xdigit(substr($string, $i + 2, 4)))
|
if (isset($string[$i + 5]) && substr($string, $i, 2) == '\\u' && ctype_xdigit(substr($string, $i + 2, 4)))
|
||||||
|
|
|
@ -709,8 +709,6 @@ class acp_attachments
|
||||||
$forum_ids = array();
|
$forum_ids = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$extensions = array();
|
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . EXTENSIONS_TABLE . "
|
FROM ' . EXTENSIONS_TABLE . "
|
||||||
WHERE group_id = $group_id
|
WHERE group_id = $group_id
|
||||||
|
@ -1572,7 +1570,6 @@ class acp_attachments
|
||||||
if ($ip_2_counter == 0 && $ip_2_end == 254)
|
if ($ip_2_counter == 0 && $ip_2_end == 254)
|
||||||
{
|
{
|
||||||
$ip_2_counter = 256;
|
$ip_2_counter = 256;
|
||||||
$ip_2_fragment = 256;
|
|
||||||
|
|
||||||
$iplist[] = "'$ip_1_counter.*'";
|
$iplist[] = "'$ip_1_counter.*'";
|
||||||
}
|
}
|
||||||
|
@ -1585,7 +1582,6 @@ class acp_attachments
|
||||||
if ($ip_3_counter == 0 && $ip_3_end == 254)
|
if ($ip_3_counter == 0 && $ip_3_end == 254)
|
||||||
{
|
{
|
||||||
$ip_3_counter = 256;
|
$ip_3_counter = 256;
|
||||||
$ip_3_fragment = 256;
|
|
||||||
|
|
||||||
$iplist[] = "'$ip_1_counter.$ip_2_counter.*'";
|
$iplist[] = "'$ip_1_counter.$ip_2_counter.*'";
|
||||||
}
|
}
|
||||||
|
@ -1598,7 +1594,6 @@ class acp_attachments
|
||||||
if ($ip_4_counter == 0 && $ip_4_end == 254)
|
if ($ip_4_counter == 0 && $ip_4_end == 254)
|
||||||
{
|
{
|
||||||
$ip_4_counter = 256;
|
$ip_4_counter = 256;
|
||||||
$ip_4_fragment = 256;
|
|
||||||
|
|
||||||
$iplist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.*'";
|
$iplist[] = "'$ip_1_counter.$ip_2_counter.$ip_3_counter.*'";
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,6 @@ class acp_ban
|
||||||
case 'user':
|
case 'user':
|
||||||
|
|
||||||
$field = 'username';
|
$field = 'username';
|
||||||
$l_ban_cell = $user->lang['USERNAME'];
|
|
||||||
|
|
||||||
$sql = 'SELECT b.*, u.user_id, u.username, u.username_clean
|
$sql = 'SELECT b.*, u.user_id, u.username, u.username_clean
|
||||||
FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u
|
FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u
|
||||||
|
@ -208,7 +207,6 @@ class acp_ban
|
||||||
case 'ip':
|
case 'ip':
|
||||||
|
|
||||||
$field = 'ban_ip';
|
$field = 'ban_ip';
|
||||||
$l_ban_cell = $user->lang['IP_HOSTNAME'];
|
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . BANLIST_TABLE . '
|
FROM ' . BANLIST_TABLE . '
|
||||||
|
@ -221,7 +219,6 @@ class acp_ban
|
||||||
case 'email':
|
case 'email':
|
||||||
|
|
||||||
$field = 'ban_email';
|
$field = 'ban_email';
|
||||||
$l_ban_cell = $user->lang['EMAIL_ADDRESS'];
|
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . BANLIST_TABLE . '
|
FROM ' . BANLIST_TABLE . '
|
||||||
|
|
|
@ -25,8 +25,8 @@ class acp_bbcodes
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher, $phpbb_container;
|
global $db, $user, $template, $cache, $request, $phpbb_dispatcher, $phpbb_container;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
|
global $phpbb_log;
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
|
|
@ -30,13 +30,12 @@ class acp_board
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $request;
|
global $user, $template, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config, $phpbb_root_path, $phpEx;
|
||||||
global $cache, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
|
global $cache, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
|
||||||
|
|
||||||
$user->add_lang('acp/board');
|
$user->add_lang('acp/board');
|
||||||
|
|
||||||
$action = $request->variable('action', '');
|
|
||||||
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
|
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
|
||||||
|
|
||||||
$form_key = 'acp_board';
|
$form_key = 'acp_board';
|
||||||
|
@ -760,7 +759,7 @@ class acp_board
|
||||||
*/
|
*/
|
||||||
function select_auth_method($selected_method, $key = '')
|
function select_auth_method($selected_method, $key = '')
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
||||||
/* @var $auth_providers \phpbb\auth\provider_collection */
|
/* @var $auth_providers \phpbb\auth\provider_collection */
|
||||||
$auth_providers = $phpbb_container->get('auth.provider_collection');
|
$auth_providers = $phpbb_container->get('auth.provider_collection');
|
||||||
|
@ -940,8 +939,6 @@ class acp_board
|
||||||
*/
|
*/
|
||||||
function board_disable($value, $key)
|
function board_disable($value, $key)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$radio_ary = array(1 => 'YES', 0 => 'NO');
|
$radio_ary = array(1 => 'YES', 0 => 'NO');
|
||||||
|
|
||||||
return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
|
return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
|
||||||
|
@ -1051,8 +1048,6 @@ class acp_board
|
||||||
*/
|
*/
|
||||||
function select_news_forums($value, $key)
|
function select_news_forums($value, $key)
|
||||||
{
|
{
|
||||||
global $user, $config;
|
|
||||||
|
|
||||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||||
|
|
||||||
// Build forum options
|
// Build forum options
|
||||||
|
@ -1070,8 +1065,6 @@ class acp_board
|
||||||
|
|
||||||
function select_exclude_forums($value, $key)
|
function select_exclude_forums($value, $key)
|
||||||
{
|
{
|
||||||
global $user, $config;
|
|
||||||
|
|
||||||
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
$forum_list = make_forum_select(false, false, true, true, true, false, true);
|
||||||
|
|
||||||
// Build forum options
|
// Build forum options
|
||||||
|
@ -1127,7 +1120,7 @@ class acp_board
|
||||||
*/
|
*/
|
||||||
function enable_mod_rewrite($value, $key)
|
function enable_mod_rewrite($value, $key)
|
||||||
{
|
{
|
||||||
global $user, $config;
|
global $user;
|
||||||
|
|
||||||
// Determine whether mod_rewrite is enabled on the server
|
// Determine whether mod_rewrite is enabled on the server
|
||||||
// NOTE: This only works on Apache servers on which PHP is NOT
|
// NOTE: This only works on Apache servers on which PHP is NOT
|
||||||
|
|
|
@ -25,8 +25,8 @@ class acp_bots
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $cache, $request, $phpbb_log;
|
global $config, $db, $user, $template, $cache, $request, $phpbb_log;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$action = $request->variable('action', '');
|
$action = $request->variable('action', '');
|
||||||
$submit = (isset($_POST['submit'])) ? true : false;
|
$submit = (isset($_POST['submit'])) ? true : false;
|
||||||
|
|
|
@ -25,8 +25,8 @@ class acp_captcha
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $user, $auth, $template, $phpbb_log, $request;
|
global $user, $template, $phpbb_log, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
|
global $config, $phpbb_container;
|
||||||
|
|
||||||
$user->add_lang('acp/board');
|
$user->add_lang('acp/board');
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ class acp_captcha
|
||||||
*/
|
*/
|
||||||
function deliver_demo($selected)
|
function deliver_demo($selected)
|
||||||
{
|
{
|
||||||
global $db, $user, $config, $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
||||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($selected);
|
$captcha = $phpbb_container->get('captcha.factory')->get_instance($selected);
|
||||||
$captcha->init(CONFIRM_REG);
|
$captcha->init(CONFIRM_REG);
|
||||||
|
|
|
@ -37,7 +37,6 @@ class acp_database
|
||||||
$this->page_title = 'ACP_DATABASE';
|
$this->page_title = 'ACP_DATABASE';
|
||||||
|
|
||||||
$action = $request->variable('action', '');
|
$action = $request->variable('action', '');
|
||||||
$submit = (isset($_POST['submit'])) ? true : false;
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'MODE' => $mode
|
'MODE' => $mode
|
||||||
|
|
|
@ -25,8 +25,7 @@ class acp_disallow
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
global $db, $user, $template, $cache, $phpbb_log, $request;
|
||||||
global $config, $phpbb_admin_path;
|
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ class acp_email
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
global $config, $db, $user, $template, $phpbb_log, $request;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $phpbb_dispatcher;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_dispatcher;
|
||||||
|
|
||||||
$user->add_lang('acp/email');
|
$user->add_lang('acp/email');
|
||||||
$this->tpl_name = 'acp_email';
|
$this->tpl_name = 'acp_email';
|
||||||
|
|
|
@ -34,7 +34,7 @@ class acp_extensions
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
// Start the page
|
// Start the page
|
||||||
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpEx, $phpbb_log, $cache;
|
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $cache;
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
|
|
@ -27,7 +27,7 @@ class acp_forums
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
|
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
|
||||||
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $phpbb_log;
|
global $phpbb_admin_path, $phpbb_root_path, $phpEx, $phpbb_log;
|
||||||
|
|
||||||
$user->add_lang('acp/forums');
|
$user->add_lang('acp/forums');
|
||||||
$this->tpl_name = 'acp_forums';
|
$this->tpl_name = 'acp_forums';
|
||||||
|
@ -1264,8 +1264,6 @@ class acp_forums
|
||||||
return array($user->lang['NO_FORUM']);
|
return array($user->lang['NO_FORUM']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$subforums_to_name = $_row['forum_name'];
|
|
||||||
|
|
||||||
$sql = 'SELECT forum_id
|
$sql = 'SELECT forum_id
|
||||||
FROM ' . FORUMS_TABLE . "
|
FROM ' . FORUMS_TABLE . "
|
||||||
WHERE parent_id = {$row['forum_id']}";
|
WHERE parent_id = {$row['forum_id']}";
|
||||||
|
@ -1383,7 +1381,7 @@ class acp_forums
|
||||||
{
|
{
|
||||||
global $db, $user, $phpbb_dispatcher;
|
global $db, $user, $phpbb_dispatcher;
|
||||||
|
|
||||||
$to_data = $moved_ids = $errors = array();
|
$errors = array();
|
||||||
|
|
||||||
// Check if we want to move to a parent with link type
|
// Check if we want to move to a parent with link type
|
||||||
if ($to_id > 0)
|
if ($to_id > 0)
|
||||||
|
|
|
@ -26,7 +26,7 @@ class acp_groups
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $cache;
|
global $config, $db, $user, $auth, $template, $cache;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
$user->add_lang('acp/groups');
|
$user->add_lang('acp/groups');
|
||||||
|
@ -306,8 +306,6 @@ class acp_groups
|
||||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $submit_ary = array();
|
|
||||||
|
|
||||||
if ($action == 'edit' && !$group_id)
|
if ($action == 'edit' && !$group_id)
|
||||||
{
|
{
|
||||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
|
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
|
@ -1094,7 +1092,6 @@ class acp_groups
|
||||||
ORDER BY group_legend ASC, group_type DESC, group_name ASC';
|
ORDER BY group_legend ASC, group_type DESC, group_name ASC';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$s_group_select_legend = '';
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$group_name = $group_helper->get_name($row['group_name']);
|
$group_name = $group_helper->get_name($row['group_name']);
|
||||||
|
@ -1132,7 +1129,6 @@ class acp_groups
|
||||||
ORDER BY t.teampage_position ASC';
|
ORDER BY t.teampage_position ASC';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$category_data = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if ($row['teampage_id'] == $category_id)
|
if ($row['teampage_id'] == $category_id)
|
||||||
|
@ -1175,7 +1171,6 @@ class acp_groups
|
||||||
ORDER BY g.group_type DESC, g.group_name ASC';
|
ORDER BY g.group_type DESC, g.group_name ASC';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$s_group_select_teampage = '';
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$group_name = $group_helper->get_name($row['group_name']);
|
$group_name = $group_helper->get_name($row['group_name']);
|
||||||
|
|
|
@ -28,8 +28,8 @@ class acp_icons
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
global $db, $user, $template, $cache;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config, $phpbb_root_path;
|
||||||
global $request, $phpbb_container;
|
global $request, $phpbb_container;
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
@ -194,7 +194,6 @@ class acp_icons
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$after = false;
|
$after = false;
|
||||||
$display = 0;
|
|
||||||
$order_lists = array('', '');
|
$order_lists = array('', '');
|
||||||
$add_order_lists = array('', '');
|
$add_order_lists = array('', '');
|
||||||
$display_count = 0;
|
$display_count = 0;
|
||||||
|
@ -209,7 +208,6 @@ class acp_icons
|
||||||
if ($row[$fields . '_id'] == $icon_id)
|
if ($row[$fields . '_id'] == $icon_id)
|
||||||
{
|
{
|
||||||
$after = true;
|
$after = true;
|
||||||
$display = $row['display_on_posting'];
|
|
||||||
$data[$row[$fields . '_url']] = $row;
|
$data[$row[$fields . '_url']] = $row;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -32,7 +32,7 @@ class acp_inactive
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $request;
|
global $config, $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $request;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
if (!function_exists('user_active_flip'))
|
if (!function_exists('user_active_flip'))
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,8 +29,8 @@ class acp_jabber
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $phpbb_log, $request;
|
global $db, $user, $template, $phpbb_log, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$user->add_lang('acp/board');
|
$user->add_lang('acp/board');
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ class acp_jabber
|
||||||
include($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = $request->variable('action', '');
|
|
||||||
$submit = (isset($_POST['submit'])) ? true : false;
|
$submit = (isset($_POST['submit'])) ? true : false;
|
||||||
|
|
||||||
if ($mode != 'settings')
|
if ($mode != 'settings')
|
||||||
|
@ -68,8 +67,6 @@ class acp_jabber
|
||||||
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
$error = array();
|
|
||||||
|
|
||||||
$message = $user->lang['JAB_SETTINGS_CHANGED'];
|
$message = $user->lang['JAB_SETTINGS_CHANGED'];
|
||||||
$log = 'JAB_SETTINGS_CHANGED';
|
$log = 'JAB_SETTINGS_CHANGED';
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ class acp_logs
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
global $user, $auth, $template, $phpbb_container;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config;
|
||||||
global $request;
|
global $request;
|
||||||
|
|
||||||
$user->add_lang('mcp');
|
$user->add_lang('mcp');
|
||||||
|
@ -34,7 +34,6 @@ class acp_logs
|
||||||
// Set up general vars
|
// Set up general vars
|
||||||
$action = $request->variable('action', '');
|
$action = $request->variable('action', '');
|
||||||
$forum_id = $request->variable('f', 0);
|
$forum_id = $request->variable('f', 0);
|
||||||
$topic_id = $request->variable('t', 0);
|
|
||||||
$start = $request->variable('start', 0);
|
$start = $request->variable('start', 0);
|
||||||
$deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST);
|
$deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST);
|
||||||
$deleteall = $request->variable('delall', false, false, \phpbb\request\request_interface::POST);
|
$deleteall = $request->variable('delall', false, false, \phpbb\request\request_interface::POST);
|
||||||
|
|
|
@ -579,7 +579,7 @@ class acp_modules
|
||||||
*/
|
*/
|
||||||
function make_module_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $ignore_noncat = false)
|
function make_module_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $ignore_noncat = false)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $config;
|
global $db, $user;
|
||||||
|
|
||||||
$sql = 'SELECT module_id, module_enabled, module_basename, parent_id, module_langname, left_id, right_id, module_auth
|
$sql = 'SELECT module_id, module_enabled, module_basename, parent_id, module_langname, left_id, right_id, module_auth
|
||||||
FROM ' . MODULES_TABLE . "
|
FROM ' . MODULES_TABLE . "
|
||||||
|
|
|
@ -26,8 +26,8 @@ class acp_permission_roles
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
global $db, $user, $template, $phpbb_container;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
global $request, $phpbb_log;
|
global $request, $phpbb_log;
|
||||||
|
|
||||||
if (!function_exists('user_get_id_name'))
|
if (!function_exists('user_get_id_name'))
|
||||||
|
@ -477,7 +477,7 @@ class acp_permission_roles
|
||||||
*/
|
*/
|
||||||
function display_auth_options($auth_options)
|
function display_auth_options($auth_options)
|
||||||
{
|
{
|
||||||
global $template, $user, $phpbb_container;
|
global $template, $phpbb_container;
|
||||||
|
|
||||||
/* @var $phpbb_permissions \phpbb\permissions */
|
/* @var $phpbb_permissions \phpbb\permissions */
|
||||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||||
|
|
|
@ -31,8 +31,8 @@ class acp_permissions
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_container, $request;
|
global $db, $user, $auth, $template, $phpbb_container, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
if (!function_exists('user_get_id_name'))
|
if (!function_exists('user_get_id_name'))
|
||||||
{
|
{
|
||||||
|
@ -167,8 +167,6 @@ class acp_permissions
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define some common variables for every mode
|
// Define some common variables for every mode
|
||||||
$error = array();
|
|
||||||
|
|
||||||
$permission_scope = (strpos($mode, '_global') !== false) ? 'global' : 'local';
|
$permission_scope = (strpos($mode, '_global') !== false) ? 'global' : 'local';
|
||||||
|
|
||||||
// Showing introductionary page?
|
// Showing introductionary page?
|
||||||
|
@ -692,8 +690,6 @@ class acp_permissions
|
||||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ug_id = $forum_id = 0;
|
|
||||||
|
|
||||||
// We loop through the auth settings defined in our submit
|
// We loop through the auth settings defined in our submit
|
||||||
list($ug_id, ) = each($psubmit);
|
list($ug_id, ) = each($psubmit);
|
||||||
list($forum_id, ) = each($psubmit[$ug_id]);
|
list($forum_id, ) = each($psubmit[$ug_id]);
|
||||||
|
|
|
@ -25,8 +25,7 @@ class acp_php_info
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template;
|
global $template;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
|
||||||
|
|
||||||
if ($mode != 'info')
|
if ($mode != 'info')
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,8 +33,8 @@ class acp_profile
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $cache;
|
global $config, $db, $user, $template;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
global $phpbb_root_path, $phpEx;
|
||||||
global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||||
|
|
||||||
if (!function_exists('generate_smilies'))
|
if (!function_exists('generate_smilies'))
|
||||||
|
@ -55,7 +55,6 @@ class acp_profile
|
||||||
$action = (isset($_POST['create'])) ? 'create' : $request->variable('action', '');
|
$action = (isset($_POST['create'])) ? 'create' : $request->variable('action', '');
|
||||||
|
|
||||||
$error = array();
|
$error = array();
|
||||||
$s_hidden_fields = '';
|
|
||||||
|
|
||||||
if (!$field_id && in_array($action, array('delete','activate', 'deactivate', 'move_up', 'move_down', 'edit')))
|
if (!$field_id && in_array($action, array('delete','activate', 'deactivate', 'move_up', 'move_down', 'edit')))
|
||||||
{
|
{
|
||||||
|
@ -776,7 +775,7 @@ class acp_profile
|
||||||
*/
|
*/
|
||||||
function build_language_options(&$cp, $field_type, $action = 'create')
|
function build_language_options(&$cp, $field_type, $action = 'create')
|
||||||
{
|
{
|
||||||
global $user, $config, $db, $phpbb_container, $request;
|
global $user, $config, $db, $request;
|
||||||
|
|
||||||
$default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
|
$default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class acp_prune
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
|
global $user, $phpEx, $phpbb_root_path;
|
||||||
|
|
||||||
$user->add_lang('acp/prune');
|
$user->add_lang('acp/prune');
|
||||||
|
|
||||||
|
@ -55,8 +55,7 @@ class acp_prune
|
||||||
*/
|
*/
|
||||||
function prune_forums($id, $mode)
|
function prune_forums($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
global $db, $user, $auth, $template, $phpbb_log, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
|
||||||
|
|
||||||
$all_forums = $request->variable('all_forums', 0);
|
$all_forums = $request->variable('all_forums', 0);
|
||||||
$forum_id = $request->variable('f', array(0));
|
$forum_id = $request->variable('f', array(0));
|
||||||
|
@ -233,8 +232,8 @@ class acp_prune
|
||||||
*/
|
*/
|
||||||
function prune_users($id, $mode)
|
function prune_users($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
global $db, $user, $auth, $template, $phpbb_log, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
|
||||||
|
|
||||||
/** @var \phpbb\group\helper $group_helper */
|
/** @var \phpbb\group\helper $group_helper */
|
||||||
$group_helper = $phpbb_container->get('group_helper');
|
$group_helper = $phpbb_container->get('group_helper');
|
||||||
|
@ -441,7 +440,6 @@ class acp_prune
|
||||||
}
|
}
|
||||||
|
|
||||||
$key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
|
$key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
|
||||||
$sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
|
|
||||||
|
|
||||||
$where_sql = '';
|
$where_sql = '';
|
||||||
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
|
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
|
||||||
|
|
|
@ -25,8 +25,8 @@ class acp_ranks
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
|
global $db, $user, $template, $cache, $request, $phpbb_dispatcher;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
|
global $config, $phpbb_root_path, $phpbb_admin_path, $phpbb_log;
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ class acp_ranks
|
||||||
case 'edit':
|
case 'edit':
|
||||||
case 'add':
|
case 'add':
|
||||||
|
|
||||||
$data = $ranks = $existing_imgs = array();
|
$ranks = $existing_imgs = array();
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . RANKS_TABLE . '
|
FROM ' . RANKS_TABLE . '
|
||||||
|
|
|
@ -25,8 +25,7 @@ class acp_reasons
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache;
|
global $db, $user, $template;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
|
||||||
global $request, $phpbb_log;
|
global $request, $phpbb_log;
|
||||||
|
|
||||||
$user->add_lang(array('mcp', 'acp/posting'));
|
$user->add_lang(array('mcp', 'acp/posting'));
|
||||||
|
|
|
@ -50,8 +50,8 @@ class acp_search
|
||||||
|
|
||||||
function settings($id, $mode)
|
function settings($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
global $user, $template, $phpbb_log, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
$submit = (isset($_POST['submit'])) ? true : false;
|
$submit = (isset($_POST['submit'])) ? true : false;
|
||||||
|
|
||||||
|
@ -232,8 +232,8 @@ class acp_search
|
||||||
|
|
||||||
function index($id, $mode)
|
function index($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
global $db, $user, $template, $phpbb_log, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
$action = $request->variable('action', '');
|
$action = $request->variable('action', '');
|
||||||
$this->state = explode(',', $config['search_indexing_state']);
|
$this->state = explode(',', $config['search_indexing_state']);
|
||||||
|
@ -551,7 +551,7 @@ class acp_search
|
||||||
|
|
||||||
function get_search_types()
|
function get_search_types()
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $phpbb_extension_manager;
|
global $phpbb_extension_manager;
|
||||||
|
|
||||||
$finder = $phpbb_extension_manager->get_finder();
|
$finder = $phpbb_extension_manager->get_finder();
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,6 @@ class acp_styles
|
||||||
$messages = array();
|
$messages = array();
|
||||||
$installed_names = array();
|
$installed_names = array();
|
||||||
$installed_dirs = array();
|
$installed_dirs = array();
|
||||||
$last_installed = false;
|
|
||||||
foreach ($dirs as $dir)
|
foreach ($dirs as $dir)
|
||||||
{
|
{
|
||||||
if (in_array($dir, $this->reserved_style_names))
|
if (in_array($dir, $this->reserved_style_names))
|
||||||
|
@ -224,7 +223,6 @@ class acp_styles
|
||||||
$style['style_id'] = $this->install_style($style);
|
$style['style_id'] = $this->install_style($style);
|
||||||
$style['_installed'] = true;
|
$style['_installed'] = true;
|
||||||
$found = true;
|
$found = true;
|
||||||
$last_installed = $style['style_id'];
|
|
||||||
$installed_names[] = $style['style_name'];
|
$installed_names[] = $style['style_name'];
|
||||||
$installed_dirs[] = $style['style_path'];
|
$installed_dirs[] = $style['style_path'];
|
||||||
$messages[] = sprintf($this->user->lang['STYLE_INSTALLED'], htmlspecialchars($style['style_name']));
|
$messages[] = sprintf($this->user->lang['STYLE_INSTALLED'], htmlspecialchars($style['style_name']));
|
||||||
|
|
|
@ -31,8 +31,8 @@ class acp_users
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $cache;
|
global $config, $db, $user, $auth, $template;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
global $phpbb_dispatcher, $request;
|
global $phpbb_dispatcher, $request;
|
||||||
global $phpbb_container, $phpbb_log;
|
global $phpbb_container, $phpbb_log;
|
||||||
|
|
||||||
|
@ -298,13 +298,11 @@ class acp_users
|
||||||
case 'banuser':
|
case 'banuser':
|
||||||
$ban[] = $user_row['username'];
|
$ban[] = $user_row['username'];
|
||||||
$reason = 'USER_ADMIN_BAN_NAME_REASON';
|
$reason = 'USER_ADMIN_BAN_NAME_REASON';
|
||||||
$log = 'LOG_USER_BAN_USER';
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'banemail':
|
case 'banemail':
|
||||||
$ban[] = $user_row['user_email'];
|
$ban[] = $user_row['user_email'];
|
||||||
$reason = 'USER_ADMIN_BAN_EMAIL_REASON';
|
$reason = 'USER_ADMIN_BAN_EMAIL_REASON';
|
||||||
$log = 'LOG_USER_BAN_EMAIL';
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'banip':
|
case 'banip':
|
||||||
|
@ -322,7 +320,6 @@ class acp_users
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$reason = 'USER_ADMIN_BAN_IP_REASON';
|
$reason = 'USER_ADMIN_BAN_IP_REASON';
|
||||||
$log = 'LOG_USER_BAN_IP';
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1271,17 +1268,10 @@ class acp_users
|
||||||
$user->add_lang('mcp');
|
$user->add_lang('mcp');
|
||||||
|
|
||||||
// Set up general vars
|
// Set up general vars
|
||||||
$start = $request->variable('start', 0);
|
|
||||||
$deletemark = (isset($_POST['delmarked'])) ? true : false;
|
$deletemark = (isset($_POST['delmarked'])) ? true : false;
|
||||||
$deleteall = (isset($_POST['delall'])) ? true : false;
|
$deleteall = (isset($_POST['delall'])) ? true : false;
|
||||||
$confirm = (isset($_POST['confirm'])) ? true : false;
|
$confirm = (isset($_POST['confirm'])) ? true : false;
|
||||||
$marked = $request->variable('mark', array(0));
|
$marked = $request->variable('mark', array(0));
|
||||||
$message = $request->variable('message', '', true);
|
|
||||||
|
|
||||||
// Sort keys
|
|
||||||
$sort_days = $request->variable('st', 0);
|
|
||||||
$sort_key = $request->variable('sk', 't');
|
|
||||||
$sort_dir = $request->variable('sd', 'd');
|
|
||||||
|
|
||||||
// Delete entries if requested and able
|
// Delete entries if requested and able
|
||||||
if ($deletemark || $deleteall || $confirm)
|
if ($deletemark || $deleteall || $confirm)
|
||||||
|
@ -1546,7 +1536,6 @@ class acp_users
|
||||||
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
|
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
|
||||||
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
|
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
|
||||||
}
|
}
|
||||||
$s_birthday_year_options = '';
|
|
||||||
|
|
||||||
$now = getdate();
|
$now = getdate();
|
||||||
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
|
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
|
||||||
|
@ -2296,10 +2285,6 @@ class acp_users
|
||||||
trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$founder_manage = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,8 +28,7 @@ class acp_words
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request, $phpbb_container;
|
global $db, $user, $template, $cache, $phpbb_log, $request, $phpbb_container;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
|
|
@ -266,7 +266,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||||
*/
|
*/
|
||||||
function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
|
function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
|
||||||
{
|
{
|
||||||
global $template, $user, $db, $phpbb_root_path, $phpEx, $phpbb_container;
|
global $template, $user, $db, $phpbb_container;
|
||||||
|
|
||||||
/* @var $phpbb_permissions \phpbb\permissions */
|
/* @var $phpbb_permissions \phpbb\permissions */
|
||||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||||
|
@ -607,7 +607,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||||
*/
|
*/
|
||||||
function display_role_mask(&$hold_ary)
|
function display_role_mask(&$hold_ary)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $db, $template, $user, $phpbb_root_path, $phpEx;
|
||||||
global $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
||||||
if (!sizeof($hold_ary))
|
if (!sizeof($hold_ary))
|
||||||
|
@ -1106,7 +1106,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||||
*/
|
*/
|
||||||
function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $s_view, $show_trace = false)
|
function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $s_view, $show_trace = false)
|
||||||
{
|
{
|
||||||
global $template, $user, $phpbb_admin_path, $phpEx, $phpbb_container;
|
global $template, $phpbb_admin_path, $phpEx, $phpbb_container;
|
||||||
|
|
||||||
/* @var $phpbb_permissions \phpbb\permissions */
|
/* @var $phpbb_permissions \phpbb\permissions */
|
||||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||||
|
@ -1195,7 +1195,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||||
*/
|
*/
|
||||||
function build_permission_array(&$permission_row, &$content_array, &$categories, $key_sort_array)
|
function build_permission_array(&$permission_row, &$content_array, &$categories, $key_sort_array)
|
||||||
{
|
{
|
||||||
global $user, $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
||||||
/* @var $phpbb_permissions \phpbb\permissions */
|
/* @var $phpbb_permissions \phpbb\permissions */
|
||||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||||
|
|
|
@ -140,7 +140,7 @@ class bbcode
|
||||||
*/
|
*/
|
||||||
function bbcode_cache_init()
|
function bbcode_cache_init()
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_path_helper, $phpbb_container, $phpbb_filesystem;
|
global $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_container, $phpbb_filesystem;
|
||||||
|
|
||||||
if (empty($this->template_filename))
|
if (empty($this->template_filename))
|
||||||
{
|
{
|
||||||
|
|
|
@ -955,7 +955,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||||
*/
|
*/
|
||||||
function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $global_announce_list = false)
|
function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $global_announce_list = false)
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $user;
|
||||||
|
|
||||||
$last_read = array();
|
$last_read = array();
|
||||||
|
|
||||||
|
@ -1260,7 +1260,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
|
||||||
*/
|
*/
|
||||||
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
|
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
|
||||||
{
|
{
|
||||||
global $db, $tracking_topics, $user, $config, $auth, $request, $phpbb_container;
|
global $db, $tracking_topics, $user, $config, $request, $phpbb_container;
|
||||||
|
|
||||||
// Determine the users last forum mark time if not given.
|
// Determine the users last forum mark time if not given.
|
||||||
if ($mark_time_forum === false)
|
if ($mark_time_forum === false)
|
||||||
|
@ -1318,8 +1318,6 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
||||||
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
|
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
|
||||||
{
|
{
|
||||||
// Get information from cookie
|
// Get information from cookie
|
||||||
$row = false;
|
|
||||||
|
|
||||||
if (!isset($tracking_topics['tf'][$forum_id]))
|
if (!isset($tracking_topics['tf'][$forum_id]))
|
||||||
{
|
{
|
||||||
// We do not need to mark read, this happened before. Therefore setting this to true
|
// We do not need to mark read, this happened before. Therefore setting this to true
|
||||||
|
@ -1719,9 +1717,7 @@ function generate_board_url($without_script_path = false)
|
||||||
*/
|
*/
|
||||||
function redirect($url, $return = false, $disable_cd_check = false)
|
function redirect($url, $return = false, $disable_cd_check = false)
|
||||||
{
|
{
|
||||||
global $db, $cache, $config, $user, $phpbb_root_path, $phpbb_filesystem, $phpbb_path_helper, $phpEx, $phpbb_dispatcher;
|
global $user, $phpbb_path_helper, $phpbb_dispatcher;
|
||||||
|
|
||||||
$failover_flag = false;
|
|
||||||
|
|
||||||
if (!$user->is_setup())
|
if (!$user->is_setup())
|
||||||
{
|
{
|
||||||
|
@ -2241,7 +2237,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||||
*/
|
*/
|
||||||
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
||||||
{
|
{
|
||||||
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
global $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
||||||
global $request, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
|
global $request, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
|
||||||
|
|
||||||
$err = '';
|
$err = '';
|
||||||
|
@ -3213,7 +3209,7 @@ function phpbb_checkdnsrr($host, $type = 'MX')
|
||||||
function msg_handler($errno, $msg_text, $errfile, $errline)
|
function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
{
|
{
|
||||||
global $cache, $db, $auth, $template, $config, $user, $request;
|
global $cache, $db, $auth, $template, $config, $user, $request;
|
||||||
global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text, $phpbb_log;
|
global $phpbb_root_path, $msg_title, $msg_long_text, $phpbb_log;
|
||||||
|
|
||||||
// Do not display notices if we suppress them via @
|
// Do not display notices if we suppress them via @
|
||||||
if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE)
|
if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE)
|
||||||
|
@ -3545,7 +3541,7 @@ function obtain_guest_count($item_id = 0, $item = 'forum')
|
||||||
*/
|
*/
|
||||||
function obtain_users_online($item_id = 0, $item = 'forum')
|
function obtain_users_online($item_id = 0, $item = 'forum')
|
||||||
{
|
{
|
||||||
global $db, $config, $user;
|
global $db, $config;
|
||||||
|
|
||||||
$reading_sql = '';
|
$reading_sql = '';
|
||||||
if ($item_id !== 0)
|
if ($item_id !== 0)
|
||||||
|
@ -3611,7 +3607,6 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $phpbb_dispatcher;
|
global $config, $db, $user, $auth, $phpbb_dispatcher;
|
||||||
|
|
||||||
$guests_online = $hidden_online = $l_online_users = $online_userlist = $visible_online = '';
|
|
||||||
$user_online_link = $rowset = array();
|
$user_online_link = $rowset = array();
|
||||||
// Need caps version of $item for language-strings
|
// Need caps version of $item for language-strings
|
||||||
$item_caps = strtoupper($item);
|
$item_caps = strtoupper($item);
|
||||||
|
@ -4008,8 +4003,7 @@ function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config
|
||||||
*/
|
*/
|
||||||
function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
|
function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
|
||||||
{
|
{
|
||||||
global $user, $config, $cache, $phpbb_root_path, $phpEx;
|
global $user, $config;
|
||||||
global $request;
|
|
||||||
global $phpbb_container, $phpbb_dispatcher;
|
global $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
if (!$config['allow_avatar'] && !$ignore_config)
|
if (!$config['allow_avatar'] && !$ignore_config)
|
||||||
|
@ -4560,7 +4554,7 @@ function phpbb_generate_debug_output(\phpbb\db\driver\driver_interface $db, \php
|
||||||
*/
|
*/
|
||||||
function page_footer($run_cron = true, $display_template = true, $exit_handler = true)
|
function page_footer($run_cron = true, $display_template = true, $exit_handler = true)
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
|
global $db, $config, $template, $user, $auth, $cache, $phpEx;
|
||||||
global $request, $phpbb_dispatcher, $phpbb_admin_path;
|
global $request, $phpbb_dispatcher, $phpbb_admin_path;
|
||||||
|
|
||||||
// A listener can set this variable to `true` when it overrides this function
|
// A listener can set this variable to `true` when it overrides this function
|
||||||
|
@ -4701,7 +4695,7 @@ function garbage_collection()
|
||||||
*/
|
*/
|
||||||
function exit_handler()
|
function exit_handler()
|
||||||
{
|
{
|
||||||
global $phpbb_hook, $config;
|
global $phpbb_hook;
|
||||||
|
|
||||||
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))
|
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__))
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
function adm_page_header($page_title)
|
function adm_page_header($page_title)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $template;
|
global $config, $user, $template;
|
||||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
|
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
|
@ -140,8 +140,8 @@ function adm_page_header($page_title)
|
||||||
*/
|
*/
|
||||||
function adm_page_footer($copyright_html = true)
|
function adm_page_footer($copyright_html = true)
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $user, $auth, $cache;
|
global $db, $config, $template, $user, $auth;
|
||||||
global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $phpbb_root_path;
|
||||||
global $request, $phpbb_dispatcher;
|
global $request, $phpbb_dispatcher;
|
||||||
|
|
||||||
// A listener can set this variable to `true` when it overrides this function
|
// A listener can set this variable to `true` when it overrides this function
|
||||||
|
@ -273,7 +273,7 @@ function build_cfg_template($tpl_type, $key, &$new_ary, $config_key, $vars)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'number':
|
case 'number':
|
||||||
$min = $max = $maxlength = '';
|
$max = $maxlength = '';
|
||||||
$min = ( isset($tpl_type[1]) ) ? (int) $tpl_type[1] : false;
|
$min = ( isset($tpl_type[1]) ) ? (int) $tpl_type[1] : false;
|
||||||
if ( isset($tpl_type[2]) )
|
if ( isset($tpl_type[2]) )
|
||||||
{
|
{
|
||||||
|
@ -285,7 +285,7 @@ function build_cfg_template($tpl_type, $key, &$new_ary, $config_key, $vars)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'dimension':
|
case 'dimension':
|
||||||
$min = $max = $maxlength = $size = '';
|
$max = $maxlength = $size = '';
|
||||||
|
|
||||||
$min = (int) $tpl_type[1];
|
$min = (int) $tpl_type[1];
|
||||||
|
|
||||||
|
@ -321,8 +321,6 @@ function build_cfg_template($tpl_type, $key, &$new_ary, $config_key, $vars)
|
||||||
case 'select':
|
case 'select':
|
||||||
case 'custom':
|
case 'custom':
|
||||||
|
|
||||||
$return = '';
|
|
||||||
|
|
||||||
if (isset($vars['method']))
|
if (isset($vars['method']))
|
||||||
{
|
{
|
||||||
$call = array($module->module, $vars['method']);
|
$call = array($module->module, $vars['method']);
|
||||||
|
@ -652,8 +650,6 @@ function validate_range($value_ary, &$error)
|
||||||
foreach ($value_ary as $value)
|
foreach ($value_ary as $value)
|
||||||
{
|
{
|
||||||
$column = explode(':', $value['column_type']);
|
$column = explode(':', $value['column_type']);
|
||||||
$max = $min = 0;
|
|
||||||
$type = 0;
|
|
||||||
if (!isset($column_types[$column[0]]))
|
if (!isset($column_types[$column[0]]))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -65,7 +65,7 @@ function recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = ar
|
||||||
*/
|
*/
|
||||||
function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $only_acl_post = false, $return_array = false)
|
function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $only_acl_post = false, $return_array = false)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth;
|
global $db, $auth;
|
||||||
|
|
||||||
// This query is identical to the jumpbox one
|
// This query is identical to the jumpbox one
|
||||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
|
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
|
||||||
|
@ -2009,7 +2009,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||||
AND u.user_id = p.poster_id';
|
AND u.user_id = p.poster_id';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$post_ids = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$topic_id = intval($row['topic_id']);
|
$topic_id = intval($row['topic_id']);
|
||||||
|
@ -2082,7 +2081,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||||
AND u.user_id = p.poster_id';
|
AND u.user_id = p.poster_id';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$post_ids = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$topic_id = (int) $row['topic_id'];
|
$topic_id = (int) $row['topic_id'];
|
||||||
|
@ -2377,7 +2375,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We add moderators who have forum moderator permissions without an explicit ACL_NEVER setting
|
// We add moderators who have forum moderator permissions without an explicit ACL_NEVER setting
|
||||||
$hold_ary = $ug_id_ary = $sql_ary = array();
|
$sql_ary = array();
|
||||||
|
|
||||||
// Grab all users having moderative options...
|
// Grab all users having moderative options...
|
||||||
$hold_ary = $auth->acl_user_raw_data(false, 'm_%', false);
|
$hold_ary = $auth->acl_user_raw_data(false, 'm_%', false);
|
||||||
|
|
|
@ -56,7 +56,6 @@ class compress
|
||||||
// Clean up path, add closing / if not present
|
// Clean up path, add closing / if not present
|
||||||
$src_path = ($src_path && substr($src_path, -1) != '/') ? $src_path . '/' : $src_path;
|
$src_path = ($src_path && substr($src_path, -1) != '/') ? $src_path . '/' : $src_path;
|
||||||
|
|
||||||
$filelist = array();
|
|
||||||
$filelist = filelist("$phpbb_root_path$src", '', '*');
|
$filelist = filelist("$phpbb_root_path$src", '', '*');
|
||||||
krsort($filelist);
|
krsort($filelist);
|
||||||
|
|
||||||
|
|
|
@ -651,7 +651,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
|
||||||
*/
|
*/
|
||||||
function generate_text_for_edit($text, $uid, $flags)
|
function generate_text_for_edit($text, $uid, $flags)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this event to modify the text before it is decoded for editing
|
* Use this event to modify the text before it is decoded for editing
|
||||||
|
@ -1056,7 +1056,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
|
||||||
// Some basics...
|
// Some basics...
|
||||||
$attachment['extension'] = strtolower(trim($attachment['extension']));
|
$attachment['extension'] = strtolower(trim($attachment['extension']));
|
||||||
$filename = $phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($attachment['physical_filename']);
|
$filename = $phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($attachment['physical_filename']);
|
||||||
$thumbnail_filename = $phpbb_root_path . $config['upload_path'] . '/thumb_' . utf8_basename($attachment['physical_filename']);
|
|
||||||
|
|
||||||
$upload_icon = '';
|
$upload_icon = '';
|
||||||
|
|
||||||
|
@ -1098,7 +1097,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
|
||||||
|
|
||||||
if (!$denied)
|
if (!$denied)
|
||||||
{
|
{
|
||||||
$l_downloaded_viewed = $download_link = '';
|
|
||||||
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
||||||
|
|
||||||
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE)
|
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE)
|
||||||
|
@ -1316,8 +1314,6 @@ function extension_allowed($forum_id, $extension, &$extensions)
|
||||||
*/
|
*/
|
||||||
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')
|
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')
|
||||||
{
|
{
|
||||||
$chars = array();
|
|
||||||
|
|
||||||
$strip_reply = false;
|
$strip_reply = false;
|
||||||
$stripped = false;
|
$stripped = false;
|
||||||
if ($allow_reply && strpos($string, 'Re: ') === 0)
|
if ($allow_reply && strpos($string, 'Re: ') === 0)
|
||||||
|
|
|
@ -423,7 +423,7 @@ function remote_avatar_dims()
|
||||||
|
|
||||||
function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false)
|
function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false)
|
||||||
{
|
{
|
||||||
global $config, $convert, $phpbb_root_path, $user;
|
global $config, $convert, $user;
|
||||||
|
|
||||||
$relative_path = empty($convert->convertor['source_path_absolute']);
|
$relative_path = empty($convert->convertor['source_path_absolute']);
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
|
||||||
|
|
||||||
function import_attachment_files($category_name = '')
|
function import_attachment_files($category_name = '')
|
||||||
{
|
{
|
||||||
global $config, $convert, $phpbb_root_path, $db, $user;
|
global $config, $convert, $db, $user;
|
||||||
|
|
||||||
$sql = 'SELECT config_value AS upload_path
|
$sql = 'SELECT config_value AS upload_path
|
||||||
FROM ' . CONFIG_TABLE . "
|
FROM ' . CONFIG_TABLE . "
|
||||||
|
@ -590,7 +590,7 @@ function import_attachment($source, $use_target = false)
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $config, $user;
|
||||||
|
|
||||||
// check for trailing slash
|
// check for trailing slash
|
||||||
if (rtrim($convert->convertor['upload_path'], '/') === '')
|
if (rtrim($convert->convertor['upload_path'], '/') === '')
|
||||||
|
@ -632,7 +632,7 @@ function import_rank($source, $use_target = false)
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $user;
|
||||||
|
|
||||||
if (!isset($convert->convertor['ranks_path']))
|
if (!isset($convert->convertor['ranks_path']))
|
||||||
{
|
{
|
||||||
|
@ -650,7 +650,7 @@ function import_smiley($source, $use_target = false)
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $user;
|
||||||
|
|
||||||
// check for trailing slash
|
// check for trailing slash
|
||||||
if (rtrim($convert->convertor['smilies_path'], '/') === '')
|
if (rtrim($convert->convertor['smilies_path'], '/') === '')
|
||||||
|
@ -671,7 +671,7 @@ function import_avatar($source, $use_target = false, $user_id = false)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $config, $user;
|
||||||
|
|
||||||
// check for trailing slash
|
// check for trailing slash
|
||||||
if (rtrim($convert->convertor['avatar_path'], '/') === '')
|
if (rtrim($convert->convertor['avatar_path'], '/') === '')
|
||||||
|
@ -684,7 +684,7 @@ function import_avatar($source, $use_target = false, $user_id = false)
|
||||||
$use_target = $config['avatar_salt'] . '_' . $user_id . '.' . substr(strrchr($source, '.'), 1);
|
$use_target = $config['avatar_salt'] . '_' . $user_id . '.' . substr(strrchr($source, '.'), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = _import_check('avatar_path', $source, $use_target);
|
_import_check('avatar_path', $source, $use_target);
|
||||||
|
|
||||||
return ((!empty($user_id)) ? $user_id : $use_target) . '.' . substr(strrchr($source, '.'), 1);
|
return ((!empty($user_id)) ? $user_id : $use_target) . '.' . substr(strrchr($source, '.'), 1);
|
||||||
}
|
}
|
||||||
|
@ -750,7 +750,7 @@ function get_smiley_dim($source, $axis)
|
||||||
return $smiley_cache[$source][$axis];
|
return $smiley_cache[$source][$axis];
|
||||||
}
|
}
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $user;
|
||||||
|
|
||||||
$orig_source = $source;
|
$orig_source = $source;
|
||||||
|
|
||||||
|
@ -858,14 +858,12 @@ function get_upload_avatar_dim($source, $axis)
|
||||||
return $cachedims[$axis];
|
return $cachedims[$axis];
|
||||||
}
|
}
|
||||||
|
|
||||||
$orig_source = $source;
|
|
||||||
|
|
||||||
if (substr($source, 0, 7) == 'upload:')
|
if (substr($source, 0, 7) == 'upload:')
|
||||||
{
|
{
|
||||||
$source = substr($source, 7);
|
$source = substr($source, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $user;
|
||||||
|
|
||||||
if (!isset($convert->convertor['avatar_path']))
|
if (!isset($convert->convertor['avatar_path']))
|
||||||
{
|
{
|
||||||
|
@ -907,7 +905,7 @@ function get_gallery_avatar_dim($source, $axis)
|
||||||
return $avatar_cache[$source][$axis];
|
return $avatar_cache[$source][$axis];
|
||||||
}
|
}
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $user;
|
||||||
|
|
||||||
$orig_source = $source;
|
$orig_source = $source;
|
||||||
|
|
||||||
|
@ -1122,7 +1120,7 @@ function words_unique(&$words)
|
||||||
*/
|
*/
|
||||||
function add_user_group($group_id, $user_id, $group_leader = false)
|
function add_user_group($group_id, $user_id, $group_leader = false)
|
||||||
{
|
{
|
||||||
global $convert, $phpbb_root_path, $config, $user, $db;
|
global $db;
|
||||||
|
|
||||||
$sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
$sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||||
'group_id' => $group_id,
|
'group_id' => $group_id,
|
||||||
|
@ -1142,7 +1140,7 @@ function add_user_group($group_id, $user_id, $group_leader = false)
|
||||||
*/
|
*/
|
||||||
function user_group_auth($group, $select_query, $use_src_db)
|
function user_group_auth($group, $select_query, $use_src_db)
|
||||||
{
|
{
|
||||||
global $convert, $phpbb_root_path, $config, $user, $db, $src_db, $same_db;
|
global $convert, $user, $db, $src_db, $same_db;
|
||||||
|
|
||||||
if (!in_array($group, array('guests', 'registered', 'registered_coppa', 'global_moderators', 'administrators', 'bots')))
|
if (!in_array($group, array('guests', 'registered', 'registered_coppa', 'global_moderators', 'administrators', 'bots')))
|
||||||
{
|
{
|
||||||
|
@ -1198,7 +1196,7 @@ function get_config()
|
||||||
return $convert_config;
|
return $convert_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
global $src_db, $same_db, $phpbb_root_path, $config;
|
global $src_db, $same_db;
|
||||||
global $convert;
|
global $convert;
|
||||||
|
|
||||||
if ($convert->config_schema['table_format'] != 'file')
|
if ($convert->config_schema['table_format'] != 'file')
|
||||||
|
@ -1277,7 +1275,7 @@ function get_config()
|
||||||
*/
|
*/
|
||||||
function restore_config($schema)
|
function restore_config($schema)
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $config;
|
||||||
|
|
||||||
$convert_config = get_config();
|
$convert_config = get_config();
|
||||||
|
|
||||||
|
@ -1322,7 +1320,7 @@ function restore_config($schema)
|
||||||
*/
|
*/
|
||||||
function update_folder_pm_count()
|
function update_folder_pm_count()
|
||||||
{
|
{
|
||||||
global $db, $convert, $user;
|
global $db;
|
||||||
|
|
||||||
$sql = 'SELECT user_id, folder_id, COUNT(msg_id) as num_messages
|
$sql = 'SELECT user_id, folder_id, COUNT(msg_id) as num_messages
|
||||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||||
|
@ -1381,7 +1379,7 @@ function extract_variables_from_file($_filename)
|
||||||
|
|
||||||
function get_path($src_path, $src_url, $test_file)
|
function get_path($src_path, $src_url, $test_file)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$board_config = get_config();
|
$board_config = get_config();
|
||||||
|
|
||||||
|
@ -1492,7 +1490,7 @@ function compare_table($tables, $tablename, &$prefixes)
|
||||||
*/
|
*/
|
||||||
function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
|
function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
|
||||||
{
|
{
|
||||||
global $db, $convert, $user, $config;
|
global $db;
|
||||||
static $acl_option_ids, $group_ids;
|
static $acl_option_ids, $group_ids;
|
||||||
|
|
||||||
if (($ug_type == 'group' || $ug_type == 'group_role') && is_string($ug_id))
|
if (($ug_type == 'group' || $ug_type == 'group_role') && is_string($ug_id))
|
||||||
|
@ -2039,7 +2037,7 @@ function update_dynamic_config()
|
||||||
*/
|
*/
|
||||||
function update_topics_posted()
|
function update_topics_posted()
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db;
|
||||||
|
|
||||||
switch ($db->get_sql_layer())
|
switch ($db->get_sql_layer())
|
||||||
{
|
{
|
||||||
|
@ -2180,7 +2178,7 @@ function fix_empty_primary_groups()
|
||||||
*/
|
*/
|
||||||
function remove_invalid_users()
|
function remove_invalid_users()
|
||||||
{
|
{
|
||||||
global $convert, $db, $phpEx, $phpbb_root_path;
|
global $db, $phpEx, $phpbb_root_path;
|
||||||
|
|
||||||
// username_clean is UNIQUE
|
// username_clean is UNIQUE
|
||||||
$sql = 'SELECT user_id
|
$sql = 'SELECT user_id
|
||||||
|
@ -2316,7 +2314,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
|
||||||
|
|
||||||
function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $source_relative_path = true)
|
function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $source_relative_path = true)
|
||||||
{
|
{
|
||||||
global $convert, $phpbb_root_path, $config, $user, $db, $phpbb_filesystem;
|
global $convert, $phpbb_root_path, $user, $phpbb_filesystem;
|
||||||
|
|
||||||
/** @var \phpbb\filesystem\filesystem_interface $filesystem */
|
/** @var \phpbb\filesystem\filesystem_interface $filesystem */
|
||||||
$filesystem = $phpbb_filesystem;
|
$filesystem = $phpbb_filesystem;
|
||||||
|
@ -2373,7 +2371,7 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour
|
||||||
|
|
||||||
function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_failure = true, $source_relative_path = true)
|
function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_failure = true, $source_relative_path = true)
|
||||||
{
|
{
|
||||||
global $convert, $phpbb_root_path, $config, $user, $db, $phpbb_filesystem;
|
global $convert, $phpbb_root_path, $config, $user, $phpbb_filesystem;
|
||||||
|
|
||||||
/** @var \phpbb\filesystem\filesystem_interface $filesystem */
|
/** @var \phpbb\filesystem\filesystem_interface $filesystem */
|
||||||
$filesystem = $phpbb_filesystem;
|
$filesystem = $phpbb_filesystem;
|
||||||
|
@ -2485,7 +2483,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_
|
||||||
|
|
||||||
function relative_base($path, $is_relative = true, $line = false, $file = false)
|
function relative_base($path, $is_relative = true, $line = false, $file = false)
|
||||||
{
|
{
|
||||||
global $convert, $phpbb_root_path, $config, $user, $db;
|
global $convert, $user;
|
||||||
|
|
||||||
if (!$is_relative)
|
if (!$is_relative)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
|
|
||||||
$forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array();
|
$forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array();
|
||||||
$parent_id = $visible_forums = 0;
|
$parent_id = $visible_forums = 0;
|
||||||
$sql_from = '';
|
|
||||||
|
|
||||||
// Mark forums read?
|
// Mark forums read?
|
||||||
$mark_read = $request->variable('mark', '');
|
$mark_read = $request->variable('mark', '');
|
||||||
|
@ -732,7 +731,7 @@ function generate_forum_rules(&$forum_data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
global $template, $phpbb_root_path, $phpEx;
|
global $template;
|
||||||
|
|
||||||
if ($forum_data['forum_rules'])
|
if ($forum_data['forum_rules'])
|
||||||
{
|
{
|
||||||
|
@ -752,7 +751,7 @@ function generate_forum_rules(&$forum_data)
|
||||||
*/
|
*/
|
||||||
function generate_forum_nav(&$forum_data_ary)
|
function generate_forum_nav(&$forum_data_ary)
|
||||||
{
|
{
|
||||||
global $db, $user, $template, $auth, $config;
|
global $template, $auth, $config;
|
||||||
global $phpEx, $phpbb_root_path, $phpbb_dispatcher;
|
global $phpEx, $phpbb_root_path, $phpbb_dispatcher;
|
||||||
|
|
||||||
if (!$auth->acl_get('f_list', $forum_data_ary['forum_id']))
|
if (!$auth->acl_get('f_list', $forum_data_ary['forum_id']))
|
||||||
|
@ -760,7 +759,7 @@ function generate_forum_nav(&$forum_data_ary)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$navlinks = $navlinks_parents = $forum_template_data = array();
|
$navlinks_parents = $forum_template_data = array();
|
||||||
|
|
||||||
// Get forum parents
|
// Get forum parents
|
||||||
$forum_parents = get_forum_parents($forum_data_ary);
|
$forum_parents = get_forum_parents($forum_data_ary);
|
||||||
|
@ -887,7 +886,7 @@ function get_forum_parents(&$forum_data)
|
||||||
*/
|
*/
|
||||||
function get_moderators(&$forum_moderators, $forum_id = false)
|
function get_moderators(&$forum_moderators, $forum_id = false)
|
||||||
{
|
{
|
||||||
global $config, $template, $db, $phpbb_root_path, $phpEx, $user, $auth;
|
global $db, $phpbb_root_path, $phpEx, $user, $auth;
|
||||||
global $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
||||||
$forum_id_ary = array();
|
$forum_id_ary = array();
|
||||||
|
@ -1003,8 +1002,6 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
|
||||||
{
|
{
|
||||||
global $user, $config;
|
global $user, $config;
|
||||||
|
|
||||||
$folder = $folder_new = '';
|
|
||||||
|
|
||||||
if ($topic_row['topic_status'] == ITEM_MOVED)
|
if ($topic_row['topic_status'] == ITEM_MOVED)
|
||||||
{
|
{
|
||||||
$topic_type = $user->lang['VIEW_TOPIC_MOVED'];
|
$topic_type = $user->lang['VIEW_TOPIC_MOVED'];
|
||||||
|
@ -1295,7 +1292,7 @@ function display_user_activity(&$userdata_ary)
|
||||||
*/
|
*/
|
||||||
function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0, $item_title = '')
|
function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0, $item_title = '')
|
||||||
{
|
{
|
||||||
global $template, $db, $user, $phpEx, $start, $phpbb_root_path;
|
global $db, $user, $phpEx, $start, $phpbb_root_path;
|
||||||
global $request;
|
global $request;
|
||||||
|
|
||||||
$table_sql = ($mode == 'forum') ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;
|
$table_sql = ($mode == 'forum') ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;
|
||||||
|
|
|
@ -123,7 +123,7 @@ function wrap_img_in_html($src, $title)
|
||||||
*/
|
*/
|
||||||
function send_file_to_browser($attachment, $upload_dir, $category)
|
function send_file_to_browser($attachment, $upload_dir, $category)
|
||||||
{
|
{
|
||||||
global $user, $db, $config, $phpbb_root_path, $request;
|
global $user, $db, $phpbb_root_path, $request;
|
||||||
|
|
||||||
$filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
|
$filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ class messenger
|
||||||
*/
|
*/
|
||||||
function template($template_file, $template_lang = '', $template_path = '')
|
function template($template_file, $template_lang = '', $template_path = '')
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx, $user, $phpbb_extension_manager;
|
global $config, $phpbb_root_path, $user;
|
||||||
|
|
||||||
$this->setup_template();
|
$this->setup_template();
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ class messenger
|
||||||
*/
|
*/
|
||||||
function error($type, $msg)
|
function error($type, $msg)
|
||||||
{
|
{
|
||||||
global $user, $phpEx, $phpbb_root_path, $config, $request, $phpbb_log;
|
global $user, $config, $request, $phpbb_log;
|
||||||
|
|
||||||
// Session doesn't exist, create it
|
// Session doesn't exist, create it
|
||||||
if (!isset($user->session_id) || $user->session_id === '')
|
if (!isset($user->session_id) || $user->session_id === '')
|
||||||
|
@ -359,7 +359,6 @@ class messenger
|
||||||
|
|
||||||
$calling_page = htmlspecialchars_decode($request->server('PHP_SELF'));
|
$calling_page = htmlspecialchars_decode($request->server('PHP_SELF'));
|
||||||
|
|
||||||
$message = '';
|
|
||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case 'EMAIL':
|
case 'EMAIL':
|
||||||
|
@ -453,7 +452,7 @@ class messenger
|
||||||
*/
|
*/
|
||||||
function msg_email()
|
function msg_email()
|
||||||
{
|
{
|
||||||
global $config, $user;
|
global $config;
|
||||||
|
|
||||||
if (empty($config['email_enable']))
|
if (empty($config['email_enable']))
|
||||||
{
|
{
|
||||||
|
@ -551,7 +550,7 @@ class messenger
|
||||||
*/
|
*/
|
||||||
function msg_jabber()
|
function msg_jabber()
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $phpbb_root_path, $phpEx;
|
global $config, $user, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
if (empty($config['jab_enable']) || empty($config['jab_host']) || empty($config['jab_username']) || empty($config['jab_password']))
|
if (empty($config['jab_enable']) || empty($config['jab_host']) || empty($config['jab_username']) || empty($config['jab_password']))
|
||||||
{
|
{
|
||||||
|
@ -623,7 +622,7 @@ class messenger
|
||||||
*/
|
*/
|
||||||
protected function setup_template()
|
protected function setup_template()
|
||||||
{
|
{
|
||||||
global $config, $phpbb_path_helper, $user, $phpbb_extension_manager, $phpbb_container, $phpbb_filesystem;
|
global $phpbb_extension_manager, $phpbb_container, $phpbb_filesystem;
|
||||||
|
|
||||||
if ($this->template instanceof \phpbb\template\template)
|
if ($this->template instanceof \phpbb\template\template)
|
||||||
{
|
{
|
||||||
|
@ -715,7 +714,7 @@ class queue
|
||||||
*/
|
*/
|
||||||
function process()
|
function process()
|
||||||
{
|
{
|
||||||
global $db, $config, $phpEx, $phpbb_root_path, $user;
|
global $config, $phpEx, $phpbb_root_path, $user;
|
||||||
|
|
||||||
$lock = new \phpbb\lock\flock($this->cache_file);
|
$lock = new \phpbb\lock\flock($this->cache_file);
|
||||||
$lock->acquire();
|
$lock->acquire();
|
||||||
|
@ -1258,8 +1257,6 @@ class smtp_class
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$err_msg = '';
|
|
||||||
|
|
||||||
// Here we try to determine the *real* hostname (reverse DNS entry preferrably)
|
// Here we try to determine the *real* hostname (reverse DNS entry preferrably)
|
||||||
$local_host = $user->host;
|
$local_host = $user->host;
|
||||||
|
|
||||||
|
@ -1294,7 +1291,7 @@ class smtp_class
|
||||||
$this->server_send("QUIT");
|
$this->server_send("QUIT");
|
||||||
fclose($this->socket);
|
fclose($this->socket);
|
||||||
|
|
||||||
$result = $this->pop_before_smtp($hostname, $username, $password);
|
$this->pop_before_smtp($hostname, $username, $password);
|
||||||
$username = $password = $default_auth_method = '';
|
$username = $password = $default_auth_method = '';
|
||||||
|
|
||||||
// We need to close the previous session, else the server is not
|
// We need to close the previous session, else the server is not
|
||||||
|
@ -1736,7 +1733,7 @@ function mail_encode($str, $eol = "\r\n")
|
||||||
*/
|
*/
|
||||||
function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
|
function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
// We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
|
// We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
|
||||||
// Reference: http://bugs.php.net/bug.php?id=15841
|
// Reference: http://bugs.php.net/bug.php?id=15841
|
||||||
|
|
|
@ -82,8 +82,8 @@ class p_master
|
||||||
*/
|
*/
|
||||||
function list_modules($p_class)
|
function list_modules($p_class)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $cache;
|
global $db, $user, $cache;
|
||||||
global $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
// Sanitise for future path use, it's escaped as appropriate for queries
|
// Sanitise for future path use, it's escaped as appropriate for queries
|
||||||
$this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class));
|
$this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class));
|
||||||
|
@ -729,8 +729,6 @@ class p_master
|
||||||
*/
|
*/
|
||||||
function get_parents($parent_id, $left_id, $right_id, &$all_parents)
|
function get_parents($parent_id, $left_id, $right_id, &$all_parents)
|
||||||
{
|
{
|
||||||
global $db;
|
|
||||||
|
|
||||||
$parents = array();
|
$parents = array();
|
||||||
|
|
||||||
if ($parent_id > 0)
|
if ($parent_id > 0)
|
||||||
|
@ -822,7 +820,7 @@ class p_master
|
||||||
// Make sure the module_url has a question mark set, effectively determining the delimiter to use
|
// Make sure the module_url has a question mark set, effectively determining the delimiter to use
|
||||||
$delim = (strpos($module_url, '?') === false) ? '?' : '&';
|
$delim = (strpos($module_url, '?') === false) ? '?' : '&';
|
||||||
|
|
||||||
$current_padding = $current_depth = 0;
|
$current_depth = 0;
|
||||||
$linear_offset = 'l_block1';
|
$linear_offset = 'l_block1';
|
||||||
$tabular_offset = 't_block2';
|
$tabular_offset = 't_block2';
|
||||||
|
|
||||||
|
|
|
@ -333,7 +333,7 @@ function posting_gen_topic_icons($mode, $icon_id)
|
||||||
*/
|
*/
|
||||||
function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
||||||
{
|
{
|
||||||
global $auth, $user, $template, $topic_type;
|
global $auth, $user, $template;
|
||||||
|
|
||||||
$toggle = false;
|
$toggle = false;
|
||||||
|
|
||||||
|
@ -833,7 +833,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
||||||
foreach ($draft_rows as $draft)
|
foreach ($draft_rows as $draft)
|
||||||
{
|
{
|
||||||
$link_topic = $link_forum = $link_pm = false;
|
$link_topic = $link_forum = $link_pm = false;
|
||||||
$insert_url = $view_url = $title = '';
|
$view_url = $title = '';
|
||||||
|
|
||||||
if (isset($topic_rows[$draft['topic_id']])
|
if (isset($topic_rows[$draft['topic_id']])
|
||||||
&& (
|
&& (
|
||||||
|
@ -886,7 +886,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
||||||
*/
|
*/
|
||||||
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
|
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
|
||||||
{
|
{
|
||||||
global $user, $auth, $db, $template, $cache;
|
global $user, $auth, $db, $template;
|
||||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
|
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||||
|
@ -959,11 +959,9 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
// Grab extensions
|
// Grab extensions
|
||||||
$extensions = $attachments = array();
|
$attachments = array();
|
||||||
if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
|
if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
|
||||||
{
|
{
|
||||||
$extensions = $cache->obtain_attach_extensions($forum_id);
|
|
||||||
|
|
||||||
// Get attachments...
|
// Get attachments...
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . ATTACHMENTS_TABLE . '
|
FROM ' . ATTACHMENTS_TABLE . '
|
||||||
|
@ -1101,7 +1099,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
*/
|
*/
|
||||||
function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $softdelete_reason = '')
|
function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $softdelete_reason = '')
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $phpbb_container;
|
global $db, $user, $phpbb_container;
|
||||||
global $config, $phpEx, $phpbb_root_path;
|
global $config, $phpEx, $phpbb_root_path;
|
||||||
|
|
||||||
// Specify our post mode
|
// Specify our post mode
|
||||||
|
@ -1190,7 +1188,6 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
|
||||||
|
|
||||||
if ($is_soft)
|
if ($is_soft)
|
||||||
{
|
{
|
||||||
$topic_row = array();
|
|
||||||
$phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $forum_id, $user->data['user_id'], time(), $softdelete_reason);
|
$phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $forum_id, $user->data['user_id'], time(), $softdelete_reason);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1362,7 +1359,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
|
||||||
*/
|
*/
|
||||||
function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data_ary, $update_message = true, $update_search_index = true)
|
function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data_ary, $update_message = true, $update_search_index = true)
|
||||||
{
|
{
|
||||||
global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $phpbb_log, $request;
|
global $db, $auth, $user, $config, $phpEx, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $phpbb_log, $request;
|
||||||
|
|
||||||
$poll = $poll_ary;
|
$poll = $poll_ary;
|
||||||
$data = $data_ary;
|
$data = $data_ary;
|
||||||
|
@ -1589,7 +1586,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$topic_row = array();
|
|
||||||
|
|
||||||
// And the topic ladies and gentlemen
|
// And the topic ladies and gentlemen
|
||||||
switch ($post_mode)
|
switch ($post_mode)
|
||||||
|
|
|
@ -226,7 +226,7 @@ function get_folder($user_id, $folder_id = false)
|
||||||
*/
|
*/
|
||||||
function clean_sentbox($num_sentbox_messages)
|
function clean_sentbox($num_sentbox_messages)
|
||||||
{
|
{
|
||||||
global $db, $user, $config;
|
global $db, $user;
|
||||||
|
|
||||||
// Check Message Limit
|
// Check Message Limit
|
||||||
if ($user->data['message_limit'] && $num_sentbox_messages > $user->data['message_limit'])
|
if ($user->data['message_limit'] && $num_sentbox_messages > $user->data['message_limit'])
|
||||||
|
@ -255,8 +255,6 @@ function clean_sentbox($num_sentbox_messages)
|
||||||
*/
|
*/
|
||||||
function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
|
function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
|
||||||
{
|
{
|
||||||
global $user, $config;
|
|
||||||
|
|
||||||
if (!isset($rules[$rule_row['rule_check']][$rule_row['rule_connection']]))
|
if (!isset($rules[$rule_row['rule_check']][$rule_row['rule_connection']]))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -335,7 +333,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTION_DELETE_MESSAGE:
|
case ACTION_DELETE_MESSAGE:
|
||||||
global $db, $auth;
|
global $db;
|
||||||
|
|
||||||
// Check for admins/mods - users are not allowed to remove those messages...
|
// Check for admins/mods - users are not allowed to remove those messages...
|
||||||
// We do the check here to make sure the data we use is consistent
|
// We do the check here to make sure the data we use is consistent
|
||||||
|
@ -546,7 +544,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We place actions into arrays, to save queries.
|
// We place actions into arrays, to save queries.
|
||||||
$sql = $unread_ids = $delete_ids = $important_ids = array();
|
$unread_ids = $delete_ids = $important_ids = array();
|
||||||
|
|
||||||
foreach ($action_ary as $msg_id => $msg_ary)
|
foreach ($action_ary as $msg_id => $msg_ary)
|
||||||
{
|
{
|
||||||
|
@ -942,7 +940,6 @@ function handle_mark_actions($user_id, $mark_action)
|
||||||
|
|
||||||
$msg_ids = $request->variable('marked_msg_id', array(0));
|
$msg_ids = $request->variable('marked_msg_id', array(0));
|
||||||
$cur_folder_id = $request->variable('cur_folder_id', PRIVMSGS_NO_BOX);
|
$cur_folder_id = $request->variable('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||||
$confirm = (isset($_POST['confirm'])) ? true : false;
|
|
||||||
|
|
||||||
if (!sizeof($msg_ids))
|
if (!sizeof($msg_ids))
|
||||||
{
|
{
|
||||||
|
@ -1007,7 +1004,7 @@ function handle_mark_actions($user_id, $mark_action)
|
||||||
*/
|
*/
|
||||||
function delete_pm($user_id, $msg_ids, $folder_id)
|
function delete_pm($user_id, $msg_ids, $folder_id)
|
||||||
{
|
{
|
||||||
global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
|
global $db, $user, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
$user_id = (int) $user_id;
|
$user_id = (int) $user_id;
|
||||||
$folder_id = (int) $folder_id;
|
$folder_id = (int) $folder_id;
|
||||||
|
@ -1177,8 +1174,6 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
||||||
*/
|
*/
|
||||||
function phpbb_delete_user_pms($user_id)
|
function phpbb_delete_user_pms($user_id)
|
||||||
{
|
{
|
||||||
global $db, $user, $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
$user_id = (int) $user_id;
|
$user_id = (int) $user_id;
|
||||||
|
|
||||||
if (!$user_id)
|
if (!$user_id)
|
||||||
|
@ -1198,7 +1193,7 @@ function phpbb_delete_user_pms($user_id)
|
||||||
*/
|
*/
|
||||||
function phpbb_delete_users_pms($user_ids)
|
function phpbb_delete_users_pms($user_ids)
|
||||||
{
|
{
|
||||||
global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container;
|
global $db, $phpbb_container;
|
||||||
|
|
||||||
$user_id_sql = $db->sql_in_set('user_id', $user_ids);
|
$user_id_sql = $db->sql_in_set('user_id', $user_ids);
|
||||||
$author_id_sql = $db->sql_in_set('author_id', $user_ids);
|
$author_id_sql = $db->sql_in_set('author_id', $user_ids);
|
||||||
|
@ -1396,8 +1391,6 @@ function phpbb_delete_users_pms($user_ids)
|
||||||
*/
|
*/
|
||||||
function rebuild_header($check_ary)
|
function rebuild_header($check_ary)
|
||||||
{
|
{
|
||||||
global $db;
|
|
||||||
|
|
||||||
$address = array();
|
$address = array();
|
||||||
|
|
||||||
foreach ($check_ary as $check_type => $address_field)
|
foreach ($check_ary as $check_type => $address_field)
|
||||||
|
@ -1577,7 +1570,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
||||||
*/
|
*/
|
||||||
function get_folder_status($folder_id, $folder)
|
function get_folder_status($folder_id, $folder)
|
||||||
{
|
{
|
||||||
global $db, $user, $config;
|
global $user;
|
||||||
|
|
||||||
if (isset($folder[$folder_id]))
|
if (isset($folder[$folder_id]))
|
||||||
{
|
{
|
||||||
|
@ -1610,7 +1603,7 @@ function get_folder_status($folder_id, $folder)
|
||||||
*/
|
*/
|
||||||
function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||||
{
|
{
|
||||||
global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $request;
|
global $db, $auth, $config, $user, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $request;
|
||||||
|
|
||||||
// We do not handle erasing pms here
|
// We do not handle erasing pms here
|
||||||
if ($mode == 'delete')
|
if ($mode == 'delete')
|
||||||
|
@ -1764,8 +1757,6 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||||
|
|
||||||
if (sizeof($sql_data))
|
if (sizeof($sql_data))
|
||||||
{
|
{
|
||||||
$query = '';
|
|
||||||
|
|
||||||
if ($mode == 'post' || $mode == 'reply' || $mode == 'quote' || $mode == 'quotepost' || $mode == 'forward')
|
if ($mode == 'post' || $mode == 'reply' || $mode == 'quote' || $mode == 'quotepost' || $mode == 'forward')
|
||||||
{
|
{
|
||||||
$db->sql_query('INSERT INTO ' . PRIVMSGS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_data));
|
$db->sql_query('INSERT INTO ' . PRIVMSGS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_data));
|
||||||
|
@ -1966,7 +1957,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||||
*/
|
*/
|
||||||
function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
|
function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
|
||||||
{
|
{
|
||||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth;
|
global $db, $user, $template, $phpbb_root_path, $phpEx, $auth;
|
||||||
|
|
||||||
// Select all receipts and the author from the pm we currently view, to only display their pm-history
|
// Select all receipts and the author from the pm we currently view, to only display their pm-history
|
||||||
$sql = 'SELECT author_id, user_id
|
$sql = 'SELECT author_id, user_id
|
||||||
|
|
|
@ -406,9 +406,6 @@ class ftp extends transfer
|
||||||
*/
|
*/
|
||||||
function _put($from_file, $to_file)
|
function _put($from_file, $to_file)
|
||||||
{
|
{
|
||||||
// get the file extension
|
|
||||||
$file_extension = strtolower(substr(strrchr($to_file, '.'), 1));
|
|
||||||
|
|
||||||
// We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
|
// We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
|
||||||
$mode = FTP_BINARY;
|
$mode = FTP_BINARY;
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ function user_update_name($old_name, $new_name)
|
||||||
*/
|
*/
|
||||||
function user_add($user_row, $cp_data = false, $notifications_data = null)
|
function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $config, $phpbb_root_path, $phpEx;
|
global $db, $config;
|
||||||
global $phpbb_dispatcher, $phpbb_container;
|
global $phpbb_dispatcher, $phpbb_container;
|
||||||
|
|
||||||
if (empty($user_row['username']) || !isset($user_row['group_id']) || !isset($user_row['user_email']) || !isset($user_row['user_type']))
|
if (empty($user_row['username']) || !isset($user_row['group_id']) || !isset($user_row['user_email']) || !isset($user_row['user_type']))
|
||||||
|
@ -866,7 +866,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||||
*/
|
*/
|
||||||
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
|
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $cache, $phpbb_log;
|
global $db, $user, $cache, $phpbb_log;
|
||||||
|
|
||||||
// Delete stale bans
|
// Delete stale bans
|
||||||
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
|
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
|
||||||
|
@ -1015,7 +1015,6 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||||
if ($ip_2_counter == 0 && $ip_2_end == 254)
|
if ($ip_2_counter == 0 && $ip_2_end == 254)
|
||||||
{
|
{
|
||||||
$ip_2_counter = 256;
|
$ip_2_counter = 256;
|
||||||
$ip_2_fragment = 256;
|
|
||||||
|
|
||||||
$banlist_ary[] = "$ip_1_counter.*";
|
$banlist_ary[] = "$ip_1_counter.*";
|
||||||
}
|
}
|
||||||
|
@ -1028,7 +1027,6 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||||
if ($ip_3_counter == 0 && $ip_3_end == 254)
|
if ($ip_3_counter == 0 && $ip_3_end == 254)
|
||||||
{
|
{
|
||||||
$ip_3_counter = 256;
|
$ip_3_counter = 256;
|
||||||
$ip_3_fragment = 256;
|
|
||||||
|
|
||||||
$banlist_ary[] = "$ip_1_counter.$ip_2_counter.*";
|
$banlist_ary[] = "$ip_1_counter.$ip_2_counter.*";
|
||||||
}
|
}
|
||||||
|
@ -1041,7 +1039,6 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||||
if ($ip_4_counter == 0 && $ip_4_end == 254)
|
if ($ip_4_counter == 0 && $ip_4_end == 254)
|
||||||
{
|
{
|
||||||
$ip_4_counter = 256;
|
$ip_4_counter = 256;
|
||||||
$ip_4_fragment = 256;
|
|
||||||
|
|
||||||
$banlist_ary[] = "$ip_1_counter.$ip_2_counter.$ip_3_counter.*";
|
$banlist_ary[] = "$ip_1_counter.$ip_2_counter.$ip_3_counter.*";
|
||||||
}
|
}
|
||||||
|
@ -1292,7 +1289,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||||
*/
|
*/
|
||||||
function user_unban($mode, $ban)
|
function user_unban($mode, $ban)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $cache, $phpbb_log;
|
global $db, $user, $cache, $phpbb_log;
|
||||||
|
|
||||||
// Delete stale bans
|
// Delete stale bans
|
||||||
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
|
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
|
||||||
|
@ -2141,7 +2138,7 @@ function phpbb_style_is_active($style_id)
|
||||||
*/
|
*/
|
||||||
function avatar_delete($mode, $row, $clean_db = false)
|
function avatar_delete($mode, $row, $clean_db = false)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $config, $db, $user;
|
global $phpbb_root_path, $config;
|
||||||
|
|
||||||
// Check if the users avatar is actually *not* a group avatar
|
// Check if the users avatar is actually *not* a group avatar
|
||||||
if ($mode == 'user')
|
if ($mode == 'user')
|
||||||
|
@ -2213,7 +2210,7 @@ function phpbb_avatar_explanation_string()
|
||||||
*/
|
*/
|
||||||
function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow_desc_bbcode = false, $allow_desc_urls = false, $allow_desc_smilies = false)
|
function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow_desc_bbcode = false, $allow_desc_urls = false, $allow_desc_smilies = false)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $config, $db, $user, $file_upload, $phpbb_container, $phpbb_log;
|
global $db, $user, $phpbb_container, $phpbb_log;
|
||||||
|
|
||||||
/** @var \phpbb\group\helper $group_helper */
|
/** @var \phpbb\group\helper $group_helper */
|
||||||
$group_helper = $phpbb_container->get('group_helper');
|
$group_helper = $phpbb_container->get('group_helper');
|
||||||
|
@ -2325,8 +2322,6 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||||
// Setting the log message before we set the group id (if group gets added)
|
// Setting the log message before we set the group id (if group gets added)
|
||||||
$log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
|
$log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
|
||||||
|
|
||||||
$query = '';
|
|
||||||
|
|
||||||
if ($group_id)
|
if ($group_id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT user_id
|
$sql = 'SELECT user_id
|
||||||
|
@ -2508,7 +2503,7 @@ function group_correct_avatar($group_id, $old_entry)
|
||||||
*/
|
*/
|
||||||
function avatar_remove_db($avatar_name)
|
function avatar_remove_db($avatar_name)
|
||||||
{
|
{
|
||||||
global $config, $db;
|
global $db;
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
SET user_avatar = '',
|
SET user_avatar = '',
|
||||||
|
@ -3012,7 +3007,7 @@ function remove_default_rank($group_id, $user_ids)
|
||||||
*/
|
*/
|
||||||
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
|
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
|
||||||
{
|
{
|
||||||
global $db, $auth, $user, $phpbb_root_path, $phpEx, $config, $phpbb_container, $phpbb_log;
|
global $db, $auth, $user, $phpbb_container, $phpbb_log;
|
||||||
|
|
||||||
// We need both username and user_id info
|
// We need both username and user_id info
|
||||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||||
|
@ -3159,7 +3154,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||||
*/
|
*/
|
||||||
function group_validate_groupname($group_id, $group_name)
|
function group_validate_groupname($group_id, $group_name)
|
||||||
{
|
{
|
||||||
global $config, $db;
|
global $db;
|
||||||
|
|
||||||
$group_name = utf8_clean_string($group_name);
|
$group_name = utf8_clean_string($group_name);
|
||||||
|
|
||||||
|
@ -3356,7 +3351,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
||||||
*/
|
*/
|
||||||
function get_group_name($group_id)
|
function get_group_name($group_id)
|
||||||
{
|
{
|
||||||
global $db, $user, $phpbb_container;
|
global $db, $phpbb_container;
|
||||||
|
|
||||||
$sql = 'SELECT group_name, group_type
|
$sql = 'SELECT group_name, group_type
|
||||||
FROM ' . GROUPS_TABLE . '
|
FROM ' . GROUPS_TABLE . '
|
||||||
|
|
|
@ -241,8 +241,6 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||||
|
|
||||||
foreach ($topic_list as $topic_id)
|
foreach ($topic_list as $topic_id)
|
||||||
{
|
{
|
||||||
$topic_title = '';
|
|
||||||
|
|
||||||
$row_ary = &$topic_rows[$topic_id];
|
$row_ary = &$topic_rows[$topic_id];
|
||||||
|
|
||||||
$replies = $phpbb_content_visibility->get_count('topic_posts', $row_ary, $forum_id) - 1;
|
$replies = $phpbb_content_visibility->get_count('topic_posts', $row_ary, $forum_id) - 1;
|
||||||
|
@ -358,7 +356,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||||
*/
|
*/
|
||||||
function mcp_resync_topics($topic_ids)
|
function mcp_resync_topics($topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $db, $template, $phpEx, $user, $phpbb_root_path, $phpbb_log, $request;
|
global $db, $user, $phpbb_log, $request;
|
||||||
|
|
||||||
if (!sizeof($topic_ids))
|
if (!sizeof($topic_ids))
|
||||||
{
|
{
|
||||||
|
@ -406,7 +404,7 @@ function mcp_resync_topics($topic_ids)
|
||||||
*/
|
*/
|
||||||
function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_log, $request;
|
global $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_log, $request;
|
||||||
|
|
||||||
if (!sizeof($topic_ids))
|
if (!sizeof($topic_ids))
|
||||||
{
|
{
|
||||||
|
@ -479,7 +477,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||||
'redirect' => $redirect,
|
'redirect' => $redirect,
|
||||||
'topic_id_list' => $topic_ids)
|
'topic_id_list' => $topic_ids)
|
||||||
);
|
);
|
||||||
$success_msg = $return_link = '';
|
$return_link = '';
|
||||||
|
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
function mcp_front_view($id, $mode, $action)
|
function mcp_front_view($id, $mode, $action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config;
|
global $phpEx, $phpbb_root_path;
|
||||||
global $template, $db, $user, $auth, $module;
|
global $template, $db, $user, $auth, $module;
|
||||||
global $phpbb_dispatcher, $request;
|
global $phpbb_dispatcher, $request;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class mcp_logs
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template, $request;
|
global $auth, $db, $user, $template, $request;
|
||||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_log;
|
global $config, $phpbb_container, $phpbb_log;
|
||||||
|
|
||||||
$user->add_lang('acp/common');
|
$user->add_lang('acp/common');
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ class mcp_main
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template, $action;
|
global $auth, $user, $action;
|
||||||
global $config, $phpbb_root_path, $phpEx, $request;
|
global $phpbb_root_path, $phpEx, $request;
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
$quickmod = ($mode == 'quickmod') ? true : false;
|
$quickmod = ($mode == 'quickmod') ? true : false;
|
||||||
|
@ -262,7 +262,7 @@ class mcp_main
|
||||||
*/
|
*/
|
||||||
function lock_unlock($action, $ids)
|
function lock_unlock($action, $ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_log, $phpbb_dispatcher;
|
global $user, $db, $request, $phpbb_log, $phpbb_dispatcher;
|
||||||
|
|
||||||
if ($action == 'lock' || $action == 'unlock')
|
if ($action == 'lock' || $action == 'unlock')
|
||||||
{
|
{
|
||||||
|
@ -306,7 +306,6 @@ function lock_unlock($action, $ids)
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'redirect' => $redirect)
|
'redirect' => $redirect)
|
||||||
);
|
);
|
||||||
$success_msg = '';
|
|
||||||
|
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
@ -367,7 +366,7 @@ function lock_unlock($action, $ids)
|
||||||
*/
|
*/
|
||||||
function change_topic_type($action, $topic_ids)
|
function change_topic_type($action, $topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_log;
|
global $user, $db, $request, $phpbb_log;
|
||||||
|
|
||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
|
@ -412,7 +411,6 @@ function change_topic_type($action, $topic_ids)
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'redirect' => $redirect,
|
'redirect' => $redirect,
|
||||||
);
|
);
|
||||||
$success_msg = '';
|
|
||||||
|
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
@ -729,7 +727,7 @@ function mcp_move_topic($topic_ids)
|
||||||
*/
|
*/
|
||||||
function mcp_restore_topic($topic_ids)
|
function mcp_restore_topic($topic_ids)
|
||||||
{
|
{
|
||||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container, $phpbb_log;
|
global $user, $phpEx, $phpbb_root_path, $request, $phpbb_container, $phpbb_log;
|
||||||
|
|
||||||
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
|
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
|
||||||
{
|
{
|
||||||
|
@ -877,7 +875,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
|
||||||
|
|
||||||
if (!$is_soft)
|
if (!$is_soft)
|
||||||
{
|
{
|
||||||
$return = delete_topics('topic_id', $topic_ids);
|
delete_topics('topic_id', $topic_ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1346,8 +1344,6 @@ function mcp_fork_topic($topic_ids)
|
||||||
|
|
||||||
if ($topic_row['poll_start'])
|
if ($topic_row['poll_start'])
|
||||||
{
|
{
|
||||||
$poll_rows = array();
|
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . POLL_OPTIONS_TABLE . "
|
FROM ' . POLL_OPTIONS_TABLE . "
|
||||||
WHERE topic_id = $topic_id";
|
WHERE topic_id = $topic_id";
|
||||||
|
|
|
@ -35,8 +35,8 @@ class mcp_notes
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template, $request;
|
global $user, $template, $request;
|
||||||
global $config, $phpbb_root_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$action = $request->variable('action', array('' => ''));
|
$action = $request->variable('action', array('' => ''));
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ class mcp_notes
|
||||||
*/
|
*/
|
||||||
function mcp_notes_user_view($action)
|
function mcp_notes_user_view($action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config, $phpbb_log, $request;
|
global $config, $phpbb_log, $request;
|
||||||
global $template, $db, $user, $auth, $phpbb_container;
|
global $template, $db, $user, $auth, $phpbb_container;
|
||||||
|
|
||||||
$user_id = $request->variable('u', 0);
|
$user_id = $request->variable('u', 0);
|
||||||
|
|
|
@ -35,7 +35,7 @@ class mcp_pm_reports
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template, $cache, $request;
|
global $auth, $db, $user, $template, $request;
|
||||||
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
|
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||||
|
|
|
@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||||
function mcp_post_details($id, $mode, $action)
|
function mcp_post_details($id, $mode, $action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config, $request;
|
global $phpEx, $phpbb_root_path, $config, $request;
|
||||||
global $template, $db, $user, $auth, $cache;
|
global $template, $db, $user, $auth;
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
$user->add_lang('posting');
|
$user->add_lang('posting');
|
||||||
|
@ -128,7 +128,6 @@ function mcp_post_details($id, $mode, $action)
|
||||||
$users_ary = $usernames_ary = array();
|
$users_ary = $usernames_ary = array();
|
||||||
$attachments = $extensions = array();
|
$attachments = $extensions = array();
|
||||||
$post_id = $post_info['post_id'];
|
$post_id = $post_info['post_id'];
|
||||||
$topic_tracking_info = array();
|
|
||||||
|
|
||||||
// Get topic tracking info
|
// Get topic tracking info
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
|
@ -150,8 +149,6 @@ function mcp_post_details($id, $mode, $action)
|
||||||
|
|
||||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||||
{
|
{
|
||||||
$extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
|
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . ATTACHMENTS_TABLE . '
|
FROM ' . ATTACHMENTS_TABLE . '
|
||||||
WHERE post_msg_id = ' . $post_id . '
|
WHERE post_msg_id = ' . $post_id . '
|
||||||
|
|
|
@ -35,7 +35,7 @@ class mcp_queue
|
||||||
|
|
||||||
public function main($id, $mode)
|
public function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template, $cache, $request;
|
global $auth, $db, $user, $template, $request;
|
||||||
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
|
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ class mcp_queue
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$extensions = $attachments = $topic_tracking_info = array();
|
$attachments = $topic_tracking_info = array();
|
||||||
|
|
||||||
// Get topic tracking info
|
// Get topic tracking info
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
|
@ -217,8 +217,6 @@ class mcp_queue
|
||||||
|
|
||||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||||
{
|
{
|
||||||
$extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
|
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . ATTACHMENTS_TABLE . '
|
FROM ' . ATTACHMENTS_TABLE . '
|
||||||
WHERE post_msg_id = ' . $post_id . '
|
WHERE post_msg_id = ' . $post_id . '
|
||||||
|
@ -402,7 +400,6 @@ class mcp_queue
|
||||||
trigger_error('NOT_MODERATOR');
|
trigger_error('NOT_MODERATOR');
|
||||||
}
|
}
|
||||||
|
|
||||||
$forum_info = $forum_info[$forum_id];
|
|
||||||
$forum_list = $forum_id;
|
$forum_list = $forum_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +414,6 @@ class mcp_queue
|
||||||
$sort_by_sql = $sort_order_sql = array();
|
$sort_by_sql = $sort_order_sql = array();
|
||||||
phpbb_mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
|
phpbb_mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
|
||||||
|
|
||||||
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
|
|
||||||
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||||
|
|
||||||
$forum_names = array();
|
$forum_names = array();
|
||||||
|
@ -621,7 +617,7 @@ class mcp_queue
|
||||||
*/
|
*/
|
||||||
static public function approve_posts($action, $post_id_list, $id, $mode)
|
static public function approve_posts($action, $post_id_list, $id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $config, $request, $phpbb_container, $phpbb_dispatcher;
|
global $template, $user, $request, $phpbb_container, $phpbb_dispatcher;
|
||||||
global $phpEx, $phpbb_root_path, $phpbb_log;
|
global $phpEx, $phpbb_root_path, $phpbb_log;
|
||||||
|
|
||||||
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
|
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
|
||||||
|
@ -631,7 +627,7 @@ class mcp_queue
|
||||||
|
|
||||||
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
||||||
$redirect = reapply_sid($redirect);
|
$redirect = reapply_sid($redirect);
|
||||||
$success_msg = $post_url = '';
|
$post_url = '';
|
||||||
$approve_log = array();
|
$approve_log = array();
|
||||||
$num_topics = 0;
|
$num_topics = 0;
|
||||||
|
|
||||||
|
@ -876,7 +872,7 @@ class mcp_queue
|
||||||
*/
|
*/
|
||||||
static public function approve_topics($action, $topic_id_list, $id, $mode)
|
static public function approve_topics($action, $topic_id_list, $id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $config, $phpbb_log;
|
global $db, $template, $user, $phpbb_log;
|
||||||
global $phpEx, $phpbb_root_path, $request, $phpbb_container, $phpbb_dispatcher;
|
global $phpEx, $phpbb_root_path, $request, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
if (!phpbb_check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
|
if (!phpbb_check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
|
||||||
|
@ -1073,7 +1069,7 @@ class mcp_queue
|
||||||
*/
|
*/
|
||||||
static public function disapprove_posts($post_id_list, $id, $mode)
|
static public function disapprove_posts($post_id_list, $id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $config, $phpbb_container, $phpbb_dispatcher;
|
global $db, $template, $user, $phpbb_container, $phpbb_dispatcher;
|
||||||
global $phpEx, $phpbb_root_path, $request, $phpbb_log;
|
global $phpEx, $phpbb_root_path, $request, $phpbb_log;
|
||||||
|
|
||||||
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
|
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
|
||||||
|
@ -1085,7 +1081,7 @@ class mcp_queue
|
||||||
$redirect = reapply_sid($redirect);
|
$redirect = reapply_sid($redirect);
|
||||||
$reason = $request->variable('reason', '', true);
|
$reason = $request->variable('reason', '', true);
|
||||||
$reason_id = $request->variable('reason_id', 0);
|
$reason_id = $request->variable('reason_id', 0);
|
||||||
$success_msg = $additional_msg = '';
|
$additional_msg = '';
|
||||||
|
|
||||||
$s_hidden_fields = build_hidden_fields(array(
|
$s_hidden_fields = build_hidden_fields(array(
|
||||||
'i' => $id,
|
'i' => $id,
|
||||||
|
@ -1143,7 +1139,7 @@ class mcp_queue
|
||||||
|
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
$disapprove_log = $disapprove_log_topics = $disapprove_log_posts = array();
|
$disapprove_log_topics = $disapprove_log_posts = array();
|
||||||
$topic_posts_unapproved = $post_disapprove_list = $topic_information = array();
|
$topic_posts_unapproved = $post_disapprove_list = $topic_information = array();
|
||||||
|
|
||||||
// Build a list of posts to be disapproved and get the related topics real replies count
|
// Build a list of posts to be disapproved and get the related topics real replies count
|
||||||
|
|
|
@ -35,7 +35,7 @@ class mcp_reports
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template, $cache, $request;
|
global $auth, $db, $user, $template, $request;
|
||||||
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container, $phpbb_dispatcher;
|
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||||
|
@ -182,7 +182,7 @@ class mcp_reports
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$topic_tracking_info = $extensions = $attachments = array();
|
$attachments = array();
|
||||||
// Get topic tracking info
|
// Get topic tracking info
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
{
|
{
|
||||||
|
@ -351,8 +351,6 @@ class mcp_reports
|
||||||
trigger_error('NOT_MODERATOR');
|
trigger_error('NOT_MODERATOR');
|
||||||
}
|
}
|
||||||
|
|
||||||
$global_id = $forum_list[0];
|
|
||||||
|
|
||||||
$sql = 'SELECT SUM(forum_topics_approved) as sum_forum_topics
|
$sql = 'SELECT SUM(forum_topics_approved) as sum_forum_topics
|
||||||
FROM ' . FORUMS_TABLE . '
|
FROM ' . FORUMS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
|
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
|
||||||
|
@ -369,7 +367,6 @@ class mcp_reports
|
||||||
trigger_error('NOT_MODERATOR');
|
trigger_error('NOT_MODERATOR');
|
||||||
}
|
}
|
||||||
|
|
||||||
$forum_info = $forum_info[$forum_id];
|
|
||||||
$forum_list = array($forum_id);
|
$forum_list = array($forum_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +388,6 @@ class mcp_reports
|
||||||
$sort_by_sql = $sort_order_sql = array();
|
$sort_by_sql = $sort_order_sql = array();
|
||||||
phpbb_mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
|
phpbb_mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
|
||||||
|
|
||||||
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
|
|
||||||
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
|
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||||
|
|
||||||
if ($mode == 'reports')
|
if ($mode == 'reports')
|
||||||
|
@ -460,7 +456,6 @@ class mcp_reports
|
||||||
ORDER BY ' . $sort_order_sql;
|
ORDER BY ' . $sort_order_sql;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$report_data = $rowset = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('postrow', array(
|
$template->assign_block_vars('postrow', array(
|
||||||
|
@ -522,7 +517,7 @@ class mcp_reports
|
||||||
*/
|
*/
|
||||||
function close_report($report_id_list, $mode, $action, $pm = false)
|
function close_report($report_id_list, $mode, $action, $pm = false)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $config, $auth, $phpbb_log, $request;
|
global $db, $user, $auth, $phpbb_log, $request;
|
||||||
global $phpEx, $phpbb_root_path, $phpbb_container;
|
global $phpEx, $phpbb_root_path, $phpbb_container;
|
||||||
|
|
||||||
$pm_where = ($pm) ? ' AND r.post_id = 0 ' : ' AND r.pm_id = 0 ';
|
$pm_where = ($pm) ? ' AND r.post_id = 0 ' : ' AND r.pm_id = 0 ';
|
||||||
|
|
|
@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||||
function mcp_topic_view($id, $mode, $action)
|
function mcp_topic_view($id, $mode, $action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config, $request;
|
global $phpEx, $phpbb_root_path, $config, $request;
|
||||||
global $template, $db, $user, $auth, $cache, $phpbb_container, $phpbb_dispatcher;
|
global $template, $db, $user, $auth, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . phpbb_extra_url());
|
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . phpbb_extra_url());
|
||||||
|
|
||||||
|
@ -156,8 +156,6 @@ function mcp_topic_view($id, $mode, $action)
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$topic_tracking_info = array();
|
|
||||||
|
|
||||||
// Get topic tracking info
|
// Get topic tracking info
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
{
|
{
|
||||||
|
@ -173,11 +171,9 @@ function mcp_topic_view($id, $mode, $action)
|
||||||
$has_unapproved_posts = $has_deleted_posts = false;
|
$has_unapproved_posts = $has_deleted_posts = false;
|
||||||
|
|
||||||
// Grab extensions
|
// Grab extensions
|
||||||
$extensions = $attachments = array();
|
$attachments = array();
|
||||||
if ($topic_info['topic_attachment'] && sizeof($post_id_list))
|
if ($topic_info['topic_attachment'] && sizeof($post_id_list))
|
||||||
{
|
{
|
||||||
$extensions = $cache->obtain_attach_extensions($topic_info['forum_id']);
|
|
||||||
|
|
||||||
// Get attachments...
|
// Get attachments...
|
||||||
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))
|
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))
|
||||||
{
|
{
|
||||||
|
@ -271,8 +267,6 @@ function mcp_topic_view($id, $mode, $action)
|
||||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||||
);
|
);
|
||||||
|
|
||||||
$current_row_number = $i;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event to modify the template data block for topic reviews in the MCP
|
* Event to modify the template data block for topic reviews in the MCP
|
||||||
*
|
*
|
||||||
|
@ -481,7 +475,6 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||||
'to_forum_id' => $to_forum_id,
|
'to_forum_id' => $to_forum_id,
|
||||||
'icon' => $request->variable('icon', 0))
|
'icon' => $request->variable('icon', 0))
|
||||||
);
|
);
|
||||||
$success_msg = $return_link = '';
|
|
||||||
|
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
@ -644,7 +637,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||||
*/
|
*/
|
||||||
function merge_posts($topic_id, $to_topic_id)
|
function merge_posts($topic_id, $to_topic_id)
|
||||||
{
|
{
|
||||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_log, $request;
|
global $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_log, $request;
|
||||||
|
|
||||||
if (!$to_topic_id)
|
if (!$to_topic_id)
|
||||||
{
|
{
|
||||||
|
@ -696,7 +689,7 @@ function merge_posts($topic_id, $to_topic_id)
|
||||||
'redirect' => $redirect,
|
'redirect' => $redirect,
|
||||||
't' => $topic_id)
|
't' => $topic_id)
|
||||||
);
|
);
|
||||||
$success_msg = $return_link = '';
|
$return_link = '';
|
||||||
|
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,8 +35,7 @@ class mcp_warn
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template, $request;
|
global $request;
|
||||||
global $config, $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
$action = $request->variable('action', array('' => ''));
|
$action = $request->variable('action', array('' => ''));
|
||||||
|
|
||||||
|
@ -78,8 +77,8 @@ class mcp_warn
|
||||||
*/
|
*/
|
||||||
function mcp_warn_front_view()
|
function mcp_warn_front_view()
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config;
|
global $phpEx, $phpbb_root_path;
|
||||||
global $template, $db, $user, $auth;
|
global $template, $db, $user;
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'),
|
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'),
|
||||||
|
@ -132,7 +131,7 @@ class mcp_warn
|
||||||
function mcp_warn_list_view($action)
|
function mcp_warn_list_view($action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config, $phpbb_container;
|
global $phpEx, $phpbb_root_path, $config, $phpbb_container;
|
||||||
global $template, $db, $user, $auth, $request;
|
global $template, $user, $auth, $request;
|
||||||
|
|
||||||
/* @var $pagination \phpbb\pagination */
|
/* @var $pagination \phpbb\pagination */
|
||||||
$pagination = $phpbb_container->get('pagination');
|
$pagination = $phpbb_container->get('pagination');
|
||||||
|
@ -191,7 +190,7 @@ class mcp_warn
|
||||||
function mcp_warn_post_view($action)
|
function mcp_warn_post_view($action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config, $request;
|
global $phpEx, $phpbb_root_path, $config, $request;
|
||||||
global $template, $db, $user, $auth, $phpbb_dispatcher;
|
global $template, $db, $user, $phpbb_dispatcher;
|
||||||
|
|
||||||
$post_id = $request->variable('p', 0);
|
$post_id = $request->variable('p', 0);
|
||||||
$forum_id = $request->variable('f', 0);
|
$forum_id = $request->variable('f', 0);
|
||||||
|
@ -370,8 +369,8 @@ class mcp_warn
|
||||||
*/
|
*/
|
||||||
function mcp_warn_user_view($action)
|
function mcp_warn_user_view($action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config, $module, $request;
|
global $phpEx, $phpbb_root_path, $config, $request;
|
||||||
global $template, $db, $user, $auth, $phpbb_dispatcher;
|
global $template, $db, $user, $phpbb_dispatcher;
|
||||||
|
|
||||||
$user_id = $request->variable('u', 0);
|
$user_id = $request->variable('u', 0);
|
||||||
$username = $request->variable('username', '', true);
|
$username = $request->variable('username', '', true);
|
||||||
|
@ -524,7 +523,7 @@ class mcp_warn
|
||||||
function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
|
function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config, $phpbb_log;
|
global $phpEx, $phpbb_root_path, $config, $phpbb_log;
|
||||||
global $template, $db, $user, $auth;
|
global $db, $user;
|
||||||
|
|
||||||
if ($send_pm)
|
if ($send_pm)
|
||||||
{
|
{
|
||||||
|
|
|
@ -798,8 +798,6 @@ class bbcode_firstpass extends bbcode
|
||||||
*/
|
*/
|
||||||
function bbcode_quote($in)
|
function bbcode_quote($in)
|
||||||
{
|
{
|
||||||
global $config, $user;
|
|
||||||
|
|
||||||
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
|
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
|
||||||
|
|
||||||
if (!$in)
|
if (!$in)
|
||||||
|
@ -1009,8 +1007,6 @@ class bbcode_firstpass extends bbcode
|
||||||
*/
|
*/
|
||||||
function validate_url($var1, $var2)
|
function validate_url($var1, $var2)
|
||||||
{
|
{
|
||||||
global $config;
|
|
||||||
|
|
||||||
$var1 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var1)));
|
$var1 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var1)));
|
||||||
$var2 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var2)));
|
$var2 = str_replace("\r\n", "\n", str_replace('\"', '"', trim($var2)));
|
||||||
|
|
||||||
|
@ -1155,7 +1151,7 @@ class parse_message extends bbcode_firstpass
|
||||||
*/
|
*/
|
||||||
function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
|
function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $phpbb_dispatcher, $phpbb_container;
|
global $config, $user, $phpbb_dispatcher, $phpbb_container;
|
||||||
|
|
||||||
$this->mode = $mode;
|
$this->mode = $mode;
|
||||||
|
|
||||||
|
@ -1770,7 +1766,7 @@ class parse_message extends bbcode_firstpass
|
||||||
*/
|
*/
|
||||||
function get_submitted_attachment_data($check_user_id = false)
|
function get_submitted_attachment_data($check_user_id = false)
|
||||||
{
|
{
|
||||||
global $user, $db, $phpbb_root_path, $phpEx, $config;
|
global $user, $db;
|
||||||
global $request;
|
global $request;
|
||||||
|
|
||||||
$this->filename_data['filecomment'] = $request->variable('filecomment', '', true);
|
$this->filename_data['filecomment'] = $request->variable('filecomment', '', true);
|
||||||
|
@ -1858,7 +1854,7 @@ class parse_message extends bbcode_firstpass
|
||||||
*/
|
*/
|
||||||
function parse_poll(&$poll)
|
function parse_poll(&$poll)
|
||||||
{
|
{
|
||||||
global $auth, $user, $config;
|
global $user, $config;
|
||||||
|
|
||||||
$poll_max_options = $poll['poll_max_options'];
|
$poll_max_options = $poll['poll_max_options'];
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||||
*/
|
*/
|
||||||
function get_data()
|
function get_data()
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $phpbb_config_php_file;
|
global $phpbb_config_php_file;
|
||||||
|
|
||||||
extract($phpbb_config_php_file->get_all());
|
extract($phpbb_config_php_file->get_all());
|
||||||
unset($dbhost, $dbport, $dbname, $dbuser, $dbpasswd); // Just a precaution
|
unset($dbhost, $dbport, $dbname, $dbuser, $dbpasswd); // Just a precaution
|
||||||
|
|
|
@ -1659,7 +1659,6 @@ class SphinxClient
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = substr ( $response, 4 ); // just ignore length, error handling, etc
|
|
||||||
$p = 0;
|
$p = 0;
|
||||||
list ( $rows, $cols ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8;
|
list ( $rows, $cols ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ucp_activate
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx, $request;
|
global $config, $phpbb_root_path, $phpEx, $request;
|
||||||
global $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
global $db, $user, $auth, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||||
|
|
||||||
$user_id = $request->variable('u', 0);
|
$user_id = $request->variable('u', 0);
|
||||||
$key = $request->variable('k', '');
|
$key = $request->variable('k', '');
|
||||||
|
|
|
@ -36,7 +36,6 @@ class ucp_attachments
|
||||||
$sort_dir = $request->variable('sd', 'a');
|
$sort_dir = $request->variable('sd', 'a');
|
||||||
|
|
||||||
$delete = (isset($_POST['delete'])) ? true : false;
|
$delete = (isset($_POST['delete'])) ? true : false;
|
||||||
$confirm = (isset($_POST['confirm'])) ? true : false;
|
|
||||||
$delete_ids = array_keys($request->variable('attachment', array(0)));
|
$delete_ids = array_keys($request->variable('attachment', array(0)));
|
||||||
|
|
||||||
if ($delete && sizeof($delete_ids))
|
if ($delete && sizeof($delete_ids))
|
||||||
|
|
|
@ -36,7 +36,7 @@ class ucp_confirm
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container, $request;
|
global $config, $phpbb_container, $request;
|
||||||
|
|
||||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||||
$captcha->init($request->variable('type', 0));
|
$captcha->init($request->variable('type', 0));
|
||||||
|
|
|
@ -38,8 +38,6 @@ class ucp_groups
|
||||||
|
|
||||||
$mark_ary = $request->variable('mark', array(0));
|
$mark_ary = $request->variable('mark', array(0));
|
||||||
$submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
|
$submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
|
||||||
$delete = $request->variable('delete', false, false, \phpbb\request\request_interface::POST);
|
|
||||||
$error = $data = array();
|
|
||||||
|
|
||||||
/** @var \phpbb\group\helper $group_helper */
|
/** @var \phpbb\group\helper $group_helper */
|
||||||
$group_helper = $phpbb_container->get('group_helper');
|
$group_helper = $phpbb_container->get('group_helper');
|
||||||
|
@ -462,11 +460,8 @@ class ucp_groups
|
||||||
trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
|
trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
|
|
||||||
$user->add_lang(array('acp/groups', 'acp/common'));
|
$user->add_lang(array('acp/groups', 'acp/common'));
|
||||||
|
|
||||||
$data = $submit_ary = array();
|
|
||||||
|
|
||||||
$update = (isset($_POST['update'])) ? true : false;
|
$update = (isset($_POST['update'])) ? true : false;
|
||||||
|
|
||||||
$error = array();
|
$error = array();
|
||||||
|
@ -535,7 +530,6 @@ class ucp_groups
|
||||||
{
|
{
|
||||||
// Handle avatar
|
// Handle avatar
|
||||||
$driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));
|
$driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));
|
||||||
$config_name = preg_replace('#^avatar\.driver.#', '', $driver_name);
|
|
||||||
|
|
||||||
if (in_array($driver_name, $avatar_drivers) && !$request->is_set_post('avatar_delete'))
|
if (in_array($driver_name, $avatar_drivers) && !$request->is_set_post('avatar_delete'))
|
||||||
{
|
{
|
||||||
|
@ -624,7 +618,6 @@ class ucp_groups
|
||||||
}
|
}
|
||||||
else if (!$group_id)
|
else if (!$group_id)
|
||||||
{
|
{
|
||||||
$group_name = $request->variable('group_name', '', true);
|
|
||||||
$group_desc_data = array(
|
$group_desc_data = array(
|
||||||
'text' => '',
|
'text' => '',
|
||||||
'allow_bbcode' => true,
|
'allow_bbcode' => true,
|
||||||
|
|
|
@ -99,7 +99,7 @@ class ucp_login_link
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Finish login
|
// Finish login
|
||||||
$result = $user->session_create($login_result['user_row']['user_id'], false, false, true);
|
$user->session_create($login_result['user_row']['user_id'], false, false, true);
|
||||||
|
|
||||||
// Perform a redirect as the account has been linked
|
// Perform a redirect as the account has been linked
|
||||||
$this->perform_redirect();
|
$this->perform_redirect();
|
||||||
|
@ -182,7 +182,7 @@ class ucp_login_link
|
||||||
*/
|
*/
|
||||||
protected function process_login_result($result)
|
protected function process_login_result($result)
|
||||||
{
|
{
|
||||||
global $config, $request, $template, $user, $phpbb_container;
|
global $config, $template, $user, $phpbb_container;
|
||||||
|
|
||||||
$login_error = null;
|
$login_error = null;
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,6 @@ class ucp_main
|
||||||
{
|
{
|
||||||
$forums = array_keys($request->variable('f', array(0 => 0)));
|
$forums = array_keys($request->variable('f', array(0 => 0)));
|
||||||
$topics = array_keys($request->variable('t', array(0 => 0)));
|
$topics = array_keys($request->variable('t', array(0 => 0)));
|
||||||
$msg = '';
|
|
||||||
|
|
||||||
if (sizeof($forums) || sizeof($topics))
|
if (sizeof($forums) || sizeof($topics))
|
||||||
{
|
{
|
||||||
|
|
|
@ -598,7 +598,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
$enable_urls = true;
|
$enable_urls = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enable_magic_url = $drafts = false;
|
$drafts = false;
|
||||||
|
|
||||||
// User own some drafts?
|
// User own some drafts?
|
||||||
if ($auth->acl_get('u_savedrafts') && $action != 'delete')
|
if ($auth->acl_get('u_savedrafts') && $action != 'delete')
|
||||||
|
@ -739,16 +739,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
|
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
|
||||||
$enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
|
$enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
|
||||||
|
|
||||||
if ($submit)
|
|
||||||
{
|
|
||||||
$status_switch = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
|
|
||||||
$status_switch = ($status_switch != $check_value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$status_switch = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse Attachments - before checksum is calculated
|
// Parse Attachments - before checksum is calculated
|
||||||
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
|
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
|
||||||
|
|
||||||
|
@ -1062,7 +1052,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now Build the address list
|
// Now Build the address list
|
||||||
$plain_address_field = '';
|
|
||||||
foreach ($address_list as $type => $adr_ary)
|
foreach ($address_list as $type => $adr_ary)
|
||||||
{
|
{
|
||||||
foreach ($adr_ary as $id => $field)
|
foreach ($adr_ary as $id => $field)
|
||||||
|
|
|
@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
|
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $user, $template, $auth, $config, $db, $request;
|
global $phpbb_root_path, $phpEx, $user, $template, $config, $db, $request;
|
||||||
|
|
||||||
$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=options");
|
$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=options");
|
||||||
|
|
||||||
|
@ -80,7 +80,6 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||||
if (check_form_key('ucp_pm_options'))
|
if (check_form_key('ucp_pm_options'))
|
||||||
{
|
{
|
||||||
$folder_name = $request->variable('foldername', '', true);
|
$folder_name = $request->variable('foldername', '', true);
|
||||||
$msg = '';
|
|
||||||
|
|
||||||
if ($folder_name)
|
if ($folder_name)
|
||||||
{
|
{
|
||||||
|
@ -611,7 +610,7 @@ function define_check_option($hardcoded, $check_option, $check_lang)
|
||||||
*/
|
*/
|
||||||
function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
||||||
{
|
{
|
||||||
global $db, $template, $user;
|
global $template;
|
||||||
|
|
||||||
$l_action = $s_action_options = '';
|
$l_action = $s_action_options = '';
|
||||||
if ($hardcoded)
|
if ($hardcoded)
|
||||||
|
@ -722,7 +721,6 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||||
|
|
||||||
// Define Condition
|
// Define Condition
|
||||||
$condition = $global_rule_conditions[$rule_option];
|
$condition = $global_rule_conditions[$rule_option];
|
||||||
$current_value = '';
|
|
||||||
|
|
||||||
switch ($condition)
|
switch ($condition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,9 +41,6 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||||
|
|
||||||
$color_rows = array('marked', 'replied');
|
$color_rows = array('marked', 'replied');
|
||||||
|
|
||||||
// only show the friend/foe color rows if the module is enabled
|
|
||||||
$zebra_enabled = false;
|
|
||||||
|
|
||||||
$_module = new p_master();
|
$_module = new p_master();
|
||||||
$_module->list_modules('ucp');
|
$_module->list_modules('ucp');
|
||||||
$_module->set_active('zebra');
|
$_module->set_active('zebra');
|
||||||
|
|
|
@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
{
|
{
|
||||||
global $user, $template, $auth, $db, $cache, $phpbb_container;
|
global $user, $template, $auth, $db, $phpbb_container;
|
||||||
global $phpbb_root_path, $request, $phpEx, $config, $phpbb_dispatcher;
|
global $phpbb_root_path, $request, $phpEx, $config, $phpbb_dispatcher;
|
||||||
|
|
||||||
$user->add_lang(array('viewtopic', 'memberlist'));
|
$user->add_lang(array('viewtopic', 'memberlist'));
|
||||||
|
@ -50,9 +50,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
|
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab icons
|
|
||||||
$icons = $cache->obtain_icons();
|
|
||||||
|
|
||||||
// Load the custom profile fields
|
// Load the custom profile fields
|
||||||
if ($config['load_cpf_pm'])
|
if ($config['load_cpf_pm'])
|
||||||
{
|
{
|
||||||
|
@ -357,7 +354,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
*/
|
*/
|
||||||
function get_user_information($user_id, $user_row)
|
function get_user_information($user_id, $user_row)
|
||||||
{
|
{
|
||||||
global $db, $auth, $user, $cache;
|
global $db, $auth, $user;
|
||||||
global $phpbb_root_path, $phpEx, $config;
|
global $phpbb_root_path, $phpEx, $config;
|
||||||
|
|
||||||
if (!$user_id)
|
if (!$user_id)
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ucp_prefs
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $request;
|
global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $request;
|
||||||
|
|
||||||
$submit = (isset($_POST['submit'])) ? true : false;
|
$submit = (isset($_POST['submit'])) ? true : false;
|
||||||
$error = $data = array();
|
$error = $data = array();
|
||||||
|
|
|
@ -31,13 +31,12 @@ class ucp_profile
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $cache, $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
||||||
global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||||
|
|
||||||
$user->add_lang('posting');
|
$user->add_lang('posting');
|
||||||
|
|
||||||
$submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
|
$submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
|
||||||
$delete = $request->variable('delete', false, false, \phpbb\request\request_interface::POST);
|
|
||||||
$error = $data = array();
|
$error = $data = array();
|
||||||
$s_hidden_fields = '';
|
$s_hidden_fields = '';
|
||||||
|
|
||||||
|
@ -430,7 +429,6 @@ class ucp_profile
|
||||||
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
|
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
|
||||||
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
|
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
|
||||||
}
|
}
|
||||||
$s_birthday_year_options = '';
|
|
||||||
|
|
||||||
$now = getdate();
|
$now = getdate();
|
||||||
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
|
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ucp_register
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
global $config, $db, $user, $template, $phpbb_root_path, $phpEx;
|
||||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -484,7 +484,6 @@ class ucp_register
|
||||||
$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
|
$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
|
||||||
}
|
}
|
||||||
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
||||||
$confirm_image = '';
|
|
||||||
|
|
||||||
// Visual Confirmation - Show images
|
// Visual Confirmation - Show images
|
||||||
if ($config['enable_confirm'])
|
if ($config['enable_confirm'])
|
||||||
|
@ -507,7 +506,9 @@ class ucp_register
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$timezone_selects = phpbb_timezone_select($template, $user, $data['tz'], true);
|
// Assign template vars for timezone select
|
||||||
|
phpbb_timezone_select($template, $user, $data['tz'], true);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||||
'USERNAME' => $data['username'],
|
'USERNAME' => $data['username'],
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ucp_remind
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx, $request;
|
global $config, $phpbb_root_path, $phpEx, $request;
|
||||||
global $db, $user, $auth, $template, $phpbb_container;
|
global $db, $user, $template, $phpbb_container;
|
||||||
|
|
||||||
if (!$config['allow_password_reset'])
|
if (!$config['allow_password_reset'])
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,7 @@ class ucp_zebra
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;
|
global $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;
|
||||||
|
|
||||||
$submit = (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;
|
$submit = (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;
|
||||||
$s_hidden_fields = '';
|
$s_hidden_fields = '';
|
||||||
|
|
|
@ -1153,7 +1153,6 @@ function utf8_case_fold_nfkc($text, $option = 'full')
|
||||||
"\xF0\x9D\x9E\xBB" => "\xCF\x83",
|
"\xF0\x9D\x9E\xBB" => "\xCF\x83",
|
||||||
"\xF0\x9D\x9F\x8A" => "\xCF\x9D",
|
"\xF0\x9D\x9F\x8A" => "\xCF\x9D",
|
||||||
);
|
);
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
// do the case fold
|
// do the case fold
|
||||||
$text = utf8_case_fold($text, $option);
|
$text = utf8_case_fold($text, $option);
|
||||||
|
@ -1244,7 +1243,6 @@ function utf8_case_fold_nfc($text, $option = 'full')
|
||||||
"\xE1\xBF\xB7" => "\xE1\xBF\xB6\xCD\x85",
|
"\xE1\xBF\xB7" => "\xE1\xBF\xB6\xCD\x85",
|
||||||
"\xE1\xBF\xBC" => "\xCE\xA9\xCD\x85",
|
"\xE1\xBF\xBC" => "\xCE\xA9\xCD\x85",
|
||||||
);
|
);
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
// perform a small trick, avoid further normalization on composed points that contain U+0345 in their decomposition
|
// perform a small trick, avoid further normalization on composed points that contain U+0345 in their decomposition
|
||||||
$text = strtr($text, $ypogegrammeni);
|
$text = strtr($text, $ypogegrammeni);
|
||||||
|
|
|
@ -54,7 +54,7 @@ function phpbb_forum_flags()
|
||||||
*/
|
*/
|
||||||
function phpbb_insert_forums()
|
function phpbb_insert_forums()
|
||||||
{
|
{
|
||||||
global $db, $src_db, $same_db, $convert, $user, $config;
|
global $db, $src_db, $same_db, $convert, $user;
|
||||||
|
|
||||||
$db->sql_query($convert->truncate_statement . FORUMS_TABLE);
|
$db->sql_query($convert->truncate_statement . FORUMS_TABLE);
|
||||||
|
|
||||||
|
@ -179,7 +179,6 @@ function phpbb_insert_forums()
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
$cats_added[$unknown_cat_id] = $max_forum_id;
|
$cats_added[$unknown_cat_id] = $max_forum_id;
|
||||||
$max_forum_id++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now insert the forums
|
// Now insert the forums
|
||||||
|
@ -422,8 +421,6 @@ function phpbb_set_encoding($text, $grab_user_lang = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$encoding = $lang_enc_array[$get_lang];
|
|
||||||
|
|
||||||
return utf8_recode($text, $lang_enc_array[$get_lang]);
|
return utf8_recode($text, $lang_enc_array[$get_lang]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,7 +561,7 @@ function phpbb_copy_table_fields()
|
||||||
*/
|
*/
|
||||||
function phpbb_convert_authentication($mode)
|
function phpbb_convert_authentication($mode)
|
||||||
{
|
{
|
||||||
global $db, $src_db, $same_db, $convert, $user, $config, $cache;
|
global $db, $src_db, $same_db, $convert, $config;
|
||||||
|
|
||||||
if ($mode == 'start')
|
if ($mode == 'start')
|
||||||
{
|
{
|
||||||
|
@ -1221,7 +1218,7 @@ function phpbb_replace_size($matches)
|
||||||
*/
|
*/
|
||||||
function phpbb_prepare_message($message)
|
function phpbb_prepare_message($message)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $db, $convert, $user, $config, $cache, $convert_row, $message_parser;
|
global $convert, $user, $convert_row, $message_parser;
|
||||||
|
|
||||||
if (!$message)
|
if (!$message)
|
||||||
{
|
{
|
||||||
|
@ -1251,9 +1248,6 @@ function phpbb_prepare_message($message)
|
||||||
$message = str_replace('\"', '"', $message);
|
$message = str_replace('\"', '"', $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Already the new user id ;)
|
|
||||||
$user_id = $convert->row['poster_id'];
|
|
||||||
|
|
||||||
$message = str_replace('<br />', "\n", $message);
|
$message = str_replace('<br />', "\n", $message);
|
||||||
$message = str_replace('<', '<', $message);
|
$message = str_replace('<', '<', $message);
|
||||||
$message = str_replace('>', '>', $message);
|
$message = str_replace('>', '>', $message);
|
||||||
|
@ -1305,7 +1299,7 @@ function get_bbcode_bitfield()
|
||||||
*/
|
*/
|
||||||
function phpbb_post_edit_user()
|
function phpbb_post_edit_user()
|
||||||
{
|
{
|
||||||
global $convert_row, $config;
|
global $convert_row;
|
||||||
|
|
||||||
if (isset($convert_row['post_edit_count']))
|
if (isset($convert_row['post_edit_count']))
|
||||||
{
|
{
|
||||||
|
@ -1326,7 +1320,7 @@ function phpbb_get_files_dir()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
global $src_db, $same_db, $convert, $user, $config, $cache;
|
global $src_db, $same_db, $convert, $user;
|
||||||
|
|
||||||
if ($convert->mysql_convert && $same_db)
|
if ($convert->mysql_convert && $same_db)
|
||||||
{
|
{
|
||||||
|
@ -1365,7 +1359,7 @@ function phpbb_get_files_dir()
|
||||||
*/
|
*/
|
||||||
function phpbb_copy_thumbnails()
|
function phpbb_copy_thumbnails()
|
||||||
{
|
{
|
||||||
global $db, $convert, $user, $config, $cache, $phpbb_root_path;
|
global $convert, $config, $phpbb_root_path;
|
||||||
|
|
||||||
$src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
|
$src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
|
||||||
|
|
||||||
|
@ -1611,8 +1605,6 @@ function phpbb_get_avatar_width($user_avatar)
|
||||||
*/
|
*/
|
||||||
function phpbb_privmsgs_to_userid($to_userid)
|
function phpbb_privmsgs_to_userid($to_userid)
|
||||||
{
|
{
|
||||||
global $config;
|
|
||||||
|
|
||||||
return 'u_' . phpbb_user_id($to_userid);
|
return 'u_' . phpbb_user_id($to_userid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1659,7 +1651,7 @@ function phpbb_get_savebox_id($user_id)
|
||||||
*/
|
*/
|
||||||
function phpbb_import_attach_config()
|
function phpbb_import_attach_config()
|
||||||
{
|
{
|
||||||
global $db, $src_db, $same_db, $convert, $config;
|
global $src_db, $same_db, $convert, $config;
|
||||||
|
|
||||||
if ($convert->mysql_convert && $same_db)
|
if ($convert->mysql_convert && $same_db)
|
||||||
{
|
{
|
||||||
|
@ -1765,9 +1757,8 @@ function phpbb_disallowed_username($username)
|
||||||
*/
|
*/
|
||||||
function phpbb_create_userconv_table()
|
function phpbb_create_userconv_table()
|
||||||
{
|
{
|
||||||
global $db, $src_db, $convert, $table_prefix, $user, $lang;
|
global $db;
|
||||||
|
|
||||||
$map_dbms = '';
|
|
||||||
switch ($db->get_sql_layer())
|
switch ($db->get_sql_layer())
|
||||||
{
|
{
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
|
@ -1856,7 +1847,7 @@ function phpbb_create_userconv_table()
|
||||||
|
|
||||||
function phpbb_check_username_collisions()
|
function phpbb_check_username_collisions()
|
||||||
{
|
{
|
||||||
global $db, $src_db, $convert, $table_prefix, $user, $lang;
|
global $db, $src_db, $convert, $user, $lang;
|
||||||
|
|
||||||
// now find the clean version of the usernames that collide
|
// now find the clean version of the usernames that collide
|
||||||
$sql = 'SELECT username_clean
|
$sql = 'SELECT username_clean
|
||||||
|
@ -1969,7 +1960,7 @@ function phpbb_add_notification_options($user_notify_pm)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = $db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows);
|
$db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
function phpbb_convert_password_hash($hash)
|
function phpbb_convert_password_hash($hash)
|
||||||
|
|
|
@ -628,7 +628,6 @@ function utf8_new_case_fold_nfkc($text, $option = 'full')
|
||||||
"\xF0\x9D\x9E\xBB" => "\xCF\x83",
|
"\xF0\x9D\x9E\xBB" => "\xCF\x83",
|
||||||
"\xF0\x9D\x9F\x8A" => "\xCF\x9D",
|
"\xF0\x9D\x9F\x8A" => "\xCF\x9D",
|
||||||
);
|
);
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
// do the case fold
|
// do the case fold
|
||||||
$text = utf8_new_case_fold($text, $option);
|
$text = utf8_new_case_fold($text, $option);
|
||||||
|
|
|
@ -97,13 +97,12 @@ class gd
|
||||||
|
|
||||||
if ($config['captcha_gd_3d_noise'])
|
if ($config['captcha_gd_3d_noise'])
|
||||||
{
|
{
|
||||||
$xoffset = mt_rand(0,9);
|
|
||||||
$noise_bitmaps = $this->captcha_noise_bg_bitmaps();
|
$noise_bitmaps = $this->captcha_noise_bg_bitmaps();
|
||||||
for ($i = 0; $i < $code_len; ++$i)
|
for ($i = 0; $i < $code_len; ++$i)
|
||||||
{
|
{
|
||||||
$noise[$i] = new char_cube3d($noise_bitmaps, mt_rand(1, sizeof($noise_bitmaps['data'])));
|
$noise[$i] = new char_cube3d($noise_bitmaps, mt_rand(1, sizeof($noise_bitmaps['data'])));
|
||||||
|
|
||||||
list($min, $max) = $noise[$i]->range();
|
$noise[$i]->range();
|
||||||
//$box = $noise[$i]->dimensions($sizes[$i]);
|
//$box = $noise[$i]->dimensions($sizes[$i]);
|
||||||
}
|
}
|
||||||
$xoffset = 0;
|
$xoffset = 0;
|
||||||
|
@ -151,8 +150,6 @@ class gd
|
||||||
*/
|
*/
|
||||||
function wave($img)
|
function wave($img)
|
||||||
{
|
{
|
||||||
global $config;
|
|
||||||
|
|
||||||
$period_x = mt_rand(12,18);
|
$period_x = mt_rand(12,18);
|
||||||
$period_y = mt_rand(7,14);
|
$period_y = mt_rand(7,14);
|
||||||
$amp_x = mt_rand(5,10);
|
$amp_x = mt_rand(5,10);
|
||||||
|
|
|
@ -23,8 +23,6 @@ class gd_wave
|
||||||
|
|
||||||
function execute($code, $seed)
|
function execute($code, $seed)
|
||||||
{
|
{
|
||||||
global $starttime;
|
|
||||||
|
|
||||||
// seed the random generator
|
// seed the random generator
|
||||||
mt_srand($seed);
|
mt_srand($seed);
|
||||||
|
|
||||||
|
@ -77,7 +75,6 @@ class gd_wave
|
||||||
// TODO
|
// TODO
|
||||||
$background = imagecolorallocate($img, mt_rand(155, 255), mt_rand(155, 255), mt_rand(155, 255));
|
$background = imagecolorallocate($img, mt_rand(155, 255), mt_rand(155, 255), mt_rand(155, 255));
|
||||||
imagefill($img, 0, 0, $background);
|
imagefill($img, 0, 0, $background);
|
||||||
$black = imagecolorallocate($img, 0, 0, 0);
|
|
||||||
|
|
||||||
$random = array();
|
$random = array();
|
||||||
$fontcolors = array();
|
$fontcolors = array();
|
||||||
|
@ -155,7 +152,7 @@ class gd_wave
|
||||||
// rather than recalculating from absolute coordinates
|
// rather than recalculating from absolute coordinates
|
||||||
// What we cache into the $img_buffer contains the raised text coordinates.
|
// What we cache into the $img_buffer contains the raised text coordinates.
|
||||||
$img_pos_prev = $img_buffer[0][0] = array($box['upper_left']['x'], $box['upper_left']['y']);
|
$img_pos_prev = $img_buffer[0][0] = array($box['upper_left']['x'], $box['upper_left']['y']);
|
||||||
$cur_height = $prev_height = $this->wave_height(0, 0, $subdivision_factor);
|
$prev_height = $this->wave_height(0, 0, $subdivision_factor);
|
||||||
$full_x = $plane_x * $subdivision_factor;
|
$full_x = $plane_x * $subdivision_factor;
|
||||||
$full_y = $plane_y * $subdivision_factor;
|
$full_y = $plane_y * $subdivision_factor;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ abstract class captcha_abstract
|
||||||
|
|
||||||
function init($type)
|
function init($type)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $request;
|
global $config, $request;
|
||||||
|
|
||||||
// read input
|
// read input
|
||||||
$this->confirm_id = $request->variable('confirm_id', '');
|
$this->confirm_id = $request->variable('confirm_id', '');
|
||||||
|
@ -56,8 +56,6 @@ abstract class captcha_abstract
|
||||||
|
|
||||||
function execute_demo()
|
function execute_demo()
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$this->code = gen_rand_string_friendly(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS));
|
$this->code = gen_rand_string_friendly(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS));
|
||||||
$this->seed = hexdec(substr(unique_id(), 4, 10));
|
$this->seed = hexdec(substr(unique_id(), 4, 10));
|
||||||
|
|
||||||
|
@ -117,7 +115,7 @@ abstract class captcha_abstract
|
||||||
|
|
||||||
function get_demo_template($id)
|
function get_demo_template($id)
|
||||||
{
|
{
|
||||||
global $config, $user, $template, $request, $phpbb_admin_path, $phpEx;
|
global $config, $template, $request, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
$variables = '';
|
$variables = '';
|
||||||
|
|
||||||
|
@ -153,7 +151,7 @@ abstract class captcha_abstract
|
||||||
|
|
||||||
function garbage_collect($type)
|
function garbage_collect($type)
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db;
|
||||||
|
|
||||||
$sql = 'SELECT DISTINCT c.session_id
|
$sql = 'SELECT DISTINCT c.session_id
|
||||||
FROM ' . CONFIRM_TABLE . ' c
|
FROM ' . CONFIRM_TABLE . ' c
|
||||||
|
@ -193,7 +191,7 @@ abstract class captcha_abstract
|
||||||
|
|
||||||
function validate()
|
function validate()
|
||||||
{
|
{
|
||||||
global $config, $db, $user;
|
global $user;
|
||||||
|
|
||||||
if (!$user->is_setup())
|
if (!$user->is_setup())
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,18 +53,11 @@ class gd extends captcha_abstract
|
||||||
|
|
||||||
function acp_page($id, &$module)
|
function acp_page($id, &$module)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $phpbb_log, $request;
|
global $user, $template, $phpbb_log, $request;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config;
|
||||||
|
|
||||||
$user->add_lang('acp/board');
|
$user->add_lang('acp/board');
|
||||||
|
|
||||||
$config_vars = array(
|
|
||||||
'enable_confirm' => 'REG_ENABLE',
|
|
||||||
'enable_post_confirm' => 'POST_ENABLE',
|
|
||||||
'confirm_refresh' => 'CONFIRM_REFRESH',
|
|
||||||
'captcha_gd' => 'CAPTCHA_GD',
|
|
||||||
);
|
|
||||||
|
|
||||||
$module->tpl_name = 'captcha_gd_acp';
|
$module->tpl_name = 'captcha_gd_acp';
|
||||||
$module->page_title = 'ACP_VC_SETTINGS';
|
$module->page_title = 'ACP_VC_SETTINGS';
|
||||||
$form_key = 'acp_captcha';
|
$form_key = 'acp_captcha';
|
||||||
|
|
|
@ -35,7 +35,7 @@ class gd_wave extends captcha_abstract
|
||||||
|
|
||||||
function acp_page($id, &$module)
|
function acp_page($id, &$module)
|
||||||
{
|
{
|
||||||
global $config, $db, $template, $user;
|
global $user;
|
||||||
|
|
||||||
trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
|
trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1012,7 +1012,7 @@ abstract class driver implements driver_interface
|
||||||
*/
|
*/
|
||||||
function sql_report($mode, $query = '')
|
function sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper, $user;
|
global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper;
|
||||||
global $request;
|
global $request;
|
||||||
|
|
||||||
if (is_object($request) && !$request->variable('explain', false))
|
if (is_object($request) && !$request->variable('explain', false))
|
||||||
|
|
|
@ -84,8 +84,6 @@ class oracle extends \phpbb\db\driver\driver
|
||||||
* but I assume its because the Oracle extension provides a direct method to access it
|
* but I assume its because the Oracle extension provides a direct method to access it
|
||||||
* without a query.
|
* without a query.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$use_cache = false;
|
|
||||||
/*
|
/*
|
||||||
global $cache;
|
global $cache;
|
||||||
|
|
||||||
|
|
|
@ -192,8 +192,6 @@ class oracle_extractor extends base_extractor
|
||||||
$ary_name[$i] = ocicolumnname($result, $i + 1);
|
$ary_name[$i] = ocicolumnname($result, $i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_data = '';
|
|
||||||
|
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$schema_vals = $schema_fields = array();
|
$schema_vals = $schema_fields = array();
|
||||||
|
|
|
@ -118,7 +118,7 @@ class release_3_0_5_rc1 extends container_aware_migration
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
|
|
||||||
// Skip first row, this is our original auth option we want to preserve
|
// Skip first row, this is our original auth option we want to preserve
|
||||||
$row = $this->db->sql_fetchrow($result);
|
$this->db->sql_fetchrow($result);
|
||||||
|
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,6 @@ class update_custom_bbcodes_with_idn extends \phpbb\db\migration\migration
|
||||||
$sql_ary = array();
|
$sql_ary = array();
|
||||||
while ($row = $this->db->sql_fetchrow($result))
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$data = array();
|
|
||||||
if (preg_match('/(URL|LOCAL_URL|RELATIVE_URL)/', $row['bbcode_match']))
|
if (preg_match('/(URL|LOCAL_URL|RELATIVE_URL)/', $row['bbcode_match']))
|
||||||
{
|
{
|
||||||
$data = $bbcodes->build_regexp($row['bbcode_match'], $row['bbcode_tpl']);
|
$data = $bbcodes->build_regexp($row['bbcode_match'], $row['bbcode_tpl']);
|
||||||
|
|
|
@ -535,7 +535,7 @@ class migrator
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reverse the step that was run
|
// Reverse the step that was run
|
||||||
$result = $this->run_step($reverse_step, false, !$revert);
|
$this->run_step($reverse_step, false, !$revert);
|
||||||
}
|
}
|
||||||
|
|
||||||
// rethrow the exception
|
// rethrow the exception
|
||||||
|
|
|
@ -1116,7 +1116,7 @@ class tools implements tools_interface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get type
|
// Get type
|
||||||
list($column_type, $orig_column_type) = $this->get_column_type($column_data[0]);
|
list($column_type) = $this->get_column_type($column_data[0]);
|
||||||
|
|
||||||
// Adjust default value if db-dependent specified
|
// Adjust default value if db-dependent specified
|
||||||
if (is_array($column_data[1]))
|
if (is_array($column_data[1]))
|
||||||
|
|
|
@ -97,7 +97,6 @@ class remote extends base
|
||||||
|
|
||||||
$url['path'] = implode('', $url['path']);
|
$url['path'] = implode('', $url['path']);
|
||||||
$upload_ary['name'] = utf8_basename($url['path']) . (($ext) ? '.' . $ext : '');
|
$upload_ary['name'] = utf8_basename($url['path']) . (($ext) ? '.' . $ext : '');
|
||||||
$filename = $url['path'];
|
|
||||||
$filesize = 0;
|
$filesize = 0;
|
||||||
|
|
||||||
$remote_max_filesize = $this->get_max_file_size();
|
$remote_max_filesize = $this->get_max_file_size();
|
||||||
|
|
|
@ -117,7 +117,7 @@ class validate extends \phpbb\console\command\command
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$config = $processor->processConfiguration($configuration, $config);
|
$processor->processConfiguration($configuration, $config);
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,6 @@ use phpbb\install\helper\navigation\navigation_provider;
|
||||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use phpbb\install\helper\iohandler\factory;
|
use phpbb\install\helper\iohandler\factory;
|
||||||
use phpbb\install\controller\helper;
|
|
||||||
use phpbb\template\template;
|
use phpbb\template\template;
|
||||||
use phpbb\request\request_interface;
|
use phpbb\request\request_interface;
|
||||||
use phpbb\install\installer;
|
use phpbb\install\installer;
|
||||||
|
|
|
@ -420,7 +420,7 @@ class log implements \phpbb\log\log_interface
|
||||||
$this->entry_count = 0;
|
$this->entry_count = 0;
|
||||||
$this->last_page_offset = $offset;
|
$this->last_page_offset = $offset;
|
||||||
|
|
||||||
$post_id_list = $topic_id_list = $reportee_id_list = array();
|
$topic_id_list = $reportee_id_list = array();
|
||||||
|
|
||||||
$profile_url = ($this->get_is_admin() && $this->phpbb_admin_path) ? append_sid("{$this->phpbb_admin_path}index.{$this->php_ext}", 'i=users&mode=overview') : append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=viewprofile');
|
$profile_url = ($this->get_is_admin() && $this->phpbb_admin_path) ? append_sid("{$this->phpbb_admin_path}index.{$this->php_ext}", 'i=users&mode=overview') : append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=viewprofile');
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ class report_handler_post extends report_handler
|
||||||
'reported_post_enable_magic_url' => $this->report_data['enable_magic_url'],
|
'reported_post_enable_magic_url' => $this->report_data['enable_magic_url'],
|
||||||
);
|
);
|
||||||
|
|
||||||
$report_id = $this->create_report($report_data);
|
$this->create_report($report_data);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||||
SET post_reported = 1
|
SET post_reported = 1
|
||||||
|
|
|
@ -172,7 +172,6 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
|
||||||
}
|
}
|
||||||
|
|
||||||
list($default_key, $default_value) = each($default);
|
list($default_key, $default_value) = each($default);
|
||||||
$value_type = gettype($default_value);
|
|
||||||
$key_type = gettype($default_key);
|
$key_type = gettype($default_key);
|
||||||
|
|
||||||
$_var = $var;
|
$_var = $var;
|
||||||
|
|
|
@ -352,9 +352,6 @@ class fulltext_native extends \phpbb\search\base
|
||||||
$this->must_not_contain_ids = array();
|
$this->must_not_contain_ids = array();
|
||||||
$this->must_exclude_one_ids = array();
|
$this->must_exclude_one_ids = array();
|
||||||
|
|
||||||
$mode = '';
|
|
||||||
$ignore_no_id = true;
|
|
||||||
|
|
||||||
foreach ($query as $word)
|
foreach ($query as $word)
|
||||||
{
|
{
|
||||||
if (empty($word))
|
if (empty($word))
|
||||||
|
@ -597,7 +594,6 @@ class fulltext_native extends \phpbb\search\base
|
||||||
$id_ary = array();
|
$id_ary = array();
|
||||||
|
|
||||||
$sql_where = array();
|
$sql_where = array();
|
||||||
$group_by = false;
|
|
||||||
$m_num = 0;
|
$m_num = 0;
|
||||||
$w_num = 0;
|
$w_num = 0;
|
||||||
|
|
||||||
|
@ -1328,7 +1324,6 @@ class fulltext_native extends \phpbb\search\base
|
||||||
$match[] = '#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?[0-9a-z]{5,})\]#';
|
$match[] = '#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?[0-9a-z]{5,})\]#';
|
||||||
|
|
||||||
$min = $this->word_length['min'];
|
$min = $this->word_length['min'];
|
||||||
$max = $this->word_length['max'];
|
|
||||||
|
|
||||||
$isset_min = $min - 1;
|
$isset_min = $min - 1;
|
||||||
|
|
||||||
|
@ -1737,7 +1732,7 @@ class fulltext_native extends \phpbb\search\base
|
||||||
protected function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
|
protected function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
|
||||||
{
|
{
|
||||||
static $conv = array(), $conv_loaded = array();
|
static $conv = array(), $conv_loaded = array();
|
||||||
$words = $allow = array();
|
$allow = array();
|
||||||
|
|
||||||
// Convert the text to UTF-8
|
// Convert the text to UTF-8
|
||||||
$encoding = strtolower($encoding);
|
$encoding = strtolower($encoding);
|
||||||
|
|
|
@ -501,7 +501,6 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id';
|
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id';
|
||||||
$sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
|
$sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
|
||||||
$field = ($type == 'posts') ? 'post_id' : 'topic_id';
|
$field = ($type == 'posts') ? 'post_id' : 'topic_id';
|
||||||
$sql_author = (sizeof($author_ary) == 1) ? ' = ' . $author_ary[0] : 'IN (' . implode(', ', $author_ary) . ')';
|
|
||||||
|
|
||||||
if (sizeof($author_ary) && $author_name)
|
if (sizeof($author_ary) && $author_name)
|
||||||
{
|
{
|
||||||
|
@ -526,7 +525,6 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
$sql_where_options .= ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
$sql_where_options .= ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||||
$sql_where_options .= $sql_match_where;
|
$sql_where_options .= $sql_match_where;
|
||||||
|
|
||||||
$tmp_sql_match = array();
|
|
||||||
$sql_match = str_replace(',', " || ' ' ||", $sql_match);
|
$sql_match = str_replace(',', " || ' ' ||", $sql_match);
|
||||||
$tmp_sql_match = "to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', " . $sql_match . ") @@ to_tsquery ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', '" . $this->db->sql_escape($this->tsearch_query) . "')";
|
$tmp_sql_match = "to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', " . $sql_match . ") @@ to_tsquery ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', '" . $this->db->sql_escape($this->tsearch_query) . "')";
|
||||||
|
|
||||||
|
@ -838,7 +836,7 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
GROUP BY t.topic_id, $sort_by_sql[$sort_key]";
|
GROUP BY t.topic_id, $sort_by_sql[$sort_key]";
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->db->sql_query($sql_count);
|
$this->db->sql_query($sql_count);
|
||||||
$result_count = (int) $this->db->sql_fetchfield('result_count');
|
$result_count = (int) $this->db->sql_fetchfield('result_count');
|
||||||
|
|
||||||
if (!$result_count)
|
if (!$result_count)
|
||||||
|
|
|
@ -404,7 +404,7 @@ class fulltext_sphinx
|
||||||
$variable = $section->get_variable_by_name($key);
|
$variable = $section->get_variable_by_name($key);
|
||||||
if (!$variable)
|
if (!$variable)
|
||||||
{
|
{
|
||||||
$variable = $section->create_variable($key, $value);
|
$section->create_variable($key, $value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -413,7 +413,7 @@ class fulltext_sphinx
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$variable = $section->create_variable($key, $value);
|
$section->create_variable($key, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,6 @@ class fulltext_sphinx
|
||||||
$match = array('#\sand\s#i', '#\sor\s#i', '#\snot\s#i', '#\+#', '#-#', '#\|#', '#@#');
|
$match = array('#\sand\s#i', '#\sor\s#i', '#\snot\s#i', '#\+#', '#-#', '#\|#', '#@#');
|
||||||
$replace = array(' & ', ' | ', ' - ', ' +', ' -', ' |', '');
|
$replace = array(' & ', ' | ', ' - ', ' +', ' -', ' |', '');
|
||||||
|
|
||||||
$replacements = 0;
|
|
||||||
$keywords = preg_replace($match, $replace, $keywords);
|
$keywords = preg_replace($match, $replace, $keywords);
|
||||||
$this->sphinx->SetMatchMode(SPH_MATCH_EXTENDED);
|
$this->sphinx->SetMatchMode(SPH_MATCH_EXTENDED);
|
||||||
}
|
}
|
||||||
|
@ -490,8 +489,6 @@ class fulltext_sphinx
|
||||||
|
|
||||||
$id_ary = array();
|
$id_ary = array();
|
||||||
|
|
||||||
$join_topic = ($type != 'posts');
|
|
||||||
|
|
||||||
// Sorting
|
// Sorting
|
||||||
|
|
||||||
if ($type == 'topics')
|
if ($type == 'topics')
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue