aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/SemanticScuttle/functions.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/SemanticScuttle/functions.php b/src/SemanticScuttle/functions.php
index d21a094..15db022 100644
--- a/src/SemanticScuttle/functions.php
+++ b/src/SemanticScuttle/functions.php
@@ -35,10 +35,23 @@ function filter($data, $type = NULL) {
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;
- if(isset($defaultPerPageForAdmins) && $userObject != null && $userObject->isAdmin()) {
+ if (isset($defaultPerPageForAdmins)
+ && $userObject != null && $userObject->isAdmin()
+ ) {
return $defaultPerPageForAdmins;
} else {
return $defaultPerPage;