diff options
Diffstat (limited to 'modules/gallery/views')
| -rw-r--r-- | modules/gallery/views/kohana_error_page.php | 2 | ||||
| -rw-r--r-- | modules/gallery/views/login.html.php | 4 | ||||
| -rw-r--r-- | modules/gallery/views/login_ajax.html.php | 2 | ||||
| -rw-r--r-- | modules/gallery/views/maintenance.html.php | 2 | 
4 files changed, 8 insertions, 2 deletions
| diff --git a/modules/gallery/views/kohana_error_page.php b/modules/gallery/views/kohana_error_page.php index 314a9923..0256fabb 100644 --- a/modules/gallery/views/kohana_error_page.php +++ b/modules/gallery/views/kohana_error_page.php @@ -57,7 +57,7 @@      <title><?= t("Something went wrong!") ?></title>    </head>    <body> -    <? try { $user = user::active(); } catch (Exception $e) { } ?> +    <? try { $user = Session::active_user(); } catch (Exception $e) { } ?>      <? $admin = php_sapi_name() == "cli" || isset($user) && $user->admin ?>      <div class="big_box" id="framework_error">        <h1> diff --git a/modules/gallery/views/login.html.php b/modules/gallery/views/login.html.php index 9be218c0..6695d564 100644 --- a/modules/gallery/views/login.html.php +++ b/modules/gallery/views/login.html.php @@ -8,11 +8,15 @@    </li>    <? else: ?>    <li class="first"> +    <? if (Identity::is_writable()): ?>      <?= t('Logged in as %name', array('name' => html::mark_clean(        '<a href="' . url::site("form/edit/users/{$user->id}") .        '" title="' . t("Edit Your Profile")->for_html_attr() .        '" id="g-user-profile-link" class="g-dialog-link">' .        html::clean($user->display_name()) . '</a>'))) ?> +    <? else: ?> +    <?= t('Logged in as %name', array('name' => html::clean($user->display_name()))) ?> +    <? endif ?>    </li>    <li>      <a href="<?= url::site("logout?csrf=$csrf&continue=" . urlencode(url::current(true))) ?>" diff --git a/modules/gallery/views/login_ajax.html.php b/modules/gallery/views/login_ajax.html.php index d3364b46..6ed40571 100644 --- a/modules/gallery/views/login_ajax.html.php +++ b/modules/gallery/views/login_ajax.html.php @@ -36,8 +36,10 @@      <li id="g-login-form">        <?= $form ?>      </li> +    <? if (Identity::is_writable()): ?>      <li>        <a href="#" id="g-password-reset" class="g-right g-txt-small"><?= t("Forgot Your Password?") ?></a>      </li> +    <? endif ?>    </ul>  </div> diff --git a/modules/gallery/views/maintenance.html.php b/modules/gallery/views/maintenance.html.php index f80b6e7a..0aeaaec2 100644 --- a/modules/gallery/views/maintenance.html.php +++ b/modules/gallery/views/maintenance.html.php @@ -43,7 +43,7 @@      <p>        <?= t("This site is currently only accessible by site administrators.") ?>      </p> -    <?= user::get_login_form("login/auth_html") ?> +    <?= login::get_login_form("login/auth_html") ?>    </body>  </html> | 
