Skip to content

Commit

Permalink
4607: main menu was lost in article pages when logged off
Browse files Browse the repository at this point in the history
      and caching enabled
  • Loading branch information
following committed Oct 28, 2012
1 parent b298bfc commit d51b908
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions htdocs/articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@
$tpl->cache_id = 'articles|' . $language . '|' . $article;
$tpl->cache_lifetime = 43200;

$tpl->menuitem = sql_value("SELECT `id` FROM `sys_menu` WHERE `href`='&1' LIMIT 1", 0, 'articles.php?page=' . urlencode($article));
if ($tpl->menuitem == 0)
$tpl->redirect('index.php');

if (!$tpl->is_cached())
{
$tpl->menuitem = sql_value("SELECT `id` FROM `sys_menu` WHERE `href`='&1' LIMIT 1", 0, 'articles.php?page=' . urlencode($article));
if ($tpl->menuitem == 0)
$tpl->redirect('index.php');

$tpl->assign('article', $article);
$tpl->assign('language', $language);
Expand Down

0 comments on commit d51b908

Please sign in to comment.