|
|
@ -45,7 +45,7 @@ try |
|
|
|
@unlink(__DIR__ . '/../public/api/stars.json'); |
|
|
|
@unlink(__DIR__ . '/../public/api/stars.json'); |
|
|
|
@unlink(__DIR__ . '/../public/api/views.json'); |
|
|
|
@unlink(__DIR__ . '/../public/api/views.json'); |
|
|
|
|
|
|
|
|
|
|
|
if (API_ENABLED) |
|
|
|
if (API_EXPORT_ENABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Manifest |
|
|
|
// Manifest |
|
|
|
$manifest = |
|
|
|
$manifest = |
|
|
@ -91,12 +91,12 @@ try |
|
|
|
'MAGNET_STOP_WORDS_SIMILAR' => MAGNET_STOP_WORDS_SIMILAR, |
|
|
|
'MAGNET_STOP_WORDS_SIMILAR' => MAGNET_STOP_WORDS_SIMILAR, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
'users' => API_FEED_USERS_ENABLED ? sprintf('%s/api/users.json', WEBSITE_URL) : false, |
|
|
|
'users' => API_EXPORT_USERS_ENABLED ? sprintf('%s/api/users.json', WEBSITE_URL) : false, |
|
|
|
'magnets' => API_FEED_MAGNETS_ENABLED ? sprintf('%s/api/magnets.json', WEBSITE_URL) : false, |
|
|
|
'magnets' => API_EXPORT_MAGNETS_ENABLED ? sprintf('%s/api/magnets.json', WEBSITE_URL) : false, |
|
|
|
'downloads' => API_FEED_DOWNLOADS_ENABLED ? sprintf('%s/api/downloads.json', WEBSITE_URL) : false, |
|
|
|
'downloads' => API_EXPORT_DOWNLOADS_ENABLED ? sprintf('%s/api/downloads.json', WEBSITE_URL) : false, |
|
|
|
'comments' => API_FEED_COMMENTS_ENABLED ? sprintf('%s/api/comments.json', WEBSITE_URL) : false, |
|
|
|
'comments' => API_EXPORT_COMMENTS_ENABLED ? sprintf('%s/api/comments.json', WEBSITE_URL) : false, |
|
|
|
'stars' => API_FEED_STARS_ENABLED ? sprintf('%s/api/stars.json', WEBSITE_URL) : false, |
|
|
|
'stars' => API_EXPORT_STARS_ENABLED ? sprintf('%s/api/stars.json', WEBSITE_URL) : false, |
|
|
|
'views' => API_FEED_VIEWS_ENABLED ? sprintf('%s/api/views.json', WEBSITE_URL) : false, |
|
|
|
'views' => API_EXPORT_VIEWS_ENABLED ? sprintf('%s/api/views.json', WEBSITE_URL) : false, |
|
|
|
|
|
|
|
|
|
|
|
'totals' => |
|
|
|
'totals' => |
|
|
|
[ |
|
|
|
[ |
|
|
@ -144,7 +144,7 @@ try |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Users |
|
|
|
// Users |
|
|
|
if (API_FEED_USERS_ENABLED) |
|
|
|
if (API_EXPORT_USERS_ENABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$users = []; |
|
|
|
$users = []; |
|
|
|
|
|
|
|
|
|
|
@ -181,7 +181,7 @@ try |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Magnets |
|
|
|
// Magnets |
|
|
|
if (API_FEED_MAGNETS_ENABLED) |
|
|
|
if (API_EXPORT_MAGNETS_ENABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$magnets = []; |
|
|
|
$magnets = []; |
|
|
|
|
|
|
|
|
|
|
@ -320,7 +320,7 @@ try |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Downloads |
|
|
|
// Downloads |
|
|
|
if (API_FEED_DOWNLOADS_ENABLED) |
|
|
|
if (API_EXPORT_DOWNLOADS_ENABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$downloads = []; |
|
|
|
$downloads = []; |
|
|
|
|
|
|
|
|
|
|
@ -349,7 +349,7 @@ try |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Comments |
|
|
|
// Comments |
|
|
|
if (API_FEED_COMMENTS_ENABLED) |
|
|
|
if (API_EXPORT_COMMENTS_ENABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$comments = []; |
|
|
|
$comments = []; |
|
|
|
|
|
|
|
|
|
|
@ -378,7 +378,7 @@ try |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Stars |
|
|
|
// Stars |
|
|
|
if (API_FEED_STARS_ENABLED) |
|
|
|
if (API_EXPORT_STARS_ENABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$stars = []; |
|
|
|
$stars = []; |
|
|
|
|
|
|
|
|
|
|
@ -407,7 +407,7 @@ try |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// Views |
|
|
|
// Views |
|
|
|
if (API_FEED_VIEWS_ENABLED) |
|
|
|
if (API_EXPORT_VIEWS_ENABLED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$views = []; |
|
|
|
$views = []; |
|
|
|
|
|
|
|
|
|
|
|