Skip to content

Commit

Permalink
Merge branch '4.0' into 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Dec 10, 2024
2 parents 407d76e + 8a4ed75 commit c881aeb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ This is a log of major user-visible changes in each phpMyFAQ release.
- removed Webpack, now using Vite v6 (Thorsten)
- migrated from Jest to vitest (Thorsten)

### phpMyFAQ v4.0.1 - unreleased

- improved update handling of .htaccess file (Thorsten)
- updated 3rd party dependencies (Thorsten)

### phpMyFAQ v4.0.0 - 2024-12-06

- changed PHP requirement to PHP 8.2 or later (Thorsten)
Expand Down
6 changes: 3 additions & 3 deletions phpmyfaq/admin/category.main.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// Image upload
//
$request = Request::createFromGlobals();
$uploadedFile = $request->files->get('image');
$uploadedFile = $request->files->get('image') ?? [];
$categoryImage = new Image($faqConfig);
$categoryImage->setUploadedFile($uploadedFile);

Expand Down Expand Up @@ -77,9 +77,9 @@
->setName(Filter::filterInput(INPUT_POST, 'name', FILTER_SANITIZE_SPECIAL_CHARS))
->setDescription(Filter::filterInput(INPUT_POST, 'description', FILTER_SANITIZE_SPECIAL_CHARS))
->setUserId(Filter::filterInput(INPUT_POST, 'user_id', FILTER_VALIDATE_INT))
->setGroupId(Filter::filterInput(INPUT_POST, 'group_id', FILTER_VALIDATE_INT))
->setGroupId(Filter::filterInput(INPUT_POST, 'group_id', FILTER_VALIDATE_INT) ?? -1)
->setActive(Filter::filterInput(INPUT_POST, 'active', FILTER_VALIDATE_INT) ?? false)
->setImage($categoryImage->getFileName($categoryId, $categoryLang))
->setImage($categoryImage->getFileName($categoryId, $categoryLang) ?? '')
->setParentId($parentId)
->setShowHome(Filter::filterInput(INPUT_POST, 'show_home', FILTER_VALIDATE_INT));

Expand Down
15 changes: 15 additions & 0 deletions phpmyfaq/src/phpMyFAQ/Setup/EnvironmentConfigurator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
<?php

/**
* The environment configurator is responsible for adjusting the .htaccess file to the user's environment.
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*
* @package phpMyFAQ
* @author Thorsten Rinne <[email protected]>
* @copyright 2024 phpMyFAQ Team
* @license https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
* @link https://www.phpmyfaq.de
* @since 2024-11-16
*/

namespace phpMyFAQ\Setup;

use phpMyFAQ\Configuration;
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/src/phpMyFAQ/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class System
/**
* Patch level.
*/
private const VERSION_PATCH_LEVEL = 0;
private const VERSION_PATCH_LEVEL = 1;

/**
* Pre-release version.
Expand Down

0 comments on commit c881aeb

Please sign in to comment.