diff --git a/fileTemplates/[Joomla] Install Script.php b/fileTemplates/[Joomla] Install Script.php index 66625f6..40b6521 100644 --- a/fileTemplates/[Joomla] Install Script.php +++ b/fileTemplates/[Joomla] Install Script.php @@ -8,13 +8,19 @@ use Joomla\CMS\Application\AdministratorApplication; use Joomla\CMS\Factory; +use Joomla\CMS\Installer\Installer; use Joomla\CMS\Installer\InstallerAdapter; use Joomla\CMS\Installer\InstallerScriptInterface; use Joomla\CMS\Language\Text; +use Joomla\CMS\Log\Log; use Joomla\CMS\Version; use Joomla\Database\DatabaseDriver; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; +use Joomla\Filesystem\Folder; +use Joomla\Filesystem\File; +use Joomla\Filesystem\Path; +use Joomla\Registry\Registry; return new class () implements ServiceProviderInterface { public function register(Container \$container) @@ -138,8 +144,8 @@ public function install(InstallerAdapter \$adapter): bool { #if (${enablePlugin}) \$this->enablePlugin(\$adapter); + #end - return true; } @@ -154,9 +160,11 @@ public function install(InstallerAdapter \$adapter): bool */ public function update(InstallerAdapter \$adapter): bool { + #if (${refreshMediaVersion}) // Refresh media version (new Version())->refreshMediaVersion(); + #end return true; } @@ -209,6 +217,7 @@ public function preflight(string \$type, InstallerAdapter \$adapter): bool */ public function postflight(string \$type, InstallerAdapter \$adapter): bool { + \$installer = \$adapter->getParent(); if (\$type !== 'uninstall') { #if (${parseLayouts})