diff --git a/example/environment/env.example.php b/example/environment/env.example.php index 8c343e8..b2efba4 100644 --- a/example/environment/env.example.php +++ b/example/environment/env.example.php @@ -127,21 +127,22 @@ define('NODE_RULE_LANGUAGES', 'All'); // API define('API_VERSION', 1); +/// Export define('API_EXPORT_ENABLED', true); -define('API_EXPORT_USERS_ENABLED', true); // depends of API_EXPORT_ENABLED -define('API_EXPORT_MAGNETS_ENABLED', true); // depends of API_EXPORT_ENABLED -define('API_EXPORT_DOWNLOADS_ENABLED', true); // depends of API_EXPORT_ENABLED -define('API_EXPORT_COMMENTS_ENABLED', true); // depends of API_EXPORT_ENABLED -define('API_EXPORT_STARS_ENABLED', true); // depends of API_EXPORT_ENABLED -define('API_EXPORT_VIEWS_ENABLED', true); // depends of API_EXPORT_ENABLED +define('API_EXPORT_USERS_ENABLED', true); // depends of API_EXPORT_ENABLED +define('API_EXPORT_MAGNETS_ENABLED', true); // depends of API_EXPORT_ENABLED +define('API_EXPORT_MAGNET_DOWNLOADS_ENABLED', true); // depends of API_EXPORT_ENABLED +define('API_EXPORT_MAGNET_COMMENTS_ENABLED', true); // depends of API_EXPORT_ENABLED +define('API_EXPORT_MAGNET_STARS_ENABLED', true); // depends of API_EXPORT_ENABLED +define('API_EXPORT_MAGNET_VIEWS_ENABLED', true); // depends of API_EXPORT_ENABLED +/// Import define('API_IMPORT_ENABLED', true); -define('API_IMPORT_USERS_ENABLED', true); // depends of API_IMPORT_ENABLED - -define('API_IMPORT_MAGNETS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED -define('API_IMPORT_DOWNLOADS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED -define('API_IMPORT_COMMENTS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED -define('API_IMPORT_STARS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED -define('API_IMPORT_VIEWS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED \ No newline at end of file +define('API_IMPORT_USERS_ENABLED', true); // depends of API_IMPORT_ENABLED +define('API_IMPORT_MAGNETS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED +define('API_IMPORT_MAGNET_DOWNLOADS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED +define('API_IMPORT_MAGNET_COMMENTS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED +define('API_IMPORT_MAGNET_STARS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED +define('API_IMPORT_MAGNET_VIEWS_ENABLED', true); // depends of API_IMPORT_ENABLED, API_IMPORT_USERS_ENABLED, API_IMPORT_MAGNETS_ENABLED \ No newline at end of file diff --git a/src/crontab/export/feed.php b/src/crontab/export/feed.php index 5a9d6f2..c90323c 100644 --- a/src/crontab/export/feed.php +++ b/src/crontab/export/feed.php @@ -91,12 +91,12 @@ try 'MAGNET_STOP_WORDS_SIMILAR' => MAGNET_STOP_WORDS_SIMILAR, ], - '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, + '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_MAGNET_DOWNLOADS_ENABLED ? sprintf('%s/api/downloads.json', WEBSITE_URL) : false, + 'comments' => API_EXPORT_MAGNET_COMMENTS_ENABLED ? sprintf('%s/api/comments.json', WEBSITE_URL) : false, + 'stars' => API_EXPORT_MAGNET_STARS_ENABLED ? sprintf('%s/api/stars.json', WEBSITE_URL) : false, + 'views' => API_EXPORT_MAGNET_VIEWS_ENABLED ? sprintf('%s/api/views.json', WEBSITE_URL) : false, 'totals' => [ @@ -323,7 +323,7 @@ try } // Downloads - if (API_EXPORT_DOWNLOADS_ENABLED) + if (API_EXPORT_MAGNET_DOWNLOADS_ENABLED) { $downloads = []; @@ -352,7 +352,7 @@ try } // Comments - if (API_EXPORT_COMMENTS_ENABLED) + if (API_EXPORT_MAGNET_COMMENTS_ENABLED) { $comments = []; @@ -381,7 +381,7 @@ try } // Stars - if (API_EXPORT_STARS_ENABLED) + if (API_EXPORT_MAGNET_STARS_ENABLED) { $stars = []; @@ -410,7 +410,7 @@ try } } // Views - if (API_EXPORT_VIEWS_ENABLED) + if (API_EXPORT_MAGNET_VIEWS_ENABLED) { $views = [];