Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX: Got rid of link to post new entry in the front end on a BlogT…

…ree (method does not exist on BlogTree).

Thanks smurkas (#4692)
  • Loading branch information...
commit 9cfd303ecf61fa334670b0973afcfa32257c56f6 1 parent d75c402
@cbarberis cbarberis authored
View
2  code/widgets/BlogManagementWidget.php
@@ -60,7 +60,7 @@ function WidgetHolder() {
function PostLink() {
$container = BlogTree::current();
- if ($container) return $container->Link('post');
+ return ($container && $container->ClassName != "BlogTree") ? $container->Link('post') : false;
}
}
?>
View
2  templates/BlogManagementWidget.ss
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.