Use `Box::$availablePositions` in BoxPackageInstallationPlugin::prepareImport()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 19 Oct 2023 12:25:45 +0000 (14:25 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 19 Oct 2023 12:25:45 +0000 (14:25 +0200)
wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php

index a64d0daa977100e941f8874df667714f8f82a516..35af138b623155e5d2249627461438e8b96c4b2e 100644 (file)
@@ -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}'");
         }