aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-27 20:16:32 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-27 20:16:32 +0000
commit12cc8a53fcdde13d0f5b3f2bf8f9f5c805dc73e5 (patch)
treead93c29a47dce09ddd76e801a7100c845ebc32d9 /mod
parenta80528a2367705b257e44f3133286ddccbf626a8 (diff)
downloadelgg-12cc8a53fcdde13d0f5b3f2bf8f9f5c805dc73e5.tar.gz
elgg-12cc8a53fcdde13d0f5b3f2bf8f9f5c805dc73e5.tar.bz2
Fixed typo in blog sidebar menu that caused an extra LI item in archives.
git-svn-id: http://code.elgg.org/elgg/trunk@6259 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/views/default/blog/sidebar_menu.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/mod/blog/views/default/blog/sidebar_menu.php b/mod/blog/views/default/blog/sidebar_menu.php
index ecd232c52..7c8b91fbc 100644
--- a/mod/blog/views/default/blog/sidebar_menu.php
+++ b/mod/blog/views/default/blog/sidebar_menu.php
@@ -35,27 +35,27 @@ echo elgg_view("blogs/sidebar", array("object_type" => 'blog'));
$comments = get_annotations(0, "object", "blog", "generic_comment", "", 0, 4, 0, "desc");
echo elgg_view('annotation/latest_comments', array('comments' => $comments));
-
// only show archives for users or groups.
// This is a limitation of the URL schema.
if ($page_owner) {
$dates = blog_get_blog_months($user);
if ($dates) {
- echo "<h3>".elgg_echo('blog:archives')."</h3>";
-
+ echo "<h3>" . elgg_echo('blog:archives') . "</h3>";
echo '<ul>';
foreach($dates as $date) {
$date = $date->yearmonth;
- $timestamplow = mktime(0,0,0,substr($date,4,2),1,substr($date,0,4));
- $timestamphigh = mktime(0,0,0,((int) substr($date,4,2)) + 1,1,substr($date,0,4));
+ $timestamplow = mktime(0, 0, 0, substr($date,4,2) , 1, substr($date, 0, 4));
+ $timestamphigh = mktime(0, 0, 0, ((int) substr($date, 4, 2)) + 1, 1, substr($date, 0, 4));
+
+ if (!isset($page_owner)) {
+ $page_owner = page_owner_entity();
+ }
- if (!isset($page_owner)) $page_owner = page_owner_entity();
$link = $CONFIG->wwwroot . 'pg/blog/' . $page_owner->username . '/archive/' . $timestamplow . '/' . $timestamphigh;
- //add_submenu_item(sprintf(elgg_echo('date:month:' . substr($date,4,2)), substr($date, 0, 4)), $link, 'filter');
$month = sprintf(elgg_echo('date:month:' . substr($date,4,2)), substr($date, 0, 4));
- echo "<li><a href=\"$link\" title=\"$month\">$month</a><li>";
+ echo "<li><a href=\"$link\" title=\"$month\">$month</a></li>";
}
echo '</ul>';
@@ -64,4 +64,3 @@ if ($page_owner) {
// tag-cloud display
echo display_tagcloud(0, 50, 'tags');
-?> \ No newline at end of file