do not requre lang_functions in announce request

This commit is contained in:
xiaomlove
2022-06-09 17:37:03 +08:00
parent 11d906a869
commit d95979b579
3 changed files with 10 additions and 4 deletions

View File

@@ -17,9 +17,12 @@ require $rootpath . 'include/eloquent.php';
ini_set('date.timezone', nexus_config('nexus.timezone'));
$Cache = new class_cache_redis(); //Load the caching class
$Cache->setLanguageFolderArray(get_langfolder_list());
$script = nexus()->getScript();
if (!in_array($script, ['announce'])) {
require $rootpath . get_langfile_path("functions.php");
}
require $rootpath . 'include/config.php';
require $rootpath . get_langfile_path("functions.php");
if (!isRunningInConsole() && !in_array(nexus()->getScript(), ['announce', 'scrape', 'torrentrss', 'download'])) {
if (!isRunningInConsole() && !in_array($script, ['announce', 'scrape', 'torrentrss', 'download'])) {
checkGuestVisit();
}