summaryrefslogtreecommitdiffstats
path: root/lib/ocs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ocs')
-rw-r--r--lib/ocs/cloud.php14
-rw-r--r--lib/ocs/config.php4
-rw-r--r--lib/ocs/person.php2
-rw-r--r--lib/ocs/privatedata.php4
-rw-r--r--lib/ocs/result.php14
5 files changed, 19 insertions, 19 deletions
diff --git a/lib/ocs/cloud.php b/lib/ocs/cloud.php
index 21095ec91e9..2d18b1db3f2 100644
--- a/lib/ocs/cloud.php
+++ b/lib/ocs/cloud.php
@@ -24,7 +24,7 @@
class OC_OCS_Cloud {
- public static function getSystemWebApps($parameters) {
+ public static function getSystemWebApps() {
OC_Util::checkLoggedIn();
$apps = OC_App::getEnabledApps();
$values = array();
@@ -37,15 +37,15 @@ class OC_OCS_Cloud {
}
return new OC_OCS_Result($values);
}
-
+
public static function getUserQuota($parameters) {
$user = OC_User::getUser();
- if(OC_Group::inGroup($user, 'admin') or ($user==$parameters['user'])) {
+ if(OC_User::isAdminUser($user) or ($user==$parameters['user'])) {
if(OC_User::userExists($parameters['user'])) {
// calculate the disc space
$userDir = '/'.$parameters['user'].'/files';
- OC_Filesystem::init($useDir);
+ OC_Filesystem::init($userDir);
$rootInfo = OC_FileCache::get('');
$sharedInfo = OC_FileCache::get('/Shared');
$used = $rootInfo['size'] - $sharedInfo['size'];
@@ -68,7 +68,7 @@ class OC_OCS_Cloud {
return new OC_OCS_Result(null, 300);
}
}
-
+
public static function getUserPublickey($parameters) {
if(OC_User::userExists($parameters['user'])) {
@@ -79,10 +79,10 @@ class OC_OCS_Cloud {
return new OC_OCS_Result(null, 300);
}
}
-
+
public static function getUserPrivatekey($parameters) {
$user = OC_User::getUser();
- if(OC_Group::inGroup($user, 'admin') or ($user==$parameters['user'])) {
+ if(OC_User::isAdminUser($user) or ($user==$parameters['user'])) {
if(OC_User::userExists($user)) {
// calculate the disc space
diff --git a/lib/ocs/config.php b/lib/ocs/config.php
index 03c54aa2314..f19121f4b2b 100644
--- a/lib/ocs/config.php
+++ b/lib/ocs/config.php
@@ -23,7 +23,7 @@
*/
class OC_OCS_Config {
-
+
public static function apiConfig($parameters) {
$xml['version'] = '1.7';
$xml['website'] = 'ownCloud';
@@ -32,5 +32,5 @@ class OC_OCS_Config {
$xml['ssl'] = 'false';
return new OC_OCS_Result($xml);
}
-
+
}
diff --git a/lib/ocs/person.php b/lib/ocs/person.php
index 169cc8211db..1c8210d0825 100644
--- a/lib/ocs/person.php
+++ b/lib/ocs/person.php
@@ -38,5 +38,5 @@ class OC_OCS_Person {
return new OC_OCS_Result(null, 101);
}
}
-
+
}
diff --git a/lib/ocs/privatedata.php b/lib/ocs/privatedata.php
index e01ed5e8b07..311b24269dd 100644
--- a/lib/ocs/privatedata.php
+++ b/lib/ocs/privatedata.php
@@ -39,7 +39,7 @@ class OC_OCS_Privatedata {
return new OC_OCS_Result($xml);
//TODO: replace 'privatedata' with 'attribute' once a new libattice has been released that works with it
}
-
+
public static function set($parameters) {
OC_Util::checkLoggedIn();
$user = OC_User::getUser();
@@ -50,7 +50,7 @@ class OC_OCS_Privatedata {
return new OC_OCS_Result(null, 100);
}
}
-
+
public static function delete($parameters) {
OC_Util::checkLoggedIn();
$user = OC_User::getUser();
diff --git a/lib/ocs/result.php b/lib/ocs/result.php
index b08d911f785..65b2067fc3f 100644
--- a/lib/ocs/result.php
+++ b/lib/ocs/result.php
@@ -21,9 +21,9 @@
*/
class OC_OCS_Result{
-
+
private $data, $message, $statusCode, $items, $perPage;
-
+
/**
* create the OCS_Result object
* @param $data mixed the data to return
@@ -33,7 +33,7 @@ class OC_OCS_Result{
$this->statusCode = $code;
$this->message = $message;
}
-
+
/**
* optionally set the total number of items available
* @param $items int
@@ -41,7 +41,7 @@ class OC_OCS_Result{
public function setTotalItems(int $items) {
$this->items = $items;
}
-
+
/**
* optionally set the the number of items per page
* @param $items int
@@ -49,7 +49,7 @@ class OC_OCS_Result{
public function setItemsPerPage(int $items) {
$this->perPage = $items;
}
-
+
/**
* returns the data associated with the api result
* @return array
@@ -70,6 +70,6 @@ class OC_OCS_Result{
// Return the result data.
return $return;
}
-
-
+
+
} \ No newline at end of file