From 5f4c6e9c91e46164ef33a248262e08b021b6d10f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 18 Apr 2010 15:13:53 +0200 Subject: [PATCH 01/21] [ticket/9548] Delete user quicktool drop down should have an empty or invalid selection as the default PHPBB3-9548 --- phpBB/adm/style/acp_users_overview.html | 2 +- phpBB/includes/acp/acp_users.php | 33 +++++++++++++++---------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html index 7d9a0f27d3..911dcad293 100644 --- a/phpBB/adm/style/acp_users_overview.html +++ b/phpBB/adm/style/acp_users_overview.html @@ -140,7 +140,7 @@ {L_DELETE_USER}

{L_DELETE_USER_EXPLAIN}
-
+

diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 4905840e02..a9d104f0d7 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -191,24 +191,31 @@ class acp_users trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if (confirm_box(true)) + if ($delete_type) { - user_delete($delete_type, $user_id, $user_row['username']); + if (confirm_box(true)) + { + user_delete($delete_type, $user_id, $user_row['username']); - add_log('admin', 'LOG_USER_DELETED', $user_row['username']); - trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action)); + add_log('admin', 'LOG_USER_DELETED', $user_row['username']); + trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action)); + } + else + { + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + 'u' => $user_id, + 'i' => $id, + 'mode' => $mode, + 'action' => $action, + 'update' => true, + 'delete' => 1, + 'delete_type' => $delete_type)) + ); + } } else { - confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( - 'u' => $user_id, - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'update' => true, - 'delete' => 1, - 'delete_type' => $delete_type)) - ); + trigger_error($user->lang['NO_MODE'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } } From b3028567c82aca21675b323198eb5476d9885d99 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 2 May 2010 14:50:33 +0800 Subject: [PATCH 02/21] [ticket/9567] Newly registered users group description rewording. Reword 'NEW_MEMBER_GROUP_DEFAULT_EXPLAIN' language entry to make it more linguistically correct. PHPBB3-9567 --- phpBB/language/en/acp/board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index ce57b07eae..52389d85b9 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -211,7 +211,7 @@ $lang = array_merge($lang, array( 'NEW_MEMBER_POST_LIMIT' => 'New member post limit', 'NEW_MEMBER_POST_LIMIT_EXPLAIN' => 'New members are within the Newly Registered Users group until they reach this number of posts. You can use this group to keep them from using the PM system or to review their posts. A value of 0 disables this feature.', 'NEW_MEMBER_GROUP_DEFAULT' => 'Set Newly Registered Users group to default', - 'NEW_MEMBER_GROUP_DEFAULT_EXPLAIN' => 'If set to yes and a new member post limit is specified newly registered users will be not only put into the Newly Registered Users group, but this group also being their default one. This may come in handy if you want to assign a group default rank and/or avatar the user then inherits.', + 'NEW_MEMBER_GROUP_DEFAULT_EXPLAIN' => 'If set to yes, and a new member post limit is specified, newly registered users will not only be put into the Newly Registered Users group, but this group will also be their default one. This may come in handy if you want to assign a group default rank and/or avatar the user then inherits.', 'ACC_ADMIN' => 'By Admin', 'ACC_DISABLE' => 'Disable', From e3ba934cd7b0325a5fdc444aace0e13d8c84fc59 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 10 Apr 2010 19:28:53 +0200 Subject: [PATCH 03/21] [ticket/8894] Fix JavaScript-Error and hide Quote-Button on topic review if BBCodes are not allowed. PHPBB3-8894 --- phpBB/includes/ucp/ucp_pm_compose.php | 2 +- phpBB/posting.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 4d72d45f81..b596e72c41 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -1054,7 +1054,7 @@ function compose_pm($id, $mode, $action) 'S_COMPOSE_PM' => true, 'S_EDIT_POST' => ($action == 'edit'), 'S_SHOW_PM_ICONS' => $s_pm_icons, - 'S_BBCODE_ALLOWED' => $bbcode_status, + 'S_BBCODE_ALLOWED' => ($bbcode_status) ? 1 : 0, 'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '', 'S_SMILIES_ALLOWED' => $smilies_status, 'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '', diff --git a/phpBB/posting.php b/phpBB/posting.php index 5f27b61aae..1f593df561 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1420,7 +1420,7 @@ $template->assign_vars(array( 'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS)) ? true : false, 'S_SHOW_TOPIC_ICONS' => $s_topic_icons, 'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])) || $auth->acl_get('m_delete', $forum_id))) ? true : false, - 'S_BBCODE_ALLOWED' => $bbcode_status, + 'S_BBCODE_ALLOWED' => ($bbcode_status) ? 1 : 0, 'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '', 'S_SMILIES_ALLOWED' => $smilies_status, 'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '', From d8b5594c14f6d2cc297484153d093606c45c6d03 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 12 Apr 2010 20:53:57 +0200 Subject: [PATCH 04/21] [ticket/9119] Respect language selection on automated update. PHPBB3-9119 --- phpBB/install/install_update.php | 52 +++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index a5e54a354a..e717fe3dd4 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -72,7 +72,7 @@ class install_update extends module function main($mode, $sub) { - global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth; + global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language; $this->tpl_name = 'install_update'; $this->page_title = 'UPDATE_INSTALLATION'; @@ -119,7 +119,17 @@ class install_update extends module $user->session_begin(); $auth->acl($user->data); - $user->setup('install'); + // Overwrite user's language with the selected one. + // Config needs to be changed to ensure that guests also get the selected language. + $config_default_lang = $config['default_lang']; + $config['default_lang'] = $language; + $user->data['user_lang'] = $language; + + $user->setup(array('common', 'acp/common', 'acp/board', 'install', 'posting')); + + // Reset the default_lang + $config['default_lang'] = $config_default_lang; + unset($config_default_lang); // If we are within the intro page we need to make sure we get up-to-date version info if ($sub == 'intro') @@ -133,6 +143,14 @@ class install_update extends module // still, the acp template is never stored in the database $user->theme['template_storedb'] = false; + $template->assign_vars(array( + 'S_USER_LANG' => $user->lang['USER_LANG'], + 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], + 'S_CONTENT_ENCODING' => 'UTF-8', + 'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right', + 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left', + )); + // Get current and latest version if (($latest_version = $cache->get('_version_info')) === false) { @@ -234,7 +252,7 @@ class install_update extends module $template->assign_vars(array( 'S_INTRO' => true, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=version_check"), + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=version_check"), )); // Make sure the update list is destroyed. @@ -250,8 +268,8 @@ class install_update extends module 'S_UP_TO_DATE' => $up_to_date, 'S_VERSION_CHECK' => true, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=file_check"), - 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_db"), + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), + 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"), 'LATEST_VERSION' => $this->latest_version, 'CURRENT_VERSION' => $this->current_version) @@ -305,8 +323,8 @@ class install_update extends module 'S_DB_UPDATE' => true, 'S_DB_UPDATE_FINISHED' => ($config['version'] == $this->update_info['version']['to']) ? true : false, 'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&language=' . $user->data['user_lang']), - 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_db"), - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=file_check"), + 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"), + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), )); break; @@ -363,7 +381,7 @@ class install_update extends module // Refresh the page if we are still not finished... if ($update_list['status'] != -1) { - $refresh_url = append_sid($this->p_master->module_url, "mode=$mode&sub=file_check"); + $refresh_url = append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"); meta_refresh(2, $refresh_url); $template->assign_vars(array( @@ -427,7 +445,7 @@ class install_update extends module $file_part = $filename; } - $diff_url = append_sid($this->p_master->module_url, "mode=$mode&sub=file_check&action=diff&status=$status&file=" . urlencode($file_struct['filename'])); + $diff_url = append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check&action=diff&status=$status&file=" . urlencode($file_struct['filename'])); if (isset($file_struct['as_expected']) && $file_struct['as_expected']) { @@ -475,9 +493,9 @@ class install_update extends module 'S_FILE_CHECK' => true, 'S_ALL_UP_TO_DATE' => $all_up_to_date, 'S_VERSION_UP_TO_DATE' => $up_to_date, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=file_check"), - 'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files"), - 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_db"), + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), + 'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"), + 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"), )); if ($all_up_to_date) @@ -690,7 +708,7 @@ class install_update extends module $params[] = 'download=1'; } - $redirect_url = append_sid($this->p_master->module_url, "mode=$mode&sub=update_files&" . implode('&', $params)); + $redirect_url = append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files&" . implode('&', $params)); meta_refresh(3, $redirect_url); $template->assign_vars(array( @@ -831,7 +849,7 @@ class install_update extends module $template->assign_vars(array( 'S_DOWNLOAD_FILES' => true, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files"), + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"), 'RADIO_BUTTONS' => $radio_buttons, 'S_HIDDEN_FIELDS' => $s_hidden_fields) ); @@ -945,8 +963,8 @@ class install_update extends module 'S_FTP_UPLOAD' => true, 'UPLOAD_METHOD' => $method, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files"), - 'U_DOWNLOAD_METHOD' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files&download=1"), + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"), + 'U_DOWNLOAD_METHOD' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files&download=1"), 'S_HIDDEN_FIELDS' => $s_hidden_fields, )); @@ -1079,7 +1097,7 @@ class install_update extends module $template->assign_vars(array( 'S_UPLOAD_SUCCESS' => true, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=file_check")) + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check")) ); return; } From 97d180ab6620531ee6081fd652e4d51258a4aa1a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 10 Apr 2010 16:52:13 +0200 Subject: [PATCH 05/21] [ticket/9146] Fix double occurring tabindex="6" in prosilver's QR PHPBB3-9146 --- phpBB/styles/prosilver/template/quickreply_editor.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html index 8a5b8aeb16..ea07c2e6d8 100644 --- a/phpBB/styles/prosilver/template/quickreply_editor.html +++ b/phpBB/styles/prosilver/template/quickreply_editor.html @@ -61,7 +61,7 @@ {S_FORM_TOKEN} {QR_HIDDEN_FIELDS}   -   +   {L_COLLAPSE_QR} From 18e0b07487d4195f7d979214be2900f36a943a61 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 11 Apr 2010 00:31:19 +0200 Subject: [PATCH 06/21] [ticket/9528] Also fall back to bbcode-less quotes for PMs, when bbcodes are disabled. PHPBB3-9528 --- phpBB/styles/prosilver/template/ucp_pm_history.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html index 88efcf95be..bcd6a75397 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_history.html +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -5,6 +5,11 @@

+
From a3874c2cd6fb614d1c6aee3e9aa9b3eeb5d345cf Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 11 Apr 2010 00:43:44 +0200 Subject: [PATCH 07/21] [ticket/9529] Topic review is not showing all selected posts. PHPBB3-9529 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 21c5fe7aca..4cb3941ce0 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1146,7 +1146,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id } } - unset($rowset[$i]); + unset($rowset[$post_list[$i]]); } if ($mode == 'topic_review') From d8b4c0db0cfd8fc4fb655020b7e9743c04d64df9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 14 Apr 2010 00:59:28 +0200 Subject: [PATCH 08/21] [ticket/9546] Also delete bookmarks, when a topic is deleted. PHPBB3-9546 --- phpBB/includes/functions_admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 93244be55c..13c2acfd24 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -675,7 +675,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s $db->sql_transaction('begin'); - $table_ary = array(TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, POLL_VOTES_TABLE, POLL_OPTIONS_TABLE, TOPICS_WATCH_TABLE, TOPICS_TABLE); + $table_ary = array(BOOKMARKS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, POLL_VOTES_TABLE, POLL_OPTIONS_TABLE, TOPICS_WATCH_TABLE, TOPICS_TABLE); foreach ($table_ary as $table) { From 36c19869865a8f46d9fa980b90db6d5283238bac Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 14 May 2010 02:59:00 +0200 Subject: [PATCH 09/21] [ticket/9545] Initial forum should display active topics by default. The initial forum 'Your first forum' should show topics (especially the 'Welcome to phpBB3' topic) in the active topics list after installing phpBB because this is the default setting for new forums (but not categories). The default database column value for forum_flags is 32 = FORUM_FLAG_POST_REVIEW, we therefore have to explicitly set forum_flags to FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS = 48 for this forum. PHPBB3-9545 --- phpBB/install/schemas/schema_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 38088b291d..e815615eef 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -509,7 +509,7 @@ INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_s # -- Forums INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, ''); -INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, ''); +INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48); # -- Users / Anonymous user INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0); From ed0a26ab16282c3e053df46fa3a33185654642b4 Mon Sep 17 00:00:00 2001 From: Josh Woody Date: Wed, 5 May 2010 09:39:47 -0500 Subject: [PATCH 10/21] [ticket/9510] Unable to copy permissions from and to forums you cannot see This commit fixes the bug mentioned, plus a large number of regressions caused by changing the behavior of make_forum_select() (in svn r10427, dated Jan 18, 2010). It also rolls back the changes from branch "bug/58415", which are no longer needed. PHPBB3-9510 --- phpBB/includes/functions_admin.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 13c2acfd24..4cd2962e3b 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -96,16 +96,12 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = $right = $row['right_id']; $disabled = false; - if (!$ignore_acl && $auth->acl_get('f_list', $row['forum_id'])) + if (!$ignore_acl && $auth->acl_gets(array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'), $row['forum_id'])) { if ($only_acl_post && !$auth->acl_get('f_post', $row['forum_id']) || (!$auth->acl_get('m_approve', $row['forum_id']) && !$auth->acl_get('f_noapprove', $row['forum_id']))) { $disabled = true; } - else if (!$only_acl_post && !$auth->acl_gets(array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'), $row['forum_id'])) - { - $disabled = true; - } } else if (!$ignore_acl) { From e6b9178c4439f14b085470f7f16c1fee67262296 Mon Sep 17 00:00:00 2001 From: Josh Woody Date: Wed, 5 May 2010 10:23:40 -0500 Subject: [PATCH 11/21] [ticket/9510] Unable to copy permissions from and to forums you cannot see This commit fixes the bug mentioned, plus a large number of regressions caused by changing the behavior of make_forum_select() (in svn r10427, dated Jan 18, 2010). It also rolls back the changes from branch "bug/58415", which are no longer needed. PHPBB3-9510 --- phpBB/includes/acp/acp_forums.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 54bf905374..7b7671573e 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -407,7 +407,7 @@ class acp_forums $exclude_forums[] = $row['forum_id']; } - $parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, true, false, false); + $parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, false, false, false); $forum_data['forum_password_confirm'] = $forum_data['forum_password']; } @@ -416,7 +416,7 @@ class acp_forums $this->page_title = 'CREATE_FORUM'; $forum_id = $this->parent_id; - $parents_list = make_forum_select($this->parent_id, false, true, false, false); + $parents_list = make_forum_select($this->parent_id, false, false, false, false); // Fill forum data with default values if (!$update) From 1d2b4ffc651bc1f39849c643e69193926611f2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20A=2E=20Ruszczy=C5=84ski?= Date: Fri, 9 Apr 2010 14:08:20 +0200 Subject: [PATCH 12/21] [ticket/9524] IPv6 regex does not match all valid IPv6 addresses starting with :: :: can replace 1 or more groups (not 2 or more) PHPBB3-9524 --- phpBB/develop/regex.php | 5 +++-- phpBB/includes/functions.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/phpBB/develop/regex.php b/phpBB/develop/regex.php index 4498204b4a..8165ba1f21 100644 --- a/phpBB/develop/regex.php +++ b/phpBB/develop/regex.php @@ -18,14 +18,15 @@ $ls32 = "(?:$h16:$h16|$ipv4)"; $ipv6_construct = array( array(false, '', '{6}', $ls32), - array(false, '::', '{5}', $ls32), + array(false, '::', '{0,5}', "(?:$h16(?::$h16)?|$ipv4)"), array('', ':', '{4}', $ls32), array('{1,2}', ':', '{3}', $ls32), array('{1,3}', ':', '{2}', $ls32), array('{1,4}', ':', '', $ls32), array('{1,5}', ':', false, $ls32), array('{1,6}', ':', false, $h16), - array('{1,7}', ':', false, '') + array('{1,7}', ':', false, ''), + array(false, '::', false, '') ); $ipv6 = '(?:'; diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 38f910974a..e8f45b654f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3332,7 +3332,7 @@ function get_preg_expression($mode) break; case 'ipv6': - return '#^(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:::(?:[\dA-F]{1,4}:){5}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:):(?:[\dA-F]{1,4}:){4}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,2}:(?:[\dA-F]{1,4}:){3}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,3}:(?:[\dA-F]{1,4}:){2}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,4}:(?:[\dA-F]{1,4}:)(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,5}:(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,6}:[\dA-F]{1,4})|(?:(?:[\dA-F]{1,4}:){1,7}:))$#i'; + return '#^(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:::(?:[\dA-F]{1,4}:){0,5}(?:[\dA-F]{1,4}(?::[\dA-F]{1,4})?|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:):(?:[\dA-F]{1,4}:){4}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,2}:(?:[\dA-F]{1,4}:){3}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,3}:(?:[\dA-F]{1,4}:){2}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,4}:(?:[\dA-F]{1,4}:)(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,5}:(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,6}:[\dA-F]{1,4})|(?:(?:[\dA-F]{1,4}:){1,7}:)|(?:::))$#i'; break; case 'url': From 41498fe3ee0d4be0fe00d726942495acf05a7333 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 11 Apr 2010 21:02:37 +0200 Subject: [PATCH 13/21] [ticket/9535] Correctly set margin of textarea in ACP > Users signature for RTL languages. PHPBB3-9535 --- phpBB/adm/style/acp_users_signature.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html index 0ea5328c3c..6317a375b4 100644 --- a/phpBB/adm/style/acp_users_signature.html +++ b/phpBB/adm/style/acp_users_signature.html @@ -93,8 +93,8 @@ // ]]> -
-
+
+
@@ -105,7 +105,7 @@
-
{L_OPTIONS}: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}
+
{L_OPTIONS}: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}
From 0da86964d5a5890667d500e5d1699a56aef8a168 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 12 Apr 2010 19:33:13 +0200 Subject: [PATCH 14/21] [ticket/9535] Fix some more rtl margin issues. PHPBB3-9535 --- phpBB/adm/style/permission_mask.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index fb4d3ef143..e29609b8b6 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -40,7 +40,7 @@
-
+
{L_NO_ROLE_AVAILABLE}
@@ -118,7 +118,7 @@
-
+

{L_APPLY_PERMISSIONS_EXPLAIN}

From 9fa8bb82e4a9f8b9e6c8b6f51699a3c517c85bf2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 12 Apr 2010 20:56:09 +0200 Subject: [PATCH 15/21] [ticket/9535] Also fix the margin in the install_update.html PHPBB3-9535 --- phpBB/adm/style/install_update.html | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index 4b89537acb..22d21d8314 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -200,7 +200,7 @@ {L_STATUS_UP_TO_DATE}
-
{up_to_date.FILENAME}
+
{up_to_date.FILENAME}
@@ -218,11 +218,11 @@
{new.DIR_PART}
{new.FILE_PART}

{L_FILE_USED}: {new.CUSTOM_ORIGINAL}
-
+
[{new.L_SHOW_DIFF}]{L_BINARY_FILE}
-
+
@@ -242,9 +242,9 @@
{not_modified.DIR_PART}
{not_modified.FILE_PART}

{L_FILE_USED}: {not_modified.CUSTOM_ORIGINAL}
-
[{not_modified.L_SHOW_DIFF}]{L_BINARY_FILE}
+
[{not_modified.L_SHOW_DIFF}]{L_BINARY_FILE}
-
+
@@ -263,22 +263,22 @@
{modified.DIR_PART}
{modified.FILE_PART}

{L_FILE_USED}: {modified.CUSTOM_ORIGINAL}
-
 
+
 
-
+
-
[{modified.L_SHOW_DIFF}]{L_BINARY_FILE}
+
[{modified.L_SHOW_DIFF}]{L_BINARY_FILE}
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
@@ -296,11 +296,11 @@
{new_conflict.DIR_PART}
{new_conflict.FILE_PART}

{L_FILE_USED}: {new_conflict.CUSTOM_ORIGINAL}
-
+
[{new_conflict.L_SHOW_DIFF}]{L_BINARY_FILE}
-
+
@@ -320,35 +320,35 @@
{L_FILE_USED}: {conflict.CUSTOM_ORIGINAL}
{L_NUM_CONFLICTS}: {conflict.NUM_CONFLICTS} -
+
[{L_DOWNLOAD_CONFLICTS}]
{L_DOWNLOAD_CONFLICTS_EXPLAIN} {L_BINARY_FILE}
-
+
-
 
+
 
-
[{L_SHOW_DIFF_MODIFIED}]
+
[{L_SHOW_DIFF_MODIFIED}]
-
[{L_SHOW_DIFF_MODIFIED}]
+
[{L_SHOW_DIFF_MODIFIED}]
-
[{L_SHOW_DIFF_FINAL}]
+
[{L_SHOW_DIFF_FINAL}]
-
[{L_SHOW_DIFF_FINAL}]
+
[{L_SHOW_DIFF_FINAL}]
From d555e83b80b79f7afd1730b50502105a2c2f76d2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 14 May 2010 13:23:16 +0200 Subject: [PATCH 16/21] [ticket/9547] Use separate constants for display/enable active topics. Split S_DISPLAY_ACTIVE_TOPICS into S_DISPLAY_ACTIVE_TOPICS and S_ENABLE_ACTIVE_TOPICS so we have correct default values when changing the forum type. PHPBB3-9547 --- phpBB/adm/style/acp_forums.html | 4 ++-- phpBB/includes/acp/acp_forums.php | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 937a288cb2..9f9216a068 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -189,8 +189,8 @@ {L_GENERAL_FORUM_SETTINGS}

{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}
-
-
+
+
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 54bf905374..e13af0e858 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -169,7 +169,7 @@ class acp_forums $forum_data['forum_status'] = ITEM_UNLOCKED; } - $forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', true) : request_var('display_active', true); + $forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', true) : request_var('display_active', false); // Get data for forum rules if specified... if ($forum_data['forum_rules']) @@ -639,7 +639,8 @@ class acp_forums 'S_PRUNE_OLD_POLLS' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_POLL) ? true : false, 'S_PRUNE_ANNOUNCE' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_ANNOUNCE) ? true : false, 'S_PRUNE_STICKY' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_STICKY) ? true : false, - 'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) ? true : false, + 'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_type'] == FORUM_POST) ? ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) : true, + 'S_ENABLE_ACTIVE_TOPICS' => ($forum_data['forum_type'] == FORUM_CAT) ? ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) : false, 'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & FORUM_FLAG_POST_REVIEW) ? true : false, 'S_ENABLE_QUICK_REPLY' => ($forum_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) ? true : false, 'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))) ? true : false, From fe9c5019b672f26453df55c1a7f6bf876f56da3d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 11 Apr 2010 01:30:56 +0200 Subject: [PATCH 17/21] [ticket/9531] BBCode-less quotes fallback-option is missing "Author wrote:" line when quoting from topic-review. PHPBB3-9531 --- phpBB/posting.php | 2 +- phpBB/styles/prosilver/template/editor.js | 3 ++- phpBB/styles/prosilver/template/posting_topic_review.html | 2 +- phpBB/styles/prosilver/template/ucp_pm_history.html | 2 +- phpBB/styles/subsilver2/template/posting_topic_review.html | 2 +- phpBB/styles/subsilver2/template/ucp_pm_history.html | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index 5f27b61aae..2948d7a764 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1258,7 +1258,7 @@ if ($mode == 'quote' && !$submit && !$preview && !$refresh) $message = $quote_string . $message; $message = str_replace("\n", "\n" . $quote_string, $message); - $message_parser->message = $post_data['quote_username'] . " " . $user->lang['WROTE'] . " :\n" . $message . "\n"; + $message_parser->message = $post_data['quote_username'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n"; } } diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index 9c2691db8d..c4c3483766 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -194,7 +194,7 @@ function attach_inline(index, filename) /** * Add quote text to message */ -function addquote(post_id, username) +function addquote(post_id, username, l_wrote) { var message_name = 'message_' + post_id; var theSelection = ''; @@ -256,6 +256,7 @@ function addquote(post_id, username) } else { + insert_text(username + ' ' + l_wrote + ':' + '\n'); var lines = split_lines(theSelection); for (i = 0; i < lines.length; i++) { diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html index 0d68a02758..879e6bb7fc 100644 --- a/phpBB/styles/prosilver/template/posting_topic_review.html +++ b/phpBB/styles/prosilver/template/posting_topic_review.html @@ -24,7 +24,7 @@
diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html index 88efcf95be..410228536d 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_history.html +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -12,7 +12,7 @@
diff --git a/phpBB/styles/subsilver2/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html index d1af72b522..c252f7d8e9 100644 --- a/phpBB/styles/subsilver2/template/posting_topic_review.html +++ b/phpBB/styles/subsilver2/template/posting_topic_review.html @@ -31,7 +31,7 @@   {L_POST_SUBJECT}:  {topic_review_row.POST_SUBJECT} -  {QUOTE_IMG} +  {QUOTE_IMG} diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html index cb87d1892a..3f326257fc 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_history.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html @@ -54,7 +54,7 @@ {L_VIEW_PM} - + From d147bdcd73cea2dd43e54526e589f7aee6f34d4c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 11 Apr 2010 01:37:42 +0200 Subject: [PATCH 18/21] [ticket/9530] Subsilver2 is missing BBCode-less quotes fallback-option when bbcodes are disabled. PHPBB3-9530 --- phpBB/styles/subsilver2/template/editor.js | 52 ++++++++++++++++++- .../template/posting_topic_review.html | 5 ++ .../subsilver2/template/ucp_pm_history.html | 5 ++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index 2d157caada..37c6360cb5 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -6,6 +6,7 @@ // Startup variables var imageTag = false; var theSelection = false; +var bbcodeEnabled = true; // Check for Browser & Platform for PC & IE specific bits // More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html @@ -250,12 +251,61 @@ function addquote(post_id, username) if (theSelection) { - insert_text('[quote="' + username + '"]' + theSelection + '[/quote]'); + if (bbcodeEnabled) + { + insert_text('[quote="' + username + '"]' + theSelection + '[/quote]'); + } + else + { + var lines = split_lines(theSelection); + for (i = 0; i < lines.length; i++) + { + insert_text('> ' + lines[i] + '\n'); + } + } } return; } + +function split_lines(text) +{ + var lines = text.split('\n'); + var splitLines = new Array(); + var j = 0; + for(i = 0; i < lines.length; i++) + { + if (lines[i].length <= 80) + { + splitLines[j] = lines[i]; + j++; + } + else + { + var line = lines[i]; + do + { + var splitAt = line.indexOf(' ', 80); + + if (splitAt == -1) + { + splitLines[j] = line; + j++; + } + else + { + splitLines[j] = line.substring(0, splitAt); + line = line.substring(splitAt); + j++; + } + } + while(splitAt != -1); + } + } + return splitLines; +} + /** * From http://www.massless.org/mozedit/ */ diff --git a/phpBB/styles/subsilver2/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html index d1af72b522..b241362a22 100644 --- a/phpBB/styles/subsilver2/template/posting_topic_review.html +++ b/phpBB/styles/subsilver2/template/posting_topic_review.html @@ -1,3 +1,8 @@ + diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html index cb87d1892a..7027d4533d 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_history.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html @@ -1,3 +1,8 @@ +
From a11fa9c7383dfd34015391092f785f4f47fa8a5d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 11 Apr 2010 01:39:10 +0200 Subject: [PATCH 19/21] [ticket/9530] The prosilver problem in #9531 exists in subsilver2 editor.js PHPBB3-9530 --- phpBB/styles/subsilver2/template/editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index 37c6360cb5..54bd3450d0 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -196,7 +196,7 @@ function attach_inline(index, filename) /** * Add quote text to message */ -function addquote(post_id, username) +function addquote(post_id, username, l_wrote) { var message_name = 'message_' + post_id; var theSelection = ''; @@ -257,6 +257,7 @@ function addquote(post_id, username) } else { + insert_text(username + ' ' + l_wrote + ':' + '\n'); var lines = split_lines(theSelection); for (i = 0; i < lines.length; i++) { From 82ce29ac5855f13e803556b14960af3b759dc14b Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 22 Apr 2010 07:25:28 -0400 Subject: [PATCH 20/21] [ticket/7782] Send 404 HTTP code when a nonexistent user/forum/topic is requested. PHPBB3-7782 --- phpBB/includes/functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4f52c7c2ce..3886640b41 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3628,6 +3628,11 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $user->setup(); } + if ($msg_text == 'NO_FORUM' || $msg_text == 'NO_TOPIC' || $msg_text == 'NO_USER') + { + header("HTTP/1.x 404 Not Found"); + } + $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; $msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); From cc8d22bed6bdba0a8f5797eef3627a62c240a48f Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 31 Mar 2010 14:44:39 +0200 Subject: [PATCH 21/21] [feature/notify_status] Define'd constants for notify_status define'd constants NOTIFY_YES, NOTIFY_NO to replace magic numbers in forums_watch table and topics_watch table PHPBB3-9179 --- phpBB/includes/constants.php | 5 +++++ phpBB/includes/functions_display.php | 6 +++--- phpBB/includes/functions_posting.php | 16 ++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 8d31eaba7f..a3da196cf8 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -117,6 +117,11 @@ define('NOTIFY_EMAIL', 0); define('NOTIFY_IM', 1); define('NOTIFY_BOTH', 2); +// Notify status +define('NOTIFY_YES', 0); +define('NOTIFY_NO', 1); + + // Email Priority Settings define('MAIL_LOW_PRIORITY', 4); define('MAIL_NORMAL_PRIORITY', 3); diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index ea77551fc4..ec348138f5 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1112,10 +1112,10 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, { $is_watching = true; - if ($notify_status) + if ($notify_status != NOTIFY_YES) { $sql = 'UPDATE ' . $table_sql . " - SET notify_status = 0 + SET notify_status = " . NOTIFY_YES . " WHERE $where_sql = $match_id AND user_id = $user_id"; $db->sql_query($sql); @@ -1134,7 +1134,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $is_watching = true; $sql = 'INSERT INTO ' . $table_sql . " (user_id, $where_sql, notify_status) - VALUES ($user_id, $match_id, 0)"; + VALUES ($user_id, $match_id, " . NOTIFY_YES . ')'; $db->sql_query($sql); $message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '

' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '', ''); } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 4cb3941ce0..7242e7987b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1201,8 +1201,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . " AND w.user_id NOT IN ($sql_ignore_users) - AND w.notify_status = 0 - AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ') + AND w.notify_status = " . NOTIFY_YES . ' + AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') AND u.user_id = w.user_id'; $result = $db->sql_query($sql); @@ -1234,8 +1234,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u WHERE fw.forum_id = $forum_id AND fw.user_id NOT IN ($sql_ignore_users) - AND fw.notify_status = 0 - AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ') + AND fw.notify_status = " . NOTIFY_YES . ' + AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') AND u.user_id = fw.user_id'; $result = $db->sql_query($sql); @@ -1344,8 +1344,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id if (!empty($update_notification['topic'])) { - $sql = 'UPDATE ' . TOPICS_WATCH_TABLE . " - SET notify_status = 1 + $sql = 'UPDATE ' . TOPICS_WATCH_TABLE . ' + SET notify_status = ' . NOTIFY_NO . " WHERE topic_id = $topic_id AND " . $db->sql_in_set('user_id', $update_notification['topic']); $db->sql_query($sql); @@ -1353,8 +1353,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id if (!empty($update_notification['forum'])) { - $sql = 'UPDATE ' . FORUMS_WATCH_TABLE . " - SET notify_status = 1 + $sql = 'UPDATE ' . FORUMS_WATCH_TABLE . ' + SET notify_status = ' . NOTIFY_NO . " WHERE forum_id = $forum_id AND " . $db->sql_in_set('user_id', $update_notification['forum']); $db->sql_query($sql);