Compare commits
235 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2020f35c6a | |||
| cc495ed6d8 | |||
| f2911e76bc | |||
| 726350ea97 | |||
| 9a53d50e16 | |||
| bc767f1899 | |||
| 35b1f40ba4 | |||
| a23e8833c3 | |||
| 8875bae0c3 | |||
| 144977352d | |||
| 35da6f25b1 | |||
| c43ec33ecb | |||
| 08561da5b6 | |||
| d6fe8f213d | |||
| dd8c1f7759 | |||
| 7ff26af107 | |||
| 44fedae69f | |||
| ffb91cdd66 | |||
| 1dfb757593 | |||
| c0047b9079 | |||
| 0d5c82cd2a | |||
| e3c7386be4 | |||
| 5db33b47c2 | |||
| 6c26143516 | |||
| 9c605c3fd1 | |||
| 0639634782 | |||
| 7d5b8e85ac | |||
| c99b667021 | |||
| c08c22aa54 | |||
| cbd216414a | |||
| 5428086204 | |||
| b38a1adf2d | |||
| a5978ad544 | |||
| b24e6f11ba | |||
| d642480c55 | |||
| 556ea61f8e | |||
| 3bcd10a97c | |||
| 54a3038dc0 | |||
| a6ece109ba | |||
| 4c008a8f92 | |||
| 2030037301 | |||
| 794ed99927 | |||
| 65c7746504 | |||
| faa51bd002 | |||
| d9f10e2c26 | |||
| 8d92aaf3b7 | |||
| 9894145f8d | |||
| deba972093 | |||
| 41dc1fee68 | |||
| 72ea678c0e | |||
| ff49824312 | |||
| bb3d39f728 | |||
| a7f1269f92 | |||
| 7ae0e38c4f | |||
| b626e514f7 | |||
| 3e8beddfe3 | |||
| 18d515450a | |||
| 969bcb3ced | |||
| 1d255ebf70 | |||
| 9aae21db79 | |||
| 536117da2a | |||
| 29054c27c9 | |||
| 207bf4bffe | |||
| 4e11814a0c | |||
| 32667f8c38 | |||
| 1c06bec262 | |||
| a82965edf2 | |||
| 76f12567be | |||
| d7cbf45d15 | |||
| 05a2f31352 | |||
| 811d649262 | |||
| 6e32fc1db7 | |||
| e718a728c4 | |||
| a065ae5db2 | |||
| 623db8549e | |||
| 16ef7c62dc | |||
| 0978ebd195 | |||
| 1ddfefed3f | |||
| 16b62c697f | |||
| f70b1c1b0d | |||
| b400c29944 | |||
| 86d8b831f2 | |||
| 5fbb8b374d | |||
| 0a3e87c890 | |||
| 2220802cdd | |||
| 0ff7aa4436 | |||
| 5e817584db | |||
| fbcb4b2673 | |||
| edae196f34 | |||
| 11dcc29c0c | |||
| d068325bdb | |||
| 6dc66e14fb | |||
| 30d5c70180 | |||
| e9c3caeb9b | |||
| 9a0344f1d5 | |||
| 33b27362ff | |||
| 15c50017cc | |||
| c43e33cdf5 | |||
| ef1481c7bb | |||
| 892d85556b | |||
| 5fb891e20a | |||
| c241985f04 | |||
| 9a4fe09979 | |||
| e26cdc4cdd | |||
| 317b00988a | |||
| 9159d55639 | |||
| 06ab314c15 | |||
| f26a4e0b80 | |||
| 2c3d66c776 | |||
| aef66e06b3 | |||
| 67a84ad487 | |||
| 440148aa1f | |||
| b35148bbb6 | |||
| 5ef8762886 | |||
| b52666567a | |||
| 1e580bf04b | |||
| 2a5599b3e0 | |||
| f82799cf7d | |||
| e6d286b449 | |||
| dc3a7e09af | |||
| 5add001373 | |||
| 5317e7071e | |||
| f5592cc88e | |||
| 09f11c2679 | |||
| db48f5302a | |||
| 4cd4bbd489 | |||
| 7b42c20180 | |||
| 835df6c177 | |||
| 5268aadb62 | |||
| d7dccfb648 | |||
| cc204a608a | |||
| 22c8194cc8 | |||
| 8231f657d9 | |||
| 4f9f5a41b1 | |||
| 5944ee6ebe | |||
| e1b6574ce7 | |||
| c16860e648 | |||
| d4a492d321 | |||
| a004266b7c | |||
| da96d1adb0 | |||
| ed39e47c9d | |||
| b9213cf451 | |||
| f308b0e321 | |||
| eeebf21fce | |||
| 75d944f96a | |||
| 9bfdfdf071 | |||
| 2bb22d3aab | |||
| 4742d0eb94 | |||
| c901709d53 | |||
| 84bc4c175a | |||
| 4d50a21eb4 | |||
| 37971133f1 | |||
| c962f9db47 | |||
| 6333036a1a | |||
| 73758c1f78 | |||
| 7e9e94d8d7 | |||
| 07d0245336 | |||
| 0bbac66ec5 | |||
| 4411de0dbf | |||
| 871bbbba8a | |||
| 4384cf70da | |||
| e0cf61dfc8 | |||
| 2387fbd9dd | |||
| 0b6b5e807c | |||
| b2b78228d6 | |||
| 2e5829445f | |||
| e63a12a481 | |||
| 56302ff9cf | |||
| 707de3e644 | |||
| 19a65f6c3f | |||
| 011ab3a11c | |||
| ad62d89f2b | |||
| 9b84c50f15 | |||
| 01ffa519d5 | |||
| fe73b5919d | |||
| 5ad7eb080e | |||
| 2ce8329503 | |||
| 83e5383912 | |||
| 660d204cbf | |||
| d091db4bc7 | |||
| d61e820285 | |||
| 85613cc66c | |||
| 0fb9cc3c25 | |||
| 76e5ffaa92 | |||
| 9a26b1e0a6 | |||
| bfd69dc8e0 | |||
| 0d075df15e | |||
| c82f43ee55 | |||
| 0eaf141528 | |||
| ee0dab1b13 | |||
| 98ee292c93 | |||
| 4ff5658475 | |||
| 7de540b8ee | |||
| 9a41453254 | |||
| 707b319157 | |||
| f7911412e0 | |||
| 1cb3872df0 | |||
| 432fb55d91 | |||
| 98c5d10bb5 | |||
| 84a2be1aad | |||
| 9e383db75b | |||
| c12b30f7a2 | |||
| 5bf111e75f | |||
| f42d98edab | |||
| d392aa81c7 | |||
| 532e5463db | |||
| cfea3ce2d7 | |||
| 2c76ee1c8b | |||
| 9a2c1cbcc3 | |||
| e6616ed758 | |||
| b51b41468d | |||
| 6f86802a48 | |||
| 0c6c175d62 | |||
| 885b81ba23 | |||
| fc86815a2c | |||
| 6ca2abc108 | |||
| 0fe2f81a0c | |||
| 2cd52e52c8 | |||
| d06fec658c | |||
| 049329588f | |||
| 09d3b9ef26 | |||
| 92ce2bf89b | |||
| ca93f6e1de | |||
| d166471a46 | |||
| 896c56996e | |||
| 6017ca5ddd | |||
| eedc1e76db | |||
| 510cbc4ff9 | |||
| 9b9497bedf | |||
| 8846edd919 | |||
| 253f7ec932 | |||
| 8bafcd1414 | |||
| 40bb805b83 | |||
| 00030a6c24 | |||
| 2afece459a |
@@ -32,5 +32,8 @@ RewriteRule ^remote/(.*) remote.php [QSA,L]
|
||||
AddType image/svg+xml svg svgz
|
||||
AddEncoding gzip svgz
|
||||
</IfModule>
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.php index.html
|
||||
</IfModule>
|
||||
AddDefaultCharset utf-8
|
||||
Options -Indexes
|
||||
|
||||
@@ -8,7 +8,7 @@ OCP\JSON::callCheck();
|
||||
|
||||
// Get data
|
||||
$dir = stripslashes($_POST["dir"]);
|
||||
$files = isset($_POST["file"]) ? stripslashes($_POST["file"]) : stripslashes($_POST["files"]);
|
||||
$files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
|
||||
|
||||
$files = json_decode($files);
|
||||
$filesWithError = '';
|
||||
|
||||
@@ -12,3 +12,10 @@ OCP\App::addNavigationEntry( array( "id" => "files_index",
|
||||
"name" => $l->t("Files") ));
|
||||
|
||||
OC_Search::registerProvider('OC_Search_Provider_File');
|
||||
|
||||
// cache hooks must be connected before all other apps.
|
||||
// since 'files' is always loaded first the hooks need to be connected here
|
||||
\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook');
|
||||
\OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook');
|
||||
\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook');
|
||||
\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook');
|
||||
@@ -84,7 +84,7 @@ table td.filename input.filename { width:100%; cursor:text; }
|
||||
table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 0; }
|
||||
table td.filename .nametext, .uploadtext, .modified { float:left; padding:.3em 0; }
|
||||
/* TODO fix usability bug (accidental file/folder selection) */
|
||||
table td.filename .nametext { overflow:hidden; text-overflow:ellipsis; }
|
||||
table td.filename .nametext { overflow:hidden; text-overflow:ellipsis; max-width:800px; }
|
||||
table td.filename .uploadtext { font-weight:normal; margin-left:.5em; }
|
||||
table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; }
|
||||
|
||||
|
||||
@@ -22,18 +22,18 @@ var FileActions = {
|
||||
if (FileActions.actions.all) {
|
||||
actions = $.extend(actions, FileActions.actions.all);
|
||||
}
|
||||
if (mime) {
|
||||
if (FileActions.actions[mime]) {
|
||||
actions = $.extend(actions, FileActions.actions[mime]);
|
||||
if (type) {//type is 'dir' or 'file'
|
||||
if (FileActions.actions[type]) {
|
||||
actions = $.extend(actions, FileActions.actions[type]);
|
||||
}
|
||||
}
|
||||
if (mime) {
|
||||
var mimePart = mime.substr(0, mime.indexOf('/'));
|
||||
if (FileActions.actions[mimePart]) {
|
||||
actions = $.extend(actions, FileActions.actions[mimePart]);
|
||||
}
|
||||
}
|
||||
if (type) {//type is 'dir' or 'file'
|
||||
if (FileActions.actions[type]) {
|
||||
actions = $.extend(actions, FileActions.actions[type]);
|
||||
if (FileActions.actions[mime]) {
|
||||
actions = $.extend(actions, FileActions.actions[mime]);
|
||||
}
|
||||
}
|
||||
var filteredActions = {};
|
||||
@@ -112,7 +112,8 @@ var FileActions = {
|
||||
addAction(name, action);
|
||||
}
|
||||
});
|
||||
if(actions.Share){
|
||||
if(actions.Share && !($('#dir').val() === '/' && file === 'Shared')){
|
||||
// t('files', 'Share')
|
||||
addAction('Share', actions.Share);
|
||||
}
|
||||
|
||||
|
||||
+35
-10
@@ -115,6 +115,11 @@ $(document).ready(function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
// Trigger cancelling of file upload
|
||||
$('#uploadprogresswrapper .stop').on('click', function() {
|
||||
Files.cancelUploads();
|
||||
});
|
||||
|
||||
// Show trash bin
|
||||
$('#trash a').live('click', function() {
|
||||
window.location=OC.filePath('files_trashbin', '', 'index.php');
|
||||
@@ -226,14 +231,14 @@ $(document).ready(function() {
|
||||
OC.Notification.show(t('files','Your download is being prepared. This might take some time if the files are big.'));
|
||||
// use special download URL if provided, e.g. for public shared files
|
||||
if ( (downloadURL = document.getElementById("downloadURL")) ) {
|
||||
window.location=downloadURL.value+"&download&files="+files;
|
||||
window.location=downloadURL.value+"&download&files="+encodeURIComponent(fileslist);
|
||||
} else {
|
||||
window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: fileslist });
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.delete').click(function(event) {
|
||||
$('.delete-selected').click(function(event) {
|
||||
var files=getSelectedFiles('name');
|
||||
event.preventDefault();
|
||||
FileList.do_delete(files);
|
||||
@@ -407,7 +412,9 @@ $(document).ready(function() {
|
||||
$('tr').filterAttr('data-file',file.name).data('mime',file.mime).data('id',file.id);
|
||||
var size = $('tr').filterAttr('data-file',file.name).find('td.filesize').text();
|
||||
if(size==t('files','Pending')){
|
||||
$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size);
|
||||
var sizeElement = $('tr').filterAttr('data-file',file.name).find('td.filesize');
|
||||
sizeElement.text(simpleFileSize(file.size));
|
||||
sizeElement.attr('title',humanFileSize(file.size));
|
||||
}
|
||||
//TODO update file upload size limit
|
||||
FileList.loadingDone(file.name, file.id);
|
||||
@@ -438,7 +445,9 @@ $(document).ready(function() {
|
||||
$('tr').filterAttr('data-file',file.name).data('mime',file.mime).data('id',file.id);
|
||||
var size = $('tr').filterAttr('data-file',file.name).find('td.filesize').text();
|
||||
if(size==t('files','Pending')){
|
||||
$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size);
|
||||
var sizeElement = $('tr').filterAttr('data-file',file.name).find('td.filesize');
|
||||
sizeElement.text(simpleFileSize(file.size));
|
||||
sizeElement.attr('title',humanFileSize(file.size));
|
||||
}
|
||||
//TODO update file upload size limit
|
||||
FileList.loadingDone(file.name, file.id);
|
||||
@@ -459,6 +468,10 @@ $(document).ready(function() {
|
||||
// TODO: show nice progress bar in file row
|
||||
},
|
||||
progressall: function(e, data) {
|
||||
//IE < 10 does not fire the necessary events for the progress bar.
|
||||
if($.browser.msie && parseInt($.browser.version) < 10) {
|
||||
return;
|
||||
}
|
||||
var progress = (data.loaded/data.total)*100;
|
||||
$('#uploadprogressbar').progressbar('value',progress);
|
||||
},
|
||||
@@ -477,6 +490,11 @@ $(document).ready(function() {
|
||||
if(data.dataType != 'iframe ') {
|
||||
$('#upload input.stop').hide();
|
||||
}
|
||||
//IE < 10 does not fire the necessary events for the progress bar.
|
||||
if($.browser.msie && parseInt($.browser.version) < 10) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#uploadprogressbar').progressbar('value',100);
|
||||
$('#uploadprogressbar').fadeOut();
|
||||
}
|
||||
@@ -637,12 +655,19 @@ $(document).ready(function() {
|
||||
localName=(localName.match(/:\/\/(.[^/]+)/)[1]).replace('www.','');
|
||||
}
|
||||
localName = getUniqueName(localName);
|
||||
$('#uploadprogressbar').progressbar({value:0});
|
||||
$('#uploadprogressbar').fadeIn();
|
||||
//IE < 10 does not fire the necessary events for the progress bar.
|
||||
if($.browser.msie && parseInt($.browser.version) < 10) {
|
||||
} else {
|
||||
$('#uploadprogressbar').progressbar({value:0});
|
||||
$('#uploadprogressbar').fadeIn();
|
||||
}
|
||||
|
||||
var eventSource=new OC.EventSource(OC.filePath('files','ajax','newfile.php'),{dir:$('#dir').val(),source:name,filename:localName});
|
||||
eventSource.listen('progress',function(progress){
|
||||
$('#uploadprogressbar').progressbar('value',progress);
|
||||
if($.browser.msie && parseInt($.browser.version) < 10) {
|
||||
} else {
|
||||
$('#uploadprogressbar').progressbar('value',progress);
|
||||
}
|
||||
});
|
||||
eventSource.listen('success',function(data){
|
||||
var mime=data.mime;
|
||||
@@ -839,9 +864,9 @@ var createDragShadow = function(event){
|
||||
var dir=$('#dir').val();
|
||||
|
||||
$(selectedFiles).each(function(i,elem){
|
||||
var newtr = $('<tr data-dir="'+dir+'" data-filename="'+elem.name+'">'
|
||||
+'<td class="filename">'+elem.name+'</td><td class="size">'+humanFileSize(elem.size)+'</td>'
|
||||
+'</tr>');
|
||||
var newtr = $('<tr/>').attr('data-dir', dir).attr('data-filename', elem.name);
|
||||
newtr.append($('<td/>').addClass('filename').text(elem.name));
|
||||
newtr.append($('<td/>').addClass('size').text(humanFileSize(elem.size)));
|
||||
tbody.append(newtr);
|
||||
if (elem.type === 'dir') {
|
||||
newtr.find('td.filename').attr('style','background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')');
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
"No file was uploaded" => "لم يتم ترفيع أي من الملفات",
|
||||
"Missing a temporary folder" => "المجلد المؤقت غير موجود",
|
||||
"Files" => "الملفات",
|
||||
"Share" => "شارك",
|
||||
"Delete permanently" => "حذف بشكل دائم",
|
||||
"Delete" => "محذوف",
|
||||
"Close" => "إغلق",
|
||||
"Name" => "الاسم",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"Failed to write to disk" => "Възникна проблем при запис в диска",
|
||||
"Invalid directory." => "Невалидна директория.",
|
||||
"Files" => "Файлове",
|
||||
"Share" => "Споделяне",
|
||||
"Delete permanently" => "Изтриване завинаги",
|
||||
"Delete" => "Изтриване",
|
||||
"Rename" => "Преименуване",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Failed to write to disk" => "ডিস্কে লিখতে ব্যর্থ",
|
||||
"Invalid directory." => "ভুল ডিরেক্টরি",
|
||||
"Files" => "ফাইল",
|
||||
"Share" => "ভাগাভাগি কর",
|
||||
"Delete" => "মুছে ফেল",
|
||||
"Rename" => "পূনঃনামকরণ",
|
||||
"Pending" => "মুলতুবি",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "No hi ha prou espai disponible",
|
||||
"Invalid directory." => "Directori no vàlid.",
|
||||
"Files" => "Fitxers",
|
||||
"Share" => "Comparteix",
|
||||
"Delete permanently" => "Esborra permanentment",
|
||||
"Delete" => "Suprimeix",
|
||||
"Rename" => "Reanomena",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Nedostatek dostupného úložného prostoru",
|
||||
"Invalid directory." => "Neplatný adresář",
|
||||
"Files" => "Soubory",
|
||||
"Share" => "Sdílet",
|
||||
"Delete permanently" => "Trvale odstranit",
|
||||
"Delete" => "Smazat",
|
||||
"Rename" => "Přejmenovat",
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Could not move %s - File with this name already exists" => "Methwyd symud %s - Mae ffeil gyda'r enw hwn eisoes yn bodoli",
|
||||
"Could not move %s" => "Methwyd symud %s",
|
||||
"Unable to rename file" => "Methu ailenwi ffeil",
|
||||
"No file was uploaded. Unknown error" => "Ni lwythwyd ffeil i fyny. Gwall anhysbys.",
|
||||
"There is no error, the file uploaded with success" => "Does dim gwall, llwythodd y ffeil i fyny'n llwyddiannus",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Mae'r ffeil lwythwyd i fyny'n fwy na chyfarwyddeb upload_max_filesize yn php.ini:",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Mae'r ffeil lwythwyd i fyny'n fwy na chyfarwyddeb MAX_FILE_SIZE bennwyd yn y ffurflen HTML",
|
||||
"The uploaded file was only partially uploaded" => "Dim ond yn rhannol y llwythwyd y ffeil i fyny",
|
||||
"No file was uploaded" => "Ni lwythwyd ffeil i fyny",
|
||||
"Missing a temporary folder" => "Plygell dros dro yn eisiau",
|
||||
"Failed to write to disk" => "Methwyd ysgrifennu i'r ddisg",
|
||||
"Not enough storage available" => "Dim digon o le storio ar gael",
|
||||
"Invalid directory." => "Cyfeiriadur annilys.",
|
||||
"Files" => "Ffeiliau",
|
||||
"Share" => "Rhannu",
|
||||
"Delete permanently" => "Dileu'n barhaol",
|
||||
"Delete" => "Dileu",
|
||||
"Rename" => "Ailenwi",
|
||||
"Pending" => "I ddod",
|
||||
"{new_name} already exists" => "{new_name} yn bodoli'n barod",
|
||||
"replace" => "amnewid",
|
||||
"suggest name" => "awgrymu enw",
|
||||
"cancel" => "diddymu",
|
||||
"replaced {new_name} with {old_name}" => "newidiwyd {new_name} yn lle {old_name}",
|
||||
"undo" => "dadwneud",
|
||||
"perform delete operation" => "cyflawni gweithred dileu",
|
||||
"1 file uploading" => "1 ffeil yn llwytho i fyny",
|
||||
"files uploading" => "ffeiliau'n llwytho i fyny",
|
||||
"'.' is an invalid file name." => "Mae '.' yn enw ffeil annilys.",
|
||||
"File name cannot be empty." => "Does dim hawl cael enw ffeil gwag.",
|
||||
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Enw annilys, ni chaniateir, '\\', '/', '<', '>', ':', '\"', '|', '?' na '*'.",
|
||||
"Your storage is full, files can not be updated or synced anymore!" => "Mae eich storfa'n llawn, ni ellir diweddaru a chydweddu ffeiliau mwyach!",
|
||||
"Your storage is almost full ({usedSpacePercent}%)" => "Mae eich storfa bron a bod yn llawn ({usedSpacePercent}%)",
|
||||
"Your download is being prepared. This might take some time if the files are big." => "Wrthi'n paratoi i lwytho i lawr. Gall gymryd peth amser os yw'r ffeiliau'n fawr.",
|
||||
"Unable to upload your file as it is a directory or has 0 bytes" => "Methu llwytho'ch ffeil i fyny gan ei fod yn gyferiadur neu'n cynnwys 0 beit",
|
||||
"Not enough space available" => "Dim digon o le ar gael",
|
||||
"Upload cancelled." => "Diddymwyd llwytho i fyny.",
|
||||
"File upload is in progress. Leaving the page now will cancel the upload." => "Mae ffeiliau'n cael eu llwytho i fyny. Bydd gadael y dudalen hon nawr yn diddymu'r broses.",
|
||||
"URL cannot be empty." => "Does dim hawl cael URL gwag.",
|
||||
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Enw plygell annilys. Mae'r defnydd o 'Shared' yn cael ei gadw gan Owncloud",
|
||||
"Error" => "Gwall",
|
||||
"Name" => "Enw",
|
||||
"Size" => "Maint",
|
||||
"Modified" => "Addaswyd",
|
||||
"1 folder" => "1 blygell",
|
||||
"{count} folders" => "{count} plygell",
|
||||
"1 file" => "1 ffeil",
|
||||
"{count} files" => "{count} ffeil",
|
||||
"Upload" => "Llwytho i fyny",
|
||||
"File handling" => "Trafod ffeiliau",
|
||||
"Maximum upload size" => "Maint mwyaf llwytho i fyny",
|
||||
"max. possible: " => "mwyaf. posib:",
|
||||
"Needed for multi-file and folder downloads." => "Angen ar gyfer llwytho mwy nag un ffeil neu blygell i lawr yr un pryd.",
|
||||
"Enable ZIP-download" => "Galluogi llwytho i lawr ZIP",
|
||||
"0 is unlimited" => "0 yn ddiderfyn",
|
||||
"Maximum input size for ZIP files" => "Maint mewnbynnu mwyaf ffeiliau ZIP",
|
||||
"Save" => "Cadw",
|
||||
"New" => "Newydd",
|
||||
"Text file" => "Ffeil destun",
|
||||
"Folder" => "Plygell",
|
||||
"From link" => "Dolen o",
|
||||
"Deleted files" => "Ffeiliau ddilewyd",
|
||||
"Cancel upload" => "Diddymu llwytho i fyny",
|
||||
"You don’t have write permissions here." => "Nid oes gennych hawliau ysgrifennu fan hyn.",
|
||||
"Nothing in here. Upload something!" => "Does dim byd fan hyn. Llwythwch rhywbeth i fyny!",
|
||||
"Download" => "Llwytho i lawr",
|
||||
"Unshare" => "Dad-rannu",
|
||||
"Upload too large" => "Maint llwytho i fyny'n rhy fawr",
|
||||
"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Mae'r ffeiliau rydych yn ceisio llwytho i fyny'n fwy na maint mwyaf llwytho ffeiliau i fyny ar y gweinydd hwn.",
|
||||
"Files are being scanned, please wait." => "Arhoswch, mae ffeiliau'n cael eu sganio.",
|
||||
"Current scanning" => "Sganio cyfredol",
|
||||
"Upgrading filesystem cache..." => "Uwchraddio storfa system ffeiliau..."
|
||||
);
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Der er ikke nok plads til rådlighed",
|
||||
"Invalid directory." => "Ugyldig mappe.",
|
||||
"Files" => "Filer",
|
||||
"Share" => "Del",
|
||||
"Delete permanently" => "Slet permanent",
|
||||
"Delete" => "Slet",
|
||||
"Rename" => "Omdøb",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Nicht genug Speicherplatz verfügbar",
|
||||
"Invalid directory." => "Ungültiges Verzeichnis.",
|
||||
"Files" => "Dateien",
|
||||
"Share" => "Teilen",
|
||||
"Delete permanently" => "Permanent löschen",
|
||||
"Delete" => "Löschen",
|
||||
"Rename" => "Umbenennen",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Nicht genug Speicher vorhanden.",
|
||||
"Invalid directory." => "Ungültiges Verzeichnis.",
|
||||
"Files" => "Dateien",
|
||||
"Share" => "Teilen",
|
||||
"Delete permanently" => "Entgültig löschen",
|
||||
"Delete" => "Löschen",
|
||||
"Rename" => "Umbenennen",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Μη επαρκής διαθέσιμος αποθηκευτικός χώρος",
|
||||
"Invalid directory." => "Μη έγκυρος φάκελος.",
|
||||
"Files" => "Αρχεία",
|
||||
"Share" => "Διαμοιρασμός",
|
||||
"Delete permanently" => "Μόνιμη διαγραφή",
|
||||
"Delete" => "Διαγραφή",
|
||||
"Rename" => "Μετονομασία",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Failed to write to disk" => "Malsukcesis skribo al disko",
|
||||
"Invalid directory." => "Nevalida dosierujo.",
|
||||
"Files" => "Dosieroj",
|
||||
"Share" => "Kunhavigi",
|
||||
"Delete" => "Forigi",
|
||||
"Rename" => "Alinomigi",
|
||||
"Pending" => "Traktotaj",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "No hay suficiente espacio disponible",
|
||||
"Invalid directory." => "Directorio invalido.",
|
||||
"Files" => "Archivos",
|
||||
"Share" => "Compartir",
|
||||
"Delete permanently" => "Eliminar permanentemente",
|
||||
"Delete" => "Eliminar",
|
||||
"Rename" => "Renombrar",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "No hay suficiente capacidad de almacenamiento",
|
||||
"Invalid directory." => "Directorio invalido.",
|
||||
"Files" => "Archivos",
|
||||
"Share" => "Compartir",
|
||||
"Delete permanently" => "Borrar de manera permanente",
|
||||
"Delete" => "Borrar",
|
||||
"Rename" => "Cambiar nombre",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"Not enough storage available" => "Saadaval pole piisavalt ruumi",
|
||||
"Invalid directory." => "Vigane kaust.",
|
||||
"Files" => "Failid",
|
||||
"Share" => "Jaga",
|
||||
"Delete permanently" => "Kustuta jäädavalt",
|
||||
"Delete" => "Kustuta",
|
||||
"Rename" => "ümber",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Ez dago behar aina leku erabilgarri,",
|
||||
"Invalid directory." => "Baliogabeko karpeta.",
|
||||
"Files" => "Fitxategiak",
|
||||
"Share" => "Elkarbanatu",
|
||||
"Delete permanently" => "Ezabatu betirako",
|
||||
"Delete" => "Ezabatu",
|
||||
"Rename" => "Berrizendatu",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Failed to write to disk" => "نوشتن بر روی دیسک سخت ناموفق بود",
|
||||
"Invalid directory." => "فهرست راهنما نامعتبر می باشد.",
|
||||
"Files" => "فایل ها",
|
||||
"Share" => "اشتراکگذاری",
|
||||
"Delete permanently" => "حذف قطعی",
|
||||
"Delete" => "پاک کردن",
|
||||
"Rename" => "تغییرنام",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Not enough storage available" => "Tallennustilaa ei ole riittävästi käytettävissä",
|
||||
"Invalid directory." => "Virheellinen kansio.",
|
||||
"Files" => "Tiedostot",
|
||||
"Share" => "Jaa",
|
||||
"Delete permanently" => "Poista pysyvästi",
|
||||
"Delete" => "Poista",
|
||||
"Rename" => "Nimeä uudelleen",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Plus assez d'espace de stockage disponible",
|
||||
"Invalid directory." => "Dossier invalide.",
|
||||
"Files" => "Fichiers",
|
||||
"Share" => "Partager",
|
||||
"Delete permanently" => "Supprimer de façon définitive",
|
||||
"Delete" => "Supprimer",
|
||||
"Rename" => "Renommer",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Non hai espazo de almacenamento abondo",
|
||||
"Invalid directory." => "O directorio é incorrecto.",
|
||||
"Files" => "Ficheiros",
|
||||
"Share" => "Compartir",
|
||||
"Delete permanently" => "Eliminar permanentemente",
|
||||
"Delete" => "Eliminar",
|
||||
"Rename" => "Renomear",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"Missing a temporary folder" => "תיקייה זמנית חסרה",
|
||||
"Failed to write to disk" => "הכתיבה לכונן נכשלה",
|
||||
"Files" => "קבצים",
|
||||
"Share" => "שתף",
|
||||
"Delete permanently" => "מחק לצמיתות",
|
||||
"Delete" => "מחיקה",
|
||||
"Rename" => "שינוי שם",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"Missing a temporary folder" => "Nedostaje privremena mapa",
|
||||
"Failed to write to disk" => "Neuspjelo pisanje na disk",
|
||||
"Files" => "Datoteke",
|
||||
"Share" => "Podijeli",
|
||||
"Delete" => "Briši",
|
||||
"Rename" => "Promjeni ime",
|
||||
"Pending" => "U tijeku",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Nincs elég szabad hely.",
|
||||
"Invalid directory." => "Érvénytelen mappa.",
|
||||
"Files" => "Fájlok",
|
||||
"Share" => "Megosztás",
|
||||
"Delete permanently" => "Végleges törlés",
|
||||
"Delete" => "Törlés",
|
||||
"Rename" => "Átnevezés",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"No file was uploaded" => "Nulle file esseva incargate",
|
||||
"Missing a temporary folder" => "Manca un dossier temporari",
|
||||
"Files" => "Files",
|
||||
"Share" => "Compartir",
|
||||
"Delete" => "Deler",
|
||||
"Close" => "Clauder",
|
||||
"Name" => "Nomine",
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
"Missing a temporary folder" => "Kehilangan folder temporer",
|
||||
"Failed to write to disk" => "Gagal menulis ke disk",
|
||||
"Files" => "Berkas",
|
||||
"Share" => "Bagikan",
|
||||
"Delete permanently" => "Hapus secara permanen",
|
||||
"Delete" => "Hapus",
|
||||
"Pending" => "Menunggu",
|
||||
"replace" => "mengganti",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Failed to write to disk" => "Tókst ekki að skrifa á disk",
|
||||
"Invalid directory." => "Ógild mappa.",
|
||||
"Files" => "Skrár",
|
||||
"Share" => "Deila",
|
||||
"Delete" => "Eyða",
|
||||
"Rename" => "Endurskýra",
|
||||
"Pending" => "Bíður",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Spazio di archiviazione insufficiente",
|
||||
"Invalid directory." => "Cartella non valida.",
|
||||
"Files" => "File",
|
||||
"Share" => "Condividi",
|
||||
"Delete permanently" => "Elimina definitivamente",
|
||||
"Delete" => "Elimina",
|
||||
"Rename" => "Rinomina",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "ストレージに十分な空き容量がありません",
|
||||
"Invalid directory." => "無効なディレクトリです。",
|
||||
"Files" => "ファイル",
|
||||
"Share" => "共有",
|
||||
"Delete permanently" => "完全に削除する",
|
||||
"Delete" => "削除",
|
||||
"Rename" => "名前の変更",
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
"Missing a temporary folder" => "დროებითი საქაღალდე არ არსებობს",
|
||||
"Failed to write to disk" => "შეცდომა დისკზე ჩაწერისას",
|
||||
"Files" => "ფაილები",
|
||||
"Share" => "გაზიარება",
|
||||
"Delete permanently" => "სრულად წაშლა",
|
||||
"Delete" => "წაშლა",
|
||||
"Rename" => "გადარქმევა",
|
||||
"Pending" => "მოცდის რეჟიმში",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Failed to write to disk" => "디스크에 쓰지 못했습니다",
|
||||
"Invalid directory." => "올바르지 않은 디렉터리입니다.",
|
||||
"Files" => "파일",
|
||||
"Share" => "공유",
|
||||
"Delete" => "삭제",
|
||||
"Rename" => "이름 바꾸기",
|
||||
"Pending" => "보류 중",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"Missing a temporary folder" => "Et feelt en temporären Dossier",
|
||||
"Failed to write to disk" => "Konnt net op den Disk schreiwen",
|
||||
"Files" => "Dateien",
|
||||
"Share" => "Deelen",
|
||||
"Delete" => "Läschen",
|
||||
"replace" => "ersetzen",
|
||||
"cancel" => "ofbriechen",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"Missing a temporary folder" => "Nėra laikinojo katalogo",
|
||||
"Failed to write to disk" => "Nepavyko įrašyti į diską",
|
||||
"Files" => "Failai",
|
||||
"Share" => "Dalintis",
|
||||
"Delete" => "Ištrinti",
|
||||
"Rename" => "Pervadinti",
|
||||
"Pending" => "Laukiantis",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Nav pietiekami daudz vietas",
|
||||
"Invalid directory." => "Nederīga direktorija.",
|
||||
"Files" => "Datnes",
|
||||
"Share" => "Dalīties",
|
||||
"Delete permanently" => "Dzēst pavisam",
|
||||
"Delete" => "Dzēst",
|
||||
"Rename" => "Pārsaukt",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"Missing a temporary folder" => "Не постои привремена папка",
|
||||
"Failed to write to disk" => "Неуспеав да запишам на диск",
|
||||
"Files" => "Датотеки",
|
||||
"Share" => "Сподели",
|
||||
"Delete" => "Избриши",
|
||||
"Rename" => "Преименувај",
|
||||
"Pending" => "Чека",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"Missing a temporary folder" => "Folder sementara hilang",
|
||||
"Failed to write to disk" => "Gagal untuk disimpan",
|
||||
"Files" => "fail",
|
||||
"Share" => "Kongsi",
|
||||
"Delete" => "Padam",
|
||||
"Pending" => "Dalam proses",
|
||||
"replace" => "ganti",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"Missing a temporary folder" => "Mangler en midlertidig mappe",
|
||||
"Failed to write to disk" => "Klarte ikke å skrive til disk",
|
||||
"Files" => "Filer",
|
||||
"Share" => "Del",
|
||||
"Delete permanently" => "Slett permanent",
|
||||
"Delete" => "Slett",
|
||||
"Rename" => "Omdøp",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Niet genoeg opslagruimte beschikbaar",
|
||||
"Invalid directory." => "Ongeldige directory.",
|
||||
"Files" => "Bestanden",
|
||||
"Share" => "Delen",
|
||||
"Delete permanently" => "Verwijder definitief",
|
||||
"Delete" => "Verwijder",
|
||||
"Rename" => "Hernoem",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"Missing a temporary folder" => "Un dorsièr temporari manca",
|
||||
"Failed to write to disk" => "L'escriptura sul disc a fracassat",
|
||||
"Files" => "Fichièrs",
|
||||
"Share" => "Parteja",
|
||||
"Delete" => "Escafa",
|
||||
"Rename" => "Torna nomenar",
|
||||
"Pending" => "Al esperar",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Za mało dostępnego miejsca",
|
||||
"Invalid directory." => "Zła ścieżka.",
|
||||
"Files" => "Pliki",
|
||||
"Share" => "Udostępnij",
|
||||
"Delete permanently" => "Trwale usuń",
|
||||
"Delete" => "Usuń",
|
||||
"Rename" => "Zmień nazwę",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Espaço de armazenamento insuficiente",
|
||||
"Invalid directory." => "Diretório inválido.",
|
||||
"Files" => "Arquivos",
|
||||
"Share" => "Compartilhar",
|
||||
"Delete permanently" => "Excluir permanentemente",
|
||||
"Delete" => "Excluir",
|
||||
"Rename" => "Renomear",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Não há espaço suficiente em disco",
|
||||
"Invalid directory." => "Directório Inválido",
|
||||
"Files" => "Ficheiros",
|
||||
"Share" => "Partilhar",
|
||||
"Delete permanently" => "Eliminar permanentemente",
|
||||
"Delete" => "Apagar",
|
||||
"Rename" => "Renomear",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"Failed to write to disk" => "Eroare la scriere pe disc",
|
||||
"Invalid directory." => "Director invalid.",
|
||||
"Files" => "Fișiere",
|
||||
"Share" => "Partajează",
|
||||
"Delete" => "Șterge",
|
||||
"Rename" => "Redenumire",
|
||||
"Pending" => "În așteptare",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Недостаточно доступного места в хранилище",
|
||||
"Invalid directory." => "Неправильный каталог.",
|
||||
"Files" => "Файлы",
|
||||
"Share" => "Открыть доступ",
|
||||
"Delete permanently" => "Удалено навсегда",
|
||||
"Delete" => "Удалить",
|
||||
"Rename" => "Переименовать",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Недостаточно места в хранилище",
|
||||
"Invalid directory." => "Неверный каталог.",
|
||||
"Files" => "Файлы",
|
||||
"Share" => "Сделать общим",
|
||||
"Delete permanently" => "Удалить навсегда",
|
||||
"Delete" => "Удалить",
|
||||
"Rename" => "Переименовать",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"Missing a temporary folder" => "තාවකාලික ෆොල්ඩරයක් සොයාගත නොහැක",
|
||||
"Failed to write to disk" => "තැටිගත කිරීම අසාර්ථකයි",
|
||||
"Files" => "ගොනු",
|
||||
"Share" => "බෙදා හදා ගන්න",
|
||||
"Delete" => "මකන්න",
|
||||
"Rename" => "නැවත නම් කරන්න",
|
||||
"replace" => "ප්රතිස්ථාපනය කරන්න",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Nedostatok dostupného úložného priestoru",
|
||||
"Invalid directory." => "Neplatný priečinok",
|
||||
"Files" => "Súbory",
|
||||
"Share" => "Zdieľať",
|
||||
"Delete permanently" => "Zmazať trvalo",
|
||||
"Delete" => "Odstrániť",
|
||||
"Rename" => "Premenovať",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Na voljo ni dovolj prostora",
|
||||
"Invalid directory." => "Neveljavna mapa.",
|
||||
"Files" => "Datoteke",
|
||||
"Share" => "Souporaba",
|
||||
"Delete permanently" => "Izbriši trajno",
|
||||
"Delete" => "Izbriši",
|
||||
"Rename" => "Preimenuj",
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Could not move %s - File with this name already exists" => "%s nuk u spostua - Aty ekziston një skedar me të njëjtin emër",
|
||||
"Could not move %s" => "%s nuk u spostua",
|
||||
"Unable to rename file" => "Nuk është i mundur riemërtimi i skedarit",
|
||||
"No file was uploaded. Unknown error" => "Nuk u ngarkua asnjë skedar. Veprim i gabuar i panjohur",
|
||||
"There is no error, the file uploaded with success" => "Nuk pati veprime të gabuara, skedari u ngarkua me sukses",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Skedari i ngarkuar tejkalon udhëzimin upload_max_filesize tek php.ini:",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Skedari i ngarkuar tejkalon udhëzimin MAX_FILE_SIZE të specifikuar në formularin HTML",
|
||||
"The uploaded file was only partially uploaded" => "Skedari i ngarkuar u ngarkua vetëm pjesërisht",
|
||||
"No file was uploaded" => "Nuk u ngarkua asnjë skedar",
|
||||
"Missing a temporary folder" => "Një dosje e përkohshme nuk u gjet",
|
||||
"Failed to write to disk" => "Ruajtja në disk dështoi",
|
||||
"Not enough storage available" => "Nuk ka mbetur hapësirë memorizimi e mjaftueshme",
|
||||
"Invalid directory." => "Dosje e pavlefshme.",
|
||||
"Files" => "Skedarët",
|
||||
"Share" => "Nda",
|
||||
"Delete permanently" => "Elimino përfundimisht",
|
||||
"Delete" => "Elimino",
|
||||
"Rename" => "Riemërto",
|
||||
"Pending" => "Pezulluar",
|
||||
"{new_name} already exists" => "{new_name} ekziston",
|
||||
"replace" => "zëvëndëso",
|
||||
"suggest name" => "sugjero një emër",
|
||||
"cancel" => "anulo",
|
||||
"replaced {new_name} with {old_name}" => "U zëvëndësua {new_name} me {old_name}",
|
||||
"undo" => "anulo",
|
||||
"perform delete operation" => "ekzekuto operacionin e eliminimit",
|
||||
"1 file uploading" => "Po ngarkohet 1 skedar",
|
||||
"files uploading" => "po ngarkoj skedarët",
|
||||
"'.' is an invalid file name." => "'.' është emër i pavlefshëm.",
|
||||
"File name cannot be empty." => "Emri i skedarit nuk mund të jetë bosh.",
|
||||
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Emër i pavlefshëm, '\\', '/', '<', '>', ':', '\"', '|', '?' dhe '*' nuk lejohen.",
|
||||
"Your storage is full, files can not be updated or synced anymore!" => "Hapësira juaj e memorizimit është plot, nuk mund të ngarkoni apo sinkronizoni më skedarët.",
|
||||
"Your storage is almost full ({usedSpacePercent}%)" => "Hapësira juaj e memorizimit është gati plot ({usedSpacePercent}%)",
|
||||
"Your download is being prepared. This might take some time if the files are big." => "Shkarkimi juaj po përgatitet. Mund të duhet pak kohë nqse skedarët janë të mëdhenj.",
|
||||
"Unable to upload your file as it is a directory or has 0 bytes" => "Nuk është i mundur ngarkimi i skedarit tuaj sepse është dosje ose ka dimension 0 byte",
|
||||
"Not enough space available" => "Nuk ka hapësirë memorizimi e mjaftueshme",
|
||||
"Upload cancelled." => "Ngarkimi u anulua.",
|
||||
"File upload is in progress. Leaving the page now will cancel the upload." => "Ngarkimi i skedarit është në vazhdim. Nqse ndërroni faqen tani ngarkimi do të anulohet.",
|
||||
"URL cannot be empty." => "URL-i nuk mund të jetë bosh.",
|
||||
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Emri i dosjes është i pavlefshëm. Përdorimi i \"Shared\" është i rezervuar nga Owncloud-i.",
|
||||
"Error" => "Veprim i gabuar",
|
||||
"Name" => "Emri",
|
||||
"Size" => "Dimensioni",
|
||||
"Modified" => "Modifikuar",
|
||||
"1 folder" => "1 dosje",
|
||||
"{count} folders" => "{count} dosje",
|
||||
"1 file" => "1 skedar",
|
||||
"{count} files" => "{count} skedarë",
|
||||
"Upload" => "Ngarko",
|
||||
"File handling" => "Trajtimi i skedarit",
|
||||
"Maximum upload size" => "Dimensioni maksimal i ngarkimit",
|
||||
"max. possible: " => "maks. i mundur:",
|
||||
"Needed for multi-file and folder downloads." => "Duhet për shkarkimin e dosjeve dhe të skedarëve",
|
||||
"Enable ZIP-download" => "Aktivizo shkarkimin e ZIP-eve",
|
||||
"0 is unlimited" => "0 është i pakufizuar",
|
||||
"Maximum input size for ZIP files" => "Dimensioni maksimal i ngarkimit të skedarëve ZIP",
|
||||
"Save" => "Ruaj",
|
||||
"New" => "I ri",
|
||||
"Text file" => "Skedar teksti",
|
||||
"Folder" => "Dosje",
|
||||
"From link" => "Nga lidhja",
|
||||
"Deleted files" => "Skedarë të eliminuar",
|
||||
"Cancel upload" => "Anulo ngarkimin",
|
||||
"You don’t have write permissions here." => "Nuk keni të drejta për të shkruar këtu.",
|
||||
"Nothing in here. Upload something!" => "Këtu nuk ka asgjë. Ngarkoni diçka!",
|
||||
"Download" => "Shkarko",
|
||||
"Unshare" => "Hiq ndarjen",
|
||||
"Upload too large" => "Ngarkimi është shumë i madh",
|
||||
"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Skedarët që doni të ngarkoni tejkalojnë dimensionet maksimale për ngarkimet në këtë server.",
|
||||
"Files are being scanned, please wait." => "Skedarët po analizohen, ju lutemi pritni.",
|
||||
"Current scanning" => "Analizimi aktual",
|
||||
"Upgrading filesystem cache..." => "Po përmirësoj memorjen e filesystem-it..."
|
||||
);
|
||||
@@ -7,6 +7,8 @@
|
||||
"Missing a temporary folder" => "Недостаје привремена фасцикла",
|
||||
"Failed to write to disk" => "Не могу да пишем на диск",
|
||||
"Files" => "Датотеке",
|
||||
"Share" => "Дели",
|
||||
"Delete permanently" => "Обриши за стално",
|
||||
"Delete" => "Обриши",
|
||||
"Rename" => "Преименуј",
|
||||
"Pending" => "На чекању",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Inte tillräckligt med lagringsutrymme tillgängligt",
|
||||
"Invalid directory." => "Felaktig mapp.",
|
||||
"Files" => "Filer",
|
||||
"Share" => "Dela",
|
||||
"Delete permanently" => "Radera permanent",
|
||||
"Delete" => "Radera",
|
||||
"Rename" => "Byt namn",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"Missing a temporary folder" => "ஒரு தற்காலிகமான கோப்புறையை காணவில்லை",
|
||||
"Failed to write to disk" => "வட்டில் எழுத முடியவில்லை",
|
||||
"Files" => "கோப்புகள்",
|
||||
"Share" => "பகிர்வு",
|
||||
"Delete" => "அழிக்க",
|
||||
"Rename" => "பெயர்மாற்றம்",
|
||||
"Pending" => "நிலுவையிலுள்ள",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "เหลือพื้นที่ไม่เพียงสำหรับใช้งาน",
|
||||
"Invalid directory." => "ไดเร็กทอรี่ไม่ถูกต้อง",
|
||||
"Files" => "ไฟล์",
|
||||
"Share" => "แชร์",
|
||||
"Delete" => "ลบ",
|
||||
"Rename" => "เปลี่ยนชื่อ",
|
||||
"Pending" => "อยู่ระหว่างดำเนินการ",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Yeterli disk alanı yok",
|
||||
"Invalid directory." => "Geçersiz dizin.",
|
||||
"Files" => "Dosyalar",
|
||||
"Share" => "Paylaş",
|
||||
"Delete permanently" => "Kalıcı olarak sil",
|
||||
"Delete" => "Sil",
|
||||
"Rename" => "İsim değiştir.",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Місця більше немає",
|
||||
"Invalid directory." => "Невірний каталог.",
|
||||
"Files" => "Файли",
|
||||
"Share" => "Поділитися",
|
||||
"Delete permanently" => "Видалити назавжди",
|
||||
"Delete" => "Видалити",
|
||||
"Rename" => "Перейменувати",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "Không đủ không gian lưu trữ",
|
||||
"Invalid directory." => "Thư mục không hợp lệ",
|
||||
"Files" => "Tập tin",
|
||||
"Share" => "Chia sẻ",
|
||||
"Delete permanently" => "Xóa vĩnh vễn",
|
||||
"Delete" => "Xóa",
|
||||
"Rename" => "Sửa tên",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"Missing a temporary folder" => "丢失了一个临时文件夹",
|
||||
"Failed to write to disk" => "写磁盘失败",
|
||||
"Files" => "文件",
|
||||
"Share" => "分享",
|
||||
"Delete" => "删除",
|
||||
"Rename" => "重命名",
|
||||
"Pending" => "Pending",
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
"Failed to write to disk" => "写入磁盘失败",
|
||||
"Invalid directory." => "无效文件夹。",
|
||||
"Files" => "文件",
|
||||
"Share" => "分享",
|
||||
"Delete permanently" => "永久删除",
|
||||
"Delete" => "删除",
|
||||
"Rename" => "重命名",
|
||||
"Pending" => "操作等待中",
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Files" => "文件",
|
||||
"Share" => "分享",
|
||||
"Delete" => "刪除",
|
||||
"Error" => "錯誤",
|
||||
"Name" => "名稱",
|
||||
"{count} folders" => "{}文件夾",
|
||||
"Upload" => "上傳",
|
||||
"Save" => "儲存",
|
||||
"Download" => "下載",
|
||||
"Unshare" => "取消分享"
|
||||
);
|
||||
@@ -13,6 +13,7 @@
|
||||
"Not enough storage available" => "儲存空間不足",
|
||||
"Invalid directory." => "無效的資料夾。",
|
||||
"Files" => "檔案",
|
||||
"Share" => "分享",
|
||||
"Delete permanently" => "永久刪除",
|
||||
"Delete" => "刪除",
|
||||
"Rename" => "重新命名",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)">
|
||||
<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
|
||||
<input type="file" id="file_upload_start" name='files[]'/>
|
||||
<a href="#" class="svg" onclick="return false;"></a>
|
||||
<a href="#" class="svg"></a>
|
||||
</form>
|
||||
</div>
|
||||
<?php if ($_['trash'] ): ?>
|
||||
@@ -44,13 +44,12 @@
|
||||
<div id="uploadprogressbar"></div>
|
||||
<input type="button" class="stop" style="display:none"
|
||||
value="<?php p($l->t('Cancel upload'));?>"
|
||||
onclick="javascript:Files.cancelUploads();"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="file_action_panel"></div>
|
||||
<?php else:?>
|
||||
<div class="crumb last"><?php p($l->t('You don’t have write permissions here.'))?></div>
|
||||
<div class="actions"><input type="button" disabled value="<?php p($l->t('You don’t have write permissions here.'))?>"></div>
|
||||
<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
|
||||
<?php endif;?>
|
||||
<input type="hidden" name="permissions" value="<?php p($_['permissions']); ?>" id="permissions">
|
||||
@@ -82,13 +81,13 @@
|
||||
<?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?>
|
||||
<!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder -->
|
||||
<?php if ($_['dir'] == '/Shared'): ?>
|
||||
<span class="selectedActions"><a href="" class="delete">
|
||||
<span class="selectedActions"><a href="" class="delete-selected">
|
||||
<?php p($l->t('Unshare'))?>
|
||||
<img class="svg" alt="<?php p($l->t('Unshare'))?>"
|
||||
src="<?php print_unescaped(OCP\image_path("core", "actions/delete.svg")); ?>" />
|
||||
</a></span>
|
||||
<?php else: ?>
|
||||
<span class="selectedActions"><a href="" class="delete">
|
||||
<span class="selectedActions"><a href="" class="delete-selected">
|
||||
<?php p($l->t('Delete'))?>
|
||||
<img class="svg" alt="<?php p($l->t('Delete'))?>"
|
||||
src="<?php print_unescaped(OCP\image_path("core", "actions/delete.svg")); ?>" />
|
||||
|
||||
@@ -45,7 +45,6 @@ class Dropbox extends \OC\Files\Storage\Common {
|
||||
$oauth = new \Dropbox_OAuth_Curl($params['app_key'], $params['app_secret']);
|
||||
$oauth->setToken($params['token'], $params['token_secret']);
|
||||
$this->dropbox = new \Dropbox_API($oauth, 'dropbox');
|
||||
$this->mkdir('');
|
||||
} else {
|
||||
throw new \Exception('Creating \OC\Files\Storage\Dropbox storage failed');
|
||||
}
|
||||
|
||||
@@ -35,10 +35,6 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
|
||||
if ( ! $this->root || $this->root[0]!='/') {
|
||||
$this->root='/'.$this->root;
|
||||
}
|
||||
//create the root folder if necessary
|
||||
if ( ! $this->is_dir('')) {
|
||||
$this->mkdir('');
|
||||
}
|
||||
} else {
|
||||
throw new \Exception();
|
||||
}
|
||||
@@ -63,7 +59,6 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
|
||||
return $url;
|
||||
}
|
||||
public function fopen($path,$mode) {
|
||||
$this->init();
|
||||
switch($mode) {
|
||||
case 'r':
|
||||
case 'rb':
|
||||
@@ -100,7 +95,6 @@ class FTP extends \OC\Files\Storage\StreamWrapper{
|
||||
}
|
||||
|
||||
public function writeBack($tmpFile) {
|
||||
$this->init();
|
||||
if (isset(self::$tempFiles[$tmpFile])) {
|
||||
$this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]);
|
||||
unlink($tmpFile);
|
||||
|
||||
@@ -50,10 +50,6 @@ class SFTP extends \OC\Files\Storage\Common {
|
||||
$host_keys[$this->host] = $current_host_key;
|
||||
$this->write_host_keys($host_keys);
|
||||
}
|
||||
|
||||
if(!$this->file_exists('')){
|
||||
$this->mkdir('');
|
||||
}
|
||||
}
|
||||
|
||||
public function test() {
|
||||
|
||||
@@ -73,7 +73,6 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
|
||||
* @return bool
|
||||
*/
|
||||
public function hasUpdated($path,$time) {
|
||||
$this->init();
|
||||
if(!$path and $this->root=='/') {
|
||||
// mtime doesn't work for shares, but giving the nature of the backend,
|
||||
// doing a full update is still just fast enough
|
||||
|
||||
@@ -8,46 +8,28 @@
|
||||
|
||||
namespace OC\Files\Storage;
|
||||
|
||||
abstract class StreamWrapper extends \OC\Files\Storage\Common{
|
||||
private $ready = false;
|
||||
|
||||
protected function init(){
|
||||
if($this->ready) {
|
||||
return;
|
||||
}
|
||||
$this->ready = true;
|
||||
|
||||
//create the root folder if necesary
|
||||
if(!$this->is_dir('')) {
|
||||
$this->mkdir('');
|
||||
}
|
||||
}
|
||||
|
||||
abstract class StreamWrapper extends Common{
|
||||
abstract public function constructUrl($path);
|
||||
|
||||
public function mkdir($path) {
|
||||
$this->init();
|
||||
return mkdir($this->constructUrl($path));
|
||||
}
|
||||
|
||||
public function rmdir($path) {
|
||||
$this->init();
|
||||
if($this->file_exists($path)) {
|
||||
$succes = rmdir($this->constructUrl($path));
|
||||
$success = rmdir($this->constructUrl($path));
|
||||
clearstatcache();
|
||||
return $succes;
|
||||
return $success;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function opendir($path) {
|
||||
$this->init();
|
||||
return opendir($this->constructUrl($path));
|
||||
}
|
||||
|
||||
public function filetype($path) {
|
||||
$this->init();
|
||||
return filetype($this->constructUrl($path));
|
||||
}
|
||||
|
||||
@@ -60,24 +42,20 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
|
||||
}
|
||||
|
||||
public function file_exists($path) {
|
||||
$this->init();
|
||||
return file_exists($this->constructUrl($path));
|
||||
}
|
||||
|
||||
public function unlink($path) {
|
||||
$this->init();
|
||||
$succes = unlink($this->constructUrl($path));
|
||||
$success = unlink($this->constructUrl($path));
|
||||
clearstatcache();
|
||||
return $succes;
|
||||
return $success;
|
||||
}
|
||||
|
||||
public function fopen($path, $mode) {
|
||||
$this->init();
|
||||
return fopen($this->constructUrl($path), $mode);
|
||||
}
|
||||
|
||||
public function touch($path, $mtime=null) {
|
||||
$this->init();
|
||||
if(is_null($mtime)) {
|
||||
$fh = $this->fopen($path, 'a');
|
||||
fwrite($fh, '');
|
||||
@@ -88,22 +66,18 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
|
||||
}
|
||||
|
||||
public function getFile($path, $target) {
|
||||
$this->init();
|
||||
return copy($this->constructUrl($path), $target);
|
||||
}
|
||||
|
||||
public function uploadFile($path, $target) {
|
||||
$this->init();
|
||||
return copy($path, $this->constructUrl($target));
|
||||
}
|
||||
|
||||
public function rename($path1, $path2) {
|
||||
$this->init();
|
||||
return rename($this->constructUrl($path1), $this->constructUrl($path2));
|
||||
}
|
||||
|
||||
public function stat($path) {
|
||||
$this->init();
|
||||
return stat($this->constructUrl($path));
|
||||
}
|
||||
|
||||
|
||||
@@ -73,8 +73,6 @@ class DAV extends \OC\Files\Storage\Common{
|
||||
$this->client->addTrustedCertificates($certPath);
|
||||
}
|
||||
}
|
||||
//create the root folder if necessary
|
||||
$this->mkdir('');
|
||||
}
|
||||
|
||||
public function getId(){
|
||||
|
||||
@@ -32,6 +32,7 @@ $tmpl->assign('mounts', OC_Mount_Config::getSystemMountPoints());
|
||||
$tmpl->assign('backends', OC_Mount_Config::getBackends());
|
||||
$tmpl->assign('groups', OC_Group::getGroups());
|
||||
$tmpl->assign('users', OCP\User::getUsers());
|
||||
$tmpl->assign('userDisplayNames', OC_User::getDisplayNames());
|
||||
$tmpl->assign('dependencies', OC_Mount_Config::checkDependencies());
|
||||
$tmpl->assign('allowUserMounting', OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes'));
|
||||
return $tmpl->fetchPage();
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<option value="<?php p($user); ?>"
|
||||
<?php if (isset($mount['applicable']['users']) && in_array($user, $mount['applicable']['users'])): ?>
|
||||
selected="selected"
|
||||
<?php endif; ?>><?php p($user); ?></option>
|
||||
<?php endif; ?>><?php p($_['userDisplayNames'][$user]); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
</select>
|
||||
|
||||
@@ -19,6 +19,7 @@ class FTP extends Storage {
|
||||
}
|
||||
$this->config['ftp']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
|
||||
$this->instance = new \OC\Files\Storage\FTP($this->config['ftp']);
|
||||
$this->instance->mkdir('/');
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
|
||||
@@ -33,6 +33,7 @@ class SFTP extends Storage {
|
||||
}
|
||||
$this->config['sftp']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
|
||||
$this->instance = new \OC\Files\Storage\SFTP($this->config['sftp']);
|
||||
$this->instance->mkdir('/');
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
@@ -40,4 +41,4 @@ class SFTP extends Storage {
|
||||
$this->instance->rmdir('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class SMB extends Storage {
|
||||
}
|
||||
$this->config['smb']['root'] .= $id; //make sure we have an new empty folder to work in
|
||||
$this->instance = new \OC\Files\Storage\SMB($this->config['smb']);
|
||||
$this->instance->mkdir('/');
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
|
||||
@@ -20,6 +20,7 @@ class DAV extends Storage {
|
||||
}
|
||||
$this->config['webdav']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
|
||||
$this->instance = new \OC\Files\Storage\DAV($this->config['webdav']);
|
||||
$this->instance->mkdir('/');
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
|
||||
@@ -12,7 +12,7 @@ OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
|
||||
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
|
||||
OCP\Util::addScript('files_sharing', 'share');
|
||||
\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Shared_Updater', 'writeHook');
|
||||
\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Shared_Updater', 'deleteHook');
|
||||
\OC_Hook::connect('OC_Filesystem', 'delete', '\OC\Files\Cache\Shared_Updater', 'deleteHook');
|
||||
\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Shared_Updater', 'renameHook');
|
||||
\OC_Hook::connect('OCP\Share', 'post_shared', '\OC\Files\Cache\Shared_Updater', 'shareHook');
|
||||
\OC_Hook::connect('OCP\Share', 'pre_unshare', '\OC\Files\Cache\Shared_Updater', 'shareHook');
|
||||
@@ -182,12 +182,10 @@ class Shared_Cache extends Cache {
|
||||
*/
|
||||
public function move($source, $target) {
|
||||
if ($cache = $this->getSourceCache($source)) {
|
||||
$targetPath = \OC_Share_Backend_File::getSourcePath(dirname($target));
|
||||
if ($targetPath) {
|
||||
$targetPath .= '/' . basename($target);
|
||||
$cache->move($this->files[$source], $targetPath);
|
||||
$file = \OC_Share_Backend_File::getSource($target);
|
||||
if ($file && isset($file['path'])) {
|
||||
$cache->move($this->files[$source], $file['path']);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,12 @@ class Shared_Updater {
|
||||
while (!empty($users)) {
|
||||
$reshareUsers = array();
|
||||
foreach ($users as $user) {
|
||||
$etag = \OC\Files\Filesystem::getETag('');
|
||||
\OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
|
||||
// Look for reshares
|
||||
$reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $info['fileid'], $user, true));
|
||||
if ( $user !== $uidOwner ) {
|
||||
$etag = \OC\Files\Filesystem::getETag('');
|
||||
\OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
|
||||
// Look for reshares
|
||||
$reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $info['fileid'], $user, true));
|
||||
}
|
||||
}
|
||||
$users = $reshareUsers;
|
||||
}
|
||||
@@ -66,8 +68,8 @@ class Shared_Updater {
|
||||
* @param array $params
|
||||
*/
|
||||
static public function renameHook($params) {
|
||||
self::correctFolders($params['oldpath']);
|
||||
self::correctFolders($params['newpath']);
|
||||
self::correctFolders(pathinfo($params['oldpath'], PATHINFO_DIRNAME));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,10 +90,12 @@ class Shared_Updater {
|
||||
while (!empty($users)) {
|
||||
$reshareUsers = array();
|
||||
foreach ($users as $user) {
|
||||
$etag = \OC\Files\Filesystem::getETag('');
|
||||
\OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
|
||||
// Look for reshares
|
||||
$reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $params['fileSource'], $user, true));
|
||||
if ($user !== $uidOwner) {
|
||||
$etag = \OC\Files\Filesystem::getETag('');
|
||||
\OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
|
||||
// Look for reshares
|
||||
$reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $params['fileSource'], $user, true));
|
||||
}
|
||||
}
|
||||
$users = $reshareUsers;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,13 @@ if (isset($path)) {
|
||||
// Download the file
|
||||
if (isset($_GET['download'])) {
|
||||
if (isset($_GET['files'])) { // download selected files
|
||||
OC_Files::get($path, $_GET['files'], $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
|
||||
$files = urldecode($_GET['files']);
|
||||
$files_list = json_decode($files);
|
||||
// in case we get only a single file
|
||||
if ($files_list === NULL ) {
|
||||
$files_list = array($files);
|
||||
}
|
||||
OC_Files::get($path, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
|
||||
} else {
|
||||
OC_Files::get($dir, $file, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
OC::$CLASSPATH['OCA\Files_Trashbin\Hooks'] = 'files_trashbin/lib/hooks.php';
|
||||
OC::$CLASSPATH['OCA\Files_Trashbin\Trashbin'] = 'files_trashbin/lib/trash.php';
|
||||
|
||||
|
||||
//Listen to delete file signal
|
||||
OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Files_Trashbin\Hooks", "remove_hook");
|
||||
//Listen to delete user signal
|
||||
OCP\Util::connectHook('OC_User', 'pre_deleteUser', "OCA\Files_Trashbin\Hooks", "deleteUser_hook");
|
||||
@@ -2,7 +2,20 @@
|
||||
<info>
|
||||
<id>files_trashbin</id>
|
||||
<name>Deleted files</name>
|
||||
<description>Keep a copy of deleted files so that they can be restored if needed</description>
|
||||
<description>
|
||||
ownCloud keeps a copy of your deleted files in case you need them again.
|
||||
To make sure that the user doesn't run out of memory the deleted files app
|
||||
manages the size of the deleted files for the user. By default deleted files
|
||||
stay in the trash bin for 180 days. ownCloud checks the age of the files
|
||||
every time a new files gets moved to the deleted files and remove all files
|
||||
older than 180 days. The user can adjust this value in the config.php by
|
||||
setting the "trashbin_retention_obligation" value.
|
||||
|
||||
Beside that the delted files app take care to never use more that 50% of
|
||||
your currently available free space. If your deleted files exceed this limit
|
||||
ownCloud deletes the oldest versions until it meets the memory usage limit
|
||||
again.
|
||||
</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Bjoern Schiessle</author>
|
||||
<shipped>true</shipped>
|
||||
|
||||
@@ -1,40 +1,10 @@
|
||||
<?php
|
||||
|
||||
$installedVersion=OCP\Config::getAppValue('files_trashbin', 'installed_version');
|
||||
// move versions to new directory
|
||||
|
||||
if (version_compare($installedVersion, '0.2', '<')) {
|
||||
$datadir = \OCP\Config::getSystemValue('datadirectory').'/';
|
||||
|
||||
$users = \OCP\User::getUsers();
|
||||
foreach ($users as $user) {
|
||||
|
||||
//create new folders
|
||||
@mkdir($datadir.$user.'/files_trashbin/files');
|
||||
@mkdir($datadir.$user.'/files_trashbin/versions');
|
||||
@mkdir($datadir.$user.'/files_trashbin/keyfiles');
|
||||
|
||||
// move files to the new folders
|
||||
if ($handle = opendir($datadir.$user.'/files_trashbin')) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != ".." && $file != 'files' && $file != 'versions' && $file != 'keyfiles') {
|
||||
rename($datadir.$user.'/files_trashbin/'.$file,
|
||||
$datadir.$user.'/files_trashbin/files/'.$file);
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
// move versions to the new folder
|
||||
if ($handle = opendir($datadir.$user.'/versions_trashbin')) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
rename($datadir.$user.'/versions_trashbin/'.$file,
|
||||
$datadir.$user.'/files_trashbin/versions/'.$file);
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
@rmdir($datadir.$user.'/versions_trashbin');
|
||||
|
||||
}
|
||||
if (version_compare($installedVersion, '0.4', '<')) {
|
||||
//size of the trash bin could be incorrect, remove it for all users to
|
||||
//enforce a recalculation during next usage.
|
||||
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trashsize`');
|
||||
$result = $query->execute();
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
0.3
|
||||
0.4
|
||||
|
||||
@@ -21,8 +21,7 @@ $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
|
||||
$result = array();
|
||||
if ($dir) {
|
||||
$dirlisting = true;
|
||||
$fullpath = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath($dir);
|
||||
$dirContent = opendir($fullpath);
|
||||
$dirContent = $view->opendir($dir);
|
||||
$i = 0;
|
||||
while($entryName = readdir($dirContent)) {
|
||||
if ( $entryName != '.' && $entryName != '..' ) {
|
||||
@@ -43,7 +42,7 @@ if ($dir) {
|
||||
|
||||
} else {
|
||||
$dirlisting = false;
|
||||
$query = \OC_DB::prepare('SELECT `id`,`location`,`timestamp`,`type`,`mime` FROM `*PREFIX*files_trash` WHERE user = ?');
|
||||
$query = \OC_DB::prepare('SELECT `id`,`location`,`timestamp`,`type`,`mime` FROM `*PREFIX*files_trash` WHERE `user` = ?');
|
||||
$result = $query->execute(array($user))->fetchAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,4 +42,18 @@ class Hooks {
|
||||
Trashbin::move2trash($path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief clean up user specific settings if user gets deleted
|
||||
* @param array with uid
|
||||
*
|
||||
* This function is connected to the pre_deleteUser signal of OC_Users
|
||||
* to remove the used space for the trash bin stored in the database
|
||||
*/
|
||||
public static function deleteUser_hook($params) {
|
||||
if( \OCP\App::isEnabled('files_trashbin') ) {
|
||||
$uid = $params['uid'];
|
||||
Trashbin::deleteUser($uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,10 +61,12 @@ class Trashbin {
|
||||
if ( $trashbinSize === false || $trashbinSize < 0 ) {
|
||||
$trashbinSize = self::calculateSize(new \OC\Files\View('/'. $user.'/files_trashbin'));
|
||||
}
|
||||
$trashbinSize += self::copy_recursive($file_path, 'files_trashbin/files/'.$deleted.'.d'.$timestamp, $view);
|
||||
|
||||
|
||||
$sizeOfAddedFiles = self::copy_recursive($file_path, 'files_trashbin/files/'.$deleted.'.d'.$timestamp, $view);
|
||||
|
||||
if ( $view->file_exists('files_trashbin/files/'.$deleted.'.d'.$timestamp) ) {
|
||||
$query = \OC_DB::prepare("INSERT INTO *PREFIX*files_trash (id,timestamp,location,type,mime,user) VALUES (?,?,?,?,?,?)");
|
||||
$trashbinSize += $sizeOfAddedFiles;
|
||||
$query = \OC_DB::prepare("INSERT INTO `*PREFIX*files_trash` (`id`,`timestamp`,`location`,`type`,`mime`,`user`) VALUES (?,?,?,?,?,?)");
|
||||
$result = $query->execute(array($deleted, $timestamp, $location, $type, $mime, $user));
|
||||
if ( !$result ) { // if file couldn't be added to the database than also don't store it in the trash bin.
|
||||
$view->deleteAll('files_trashbin/files/'.$deleted.'.d'.$timestamp);
|
||||
@@ -102,27 +104,8 @@ class Trashbin {
|
||||
} else {
|
||||
\OC_Log::write('files_trashbin', 'Couldn\'t move '.$file_path.' to the trash bin', \OC_log::ERROR);
|
||||
}
|
||||
|
||||
// get available disk space for user
|
||||
$quota = \OC_Preferences::getValue($user, 'files', 'quota');
|
||||
if ( $quota === null || $quota === 'default') {
|
||||
$quota = \OC_Appconfig::getValue('files', 'default_quota');
|
||||
}
|
||||
if ( $quota === null || $quota === 'none' ) {
|
||||
$quota = \OC\Files\Filesystem::free_space('/') / count(\OCP\User::getUsers());
|
||||
} else {
|
||||
$quota = \OCP\Util::computerFileSize($quota);
|
||||
}
|
||||
|
||||
// calculate available space for trash bin
|
||||
$rootInfo = $view->getFileInfo('/files');
|
||||
$free = $quota-$rootInfo['size']; // remaining free space for user
|
||||
if ( $free > 0 ) {
|
||||
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $trashbinSize; // how much space can be used for versions
|
||||
} else {
|
||||
$availableSpace = $free-$trashbinSize;
|
||||
}
|
||||
$trashbinSize -= self::expire($availableSpace);
|
||||
|
||||
$trashbinSize -= self::expire($trashbinSize);
|
||||
|
||||
self::setTrashbinSize($user, $trashbinSize);
|
||||
|
||||
@@ -144,8 +127,8 @@ class Trashbin {
|
||||
$trashbinSize = self::calculateSize(new \OC\Files\View('/'. $user.'/files_trashbin'));
|
||||
}
|
||||
if ( $timestamp ) {
|
||||
$query = \OC_DB::prepare('SELECT location,type FROM *PREFIX*files_trash'
|
||||
.' WHERE user=? AND id=? AND timestamp=?');
|
||||
$query = \OC_DB::prepare('SELECT `location`,`type` FROM `*PREFIX*files_trash`'
|
||||
.' WHERE `user`=? AND `id`=? AND `timestamp`=?');
|
||||
$result = $query->execute(array($user,$filename,$timestamp))->fetchAll();
|
||||
if ( count($result) != 1 ) {
|
||||
\OC_Log::write('files_trashbin', 'trash bin database inconsistent!', \OC_Log::ERROR);
|
||||
@@ -228,7 +211,7 @@ class Trashbin {
|
||||
}
|
||||
|
||||
if ( $timestamp ) {
|
||||
$query = \OC_DB::prepare('DELETE FROM *PREFIX*files_trash WHERE user=? AND id=? AND timestamp=?');
|
||||
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trash` WHERE `user`=? AND `id`=? AND `timestamp`=?');
|
||||
$query->execute(array($user,$filename,$timestamp));
|
||||
}
|
||||
|
||||
@@ -259,7 +242,7 @@ class Trashbin {
|
||||
}
|
||||
|
||||
if ( $timestamp ) {
|
||||
$query = \OC_DB::prepare('DELETE FROM *PREFIX*files_trash WHERE user=? AND id=? AND timestamp=?');
|
||||
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trash` WHERE `user`=? AND `id`=? AND `timestamp`=?');
|
||||
$query->execute(array($user,$filename,$timestamp));
|
||||
$file = $filename.'.d'.$timestamp;
|
||||
} else {
|
||||
@@ -335,16 +318,71 @@ class Trashbin {
|
||||
}
|
||||
|
||||
/**
|
||||
* clean up the trash bin
|
||||
* @param max. available disk space for trashbin
|
||||
* @brief deletes used space for trash bin in db if user was deleted
|
||||
*
|
||||
* @param type $uid id of deleted user
|
||||
* @return result of db delete operation
|
||||
*/
|
||||
private static function expire($availableSpace) {
|
||||
public static function deleteUser($uid) {
|
||||
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trash` WHERE `user`=?');
|
||||
$result = $query->execute(array($uid));
|
||||
if ($result) {
|
||||
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trashsize` WHERE `user`=?');
|
||||
return $query->execute(array($uid));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* calculate remaining free space for trash bin
|
||||
*
|
||||
* @param $trashbinSize current size of the trash bin
|
||||
* @return available free space for trash bin
|
||||
*/
|
||||
private static function calculateFreeSpace($trashbinSize) {
|
||||
$softQuota = true;
|
||||
$user = \OCP\User::getUser();
|
||||
$quota = \OC_Preferences::getValue($user, 'files', 'quota');
|
||||
$view = new \OC\Files\View('/'.$user);
|
||||
if ( $quota === null || $quota === 'default') {
|
||||
$quota = \OC_Appconfig::getValue('files', 'default_quota');
|
||||
}
|
||||
if ( $quota === null || $quota === 'none' ) {
|
||||
$quota = \OC\Files\Filesystem::free_space('/');
|
||||
$softQuota = false;
|
||||
} else {
|
||||
$quota = \OCP\Util::computerFileSize($quota);
|
||||
}
|
||||
|
||||
// calculate available space for trash bin
|
||||
// subtract size of files and current trash bin size from quota
|
||||
if ($softQuota) {
|
||||
$rootInfo = $view->getFileInfo('/files/');
|
||||
$free = $quota-$rootInfo['size']; // remaining free space for user
|
||||
if ( $free > 0 ) {
|
||||
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $trashbinSize; // how much space can be used for versions
|
||||
} else {
|
||||
$availableSpace = $free-$trashbinSize;
|
||||
}
|
||||
} else {
|
||||
$availableSpace = $quota;
|
||||
}
|
||||
|
||||
return $availableSpace;
|
||||
}
|
||||
|
||||
/**
|
||||
* clean up the trash bin
|
||||
* @param current size of the trash bin
|
||||
*/
|
||||
private static function expire($trashbinSize) {
|
||||
|
||||
$user = \OCP\User::getUser();
|
||||
$view = new \OC\Files\View('/'.$user);
|
||||
$availableSpace = self::calculateFreeSpace($trashbinSize);
|
||||
$size = 0;
|
||||
|
||||
$query = \OC_DB::prepare('SELECT location,type,id,timestamp FROM *PREFIX*files_trash WHERE user=?');
|
||||
$query = \OC_DB::prepare('SELECT `location`,`type`,`id`,`timestamp` FROM `*PREFIX*files_trash` WHERE `user`=?');
|
||||
$result = $query->execute(array($user))->fetchAll();
|
||||
|
||||
$retention_obligation = \OC_Config::getValue('trashbin_retention_obligation',
|
||||
@@ -357,18 +395,20 @@ class Trashbin {
|
||||
$filename = $r['id'];
|
||||
if ( $r['timestamp'] < $limit ) {
|
||||
$size += self::delete($filename, $timestamp);
|
||||
\OC_Log::write('files_trashbin', 'remove "'.$filename.'" fom trash bin because it is older than '.$retention_obligation, \OC_log::INFO);
|
||||
}
|
||||
}
|
||||
$availableSpace = $availableSpace + $size;
|
||||
// if size limit for trash bin reached, delete oldest files in trash bin
|
||||
if ($availableSpace < 0) {
|
||||
$query = \OC_DB::prepare('SELECT location,type,id,timestamp FROM *PREFIX*files_trash'
|
||||
.' WHERE user=? ORDER BY timestamp ASC');
|
||||
$query = \OC_DB::prepare('SELECT `location`,`type`,`id`,`timestamp` FROM `*PREFIX*files_trash`'
|
||||
.' WHERE `user`=? ORDER BY `timestamp` ASC');
|
||||
$result = $query->execute(array($user))->fetchAll();
|
||||
$length = count($result);
|
||||
$i = 0;
|
||||
while ( $i < $length && $availableSpace < 0 ) {
|
||||
$tmp = self::delete($result[$i]['id'], $result[$i]['timestamp']);
|
||||
\OC_Log::write('files_trashbin', 'remove "'.$result[$i]['id'].'" ('.$tmp.'B) to meet the limit of trash bin size (50% of available quota)', \OC_log::INFO);
|
||||
$availableSpace += $tmp;
|
||||
$size += $tmp;
|
||||
$i++;
|
||||
@@ -490,7 +530,7 @@ class Trashbin {
|
||||
* @return mixed trash bin size or false if no trash bin size is stored
|
||||
*/
|
||||
private static function getTrashbinSize($user) {
|
||||
$query = \OC_DB::prepare('SELECT size FROM *PREFIX*files_trashsize WHERE user=?');
|
||||
$query = \OC_DB::prepare('SELECT `size` FROM `*PREFIX*files_trashsize` WHERE `user`=?');
|
||||
$result = $query->execute(array($user))->fetchAll();
|
||||
|
||||
if ($result) {
|
||||
@@ -507,9 +547,9 @@ class Trashbin {
|
||||
*/
|
||||
private static function setTrashbinSize($user, $size) {
|
||||
if ( self::getTrashbinSize($user) === false) {
|
||||
$query = \OC_DB::prepare('INSERT INTO *PREFIX*files_trashsize (size, user) VALUES (?, ?)');
|
||||
$query = \OC_DB::prepare('INSERT INTO `*PREFIX*files_trashsize` (`size`, `user`) VALUES (?, ?)');
|
||||
}else {
|
||||
$query = \OC_DB::prepare('UPDATE *PREFIX*files_trashsize SET size=? WHERE user=?');
|
||||
$query = \OC_DB::prepare('UPDATE `*PREFIX*files_trashsize` SET `size`=? WHERE `user`=?');
|
||||
}
|
||||
$query->execute(array($size, $user));
|
||||
}
|
||||
|
||||
@@ -12,3 +12,5 @@ OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\Files_Versions\Hooks", "wri
|
||||
// Listen to delete and rename signals
|
||||
OCP\Util::connectHook('OC_Filesystem', 'post_delete', "OCA\Files_Versions\Hooks", "remove_hook");
|
||||
OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook");
|
||||
//Listen to delete user signal
|
||||
OCP\Util::connectHook('OC_User', 'pre_deleteUser', "OCA\Files_Versions\Hooks", "deleteUser_hook");
|
||||
|
||||
@@ -6,7 +6,25 @@
|
||||
<author>Frank Karlitschek</author>
|
||||
<require>4.93</require>
|
||||
<shipped>true</shipped>
|
||||
<description>Versioning of files</description>
|
||||
<description>
|
||||
ownCloud supports simple version control for files. The versioning app
|
||||
expires old versions automatically to make sure that
|
||||
the user doesn't run out of space. Following pattern is used to delete
|
||||
old versions:
|
||||
For the first 10 seconds ownCloud keeps one version every 2 seconds;
|
||||
For the first hour ownCloud keeps one version every minute;
|
||||
For the first 24 hours ownCloud keeps one version every hour;
|
||||
For the first 30 days ownCloud keeps one version every day;
|
||||
After the first 30 days ownCloud keeps one version every week.
|
||||
|
||||
The versions are adjusted along this pattern every time a new version gets
|
||||
created.
|
||||
|
||||
Beside that the version app takes care to never use more that 50% of the users
|
||||
currently available free space. If the stored versions exceed this limit
|
||||
ownCloud deletes the oldest versions until it meets the memory usage limit
|
||||
again.
|
||||
</description>
|
||||
<types>
|
||||
<filesystem/>
|
||||
</types>
|
||||
|
||||
@@ -63,4 +63,18 @@ class Hooks {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief clean up user specific settings if user gets deleted
|
||||
* @param array with uid
|
||||
*
|
||||
* This function is connected to the pre_deleteUser signal of OC_Users
|
||||
* to remove the used space for versions stored in the database
|
||||
*/
|
||||
public static function deleteUser_hook($params) {
|
||||
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
|
||||
$uid = $params['uid'];
|
||||
Storage::deleteUser($uid);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class Storage {
|
||||
* @return mixed versions size or false if no versions size is stored
|
||||
*/
|
||||
private static function getVersionsSize($user) {
|
||||
$query = \OC_DB::prepare('SELECT size FROM *PREFIX*files_versions WHERE user=?');
|
||||
$query = \OC_DB::prepare('SELECT `size` FROM `*PREFIX*files_versions` WHERE `user`=?');
|
||||
$result = $query->execute(array($user))->fetchAll();
|
||||
|
||||
if ($result) {
|
||||
@@ -70,9 +70,9 @@ class Storage {
|
||||
*/
|
||||
private static function setVersionsSize($user, $size) {
|
||||
if ( self::getVersionsSize($user) === false) {
|
||||
$query = \OC_DB::prepare('INSERT INTO *PREFIX*files_versions (size, user) VALUES (?, ?)');
|
||||
$query = \OC_DB::prepare('INSERT INTO `*PREFIX*files_versions` (`size`, `user`) VALUES (?, ?)');
|
||||
}else {
|
||||
$query = \OC_DB::prepare('UPDATE *PREFIX*files_versions SET size=? WHERE user=?');
|
||||
$query = \OC_DB::prepare('UPDATE `*PREFIX*files_versions` SET `size`=? WHERE `user`=?');
|
||||
}
|
||||
$query->execute(array($size, $user));
|
||||
}
|
||||
@@ -156,11 +156,18 @@ class Storage {
|
||||
/**
|
||||
* rename versions of a file
|
||||
*/
|
||||
public static function rename($oldpath, $newpath) {
|
||||
list($uid, $oldpath) = self::getUidAndFilename($oldpath);
|
||||
list($uidn, $newpath) = self::getUidAndFilename($newpath);
|
||||
public static function rename($old_path, $new_path) {
|
||||
list($uid, $oldpath) = self::getUidAndFilename($old_path);
|
||||
list($uidn, $newpath) = self::getUidAndFilename($new_path);
|
||||
$versions_view = new \OC\Files\View('/'.$uid .'/files_versions');
|
||||
$files_view = new \OC\Files\View('/'.$uid .'/files');
|
||||
|
||||
// if the file already exists than it was a upload of a existing file
|
||||
// over the web interface -> store() is the right function we need here
|
||||
if ($files_view->file_exists($newpath)) {
|
||||
return self::store($new_path);
|
||||
}
|
||||
|
||||
$abs_newpath = $versions_view->getLocalFile($newpath);
|
||||
|
||||
if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) {
|
||||
@@ -177,11 +184,12 @@ class Storage {
|
||||
/**
|
||||
* rollback to an old version of a file.
|
||||
*/
|
||||
public static function rollback($filename, $revision) {
|
||||
public static function rollback($file, $revision) {
|
||||
|
||||
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
|
||||
list($uid, $filename) = self::getUidAndFilename($filename);
|
||||
list($uid, $filename) = self::getUidAndFilename($file);
|
||||
$users_view = new \OC\Files\View('/'.$uid);
|
||||
$files_view = new \OC\Files\View('/'.\OCP\User::getUser().'/files');
|
||||
$versionCreated = false;
|
||||
|
||||
//first create a new version
|
||||
@@ -192,9 +200,9 @@ class Storage {
|
||||
}
|
||||
|
||||
// rollback
|
||||
if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) {
|
||||
$users_view->touch('files'.$filename, $revision);
|
||||
Storage::expire($filename);
|
||||
if( @$users_view->rename('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) {
|
||||
$files_view->touch($file, $revision);
|
||||
Storage::expire($file);
|
||||
return true;
|
||||
|
||||
}else if ( $versionCreated ) {
|
||||
@@ -272,6 +280,18 @@ class Storage {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief deletes used space for files versions in db if user was deleted
|
||||
*
|
||||
* @param type $uid id of deleted user
|
||||
* @return result of db delete operation
|
||||
*/
|
||||
public static function deleteUser($uid) {
|
||||
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_versions` WHERE `user`=?');
|
||||
return $query->execute(array($uid));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get the size of all stored versions from a given user
|
||||
* @param $uid id from the user
|
||||
@@ -359,12 +379,14 @@ class Storage {
|
||||
$versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions');
|
||||
|
||||
// get available disk space for user
|
||||
$softQuota = true;
|
||||
$quota = \OC_Preferences::getValue($uid, 'files', 'quota');
|
||||
if ( $quota === null || $quota === 'default') {
|
||||
$quota = \OC_Appconfig::getValue('files', 'default_quota');
|
||||
}
|
||||
if ( $quota === null || $quota === 'none' ) {
|
||||
$quota = \OC\Files\Filesystem::free_space('/') / count(\OCP\User::getUsers());
|
||||
$quota = \OC\Files\Filesystem::free_space('/');
|
||||
$softQuota = false;
|
||||
} else {
|
||||
$quota = \OCP\Util::computerFileSize($quota);
|
||||
}
|
||||
@@ -378,15 +400,21 @@ class Storage {
|
||||
}
|
||||
|
||||
// calculate available space for version history
|
||||
$files_view = new \OC\Files\View('/'.$uid.'/files');
|
||||
$rootInfo = $files_view->getFileInfo('/');
|
||||
$free = $quota-$rootInfo['size']; // remaining free space for user
|
||||
if ( $free > 0 ) {
|
||||
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $versionsSize; // how much space can be used for versions
|
||||
// subtract size of files and current versions size from quota
|
||||
if ($softQuota) {
|
||||
$files_view = new \OC\Files\View('/'.$uid.'/files');
|
||||
$rootInfo = $files_view->getFileInfo('/');
|
||||
$free = $quota-$rootInfo['size']; // remaining free space for user
|
||||
if ( $free > 0 ) {
|
||||
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $versionsSize; // how much space can be used for versions
|
||||
} else {
|
||||
$availableSpace = $free-$versionsSize;
|
||||
}
|
||||
} else {
|
||||
$availableSpace = $free-$versionsSize;
|
||||
$availableSpace = $quota;
|
||||
}
|
||||
|
||||
|
||||
// after every 1000s run reduce the number of all versions not only for the current file
|
||||
$random = rand(0, 1000);
|
||||
if ($random == 0) {
|
||||
|
||||
@@ -139,6 +139,9 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface {
|
||||
if(!$this->enabled) {
|
||||
return array();
|
||||
}
|
||||
if(!$this->groupExists($gid)) {
|
||||
return array();
|
||||
}
|
||||
$cachekey = 'usersInGroup-'.$gid.'-'.$search.'-'.$limit.'-'.$offset;
|
||||
// check for cache of the exact query
|
||||
$groupUsers = $this->connection->getFromCache($cachekey);
|
||||
@@ -178,7 +181,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface {
|
||||
//we got uids, need to get their DNs to 'tranlsate' them to usernames
|
||||
$filter = $this->combineFilterWithAnd(array(
|
||||
\OCP\Util::mb_str_replace('%uid', $member,
|
||||
$this->connection>ldapLoginFilter, 'UTF-8'),
|
||||
$this->connection->ldapLoginFilter, 'UTF-8'),
|
||||
$this->getFilterPartForUserSearch($search)
|
||||
));
|
||||
$ldap_users = $this->fetchListOfUsers($filter, 'dn');
|
||||
@@ -214,6 +217,12 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface {
|
||||
* @returns array with display names (value) and user ids(key)
|
||||
*/
|
||||
public function displayNamesInGroup($gid, $search, $limit, $offset) {
|
||||
if(!$this->enabled) {
|
||||
return array();
|
||||
}
|
||||
if(!$this->groupExists($gid)) {
|
||||
return array();
|
||||
}
|
||||
$users = $this->usersInGroup($gid, $search, $limit, $offset);
|
||||
$displayNames = array();
|
||||
foreach($users as $user) {
|
||||
|
||||
@@ -76,8 +76,15 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
|
||||
if(isset($this->backends[$prefix])) {
|
||||
$result = call_user_func_array(array($this->backends[$prefix], $method), $parameters);
|
||||
if(!$result) {
|
||||
//not found here, reset cache to null
|
||||
$this->writeToCache($cacheKey, null);
|
||||
//not found here, reset cache to null if group vanished
|
||||
//because sometimes methods return false with a reason
|
||||
$groupExists = call_user_func_array(
|
||||
array($this->backends[$prefix], 'groupExists'),
|
||||
array($gid)
|
||||
);
|
||||
if(!$groupExists) {
|
||||
$this->writeToCache($cacheKey, null);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,10 @@ abstract class Access {
|
||||
$dn = $this->DNasBaseParameter($dn);
|
||||
$rr = @ldap_read($cr, $dn, $filter, array($attr));
|
||||
if(!is_resource($rr)) {
|
||||
\OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG);
|
||||
if(!empty($attr)) {
|
||||
//do not throw this message on userExists check, irritates
|
||||
\OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG);
|
||||
}
|
||||
//in case an error occurs , e.g. object does not exist
|
||||
return false;
|
||||
}
|
||||
@@ -84,7 +87,7 @@ abstract class Access {
|
||||
for($i=0;$i<$result[$attr]['count'];$i++) {
|
||||
if($this->resemblesDN($attr)) {
|
||||
$values[] = $this->sanitizeDN($result[$attr][$i]);
|
||||
} elseif(strtolower($attr) == 'objectguid') {
|
||||
} elseif(strtolower($attr) == 'objectguid' || strtolower($attr) == 'guid') {
|
||||
$values[] = $this->convertObjectGUID2Str($result[$attr][$i]);
|
||||
} else {
|
||||
$values[] = $result[$attr][$i];
|
||||
@@ -314,7 +317,7 @@ abstract class Access {
|
||||
}
|
||||
$ldapname = $ldapname[0];
|
||||
}
|
||||
$intname = $isUser ? $this->sanitizeUsername($uuid) : $this->sanitizeUsername($ldapname);
|
||||
$intname = $isUser ? $this->sanitizeUsername($uuid) : $ldapname;
|
||||
|
||||
//a new user/group! Add it only if it doesn't conflict with other backend's users or existing groups
|
||||
//disabling Cache is required to avoid that the new user is cached as not-existing in fooExists check
|
||||
@@ -895,7 +898,7 @@ abstract class Access {
|
||||
}
|
||||
|
||||
//for now, supported (known) attributes are entryUUID, nsuniqueid, objectGUID
|
||||
$testAttributes = array('entryuuid', 'nsuniqueid', 'objectguid');
|
||||
$testAttributes = array('entryuuid', 'nsuniqueid', 'objectguid', 'guid');
|
||||
|
||||
foreach($testAttributes as $attribute) {
|
||||
\OCP\Util::writeLog('user_ldap', 'Testing '.$attribute.' as UUID attr', \OCP\Util::DEBUG);
|
||||
@@ -1028,7 +1031,7 @@ abstract class Access {
|
||||
*/
|
||||
private function setPagedResultCookie($base, $filter, $limit, $offset, $cookie) {
|
||||
if(!empty($cookie)) {
|
||||
$cachekey = 'lc' . dechex(crc32($base)) . '-' . dechex(crc32($filter)) . '-' .$limit . '-' . $offset;
|
||||
$cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' .$limit . '-' . $offset;
|
||||
$cookie = $this->connection->writeToCache($cachekey, $cookie);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,6 @@ class Connection {
|
||||
*/
|
||||
private function readConfiguration($force = false) {
|
||||
if((!$this->configured || $force) && !is_null($this->configID)) {
|
||||
$defaults = $this->getDefaults();
|
||||
$v = 'getValue';
|
||||
$this->config['ldapHost'] = $this->$v('ldap_host');
|
||||
$this->config['ldapBackupHost'] = $this->$v('ldap_backup_host');
|
||||
@@ -428,7 +427,9 @@ class Connection {
|
||||
'No group filter is specified, LDAP group feature will not be used.',
|
||||
\OCP\Util::INFO);
|
||||
}
|
||||
if(!in_array($this->config['ldapUuidAttribute'], array('auto', 'entryuuid', 'nsuniqueid', 'objectguid'))
|
||||
$uuidAttributes = array(
|
||||
'auto', 'entryuuid', 'nsuniqueid', 'objectguid', 'guid');
|
||||
if(!in_array($this->config['ldapUuidAttribute'], $uuidAttributes)
|
||||
&& (!is_null($this->configID))) {
|
||||
\OCP\Config::setAppValue($this->configID, $this->configPrefix.'ldap_uuid_attribute', 'auto');
|
||||
\OCP\Util::writeLog('user_ldap',
|
||||
|
||||
@@ -51,7 +51,8 @@ class Helper {
|
||||
$query = '
|
||||
SELECT DISTINCT `configkey`
|
||||
FROM `*PREFIX*appconfig`
|
||||
WHERE `configkey` LIKE ?
|
||||
WHERE `appid` = \'user_ldap\'
|
||||
AND `configkey` LIKE ?
|
||||
';
|
||||
if($activeConfigurations) {
|
||||
$query .= ' AND `configvalue` = \'1\'';
|
||||
|
||||
@@ -180,6 +180,11 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
|
||||
* @return boolean
|
||||
*/
|
||||
public function getHome($uid) {
|
||||
// user Exists check required as it is not done in user proxy!
|
||||
if(!$this->userExists($uid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$cacheKey = 'getHome'.$uid;
|
||||
if($this->connection->isCached($cacheKey)) {
|
||||
return $this->connection->getFromCache($cacheKey);
|
||||
@@ -217,6 +222,10 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
|
||||
* @return display name
|
||||
*/
|
||||
public function getDisplayName($uid) {
|
||||
if(!$this->userExists($uid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$cacheKey = 'getDisplayName'.$uid;
|
||||
if(!is_null($displayName = $this->connection->getFromCache($cacheKey))) {
|
||||
return $displayName;
|
||||
|
||||
@@ -76,8 +76,15 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
|
||||
if(isset($this->backends[$prefix])) {
|
||||
$result = call_user_func_array(array($this->backends[$prefix], $method), $parameters);
|
||||
if(!$result) {
|
||||
//not found here, reset cache to null
|
||||
$this->writeToCache($cacheKey, null);
|
||||
//not found here, reset cache to null if user vanished
|
||||
//because sometimes methods return false with a reason
|
||||
$userExists = call_user_func_array(
|
||||
array($this->backends[$prefix], 'userExists'),
|
||||
array($uid)
|
||||
);
|
||||
if(!$userExists) {
|
||||
$this->writeToCache($cacheKey, null);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -136,8 +136,12 @@ $CONFIG = array(
|
||||
"remember_login_cookie_lifetime" => 60*60*24*15,
|
||||
|
||||
/* Custom CSP policy, changing this will overwrite the standard policy */
|
||||
"custom_csp_policy" => "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:",
|
||||
"custom_csp_policy" => "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *",
|
||||
|
||||
/* Enable/disable X-Frame-Restriction */
|
||||
/* HIGH SECURITY RISK IF DISABLED*/
|
||||
"xframe_restriction" => true,
|
||||
|
||||
/* The directory where the user data is stored, default to data in the owncloud
|
||||
* directory. The sqlite database is also stored here, when sqlite is used.
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user