cache announce userInfo

This commit is contained in:
xiaomlove
2022-03-19 19:51:23 +08:00
parent 4857b799b8
commit a5ea51de55
9 changed files with 17 additions and 6 deletions

View File

@@ -6,5 +6,6 @@ $rootpath= dirname(__DIR__) . '/';
require_once $rootpath . 'include/constants.php';
require_once $rootpath . 'include/globalfunctions.php';
require_once $rootpath . 'include/functions_announce.php';
require_once $rootpath . 'vendor/autoload.php';

View File

@@ -1,6 +1,6 @@
<?php
require_once __DIR__ . '/constants.php';
require $rootpath . 'vendor/autoload.php';
require_once $rootpath . 'vendor/autoload.php';
if (!file_exists($rootpath . '.env')) {
$installScriptRelativePath = 'install/install.php';
$installScriptFile = $rootpath . "public/$installScriptRelativePath";

View File

@@ -2812,6 +2812,9 @@ function base64 ($string, $encode=true) {
function loggedinorreturn($mainpage = false) {
global $CURUSER,$BASEURL;
if (!$CURUSER) {
if (CURRENT_SCRIPT == 'ajax') {
exit(fail('Not login!', $_POST));
}
if ($mainpage)
header("Location: " . get_protocol_prefix() . "$BASEURL/login.php");
else {