summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-07-11 10:50:18 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-07-11 10:50:18 +0200
commit0cb9f5e159b1588550830dda4b21010a0412bae9 (patch)
tree71c8e122976fcb18526b40ab09cd0861c47ed26f /settings
parentd0b625352cc8acc160e22cb2f4e9ae8e10f753f6 (diff)
parent0f0aa1827f446ca531732bb1c807c244ef66676a (diff)
downloadnextcloud-server-0cb9f5e159b1588550830dda4b21010a0412bae9.tar.gz
nextcloud-server-0cb9f5e159b1588550830dda4b21010a0412bae9.zip
fix merge conflicts
Diffstat (limited to 'settings')
-rw-r--r--settings/ajax/changepassword.php4
-rw-r--r--settings/ajax/creategroup.php4
-rw-r--r--settings/ajax/createuser.php3
-rw-r--r--settings/ajax/disableapp.php1
-rw-r--r--settings/ajax/enableapp.php1
-rw-r--r--settings/ajax/lostpassword.php4
-rw-r--r--settings/ajax/openid.php3
-rw-r--r--settings/ajax/removegroup.php3
-rw-r--r--settings/ajax/removeuser.php3
-rw-r--r--settings/ajax/setlanguage.php3
-rw-r--r--settings/ajax/setloglevel.php1
-rw-r--r--settings/ajax/setquota.php2
-rw-r--r--settings/ajax/togglegroups.php3
-rw-r--r--settings/apps.php2
-rw-r--r--settings/help.php2
-rw-r--r--settings/personal.php4
-rw-r--r--settings/users.php2
17 files changed, 17 insertions, 28 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php
index 860ea987871..4ba6813517b 100644
--- a/settings/ajax/changepassword.php
+++ b/settings/ajax/changepassword.php
@@ -9,6 +9,8 @@ $oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:'';
// Check if we are a user
OC_JSON::checkLoggedIn();
+OCP\JSON::callCheck();
+
if( (!OC_Group::inGroup( OC_User::getUser(), 'admin' ) && ($username!=OC_User::getUser() || !OC_User::checkPassword($username,$oldPassword)))) {
OC_JSON::error( array( "data" => array( "message" => "Authentication error" )));
exit();
@@ -21,5 +23,3 @@ if( OC_User::setPassword( $username, $password )){
else{
OC_JSON::error(array("data" => array( "message" => "Unable to change password" )));
}
-
-?>
diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php
index 57d82e7bd94..af8ad3dd8c0 100644
--- a/settings/ajax/creategroup.php
+++ b/settings/ajax/creategroup.php
@@ -9,6 +9,8 @@ if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' ))
exit();
}
+OCP\JSON::callCheck();
+
$groupname = $_POST["groupname"];
// Does the group exist?
@@ -24,5 +26,3 @@ if( OC_Group::createGroup( $groupname )){
else{
OC_JSON::error(array("data" => array( "message" => "Unable to add group" )));
}
-
-?>
diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php
index 6714711bc87..c56df4bc15a 100644
--- a/settings/ajax/createuser.php
+++ b/settings/ajax/createuser.php
@@ -8,6 +8,7 @@ if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' ))
OC_JSON::error(array("data" => array( "message" => "Authentication error" )));
exit();
}
+OCP\JSON::callCheck();
$groups = array();
if( isset( $_POST["groups"] )){
@@ -35,5 +36,3 @@ try {
} catch (Exception $exception) {
OC_JSON::error(array("data" => array( "message" => $exception->getMessage())));
}
-
-?>
diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php
index 53e9be379e1..cc006988707 100644
--- a/settings/ajax/disableapp.php
+++ b/settings/ajax/disableapp.php
@@ -2,6 +2,7 @@
// Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
+OCP\JSON::callCheck();
OC_JSON::setContentTypeHeader();
OC_App::disable($_POST['appid']);
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php
index cb116ebe4e8..bd53a50210c 100644
--- a/settings/ajax/enableapp.php
+++ b/settings/ajax/enableapp.php
@@ -3,6 +3,7 @@
// Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
+OCP\JSON::callCheck();
OC_JSON::setContentTypeHeader();
if(OC_App::enable($_POST['appid'])){
diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php
index c6df8551f52..803a424854c 100644
--- a/settings/ajax/lostpassword.php
+++ b/settings/ajax/lostpassword.php
@@ -2,8 +2,8 @@
// Init owncloud
require_once('../../lib/base.php');
-
OC_JSON::checkLoggedIn();
+OCP\JSON::callCheck();
$l=OC_L10N::get('core');
@@ -15,5 +15,3 @@ if( isset( $_POST['email'] ) && filter_var( $_POST['email'], FILTER_VALIDATE_EMA
}else{
OC_JSON::error(array("data" => array( "message" => $l->t("Invalid email") )));
}
-
-?>
diff --git a/settings/ajax/openid.php b/settings/ajax/openid.php
index 58d071255c2..bf4ead06020 100644
--- a/settings/ajax/openid.php
+++ b/settings/ajax/openid.php
@@ -6,6 +6,7 @@ require_once('../../lib/base.php');
$l=OC_L10N::get('settings');
OC_JSON::checkLoggedIn();
+OCP\JSON::callCheck();
OC_JSON::checkAppEnabled('user_openid');
// Get data
@@ -16,5 +17,3 @@ if( isset( $_POST['identity'] ) ){
}else{
OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
}
-
-?>
diff --git a/settings/ajax/removegroup.php b/settings/ajax/removegroup.php
index 4d364781894..f8c2065956c 100644
--- a/settings/ajax/removegroup.php
+++ b/settings/ajax/removegroup.php
@@ -4,6 +4,7 @@
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
+OCP\JSON::callCheck();
$name = $_POST["groupname"];
@@ -14,5 +15,3 @@ if( OC_Group::deleteGroup( $name )){
else{
OC_JSON::error(array("data" => array( "message" => "Unable to delete group" )));
}
-
-?>
diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php
index 2c288997a1f..230815217c3 100644
--- a/settings/ajax/removeuser.php
+++ b/settings/ajax/removeuser.php
@@ -4,6 +4,7 @@
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
+OCP\JSON::callCheck();
$username = $_POST["username"];
@@ -14,5 +15,3 @@ if( OC_User::deleteUser( $username )){
else{
OC_JSON::error(array("data" => array( "message" => "Unable to delete user" )));
}
-
-?>
diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php
index e3b00c3bc80..54b103cd4fe 100644
--- a/settings/ajax/setlanguage.php
+++ b/settings/ajax/setlanguage.php
@@ -6,6 +6,7 @@ require_once('../../lib/base.php');
$l=OC_L10N::get('settings');
OC_JSON::checkLoggedIn();
+OCP\JSON::callCheck();
// Get data
@@ -21,5 +22,3 @@ if( isset( $_POST['lang'] ) ){
}else{
OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
}
-
-?>
diff --git a/settings/ajax/setloglevel.php b/settings/ajax/setloglevel.php
index 298cbd64738..4b97ba2aa32 100644
--- a/settings/ajax/setloglevel.php
+++ b/settings/ajax/setloglevel.php
@@ -7,6 +7,7 @@
require_once('../../lib/base.php');
OC_Util::checkAdminUser();
+OCP\JSON::callCheck();
OC_Config::setValue( 'loglevel', $_POST['level'] );
diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php
index f59017600ac..2b412c0f2fd 100644
--- a/settings/ajax/setquota.php
+++ b/settings/ajax/setquota.php
@@ -9,6 +9,7 @@
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
+OCP\JSON::callCheck();
$username = isset($_POST["username"])?$_POST["username"]:'';
@@ -34,4 +35,3 @@ if($username){
}
OC_JSON::success(array("data" => array( "username" => $username ,'quota'=>$quota)));
-?>
diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php
index 7773c1049c3..95338ed0267 100644
--- a/settings/ajax/togglegroups.php
+++ b/settings/ajax/togglegroups.php
@@ -4,6 +4,7 @@
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
+OCP\JSON::callCheck();
$success = true;
$error = "add user to";
@@ -37,5 +38,3 @@ if( $success ){
else{
OC_JSON::error(array("data" => array( "message" => "Unable to $error group $group" )));
}
-
-?>
diff --git a/settings/apps.php b/settings/apps.php
index f4ae8b8d977..762395c031b 100644
--- a/settings/apps.php
+++ b/settings/apps.php
@@ -97,5 +97,3 @@ $appid = (isset($_GET['appid'])?strip_tags($_GET['appid']):'');
$tmpl->assign('appid',$appid);
$tmpl->printPage();
-
-?>
diff --git a/settings/help.php b/settings/help.php
index f0abed8f558..b1dc1c5be77 100644
--- a/settings/help.php
+++ b/settings/help.php
@@ -25,5 +25,3 @@ $tmpl->assign( "kbe", $kbe );
$tmpl->assign( "pagecount", $pagecount );
$tmpl->assign( "page", $page );
$tmpl->printPage();
-
-?>
diff --git a/settings/personal.php b/settings/personal.php
index 26a9f601d9a..d82db0d0e7e 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -17,7 +17,7 @@ OC_App::setActiveNavigationEntry( 'personal' );
// calculate the disc space
$rootInfo=OC_FileCache::get('');
-$sharedInfo=OC_FileCache::get('/Shared');
+$sharedInfo=OC_FileCache::get('/Shared');
$used=$rootInfo['size']-$sharedInfo['size'];
$free=OC_Filesystem::free_space();
$total=$free+$used;
@@ -61,5 +61,3 @@ foreach($forms as $form){
$tmpl->append('forms',$form);
}
$tmpl->printPage();
-
-?>
diff --git a/settings/users.php b/settings/users.php
index a6ce94bb5bd..e066956291b 100644
--- a/settings/users.php
+++ b/settings/users.php
@@ -59,4 +59,4 @@ $tmpl->assign( 'subadmins', $subadmins);
$tmpl->assign( 'quota_preset', $quotaPreset);
$tmpl->assign( 'default_quota', $defaultQuota);
$tmpl->assign( 'share_notice', $shareNotice);
-$tmpl->printPage(); \ No newline at end of file
+$tmpl->printPage();