Merge master into oc_preview

This commit is contained in:
Georg Ehrke 2013-08-29 10:50:55 +02:00
commit b7758d0f8d
368 changed files with 6410 additions and 5792 deletions

3
.gitignore vendored
View File

@ -82,6 +82,9 @@ nbproject
# Tests
/tests/phpunit.xml
# Node Modules
/build/node_modules/
# Tests - auto-generated files
/data-autotest
/tests/coverage*

@ -1 +1 @@
Subproject commit bd366f82084718903c8a7b85fbc9ad0595d29c5a
Subproject commit dc87ea630287f27502eba825fbb19fcc33c34c86

View File

@ -105,16 +105,20 @@ if (strpos($dir, '..') === false) {
$meta = \OC\Files\Filesystem::getFileInfo($target);
// updated max file size after upload
$storageStats = \OCA\files\lib\Helper::buildFileStorageStatistics($dir);
$result[] = array('status' => 'success',
'mime' => $meta['mimetype'],
'size' => $meta['size'],
'id' => $meta['fileid'],
'name' => basename($target),
'originalname' => $files['name'][$i],
'uploadMaxFilesize' => $maxUploadFileSize,
'maxHumanFilesize' => $maxHumanFileSize
);
if ($meta === false) {
OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('Upload failed')), $storageStats)));
exit();
} else {
$result[] = array('status' => 'success',
'mime' => $meta['mimetype'],
'size' => $meta['size'],
'id' => $meta['fileid'],
'name' => basename($target),
'originalname' => $files['name'][$i],
'uploadMaxFilesize' => $maxUploadFileSize,
'maxHumanFilesize' => $maxHumanFileSize
);
}
}
}
OCP\JSON::encodedPrint($result);

View File

@ -130,7 +130,8 @@ table th#headerDate, table td.date {
#filestable.multiselect {
top: 88px;
}
table.multiselect thead { position:fixed; top:82px; z-index:1; -moz-box-sizing: border-box; box-sizing: border-box; left: 0; padding-left: 64px; width:100%; }
table.multiselect thead { position:fixed; top:82px; z-index:1; -moz-box-sizing: border-box; box-sizing: border-box; left: 0; padding-left: 80px; width:100%; }
table.multiselect thead th {
background-color: rgba(210,210,210,.7);
color: #000;
@ -298,7 +299,20 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; }
}
.summary {
opacity: .5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
opacity: .3;
height: 70px;
}
.summary:hover, .summary, table tr.summary td {
background-color: transparent;
}
.summary td {
padding-top: 8px;
padding-bottom: 8px;
border-bottom: none;
}
.summary .info {
margin-left: 55px;

View File

@ -121,7 +121,7 @@ if ($needUpgrade) {
$tmpl->printPage();
} else {
// information about storage capacities
$storageInfo=OC_Helper::getStorageInfo();
$storageInfo=OC_Helper::getStorageInfo($dir);
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
if (OC_App::isEnabled('files_encryption')) {

View File

@ -102,6 +102,18 @@ $(document).ready(function() {
var result=$.parseJSON(response);
if(typeof result[0] !== 'undefined' && result[0].status === 'success') {
var filename = result[0].originalname;
// delete jqXHR reference
if (typeof data.context !== 'undefined' && data.context.data('type') === 'dir') {
var dirName = data.context.data('file');
delete uploadingFiles[dirName][filename];
if ($.assocArraySize(uploadingFiles[dirName]) == 0) {
delete uploadingFiles[dirName];
}
} else {
delete uploadingFiles[filename];
}
var file = result[0];
} else {
data.textStatus = 'servererror';
@ -109,20 +121,6 @@ $(document).ready(function() {
var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload');
fu._trigger('fail', e, data);
}
var filename = result[0].originalname;
// delete jqXHR reference
if (typeof data.context !== 'undefined' && data.context.data('type') === 'dir') {
var dirName = data.context.data('file');
delete uploadingFiles[dirName][filename];
if ($.assocArraySize(uploadingFiles[dirName]) == 0) {
delete uploadingFiles[dirName];
}
} else {
delete uploadingFiles[filename];
}
},
/**
* called after last upload

View File

@ -145,6 +145,7 @@ var FileList={
remove:function(name){
$('tr').filterAttr('data-file',name).find('td.filename').draggable('destroy');
$('tr').filterAttr('data-file',name).remove();
FileList.updateFileSummary();
if($('tr[data-file]').length==0){
$('#emptyfolder').show();
}
@ -177,6 +178,7 @@ var FileList={
$('#fileList').append(element);
}
$('#emptyfolder').hide();
FileList.updateFileSummary();
},
loadingDone:function(name, id){
var mime, tr=$('tr').filterAttr('data-file',name);
@ -393,6 +395,7 @@ var FileList={
});
procesSelection();
checkTrashStatus();
FileList.updateFileSummary();
} else {
$.each(files,function(index,file) {
var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete");
@ -400,6 +403,111 @@ var FileList={
});
}
});
},
createFileSummary: function() {
if( $('#fileList tr').length > 0 ) {
var totalDirs = 0;
var totalFiles = 0;
var totalSize = 0;
// Count types and filesize
$.each($('tr[data-file]'), function(index, value) {
if ($(value).data('type') === 'dir') {
totalDirs++;
} else if ($(value).data('type') === 'file') {
totalFiles++;
}
totalSize += parseInt($(value).data('size'));
});
// Get translations
var directoryInfo = n('files', '%n folder', '%n folders', totalDirs);
var fileInfo = n('files', '%n file', '%n files', totalFiles);
var infoVars = {
dirs: '<span class="dirinfo">'+directoryInfo+'</span><span class="connector">',
files: '</span><span class="fileinfo">'+fileInfo+'</span>'
}
var info = t('files', '{dirs} and {files}', infoVars);
// don't show the filesize column, if filesize is NaN (e.g. in trashbin)
if (isNaN(totalSize)) {
var fileSize = '';
} else {
var fileSize = '<td class="filesize">'+humanFileSize(totalSize)+'</td>';
}
$('#fileList').append('<tr class="summary"><td><span class="info">'+info+'</span></td>'+fileSize+'<td></td></tr>');
var $dirInfo = $('.summary .dirinfo');
var $fileInfo = $('.summary .fileinfo');
var $connector = $('.summary .connector');
// Show only what's necessary, e.g.: no files: don't show "0 files"
if ($dirInfo.html().charAt(0) === "0") {
$dirInfo.hide();
$connector.hide();
}
if ($fileInfo.html().charAt(0) === "0") {
$fileInfo.hide();
$connector.hide();
}
}
},
updateFileSummary: function() {
var $summary = $('.summary');
// Check if we should remove the summary to show "Upload something"
if ($('#fileList tr').length === 1 && $summary.length === 1) {
$summary.remove();
}
// If there's no summary create one (createFileSummary checks if there's data)
else if ($summary.length === 0) {
FileList.createFileSummary();
}
// There's a summary and data -> Update the summary
else if ($('#fileList tr').length > 1 && $summary.length === 1) {
var totalDirs = 0;
var totalFiles = 0;
var totalSize = 0;
$.each($('tr[data-file]'), function(index, value) {
if ($(value).data('type') === 'dir') {
totalDirs++;
} else if ($(value).data('type') === 'file') {
totalFiles++;
}
if ($(value).data('size') !== undefined) {
totalSize += parseInt($(value).data('size'));
}
});
var $dirInfo = $('.summary .dirinfo');
var $fileInfo = $('.summary .fileinfo');
var $connector = $('.summary .connector');
// Substitute old content with new translations
$dirInfo.html(n('files', '%n folder', '%n folders', totalDirs));
$fileInfo.html(n('files', '%n file', '%n files', totalFiles));
$('.summary .filesize').html(humanFileSize(totalSize));
// Show only what's necessary (may be hidden)
if ($dirInfo.html().charAt(0) === "0") {
$dirInfo.hide();
$connector.hide();
} else {
$dirInfo.show();
}
if ($fileInfo.html().charAt(0) === "0") {
$fileInfo.hide();
$connector.hide();
} else {
$fileInfo.show();
}
if ($dirInfo.html().charAt(0) !== "0" && $fileInfo.html().charAt(0) !== "0") {
$connector.show();
}
}
}
};
@ -601,4 +709,6 @@ $(document).ready(function(){
$(window).unload(function (){
$(window).trigger('beforeunload');
});
FileList.createFileSummary();
});

View File

@ -35,7 +35,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "مساحتك التخزينية ممتلئة, لا يمكم تحديث ملفاتك أو مزامنتها بعد الآن !",
"Your storage is almost full ({usedSpacePercent}%)" => "مساحتك التخزينية امتلأت تقريبا ",
"Your download is being prepared. This might take some time if the files are big." => "جاري تجهيز عملية التحميل. قد تستغرق بعض الوقت اذا كان حجم الملفات كبير.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "إسم مجلد غير صحيح. استخدام مصطلح \"Shared\" محجوز للنظام",
"Name" => "اسم",
"Size" => "حجم",
"Modified" => "معدل",

View File

@ -31,7 +31,6 @@ $TRANSLATIONS = array(
"'.' is an invalid file name." => "টি একটি অননুমোদিত নাম।",
"File name cannot be empty." => "ফাইলের নামটি ফাঁকা রাখা যাবে না।",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "নামটি সঠিক নয়, '\\', '/', '<', '>', ':', '\"', '|', '?' এবং '*' অনুমোদিত নয়।",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "ফোল্ডারের নামটি সঠিক নয়। 'ভাগাভাগি করা' শুধুমাত্র Owncloud এর জন্য সংরক্ষিত।",
"Name" => "রাম",
"Size" => "আকার",
"Modified" => "পরিবর্তিত",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "El vostre espai d'emmagatzemament és gairebé ple ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "L'encriptació s'ha desactivat però els vostres fitxers segueixen encriptats. Aneu a la vostra configuració personal per desencriptar els vostres fitxers.",
"Your download is being prepared. This might take some time if the files are big." => "S'està preparant la baixada. Pot trigar una estona si els fitxers són grans.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nom de carpeta no vàlid. L'ús de 'Shared' està reservat per Owncloud",
"Name" => "Nom",
"Size" => "Mida",
"Modified" => "Modificat",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Vaše úložiště je téměř plné ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Šifrování bylo zrušeno, soubory jsou však stále zašifrované. Běžte prosím do osobního nastavení, kde si složky odšifrujete.",
"Your download is being prepared. This might take some time if the files are big." => "Vaše soubory ke stažení se připravují. Pokud jsou velké, může to chvíli trvat.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Neplatný název složky. Pojmenování 'Shared' je rezervováno pro vnitřní potřeby ownCloud",
"Name" => "Název",
"Size" => "Velikost",
"Modified" => "Upraveno",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"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.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Enw plygell annilys. Mae'r defnydd o 'Shared' yn cael ei gadw gan Owncloud",
"Name" => "Enw",
"Size" => "Maint",
"Modified" => "Addaswyd",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Din opbevaringsplads er næsten fyldt op ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Krypteringen blev deaktiveret, men dine filer er stadig krypteret. Gå venligst til dine personlige indstillinger for at dekryptere dine filer. ",
"Your download is being prepared. This might take some time if the files are big." => "Dit download forberedes. Dette kan tage lidt tid ved større filer.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ugyldigt mappenavn. Brug af \"Shared\" er forbeholdt Owncloud",
"Name" => "Navn",
"Size" => "Størrelse",
"Modified" => "Ændret",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Dein Speicher ist fast voll ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Die Verschlüsselung wurde deaktiviert, jedoch sind deine Dateien nach wie vor verschlüsselt. Bitte gehe zu deinen persönlichen Einstellungen, um deine Dateien zu entschlüsseln.",
"Your download is being prepared. This might take some time if the files are big." => "Dein Download wird vorbereitet. Dies kann bei größeren Dateien etwas dauern.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ungültiger Verzeichnisname. Die Nutzung von \"Shared\" ist ownCloud vorbehalten.",
"Name" => "Name",
"Size" => "Größe",
"Modified" => "Geändert",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Ihr Speicher ist fast voll ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Die Verschlüsselung wurde deaktiviert, jedoch sind Ihre Dateien nach wie vor verschlüsselt. Bitte gehen Sie zu Ihren persönlichen Einstellungen, um Ihre Dateien zu entschlüsseln.",
"Your download is being prepared. This might take some time if the files are big." => "Ihr Download wird vorbereitet. Dies kann bei größeren Dateien etwas dauern.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ungültiger Verzeichnisname. Die Nutzung von \"Shared\" ist ownCloud vorbehalten",
"Name" => "Name",
"Size" => "Größe",
"Modified" => "Geändert",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Ο αποθηκευτικός σας χώρος είναι γεμάτος, τα αρχεία δεν μπορούν να ενημερωθούν ή να συγχρονιστούν πια!",
"Your storage is almost full ({usedSpacePercent}%)" => "Ο αποθηκευτικός χώρος είναι σχεδόν γεμάτος ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Η λήψη προετοιμάζεται. Αυτό μπορεί να πάρει ώρα εάν τα αρχεία έχουν μεγάλο μέγεθος.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Μη έγκυρο όνομα φακέλου. Η χρήση του 'Κοινόχρηστος' χρησιμοποιείται από ο Owncloud",
"Name" => "Όνομα",
"Size" => "Μέγεθος",
"Modified" => "Τροποποιήθηκε",

View File

@ -38,7 +38,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Via memoro plenas, ne plu eblas ĝisdatigi aŭ sinkronigi dosierojn!",
"Your storage is almost full ({usedSpacePercent}%)" => "Via memoro preskaŭ plenas ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Via elŝuto pretiĝatas. Ĉi tio povas daŭri iom da tempo se la dosieroj grandas.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nevalida dosierujnomo. Uzo de “Shared” rezervatas de Owncloud.",
"Name" => "Nomo",
"Size" => "Grando",
"Modified" => "Modifita",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Su almacenamiento está lleno, ¡no se pueden actualizar o sincronizar más!",
"Your storage is almost full ({usedSpacePercent}%)" => "Su almacenamiento está casi lleno ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Su descarga está siendo preparada. Esto puede tardar algún tiempo si los archivos son grandes.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nombre de carpeta no es válido. El uso de \"Shared\" está reservado por Owncloud",
"Name" => "Nombre",
"Size" => "Tamaño",
"Modified" => "Modificado",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "El almacenamiento está lleno, los archivos no se pueden seguir actualizando ni sincronizando",
"Your storage is almost full ({usedSpacePercent}%)" => "El almacenamiento está casi lleno ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Tu descarga se está preparando. Esto puede demorar si los archivos son muy grandes.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nombre de carpeta inválido. El uso de 'Shared' está reservado por ownCloud",
"Name" => "Nombre",
"Size" => "Tamaño",
"Modified" => "Modificado",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Su andmemaht on peaaegu täis ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Krüpteering on keelatud, kuid sinu failid on endiselt krüpteeritud. Palun vaata oma personaalseid seadeid oma failide dekrüpteerimiseks.",
"Your download is being prepared. This might take some time if the files are big." => "Valmistatakse allalaadimist. See võib võtta veidi aega, kui on tegu suurte failidega. ",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Vigane kataloogi nimi. 'Shared' kasutamine on reserveeritud ownCloud poolt.",
"Name" => "Nimi",
"Size" => "Suurus",
"Modified" => "Muudetud",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Zure biltegiratzea nahiko beterik dago (%{usedSpacePercent})",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Enkriptazioa desgaitua izan da baina zure fitxategiak oraindik enkriptatuta daude. Mesedez jo zure ezarpen pertsonaletara zure fitxategiak dekodifikatzeko.",
"Your download is being prepared. This might take some time if the files are big." => "Zure deskarga prestatu egin behar da. Denbora bat har lezake fitxategiak handiak badira. ",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Baliogabeako karpeta izena. 'Shared' izena Owncloudek erreserbatzen du",
"Name" => "Izena",
"Size" => "Tamaina",
"Modified" => "Aldatuta",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "فضای ذخیره ی شما کاملا پر است، بیش از این فایلها بهنگام یا همگام سازی نمی توانند بشوند!",
"Your storage is almost full ({usedSpacePercent}%)" => "فضای ذخیره ی شما تقریبا پر است ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "دانلود شما در حال آماده شدن است. در صورتیکه پرونده ها بزرگ باشند ممکن است مدتی طول بکشد.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "نام پوشه نامعتبر است. استفاده از \" به اشتراک گذاشته شده \" متعلق به سایت Owncloud است.",
"Name" => "نام",
"Size" => "اندازه",
"Modified" => "تاریخ",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Votre espage de stockage est plein, les fichiers ne peuvent plus être téléversés ou synchronisés !",
"Your storage is almost full ({usedSpacePercent}%)" => "Votre espace de stockage est presque plein ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Votre téléchargement est cours de préparation. Ceci peut nécessiter un certain temps si les fichiers sont volumineux.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nom de dossier invalide. L'utilisation du mot 'Shared' est réservée à Owncloud",
"Name" => "Nom",
"Size" => "Taille",
"Modified" => "Modifié",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "O seu espazo de almacenamento está case cheo ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "O cifrado foi desactivado, mais os ficheiros están cifrados. Vaia á configuración persoal para descifrar os ficheiros.",
"Your download is being prepared. This might take some time if the files are big." => "Está a prepararse a súa descarga. Isto pode levar bastante tempo se os ficheiros son grandes.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nome de cartafol incorrecto. O uso de «Shared» está reservado por Owncloud",
"Name" => "Nome",
"Size" => "Tamaño",
"Modified" => "Modificado",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "A tároló tele van, a fájlok nem frissíthetőek vagy szinkronizálhatóak a jövőben.",
"Your storage is almost full ({usedSpacePercent}%)" => "A tároló majdnem tele van ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Készül a letöltendő állomány. Ez eltarthat egy ideig, ha nagyok a fájlok.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Érvénytelen mappanév. A név használata csak a Owncloud számára lehetséges.",
"Name" => "Név",
"Size" => "Méret",
"Modified" => "Módosítva",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Ruang penyimpanan Anda penuh, berkas tidak dapat diperbarui atau disinkronkan lagi!",
"Your storage is almost full ({usedSpacePercent}%)" => "Ruang penyimpanan hampir penuh ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Unduhan Anda sedang disiapkan. Prosesnya dapat berlangsung agak lama jika ukuran berkasnya besar.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nama folder salah. Nama 'Shared' telah digunakan oleh Owncloud.",
"Name" => "Nama",
"Size" => "Ukuran",
"Modified" => "Dimodifikasi",

View File

@ -31,7 +31,6 @@ $TRANSLATIONS = array(
"'.' is an invalid file name." => "'.' er ekki leyfilegt nafn.",
"File name cannot be empty." => "Nafn skráar má ekki vera tómt",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ógilt nafn, táknin '\\', '/', '<', '>', ':', '\"', '|', '?' og '*' eru ekki leyfð.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Óleyfilegt nafn á möppu. Nafnið 'Shared' er frátekið fyrir Owncloud",
"Name" => "Nafn",
"Size" => "Stærð",
"Modified" => "Breytt",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Lo spazio di archiviazione è quasi pieno ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "La cifratura è stata disabilitata ma i tuoi file sono ancora cifrati. Vai nelle impostazioni personali per decifrare i file.",
"Your download is being prepared. This might take some time if the files are big." => "Il tuo scaricamento è in fase di preparazione. Ciò potrebbe richiedere del tempo se i file sono grandi.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nome della cartella non valido. L'uso di 'Shared' è riservato da ownCloud",
"Name" => "Nome",
"Size" => "Dimensione",
"Modified" => "Modificato",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "あなたのストレージはほぼ一杯です({usedSpacePercent}%",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "暗号化の機能は無効化されましたが、ファイルはすでに暗号化されています。個人設定からファイルを複合を行ってください。",
"Your download is being prepared. This might take some time if the files are big." => "ダウンロードの準備中です。ファイルサイズが大きい場合は少し時間がかかるかもしれません。",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "無効なフォルダ名です。'Shared' の利用は ownCloud が予約済みです。",
"Name" => "名前",
"Size" => "サイズ",
"Modified" => "変更",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "თქვენი საცავი გადაივსო. ფაილების განახლება და სინქრონიზირება ვერ მოხერხდება!",
"Your storage is almost full ({usedSpacePercent}%)" => "თქვენი საცავი თითქმის გადაივსო ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "გადმოწერის მოთხოვნა მუშავდება. ის მოითხოვს გარკვეულ დროს რაგდან ფაილები არის დიდი ზომის.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "დაუშვებელი ფოლდერის სახელი. 'Shared'–ის გამოყენება რეზერვირებულია Owncloudის მიერ",
"Name" => "სახელი",
"Size" => "ზომა",
"Modified" => "შეცვლილია",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "저장 공간이 가득 찼습니다. 파일을 업데이트하거나 동기화할 수 없습니다!",
"Your storage is almost full ({usedSpacePercent}%)" => "저장 공간이 거의 가득 찼습니다 ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "다운로드가 준비 중입니다. 파일 크기가 크다면 시간이 오래 걸릴 수도 있습니다.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "폴더 이름이 유효하지 않습니다. ",
"Name" => "이름",
"Size" => "크기",
"Modified" => "수정됨",

View File

@ -38,7 +38,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Jūsų visa vieta serveryje užimta",
"Your storage is almost full ({usedSpacePercent}%)" => "Jūsų vieta serveryje beveik visa užimta ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Jūsų atsisiuntimas yra paruošiamas. tai gali užtrukti jei atsisiunčiamas didelis failas.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Negalimas aplanko pavadinimas. 'Shared' pavadinimas yra rezervuotas ownCloud",
"Name" => "Pavadinimas",
"Size" => "Dydis",
"Modified" => "Pakeista",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Jūsu krātuve ir gandrīz pilna ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Šifrēšana tika atslēgta, tomēr jūsu faili joprojām ir šifrēti. Atšifrēt failus var Personiskajos uzstādījumos.",
"Your download is being prepared. This might take some time if the files are big." => "Tiek sagatavota lejupielāde. Tas var aizņemt kādu laiciņu, ja datnes ir lielas.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nederīgs mapes nosaukums. “Koplietots” izmantojums ir rezervēts ownCloud servisam.",
"Name" => "Nosaukums",
"Size" => "Izmērs",
"Modified" => "Mainīts",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Lagringsplass er oppbrukt, filer kan ikke lenger oppdateres eller synkroniseres!",
"Your storage is almost full ({usedSpacePercent}%)" => "Lagringsplass er nesten brukt opp ([usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Nedlastingen din klargjøres. Hvis filene er store kan dette ta litt tid.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ugyldig mappenavn. Bruk av \"Shared\" er reservert av ownCloud.",
"Name" => "Navn",
"Size" => "Størrelse",
"Modified" => "Endret",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Uw opslagruimte zit bijna vol ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Encryptie is uitgeschakeld maar uw bestanden zijn nog steeds versleuteld. Ga naar uw persoonlijke instellingen om uw bestanden te decoderen.",
"Your download is being prepared. This might take some time if the files are big." => "Uw download wordt voorbereid. Dit kan enige tijd duren bij grote bestanden.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ongeldige mapnaam. Gebruik van'Gedeeld' is voorbehouden aan Owncloud",
"Name" => "Naam",
"Size" => "Grootte",
"Modified" => "Aangepast",

View File

@ -38,7 +38,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Lagringa di er full, kan ikkje lenger oppdatera eller synkronisera!",
"Your storage is almost full ({usedSpacePercent}%)" => "Lagringa di er nesten full ({usedSpacePercent} %)",
"Your download is being prepared. This might take some time if the files are big." => "Gjer klar nedlastinga di. Dette kan ta ei stund viss filene er store.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ugyldig mappenamn. Mappa «Shared» er reservert av ownCloud",
"Name" => "Namn",
"Size" => "Storleik",
"Modified" => "Endra",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Magazyn jest pełny. Pliki nie mogą zostać zaktualizowane lub zsynchronizowane!",
"Your storage is almost full ({usedSpacePercent}%)" => "Twój magazyn jest prawie pełny ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Pobieranie jest przygotowywane. Może to zająć trochę czasu jeśli pliki są duże.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nieprawidłowa nazwa folderu. Korzystanie z nazwy „Shared” jest zarezerwowane dla ownCloud",
"Name" => "Nazwa",
"Size" => "Rozmiar",
"Modified" => "Modyfikacja",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Seu armazenamento está cheio, arquivos não podem mais ser atualizados ou sincronizados!",
"Your storage is almost full ({usedSpacePercent}%)" => "Seu armazenamento está quase cheio ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Seu download está sendo preparado. Isto pode levar algum tempo se os arquivos forem grandes.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nome de pasta inválido. O uso de 'Shared' é reservado para o Owncloud",
"Name" => "Nome",
"Size" => "Tamanho",
"Modified" => "Modificado",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "O seu armazenamento está cheio, os ficheiros não podem ser sincronizados.",
"Your storage is almost full ({usedSpacePercent}%)" => "O seu espaço de armazenamento está quase cheiro ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "O seu download está a ser preparado. Este processo pode demorar algum tempo se os ficheiros forem grandes.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nome de pasta inválido. O Uso de 'shared' é reservado para o ownCloud",
"Name" => "Nome",
"Size" => "Tamanho",
"Modified" => "Modificado",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Spatiul de stocare este plin, nu mai puteti incarca s-au sincroniza alte fisiere.",
"Your storage is almost full ({usedSpacePercent}%)" => "Spatiul de stocare este aproape plin ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Se pregătește descărcarea. Aceasta poate să dureze ceva timp dacă fișierele sunt mari.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Invalid folder name. Usage of 'Shared' is reserved by Ownclou",
"Name" => "Nume",
"Size" => "Dimensiune",
"Modified" => "Modificat",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Ваше дисковое пространство полностью заполнено, произведите очистку перед загрузкой новых файлов.",
"Your storage is almost full ({usedSpacePercent}%)" => "Ваше хранилище почти заполнено ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Загрузка началась. Это может потребовать много времени, если файл большого размера.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Неправильное имя каталога. Имя 'Shared' зарезервировано.",
"Name" => "Имя",
"Size" => "Размер",
"Modified" => "Изменён",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Vaše úložisko je takmer plné ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Šifrovanie bolo zakázané, ale vaše súbory sú stále zašifrované. Prosím, choďte do osobného nastavenia pre dešifrovanie súborov.",
"Your download is being prepared. This might take some time if the files are big." => "Vaše sťahovanie sa pripravuje. Ak sú sťahované súbory veľké, môže to chvíľu trvať.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Neplatné meno priečinka. Používanie mena 'Shared' je vyhradené len pre Owncloud",
"Name" => "Názov",
"Size" => "Veľkosť",
"Modified" => "Upravené",

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Shramba je povsem napolnjena. Datotek ni več mogoče posodabljati in usklajevati!",
"Your storage is almost full ({usedSpacePercent}%)" => "Mesto za shranjevanje je skoraj polno ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Postopek priprave datoteke za prejem je lahko dolgotrajen, če je datoteka zelo velika.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Neveljavno ime mape. Uporaba oznake \"Souporaba\" je zadržan za sistem ownCloud.",
"Name" => "Ime",
"Size" => "Velikost",
"Modified" => "Spremenjeno",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"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.",
"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.",
"Name" => "Emri",
"Size" => "Dimensioni",
"Modified" => "Modifikuar",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Ваше складиште је пуно. Датотеке више не могу бити ажуриране ни синхронизоване.",
"Your storage is almost full ({usedSpacePercent}%)" => "Ваше складиште је скоро па пуно ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Припремам преузимање. Ово може да потраје ако су датотеке велике.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Неисправно име фасцикле. Фасцикла „Shared“ је резервисана за ownCloud.",
"Name" => "Име",
"Size" => "Величина",
"Modified" => "Измењено",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Ditt lagringsutrymme är nästan fullt ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Kryptering inaktiverades men dina filer är fortfarande krypterade. Vänligen gå till sidan för dina personliga inställningar för att dekryptera dina filer.",
"Your download is being prepared. This might take some time if the files are big." => "Din nedladdning förbereds. Det kan ta tid om det är stora filer.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ogiltigt mappnamn. Användande av 'Shared' är reserverat av ownCloud",
"Name" => "Namn",
"Size" => "Storlek",
"Modified" => "Ändrad",

View File

@ -36,7 +36,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "พื้นที่จัดเก็บข้อมูลของคุณเต็มแล้ว ไม่สามารถอัพเดทหรือผสานไฟล์ต่างๆได้อีกต่อไป",
"Your storage is almost full ({usedSpacePercent}%)" => "พื้นที่จัดเก็บข้อมูลของคุณใกล้เต็มแล้ว ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "กำลังเตรียมดาวน์โหลดข้อมูล หากไฟล์มีขนาดใหญ่ อาจใช้เวลาสักครู่",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "ชื่อโฟลเดอร์ไม่ถูกต้อง การใช้งาน 'แชร์' สงวนไว้สำหรับ Owncloud เท่านั้น",
"Name" => "ชื่อ",
"Size" => "ขนาด",
"Modified" => "แก้ไขแล้ว",

View File

@ -41,7 +41,6 @@ $TRANSLATIONS = array(
"Your storage is almost full ({usedSpacePercent}%)" => "Depolama alanınız neredeyse dolu ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Şifreleme işlemi durduruldu ancak dosyalarınız şifreli. Dosyalarınızın şifresini kaldırmak için lütfen kişisel ayarlar kısmına geçiniz.",
"Your download is being prepared. This might take some time if the files are big." => "İndirmeniz hazırlanıyor. Dosya büyük ise biraz zaman alabilir.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Geçersiz dizin adı. Shared isminin kullanımı Owncloud tarafından rezerver edilmiştir.",
"Name" => "İsim",
"Size" => "Boyut",
"Modified" => "Değiştirilme",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Ваше сховище переповнене, файли більше не можуть бути оновлені або синхронізовані !",
"Your storage is almost full ({usedSpacePercent}%)" => "Ваше сховище майже повне ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Ваше завантаження готується. Це може зайняти деякий час, якщо файли завеликі.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Невірне ім'я теки. Використання \"Shared\" зарезервовано Owncloud",
"Name" => "Ім'я",
"Size" => "Розмір",
"Modified" => "Змінено",

View File

@ -37,7 +37,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "Your storage is full, files can not be updated or synced anymore!",
"Your storage is almost full ({usedSpacePercent}%)" => "Your storage is almost full ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "Your download is being prepared. This might take some time if the files are big.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Invalid folder name. Usage of 'Shared' is reserved by Owncloud",
"Name" => "Tên",
"Size" => "Kích cỡ",
"Modified" => "Thay đổi",

View File

@ -1,80 +0,0 @@
<?php
$TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "无法移动 %s - 存在同名文件",
"Could not move %s" => "无法移动 %s",
"Unable to set upload directory." => "无法设置上传文件夹",
"Invalid Token" => "非法Token",
"No file was uploaded. Unknown error" => "没有上传文件。未知错误",
"There is no error, the file uploaded with success" => "文件上传成功",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "上传的文件超过了php.ini指定的upload_max_filesize",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "上传的文件超过了 HTML 表格中指定的 MAX_FILE_SIZE 选项",
"The uploaded file was only partially uploaded" => "文件部分上传",
"No file was uploaded" => "没有上传文件",
"Missing a temporary folder" => "缺失临时文件夹",
"Failed to write to disk" => "写磁盘失败",
"Not enough storage available" => "容量不足",
"Invalid directory." => "无效文件夹",
"Files" => "文件",
"Unable to upload your file as it is a directory or has 0 bytes" => "不能上传您的文件,由于它是文件夹或者为空文件",
"Not enough space available" => "容量不足",
"Upload cancelled." => "上传取消了",
"File upload is in progress. Leaving the page now will cancel the upload." => "文件正在上传。关闭页面会取消上传。",
"URL cannot be empty." => "网址不能为空。",
"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "无效文件夹名。“Shared”已经被系统保留。",
"Error" => "出错",
"Share" => "分享",
"Delete permanently" => "永久删除",
"Rename" => "重命名",
"Pending" => "等待中",
"{new_name} already exists" => "{new_name} 已存在",
"replace" => "替换",
"suggest name" => "推荐名称",
"cancel" => "取消",
"replaced {new_name} with {old_name}" => "已用 {old_name} 替换 {new_name}",
"undo" => "撤销",
"_Uploading %n file_::_Uploading %n files_" => array("正在上传 %n 个文件"),
"files uploading" => "个文件正在上传",
"'.' is an invalid file name." => "'.' 文件名不正确",
"File name cannot be empty." => "文件名不能为空",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "文件名内不能包含以下符号:\\ / < > : \" | ?和 *",
"Your storage is full, files can not be updated or synced anymore!" => "容量已满,不能再同步/上传文件了!",
"Your storage is almost full ({usedSpacePercent}%)" => "你的空间快用满了 ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "正在下载,可能会花点时间,跟文件大小有关",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "不正确文件夹名。Shared是保留名不能使用。",
"Name" => "名称",
"Size" => "大小",
"Modified" => "修改日期",
"_%n folder_::_%n folders_" => array("%n 个文件夹"),
"_%n file_::_%n files_" => array("%n 个文件"),
"%s could not be renamed" => "不能重命名 %s",
"Upload" => "上传",
"File handling" => "文件处理中",
"Maximum upload size" => "最大上传大小",
"max. possible: " => "最大可能",
"Needed for multi-file and folder downloads." => "需要多文件和文件夹下载.",
"Enable ZIP-download" => "支持ZIP下载",
"0 is unlimited" => "0是无限的",
"Maximum input size for ZIP files" => "最大的ZIP文件输入大小",
"Save" => "保存",
"New" => "新建",
"Text file" => "文本文档",
"Folder" => "文件夹",
"From link" => "来自链接",
"Deleted files" => "已删除的文件",
"Cancel upload" => "取消上传",
"You dont have write permissions here." => "您没有写入权限。",
"Nothing in here. Upload something!" => "这里没有东西.上传点什么!",
"Download" => "下载",
"Unshare" => "取消分享",
"Delete" => "删除",
"Upload too large" => "上传过大",
"The files you are trying to upload exceed the maximum size for file uploads on this server." => "你正在试图上传的文件超过了此服务器支持的最大的文件大小.",
"Files are being scanned, please wait." => "正在扫描文件,请稍候.",
"Current scanning" => "正在扫描",
"directory" => "文件夹",
"directories" => "文件夹",
"file" => "文件",
"files" => "文件",
"Upgrading filesystem cache..." => "升级系统缓存..."
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -40,7 +40,6 @@ $TRANSLATIONS = array(
"Your storage is full, files can not be updated or synced anymore!" => "您的存储空间已满,文件将无法更新或同步!",
"Your storage is almost full ({usedSpacePercent}%)" => "您的存储空间即将用完 ({usedSpacePercent}%)",
"Your download is being prepared. This might take some time if the files are big." => "下载正在准备中。如果文件较大可能会花费一些时间。",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "无效文件夹名。'共享' 是 Owncloud 预留的文件夹名。",
"Name" => "名称",
"Size" => "大小",
"Modified" => "修改日期",

View File

@ -32,20 +32,20 @@ $TRANSLATIONS = array(
"cancel" => "取消",
"replaced {new_name} with {old_name}" => "使用 {new_name} 取代 {old_name}",
"undo" => "復原",
"_Uploading %n file_::_Uploading %n files_" => array(""),
"_Uploading %n file_::_Uploading %n files_" => array("%n 個檔案正在上傳"),
"files uploading" => "檔案正在上傳中",
"'.' is an invalid file name." => "'.' 是不合法的檔名。",
"File name cannot be empty." => "檔名不能為空。",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "檔名不合法,不允許 '\\', '/', '<', '>', ':', '\"', '|', '?' 和 '*' 。",
"Your storage is full, files can not be updated or synced anymore!" => "您的儲存空間已滿,沒有辦法再更新或是同步檔案!",
"Your storage is almost full ({usedSpacePercent}%)" => "您的儲存空間快要滿了 ({usedSpacePercent}%)",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "加密已經被停用,但是您的舊檔案還是處於已加密的狀態,請前往個人設定以解密這些檔案。",
"Your download is being prepared. This might take some time if the files are big." => "正在準備您的下載,若您的檔案較大,將會需要更多時間。",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "無效的資料夾名稱,'Shared' 的使用被 ownCloud 保留",
"Name" => "名稱",
"Size" => "大小",
"Modified" => "修改",
"_%n folder_::_%n folders_" => array(""),
"_%n file_::_%n files_" => array(""),
"_%n folder_::_%n folders_" => array("%n 個資料夾"),
"_%n file_::_%n files_" => array("%n 個檔案"),
"%s could not be renamed" => "無法重新命名 %s",
"Upload" => "上傳",
"File handling" => "檔案處理",

View File

@ -11,7 +11,7 @@ class Helper
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
// information about storage capacities
$storageInfo = \OC_Helper::getStorageInfo();
$storageInfo = \OC_Helper::getStorageInfo($dir);
return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize,

View File

@ -1,16 +1,7 @@
<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>">
<?php $totalfiles = 0;
$totaldirs = 0;
$totalsize = 0; ?>
<?php foreach($_['files'] as $file):
//strlen('files/') => 6
$relativePath = substr($file['path'], 6);
$totalsize += $file['size'];
if ($file['type'] === 'dir') {
$totaldirs++;
} else {
$totalfiles++;
}
// the bigger the file, the darker the shade of grey; megabytes*2
$simple_size_color = intval(160-$file['size']/(1024*1024)*2);
if($simple_size_color<0) $simple_size_color = 0;
@ -88,33 +79,4 @@ $totalsize = 0; ?>
</span>
</td>
</tr>
<?php endforeach; ?>
<?php if ($totaldirs !== 0 || $totalfiles !== 0): ?>
<tr class="summary">
<td><span class="info">
<?php if ($totaldirs !== 0) {
p($totaldirs.' ');
if ($totaldirs === 1) {
p($l->t('directory'));
} else {
p($l->t('directories'));
}
}
if ($totaldirs !== 0 && $totalfiles !== 0) {
p(' & ');
}
if ($totalfiles !== 0) {
p($totalfiles.' ');
if ($totalfiles === 1) {
p($l->t('file'));
} else {
p($l->t('files'));
}
} ?>
</span></td>
<td class="filesize">
<?php print_unescaped(OCP\human_file_size($totalsize)); ?>
</td>
<td></td>
</tr>
<?php endif;
<?php endforeach;

View File

@ -1,6 +0,0 @@
<?php
$TRANSLATIONS = array(
"Saving..." => "保存中...",
"Encryption" => "加密"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -0,0 +1,380 @@
<?php
/**
* Dropbox API class
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
class Dropbox_API {
/**
* Sandbox root-path
*/
const ROOT_SANDBOX = 'sandbox';
/**
* Dropbox root-path
*/
const ROOT_DROPBOX = 'dropbox';
/**
* API URl
*/
protected $api_url = 'https://api.dropbox.com/1/';
/**
* Content API URl
*/
protected $api_content_url = 'https://api-content.dropbox.com/1/';
/**
* OAuth object
*
* @var Dropbox_OAuth
*/
protected $oauth;
/**
* Default root-path, this will most likely be 'sandbox' or 'dropbox'
*
* @var string
*/
protected $root;
protected $useSSL;
/**
* Constructor
*
* @param Dropbox_OAuth Dropbox_Auth object
* @param string $root default root path (sandbox or dropbox)
*/
public function __construct(Dropbox_OAuth $oauth, $root = self::ROOT_DROPBOX, $useSSL = true) {
$this->oauth = $oauth;
$this->root = $root;
$this->useSSL = $useSSL;
if (!$this->useSSL)
{
throw new Dropbox_Exception('Dropbox REST API now requires that all requests use SSL');
}
}
/**
* Returns information about the current dropbox account
*
* @return stdclass
*/
public function getAccountInfo() {
$data = $this->oauth->fetch($this->api_url . 'account/info');
return json_decode($data['body'],true);
}
/**
* Returns a file's contents
*
* @param string $path path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return string
*/
public function getFile($path = '', $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$result = $this->oauth->fetch($this->api_content_url . 'files/' . $root . '/' . ltrim($path,'/'));
return $result['body'];
}
/**
* Uploads a new file
*
* @param string $path Target path (including filename)
* @param string $file Either a path to a file or a stream resource
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return bool
*/
public function putFile($path, $file, $root = null) {
$directory = dirname($path);
$filename = basename($path);
if($directory==='.') $directory = '';
$directory = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($directory));
// $filename = str_replace('~', '%7E', rawurlencode($filename));
if (is_null($root)) $root = $this->root;
if (is_string($file)) {
$file = fopen($file,'rb');
} elseif (!is_resource($file)) {
throw new Dropbox_Exception('File must be a file-resource or a string');
}
$result=$this->multipartFetch($this->api_content_url . 'files/' .
$root . '/' . trim($directory,'/'), $file, $filename);
if(!isset($result["httpStatus"]) || $result["httpStatus"] != 200)
throw new Dropbox_Exception("Uploading file to Dropbox failed");
return true;
}
/**
* Copies a file or directory from one location to another
*
* This method returns the file information of the newly created file.
*
* @param string $from source path
* @param string $to destination path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return stdclass
*/
public function copy($from, $to, $root = null) {
if (is_null($root)) $root = $this->root;
$response = $this->oauth->fetch($this->api_url . 'fileops/copy', array('from_path' => $from, 'to_path' => $to, 'root' => $root), 'POST');
return json_decode($response['body'],true);
}
/**
* Creates a new folder
*
* This method returns the information from the newly created directory
*
* @param string $path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return stdclass
*/
public function createFolder($path, $root = null) {
if (is_null($root)) $root = $this->root;
// Making sure the path starts with a /
// $path = '/' . ltrim($path,'/');
$response = $this->oauth->fetch($this->api_url . 'fileops/create_folder', array('path' => $path, 'root' => $root),'POST');
return json_decode($response['body'],true);
}
/**
* Deletes a file or folder.
*
* This method will return the metadata information from the deleted file or folder, if successful.
*
* @param string $path Path to new folder
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return array
*/
public function delete($path, $root = null) {
if (is_null($root)) $root = $this->root;
$response = $this->oauth->fetch($this->api_url . 'fileops/delete', array('path' => $path, 'root' => $root), 'POST');
return json_decode($response['body']);
}
/**
* Moves a file or directory to a new location
*
* This method returns the information from the newly created directory
*
* @param mixed $from Source path
* @param mixed $to destination path
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return stdclass
*/
public function move($from, $to, $root = null) {
if (is_null($root)) $root = $this->root;
$response = $this->oauth->fetch($this->api_url . 'fileops/move', array('from_path' => rawurldecode($from), 'to_path' => rawurldecode($to), 'root' => $root), 'POST');
return json_decode($response['body'],true);
}
/**
* Returns file and directory information
*
* @param string $path Path to receive information from
* @param bool $list When set to true, this method returns information from all files in a directory. When set to false it will only return infromation from the specified directory.
* @param string $hash If a hash is supplied, this method simply returns true if nothing has changed since the last request. Good for caching.
* @param int $fileLimit Maximum number of file-information to receive
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return array|true
*/
public function getMetaData($path, $list = true, $hash = null, $fileLimit = null, $root = null) {
if (is_null($root)) $root = $this->root;
$args = array(
'list' => $list,
);
if (!is_null($hash)) $args['hash'] = $hash;
if (!is_null($fileLimit)) $args['file_limit'] = $fileLimit;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url . 'metadata/' . $root . '/' . ltrim($path,'/'), $args);
/* 304 is not modified */
if ($response['httpStatus']==304) {
return true;
} else {
return json_decode($response['body'],true);
}
}
/**
* A way of letting you keep up with changes to files and folders in a user's Dropbox. You can periodically call /delta to get a list of "delta entries", which are instructions on how to update your local state to match the server's state.
*
* This method returns the information from the newly created directory
*
* @param string $cursor A string that is used to keep track of your current state. On the next call pass in this value to return delta entries that have been recorded since the cursor was returned.
* @return stdclass
*/
public function delta($cursor) {
$arg['cursor'] = $cursor;
$response = $this->oauth->fetch($this->api_url . 'delta', $arg, 'POST');
return json_decode($response['body'],true);
}
/**
* Returns a thumbnail (as a string) for a file path.
*
* @param string $path Path to file
* @param string $size small, medium or large
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @return string
*/
public function getThumbnail($path, $size = 'small', $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_content_url . 'thumbnails/' . $root . '/' . ltrim($path,'/'),array('size' => $size));
return $response['body'];
}
/**
* This method is used to generate multipart POST requests for file upload
*
* @param string $uri
* @param array $arguments
* @return bool
*/
protected function multipartFetch($uri, $file, $filename) {
/* random string */
$boundary = 'R50hrfBj5JYyfR3vF3wR96GPCC9Fd2q2pVMERvEaOE3D8LZTgLLbRpNwXek3';
$headers = array(
'Content-Type' => 'multipart/form-data; boundary=' . $boundary,
);
$body="--" . $boundary . "\r\n";
$body.="Content-Disposition: form-data; name=file; filename=".rawurldecode($filename)."\r\n";
$body.="Content-type: application/octet-stream\r\n";
$body.="\r\n";
$body.=stream_get_contents($file);
$body.="\r\n";
$body.="--" . $boundary . "--";
// Dropbox requires the filename to also be part of the regular arguments, so it becomes
// part of the signature.
$uri.='?file=' . $filename;
return $this->oauth->fetch($uri, $body, 'POST', $headers);
}
/**
* Search
*
* Returns metadata for all files and folders that match the search query.
*
* @added by: diszo.sasil
*
* @param string $query
* @param string $root Use this to override the default root path (sandbox/dropbox)
* @param string $path
* @return array
*/
public function search($query = '', $root = null, $path = ''){
if (is_null($root)) $root = $this->root;
if(!empty($path)){
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
}
$response = $this->oauth->fetch($this->api_url . 'search/' . $root . '/' . ltrim($path,'/'),array('query' => $query));
return json_decode($response['body'],true);
}
/**
* Creates and returns a shareable link to files or folders.
*
* Note: Links created by the /shares API call expire after thirty days.
*
* @param type $path
* @param type $root
* @return type
*/
public function share($path, $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url. 'shares/'. $root . '/' . ltrim($path, '/'), array(), 'POST');
return json_decode($response['body'],true);
}
/**
* Returns a link directly to a file.
* Similar to /shares. The difference is that this bypasses the Dropbox webserver, used to provide a preview of the file, so that you can effectively stream the contents of your media.
*
* Note: The /media link expires after four hours, allotting enough time to stream files, but not enough to leave a connection open indefinitely.
*
* @param type $path
* @param type $root
* @return type
*/
public function media($path, $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url. 'media/'. $root . '/' . ltrim($path, '/'), array(), 'POST');
return json_decode($response['body'],true);
}
/**
* Creates and returns a copy_ref to a file. This reference string can be used to copy that file to another user's Dropbox by passing it in as the from_copy_ref parameter on /fileops/copy.
*
* @param type $path
* @param type $root
* @return type
*/
public function copy_ref($path, $root = null) {
if (is_null($root)) $root = $this->root;
$path = str_replace(array('%2F','~'), array('/','%7E'), rawurlencode($path));
$response = $this->oauth->fetch($this->api_url. 'copy_ref/'. $root . '/' . ltrim($path, '/'));
return json_decode($response['body'],true);
}
}

View File

@ -0,0 +1,15 @@
<?php
/**
* Dropbox base exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* Base exception class
*/
class Dropbox_Exception extends Exception { }

View File

@ -0,0 +1,18 @@
<?php
/**
* Dropbox Forbidden exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when we receive the 403 forbidden response
*/
class Dropbox_Exception_Forbidden extends Dropbox_Exception {
}

View File

@ -0,0 +1,20 @@
<?php
/**
* Dropbox Not Found exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when a non-existant uri is accessed.
*
* Basically, this exception is used when we get back a 404.
*/
class Dropbox_Exception_NotFound extends Dropbox_Exception {
}

View File

@ -0,0 +1,20 @@
<?php
/**
* Dropbox Over Quota exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when the operation required more space than the available quota.
*
* Basically, this exception is used when we get back a 507.
*/
class Dropbox_Exception_OverQuota extends Dropbox_Exception {
}

View File

@ -0,0 +1,18 @@
<?php
/**
* Dropbox RequestToken exception
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This exception is thrown when an error occured during the request_token process.
*/
class Dropbox_Exception_RequestToken extends Dropbox_Exception {
}

View File

@ -0,0 +1,19 @@
Copyright (c) 2010 Rooftop Solutions
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,151 @@
<?php
/**
* Dropbox OAuth
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* This class is an abstract OAuth class.
*
* It must be extended by classes who wish to provide OAuth functionality
* using different libraries.
*/
abstract class Dropbox_OAuth {
/**
* After a user has authorized access, dropbox can redirect the user back
* to this url.
*
* @var string
*/
public $authorizeCallbackUrl = null;
/**
* Uri used to fetch request tokens
*
* @var string
*/
const URI_REQUEST_TOKEN = 'https://api.dropbox.com/1/oauth/request_token';
/**
* Uri used to redirect the user to for authorization.
*
* @var string
*/
const URI_AUTHORIZE = 'https://www.dropbox.com/1/oauth/authorize';
/**
* Uri used to
*
* @var string
*/
const URI_ACCESS_TOKEN = 'https://api.dropbox.com/1/oauth/access_token';
/**
* An OAuth request token.
*
* @var string
*/
protected $oauth_token = null;
/**
* OAuth token secret
*
* @var string
*/
protected $oauth_token_secret = null;
/**
* Constructor
*
* @param string $consumerKey
* @param string $consumerSecret
*/
abstract public function __construct($consumerKey, $consumerSecret);
/**
* Sets the request token and secret.
*
* The tokens can also be passed as an array into the first argument.
* The array must have the elements token and token_secret.
*
* @param string|array $token
* @param string $token_secret
* @return void
*/
public function setToken($token, $token_secret = null) {
if (is_array($token)) {
$this->oauth_token = $token['token'];
$this->oauth_token_secret = $token['token_secret'];
} else {
$this->oauth_token = $token;
$this->oauth_token_secret = $token_secret;
}
}
/**
* Returns the oauth request tokens as an associative array.
*
* The array will contain the elements 'token' and 'token_secret'.
*
* @return array
*/
public function getToken() {
return array(
'token' => $this->oauth_token,
'token_secret' => $this->oauth_token_secret,
);
}
/**
* Returns the authorization url
*
* @param string $callBack Specify a callback url to automatically redirect the user back
* @return string
*/
public function getAuthorizeUrl($callBack = null) {
// Building the redirect uri
$token = $this->getToken();
$uri = self::URI_AUTHORIZE . '?oauth_token=' . $token['token'];
if ($callBack) $uri.='&oauth_callback=' . $callBack;
return $uri;
}
/**
* Fetches a secured oauth url and returns the response body.
*
* @param string $uri
* @param mixed $arguments
* @param string $method
* @param array $httpHeaders
* @return string
*/
public abstract function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array());
/**
* Requests the OAuth request token.
*
* @return array
*/
abstract public function getRequestToken();
/**
* Requests the OAuth access tokens.
*
* @return array
*/
abstract public function getAccessToken();
}

View File

@ -0,0 +1,37 @@
<?php
/**
* HTTP OAuth Consumer
*
* Adapted from halldirector's code in
* http://code.google.com/p/dropbox-php/issues/detail?id=36#c5
*
* @package Dropbox
* @copyright Copyright (C) 2011 Joe Constant / halldirector. All rights reserved.
* @author Joe Constant / halldirector
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
require_once 'HTTP/OAuth.php';
require_once 'HTTP/OAuth/Consumer.php';
/*
* This class is to help work around aomw ssl issues.
*/
class Dropbox_OAuth_Consumer_Dropbox extends HTTP_OAuth_Consumer
{
public function getOAuthConsumerRequest()
{
if (!$this->consumerRequest instanceof HTTP_OAuth_Consumer_Request) {
$this->consumerRequest = new HTTP_OAuth_Consumer_Request;
}
// TODO: Change this and add in code to validate the SSL cert.
// see https://github.com/bagder/curl/blob/master/lib/mk-ca-bundle.pl
$this->consumerRequest->setConfig(array(
'ssl_verify_peer' => false,
'ssl_verify_host' => false
));
return $this->consumerRequest;
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* Dropbox OAuth
*
* @package Dropbox
* @copyright Copyright (C) 2011 Daniel Huesken
* @author Daniel Huesken (http://www.danielhuesken.de/)
* @license MIT
*/
/**
* This class is used to sign all requests to dropbox.
*
* This specific class uses WordPress WP_Http to authenticate.
*/
class Dropbox_OAuth_Curl extends Dropbox_OAuth {
/**
*
* @var string ConsumerKey
*/
protected $consumerKey = null;
/**
*
* @var string ConsumerSecret
*/
protected $consumerSecret = null;
/**
*
* @var string ProzessCallBack
*/
public $ProgressFunction = false;
/**
* Constructor
*
* @param string $consumerKey
* @param string $consumerSecret
*/
public function __construct($consumerKey, $consumerSecret) {
if (!function_exists('curl_exec'))
throw new Dropbox_Exception('The PHP curl functions not available!');
$this->consumerKey = $consumerKey;
$this->consumerSecret = $consumerSecret;
}
/**
* Fetches a secured oauth url and returns the response body.
*
* @param string $uri
* @param mixed $arguments
* @param string $method
* @param array $httpHeaders
* @return string
*/
public function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array()) {
$uri=str_replace('http://', 'https://', $uri); // all https, upload makes problems if not
if (is_string($arguments) and strtoupper($method) == 'POST') {
preg_match("/\?file=(.*)$/i", $uri, $matches);
if (isset($matches[1])) {
$uri = str_replace($matches[0], "", $uri);
$filename = $matches[1];
$httpHeaders=array_merge($httpHeaders,$this->getOAuthHeader($uri, array("file" => $filename), $method));
}
} else {
$httpHeaders=array_merge($httpHeaders,$this->getOAuthHeader($uri, $arguments, $method));
}
$ch = curl_init();
if (strtoupper($method) == 'POST') {
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_POST, true);
// if (is_array($arguments))
// $arguments=http_build_query($arguments);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arguments);
// $httpHeaders['Content-Length']=strlen($arguments);
} else {
curl_setopt($ch, CURLOPT_URL, $uri.'?'.http_build_query($arguments));
curl_setopt($ch, CURLOPT_POST, false);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// curl_setopt($ch, CURLOPT_CAINFO, "rootca");
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
//Build header
$headers = array();
foreach ($httpHeaders as $name => $value) {
$headers[] = "{$name}: $value";
}
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
if (!ini_get('safe_mode') && !ini_get('open_basedir'))
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
if (function_exists($this->ProgressFunction) and defined('CURLOPT_PROGRESSFUNCTION')) {
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, $this->ProgressFunction);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 512);
}
$response=curl_exec($ch);
$errorno=curl_errno($ch);
$error=curl_error($ch);
$status=curl_getinfo($ch,CURLINFO_HTTP_CODE);
curl_close($ch);
if (!empty($errorno))
throw new Dropbox_Exception_NotFound('Curl error: ('.$errorno.') '.$error."\n");
if ($status>=300) {
$body = json_decode($response,true);
switch ($status) {
// Not modified
case 304 :
return array(
'httpStatus' => 304,
'body' => null,
);
break;
case 403 :
throw new Dropbox_Exception_Forbidden('Forbidden.
This could mean a bad OAuth request, or a file or folder already existing at the target location.
' . $body["error"] . "\n");
case 404 :
throw new Dropbox_Exception_NotFound('Resource at uri: ' . $uri . ' could not be found. ' .
$body["error"] . "\n");
case 507 :
throw new Dropbox_Exception_OverQuota('This dropbox is full. ' .
$body["error"] . "\n");
}
if (!empty($body["error"]))
throw new Dropbox_Exception_RequestToken('Error: ('.$status.') '.$body["error"]."\n");
}
return array(
'body' => $response,
'httpStatus' => $status
);
}
/**
* Returns named array with oauth parameters for further use
* @return array Array with oauth_ parameters
*/
private function getOAuthBaseParams() {
$params['oauth_version'] = '1.0';
$params['oauth_signature_method'] = 'HMAC-SHA1';
$params['oauth_consumer_key'] = $this->consumerKey;
$tokens = $this->getToken();
if (isset($tokens['token']) && $tokens['token']) {
$params['oauth_token'] = $tokens['token'];
}
$params['oauth_timestamp'] = time();
$params['oauth_nonce'] = md5(microtime() . mt_rand());
return $params;
}
/**
* Creates valid Authorization header for OAuth, based on URI and Params
*
* @param string $uri
* @param array $params
* @param string $method GET or POST, standard is GET
* @param array $oAuthParams optional, pass your own oauth_params here
* @return array Array for request's headers section like
* array('Authorization' => 'OAuth ...');
*/
private function getOAuthHeader($uri, $params, $method = 'GET', $oAuthParams = null) {
$oAuthParams = $oAuthParams ? $oAuthParams : $this->getOAuthBaseParams();
// create baseString to encode for the sent parameters
$baseString = $method . '&';
$baseString .= $this->oauth_urlencode($uri) . "&";
// OAuth header does not include GET-Parameters
$signatureParams = array_merge($params, $oAuthParams);
// sorting the parameters
ksort($signatureParams);
$encodedParams = array();
foreach ($signatureParams as $key => $value) {
$encodedParams[] = $this->oauth_urlencode($key) . '=' . $this->oauth_urlencode($value);
}
$baseString .= $this->oauth_urlencode(implode('&', $encodedParams));
// encode the signature
$tokens = $this->getToken();
$hash = $this->hash_hmac_sha1($this->consumerSecret.'&'.$tokens['token_secret'], $baseString);
$signature = base64_encode($hash);
// add signature to oAuthParams
$oAuthParams['oauth_signature'] = $signature;
$oAuthEncoded = array();
foreach ($oAuthParams as $key => $value) {
$oAuthEncoded[] = $key . '="' . $this->oauth_urlencode($value) . '"';
}
return array('Authorization' => 'OAuth ' . implode(', ', $oAuthEncoded));
}
/**
* Requests the OAuth request token.
*
* @return void
*/
public function getRequestToken() {
$result = $this->fetch(self::URI_REQUEST_TOKEN, array(), 'POST');
if ($result['httpStatus'] == "200") {
$tokens = array();
parse_str($result['body'], $tokens);
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
return $this->getToken();
} else {
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
}
}
/**
* Requests the OAuth access tokens.
*
* This method requires the 'unauthorized' request tokens
* and, if successful will set the authorized request tokens.
*
* @return void
*/
public function getAccessToken() {
$result = $this->fetch(self::URI_ACCESS_TOKEN, array(), 'POST');
if ($result['httpStatus'] == "200") {
$tokens = array();
parse_str($result['body'], $tokens);
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
return $this->getToken();
} else {
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
}
}
/**
* Helper function to properly urlencode parameters.
* See http://php.net/manual/en/function.oauth-urlencode.php
*
* @param string $string
* @return string
*/
private function oauth_urlencode($string) {
return str_replace('%E7', '~', rawurlencode($string));
}
/**
* Hash function for hmac_sha1; uses native function if available.
*
* @param string $key
* @param string $data
* @return string
*/
private function hash_hmac_sha1($key, $data) {
if (function_exists('hash_hmac') && in_array('sha1', hash_algos())) {
return hash_hmac('sha1', $data, $key, true);
} else {
$blocksize = 64;
$hashfunc = 'sha1';
if (strlen($key) > $blocksize) {
$key = pack('H*', $hashfunc($key));
}
$key = str_pad($key, $blocksize, chr(0x00));
$ipad = str_repeat(chr(0x36), $blocksize);
$opad = str_repeat(chr(0x5c), $blocksize);
$hash = pack('H*', $hashfunc(( $key ^ $opad ) . pack('H*', $hashfunc(($key ^ $ipad) . $data))));
return $hash;
}
}
}

View File

@ -0,0 +1,31 @@
Dropbox-php
===========
This PHP library allows you to easily integrate dropbox with PHP.
The following PHP extension is required:
* json
The library makes use of OAuth. At the moment you can use either of these libraries:
[PHP OAuth extension](http://pecl.php.net/package/oauth)
[PEAR's HTTP_OAUTH package](http://pear.php.net/package/http_oauth)
The extension is recommended, but if you can't install php extensions you should go for the pear package.
Installing
----------
pear channel-discover pear.dropbox-php.com
pear install dropbox-php/Dropbox-alpha
Documentation
-------------
Check out the [documentation](http://www.dropbox-php.com/docs).
Questions?
----------
[Dropbox-php Mailing list](http://groups.google.com/group/dropbox-php)
[Official Dropbox developer forum](http://forums.dropbox.com/forum.php?id=5)

View File

@ -0,0 +1,29 @@
<?php
/**
* This file registers a new autoload function using spl_autoload_register.
*
* @package Dropbox
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
*/
/**
* Autoloader function
*
* @param $className string
* @return void
*/
function Dropbox_autoload($className) {
if(strpos($className,'Dropbox_')===0) {
include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,8)) . '.php';
}
}
spl_autoload_register('Dropbox_autoload');

View File

@ -0,0 +1,484 @@
<?php
###################################################################
# smb.php
# This class implements a SMB stream wrapper based on 'smbclient'
#
# Date: lun oct 22 10:35:35 CEST 2007
#
# Homepage: http://www.phpclasses.org/smb4php
#
# Copyright (c) 2007 Victor M. Varela <vmvarela@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
###################################################################
define ('SMB4PHP_VERSION', '0.8');
###################################################################
# CONFIGURATION SECTION - Change for your needs
###################################################################
define ('SMB4PHP_SMBCLIENT', 'smbclient');
define ('SMB4PHP_SMBOPTIONS', 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192');
define ('SMB4PHP_AUTHMODE', 'arg'); # set to 'env' to use USER enviroment variable
###################################################################
# SMB - commands that does not need an instance
###################################################################
$GLOBALS['__smb_cache'] = array ('stat' => array (), 'dir' => array ());
class smb {
function parse_url ($url) {
$pu = parse_url (trim($url));
foreach (array ('domain', 'user', 'pass', 'host', 'port', 'path') as $i) {
if (! isset($pu[$i])) {
$pu[$i] = '';
}
}
if (count ($userdomain = explode (';', urldecode ($pu['user']))) > 1) {
@list ($pu['domain'], $pu['user']) = $userdomain;
}
$path = preg_replace (array ('/^\//', '/\/$/'), '', urldecode ($pu['path']));
list ($pu['share'], $pu['path']) = (preg_match ('/^([^\/]+)\/(.*)/', $path, $regs))
? array ($regs[1], preg_replace ('/\//', '\\', $regs[2]))
: array ($path, '');
$pu['type'] = $pu['path'] ? 'path' : ($pu['share'] ? 'share' : ($pu['host'] ? 'host' : '**error**'));
if (! ($pu['port'] = intval(@$pu['port']))) {
$pu['port'] = 139;
}
// decode user and password
$pu['user'] = urldecode($pu['user']);
$pu['pass'] = urldecode($pu['pass']);
return $pu;
}
function look ($purl) {
return smb::client ('-L ' . escapeshellarg ($purl['host']), $purl);
}
function execute ($command, $purl) {
return smb::client ('-d 0 '
. escapeshellarg ('//' . $purl['host'] . '/' . $purl['share'])
. ' -c ' . escapeshellarg ($command), $purl
);
}
function client ($params, $purl) {
static $regexp = array (
'^added interface ip=(.*) bcast=(.*) nmask=(.*)$' => 'skip',
'Anonymous login successful' => 'skip',
'^Domain=\[(.*)\] OS=\[(.*)\] Server=\[(.*)\]$' => 'skip',
'^\tSharename[ ]+Type[ ]+Comment$' => 'shares',
'^\t---------[ ]+----[ ]+-------$' => 'skip',
'^\tServer [ ]+Comment$' => 'servers',
'^\t---------[ ]+-------$' => 'skip',
'^\tWorkgroup[ ]+Master$' => 'workg',
'^\t(.*)[ ]+(Disk|IPC)[ ]+IPC.*$' => 'skip',
'^\tIPC\\\$(.*)[ ]+IPC' => 'skip',
'^\t(.*)[ ]+(Disk)[ ]+(.*)$' => 'share',
'^\t(.*)[ ]+(Printer)[ ]+(.*)$' => 'skip',
'([0-9]+) blocks of size ([0-9]+)\. ([0-9]+) blocks available' => 'skip',
'Got a positive name query response from ' => 'skip',
'^(session setup failed): (.*)$' => 'error',
'^(.*): ERRSRV - ERRbadpw' => 'error',
'^Error returning browse list: (.*)$' => 'error',
'^tree connect failed: (.*)$' => 'error',
'^(Connection to .* failed)(.*)$' => 'error-connect',
'^NT_STATUS_(.*) ' => 'error',
'^NT_STATUS_(.*)\$' => 'error',
'ERRDOS - ERRbadpath \((.*).\)' => 'error',
'cd (.*): (.*)$' => 'error',
'^cd (.*): NT_STATUS_(.*)' => 'error',
'^\t(.*)$' => 'srvorwg',
'^([0-9]+)[ ]+([0-9]+)[ ]+(.*)$' => 'skip',
'^Job ([0-9]+) cancelled' => 'skip',
'^[ ]+(.*)[ ]+([0-9]+)[ ]+(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[ ](Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+([0-9]+)[ ]+([0-9]{2}:[0-9]{2}:[0-9]{2})[ ]([0-9]{4})$' => 'files',
'^message start: ERRSRV - (ERRmsgoff)' => 'error'
);
if (SMB4PHP_AUTHMODE == 'env') {
putenv("USER={$purl['user']}%{$purl['pass']}");
$auth = '';
} else {
$auth = ($purl['user'] <> '' ? (' -U ' . escapeshellarg ($purl['user'] . '%' . $purl['pass'])) : '');
}
if ($purl['domain'] <> '') {
$auth .= ' -W ' . escapeshellarg ($purl['domain']);
}
$port = ($purl['port'] <> 139 ? ' -p ' . escapeshellarg ($purl['port']) : '');
$options = '-O ' . escapeshellarg(SMB4PHP_SMBOPTIONS);
// this put env is necessary to read the output of smbclient correctly
$old_locale = getenv('LC_ALL');
putenv('LC_ALL=en_US.UTF-8');
$output = popen (SMB4PHP_SMBCLIENT." -N {$auth} {$options} {$port} {$options} {$params} 2>/dev/null", 'r');
$info = array ();
$info['info']= array ();
$mode = '';
while ($line = fgets ($output, 4096)) {
list ($tag, $regs, $i) = array ('skip', array (), array ());
reset ($regexp);
foreach ($regexp as $r => $t) if (preg_match ('/'.$r.'/', $line, $regs)) {
$tag = $t;
break;
}
switch ($tag) {
case 'skip': continue;
case 'shares': $mode = 'shares'; break;
case 'servers': $mode = 'servers'; break;
case 'workg': $mode = 'workgroups'; break;
case 'share':
list($name, $type) = array (
trim(substr($line, 1, 15)),
trim(strtolower(substr($line, 17, 10)))
);
$i = ($type <> 'disk' && preg_match('/^(.*) Disk/', $line, $regs))
? array(trim($regs[1]), 'disk')
: array($name, 'disk');
break;
case 'srvorwg':
list ($name, $master) = array (
strtolower(trim(substr($line,1,21))),
strtolower(trim(substr($line, 22)))
);
$i = ($mode == 'servers') ? array ($name, "server") : array ($name, "workgroup", $master);
break;
case 'files':
list ($attr, $name) = preg_match ("/^(.*)[ ]+([D|A|H|S|R]+)$/", trim ($regs[1]), $regs2)
? array (trim ($regs2[2]), trim ($regs2[1]))
: array ('', trim ($regs[1]));
list ($his, $im) = array (
explode(':', $regs[6]), 1 + strpos("JanFebMarAprMayJunJulAugSepOctNovDec", $regs[4]) / 3);
$i = ($name <> '.' && $name <> '..')
? array (
$name,
(strpos($attr,'D') === FALSE) ? 'file' : 'folder',
'attr' => $attr,
'size' => intval($regs[2]),
'time' => mktime ($his[0], $his[1], $his[2], $im, $regs[5], $regs[7])
)
: array();
break;
case 'error':
if(substr($regs[0],0,22)=='NT_STATUS_NO_SUCH_FILE'){
return false;
}elseif(substr($regs[0],0,31)=='NT_STATUS_OBJECT_NAME_COLLISION'){
return false;
}elseif(substr($regs[0],0,31)=='NT_STATUS_OBJECT_PATH_NOT_FOUND'){
return false;
}elseif(substr($regs[0],0,29)=='NT_STATUS_FILE_IS_A_DIRECTORY'){
return false;
}
trigger_error($regs[0].' params('.$params.')', E_USER_ERROR);
case 'error-connect':
return false;
}
if ($i) switch ($i[1]) {
case 'file':
case 'folder': $info['info'][$i[0]] = $i;
case 'disk':
case 'server':
case 'workgroup': $info[$i[1]][] = $i[0];
}
}
pclose($output);
// restore previous locale
if ($old_locale===false) {
putenv('LC_ALL');
} else {
putenv('LC_ALL='.$old_locale);
}
return $info;
}
# stats
function url_stat ($url, $flags = STREAM_URL_STAT_LINK) {
if ($s = smb::getstatcache($url)) {
return $s;
}
list ($stat, $pu) = array (false, smb::parse_url ($url));
switch ($pu['type']) {
case 'host':
if ($o = smb::look ($pu))
$stat = stat ("/tmp");
else
trigger_error ("url_stat(): list failed for host '{$pu['host']}'", E_USER_WARNING);
break;
case 'share':
if ($o = smb::look ($pu)) {
$found = FALSE;
$lshare = strtolower ($pu['share']); # fix by Eric Leung
foreach ($o['disk'] as $s) if ($lshare == strtolower($s)) {
$found = TRUE;
$stat = stat ("/tmp");
break;
}
if (! $found)
trigger_error ("url_stat(): disk resource '{$lshare}' not found in '{$pu['host']}'", E_USER_WARNING);
}
break;
case 'path':
if ($o = smb::execute ('dir "'.$pu['path'].'"', $pu)) {
$p = explode('\\', $pu['path']);
$name = $p[count($p)-1];
if (isset ($o['info'][$name])) {
$stat = smb::addstatcache ($url, $o['info'][$name]);
} else {
trigger_error ("url_stat(): path '{$pu['path']}' not found", E_USER_WARNING);
}
} else {
return false;
// trigger_error ("url_stat(): dir failed for path '{$pu['path']}'", E_USER_WARNING);
}
break;
default: trigger_error ('error in URL', E_USER_ERROR);
}
return $stat;
}
function addstatcache ($url, $info) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache;
$is_file = (strpos ($info['attr'],'D') === FALSE);
$s = ($is_file) ? stat ('/etc/passwd') : stat ('/tmp');
$s[7] = $s['size'] = $info['size'];
$s[8] = $s[9] = $s[10] = $s['atime'] = $s['mtime'] = $s['ctime'] = $info['time'];
return $__smb_cache['stat'][$url] = $s;
}
function getstatcache ($url) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache;
return isset ($__smb_cache['stat'][$url]) ? $__smb_cache['stat'][$url] : FALSE;
}
function clearstatcache ($url='') {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache;
if ($url == '') $__smb_cache['stat'] = array (); else unset ($__smb_cache['stat'][$url]);
}
# commands
function unlink ($url) {
$pu = smb::parse_url($url);
if ($pu['type'] <> 'path') trigger_error('unlink(): error in URL', E_USER_ERROR);
smb::clearstatcache ($url);
smb_stream_wrapper::cleardircache (dirname($url));
return smb::execute ('del "'.$pu['path'].'"', $pu);
}
function rename ($url_from, $url_to) {
list ($from, $to) = array (smb::parse_url($url_from), smb::parse_url($url_to));
if ($from['host'] <> $to['host'] ||
$from['share'] <> $to['share'] ||
$from['user'] <> $to['user'] ||
$from['pass'] <> $to['pass'] ||
$from['domain'] <> $to['domain']) {
trigger_error('rename(): FROM & TO must be in same server-share-user-pass-domain', E_USER_ERROR);
}
if ($from['type'] <> 'path' || $to['type'] <> 'path') {
trigger_error('rename(): error in URL', E_USER_ERROR);
}
smb::clearstatcache ($url_from);
return smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
}
function mkdir ($url, $mode, $options) {
$pu = smb::parse_url($url);
if ($pu['type'] <> 'path') trigger_error('mkdir(): error in URL', E_USER_ERROR);
return smb::execute ('mkdir "'.$pu['path'].'"', $pu)!==false;
}
function rmdir ($url) {
$pu = smb::parse_url($url);
if ($pu['type'] <> 'path') trigger_error('rmdir(): error in URL', E_USER_ERROR);
smb::clearstatcache ($url);
smb_stream_wrapper::cleardircache (dirname($url));
return smb::execute ('rmdir "'.$pu['path'].'"', $pu)!==false;
}
}
###################################################################
# SMB_STREAM_WRAPPER - class to be registered for smb:// URLs
###################################################################
class smb_stream_wrapper extends smb {
# variables
private $stream, $url, $parsed_url = array (), $mode, $tmpfile;
private $need_flush = FALSE;
private $dir = array (), $dir_index = -1;
# directories
function dir_opendir ($url, $options) {
if ($d = $this->getdircache ($url)) {
$this->dir = $d;
$this->dir_index = 0;
return TRUE;
}
$pu = smb::parse_url ($url);
switch ($pu['type']) {
case 'host':
if ($o = smb::look ($pu)) {
$this->dir = $o['disk'];
$this->dir_index = 0;
} else {
trigger_error ("dir_opendir(): list failed for host '{$pu['host']}'", E_USER_WARNING);
return false;
}
break;
case 'share':
case 'path':
if (is_array($o = smb::execute ('dir "'.$pu['path'].'\*"', $pu))) {
$this->dir = array_keys($o['info']);
$this->dir_index = 0;
$this->adddircache ($url, $this->dir);
if(substr($url,-1,1)=='/'){
$url=substr($url,0,-1);
}
foreach ($o['info'] as $name => $info) {
smb::addstatcache($url . '/' . $name, $info);
}
} else {
trigger_error ("dir_opendir(): dir failed for path '".$pu['path']."'", E_USER_WARNING);
return false;
}
break;
default:
trigger_error ('dir_opendir(): error in URL', E_USER_ERROR);
return false;
}
return TRUE;
}
function dir_readdir () {
return ($this->dir_index < count($this->dir)) ? $this->dir[$this->dir_index++] : FALSE;
}
function dir_rewinddir () { $this->dir_index = 0; }
function dir_closedir () { $this->dir = array(); $this->dir_index = -1; return TRUE; }
# cache
function adddircache ($url, $content) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache;
return $__smb_cache['dir'][$url] = $content;
}
function getdircache ($url) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache;
return isset ($__smb_cache['dir'][$url]) ? $__smb_cache['dir'][$url] : FALSE;
}
function cleardircache ($url='') {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache;
if ($url == ''){
$__smb_cache['dir'] = array ();
}else{
unset ($__smb_cache['dir'][$url]);
}
}
# streams
function stream_open ($url, $mode, $options, $opened_path) {
$this->url = $url;
$this->mode = $mode;
$this->parsed_url = $pu = smb::parse_url($url);
if ($pu['type'] <> 'path') trigger_error('stream_open(): error in URL', E_USER_ERROR);
switch ($mode) {
case 'r':
case 'r+':
case 'rb':
case 'a':
case 'a+': $this->tmpfile = tempnam('/tmp', 'smb.down.');
smb::execute ('get "'.$pu['path'].'" "'.$this->tmpfile.'"', $pu);
break;
case 'w':
case 'w+':
case 'wb':
case 'x':
case 'x+': $this->cleardircache();
$this->tmpfile = tempnam('/tmp', 'smb.up.');
$this->need_flush=true;
}
$this->stream = fopen ($this->tmpfile, $mode);
return TRUE;
}
function stream_close () { return fclose($this->stream); }
function stream_read ($count) { return fread($this->stream, $count); }
function stream_write ($data) { $this->need_flush = TRUE; return fwrite($this->stream, $data); }
function stream_eof () { return feof($this->stream); }
function stream_tell () { return ftell($this->stream); }
function stream_seek ($offset, $whence=null) { return fseek($this->stream, $offset, $whence); }
function stream_flush () {
if ($this->mode <> 'r' && $this->need_flush) {
smb::clearstatcache ($this->url);
smb::execute ('put "'.$this->tmpfile.'" "'.$this->parsed_url['path'].'"', $this->parsed_url);
$this->need_flush = FALSE;
}
}
function stream_stat () { return smb::url_stat ($this->url); }
function __destruct () {
if ($this->tmpfile <> '') {
if ($this->need_flush) $this->stream_flush ();
unlink ($this->tmpfile);
}
}
}
###################################################################
# Register 'smb' protocol !
###################################################################
stream_wrapper_register('smb', 'smb_stream_wrapper')
or die ('Failed to register protocol');

View File

@ -1,28 +0,0 @@
<?php
$TRANSLATIONS = array(
"Access granted" => "已授予权限",
"Error configuring Dropbox storage" => "配置 Dropbox 存储出错",
"Grant access" => "授予权限",
"Please provide a valid Dropbox app key and secret." => "请提供一个有效的 Dropbox app key 和 secret。",
"Error configuring Google Drive storage" => "配置 Google Drive 存储失败",
"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>注意:</b>“SMB客户端”未安装。CIFS/SMB分享不可用。请向您的系统管理员请求安装该客户端。",
"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>注意:</b>PHP的FTP支持尚未启用或未安装。FTP分享不可用。请向您的系统管理员请求安装。",
"<b>Warning:</b> The Curl support in PHP is not enabled or installed. Mounting of ownCloud / WebDAV or GoogleDrive is not possible. Please ask your system administrator to install it." => "<b>警告:</b> PHP 的 Curl 支持没有安装或打开。挂载 ownCloud、WebDAV 或 Google Drive 的功能将不可用。请询问您的系统管理员去安装它。",
"External Storage" => "外部存储",
"Folder name" => "文件夹名",
"External storage" => "外部存储",
"Configuration" => "配置",
"Options" => "选项",
"Applicable" => "可应用",
"Add storage" => "扩容",
"None set" => "未设置",
"All Users" => "所有用户",
"Groups" => "群组",
"Users" => "用户",
"Delete" => "删除",
"Enable User External Storage" => "启用用户外部存储",
"Allow users to mount their own external storage" => "允许用户挂载他们的外部存储",
"SSL root certificates" => "SSL 根证书",
"Import Root Certificate" => "导入根证书"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -22,7 +22,7 @@
namespace OC\Files\Storage;
require_once 'Dropbox/autoload.php';
require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php';
class Dropbox extends \OC\Files\Storage\Common {

View File

@ -8,7 +8,7 @@
namespace OC\Files\Storage;
require_once 'smb4php/smb.php';
require_once __DIR__ . '/../3rdparty/smb4php/smb.php';
class SMB extends \OC\Files\Storage\StreamWrapper{
private $password;

View File

@ -1,19 +0,0 @@
<?php
$TRANSLATIONS = array(
"The password is wrong. Try again." => "密码错误。请重试。",
"Password" => "密码",
"Submit" => "提交",
"Sorry, this link doesnt seem to work anymore." => "对不起,这个链接看起来是错误的。",
"Reasons might be:" => "原因可能是:",
"the item was removed" => "项目已经移除",
"the link expired" => "链接已过期",
"sharing is disabled" => "分享已经被禁用",
"For more info, please ask the person who sent this link." => "欲了解更多信息,请联系将此链接发送给你的人。",
"%s shared the folder %s with you" => "%s 与您分享了文件夹 %s",
"%s shared the file %s with you" => "%s 与您分享了文件 %s",
"Download" => "下载",
"Upload" => "上传",
"Cancel upload" => "取消上传",
"No preview available for" => "没有预览可用于"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -1,7 +1,14 @@
<?php
$TRANSLATIONS = array(
"The password is wrong. Try again." => "請檢查您的密碼並再試一次。",
"Password" => "密碼",
"Submit" => "送出",
"Sorry, this link doesnt seem to work anymore." => "抱歉,這連結看來已經不能用了。",
"Reasons might be:" => "可能的原因:",
"the item was removed" => "項目已經移除",
"the link expired" => "連結過期",
"sharing is disabled" => "分享功能已停用",
"For more info, please ask the person who sent this link." => "請詢問告訴您此連結的人以瞭解更多",
"%s shared the folder %s with you" => "%s 和您分享了資料夾 %s ",
"%s shared the file %s with you" => "%s 和您分享了檔案 %s",
"Download" => "下載",

View File

@ -362,9 +362,13 @@ class Shared extends \OC\Files\Storage\Common {
case 'xb':
case 'a':
case 'ab':
if (!$this->isUpdatable($path)) {
return false;
}
$exists = $this->file_exists($path);
if ($exists && !$this->isUpdatable($path)) {
return false;
}
if (!$exists && !$this->isCreatable(dirname($path))) {
return false;
}
}
$info = array(
'target' => $this->sharedFolder.$path,

View File

@ -20,6 +20,7 @@ $(document).ready(function() {
OC.dialogs.alert(result.data.message, t('core', 'Error'));
}
enableActions();
FileList.updateFileSummary();
});
});
@ -48,6 +49,7 @@ $(document).ready(function() {
OC.dialogs.alert(result.data.message, t('core', 'Error'));
}
enableActions();
FileList.updateFileSummary();
});
});

View File

@ -1,12 +0,0 @@
<?php
$TRANSLATIONS = array(
"Error" => "出错",
"Delete permanently" => "永久删除",
"Name" => "名称",
"_%n folder_::_%n folders_" => array("%n 个文件夹"),
"_%n file_::_%n files_" => array("%n 个文件"),
"Restore" => "恢复",
"Delete" => "删除",
"Deleted Files" => "删除的文件"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -1,17 +1,18 @@
<?php
$TRANSLATIONS = array(
"Couldn't delete %s permanently" => "無法永久刪除 %s",
"Couldn't restore %s" => "無法原 %s",
"perform restore operation" => "進行原動作",
"Couldn't restore %s" => "無法原 %s",
"perform restore operation" => "進行原動作",
"Error" => "錯誤",
"delete file permanently" => "永久刪除檔案",
"Delete permanently" => "永久刪除",
"Name" => "名稱",
"Deleted" => "已刪除",
"_%n folder_::_%n folders_" => array(""),
"_%n file_::_%n files_" => array(""),
"_%n folder_::_%n folders_" => array("%n 個資料夾"),
"_%n file_::_%n files_" => array("%n 個檔案"),
"restored" => "已還原",
"Nothing in here. Your trash bin is empty!" => "您的垃圾桶是空的!",
"Restore" => "",
"Restore" => "",
"Delete" => "刪除",
"Deleted Files" => "已刪除的檔案"
);

View File

@ -72,11 +72,6 @@ class Trashbin {
$mime = $view->getMimeType('files' . $file_path);
if ($view->is_dir('files' . $file_path)) {
$dirContent = $view->getDirectoryContent('files' . $file_path);
// no need to move empty folders to the trash bin
if (empty($dirContent)) {
return true;
}
$type = 'dir';
} else {
$type = 'file';
@ -899,9 +894,10 @@ class Trashbin {
*/
public static function isEmpty($user) {
$trashSize = self::getTrashbinSize($user);
$view = new \OC\Files\View('/' . $user . '/files_trashbin');
$content = $view->getDirectoryContent('/files');
if ($trashSize !== false && $trashSize > 0) {
if ($content) {
return false;
}

View File

@ -1,10 +0,0 @@
<?php
$TRANSLATIONS = array(
"Could not revert: %s" => "无法恢复:%s",
"Versions" => "版本",
"Failed to revert {file} to revision {timestamp}." => "无法恢复文件 {file} 到 版本 {timestamp}。",
"More versions..." => "更多版本",
"No other versions available" => "没有其他可用版本",
"Restore" => "恢复"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -2,6 +2,9 @@
$TRANSLATIONS = array(
"Could not revert: %s" => "無法還原:%s",
"Versions" => "版本",
"Failed to revert {file} to revision {timestamp}." => "無法還原檔案 {file} 至版本 {timestamp}",
"More versions..." => "更多版本…",
"No other versions available" => "沒有其他版本了",
"Restore" => "復原"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -30,8 +30,11 @@ $TRANSLATIONS = array(
"Password" => "Contrasenya",
"For anonymous access, leave DN and Password empty." => "Per un accés anònim, deixeu la DN i la contrasenya en blanc.",
"User Login Filter" => "Filtre d'inici de sessió d'usuari",
"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" => "Defineix el filtre a aplicar quan s'intenta iniciar la sessió. %%uid reemplaça el nom d'usuari en l'acció d'inici de sessió. Per exemple: \"uid=%%uid\"",
"User List Filter" => "Llista de filtres d'usuari",
"Defines the filter to apply, when retrieving users (no placeholders). Example: \"objectClass=person\"" => "Defineix el filtre a aplicar quan es mostren usuaris (no textos variables). Per exemple: \"objectClass=person\"",
"Group Filter" => "Filtre de grup",
"Defines the filter to apply, when retrieving groups (no placeholders). Example: \"objectClass=posixGroup\"" => "Defineix el filtre a aplicar quan es mostren grups (no textos variables). Per exemple: \"objectClass=posixGroup\"",
"Connection Settings" => "Arranjaments de connexió",
"Configuration Active" => "Configuració activa",
"When unchecked, this configuration will be skipped." => "Si està desmarcat, aquesta configuració s'ometrà.",
@ -45,6 +48,7 @@ $TRANSLATIONS = array(
"Do not use it additionally for LDAPS connections, it will fail." => "No ho useu adicionalment per a conexions LDAPS, fallarà.",
"Case insensitve LDAP server (Windows)" => "Servidor LDAP sense distinció entre majúscules i minúscules (Windows)",
"Turn off SSL certificate validation." => "Desactiva la validació de certificat SSL.",
"Not recommended, use it for testing only! If connection only works with this option, import the LDAP server's SSL certificate in your %s server." => "No es recomana, useu-ho només com a prova! Importeu el certificat SSL del servidor LDAP al servidor %s només si la connexió funciona amb aquesta opció.",
"Cache Time-To-Live" => "Memòria de cau Time-To-Live",
"in seconds. A change empties the cache." => "en segons. Un canvi buidarà la memòria de cau.",
"Directory Settings" => "Arranjaments de carpetes",

View File

@ -30,8 +30,11 @@ $TRANSLATIONS = array(
"Password" => "Senha",
"For anonymous access, leave DN and Password empty." => "Para acesso anônimo, deixe DN e Senha vazios.",
"User Login Filter" => "Filtro de Login de Usuário",
"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" => "Define o filtro a ser aplicado, o login é feito. %%uid substitui o nome do usuário na ação de login. Exemplo: \"uid=%%uid\"",
"User List Filter" => "Filtro de Lista de Usuário",
"Defines the filter to apply, when retrieving users (no placeholders). Example: \"objectClass=person\"" => "Define o filtro a ser aplicado, ao recuperar usuários (sem espaços reservados). Exemplo: \"objectClass=person\"",
"Group Filter" => "Filtro de Grupo",
"Defines the filter to apply, when retrieving groups (no placeholders). Example: \"objectClass=posixGroup\"" => "Define o filtro a ser aplicado, ao recuperar grupos (sem espaços reservados). Exemplo: \"objectClass=posixGroup\"",
"Connection Settings" => "Configurações de Conexão",
"Configuration Active" => "Configuração ativa",
"When unchecked, this configuration will be skipped." => "Quando não marcada, esta configuração será ignorada.",
@ -45,6 +48,7 @@ $TRANSLATIONS = array(
"Do not use it additionally for LDAPS connections, it will fail." => "Não use adicionalmente para conexões LDAPS, pois falhará.",
"Case insensitve LDAP server (Windows)" => "Servidor LDAP sensível à caixa alta (Windows)",
"Turn off SSL certificate validation." => "Desligar validação de certificado SSL.",
"Not recommended, use it for testing only! If connection only works with this option, import the LDAP server's SSL certificate in your %s server." => "Não recomendado, use-o somente para teste! Se a conexão só funciona com esta opção, importar o certificado SSL do servidor LDAP em seu servidor %s.",
"Cache Time-To-Live" => "Cache Time-To-Live",
"in seconds. A change empties the cache." => "em segundos. Uma mudança esvaziará o cache.",
"Directory Settings" => "Configurações de Diretório",

View File

@ -1,31 +0,0 @@
<?php
$TRANSLATIONS = array(
"Deletion failed" => "删除失败",
"Success" => "成功",
"Error" => "出错",
"Host" => "主机",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "您可以忽略协议,除非您需要 SSL。然后用 ldaps:// 开头",
"Base DN" => "基本判别名",
"You can specify Base DN for users and groups in the Advanced tab" => "您可以在高级选项卡中为用户和群组指定基本判别名",
"User DN" => "用户判别名",
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "客户机用户的判别名,将用于绑定,例如 uid=agent, dc=example, dc=com。匿名访问请留空判别名和密码。",
"Password" => "密码",
"For anonymous access, leave DN and Password empty." => "匿名访问请留空判别名和密码。",
"User Login Filter" => "用户登录过滤器",
"User List Filter" => "用户列表过滤器",
"Group Filter" => "群组过滤器",
"Port" => "端口",
"Use TLS" => "使用 TLS",
"Case insensitve LDAP server (Windows)" => "大小写不敏感的 LDAP 服务器 (Windows)",
"Turn off SSL certificate validation." => "关闭 SSL 证书校验。",
"in seconds. A change empties the cache." => "以秒计。修改会清空缓存。",
"User Display Name Field" => "用户显示名称字段",
"Base User Tree" => "基本用户树",
"Group Display Name Field" => "群组显示名称字段",
"Base Group Tree" => "基本群组树",
"Group-Member association" => "群组-成员组合",
"in bytes" => "以字节计",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "用户名请留空 (默认)。否则,请指定一个 LDAP/AD 属性。",
"Help" => "帮助"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -3,56 +3,59 @@ $TRANSLATIONS = array(
"Failed to clear the mappings." => "清除映射失敗",
"Failed to delete the server configuration" => "刪除伺服器設定時失敗",
"The configuration is valid and the connection could be established!" => "設定有效且連線可建立",
"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "設定有效但連線無法建立。請檢查伺服器的設定與認證資料。",
"The configuration is invalid. Please look in the ownCloud log for further details." => "設定無效。更多細節請參閱ownCloud的記錄檔。",
"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "設定有效但連線無法建立,請檢查伺服器設定與認證資料。",
"The configuration is invalid. Please look in the ownCloud log for further details." => "設定無效,更多細節請參閱 ownCloud 的記錄檔。",
"Deletion failed" => "移除失敗",
"Take over settings from recent server configuration?" => "要使用最近一次的伺服器設定嗎?",
"Keep settings?" => "維持設定嗎?",
"Take over settings from recent server configuration?" => "要使用最近一次的伺服器設定嗎",
"Keep settings?" => "維持設定嗎",
"Cannot add server configuration" => "無法新增伺服器設定",
"mappings cleared" => "映射已清除",
"Success" => "成功",
"Error" => "錯誤",
"Connection test succeeded" => "連線測試成功",
"Connection test failed" => "連線測試失敗",
"Do you really want to delete the current Server Configuration?" => "您真的確定要刪除現在的伺服器設定嗎?",
"Confirm Deletion" => "確認刪除",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>警告:</b>沒有安裝 PHP LDAP 模組,後端系統將無法運作。請要求您的系統管理員安裝模組。",
"Do you really want to delete the current Server Configuration?" => "您真的要刪除現在的伺服器設定嗎?",
"Confirm Deletion" => "確認刪除",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>警告</b>沒有安裝 PHP LDAP 模組,後端系統將無法運作,請要求您的系統管理員安裝模組。",
"Server configuration" => "伺服器設定",
"Add Server Configuration" => "新增伺服器設定",
"Host" => "主機",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "若您不需要SSL加密傳輸則可忽略通訊協定。若非如此請從ldaps://開始",
"One Base DN per line" => "一行一個Base DN",
"You can specify Base DN for users and groups in the Advanced tab" => "您可以在進階標籤頁裡面指定使用者及群組的Base DN",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "若您不需要 SSL 加密連線則不需輸入通訊協定,反之請輸入 ldaps://",
"Base DN" => "Base DN",
"One Base DN per line" => "一行一個 Base DN",
"You can specify Base DN for users and groups in the Advanced tab" => "您可以在進階標籤頁裡面指定使用者及群組的 Base DN",
"User DN" => "User DN",
"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "客戶端使用者的DN與特定字詞的連結需要完善例如:uid=agent,dc=example,dc=com。若是匿名連接則將DN與密碼欄位留白。",
"Password" => "密碼",
"For anonymous access, leave DN and Password empty." => "匿名連接時請將DN與密碼欄位留白",
"User Login Filter" => "使用者登入過濾器",
"User List Filter" => "使用者名單篩選器",
"Group Filter" => "群組篩選器",
"For anonymous access, leave DN and Password empty." => "匿名連接時請將 DN 與密碼欄位留白",
"User Login Filter" => "User Login Filter",
"User List Filter" => "User List Filter",
"Group Filter" => "Group Filter",
"Connection Settings" => "連線設定",
"Configuration Active" => "設定為主動模式",
"Configuration Active" => "設定使用中",
"When unchecked, this configuration will be skipped." => "沒有被勾選時,此設定會被略過。",
"Port" => "連接",
"Port" => "連接",
"Backup (Replica) Host" => "備用主機",
"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "請給定一個可選的備用主機。必須是LDAP/AD中央伺服器的複本。",
"Backup (Replica) Port" => "備用(複本)連接阜",
"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "可以選擇性設定備用主機,必須是 LDAP/AD 中央伺服器的複本。",
"Backup (Replica) Port" => "備用(複本)連接埠",
"Disable Main Server" => "停用主伺服器",
"Use TLS" => "使用TLS",
"Case insensitve LDAP server (Windows)" => "不區分大小寫的LDAP伺服器(Windows)",
"Turn off SSL certificate validation." => "關閉 SSL 憑證驗證",
"Use TLS" => "使用 TLS",
"Do not use it additionally for LDAPS connections, it will fail." => "不要同時與 LDAPS 使用,會有問題。",
"Case insensitve LDAP server (Windows)" => "不區分大小寫的 LDAP 伺服器 (Windows)",
"Turn off SSL certificate validation." => "關閉 SSL 憑證檢查",
"Cache Time-To-Live" => "快取的存活時間",
"in seconds. A change empties the cache." => "以秒為單位。變後會清空快取。",
"Directory Settings" => "目錄選項",
"User Display Name Field" => "使用者名稱欄位",
"Base User Tree" => "Base使用者數",
"One User Base DN per line" => "一行一個使用者Base DN",
"User Search Attributes" => "使用者搜索屬性",
"Optional; one attribute per line" => "可選的; 一行一項屬性",
"in seconds. A change empties the cache." => "以秒為單位。後會清空快取。",
"Directory Settings" => "目錄設定",
"User Display Name Field" => "使用者顯示名稱欄位",
"Base User Tree" => "Base User Tree",
"One User Base DN per line" => "一行一個使用者 Base DN",
"User Search Attributes" => "User Search Attributes",
"Optional; one attribute per line" => "非必要,一行一項屬性",
"Group Display Name Field" => "群組顯示名稱欄位",
"Base Group Tree" => "Base群組樹",
"One Group Base DN per line" => "一行一個群組Base DN",
"Group Search Attributes" => "群組搜索屬性",
"Group-Member association" => "群組成員的關係",
"Base Group Tree" => "Base Group Tree",
"One Group Base DN per line" => "一行一個 Group Base DN",
"Group Search Attributes" => "Group Search Attributes",
"Group-Member association" => "Group-Member association",
"Special Attributes" => "特殊屬性",
"Quota Field" => "配額欄位",
"Quota Default" => "預設配額",

View File

@ -991,7 +991,7 @@ abstract class Access {
* internally we store them for usage in LDAP filters
*/
private function DNasBaseParameter($dn) {
return str_replace('\\5c', '\\', $dn);
return str_ireplace('\\5c', '\\', $dn);
}
/**

View File

@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
"WebDAV Authentication" => "WebDAV 认证"
"WebDAV Authentication" => "WebDAV 认证",
"Address: " => "地址:",
"The user credentials will be sent to this address. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "用户的身份将会被发送到此 URL。这个插件检查返回值并且将 HTTP 状态编码 401 和 403 解释为非法身份,其他所有返回值为合法身份。"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";

View File

@ -141,10 +141,22 @@ $CONFIG = array(
/* Loglevel to start logging at. 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default is WARN) */
"loglevel" => "",
/* date format to be used while writing to the owncloud logfile */
'logdateformat' => 'F d, Y H:i:s',
/* Append all database queries and parameters to the log file.
(watch out, this option can increase the size of your log file)*/
"log_query" => false,
/*
* Configure the size in bytes log rotation should happen, 0 or false disables the rotation.
* This rotates the current owncloud logfile to a new name, this way the total log usage
* will stay limited and older entries are available for a while longer. The
* total disk usage is twice the configured size.
* WARNING: When you use this, the log entries will eventually be lost.
*/
'log_rotate_size' => false, // 104857600, // 100 MiB
/* Lifetime of the remember login cookie, default is 15 days */
"remember_login_cookie_lifetime" => 60*60*24*15,
@ -202,6 +214,4 @@ $CONFIG = array(
'preview_libreoffice_path' => '/usr/bin/libreoffice',
/* cl parameters for libreoffice / openoffice */
'preview_office_cl_parameters' => '',
// date format to be used while writing to the owncloud logfile
'logdateformat' => 'F d, Y H:i:s',
);

View File

@ -213,6 +213,10 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
}
}
$count = 0;
// enable l10n support
$l = OC_L10N::get('core');
foreach ($groups as $group) {
if ($count < 15) {
if (stripos($group, $_GET['search']) !== false
@ -221,7 +225,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|| !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])
|| !in_array($group, $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]))) {
$shareWith[] = array(
'label' => $group.' (group)',
'label' => $group.' ('.$l->t('group').')',
'value' => array(
'shareType' => OCP\Share::SHARE_TYPE_GROUP,
'shareWith' => $group

View File

@ -4,25 +4,26 @@ $RUNTIME_NOAPPS = true;
require_once '../../lib/base.php';
if (OC::checkUpgrade(false)) {
$l = new \OC_L10N('core');
$eventSource = new OC_EventSource();
$updater = new \OC\Updater(\OC_Log::$object);
$updater->listen('\OC\Updater', 'maintenanceStart', function () use ($eventSource) {
$eventSource->send('success', 'Turned on maintenance mode');
$updater->listen('\OC\Updater', 'maintenanceStart', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
});
$updater->listen('\OC\Updater', 'maintenanceEnd', function () use ($eventSource) {
$eventSource->send('success', 'Turned off maintenance mode');
$updater->listen('\OC\Updater', 'maintenanceEnd', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
});
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource) {
$eventSource->send('success', 'Updated database');
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Updated database'));
});
$updater->listen('\OC\Updater', 'filecacheStart', function () use ($eventSource) {
$eventSource->send('success', 'Updating filecache, this may take really long...');
$updater->listen('\OC\Updater', 'filecacheStart', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Updating filecache, this may take really long...'));
});
$updater->listen('\OC\Updater', 'filecacheDone', function () use ($eventSource) {
$eventSource->send('success', 'Updated filecache');
$updater->listen('\OC\Updater', 'filecacheDone', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Updated filecache'));
});
$updater->listen('\OC\Updater', 'filecacheProgress', function ($out) use ($eventSource) {
$eventSource->send('success', '... ' . $out . '% done ...');
$updater->listen('\OC\Updater', 'filecacheProgress', function ($out) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('... %d%% done ...', array('percent' => $out)));
});
$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource) {
$eventSource->send('failure', $message);

View File

@ -256,9 +256,9 @@ input[name="adminpass-clone"] { padding-left:1.8em; width:11.7em !important; }
#body-login input[type="password"],
#body-login input[type="email"] {
border: 1px solid #323233;
-moz-box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 3px rgba(0,0,0,.25) inset;
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 3px rgba(0,0,0,.25) inset;
box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 3px rgba(0,0,0,.25) inset;
-moz-box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.25) inset;
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.25) inset;
box-shadow: 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.25) inset;
}
/* Nicely grouping input field sets */

View File

@ -709,7 +709,6 @@ $(document).ready(function(){
});
label.hide();
};
setShowPassword($('#password'), $('label[for=show]'));
setShowPassword($('#adminpass'), $('label[for=show]'));
setShowPassword($('#pass2'), $('label[for=personal-show]'));
setShowPassword($('#dbpass'), $('label[for=dbpassword]'));
@ -762,6 +761,7 @@ $(document).ready(function(){
$('.password .action').tipsy({gravity:'se', fade:true, live:true});
$('#upload').tipsy({gravity:'w', fade:true});
$('.selectedActions a').tipsy({gravity:'s', fade:true, live:true});
$('a.action.delete').tipsy({gravity:'e', fade:true, live:true});
$('a.action').tipsy({gravity:'s', fade:true, live:true});
$('td .modified').tipsy({gravity:'s', fade:true, live:true});

View File

@ -60,9 +60,10 @@
var self = this;
if(typeof this.options.escapeFunction === 'function') {
for (var key = 0; key < this.vars.length; key++) {
if(typeof this.vars[key] === 'string') {
this.vars[key] = self.options.escapeFunction(this.vars[key]);
var keys = Object.keys(this.vars);
for (var key = 0; key < keys.length; key++) {
if(typeof this.vars[keys[key]] === 'string') {
this.vars[keys[key]] = self.options.escapeFunction(this.vars[keys[key]]);
}
}
}
@ -85,7 +86,7 @@
}
},
options: {
escapeFunction: function(str) {return $('<i></i>').text(str).html();}
escapeFunction: escapeHTML
}
};

65
core/js/placeholder.js Normal file
View File

@ -0,0 +1,65 @@
/**
* ownCloud
*
* @author Morris Jobke
* @copyright 2013 Morris Jobke <morris.jobke@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
/*
* Adds a background color to the element called on and adds the first character
* of the passed in string. This string is also the seed for the generation of
* the background color.
*
* You have following HTML:
*
* <div id="albumart"></div>
*
* And call this from Javascript:
*
* $('#albumart').placeholder('The Album Title');
*
* Which will result in:
*
* <div id="albumart" style="background-color: rgb(123, 123, 123); ... ">T</div>
*
*/
(function ($) {
$.fn.placeholder = function(seed) {
var hash = md5(seed),
maxRange = parseInt('ffffffffff', 16),
red = parseInt(hash.substr(0,10), 16) / maxRange * 256,
green = parseInt(hash.substr(10,10), 16) / maxRange * 256,
blue = parseInt(hash.substr(20,10), 16) / maxRange * 256,
rgb = [Math.floor(red), Math.floor(green), Math.floor(blue)],
height = this.height();
this.css('background-color', 'rgb(' + rgb.join(',') + ')');
// CSS rules
this.css('color', 'rgb(255, 255, 255)');
this.css('font-weight', 'bold');
this.css('text-align', 'center');
// calculate the height
this.css('line-height', height + 'px');
this.css('font-size', (height * 0.55) + 'px');
if(seed !== null && seed.length) {
this.html(seed[0].toUpperCase());
}
};
}(jQuery));

View File

@ -1,6 +1,12 @@
<?php
$TRANSLATIONS = array(
"%s shared »%s« with you" => "%s delte »%s« med sig",
"Turned on maintenance mode" => "Startede vedligeholdelsestilstand",
"Turned off maintenance mode" => "standsede vedligeholdelsestilstand",
"Updated database" => "Opdaterede database",
"Updating filecache, this may take really long..." => "Opdatere filcache, dette kan tage rigtigt lang tid...",
"Updated filecache" => "Opdaterede filcache",
"... %d%% done ..." => "... %d%% færdig ...",
"Category type not provided." => "Kategori typen ikke er fastsat.",
"No category to add?" => "Ingen kategori at tilføje?",
"This category already exists: %s" => "Kategorien eksisterer allerede: %s",

View File

@ -1,6 +1,12 @@
<?php
$TRANSLATIONS = array(
"%s shared »%s« with you" => "%s teilte »%s« mit Ihnen",
"Turned on maintenance mode" => "Wartungsmodus eingeschaltet",
"Turned off maintenance mode" => "Wartungsmodus ausgeschaltet",
"Updated database" => "Datenbank aktualisiert",
"Updating filecache, this may take really long..." => "Aktualisiere Dateicache, dies könnte eine Weile dauern...",
"Updated filecache" => "Dateicache aktualisiert",
"... %d%% done ..." => "... %d%% erledigt ...",
"Category type not provided." => "Kategorie nicht angegeben.",
"No category to add?" => "Keine Kategorie hinzuzufügen?",
"This category already exists: %s" => "Die Kategorie '%s' existiert bereits.",

View File

@ -30,13 +30,13 @@ $TRANSLATIONS = array(
"December" => "Dezember",
"Settings" => "Einstellungen",
"seconds ago" => "Gerade eben",
"_%n minute ago_::_%n minutes ago_" => array("",""),
"_%n hour ago_::_%n hours ago_" => array("",""),
"_%n minute ago_::_%n minutes ago_" => array("Vor %n Minute","Vor %n Minuten"),
"_%n hour ago_::_%n hours ago_" => array("Vor %n Stunde","Vor %n Stunden"),
"today" => "Heute",
"yesterday" => "Gestern",
"_%n day ago_::_%n days ago_" => array("",""),
"_%n day ago_::_%n days ago_" => array("Vor %n Tag","Vor %n Tagen"),
"last month" => "Letzten Monat",
"_%n month ago_::_%n months ago_" => array("",""),
"_%n month ago_::_%n months ago_" => array("Vor %n Monat","Vor %n Monaten"),
"months ago" => "Vor Monaten",
"last year" => "Letztes Jahr",
"years ago" => "Vor Jahren",
@ -83,6 +83,7 @@ $TRANSLATIONS = array(
"Email sent" => "Email gesendet",
"The update was unsuccessful. Please report this issue to the <a href=\"https://github.com/owncloud/core/issues\" target=\"_blank\">ownCloud community</a>." => "Das Update ist fehlgeschlagen. Bitte melden Sie dieses Problem an die <a href=\"https://github.com/owncloud/core/issues\" target=\"_blank\">ownCloud Community</a>.",
"The update was successful. Redirecting you to ownCloud now." => "Das Update war erfolgreich. Sie werden nun zu ownCloud weitergeleitet.",
"%s password reset" => "%s-Passwort zurücksetzen",
"Use the following link to reset your password: {link}" => "Nutzen Sie den nachfolgenden Link, um Ihr Passwort zurückzusetzen: {link}",
"The link to reset your password has been sent to your email.<br>If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator ." => "Der Link zum Rücksetzen Ihres Passworts ist an Ihre E-Mail-Adresse gesendet worde.<br>Wenn Sie ihn nicht innerhalb einer vernünftigen Zeitspanne erhalten, prüfen Sie bitte Ihre Spam-Verzeichnisse.<br>Wenn er nicht dort ist, fragen Sie Ihren lokalen Administrator.",
"Request failed!<br>Did you make sure your email/username was right?" => "Anfrage fehlgeschlagen!<br>Haben Sie darauf geachtet, dass E-Mail-Adresse/Nutzername korrekt waren?",

View File

@ -1,6 +1,12 @@
<?php
$TRANSLATIONS = array(
"%s shared »%s« with you" => "%s geteilt »%s« mit Ihnen",
"Turned on maintenance mode" => "Wartungsmodus eingeschaltet ",
"Turned off maintenance mode" => "Wartungsmodus ausgeschaltet",
"Updated database" => "Datenbank aktualisiert",
"Updating filecache, this may take really long..." => "Aktualisiere Dateicache, dies könnte eine Weile dauern...",
"Updated filecache" => "Dateicache aktualisiert",
"... %d%% done ..." => "... %d%% erledigt ...",
"Category type not provided." => "Kategorie nicht angegeben.",
"No category to add?" => "Keine Kategorie hinzuzufügen?",
"This category already exists: %s" => "Die nachfolgende Kategorie existiert bereits: %s",

View File

@ -1,6 +1,12 @@
<?php
$TRANSLATIONS = array(
"%s shared »%s« with you" => "%s jagas sinuga »%s«",
"Turned on maintenance mode" => "Haldusreziimis",
"Turned off maintenance mode" => "Haldusreziim lõpetatud",
"Updated database" => "Uuendatud andmebaas",
"Updating filecache, this may take really long..." => "Uuendan failipuhvrit, see võib kesta väga kaua...",
"Updated filecache" => "Uuendatud failipuhver",
"... %d%% done ..." => "... %d%% tehtud ...",
"Category type not provided." => "Kategooria tüüp puudub.",
"No category to add?" => "Pole kategooriat, mida lisada?",
"This category already exists: %s" => "See kategooria on juba olemas: %s",

View File

@ -1,6 +1,12 @@
<?php
$TRANSLATIONS = array(
"%s shared »%s« with you" => "%s jakoi kohteen »%s« kanssasi",
"Turned on maintenance mode" => "Siirrytty ylläpitotilaan",
"Turned off maintenance mode" => "Ylläpitotila laitettu pois päältä",
"Updated database" => "Tietokanta ajan tasalla",
"Updating filecache, this may take really long..." => "Päivitetään tiedostojen välimuistia, tämä saattaa kestää todella kauan...",
"Updated filecache" => "Tiedostojen välimuisti päivitetty",
"... %d%% done ..." => "... %d%% valmis ...",
"Category type not provided." => "Luokan tyyppiä ei määritelty.",
"No category to add?" => "Ei lisättävää luokkaa?",
"This category already exists: %s" => "Luokka on jo olemassa: %s",
@ -64,6 +70,7 @@ $TRANSLATIONS = array(
"Share via email:" => "Jaa sähköpostilla:",
"No people found" => "Henkilöitä ei löytynyt",
"Resharing is not allowed" => "Jakaminen uudelleen ei ole salittu",
"Shared in {item} with {user}" => "{item} on jaettu {user} kanssa",
"Unshare" => "Peru jakaminen",
"can edit" => "voi muokata",
"access control" => "Pääsyn hallinta",
@ -78,6 +85,7 @@ $TRANSLATIONS = array(
"Email sent" => "Sähköposti lähetetty",
"The update was unsuccessful. Please report this issue to the <a href=\"https://github.com/owncloud/core/issues\" target=\"_blank\">ownCloud community</a>." => "Päivitys epäonnistui. Ilmoita ongelmasta <a href=\"https://github.com/owncloud/core/issues\" target=\"_blank\">ownCloud-yhteisölle</a>.",
"The update was successful. Redirecting you to ownCloud now." => "Päivitys onnistui. Selain ohjautuu nyt ownCloudiisi.",
"%s password reset" => "%s salasanan nollaus",
"Use the following link to reset your password: {link}" => "Voit palauttaa salasanasi seuraavassa osoitteessa: {link}",
"The link to reset your password has been sent to your email.<br>If you do not receive it within a reasonable amount of time, check your spam/junk folders.<br>If it is not there ask your local administrator ." => "Linkki salasanan nollaamiseen on lähetetty sähköpostiisi.<br>Jos et saa viestiä pian, tarkista roskapostikansiosi.<br>Jos et löydä viestiä roskapostinkaan seasta, ota yhteys ylläpitäjään.",
"Request failed!<br>Did you make sure your email/username was right?" => "Pyyntö epäonnistui!<br>Olihan sähköpostiosoitteesi/käyttäjätunnuksesi oikein?",

Some files were not shown because too many files have changed in this diff Show More