New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Soft delete #1017
Soft delete #1017
Conversation
So far, I've added no new functionality. The biggest change here is adjusting the DB column names to "visibility" rather than "approved". Some things here are pretty likely to change, for example the name and location of the topic_visibility class. Happy birthday phpBB :) PHPBB3-9657
Notably: Uncomment the die() in create_schema_files, and add the class that makes everything tick. PHPBB3-9657
Rename topic_visibility class to phpbb_visibility. Also a bit of work to the class itself, mostly cleanup and adding the comments that I'd previously written. PHPBB3-9657
…e posts The soft delete feature seems to work. Tests are pending. A real icon is pending. Add the permissions and the interface to soft-delete posts. Also able to restore posts via the MCP queue PHPBB3-9657
Add unit tests for the phpbb_visibility class. Adjust the phpbb_visibility class to pass those unit tests. The changes are pretty small, actually. PHPBB3-9657
…visibility Rename the class to more accurately reflect what it does. PHPBB3-9657
…eue.php Restoring a post within mcp_queue.php didn't do anything before this commit. Now it does, by way of a function which is very similar to approve_post. PHPBB3-9657
To wit: using non-existing constant POST_DELETED in posting.php; first test post was initially unapproved; soft delete checkbox appeared at post time Links pointing to the wrong place. PHPBB3-9657
…flict We don't have imagesets in 3.1 anymore. PHPBB3-9657
…tatus PHPBB3-9657
Also fixes the mcp as a hole: - displayes a success message - gives a link to the post, if only one was restored PHPBB3-9657
…ate.php PHPBB3-9657
…ibilities If the user can see all visibilities, we can simply leave out the query part, instead of adding a bunch of ANDs. PHPBB3-9657
…index PHPBB3-9657
The resulting query is 4-times faster, as the forum_id IN () arrays are smaller and we need less AND/OR to build the hole query. The main difference between those two functions is, that this one takes an array of included ids and the _global one takes an array of excluded ids. PHPBB3-9657
at least it's running now, but the performance is not very good. PHPBB3-9657
Todo: Sphinx currently does not respect this setting at all. PHPBB3-9657
…rmissions PHPBB3-9657
…ce reason PHPBB3-9657
It should rely on the permissions of the post not the current user. PHPBB3-9657
else | ||
{ | ||
include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); | ||
include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include_once
'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?', | ||
'DELETE_POSTS_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete these posts?', | ||
'DELETE_REASON' => 'Soft delete reason', | ||
'DELETE_REASON_EXPLAIN' => 'The reason is only shown to moderators when post is soft deleted.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The specified reason for deletion will be visible to moderators."
Updated everything |
@@ -422,9 +423,10 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Please make a test that checks visibility after moving/merging/copying topics |
@EXreaction the last bunch of your "Always true" comments is off, I guess that happened when I pushed my changes (but already fixed all of the appearances) |
* phpbb/develop: (216 commits) [ticket/11626] Remove last reference to template in ldap [ticket/11626] Remove LDAP dependency on template [develop-olympus] Increment version number to 3.0.13-dev. [develop-olympus] Add changelog for 3.0.12 release. [develop-olympus] Bump version numbers for 3.0.12-RC1 release. [develop-olympus] Bumping version numbers to final for 3.0.12 releases. [ticket/11669] Fix PHP bug #55124 (recursive mkdir on /./) [ticket/11668] Run lint test at the end of the test suite [ticket/11548] Fix test errors in groups test on develop [ticket/11548] Check upload avatar URL the same way as in phpBB 3.0 [ticket/11548] Fix incorrect usage of array_map on acp groups page [ticket/11665] Fix test class name [ticket/11664] Stop creating php.html file in root path in tests [ticket/11665] Can't change file names already sent to set_filenames [ticket/11662] Typos: occured -> occurred [ticket/11662] Typos: occured -> occurred [ticket/11660] Fix bugs from bugs in #11651 (missing vars, db->sql_connect) [feature/auth-refactor] Add parent::setUp() in setUp() [feature/auth-refactor] Changes [feature/auth-refactor] DataProvider for acp_board test ...
PHPBB3-9657
PHPBB3-9657
Details
Ticket: http://tracker.phpbb.com/browse/PHPBB3-9657
RFC: https://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=32712