ace33b60fe
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Universal: Auto Version Bump / Version Bump (push) Successful in 10s
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Renames all sub-extensions from mokojoombackup to mokosuitebackup
(package, component, 7 plugins, language files, manifests).
Adds [HOME] placeholder to BackupDirectory and PlaceholderResolver
so users can set backup_dir to [HOME]/backups (outside web root).
Fixes folder browser "access denied" on PHP-FPM shared hosting
where getenv('HOME') returns empty by adding POSIX and JPATH_ROOT
fallback detection.
41 lines
1.4 KiB
PHP
41 lines
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @package MokoSuiteBackup
|
|
* @subpackage com_mokosuitebackup
|
|
* @author Moko Consulting <hello@mokoconsulting.tech>
|
|
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
|
* @license GNU General Public License version 3 or later; see LICENSE
|
|
*/
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
|
|
use Joomla\CMS\Extension\ComponentInterface;
|
|
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
|
|
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
|
|
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
|
|
use Joomla\Component\MokoSuiteBackup\Administrator\Extension\MokoSuiteBackupComponent;
|
|
use Joomla\DI\Container;
|
|
use Joomla\DI\ServiceProviderInterface;
|
|
|
|
return new class () implements ServiceProviderInterface {
|
|
public function register(Container $container): void
|
|
{
|
|
$container->registerServiceProvider(new MVCFactory('\\Joomla\\Component\\MokoSuiteBackup'));
|
|
$container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\MokoSuiteBackup'));
|
|
|
|
$container->set(
|
|
ComponentInterface::class,
|
|
function (Container $container) {
|
|
$component = new MokoSuiteBackupComponent(
|
|
$container->get(ComponentDispatcherFactoryInterface::class)
|
|
);
|
|
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
|
|
|
|
return $component;
|
|
}
|
|
);
|
|
}
|
|
};
|