fix: clear favicon stamp on install/update to force regeneration (#1)
Ensures site.webmanifest and all favicon files are regenerated after every template install or update. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -91,11 +91,25 @@ class Tpl_MokoonyxInstallerScript implements InstallerScriptInterface
|
|||||||
// On install or update: migrate from MokoCassiopeia if it exists
|
// On install or update: migrate from MokoCassiopeia if it exists
|
||||||
if ($type === 'install' || $type === 'update') {
|
if ($type === 'install' || $type === 'update') {
|
||||||
$this->migrateFromCassiopeia();
|
$this->migrateFromCassiopeia();
|
||||||
|
$this->clearFaviconStamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete the favicon stamp file so favicons and site.webmanifest
|
||||||
|
* are regenerated on the next page load after install/update.
|
||||||
|
*/
|
||||||
|
private function clearFaviconStamp(): void
|
||||||
|
{
|
||||||
|
$stampFile = JPATH_ROOT . '/images/favicons/.favicon_generated';
|
||||||
|
if (is_file($stampFile)) {
|
||||||
|
@unlink($stampFile);
|
||||||
|
$this->logMessage('Cleared favicon stamp — will regenerate on next page load.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detect MokoCassiopeia and create matching MokoOnyx styles with the same params.
|
* Detect MokoCassiopeia and create matching MokoOnyx styles with the same params.
|
||||||
* Creates a MokoOnyx style copy for each MokoCassiopeia style.
|
* Creates a MokoOnyx style copy for each MokoCassiopeia style.
|
||||||
|
|||||||
Reference in New Issue
Block a user