mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Link to the HTTPs login page in the header
Change the login link so that it points directly to the HTTPs version of the login page if "$DISABLE_HTTP_LOGIN" is set and if HTTP is used. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
d25a57c973
commit
7e201e5a3a
2 changed files with 6 additions and 0 deletions
|
@ -298,6 +298,8 @@ function db_connect() {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function html_header($title="") {
|
function html_header($title="") {
|
||||||
|
global $AUR_LOCATION;
|
||||||
|
global $DISABLE_HTTP_LOGIN;
|
||||||
global $LANG;
|
global $LANG;
|
||||||
global $SUPPORTED_LANGS;
|
global $SUPPORTED_LANGS;
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,12 @@
|
||||||
<li><a href="<?= get_uri('/logout/'); ?>"><?= __("Logout"); ?></a></li>
|
<li><a href="<?= get_uri('/logout/'); ?>"><?= __("Logout"); ?></a></li>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<li><a href="<?= get_uri('/register/'); ?>"><?= __("Register"); ?></a></li>
|
<li><a href="<?= get_uri('/register/'); ?>"><?= __("Register"); ?></a></li>
|
||||||
|
<?php if ($DISABLE_HTTP_LOGIN && empty($_SERVER['HTTPS'])): ?>
|
||||||
|
<li><a href="<?= $AUR_LOCATION . get_uri('/login/'); ?>"><?= __("Login"); ?></a></li>
|
||||||
|
<?php else: ?>
|
||||||
<li><a href="<?= get_uri('/login/'); ?>"><?= __("Login"); ?></a></li>
|
<li><a href="<?= get_uri('/login/'); ?>"><?= __("Login"); ?></a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php endif; ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- #archdev-navbar -->
|
</div><!-- #archdev-navbar -->
|
||||||
<!-- Start of main content -->
|
<!-- Start of main content -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue