mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-21 16:22:22 +02:00
[ticket/12153] Remove vars already assigned in generate_template_pagination().
PHPBB3-12153
This commit is contained in:
parent
06e9959648
commit
f22e51c8a1
@ -11,7 +11,7 @@
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
|
||||
var on_page = '{ON_PAGE}';
|
||||
var on_page = '{CURRENT_PAGE}';
|
||||
var per_page = '{PER_PAGE}';
|
||||
var base_url = '{BASE_URL|e('js')}';
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
|
||||
var on_page = '{ON_PAGE}';
|
||||
var on_page = '{CURRENT_PAGE}';
|
||||
var per_page = '{PER_PAGE}';
|
||||
var base_url = '{BASE_URL|e('js')}';
|
||||
|
||||
|
@ -201,7 +201,7 @@ class pagination
|
||||
'U_' . $tpl_prefix . 'NEXT_PAGE' => ($on_page != $total_pages) ? $u_next_page : '',
|
||||
$tpl_prefix . 'TOTAL_PAGES' => $total_pages,
|
||||
$tpl_prefix . 'CURRENT_PAGE' => $on_page,
|
||||
$tpl_prefix . 'PAGE_NUMBER' => $this->on_page($base_url, $num_items, $per_page, $start),
|
||||
$tpl_prefix . 'PAGE_NUMBER' => $this->on_page($num_items, $per_page, $start),
|
||||
);
|
||||
|
||||
if ($tpl_block_name)
|
||||
@ -228,24 +228,15 @@ class pagination
|
||||
|
||||
/**
|
||||
* Return current page
|
||||
* This function also sets certain specific template variables
|
||||
*
|
||||
* @param string $base_url the base url used to call this page, used by Javascript for popup jump to page
|
||||
* @param int $num_items the total number of items, posts, topics, etc.
|
||||
* @param int $per_page the number of items, posts, etc. per page
|
||||
* @param int $start the item which should be considered currently active, used to determine the page we're on
|
||||
* @return string Descriptive pagination string (e.g. "page 1 of 10")
|
||||
*/
|
||||
public function on_page($base_url, $num_items, $per_page, $start)
|
||||
public function on_page($num_items, $per_page, $start)
|
||||
{
|
||||
$on_page = $this->get_on_page($per_page, $start);
|
||||
|
||||
$this->template->assign_vars(array(
|
||||
'PER_PAGE' => $per_page,
|
||||
'ON_PAGE' => $on_page,
|
||||
'BASE_URL' => $base_url,
|
||||
));
|
||||
|
||||
return $this->user->lang('PAGE_OF', $on_page, max(ceil($num_items / $per_page), 1));
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<a href="#" class="pagination-trigger" title="{L_JUMP_TO_PAGE}" data-lang-jump-page="{L_JUMP_PAGE|e('html_attr')}{L_COLON}" data-on-page="{ON_PAGE}" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}">{PAGE_NUMBER}</a> •
|
||||
<a href="#" class="pagination-trigger" title="{L_JUMP_TO_PAGE}" data-lang-jump-page="{L_JUMP_PAGE|e('html_attr')}{L_COLON}" data-on-page="{CURRENT_PAGE}" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}">{PAGE_NUMBER}</a> •
|
||||
<ul>
|
||||
<!-- BEGIN pagination -->
|
||||
<!-- IF pagination.S_IS_PREV -->
|
||||
|
@ -36,7 +36,7 @@ function popup(url, width, height, name)
|
||||
|
||||
function jumpto()
|
||||
{
|
||||
var page = prompt('{LA_JUMP_PAGE}{L_COLON}', '{ON_PAGE}');
|
||||
var page = prompt('{LA_JUMP_PAGE}{L_COLON}', '{CURRENT_PAGE}');
|
||||
var per_page = '{PER_PAGE}';
|
||||
var base_url = '{BASE_URL|e('js')}';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user