Commit Graph

515 Commits

Author SHA1 Message Date
Albert Yi
9aafc344fa Merge pull request #3666 from evazion/fix-3664
Fix #3664: Highlight non-gentags in post tooltip
2018-04-26 11:40:59 -07:00
Albert Yi
4b6019d6ad fixes #3668 2018-04-26 10:25:24 -07:00
evazion
e772de40a7 posts: add /posts/{id}.html?variant=tooltip template. 2018-04-25 22:12:26 -05:00
Albert Yi
97dd0680df remove download query from post file size link 2018-04-16 16:41:46 -07:00
Albert Yi
cd88a8df9f fixes #3620 2018-04-12 13:00:48 -07:00
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
Albert Yi
a25629bff9 fixes #3594 2018-04-11 11:14:58 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
evazion
9b62b78183 Fix #3601: Broken URLs in /posts.atom feed. 2018-04-05 16:46:23 -05:00
evazion
084fcd91ed Only generate tagged filenames for URLs on post show pages (#3597).
Don't generate tagged filenames for urls in the data attributes on
thumbnails, or in the /posts.json api.
2018-04-05 14:20:37 -05:00
Albert Yi
6c790c61d3 replace uploader information post previews and comment listing, rename tagger to top tagger 2018-03-27 10:49:41 -07:00
evazion
41a4ff15cd posts: remove unused file path / url methods.
* Remove file_path_for, cropped_file_url (dead code)
* Remove complete_preview_file_url (preview_file_url now returns absolute links)
* Remove `file_name` (only used for Download link in sidebar)
2018-03-20 19:49:55 -05:00
r888888888
0c5dcbbf68 Revert "Revert "implement post keepers""
This reverts commit b9fcfe0442.
2018-03-06 18:04:31 -08:00
Albert Yi
b9fcfe0442 Revert "implement post keepers" 2018-02-07 12:28:56 -08:00
r888888888
d10c6a3af7 display uploader for mods 2018-02-01 17:10:09 -08:00
r888888888
da2864e233 change keeper name to tagger 2018-02-01 17:07:30 -08:00
r888888888
32cc508edb hide uploader information on posts/show page, add keeper information 2018-02-01 14:38:03 -08:00
evazion
88f4a56890 Fix #3497: Invalid DText denial of service attack. 2018-01-14 16:14:18 -06:00
evazion
f9ffa2b47a Fix #3484: /posts: don't show wiki tab for metatags. 2017-12-31 12:25:17 -06:00
Albert Yi
b315ee25bc Merge pull request #3471 from BrokenEagle/fix-controller-views
Various fixes for controller views
2017-12-28 11:18:44 -08:00
BrokenEagle
5cdd8d8f67 Standardize position of page title and secondary links
- Removed path specification for secondary links where unneeded
2017-12-28 10:20:27 -08:00
BrokenEagle
d54b26c61d Convert tag category Javascript/CSS assets to ERB 2017-12-24 17:01:17 -08:00
r888888888
4d279cd16a Revert "hide embedded notes option"
This reverts commit b361809489.
2017-12-15 13:53:03 -08:00
Albert Yi
850ac353ed Merge pull request #3399 from BrokenEagle/fix-gold-safemode-message
Changed safe mode error message for Gold+ users
2017-12-13 14:26:50 -08:00
evazion
131c0109d4 Address #3415: og:image meta tags can point to video files. 2017-12-06 09:47:57 -06:00
BrokenEagle
839f0f653f Changed safe mode error message for Gold+ users
- Made explicit the error messages and their order
- Banned takes priority, then Gold+, then Safe
- Made the groups exclusive of each other
2017-12-05 19:08:01 -08:00
r888888888
3e6cb67c57 only cache notes if a post has notes 2017-11-21 14:46:17 -08:00
r888888888
c0ddf266fc move save search button to sidebar 2017-11-17 16:51:38 -08:00
r888888888
f180e1bbe2 add favoriting/unfavoriting indicators for fav button 2017-11-17 16:28:51 -08:00
evazion
487fe9fb5d Fetch source data: list Danbooru artist tag; elim duplicated code.
* In the `Fetch source data` box, list the Danbooru artist tag(s) that
  were found beside the artist name.

* Unify `Fetch source data` code that was duplicated between the
  uploads page and the post show page.
2017-11-14 23:29:29 -06:00
Albert Yi
0674a03fb6 Merge pull request #3353 from BrokenEagle/feat-add-meta-tag-category
Migrated tag logic into config file and added fifth tag category meta
2017-11-13 11:44:15 -08:00
r888888888
36948bbf33 move explore links to sidebar, fix popular searches action 2017-11-13 11:14:09 -08:00
r888888888
354247e3c7 disable common searches 2017-11-10 15:26:56 -08:00
r888888888
5e247df8ec enable view count js globally 2017-11-10 14:37:48 -08:00
r888888888
893563cf9a render view count js on post/show 2017-11-09 16:13:39 -08:00
r888888888
131734f7a6 enable post view count tracking (for mods initially) 2017-11-09 16:10:34 -08:00
BrokenEagle
6838901aac Moved non-config tag category info to its own class 2017-11-07 16:21:29 -08:00
BrokenEagle
1de8fd2bd6 Moved tag logic for Javascript to config file 2017-11-07 10:58:40 -08:00
Type-kun
af7c109912 Restrict post replacements to mod+ (issue #3348) 2017-11-01 13:19:52 +05:00
r888888888
83bfe3ee10 compromise for tag search autoexpansion #3310 2017-10-18 14:43:11 -07:00
r888888888
3eae2e279a accept return on tag search input 2017-10-17 18:27:42 -07:00
Albert Yi
63afefdf88 Merge pull request #3332 from BrokenEagle/feat-add-searchlink
Added searchbox link to responsive view
2017-10-13 12:11:39 -07:00
BrokenEagle
1410a8dae3 Added searchbox link to responsive view 2017-10-11 17:45:55 -07:00
r888888888
45ff443b36 fixes #3310 2017-10-11 17:36:35 -07:00
r888888888
d883de258c add rel meta links for prev and next page 2017-10-11 15:31:13 -07:00
r888888888
4905d035b7 tweak viewport 2017-10-10 18:14:44 -07:00
r888888888
13f7d7e66d add targeted post down voting report, add delayed job plugin to disable statement timeout 2017-10-10 12:56:57 -07:00
r888888888
9ffbae3cc0 expose resize image to window functionality to anon users 2017-09-29 18:11:22 -07:00
r888888888
ffb212c616 remove extraneous links from post/show 2017-09-18 15:00:39 -07:00
r888888888
0985f929cc style buttons for upload/post edit pages 2017-09-14 16:56:40 -07:00