summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_domains_actions.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2012-01-18 15:22:08 +0100
committerAleksander Machniak <machniak@kolabsys.com>2012-01-18 15:22:08 +0100
commit6a407e558d1c84e95584c704c3e2e5d4dfbdc415 (patch)
tree69bd5860a05e0d08af904177952b6386b69bcc70 /lib/api/kolab_domains_actions.php
parent1c53164f44d9929d7bf43d4b39c928c34bb4dad5 (diff)
downloadwebadmin-6a407e558d1c84e95584c704c3e2e5d4dfbdc415.tar.gz
Users list pagination support
Lists return 'list' and 'count' items CS fixes
Diffstat (limited to 'lib/api/kolab_domains_actions.php')
-rw-r--r--lib/api/kolab_domains_actions.php40
1 files changed, 22 insertions, 18 deletions
diff --git a/lib/api/kolab_domains_actions.php b/lib/api/kolab_domains_actions.php
index 9d9a511..c9694fc 100644
--- a/lib/api/kolab_domains_actions.php
+++ b/lib/api/kolab_domains_actions.php
@@ -1,23 +1,27 @@
<?php
- /**
- *
- */
- class kolab_domains_actions extends kolab_api_service
+/**
+ *
+ */
+class kolab_domains_actions extends kolab_api_service
+{
+ public function capabilities($domain)
{
- public function capabilities($domain)
- {
- return array(
- 'list' => 'r',
-// 'search' => 'r',
- );
- }
-
- public function domains_list($get, $post) {
- $auth = Auth::get_instance();
- $domains = $auth->list_domains();
- return $domains;
- }
+ return array(
+ 'list' => 'r',
+// 'search' => 'r',
+ );
}
-?>
+ public function domains_list($get, $post) {
+ $auth = Auth::get_instance();
+
+ $domains = $auth->list_domains();
+ $count = count($domains);
+
+ return array(
+ 'list' => $domains,
+ 'count' => $count,
+ );
+ }
+}