summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/appinfo/update.php8
-rw-r--r--apps/files/js/file-upload.js15
-rw-r--r--apps/files/tests/ajax_rename.php2
-rw-r--r--apps/files/tests/helper.php3
-rw-r--r--apps/files/tests/js/filelistSpec.js2
-rw-r--r--apps/files_encryption/lib/helper.php4
-rwxr-xr-xapps/files_encryption/tests/crypt.php19
-rw-r--r--apps/files_external/lib/config.php2
-rw-r--r--apps/files_external/lib/config/configadapter.php5
-rw-r--r--apps/files_external/lib/sftp.php2
-rw-r--r--apps/files_external/templates/settings.php2
-rw-r--r--apps/files_external/tests/js/mountsfilelistSpec.js2
-rw-r--r--apps/files_sharing/lib/external/storage.php8
-rw-r--r--apps/files_sharing/lib/helper.php4
-rw-r--r--apps/files_sharing/tests/api.php9
-rw-r--r--apps/files_sharing/tests/helper.php2
-rw-r--r--apps/files_sharing/tests/share.php2
-rw-r--r--apps/files_trashbin/lib/helper.php6
-rw-r--r--apps/files_trashbin/lib/trashbin.php2
-rw-r--r--apps/user_ldap/appinfo/update.php30
-rw-r--r--apps/user_ldap/lib/access.php2
-rw-r--r--apps/user_ldap/user_ldap.php2
22 files changed, 80 insertions, 53 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
deleted file mode 100644
index de635e5ce6b..00000000000
--- a/apps/files/appinfo/update.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-// this drops the keys below, because they aren't needed anymore
-// core related
-if (version_compare(\OCP\Config::getSystemValue('version', '0.0.0'), '7.0.0', '<')) {
- \OCP\Config::deleteSystemValue('allowZipDownload');
- \OCP\Config::deleteSystemValue('maxZipInputSize');
-}
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index c8b3a150caa..8b0753fc647 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -501,6 +501,21 @@ OC.Upload = {
}
});
+ } else {
+ // for all browsers that don't support the progress bar
+ // IE 8 & 9
+
+ // show a spinner
+ fileupload.on('fileuploadstart', function() {
+ $('#upload').addClass('icon-loading');
+ $('#upload .icon-upload').hide();
+ });
+
+ // hide a spinner
+ fileupload.on('fileuploadstop fileuploadfail', function() {
+ $('#upload').removeClass('icon-loading');
+ $('#upload .icon-upload').show();
+ });
}
}
diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php
index 48aed05823b..1cfecf9e58c 100644
--- a/apps/files/tests/ajax_rename.php
+++ b/apps/files/tests/ajax_rename.php
@@ -107,7 +107,7 @@ class Test_OC_Files_App_Rename extends \Test\TestCase {
'etag' => 'abcdef',
'directory' => '/',
'name' => 'new_name',
- ))));
+ ), null)));
$result = $this->files->rename($dir, $oldname, $newname);
diff --git a/apps/files/tests/helper.php b/apps/files/tests/helper.php
index 1b7c8eef43a..ea96e41d1d1 100644
--- a/apps/files/tests/helper.php
+++ b/apps/files/tests/helper.php
@@ -24,7 +24,8 @@ class Test_Files_Helper extends \Test\TestCase {
'mtime' => $mtime,
'type' => $isDir ? 'dir' : 'file',
'mimetype' => $isDir ? 'httpd/unix-directory' : 'application/octet-stream'
- )
+ ),
+ null
);
}
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 6c83f214c39..6dafa262715 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -275,7 +275,7 @@ describe('OCA.Files.FileList tests', function() {
mtime: -1
};
var $tr = fileList.add(fileData);
- expect($tr.find('.date').text()).toEqual('?');
+ expect($tr.find('.date .modified').text()).toEqual('?');
});
it('adds new file to the end of the list', function() {
var $tr;
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index 6a8ea25d44e..b9d45f67363 100644
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -427,7 +427,7 @@ class Helper {
*/
public static function getOpenSSLConfig() {
$config = array('private_key_bits' => 4096);
- $config = array_merge(\OCP\Config::getSystemValue('openssl', array()), $config);
+ $config = array_merge(\OC::$server->getConfig()->getSystemValue('openssl', array()), $config);
return $config;
}
@@ -460,7 +460,7 @@ class Helper {
*/
public static function getCipher() {
- $cipher = \OCP\Config::getSystemValue('cipher', Crypt::DEFAULT_CIPHER);
+ $cipher = \OC::$server->getConfig()->getSystemValue('cipher', Crypt::DEFAULT_CIPHER);
if ($cipher !== 'AES-256-CFB' && $cipher !== 'AES-128-CFB') {
\OCP\Util::writeLog('files_encryption',
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 451fa62fe57..3165279c558 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -30,6 +30,9 @@ class Crypt extends TestCase {
public $genPrivateKey;
public $genPublicKey;
+ /** @var \OCP\IConfig */
+ private $config;
+
public static function setUpBeforeClass() {
parent::setUpBeforeClass();
@@ -65,6 +68,8 @@ class Crypt extends TestCase {
// we don't want to tests with app files_trashbin enabled
\OC_App::disable('files_trashbin');
+
+ $this->config = \OC::$server->getConfig();
}
protected function tearDown() {
@@ -76,7 +81,7 @@ class Crypt extends TestCase {
}
$this->assertTrue(\OC_FileProxy::$enabled);
- \OCP\Config::deleteSystemValue('cipher');
+ $this->config->deleteSystemValue('cipher');
parent::tearDown();
}
@@ -198,14 +203,14 @@ class Crypt extends TestCase {
$filename = 'tmp-' . $this->getUniqueID() . '.test';
- \OCP\Config::setSystemValue('cipher', 'AES-128-CFB');
+ $this->config->setSystemValue('cipher', 'AES-128-CFB');
$cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/'. $filename, $this->dataShort);
// Test that data was successfully written
$this->assertTrue(is_int($cryptedFile));
- \OCP\Config::deleteSystemValue('cipher');
+ $this->config->deleteSystemValue('cipher');
// Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled;
@@ -282,7 +287,7 @@ class Crypt extends TestCase {
// Generate a a random filename
$filename = 'tmp-' . $this->getUniqueID() . '.test';
- \OCP\Config::setSystemValue('cipher', 'AES-128-CFB');
+ $this->config->setSystemValue('cipher', 'AES-128-CFB');
// Save long data as encrypted file using stream wrapper
$cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong . $this->dataLong);
@@ -294,7 +299,7 @@ class Crypt extends TestCase {
$proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false;
- \OCP\Config::deleteSystemValue('cipher');
+ $this->config->deleteSystemValue('cipher');
// Get file contents without using any wrapper to get it's actual contents on disk
$retreivedCryptedFile = $this->view->file_get_contents($this->userId . '/files/' . $filename);
@@ -326,12 +331,12 @@ class Crypt extends TestCase {
// Generate a a random filename
$filename = 'tmp-' . $this->getUniqueID() . '.test';
- \OCP\Config::setSystemValue('cipher', 'AES-128-CFB');
+ $this->config->setSystemValue('cipher', 'AES-128-CFB');
// Save long data as encrypted file using stream wrapper
$cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong . $this->dataLong);
- \OCP\Config::deleteSystemValue('cipher');
+ $this->config->deleteSystemValue('cipher');
// Test that data was successfully written
$this->assertTrue(is_int($cryptedFile));
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index f09b29a522b..823c0bcbfc1 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -862,7 +862,7 @@ class OC_Mount_Config {
include('Crypt/AES.php');
}
$cipher = new Crypt_AES(CRYPT_AES_MODE_CBC);
- $cipher->setKey(\OCP\Config::getSystemValue('passwordsalt'));
+ $cipher->setKey(\OC::$server->getConfig()->getSystemValue('passwordsalt', null));
return $cipher;
}
diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php
index 6294e27a774..de484a44698 100644
--- a/apps/files_external/lib/config/configadapter.php
+++ b/apps/files_external/lib/config/configadapter.php
@@ -33,10 +33,11 @@ class ConfigAdapter implements IMountProvider {
$objectClass = $options['options']['objectstore']['class'];
$options['options']['objectstore'] = new $objectClass($options['options']['objectstore']);
}
+ $mountOptions = isset($options['mountOptions']) ? $options['mountOptions'] : [];
if (isset($options['personal']) && $options['personal']) {
- $mounts[] = new PersonalMount($options['class'], $mountPoint, $options['options'], $loader);
+ $mounts[] = new PersonalMount($options['class'], $mountPoint, $options['options'], $loader, $mountOptions);
} else {
- $mounts[] = new MountPoint($options['class'], $mountPoint, $options['options'], $loader);
+ $mounts[] = new MountPoint($options['class'], $mountPoint, $options['options'], $loader, $mountOptions);
}
}
return $mounts;
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index f0a6f145422..f6c56669734 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -112,7 +112,7 @@ class SFTP extends \OC\Files\Storage\Common {
try {
$storage_view = \OCP\Files::getStorage('files_external');
if ($storage_view) {
- return \OCP\Config::getSystemValue('datadirectory') .
+ return \OC::$server->getConfig()->getSystemValue('datadirectory') .
$storage_view->getAbsolutePath('') .
'ssh_hostKeys';
}
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 072f856dfbd..79950f30385 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -76,7 +76,7 @@
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
- <?php if (isset($_['backends'][$mount['class']]['custom']) && !in_array('files_external/js/'.$_['backends'][$mount['class']]['custom'], \OC_Util::$scripts)): ?>
+ <?php if (isset($_['backends'][$mount['class']]['custom'])): ?>
<?php OCP\Util::addScript('files_external', $_['backends'][$mount['class']]['custom']); ?>
<?php endif; ?>
<?php endif; ?>
diff --git a/apps/files_external/tests/js/mountsfilelistSpec.js b/apps/files_external/tests/js/mountsfilelistSpec.js
index 50603081b6a..a4e4fec1177 100644
--- a/apps/files_external/tests/js/mountsfilelistSpec.js
+++ b/apps/files_external/tests/js/mountsfilelistSpec.js
@@ -144,7 +144,7 @@ describe('OCA.External.FileList tests', function() {
'?dir=/mount%20points/smb%20mount'
);
expect($tr.find('.nametext').text().trim()).toEqual('smb mount');
- expect($tr.find('.column-scope').text().trim()).toEqual('Personal');
+ expect($tr.find('.column-scope > span').text().trim()).toEqual('Personal');
expect($tr.find('.column-backend').text().trim()).toEqual('SMB');
});
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 3f1d631a35f..306a7b8db8a 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -167,6 +167,14 @@ class Storage extends DAV implements ISharedStorage {
}
}
+ public function file_exists($path) {
+ if ($path === '') {
+ return true;
+ } else {
+ return parent::file_exists($path);
+ }
+ }
+
/**
* check if the configured remote is a valid ownCloud instance
*
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index c83debe952f..71519bd1d4a 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -280,7 +280,7 @@ class Helper {
* @return string
*/
public static function getShareFolder() {
- $shareFolder = \OCP\Config::getSystemValue('share_folder', '/');
+ $shareFolder = \OC::$server->getConfig()->getSystemValue('share_folder', '/');
return \OC\Files\Filesystem::normalizePath($shareFolder);
}
@@ -291,7 +291,7 @@ class Helper {
* @param string $shareFolder
*/
public static function setShareFolder($shareFolder) {
- \OCP\Config::setSystemValue('share_folder', $shareFolder);
+ \OC::$server->getConfig()->setSystemValue('share_folder', $shareFolder);
}
}
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index dd6de15010f..278e7130199 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -948,10 +948,11 @@ class Test_Files_Sharing_Api extends TestCase {
function testUpdateShareExpireDate() {
$fileInfo = $this->view->getFileInfo($this->folder);
+ $config = \OC::$server->getConfig();
// enforce expire date, by default 7 days after the file was shared
- \OCP\Config::setAppValue('core', 'shareapi_default_expire_date', 'yes');
- \OCP\Config::setAppValue('core', 'shareapi_enforce_expire_date', 'yes');
+ $config->setAppValue('core', 'shareapi_default_expire_date', 'yes');
+ $config->setAppValue('core', 'shareapi_enforce_expire_date', 'yes');
$dateWithinRange = new \DateTime();
$dateWithinRange->add(new \DateInterval('P5D'));
@@ -1008,8 +1009,8 @@ class Test_Files_Sharing_Api extends TestCase {
$this->assertEquals($dateWithinRange->format('Y-m-d') . ' 00:00:00', $updatedLinkShare['expiration']);
// cleanup
- \OCP\Config::setAppValue('core', 'shareapi_default_expire_date', 'no');
- \OCP\Config::setAppValue('core', 'shareapi_enforce_expire_date', 'no');
+ $config->setAppValue('core', 'shareapi_default_expire_date', 'no');
+ $config->setAppValue('core', 'shareapi_enforce_expire_date', 'no');
\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
}
diff --git a/apps/files_sharing/tests/helper.php b/apps/files_sharing/tests/helper.php
index 1a27739ec34..a9245ddafe5 100644
--- a/apps/files_sharing/tests/helper.php
+++ b/apps/files_sharing/tests/helper.php
@@ -35,7 +35,7 @@ class Test_Files_Sharing_Helper extends TestCase {
$this->assertSame('/Shared', \OCA\Files_Sharing\Helper::getShareFolder());
// cleanup
- \OCP\Config::deleteSystemValue('share_folder');
+ \OC::$server->getConfig()->deleteSystemValue('share_folder');
}
diff --git a/apps/files_sharing/tests/share.php b/apps/files_sharing/tests/share.php
index f76f92734d0..83ef17f49d1 100644
--- a/apps/files_sharing/tests/share.php
+++ b/apps/files_sharing/tests/share.php
@@ -243,7 +243,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
$this->assertTrue(\OC\Files\Filesystem::file_exists('/Shared/subfolder/' . $this->folder));
//cleanup
- \OCP\Config::deleteSystemValue('share_folder');
+ \OC::$server->getConfig()->deleteSystemValue('share_folder');
}
/**
diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php
index c99662480df..d9e69b71aa0 100644
--- a/apps/files_trashbin/lib/helper.php
+++ b/apps/files_trashbin/lib/helper.php
@@ -31,8 +31,10 @@ class Helper
return $result;
}
- list($storage, $internalPath) = $view->resolvePath($dir);
+ $mount = $view->getMount($dir);
+ $storage = $mount->getStorage();
$absoluteDir = $view->getAbsolutePath($dir);
+ $internalPath = $mount->getInternalPath($absoluteDir);
if (is_resource($dirContent)) {
$originalLocations = \OCA\Files_Trashbin\Trashbin::getLocations($user);
@@ -65,7 +67,7 @@ class Helper
if ($originalPath) {
$i['extraData'] = $originalPath.'/'.$id;
}
- $result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i);
+ $result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i, $mount);
}
}
closedir($dirContent);
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 1e8f31dbd2a..952af56bacc 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -874,7 +874,7 @@ class Trashbin {
* @return integer size of the folder
*/
private static function calculateSize($view) {
- $root = \OCP\Config::getSystemValue('datadirectory') . $view->getAbsolutePath('');
+ $root = \OC::$server->getConfig()->getSystemValue('datadirectory') . $view->getAbsolutePath('');
if (!file_exists($root)) {
return 0;
}
diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php
index 5fad23de4f6..9bf0ca4ab53 100644
--- a/apps/user_ldap/appinfo/update.php
+++ b/apps/user_ldap/appinfo/update.php
@@ -1,13 +1,15 @@
<?php
+$configInstance = \OC::$server->getConfig();
+
//detect if we can switch on naming guidelines. We won't do it on conflicts.
//it's a bit spaghetti, but hey.
-$state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'unset');
+$state = $configInstance->getSystemValue('ldapIgnoreNamingRules', 'unset');
if($state === 'unset') {
- OCP\Config::setSystemValue('ldapIgnoreNamingRules', false);
+ $configInstance->setSystemValue('ldapIgnoreNamingRules', false);
}
-$installedVersion = OCP\Config::getAppValue('user_ldap', 'installed_version');
+$installedVersion = $configInstance->getAppValue('user_ldap', 'installed_version');
$enableRawMode = version_compare($installedVersion, '0.4.1', '<');
$configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true);
@@ -15,31 +17,31 @@ $ldap = new OCA\user_ldap\lib\LDAP();
foreach($configPrefixes as $config) {
$connection = new OCA\user_ldap\lib\Connection($ldap, $config);
- $state = \OCP\Config::getAppValue(
+ $state = $configInstance->getAppValue(
'user_ldap', $config.'ldap_uuid_user_attribute', 'not existing');
if($state === 'non existing') {
- $value = \OCP\Config::getAppValue(
+ $value = $configInstance->getAppValue(
'user_ldap', $config.'ldap_uuid_attribute', '');
- \OCP\Config::setAppValue(
+ $configInstance->setAppValue(
'user_ldap', $config.'ldap_uuid_user_attribute', $value);
- \OCP\Config::setAppValue(
+ $configInstance->setAppValue(
'user_ldap', $config.'ldap_uuid_group_attribute', $value);
}
- $state = \OCP\Config::getAppValue(
+ $state = $configInstance->getAppValue(
'user_ldap', $config.'ldap_expert_uuid_user_attr', 'not existing');
if($state === 'non existing') {
- $value = \OCP\Config::getAppValue(
+ $value = $configInstance->getAppValue(
'user_ldap', $config.'ldap_expert_uuid_attr', '');
- \OCP\Config::setAppValue(
+ $configInstance->setAppValue(
'user_ldap', $config.'ldap_expert_uuid_user_attr', $value);
- \OCP\Config::setAppValue(
+ $configInstance->setAppValue(
'user_ldap', $config.'ldap_expert_uuid_group_attr', $value);
}
if($enableRawMode) {
- \OCP\Config::setAppValue('user_ldap', $config.'ldap_user_filter_mode', 1);
- \OCP\Config::setAppValue('user_ldap', $config.'ldap_login_filter_mode', 1);
- \OCP\Config::setAppValue('user_ldap', $config.'ldap_group_filter_mode', 1);
+ $configInstance->setAppValue('user_ldap', $config.'ldap_user_filter_mode', 1);
+ $configInstance->setAppValue('user_ldap', $config.'ldap_login_filter_mode', 1);
+ $configInstance->setAppValue('user_ldap', $config.'ldap_group_filter_mode', 1);
}
}
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 76747be70cf..22510302061 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -673,7 +673,7 @@ class Access extends LDAPUtility implements user\IUserTools {
$table = $this->getMapTable($isUser);
$sqlAdjustment = '';
- $dbType = \OCP\Config::getSystemValue('dbtype');
+ $dbType = \OC::$server->getConfig()->getSystemValue('dbtype', null);
if($dbType === 'mysql' || $dbType == 'oci') {
$sqlAdjustment = 'FROM DUAL';
}
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 52278082312..6c7db662ffb 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -199,7 +199,7 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
) {
$homedir = $path;
} else {
- $homedir = \OCP\Config::getSystemValue('datadirectory',
+ $homedir = \OC::$server->getConfig()->getSystemValue('datadirectory',
\OC::$SERVERROOT.'/data' ) . '/' . $homedir[0];
}
$this->access->connection->writeToCache($cacheKey, $homedir);