Skip to content

Commit 1354e2c

Browse files
committed
Include the app.config.inc.php of the primary app
1 parent ff6c216 commit 1354e2c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,20 @@ public function resolveActiveApplication(string $path): void
261261

262262
if (!\defined('PACKAGE_ID')) {
263263
\define('PACKAGE_ID', $packageID);
264+
265+
if ($packageID !== 1) {
266+
$application = ApplicationHandler::getInstance()->getApplicationByID($packageID);
267+
\assert($application !== null);
268+
269+
// Include the `app.config.inc.php` of the primary app.
270+
$pathname = FileUtil::addTrailingSlash(
271+
FileUtil::getRealPath(
272+
\WCF_DIR . $application->getPackage()->packageDir
273+
)
274+
) . 'app.config.inc.php';
275+
276+
require_once $pathname;
277+
}
264278
}
265279
}
266280

0 commit comments

Comments
 (0)