Commit Graph

75 Commits

Author SHA1 Message Date
Roardom
868ad35aa4 refactor: swap magic RedirectResponse withX('Y') to with('X', 'Y')
Allows ctrl+clicking to access the underlying function unlike the previous magic implementation. Probably also negligibly faster.

Swapped all instances of `>withSuccess(` -> `>with('success', `, `>withWarning(` -> `>with('warning', `, and `>withInfo(` -> `>with('info', ` with ide's find and replace.
2025-01-21 16:05:11 +00:00
Roardom
ee55abcd3b refactor: use relational upserts
New feature added to laravel 11.18-11.19 that results in cleaner code.
2024-08-10 09:43:58 +00:00
Roardom
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
HDVinnie
e73ade1a81 fix: forum create bug 2024-03-13 15:00:54 -04:00
Roardom
eda5f28d4c update: set default topic state filter per forum
Useful for forums dedicated to fixing bugs or adding suggestions. This way, topics can be closed when bugs are fixed or suggestions are implemented, and opening the forum only shows relevant bugs/suggestions by default. Topics with different states can be accessed by changing the filter back to `Any`.
2024-03-06 12:02:23 +00:00
Roardom
580da7022d refactor: rename permissions to forum_permissions 2024-02-25 00:19:04 +00:00
Roardom
686f1560ca update: separate forum categories into their own model 2024-02-12 07:39:52 +00:00
Roardom
f30dec4a0c update: remove show_forum permission
This permission is used the same as the `read_topic` permission.
2024-02-10 19:50:05 +00:00
Roardom
6bcdb71bde fix: group order in various locations 2024-02-01 12:27:50 +00:00
Roardom
88e0c4e1cb update: use foreign key constraints for forum and topics ids 2023-08-18 05:27:02 +00:00
Roardom
b6b4313bdc update: various database performance improvements
Use eager loading where necessary and add a few indexes. The existing index on private_messages for sender_id and read was probably a typo and intended for receiver_id. The first 3 tables indexes are added to are used for queries ran on every page load: namely the new pm, new notification and warnings indicator in the navbar. Additionally, another index on genre_movie proved useful for finding all the genres when given a movie id. Perhaps, another index for finding all movies within a genre would be good as well, but will leave that for a future optimization if deemed necessary.
2023-07-17 00:21:08 +00:00
Roardom
931901a384 refactor: use route model binding for staff forums 2023-07-07 03:18:13 +00:00
Roardom
5890ebc749 refactor: miscellaneous staff controller refactors 2023-07-07 00:28:47 +00:00
Roardom
9d4789ba91 refactor: require whitespace before statements 2023-07-07 00:27:13 +00:00
Roardom
d707b7d1a2 refactor: don't use abbreviated variable names 2023-07-07 00:26:17 +00:00
Roardom
738bc7f2d1 refactor: single line delete queries 2023-07-07 00:26:17 +00:00
HDVinnie
5232781f03 Merge pull request #2840 from Roardom/code-cleanup-3
(Refactor) Code Cleanup
2023-06-19 20:14:57 -04:00
Roardom
d2e36c368e refactor: reduce temporary variables passed to views 2023-06-19 23:25:40 +00:00
Roardom
1fa4a3e506 refactor: swap sorting in laravel to ordering in the database 2023-06-19 23:18:40 +00:00
Roardom
b5493c5642 refactor: swap where('id', '=', ) for find() 2023-06-19 23:18:40 +00:00
HDVinnie
d3f3510011 remove: unused foreach keys 2023-06-19 10:18:48 -04:00
Roardom
f3297917bb update: use livewire for forums 2023-02-08 18:14:14 -06:00
HDVinnie
f4ebee885c update: lint 2023-02-03 22:23:00 -05:00
HDVinnie
472c820f99 update: UNIT3D linting
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
2023-02-02 08:02:34 -05:00
HDVinnie
9f7ff35e07 PSR12 Linting 2023-01-08 21:11:15 +00:00
Roardom
c0ffee86db refactor: move forum requests to form requests 2023-01-08 05:04:49 -06:00
Roardom
694e6f85ff refactor: move middleware checking from controllers to routes 2023-01-05 21:04:37 -06:00
HDVinnie
2ca429c4ce Revert "PSR12 Linting"
This reverts commit 7e65e1d589.
2022-09-11 19:51:58 -04:00
HDVinnie
7e65e1d589 PSR12 Linting 2022-09-11 23:50:41 +00:00
HDVinnie
594b7864d9 refactor: adopt new helpers in laravel 9 2022-03-06 17:20:05 -05:00
HDVinnie
d3abd28925 update: type hints 2022-01-08 15:35:53 -05:00
HDVinnie
77ec35bea5 chore: apply the laravel code style linter 2022-01-08 00:03:12 -05:00
HDVinnie
97394c062f chore: adopt type hints 2022-01-07 23:35:33 -05:00
HDVinnie
2343b6b4b0 security: improper access control for forum tools
- A user in the moderator group is able to access forum tools meant only for admin and owner group users. Thus a moderator is able to create, update and destroy forums.
- The forum tools were hidden in staff dash to mods but did not stop them from accessing the route directly.
2021-10-23 19:32:06 -04:00
HDVinnie
2a53cea216 refactor: newline after statement 2021-09-28 12:49:46 -04:00
clandestine8
a737482e79 Apply fixes from StyleCI
[ci skip] [skip ci]
2021-09-06 23:26:02 +00:00
HDVinnie
321847e067 Apply fixes from StyleCI
[ci skip] [skip ci]
2021-05-16 02:41:53 +00:00
HDVinnie
3407075214 refactor: better php8 usage
- Change simple property init and assign to constructor promotion
- Remove unused variable in catch()
- Change docs types to union types, where possible
2021-05-15 22:41:28 -04:00
HDVinnie
e57fd9e2a1 cleanup: forum controller 2020-12-28 23:44:23 -05:00
HDVinnie
5aac6a8f04 Apply fixes from StyleCI
[ci skip] [skip ci]
2020-07-22 20:57:33 +00:00
HDVinnie
0733269867 update: phpdoc blocks 2020-07-22 16:57:13 -04:00
HDVinnie
a975116218 refactor: preslash simple functions
- Add pre-slash to short named functions to improve performance by almost 30%
-  @see https://stackoverflow.com/questions/55419673/php7-adding-a-slash-to-all-standard-php-functions-php-cs-fixer-rule
2020-07-22 15:09:37 -04:00
HDVinnie
4b9c006a05 chore: phpdoc blocks cleanup 2020-03-05 10:46:14 -05:00
HDVinnie
0eb606aa51 refactor: remove unnecessary ternary expression 2020-02-14 13:08:04 -05:00
HDVinnie
6eaeb07fc1 refactor: simplify ifelse to ternary 2020-02-13 17:30:47 -05:00
HDVinnie
e47afe4ab4 chore: styleci 2020-02-12 14:51:22 -05:00
HDVinnie
80c842e39c chore: update license block
- make styleci happy
2020-02-12 14:49:18 -05:00
HDVinnie
dbb928f940 chore: update license block 2020-02-12 14:45:59 -05:00
HDVinnie
9a893662de Apply fixes from StyleCI
[ci skip] [skip ci]
2020-01-08 16:28:32 +00:00
HDVinnie
d889971834 Apply fixes from StyleCI
[ci skip] [skip ci]
2019-11-05 22:40:30 +00:00