[ticket/12738] Move related code from functions_posting to function
* dhruvgoel92/ticket/12738:
[ticket/12738] Update constructor docblock
[ticket/12738] Add $config to constructor in notification test
[ticket/12738] Fix tests with new config object injection
[ticket/12738] Inject config object into content_visibility class
[ticket/11528] Move related code from functions_posting to function
[ticket/12174] Update topic_attachment flag when a post is soft-deleted
* Nicofuma/ticket/12174:
[ticket/12174] Add tests
[ticket/12174] Coding style
[ticket/12174] Remove $update_topic_attachments_flag
[ticket/12174] Don't update the flag for a post without attachment
[ticket/12174] Update the conditions
[ticket/12174] Remove inline assignment
[ticket/12174] Update sql query
[ticket/12174] Revert the changes on $topic_update_array
[ticket/12174] Corrections
[ticket/12174] Update topic_attachment flag when a post is soft-deleted
This also makes sync('topic_visibility') obsolete, but we keep it for now.
Also fix a unit test, because ITEM_DELETED overpowers ITEM_UNAPPROVED
PHPBB3-9567
Limit the posts to a certain visibility and deletion time
This allows us to only restore posts, that were approved
when the topic got soft deleted. So previous soft deleted
and unapproved posts are still soft deleted/unapproved
PHPBB3-9567
The problems with having two different permissions are just too big and cause
huge queries, if they are granted differently. Also it's quite hard to decide
what should happen when a moderator has only one permission and the topic has
only posts of the two hidden types. To avoid all this, we merge them so it's a
simple switch: either the user is a moderator, then he can see all posts,
or he is not, then he can only see approved ones.
PHPBB3-9567