aboutsummaryrefslogtreecommitdiff
path: root/mod/blog
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-02-13 20:04:34 +0100
committerSem <sembrestels@riseup.net>2013-02-13 20:04:34 +0100
commit70da30e4f768043f6d0c273e74c7c9a2136519a5 (patch)
treecda75a146bb39cce8d451ce642b4630fdbdefe97 /mod/blog
parent9ae3522b674a311e963b07513e4eee3c4729d2cd (diff)
parent6f919fa562fe6d1aab9784b86e5b59b562e23a43 (diff)
downloadelgg-70da30e4f768043f6d0c273e74c7c9a2136519a5.tar.gz
elgg-70da30e4f768043f6d0c273e74c7c9a2136519a5.tar.bz2
Merge branch 'blog-sidebar' of git://github.com/sembrestels/Elgg into foxglove-2
Diffstat (limited to 'mod/blog')
-rw-r--r--mod/blog/views/default/blog/sidebar/archives.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/blog/views/default/blog/sidebar/archives.php b/mod/blog/views/default/blog/sidebar/archives.php
index 3d8f28ca4..030261094 100644
--- a/mod/blog/views/default/blog/sidebar/archives.php
+++ b/mod/blog/views/default/blog/sidebar/archives.php
@@ -3,9 +3,12 @@
* Blog archives
*/
-$loggedin_user = elgg_get_logged_in_user_entity();
$page_owner = elgg_get_page_owner_entity();
+if (!$page_owner) {
+ return true;
+}
+
if (elgg_instanceof($page_owner, 'user')) {
$url_segment = 'blog/archive/' . $page_owner->username;
} else {
@@ -15,7 +18,7 @@ if (elgg_instanceof($page_owner, 'user')) {
// This is a limitation of the URL schema.
if ($page_owner && $vars['page'] != 'friends') {
$dates = get_entity_dates('object', 'blog', $page_owner->getGUID());
-
+
if ($dates) {
$title = elgg_echo('blog:archives');
$content = '<ul class="blog-archives">';
@@ -31,4 +34,4 @@ if ($page_owner && $vars['page'] != 'friends') {
echo elgg_view_module('aside', $title, $content);
}
-} \ No newline at end of file
+}