diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-09-29 18:08:54 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-02 18:00:23 +0200 |
commit | bb136b9adf021cb154ff05222d3439373312bbc5 (patch) | |
tree | a6fccf936b0a40c7d48d55a23f4897b0332c3192 /settings/ajax | |
parent | 210ea4d9d9a3488918c898beb6d6508c60686ad1 (diff) | |
download | nextcloud-server-bb136b9adf021cb154ff05222d3439373312bbc5.tar.gz nextcloud-server-bb136b9adf021cb154ff05222d3439373312bbc5.zip |
Make the settings ajax calls use the router
Diffstat (limited to 'settings/ajax')
-rw-r--r-- | settings/ajax/apps/ocs.php | 3 | ||||
-rw-r--r-- | settings/ajax/changepassword.php | 2 | ||||
-rw-r--r-- | settings/ajax/creategroup.php | 2 | ||||
-rw-r--r-- | settings/ajax/createuser.php | 2 | ||||
-rw-r--r-- | settings/ajax/disableapp.php | 2 | ||||
-rw-r--r-- | settings/ajax/enableapp.php | 2 | ||||
-rw-r--r-- | settings/ajax/getlog.php | 3 | ||||
-rw-r--r-- | settings/ajax/lostpassword.php | 2 | ||||
-rw-r--r-- | settings/ajax/openid.php | 3 | ||||
-rw-r--r-- | settings/ajax/removegroup.php | 3 | ||||
-rw-r--r-- | settings/ajax/removeuser.php | 3 | ||||
-rw-r--r-- | settings/ajax/setlanguage.php | 3 | ||||
-rw-r--r-- | settings/ajax/setloglevel.php | 1 | ||||
-rw-r--r-- | settings/ajax/setquota.php | 3 | ||||
-rw-r--r-- | settings/ajax/togglegroups.php | 3 | ||||
-rw-r--r-- | settings/ajax/togglesubadmins.php | 5 | ||||
-rw-r--r-- | settings/ajax/userlist.php | 4 |
17 files changed, 2 insertions, 44 deletions
diff --git a/settings/ajax/apps/ocs.php b/settings/ajax/apps/ocs.php index fb78cc89248..4d6f1116e7d 100644 --- a/settings/ajax/apps/ocs.php +++ b/settings/ajax/apps/ocs.php @@ -6,9 +6,6 @@ * See the COPYING-README file. */ -// Init owncloud -require_once '../../../lib/base.php'; - OC_JSON::checkAdminUser(); $l = OC_L10N::get('settings'); diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index b251fea504b..200fdec26de 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -1,7 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; OCP\JSON::callCheck(); $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php index 83733ac4d2d..bb3b0620e8a 100644 --- a/settings/ajax/creategroup.php +++ b/settings/ajax/creategroup.php @@ -1,7 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; OCP\JSON::callCheck(); // Check if we are a user diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php index bdf7e4983ac..49fc0e0f53b 100644 --- a/settings/ajax/createuser.php +++ b/settings/ajax/createuser.php @@ -1,7 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; OCP\JSON::callCheck(); // Check if we are a user diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php index 977a536af21..a39b06b9c7d 100644 --- a/settings/ajax/disableapp.php +++ b/settings/ajax/disableapp.php @@ -1,6 +1,4 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; OC_JSON::checkAdminUser(); OCP\JSON::callCheck(); OC_JSON::setContentTypeHeader(); diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php index c3b3491db93..f4d5c53adef 100644 --- a/settings/ajax/enableapp.php +++ b/settings/ajax/enableapp.php @@ -1,7 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; OC_JSON::checkAdminUser(); OCP\JSON::callCheck(); OC_JSON::setContentTypeHeader(); diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php index 9b9240f8253..22128ef57b5 100644 --- a/settings/ajax/getlog.php +++ b/settings/ajax/getlog.php @@ -5,9 +5,6 @@ * See the COPYING-README file. */ -// Init owncloud -require_once '../../lib/base.php'; - OC_JSON::checkAdminUser(); $count=(isset($_GET['count']))?$_GET['count']:50; diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php index 2a40ba09a8a..b5f47bbceab 100644 --- a/settings/ajax/lostpassword.php +++ b/settings/ajax/lostpassword.php @@ -1,7 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; OC_JSON::checkLoggedIn(); OCP\JSON::callCheck(); diff --git a/settings/ajax/openid.php b/settings/ajax/openid.php index ecec085383c..23c43c3c48e 100644 --- a/settings/ajax/openid.php +++ b/settings/ajax/openid.php @@ -1,8 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; - $l=OC_L10N::get('settings'); OC_JSON::checkLoggedIn(); diff --git a/settings/ajax/removegroup.php b/settings/ajax/removegroup.php index 33e1a514c88..798d7916e61 100644 --- a/settings/ajax/removegroup.php +++ b/settings/ajax/removegroup.php @@ -1,8 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; - OC_JSON::checkAdminUser(); OCP\JSON::callCheck(); diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php index 6b11fa5c4fb..a10dc29321d 100644 --- a/settings/ajax/removeuser.php +++ b/settings/ajax/removeuser.php @@ -1,8 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; - OC_JSON::checkSubAdminUser(); OCP\JSON::callCheck(); diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index 42eea7a96fd..aebb1b31b6f 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -1,8 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; - $l=OC_L10N::get('settings'); OC_JSON::checkLoggedIn(); diff --git a/settings/ajax/setloglevel.php b/settings/ajax/setloglevel.php index 982899e106a..542219f86c6 100644 --- a/settings/ajax/setloglevel.php +++ b/settings/ajax/setloglevel.php @@ -5,7 +5,6 @@ * See the COPYING-README file. */ -require_once '../../lib/base.php'; OC_Util::checkAdminUser(); OCP\JSON::callCheck(); diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php index 2352ae9e427..4b32585b306 100644 --- a/settings/ajax/setquota.php +++ b/settings/ajax/setquota.php @@ -5,9 +5,6 @@ * See the COPYING-README file. */ -// Init owncloud -require_once '../../lib/base.php'; - OC_JSON::checkSubAdminUser(); OCP\JSON::callCheck(); diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php index 65747968c17..de941f99132 100644 --- a/settings/ajax/togglegroups.php +++ b/settings/ajax/togglegroups.php @@ -1,8 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; - OC_JSON::checkSubAdminUser(); OCP\JSON::callCheck(); diff --git a/settings/ajax/togglesubadmins.php b/settings/ajax/togglesubadmins.php index 5f7126dca34..7aaa90aad5f 100644 --- a/settings/ajax/togglesubadmins.php +++ b/settings/ajax/togglesubadmins.php @@ -1,8 +1,5 @@ <?php -// Init owncloud -require_once '../../lib/base.php'; - OC_JSON::checkAdminUser(); OCP\JSON::callCheck(); @@ -16,4 +13,4 @@ if(OC_SubAdmin::isSubAdminofGroup($username, $group)) { OC_SubAdmin::createSubAdmin($username, $group); } -OC_JSON::success();
\ No newline at end of file +OC_JSON::success(); diff --git a/settings/ajax/userlist.php b/settings/ajax/userlist.php index 840b6d72dc7..61b1a388fc3 100644 --- a/settings/ajax/userlist.php +++ b/settings/ajax/userlist.php @@ -20,8 +20,6 @@ * */ -require_once '../../lib/base.php'; - OC_JSON::callCheck(); OC_JSON::checkSubAdminUser(); if (isset($_GET['offset'])) { @@ -49,4 +47,4 @@ if (OC_Group::inGroup(OC_User::getUser(), 'admin')) { 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default')); } } -OC_JSON::success(array('data' => $users));
\ No newline at end of file +OC_JSON::success(array('data' => $users)); |