release 0.5
This commit is contained in:
parent
9f3108761c
commit
ff58c0ba47
4 changed files with 11 additions and 13 deletions
|
@ -14,7 +14,7 @@ $this->registerModule(
|
|||
'Dotclear Watch',
|
||||
'Send report about your Dotclear',
|
||||
'Jean-Christian Denis and contributors',
|
||||
'0.4',
|
||||
'0.5',
|
||||
[
|
||||
'requires' => [
|
||||
['php', '7.4'],
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="DotclearWatch">
|
||||
<name>Dotclear Watch</name>
|
||||
<version>0.4</version>
|
||||
<version>0.5</version>
|
||||
<author>Jean-Christian Denis and contributors</author>
|
||||
<desc>Send report about your Dotclear</desc>
|
||||
<file>https://github.com/JcDenis/DotclearWatch/releases/download/v0.4/plugin-DotclearWatch.zip</file>
|
||||
<file>https://github.com/JcDenis/DotclearWatch/releases/download/v0.5/plugin-DotclearWatch.zip</file>
|
||||
<da:dcmin>2.27</da:dcmin>
|
||||
<da:details>http://plugins.dotaddict.org/dc2/details/DotclearWatch</da:details>
|
||||
<da:support>https://github.com/JcDenis/DotclearWatch/issues</da:support>
|
||||
|
|
|
@ -18,9 +18,9 @@ L10n::$locales['Settings are globals. Reports are by blog.']
|
|||
L10n::$locales['Hidden modules:'] = 'Modules cachés :';
|
||||
L10n::$locales['This is the comma separated list of plugins IDs and themes IDs to ignore in report.'] = 'C\'est la liste des modules cachés séparés par une virgule.';
|
||||
L10n::$locales['Distant API URL:'] = 'URL de l\'API distante :';
|
||||
L10n::$locales['This is the URL of the API to send report. Leave empty to reset value.'] = 'C\'est L\'URL de l\'API où sera envoyer le rapport. Laisser vide pour remettre par défaut.';
|
||||
L10n::$locales['This is the URL of the API to send report. Leave empty to reset value.'] = 'C\'est L\'URL de l\'API où sera envoyé le rapport. Laisser vide pour remettre par défaut.';
|
||||
L10n::$locales['Clear reports cache directory'] = 'Nettoyer le répertoire de cache des rapports.';
|
||||
L10n::$locales['This deletes all blogs reports in cache.'] = 'Ceci efface tous les rapports des blogs en cache.';
|
||||
L10n::$locales['Send report now'] = 'Envoyer le rapport maintenant';
|
||||
L10n::$locales['This sent report for current blog even if report exists in cache.'] = 'Ceci envoie le rapport pou r le blog courant même si un rapport existe en cache.';
|
||||
L10n::$locales['This sent report for current blog even if report exists in cache.'] = 'Ceci envoie le rapport pour le blog courant même si un rapport existe en cache.';
|
||||
L10n::$locales['Report that will be sent for this blog:'] = 'Rapport qui sera envoyé pour ce blog :';
|
||||
|
|
|
@ -20,8 +20,6 @@ use dcModuleDefine;
|
|||
use dcThemes;
|
||||
use Dotclear\Helper\Crypt;
|
||||
use Dotclear\Helper\Date;
|
||||
use Dotclear\Helper\File\Files;
|
||||
use Dotclear\Helper\File\Path;
|
||||
use Dotclear\Helper\Network\HttpClient;
|
||||
use Exception;
|
||||
|
||||
|
@ -186,7 +184,7 @@ class Utils
|
|||
|
||||
$status = 500;
|
||||
$response = '';
|
||||
$url = sprintf(self::url(), 'report');
|
||||
$url = sprintf(self::url(), 'report');
|
||||
$path = '';
|
||||
if ($client = HttpClient::initClient($url, $path)) {
|
||||
try {
|
||||
|
@ -262,8 +260,8 @@ class Utils
|
|||
}
|
||||
|
||||
$logs = [];
|
||||
while($rs->fetch()) {
|
||||
$logs[] = (int )$rs->f('log_id');
|
||||
while ($rs->fetch()) {
|
||||
$logs[] = (int) $rs->f('log_id');
|
||||
}
|
||||
dcCore::app()->log->delLogs($logs);
|
||||
}
|
||||
|
@ -293,7 +291,7 @@ class Utils
|
|||
private static function read(): string
|
||||
{
|
||||
$rs = dcCore::app()->log->getLogs([
|
||||
'log_table' => My::id() . '_report'
|
||||
'log_table' => My::id() . '_report',
|
||||
]);
|
||||
|
||||
return $rs->isEmpty() || !is_string($rs->f('log_msg')) ? '' : $rs->f('log_msg');
|
||||
|
@ -302,10 +300,10 @@ class Utils
|
|||
private static function expired(): bool
|
||||
{
|
||||
$rs = dcCore::app()->log->getLogs([
|
||||
'log_table' => My::id() . '_report'
|
||||
'log_table' => My::id() . '_report',
|
||||
]);
|
||||
|
||||
return $rs->isEmpty() || !is_string($rs->f('log_dt')) || (int) Date::str('%s',$rs->f('log_dt')) + self::EXPIRED_DELAY < time();
|
||||
return $rs->isEmpty() || !is_string($rs->f('log_dt')) || (int) Date::str('%s', $rs->f('log_dt')) + self::EXPIRED_DELAY < time();
|
||||
}
|
||||
|
||||
private static function contents(): string
|
||||
|
|
Loading…
Reference in a new issue