working navigation for tag history

This commit is contained in:
Shish 2012-03-09 15:55:17 +00:00
parent 461bd6bf61
commit dc6c85975b
2 changed files with 3 additions and 5 deletions

View File

@ -67,7 +67,7 @@ class Tag_History extends Extension {
}
}
else if($event->page_matches("tag_history/all")) {
$page_id = int_escape($event->get_arg(1));
$page_id = int_escape($event->get_arg(0));
$this->theme->display_global_page($page, $this->get_global_tag_history($page_id), $page_id);
}
else if($event->page_matches("tag_history") && $event->count_args() == 1) {

View File

@ -86,15 +86,13 @@ class Tag_HistoryTheme extends Themelet {
$history_html = $start_string . $history_list . $end_string;
$page->set_title("Global Tag History");
$page->set_heading("Global Tag History");
$page->add_block(new NavBlock());
$page->add_block(new Block("Tag History", $history_html, "main", 10));
$h_prev = ($page_number <= 1) ? "Prev" :
'<a href="'.make_link('comment/list/'.$prev).'">Prev</a>';
'<a href="'.make_link('tag_history/all/'.($page_number-1)).'">Prev</a>';
$h_index = "<a href='".make_link()."'>Index</a>";
$h_next = ($page_number >= $total_pages) ? "Next" :
'<a href="'.make_link('comment/list/'.$next).'">Next</a>';
$h_next = '<a href="'.make_link('tag_history/all/'.($page_number+1)).'">Next</a>';
$nav = $h_prev.' | '.$h_index.' | '.$h_next;
$page->add_block(new Block("Navigation", $nav, "left"));