[api] reward + thanks

This commit is contained in:
xiaomlove
2022-03-30 15:37:11 +08:00
parent b613a46b8d
commit 3e4a5766c4
38 changed files with 983 additions and 64 deletions

View File

@@ -16,14 +16,13 @@ require $rootpath . 'include/eloquent.php';
ini_set('date.timezone', nexus_config('nexus.timezone'));
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 0);
$Cache = new class_cache_redis(); //Load the caching class
$Cache->setLanguageFolderArray(get_langfolder_list());
require $rootpath . 'include/config.php';
if (!in_array(nexus()->getScript(), ['announce', 'scrape'])) {
require $rootpath . get_langfile_path("functions.php");
checkGuestVisit();
}
$Cache = new class_cache_redis(); //Load the caching class
$Cache->setLanguageFolderArray(get_langfolder_list());
require $rootpath . 'include/config.php';
define('TIMENOW', time());
$USERUPDATESET = array();

View File

@@ -676,3 +676,13 @@ function nexus()
{
return \Nexus\Nexus::instance();
}
function site_info()
{
$setting = \App\Models\Setting::get('basic');
$siteInfo = [
'site_name' => $setting['SITENAME'],
'base_url' => getSchemeAndHttpHost(),
];
return $siteInfo;
}