git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@673 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2010-02-20 11:26:16 +00:00
parent edfd04698a
commit ab75c7ff44

View File

@ -35,10 +35,23 @@ function filter($data, $type = NULL) {
return $data; return $data;
} }
function getPerPageCount($userObject = null) { /**
* Returns the number of bookmarks that shall be displayed on one page.
*
* @param SemanticScuttle_Model_User $userObject Object of the current user
*
* @return integer Number of bookmarks per page
*
* @uses $defaultPerPage
* @uses $defaultPerPageForAdmins
*/
function getPerPageCount($userObject = null)
{
global $defaultPerPage, $defaultPerPageForAdmins; global $defaultPerPage, $defaultPerPageForAdmins;
if(isset($defaultPerPageForAdmins) && $userObject != null && $userObject->isAdmin()) { if (isset($defaultPerPageForAdmins)
&& $userObject != null && $userObject->isAdmin()
) {
return $defaultPerPageForAdmins; return $defaultPerPageForAdmins;
} else { } else {
return $defaultPerPage; return $defaultPerPage;