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
path: root/files
diff options
context:
space:
mode:
authorSimon Birnbach <simon@simon-birnbach.de>2012-04-15 17:59:57 +0400
committerSimon Birnbach <simon@simon-birnbach.de>2012-04-15 17:59:57 +0400
commita384fcb99fc3a12d7dac937398bf827c79e86098 (patch)
tree55a631751578cd1f642e5fa0f88fd2290509b126 /files
parent4e89a0faf652f2f100cca47cca54a3b35e720aad (diff)
parent38cb716a572a8af136f6260089bc486413c6ca9f (diff)
Merge git://gitorious.org/owncloud/owncloud
Conflicts: files/css/files.css files/js/files.js
Diffstat (limited to 'files')
-rw-r--r--files/admin.php39
-rw-r--r--files/ajax/download.php3
-rw-r--r--files/ajax/list.php3
-rw-r--r--files/ajax/mimeicon.php3
-rw-r--r--files/ajax/rawlist.php26
-rw-r--r--files/ajax/scan.php1
-rw-r--r--files/ajax/upload.php2
-rw-r--r--files/appinfo/app.php2
-rw-r--r--files/css/files.css12
-rw-r--r--files/index.php5
-rw-r--r--files/js/admin.js28
-rw-r--r--files/js/fileactions.js29
-rw-r--r--files/js/filelist.js10
-rw-r--r--files/js/files.js38
-rw-r--r--files/templates/admin.php17
-rw-r--r--files/templates/index.php12
-rw-r--r--files/templates/part.list.php2
-rw-r--r--files/webdav.php3
18 files changed, 156 insertions, 79 deletions
diff --git a/files/admin.php b/files/admin.php
index 861b6037f3c..4ae3ee51236 100644
--- a/files/admin.php
+++ b/files/admin.php
@@ -25,23 +25,36 @@
// Init owncloud
require_once('../lib/base.php');
-OC_User::checkAdminUser();
+OC_Util::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
-if(isset($_POST['maxUploadSize'])){
- $maxUploadFilesize=$_POST['maxUploadSize'];
- OC_Files::setUploadLimit(OC_Helper::computerFileSize($maxUploadFilesize));
-}else{
- $upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
- $post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
- $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
+
+$upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
+$post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
+$maxUploadFilesize = OC_Helper::humanFileSize(min($upload_max_filesize, $post_max_size));
+if($_POST) {
+ if(isset($_POST['maxUploadSize'])){
+ if(($setMaxSize = OC_Files::setUploadLimit(OC_Helper::computerFileSize($_POST['maxUploadSize']))) !== false) {
+ $maxUploadFilesize = OC_Helper::humanFileSize($setMaxSize);
+ }
+ }
+ if(isset($_POST['maxZipInputSize'])) {
+ $maxZipInputSize=$_POST['maxZipInputSize'];
+ OC_Config::setValue('maxZipInputSize', OC_Helper::computerFileSize($maxZipInputSize));
+ }
+ if(isset($_POST['submitFilesAdminSettings'])) {
+ OC_Config::setValue('allowZipDownload', isset($_POST['allowZipDownload']));
+ }
}
+$maxZipInputSize = OC_Helper::humanFileSize(OC_Config::getValue('maxZipInputSize', OC_Helper::computerFileSize('800 MB')));
+$allowZipDownload = intval(OC_Config::getValue('allowZipDownload', true));
OC_App::setActiveNavigationEntry( "files_administration" );
-// return template
-$tmpl = new OC_Template( "files", "admin", "user" );
+
+$tmpl = new OC_Template( 'files', 'admin' );
$tmpl->assign( 'htaccessWorking', $htaccessWorking );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
-$tmpl->printPage();
-
-?>
+$tmpl->assign( 'maxPossibleUploadSize', OC_Helper::humanFileSize(PHP_INT_MAX));
+$tmpl->assign( 'allowZipDownload', $allowZipDownload);
+$tmpl->assign( 'maxZipInputSize', $maxZipInputSize);
+return $tmpl->fetchPage(); \ No newline at end of file
diff --git a/files/ajax/download.php b/files/ajax/download.php
index 198069f3fa1..39852613ab9 100644
--- a/files/ajax/download.php
+++ b/files/ajax/download.php
@@ -21,6 +21,9 @@
*
*/
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem');
+
// Init owncloud
require_once('../../lib/base.php');
diff --git a/files/ajax/list.php b/files/ajax/list.php
index 8a414827e1c..ec9ab7342dd 100644
--- a/files/ajax/list.php
+++ b/files/ajax/list.php
@@ -1,5 +1,8 @@
<?php
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem');
+
// Init owncloud
require_once('../../lib/base.php');
diff --git a/files/ajax/mimeicon.php b/files/ajax/mimeicon.php
index 8724016b3a1..ff72ba0f5b7 100644
--- a/files/ajax/mimeicon.php
+++ b/files/ajax/mimeicon.php
@@ -1,5 +1,8 @@
<?php
+// no need for apps
+$RUNTIME_NOAPPS=false;
+
// Init owncloud
require_once('../../lib/base.php');
diff --git a/files/ajax/rawlist.php b/files/ajax/rawlist.php
new file mode 100644
index 00000000000..e02c5b62733
--- /dev/null
+++ b/files/ajax/rawlist.php
@@ -0,0 +1,26 @@
+<?php
+
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem');
+
+// Init owncloud
+require_once('../../lib/base.php');
+require_once('../../lib/template.php');
+
+OC_JSON::checkLoggedIn();
+
+// Load the files
+$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
+$mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : '';
+
+// make filelist
+$files = array();
+foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ){
+ $i["date"] = OC_Util::formatDate($i["mtime"] );
+ $i['mimetype_icon'] = $i['type'] == 'dir' ? mimetype_icon('dir'): mimetype_icon($i['mimetype']);
+ $files[] = $i;
+}
+
+OC_JSON::success(array('data' => $files));
+
+?>
diff --git a/files/ajax/scan.php b/files/ajax/scan.php
index 565275911b4..db09b7d5c64 100644
--- a/files/ajax/scan.php
+++ b/files/ajax/scan.php
@@ -17,6 +17,7 @@ if($force or !OC_FileCache::inCache('')){
if(!$checkOnly){
OC_DB::beginTransaction();
OC_FileCache::scan('',$eventSource);
+ OC_FileCache::clean();
OC_DB::commit();
$eventSource->send('success',true);
}else{
diff --git a/files/ajax/upload.php b/files/ajax/upload.php
index f8b8f0e2e5f..af7a7acf702 100644
--- a/files/ajax/upload.php
+++ b/files/ajax/upload.php
@@ -14,7 +14,7 @@ if (!isset($_FILES['files'])) {
}
foreach ($_FILES['files']['error'] as $error) {
if ($error != 0) {
- $l=new OC_L10N('files');
+ $l=OC_L10N::get('files');
$errors = array(
UPLOAD_ERR_OK=>$l->t("There is no error, the file uploaded with success"),
UPLOAD_ERR_INI_SIZE=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'),
diff --git a/files/appinfo/app.php b/files/appinfo/app.php
index 0bf73d9a07e..1b495e52f40 100644
--- a/files/appinfo/app.php
+++ b/files/appinfo/app.php
@@ -1,7 +1,7 @@
<?php
-$l=new OC_L10N('files');
+$l=OC_L10N::get('files');
OC_App::register( array( "order" => 2, "id" => "files", "name" => "Files" ));
diff --git a/files/css/files.css b/files/css/files.css
index 8e3a767721e..4d2b749bf8c 100644
--- a/files/css/files.css
+++ b/files/css/files.css
@@ -38,8 +38,8 @@
/* FILE TABLE */
#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; }
table { position:relative; top:37px; width:100%; }
-tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#f8f8f8; height:1em; }
-tbody tr { background-color:#fff; }
+tbody tr { background-color:#fff; height:2.5em; }
+tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#f8f8f8; }
tbody tr.selected { background-color:#eee; }
tbody a { color:#000; }
span.extention, span.uploading, td.date { color:#999; }
@@ -67,14 +67,14 @@ table td.filename .uploadtext { font-weight:normal; margin-left:.5em; }
table td.filename form { float:left; font-size:.85em; }
table thead.fixed tr{ position:fixed; top:6.5em; z-index:49; -moz-box-shadow:0 -3px 7px #ddd; -webkit-box-shadow:0 -3px 7px #ddd; box-shadow:0 -3px 7px #ddd; }
table thead.fixed { height:2em; }
-#fileList tr td.filename>input[type=checkbox]:first-child { opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; }
-#fileList tr td.filename>input[type="checkbox"]:hover:first-child { opacity:.8; }
+#fileList tr td.filename>input[type=checkbox]:first-child { opacity:0; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; }
+#fileList tr td.filename>input[type="checkbox"]:hover:first-child { opacity:.8; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; }
#fileList tr td.filename>input[type="checkbox"]:checked:first-child { opacity:1; }
#fileList tr td.filename { -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; }
#select_all { float:left; margin:.3em 0.6em 0 .5em; }
#uploadsize-message,#delete-confirm { display:none; }
-.selectedActions a,#fileList a.action { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
-a.action>img{ max-height:16px; max-width:16px; }
+.selectedActions a,#fileList a.action { display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
+a.action>img{ max-height:16px; max-width:16px; vertical-align:text-top; }
.selectedActions { display:none; }
/* add breadcrumb divider to the File item in navigation panel */
diff --git a/files/index.php b/files/index.php
index 9604f118c4b..84dbb9f343f 100644
--- a/files/index.php
+++ b/files/index.php
@@ -53,10 +53,10 @@ foreach( OC_Files::getdirectorycontent( $dir ) as $i ){
$fileinfo=pathinfo($i['name']);
$i['basename']=$fileinfo['filename'];
if (!empty($fileinfo['extension'])) {
- $i['extention']='.' . $fileinfo['extension'];
+ $i['extension']='.' . $fileinfo['extension'];
}
else {
- $i['extention']='';
+ $i['extension']='';
}
}
if($i['directory']=='/'){
@@ -100,6 +100,7 @@ $tmpl->assign( 'readonly', !OC_Filesystem::is_writable($dir));
$tmpl->assign( "files", $files );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign( 'uploadMaxHumanFilesize', OC_Helper::humanFileSize($maxUploadFilesize));
+$tmpl->assign( 'allowZipDownload', intval(OC_Config::getValue('allowZipDownload', true)));
$tmpl->printPage();
?>
diff --git a/files/js/admin.js b/files/js/admin.js
index 5cbb2b9f5ac..bfa96670635 100644
--- a/files/js/admin.js
+++ b/files/js/admin.js
@@ -1,15 +1,23 @@
-function switchPublicFolder()
+function switchPublicFolder()
{
- var publicEnable = $('#publicEnable').is(':checked');
- var sharingaimGroup = $('input:radio[name=sharingaim]'); //find all radiobuttons of that group
- $.each(sharingaimGroup, function(index, sharingaimItem) {
- sharingaimItem.disabled = !publicEnable; //set all buttons to the correct state
- });
+ var publicEnable = $('#publicEnable').is(':checked');
+ var sharingaimGroup = $('input:radio[name=sharingaim]'); //find all radiobuttons of that group
+ $.each(sharingaimGroup, function(index, sharingaimItem) {
+ sharingaimItem.disabled = !publicEnable; //set all buttons to the correct state
+ });
}
$(document).ready(function(){
- switchPublicFolder(); // Execute the function after loading DOM tree
- $('#publicEnable').click(function(){
- switchPublicFolder(); // To get rid of onClick()
- });
+ switchPublicFolder(); // Execute the function after loading DOM tree
+ $('#publicEnable').click(function(){
+ switchPublicFolder(); // To get rid of onClick()
+ });
+
+ $('#allowZipDownload').bind('change', function() {
+ if($('#allowZipDownload').attr('checked')) {
+ $('#maxZipInputSize').removeAttr('disabled');
+ } else {
+ $('#maxZipInputSize').attr('disabled', 'disabled');
+ }
+ });
});
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index 384ffc92cf2..07838261b87 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -59,6 +59,7 @@ FileActions={
if($('tr').filterAttr('data-file',file).data('renaming')){
return;
}
+ parent.children('a.name').append('<span class="fileactions" />');
var defaultAction=FileActions.getDefault(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
for(name in actions){
if((name=='Download' || actions[name]!=defaultAction) && name!='Delete'){
@@ -66,11 +67,10 @@ FileActions={
if(img.call){
img=img(file);
}
- var html='<a href="#" title="'+name+'" class="action" style="display:none" />';
+ var html='<a href="#" class="action" style="display:none">';
+ if(img) { html+='<img src="'+img+'"/> '; }
+ html += name+'</a>';
var element=$(html);
- if(img){
- element.append($('<img src="'+img+'"/>'));
- }
element.data('action',name);
element.click(function(event){
event.stopPropagation();
@@ -81,7 +81,7 @@ FileActions={
action(currentFile);
});
element.hide();
- parent.children('a.name').append(element);
+ parent.find('a.name>span.fileactions').append(element);
}
}
if(actions['Delete']){
@@ -89,7 +89,7 @@ FileActions={
if(img.call){
img=img(file);
}
- var html='<a href="#" title="Delete" class="action" style="display:none" />';
+ var html='<a href="#" original-title="Delete" class="action delete" style="display:none" />';
var element=$(html);
if(img){
element.append($('<img src="'+img+'"/>'));
@@ -106,14 +106,14 @@ FileActions={
element.hide();
parent.parent().children().last().append(element);
}
- $('#fileList .action').css('-o-transition-property','none');//temporarly disable
+ $('#fileList .action').css('-o-transition-property','none');//temporarly disable
$('#fileList .action').fadeIn(200,function(){
$('#fileList .action').css('-o-transition-property','opacity');
});
return false;
},
hide:function(){
- $('#fileList .action').fadeOut(200,function(){
+ $('#fileList span.fileactions').fadeOut(200,function(){
$(this).remove();
});
},
@@ -128,8 +128,15 @@ FileActions={
}
}
-FileActions.register('all','Download',function(){return OC.imagePath('core','actions/download')},function(filename){
- window.location='ajax/download.php?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val());
+$(document).ready(function(){
+ if($('#allowZipDownload').val() == 1){
+ var downloadScope = 'all';
+ } else {
+ var downloadScope = 'file';
+ }
+ FileActions.register(downloadScope,'Download',function(){return OC.imagePath('core','actions/download')},function(filename){
+ window.location='ajax/download.php?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val());
+ });
});
FileActions.register('all','Delete',function(){return OC.imagePath('core','actions/delete')},function(filename){
@@ -157,4 +164,4 @@ FileActions.register('dir','Open','',function(filename){
window.location='index.php?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
});
-FileActions.setDefault('dir','Open');
+FileActions.setDefault('dir','Open');
diff --git a/files/js/filelist.js b/files/js/filelist.js
index 0faff08a73f..c8ceb474413 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -7,15 +7,15 @@ FileList={
var html='<tr data-type="file" data-size="'+size+'">';
if(name.indexOf('.')!=-1){
var basename=name.substr(0,name.lastIndexOf('.'));
- var extention=name.substr(name.lastIndexOf('.'));
+ var extension=name.substr(name.lastIndexOf('.'));
}else{
var basename=name;
- var extention=false;
+ var extension=false;
}
html+='<td class="filename" style="background-image:url('+img+')"><input type="checkbox" />';
html+='<a class="name" href="download.php?file='+$('#dir').val()+'/'+name+'"><span class="nametext">'+basename
- if(extention){
- html+='<span class="extention">'+extention+'</span>';
+ if(extension){
+ html+='<span class="extension">'+extension+'</span>';
}
html+='</span></a></td>';
if(size!='Pending'){
@@ -148,7 +148,7 @@ FileList={
span.text(basename);
td.children('a.name').append(span);
if(newname.indexOf('.')>0){
- span.append($('<span class="extention">'+newname.substr(newname.lastIndexOf('.'))+'</span>'));
+ span.append($('<span class="extension">'+newname.substr(newname.lastIndexOf('.'))+'</span>'));
}
$.get(OC.filePath('files','ajax','rename.php'), { dir : $('#dir').val(), newname: newname, file: name },function(){
tr.data('renaming',false);
diff --git a/files/js/files.js b/files/js/files.js
index 6eed25dfe99..89101ce4b8f 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -25,11 +25,11 @@ $(document).ready(function() {
//little hack to set unescape filenames in attribute
$(this).attr('data-file',decodeURIComponent($(this).attr('data-file')));
});
-
+
if($('tr[data-file]').length==0){
$('.file_upload_filename').addClass('highlight');
}
-
+
$('#file_action_panel').attr('activeAction', false);
//drag/drop of files
@@ -38,7 +38,7 @@ $(document).ready(function() {
$('div.crumb').droppable(crumbDropOptions);
$('ul#apps>li:first-child').data('dir','');
$('ul#apps>li:first-child').droppable(crumbDropOptions);
-
+
// Triggers invisible file input
$('.file_upload_button_wrapper').live('click', function() {
$(this).parent().children('.file_upload_start').trigger('click');
@@ -103,9 +103,9 @@ $(document).ready(function() {
}
}
}
-
+
});
-
+
// Sets the select_all checkbox behaviour :
$('#select_all').click(function() {
if($(this).attr('checked')){
@@ -119,8 +119,8 @@ $(document).ready(function() {
}
procesSelection();
});
-
- $('td.filename input:checkbox').live('click',function(event) {
+
+ $('td.filename input:checkbox').live('change',function(event) {
if (event.shiftKey) {
var last = $(lastChecked).parent().parent().prevAll().length;
var first = $(this).parent().parent().prevAll().length;
@@ -148,23 +148,22 @@ $(document).ready(function() {
}
procesSelection();
});
-
+
$('#file_newfolder_name').click(function(){
if($('#file_newfolder_name').val() == 'New Folder'){
$('#file_newfolder_name').val('');
}
});
-
+
$('.download').click('click',function(event) {
var files=getSelectedFiles('name').join(';');
-
- //send the browser to the download location
var dir=$('#dir').val()||'/';
-// alert(files);
+ $('#notification').text(t('files','generating ZIP-file, it may take some time.'));
+ $('#notification').fadeIn();
window.location='ajax/download.php?files='+encodeURIComponent(files)+'&dir='+encodeURIComponent(dir);
return false;
});
-
+
$('.delete').click(function(event) {
var files=getSelectedFiles('name');
event.preventDefault();
@@ -354,7 +353,6 @@ $(document).ready(function() {
})
});
-
//add multiply file upload attribute to all browsers except konqueror (which crashes when it's used)
if(navigator.userAgent.search(/konqueror/i)==-1){
$('.file_upload_start').attr('multiple','multiple')
@@ -381,7 +379,7 @@ $(document).ready(function() {
text=text.substr(0,text.length-6)+'...';
crumb.text(text);
}
-
+
$(window).click(function(){
$('#new>ul').hide();
$('#new').removeClass('active');
@@ -405,14 +403,14 @@ $(document).ready(function() {
if($(this).children('p').length==0){
return;
}
-
+
$('#new li').each(function(i,element){
if($(element).children('p').length==0){
$(element).children('input').remove();
$(element).append('<p>'+$(element).data('text')+'</p>');
}
});
-
+
var type=$(this).data('type');
var text=$(this).children('p').text();
$(this).data('text',text);
@@ -474,7 +472,7 @@ $(document).ready(function() {
tr.find('td.filename').attr('style','background-image:url('+path+')');
});
}else{
-
+
}
}
);
@@ -544,7 +542,7 @@ var folderDropOptions={
var dir=$('#dir').val();
$.ajax({
url: 'ajax/move.php',
- data: "dir="+dir+"&file="+file+'&target='+dir+'/'+target,
+ data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(dir)+'/'+encodeURIComponent(target),
complete: function(data){boolOperationFinished(data, function(){
var el = $('#fileList tr').filterAttr('data-file',file).find('td.filename');
el.draggable('destroy');
@@ -570,7 +568,7 @@ var crumbDropOptions={
}
$.ajax({
url: 'ajax/move.php',
- data: "dir="+dir+"&file="+file+'&target='+target,
+ data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(target),
complete: function(data){boolOperationFinished(data, function(){
FileList.remove(file);
});}
diff --git a/files/templates/admin.php b/files/templates/admin.php
index 0122865ee72..9bcc40e9361 100644
--- a/files/templates/admin.php
+++ b/files/templates/admin.php
@@ -1,10 +1,15 @@
<?php OC_Util::addScript('files','admin'); ?>
<form name="filesForm" action='#' method='post'>
- <?php if($_['htaccessWorking']):?>
- <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/><br/>
- <input type='submit' value='Save'/>
- <?php else:?>
- No settings currently available.
- <?php endif;?>
+ <fieldset class="personalblock">
+ <legend><strong><?php echo $l->t('File handling');?></strong></legend>
+ <?php if($_['htaccessWorking']):?>
+ <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>(<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/>
+ <?php endif;?>
+ <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"<?php if ($_['allowZipDownload']) echo ' checked="checked"'; ?> /> <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label> <br/>
+ <fieldset class="personalblock">
+ <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files:' ); ?> </label><input name="maxZipInputSize" id="maxZipInputSize" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> /><br/>
+ </fieldset>
+ <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" value="Save"/>
+ </fieldset>
</form>
diff --git a/files/templates/index.php b/files/templates/index.php
index 319c8c64a07..2a09c309045 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -1,3 +1,4 @@
+<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]-->
<div id="controls">
<?php echo($_['breadcrumb']); ?>
<?php if (!isset($_['readonly']) || !$_['readonly']):?>
@@ -45,7 +46,9 @@
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" id="select_all" /><?php } ?>
<span class='name'><?php echo $l->t( 'Name' ); ?></span>
<span class='selectedActions'>
- <a href="" title="<?php echo $l->t('Download')?>" class="download"><img class='svg' alt="Download" src="<?php echo image_path("core", "actions/download.svg"); ?>" /></a>
+ <?php if($_['allowZipDownload']) : ?>
+ <a href="" title="<?php echo $l->t('Download')?>" class="download"><img class='svg' alt="Download" src="<?php echo image_path("core", "actions/download.svg"); ?>" /></a>
+ <?php endif; ?>
<a href="" title="Share" class="share"><img class='svg' alt="Share" src="<?php echo image_path("core", "actions/share.svg"); ?>" /></a>
</span>
</th>
@@ -65,9 +68,12 @@
</div>
<div id="scanning-message">
<h3>
- <?php echo $l->t('Files are being scanned, please wait.');?> <span id='scan-count'></spann>
+ <?php echo $l->t('Files are being scanned, please wait.');?> <span id='scan-count'></span>
</h3>
<p>
- <?php echo $l->t('Current scanning');?> <span id='scan-current'></spann>
+ <?php echo $l->t('Current scanning');?> <span id='scan-current'></span>
</p>
</div>
+
+<!-- config hints for javascript -->
+<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo $_['allowZipDownload']; ?>" />
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index a86632bafc8..b2db4cbb8df 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -18,7 +18,7 @@
<?php if($file['type'] == 'dir'):?>
<?php echo htmlspecialchars($file['name']);?>
<?php else:?>
- <?php echo htmlspecialchars($file['basename']);?><span class='extention'><?php echo $file['extention'];?></span>
+ <?php echo htmlspecialchars($file['basename']);?><span class='extension'><?php echo $file['extension'];?></span>
<?php endif;?>
</span>
<?php if($file['type'] == 'dir'):?>
diff --git a/files/webdav.php b/files/webdav.php
index 6fae33a8f71..25e33024470 100644
--- a/files/webdav.php
+++ b/files/webdav.php
@@ -26,6 +26,9 @@
// Do not load FS ...
$RUNTIME_NOSETUPFS = true;
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem','authentication');
+
require_once('../lib/base.php');
// Backends