1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 02:36:38 +02:00

[ticket/16790] Remove unused code

PHPBB3-16790
This commit is contained in:
rubencm
2021-06-05 01:42:01 +02:00
committed by Ruben Calvo
parent 072d62b0c0
commit 2f41ce219c
22 changed files with 51 additions and 197 deletions

View File

@@ -199,7 +199,7 @@ class ucp_login_link
*/
protected function process_login_result($result)
{
global $config, $template, $user, $phpbb_container;
global $config, $template, $user, $phpbb_container, $phpbb_root_path, $phpEx;
$login_error = null;

View File

@@ -658,6 +658,7 @@ class ucp_main
WHERE ' . $db->sql_in_set('topic_id', array_unique($topic_ids));
$result = $db->sql_query($sql);
$topic_rows = [];
while ($row = $db->sql_fetchrow($result))
{
$topic_rows[$row['topic_id']] = $row;
@@ -882,7 +883,7 @@ class ucp_main
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
$topic_list = $topic_forum_list = $global_announce_list = $rowset = array();
$topic_list = $topic_forum_list = $rowset = array();
while ($row = $db->sql_fetchrow($result))
{
$topic_id = (isset($row['b_topic_id'])) ? $row['b_topic_id'] : $row['topic_id'];
@@ -892,11 +893,6 @@ class ucp_main
$topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0;
$topic_forum_list[$row['forum_id']]['topics'][] = $topic_id;
if ($row['topic_type'] == POST_GLOBAL)
{
$global_announce_list[] = $topic_id;
}
}
$db->sql_freeresult($result);

View File

@@ -45,7 +45,7 @@ class ucp_pm
function main($id, $mode)
{
global $user, $template, $phpbb_root_path, $auth, $phpEx, $db, $config, $request;
global $user, $template, $phpbb_root_path, $auth, $phpEx, $db, $config, $request, $global_privmsgs_rules, $global_rule_conditions;
if (!$user->data['is_registered'])
{

View File

@@ -1030,7 +1030,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
parse_attachments(false, $preview_message, $attachment_data, $update_count, true);
foreach ($attachment_data as $i => $attachment)
foreach ($attachment_data as $attachment)
{
$template->assign_block_vars('attachment', array(
'DISPLAY_ATTACHMENT' => $attachment)

View File

@@ -37,7 +37,7 @@ class ucp_profile
$user->add_lang('posting');
$submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
$error = $data = array();
$error = array();
$s_hidden_fields = '';
switch ($mode)

View File

@@ -106,7 +106,7 @@ class ucp_register
/* @var $cp \phpbb\profilefields\manager */
$cp = $phpbb_container->get('profilefields.manager');
$error = $cp_data = $cp_error = array();
$error = $cp_data = array();
$s_hidden_fields = array();
// Handle login_link data added to $_hidden_fields