aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_icons.php
diff options
context:
space:
mode:
authorMarek A. R <aptx@phpbb.com>2009-07-16 17:57:05 +0000
committerMarek A. R <aptx@phpbb.com>2009-07-16 17:57:05 +0000
commita7776919945450eb2c0a37af30b35695f93fae51 (patch)
tree5c9e13a93cf8c2f8313136f8a7a2302b521b5f14 /phpBB/includes/acp/acp_icons.php
parent7a5db8b55d163ae4b0b0bd433362dbbe8cbbfdf4 (diff)
downloadforums-a7776919945450eb2c0a37af30b35695f93fae51.tar
forums-a7776919945450eb2c0a37af30b35695f93fae51.tar.gz
forums-a7776919945450eb2c0a37af30b35695f93fae51.tar.bz2
forums-a7776919945450eb2c0a37af30b35695f93fae51.tar.xz
forums-a7776919945450eb2c0a37af30b35695f93fae51.zip
- Add pagination for icons and smilies in the ACP and smilies in the smiley popup
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9763 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_icons.php')
-rw-r--r--phpBB/includes/acp/acp_icons.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index a88090cb25..cd26d46044 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -173,7 +173,7 @@ class acp_icons
FROM $table
ORDER BY {$fields}_order " . (($icon_id || $action == 'add') ? 'DESC' : 'ASC');
$result = $db->sql_query($sql);
-
+
$data = array();
$after = false;
$display = 0;
@@ -835,12 +835,20 @@ class acp_icons
);
$spacer = false;
+
+ $sql = "SELECT COUNT(*) AS count
+ FROM $table";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ $item_count = $row['count'];
$sql = "SELECT *
FROM $table
ORDER BY {$fields}_order ASC";
- $result = $db->sql_query($sql);
+ $result = $db->sql_query_limit($sql, $config['smilies_per_page'], request_var('start', 0));
+ $pagination_start = request_var('start', 0);
while ($row = $db->sql_fetchrow($result))
{
$alt_text = ($mode == 'smilies') ? $row['code'] : '';
@@ -855,9 +863,9 @@ class acp_icons
'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row[$fields . '_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row[$fields . '_id'],
- 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row[$fields . '_id'],
- 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'])
- );
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start,
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start,
+ ));
if (!$spacer && !$row['display_on_posting'])
{
@@ -865,6 +873,8 @@ class acp_icons
}
}
$db->sql_freeresult($result);
+ $template->assign_var('PAGINATION', generate_pagination(
+ $this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true));
}
}