| Server IP : 172.67.191.97 / Your IP : 104.23.243.196 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/acreditacion/administrator/manifests/files/gantry5_nucleus/ |
Upload File : |
<?php
/**
* @package Gantry 5
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2021 RocketTheme, LLC
* @license GNU/GPLv2 and later
*
* http://www.gnu.org/licenses/gpl-2.0.html
*/
defined('_JEXEC') or die;
use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
/**
* Gantry 5 Nucleus installer script.
*/
class Gantry5_NucleusInstallerScript
{
/**
* @param InstallerAdapter $parent
* @return bool
*/
public function uninstall($parent)
{
// Remove all Nucleus files manually as file installer only uninstalls files.
$manifest = $parent->getManifest();
// Loop through all elements and get list of files and folders
foreach ($manifest->fileset->files as $eFiles) {
$target = (string) $eFiles->attributes()->target;
$targetFolder = empty($target) ? JPATH_ROOT : JPATH_ROOT . '/' . $target;
// Check if all children exists
if (count($eFiles->children()) > 0) {
// Loop through all filenames elements
foreach ($eFiles->children() as $eFileName) {
if ($eFileName->getName() === 'folder')
{
$folder = $targetFolder . '/' . $eFileName;
$files = Folder::files($folder, '.', false, true);
foreach ($files as $name) {
File::delete($name);
}
$subFolders = Folder::folders($folder, '.', false, true);
foreach ($subFolders as $name) {
Folder::delete($name);
}
}
}
}
}
return true;
}
}