fix: compat GLPI 11.0.4 — troca Toolbox::logError por logInFile (1.5.2)
Toolbox::logError não existe no 11.0.4 -> erro fatal ao criar issue/lançar
tempo/garantir membership. Usa Toolbox::logInFile('redmine', ...).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
1ea7af6435
commit
ecf175728f
4 changed files with 12 additions and 4 deletions
|
|
@ -4,6 +4,14 @@ Todas as mudanças relevantes deste plugin são documentadas aqui.
|
|||
O formato segue [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/)
|
||||
e o versionamento segue [SemVer](https://semver.org/lang/pt-BR/).
|
||||
|
||||
## [1.5.2]
|
||||
|
||||
### Corrigido
|
||||
- Compatibilidade com GLPI 11.0.4: `Toolbox::logError()` não existe nessa versão e
|
||||
causava erro fatal (`undefined method logError`) ao criar issue / lançar tempo /
|
||||
garantir membership. Substituído por `Toolbox::logInFile('redmine', ...)`, disponível
|
||||
em todas as versões.
|
||||
|
||||
## [1.5.1]
|
||||
|
||||
### Corrigido
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ Editar horas de uma task já lançada **não** re-sincroniza. Reverter `Feito`
|
|||
aviso em `files/_log/redmine*`.
|
||||
- **API inacessível / chave inválida:** `syncMetadata()` retorna `false`; criação
|
||||
de issue/tempo é abortada com log.
|
||||
- Todo erro HTTP `>= 400` é logado via `Toolbox::logError`.
|
||||
- Todo erro HTTP `>= 400` é logado via `Toolbox::logInFile('redmine', ...)` (em `files/_log/redmine*`).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class PluginRedmineRedmineapi {
|
|||
private static function post($endpoint, $payload, $switchUser = null) {
|
||||
$config = self::getConfig();
|
||||
if (!$config || empty($config['redmine_url']) || empty($config['api_key'])) {
|
||||
Toolbox::logError("Redmine Plugin: URL or API Key not configured.");
|
||||
Toolbox::logInFile('redmine', "URL ou chave de API não configurada.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ class PluginRedmineRedmineapi {
|
|||
if ($httpcode >= 200 && $httpcode < 300) {
|
||||
return json_decode($response, true);
|
||||
} else {
|
||||
Toolbox::logError("Redmine Plugin API Error: [$httpcode] $response");
|
||||
Toolbox::logInFile('redmine', "API Error: [$httpcode] $response\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define('PLUGIN_REDMINE_VERSION', '1.5.1');
|
||||
define('PLUGIN_REDMINE_VERSION', '1.5.2');
|
||||
|
||||
/**
|
||||
* Load the Mindplace License class if the autoloader has not run yet.
|
||||
|
|
|
|||
Loading…
Reference in a new issue