summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-21 14:01:49 +0200
committerLukas Reschke <lukas@owncloud.com>2014-10-21 14:01:49 +0200
commitcb366666003a6a40f075aceb2acbe05b37bd4363 (patch)
treea1d8515c9d64f7961014dcc25fd360dfc272b3c1 /apps
parent3e499d1ac4fb18ee24c7a7aa032619a21e08a97f (diff)
parentd9907b6fa3c1523ee19bc6c3d888a0d71521819e (diff)
downloadnextcloud-server-cb366666003a6a40f075aceb2acbe05b37bd4363.tar.gz
nextcloud-server-cb366666003a6a40f075aceb2acbe05b37bd4363.zip
Merge pull request #11630 from owncloud/kill-some-legacy
remove legacy class OC_Updater
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/ajax/list.php2
-rw-r--r--apps/files_sharing/tests/api.php22
2 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_sharing/ajax/list.php b/apps/files_sharing/ajax/list.php
index 93964c5ed5b..7e2e54a1bd9 100644
--- a/apps/files_sharing/ajax/list.php
+++ b/apps/files_sharing/ajax/list.php
@@ -76,7 +76,7 @@ $data['dirToken'] = $linkItem['token'];
$permissions = $linkItem['permissions'];
// if globally disabled
-if (OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') {
+if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') {
// only allow reading
$permissions = \OCP\PERMISSION_READ;
}
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index fd3d25564b6..035aa1b6a5b 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -180,7 +180,7 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
// sharing file to a user should work if shareapi_exclude_groups is set
// to no
- \OC_Appconfig::setValue('core', 'shareapi_exclude_groups', 'no');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'no');
$_POST['path'] = $this->filename;
$_POST['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2;
$_POST['shareType'] = \OCP\Share::SHARE_TYPE_USER;
@@ -204,8 +204,8 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
$this->assertTrue($result);
// exclude groups, but not the group the user belongs to. Sharing should still work
- \OC_Appconfig::setValue('core', 'shareapi_exclude_groups', 'yes');
- \OC_Appconfig::setValue('core', 'shareapi_exclude_groups_list', 'admin,group1,group2');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'yes');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', 'admin,group1,group2');
$_POST['path'] = $this->filename;
$_POST['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2;
@@ -230,7 +230,7 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
$this->assertTrue($result);
// now we exclude the group the user belongs to ('group'), sharing should fail now
- \OC_Appconfig::setValue('core', 'shareapi_exclude_groups_list', 'admin,group');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', 'admin,group');
$_POST['path'] = $this->filename;
$_POST['shareWith'] = \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2;
@@ -241,8 +241,8 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
$this->assertFalse($result->succeeded());
// cleanup
- \OC_Appconfig::setValue('core', 'shareapi_exclude_groups', 'no');
- \OC_Appconfig::setValue('core', 'shareapi_exclude_groups_list', '');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'no');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', '');
}
@@ -1209,9 +1209,9 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
public function testDefaultExpireDate() {
\Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
- \OC_Appconfig::setValue('core', 'shareapi_default_expire_date', 'yes');
- \OC_Appconfig::setValue('core', 'shareapi_enforce_expire_date', 'yes');
- \OC_Appconfig::setValue('core', 'shareapi_expire_after_n_days', '2');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_default_expire_date', 'yes');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_enforce_expire_date', 'yes');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_expire_after_n_days', '2');
// default expire date is set to 2 days
// the time when the share was created is set to 3 days in the past
@@ -1255,8 +1255,8 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
//cleanup
$result = \OCP\Share::unshare('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
$this->assertTrue($result);
- \OC_Appconfig::setValue('core', 'shareapi_default_expire_date', 'no');
- \OC_Appconfig::setValue('core', 'shareapi_enforce_expire_date', 'no');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_default_expire_date', 'no');
+ \OC::$server->getAppConfig()->setValue('core', 'shareapi_enforce_expire_date', 'no');
}
}