-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.php
40 lines (35 loc) · 1.08 KB
/
script.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* @package quantummanagermedia
* @author Dmitry Tsymbal <[email protected]>
* @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved.
* @license GNU General Public License version 3 or later; see license.txt
* @link https://www.norrnext.com
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Version;
defined('_JEXEC') or die;
/**
* Quantummanagermedia script file.
*
* @package A package name
* @since 1.0
*/
class plgSystemQuantummanagermediaInstallerScript
{
/**
* Called after any type of action
*
* @param string $route Which action is happening (install|uninstall|discover_install|update)
* @param JAdapterInstance $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function postflight($route, $adapter)
{
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->update('#__extensions')->set('enabled=1')->where('type=' . $db->q('plugin'))->where('element=' . $db->q('quantummanagermedia'));
$db->setQuery($query)->execute();
}
}