return (isset($this->configuration['configuration']['devtools']) && !empty($this->configuration['configuration']['devtools']['importFromPath'])) ? $this->configuration['configuration']['devtools']['importFromPath'] : '';
}
+ /**
+ * Returns the login data for the WoltLab package servers.
+ */
+ public function getPackageServerLogin(): array
+ {
+ if (isset($this->configuration['packageServerLogin']['username']) && $this->configuration['packageServerLogin']['password']) {
+ return $this->configuration['packageServerLogin'];
+ }
+
+ return [];
+ }
+
/**
* Returns the raw configuration data.
*
'path' => $importPath,
]))->executeAction();
}
+
+ $packageServerLogin = DevtoolsSetup::getInstance()->getPackageServerLogin();
+ if (!empty($packageServerLogin)) {
+ // All update servers installed at this point are only our own servers for which the same
+ // login data can be used.
+ $sql = "UPDATE wcf1_package_update_server
+ SET loginUsername = ?,
+ loginPassword = ?";
+ $statement = WCF::getDB()->prepare($sql);
+ $statement->execute([
+ $packageServerLogin['username'],
+ $packageServerLogin['password'],
+ ]);
+ }
}
/**