Merge pull request #12966 from MrPetovan/bug/fatal-errors
Fix a couple of namespace issues
This commit is contained in:
commit
5123e67f8d
|
@ -24,6 +24,7 @@
|
|||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-posix": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-xml": "*",
|
||||
"asika/simple-console": "^1.0",
|
||||
|
@ -34,6 +35,7 @@
|
|||
"friendica/json-ld": "^1.0",
|
||||
"geekwright/po": "^2.0",
|
||||
"guzzlehttp/guzzle": "^6.5",
|
||||
"kornrunner/blurhash": "^1.2",
|
||||
"league/html-to-markdown": "^4.8",
|
||||
"level-2/dice": "^4",
|
||||
"lightopenid/lightopenid": "dev-master",
|
||||
|
@ -49,6 +51,7 @@
|
|||
"phpseclib/phpseclib": "^3.0",
|
||||
"pragmarx/google2fa": "^5.0",
|
||||
"pragmarx/recovery": "^0.2",
|
||||
"psr/clock": "^1.0",
|
||||
"psr/container": "^1.0",
|
||||
"psr/log": "^1.1",
|
||||
"seld/cli-prompt": "^1.0",
|
||||
|
@ -71,9 +74,7 @@
|
|||
"npm-asset/moment": "^2.24",
|
||||
"npm-asset/perfect-scrollbar": "0.6.16",
|
||||
"npm-asset/textcomplete": "^0.18.2",
|
||||
"npm-asset/typeahead.js": "^0.11.1",
|
||||
"kornrunner/blurhash": "^1.2",
|
||||
"psr/clock": "^1.0"
|
||||
"npm-asset/typeahead.js": "^0.11.1"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c9e005c79c8556215c30a66c470659eb",
|
||||
"content-hash": "456d14e3ad9be265c5c9e6172a0d18d8",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asika/simple-console",
|
||||
|
@ -6474,6 +6474,7 @@
|
|||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-posix": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-xml": "*"
|
||||
},
|
||||
|
|
|
@ -112,7 +112,7 @@ class Process extends BaseRepository
|
|||
try {
|
||||
$processes = $this->db->select(static::$table_name, ['pid'], ['hostname' => $this->currentHost]);
|
||||
while ($process = $this->db->fetch($processes)) {
|
||||
if (!posix_kill($process['pid'], 0)) {
|
||||
if (!\posix_kill($process['pid'], 0)) {
|
||||
$this->db->delete(static::$table_name, ['pid' => $process['pid']]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Register;
|
||||
use Friendica\Module;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
|
||||
use Friendica\Security\TwoFactor\Model\AppSpecificPassword;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
@ -1890,17 +1890,17 @@ class User
|
|||
}
|
||||
|
||||
$register_policy = DI::config()->get('config', 'register_policy');
|
||||
if (!in_array($register_policy, [Register::OPEN, Register::CLOSED])) {
|
||||
if (!in_array($register_policy, [Module\Register::OPEN, Module\Register::CLOSED])) {
|
||||
Logger::debug('Unsupported register policy.', ['policy' => $register_policy]);
|
||||
return;
|
||||
}
|
||||
|
||||
$users = DBA::count('user', ['blocked' => false, 'account_removed' => false, 'account_expired' => false]);
|
||||
if (($users >= $max_registered_users) && ($register_policy == Register::OPEN)) {
|
||||
DI::config()->set('config', 'register_policy', Register::CLOSED);
|
||||
if (($users >= $max_registered_users) && ($register_policy == Module\Register::OPEN)) {
|
||||
DI::config()->set('config', 'register_policy', Module\Register::CLOSED);
|
||||
Logger::notice('Max users reached, registration is closed.', ['users' => $users, 'max' => $max_registered_users]);
|
||||
} elseif (($users < $max_registered_users) && ($register_policy == Register::CLOSED)) {
|
||||
DI::config()->set('config', 'register_policy', Register::OPEN);
|
||||
} elseif (($users < $max_registered_users) && ($register_policy == Module\Register::CLOSED)) {
|
||||
DI::config()->set('config', 'register_policy', Module\Register::OPEN);
|
||||
Logger::notice('Below maximum users, registration is opened.', ['users' => $users, 'max' => $max_registered_users]);
|
||||
} else {
|
||||
Logger::debug('Unchanged register policy', ['policy' => $register_policy, 'users' => $users, 'max' => $max_registered_users]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user