-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.php
123 lines (110 loc) · 2.82 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/**
* @package Astroid Framework
* @author JoomDev https://www.joomdev.com
* @copyright Copyright (C) 2009 - 2019 JoomDev.
* @license GNU/GPLv2 and later
*/
// no direct access
defined('_JEXEC') or die;
class tz_jollyanyInstallerScript {
/**
*
* Function to run before installing the component
*/
public function preflight($type, $parent) {
}
/**
*
* Function to run when installing the component
* @return void
*/
public function install($parent) {
$this->removeUnnecessary();
}
/**
*
* Function to run when un-installing the component
* @return void
*/
public function uninstall($parent) {
}
/**
*
* Function to run when updating the component
* @return void
*/
function update($parent) {
$this->removeUnnecessary();
}
/**
*
* Function to update database schema
*/
public function updateDatabaseSchema($update) {
}
public function removeUnnecessary() {
$removefile = array(
'frontend/backtotop.php',
'frontend/colors.php',
'frontend/comingsoon.php',
'frontend/contactinfo.php',
'frontend/custom.php',
'frontend/dropdownmenumodule.php',
'frontend/footer.php',
'frontend/header.php',
'frontend/hikashop.php',
'frontend/joomlalogin.php',
'frontend/language.php',
'frontend/menumodule.php',
'frontend/mobilemenu.php',
'frontend/offcanvas.php',
'frontend/preloader.php',
'frontend/social.php',
'frontend/typography.php',
'frontend/blog/modules/author_info.php',
'frontend/blog/modules/badge.php',
'frontend/blog/modules/comments.php',
'frontend/blog/modules/image.php',
'frontend/blog/modules/posttype.php',
'frontend/blog/modules/rating.php',
'frontend/blog/modules/readtime.php',
'frontend/blog/modules/related.php',
'frontend/blog/modules/social.php',
'frontend/blog/audio.php',
'frontend/blog/gallery.php',
'frontend/blog/quote.php',
'frontend/blog/review.php',
'frontend/blog/video.php',
'frontend/header/horizontal.php',
'frontend/header/stacked.php',
'frontend/header/sticky.php',
'frontend/header/sidebar.php',
'frontend/header/sidebar.php',
'astroid/options/article.xml',
'astroid/options/basic.xml',
'astroid/options/custom.xml',
'astroid/options/footer.xml',
'astroid/options/header.xml',
'astroid/options/layout.xml',
'astroid/options/social.xml',
'astroid/options/theming.xml',
'astroid/options/typography.xml',
'astroid/options/colors.xml',
'astroid/options/dashboard.xml',
'astroid/options/extensions.xml',
);
jimport('joomla.filesystem.file');
foreach ($removefile as $file) {
if (JFile::exists(JPATH_ROOT.'/templates/tz_jollyany/'.$file)) {
JFile::delete(JPATH_ROOT.'/templates/tz_jollyany/'.$file);
}
}
}
/**
*
* Function to run after installing the component
*/
public function postflight($type, $parent) {
}
}