Replace global $lang with system.language
This commit is contained in:
parent
adacf421a6
commit
d0780ccf7d
6 changed files with 16 additions and 26 deletions
|
@ -6,13 +6,13 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function load_doc_file($s)
|
||||
{
|
||||
global $lang;
|
||||
if (!isset($lang)) $lang = 'en';
|
||||
$lang = Config::get('system', 'language');
|
||||
$b = basename($s);
|
||||
$d = dirname($s);
|
||||
if (file_exists("$d/$lang/$b")) {
|
||||
|
@ -30,8 +30,6 @@ function help_content(App $a)
|
|||
{
|
||||
Nav::setSelected('help');
|
||||
|
||||
global $lang;
|
||||
|
||||
$text = '';
|
||||
|
||||
if ($a->argc > 1) {
|
||||
|
|
|
@ -21,8 +21,6 @@ function register_post(App $a)
|
|||
{
|
||||
check_form_security_token_redirectOnErr('/register', 'register');
|
||||
|
||||
global $lang;
|
||||
|
||||
$verified = 0;
|
||||
$blocked = 1;
|
||||
|
||||
|
@ -123,7 +121,7 @@ function register_post(App $a)
|
|||
dbesc(DateTimeFormat::utcNow()),
|
||||
intval($user['uid']),
|
||||
dbesc($result['password']),
|
||||
dbesc($lang),
|
||||
dbesc(Config::get('system', 'language')),
|
||||
dbesc($_POST['permonlybox'])
|
||||
);
|
||||
|
||||
|
|
|
@ -97,8 +97,6 @@ function user_deny($hash)
|
|||
|
||||
function regmod_content(App $a)
|
||||
{
|
||||
global $lang;
|
||||
|
||||
if (!local_user()) {
|
||||
info(L10n::t('Please login.') . EOL);
|
||||
$o = '<br /><br />' . Login::form($a->query_string, Config::get('config', 'register_policy') === REGISTER_CLOSED ? 0 : 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue