mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
login update user lang
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.11');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-27');
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.12');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-04-01');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -470,20 +470,26 @@ function arr_set(&$array, $key, $value)
|
||||
|
||||
function isHttps(): bool
|
||||
{
|
||||
$schema = nexus()->getRequestSchema();
|
||||
return $schema == 'https';
|
||||
if (isRunningInConsole()) {
|
||||
$securityLogin = get_setting("security.securelogin");
|
||||
if ($securityLogin != "no") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return nexus()->getRequestSchema() == 'https';
|
||||
}
|
||||
|
||||
|
||||
function getSchemeAndHttpHost()
|
||||
function getSchemeAndHttpHost(bool $fromConfig = false)
|
||||
{
|
||||
global $BASEURL;
|
||||
if (isRunningInConsole()) {
|
||||
return $BASEURL;
|
||||
if (isRunningInConsole() || $fromConfig) {
|
||||
$host = get_setting("basic.BASEURL");
|
||||
} else {
|
||||
$host = nexus()->getRequestHost();
|
||||
}
|
||||
$isHttps = isHttps();
|
||||
$protocol = $isHttps ? 'https' : 'http';
|
||||
$host = nexus()->getRequestHost();
|
||||
return "$protocol://" . $host;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user