aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/CHANGELOG.html5
-rw-r--r--phpBB/includes/functions_posting.php34
-rw-r--r--phpBB/includes/functions_profile_fields.php6
-rw-r--r--phpBB/includes/functions_user.php7
-rw-r--r--phpBB/includes/mcp/mcp_main.php5
-rw-r--r--phpBB/includes/message_parser.php2
-rw-r--r--phpBB/language/en/acp/profile.php2
7 files changed, 51 insertions, 10 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 2278d7d508..770e36bd8a 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -103,6 +103,11 @@
<li>[Fix] Only remind users in the correct inactive states depending on the board account activation level.</li>
<li>[Fix] Topic print view XHTML error. (Bug #41745)</li>
<li>[Fix] Log password changes via password reset function. (Bug #41365)</li>
+ <li>[Fix] Poll, negative durations generate error (Bug #41295 - Patch by TerraFrost)</li>
+ <li>[Fix] Visibility of custom field on registration is incorrectly controlled by setting "display" (Bug #41385 - Patch by Eelke)</li>
+ <li>[Fix] Smile in Username is misparsed on [quote=""] (Bug #41955 - Patch by TerraFrost)</li>
+ <li>[Fix] Deleting all posts in a topic - bad redirect (Bug #41705 - Patch by TerraFrost)</li>
+ <li>[Fix] Deleted users still appear logged in (Bug #41985 - Patch by TerraFrost)</li>
<li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
<li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
<li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index f7fe3e5f38..1b0fbb835a 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1751,11 +1751,23 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if (isset($poll['poll_options']) && !empty($poll['poll_options']))
{
+ $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
+ $poll_length = $poll['poll_length'] * 86400;
+ if ($poll_length < 0)
+ {
+ $poll_start = $poll_start + $poll_length;
+ if ($poll_start < 0)
+ {
+ $poll_start = 0;
+ }
+ $poll_length = 1;
+ }
+
$sql_data[TOPICS_TABLE]['sql'] = array_merge($sql_data[TOPICS_TABLE]['sql'], array(
'poll_title' => $poll['poll_title'],
- 'poll_start' => ($poll['poll_start']) ? $poll['poll_start'] : $current_time,
+ 'poll_start' => $poll_start,
'poll_max_options' => $poll['poll_max_options'],
- 'poll_length' => ($poll['poll_length'] * 86400),
+ 'poll_length' => $poll_length,
'poll_vote_change' => $poll['poll_vote_change'])
);
}
@@ -1784,6 +1796,20 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'edit_topic':
case 'edit_first_post':
+ if (isset($poll['poll_options']) && !empty($poll['poll_options']))
+ {
+ $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
+ $poll_length = $poll['poll_length'] * 86400;
+ if ($poll_length < 0)
+ {
+ $poll_start = $poll_start + $poll_length;
+ if ($poll_start < 0)
+ {
+ $poll_start = 0;
+ }
+ $poll_length = 1;
+ }
+ }
$sql_data[TOPICS_TABLE]['sql'] = array(
'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
@@ -1794,9 +1820,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_type' => $topic_type,
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
'poll_title' => (isset($poll['poll_options'])) ? $poll['poll_title'] : '',
- 'poll_start' => (isset($poll['poll_options'])) ? (($poll['poll_start']) ? $poll['poll_start'] : $current_time) : 0,
+ 'poll_start' => (isset($poll['poll_options'])) ? $poll_start : 0,
'poll_max_options' => (isset($poll['poll_options'])) ? $poll['poll_max_options'] : 1,
- 'poll_length' => (isset($poll['poll_options'])) ? ($poll['poll_length'] * 86400) : 0,
+ 'poll_length' => (isset($poll['poll_options'])) ? $poll_length : 0,
'poll_vote_change' => (isset($poll['poll_vote_change'])) ? $poll['poll_vote_change'] : 0,
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index cc59648e54..60abe122ce 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -39,8 +39,8 @@ class custom_profile
switch ($mode)
{
case 'register':
- // If the field is required we show it on the registration page and do not show hidden fields
- $sql_where .= ' AND f.field_show_on_reg = 1 AND f.field_no_view = 0';
+ // If the field is required we show it on the registration page
+ $sql_where .= ' AND f.field_show_on_reg = 1';
break;
case 'profile':
@@ -1086,4 +1086,4 @@ class custom_profile_admin extends custom_profile
}
}
-?>
+?> \ No newline at end of file
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index a65ba9f6e3..82d20e90a7 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -490,7 +490,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);
+ $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);
foreach ($table_ary as $table)
{
@@ -506,6 +506,11 @@ function user_delete($mode, $user_id, $post_username = false)
WHERE ban_userid = ' . $user_id;
$db->sql_query($sql);
+ // Delete the user_id from the session table
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . '
+ WHERE session_user_id = ' . $user_id;
+ $db->sql_query($sql);
+
// Remove any undelivered mails...
$sql = 'SELECT msg_id, user_id
FROM ' . PRIVMSGS_TO_TABLE . '
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 8fafb232cc..2cde1d4076 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -929,6 +929,11 @@ function mcp_delete_post($post_ids)
}
else
{
+ if ($affected_topics != 1 || $deleted_topics || !$topic_id)
+ {
+ $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", false);
+ }
+
meta_refresh(3, $redirect);
trigger_error($success_msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . '<br /><br />' . implode('<br /><br />', $return_link));
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index b97a055fde..bbe7cb5fa8 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -706,7 +706,7 @@ class bbcode_firstpass extends bbcode
}
// To let the parser not catch tokens within quote_username quotes we encode them before we start this...
- $in = preg_replace('#quote=&quot;(.*?)&quot;\]#ie', "'quote=&quot;' . str_replace(array('[', ']'), array('&#91;', '&#93;'), '\$1') . '&quot;]'", $in);
+ $in = preg_replace('#quote=&quot;(.*?)&quot;\]#ie', "'quote=&quot;' . str_replace(array('[', ']', '\\\"'), array('&#91;', '&#93;', '\"'), '\$1') . '&quot;]'", $in);
$tok = ']';
$out = '[';
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index 83e0fa06ca..ef291585bc 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -66,7 +66,7 @@ $lang = array_merge($lang, array(
'DISPLAY_AT_PROFILE_EXPLAIN' => 'The user is able to change this profile field within the user control panel.',
'DISPLAY_AT_REGISTER' => 'Display on registration screen',
'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration.',
- 'DISPLAY_PROFILE_FIELD' => 'Display profile field',
+ 'DISPLAY_PROFILE_FIELD' => 'Publicly display profile field',
'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown in all locations allowed within the load settings. Setting this to “no” will hide the field from topic pages, profiles and the memberlist.',
'DROPDOWN_ENTRIES_EXPLAIN' => 'Enter your options now, every option in one line.',