1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

Cleaning up (#13689)

Also removed the useless login box from the ACP.


git-svn-id: file:///svn/phpbb/trunk@7919 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof
2007-07-22 14:04:26 +00:00
parent 6161658262
commit fcb0c89962
15 changed files with 35 additions and 41 deletions

View File

@@ -678,7 +678,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
}
else
{
trigger_error($user->lang['LENGTH_BAN_INVALID']);
trigger_error('LENGTH_BAN_INVALID');
}
}
}
@@ -730,11 +730,11 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
$clean_name = utf8_clean_string($username);
if ($clean_name == $user->data['username_clean'])
{
trigger_error($user->lang['CANNOT_BAN_YOURSELF']);
trigger_error('CANNOT_BAN_YOURSELF');
}
if (in_array($clean_name, $founder_names))
{
trigger_error($user->lang['CANNOT_BAN_FOUNDER']);
trigger_error('CANNOT_BAN_FOUNDER');
}
$sql_usernames[] = $clean_name;
}
@@ -743,7 +743,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
// Make sure we have been given someone to ban
if (!sizeof($sql_usernames))
{
trigger_error($user->lang['NO_USER_SPECIFIED']);
trigger_error('NO_USER_SPECIFIED');
}
$sql = 'SELECT user_id
@@ -772,7 +772,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
}
else
{
trigger_error($user->lang['NO_USERS']);
trigger_error('NO_USERS');
}
$db->sql_freeresult($result);
}

View File

@@ -276,7 +276,7 @@ function mcp_resync_topics($topic_ids)
if (!sizeof($topic_ids))
{
trigger_error($user->lang['NO_TOPIC_SELECTED']);
trigger_error('NO_TOPIC_SELECTED');
}
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))

View File

@@ -86,7 +86,7 @@ class mcp_notes
if (!$userrow)
{
trigger_error($user->lang['NO_USER']);
trigger_error('NO_USER');
}
$user_id = $userrow['user_id'];

View File

@@ -26,7 +26,7 @@ function mcp_post_details($id, $mode, $action)
if (!sizeof($post_info))
{
trigger_error($user->lang['POST_NOT_EXIST']);
trigger_error('POST_NOT_EXIST');
}
$post_info = $post_info[$post_id];
@@ -79,7 +79,7 @@ function mcp_post_details($id, $mode, $action)
if (!$row)
{
trigger_error($user->lang['NO_USER']);
trigger_error('NO_USER');
}
if ($auth->acl_get('m_chgposter', $post_info['forum_id']))
@@ -473,7 +473,7 @@ function change_poster(&$post_info, $userdata)
if (!sizeof($post_info))
{
trigger_error($user->lang['POST_NOT_EXIST']);
trigger_error('POST_NOT_EXIST');
}
$post_info = $post_info[$post_id];

View File

@@ -224,7 +224,7 @@ class mcp_queue
if (!sizeof($topic_info))
{
trigger_error($user->lang['TOPIC_NOT_EXIST']);
trigger_error('TOPIC_NOT_EXIST');
}
$topic_info = $topic_info[$topic_id];

View File

@@ -242,7 +242,7 @@ class mcp_reports
if (!sizeof($topic_info))
{
trigger_error($user->lang['TOPIC_NOT_EXIST']);
trigger_error('TOPIC_NOT_EXIST');
}
$topic_info = $topic_info[$topic_id];

View File

@@ -25,7 +25,7 @@ function mcp_topic_view($id, $mode, $action)
if (!sizeof($topic_info))
{
trigger_error($user->lang['TOPIC_NOT_EXIST']);
trigger_error('TOPIC_NOT_EXIST');
}
$topic_info = $topic_info[$topic_id];
@@ -439,7 +439,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
if (!sizeof($post_id_list))
{
trigger_error($user->lang['NO_POST_SELECTED']);
trigger_error('NO_POST_SELECTED');
}
$icon_id = request_var('icon', 0);

View File

@@ -203,19 +203,19 @@ class mcp_warn
if (!$user_row)
{
trigger_error($user->lang['NO_POST']);
trigger_error('NO_POST');
}
// There is no point issuing a warning to ignored users (ie anonymous and bots)
if ($user_row['user_type'] == USER_IGNORE)
{
trigger_error($user->lang['CANNOT_WARN_ANONYMOUS']);
trigger_error('CANNOT_WARN_ANONYMOUS');
}
// Prevent someone from warning themselves
if ($user_row['user_id'] == $user->data['user_id'])
{
trigger_error($user->lang['CANNOT_WARN_SELF']);
trigger_error('CANNOT_WARN_SELF');
}
// Check if there is already a warning for this post to prevent multiple
@@ -229,7 +229,7 @@ class mcp_warn
if ($row)
{
trigger_error($user->lang['ALREADY_WARNED']);
trigger_error('ALREADY_WARNED');
}
$user_id = $user_row['user_id'];
@@ -325,7 +325,7 @@ class mcp_warn
// Prevent someone from warning themselves
if ($user_row['user_id'] == $user->data['user_id'])
{
trigger_error($user->lang['CANNOT_WARN_SELF']);
trigger_error('CANNOT_WARN_SELF');
}
$user_id = $user_row['user_id'];

View File

@@ -1515,7 +1515,7 @@ class parse_message extends bbcode_firstpass
if (sizeof($not_orphan))
{
trigger_error($user->lang['NO_ACCESS_ATTACHMENT'], E_USER_ERROR);
trigger_error('NO_ACCESS_ATTACHMENT', E_USER_ERROR);
}
// Regenerate newly uploaded attachments
@@ -1541,7 +1541,7 @@ class parse_message extends bbcode_firstpass
if (sizeof($orphan))
{
trigger_error($user->lang['NO_ACCESS_ATTACHMENT'], E_USER_ERROR);
trigger_error('NO_ACCESS_ATTACHMENT', E_USER_ERROR);
}
ksort($this->attachment_data);

View File

@@ -309,7 +309,7 @@ class ucp_register
// This should not happen, because the required variables are listed above...
if ($user_id === false)
{
trigger_error($user->lang['NO_USER'], E_USER_ERROR);
trigger_error('NO_USER', E_USER_ERROR);
}
if ($coppa && $config['email_enable'])
@@ -460,7 +460,7 @@ class ucp_register
if ($config['max_reg_attempts'] && $attempts > $config['max_reg_attempts'])
{
trigger_error($user->lang['TOO_MANY_REGISTERS']);
trigger_error('TOO_MANY_REGISTERS');
}
$code = gen_rand_string(mt_rand(5, 8));