Loading patches/034-display-back-to-login→patches/034-display-back-to-login.patch +16 −28 Original line number Diff line number Diff line diff --git a/core/templates/error.php b/core/templates/error.php index 2e5488ae8d..09fbc1e7c4 100644 index 2e5488ae8d..d39dc8580b 100644 --- a/core/templates/error.php +++ b/core/templates/error.php @@ -1,13 +1,17 @@ @@ -1,4 +1,5 @@ <div class="guest-box"> - <h2><?php p($l->t('Error')) ?></h2> - <ul> - <?php foreach ($_["errors"] as $error):?> - <li> - <p><?php p($error['error']) ?></p> - <?php if (isset($error['hint']) && $error['hint']): ?> - <p class='hint'><?php p($error['hint']) ?></p> - <?php endif;?> - </li> - <?php endforeach ?> - </ul> + <h2><?php p($l->t('Error')) ?></h2> + <ul> + <?php foreach ($_["errors"] as $error):?> + <li> + <p><?php p($error['error']) ?></p> + <?php if (isset($error['hint']) && $error['hint']): ?> + <p class='hint'><?php p($error['hint']) ?></p> + <?php endif;?> + </li> + <?php $displayBackToLogin = false; ?> <h2><?php p($l->t('Error')) ?></h2> <ul> <?php foreach ($_["errors"] as $error):?> @@ -8,6 +9,10 @@ <p class='hint'><?php p($error['hint']) ?></p> <?php endif;?> </li> + <?php if ($error['statusCode'] == 401) $displayBackToLogin = true; ?> + <?php endforeach ?> + </ul> <?php endforeach ?> </ul> + <?php if ($displayBackToLogin): ?> + <a href="<?php print_unescaped($_['logout_url']); ?>"><?php p($l->t('Back to login')) ?></a> + <?php endif; ?> Loading Loading
patches/034-display-back-to-login→patches/034-display-back-to-login.patch +16 −28 Original line number Diff line number Diff line diff --git a/core/templates/error.php b/core/templates/error.php index 2e5488ae8d..09fbc1e7c4 100644 index 2e5488ae8d..d39dc8580b 100644 --- a/core/templates/error.php +++ b/core/templates/error.php @@ -1,13 +1,17 @@ @@ -1,4 +1,5 @@ <div class="guest-box"> - <h2><?php p($l->t('Error')) ?></h2> - <ul> - <?php foreach ($_["errors"] as $error):?> - <li> - <p><?php p($error['error']) ?></p> - <?php if (isset($error['hint']) && $error['hint']): ?> - <p class='hint'><?php p($error['hint']) ?></p> - <?php endif;?> - </li> - <?php endforeach ?> - </ul> + <h2><?php p($l->t('Error')) ?></h2> + <ul> + <?php foreach ($_["errors"] as $error):?> + <li> + <p><?php p($error['error']) ?></p> + <?php if (isset($error['hint']) && $error['hint']): ?> + <p class='hint'><?php p($error['hint']) ?></p> + <?php endif;?> + </li> + <?php $displayBackToLogin = false; ?> <h2><?php p($l->t('Error')) ?></h2> <ul> <?php foreach ($_["errors"] as $error):?> @@ -8,6 +9,10 @@ <p class='hint'><?php p($error['hint']) ?></p> <?php endif;?> </li> + <?php if ($error['statusCode'] == 401) $displayBackToLogin = true; ?> + <?php endforeach ?> + </ul> <?php endforeach ?> </ul> + <?php if ($displayBackToLogin): ?> + <a href="<?php print_unescaped($_['logout_url']); ?>"><?php p($l->t('Back to login')) ?></a> + <?php endif; ?> Loading