Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
f320b394
Commit
f320b394
authored
Oct 15, 2009
by
Nigel McNie
Browse files
Fix up mahara_pagelinks plugin so admin user search pagination works.
Signed-off-by:
Nigel McNie
<
nigel@catalyst.net.nz
>
parent
3204dbfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/dwoo/mahara/plugins/function.mahara_pagelinks.php
View file @
f320b394
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Creates pagination links for a table
* Dwoo {mahara_pagelinks} function pluging
*
* appends an 'offset=n' parameter to the url to get the url for a different page
* @param integer $limit number of items per page
* @param integer $offset offset of first data item on this page
* @param integer $count total number of items
* @param string $url where to get results from
* @param string $assign the template var to assign the result to
* @return string
*
* THIS IS DEPRECATED. The build_pagelinks function in lib/mahara.php should be
* used instead.
* One place this is being used is the admin user search. Hopefully that can be
* converted away soon.
* THIS IS DEPRECATED. Pagination is done differently almost everywhere else
* (e.g. find friends). One place this is being used is the admin user search.
* Hopefully that can be converted away soon.
*/
function
smarty_function_mahara_pagelinks
(
$params
,
&
$smarty
)
{
function
Dwoo_Plugin_mahara_pagelinks
(
Dwoo
$dwoo
,
$offset
,
$limit
,
$count
,
$url
,
$assign
=
''
)
{
$params
=
array
(
'offset'
=>
$offset
,
'limit'
=>
$limit
,
'count'
=>
$count
,
'url'
=>
$url
,
'assign'
=>
$assign
,
);
$id
=
substr
(
md5
(
microtime
()),
0
,
4
);
$output
=
'<div class="pagination" id="'
.
$id
.
'">'
;
...
...
@@ -111,7 +113,7 @@ EOF;
$output
.
=
'</div>'
;
if
(
!
empty
(
$params
[
'assign'
]))
{
$
smarty
->
assign
(
$params
[
'assign'
]
,
$output
);
$
dwoo
->
assign
InScope
(
$output
,
$params
[
'assign'
]);
return
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment