Skip to content

Commit

Permalink
Update install script
Browse files Browse the repository at this point in the history
  • Loading branch information
Septdir committed Jul 9, 2024
1 parent bdeb4c2 commit f72112c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fileTemplates/[Joomla] Install Script.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -138,8 +144,8 @@ public function install(InstallerAdapter \$adapter): bool
{
#if (${enablePlugin})
\$this->enablePlugin(\$adapter);

#end

return true;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit f72112c

Please sign in to comment.