summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/integration/features/bootstrap/BasicStructure.php24
-rw-r--r--core/Command/Encryption/EncryptAll.php8
-rw-r--r--core/css/header.scss6
-rw-r--r--core/js/sharedialogview.js2
-rw-r--r--core/js/tests/specHelper.js4
-rw-r--r--core/templates/layout.user.php4
-rw-r--r--lib/private/Authentication/Token/DefaultTokenProvider.php4
-rw-r--r--lib/private/SystemTag/SystemTagManager.php3
-rwxr-xr-xlib/private/Template/ResourceLocator.php2
-rw-r--r--lib/private/legacy/files.php4
-rw-r--r--settings/js/apps.js4
-rw-r--r--settings/js/personal.js11
-rw-r--r--settings/personal.php1
-rw-r--r--settings/templates/personal.php9
-rw-r--r--tests/lib/SystemTag/SystemTagManagerTest.php9
15 files changed, 66 insertions, 29 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php
index 8e1fcf86ba1..8961efc6f31 100644
--- a/build/integration/features/bootstrap/BasicStructure.php
+++ b/build/integration/features/bootstrap/BasicStructure.php
@@ -353,6 +353,30 @@ trait BasicStructure {
fclose($file);
}
+ public function createFileWithText($name, $text){
+ $file = fopen("work/" . "$name", 'w');
+ fwrite($file, $text);
+ fclose($file);
+ }
+
+ /**
+ * @Given file :filename of size :size is created in local storage
+ * @param string $filename
+ * @param string $size
+ */
+ public function fileIsCreatedInLocalStorageWithSize($filename, $size) {
+ $this->createFileSpecificSize("local_storage/$filename", $size);
+ }
+
+ /**
+ * @Given file :filename with text :text is created in local storage
+ * @param string $filename
+ * @param string $text
+ */
+ public function fileIsCreatedInLocalStorageWithText($filename, $text) {
+ $this->createFileWithText("local_storage/$filename", $text);
+ }
+
/**
* @When User :user empties trashbin
* @param string $user
diff --git a/core/Command/Encryption/EncryptAll.php b/core/Command/Encryption/EncryptAll.php
index 3a0c88c0798..584bc8a70c7 100644
--- a/core/Command/Encryption/EncryptAll.php
+++ b/core/Command/Encryption/EncryptAll.php
@@ -109,10 +109,10 @@ class EncryptAll extends Command {
}
$output->writeln("\n");
- $output->writeln('You are about to start to encrypt all files stored in your ownCloud.');
- $output->writeln('It will depend on the encryption module you use which files get encrypted.');
- $output->writeln('Depending on the number and size of your files this can take some time');
- $output->writeln('Please make sure that no user access his files during this process!');
+ $output->writeln('You are about to encrypt all files stored in your Nextcloud installation.');
+ $output->writeln('Depending on the number of available files, and their size, this may take quite some time.');
+ $output->writeln('Please ensure that no user accesses their files during this time!');
+ $output->writeln('Note: The encryption module you use determines which files get encrypted.');
$output->writeln('');
$question = new ConfirmationQuestion('Do you really want to continue? (y/n) ', false);
if ($this->questionHelper->ask($input, $output, $question)) {
diff --git a/core/css/header.scss b/core/css/header.scss
index 2f0c1522b0b..b158f8b6660 100644
--- a/core/css/header.scss
+++ b/core/css/header.scss
@@ -324,7 +324,7 @@ nav {
}
/* Apps management */
-#apps-management {
+.apps-management {
min-height: initial;
height: initial;
margin: 0;
@@ -399,7 +399,6 @@ nav {
/* Profile picture in header */
.avatardiv {
- margin-right: 8px;
cursor: pointer;
height: 32px;
width: 32px;
@@ -458,9 +457,6 @@ nav {
.avatardiv.avatardiv-shown + #expandDisplayName {
display: none;
}
- #expand {
- display: block;
- }
}
#appmenu {
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index 58dd706fb1f..47471955563 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -120,6 +120,8 @@
'_onSelectRecipient',
'onShareWithFieldChanged'
);
+
+ OC.Plugins.attach('OCA.Share.ShareDialogView', this);
},
onShareWithFieldChanged: function() {
diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js
index f9bdeae0d64..7897a2f2842 100644
--- a/core/js/tests/specHelper.js
+++ b/core/js/tests/specHelper.js
@@ -177,6 +177,10 @@ window.isPhantom = /phantom/i.test(navigator.userAgent);
delete($.fn.select2);
ajaxErrorStub.restore();
+
+ // reset pop state handlers
+ OC.Util.History._handlers = [];
+
});
})();
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 3cfb88bf423..dad5ee1b826 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -81,7 +81,7 @@
</a>
</li>
<?php if(OC_User::isAdminUser(OC_User::getUser())): ?>
- <li id="apps-management" <?php if(count($_['navigation'])>$headerIconCount-1): ?>class="hidden"<?php endif; ?>>
+ <li <?php if(count($_['navigation'])>$headerIconCount-1): ?> class="hidden apps-management"<?php else: ?> class="apps-management" <?php endif; ?>>
<a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
<?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
<img src="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>" />
@@ -119,7 +119,7 @@
/* show "More apps" link to app administration directly in app navigation, as last entry */
if(OC_User::isAdminUser(OC_User::getUser())):
?>
- <li id="apps-management">
+ <li class="apps-management">
<a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
<?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
<svg width="32" height="32" viewBox="0 0 32 32" class="app-icon">
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php
index 0e1196a9da4..6fd85295e03 100644
--- a/lib/private/Authentication/Token/DefaultTokenProvider.php
+++ b/lib/private/Authentication/Token/DefaultTokenProvider.php
@@ -253,10 +253,10 @@ class DefaultTokenProvider implements IProvider {
*/
public function invalidateOldTokens() {
$olderThan = $this->time->getTime() - (int) $this->config->getSystemValue('session_lifetime', 60 * 60 * 24);
- $this->logger->debug('Invalidating session tokens older than ' . date('c', $olderThan));
+ $this->logger->debug('Invalidating session tokens older than ' . date('c', $olderThan), ['app' => 'cron']);
$this->mapper->invalidateOld($olderThan, IToken::DO_NOT_REMEMBER);
$rememberThreshold = $this->time->getTime() - (int) $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15);
- $this->logger->debug('Invalidating remembered session tokens older than ' . date('c', $rememberThreshold));
+ $this->logger->debug('Invalidating remembered session tokens older than ' . date('c', $rememberThreshold), ['app' => 'cron']);
$this->mapper->invalidateOld($rememberThreshold, IToken::REMEMBER);
}
diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php
index 7c21c0e004e..d0854e885eb 100644
--- a/lib/private/SystemTag/SystemTagManager.php
+++ b/lib/private/SystemTag/SystemTagManager.php
@@ -400,6 +400,9 @@ class SystemTagManager implements ISystemTagManager {
'gid' => $query->createParameter('gid'),
]);
foreach ($groupIds as $groupId) {
+ if ($groupId === '') {
+ continue;
+ }
$query->setParameter('gid', $groupId);
$query->execute();
}
diff --git a/lib/private/Template/ResourceLocator.php b/lib/private/Template/ResourceLocator.php
index 9015bf5d97c..e82a77ba65f 100755
--- a/lib/private/Template/ResourceLocator.php
+++ b/lib/private/Template/ResourceLocator.php
@@ -84,7 +84,7 @@ abstract class ResourceLocator {
$this->doFindTheme($resource);
} catch (ResourceNotFoundException $e) {
$resourceApp = substr($resource, 0, strpos($resource, '/'));
- $this->logger->debug('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
+ $this->logger->debug('Could not find resource file in theme "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
}
}
}
diff --git a/lib/private/legacy/files.php b/lib/private/legacy/files.php
index ed3aa719409..017691805c9 100644
--- a/lib/private/legacy/files.php
+++ b/lib/private/legacy/files.php
@@ -264,12 +264,12 @@ class OC_Files {
if (\OC\Files\Filesystem::isReadable($filename)) {
self::sendHeaders($filename, $name, $rangeArray);
} elseif (!\OC\Files\Filesystem::file_exists($filename)) {
- header("HTTP/1.0 404 Not Found");
+ header("HTTP/1.1 404 Not Found");
$tmpl = new OC_Template('', '404', 'guest');
$tmpl->printPage();
exit();
} else {
- header("HTTP/1.0 403 Forbidden");
+ header("HTTP/1.1 403 Forbidden");
die('403 Forbidden');
}
if (isset($params['head']) && $params['head']) {
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 8be18c4e9c0..d2f26578a7c 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -541,10 +541,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
if (navEntries.length > 7) {
$('#more-apps').show();
- $('#apps-management').hide();
+ $('.apps-management').hide();
} else {
$('#more-apps').hide();
- $('#apps-management').show();
+ $('.apps-management').show();
}
}
});
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 89491b96657..52ab2f23f87 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -20,7 +20,8 @@ OC.Settings = OC.Settings || {};
jQuery.fn.keyUpDelayedOrEnter = function (callback, allowEmptyValue) {
var cb = callback;
var that = this;
- this.keyup(_.debounce(function (event) {
+
+ this.on('input', _.debounce(function (event) {
// enter is already handled in keypress
if (event.keyCode === 13) {
return;
@@ -36,14 +37,6 @@ jQuery.fn.keyUpDelayedOrEnter = function (callback, allowEmptyValue) {
cb(event);
}
});
-
- this.bind('paste', null, function (event) {
- if(!event.keyCode){
- if (allowEmptyValue || that.val() !== '') {
- cb(event);
- }
- }
- });
};
function updateAvatar (hidedefault) {
diff --git a/settings/personal.php b/settings/personal.php
index a1fcd10e0ad..a4449754f64 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -158,6 +158,7 @@ $userData = $accountManager->getUser($user);
$tmpl->assign('total_space', $totalSpace);
$tmpl->assign('usage_relative', $storageInfo['relative']);
+$tmpl->assign('quota', $storageInfo['quota']);
$tmpl->assign('clients', $clients);
$tmpl->assign('email', $userData[\OC\Accounts\AccountManager::PROPERTY_EMAIL]['value']);
$tmpl->assign('languages', $languages);
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index 31aa268f776..b47e2e28ffa 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -28,8 +28,13 @@
<div style="width:<?php p($_['usage_relative']);?>%"
<?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>>
<p id="quotatext">
- <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>',
- array($_['usage'], $_['total_space'])));?>
+ <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?>
+ <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>',
+ [$_['usage'], $_['total_space']]));?>
+ <?php else: ?>
+ <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)',
+ [$_['usage'], $_['total_space'], $_['usage_relative']]));?>
+ <?php endif ?>
</p>
</div>
</div>
diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php
index e697e373465..61fac99ca6c 100644
--- a/tests/lib/SystemTag/SystemTagManagerTest.php
+++ b/tests/lib/SystemTag/SystemTagManagerTest.php
@@ -517,6 +517,15 @@ class SystemTagManagerTest extends TestCase {
}
/**
+ * empty groupIds should be ignored
+ */
+ public function testEmptyTagGroup() {
+ $tag1 = $this->tagManager->createTag('tag1', true, false);
+ $this->tagManager->setTagGroups($tag1, ['']);
+ $this->assertEquals([], $this->tagManager->getTagGroups($tag1));
+ }
+
+ /**
* @param ISystemTag $tag1
* @param ISystemTag $tag2
*/