mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
- a bunch of bugfixes. :P
git-svn-id: file:///svn/phpbb/trunk@5678 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -756,6 +756,7 @@ class acp_attachments
|
||||
ORDER BY allow_group DESC, group_name';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$act_deact = 'activate';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$s_add_spacer = ($row['allow_group'] == 0 && $act_deact == 'deactivate') ? true : false;
|
||||
|
@@ -243,11 +243,11 @@ class acp_bbcodes
|
||||
)
|
||||
);
|
||||
|
||||
$pad = 0;
|
||||
$modifiers = 'i';
|
||||
|
||||
if (preg_match_all('/\{(' . implode('|', array_keys($tokens)) . ')[0-9]*\}/i', $msg_bbcode, $m))
|
||||
{
|
||||
$pad = 0;
|
||||
$modifiers = 'i';
|
||||
|
||||
foreach ($m[0] as $n => $token)
|
||||
{
|
||||
$token_type = $m[1][$n];
|
||||
|
@@ -129,12 +129,12 @@ class acp_database
|
||||
|
||||
for ($j = 0; $j < $fields_cnt; $j++)
|
||||
{
|
||||
$field_set[$j] = $field[$j]->name;
|
||||
$field_set[$j] = $field[$j]->name;
|
||||
}
|
||||
|
||||
$fields = implode(', ', $field_set);
|
||||
$values = array();
|
||||
$schema_insert = 'INSERT INTO ' . $name . ' (' . $fields . ') VALUES (';
|
||||
$schema_insert = 'INSERT INTO ' . $table_name . ' (' . $fields . ') VALUES (';
|
||||
|
||||
while ($row = mysqli_fetch_row($result))
|
||||
{
|
||||
|
@@ -208,8 +208,8 @@ class acp_icons
|
||||
$image_width = (isset($_POST['width'])) ? array_map('intval', $_POST['width']) : array();
|
||||
$image_height = (isset($_POST['height'])) ? array_map('intval', $_POST['height']) : array();
|
||||
$image_add = (isset($_POST['add_img'])) ? array_map('intval', $_POST['add_img']) : array();
|
||||
$image_emotion = request_var('emotion', '');
|
||||
$image_code = request_var('code', '');
|
||||
$image_emotion = request_var('emotion', array('' => ''));
|
||||
$image_code = request_var('code', array('' => ''));
|
||||
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? array_map('intval', $_POST['display_on_posting']) : array();
|
||||
|
||||
foreach ($images as $image)
|
||||
|
@@ -153,7 +153,7 @@ class acp_language
|
||||
'S_CONNECTION_SUCCESS' => (request_var('test_connection', '') && $test_connection === true) ? true : false,
|
||||
'S_CONNECTION_FAILED' => (request_var('test_connection', '') && $test_connection === false) ? true : false
|
||||
));
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'update_details':
|
||||
|
||||
@@ -302,7 +302,7 @@ class acp_language
|
||||
}
|
||||
}
|
||||
|
||||
$footer = ");\n\n?>";
|
||||
$footer = "));\n\n?>";
|
||||
fwrite($fp, $footer);
|
||||
}
|
||||
|
||||
@@ -592,6 +592,7 @@ class acp_language
|
||||
}
|
||||
else
|
||||
{
|
||||
$help = array();
|
||||
include($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store));
|
||||
|
||||
if ($is_help_file)
|
||||
@@ -1026,12 +1027,12 @@ $lang = array_merge($lang, array(
|
||||
{
|
||||
$tpl .= '
|
||||
<tr>
|
||||
<td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td>
|
||||
<td class="row1" style="white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td>
|
||||
<td class="row2">';
|
||||
|
||||
if ($input_field)
|
||||
{
|
||||
$tpl .= '<input type="text" name="entry[' . $key . '][' . $_key . ']" value="' . htmlspecialchars($_value) . '" style="width: 99%" />';
|
||||
$tpl .= '<input type="text" name="entry[' . $key . '][' . $_key . ']" value="' . htmlspecialchars($_value) . '" size="50" />';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1051,12 +1052,12 @@ $lang = array_merge($lang, array(
|
||||
{
|
||||
$tpl .= '
|
||||
<tr>
|
||||
<td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td>
|
||||
<td class="row1" style="white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td>
|
||||
<td class="row2">';
|
||||
|
||||
if ($input_field)
|
||||
{
|
||||
$tpl .= '<input type="text" name="entry[' . $key . ']" value="' . htmlspecialchars($value) . '" style="width: 99%" />';
|
||||
$tpl .= '<input type="text" name="entry[' . $key . ']" value="' . htmlspecialchars($value) . '" size="50" />';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -131,8 +131,6 @@ class acp_main
|
||||
|
||||
$messenger->save_queue();
|
||||
|
||||
unset($email_list);
|
||||
|
||||
add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames));
|
||||
unset($usernames);
|
||||
}
|
||||
@@ -343,6 +341,7 @@ class acp_main
|
||||
);
|
||||
|
||||
$log_data = array();
|
||||
$log_count = 0;
|
||||
|
||||
if ($auth->acl_get('a_viewlogs'))
|
||||
{
|
||||
|
@@ -32,7 +32,8 @@ class acp_permissions
|
||||
$this->tpl_name = 'acp_permissions';
|
||||
|
||||
// Set some vars
|
||||
$action = key(request_var('action', array('' => 0)));
|
||||
$action = request_var('action', array('' => 0));
|
||||
$action = key($action);
|
||||
$action = (isset($_POST['psubmit'])) ? 'apply_permissions' : $action;
|
||||
|
||||
$all_forums = request_var('all_forums', 0);
|
||||
@@ -218,7 +219,7 @@ class acp_permissions
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SELECT_FORUM' => true,
|
||||
'S_FORUM_OPTIONS' => make_forum_select(false, false, true))
|
||||
'S_FORUM_OPTIONS' => make_forum_select(false, false, true, false, false))
|
||||
);
|
||||
|
||||
break;
|
||||
@@ -231,7 +232,7 @@ class acp_permissions
|
||||
continue 2;
|
||||
}
|
||||
|
||||
$forum_list = make_forum_select(false, false, true, false, true, true);
|
||||
$forum_list = make_forum_select(false, false, true, false, false, true);
|
||||
|
||||
// Build forum options
|
||||
$s_forum_options = '';
|
||||
|
@@ -295,7 +295,7 @@ class acp_prune
|
||||
{
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET poster_id = ' . ANONYMOUS . ", post_username = '" . $db->sql_escape($usernames[$i]) . "'
|
||||
WHERE user_id = " . $userids[$i];
|
||||
WHERE user_id = " . $user_ids[$i];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
@@ -465,6 +465,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
||||
'polls' => array(
|
||||
'poll_left', 'poll_center', 'poll_right',),
|
||||
);
|
||||
|
||||
foreach ($imglist as $category => $img_ary)
|
||||
{
|
||||
if (in_array($imgname, $img_ary))
|
||||
@@ -492,7 +493,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
||||
$imgpath = preg_replace('/^([^\/]+\/)/', '{LANG}/', $imgpath) . $imgheight . $imgwidth;
|
||||
|
||||
$sql = 'UPDATE ' . STYLES_IMAGE_TABLE . "
|
||||
SET $imgname = '$imgpath'
|
||||
SET $imgname = '" . $db->sql_escape($imgpath) . "'
|
||||
WHERE imageset_id = $style_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
@@ -1801,27 +1802,27 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
||||
global $config, $db, $user;
|
||||
|
||||
$element_ary = array('template', 'theme', 'imageset');
|
||||
|
||||
|
||||
if (!$name)
|
||||
{
|
||||
$error[] = $user->lang[$l_type . '_ERR_STYLE_NAME'];
|
||||
$error[] = $user->lang['STYLE_ERR_STYLE_NAME'];
|
||||
}
|
||||
|
||||
// Check if the character set is allowed
|
||||
if (!preg_match('/^[a-z0-9_\-\+ ]+$/i', $name))
|
||||
{
|
||||
$error[] = $user->lang[$l_type . '_ERR_NAME_CHARS'];
|
||||
$error[] = $user->lang['STYLE_ERR_NAME_CHARS'];
|
||||
}
|
||||
|
||||
// Check length settings
|
||||
if (strlen($name) > 30)
|
||||
{
|
||||
$error[] = $user->lang[$l_type . '_ERR_NAME_LONG'];
|
||||
$error[] = $user->lang['STYLE_ERR_NAME_LONG'];
|
||||
}
|
||||
|
||||
if (strlen($copyright) > 60)
|
||||
{
|
||||
$error[] = $user->lang[$l_type . '_ERR_COPY_LONG'];
|
||||
$error[] = $user->lang['STYLE_ERR_COPY_LONG'];
|
||||
}
|
||||
|
||||
// Check if the name already exist
|
||||
@@ -1834,7 +1835,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$error[] = $user->lang[$l_type . '_ERR_NAME_EXIST'];
|
||||
$error[] = $user->lang['STYLE_ERR_NAME_EXIST'];
|
||||
}
|
||||
|
||||
if (sizeof($error))
|
||||
|
@@ -147,6 +147,17 @@ class acp_users
|
||||
trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
|
||||
// Check if the user wants to remove himself or the guest user account
|
||||
if ($user_id == ANONYMOUS)
|
||||
{
|
||||
trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
|
||||
if ($user_id == $user->data['user_id'])
|
||||
{
|
||||
trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
user_delete($delete_type, $user_id);
|
||||
@@ -1225,6 +1236,7 @@ class acp_users
|
||||
|
||||
$avatar_select = basename(request_var('avatar_select', ''));
|
||||
$category = basename(request_var('category', ''));
|
||||
$can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
|
||||
|
||||
$data = array();
|
||||
|
||||
@@ -1320,8 +1332,6 @@ class acp_users
|
||||
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
|
||||
}
|
||||
|
||||
$can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
|
||||
|
||||
// Generate users avatar
|
||||
if ($user_row['user_avatar'])
|
||||
{
|
||||
|
Reference in New Issue
Block a user