1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/13454] Remove more unused variables

This should be the last part. Off to checking if the changes were correct.

PHPBB3-13454
This commit is contained in:
Marc Alexander
2015-12-05 16:07:14 +01:00
parent 3b9a9bb04a
commit 73900d1857
16 changed files with 17 additions and 27 deletions

View File

@@ -1381,7 +1381,7 @@ class acp_forums
{
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
if ($to_id > 0)

View File

@@ -1536,7 +1536,6 @@ class acp_users
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
}
$s_birthday_year_options = '';
$now = getdate();
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';

View File

@@ -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'])
{
// Get information from cookie
$row = false;
if (!isset($tracking_topics['tf'][$forum_id]))
{
// We do not need to mark read, this happened before. Therefore setting this to true

View File

@@ -1312,8 +1312,6 @@ function extension_allowed($forum_id, $extension, &$extensions)
*/
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')
{
$chars = array();
$strip_reply = false;
$stripped = false;
if ($allow_reply && strpos($string, 'Re: ') === 0)

View File

@@ -1320,7 +1320,7 @@ function restore_config($schema)
*/
function update_folder_pm_count()
{
global $db, $convert, $user;
global $db;
$sql = 'SELECT user_id, folder_id, COUNT(msg_id) as num_messages
FROM ' . PRIVMSGS_TO_TABLE . '
@@ -1379,7 +1379,7 @@ function extract_variables_from_file($_filename)
function get_path($src_path, $src_url, $test_file)
{
global $config, $phpbb_root_path, $phpEx;
global $phpbb_root_path, $phpEx;
$board_config = get_config();
@@ -1490,7 +1490,7 @@ function compare_table($tables, $tablename, &$prefixes)
*/
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;
if (($ug_type == 'group' || $ug_type == 'group_role') && is_string($ug_id))

View File

@@ -1292,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 = '')
{
global $template, $db, $user, $phpEx, $start, $phpbb_root_path;
global $db, $user, $phpEx, $start, $phpbb_root_path;
global $request;
$table_sql = ($mode == 'forum') ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;

View File

@@ -1291,7 +1291,7 @@ class smtp_class
$this->server_send("QUIT");
fclose($this->socket);
$result = $this->pop_before_smtp($hostname, $username, $password);
$this->pop_before_smtp($hostname, $username, $password);
$username = $password = $default_auth_method = '';
// We need to close the previous session, else the server is not

View File

@@ -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)
{
global $user, $auth, $db, $template, $cache;
global $user, $auth, $db, $template;
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
/* @var $phpbb_content_visibility \phpbb\content_visibility */
@@ -1359,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)
{
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;
$data = $data_ary;

View File

@@ -1391,8 +1391,6 @@ function phpbb_delete_users_pms($user_ids)
*/
function rebuild_header($check_ary)
{
global $db;
$address = array();
foreach ($check_ary as $check_type => $address_field)

View File

@@ -1289,7 +1289,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
*/
function user_unban($mode, $ban)
{
global $db, $user, $auth, $cache, $phpbb_log;
global $db, $user, $cache, $phpbb_log;
// Delete stale bans
$sql = 'DELETE FROM ' . BANLIST_TABLE . '

View File

@@ -1344,8 +1344,6 @@ function mcp_fork_topic($topic_ids)
if ($topic_row['poll_start'])
{
$poll_rows = array();
$sql = 'SELECT *
FROM ' . POLL_OPTIONS_TABLE . "
WHERE topic_id = $topic_id";