mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 01:25:39 +00:00
parent
3507abc35f
commit
fe2a7a575f
4 changed files with 19 additions and 4 deletions
|
|
@ -165,8 +165,6 @@ define('NODE_RULE_SUBJECT', 'Common');
|
||||||
define('NODE_RULE_LANGUAGES', 'All');
|
define('NODE_RULE_LANGUAGES', 'All');
|
||||||
|
|
||||||
// API
|
// API
|
||||||
define('API_VERSION', '1.0.0');
|
|
||||||
|
|
||||||
define('API_USER_AGENT', WEBSITE_NAME);
|
define('API_USER_AGENT', WEBSITE_NAME);
|
||||||
|
|
||||||
/// Export
|
/// Export
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@
|
||||||
// PHP
|
// PHP
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
// Application
|
||||||
|
define('APP_VERSION', '2.0.0');
|
||||||
|
define('API_VERSION', APP_VERSION);
|
||||||
|
|
||||||
// Init environment
|
// Init environment
|
||||||
if (!file_exists(__DIR__ . '/.env'))
|
if (!file_exists(__DIR__ . '/.env'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,8 @@ try
|
||||||
// Manifest
|
// Manifest
|
||||||
$manifest =
|
$manifest =
|
||||||
[
|
[
|
||||||
'updated' => time(),
|
'updated' => time(),
|
||||||
|
'version' => (string) API_VERSION,
|
||||||
|
|
||||||
'settings' => (object)
|
'settings' => (object)
|
||||||
[
|
[
|
||||||
|
|
@ -119,7 +120,6 @@ try
|
||||||
|
|
||||||
'MAGNET_STOP_WORDS_SIMILAR' => (object) MAGNET_STOP_WORDS_SIMILAR,
|
'MAGNET_STOP_WORDS_SIMILAR' => (object) MAGNET_STOP_WORDS_SIMILAR,
|
||||||
|
|
||||||
'API_VERSION' => (string) API_VERSION,
|
|
||||||
'API_USER_AGENT' => (string) API_USER_AGENT,
|
'API_USER_AGENT' => (string) API_USER_AGENT,
|
||||||
|
|
||||||
'API_EXPORT_ENABLED' => (bool) API_EXPORT_ENABLED,
|
'API_EXPORT_ENABLED' => (bool) API_EXPORT_ENABLED,
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,19 @@ try
|
||||||
continue;
|
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))
|
if (empty($manifest->export))
|
||||||
{
|
{
|
||||||
array_push(
|
array_push(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue