From ddddda47fb414095371b80f0873dee3986d0d308 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 26 Jan 2007 16:09:51 +0000 Subject: [PATCH] - fix some oddities (doubled spaces for example) - changed the way make_forum_select() is returning the forum list - now including skipped forums but being disabled. This should make identifying the correct forum much more easier. - Changed some permission namings based on suggestions by the community - Tried to comply to the permission field ordering within the language files while displaying permission sets. Hopefully it's worth the additional processing time. - Disable submit buttons after clicking for installation and conversions. git-svn-id: file:///svn/phpbb/trunk@6930 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/index.php | 2 +- phpBB/adm/style/acp_forums.html | 2 +- phpBB/adm/style/acp_search.html | 2 +- phpBB/adm/style/acp_users.html | 6 +-- phpBB/adm/style/admin.css | 5 +++ phpBB/adm/style/install_convert.html | 2 +- phpBB/adm/style/install_install.html | 2 +- phpBB/docs/coding-guidelines.html | 2 +- phpBB/includes/acp/acp_attachments.php | 2 +- phpBB/includes/acp/acp_ban.php | 2 +- phpBB/includes/acp/acp_database.php | 8 ++-- phpBB/includes/acp/acp_language.php | 3 +- phpBB/includes/acp/acp_permission_roles.php | 2 +- phpBB/includes/acp/acp_permissions.php | 11 +++-- phpBB/includes/acp/acp_reasons.php | 2 +- phpBB/includes/acp/acp_styles.php | 2 +- phpBB/includes/acp/acp_users.php | 15 ++----- phpBB/includes/acp/auth.php | 25 ++++++++++- phpBB/includes/cache.php | 4 +- phpBB/includes/captcha/captcha_gd.php | 2 +- phpBB/includes/db/dbal.php | 2 +- phpBB/includes/db/firebird.php | 2 +- phpBB/includes/db/postgres.php | 2 +- phpBB/includes/functions.php | 6 +-- phpBB/includes/functions_admin.php | 41 ++++++++++--------- phpBB/includes/functions_convert.php | 4 +- phpBB/includes/functions_messenger.php | 2 +- phpBB/includes/functions_posting.php | 2 +- phpBB/includes/functions_template.php | 4 +- phpBB/includes/functions_transfer.php | 2 +- phpBB/includes/functions_user.php | 17 +++++--- phpBB/includes/mcp/mcp_front.php | 2 +- phpBB/includes/session.php | 2 +- phpBB/includes/ucp/ucp_profile.php | 2 +- phpBB/includes/ucp/ucp_register.php | 4 +- phpBB/includes/ucp/ucp_remind.php | 2 +- phpBB/includes/ucp/ucp_resend.php | 2 +- phpBB/includes/utf/utf_tools.php | 4 +- phpBB/install/install_convert.php | 3 +- phpBB/language/en/acp/email.php | 2 +- phpBB/language/en/acp/modules.php | 2 +- phpBB/language/en/acp/permissions_phpbb.php | 18 ++++---- phpBB/language/en/acp/posting.php | 4 +- phpBB/language/en/acp/search.php | 2 +- phpBB/language/en/help_bbcode.php | 2 +- phpBB/language/en/help_faq.php | 4 +- phpBB/language/en/install.php | 2 +- phpBB/language/en/ucp.php | 17 -------- phpBB/memberlist.php | 6 +-- phpBB/search.php | 6 +-- .../styles/subSilver/template/login_body.html | 4 +- .../styles/subSilver/template/mcp_topic.html | 2 +- .../subSilver/template/memberlist_im.html | 2 +- .../subSilver/template/posting_body.html | 4 +- .../subSilver/template/posting_buttons.html | 6 +-- .../subSilver/template/ucp_attachments.html | 2 +- .../template/ucp_pm_message_footer.html | 2 +- .../subSilver/template/ucp_register.html | 8 ++-- phpBB/viewtopic.php | 6 +-- 59 files changed, 163 insertions(+), 144 deletions(-) diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index e4b96895fa..e441b9ff7f 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -181,7 +181,7 @@ function adm_page_footer($copyright_html = true) $db->sql_report('display'); } - $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); + $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); if ($auth->acl_get('a_') && defined('DEBUG_EXTRA')) { diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 1a407fbc85..5bbd235c04 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -234,7 +234,7 @@

{L_AUTO_PRUNE_VIEWED_EXPLAIN}
-
{L_DAYS}
+
{L_DAYS}

{L_PRUNE_OLD_POLLS_EXPLAIN}
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html index cc10cc7596..b63226f4e1 100644 --- a/phpBB/adm/style/acp_search.html +++ b/phpBB/adm/style/acp_search.html @@ -33,7 +33,7 @@

{L_SEARCH_STORE_RESULTS_EXPLAIN}
-
{L_SECONDS}
+
{L_SECONDS}
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 0c98b04e6b..712602b7bd 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -600,7 +600,7 @@ var help_line = { - + @@ -609,12 +609,12 @@ var help_line = { - {L_FONT_SIZE}: - +

diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 29c6799ba8..3f655663a0 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -879,6 +879,11 @@ a.button2, a.button2:link, a.button2:visited, a.button2:active { padding: 4px 8px; } +input.disabled { + font-weight: normal; + color: #666; +} + /* Action Highlighting ---------------------------------------- */ .success { diff --git a/phpBB/adm/style/install_convert.html b/phpBB/adm/style/install_convert.html index 18b81ed3e6..068a8f230e 100755 --- a/phpBB/adm/style/install_convert.html +++ b/phpBB/adm/style/install_convert.html @@ -115,7 +115,7 @@

{L_MESSAGE}

{S_HIDDEN} - + disabled="disabled" onclick="this.className = 'button1 disabled';" onsubmit="this.disabled = 'disabled';" name="submit" value="{L_SUBMIT}" />
diff --git a/phpBB/adm/style/install_install.html b/phpBB/adm/style/install_install.html index fb8c1bdf0c..075d026d95 100755 --- a/phpBB/adm/style/install_install.html +++ b/phpBB/adm/style/install_install.html @@ -68,7 +68,7 @@
{L_SUBMIT} {S_HIDDEN} - +
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 9126cedf0e..63d83a7c20 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1193,7 +1193,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; != [neq, ne] <> (same as !=) !== (not equivalent in value and type) -=== (equivalent in value and type) +=== (equivalent in value and type) > [gt] < [lt] >= [gte] diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 9d98646b81..23b67aadc7 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -198,7 +198,7 @@ class acp_attachments $value = ($row['site_ip']) ? $row['site_ip'] : $row['site_hostname']; if ($value) { - $defined_ips .= '' . $value . ''; + $defined_ips .= '' . $value . ''; $ips[$row['site_id']] = $value; } } diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php index bd05cf7b1c..b85b2d36d4 100644 --- a/phpBB/includes/acp/acp_ban.php +++ b/phpBB/includes/acp/acp_ban.php @@ -166,7 +166,7 @@ class acp_ban while ($row = $db->sql_fetchrow($result)) { - $banned_options .= '' . $row[$field] . ''; + $banned_options .= '' . $row[$field] . ''; $time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0; $ban_length[$row['ban_id']] = (isset($ban_end_text[$time_length])) ? $ban_end_text[$time_length] : $user->lang['UNTIL'] . ' -> ' . $user->format_date($row['ban_end']); diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index 2e75e59456..c5fadbfd0a 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -141,7 +141,7 @@ class acp_database $sql_data .= "#\n"; $sql_data .= "# phpBB Backup Script\n"; $sql_data .= "# Dump of tables for $table_prefix\n"; - $sql_data .= "# DATE : " . gmdate("d-m-Y H:i:s", $time) . " GMT\n"; + $sql_data .= "# DATE : " . gmdate("d-m-Y H:i:s", $time) . " GMT\n"; $sql_data .= "#\n"; switch ($db->sql_layer) @@ -1715,7 +1715,7 @@ class acp_database $sql_data .= "\nCREATE TABLE $table_name (\n"; - $sql = 'SELECT DISTINCT R.RDB$FIELD_NAME as FNAME, R.RDB$NULL_FLAG as NFLAG, R.RDB$DEFAULT_SOURCE as DSOURCE, F.RDB$FIELD_TYPE as FTYPE, F.RDB$FIELD_SUB_TYPE as STYPE, F.RDB$FIELD_LENGTH as FLEN + $sql = 'SELECT DISTINCT R.RDB$FIELD_NAME as FNAME, R.RDB$NULL_FLAG as NFLAG, R.RDB$DEFAULT_SOURCE as DSOURCE, F.RDB$FIELD_TYPE as FTYPE, F.RDB$FIELD_SUB_TYPE as STYPE, F.RDB$FIELD_LENGTH as FLEN FROM RDB$RELATION_FIELDS R JOIN RDB$FIELDS F ON R.RDB$FIELD_SOURCE=F.RDB$FIELD_NAME LEFT JOIN RDB$FIELD_DIMENSIONS D ON R.RDB$FIELD_SOURCE = D.RDB$FIELD_NAME @@ -1756,7 +1756,7 @@ class acp_database $sql_data .= "\n);;\n"; $keys = array(); - $sql = 'SELECT I.RDB$FIELD_NAME as NAME + $sql = 'SELECT I.RDB$FIELD_NAME as NAME FROM RDB$RELATION_CONSTRAINTS RC, RDB$INDEX_SEGMENTS I, RDB$INDICES IDX WHERE (I.RDB$INDEX_NAME = RC.RDB$INDEX_NAME) AND (IDX.RDB$INDEX_NAME = RC.RDB$INDEX_NAME) @@ -1849,7 +1849,7 @@ class acp_database case 'oracle': $sql_data .= "\nCREATE TABLE $table_name (\n"; - $sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT + $sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT FROM ALL_TAB_COLS WHERE table_name = '{$table_name}'"; $result = $db->sql_query($sql); diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 5064e1848f..b1f6554809 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -325,6 +325,7 @@ class acp_language if ($result === false) { // If failed, try to rename again and print error out... + $transfer->delete_file($lang_path . $file); $transfer->rename($lang_path . $file . '.bak', $lang_path . $file); trigger_error($user->lang['UPLOAD_FAILED'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id . '&language_file=' . urlencode($selected_lang_file)), E_USER_WARNING); @@ -922,7 +923,7 @@ class acp_language } $db->sql_freeresult($result); - $sql = 'SELECT * + $sql = 'SELECT * FROM ' . LANG_TABLE . ' ORDER BY lang_english_name'; $result = $db->sql_query($sql); diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php index fe583c5a4a..08a992957f 100644 --- a/phpBB/includes/acp/acp_permission_roles.php +++ b/phpBB/includes/acp/acp_permission_roles.php @@ -351,7 +351,7 @@ class acp_permission_roles $order_total = $order * 2 + (($action == 'move_up') ? -1 : 1); $sql = 'UPDATE ' . ACL_ROLES_TABLE . ' - SET role_order = ' . $order_total . " - role_order + SET role_order = ' . $order_total . " - role_order WHERE role_type = '" . $db->sql_escape($permission_type) . "' AND role_order IN ($order, " . (($action == 'move_up') ? $order - 1 : $order + 1) . ')'; $db->sql_query($sql); diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index 435125f3ee..c7e9e31d66 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -305,7 +305,7 @@ class acp_permissions $s_forum_options = ''; foreach ($forum_list as $f_id => $f_row) { - $s_forum_options .= ''; + $s_forum_options .= ''; } // Build subforum options @@ -488,6 +488,11 @@ class acp_permissions foreach ($forum_list as $key => $row) { + if ($row['disabled']) + { + continue; + } + $s_options .= ''; + $s_form_options .= ''; } $template->assign_vars(array( @@ -651,7 +651,7 @@ class acp_users 'email' => array( array('string', false, 6, 60), array('email', $user_row['user_email']) - ), + ), 'email_confirm' => array('string', true, 6, 60) ); } @@ -806,7 +806,7 @@ class acp_users $s_action_options = ''; foreach ($quick_tool_ary as $value => $lang) { - $s_action_options .= ''; + $s_action_options .= ''; } if ($config['load_onlinetrack']) @@ -1917,14 +1917,7 @@ class acp_users } $s_forum_options = ''; - - $forum_list = make_forum_select($forum_id, false, true, false, false, false, true); - - // Build forum options - foreach ($forum_list as $f_id => $f_row) - { - $s_forum_options .= ''; - } + $s_forum_options .= make_forum_select($forum_id, false, true, false, false, false); $template->assign_vars(array( 'S_PERMISSIONS' => true, diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 81ba5cd28b..b32d435d7b 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -323,6 +323,16 @@ class auth_admin extends auth if ($local) { $forum_names_ary = make_forum_select(false, false, true, false, false, false, true); + + // Remove the disabled ones, since we do not create an option field here... + foreach ($forum_names_ary as $key => $value) + { + if (!$value['disabled']) + { + continue; + } + unset($forum_names_ary[$key]); + } } else { @@ -956,7 +966,7 @@ class auth_admin extends auth $option_id_ary = array(); $table = ($mode == 'user') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE; - $id_field = $mode . '_id'; + $id_field = $mode . '_id'; $where_sql = array(); @@ -1070,6 +1080,19 @@ class auth_admin extends auth 'CAT_NAME' => $user->lang['permission_cat'][$cat]) ); + // Sort array + $key_array = array_intersect(array_keys($user->lang), array_map(create_function('$a', 'return "acl_" . $a;'), array_keys($cat_array['permissions']))); + $values_array = $cat_array['permissions']; + + $cat_array['permissions'] = array(); + + foreach ($key_array as $key) + { + $key = str_replace('acl_', '', $key); + $cat_array['permissions'][$key] = $values_array[$key]; + } + unset($key_array, $values_array); + @reset($cat_array['permissions']); while (list($permission, $allowed) = each($cat_array['permissions'])) { diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php index c5a4a080a5..a8931f3163 100644 --- a/phpBB/includes/cache.php +++ b/phpBB/includes/cache.php @@ -82,7 +82,7 @@ class cache extends acm if (($censors = $this->get('word_censors')) === false) { $sql = 'SELECT word, replacement - FROM ' . WORDS_TABLE; + FROM ' . WORDS_TABLE; $result = $db->sql_query($sql); $censors = array(); @@ -388,7 +388,7 @@ class cache extends acm global $db; $sql = 'SELECT disallow_username - FROM ' . DISALLOW_TABLE; + FROM ' . DISALLOW_TABLE; $result = $db->sql_query($sql); $usernames = array(); diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php index e76358d2a7..662d55f5f7 100644 --- a/phpBB/includes/captcha/captcha_gd.php +++ b/phpBB/includes/captcha/captcha_gd.php @@ -52,7 +52,7 @@ class captcha mt_srand($seed); // set background color - $back = imagecolorallocate($image, mt_rand(224, 255), mt_rand(224, 255), mt_rand(224, 255)); + $back = imagecolorallocate($image, mt_rand(224, 255), mt_rand(224, 255), mt_rand(224, 255)); imagefilledrectangle($image, 0, 0, $this->width, $this->height, $back); // allocates the 216 websafe color palette to the image diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index ffe5228665..da649ed812 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -498,7 +498,7 @@ class dbal $backtrace = get_backtrace(); $message .= ($sql) ? '

SQL

' . htmlspecialchars($sql) : ''; - $message .= ($backtrace) ? '

BACKTRACE
' . $backtrace : ''; + $message .= ($backtrace) ? '

BACKTRACE
' . $backtrace : ''; $message .= '
'; } else diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index 709145c4cf..5ce4949956 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -277,7 +277,7 @@ class dbal_firebird extends dbal { $sql = "SELECT GEN_ID(" . $tablename[1] . "_gen, 0) AS new_id FROM RDB\$DATABASE"; - if (!($temp_q_id = @ibase_query($this->db_connect_id, $sql))) + if (!($temp_q_id = @ibase_query($this->db_connect_id, $sql))) { return false; } diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index c0a8d930e1..f2e96260ba 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -268,7 +268,7 @@ class dbal_postgres extends dbal if (preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text, $tablename)) { $query = "SELECT currval('" . $tablename[1] . "_seq') AS last_value"; - $temp_q_id = @pg_query($this->db_connect_id, $query); + $temp_q_id = @pg_query($this->db_connect_id, $query); if (!$temp_q_id) { diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e3b7138189..5c2d77ced0 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -403,7 +403,7 @@ if (!function_exists('stripos')) * @param string $haystack is the string to search in * @param string $needle is the string to search for * - * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive. + * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive. * Note that the needle may be a string of one or more characters. * If needle is not found, stripos() will return boolean FALSE. */ @@ -3145,7 +3145,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', { $tpl = '{USERNAME}'; } - else if (!$profile_url && $username_colour) + else if (!$profile_url && $username_colour) { $tpl = '{USERNAME}'; } @@ -3731,7 +3731,7 @@ function page_footer($run_cron = true) $db->sql_report('display'); } - $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); + $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime); if ($auth->acl_get('a_') && defined('DEBUG_EXTRA')) { diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 31880d69cf..8e4865fa97 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -114,7 +114,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = ORDER BY left_id ASC'; $result = $db->sql_query($sql); - $right = $iteration = 0; + $right = 0; $padding_store = array('0' => ''); $padding = ''; $forum_list = ($return_array) ? array() : ''; @@ -136,41 +136,44 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = } $right = $row['right_id']; + $disabled = false; if ($acl && !$auth->acl_gets($acl, $row['forum_id'])) { - continue; + // List permission? + if ($auth->acl_get('f_list', $row['forum_id'])) + { + $disabled = true; + } + else + { + continue; + } } - if ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) || $row['forum_id'] == $ignore_id) - { - continue; - } - - if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat) - { + if ( + ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) || $row['forum_id'] == $ignore_id) + || // Non-postable forum with no subforums, don't display - continue; - } - - if ($row['forum_type'] != FORUM_POST && $ignore_nonpost) + ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat) + || + ($row['forum_type'] != FORUM_POST && $ignore_nonpost) + ) { - continue; + $disabled = true; } if ($return_array) { // Include some more information... $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? true : false) : (($row['forum_id'] == $select_id) ? true : false); - $forum_list[$row['forum_id']] = array_merge(array('padding' => $padding, 'selected' => $selected), $row); + $forum_list[$row['forum_id']] = array_merge(array('padding' => $padding, 'selected' => ($selected && !$disabled), 'disabled' => $disabled), $row); } else { $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : ''); - $forum_list .= ''; + $forum_list .= ''; } - - $iteration++; } $db->sql_freeresult($result); unset($padding_store); @@ -2076,7 +2079,7 @@ function cache_moderators() // Make sure not hidden or special groups are involved... $sql = 'SELECT group_name, group_id, group_type - FROM ' . GROUPS_TABLE . ' + FROM ' . GROUPS_TABLE . ' WHERE ' . $db->sql_in_set('group_id', $ug_id_ary); $result = $db->sql_query($sql); diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 5216185d96..856d9cce95 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -43,7 +43,7 @@ function still_on_time() $max_execution_time = min(max(10, ($max_execution_time - 15)), 250); // For debugging purposes - // $max_execution_time = 30; + $max_execution_time = 10; global $starttime; $start_time = (empty($starttime)) ? $current_time : $starttime; @@ -1388,7 +1388,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO) } $table = ($ug_type == 'user' || $ug_type == 'user_role') ? ACL_USERS_TABLE : ACL_GROUPS_TABLE; - $id_field = ($ug_type == 'user' || $ug_type == 'user_role') ? 'user_id' : 'group_id'; + $id_field = ($ug_type == 'user' || $ug_type == 'user_role') ? 'user_id' : 'group_id'; // Role based permissions are the simplest to handle so check for them first if ($ug_type == 'user_role' || $ug_type == 'group_role') diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 1d96d5c4dd..755a6d9116 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -382,7 +382,7 @@ class messenger foreach ($address_ary as $which_ary) { - $$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? '"' . mail_encode($which_ary['name']) . '" <' . $which_ary['email'] . '>' : $which_ary['email']); + $$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? '"' . mail_encode($which_ary['name']) . '" <' . $which_ary['email'] . '>' : $which_ary['email']); } } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 62cdb99596..d68aa9f645 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1972,7 +1972,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } else { - $url = ($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$data['forum_id']}&t={$data['topic_id']}&p={$data['post_id']}") . "#p{$data['post_id']}" : append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$data['forum_id']}&t={$data['topic_id']}"); + $url = ($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$data['forum_id']}&t={$data['topic_id']}&p={$data['post_id']}") . "#p{$data['post_id']}" : append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$data['forum_id']}&t={$data['topic_id']}"); } return $url; diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index e7ef24a49a..dc7507add6 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -214,7 +214,7 @@ class template_compile // we'll strip out such occurences, minimising such switching $template_php = str_replace(' ?>_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;"; + $tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;"; $varref = "\$this->_tpldata['$tag_args']"; } else diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 883c9a7177..7be2e4acd6 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -52,7 +52,7 @@ class transfer // ftp functions can only move files around and can't create. // This means that the users will need to have access to write // temporary files or have write access on a folder within phpBB - // like the cache folder. If the user can't do either, then + // like the cache folder. If the user can't do either, then // he/she needs to use the fsock ftp method $temp_name = tempnam($this->tmp_path, 'transfer_'); @unlink($temp_name); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 6ef3e01056..933124ce28 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1210,7 +1210,7 @@ function validate_username($username, $allowed_username = false) } $sql = 'SELECT word - FROM ' . WORDS_TABLE; + FROM ' . WORDS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1293,15 +1293,19 @@ function validate_password($password) /** * Check to see if email address is banned or already present in the DB * -* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) +* @param string $email The email to check +* @param string $allowed_email An allowed email, default being $user->data['user_email'] +* +* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) */ -function validate_email($email) +function validate_email($email, $allowed_email = false) { global $config, $db, $user; $email = strtolower($email); + $allowed_email = ($allowed_email === false) ? strtolower($user->data['user_email']) : strtolower($allowed_email); - if (strtolower($user->data['user_email']) == $email) + if ($allowed_email == $email) { return false; } @@ -1468,13 +1472,14 @@ function avatar_upload($data, &$error) $destination = $config['avatar_path']; - if ($destination[sizeof($destination) - 1] == '/' || $destination[sizeof($destination) - 1] == '\\') + // Adjust destination path (no trailing slash) + if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\') { $destination = substr($destination, 0, -1); } $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination); - if ($destination && ($destination[0] == '/' || $destination[0] == '\\')) + if ($destination && ($destination[0] == '/' || $destination[0] == "\\")) { $destination = ''; } diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 69a7082286..6904d6dfd1 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -66,7 +66,7 @@ function mcp_front_view($id, $mode, $action) $db->sql_freeresult($result); $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id - FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u + FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('p.post_id', $post_list) . ' AND t.topic_id = p.topic_id AND p.poster_id = u.user_id diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 64f054ed74..9121a965fd 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -92,7 +92,7 @@ class session // The script path from the webroot to the phpBB root (for example: /phpBB2/) $script_dirs = explode('/', $script_path); array_splice($script_dirs, -sizeof($page_dirs)); - $root_script_path = implode('/', $script_dirs) . (sizeof($root_dirs) ? '/' . implode('/', $root_dirs) : ''); + $root_script_path = implode('/', $script_dirs) . (sizeof($root_dirs) ? '/' . implode('/', $root_dirs) : ''); // We are on the base level (phpBB root == webroot), lets adjust the variables a bit... if (!$root_script_path) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index a69068b526..48a6aba9cf 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -52,7 +52,7 @@ class ucp_profile 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), 'email' => array( array('string', false, 6, 60), - array('email', $data['email'])), + array('email')), 'email_confirm' => array('string', true, 6, 60), ); diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 75bd3170ae..90daa93a39 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -383,7 +383,7 @@ class ucp_register } } - $message = $message . '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); + $message = $message . '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); trigger_error($message); } } @@ -417,7 +417,7 @@ class ucp_register if (sizeof($sql_in)) { - $sql = 'DELETE FROM ' . CONFIRM_TABLE . ' + $sql = 'DELETE FROM ' . CONFIRM_TABLE . ' WHERE ' . $db->sql_in_set('session_id', $sql_in, true) . ' AND confirm_type = ' . CONFIRM_REG; $db->sql_query($sql); diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index 53384f522b..0e86d5259f 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -77,7 +77,7 @@ class ucp_remind meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); - $message = $user->lang['PASSWORD_UPDATED'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); + $message = $user->lang['PASSWORD_UPDATED'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); trigger_error($message); } diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php index d543045540..1eaa30ce1e 100644 --- a/phpBB/includes/ucp/ucp_resend.php +++ b/phpBB/includes/ucp/ucp_resend.php @@ -121,7 +121,7 @@ class ucp_resend meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); - $message = $user->lang['ACTIVATION_EMAIL_SENT'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); + $message = $user->lang['ACTIVATION_EMAIL_SENT'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); trigger_error($message); } diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index 2c2e759fe1..401ebcb63d 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -310,7 +310,7 @@ else { if (!is_int($offset)) { - trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR); + trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR); return false; } @@ -583,7 +583,7 @@ else $ly = (-$length) % 65535; // negative length requires ... capture everything - // except a group of -length characters + // except a group of -length characters // anchored at the tail-end of the string if ($lx) { diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 83988ff05f..6bba61e434 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -1704,10 +1704,11 @@ class install_convert extends module */ function meta_refresh($url) { - global $convert; + global $convert, $template; if ($convert->options['refresh']) { + $template->assign_var('S_REFRESH', true); meta_refresh(5, $url); } } diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php index 1fdd833f94..e57b2a8bea 100644 --- a/phpBB/language/en/acp/email.php +++ b/phpBB/language/en/acp/email.php @@ -32,7 +32,7 @@ if (empty($lang) || !is_array($lang)) // Email settings $lang = array_merge($lang, array( - 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed', + 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed', 'ALL_USERS' => 'All users', 'COMPOSE' => 'Compose', diff --git a/phpBB/language/en/acp/modules.php b/phpBB/language/en/acp/modules.php index 86f02cd06f..0edcce9352 100644 --- a/phpBB/language/en/acp/modules.php +++ b/phpBB/language/en/acp/modules.php @@ -31,7 +31,7 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( - 'ACP_MODULE_MANAGEMENT_EXPLAIN' => 'Here you are able to manage all kind of modules. Please note that the ACP has a three-level menu structure (Category -> Category -> Module) whereby the others having a two-level menu structure (Category -> Module) which must be kept. Please also be aware that you may lock out yourself if you disable or delete the modules responsible for the module management itself.', + 'ACP_MODULE_MANAGEMENT_EXPLAIN' => 'Here you are able to manage all kind of modules. Please note that the ACP has a three-level menu structure (Category -> Category -> Module) whereby the others having a two-level menu structure (Category -> Module) which must be kept. Please also be aware that you may lock out yourself if you disable or delete the modules responsible for the module management itself.', 'ADD_MODULE' => 'Add module', 'ADD_MODULE_CONFIRM' => 'Are you sure you want to add the selected module with the selected mode?', 'ADD_MODULE_TITLE' => 'Add module', diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index ac8a205664..d090dcef1e 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -128,11 +128,11 @@ $lang = array_merge($lang, array( $lang = array_merge($lang, array( 'acl_f_list' => array('lang' => 'Can see forum', 'cat' => 'post'), 'acl_f_read' => array('lang' => 'Can read forum', 'cat' => 'post'), - 'acl_f_post' => array('lang' => 'Can post in forum', 'cat' => 'post'), + 'acl_f_post' => array('lang' => 'Can start new topics', 'cat' => 'post'), + 'acl_f_reply' => array('lang' => 'Can reply to topics', 'cat' => 'post'), + 'acl_f_icons' => array('lang' => 'Can use post icons', 'cat' => 'post'), 'acl_f_announce' => array('lang' => 'Can post announcements', 'cat' => 'post'), 'acl_f_sticky' => array('lang' => 'Can post stickies', 'cat' => 'post'), - 'acl_f_reply' => array('lang' => 'Can reply to posts', 'cat' => 'post'), - 'acl_f_icons' => array('lang' => 'Can use post icons', 'cat' => 'post'), 'acl_f_poll' => array('lang' => 'Can create polls', 'cat' => 'polls'), 'acl_f_vote' => array('lang' => 'Can vote in polls', 'cat' => 'polls'), @@ -207,12 +207,12 @@ $lang = array_merge($lang, array( 'acl_a_ban' => array('lang' => 'Can manage bans', 'cat' => 'user_group'), 'acl_a_viewauth' => array('lang' => 'Can view permission masks', 'cat' => 'permissions'), - 'acl_a_fauth' => array('lang' => 'Can alter forum permissions', 'cat' => 'permissions'), - 'acl_a_mauth' => array('lang' => 'Can alter moderator permissions', 'cat' => 'permissions'), - 'acl_a_aauth' => array('lang' => 'Can alter admin permissions', 'cat' => 'permissions'), - 'acl_a_uauth' => array('lang' => 'Can alter user permissions', 'cat' => 'permissions'), - 'acl_a_authgroups' => array('lang' => 'Can alter permissions for groups', 'cat' => 'permissions'), - 'acl_a_authusers' => array('lang' => 'Can alter permissions for users', 'cat' => 'permissions'), + 'acl_a_authgroups' => array('lang' => 'Can alter permissions for individual groups', 'cat' => 'permissions'), + 'acl_a_authusers' => array('lang' => 'Can alter permissions for individual users', 'cat' => 'permissions'), + 'acl_a_fauth' => array('lang' => 'Can alter forum permission class', 'cat' => 'permissions'), + 'acl_a_mauth' => array('lang' => 'Can alter moderator permission class', 'cat' => 'permissions'), + 'acl_a_aauth' => array('lang' => 'Can alter admin permission class', 'cat' => 'permissions'), + 'acl_a_uauth' => array('lang' => 'Can alter user permission class', 'cat' => 'permissions'), 'acl_a_roles' => array('lang' => 'Can manage roles', 'cat' => 'permissions'), 'acl_a_switchperm' => array('lang' => 'Can use others permissions', 'cat' => 'permissions'), diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index ab0eb04b35..a679f30d84 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -183,7 +183,7 @@ $lang = array_merge($lang, array( 'NO_ASSIGNED_RANK' => 'No special rank assigned.', 'NO_RANK_TITLE' => 'You haven’t specified a title for the rank.', - 'NO_UPDATE_RANKS' => 'The rank was successfully deleted. However user accounts using this rank were not updated. You will need to manually reset the rank on these accounts.', + 'NO_UPDATE_RANKS' => 'The rank was successfully deleted. However user accounts using this rank were not updated. You will need to manually reset the rank on these accounts.', 'RANK_ADDED' => 'The rank was successfully added.', 'RANK_IMAGE' => 'Rank image', @@ -197,7 +197,7 @@ $lang = array_merge($lang, array( // Disallow Usernames $lang = array_merge($lang, array( - 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it', + 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it', 'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character', 'ADD_DISALLOW_TITLE' => 'Add a disallowed username', diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php index 81ca7643af..b450f4a5e2 100644 --- a/phpBB/language/en/acp/search.php +++ b/phpBB/language/en/acp/search.php @@ -81,7 +81,7 @@ $lang = array_merge($lang, array( 'SEARCH_STORE_RESULTS' => 'Search result cache length', 'SEARCH_STORE_RESULTS_EXPLAIN' => 'Cached search results will expire after this time, in seconds. Set to 0 if you want to disable search cache.', 'SEARCH_TYPE' => 'Search backend', - 'SEARCH_TYPE_EXPLAIN' => 'phpBB allows you to choose the backend that is used for searching text in post contents. By default the search will use phpBB’s own fulltext search.', + 'SEARCH_TYPE_EXPLAIN' => 'phpBB allows you to choose the backend that is used for searching text in post contents. By default the search will use phpBB’s own fulltext search.', 'SWITCHED_SEARCH_BACKEND' => 'You switched the search backend. In order to use the new search backend you should make sure that there is an index for the backend you chose.', 'TOTAL_WORDS' => 'Total number of indexed words', diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index 1b2ad38b75..63ac19cf28 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -60,7 +60,7 @@ $help = array( ), array( 0 => 'Outputting code or fixed width data', - 1 => 'If you want to output a piece of code or in fact anything that requires a fixed width, eg. Courier type font you should enclose the text in [code][/code] tags, eg.

[code]echo "This is some code";[/code]

All formatting used within [code][/code] tags is retained when you later view it.' + 1 => 'If you want to output a piece of code or in fact anything that requires a fixed width, eg. Courier type font you should enclose the text in [code][/code] tags, eg.

[code]echo "This is some code";[/code]

All formatting used within [code][/code] tags is retained when you later view it.' ), array( 0 => '--', diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index 5b75124859..49192f91d5 100644 --- a/phpBB/language/en/help_faq.php +++ b/phpBB/language/en/help_faq.php @@ -112,7 +112,7 @@ $help = array( ), array( 0 => 'How do I edit or delete a post?', - 1 => 'Unless you are the board admin or forum moderator you can only edit or delete your own posts. You can edit a post (sometimes for only a limited time after it was made) by clicking the edit button for the relevant post. If someone has already replied to the post you will find a small piece of text output below the post when you return to the topic, which lists the number of times you edited it along with when. This will not appear if no one has replied, nor will not appear if moderators or administrators edit the post though they may leave a note as to why they’ve edited the post at their own disgression. Please note that normal users cannot delete a post once someone has replied.' + 1 => 'Unless you are the board admin or forum moderator you can only edit or delete your own posts. You can edit a post (sometimes for only a limited time after it was made) by clicking the edit button for the relevant post. If someone has already replied to the post you will find a small piece of text output below the post when you return to the topic, which lists the number of times you edited it along with when. This will not appear if no one has replied, nor will not appear if moderators or administrators edit the post though they may leave a note as to why they’ve edited the post at their own disgression. Please note that normal users cannot delete a post once someone has replied.' ), array( 0 => 'How do I add a signature to my post?', @@ -320,7 +320,7 @@ $help = array( ), array( 0 => 'Who wrote this bulletin board?', - 1 => 'This software (in its unmodified form) is produced, released and is copyright phpBB Group. It is made available under the GNU General Public Licence and may be freely distributed, see link for more details' + 1 => 'This software (in its unmodified form) is produced, released and is copyright phpBB Group. It is made available under the GNU General Public Licence and may be freely distributed, see link for more details' ), array( 0 => 'Why isn’t X feature available?', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index f43ba97bb2..42e0cf5ccf 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -168,7 +168,7 @@ $lang = array_merge($lang, array( 'GPL' => 'General Public License', 'INITIAL_CONFIG' => 'Basic configuration', - 'INITIAL_CONFIG_EXPLAIN' => 'Now that install has determined your server can run phpBB you need to supply some specific information. If you do not know how to connect to your database please contact your hosting provider (in the first instance) or use the phpBB support forums. When entering data please ensure you check it thoroughly before continuing.', + 'INITIAL_CONFIG_EXPLAIN' => 'Now that install has determined your server can run phpBB you need to supply some specific information. If you do not know how to connect to your database please contact your hosting provider (in the first instance) or use the phpBB support forums. When entering data please ensure you check it thoroughly before continuing.', 'INSTALL_CONGRATS' => 'Congratulations', 'INSTALL_CONGRATS_EXPLAIN' => 'You have now successfully installed phpBB 3.0. Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the Userguide and the Beta support forum, see the %sREADME%s for further information.

Please now delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.', 'INSTALL_INTRO' => 'Welcome to Installation', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 913c8a13a8..548030b93a 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -51,23 +51,6 @@ $lang = array_merge($lang, array( ', )); -$lang = array_merge($lang, array( - 'CAPTCHA' =>array( - 'cells' => array( - 'Enter the code on', - ' the right, in ', - ' the order shown ', - ' on the left ', - ), - 'shape' => array( - 'Enter the code on', - ' the right which ', - 'matches the image', - ' on the left ', - ) - ) -)); - // Common language entries $lang = array_merge($lang, array( 'ACCOUNT_ACTIVE' => 'Your account has now been activated. Thank you for registering', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index ee467edff6..9b43d0be24 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -795,7 +795,7 @@ switch ($mode) } meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); - $message = ($user_id) ? sprintf($user->lang['RETURN_INDEX'], '', '') : sprintf($user->lang['RETURN_TOPIC'], '', ''); + $message = ($user_id) ? sprintf($user->lang['RETURN_INDEX'], '', '') : sprintf($user->lang['RETURN_TOPIC'], '', ''); trigger_error($user->lang['EMAIL_SENT'] . '

' . $message); } } @@ -1118,7 +1118,7 @@ switch ($mode) $sort_key = $default_key; } - $order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); + $order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); // Count the users ... if ($sql_where) @@ -1431,7 +1431,7 @@ function show_profile($data) 'USER_COLOR' => get_username_string('colour', $user_id, $username, $data['user_colour']), 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $data['user_colour']), - 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), + 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false, 'RANK_IMG' => $rank_img, 'RANK_IMG_SRC' => $rank_img_src, diff --git a/phpBB/search.php b/phpBB/search.php index 398e46ce7c..e574600e7b 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -148,7 +148,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, fa.user_id FROM ' . FORUMS_TABLE . ' f - LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id + LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id AND fa.session_id = '" . $db->sql_escape($user->session_id) . "') $not_in_fid ORDER BY f.left_id"; @@ -896,7 +896,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) page_header(($l_search_title) ? $l_search_title : $user->lang['SEARCH']); $template->set_filenames(array( - 'body' => 'search_results.html') + 'body' => 'search_results.html') ); make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx")); @@ -908,7 +908,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $s_forums = ''; $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, fa.user_id FROM ' . FORUMS_TABLE . ' f - LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id + LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id AND fa.session_id = '" . $db->sql_escape($user->session_id) . "') ORDER BY f.left_id ASC"; $result = $db->sql_query($sql); diff --git a/phpBB/styles/subSilver/template/login_body.html b/phpBB/styles/subSilver/template/login_body.html index 6e7f19babb..192613faa0 100644 --- a/phpBB/styles/subSilver/template/login_body.html +++ b/phpBB/styles/subSilver/template/login_body.html @@ -81,8 +81,8 @@ - {L_CONFIRM_CODE}:
{L_CONFIRM_CODE_EXPLAIN} - + {L_CONFIRM_CODE}:
{L_CONFIRM_CODE_EXPLAIN} + diff --git a/phpBB/styles/subSilver/template/mcp_topic.html b/phpBB/styles/subSilver/template/mcp_topic.html index 464159531b..5d47730c22 100644 --- a/phpBB/styles/subSilver/template/mcp_topic.html +++ b/phpBB/styles/subSilver/template/mcp_topic.html @@ -51,7 +51,7 @@ - {L_DISPLAY_OPTIONS} + {L_DISPLAY_OPTIONS} {L_POSTS_PER_PAGE}
{L_POSTS_PER_PAGE_EXPLAIN} diff --git a/phpBB/styles/subSilver/template/memberlist_im.html b/phpBB/styles/subSilver/template/memberlist_im.html index 91402a04ea..6fc738129f 100644 --- a/phpBB/styles/subSilver/template/memberlist_im.html +++ b/phpBB/styles/subSilver/template/memberlist_im.html @@ -2,7 +2,7 @@
- +
diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 553920adb8..f3eb6ad32e 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -343,8 +343,8 @@ - - + + diff --git a/phpBB/styles/subSilver/template/posting_buttons.html b/phpBB/styles/subSilver/template/posting_buttons.html index 5fb103beda..5a15a39bd6 100644 --- a/phpBB/styles/subSilver/template/posting_buttons.html +++ b/phpBB/styles/subSilver/template/posting_buttons.html @@ -60,7 +60,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -81,7 +81,7 @@ diff --git a/phpBB/styles/subSilver/template/ucp_attachments.html b/phpBB/styles/subSilver/template/ucp_attachments.html index 42f7b50e35..f4e4fb9815 100644 --- a/phpBB/styles/subSilver/template/ucp_attachments.html +++ b/phpBB/styles/subSilver/template/ucp_attachments.html @@ -40,7 +40,7 @@
{L_CONFIRM_CODE}:
{L_CONFIRM_CODE_EXPLAIN}
{L_CONFIRM_CODE}:
{L_CONFIRM_CODE_EXPLAIN}
- onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" /> + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" />
- + diff --git a/phpBB/styles/subSilver/template/ucp_pm_message_footer.html b/phpBB/styles/subSilver/template/ucp_pm_message_footer.html index 0dbd6a0f33..e241a1742c 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_message_footer.html +++ b/phpBB/styles/subSilver/template/ucp_pm_message_footer.html @@ -37,5 +37,5 @@ - + diff --git a/phpBB/styles/subSilver/template/ucp_register.html b/phpBB/styles/subSilver/template/ucp_register.html index 7d79f93aec..870c2ae1c7 100644 --- a/phpBB/styles/subSilver/template/ucp_register.html +++ b/phpBB/styles/subSilver/template/ucp_register.html @@ -39,7 +39,7 @@ {L_USERNAME}:
{L_USERNAME_EXPLAIN} - + {L_EMAIL_ADDRESS}: @@ -47,7 +47,7 @@ {L_CONFIRM_EMAIL}: - + {L_PASSWORD}:
{L_PASSWORD_EXPLAIN} @@ -87,8 +87,8 @@ {CONFIRM_IMG} - {L_CONFIRM_CODE}:
{L_CONFIRM_CODE_EXPLAIN} - + {L_CONFIRM_CODE}:
{L_CONFIRM_CODE_EXPLAIN} + diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 84fc056ed1..4ef45eddc0 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -674,7 +674,7 @@ if (!empty($topic_data['poll_start'])) 'vote_user_ip' => (string) $user->ip, ); - $sql = 'INSERT INTO ' . POLL_VOTES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); + $sql = 'INSERT INTO ' . POLL_VOTES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); } } @@ -1005,8 +1005,8 @@ while ($row = $db->sql_fetchrow($result)) 'from' => (!empty($row['user_from'])) ? $row['user_from'] : '', 'sig' => $user_sig, - 'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '', - 'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '', + 'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '', + 'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '', 'viewonline' => $row['user_allow_viewonline'], 'allow_pm' => $row['user_allow_pm'],