summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/lib/dropbox.php5
-rw-r--r--apps/files_sharing/appinfo/app.php5
-rw-r--r--apps/files_sharing/lib/helper.php12
-rw-r--r--apps/files_sharing/lib/sharedmount.php2
-rw-r--r--build/integration/composer.json2
-rw-r--r--core/command/maintenance/install.php7
-rw-r--r--core/css/styles.css26
-rw-r--r--lib/private/allconfig.php6
-rw-r--r--lib/private/encryption/file.php3
-rw-r--r--lib/private/files/config/usermountcache.php17
-rw-r--r--lib/private/share20/manager.php5
-rw-r--r--ocs/v1.php2
-rw-r--r--settings/js/users/users.js2
13 files changed, 66 insertions, 28 deletions
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
index 8381ccbae59..bfddc98f5a3 100644
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
@@ -32,6 +32,7 @@ namespace OC\Files\Storage;
use GuzzleHttp\Exception\RequestException;
use Icewind\Streams\IteratorDirectory;
use Icewind\Streams\RetryWrapper;
+use OCP\Files\StorageNotAvailableException;
require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
@@ -94,6 +95,8 @@ class Dropbox extends \OC\Files\Storage\Common {
if ($list) {
try {
$response = $this->dropbox->getMetaData($path);
+ } catch (\Dropbox_Exception_Forbidden $e) {
+ throw new StorageNotAvailableException('Dropbox API rate limit exceeded', StorageNotAvailableException::STATUS_ERROR, $e);
} catch (\Exception $exception) {
\OCP\Util::writeLog('files_external', $exception->getMessage(), \OCP\Util::ERROR);
return false;
@@ -127,6 +130,8 @@ class Dropbox extends \OC\Files\Storage\Common {
return $response;
}
return null;
+ } catch (\Dropbox_Exception_Forbidden $e) {
+ throw new StorageNotAvailableException('Dropbox API rate limit exceeded', StorageNotAvailableException::STATUS_ERROR, $e);
} catch (\Exception $exception) {
if ($exception instanceof \Dropbox_Exception_NotFound) {
// don't log, might be a file_exist check
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 29202c15b22..628921c3248 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -41,8 +41,6 @@ $l = \OC::$server->getL10N('files_sharing');
\OC::$CLASSPATH['OCA\Files\Share\Maintainer'] = 'files_sharing/lib/maintainer.php';
\OC::$CLASSPATH['OCA\Files\Share\Proxy'] = 'files_sharing/lib/proxy.php';
-$application = new Application();
-$application->registerMountProviders();
\OCP\App::registerAdmin('files_sharing', 'settings-admin');
\OCP\App::registerPersonal('files_sharing', 'settings-personal');
@@ -52,6 +50,9 @@ $application->registerMountProviders();
\OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
\OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
+$application = new Application();
+$application->registerMountProviders();
+
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener(
'OCA\Files::loadAdditionalScripts',
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index ee6af9939ed..612df1b207a 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -302,19 +302,23 @@ class Helper {
/**
* get default share folder
*
+ * @param \OC\Files\View
* @return string
*/
- public static function getShareFolder() {
+ public static function getShareFolder($view = null) {
+ if ($view === null) {
+ $view = Filesystem::getView();
+ }
$shareFolder = \OC::$server->getConfig()->getSystemValue('share_folder', '/');
$shareFolder = Filesystem::normalizePath($shareFolder);
- if (!Filesystem::file_exists($shareFolder)) {
+ if (!$view->file_exists($shareFolder)) {
$dir = '';
$subdirs = explode('/', $shareFolder);
foreach ($subdirs as $subdir) {
$dir = $dir . '/' . $subdir;
- if (!Filesystem::is_dir($dir)) {
- Filesystem::mkdir($dir);
+ if (!$view->is_dir($dir)) {
+ $view->mkdir($dir);
}
}
}
diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/sharedmount.php
index 1e554cc5948..3a65794b606 100644
--- a/apps/files_sharing/lib/sharedmount.php
+++ b/apps/files_sharing/lib/sharedmount.php
@@ -75,7 +75,7 @@ class SharedMount extends MountPoint implements MoveableMount {
$parent = dirname($share['file_target']);
if (!$this->recipientView->is_dir($parent)) {
- $parent = Helper::getShareFolder();
+ $parent = Helper::getShareFolder($this->recipientView);
}
$newMountPoint = \OCA\Files_Sharing\Helper::generateUniqueTarget(
diff --git a/build/integration/composer.json b/build/integration/composer.json
index a9516391a41..29f73f2064a 100644
--- a/build/integration/composer.json
+++ b/build/integration/composer.json
@@ -4,6 +4,6 @@
"behat/behat": "^3.0",
"guzzlehttp/guzzle": "~5.0",
"jarnaiz/behat-junit-formatter": "^1.3",
- "sabre/dav": "3.0.x-dev"
+ "sabre/dav": "3.0.9"
}
}
diff --git a/core/command/maintenance/install.php b/core/command/maintenance/install.php
index b1b63b9b3bd..12a61d6341a 100644
--- a/core/command/maintenance/install.php
+++ b/core/command/maintenance/install.php
@@ -106,7 +106,12 @@ class Install extends Command {
$dbUser = $input->getOption('database-user');
$dbPass = $input->getOption('database-pass');
$dbName = $input->getOption('database-name');
- $dbHost = $input->getOption('database-host');
+ if ($db === 'oci') {
+ // an empty hostname needs to be read from the raw parameters
+ $dbHost = $input->getParameterOption('--database-host', '');
+ } else {
+ $dbHost = $input->getOption('database-host');
+ }
$dbTablePrefix = 'oc_';
if ($input->hasParameterOption('--database-table-prefix')) {
$dbTablePrefix = (string) $input->getOption('database-table-prefix');
diff --git a/core/css/styles.css b/core/css/styles.css
index 4a25247d23f..830ff4bacbb 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -365,26 +365,26 @@ body {
}
#body-login .grouptop input,
.grouptop input {
- margin-bottom: 0;
- border-bottom: 0;
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
+ margin-bottom: 0 !important;
+ border-bottom: 0 !important;
+ border-bottom-left-radius: 0 !important;
+ border-bottom-right-radius: 0 !important;
}
#body-login .groupmiddle input,
.groupmiddle input {
- margin-top: 0;
- margin-bottom: 0;
- border-top: 0;
- border-bottom: 0;
- border-radius: 0;
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ border-top: 0 !important;
+ border-bottom: 0 !important;
+ border-radius: 0 !important;
box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important;
}
#body-login .groupbottom input,
.groupbottom input {
- margin-top: 0;
- border-top: 0;
- border-top-right-radius: 0;
- border-top-left-radius: 0;
+ margin-top: 0 !important;
+ border-top: 0 !important;
+ border-top-right-radius: 0 !important;
+ border-top-left-radius: 0 !important;
box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important;
}
#body-login .groupbottom input[type=submit] {
diff --git a/lib/private/allconfig.php b/lib/private/allconfig.php
index b4888fde022..e982b064736 100644
--- a/lib/private/allconfig.php
+++ b/lib/private/allconfig.php
@@ -27,6 +27,7 @@
*/
namespace OC;
+use OC\Cache\CappedMemoryCache;
use OCP\IDBConnection;
use OCP\PreConditionNotMetException;
@@ -58,14 +59,15 @@ class AllConfig implements \OCP\IConfig {
* - deleteAllUserValues
* - deleteAppFromAllUsers
*
- * @var array $userCache
+ * @var CappedMemoryCache $userCache
*/
- private $userCache = array();
+ private $userCache;
/**
* @param SystemConfig $systemConfig
*/
function __construct(SystemConfig $systemConfig) {
+ $this->userCache = new CappedMemoryCache();
$this->systemConfig = $systemConfig;
}
diff --git a/lib/private/encryption/file.php b/lib/private/encryption/file.php
index ec55c2cea00..bd045c20294 100644
--- a/lib/private/encryption/file.php
+++ b/lib/private/encryption/file.php
@@ -22,6 +22,8 @@
namespace OC\Encryption;
+use OC\Cache\CappedMemoryCache;
+
class File implements \OCP\Encryption\IFile {
/** @var Util */
@@ -36,6 +38,7 @@ class File implements \OCP\Encryption\IFile {
public function __construct(Util $util) {
$this->util = $util;
+ $this->cache = new CappedMemoryCache();
}
diff --git a/lib/private/files/config/usermountcache.php b/lib/private/files/config/usermountcache.php
index 78b19972787..76281ef62e1 100644
--- a/lib/private/files/config/usermountcache.php
+++ b/lib/private/files/config/usermountcache.php
@@ -35,6 +35,7 @@ use OCP\IDBConnection;
use OCP\ILogger;
use OCP\IUser;
use OCP\IUserManager;
+use OC\Cache\CappedMemoryCache;
/**
* Cache mounts points per user in the cache so we can easilly look them up
@@ -50,15 +51,23 @@ class UserMountCache implements IUserMountCache {
*/
private $userManager;
- /** @var ICachedMountInfo[][] [$userId => [$cachedMountInfo, ....], ...] */
- private $mountsForUsers = [];
+ /**
+ * Cached mount info.
+ * Map of $userId to ICachedMountInfo.
+ *
+ * @var ICache
+ **/
+ private $mountsForUsers;
/**
* @var ILogger
*/
private $logger;
- private $cacheInfoCache = [];
+ /**
+ * @var ICache
+ */
+ private $cacheInfoCache;
/**
* UserMountCache constructor.
@@ -71,6 +80,8 @@ class UserMountCache implements IUserMountCache {
$this->connection = $connection;
$this->userManager = $userManager;
$this->logger = $logger;
+ $this->cacheInfoCache = new CappedMemoryCache();
+ $this->mountsForUsers = new CappedMemoryCache();
}
public function registerMounts(IUser $user, array $mounts) {
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php
index 06d4029bec9..35a019b2334 100644
--- a/lib/private/share20/manager.php
+++ b/lib/private/share20/manager.php
@@ -907,6 +907,11 @@ class Manager implements IManager {
break;
}
+ // If there was no limit on the select we are done
+ if ($limit === -1) {
+ break;
+ }
+
$offset += $added;
// Fetch again $limit shares
diff --git a/ocs/v1.php b/ocs/v1.php
index 32fcfdd46d1..74b6ac13895 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -43,6 +43,8 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
try {
+ OC_App::loadApps(['session']);
+ OC_App::loadApps(['authentication']);
// load all apps to get all api routes properly setup
OC_App::loadApps();
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 02d3a25be70..eb041054cdc 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -14,7 +14,7 @@ var UserList = {
availableGroups: [],
offset: 0,
usersToLoad: 10, //So many users will be loaded when user scrolls down
- initialUsersToLoad: 250, //initial number of users to load
+ initialUsersToLoad: 50, //initial number of users to load
currentGid: '',
filter: '',