aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-16 02:31:21 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-16 02:31:21 +0000
commit6c366e6a8306f43fefb6a0bccfb010aad61a3c3d (patch)
treecbdbfa5cebecd096b79f1c5e65b9b63c8942db80 /mod
parent0039bd344c40890a191279083bc3335e05274509 (diff)
downloadelgg-6c366e6a8306f43fefb6a0bccfb010aad61a3c3d.tar.gz
elgg-6c366e6a8306f43fefb6a0bccfb010aad61a3c3d.tar.bz2
ported the portion of the [7027] commit that dealt with pagination to trunk
git-svn-id: http://code.elgg.org/elgg/trunk@7328 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/uservalidationbyemail/views/default/admin/users/unvalidated.php25
1 files changed, 21 insertions, 4 deletions
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
index 0a274c1dc..279c7387f 100644
--- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
+++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
@@ -6,22 +6,39 @@
* @subpackage UserValidationByEmail.Administration
*/
-// @todo pagination would be nice.
+$limit = get_input('limit', 10);
+$offset = get_input('offset', 0);
+
// can't use elgg_list_entities() and friends because we don't use the default view for users.
$ia = elgg_set_ignore_access(TRUE);
$hidden_entities = access_get_show_hidden_status();
access_show_hidden_entities(TRUE);
-$users = elgg_get_entities_from_metadata(array(
+$options = array(
'type' => 'user',
'metadata_name' => 'validated',
'metadata_value' => 0,
- 'limit' => 9999,
-));
+ 'limit' => $limit,
+ 'offset' => $offset
+);
+$users = elgg_get_entities_from_metadata($options);
+
+$options['count'] = TRUE;
+$count = elgg_get_entities_from_metadata($options);
access_show_hidden_entities($hidden_entities);
elgg_set_ignore_access($ia);
+// setup pagination
+$pagination = elgg_view('navigation/pagination', array(
+ 'baseurl' => $vars['url'] . 'pg/admin/users/unvalidated',
+ 'offset' => $offset,
+ 'count' => $count,
+ 'limit' => $limit,
+));
+
+echo $pagination;
+
if ($users) {
foreach ($users as $user) {
$form_body .= elgg_view('uservalidationbyemail/unvalidated_user', array('theuser' => $user));