-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstall.joomla.php
More file actions
44 lines (37 loc) · 992 Bytes
/
install.joomla.php
File metadata and controls
44 lines (37 loc) · 992 Bytes
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
41
42
43
44
<?php
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Installer\Installer;
class com_acymInstallerScript
{
public function install($parent)
{
}
public function update($parent)
{
}
public function preflight($type, $parent)
{
return true;
}
public function postflight($type, $parent)
{
return true;
}
public function uninstall($parent)
{
$db = Factory::getDbo();
$jversion = preg_replace('#[^0-9\.]#i', '', JVERSION);
$method = version_compare($jversion, '4.0.0', '>=') ? 'execute' : 'query';
$db->setQuery('UPDATE `#__modules` SET `published` = 0 WHERE `module` = "mod_acym"');
$db->$method();
$db->setQuery(
'UPDATE `#__extensions`
SET `enabled` = 0
WHERE `enabled` = 1
AND `type` = "plugin"
AND `element` IN ("acymtriggers", "acymailoverride", "acymailing", "jceacym")'
);
$db->$method();
}
}