mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 06:20:46 +02:00
Merge remote-tracking branch 'github-nickvergessen/ticket/12371' into develop-ascraeus
* github-nickvergessen/ticket/12371: [ticket/12371] Fix language string [ticket/12371] Fix typos in comment [ticket/12371] Fix redirect link for approve_post and post_in_queue [ticket/12371] Delete the approve_post notification when editing a post [ticket/12371] Fix language in comment [ticket/12371] Reapprove the post and topic again in tests [ticket/12371] Correctly set is_starter when editing first post of the topic [ticket/12371] Add functional tests for reapproving [ticket/12371] Fix query in mcp_sorting() [ticket/12371] Rename disapprove and softdelete tests [ticket/12371] We do not group quote notifications anymore [ticket/12371] Fix SQL query [ticket/11772] Do not send out new topic/post notifications when reapproving [ticket/12052] Use different visibility when post was edited [ticket/12052] Add support for ITEM_UNAPPROVED to set_post_visibility method [ticket/12371] Do not add unlimited users as responders [ticket/12371] Do not update the notification entry unneccessarily [ticket/12371] Do not delete post related notifications when a post is deleted [ticket/12371] Allow notification types to redirect to a different url [ticket/12371] Do not group "quote" notifications
This commit is contained in:
@@ -736,8 +736,6 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
// Notifications types to delete
|
||||
$delete_notifications_types = array(
|
||||
'quote',
|
||||
'bookmark',
|
||||
'post',
|
||||
'approve_post',
|
||||
'post_in_queue',
|
||||
);
|
||||
@@ -1489,7 +1487,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
ITEM_DELETED => (!empty($topics_softdeleted)) ? ' WHERE ' . $db->sql_in_set('topic_id', $topics_softdeleted) : '',
|
||||
);
|
||||
|
||||
foreach ($topic_visiblities as $visibility => $sql_where)
|
||||
foreach ($update_ary as $visibility => $sql_where)
|
||||
{
|
||||
if ($sql_where)
|
||||
{
|
||||
@@ -1778,7 +1776,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
{
|
||||
$forum_data[$forum_id]['topics_approved'] = $row['total_topics'];
|
||||
}
|
||||
else if ($row['topic_visibility'] == ITEM_UNAPPROVED)
|
||||
else if ($row['topic_visibility'] == ITEM_UNAPPROVED || $row['topic_visibility'] == ITEM_REAPPROVE)
|
||||
{
|
||||
$forum_data[$forum_id]['topics_unapproved'] = $row['total_topics'];
|
||||
}
|
||||
@@ -2001,7 +1999,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
{
|
||||
$topic_data[$topic_id]['posts_approved'] = $row['total_posts'];
|
||||
}
|
||||
else if ($row['post_visibility'] == ITEM_UNAPPROVED)
|
||||
else if ($row['post_visibility'] == ITEM_UNAPPROVED || $row['post_visibility'] == ITEM_REAPPROVE)
|
||||
{
|
||||
$topic_data[$topic_id]['posts_unapproved'] = $row['total_posts'];
|
||||
}
|
||||
@@ -2023,7 +2021,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$topic_data[$topic_id]['first_post_id'] = (!empty($topic_data[$topic_id]['first_post_id'])) ? min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']) : $row['first_post_id'];
|
||||
$topic_data[$topic_id]['last_post_id'] = max($topic_data[$topic_id]['last_post_id'], $row['last_post_id']);
|
||||
|
||||
if ($topic_data[$topic_id]['visibility'] == ITEM_UNAPPROVED)
|
||||
if ($topic_data[$topic_id]['visibility'] == ITEM_UNAPPROVED || $topic_data[$topic_id]['visibility'] == ITEM_REAPPROVE)
|
||||
{
|
||||
// Soft delete status is stronger than unapproved.
|
||||
$topic_data[$topic_id]['visibility'] = $row['post_visibility'];
|
||||
|
Reference in New Issue
Block a user