primo commit
This commit is contained in:
22
plugins/quickicon/jem/script.php
Normal file
22
plugins/quickicon/jem/script.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Installer\InstallerScript;
|
||||
|
||||
class PlgQuickiconJemInstallerScript extends InstallerScript
|
||||
{
|
||||
public function postflight($type, $parent)
|
||||
{
|
||||
if ($type === 'install' || $type === 'discover_install') {
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->update($db->quoteName('#__extensions'))
|
||||
->set($db->quoteName('enabled') . ' = 1')
|
||||
->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
|
||||
->where($db->quoteName('element') . ' = ' . $db->quote('jem'))
|
||||
->where($db->quoteName('folder') . ' = ' . $db->quote('quickicon'));
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user