mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
Merge branch 'develop' into ticket/11620
This commit is contained in:
commit
be16459b89
5 changed files with 12 additions and 8 deletions
|
@ -50,8 +50,8 @@ class phpbb_captcha_factory
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
|
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
|
||||||
}
|
}
|
||||||
$captcha = new $name;
|
$captcha = self::get_instance($name);
|
||||||
$captcha->garbage_collect('');
|
$captcha->garbage_collect(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1995,6 +1995,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$first_post_has_topic_info = ($post_mode == 'edit_first_post' &&
|
||||||
|
(($post_visibility == ITEM_DELETED && $data['topic_posts_softdeleted'] == 1) ||
|
||||||
|
($post_visibility == ITEM_UNAPPROVED && $data['topic_posts_unapproved'] == 1) ||
|
||||||
|
($post_visibility == ITEM_APPROVED && $data['topic_posts_approved'] == 1)));
|
||||||
// Fix the post's and topic's visibility and first/last post information, when the post is edited
|
// Fix the post's and topic's visibility and first/last post information, when the post is edited
|
||||||
if (($post_mode != 'post' && $post_mode != 'reply') && $data['post_visibility'] != $post_visibility)
|
if (($post_mode != 'post' && $post_mode != 'reply') && $data['post_visibility'] != $post_visibility)
|
||||||
{
|
{
|
||||||
|
@ -2007,7 +2011,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||||
$phpbb_content_visibility->set_post_visibility($post_visibility, $data['post_id'], $data['topic_id'], $data['forum_id'], $user->data['user_id'], time(), '', $is_starter, $is_latest);
|
$phpbb_content_visibility->set_post_visibility($post_visibility, $data['post_id'], $data['topic_id'], $data['forum_id'], $user->data['user_id'], time(), '', $is_starter, $is_latest);
|
||||||
}
|
}
|
||||||
else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
|
else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || $first_post_has_topic_info)
|
||||||
{
|
{
|
||||||
if ($post_visibility == ITEM_APPROVED || $data['topic_visibility'] == $post_visibility)
|
if ($post_visibility == ITEM_APPROVED || $data['topic_visibility'] == $post_visibility)
|
||||||
{
|
{
|
||||||
|
|
|
@ -267,7 +267,7 @@ class ucp_prefs
|
||||||
$limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
$limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
||||||
|
|
||||||
$sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
|
$sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
|
||||||
$sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
|
$sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_posts_approved', 's' => 't.topic_title', 'v' => 't.topic_views');
|
||||||
|
|
||||||
// Post ordering options
|
// Post ordering options
|
||||||
$limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
$limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
||||||
|
|
|
@ -43,7 +43,7 @@ class phpbb_feed_topic extends phpbb_feed_post_base
|
||||||
|
|
||||||
function open()
|
function open()
|
||||||
{
|
{
|
||||||
$sql = 'SELECT f.forum_options, f.forum_password, t.topic_id, t.forum_id, t.topic_visibility, t.topic_title, t.topic_time, t.topic_views, t.topic_replies, t.topic_type
|
$sql = 'SELECT f.forum_options, f.forum_password, t.topic_id, t.forum_id, t.topic_visibility, t.topic_title, t.topic_time, t.topic_views, t.topic_posts_approved, t.topic_type
|
||||||
FROM ' . TOPICS_TABLE . ' t
|
FROM ' . TOPICS_TABLE . ' t
|
||||||
LEFT JOIN ' . FORUMS_TABLE . ' f
|
LEFT JOIN ' . FORUMS_TABLE . ' f
|
||||||
ON (f.forum_id = t.forum_id)
|
ON (f.forum_id = t.forum_id)
|
||||||
|
@ -60,7 +60,7 @@ class phpbb_feed_topic extends phpbb_feed_post_base
|
||||||
$this->forum_id = (int) $this->topic_data['forum_id'];
|
$this->forum_id = (int) $this->topic_data['forum_id'];
|
||||||
|
|
||||||
// Make sure topic is either approved or user authed
|
// Make sure topic is either approved or user authed
|
||||||
if (!$this->topic_data['topic_approved'] && !$this->auth->acl_get('m_approve', $this->forum_id))
|
if ($this->topic_data['topic_visibility'] != ITEM_APPROVED && !$this->auth->acl_get('m_approve', $this->forum_id))
|
||||||
{
|
{
|
||||||
trigger_error('SORRY_AUTH_READ');
|
trigger_error('SORRY_AUTH_READ');
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||||
{
|
{
|
||||||
$sql = "SELECT p.post_id
|
$sql = "SELECT p.post_id
|
||||||
FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
|
FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
|
||||||
WHERE t.topic_replies = 0
|
WHERE t.topic_posts_approved = 1
|
||||||
AND p.topic_id = t.topic_id
|
AND p.topic_id = t.topic_id
|
||||||
$last_post_time
|
$last_post_time
|
||||||
AND $m_approve_posts_fid_sql
|
AND $m_approve_posts_fid_sql
|
||||||
|
@ -378,7 +378,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT DISTINCT ' . $sort_by_sql[$sort_key] . ", p.topic_id
|
$sql = 'SELECT DISTINCT ' . $sort_by_sql[$sort_key] . ", p.topic_id
|
||||||
FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
|
FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
|
||||||
WHERE t.topic_replies = 0
|
WHERE t.topic_posts_approved = 1
|
||||||
AND t.topic_moved_id = 0
|
AND t.topic_moved_id = 0
|
||||||
AND p.topic_id = t.topic_id
|
AND p.topic_id = t.topic_id
|
||||||
$last_post_time
|
$last_post_time
|
||||||
|
|
Loading…
Add table
Reference in a new issue