Skip to content

Commit 73900d1

Browse files
committed
[ticket/13454] Remove more unused variables
This should be the last part. Off to checking if the changes were correct. PHPBB3-13454
1 parent 3b9a9bb commit 73900d1

16 files changed

Lines changed: 17 additions & 27 deletions

phpBB/includes/acp/acp_forums.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ function move_forum($from_id, $to_id)
13811381
{
13821382
global $db, $user, $phpbb_dispatcher;
13831383

1384-
$to_data = $moved_ids = $errors = array();
1384+
$errors = array();
13851385

13861386
// Check if we want to move to a parent with link type
13871387
if ($to_id > 0)

phpBB/includes/acp/acp_users.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,6 @@ function main($id, $mode)
15361536
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
15371537
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
15381538
}
1539-
$s_birthday_year_options = '';
15401539

15411540
$now = getdate();
15421541
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';

phpBB/includes/functions.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,8 +1318,6 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
13181318
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
13191319
{
13201320
// Get information from cookie
1321-
$row = false;
1322-
13231321
if (!isset($tracking_topics['tf'][$forum_id]))
13241322
{
13251323
// We do not need to mark read, this happened before. Therefore setting this to true

phpBB/includes/functions_content.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,8 +1312,6 @@ function extension_allowed($forum_id, $extension, &$extensions)
13121312
*/
13131313
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')
13141314
{
1315-
$chars = array();
1316-
13171315
$strip_reply = false;
13181316
$stripped = false;
13191317
if ($allow_reply && strpos($string, 'Re: ') === 0)

phpBB/includes/functions_convert.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ function restore_config($schema)
13201320
*/
13211321
function update_folder_pm_count()
13221322
{
1323-
global $db, $convert, $user;
1323+
global $db;
13241324

13251325
$sql = 'SELECT user_id, folder_id, COUNT(msg_id) as num_messages
13261326
FROM ' . PRIVMSGS_TO_TABLE . '
@@ -1379,7 +1379,7 @@ function extract_variables_from_file($_filename)
13791379

13801380
function get_path($src_path, $src_url, $test_file)
13811381
{
1382-
global $config, $phpbb_root_path, $phpEx;
1382+
global $phpbb_root_path, $phpEx;
13831383

13841384
$board_config = get_config();
13851385

@@ -1490,7 +1490,7 @@ function compare_table($tables, $tablename, &$prefixes)
14901490
*/
14911491
function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
14921492
{
1493-
global $db, $convert, $user, $config;
1493+
global $db;
14941494
static $acl_option_ids, $group_ids;
14951495

14961496
if (($ug_type == 'group' || $ug_type == 'group_role') && is_string($ug_id))

phpBB/includes/functions_display.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ function display_user_activity(&$userdata_ary)
12921292
*/
12931293
function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0, $item_title = '')
12941294
{
1295-
global $template, $db, $user, $phpEx, $start, $phpbb_root_path;
1295+
global $db, $user, $phpEx, $start, $phpbb_root_path;
12961296
global $request;
12971297

12981298
$table_sql = ($mode == 'forum') ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;

phpBB/includes/functions_messenger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ function log_into_server($hostname, $username, $password, $default_auth_method)
12911291
$this->server_send("QUIT");
12921292
fclose($this->socket);
12931293

1294-
$result = $this->pop_before_smtp($hostname, $username, $password);
1294+
$this->pop_before_smtp($hostname, $username, $password);
12951295
$username = $password = $default_auth_method = '';
12961296

12971297
// We need to close the previous session, else the server is not

phpBB/includes/functions_posting.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
886886
*/
887887
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
888888
{
889-
global $user, $auth, $db, $template, $cache;
889+
global $user, $auth, $db, $template;
890890
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
891891

892892
/* @var $phpbb_content_visibility \phpbb\content_visibility */
@@ -1359,7 +1359,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
13591359
*/
13601360
function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data_ary, $update_message = true, $update_search_index = true)
13611361
{
1362-
global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $phpbb_log, $request;
1362+
global $db, $auth, $user, $config, $phpEx, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $phpbb_log, $request;
13631363

13641364
$poll = $poll_ary;
13651365
$data = $data_ary;

phpBB/includes/functions_privmsgs.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,8 +1391,6 @@ function phpbb_delete_users_pms($user_ids)
13911391
*/
13921392
function rebuild_header($check_ary)
13931393
{
1394-
global $db;
1395-
13961394
$address = array();
13971395

13981396
foreach ($check_ary as $check_type => $address_field)

phpBB/includes/functions_user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
12891289
*/
12901290
function user_unban($mode, $ban)
12911291
{
1292-
global $db, $user, $auth, $cache, $phpbb_log;
1292+
global $db, $user, $cache, $phpbb_log;
12931293

12941294
// Delete stale bans
12951295
$sql = 'DELETE FROM ' . BANLIST_TABLE . '

0 commit comments

Comments
 (0)