Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1603 from owncloud/fix-automatic-redirects
Browse files Browse the repository at this point in the history
fix HTML link redirection
  • Loading branch information
ChristophWurst authored Aug 4, 2016
2 parents 212d323 + 239d29e commit 3599e50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(array $urlParams = []) {
$container->registerParameter("appName", "mail");
$container->registerParameter("userFolder", $container->getServer()->getUserFolder($user));
$container->registerParameter("testSmtp", $testSmtp);
$container->registerParameter("referrer", isset($_SERVER['HTTP_REFERER']) ? : null);
$container->registerParameter("referrer", isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
$container->registerParameter("hostname", Util::getServerHostName());
}

Expand Down
21 changes: 13 additions & 8 deletions templates/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,31 @@
*
*/
?>
<?php /** @var array $_ */?>
<?php /** @var array $_ */ ?>
<?php if (isset($_['authorizedRedirect']) && ($_['authorizedRedirect'])): ?>
<?php script('mail', 'autoredirect'); ?>
<div class="error" style="text-align: center;">
<img src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif'));?>"
style="margin: 0 auto;" />
<div class="icon-loading-dark"
style="height: 60px;"></div>
<p>
<a href="<?php p($_['url']) ?>" rel="noreferrer" id="redirectLink"
style="color: #fff !important;">
<?php p($l->t('Forwarding you to %s - click here if you are not automatically redirected within the next few seconds.', array($_['urlHost'])));?>
style="font-weight: 300 !important">
<h2><?php p($l->t('Forwarding to %s', array($_['urlHost']))); ?></h2>
<?php p($l->t('Click here if you are not automatically redirected within the next few seconds.')); ?>
</a>
</p>
</div>
<?php else: ?>
<div class="error">
<h2><?php p($l->t('Redirect'));?></h2>
<h2><?php p($l->t('Redirect')); ?></h2>
<p><?php p($l->t('The link leads to %s', array($_['urlHost']))); ?></p>
<p><?php print_unescaped($l->t('If you don’t want to visit that page, you can return to <a href="%s">Mail</a>.', array($_['mailURL']))); ?></p>
<p><?php print_unescaped($l->t('If you don’t want to visit that page, you can return to <a href="%s">Mail</a>.',
array($_['mailURL'])));
?></p>

<br/>
<a href="<?php p($_['url']) ?>" class="button" rel="noreferrer" id="redirectLink"><?php p($l->t('Continue to %s', array($_['urlHost']))); ?></a>
<a href="<?php p($_['url']) ?>" class="button" rel="noreferrer" id="redirectLink"><?php p($l->t('Continue to %s',
array($_['urlHost'])));
?></a>
</div>
<?php endif; ?>

0 comments on commit 3599e50

Please sign in to comment.