| Server IP : 217.160.0.64 / Your IP : 216.73.216.137 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : ws67269618 ( 67269618) PHP Version : 8.4.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /homepages/36/d4298801080/htdocs/crcanaldehesas/libraries/regularlabs/ |
Upload File : |
<?php
/**
* @package Regular Labs Library
* @version 26.9.10756
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2026 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
defined('_JEXEC') or die;
use Joomla\CMS\Cache\CacheControllerFactoryInterface;
use Joomla\CMS\Cache\Controller\CallbackController;
use Joomla\CMS\Factory as JFactory;
use Joomla\Filesystem\File as JFile;
if ( ! class_exists('RegularLabsInstallerScript'))
{
class RegularLabsInstallerScript
{
public function postflight($install_type, $adapter)
{
if ( ! in_array($install_type, ['install', 'update']))
{
return true;
}
self::deleteOldFiles();
/** @var CallbackController $cache */
$cache = JFactory::getContainer()->get(CacheControllerFactoryInterface::class)->createCacheController('callback', ['defaultgroup' => '_system']);
$cache->clean();
return true;
}
private static function delete($files = [])
{
foreach ($files as $file)
{
if (is_file($file))
{
JFile::delete($file);
}
}
}
private static function deleteOldFiles()
{
self::delete(
[
JPATH_SITE . '/libraries/regularlabs/layouts/regularlabs/form/field/downloadkey_modal.php',
JPATH_SITE . '/libraries/regularlabs/layouts/regularlabs/form/field/downloadkey_modal_body.php',
]
);
}
}
}