diff options
author | Cesar G <prototech91@gmail.com> | 2014-02-02 12:53:34 -0800 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-02-03 23:00:34 -0800 |
commit | f22e51c8a16d75449da03cb2d9f3e11573ce6f1d (patch) | |
tree | de1edd0c652820783b1542e89c9866f8307c66f6 | |
parent | 06e995964841743effcda041cf7fa1e34272a208 (diff) | |
download | forums-f22e51c8a16d75449da03cb2d9f3e11573ce6f1d.tar forums-f22e51c8a16d75449da03cb2d9f3e11573ce6f1d.tar.gz forums-f22e51c8a16d75449da03cb2d9f3e11573ce6f1d.tar.bz2 forums-f22e51c8a16d75449da03cb2d9f3e11573ce6f1d.tar.xz forums-f22e51c8a16d75449da03cb2d9f3e11573ce6f1d.zip |
[ticket/12153] Remove vars already assigned in generate_template_pagination().
PHPBB3-12153
-rw-r--r-- | phpBB/adm/style/overall_header.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/simple_header.html | 2 | ||||
-rw-r--r-- | phpBB/phpbb/pagination.php | 13 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/pagination.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/overall_header.html | 2 |
5 files changed, 6 insertions, 15 deletions
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index 04f818f95a..1fc1261489 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -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')}'; diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index 9c4c8a2960..0ca751cd7e 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -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')}'; diff --git a/phpBB/phpbb/pagination.php b/phpBB/phpbb/pagination.php index bd449e653d..c673d66f5a 100644 --- a/phpBB/phpbb/pagination.php +++ b/phpBB/phpbb/pagination.php @@ -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)); } diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html index 172bc952e4..cb54193c3f 100644 --- a/phpBB/styles/prosilver/template/pagination.html +++ b/phpBB/styles/prosilver/template/pagination.html @@ -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 --> diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 9ca989ea8b..5da73bd70d 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -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')}'; |