fix static on prod
This commit is contained in:
parent
5bab6976ed
commit
dcf0c8ec2e
@ -212,7 +212,7 @@ HTML;
|
||||
}
|
||||
|
||||
protected function getFooterScriptTags(): string {
|
||||
global $config;
|
||||
global $config, $globalContext;
|
||||
|
||||
$html = '<script type="text/javascript">';
|
||||
|
||||
@ -220,7 +220,7 @@ HTML;
|
||||
$versions = '{}';
|
||||
else {
|
||||
$versions = [];
|
||||
foreach ($config['assets'] as $name => $v) {
|
||||
foreach ($config['assets'][$globalContext->project] as $name => $v) {
|
||||
list($type, $bname) = $this->getStaticNameParts($name);
|
||||
$versions[$type][$bname] = $v;
|
||||
}
|
||||
@ -296,7 +296,7 @@ HTML;
|
||||
protected function getStaticIntegrityAttribute(string $name): string {
|
||||
if (isDev())
|
||||
return '';
|
||||
global $config;
|
||||
return ' integrity="'.implode(' ', array_map(fn($hash_type) => $hash_type.'-'.$config['assets'][$name]['integrity'][$hash_type], self::RESOURCE_INTEGRITY_HASHES)).'"';
|
||||
global $config, $globalContext;
|
||||
return ' integrity="'.implode(' ', array_map(fn($hash_type) => $hash_type.'-'.$config['assets'][$globalContext->project][$name]['integrity'][$hash_type], self::RESOURCE_INTEGRITY_HASHES)).'"';
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user