revamp report

master
Jean-Christian Paul Denis 2023-07-25 22:39:20 +02:00
parent 8bcb572e28
commit da756d7625
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 24 additions and 11 deletions

View File

@ -32,7 +32,7 @@ class Utils
public const DISTANT_API_URL = 'https://dotclear.watch/api'; public const DISTANT_API_URL = 'https://dotclear.watch/api';
/** @var string The distant API version */ /** @var string The distant API version */
public const DISTANT_API_VERSION = '1.0'; public const DISTANT_API_VERSION = '1.1';
/** @var array<int,string> The hiddens modules IDs */ /** @var array<int,string> The hiddens modules IDs */
private static array $hiddens = []; private static array $hiddens = [];
@ -273,18 +273,31 @@ class Utils
{ {
// Build json response // Build json response
return (string) json_encode([ return (string) json_encode([
'uid' => self::uid(), 'uid' => self::uid(),
'buid' => self::buid(), 'buid' => self::buid(),
'plugin' => self::getPlugins(), // enabled plugins 'plugins' => self::getPlugins(), // enabled plugins
'theme' => self::getThemes(), // enabled themes 'themes' => self::getThemes(), // enabled themes
'server' => [ 'blog' => [
'blogs_count' => (int) dcCore::app()->getBlogs([], true)->f(0), 'lang' => (string) dcCore::app()->blog->settings->get('system')->get('lang'),
'core' => DC_VERSION, 'theme' => (string) dcCore::app()->blog->settings->get('system')->get('theme'),
'php' => phpversion(), ],
'thm' => (string) dcCore::app()->blog->settings->get('system')->get('theme'), // selected theme 'blogs' => [
'count' => (int) dcCore::app()->getBlogs([], true)->f(0),
],
'core' => [
'version' => DC_VERSION,
],
'php' => [
'sapi' => php_sapi_name() ?: 'php',
'version' => phpversion(),
],
'system' => [
'name' => php_uname('s'),
'version' => php_uname('r'),
], ],
'database' => [ 'database' => [
dcCore::app()->con->driver() => dcCore::app()->con->version(), 'driver' => dcCore::app()->con->driver(),
'version' => dcCore::app()->con->version(),
], ],
], JSON_PRETTY_PRINT); ], JSON_PRETTY_PRINT);
} }