diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..6b66fcb --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +ko_fi: tomitomas diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 29ae47a..3baf10a 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -10,6 +10,6 @@ jobs: auto-translate: runs-on: ubuntu-latest steps: - - uses: Mips2648/plugins-translations@main + - uses: Mips2648/plugins-translations@v1 with: deepl_api_key: ${{ secrets.DEEPL_API_KEY }} diff --git a/core/class/digiaction.class.php b/core/class/digiaction.class.php index 8d0db48..5a282a6 100755 --- a/core/class/digiaction.class.php +++ b/core/class/digiaction.class.php @@ -56,6 +56,18 @@ public function preSave() { public function postSave() { + $currentMode = $this->getCmd(null, 'actionDoneBy'); + if (!is_object($currentMode)) { + $currentMode = new digiactionCmd(); + $currentMode->setOrder(10); + } + $currentMode->setName(__('Dernier utilisateur', __FILE__)); + $currentMode->setEqLogic_id($this->id); + $currentMode->setLogicalId('actionDoneBy'); + $currentMode->setType('info'); + $currentMode->setSubType('string'); + $currentMode->save(); + $currentMode = $this->getCmd(null, 'currentMode'); if (!is_object($currentMode)) { $currentMode = new digiactionCmd(); @@ -426,7 +438,10 @@ public function toHtml($_version = 'dashboard') { // $replace['#message#'] = $this->getCmd(null, 'digimessage')->execCmd(); $replace['#randomkeys#'] = $this->getConfiguration('randomkeys', 0); - return $this->postToHtml($_version, template_replace($replace, getTemplate('core', $version, 'digiaction', 'digiaction'))); + // return $this->postToHtml($_version, template_replace($replace, getTemplate('core', $version, 'digiaction', 'digiaction'))); + $html = template_replace($replace, getTemplate('core', $version, __CLASS__, __CLASS__)); + $html = translate::exec($html, 'plugins/' . __CLASS__ . '/core/template/' . $version . '/' . __CLASS__ . '.html'); + return $html; } @@ -533,6 +548,7 @@ public function getAvailableModeHTML() { public function verifCodeUser($userCode, $nextCmdId) { self::addLogTemplate('CHECK USER CODE'); + $userPanic = false; try { // check if the new mode requires a password @@ -796,8 +812,10 @@ public function execute($_options = array()) { $eqLogic->checkAndUpdateCmd('digimessage', $txtOK); if (!empty($_options['userName'])) { log::add('digiaction', 'info', '│ Commande "' . $this->getName() . '" a été réalisée par : ' . $_options['userName']); + $eqLogic->checkAndUpdateCmd('actionDoneBy', $_options['userName']); } else { log::add('digiaction', 'info', '│ Commande "' . $this->getName() . '" a été réalisée (sans contrôle)'); + $eqLogic->checkAndUpdateCmd('actionDoneBy', ''); } } diff --git a/core/i18n/de_DE.json b/core/i18n/de_DE.json index 037a34f..5ef4c9f 100644 --- a/core/i18n/de_DE.json +++ b/core/i18n/de_DE.json @@ -11,6 +11,7 @@ "Aucun utilisateur indiqué (champs \"titre\")": "Kein Benutzer angegeben (Felder \"Titel\")", "Changer code utilisateur": "Benutzercode ändern", "Code non valide": "Ungültiger Code", + "Dernier utilisateur": "Letzter Nutzer", "Erreur lors de l\\'éxecution de ": "Fehler bei der Ausführung von", "La commande de mode courant est introuvable": "Der Befehl für den aktuellen Modus wurde nicht gefunden", "MaJ Message": "MaJ Nachricht", diff --git a/core/i18n/en_US.json b/core/i18n/en_US.json index 6c3913d..bd40894 100644 --- a/core/i18n/en_US.json +++ b/core/i18n/en_US.json @@ -11,6 +11,7 @@ "Aucun utilisateur indiqué (champs \"titre\")": "No user indicated (\"title\" fields)", "Changer code utilisateur": "Change user code", "Code non valide": "Invalid code", + "Dernier utilisateur": "Last user", "Erreur lors de l\\'éxecution de ": "Error while executing", "La commande de mode courant est introuvable": "Current mode command not found", "MaJ Message": "MaJ Message", diff --git a/core/i18n/es_ES.json b/core/i18n/es_ES.json index 9e88beb..26cf878 100644 --- a/core/i18n/es_ES.json +++ b/core/i18n/es_ES.json @@ -11,6 +11,7 @@ "Aucun utilisateur indiqué (champs \"titre\")": "Ningún usuario indicado (campos \"título\")", "Changer code utilisateur": "Cambiar el código de usuario", "Code non valide": "Código no válido", + "Dernier utilisateur": "Último usuario", "Erreur lors de l\\'éxecution de ": "Error durante la ejecución de", "La commande de mode courant est introuvable": "Comando de modo actual no encontrado", "MaJ Message": "Mensaje MaJ",