// default values
if (empty($_POST)) {
- $eventIDs = [];
foreach ($this->events as $events) {
foreach ($events as $event) {
- $eventIDs[] = $event->eventID;
$this->settings[$event->eventID] = [
'enabled' => $event->preset,
'mailNotificationType' => $event->presetMailNotificationType
* @throws SystemException
*/
protected function loadApplication(Application $application, $isDependentApplication = false) {
- $applicationObject = null;
$package = PackageCache::getInstance()->getPackage($application->packageID);
// package cache might be outdated
if ($package === null) {
throw new SystemException("application identified by package id '".$application->packageID."' is unknown");
}
}
-
+
$abbreviation = ApplicationHandler::getInstance()->getAbbreviation($application->packageID);
$packageDir = FileUtil::getRealPath(WCF_DIR.$package->packageDir);
self::$autoloadDirectories[$abbreviation] = $packageDir . 'lib/';
*/
protected function configureDirectories() {
// get available packages
- $applications = $packages = [];
+ $packages = [];
foreach (glob(TMP_DIR . 'install/packages/*') as $file) {
$filename = basename($file);
if (preg_match('~\.(?:tar|tar\.gz|tgz)$~', $filename)) {
$application = Package::getAbbreviation($package->getPackageInfo('name'));
- $applications[] = $application;
$packages[$application] = [
'directory' => ($package->getPackageInfo('applicationDirectory') ?: $application),
'packageDescription' => $package->getLocalizedPackageInfo('packageDescription'),
'packageName' => $package->getLocalizedPackageInfo('packageName')
];
-
}
}
if (!empty(self::$directories)) {
$applicationPaths = $knownPaths = [];
- // use $showOrder instead of $applications to ensure that the error message for
- // duplicate directories will trigger in display order rather than the random
- // sort order returned by glob() above
+ // use $showOrder to ensure that the error message for duplicate directories
+ // will trigger in display order rather than the random sort order returned
+ // by glob() above
foreach ($showOrder as $application) {
$path = FileUtil::getRealPath($documentRoot . '/' . FileUtil::addTrailingSlash(FileUtil::removeLeadingSlash(self::$directories[$application])));
if (strpos($path, $documentRoot) !== 0) {