aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-01-26 17:54:50 -0800
committerCesar G <prototech91@gmail.com>2014-01-26 17:57:16 -0800
commit779868e4f4b08c4cf0bcb117bda80f427f81e781 (patch)
tree7b3ed74dd67e4479b07d8be38be5ad8ec6856dc7 /phpBB/includes/functions_posting.php
parent9b500538e3e5d49c29fc5c28bee5ab0e8c91f084 (diff)
downloadforums-779868e4f4b08c4cf0bcb117bda80f427f81e781.tar
forums-779868e4f4b08c4cf0bcb117bda80f427f81e781.tar.gz
forums-779868e4f4b08c4cf0bcb117bda80f427f81e781.tar.bz2
forums-779868e4f4b08c4cf0bcb117bda80f427f81e781.tar.xz
forums-779868e4f4b08c4cf0bcb117bda80f427f81e781.zip
[ticket/12136] Use new pagination class in generate_smilies().
PHPBB3-12136
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index e14e9e27be..30ffbb55dc 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -21,8 +21,10 @@ if (!defined('IN_PHPBB'))
function generate_smilies($mode, $forum_id)
{
global $db, $user, $config, $template, $phpbb_dispatcher;
- global $phpEx, $phpbb_root_path;
+ global $phpEx, $phpbb_root_path, $phpbb_container;
+ $base_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id);
+ $pagination = $phpbb_container->get('pagination');
$start = request_var('start', 0);
if ($mode == 'window')
@@ -61,7 +63,8 @@ function generate_smilies($mode, $forum_id)
'body' => 'posting_smilies.html')
);
- generate_pagination(append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id), $smiley_count, $config['smilies_per_page'], $start);
+ $start = $pagination->validate_start($start, $config['smilies_per_page'], $smiley_count);
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $smiley_count, $config['smilies_per_page'], $start);
}
$display_link = false;
@@ -139,8 +142,8 @@ function generate_smilies($mode, $forum_id)
{
$template->assign_vars(array(
'S_SHOW_SMILEY_LINK' => true,
- 'U_MORE_SMILIES' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id))
- );
+ 'U_MORE_SMILIES' => $base_url,
+ ));
}
if ($mode == 'window')