mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-24 05:34:26 +00:00
add separated import/export settings
This commit is contained in:
parent
a9f8fade7d
commit
a232e24d0c
@ -123,11 +123,20 @@ define('NODE_RULE_LANGUAGES', 'All');
|
||||
// API
|
||||
define('API_VERSION', 1);
|
||||
|
||||
define('API_ENABLED', true);
|
||||
define('API_EXPORT_ENABLED', true);
|
||||
|
||||
define('API_FEED_USERS_ENABLED', true);
|
||||
define('API_FEED_MAGNETS_ENABLED', true);
|
||||
define('API_FEED_DOWNLOADS_ENABLED', true);
|
||||
define('API_FEED_COMMENTS_ENABLED', true);
|
||||
define('API_FEED_STARS_ENABLED', true);
|
||||
define('API_FEED_VIEWS_ENABLED', true);
|
||||
define('API_EXPORT_USERS_ENABLED', true);
|
||||
define('API_EXPORT_MAGNETS_ENABLED', true);
|
||||
define('API_EXPORT_DOWNLOADS_ENABLED', true);
|
||||
define('API_EXPORT_COMMENTS_ENABLED', true);
|
||||
define('API_EXPORT_STARS_ENABLED', true);
|
||||
define('API_EXPORT_VIEWS_ENABLED', true);
|
||||
|
||||
define('API_IMPORT_ENABLED', true);
|
||||
|
||||
define('API_IMPORT_USERS_ENABLED', true);
|
||||
define('API_IMPORT_MAGNETS_ENABLED', true);
|
||||
define('API_IMPORT_DOWNLOADS_ENABLED', true);
|
||||
define('API_IMPORT_COMMENTS_ENABLED', true);
|
||||
define('API_IMPORT_STARS_ENABLED', true);
|
||||
define('API_IMPORT_VIEWS_ENABLED', true);
|
@ -45,7 +45,7 @@ try
|
||||
@unlink(__DIR__ . '/../public/api/stars.json');
|
||||
@unlink(__DIR__ . '/../public/api/views.json');
|
||||
|
||||
if (API_ENABLED)
|
||||
if (API_EXPORT_ENABLED)
|
||||
{
|
||||
// Manifest
|
||||
$manifest =
|
||||
@ -91,12 +91,12 @@ try
|
||||
'MAGNET_STOP_WORDS_SIMILAR' => MAGNET_STOP_WORDS_SIMILAR,
|
||||
],
|
||||
|
||||
'users' => API_FEED_USERS_ENABLED ? sprintf('%s/api/users.json', WEBSITE_URL) : false,
|
||||
'magnets' => API_FEED_MAGNETS_ENABLED ? sprintf('%s/api/magnets.json', WEBSITE_URL) : false,
|
||||
'downloads' => API_FEED_DOWNLOADS_ENABLED ? sprintf('%s/api/downloads.json', WEBSITE_URL) : false,
|
||||
'comments' => API_FEED_COMMENTS_ENABLED ? sprintf('%s/api/comments.json', WEBSITE_URL) : false,
|
||||
'stars' => API_FEED_STARS_ENABLED ? sprintf('%s/api/stars.json', WEBSITE_URL) : false,
|
||||
'views' => API_FEED_VIEWS_ENABLED ? sprintf('%s/api/views.json', WEBSITE_URL) : false,
|
||||
'users' => API_EXPORT_USERS_ENABLED ? sprintf('%s/api/users.json', WEBSITE_URL) : false,
|
||||
'magnets' => API_EXPORT_MAGNETS_ENABLED ? sprintf('%s/api/magnets.json', WEBSITE_URL) : false,
|
||||
'downloads' => API_EXPORT_DOWNLOADS_ENABLED ? sprintf('%s/api/downloads.json', WEBSITE_URL) : false,
|
||||
'comments' => API_EXPORT_COMMENTS_ENABLED ? sprintf('%s/api/comments.json', WEBSITE_URL) : false,
|
||||
'stars' => API_EXPORT_STARS_ENABLED ? sprintf('%s/api/stars.json', WEBSITE_URL) : false,
|
||||
'views' => API_EXPORT_VIEWS_ENABLED ? sprintf('%s/api/views.json', WEBSITE_URL) : false,
|
||||
|
||||
'totals' =>
|
||||
[
|
||||
@ -144,7 +144,7 @@ try
|
||||
}
|
||||
|
||||
// Users
|
||||
if (API_FEED_USERS_ENABLED)
|
||||
if (API_EXPORT_USERS_ENABLED)
|
||||
{
|
||||
$users = [];
|
||||
|
||||
@ -181,7 +181,7 @@ try
|
||||
}
|
||||
|
||||
// Magnets
|
||||
if (API_FEED_MAGNETS_ENABLED)
|
||||
if (API_EXPORT_MAGNETS_ENABLED)
|
||||
{
|
||||
$magnets = [];
|
||||
|
||||
@ -320,7 +320,7 @@ try
|
||||
}
|
||||
|
||||
// Downloads
|
||||
if (API_FEED_DOWNLOADS_ENABLED)
|
||||
if (API_EXPORT_DOWNLOADS_ENABLED)
|
||||
{
|
||||
$downloads = [];
|
||||
|
||||
@ -349,7 +349,7 @@ try
|
||||
}
|
||||
|
||||
// Comments
|
||||
if (API_FEED_COMMENTS_ENABLED)
|
||||
if (API_EXPORT_COMMENTS_ENABLED)
|
||||
{
|
||||
$comments = [];
|
||||
|
||||
@ -378,7 +378,7 @@ try
|
||||
}
|
||||
|
||||
// Stars
|
||||
if (API_FEED_STARS_ENABLED)
|
||||
if (API_EXPORT_STARS_ENABLED)
|
||||
{
|
||||
$stars = [];
|
||||
|
||||
@ -407,7 +407,7 @@ try
|
||||
}
|
||||
}
|
||||
// Views
|
||||
if (API_FEED_VIEWS_ENABLED)
|
||||
if (API_EXPORT_VIEWS_ENABLED)
|
||||
{
|
||||
$views = [];
|
||||
|
||||
|
@ -707,7 +707,7 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
@ -309,7 +309,7 @@ else
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
@ -862,7 +862,7 @@ else {
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
@ -226,7 +226,7 @@ else if (is_null($user->public))
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
@ -424,7 +424,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss<?php echo $request->query ? sprintf('&query=%s', urlencode($request->query)) : false ?>"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
@ -499,7 +499,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
@ -470,7 +470,7 @@ else if (is_null($user->public))
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
@ -144,7 +144,7 @@ else if (isset($_POST['public']))
|
||||
<a href="<?php echo WEBSITE_URL ?>/node.php"><?php echo _('Node') ?></a>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/index.php?rss"><?php echo _('RSS') ?></a>
|
||||
<?php if (API_ENABLED) { ?>
|
||||
<?php if (API_EXPORT_ENABLED) { ?>
|
||||
|
|
||||
<a rel="nofollow" href="<?php echo WEBSITE_URL ?>/api/manifest.json"><?php echo _('API') ?></a>
|
||||
<?php } ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user