| Current Path : /home/jcjack6/transformptyoga.com/plugins/installer/anticopy/ |
| Current File : /home/jcjack6/transformptyoga.com/plugins/installer/anticopy/script.php |
<?php
/**
* @package Installer - AntiCopy
* @subpackage Plugin
* @author Makhgal Ganbold
* @publisher JExtBOX - BOX of Joomla Extensions (www.jextbox.com)
* @authorUrl www.galaa.net
* @copyright Copyright (C) 2021-2025 Makhgal Ganbold
* @license GNU/GPL v2 or later - http://www.gnu.org/licenses/gpl-2.0.html
* @since 3.0
*/
defined( '_JEXEC' ) or die;
use Joomla\CMS\Factory;
class plgInstallerAntiCopyInstallerScript
{
public function update($parent)
{
$this->install($parent);
}
public function install($parent)
{
// Enable plugin after install
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true)
->update($db->quoteName('#__extensions'))
->set($db->quoteName('enabled') . ' = 1')
->where($db->quoteName('element') . ' = ' . $db->quote('anticopy'))
->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
->where($db->quoteName('folder') . ' = ' . $db->quote('installer'));
$db->setQuery($query);
$db->execute();
}
}
?>