<header class="contentHeader">
<div class="contentHeaderTitle">
<h1 class="contentTitle">{lang}wcf.acp.license{/lang}</span></h1>
- {if $licenseNumber}
- <p class="contentDescription">{lang}wcf.acp.license.licenseNo{/lang}</p>
+ {if $licenseData->getLicenseNumber()}
+ <p class="contentDescription">{lang licenseNumber=$licenseData->getLicenseNumber()}wcf.acp.license.licenseNo{/lang}</p>
{/if}
</div>
{/hascontent}
</header>
-{if $licenseData->license[type] === 'developer'}
+{if $licenseData->getLicenseType() === 'developer'}
<p class="warning">{lang}wcf.acp.license.developerLicense{/lang}</p>
{/if}
{lang accessibleVersion=$requiresLicenseExtension[$package]}wcf.acp.license.package.outdated{/lang}
</span>
{/if}
- <a href="https://www.woltlab.com/license-extend/{$licenseNumber}/" class="externalURL" rel="nofollow noopener" target="_blank">{lang}wcf.acp.license.extend{/lang}</a>
+ <a href="https://www.woltlab.com/license-extend/{$licenseData->getLicenseNumber()}/" class="externalURL" rel="nofollow noopener" target="_blank">{lang}wcf.acp.license.extend{/lang}</a>
</span>
{else}
<button type="button" class="button small jsInstallPackage" data-package="{$package}" data-package-version="{$installablePackages[$package]}">
private array $availablePackages = [];
- private int $licenseNumber;
-
private array $installedPackages;
private array $installablePackages = [];
$licenseApi->updateLicenseFile();
$this->licenseData = $licenseApi->getData();
- if (isset($this->licenseData->license['licenseID'])) {
- $this->licenseNumber = $this->licenseData->license['licenseID'];
- }
$identifiers = \array_merge(
\array_keys($this->licenseData->woltlab),
WCF::getTPL()->assign([
'licenseData' => $this->licenseData,
'availablePackages' => $this->availablePackages,
- 'licenseNumber' => $this->licenseNumber,
'installedPackages' => $this->installedPackages,
'installablePackages' => $this->installablePackages,
'packageUpdates' => $this->packageUpdates,
)
{
}
+
+ public function getLicenseNumber(): ?string
+ {
+ return $this->license['licenseID'] ?? null;
+ }
+
+ public function getLicenseType(): string
+ {
+ return $this->license['type'];
+ }
}