diff options
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 6 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_icons.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 13 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_main.php | 3 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_permissions.php | 7 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_prune.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 15 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 14 |
10 files changed, 41 insertions, 28 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 8097e9b2d3..2c5f04faf1 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -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; diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index efa0249ff7..a63eb58c2c 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -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]; diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index b34e490734..bf14f6b1e2 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -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)) { diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index 44e9f450a5..7b683186ee 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -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) diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 4bb5958501..dd769319f6 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -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 { diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index a73a83e1bb..9c1c32fb24 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -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')) { diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index f3020bcaf0..99143387d6 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -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 = ''; diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index f5972da0e9..1fd98af67f 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -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); } diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index c5dc6ae154..d7fe6b4ff7 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -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)) diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 4dcf128452..653c33f5da 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -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']) { |