Skip to content

Commit

Permalink
Merge branch '4.x' of https://github.com/craftcms/cms into 5.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
brandonkelly committed Apr 15, 2024
2 parents 98e9151 + 3840c69 commit 0a27be8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Fixed a bug where the Database Backup utility was present when the `backupCommand` config setting was set to `false`.
- Fixed a bug where element selection modals were only showing the first 100 elements. ([#14790](https://github.com/craftcms/cms/issues/14790))
- Fixed a PHP error that could occur on the Dashboard if any Quick Post widgets hadn’t been saved since before Craft 1.2. ([#14794](https://github.com/craftcms/cms/issues/14794))
- Fixed a bug where double-clicking on an inline Matrix block tab would cause it to expand/collapse. ([#14791](https://github.com/craftcms/cms/issues/14791))
Expand Down
9 changes: 7 additions & 2 deletions src/services/Utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ public function getAllUtilityTypes(): array

$utilityTypes[] = ClearCaches::class;
$utilityTypes[] = DeprecationErrors::class;
$utilityTypes[] = DbBackup::class;

$generalConfig = Craft::$app->getConfig()->getGeneral();
if ($generalConfig->backupCommand !== false) {
$utilityTypes[] = DbBackup::class;
}

$utilityTypes[] = FindAndReplace::class;
$utilityTypes[] = Migrations::class;

Expand All @@ -97,7 +102,7 @@ public function getAllUtilityTypes(): array
]);
$this->trigger(self::EVENT_REGISTER_UTILITIES, $event);

$disabledUtilities = array_flip(Craft::$app->getConfig()->getGeneral()->disabledUtilities);
$disabledUtilities = array_flip($generalConfig->disabledUtilities);

return array_values(array_filter($event->types, function(string $class) use ($disabledUtilities) {
/** @var string|UtilityInterface $class */
Expand Down

0 comments on commit 0a27be8

Please sign in to comment.