mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/12458] Apply Squiz.WhiteSpace.SuperfluousWhitespace.* to legacy code.
* There MUST NOT be trailing whitespace at the end of lines. * There MUST NOT be whitespace before the first content of a file. * There MUST NOT be whitespace after the last content of a file. * Functions MUST NOT contain multiple empty lines in a row. PHPBB3-12458
This commit is contained in:
parent
40351fae96
commit
89391dec08
48 changed files with 94 additions and 140 deletions
|
@ -41,6 +41,18 @@
|
|||
</rule>
|
||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
|
||||
|
||||
<!-- There MUST NOT be trailing whitespace at the end of lines. -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
||||
|
||||
<!-- There MUST NOT be whitespace before the first content of a file -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
|
||||
|
||||
<!-- There MUST NOT be whitespace after the last content of a file -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
|
||||
|
||||
<!-- Functions MUST NOT contain multiple empty lines in a row -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
|
||||
|
||||
<!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
|
||||
<rule ref="Zend.Files.ClosingTag" />
|
||||
|
||||
|
|
|
@ -22,18 +22,6 @@
|
|||
<!-- PHP keywords MUST be in lower case. -->
|
||||
<rule ref="Generic.PHP.LowerCaseKeyword" />
|
||||
|
||||
<!-- There MUST NOT be trailing whitespace at the end of lines. -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
||||
|
||||
<!-- There MUST NOT be whitespace before the first content of a file -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
|
||||
|
||||
<!-- There MUST NOT be whitespace after the last content of a file -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
|
||||
|
||||
<!-- Functions MUST NOT contain multiple empty lines in a row -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
|
||||
|
||||
<!-- Classes etc. MUST be namespaced -->
|
||||
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace" />
|
||||
|
||||
|
|
|
@ -147,7 +147,6 @@ class acp_attachments
|
|||
'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'check_attachment_content' => array('lang' => 'CHECK_CONTENT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
|
||||
'legend2' => $l_legend_cat_images,
|
||||
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
@ -1287,7 +1286,7 @@ class acp_attachments
|
|||
/**
|
||||
* Set config attachment stat values
|
||||
*
|
||||
* @param $stats array Array of config key => value pairs to set.
|
||||
* @param $stats array Array of config key => value pairs to set.
|
||||
* @return null
|
||||
*/
|
||||
public function set_attachment_stats($stats)
|
||||
|
@ -1301,7 +1300,7 @@ class acp_attachments
|
|||
/**
|
||||
* Check accuracy of attachment statistics.
|
||||
*
|
||||
* @param $resync bool Resync stats if they're incorrect.
|
||||
* @param $resync bool Resync stats if they're incorrect.
|
||||
* @return bool|string Returns false if stats are correct or error message
|
||||
* otherwise.
|
||||
*/
|
||||
|
@ -1312,7 +1311,7 @@ class acp_attachments
|
|||
|
||||
// Get current files stats
|
||||
$num_files = (int) $this->config['num_files'];
|
||||
$total_size = (float) $this->config['upload_dir_size'];
|
||||
$total_size = (float) $this->config['upload_dir_size'];
|
||||
|
||||
if (($num_files != $stats['num_files']) || ($total_size != $stats['upload_dir_size']))
|
||||
{
|
||||
|
|
|
@ -109,7 +109,7 @@ class acp_ban
|
|||
'L_NO_BAN_CELL' => $l_no_ban_cell,
|
||||
|
||||
'S_USERNAME_BAN' => ($mode == 'user') ? true : false,
|
||||
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_ban&field=ban'),
|
||||
));
|
||||
|
|
|
@ -142,7 +142,7 @@ class acp_bbcodes
|
|||
case 'create':
|
||||
|
||||
$sql_ary = $hidden_fields = array();
|
||||
|
||||
|
||||
/**
|
||||
* Modify custom bbcode data before the modify/create action
|
||||
*
|
||||
|
@ -210,7 +210,6 @@ class acp_bbcodes
|
|||
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
if (strlen($bbcode_helpline) > 255)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
|
@ -311,7 +310,7 @@ class acp_bbcodes
|
|||
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
|
|
|
@ -157,7 +157,7 @@ class acp_bots
|
|||
{
|
||||
$error[] = $user->lang['ERR_BOT_NO_MATCHES'];
|
||||
}
|
||||
|
||||
|
||||
if ($bot_row['bot_ip'] && !preg_match('#^[\d\.,:]+$#', $bot_row['bot_ip']))
|
||||
{
|
||||
if (!$ip_list = gethostbynamel($bot_row['bot_ip']))
|
||||
|
@ -176,7 +176,7 @@ class acp_bots
|
|||
{
|
||||
$error[] = $user->lang['ERR_BOT_AGENT_MATCHES_UA'];
|
||||
}
|
||||
|
||||
|
||||
$bot_name = false;
|
||||
if ($bot_id)
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ class acp_bots
|
|||
{
|
||||
$error[] = $user->lang['BOT_NAME_TAKEN'];
|
||||
}
|
||||
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
// New bot? Create a new user and group entry
|
||||
|
@ -219,7 +219,6 @@ class acp_bots
|
|||
{
|
||||
trigger_error($user->lang['NO_BOT_GROUP'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
||||
$user_id = user_add(array(
|
||||
'user_type' => (int) USER_IGNORE,
|
||||
|
@ -233,7 +232,7 @@ class acp_bots
|
|||
'user_style' => (int) $bot_row['bot_style'],
|
||||
'user_allow_massemail' => 0,
|
||||
));
|
||||
|
||||
|
||||
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||
'user_id' => (int) $user_id,
|
||||
'bot_name' => (string) $bot_row['bot_name'],
|
||||
|
@ -242,7 +241,7 @@ class acp_bots
|
|||
'bot_ip' => (string) $bot_row['bot_ip'])
|
||||
);
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
$log = 'ADDED';
|
||||
}
|
||||
else if ($bot_id)
|
||||
|
@ -289,12 +288,12 @@ class acp_bots
|
|||
|
||||
$log = 'UPDATED';
|
||||
}
|
||||
|
||||
|
||||
$cache->destroy('_bots');
|
||||
|
||||
|
||||
add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']);
|
||||
trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else if ($bot_id)
|
||||
|
@ -335,11 +334,11 @@ class acp_bots
|
|||
'U_ACTION' => $this->u_action . "&id=$bot_id&action=$action",
|
||||
'U_BACK' => $this->u_action,
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
|
||||
'BOT_NAME' => $bot_row['bot_name'],
|
||||
'BOT_IP' => $bot_row['bot_ip'],
|
||||
'BOT_AGENT' => $bot_row['bot_agent'],
|
||||
|
||||
|
||||
'S_EDIT_BOT' => true,
|
||||
'S_ACTIVE_OPTIONS' => $s_active_options,
|
||||
'S_STYLE_OPTIONS' => $style_select,
|
||||
|
@ -352,7 +351,7 @@ class acp_bots
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if ($request->is_ajax() && ($action == 'activate' || $action == 'deactivate'))
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
|
@ -397,7 +396,7 @@ class acp_bots
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validate bot name against username table
|
||||
*/
|
||||
|
@ -417,7 +416,7 @@ class acp_bots
|
|||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
return ($row) ? false : true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ class acp_captcha
|
|||
$selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];
|
||||
$configure = request_var('configure', false);
|
||||
|
||||
|
||||
// Oh, they are just here for the view
|
||||
if (isset($_GET['captcha_demo']))
|
||||
{
|
||||
|
|
|
@ -1180,7 +1180,6 @@ class postgres_extractor extends base_extractor
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
// Get the listing of primary keys.
|
||||
$sql_pri_keys = "SELECT ic.relname as index_name, bc.relname as tab_name, ta.attname as column_name, i.indisunique as unique_key, i.indisprimary as primary_key
|
||||
FROM pg_class bc, pg_class ic, pg_index i, pg_attribute ta, pg_attribute ia
|
||||
|
@ -1280,7 +1279,6 @@ class postgres_extractor extends base_extractor
|
|||
$ary_type[] = pg_field_type($result, $i);
|
||||
$ary_name[] = pg_field_name($result, $i);
|
||||
|
||||
|
||||
$sql = "SELECT pg_get_expr(d.adbin, d.adrelid) as rowdefault
|
||||
FROM pg_attrdef d, pg_class c
|
||||
WHERE (c.relname = '{$table_name}')
|
||||
|
|
|
@ -242,7 +242,7 @@ class acp_extensions
|
|||
public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
|
||||
{
|
||||
$enabled_extension_meta_data = array();
|
||||
|
||||
|
||||
foreach ($phpbb_extension_manager->all_enabled() as $name => $location)
|
||||
{
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
|
||||
|
@ -284,7 +284,7 @@ class acp_extensions
|
|||
public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
|
||||
{
|
||||
$disabled_extension_meta_data = array();
|
||||
|
||||
|
||||
foreach ($phpbb_extension_manager->all_disabled() as $name => $location)
|
||||
{
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
|
||||
|
@ -329,7 +329,7 @@ class acp_extensions
|
|||
$uninstalled = array_diff_key($phpbb_extension_manager->all_available(), $phpbb_extension_manager->all_configured());
|
||||
|
||||
$available_extension_meta_data = array();
|
||||
|
||||
|
||||
foreach ($uninstalled as $name => $location)
|
||||
{
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
|
||||
|
|
|
@ -53,7 +53,6 @@ class acp_groups
|
|||
$start = request_var('start', 0);
|
||||
$update = (isset($_POST['update'])) ? true : false;
|
||||
|
||||
|
||||
// Clear some vars
|
||||
$group_row = array();
|
||||
|
||||
|
@ -140,7 +139,7 @@ class acp_groups
|
|||
if (confirm_box(true))
|
||||
{
|
||||
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
|
||||
group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
|
||||
group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
|
||||
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
|
||||
}
|
||||
else
|
||||
|
@ -331,7 +330,6 @@ class acp_groups
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Did we submit?
|
||||
if ($update)
|
||||
{
|
||||
|
|
|
@ -203,7 +203,6 @@ class acp_icons
|
|||
unset($_images[$row[$fields . '_url']]);
|
||||
}
|
||||
|
||||
|
||||
if ($row[$fields . '_id'] == $icon_id)
|
||||
{
|
||||
$after = true;
|
||||
|
@ -781,7 +780,7 @@ class acp_icons
|
|||
|
||||
$cache->destroy('_icons');
|
||||
$cache->destroy('sql', $table);
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response;
|
||||
|
|
|
@ -118,7 +118,7 @@ class acp_logs
|
|||
if ($mode == 'mod')
|
||||
{
|
||||
$forum_box = '<option value="0">' . $user->lang['ALL_FORUMS'] . '</option>' . make_forum_select($forum_id);
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_FORUMS' => true,
|
||||
'S_FORUM_BOX' => $forum_box)
|
||||
|
@ -149,7 +149,7 @@ class acp_logs
|
|||
foreach ($log_data as $row)
|
||||
{
|
||||
$data = array();
|
||||
|
||||
|
||||
$checks = array('viewtopic', 'viewlogs', 'viewforum');
|
||||
foreach ($checks as $check)
|
||||
{
|
||||
|
|
|
@ -270,7 +270,7 @@ class acp_permission_roles
|
|||
case 'edit':
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ACL_ROLES_TABLE . '
|
||||
WHERE role_id = ' . $role_id;
|
||||
|
|
|
@ -330,7 +330,6 @@ class acp_permissions
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Setting permissions screen
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
'user_id' => $user_id,
|
||||
|
|
|
@ -81,7 +81,7 @@ class acp_php_info
|
|||
|
||||
$template->assign_var('PHPINFO', $output);
|
||||
}
|
||||
|
||||
|
||||
function remove_spaces($matches)
|
||||
{
|
||||
return '<a name="' . str_replace(' ', '_', $matches[1]) . '">';
|
||||
|
|
|
@ -485,7 +485,6 @@ class acp_profile
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
|
||||
FROM ' . PROFILE_LANG_TABLE . '
|
||||
WHERE lang_id <> ' . $this->edit_lang_id . "
|
||||
|
@ -1116,7 +1115,6 @@ class acp_profile
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
if ($action == 'create')
|
||||
|
|
|
@ -79,7 +79,7 @@ class acp_prune
|
|||
$prune_posted = request_var('prune_days', 0);
|
||||
$prune_viewed = request_var('prune_vieweddays', 0);
|
||||
$prune_all = (!$prune_posted && !$prune_viewed) ? true : false;
|
||||
|
||||
|
||||
$prune_flags = 0;
|
||||
$prune_flags += (request_var('prune_old_polls', 0)) ? 2 : 0;
|
||||
$prune_flags += (request_var('prune_announce', 0)) ? 4 : 0;
|
||||
|
@ -109,7 +109,7 @@ class acp_prune
|
|||
$p_result['topics'] = 0;
|
||||
$p_result['posts'] = 0;
|
||||
$log_data = '';
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
if (!$auth->acl_get('f_list', $row['forum_id']))
|
||||
|
@ -129,7 +129,7 @@ class acp_prune
|
|||
$p_result['topics'] += $return['topics'];
|
||||
$p_result['posts'] += $return['posts'];
|
||||
}
|
||||
|
||||
|
||||
if ($prune_viewed)
|
||||
{
|
||||
$return = prune($row['forum_id'], 'viewed', $prunedate_viewed, $prune_flags, false);
|
||||
|
@ -145,11 +145,11 @@ class acp_prune
|
|||
'NUM_TOPICS' => $p_result['topics'],
|
||||
'NUM_POSTS' => $p_result['posts'])
|
||||
);
|
||||
|
||||
|
||||
$log_data .= (($log_data != '') ? ', ' : '') . $row['forum_name'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
|
||||
// Sync all pruned forums at once
|
||||
sync('forum', 'forum_id', $prune_ids, true, true);
|
||||
add_log('admin', 'LOG_PRUNE', $log_data);
|
||||
|
@ -256,7 +256,7 @@ class acp_prune
|
|||
if ($deleteposts)
|
||||
{
|
||||
user_delete('remove', $user_ids);
|
||||
|
||||
|
||||
$l_log = 'LOG_PRUNE_USER_DEL_DEL';
|
||||
}
|
||||
else
|
||||
|
@ -444,7 +444,7 @@ class acp_prune
|
|||
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit = 0';
|
||||
}
|
||||
}
|
||||
else if (sizeof($active) && $active_select != 'lt')
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit ' . $key_match[$active_select] . ' ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
|
||||
|
|
|
@ -214,7 +214,6 @@ class acp_ranks
|
|||
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
|
||||
);
|
||||
|
||||
|
||||
return;
|
||||
|
||||
break;
|
||||
|
|
|
@ -735,7 +735,6 @@ class acp_users
|
|||
sync('forum', 'forum_id', $forum_id_ary, false, true);
|
||||
}
|
||||
|
||||
|
||||
add_log('admin', 'LOG_USER_MOVE_POSTS', $user_row['username'], $forum_info['forum_name']);
|
||||
add_log('user', $user_id, 'LOG_USER_MOVE_POSTS_USER', $forum_info['forum_name']);
|
||||
|
||||
|
@ -1329,7 +1328,6 @@ class acp_users
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$template->assign_block_vars('warn', array(
|
||||
'ID' => $row['warning_id'],
|
||||
'USERNAME' => ($row['log_operation']) ? get_username_string('full', $row['mod_user_id'], $row['mod_username'], $row['mod_user_colour']) : '-',
|
||||
|
@ -1379,7 +1377,6 @@ class acp_users
|
|||
$data['bday_year'] = request_var('bday_year', $data['bday_year']);
|
||||
$data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
|
||||
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$error = validate_data($data, array(
|
||||
|
@ -2243,7 +2240,6 @@ class acp_users
|
|||
$error = array();
|
||||
}
|
||||
|
||||
|
||||
$sql = 'SELECT ug.*, g.*
|
||||
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.user_id = $user_id
|
||||
|
|
|
@ -101,7 +101,7 @@ class acp_words
|
|||
'word' => $word,
|
||||
'replacement' => $replacement
|
||||
);
|
||||
|
||||
|
||||
if ($word_id)
|
||||
{
|
||||
$db->sql_query('UPDATE ' . WORDS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE word_id = ' . $word_id);
|
||||
|
@ -162,7 +162,6 @@ class acp_words
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
|
|
|
@ -139,7 +139,6 @@ class auth_admin extends \phpbb\auth\auth
|
|||
$auth2 = &$auth;
|
||||
}
|
||||
|
||||
|
||||
$hold_ary[$userdata['user_id']] = array();
|
||||
foreach ($forum_ids as $f_id)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ class captcha
|
|||
function execute($code, $seed)
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
||||
mt_srand($seed);
|
||||
|
||||
// Create image
|
||||
|
@ -160,13 +160,13 @@ class captcha
|
|||
function wave($img)
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
||||
$period_x = mt_rand(12,18);
|
||||
$period_y = mt_rand(7,14);
|
||||
$amp_x = mt_rand(5,10);
|
||||
$amp_y = mt_rand(2,4);
|
||||
$amp_y = mt_rand(2,4);
|
||||
$socket = mt_rand(0,100);
|
||||
|
||||
|
||||
$dampen_x = mt_rand($this->width/5, $this->width/2);
|
||||
$dampen_y = mt_rand($this->height/5, $this->height/2);
|
||||
$direction_x = (mt_rand (0, 1));
|
||||
|
@ -185,7 +185,7 @@ class captcha
|
|||
}
|
||||
return $img;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Noise line
|
||||
*/
|
||||
|
@ -236,7 +236,7 @@ class captcha
|
|||
}
|
||||
|
||||
function captcha_noise_bg_bitmaps()
|
||||
{
|
||||
{
|
||||
return array(
|
||||
'width' => 15,
|
||||
'height' => 5,
|
||||
|
@ -300,7 +300,7 @@ class captcha
|
|||
function captcha_bitmaps()
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
||||
$chars = array(
|
||||
'A' => array(
|
||||
array(
|
||||
|
@ -1681,7 +1681,7 @@ class captcha
|
|||
'J' => $chars['J'][mt_rand(0, min(sizeof($chars['J']), $config['captcha_gd_fonts']) -1)],
|
||||
'K' => $chars['K'][mt_rand(0, min(sizeof($chars['K']), $config['captcha_gd_fonts']) -1)],
|
||||
'L' => $chars['L'][mt_rand(0, min(sizeof($chars['L']), $config['captcha_gd_fonts']) -1)],
|
||||
'M' => $chars['M'][mt_rand(0, min(sizeof($chars['M']), $config['captcha_gd_fonts']) -1)],
|
||||
'M' => $chars['M'][mt_rand(0, min(sizeof($chars['M']), $config['captcha_gd_fonts']) -1)],
|
||||
'N' => $chars['N'][mt_rand(0, min(sizeof($chars['N']), $config['captcha_gd_fonts']) -1)],
|
||||
'O' => $chars['O'][mt_rand(0, min(sizeof($chars['O']), $config['captcha_gd_fonts']) -1)],
|
||||
'P' => $chars['P'][mt_rand(0, min(sizeof($chars['P']), $config['captcha_gd_fonts']) -1)],
|
||||
|
@ -2196,7 +2196,7 @@ class colour_manager
|
|||
{
|
||||
$mode = $this->mode;
|
||||
}
|
||||
|
||||
|
||||
if (!is_array($colour))
|
||||
{
|
||||
if (isset($this->named_rgb[$colour]))
|
||||
|
@ -2352,7 +2352,6 @@ class colour_manager
|
|||
$colour3[0] += 180;
|
||||
$colour4[0] += 210;
|
||||
|
||||
|
||||
$results[] = $this->allocate($colour2, $mode);
|
||||
$results[] = $this->allocate($colour3, $mode);
|
||||
$results[] = $this->allocate($colour4, $mode);
|
||||
|
@ -2390,7 +2389,7 @@ class colour_manager
|
|||
}
|
||||
|
||||
// This is a hard problem. I chicken out and try to maintain readability at the cost of less randomness.
|
||||
|
||||
|
||||
while ($count > 0)
|
||||
{
|
||||
$colour[1] = ($colour[1] + mt_rand(40,60)) % 99;
|
||||
|
|
|
@ -2694,7 +2694,6 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
|||
WHERE user_id = " . $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$u_action .= '&confirm_uid=' . $user->data['user_id'] . '&sess=' . $user->session_id . '&sid=' . $user->session_id;
|
||||
|
|
|
@ -746,7 +746,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
* Perform additional actions before post(s) deletion
|
||||
*
|
||||
* @event core.delete_posts_before
|
||||
* @var string where_type Variable containing posts deletion mode
|
||||
* @var string where_type Variable containing posts deletion mode
|
||||
* @var mixed where_ids Array or comma separated list of posts ids to delete
|
||||
* @var bool auto_sync Flag indicating if topics/forums should be synchronized
|
||||
* @var bool posted_sync Flag indicating if topics_posted table should be resynchronized
|
||||
|
@ -907,7 +907,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
* @var array poster_ids Array with deleted posts' author ids
|
||||
* @var array topic_ids Array with deleted posts' topic ids
|
||||
* @var array forum_ids Array with deleted posts' forum ids
|
||||
* @var string where_type Variable containing posts deletion mode
|
||||
* @var string where_type Variable containing posts deletion mode
|
||||
* @var mixed where_ids Array or comma separated list of posts ids to delete
|
||||
* @var array delete_notifications_types Array with notifications types to delete
|
||||
* @since 3.1.0-a4
|
||||
|
@ -925,7 +925,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
* @var array poster_ids Array with deleted posts' author ids
|
||||
* @var array topic_ids Array with deleted posts' topic ids
|
||||
* @var array forum_ids Array with deleted posts' forum ids
|
||||
* @var string where_type Variable containing posts deletion mode
|
||||
* @var string where_type Variable containing posts deletion mode
|
||||
* @var mixed where_ids Array or comma separated list of posts ids to delete
|
||||
* @var array delete_notifications_types Array with notifications types to delete
|
||||
* @since 3.1.0-a4
|
||||
|
@ -2901,7 +2901,7 @@ function get_database_size()
|
|||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
|
||||
FROM sysfiles';
|
||||
|
||||
|
@ -2910,7 +2910,7 @@ function get_database_size()
|
|||
// Azure stats are stored elsewhere
|
||||
if (strpos($row['mssql_version'], 'SQL Azure') !== false)
|
||||
{
|
||||
$sql = 'SELECT ((SUM(reserved_page_count) * 8.0) * 1024.0) as dbsize
|
||||
$sql = 'SELECT ((SUM(reserved_page_count) * 8.0) * 1024.0) as dbsize
|
||||
FROM sys.dm_db_partition_stats';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -451,7 +451,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
|
|||
extract($phpbb_dispatcher->trigger_event('core.modify_text_for_display_before', compact($vars)));
|
||||
|
||||
if ($censor_text)
|
||||
{
|
||||
{
|
||||
$text = censor_text($text);
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
|
|||
* For parsing custom parsed text to be stored within the database.
|
||||
* This function additionally returns the uid and bitfield that needs to be stored.
|
||||
* Expects $text to be the value directly from request_var() and in it's non-parsed form
|
||||
*
|
||||
*
|
||||
* @param string $text The text to be replaced with the parsed one
|
||||
* @param string $uid The BBCode uid for this parse
|
||||
* @param string $bitfield The BBCode bitfield for this parse
|
||||
|
@ -1392,7 +1392,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
|
|||
{
|
||||
$username_string = str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Use this event to change the output of get_username_string()
|
||||
*
|
||||
|
|
|
@ -900,7 +900,6 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
|
|||
$folder_new .= '_locked';
|
||||
}
|
||||
|
||||
|
||||
$folder_img = ($unread_topic) ? $folder_new : $folder;
|
||||
$folder_alt = ($unread_topic) ? 'UNREAD_POSTS' : (($topic_row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_UNREAD_POSTS');
|
||||
|
||||
|
|
|
@ -173,7 +173,6 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||
$ids = array($ids);
|
||||
}
|
||||
|
||||
|
||||
$update_sql = $empty_forums = $not_empty_forums = array();
|
||||
|
||||
if ($type != 'topic')
|
||||
|
|
|
@ -314,7 +314,6 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
return false;
|
||||
|
@ -2030,10 +2029,10 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
|||
|
||||
$decoded_message = bbcode_nl2br($decoded_message);
|
||||
}
|
||||
|
||||
|
||||
$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0);
|
||||
$parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0);
|
||||
|
||||
|
||||
$message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false);
|
||||
|
||||
$subject = censor_text($subject);
|
||||
|
|
|
@ -475,7 +475,7 @@ class fileerror extends filespec
|
|||
class fileupload
|
||||
{
|
||||
var $allowed_extensions = array();
|
||||
var $disallowed_content = array('body', 'head', 'html', 'img', 'plaintext', 'a href', 'pre', 'script', 'table', 'title');
|
||||
var $disallowed_content = array('body', 'head', 'html', 'img', 'plaintext', 'a href', 'pre', 'script', 'table', 'title');
|
||||
var $max_filesize = 0;
|
||||
var $min_width = 0;
|
||||
var $min_height = 0;
|
||||
|
|
|
@ -2086,7 +2086,6 @@ function get_avatar_filename($avatar_entry)
|
|||
{
|
||||
global $config;
|
||||
|
||||
|
||||
if ($avatar_entry[0] === 'g')
|
||||
{
|
||||
$avatar_group = true;
|
||||
|
|
|
@ -171,7 +171,7 @@ class mcp_ban
|
|||
case 'user':
|
||||
$pre_fill = (string) $db->sql_fetchfield('username');
|
||||
break;
|
||||
|
||||
|
||||
case 'ip':
|
||||
$pre_fill = (string) $db->sql_fetchfield('user_ip');
|
||||
break;
|
||||
|
|
|
@ -170,7 +170,7 @@ class mcp_pm_reports
|
|||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $pm_info['author_id']),
|
||||
'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $report['user_id']) : '',
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $pm_info['author_id']) : '',
|
||||
|
||||
|
||||
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
|
||||
'MINI_POST_IMG' => $user->img('icon_post_target', 'POST'),
|
||||
|
||||
|
@ -304,7 +304,7 @@ class mcp_pm_reports
|
|||
$template->assign_vars(array(
|
||||
'L_EXPLAIN' => ($mode == 'pm_reports') ? $user->lang['MCP_PM_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_PM_REPORTS_CLOSED_EXPLAIN'],
|
||||
'L_TITLE' => ($mode == 'pm_reports') ? $user->lang['MCP_PM_REPORTS_OPEN'] : $user->lang['MCP_PM_REPORTS_CLOSED'],
|
||||
|
||||
|
||||
'S_PM' => true,
|
||||
'S_MCP_ACTION' => $this->u_action,
|
||||
'S_CLOSED' => ($mode == 'pm_reports_closed') ? true : false,
|
||||
|
|
|
@ -298,7 +298,6 @@ class mcp_queue
|
|||
|
||||
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
|
||||
|
||||
|
||||
'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&mode=unapproved_topics' : '&mode=unapproved_posts')) . '&start=' . $start . '">', '</a>'),
|
||||
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'),
|
||||
'RETURN_TOPIC_SIMPLE' => sprintf($user->lang['RETURN_TOPIC_SIMPLE'], '<a href="' . $topic_url . '">', '</a>'),
|
||||
|
@ -1126,7 +1125,6 @@ class mcp_queue
|
|||
$post_data['disapprove_reason'] .= ($reason) ? "\n\n" . $reason : '';
|
||||
}
|
||||
|
||||
|
||||
if ($disapprove_all_posts_in_topic && $topic_information[$topic_id]['topic_posts_unapproved'] == 1)
|
||||
{
|
||||
// If there is only 1 post when disapproving the topic,
|
||||
|
@ -1144,7 +1142,6 @@ class mcp_queue
|
|||
|
||||
unset($lang_reasons, $post_info, $disapprove_reason, $disapprove_reason_lang);
|
||||
|
||||
|
||||
if ($num_disapproved_topics)
|
||||
{
|
||||
$success_msg = ($num_disapproved_topics == 1) ? 'TOPIC' : 'TOPICS';
|
||||
|
|
|
@ -98,10 +98,10 @@ class mcp_reports
|
|||
|
||||
$post_id = $report['post_id'];
|
||||
$report_id = $report['report_id'];
|
||||
|
||||
|
||||
$parse_post_flags = $report['reported_post_enable_bbcode'] ? OPTION_FLAG_BBCODE : 0;
|
||||
$parse_post_flags += $report['reported_post_enable_smilies'] ? OPTION_FLAG_SMILIES : 0;
|
||||
$parse_post_flags += $report['reported_post_enable_magic_url'] ? OPTION_FLAG_LINKS : 0;
|
||||
$parse_post_flags += $report['reported_post_enable_magic_url'] ? OPTION_FLAG_LINKS : 0;
|
||||
|
||||
$post_info = get_post_data(array($post_id), 'm_report', true);
|
||||
|
||||
|
@ -144,7 +144,6 @@ class mcp_reports
|
|||
|
||||
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
|
||||
|
||||
|
||||
$report['report_text'] = make_clickable(bbcode_nl2br($report['report_text']));
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
|
@ -578,7 +577,6 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
|||
}
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
if (sizeof($close_report_posts))
|
||||
{
|
||||
if ($pm)
|
||||
|
|
|
@ -104,7 +104,7 @@ class bbcode_firstpass extends bbcode
|
|||
function bbcode_init($allow_custom_bbcode = true)
|
||||
{
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
|
||||
static $rowset;
|
||||
|
||||
// This array holds all bbcode data. BBCodes will be processed in this
|
||||
|
|
|
@ -619,7 +619,6 @@ class ucp_main
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['UCP_MAIN_' . strtoupper($mode)],
|
||||
|
||||
|
@ -691,7 +690,6 @@ class ucp_main
|
|||
AND t.topic_id = tw.topic_id
|
||||
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
|
||||
|
||||
|
||||
'ORDER_BY' => 't.topic_last_post_time DESC'
|
||||
);
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ class ucp_notifications
|
|||
|
||||
meta_refresh(3, $this->u_action);
|
||||
$message = $user->lang['NOTIFICATIONS_MARK_ALL_READ_SUCCESS'];
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new \phpbb\json_response();
|
||||
|
|
|
@ -172,7 +172,6 @@ class ucp_pm
|
|||
trigger_error('NO_AUTH_READ_HOLD_MESSAGE');
|
||||
}
|
||||
|
||||
|
||||
// First Handle Mark actions and moving messages
|
||||
$submit_mark = (isset($_POST['submit_mark'])) ? true : false;
|
||||
$move_pm = (isset($_POST['move_pm'])) ? true : false;
|
||||
|
|
|
@ -586,7 +586,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
|||
);
|
||||
$s_hidden_fields .= build_address_field($address_list);
|
||||
|
||||
|
||||
confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
|
||||
}
|
||||
}
|
||||
|
@ -748,7 +747,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
|||
$return_box_url = ($action === 'post' || $action === 'edit') ? $outbox_folder_url : $inbox_folder_url;
|
||||
$return_box_lang = ($action === 'post' || $action === 'edit') ? 'PM_OUTBOX' : 'PM_INBOX';
|
||||
|
||||
|
||||
$save_message = ($action === 'edit') ? $user->lang['MESSAGE_EDITED'] : $user->lang['MESSAGE_STORED'];
|
||||
$message = $save_message . '<br /><br />' . $user->lang('VIEW_PRIVATE_MESSAGE', '<a href="' . $return_message_url . '">', '</a>');
|
||||
|
||||
|
@ -1006,7 +1004,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
|||
// Build hidden address list
|
||||
$s_hidden_address_field = build_address_field($address_list);
|
||||
|
||||
|
||||
$bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1);
|
||||
$smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1);
|
||||
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
|
||||
|
|
|
@ -65,7 +65,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
trigger_error($message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add Folder
|
||||
if (isset($_POST['addfolder']))
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
// Move Messages
|
||||
case 1:
|
||||
$num_moved = move_pm($user->data['user_id'], $user->data['message_limit'], $msg_ids, $move_to, $remove_folder_id);
|
||||
|
||||
|
||||
// Something went wrong, only partially moved?
|
||||
if ($num_moved != $folder_row['pm_count'])
|
||||
{
|
||||
|
@ -418,7 +418,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
$result = $db->sql_query($sql);
|
||||
$num_messages = (int) $db->sql_fetchfield('num_messages');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
||||
$folder[PRIVMSGS_INBOX] = array(
|
||||
'folder_name' => $user->lang['PM_INBOX'],
|
||||
'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', $user->lang('MESSAGES_COUNT', (int) $user->data['message_limit']), $num_messages),
|
||||
|
@ -691,7 +691,7 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
|||
function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions)
|
||||
{
|
||||
global $db, $template, $auth, $user;
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_COND_DEFINED' => true,
|
||||
'S_COND_SELECT' => (!$hardcoded && isset($global_rule_conditions[$rule_option])) ? true : false)
|
||||
|
@ -715,7 +715,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
{
|
||||
case 'text':
|
||||
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_TEXT_CONDITION' => true,
|
||||
'CURRENT_STRING' => $rule_string,
|
||||
|
@ -729,7 +729,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
case 'user':
|
||||
$rule_user_id = request_var('rule_user_id', 0);
|
||||
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
|
||||
|
||||
|
||||
if ($rule_string && !$rule_user_id)
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
|
@ -791,10 +791,10 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
{
|
||||
$sql .= 'WHERE';
|
||||
}
|
||||
|
||||
$sql .= " (g.group_name NOT IN ('GUESTS', 'BOTS') OR g.group_type <> " . GROUP_SPECIAL . ')
|
||||
|
||||
$sql .= " (g.group_name NOT IN ('GUESTS', 'BOTS') OR g.group_type <> " . GROUP_SPECIAL . ')
|
||||
ORDER BY g.group_type DESC, g.group_name ASC';
|
||||
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$s_group_options = '';
|
||||
|
@ -807,7 +807,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
|||
|
||||
$s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '';
|
||||
$s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : '';
|
||||
|
||||
|
||||
$s_group_options .= '<option value="' . $row['group_id'] . '"' . $s_class . $s_selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -845,7 +845,7 @@ function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $fo
|
|||
WHERE user_id = ' . $user_id . '
|
||||
ORDER BY rule_id ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
$count = 0;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
|
|
|
@ -274,7 +274,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
{
|
||||
$template->assign_block_vars('dl_method', $method);
|
||||
}
|
||||
|
||||
|
||||
foreach ($attachments as $attachment)
|
||||
{
|
||||
$template->assign_block_vars('attachment', array(
|
||||
|
|
|
@ -224,15 +224,15 @@ class ucp_zebra
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$message = ($updated) ? $user->lang[$l_mode . '_UPDATED'] : implode('<br />', $error);
|
||||
|
||||
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'success' => $updated,
|
||||
|
||||
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $message,
|
||||
'REFRESH_DATA' => array(
|
||||
|
|
|
@ -479,7 +479,6 @@ class utf_normalizer
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
// STEP 1: Decompose current char
|
||||
|
||||
// We have found a character that is either:
|
||||
|
@ -527,7 +526,6 @@ class utf_normalizer
|
|||
$utf_seq = array($utf_char);
|
||||
}
|
||||
|
||||
|
||||
// STEP 2: Capture the starter
|
||||
|
||||
// Check out the combining class of the first character of the UTF sequence
|
||||
|
@ -683,7 +681,6 @@ class utf_normalizer
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// STEP 3: Capture following combining modifiers
|
||||
|
||||
while ($pos < $len)
|
||||
|
@ -752,7 +749,6 @@ class utf_normalizer
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// STEP 4: Sort and combine
|
||||
|
||||
// Here we sort...
|
||||
|
@ -991,7 +987,6 @@ class utf_normalizer
|
|||
$tmp_pos = $last_cc = $sort = $dump = 0;
|
||||
$utf_sort = array();
|
||||
|
||||
|
||||
// Main loop
|
||||
do
|
||||
{
|
||||
|
@ -1047,7 +1042,6 @@ class utf_normalizer
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
// STEP 1: Decide what to do with current char
|
||||
|
||||
// Now, in that order:
|
||||
|
|
|
@ -71,7 +71,6 @@ function phpbb_insert_forums()
|
|||
$prune_enabled = (int) $src_db->sql_fetchfield('config_value');
|
||||
$src_db->sql_freeresult($result);
|
||||
|
||||
|
||||
// Insert categories
|
||||
$sql = 'SELECT cat_id, cat_title
|
||||
FROM ' . $convert->src_table_prefix . 'categories
|
||||
|
@ -571,7 +570,6 @@ function phpbb_convert_authentication($mode)
|
|||
// What we will do is handling all 2.0.x admins as founder to replicate what is common in 2.0.x.
|
||||
// After conversion the main admin need to make sure he is removing permissions and the founder status if wanted.
|
||||
|
||||
|
||||
// Grab user ids of users with user_level of ADMIN
|
||||
$sql = "SELECT user_id
|
||||
FROM {$convert->src_table_prefix}users
|
||||
|
|
|
@ -217,7 +217,6 @@ class install_install extends module
|
|||
'S_LEGEND' => false,
|
||||
));
|
||||
|
||||
|
||||
// Check for getimagesize
|
||||
if (@function_exists('getimagesize'))
|
||||
{
|
||||
|
@ -535,7 +534,6 @@ class install_install extends module
|
|||
$url = (!in_array(false, $passed)) ? $this->p_master->module_url . "?mode=$mode&sub=database&language=$language" : $this->p_master->module_url . "?mode=$mode&sub=requirements&language=$language ";
|
||||
$submit = (!in_array(false, $passed)) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST'];
|
||||
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_SUBMIT' => $submit,
|
||||
'S_HIDDEN' => $s_hidden_fields,
|
||||
|
|
|
@ -81,7 +81,7 @@ $lang = array_merge($lang, array(
|
|||
'NOT_LEADER_OF_GROUP' => 'The requested operation cannot be taken because you are not a leader of the selected group.',
|
||||
'NOT_MEMBER_OF_GROUP' => 'The requested operation cannot be taken because you are not a member of the selected group or your membership has not been approved yet.',
|
||||
'NOT_RESIGN_FROM_DEFAULT_GROUP' => 'You are not allowed to resign from your default group.',
|
||||
|
||||
|
||||
'PRIMARY_GROUP' => 'Primary group',
|
||||
|
||||
'REMOVE_SELECTED' => 'Remove selected',
|
||||
|
|
|
@ -53,7 +53,7 @@ $lang = array_merge($lang, array(
|
|||
'BBCODE_IS_OFF' => '%sBBCode%s is <em>OFF</em>',
|
||||
'BBCODE_IS_ON' => '%sBBCode%s is <em>ON</em>',
|
||||
'BBCODE_I_HELP' => 'Italic text: [i]text[/i]',
|
||||
'BBCODE_L_HELP' => 'List: [list][*]text[/list]',
|
||||
'BBCODE_L_HELP' => 'List: [list][*]text[/list]',
|
||||
'BBCODE_LISTITEM_HELP' => 'List item: [*]text',
|
||||
'BBCODE_O_HELP' => 'Ordered list: e.g. [list=1][*]First point[/list] or [list=a][*]Point a[/list]',
|
||||
'BBCODE_P_HELP' => 'Insert image: [img]http://image_url[/img]',
|
||||
|
|
|
@ -136,7 +136,7 @@ else
|
|||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_PM'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
|
||||
$reported_post_text = $report_data['message_text'];
|
||||
$reported_post_bitfield = $report_data['bbcode_bitfield'];
|
||||
$reported_post_uid = $report_data['bbcode_uid'];
|
||||
|
|
Loading…
Add table
Reference in a new issue