[ticket/15372] Fix pagination and don't render viewtopic link

This commit is contained in:
David Colón 2017-09-24 22:07:25 -04:00
parent e55480385b
commit 2ba529e144
2 changed files with 7 additions and 2 deletions

View file

@ -136,6 +136,11 @@ class pagination
*/ */
public function generate_template_pagination($base_url, $block_var_name, $start_name, $num_items, $per_page, $start = 1, $reverse_count = false, $ignore_on_page = false) public function generate_template_pagination($base_url, $block_var_name, $start_name, $num_items, $per_page, $start = 1, $reverse_count = false, $ignore_on_page = false)
{ {
if (empty($base_url))
{
return;
}
$total_pages = ceil($num_items / $per_page); $total_pages = ceil($num_items / $per_page);
$on_page = $this->get_on_page($per_page, $start); $on_page = $this->get_on_page($per_page, $start);
$u_previous_page = $u_next_page = ''; $u_previous_page = $u_next_page = '';

View file

@ -165,7 +165,7 @@
<i class="icon fa-file fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{NEW_POST}</span> <i class="icon fa-file fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{NEW_POST}</span>
</a> </a>
<!-- ENDIF --> <!-- ENDIF -->
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> <!-- IF topicrow.U_VIEW_TOPIC --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- ELSE -->{topicrow.TOPIC_TITLE}<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --> <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}"> <a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{L_TOPIC_UNAPPROVED}</span> <i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{L_TOPIC_UNAPPROVED}</span>
@ -224,7 +224,7 @@
<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd> <dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<dd class="lastpost"> <dd class="lastpost">
<span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} <span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
<!-- IF not S_IS_BOT --> <!-- IF not S_IS_BOT and topicrow.U_LAST_POST -->
<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}"> <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span> <i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
</a> </a>