Skip to content

Commit

Permalink
JRoute false to avoid wrong redirect when SEF off
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmert committed May 23, 2015
1 parent 0c606b9 commit ba1320c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/com_content/views/category/tmpl/default_articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// Create some shortcuts.
$params = &$this->item->params;
$n = count($this->items);
$n = count($this->items);
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));

Expand Down Expand Up @@ -134,12 +134,10 @@
$menu = JFactory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language));
$fullURL = new JUri($link);
$fullURL->setVar('return', base64_encode($returnURL));
$link = new JUri(JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
$link->setVar('return', base64_encode(JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language), false)));
?>
<a href="<?php echo $fullURL; ?>" class="register">
<a href="<?php echo $link; ?>" class="register">
<?php echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE'); ?>
</a>
<?php endif; ?>
Expand Down

0 comments on commit ba1320c

Please sign in to comment.