From b3492e27e8cdeb75caff827c8b15f161d084e3d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 19 Oct 2023 14:25:45 +0200 Subject: [PATCH] Use `Box::$availablePositions` in BoxPackageInstallationPlugin::prepareImport() --- .../plugin/BoxPackageInstallationPlugin.class.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php index a64d0daa97..35af138b62 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php @@ -175,20 +175,7 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin $isMultilingual = false; $position = $data['elements']['position']; - if ( - !\in_array($position, [ - 'bottom', - 'contentBottom', - 'contentTop', - 'footer', - 'footerBoxes', - 'headerBoxes', - 'hero', - 'sidebarLeft', - 'sidebarRight', - 'top', - ]) - ) { + if (!\in_array($position, Box::$availablePositions)) { throw new SystemException("Unknown box position '{$position}' for box '{$identifier}'"); } -- 2.20.1