aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | | | | | [feature/soft-delete] Correctly synchronize the topic_visibility in sync()Joas Schilling2012-10-091-24/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Fix sync('topic_visibility')Joas Schilling2012-10-091-32/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Correctly update user_posts countJoas Schilling2012-10-091-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Fix display_user_activity()Joas Schilling2012-10-091-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Topic visibility is already synced by sync('topic')Joas Schilling2012-10-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Fix restoring a post via editingJoas Schilling2012-10-082-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Update post counts within set_post_visibilityJoas Schilling2012-10-082-112/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Change order of functionsJoas Schilling2012-10-081-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Allow to update multiple posts with set_post_visibilityJoas Schilling2012-10-082-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Add test case for (soft)deleting the only post + fixJoas Schilling2012-10-062-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Fix delete_post() functionJoas Schilling2012-10-062-27/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Update and simplify the logic on delete_post()Joas Schilling2012-10-062-57/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Todo: delete_topic case PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Fix SQL error in searchJoas Schilling2012-10-052-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Clean the code of hide_post() and rely on postcountJoas Schilling2012-10-051-29/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Update docs of can_soft_delete and remove can_restoreJoas Schilling2012-10-051-24/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Fix set_topic_visibility() so it passes the testsJoas Schilling2012-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Fix docs of set_post_visibility()Joas Schilling2012-10-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Update set_topic_visibility() with some more logicJoas Schilling2012-10-051-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, when a soft deleted topic is restored. Only posts that were approved at the time of soft deleting, are being restored. Same applies to soft deleting. Only approved posts will be marked as soft deleted. If you want to update all posts, use the force option. PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Allow forcing the set_visibility for all postsJoas Schilling2012-10-051-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Make use of set_post_visibility() limits when applicableJoas Schilling2012-10-051-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Extend functionality for updating a hole topicJoas Schilling2012-10-051-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Fix sync('topic') to match the new logicJoas Schilling2012-10-052-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes set_post_visibility() PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Fix the get functions to match the new logicJoas Schilling2012-10-051-103/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9567
| | * | | | | | | | | | | | [feature/soft-delete] Fix a bug in sync() and set_post_visibility()Joas Schilling2012-10-022-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Update doc blocks to proper formatJoas Schilling2012-10-021-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Add unit tests for get_global_visibility_sql()Joas Schilling2012-10-011-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Add unit tests for get_forums_visibility_sql()Joas Schilling2012-10-012-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Comment out user_posts update for the momentJoas Schilling2012-10-012-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It should rely on the permissions of the post not the current user. PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Allow setting the visibility change reasonJoas Schilling2012-09-282-18/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Comment out stuff about f_restore for performance reasonJoas Schilling2012-09-281-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Fix some more usages of _approved column namesJoas Schilling2012-08-303-31/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Update search to use $post_visibilityJoas Schilling2012-08-304-83/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Todo: Sphinx currently does not respect this setting at all. PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Try to fix search.phpJoas Schilling2012-08-301-20/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at least it's running now, but the performance is not very good. PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Add get_visibility_sql_forums based on globalJoas Schilling2012-08-301-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Simplification part2: user can see all item visibilitiesJoas Schilling2012-08-292-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user can see all visibilities, we can simply leave out the query part, instead of adding a bunch of ANDs. PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Simplify the query output if the user has m_restoreJoas Schilling2012-08-291-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Update restoring feature to use ajax if requested.Joas Schilling2012-08-291-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fixes the mcp as a hole: - displayes a success message - gives a link to the post, if only one was restored PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Use the variable which holds the correct item statusJoas Schilling2012-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Fix typo in column name topic_visibilityJoas Schilling2012-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Use autoloading for content_visibility classJoas Schilling2012-08-291-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Fix some small bugsJosh Woody2012-08-293-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Add a processor for action == restore in mcp_queue.phpJosh Woody2012-08-291-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Rename phpbb_visibility class to phpbb_content_visibilityJosh Woody2012-08-295-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the class to more accurately reflect what it does. PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Add unit tests for the phpbb_visibility classJosh Woody2012-08-291-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Implement the ability to soft-delete and restore postsJosh Woody2012-08-294-179/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] I told you I was going to rename the class!Josh Woody2012-08-294-29/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | | | | | | [feature/soft-delete] Correct some mistakes in e8d47Josh Woody2012-08-291-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notably: Uncomment the die() in create_schema_files, and add the class that makes everything tick. PHPBB3-9657
| | * | | | | | | | | | | | [feature/soft-delete] Lay the groundwork for a soft-delete featureJosh Woody2012-08-2916-122/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | | | | Merge branch 'develop' into ticket/11215David King2013-07-132-14/+191
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * develop: [ticket/11647] Always use & for URLs [ticket/11647] Allow custom ports [ticket/11647] Use $config for assets_version [ticket/11647] Fix invalid variable name [ticket/11647] New assets handling [ticket/11647] Fix tests for INCLUDEJS
| * | | | | | | | | | | | | Merge pull request #1519 from cyberalien/ticket/11647Nathan Guse2013-07-132-14/+191
| |\ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | Fix INCLUDEJS URLs handling