Commit Graph

8745 Commits

Author SHA1 Message Date
evazion
c2688e3aff Fix #4263: Wiki page differences use the wrong order.
Standardize DiffBuilder to treat the first argument as the new item and
the second argument as the old item. This is the order used in most
other places.
2020-01-21 00:09:38 -06:00
evazion
b62cdc4cfe test: move test/models/* to test/unit/*. 2020-01-21 00:09:38 -06:00
evazion
79015b4341 tests: fix various broken tests. 2020-01-21 00:09:38 -06:00
evazion
cbbeac00df /saved_searches: fix duplicate input_html in label field. 2020-01-21 00:09:38 -06:00
evazion
b4ce2d83a6 models: remove belongs_to_creator macro.
The belongs_to_creator macro was used to initialize the creator_id field
to the CurrentUser. This made tests complicated because it meant you had
to create and set the current user every time you wanted to create an
object, when lead to the current user being set over and over again. It
also meant you had to constantly be aware of what the CurrentUser was in
many different contexts, which was often confusing. Setting creators
explicitly simplifies everything greatly.
2020-01-21 00:09:38 -06:00
evazion
77bf9ac7f3 Merge pull request #4267 from BrokenEagle/add-report-function
Create the ability to send reports to moderators
2020-01-21 00:08:31 -06:00
BrokenEagle
5f746c1a34 Made recommended changes to moderator reports (see #4267) 2020-01-21 01:38:08 +00:00
evazion
1104f87b1f Merge pull request #4268 from BrokenEagle/universal-array-parameters
Add ability to search for multiple name values on the same field
2020-01-20 16:35:45 -06:00
BrokenEagle
34368272e8 Added ability to search for URL array parameters
- Also added in different string splitters for the text fields
- Removed or renamed parameters covered by the main search function
2020-01-19 23:59:23 +00:00
BrokenEagle
29e8b89c93 Use better method for querying moderation reports on posts and topics
- Also moved the control logic out of the views and into the models
2020-01-19 20:16:22 +00:00
BrokenEagle
16100ecfe6 Use better method of querying the moderation reports for an instance
The use of any? and count was forcing new SQL requests for each statement.
Instead, present? and length were used which act on the reports once loaded.
Although unneeded, the comment and forum views were changed as well for consistency.
2020-01-19 00:09:51 +00:00
BrokenEagle
f3ce811def Add tests for moderation reports
Added an HTML render for the new endpoint to get the tests to work.
It should probably have had one anyways so this is alright.
2020-01-18 23:37:58 +00:00
BrokenEagle
491d476456 Add pruning of reports older than a week 2020-01-18 21:42:31 +00:00
BrokenEagle
a3e889bdf5 Added highlighting and notices for moderators
- Posts and topics have an added moderation_reports function
-- This is so all moderation reports can be loaded in a single query
- Those moderation reports are passed into the render functions separately
-- This is so the individual comments/posts don't have to be queried
2020-01-18 21:10:50 +00:00
BrokenEagle
4cef0e45c2 Create the ability to send reports to moderators
- Limited to Builders+
-- Moderator+ can also use as they may be too busy ATM
- Only on users, comments, and forum posts
- Multiple reports can be generated per instance
- Primarily posts to a moderator-only topic for viewability
- Secondarily has a table for searchability
-- Viewable only by moderators
2020-01-18 06:40:20 +00:00
evazion
4a7322b197 users: rework privacy mode into private favorites (fix #4257).
* Rename 'privacy mode' to 'private favorites'.
* Make the private favorites setting only hide favorites, not favgroups
  and not the user's uploads on their profile page.
* Make the favgroup is_public flag default to true instead of false and
  fix existing favgroups to be public if the user didn't have privacy mode
  enabled before.
* List _all_ public favgroups on the /favorite_groups index, not just
  favgroups belonging to the current user.
* Add a /users/<id>/favorite_groups endpoint.
2020-01-17 22:24:29 -06:00
evazion
2095dd3084 users: refactor bit_prefs search. 2020-01-17 22:13:12 -06:00
evazion
b7350b8fe0 tests: fix various broken tests. 2020-01-17 19:21:20 -06:00
evazion
20f893161b favgroups: optimize favgroup:<name> search metatag.
The previous method resulted in a `WHERE posts.id IN (<list of ids>)`
clause, which turned into a huge list when the favgroup had a lot of
posts.
2020-01-17 13:38:51 -06:00
evazion
e6ffdfdf81 favgroups: unify find by name methods.
Unify the `name_to_id`, `named`, and `find_by_name` methods into a
single `find_by_name_or_id` method that has consistent behavior in how
names are normalized.
2020-01-17 13:37:18 -06:00
evazion
d461bb2ad0 post sets: refactor pool/favgroup methods.
Eliminate the `has_pool?` and `pool_name` methods in favor of the `pool`
method. Likewise for favgroups.
2020-01-17 02:16:13 -06:00
evazion
d16756f186 post sets: remove unused methods. 2020-01-17 01:36:51 -06:00
evazion
9bce0b3743 post sets: eliminate PostSets::Base class. 2020-01-17 01:12:16 -06:00
evazion
ed75db8d93 Merge pull request #4266 from BrokenEagle/fix-missing-blank-message
Remove posts not shown for blank message check
2020-01-17 01:08:32 -06:00
BrokenEagle
b2d12e2e20 Remove posts not shown for blank message check 2020-01-17 07:01:16 +00:00
evazion
9ec30c85cf favgroups: prevent adding invalid posts to favgroups.
Prevent adding duplicate or nonexistent posts to favgroups. This was
possible by editing the post_ids field directly on the favgroup edit
page.
2020-01-17 00:19:23 -06:00
evazion
ab325c5d2b favgroups: convert post_ids from string to array. 2020-01-17 00:19:20 -06:00
evazion
eecd9a183d comments: add test for undeleting locked comments.
ref: #4258, #2728.
2020-01-17 00:18:29 -06:00
evazion
09833e9b61 Merge pull request #4259 from BrokenEagle/upload-commentary-enhancements
Add upload commentary enhancements
2020-01-17 00:18:17 -06:00
BrokenEagle
3a422b26df Removed unneeded commentary tag checkboxes
As per the discussion on GitHub, these will be handled instead
by the existing mechanisms of related and frequent tags.
2020-01-16 21:40:14 +00:00
evazion
526998c4c2 Merge pull request #4256 from BrokenEagle/update-column-attributes
Update HTML table column attributes
2020-01-16 12:22:27 -06:00
evazion
8bc5ff635a Merge pull request #4258 from BrokenEagle/comment-updating-lock
Lock comments edited/deleted by moderators
2020-01-16 12:09:34 -06:00
evazion
b03173d61e favgroups: fix favgroups with invalid post ids.
Fix favgroups containing post ids that don't exist. Most of these are from
typos or from old expunged posts that weren't properly removed from favgroups.
2020-01-15 23:32:51 -06:00
evazion
e42881fbbf Fix #4262: Exception when using Twitter video image links. 2020-01-15 15:20:33 -06:00
evazion
617e1ca98a users/show: change favcount link to ordfav: search. 2020-01-15 13:22:30 -06:00
evazion
56817b9b09 /wiki_pages: add confirmation to delete option in subnav menu. 2020-01-15 13:20:40 -06:00
evazion
7d53af64c1 favgroups: add create new option to add to favgroup dialog.
Add option to create a new favgroup when the user opens the Add to
Favgroup dialog and they don't have any favgroups yet.
2020-01-15 13:18:25 -06:00
evazion
1ce628c31f favgroups: fix add to favgroup not working.
Fix the Add to Favgroup button not working when the user only has 1
favgroup.
2020-01-15 13:17:04 -06:00
evazion
27bd94abec /dmails: fix column widths. 2020-01-14 23:56:55 -06:00
evazion
2ff7b30edc /dmails: fix incorrect To column. 2020-01-14 23:56:52 -06:00
BrokenEagle
82b621d87d Added upload commentary enhancements
- Can now translate commentary from the upload page
- Can now add commentary tags with a checkbox
2020-01-14 23:59:27 +00:00
BrokenEagle
4ec6bacac0 Lock comments edited/deleted by moderators 2020-01-14 19:02:07 +00:00
evazion
5bde45f90d Update .gitignore. 2020-01-14 11:24:30 -06:00
evazion
0ff78e5f4a artist finder: fix false positives for pixiv fanbox urls. 2020-01-14 10:20:06 -06:00
BrokenEagle
b3b896a9e3 Fix search by post ID and note ID links
- These were missing and needed on the vanilla note versions index
- Now they appear only if that particular URL parameter is not present
2020-01-13 21:21:15 +00:00
BrokenEagle
5d5cc66502 Remove empty column 2020-01-13 21:21:14 +00:00
BrokenEagle
63203d24cc Standardize use of column width parameter 2020-01-13 21:21:14 +00:00
BrokenEagle
3ab2c4c3ea Use optional parameter to set column class
- Fixes the extremely long class name on the post versions view
- Can now use one value instead of having to set th and td
- Added missing column classes on all tables
2020-01-13 21:21:13 +00:00
evazion
79aff89573 maintenance: prune approvers monthly instead of weekly.
* Move approver pruning from a weekly task to a monthly task.
* Move weekly maintenance tasks from Wednesdays at 1:30am to Sundays at
  midnight (UTC).
2020-01-13 13:23:22 -06:00
evazion
ec8c427ef3 reports/uploads: remove upload report page. 2020-01-13 12:58:20 -06:00