add Cleaner action generic messages, and fix ambiguous messages (hope so)

This commit is contained in:
Jean-Christian Paul Denis 2023-04-16 01:18:06 +02:00
parent 36b96fda77
commit a46ff83b3c
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
10 changed files with 185 additions and 100 deletions

View File

@ -14,48 +14,61 @@ use Dotclear\Helper\L10n;
L10n::$locales['Uninstall'] = 'Désinstaller';
L10n::$locales['Plugin has been successfully uninstalled.'] = 'Plugin désinstallé avec succès';
L10n::$locales['Folders from cache directory'] = 'Dossiers du répertoire de cache';
L10n::$locales['delete selected cache directories'] = 'effacer les répertoires de cache sélectionnés';
L10n::$locales['delete "%s" cache directory'] = 'supprimer le répertoire de cache "%s"';
L10n::$locales['"%s" cache directory deleted'] = 'répertoire de cache "%s" supprimé';
L10n::$locales['Failed to delete "%s" cache directory'] = 'Impossible de supprimer le répertoire de cache "%s"';
L10n::$locales['empty selected cache directories'] = 'vider les répertoires de cache séletionnés';
L10n::$locales['empty "%s" cache directory'] = 'vider le répertoire de cache "%s"';
L10n::$locales['"%s" cache directory emptied'] = 'répertoire de cache "%s" vidé';
L10n::$locales['Failed to empty "%s" cache directory'] = 'Impossible de vider le répertoire de cache "ùs"';
L10n::$locales['Folders from plugins directories'] = 'Dossiers des répertoires des plugins';
L10n::$locales['delete "%s" plugin directory'] = 'supprimer le répertoire "%s" du plugin';
L10n::$locales['"%s" plugin directory deleted'] = 'répertoire "%s" du plugin supprimé';
L10n::$locales['Failed to delete "%s" plugin directory'] = 'Impossible de supprimer le répertoire "%s" du plugin';
L10n::$locales['delete selected plugins files and directories'] = 'effacer le fichiers et répertoires des plugins sélectionnés';
L10n::$locales['delete "%s" plugin files and directories'] = 'effacer les fichiers et répertoires du plugin "%s"';
L10n::$locales['"%s" plugin files and directories deleted'] = 'fichiers et répertoires du plugin "%s" effacés';
L10n::$locales['Failed to delete "%s" plugin files and directories'] = 'Impossible d\'effacer les fichiers et répertoires du plugin "%s"';
L10n::$locales['Namespaces registered in dcSettings'] = 'Espaces de nom (namespaces) enregistrés dans dcSettings';
L10n::$locales['delete "%s" global settings'] = 'supprimer les paramètres "%s" globaux';
L10n::$locales['"%s" global settings deleted'] = 'paramètres "%s" globaux supprimés';
L10n::$locales['Failed to delete "%s" global settings'] = 'Impossible de supprimer les paramètres "%s" globaux';
L10n::$locales['delete "%s" blog settings'] = 'supprimer les paramètres "%s" du blog';
L10n::$locales['"%s" blog settings deleted'] = 'paramètres "%s" du blog supprimés';
L10n::$locales['Failed to delete "%s" blog settings'] = 'Impossible de supprimer les paramètres "%s" du blog';
L10n::$locales['delete "%s" settings'] = 'supprimer les paramètres "%s"';
L10n::$locales['"%s" settings deleted'] = 'paramètres "%s" supprimés';
L10n::$locales['Failed to delete "%s" settings'] = 'Impossible de supprimer les paramètres "%s"';
L10n::$locales['delete selected global settings namespaces'] = 'effacer les espaces de noms de paramètres globaux sélectionnés';
L10n::$locales['delete "%s" global settings namespace'] = 'effacer l\'espace de nom de paramètres global "%s"';
L10n::$locales['"%s" global settings namespace deleted'] = 'espace de nom de paramètres global "%s" effacé';
L10n::$locales['Failed to delete "%s" global settings namespace'] = 'Impossible d\'effacer l\'espace de nom de paramètre global "%s"';
L10n::$locales['delete selected blog settings namespaces'] = 'effacer les espace de noms de paramètre de blog sélectionnés';
L10n::$locales['delete "%s" blog settings namespace'] = 'effacer l\'espace de nom de paramètre de blog "%s"';
L10n::$locales['"%s" blog settings namespace deleted'] = 'espace de nom de paramètre de blog "%s" effacé';
L10n::$locales['Failed to delete "%s" blog settings namespace'] = 'Impossible d\'effacer l\'espace de nom de paramètres de blog "%s"';
L10n::$locales['delete selected settings namespaces'] = 'effacer les espaces de noms de paramètres sélectionnés';
L10n::$locales['delete "%s" settings namespace'] = 'effacer l\'espace de nom de paramètres "%s"';
L10n::$locales['"%s" settings namespace deleted'] = 'espace de nom de paramètres "%s" effacé';
L10n::$locales['Failed to delete "%s" settings namespace'] = 'Impossible d\'effacer l\'espace de nom de paramètres "%s"';
L10n::$locales['delete related settings'] = 'effacer les paramètres relatifs';
L10n::$locales['related settings deleted'] = 'paramètres relatifs effacer';
L10n::$locales['Failed to delete related settings'] = 'Impossible d\'effacer les paramètres relatifs';
L10n::$locales['All database tables of Dotclear'] = 'Toutes les tables Dotclear de la base de données';
L10n::$locales['delete selected tables'] = 'effacer les tables sélectionnées';
L10n::$locales['delete "%s" table'] = 'Supprimer la table "%s"';
L10n::$locales['"%s" table deleted'] = 'table "%s" supprimée';
L10n::$locales['Failed to delete "%s" table'] = 'Impossible de supprimer la table "%s"';
L10n::$locales['empty selected tables'] = 'vider les tables selectionnées';
L10n::$locales['empty "%s" table'] = 'vider la table "%s"';
L10n::$locales['"%s" table emptied'] = 'table "%s" vidée';
L10n::$locales['Failed to empty "%s" table'] = 'Impossible de vider la table "%s"';
L10n::$locales['Folders from blog themes directory'] = 'Dossiers du répertoire des thèmes du blog';
L10n::$locales['delete "%s" theme directory'] = 'supprimer le répertoire "%s" du thème';
L10n::$locales['"%s" theme directory deleted'] = 'répertoire "%s" du thème supprimer';
L10n::$locales['Failed to delete "%s" theme directory'] = 'Impossible de supprimer le répertoire "%s" du thème';
L10n::$locales['delete selected themes files and directories'] = 'effacer les fichiers et répertoires des thèmes selectionnés';
L10n::$locales['delete "%s" theme files and directories'] = 'effacer les fichiers et répertoires du thème "%s"';
L10n::$locales['"%s" theme files and directories deleted'] = 'fichiers et répertoires du thème "%s" effacés';
L10n::$locales['Failed to delete "%s" theme files and directories'] = 'Impossible d\'effacer les fichiers et répertoires du thème "%s"';
L10n::$locales['Folders from Dotclear VAR directory'] = 'Dossiers du répertoire VAR de Dotclear';
L10n::$locales['delete selected var directories'] = 'effacer les répertoires var sélectionnés';
L10n::$locales['delete "%s" var directory'] = 'Supprimer le répertoire var "%s"';
L10n::$locales['"%s" var directory deleted'] = 'répertoire var "%s" supprimé';
L10n::$locales['Failed to delete "%s" var directory'] = 'Impossible de supprimer le répertoire var "%s"';
L10n::$locales['Versions registered in table "version" of Dotclear'] = 'Versions enregistrées dans la table "version" de Dotclear';
L10n::$locales['delete selected versions numbers'] = 'effacer les numéros de versions sélectionnés';
L10n::$locales['delete "%s" version number'] = 'supprimer le numéro de version de "%s"';
L10n::$locales['"%s" version number deleted'] = 'numéro de version de "%s" supprimé';
L10n::$locales['Failed to delete "%s" version number'] = 'Impossible de supprimer le numéro de version de "%s"';
L10n::$locales['Unknown cleaner "%s"'] = 'Nettoyeur "%s" inconnu';
L10n::$locales['Unsintaller can\'t remove itself'] = 'Le désinstalleur ne peut pas se supprimer lui-même';
L10n::$locales['Unknown error'] = 'Erreur inconnue';
L10n::$locales['Unknown module id to uninstall'] = 'Module a désinstaller inconnu';
L10n::$locales['There are no uninstall actions for this module'] = 'Il n\'y a aucune action pour ce module';
L10n::$locales['Uninstall action successfuly excecuted'] = 'Actions de désinstallation exécutées avec succès';

View File

@ -1,6 +1,6 @@
# Language: Français
# Module: Uninstaller - 0.1
# Date: 2023-04-15 15:32:43
# Date: 2023-04-15 23:11:02
# Author: , contact@jcdenis.fr
# Translated with translater 2023.03.19
@ -9,18 +9,18 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: Uninstaller 0.1\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2023-04-15T15:32:43+00:00\n"
"PO-Revision-Date: 2023-04-15T23:11:02+00:00\n"
"Last-Translator: Jean-Christian Denis\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/Backend.php:45
#: src/Backend.php:50
msgid "Uninstall"
msgstr "Désinstaller"
#: src/Backend.php:71
#: src/Backend.php:89
msgid "Plugin has been successfully uninstalled."
msgstr "Plugin désinstallé avec succès"
@ -29,26 +29,34 @@ msgid "Folders from cache directory"
msgstr "Dossiers du répertoire de cache"
#: src/Cleaner/Caches.php:41
msgid "delete selected cache directories"
msgstr "effacer les répertoires de cache sélectionnés"
#: src/Cleaner/Caches.php:42
msgid "delete \"%s\" cache directory"
msgstr "supprimer le répertoire de cache \"%s\""
#: src/Cleaner/Caches.php:42
#: src/Cleaner/Caches.php:43
msgid "\"%s\" cache directory deleted"
msgstr "répertoire de cache \"%s\" supprimé"
#: src/Cleaner/Caches.php:43
#: src/Cleaner/Caches.php:44
msgid "Failed to delete \"%s\" cache directory"
msgstr "Impossible de supprimer le répertoire de cache \"%s\""
#: src/Cleaner/Caches.php:47
#: src/Cleaner/Caches.php:48
msgid "empty selected cache directories"
msgstr "vider les répertoires de cache séletionnés"
#: src/Cleaner/Caches.php:49
msgid "empty \"%s\" cache directory"
msgstr "vider le répertoire de cache \"%s\""
#: src/Cleaner/Caches.php:48
#: src/Cleaner/Caches.php:50
msgid "\"%s\" cache directory emptied"
msgstr "répertoire de cache \"%s\" vidé"
#: src/Cleaner/Caches.php:49
#: src/Cleaner/Caches.php:51
msgid "Failed to empty \"%s\" cache directory"
msgstr "Impossible de vider le répertoire de cache \"ùs\""
@ -57,82 +65,118 @@ msgid "Folders from plugins directories"
msgstr "Dossiers des répertoires des plugins"
#: src/Cleaner/Plugins.php:41
msgid "delete \"%s\" plugin directory"
msgstr "supprimer le répertoire \"%s\" du plugin"
msgid "delete selected plugins files and directories"
msgstr "effacer le fichiers et répertoires des plugins sélectionnés"
#: src/Cleaner/Plugins.php:42
msgid "\"%s\" plugin directory deleted"
msgstr "répertoire \"%s\" du plugin supprimé"
msgid "delete \"%s\" plugin files and directories"
msgstr "effacer les fichiers et répertoires du plugin \"%s\""
#: src/Cleaner/Plugins.php:43
msgid "Failed to delete \"%s\" plugin directory"
msgstr "Impossible de supprimer le répertoire \"%s\" du plugin"
msgid "\"%s\" plugin files and directories deleted"
msgstr "fichiers et répertoires du plugin \"%s\" effacés"
#: src/Cleaner/Settings.php:31
#: src/Cleaner/Plugins.php:44
msgid "Failed to delete \"%s\" plugin files and directories"
msgstr "Impossible d'effacer les fichiers et répertoires du plugin \"%s\""
#: src/Cleaner/Settings.php:41
msgid "Namespaces registered in dcSettings"
msgstr "Espaces de nom (namespaces) enregistrés dans dcSettings"
#: src/Cleaner/Settings.php:40
msgid "delete \"%s\" global settings"
msgstr "supprimer les paramètres \"%s\" globaux"
#: src/Cleaner/Settings.php:50
msgid "delete selected global settings namespaces"
msgstr "effacer les espaces de noms de paramètres globaux sélectionnés"
#: src/Cleaner/Settings.php:41
msgid "\"%s\" global settings deleted"
msgstr "paramètres \"%s\" globaux supprimés"
#: src/Cleaner/Settings.php:42
msgid "Failed to delete \"%s\" global settings"
msgstr "Impossible de supprimer les paramètres \"%s\" globaux"
#: src/Cleaner/Settings.php:46
msgid "delete \"%s\" blog settings"
msgstr "supprimer les paramètres \"%s\" du blog"
#: src/Cleaner/Settings.php:47
msgid "\"%s\" blog settings deleted"
msgstr "paramètres \"%s\" du blog supprimés"
#: src/Cleaner/Settings.php:48
msgid "Failed to delete \"%s\" blog settings"
msgstr "Impossible de supprimer les paramètres \"%s\" du blog"
#: src/Cleaner/Settings.php:51
msgid "delete \"%s\" global settings namespace"
msgstr "effacer l'espace de nom de paramètres global \"%s\""
#: src/Cleaner/Settings.php:52
msgid "delete \"%s\" settings"
msgstr "supprimer les paramètres \"%s\""
msgid "\"%s\" global settings namespace deleted"
msgstr "espace de nom de paramètres global \"%s\" effacé"
#: src/Cleaner/Settings.php:53
msgid "\"%s\" settings deleted"
msgstr "paramètres \"%s\" supprimés"
msgid "Failed to delete \"%s\" global settings namespace"
msgstr "Impossible d'effacer l'espace de nom de paramètre global \"%s\""
#: src/Cleaner/Settings.php:54
msgid "Failed to delete \"%s\" settings"
msgstr "Impossible de supprimer les paramètres \"%s\""
#: src/Cleaner/Settings.php:57
msgid "delete selected blog settings namespaces"
msgstr "effacer les espace de noms de paramètre de blog sélectionnés"
#: src/Cleaner/Settings.php:58
msgid "delete \"%s\" blog settings namespace"
msgstr "effacer l'espace de nom de paramètre de blog \"%s\""
#: src/Cleaner/Settings.php:59
msgid "\"%s\" blog settings namespace deleted"
msgstr "espace de nom de paramètre de blog \"%s\" effacé"
#: src/Cleaner/Settings.php:60
msgid "Failed to delete \"%s\" blog settings namespace"
msgstr "Impossible d'effacer l'espace de nom de paramètres de blog \"%s\""
#: src/Cleaner/Settings.php:64
msgid "delete selected settings namespaces"
msgstr "effacer les espaces de noms de paramètres sélectionnés"
#: src/Cleaner/Settings.php:65
msgid "delete \"%s\" settings namespace"
msgstr "effacer l'espace de nom de paramètres \"%s\""
#: src/Cleaner/Settings.php:66
msgid "\"%s\" settings namespace deleted"
msgstr "espace de nom de paramètres \"%s\" effacé"
#: src/Cleaner/Settings.php:67
msgid "Failed to delete \"%s\" settings namespace"
msgstr "Impossible d'effacer l'espace de nom de paramètres \"%s\""
#: src/Cleaner/Settings.php:72
msgid "delete related settings"
msgstr "effacer les paramètres relatifs"
#: src/Cleaner/Settings.php:73
msgid "related settings deleted"
msgstr "paramètres relatifs effacer"
#: src/Cleaner/Settings.php:74
msgid "Failed to delete related settings"
msgstr "Impossible d'effacer les paramètres relatifs"
#: src/Cleaner/Tables.php:31
msgid "All database tables of Dotclear"
msgstr "Toutes les tables Dotclear de la base de données"
#: src/Cleaner/Tables.php:40
msgid "delete selected tables"
msgstr "effacer les tables sélectionnées"
#: src/Cleaner/Tables.php:41
msgid "delete \"%s\" table"
msgstr "Supprimer la table \"%s\""
#: src/Cleaner/Tables.php:41
#: src/Cleaner/Tables.php:42
msgid "\"%s\" table deleted"
msgstr "table \"%s\" supprimée"
#: src/Cleaner/Tables.php:42
#: src/Cleaner/Tables.php:43
msgid "Failed to delete \"%s\" table"
msgstr "Impossible de supprimer la table \"%s\""
#: src/Cleaner/Tables.php:46
#: src/Cleaner/Tables.php:47
msgid "empty selected tables"
msgstr "vider les tables selectionnées"
#: src/Cleaner/Tables.php:48
msgid "empty \"%s\" table"
msgstr "vider la table \"%s\""
#: src/Cleaner/Tables.php:47
#: src/Cleaner/Tables.php:49
msgid "\"%s\" table emptied"
msgstr "table \"%s\" vidée"
#: src/Cleaner/Tables.php:48
#: src/Cleaner/Tables.php:50
msgid "Failed to empty \"%s\" table"
msgstr "Impossible de vider la table \"%s\""
@ -141,30 +185,38 @@ msgid "Folders from blog themes directory"
msgstr "Dossiers du répertoire des thèmes du blog"
#: src/Cleaner/Themes.php:42
msgid "delete \"%s\" theme directory"
msgstr "supprimer le répertoire \"%s\" du thème"
msgid "delete selected themes files and directories"
msgstr "effacer les fichiers et répertoires des thèmes selectionnés"
#: src/Cleaner/Themes.php:43
msgid "\"%s\" theme directory deleted"
msgstr "répertoire \"%s\" du thème supprimer"
msgid "delete \"%s\" theme files and directories"
msgstr "effacer les fichiers et répertoires du thème \"%s\""
#: src/Cleaner/Themes.php:44
msgid "Failed to delete \"%s\" theme directory"
msgstr "Impossible de supprimer le répertoire \"%s\" du thème"
msgid "\"%s\" theme files and directories deleted"
msgstr "fichiers et répertoires du thème \"%s\" effacés"
#: src/Cleaner/Themes.php:45
msgid "Failed to delete \"%s\" theme files and directories"
msgstr "Impossible d'effacer les fichiers et répertoires du thème \"%s\""
#: src/Cleaner/Vars.php:32
msgid "Folders from Dotclear VAR directory"
msgstr "Dossiers du répertoire VAR de Dotclear"
#: src/Cleaner/Vars.php:41
msgid "delete selected var directories"
msgstr "effacer les répertoires var sélectionnés"
#: src/Cleaner/Vars.php:42
msgid "delete \"%s\" var directory"
msgstr "Supprimer le répertoire var \"%s\""
#: src/Cleaner/Vars.php:42
#: src/Cleaner/Vars.php:43
msgid "\"%s\" var directory deleted"
msgstr "répertoire var \"%s\" supprimé"
#: src/Cleaner/Vars.php:43
#: src/Cleaner/Vars.php:44
msgid "Failed to delete \"%s\" var directory"
msgstr "Impossible de supprimer le répertoire var \"%s\""
@ -173,14 +225,18 @@ msgid "Versions registered in table \"version\" of Dotclear"
msgstr "Versions enregistrées dans la table \"version\" de Dotclear"
#: src/Cleaner/Versions.php:39
msgid "delete selected versions numbers"
msgstr "effacer les numéros de versions sélectionnés"
#: src/Cleaner/Versions.php:40
msgid "delete \"%s\" version number"
msgstr "supprimer le numéro de version de \"%s\""
#: src/Cleaner/Versions.php:40
#: src/Cleaner/Versions.php:41
msgid "\"%s\" version number deleted"
msgstr "numéro de version de \"%s\" supprimé"
#: src/Cleaner/Versions.php:41
#: src/Cleaner/Versions.php:42
msgid "Failed to delete \"%s\" version number"
msgstr "Impossible de supprimer le numéro de version de \"%s\""
@ -192,10 +248,6 @@ msgstr "Nettoyeur \"%s\" inconnu"
msgid "Unsintaller can't remove itself"
msgstr "Le désinstalleur ne peut pas se supprimer lui-même"
#: src/Cleaners.php:98
msgid "Unknown error"
msgstr "Erreur inconnue"
#: src/Manage.php:64
msgid "Unknown module id to uninstall"
msgstr "Module a désinstaller inconnu"

View File

@ -22,7 +22,10 @@ class ActionDescriptor
/** @var string $id The action ID */
public readonly string $id;
/** @var string $query The orm query message */
/** @var string $query The generic message (used for self::values() management) */
public readonly string $select;
/** @var string $query The query message */
public readonly string $query;
/** @var string $success The succes message */
@ -37,6 +40,7 @@ class ActionDescriptor
public function __construct(array $description)
{
$this->id = (string) ($description['id'] ?? 'undefined');
$this->select = (string) ($description['select'] ?? 'undefined');
$this->query = (string) ($description['query'] ?? 'undefined');
$this->success = (string) ($description['success'] ?? 'undefined');
$this->error = (string) ($description['error'] ?? 'undefined');
@ -51,6 +55,7 @@ class ActionDescriptor
{
return [
'id' => $this->id,
'select' => $this->select,
'query' => $this->query,
'success' => $this->success,
'error' => $this->error,

View File

@ -38,12 +38,14 @@ class Caches extends AbstractCleaner
return [
new ActionDescriptor([
'id' => 'delete',
'select' => __('delete selected cache directories'),
'query' => __('delete "%s" cache directory'),
'success' => __('"%s" cache directory deleted'),
'error' => __('Failed to delete "%s" cache directory'),
]),
new ActionDescriptor([
'id' => 'empty',
'select' => __('empty selected cache directories'),
'query' => __('empty "%s" cache directory'),
'success' => __('"%s" cache directory emptied'),
'error' => __('Failed to empty "%s" cache directory'),

View File

@ -38,9 +38,10 @@ class Plugins extends AbstractCleaner
return [
new ActionDescriptor([
'id' => 'delete',
'query' => __('delete "%s" plugin directory'),
'success' => __('"%s" plugin directory deleted'),
'error' => __('Failed to delete "%s" plugin directory'),
'select' => __('delete selected plugins files and directories'),
'query' => __('delete "%s" plugin files and directories'),
'success' => __('"%s" plugin files and directories deleted'),
'error' => __('Failed to delete "%s" plugin files and directories'),
]),
];
}

View File

@ -47,21 +47,24 @@ class Settings extends AbstractCleaner
return [
new ActionDescriptor([
'id' => 'delete_global',
'query' => __('delete "%s" global settings'),
'success' => __('"%s" global settings deleted'),
'error' => __('Failed to delete "%s" global settings'),
'select' => __('delete selected global settings namespaces'),
'query' => __('delete "%s" global settings namespace'),
'success' => __('"%s" global settings namespace deleted'),
'error' => __('Failed to delete "%s" global settings namespace'),
]),
new ActionDescriptor([
'id' => 'delete_local',
'query' => __('delete "%s" blog settings'),
'success' => __('"%s" blog settings deleted'),
'error' => __('Failed to delete "%s" blog settings'),
'select' => __('delete selected blog settings namespaces'),
'query' => __('delete "%s" blog settings namespace'),
'success' => __('"%s" blog settings namespace deleted'),
'error' => __('Failed to delete "%s" blog settings namespace'),
]),
new ActionDescriptor([
'id' => 'delete_all',
'query' => __('delete "%s" settings'),
'success' => __('"%s" settings deleted'),
'error' => __('Failed to delete "%s" settings'),
'select' => __('delete selected settings namespaces'),
'query' => __('delete "%s" settings namespace'),
'success' => __('"%s" settings namespace deleted'),
'error' => __('Failed to delete "%s" settings namespace'),
]),
// $ns = 'setting_ns:setting_id;setting_ns:setting_id;...' for global and blogs settings
new ActionDescriptor([
@ -99,8 +102,12 @@ class Settings extends AbstractCleaner
->group('setting_ns');
$res = $sql->select();
$rs = [];
$i = 0;
if ($res == null || $res->isEmpty()) {
return [];
}
$rs = [];
$i = 0;
while ($res->fetch()) {
$sql = new SelectStatement();
$sql->from(dcCore::app()->prefix . dcNamespace::NS_TABLE_NAME)
@ -110,7 +117,7 @@ class Settings extends AbstractCleaner
->group('setting_ns');
$rs[$i]['key'] = $res->f('setting_ns');
$rs[$i]['value'] = $sql->select()->f(0);
$rs[$i]['value'] = (int) $sql->select()?->f(0);
$i++;
}
@ -150,7 +157,7 @@ class Settings extends AbstractCleaner
foreach (explode(';', $ns) as $pair) {
$exp = explode(':', $pair);
if (count($exp) == 2) {
$or[] = $sql->andGroup(['setting_ns = ' . $sq->quote((string) $exp[0]), 'setting_id = ' . $sql->quote((string) $exp[1])]);
$or[] = $sql->andGroup(['setting_ns = ' . $sql->quote((string) $exp[0]), 'setting_id = ' . $sql->quote((string) $exp[1])]);
}
}
if (empty($or)) {

View File

@ -37,12 +37,14 @@ class Tables extends AbstractCleaner
return [
new ActionDescriptor([
'id' => 'delete',
'select' => __('delete selected tables'),
'query' => __('delete "%s" table'),
'success' => __('"%s" table deleted'),
'error' => __('Failed to delete "%s" table'),
]),
new ActionDescriptor([
'id' => 'empty',
'select' => __('empty selected tables'),
'query' => __('empty "%s" table'),
'success' => __('"%s" table emptied'),
'error' => __('Failed to empty "%s" table'),

View File

@ -39,9 +39,10 @@ class Themes extends AbstractCleaner
return [
new ActionDescriptor([
'id' => 'delete',
'query' => __('delete "%s" theme directory'),
'success' => __('"%s" theme directory deleted'),
'error' => __('Failed to delete "%s" theme directory'),
'select' => __('delete selected themes files and directories'),
'query' => __('delete "%s" theme files and directories'),
'success' => __('"%s" theme files and directories deleted'),
'error' => __('Failed to delete "%s" theme files and directories'),
]),
];
}

View File

@ -38,6 +38,7 @@ class Vars extends AbstractCleaner
return [
new ActionDescriptor([
'id' => 'delete',
'select' => __('delete selected var directories'),
'query' => __('delete "%s" var directory'),
'success' => __('"%s" var directory deleted'),
'error' => __('Failed to delete "%s" var directory'),

View File

@ -36,6 +36,7 @@ class Versions extends AbstractCleaner
return [
new ActionDescriptor([
'id' => 'delete',
'select' => __('delete selected versions numbers'),
'query' => __('delete "%s" version number'),
'success' => __('"%s" version number deleted'),
'error' => __('Failed to delete "%s" version number'),