Commit graph

205 commits

Author SHA1 Message Date
tadhgboyle
e569c92cde
Update Template config to use Settings system rather than Cache (#3669)
* Update Template config to use Settings system rather than Cache

* Remove is_default from templates, use only the Settings value

* Convert template_settings

* lint

* fix

* fix
2025-06-04 21:45:50 -07:00
tadhgboyle
b2b7a60867
Update Avatar config to use Settings system rather than Cache (#3664)
* Update Avatar config to use Settings system rather than Cache

* wip

* wip

* wip

* wip

* 🔥 built in avatar source

* fix Visage source

* lint

* Update 230.php
2025-05-23 16:55:55 -07:00
tadhgboyle
07d1e05229
Create and implement Cache#fetch (#3662)
* Create and implement `Cache#fetch`

* convert more

* fix

* wip

* wip

* Apply fixes from StyleCI (#3663)

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

* wip, more conversions

* clear widget cache on setting update

* fix

* convert

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2025-05-20 18:37:24 -07:00
tadhgboyle
121c9caf7f
Drop nl2_users.warning_points column from users table (#3621)
* Drop `nl2_users.warning_points` column from users table

* lint
2025-04-25 01:32:22 -07:00
Partydragen
ea2853924f
Move PRE_VALIDATED_DEFAULT to init (#3600)
* Move PRE_VALIDATED_DEFAULT to init

* Fix StyleCI complain
2025-04-17 16:58:46 +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
Partydragen
0ff02595bc
Revert removal of enable debugbar (#3582) 2025-03-09 15:40:38 +00:00
Sam
db647d9b4e
Add Smarty and Twig template engines (#3452)
* Add Smarty and Twig template engines

* Update composer.json

* Convert Widgets class to template engine and PHPStan fixes

* Fix widget initialisation

* Fix panel widget initialisation

* chore: remove debug return

* feat: convert 403/404 pages to new template system and general tidy

* chore: style fixes

* feat: update latest pages to new template engine

* feat: template base should not be nullable in onPageLoad

* feat: set template base directory upon initialisation and allow custom smarty security directories

* chore: fix style
2025-02-24 18:44:29 +00:00
Partydragen
f6e3dcc749
Revert is_writable should be negative (#3547)
Now error is show when the folders is successfully writeable!

Revert the change from https://github.com/NamelessMC/Nameless/pull/3534
https://github.com/NamelessMC/Nameless/issues/3480
2024-10-18 08:30:48 -07:00
tadhgboyle
ab6a0331cb
Add user sessions page (#3278)
* Save device information on login

* Users sessions page

* PR comments & device detection improvements

* Fix code-style

* Store IP in session & display on the user sessions page

* Don't show session hash, add last seen

* Fix last seen translation, ...

* Unnecesary Output::getClean() - Partydragen

* Apparently I did use admin/sessions language term

* Show location of ip

* Update custom/panel_templates/Default/core/users_sessions.tpl

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>

* Update custom/languages/en_UK.json

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>

* Update modules/Core/pages/panel/users_sessions.php

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>

* Update modules/Core/pages/panel/users_sessions.php

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>

* use country the second time

* wip

* wip usercp sessions view

* wip

* wip - show ip to user

* wip

* wip

* chore: fix build issues

* feat: add token expiry to sessions table and increase default expiry to 1 month

* feat: prevent access to geoip database

* feat: correct migrations for user sessions columns

* feat: add missing localisation terms to sessions page

* chore: purify agent info

---------

Co-authored-by: Supercrafter100 <58982133+supercrafter100@users.noreply.github.com>
Co-authored-by: Sam <samerton@users.noreply.github.com>
2024-10-17 23:21:27 -07:00
Robin
6c8c5551ba
Dynamic permission fix message (#3534) 2024-10-17 22:53:39 -07:00
Partydragen
a352cfcad0
Allow store module bypass maintenance (#3517) 2024-07-14 11:24:31 +01:00
Sam
9ce7b650df
Mass message rework (#3494)
* wip: mass messaging rework

* WIP notifications

* feat: mass messaging

* chore: tidy force migration

* chore: remove dev template

* style: styleci fixes

* fix: mass message bypass notification settings + mass message bypass purification

* fix: typo in alerts page
2024-03-31 20:19:43 +01:00
Partydragen
95d4a440e2
Merging of OAuth + Connections (#3460)
* Beginning merging of OAuth2 + Connections

* Add Google Integration

* Remove oauth language terms

* Move OAuth settings to Integration settings

* Make OAuth optional for register/login

* Beginning merging of OAuth2 + Connections

Add Google Integration

Remove oauth language terms

Move OAuth settings to Integration settings

Make OAuth optional for register/login

* Fixes

---------

Co-authored-by: Sam <samerton@users.noreply.github.com>
2024-03-09 20:40:13 +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
Sam
63c3f67c4e
Require module autoload file before module init (#3397)
* Require module autoload file before module init

* Change module loading to require once
2023-06-17 10:50:12 +01:00
Tadhg Boyle
d0fba0cbe9
Replace Util::getSetting/Util::setSetting usages (#3387) 2023-06-12 10:30:49 -06:00
Sam
20396e19ad
Support custom migration tables (#3380)
* 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
2023-06-10 17:38:20 +01:00
Sam
50a431ffb7
Add dependency injection library + task to generate sitemap (#3332)
* Add dependency injection library and task to generate sitemap

* Add default value for queue runner

* Fix assigning data and output to class variables

---------

Co-authored-by: Partydragen <adrian_kili@outlook.com>
2023-04-30 20:07:37 +01:00
Tadhg Boyle
8d09a86cb8
Misc fixes + improvements (#3270) 2023-03-23 20:01:23 -07:00
Tadhg Boyle
e2130be87a
Event system DX improvements (#3226)
Co-authored-by: Partydragen <admin@partydragen.com>
Co-authored-by: Robin Slot <robin+github@rkslot.nl>
2023-03-01 11:35:10 -08:00
Robin
b6c00d6167
Remove MINECRAFT constant (#3225)
Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2023-02-16 12:57:24 +01:00
Sam
6c56264b46
Show message if there was an error loading a widget (#3138)
* Show message if there was an error loading a widget

* Pass language and smarty into widgets class
2022-12-16 11:14:38 +01:00
Partydragen
8e50f13393
Fix force HTTPS redirect 2022-11-07 16:27:18 +01:00
Supercrafter100
f993ebdabc
Allow browser scripts to bypass force_2fa redirects (#3076)
* Allow browser scripts to bypass force_2fa redirects so secret doesn't get regenerated

* Remove space

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2022-10-07 17:20:17 -04:00
Supercrafter100
9c4cf71bc2
Missing $ 2022-09-14 20:09:55 +02:00
Partydragen
469bebc178
Rework user sessions system (#3000)
Co-authored-by: samerton <samerton@users.noreply.github.com>
2022-08-12 22:29:09 -06:00
Partydragen
3a38fd48fe
Discord webhook formatter (#2830)
* Discord webhook formatter

* Move createAnnouncement to hook class

* Update DiscordFormatterHook

* Hide internal events

* Update CHANGELOG.md

* Add Normal webhook type (Raw Data)

* Move DiscordFormatterHook to discord module

* Revert event settings changes

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2022-07-31 12:16:33 +01:00
Robin
9de500467e Use strict equality for null checking 2022-07-03 20:56:15 +02:00
Tadhg Boyle
042a051776 Fix Oauth login when maintenance mode is enabled 2022-06-29 22:24:16 -06:00
Tadhg Boyle
3cb6ecaa69 Fix #2890 2022-06-27 20:56:14 -06:00
Robin
ba33533398 Case insensitive header handling 2022-06-25 10:00:17 +02:00
Tadhg Boyle
6e023e7e4b Remove old references to core/email.php 2022-06-22 12:43:30 -06:00
Tadhg Boyle
314c809849
Global debugging constants to optimize requests when users cannot view exception page (#2872) 2022-06-17 22:46:42 -06:00
Tadhg Boyle
5e07ac2d70 Create and utilize Text class, add deprecation warnings 2022-06-13 22:44:01 -06:00
Tadhg Boyle
307096fb54 Create and utilize HttpUtils class 2022-06-13 22:24:43 -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
Robin
99d16db49d Use Util::getProtocol, move autoload #2828 2022-06-08 09:38:44 +02:00
Partydragen
d7a30ef317 Fix default language for webhooks 2022-06-04 13:58:49 +02:00
Robin
b62a1c9f7d Remove maintenance cache 2022-06-02 12:07:32 +02:00
Robin
07ea91a9b4 Remove timezone cache 2022-06-02 11:56:56 +02:00
Robin
71131bc930 Remove error reporting cache 2022-06-02 11:48:56 +02:00
Robin
32ae3463c6 Remove page load cache 2022-06-02 11:44:50 +02:00
Tadhg Boyle
26d103b949 Misc fixes 2022-06-02 00:11:12 -06:00
Tadhg Boyle
83404fd6d6 Fix #2793 2022-06-01 13:07:33 -06:00
Robin
30e6e03743 Remove internal usage of the Configuration class 2022-06-01 11:34:43 +02:00
Robin
67ee4bd17b Remove more queries usage 2022-06-01 11:09:17 +02:00
Robin
edd873e182 Remove sitename cache, fix XSS 2022-06-01 10:48:17 +02:00
Tadhg Boyle
c52b55f251 Improve checking for pending DB migrations on page load 2022-05-31 21:08:50 -06:00