mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-03-13 05:51:10 +00:00
parent
3507abc35f
commit
fe2a7a575f
@ -165,8 +165,6 @@ define('NODE_RULE_SUBJECT', 'Common');
|
||||
define('NODE_RULE_LANGUAGES', 'All');
|
||||
|
||||
// API
|
||||
define('API_VERSION', '1.0.0');
|
||||
|
||||
define('API_USER_AGENT', WEBSITE_NAME);
|
||||
|
||||
/// Export
|
||||
|
@ -3,6 +3,10 @@
|
||||
// PHP
|
||||
declare(strict_types=1);
|
||||
|
||||
// Application
|
||||
define('APP_VERSION', '2.0.0');
|
||||
define('API_VERSION', APP_VERSION);
|
||||
|
||||
// Init environment
|
||||
if (!file_exists(__DIR__ . '/.env'))
|
||||
{
|
||||
|
@ -58,7 +58,8 @@ try
|
||||
// Manifest
|
||||
$manifest =
|
||||
[
|
||||
'updated' => time(),
|
||||
'updated' => time(),
|
||||
'version' => (string) API_VERSION,
|
||||
|
||||
'settings' => (object)
|
||||
[
|
||||
@ -119,7 +120,6 @@ try
|
||||
|
||||
'MAGNET_STOP_WORDS_SIMILAR' => (object) MAGNET_STOP_WORDS_SIMILAR,
|
||||
|
||||
'API_VERSION' => (string) API_VERSION,
|
||||
'API_USER_AGENT' => (string) API_USER_AGENT,
|
||||
|
||||
'API_EXPORT_ENABLED' => (bool) API_EXPORT_ENABLED,
|
||||
|
@ -135,6 +135,19 @@ try
|
||||
continue;
|
||||
}
|
||||
|
||||
if (empty($manifest->version) || $manifest->version !== API_VERSION)
|
||||
{
|
||||
array_push(
|
||||
$debug['dump'],
|
||||
sprintf(
|
||||
_('Manifest API not compatible with local version "%s"'),
|
||||
API_VERSION
|
||||
)
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (empty($manifest->export))
|
||||
{
|
||||
array_push(
|
||||
|
Loading…
x
Reference in New Issue
Block a user