Skip to content

Commit

Permalink
chore: merge from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
samerton committed Jun 16, 2024
2 parents 84c91f1 + 4d3f70d commit 198e294
Show file tree
Hide file tree
Showing 464 changed files with 9,852 additions and 5,477 deletions.
5 changes: 2 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Deprecations rule of thumb:
After adding a new module to core, you need to do the following:
1. Update the `Dockerfile.phpdoc` file to include the new module classes folder (this generates our [PHPDoc](https://phpdoc.namelessmc.com/) site)
2. Update `composer.json` to autoload the new module classes folder
3. Add a new term to the `custom/languages/en_UK.json` file for the module description to be shown during instal
3. Add a new term to the `modules/Core/language/en_UK.json` file for the module description to be shown during instal
- The term should be in the format `module_{module_name}_description`
- Don't forget to add it to the `WHITELISTED_TERMS` array in `dev/scripts/find_unused_language_terms.sh`
4. Create new database entry to install it by default
Expand All @@ -90,5 +90,4 @@ After adding a new module to core, you need to do the following:

1. Ensure you have a clean copy of the source code without leftover files from testing. For example, clone the Nameless repository into a new directory
2. Run ./dev/scripts/release.sh. Release zip files are produced and placed in `./release`.
3. TODO: Add instructions for producing a zip only containing files changed since the last release
4. TODO: Add instructions for publishing a release
3. TODO: Add instructions for publishing a release
12 changes: 1 addition & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
operating-system: ["ubuntu-latest"]
php-versions: ["7.4", "8.0", "8.1", "8.2"]
php-versions: ["7.4", "8.0", "8.1", "8.2", "8.3"]
steps:
- uses: actions/checkout@v2

Expand All @@ -23,16 +23,6 @@ jobs:
- name: Execute PHPStan
run: vendor/bin/phpstan --configuration=dev/phpstan.neon

code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: PHP Code Style (phpcs)
uses: chindit/actions-phpcs@master
with:
cli: -q --standard=dev/phpcs.xml

unused-language-term-check:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/vendor
/core/assets/vendor
/uploads/avatars/**
/uploads/logos/**
/node_modules/
composer.lock
checksums.json
Expand Down
13 changes: 13 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
risky: false
version: 7.4
preset: recommended
monolithic: true
finder:
name: "*.php"
disabled:
- align_double_arrow
- phpdoc_no_package
- concat_without_spaces
- include
- die_to_exit
- phpdoc_separation
2 changes: 1 addition & 1 deletion 403.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'HOME' => $language->get('errors', '403_home'),
'LOGIN' => $language->get('general', 'sign_in'),
'LOGIN_LINK' => URL::build('/login'),
'PATH' => (defined('CONFIG_PATH') ? CONFIG_PATH : '')
'PATH' => (defined('CONFIG_PATH') ? CONFIG_PATH : ''),
]
);

Expand Down
2 changes: 1 addition & 1 deletion 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'BACK' => $language->get('errors', '404_back'),
'HOME' => $language->get('errors', '404_home'),
'ERROR' => $language->get('errors', '404_error'),
'PATH' => (defined('CONFIG_PATH') ? CONFIG_PATH : '')
'PATH' => (defined('CONFIG_PATH') ? CONFIG_PATH : ''),
]
);

Expand Down
78 changes: 76 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,81 @@
# NamelessMC v2 Changelog

## [Unreleased](https://github.com/NamelessMC/Nameless/compare/v2.1.0...v2)
> [Milestone](https://github.com/NamelessMC/Nameless/milestone/21)
## [Unreleased](https://github.com/NamelessMC/Nameless/compare/v2.1.2...develop)
> [Milestone](https://github.com/NamelessMC/Nameless/milestone/22)
## [2.1.2](https://github.com/NamelessMC/Nameless/compare/v2.1.1...v2.1.2) - 2023-09-30
### Added
- No additions this release

### Changed
- Small misc improvements [#3389](https://github.com/NamelessMC/Nameless/pull/3389)
- Add PHP_SAPI checks on scripts [#3403](https://github.com/NamelessMC/Nameless/pull/3403)
- Rewrite release script to fix checksums in upgrade package [#3414](https://github.com/NamelessMC/Nameless/pull/3414)
- Ignore group sync request instead of returning error [#3433](https://github.com/NamelessMC/Nameless/pull/3433)
- Limit logs & support group sync from modules [#3426](https://github.com/NamelessMC/Nameless/pull/3426)
- Ignore adding group if it's invalid [#3436](https://github.com/NamelessMC/Nameless/pull/3436)
- Updated translations

### Fixed
- Rework user group cache issue [#3398](https://github.com/NamelessMC/Nameless/pull/3398)
- Re-add deleted term + fix Discord OAuth link success message [#3403](https://github.com/NamelessMC/Nameless/pull/3403)
- Fix typo in en_US translation [#3412](https://github.com/NamelessMC/Nameless/pull/3412)
- Fix auto verify OAuth email [#3413](https://github.com/NamelessMC/Nameless/pull/3413)
- Fix forum index showing topics without view other topics permission [#3410](https://github.com/NamelessMC/Nameless/pull/3410)
- Fix phpdoc build, pin version [#3438](https://github.com/NamelessMC/Nameless/pull/3438)
- Fix single/double quote not working within member list username CSS [#3427](https://github.com/NamelessMC/Nameless/pull/3427)

## [2.1.1](https://github.com/NamelessMC/Nameless/compare/v2.1.0...v2.1.1) - 2023-06-18
### Added
- Add Russian translation for Members module [#3352](https://github.com/NamelessMC/Nameless/pull/3352)

### Changed
- Add all missing languages to the Members module [#3350](https://github.com/NamelessMC/Nameless/pull/3350)
- Remove unable to update groups catch [#3360](https://github.com/NamelessMC/Nameless/pull/3360)
- Call compileQueries only when needed [#3386](https://github.com/NamelessMC/Nameless/pull/3386)
- Remove Discord discriminator requirement [#3374](https://github.com/NamelessMC/Nameless/pull/3374)
- Require module autoload file before module init [#3397](https://github.com/NamelessMC/Nameless/pull/3397)

### Fixed
- Fix AuthMe enabled value [#3349](https://github.com/NamelessMC/Nameless/pull/3349)
- Ensure Minecraft integration is enabled [#3356](https://github.com/NamelessMC/Nameless/pull/3356)
- Include .htaccess file in release zip [#3362](https://github.com/NamelessMC/Nameless/pull/3362)
- Fix missing cache settings [#3361](https://github.com/NamelessMC/Nameless/pull/3361)
- Fix user group issue [#3365](https://github.com/NamelessMC/Nameless/pull/3365)
- Fix forum title/description encoding on edit [#3359](https://github.com/NamelessMC/Nameless/pull/3359)
- Remove placeholder from singular message [#3369](https://github.com/NamelessMC/Nameless/pull/3369)
- Fix not being able to see Members page in Navigation settings [#3372](https://github.com/NamelessMC/Nameless/pull/3372)
- Fix multi query [#3383](https://github.com/NamelessMC/Nameless/pull/3383)
- Fix icon not being properly shown [#3377](https://github.com/NamelessMC/Nameless/pull/3377)
- Fix ghost player on status page [#3351](https://github.com/NamelessMC/Nameless/pull/3351)
- Fix outdated event [#3394](https://github.com/NamelessMC/Nameless/pull/3394)
- Fix OAuth linking for forced integrations [#3395](https://github.com/NamelessMC/Nameless/pull/3395)

## [2.1.1](https://github.com/NamelessMC/Nameless/compare/v2.1.0...v2.1.1) - 2023-06-18
### Added
- Add Russian translation for Members module [#3352](https://github.com/NamelessMC/Nameless/pull/3352)

### Changed
- Add all missing languages to the Members module [#3350](https://github.com/NamelessMC/Nameless/pull/3350)
- Remove unable to update groups catch [#3360](https://github.com/NamelessMC/Nameless/pull/3360)
- Call compileQueries only when needed [#3386](https://github.com/NamelessMC/Nameless/pull/3386)
- Remove Discord discriminator requirement [#3374](https://github.com/NamelessMC/Nameless/pull/3374)
- Require module autoload file before module init [#3397](https://github.com/NamelessMC/Nameless/pull/3397)

### Fixed
- Fix AuthMe enabled value [#3349](https://github.com/NamelessMC/Nameless/pull/3349)
- Ensure Minecraft integration is enabled [#3356](https://github.com/NamelessMC/Nameless/pull/3356)
- Include .htaccess file in release zip [#3362](https://github.com/NamelessMC/Nameless/pull/3362)
- Fix missing cache settings [#3361](https://github.com/NamelessMC/Nameless/pull/3361)
- Fix user group issue [#3365](https://github.com/NamelessMC/Nameless/pull/3365)
- Fix forum title/description encoding on edit [#3359](https://github.com/NamelessMC/Nameless/pull/3359)
- Remove placeholder from singular message [#3369](https://github.com/NamelessMC/Nameless/pull/3369)
- Fix not being able to see Members page in Navigation settings [#3372](https://github.com/NamelessMC/Nameless/pull/3372)
- Fix multi query [#3383](https://github.com/NamelessMC/Nameless/pull/3383)
- Fix icon not being properly shown [#3377](https://github.com/NamelessMC/Nameless/pull/3377)
- Fix ghost player on status page [#3351](https://github.com/NamelessMC/Nameless/pull/3351)
- Fix outdated event [#3394](https://github.com/NamelessMC/Nameless/pull/3394)
- Fix OAuth linking for forced integrations [#3395](https://github.com/NamelessMC/Nameless/pull/3395)

## [2.1.0](https://github.com/NamelessMC/Nameless/compare/v2.0.3...v2.1.0) - 2023-05-01
### Added
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.phpdoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM phpdoc/phpdoc as doc_builder
FROM phpdoc/phpdoc:3.4 as doc_builder

COPY . /source

WORKDIR /source

RUN mkdir /target && \
phpdoc \
phpdoc run \
-d 'core/classes' \
-d 'modules/Core/classes' \
-d 'modules/Discord Integration/classes' \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The following list is a brief summary of the features available in v2:
- ✨ Pretty URL option (requires mod_rewrite or special nginx config).
- 🎛 Widgets: allows modules to create widgets which can be displayed on most user-facing pages and display almost anything.
- ⏳ Queue: schedule tasks to happen at a certain point in the future
- 🚩 Translated into [over 20 languages](https://github.com/NamelessMC/Nameless/tree/v2/custom/languages)
- 🚩 Translated into [over 20 languages](https://github.com/NamelessMC/Nameless/tree/v2/modules/Core/language)


#### Customising Nameless
Expand Down Expand Up @@ -72,7 +72,7 @@ If you would like to assist with NamelessMC development by translating to your l
Please see the contributing document for information on how to contribute to NamelessMC.

## Security Policy
The security policy for NamelessMC can be found [here](https://github.com/NamelessMC/Nameless/blob/v2/SECURITY.md).
The security policy for NamelessMC can be found [here](/.github/SECURITY.md).

## Special Thanks
- All NamelessMC [contributors](https://github.com/NamelessMC/Nameless/graphs/contributors).
- All NamelessMC [contributors](https://github.com/NamelessMC/Nameless/graphs/contributors).
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ircmaxell/password-compat": "^1.0.4",
"astrotomic/php-twemoji": "^0.2.2",
"samerton/i18next": "^1.0.1",
"robmorgan/phinx": "^0.12.13",
"robmorgan/phinx": "^0.13.4",
"symfony/http-foundation": "^5.4.17",
"joypixels/emoji-toolkit": "^7.0",
"geoip2/geoip2": "^2.13",
Expand Down
5 changes: 2 additions & 3 deletions core/avatar/face.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
$view = isset($_GET['v']) ? $_GET['v'][0] : 'f';
$view = in_array($view, ['f', 'l', 'r', 'b']) ? $view : 'f';

function get_skin($user, $cache) {

function get_skin($user, $cache)
{
// Check cache
$cache->setCache('avatarCache_' . $user);
if ($cache->isCached($user)) {
Expand Down Expand Up @@ -49,7 +49,6 @@ function get_skin($user, $cache) {
$output .= 'Ne9AAAAAElFTkSuQmCC';
$output = base64_decode($output);
if ($user != '') {

$json = HttpClient::get('https://sessionserver.mojang.com/session/minecraft/profile/' . $user)->json();

if (isset($json->properties[0]->value)) {
Expand Down
Loading

0 comments on commit 198e294

Please sign in to comment.