mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-30 19:29:21 +02:00
shorten some expressions with ??
This commit is contained in:
parent
56bd2c86b7
commit
4eb9bbbbcf
@ -14,5 +14,5 @@ $twig->display('admin.login.html.twig', [
|
|||||||
'logout' => (ACTION == 'logout' ? 'You have been logged out!' : ''),
|
'logout' => (ACTION == 'logout' ? 'You have been logged out!' : ''),
|
||||||
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
||||||
'account_login_by' => getAccountLoginByLabel(),
|
'account_login_by' => getAccountLoginByLabel(),
|
||||||
'errors' => isset($errors)? $errors : ''
|
'errors' => $errors ?? ''
|
||||||
]);
|
]);
|
||||||
|
@ -116,20 +116,20 @@ if($action == 'edit' || $action == 'new') {
|
|||||||
'action' => $action,
|
'action' => $action,
|
||||||
'news_link' => getLink(PAGE),
|
'news_link' => getLink(PAGE),
|
||||||
'news_link_form' => '?p=news&action=' . ($action == 'edit' ? 'edit' : 'new'),
|
'news_link_form' => '?p=news&action=' . ($action == 'edit' ? 'edit' : 'new'),
|
||||||
'news_id' => isset($id) ? $id : null,
|
'news_id' => $id ?? null,
|
||||||
'title' => isset($p_title) ? $p_title : '',
|
'title' => $p_title ?? '',
|
||||||
'body' => isset($body) ? escapeHtml($body) : '',
|
'body' => isset($body) ? escapeHtml($body) : '',
|
||||||
'type' => isset($type) ? $type : null,
|
'type' => $type ?? null,
|
||||||
'player' => isset($player) && $player->isLoaded() ? $player : null,
|
'player' => isset($player) && $player->isLoaded() ? $player : null,
|
||||||
'player_id' => isset($player_id) ? $player_id : null,
|
'player_id' => $player_id ?? null,
|
||||||
'account_players' => $account_players,
|
'account_players' => $account_players,
|
||||||
'category' => isset($category) ? $category : 0,
|
'category' => $category ?? 0,
|
||||||
'categories' => $categories,
|
'categories' => $categories,
|
||||||
'forum_boards' => getForumBoards(),
|
'forum_boards' => getForumBoards(),
|
||||||
'forum_section' => isset($forum_section) ? $forum_section : null,
|
'forum_section' => $forum_section ?? null,
|
||||||
'comments' => isset($comments) ? $comments : null,
|
'comments' => $comments ?? null,
|
||||||
'article_text' => isset($article_text) ? $article_text : null,
|
'article_text' => $article_text ?? null,
|
||||||
'article_image' => isset($article_image) ? $article_image : null
|
'article_image' => $article_image ?? null
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ if(!$logged && isset($_POST['account_login'], $_POST['password_login']))
|
|||||||
$tmp = array();
|
$tmp = array();
|
||||||
|
|
||||||
$ip = $_SERVER['REMOTE_ADDR'];
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
$t = isset($tmp[$ip]) ? $tmp[$ip] : NULL;
|
$t = $tmp[$ip] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config('recaptcha_enabled') && !config('account_create_auto_login'))
|
if(config('recaptcha_enabled') && !config('account_create_auto_login'))
|
||||||
|
@ -16,10 +16,10 @@ if(!$logged)
|
|||||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||||
|
|
||||||
$twig->display('account.login.html.twig', array(
|
$twig->display('account.login.html.twig', array(
|
||||||
'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null,
|
'redirect' => $_REQUEST['redirect'] ?? null,
|
||||||
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
||||||
'account_login_by' => getAccountLoginByLabel(),
|
'account_login_by' => getAccountLoginByLabel(),
|
||||||
'error' => isset($errors[0]) ? $errors[0] : null
|
'error' => $errors[0] ?? null
|
||||||
));
|
));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -63,10 +63,10 @@ if($show_form) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$twig->display('account.change_info.html.twig', array(
|
$twig->display('account.change_info.html.twig', array(
|
||||||
'countries' => isset($countries) ? $countries : [],
|
'countries' => $countries ?? [],
|
||||||
'account_rlname' => $account_rlname,
|
'account_rlname' => $account_rlname,
|
||||||
'account_location' => $account_location,
|
'account_location' => $account_location,
|
||||||
'account_country' => isset($account_country) ? $account_country : ''
|
'account_country' => $account_country ?? ''
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -17,9 +17,9 @@ if(!$logged) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_password = isset($_POST['newpassword']) ? $_POST['newpassword'] : NULL;
|
$new_password = $_POST['newpassword'] ?? NULL;
|
||||||
$new_password2 = isset($_POST['newpassword2']) ? $_POST['newpassword2'] : NULL;
|
$new_password2 = $_POST['newpassword2'] ?? NULL;
|
||||||
$old_password = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : NULL;
|
$old_password = $_POST['oldpassword'] ?? NULL;
|
||||||
if(empty($new_password) && empty($new_password2) && empty($old_password)) {
|
if(empty($new_password) && empty($new_password2) && empty($old_password)) {
|
||||||
$twig->display('account.change_password.html.twig');
|
$twig->display('account.change_password.html.twig');
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
|
|
||||||
$title = 'Confirm Email';
|
$title = 'Confirm Email';
|
||||||
|
|
||||||
$hash = isset($_GET['hash']) ? $_GET['hash'] : '';
|
$hash = $_GET['hash'] ?? '';
|
||||||
if(empty($hash)) {
|
if(empty($hash)) {
|
||||||
warning('Please enter email hash code.<br/>If you copied the link, please try again with full link.');
|
warning('Please enter email hash code.<br/>If you copied the link, please try again with full link.');
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user