forked from zero-24/plg_system_httpheader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.php
56 lines (50 loc) · 1.26 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* HttpHeader Plugin
*
* @copyright Copyright (C) 2017 - 2019 Tobias Zulauf All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License Version 2 or Later
*/
defined('_JEXEC') or die;
use Joomla\CMS\Installer\InstallerScript;
/**
* Installation class to perform additional changes during install/uninstall/update
*
* @since 1.0
*/
class PlgSystemHttpHeaderInstallerScript extends InstallerScript
{
/**
* Extension script constructor.
*
* @since 1.0
*/
public function __construct()
{
// Define the minumum versions to be supported.
$this->minimumJoomla = '3.8';
$this->minimumPhp = '7.0';
$this->deleteFiles = array(
'/plugins/system/httpheader/subform/keyvalue.xml',
'/plugins/system/httpheader/subform/cspkeyvalue.xml',
'/plugins/system/httpheader/subform/customhttpheaders.xml',
);
$this->deleteFolder = array(
'/plugins/system/httpheader/subform/',
);
}
/**
* Function to perform changes during postflight
*
* @param string $type The action being performed
* @param ComponentAdapter $parent The class calling this method
*
* @return void
*
* @since 1.0.1
*/
public function postflight($type, $parent)
{
$this->removeFiles();
}
}