2015-04-22 16:03:40 +00:00
|
|
|
<?php
|
2023-10-15 20:42:41 +00:00
|
|
|
|
2023-03-11 22:11:29 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Dotclear\Plugin\dcFilterDuplicate;
|
|
|
|
|
2023-08-06 20:42:32 +00:00
|
|
|
use Dotclear\Core\Process;
|
2023-04-20 20:11:39 +00:00
|
|
|
use Dotclear\Plugin\Uninstaller\Uninstaller;
|
2023-03-11 22:11:29 +00:00
|
|
|
|
2023-10-15 20:42:41 +00:00
|
|
|
/**
|
|
|
|
* @brief dcFilterDuplicate uninstall class.
|
|
|
|
* @ingroup dcFilterDuplicate
|
|
|
|
*
|
|
|
|
* @author Jean-Christian Denis (author)
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
2023-08-06 20:42:32 +00:00
|
|
|
class Uninstall extends Process
|
2023-04-20 20:11:39 +00:00
|
|
|
{
|
2023-03-11 22:11:29 +00:00
|
|
|
public static function init(): bool
|
|
|
|
{
|
2023-08-06 20:42:32 +00:00
|
|
|
return self::status(My::checkContext(My::UNINSTALL));
|
2023-03-11 22:11:29 +00:00
|
|
|
}
|
2015-04-22 16:03:40 +00:00
|
|
|
|
2023-04-20 20:11:39 +00:00
|
|
|
public static function process(): bool
|
2023-03-11 22:11:29 +00:00
|
|
|
{
|
2023-10-15 20:42:41 +00:00
|
|
|
if (!self::status()) {
|
2023-03-11 22:11:29 +00:00
|
|
|
return false;
|
|
|
|
}
|
2015-04-22 16:03:40 +00:00
|
|
|
|
2023-04-20 20:11:39 +00:00
|
|
|
Uninstaller::instance()
|
|
|
|
->addUserAction(
|
|
|
|
'settings',
|
|
|
|
'delete_all',
|
|
|
|
My::id()
|
|
|
|
)
|
|
|
|
->addUserAction(
|
|
|
|
'plugins',
|
|
|
|
'delete',
|
|
|
|
My::id()
|
|
|
|
)
|
|
|
|
->addUserAction(
|
|
|
|
'versions',
|
|
|
|
'delete',
|
|
|
|
My::id()
|
|
|
|
)
|
|
|
|
->addDirectAction(
|
|
|
|
'settings',
|
|
|
|
'delete_all',
|
|
|
|
My::id()
|
|
|
|
)
|
|
|
|
->addDirectAction(
|
|
|
|
'versions',
|
|
|
|
'delete',
|
|
|
|
My::id()
|
|
|
|
)
|
|
|
|
->addDirectAction(
|
|
|
|
'plugins',
|
|
|
|
'delete',
|
|
|
|
My::id()
|
|
|
|
)
|
|
|
|
;
|
2023-03-11 22:11:29 +00:00
|
|
|
|
2023-04-20 20:11:39 +00:00
|
|
|
// no custom action
|
|
|
|
return false;
|
2023-03-11 22:11:29 +00:00
|
|
|
}
|
|
|
|
}
|