Files
gallery3/modules/user/views/login.html.php
T
Bharat Mediratta 80f48b084a In the logout link, urlencode the continue url so that ampersands, etc
don't break encapsulation.  In the logout controller, don't run the
url through url::redirect because that uses url::site().  Just set the
Location header directly.

This fixes ticket #483.
2009-07-21 13:02:20 -07:00

23 lines
758 B
PHP

<?php defined("SYSPATH") or die("No direct script access.") ?>
<ul id="gLoginMenu">
<? if ($user->guest): ?>
<li class="first">
<a href="<?= url::site("login/ajax") ?>"
title="<?= t("Login to Gallery") ?>"
id="gLoginLink"><?= t("Login") ?></a>
</li>
<? else: ?>
<li class="first">
<?= t('Logged in as %name', array('name' =>
'<a href="' . url::site("form/edit/users/{$user->id}") .
'" title="' . t("Edit Your Profile") .
'" id="gUserProfileLink" class="gDialogLink">' .
p::clean($user->display_name()) . '</a>')) ?>
</li>
<li>
<a href="<?= url::site("logout?csrf=$csrf&amp;continue=" . urlencode(url::current(true))) ?>"
id="gLogoutLink"><?= t("Logout") ?></a>
</li>
<? endif ?>
</ul>