Current File : /home/pacjaorg/.trash/templates/tz_meetup/script.php |
<?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_meetupInstallerScript {
/**
*
* 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(
'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',
'html/frontend/footer.php',
'js/script.js',
'js/jui/bootstrap.js',
'js/jui/bootstrap.min.js',
);
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
if (JFolder::exists(JPATH_ROOT.'/templates/tz_meetup/frontend')) {
JFolder::delete(JPATH_ROOT.'/templates/tz_meetup/frontend');
}
if (JFolder::exists(JPATH_ROOT.'/templates/tz_meetup/js/vendor')) {
JFolder::delete(JPATH_ROOT.'/templates/tz_meetup/js/vendor');
}
foreach ($removefile as $file) {
if (JFile::exists(JPATH_ROOT.'/templates/tz_meetup/'.$file)) {
JFile::delete(JPATH_ROOT.'/templates/tz_meetup/'.$file);
}
}
}
/**
*
* Function to run after installing the component
*/
public function postflight($type, $parent) {
}
}