Commit graph

42 commits

Author SHA1 Message Date
tadhgboyle
d983be65ec
Convert Mentions to Notification system (#3628)
* Convert reports to Notification system

* fix unused term check for LanguageKey class

* simplify language#get

* remove n+1

* fix for multiple

* Convert Forum topic replies with Notifications

* review amendments

* fixes

* Apply fixes from StyleCI (#3627)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* add back existing_alerts

* remove unneeded exception

* add migrations

* fix

* lint

* Convert Mentions to Notification system

* fixes

* wip

* wip - code comments + fix mention parsing for custom page editing

* rename variable

* cleanup MentionsHook

* cleanup

* remove unused term

* Apply fixes from StyleCI (#3634)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* don't notify blocked users, but still tag them

* undo changes to DB class

* trailing comma

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2025-04-29 12:51:01 -07:00
Sam
02c81c7c45
Merge commit from fork
Co-authored-by: Sam <samerton@users.noreply.github.com>
2025-04-10 17:51:02 +01:00
Sam
6f15e14392
chore: fix styleci (#3588)
Co-authored-by: Sam <samerton@users.noreply.github.com>
2025-03-29 10:50:03 +00:00
tadhgboyle
0c80570609
Enable StyleCI (#3475)
* Create StyleCI config file

* Disable `phpdoc_separation`

* Apply fixes from StyleCI (#3476)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* style: styleci fixes

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Sam <samerton@users.noreply.github.com>
2024-03-09 11:19:55 +00:00
Tadhg Boyle
b13c29e5e4
Reactions revamp & profile widgets (#3272)
* Initial work on reactions revamp and profile widgets

* Remove unneeded changes

* Remove unneeded change

* fix style

* Render emojis in reaction list StaffCP

* wip minecraft account profile widget, sticky widgets on profile page

* Add server name and IP to last seen

* remove

* rename to reaction score to match member list

* align reactions table contents center

* fix

* wip - nicer abstraction, widgets never query db, skin 3d viewer (undecided)

* wip - make reaction modals ajax, copy new reaction bar to profile posts

* wip reaction modals

* wip proper sorting

* wip modals

* wip get reaction submission working on profile wall posts

* add back helpful and creative default reactions

* reduce query amount on view topic

* remove debug statement

* wip

* wip

* simplify ProfileWidget pages

* Revert forum dropdown

* fix css syntax

* fix emoji title and alt being strange

* add back order input

* sort widgets by order in list

* fix settings link always showing

* phpdoc

* add widget name to exception

* insert default widget data if not found

* missing end if

* properly cache forum news per-group

* fix

* fix cache key, news permission check

* fix styling

* wip

* respect reaction ordering

* wip

* wip

* support custom reaction scores, update member list to properly calculate

* don't hardcode words

* wip

* allow multiple reactions

* redirect to post

* code style

* phpstan

* wip

* remove hardcoded terms + fix copy

* use npm for skinview3d

* create ReactionContext and refactor

* fix cache

* docblocks

* fix spelling

* pr amendments
2023-06-21 18:19:46 +01:00
Sam
c8005749b0
Small misc improvements (#3389)
* Support custom migration tables

* Allow specifying custom migrations directory

* PHP 7.4 fix

* Consistent parameters and add rollback function

* Update Phinx and fix migrations

* Tidy strtolower

* Phinx feature flags

* Make makeWhere function in DB class public

* Add new buildAssetPath function to URL class

---------

Co-authored-by: Robin Slot <robin+github@rkslot.nl>
2023-06-19 09:14:11 +00:00
Sam
148441d69b
Use utf8mb4_unicode_ci for DB class to match Phinx (#3317)
* Use utf8mb4_unicode_ci for DB class to match Phinx

* Add charset + collation to cli install
2023-04-22 09:36:26 +01:00
Sam
1589b76c65
Queue system (#3274)
* Add new queue system

* Amend creation of task from new

* Fix unused terms

* Prevent task returning error from running infinitely

* Run tasks in transactions

* Update gitignore and package-lock

* Use PDO helpers for transaction

* WIP convert forum post task

* Trigger forum post conversion during upgrade

* Fix task scheduling and increase forum posts converted to 50

* Rename ONE_OF to IN
2023-03-30 18:42:40 +01:00
Robin
382c2e33d2
Remove code scheduled for removal in 2.1.0 (#3165)
* Remove code scheduled for removal in 2.1.0

* bring back the party function

* Use urlencode

* Remove `Queries.php` from backtrace check

---------

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2023-02-21 15:43:09 +01:00
samerton
c9bf8b16d6 Trim whitespace at start of query when determining if is select 2022-11-06 11:12:16 +00:00
PikaMug
27c06fbfdf
Fix spelling error in comment (#3060) 2022-08-29 15:59:00 -06:00
samerton
3a60992d5f Add parameter to DB::query to explicitly state a query is select 2022-06-25 20:10:52 +01:00
Tadhg Boyle
8ba42f7a83 Fix random issue with Forum::getLatestDiscussions returning an array of objects 2022-06-14 20:30:54 -06:00
Tadhg Boyle
e1255e07a6 Add deprecation notices for 2.1.0 2022-06-13 22:03:05 -06:00
Tadhg Boyle
3df85ce05a Swap Config class to prefer paths seperated by . 2022-06-12 20:35:45 -06:00
Robin
4d16d3f555
Rewrite configuration file operations (#2850)
Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2022-06-12 20:21:21 -06:00
Tadhg Boyle
35dff72296 Add method to execute a DB query within a MySQL transaction (See: #2812) 2022-06-10 22:37:20 -06:00
Tadhg Boyle
c4130972b4 Fix #2843 2022-06-10 18:58:36 -06:00
Tadhg Boyle
cf25a43bc4 Add back DB::decrement(...) 2022-06-04 09:43:51 -06:00
Tadhg Boyle
cba96c7cba Fix database connection for emoji support 2022-06-02 21:55:14 -06:00
Tadhg Boyle
94f7f89de8 Formatting 2022-05-29 17:53:22 -06:00
Robin
6917623a94 Set charset and engine in createTable() 2022-05-28 12:31:05 +02:00
Robin
9b5ae03035 Include changes from InteractsWithDatabase 2022-05-26 16:59:04 +02:00
Robin
31a05b7198 Remove default for port 2022-05-15 14:40:45 +02:00
Robin
5f3577aca0 Merge DB and DB_Custom to one class 2022-05-11 12:14:37 +02:00
Tadhg Boyle
936706f8ae Start of DB seeding system 2022-04-23 11:32:12 -07:00
Tadhg Boyle
623da528de Add class docblocks to database classes 2022-04-21 10:36:41 -07:00
Tadhg Boyle
4bc762c4be Create InteractsWithDatabase trait, so we don't repeat DB logic twice 2022-04-21 08:32:17 -07:00
Tadhg Boyle
5b1cca8d78 Nicer DB binding 2022-04-18 10:40:30 -07:00
Tadhg Boyle
94e64c1207
Add PHPDocs to core classes for new class docs site (#2602) 2022-02-14 20:48:15 -08:00
Tadhg Boyle
4025e7bfa6 Bump PHPStan level to 4 2022-02-01 20:15:35 -08:00
Tadhg Boyle
ecd261c357 Add PHPDebugBar 🎉 2021-12-25 22:26:25 -08:00
Tadhg
e0133a5cd5 Get PHP-CS to pass! 2021-12-07 22:14:12 -08:00
Tadhg
1566c86067 Fix some CS issues 2021-12-07 20:51:29 -08:00
Tadhg
3d03636506 Revert "Add PHP-CS to GitHub actions + fix most errors"
This reverts commit b17b292eda.
2021-12-07 20:17:45 -08:00
Tadhg
b17b292eda Add PHP-CS to GitHub actions + fix most errors 2021-12-07 20:06:10 -08:00
Robin
d473743620 Use correct type for preparedstatement param 2021-11-20 21:37:36 +01:00
Tadhg
2ee505d183 Misc code style fixes + registerEvent bug fix 2021-11-14 18:06:54 -08:00
Tadhg
6d1bb0ecbb Replace double quotes with single quotes where applicable 2021-10-30 16:25:44 -07:00
Tadhg
a9c678e4d4 convert all array(...) syntax to [...] 2021-10-29 22:00:05 -07:00
Tadhg
bdf6af33ff use 7.4 null operator 2021-10-28 13:14:57 -07:00
Tadhg
805e1e9e27 organize classes into folders + implement new autoloader 2021-10-27 22:26:24 -07:00
Renamed from core/classes/DB.php (Browse further)