1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 04:23:38 +01:00

14161 Commits

Author SHA1 Message Date
Joas Schilling
b3d5f2b4e4 [feature/soft-delete] Fix unit tests for delete_posts()
PHPBB3-9567
2012-10-23 23:37:25 +02:00
Joas Schilling
3236229188 [feature/soft-delete] Update unit tests to new table structure
PHPBB3-9567
2012-10-23 23:35:50 +02:00
Joas Schilling
727759c4d8 [feature/soft-delete] Fix disapproving posts/topics in queue
PHPBB3-9567
2012-10-23 22:47:57 +02:00
Joas Schilling
43e6b3a921 [feature/soft-delete] Fix some more topic/post count handling
Only disapproving in queue is missing.

PHPBB3-9567
2012-10-23 16:59:33 +02:00
Joas Schilling
fec72c4b78 [feature/soft-delete] Fix mcp_move_topic() topic/post count handling
PHPBB3-9567
2012-10-23 12:52:31 +02:00
Joas Schilling
eb9c39971b [feature/soft-delete] Fix forum syncing in ACP and deleting posts
PHPBB3-9567
2012-10-22 17:34:37 +02:00
Joas Schilling
0a07635329 [feature/soft-delete] Fix convertor and one mcp issue
PHPBB3-9567
2012-10-22 17:21:56 +02:00
Joas Schilling
90154db1db [feature/soft-delete] Fix submit_post() topic_replies* usage
PHPBB3-9567
2012-10-22 16:38:53 +02:00
Joas Schilling
5925a17894 [feature/soft-delete] Fix some more uses of topic_replies_real
PHPBB3-9567
2012-10-22 14:55:10 +02:00
Joas Schilling
168dd29f24 [feature/soft-delete] Fix sync() and some more functions to use the new fields
PHPBB3-9567
2012-10-22 14:22:56 +02:00
Joas Schilling
9945561b4b [feature/soft-delete] Correctly calculate the number of replies everywhere
PHPBB3-9567
2012-10-22 11:14:00 +02:00
Joas Schilling
6c39563e9f [feature/soft-delete] Add a function to calculate the actual post/topic count
PHPBB3-9567
2012-10-21 23:38:55 +02:00
Joas Schilling
2fafa54107 [feature/soft-delete] Update the new fields while updating the board.
PHPBB3-9567
2012-10-21 23:38:29 +02:00
Joas Schilling
9c5482317e [feature/soft-delete] Add new fields for topic/post counts for softdelete
We can not use the replies vs replies_real anymore, as we need to be able to
determinate whether the posts are unapproved or softdeleted. So we need to add
a new field and there by change the second one for consistency.
We also add the posts_* fields for forums, which are a missing feature.

PHPBB3-9567
2012-10-21 22:33:28 +02:00
Joas Schilling
e7a137820b [feature/soft-delete] Use correct language when restoring topics in MCP
PHPBB3-9567
2012-10-21 22:30:20 +02:00
Joas Schilling
0822d2bb61 [feature/soft-delete] Split unapproved/soft deleted posts from topics
If a topic is soft deleted through a moderator, the topic_delete_user is set.
If it is passively soft deleted (f.e. while the only approved post is deleted)
the topic_delete_user is not set. This way, we can distinguish between these
two cases. The same also applies to unapproved posts. So we need to set the
topic_delete_user when an unapproved topic is posted.

Topics that were soft deleted/unapproved by a user (rather then passive) are
going to be displayed in the Topics modules, while all others are in the posts
modules of the MCP queue.

PHPBB3-9567
2012-10-17 15:32:57 +02:00
Joas Schilling
2adb37049e [feature/soft-delete] Display guest username in topic list instead of "Guest"
PHPBB3-9567
2012-10-17 15:23:16 +02:00
Joas Schilling
43d041bdec [feature/soft-delete] Removed unused old functions
PHPBB3-9567
2012-10-16 14:20:23 +02:00
Joas Schilling
722835a4ba [feature/soft-delete] Merge approving and restoring topics into one function
PHPBB3-9567
2012-10-16 14:18:56 +02:00
Joas Schilling
51d54109e0 [feature/soft-delete] Merge approving and restoring posts into one function
PHPBB3-9567
2012-10-16 13:55:22 +02:00
Joas Schilling
3773cbdf85 [feature/soft-delete] Fix displaying of details module
PHPBB3-9567
2012-10-15 20:51:31 +02:00
Joas Schilling
33073fafbe [feature/soft-delete] Add module for soft deleted topics
Unapproved/soft deleted posts are posts, that have a different visibility than
the topic. All others will be hidden from the posts list and can be managed
with the topic modules.

PHPBB3-9567
2012-10-15 15:53:32 +02:00
Joas Schilling
b1ce8a8c13 [feature/soft-delete] Add checkbox to restoring posts like on approve
PHPBB3-9567
2012-10-15 15:19:32 +02:00
Joas Schilling
a92927d24c [feature/soft-delete] Turn other functions into methods as well
PHPBB3-9567
2012-10-15 15:05:02 +02:00
Joas Schilling
7c2cc9cfef [feature/soft-delete] Turn restore_post() into a method and add the docs
PHPBB3-9567
2012-10-15 14:02:16 +02:00
Joas Schilling
a58a76ef5f [feature/soft-delete] Fix permission check in viewtopic.php
PHPBB3-9567
2012-10-15 13:17:05 +02:00
Joas Schilling
4bf922fa03 [feature/soft-delete] Fix restoring posts via MCP
PHPBB3-9567
2012-10-13 19:00:08 +02:00
Joas Schilling
18f77020e5 [feature/soft-delete] Fix several problems in the forum mcp
PHPBB3-9567
2012-10-10 23:10:46 +02:00
Joas Schilling
e4c9e55b53 [feature/soft-delete] Fix several issues within submit_post()
- $post_visibility is not boolean, so we need to check for == ITEM_APPROVED
- sync() already updates the topic/forum info, so we don't need to do that again
- use set_post_visibility() when changing the posts visibility

Should be ready for testing.

PHPBB3-9567
2012-10-09 22:24:06 +02:00
Joas Schilling
70fa983fa8 [feature/soft-delete] Do not allow users to reply to soft deleted topics
We should discuss this in an RFC again, but for now, we just fix the old state.
So moderators can only reply, when the topic is approved.
Also fixes a bug in the visibility check. We need to check the posts visibility
rather then the visibility of the topic. Because when the post is visible, the
topic is as well, but not the other way round.

PHPBB3-9567
2012-10-09 17:38:08 +02:00
Joas Schilling
fbf85b76c1 [feature/soft-delete] Correctly synchronize the topic_visibility in sync()
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
2012-10-09 15:38:50 +02:00
Joas Schilling
224be5bc4f [feature/soft-delete] Fix sync('topic_visibility')
The function can not rely on the first post anymore, as that one could be soft
deleted but the topic still has approved replies which are still visible.

PHPBB3-9567
2012-10-09 14:02:42 +02:00
Joas Schilling
8267cbbd03 [feature/soft-delete] Forgot that file when removing the old tests
PHPBB3-9567
2012-10-09 13:27:09 +02:00
Joas Schilling
4a3cac0ccb [feature/soft-delete] Fix column name in mcp_sorting()
PHPBB3-9567
2012-10-09 13:20:32 +02:00
Joas Schilling
7cc8b3eef8 [feature/soft-delete] Correctly update user_posts count
Before soft delete this was much easier, as an unapproved topic could only
have one post, because no one could reply to unapproved topics. Now we need
to run multiple queries to correctly reduce the post counts.

PHPBB3-9567
2012-10-09 12:23:15 +02:00
Joas Schilling
2841ecc44f [feature/soft-delete] Fix display_user_activity()
The Logic of $forum_ary was inverted, so if the array is empty, we can skip
the queries. We also should not merge passworded forums into the $forum_ary
as we removed them from that array right before that.

PHPBB3-9567
2012-10-09 12:08:17 +02:00
Joas Schilling
9441774288 [feature/soft-delete] Topic visibility is already synced by sync('topic')
PHPBB3-9567
2012-10-09 11:55:31 +02:00
Joas Schilling
e447a0fa07 [feature/soft-delete] Fix restoring a post via editing
PHPBB3-9567
2012-10-08 23:09:31 +02:00
Joas Schilling
53e01bba19 [feature/soft-delete] Update post counts within set_post_visibility
This is an additional query in some rare cases,
but it makes it much easier to use and understand.
This is mostly a preparation for the restore case.

PHPBB3-9567
2012-10-08 22:47:50 +02:00
Joas Schilling
91398c9e48 [feature/soft-delete] Change order of functions
PHPBB3-9567
2012-10-08 15:03:54 +02:00
Joas Schilling
c525e900d3 [feature/soft-delete] Allow to update multiple posts with set_post_visibility
PHPBB3-9567
2012-10-08 15:01:20 +02:00
Joas Schilling
25804eb8e8 [feature/soft-delete] Add test case for (soft)deleting the only post + fix
PHPBB3-9567
2012-10-06 19:56:52 +02:00
Joas Schilling
44005f338e [feature/soft-delete] Fix delete_post() function
PHPBB3-9567
2012-10-06 16:36:38 +02:00
Joas Schilling
7c09b5b89c [feature/soft-delete] Add some unit tests for delete_post()
PHPBB3-9567
2012-10-06 16:31:05 +02:00
Joas Schilling
009bd698fb [feature/soft-delete] Update and simplify the logic on delete_post()
Todo: delete_topic case

PHPBB3-9567
2012-10-06 03:59:49 +02:00
Joas Schilling
3088855aa6 [feature/soft-delete] Fix SQL error in search
PHPBB3-9567
2012-10-05 17:46:29 +02:00
Joas Schilling
c22d5bd37c [feature/soft-delete] Clean the code of hide_post() and rely on postcount
PHPBB3-9567
2012-10-05 17:00:14 +02:00
Joas Schilling
05f2366755 [feature/soft-delete] Update docs of can_soft_delete and remove can_restore
PHPBB3-9567
2012-10-05 14:42:11 +02:00
Joas Schilling
526721c7db [feature/soft-delete] Fix set_topic_visibility() so it passes the tests
PHPBB3-9567
2012-10-05 14:26:52 +02:00
Joas Schilling
b9d363f6cc [feature/soft-delete] Add unit tests for set_topic_visibility()
PHPBB3-9567
2012-10-05 14:26:09 +02:00