summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-17 19:31:29 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-17 19:31:29 +0200
commit69ee0efc0b355c33ec566cffb36c4b0dc429c338 (patch)
tree50f96da78b34007f47d6de10bdf47f35704d96a8 /settings
parent12818093007d5bdce5519b5015e2a0748c98e24d (diff)
downloadnextcloud-server-69ee0efc0b355c33ec566cffb36c4b0dc429c338.tar.gz
nextcloud-server-69ee0efc0b355c33ec566cffb36c4b0dc429c338.zip
remove the require_once lib base from all (or nearly all) files
Diffstat (limited to 'settings')
-rw-r--r--settings/ajax/changepassword.php2
-rw-r--r--settings/ajax/creategroup.php2
-rw-r--r--settings/ajax/createuser.php2
-rw-r--r--settings/ajax/disableapp.php2
-rw-r--r--settings/ajax/enableapp.php2
-rw-r--r--settings/ajax/getlog.php2
-rw-r--r--settings/ajax/lostpassword.php2
-rw-r--r--settings/ajax/openid.php2
-rw-r--r--settings/ajax/removegroup.php2
-rw-r--r--settings/ajax/removeuser.php2
-rw-r--r--settings/ajax/setlanguage.php2
-rw-r--r--settings/ajax/setloglevel.php2
-rw-r--r--settings/ajax/setquota.php2
-rw-r--r--settings/ajax/togglegroups.php2
14 files changed, 14 insertions, 14 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php
index 860ea987871..0ed3c4919f5 100644
--- a/settings/ajax/changepassword.php
+++ b/settings/ajax/changepassword.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
$username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
$password = $_POST["password"];
diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php
index 57d82e7bd94..faeccf48b58 100644
--- a/settings/ajax/creategroup.php
+++ b/settings/ajax/creategroup.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
// Check if we are a user
if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php
index 1ed53efcf06..e1eb1a78669 100644
--- a/settings/ajax/createuser.php
+++ b/settings/ajax/createuser.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
// Check if we are a user
if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php
index 53e9be379e1..859c293722b 100644
--- a/settings/ajax/disableapp.php
+++ b/settings/ajax/disableapp.php
@@ -1,6 +1,6 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkAdminUser();
OC_JSON::setContentTypeHeader();
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php
index cb116ebe4e8..bebcbcc903f 100644
--- a/settings/ajax/enableapp.php
+++ b/settings/ajax/enableapp.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkAdminUser();
OC_JSON::setContentTypeHeader();
diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php
index ed48b2cae1a..bcb05fdd02b 100644
--- a/settings/ajax/getlog.php
+++ b/settings/ajax/getlog.php
@@ -6,7 +6,7 @@
*/
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkAdminUser();
diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php
index 5874dec9647..4368566992c 100644
--- a/settings/ajax/lostpassword.php
+++ b/settings/ajax/lostpassword.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkLoggedIn();
diff --git a/settings/ajax/openid.php b/settings/ajax/openid.php
index 58d071255c2..712f5b652fe 100644
--- a/settings/ajax/openid.php
+++ b/settings/ajax/openid.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
$l=OC_L10N::get('settings');
diff --git a/settings/ajax/removegroup.php b/settings/ajax/removegroup.php
index 4d364781894..73f86061e3f 100644
--- a/settings/ajax/removegroup.php
+++ b/settings/ajax/removegroup.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkAdminUser();
diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php
index 2c288997a1f..325549ba3b5 100644
--- a/settings/ajax/removeuser.php
+++ b/settings/ajax/removeuser.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkAdminUser();
diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php
index e3b00c3bc80..bcdc3bc1338 100644
--- a/settings/ajax/setlanguage.php
+++ b/settings/ajax/setlanguage.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
$l=OC_L10N::get('settings');
diff --git a/settings/ajax/setloglevel.php b/settings/ajax/setloglevel.php
index 298cbd64738..6383ce3c808 100644
--- a/settings/ajax/setloglevel.php
+++ b/settings/ajax/setloglevel.php
@@ -5,7 +5,7 @@
* See the COPYING-README file.
*/
-require_once('../../lib/base.php');
+
OC_Util::checkAdminUser();
OC_Config::setValue( 'loglevel', $_POST['level'] );
diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php
index f59017600ac..0e2ca31f147 100644
--- a/settings/ajax/setquota.php
+++ b/settings/ajax/setquota.php
@@ -6,7 +6,7 @@
*/
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkAdminUser();
diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php
index 3ee3239dd89..9449261af7c 100644
--- a/settings/ajax/togglegroups.php
+++ b/settings/ajax/togglegroups.php
@@ -1,7 +1,7 @@
<?php
// Init owncloud
-require_once('../../lib/base.php');
+
OC_JSON::checkAdminUser();