BUGFIX: Got rid of link to post new entry in the front end on a BlogTree (method does not exist on BlogTree).

Thanks smurkas (#4692)
This commit is contained in:
Carlos Barberis 2010-07-01 21:49:58 +00:00
parent d75c402999
commit 9cfd303ecf
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ class BlogManagementWidget_Controller extends Widget_Controller {
function PostLink() {
$container = BlogTree::current();
if ($container) return $container->Link('post');
return ($container && $container->ClassName != "BlogTree") ? $container->Link('post') : false;
}
}
?>

View File

@ -1,5 +1,5 @@
<ul>
<li><a href="$PostLink"><% _t('POSTNEW', 'Post a new blog entry') %></a></li>
<% if PostLink %><li><a href="$PostLink"><% _t('POSTNEW', 'Post a new blog entry') %></a></li><% end_if %>
<% if CommentLink %><li><a href="$CommentLink">$CommentText</a></li><% end_if %>
<li><a href="Security/logout"><% _t('LOGOUT', 'Logout') %></a></li>
</ul>