diff options
-rw-r--r-- | phpBB/adm/admin_attachments.php | 4 | ||||
-rw-r--r-- | phpBB/adm/admin_bbcodes.php | 10 | ||||
-rw-r--r-- | phpBB/adm/admin_groups.php | 4 | ||||
-rw-r--r-- | phpBB/adm/index.php | 35 | ||||
-rw-r--r-- | phpBB/adm/swatch.php | 12 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 56 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_forum.php | 10 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 32 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 4 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 11 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 5 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 5 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_options.php | 26 | ||||
-rw-r--r-- | phpBB/language/en/admin.php | 4 | ||||
-rw-r--r-- | phpBB/language/en/posting.php | 6 | ||||
-rw-r--r-- | phpBB/mcp.php | 31 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/ucp_pm_options.html | 2 |
17 files changed, 145 insertions, 112 deletions
diff --git a/phpBB/adm/admin_attachments.php b/phpBB/adm/admin_attachments.php index 02a024f541..1b538593bc 100644 --- a/phpBB/adm/admin_attachments.php +++ b/phpBB/adm/admin_attachments.php @@ -361,8 +361,8 @@ if ($submit && $mode == 'ext_groups') if ($submit && $mode == 'orphan') { - $delete_files = (isset($_POST['delete'])) ? array_keys(request_var('delete', '')) : array(); - $add_files = (isset($_POST['add'])) ? array_keys(request_var('add', '')) : array(); + $delete_files = (isset($_POST['delete'])) ? array_keys(request_var('delete', array('' => 0))) : array(); + $add_files = (isset($_POST['add'])) ? array_keys(request_var('add', array('' => 0))) : array(); $post_ids = request_var('post_id', 0); foreach ($delete_files as $delete) diff --git a/phpBB/adm/admin_bbcodes.php b/phpBB/adm/admin_bbcodes.php index 642e863d92..782191de87 100644 --- a/phpBB/adm/admin_bbcodes.php +++ b/phpBB/adm/admin_bbcodes.php @@ -186,7 +186,7 @@ switch ($mode) if ($mode == 'create') { - // TODO: look for SQL incompatibilities + /* TODO: look for SQL incompatibilities // NOTE: I'm sure there was another simpler (and obvious) way of finding a suitable bbcode_id $sql = 'SELECT b1.bbcode_id FROM ' . BBCODES_TABLE . ' b1, ' . BBCODES_TABLE . ' b2 @@ -197,6 +197,12 @@ switch ($mode) $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); +*/ + $sql = 'SELECT MAX(bbcode_id) as bbcode_id + FROM ' . BBCODES_TABLE; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); if ($row) { @@ -327,7 +333,7 @@ function build_regexp($msg_bbcode, $msg_html) $tokens = array( 'URL' => array( - '!([a-z0-9]+://)?(.*?[^ \t\n\r<"]*)!ise' => "(('\$1') ? '\$1\$2' : 'http://\$2')" + '!([a-z0-9]+://)?([^?].*?[^ \t\n\r<"]*)!ie' => "(('\$1') ? '\$1\$2' : 'http://\$2')" ), 'LOCAL_URL' => array( '!([^:]+/[^ \t\n\r<"]*)!' => '$1' diff --git a/phpBB/adm/admin_groups.php b/phpBB/adm/admin_groups.php index ae61af33f9..9187b66ddc 100644 --- a/phpBB/adm/admin_groups.php +++ b/phpBB/adm/admin_groups.php @@ -41,8 +41,8 @@ if (!$auth->acl_get('a_group')) $mode = request_var('mode', ''); $action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', '')); $group_id = request_var('g', 0); -$mark_ary = request_var('mark', 0); -$name_ary = request_var('usernames', ''); +$mark_ary = request_var('mark', array(0)); +$name_ary = request_var('usernames', array('' => 0)); $leader = request_var('leader', 0); $default = request_var('default', 0); $start = request_var('start', 0); diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index c7fd63253b..a1f683b4bb 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -129,7 +129,7 @@ else if ($pane == 'left') elseif ($pane == 'right') { $action = request_var('action', ''); - $mark = (isset($_REQUEST['mark'])) ? implode(', ', request_var('mark', 0)) : ''; + $mark = (isset($_REQUEST['mark'])) ? implode(', ', request_var('mark', array(0))) : ''; if ($mark) { @@ -142,16 +142,37 @@ elseif ($pane == 'right') trigger_error($user->lang['NO_ADMIN']); } - $sql = ($action == 'activate') ? 'UPDATE ' . USERS_TABLE . ' SET user_type = ' . USER_NORMAL . " WHERE user_id IN ($mark)" : 'DELETE FROM ' . USERS_TABLE . " WHERE user_id IN ($mark)"; - $db->sql_query($sql); + $sql = 'SELECT username + FROM ' . USERS_TABLE . " + WHERE user_id IN ($mark)"; + $result = $db->sql_query($sql); + + $user_affected = array(); + while ($row = $db->sql_fetchrow($result)) + { + $user_affected[] = $row['username']; + } + $db->sql_freeresult($result); + + if ($action == 'activate') + { + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_type = ' . USER_NORMAL . " WHERE user_id IN ($mark)" + $db->sql_query($sql); + } + else if ($action == 'delete') + { + $sql = 'DELETE FROM ' . USER_GROUP_TABLE . " WHERE user_id IN ($mark)"; + $db->sql_query($sql); + $sql = 'DELETE FROM ' . USERS_TABLE . " WHERE user_id IN ($mark)"; + $db->sql_query($sql); + } - if (!$delete) + if ($action != 'delete') { set_config('num_users', $config['num_users'] + $db->sql_affectedrows(), true); } - $log_action = ($activate) ? 'log_index_activate' : 'log_index_delete'; - add_log('admin', $log_action, $db->sql_affectedrows()); + add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected)); break; case 'remind': @@ -617,7 +638,7 @@ elseif ($pane == 'right') } -?><option value="delete"><?php echo $user->lang['DELETE']; ?></option> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" /> </td> +?><option value="delete"><?php echo $user->lang['DELETE']; ?></option></select> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" /> </td> </tr> <?php diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php index d11f2edd25..fe43870a3d 100644 --- a/phpBB/adm/swatch.php +++ b/phpBB/adm/swatch.php @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> -<title>phpBB 2.2 Color Swatch</title> +<title>phpBB3 Color Swatch</title> <style type="text/css"> td { @@ -37,17 +37,17 @@ td { { color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); document.write('<td bgcolor="#' + color + '" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">'); - document.write('<a href="javascript:cell(\'' + color + '\');"><img src="../images/spacer.gif" width="15" height="12" border="0" alt="#' + color + '" title="#' + color + '" /></a>'); - document.writeln('</td>'); + document.write('<a href="javascript:cell(\'' + color + '\');"><img src="../images/spacer.gif" width="15" height="12" border="0" alt="#' + color + '" title="#' + color + '" \/><\/a>'); + document.writeln('<\/td>'); } } - document.writeln('</tr>'); + document.writeln('<\/tr>'); } - document.writeln('</table>'); + document.writeln('<\/table>'); function cell(color) { - opener.document.forms['<?php echo htmlspecialchars(addslashes($_GET['form'])); ?>'].<?php echo htmlspecialchars(addslashes($_GET['name'])); ?>.value = '#' + color; + opener.document.forms['<?php echo htmlspecialchars(addslashes($_GET['form'])); ?>'].<?php echo htmlspecialchars(addslashes($_GET['name'])); ?>.value = color; } //--> </script> diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d5accb90cf..2ed2331114 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -19,7 +19,6 @@ function set_var(&$result, $var, $type, $multibyte = false) if ($type == 'string') { $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r", '\xFF'), array("\n", "\n", ' '), $result))); -// $result = preg_replace("#\n{3,}#", "\n\n", $result); $result = (STRIP) ? stripslashes($result) : $result; if ($multibyte) { @@ -35,39 +34,52 @@ function set_var(&$result, $var, $type, $multibyte = false) */ function request_var($var_name, $default, $multibyte = false) { - if (!isset($_REQUEST[$var_name])) + if (!isset($_REQUEST[$var_name]) || (is_array($_REQUEST[$var_name]) && !is_array($default)) || (is_array($default) && !is_array($_REQUEST[$var_name]))) { - return $default; + return (is_array($default)) ? array() : $default; } - else + + $var = $_REQUEST[$var_name]; + if (!is_array($default)) { - $var = $_REQUEST[$var_name]; $type = gettype($default); + } + else + { + list($key_type, $type) = each($default); + $type = gettype($type); + $key_type = gettype($key_type); + } - if (is_array($var)) + if (is_array($var)) + { + $_var = $var; + $var = array(); + + foreach ($_var as $k => $v) { - foreach ($var as $k => $v) + if (is_array($v)) { - if (is_array($v)) - { - foreach ($v as $_k => $_v) - { - set_var($var[$k][$_k], $_v, $type, $multibyte); - } - } - else + foreach ($v as $_k => $_v) { - set_var($var[$k], $v, $type, $multibyte); + set_var($k, $k, $key_type); + set_var($_k, $_k, $key_type); + set_var($var[$k][$_k], $_v, $type, $multibyte); } } + else + { + set_var($k, $k, $key_type); + set_var($var[$k], $v, $type, $multibyte); + } } - else - { - set_var($var, $var, $type, $multibyte); - } - - return $var; } + else + { + set_var($var, $var, $type, $multibyte); + } + + return $var; } /** diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 56f76b5455..70548faafc 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -25,16 +25,16 @@ function mcp_forum_view($id, $mode, $action, $url, $forum_info) $forum_id = $forum_info['forum_id']; $start = request_var('start', 0); - $topic_id_list = request_var('topic_id_list', 0); - $post_id_list = request_var('post_id_list', 0); + $topic_id_list = request_var('topic_id_list', array(0)); + $post_id_list = request_var('post_id_list', array(0)); $topic_id = request_var('t', 0); // Resync Topics if ($action == 'resync') { - $topic_ids = get_array('topic_id_list', 0); + $topic_ids = request_var('topic_id_list', array(0)); - if (!$topic_ids) + if (!sizeof($topic_ids)) { $template->assign_var('MESSAGE', $user->lang['NO_TOPIC_SELECTED']); } @@ -45,7 +45,7 @@ function mcp_forum_view($id, $mode, $action, $url, $forum_info) } $selected_ids = ''; - if ($post_id_list) + if (sizeof($post_id_list)) { foreach ($post_id_list as $num => $post_id) { diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index a86bc7c8fc..29094ae631 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -33,9 +33,9 @@ class mcp_main extends module { case 'lock': case 'unlock': - $topic_ids = get_array((!$quickmod) ? 'topic_id_list' : 't', 0); + $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0)); - if (!$topic_ids) + if (!sizeof($topic_ids)) { trigger_error('NO_TOPIC_SELECTED'); } @@ -46,9 +46,9 @@ class mcp_main extends module case 'lock_post': case 'unlock_post': - $post_ids = get_array((!$quickmod) ? 'post_id_list' : 'p', 0); - - if (!$post_ids) + $post_ids = (!$quickmod) ? request_var('post_id_list', array(0)) : array(request_var('p', 0)); + + if (!sizeof($post_ids)) { trigger_error('NO_POST_SELECTED'); } @@ -61,9 +61,9 @@ class mcp_main extends module case 'make_global': case 'make_normal': - $topic_ids = get_array((!$quickmod) ? 'topic_id_list' : 't', 0); + $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0)); - if (!$topic_ids) + if (!sizeof($topic_ids)) { trigger_error('NO_TOPIC_SELECTED'); } @@ -75,9 +75,9 @@ class mcp_main extends module case 'move': $user->add_lang('viewtopic'); - $topic_ids = get_array((!$quickmod) ? 'topic_id_list' : 't', 0); + $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0)); - if (!$topic_ids) + if (!sizeof($topic_ids)) { trigger_error('NO_TOPIC_SELECTED'); } @@ -89,9 +89,9 @@ class mcp_main extends module case 'fork': $user->add_lang('viewtopic'); - $topic_ids = get_array((!$quickmod) ? 'topic_id_list' : 't', 0); + $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0)); - if (!$topic_ids) + if (!sizeof($topic_ids)) { trigger_error('NO_TOPIC_SELECTED'); } @@ -103,9 +103,9 @@ class mcp_main extends module case 'delete_topic': $user->add_lang('viewtopic'); - $topic_ids = get_array((!$quickmod) ? 'topic_id_list' : 't', 0); + $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0)); - if (!$topic_ids) + if (!sizeof($topic_ids)) { trigger_error('NO_TOPIC_SELECTED'); } @@ -116,9 +116,9 @@ class mcp_main extends module case 'delete_post': $user->add_lang('posting'); - $post_ids = get_array((!$quickmod) ? 'post_id_list' : 'p', 0); - - if (!$post_ids) + $post_ids = (!$quickmod) ? request_var('post_id_list', array(0)) : array(request_var('p', 0)); + + if (!sizeof($post_ids)) { trigger_error('NO_POST_SELECTED'); } diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index c62e29ee38..1f50e3456b 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -31,9 +31,9 @@ class mcp_queue extends module include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); - $post_id_list = get_array('post_id_list', 0); + $post_id_list = request_var('post_id_list', array(0)); - if (!$post_id_list) + if (!sizeof($post_id_list)) { trigger_error('NO_POST_SELECTED'); } diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 31c79250f1..e4879288a7 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -34,8 +34,7 @@ function mcp_topic_view($id, $mode, $action, $url) $start = request_var('start', 0); $to_topic_id = request_var('to_topic_id', 0); $to_forum_id = request_var('to_forum_id', 0); - - $post_id_list = get_array('post_id_list', 0); + $post_id_list = request_var('post_id_list', array(0)); // Split Topic? if ($action == 'split_all' || $action == 'split_beyond') @@ -218,10 +217,10 @@ function split_topic($mode, $topic_id, $to_forum_id, $subject) { global $db, $template, $user, $phpEx, $SID, $phpbb_root_path, $auth; - $post_id_list = get_array('post_id_list', 0); + $post_id_list = request_var('post_id_list', array(0)); $start = request_var('start', 0); - if (!$post_id_list) + if (!sizeof($post_id_list)) { trigger_error('NO_POST_SELECTED'); } @@ -414,10 +413,10 @@ function merge_posts($topic_id, $to_topic_id) $topic_data = $topic_data[$to_topic_id]; - $post_id_list = get_array('post_id_list', 0); + $post_id_list = request_var('post_id_list', array(0)); $start = request_var('start', 0); - if (!$post_id_list) + if (!sizeof($post_id_list)) { $template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']); return; diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 4a98ea2829..f236f5dd9d 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -687,9 +687,8 @@ class ucp_main extends module if ($submit && $edit) { - $draft_subject = preg_replace('#&(\#[0-9]+;)#', '&\1', request_var('subject', '')); - $draft_message = (isset($_POST['message'])) ? htmlspecialchars(trim(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message']))) : ''; - $draft_message = preg_replace('#&(\#[0-9]+;)#', '&\1', $draft_message); + $draft_subject = request_var('subject', '', true); + $draft_message = request_var('message', '', true); if ($draft_message && $draft_subject) { diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 33ee31b22c..80a9c7676e 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -333,10 +333,9 @@ function compose_pm($id, $mode, $action) // Save Draft if ($save && $auth->acl_get('u_savedrafts')) { - $subject = preg_replace('#&(\#[0-9]+;)#', '&\1', request_var('subject', '')); + $subject = request_var('subject', '', true); $subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $subject; - $message = (isset($_POST['message'])) ? htmlspecialchars(trim(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message']))) : ''; - $message = preg_replace('#&(\#[0-9]+;)#', '&\1', $message); + $message = request_var('message', '', true); if ($subject && $message) { diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index 253547cd47..129c6cb84f 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -418,7 +418,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $rule_option = request_var('rule_option', 0); $cond_option = request_var('cond_option', ''); $action_option = request_var('action_option', ''); - $back = (isset($_REQUEST['back'])) ? request_var('back', '') : array(); + $back = (isset($_REQUEST['back'])) ? request_var('back', array('' => 0)) : array(); if (sizeof($back)) { @@ -576,7 +576,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; + global $db, $template, $auth; $template->assign_vars(array( 'S_COND_DEFINED' => true, @@ -657,15 +657,35 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule $rule_group_id = request_var('rule_group_id', 0); $rule_string = request_var('rule_string', ''); + $sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')'; + $sql = 'SELECT group_id, group_name, group_type + FROM ' . GROUPS_TABLE . " + WHERE group_type $sql_and + ORDER BY group_type DESC, group_name"; + $result = $db->sql_query($sql); + + $s_group_options = ''; + while ($row = $db->sql_fetchrow($result)) + { + if ($rule_group_id && ($row['group_id'] == $rule_group_id)) + { + $rule_string = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']); + } + + $s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : ''; + $s_group_options .= '<option value="' . $row['group_id'] . '"' . $s_selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>'; + } + $db->sql_freeresult($result); + $template->assign_vars(array( 'S_GROUP_CONDITION' => true, + 'S_GROUP_OPTIONS' => $s_group_options, 'CURRENT_STRING' => $rule_string, 'CURRENT_USER_ID' => 0, 'CURRENT_GROUP_ID' => $rule_group_id) ); $current_value = $rule_string; - break; default: diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php index 57a0c99ab7..4e30b799b8 100644 --- a/phpBB/language/en/admin.php +++ b/phpBB/language/en/admin.php @@ -136,8 +136,8 @@ $lang += array( 'CONFIRM_OPERATION' => 'Are you sure you wish to carry out this operation?', - 'log_index_activate' => '<b>Activated inactive users</b><br />» %s users', - 'log_index_delete' => '<b>Deleted inactive users</b><br />» %s', + 'LOG_INDEX_ACTIVATE' => '<b>Activated inactive users</b><br />» %s', + 'LOG_INDEX_DELETE' => '<b>Deleted inactive users</b><br />» %s', 'LOG_INDEX_REMIND' => '<b>Sent reminder emails to inactive users</b><br />» %s', 'LOG_USER_INACTIVE' => '<b>User deactivated</b><br />» %s', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 8aa8228256..e52f2afe89 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -85,7 +85,7 @@ $lang += array( 'EDIT_POST' => 'Edit Post', 'EDIT_REASON' => 'Reason for editing this post', - 'SMILIES' => 'Smilies', + 'EMPTY_FILEUPLOAD' => 'The uploaded file is empty', 'EMPTY_MESSAGE' => 'You must enter a message when posting.', 'EMPTY_REMOTE_DATA' => 'File could not be uploaded, please try uploading the file manually.', @@ -114,7 +114,8 @@ $lang += array( 'LOAD' => 'Load', 'LOAD_DRAFT' => 'Load Draft', 'LOAD_DRAFT_EXPLAIN' => 'Here you are able to select the draft you want to continue writing. Your current post will be canceled, all current post contents will be deleted. View, edit and delete drafts within your User Control Panel.', - + 'LOGIN_EXPLAIN_POST' => 'You need to login in order to post within this forum', + 'MESSAGE_BODY_EXPLAIN' => 'Enter your message here, it may contain no more than <b>%d</b> characters.', 'MESSAGE_DELETED' => 'Your message has been deleted successfully', 'MORE_SMILIES' => 'View more smilies', @@ -158,6 +159,7 @@ $lang += array( 'SAVE' => 'Save', 'SAVE_DATE' => 'Saved at', + 'SMILIES' => 'Smilies', 'SMILIES_ARE_OFF' => 'Smilies are <u>OFF</u>', 'SMILIES_ARE_ON' => 'Smilies are <u>ON</u>', 'STICKY_ANNOUNCE_TIME_LIMIT'=> 'Sticky/Announcement time limit', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index f5ce9ea16c..49c8526e2a 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -326,11 +326,13 @@ if (!$user->data['is_registered']) $quickmod = (isset($_REQUEST['quickmod'])) ? true : false; $action = request_var('action', ''); +$action_ary = request_var('action', array('' => 0)); -if (is_array($action)) +if (sizeof($action_ary)) { list($action, ) = each($action); } +unset($action_ary); if ($action == 'merge_select') { @@ -439,33 +441,6 @@ switch ($mode) // LITTLE HELPER /** -* request_var, the array way -*/ -function get_array($var, $default_value) -{ - $ids = request_var($var, $default_value); - - if (!is_array($ids)) - { - if (!$ids) - { - return $default_value; - } - - $ids = array($ids); - } - - $ids = array_unique($ids); - - if (sizeof($ids) == 1 && !$ids[0]) - { - return $default_value; - } - - return $ids; -} - -/** * Build simple hidden fields from array */ function build_hidden_fields($field_ary) diff --git a/phpBB/styles/subSilver/template/ucp_pm_options.html b/phpBB/styles/subSilver/template/ucp_pm_options.html index 8741ae7b4c..11926cc234 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_options.html +++ b/phpBB/styles/subSilver/template/ucp_pm_options.html @@ -46,7 +46,7 @@ <!-- ELSEIF S_USER_CONDITION --> <input type="text" class="post" name="rule_string" value="{CURRENT_STRING}" maxlength="50" size="20" /> <span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="window.open('{U_FIND_USERNAME}', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;">{L_FIND_USERNAME}</a> ]</span> <!-- ELSEIF S_GROUP_CONDITION --> - SELECT GROUP + <input type="hidden" name="rule_string" value="{CURRENT_STRING}" /><!-- IF S_GROUP_OPTIONS --><select name="rule_group_id">{S_GROUP_OPTIONS}</select><!-- ELSE -->{L_NO_GROUPS}<!-- ENDIF --> <!-- ENDIF --> <!-- ELSE --> <b class="gen">{COND_CURRENT}</b> |