From 160d1bfd07ce016e34b52588bcbf4c7c71bd7fb0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 May 2010 13:03:56 +0200 Subject: [PATCH 1/7] [ticket/9578] ACP Posting tab is missing "Post settings" module. PHPBB3-9578 --- phpBB/includes/acp/info/acp_board.php | 2 +- phpBB/install/database_update.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/acp/info/acp_board.php b/phpBB/includes/acp/info/acp_board.php index 58b650650c..3e18f55940 100644 --- a/phpBB/includes/acp/info/acp_board.php +++ b/phpBB/includes/acp/info/acp_board.php @@ -24,7 +24,7 @@ class acp_board_info 'features' => array('title' => 'ACP_BOARD_FEATURES', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')), 'avatar' => array('title' => 'ACP_AVATAR_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')), 'message' => array('title' => 'ACP_MESSAGE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_MESSAGES')), - 'post' => array('title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')), + 'post' => array('title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_MESSAGES')), 'signature' => array('title' => 'ACP_SIGNATURE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')), 'feed' => array('title' => 'ACP_FEED_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')), 'registration' => array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')), diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 47d261dc46..917a5401e5 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1684,6 +1684,19 @@ function change_database_data(&$no_updates, $version) } $db->sql_freeresult($result); + // Install modules + $modules_to_install = array( + 'post' => array( + 'base' => 'board', + 'class' => 'acp', + 'title' => 'ACP_POST_SETTINGS', + 'auth' => 'acl_a_board', + 'cat' => 'ACP_MESSAGES', + 'after' => array('message', 'ACP_MESSAGE_SETTINGS') + ), + ); + + _add_modules($modules_to_install); $no_updates = false; break; From 4637709f0a3701bdc3b44efeb08c919f73a3cb1e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 May 2010 13:13:53 +0200 Subject: [PATCH 2/7] [ticket/9628] _add_module 'after'-parameter does not work correctly. The modules were grouped by left_id so num_modules is always one (hopefully), but the number of rows is the actual value we'd like to know. Removing the GROUP BY resolves the issue. PHPBB3-9628 --- phpBB/install/database_update.php | 1 - 1 file changed, 1 deletion(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 47d261dc46..145b6b50ae 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -685,7 +685,6 @@ function _add_modules($modules_to_install) WHERE module_class = '" . $db->sql_escape($module_data['class']) . "' AND parent_id = {$parent_id} AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']} - GROUP BY left_id ORDER BY left_id"; $result = $db->sql_query($sql); $steps = (int) $db->sql_fetchfield('num_modules'); From 0e93d8386bef21f2af5647bf13e9ba68156cf7da Mon Sep 17 00:00:00 2001 From: Josh Woody Date: Thu, 1 Jul 2010 17:16:37 -0500 Subject: [PATCH 3/7] [ticket/9695] Correct the improper display of user input in mcp_ban.php Correct the improper display of "ban_reason" and "ban_give_reason" in mcp_ban.php PHPBB3-9695 --- phpBB/adm/style/acp_ban.html | 6 +++--- phpBB/includes/acp/acp_ban.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index 539e8032dd..cf44f4aaa7 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -31,9 +31,9 @@ function display_details(option) { - document.getElementById('acp_unban').unbangivereason.value = ban_give_reason[option]; - document.getElementById('acp_unban').unbanreason.value = ban_reason[option]; - document.getElementById('acp_unban').unbanlength.value = ban_length[option]; + document.getElementById('acp_unban').unbangivereason.innerHTML = ban_give_reason[option]; + document.getElementById('acp_unban').unbanreason.innerHTML = ban_reason[option]; + document.getElementById('acp_unban').unbanlength.innerHTML = ban_length[option]; } // ]]> diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php index 3198376584..a7ea57b753 100644 --- a/phpBB/includes/acp/acp_ban.php +++ b/phpBB/includes/acp/acp_ban.php @@ -224,7 +224,7 @@ class acp_ban $template->assign_block_vars('ban_reason', array( 'BAN_ID' => $ban_id, 'REASON' => $reason, - 'A_REASON' => addslashes(htmlspecialchars_decode($reason)), + 'A_REASON' => addslashes($reason), )); } } @@ -236,7 +236,7 @@ class acp_ban $template->assign_block_vars('ban_give_reason', array( 'BAN_ID' => $ban_id, 'REASON' => $reason, - 'A_REASON' => addslashes(htmlspecialchars_decode($reason)), + 'A_REASON' => addslashes($reason), )); } } From 0db657381b4e20c0fd1ccb8c4c8e6a52b55b127d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 2 Jul 2010 12:28:06 +0200 Subject: [PATCH 4/7] [ticket/9697] Backlink broken when the select parent forum does not exist. PHPBB3-9697 --- phpBB/includes/acp/acp_forums.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 6261f866bb..f2f1bd80e2 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -983,7 +983,7 @@ class acp_forums if (!$row) { - trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&' . $this->parent_id), E_USER_WARNING); + trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); } if ($row['forum_type'] == FORUM_LINK) From 24cc3fd0f941ec2ea8a1a75f7b3a811d9438f359 Mon Sep 17 00:00:00 2001 From: Josh Woody Date: Sat, 3 Jul 2010 21:21:22 -0500 Subject: [PATCH 5/7] [ticket/9703] Correct database leak where deleting user did not rm some PM data Users' PM rules and PM folders were being left intact when deleting them. PHPBB3-9703 --- phpBB/includes/functions_user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 271542efdd..93e4e6db07 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -528,7 +528,7 @@ function user_delete($mode, $user_id, $post_username = false) $db->sql_transaction('begin'); - $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE); + $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE); foreach ($table_ary as $table) { From b64f456c40f5c0c5e5438fea8a864934e3b3fcf8 Mon Sep 17 00:00:00 2001 From: Richard Foote Date: Tue, 6 Jul 2010 14:43:50 +0200 Subject: [PATCH 6/7] [ticket/9659] Signature options in set_user_options The phpBB3 defaults are being used. PHPBB3-9659 --- phpBB/includes/functions_convert.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 0fdae9b274..c035fd3739 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -1025,6 +1025,9 @@ function set_user_options() 'bbcode' => array('bit' => 8, 'default' => 1), 'smilies' => array('bit' => 9, 'default' => 1), 'popuppm' => array('bit' => 10, 'default' => 0), + 'sig_bbcode' => array('bit' => 15, 'default' => 1), + 'sig_smilies' => array('bit' => 16, 'default' => 1), + 'sig_links' => array('bit' => 17, 'default' => 1), ); $option_field = 0; From 9764a3213842cefea3641b2f29b58f345b578d69 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 7 Jul 2010 23:04:46 +0100 Subject: [PATCH 7/7] [ticket/9712] Future dates can be formatted as 'less than one minute ago' PHPBB3-9712 --- phpBB/includes/session.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 0a01b4e73b..e157053e61 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -2134,9 +2134,9 @@ class user extends session // Zone offset $zone_offset = $this->timezone + $this->dst; - // Show date <= 1 hour ago as 'xx min ago' + // Show date <= 1 hour ago as 'xx min ago' but not greater than 60 seconds in the future // A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago' - if ($delta <= 3600 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO'])) + if ($delta <= 3600 && $delta > -60 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO'])) { return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60))); }