Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/files.js2
-rw-r--r--apps/files_sharing/css/public.css17
-rw-r--r--apps/files_sharing/js/public.js3
-rw-r--r--apps/files_sharing/templates/public.php26
-rw-r--r--apps/files_versions/lib/versions.php6
5 files changed, 24 insertions, 30 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index dc7e893340f..76ac87d38ed 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -720,7 +720,7 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) {
console.warn('Files.lazyLoadPreview(): missing etag argument');
}
- if ( $('#publicUploadButtonMock').length ) {
+ if ( $('#public_upload').length ) {
urlSpec.t = $('#dirToken').val();
previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec);
} else {
diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css
index 3ccb35e327a..b13efd30684 100644
--- a/apps/files_sharing/css/public.css
+++ b/apps/files_sharing/css/public.css
@@ -141,10 +141,13 @@ thead{
.directLink {
margin-bottom: 20px;
}
- .directLink label {
- font-weight: normal;
- }
- .directLink input {
- margin-left: 10px;
- width: 300px;
- }
+.directLink label {
+ font-weight: normal;
+}
+.directLink input {
+ margin-left: 10px;
+ width: 300px;
+}
+.public_actions {
+ padding: 4px;
+}
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 2e34e6f9bc5..4c0b0ad9d48 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -59,7 +59,8 @@ $(document).ready(function() {
});
// Add Uploadprogress Wrapper to controls bar
- $('#controls').append($('#additional_controls div#uploadprogresswrapper'));
+ $('#controls').append($('#controls .actions div#uploadprogresswrapper'));
+ $('#uploadprogresswrapper').addClass('public_actions');
// Cancel upload trigger
$('#cancel_upload_button').click(function() {
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 1d527dca8eb..8b5e0976412 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -24,9 +24,10 @@
<?php if (!isset($_['folder']) || $_['allowZipDownload']): ?>
- <a href="<?php p($_['downloadURL']); ?>" class="button" id="download"><img
- class="svg" alt="Download" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"
- /><span><?php p($l->t('Download'))?></span></a>
+ <a href="<?php p($_['downloadURL']); ?>" class="button" id="download">
+ <img class="svg" alt="Download" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>" />
+ <span><?php p($l->t('Download'))?></span>
+ </a>
<?php endif; ?>
<?php if ($_['allowPublicUploadEnabled']):?>
@@ -43,28 +44,17 @@
<?php endif;?>
- <div id="data-upload-form" class="button" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
+ <div id="data-upload-form" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
<input id="file_upload_start" type="file" name="files[]" data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" multiple>
- <a href="#" id="publicUploadButtonMock" class="svg">
+ <a href="#" id="public_upload" class="button">
+ <img class="svg" alt="Upload" src="<?php print_unescaped(OCP\image_path("core", "actions/upload.svg")); ?>" />
<span><?php p($l->t('Upload'))?></span>
</a>
</div>
</div>
-
- <div id="additional_controls" style="display:none">
- <div id="uploadprogresswrapper">
- <div id="uploadprogressbar"></div>
- <input id="cancel_upload_button" type="button" class="stop" style="display:none"
- value="<?php p($l->t('Cancel upload'));?>"
- />
- </div>
-
-
-
-
+ <div>
<?php endif; ?>
-
</div>
</div></header>
<div id="content">
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 8c67d75c601..52bc133e2c2 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -543,15 +543,16 @@ class Storage {
foreach ($versions as $key => $version) {
$newInterval = true;
while ($newInterval) {
- if ($nextInterval == -1 || $version['version'] >= $nextInterval) {
+ if ($nextInterval == -1 || $prevTimestamp > $nextInterval) {
if ($version['version'] > $nextVersion) {
//distance between two version too small, delete version
- $versionsFileview->unlink($version['path'] . '.v' . $version['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $version['path'] . '.v' . $version['version']));
+ $versionsFileview->unlink($version['path'] . '.v' . $version['version']);
$size += $version['size'];
unset($allVersions[$key]); // update array with all versions
} else {
$nextVersion = $version['version'] - $step;
+ $prevTimestamp = $version['version'];
}
$newInterval = false; // version checked so we can move to the next one
} else { // time to move on to the next interval
@@ -566,7 +567,6 @@ class Storage {
$newInterval = true; // we changed the interval -> check same version with new interval
}
}
- $prevTimestamp = $version['version'];
}
}
return $size;