summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/fileactions.js2
-rw-r--r--apps/files/l10n/el.php1
-rw-r--r--apps/files/l10n/es_AR.php1
-rw-r--r--apps/files/l10n/fa.php8
-rw-r--r--apps/files/l10n/fr.php1
-rw-r--r--apps/files/l10n/sl.php16
-rw-r--r--apps/files/l10n/tr.php1
-rw-r--r--apps/files/l10n/zh_CN.php10
-rw-r--r--apps/files/l10n/zh_HK.php9
-rw-r--r--apps/files_encryption/l10n/sl.php2
-rw-r--r--apps/files_encryption/l10n/zh_CN.php5
-rw-r--r--apps/files_encryption/l10n/zh_HK.php6
-rw-r--r--apps/files_external/l10n/fr.php2
-rw-r--r--apps/files_external/l10n/sl.php10
-rw-r--r--apps/files_external/l10n/zh_CN.php2
-rw-r--r--apps/files_external/l10n/zh_HK.php5
-rw-r--r--apps/files_external/templates/settings.php2
-rw-r--r--apps/files_sharing/appinfo/app.php6
-rw-r--r--apps/files_sharing/l10n/zh_HK.php4
-rw-r--r--apps/files_sharing/lib/cache.php39
-rw-r--r--apps/files_sharing/lib/share/file.php1
-rw-r--r--apps/files_sharing/lib/sharedstorage.php72
-rw-r--r--apps/files_sharing/lib/updater.php102
-rw-r--r--apps/files_trashbin/index.php2
-rw-r--r--apps/files_trashbin/l10n/de.php2
-rw-r--r--apps/files_trashbin/l10n/de_DE.php2
-rw-r--r--apps/files_trashbin/l10n/fa.php9
-rw-r--r--apps/files_trashbin/l10n/hu_HU.php3
-rw-r--r--apps/files_trashbin/l10n/zh_CN.php8
-rw-r--r--apps/files_trashbin/l10n/zh_HK.php4
-rw-r--r--apps/files_trashbin/lib/trash.php22
-rw-r--r--apps/files_versions/l10n/fr.php1
-rw-r--r--apps/files_versions/l10n/sl.php2
-rw-r--r--apps/files_versions/l10n/zh_HK.php6
-rw-r--r--apps/files_versions/lib/versions.php19
-rw-r--r--apps/user_ldap/appinfo/version2
-rw-r--r--apps/user_ldap/l10n/de.php6
-rw-r--r--apps/user_ldap/l10n/es_AR.php6
-rw-r--r--apps/user_ldap/l10n/fa.php1
-rw-r--r--apps/user_ldap/l10n/fr.php6
-rw-r--r--apps/user_ldap/l10n/sl.php20
-rw-r--r--apps/user_ldap/l10n/zh_CN.php37
-rw-r--r--apps/user_ldap/l10n/zh_HK.php5
-rw-r--r--apps/user_ldap/lib/access.php4
44 files changed, 391 insertions, 83 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 38f5bab6f73..f3264da5a12 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -112,7 +112,7 @@ var FileActions = {
addAction(name, action);
}
});
- if(actions.Share){
+ if(actions.Share && !($('#dir').val() === '/' && file === 'Shared')){
addAction('Share', actions.Share);
}
diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php
index 63759f1201e..7682ae24b09 100644
--- a/apps/files/l10n/el.php
+++ b/apps/files/l10n/el.php
@@ -61,6 +61,7 @@
"From link" => "Από σύνδεσμο",
"Deleted files" => "Διαγραμμένα αρχεία",
"Cancel upload" => "Ακύρωση αποστολής",
+"You don’t have write permissions here." => "Δεν έχετε δικαιώματα εγγραφής εδώ.",
"Nothing in here. Upload something!" => "Δεν υπάρχει τίποτα εδώ. Μεταφορτώστε κάτι!",
"Download" => "Λήψη",
"Unshare" => "Διακοπή κοινής χρήσης",
diff --git a/apps/files/l10n/es_AR.php b/apps/files/l10n/es_AR.php
index f16385a652d..6cd7c026922 100644
--- a/apps/files/l10n/es_AR.php
+++ b/apps/files/l10n/es_AR.php
@@ -61,6 +61,7 @@
"From link" => "Desde enlace",
"Deleted files" => "Archivos Borrados",
"Cancel upload" => "Cancelar subida",
+"You don’t have write permissions here." => "No tenés permisos de escritura acá.",
"Nothing in here. Upload something!" => "No hay nada. ¡Subí contenido!",
"Download" => "Descargar",
"Unshare" => "Dejar de compartir",
diff --git a/apps/files/l10n/fa.php b/apps/files/l10n/fa.php
index b9a88b57912..e507ee715c5 100644
--- a/apps/files/l10n/fa.php
+++ b/apps/files/l10n/fa.php
@@ -10,6 +10,7 @@
"No file was uploaded" => "هیچ فایلی بارگذاری نشده",
"Missing a temporary folder" => "یک پوشه موقت گم شده است",
"Failed to write to disk" => "نوشتن بر روی دیسک سخت ناموفق بود",
+"Not enough storage available" => "فضای کافی در دسترس نیست",
"Invalid directory." => "فهرست راهنما نامعتبر می باشد.",
"Files" => "فایل ها",
"Delete permanently" => "حذف قطعی",
@@ -22,9 +23,12 @@
"cancel" => "لغو",
"replaced {new_name} with {old_name}" => "{نام_جدید} با { نام_قدیمی} جایگزین شد.",
"undo" => "بازگشت",
+"perform delete operation" => "انجام عمل حذف",
"'.' 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." => "دانلود شما در حال آماده شدن است. در صورتیکه پرونده ها بزرگ باشند ممکن است مدتی طول بکشد.",
"Unable to upload your file as it is a directory or has 0 bytes" => "ناتوان در بارگذاری یا فایل یک پوشه است یا 0بایت دارد",
"Upload Error" => "خطا در بار گذاری",
@@ -57,11 +61,13 @@
"From link" => "از پیوند",
"Deleted files" => "فایل های حذف شده",
"Cancel upload" => "متوقف کردن بار گذاری",
+"You don’t have write permissions here." => "شما اجازه ی نوشتن در اینجا را ندارید",
"Nothing in here. Upload something!" => "اینجا هیچ چیز نیست.",
"Download" => "بارگیری",
"Unshare" => "لغو اشتراک",
"Upload too large" => "حجم بارگذاری بسیار زیاد است",
"The files you are trying to upload exceed the maximum size for file uploads on this server." => "فایلها بیش از حد تعیین شده در این سرور هستند\nمترجم:با تغییر فایل php,ini میتوان این محدودیت را برطرف کرد",
"Files are being scanned, please wait." => "پرونده ها در حال بازرسی هستند لطفا صبر کنید",
-"Current scanning" => "بازرسی کنونی"
+"Current scanning" => "بازرسی کنونی",
+"Upgrading filesystem cache..." => "بهبود فایل سیستمی ذخیره گاه..."
);
diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php
index 9849184441d..5e53f5ab024 100644
--- a/apps/files/l10n/fr.php
+++ b/apps/files/l10n/fr.php
@@ -61,6 +61,7 @@
"From link" => "Depuis le lien",
"Deleted files" => "Fichiers supprimés",
"Cancel upload" => "Annuler l'envoi",
+"You don’t have write permissions here." => "Vous n'avez pas le droit d'écriture ici.",
"Nothing in here. Upload something!" => "Il n'y a rien ici ! Envoyez donc quelque chose :)",
"Download" => "Télécharger",
"Unshare" => "Ne plus partager",
diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php
index 9c86ffcfefd..01405530ffa 100644
--- a/apps/files/l10n/sl.php
+++ b/apps/files/l10n/sl.php
@@ -2,9 +2,9 @@
"Could not move %s - File with this name already exists" => "Ni mogoče premakniti %s - datoteka s tem imenom že obstaja",
"Could not move %s" => "Ni mogoče premakniti %s",
"Unable to rename file" => "Ni mogoče preimenovati datoteke",
-"No file was uploaded. Unknown error" => "Nobena datoteka ni naložena. Neznana napaka.",
+"No file was uploaded. Unknown error" => "Ni poslane nobene datoteke. Neznana napaka.",
"There is no error, the file uploaded with success" => "Datoteka je uspešno poslana.",
-"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Naložena datoteka presega dovoljeno velikost. Le-ta je določena z vrstico upload_max_filesize v datoteki php.ini:",
+"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Poslana datoteka presega dovoljeno velikost, ki je določena z možnostjo upload_max_filesize v datoteki php.ini:",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Poslana datoteka presega velikost, ki jo določa parameter največje dovoljene velikosti v obrazcu HTML.",
"The uploaded file was only partially uploaded" => "Datoteka je le delno naložena",
"No file was uploaded" => "Nobena datoteka ni bila naložena",
@@ -21,24 +21,24 @@
"replace" => "zamenjaj",
"suggest name" => "predlagaj ime",
"cancel" => "prekliči",
-"replaced {new_name} with {old_name}" => "zamenjano ime {new_name} z imenom {old_name}",
+"replaced {new_name} with {old_name}" => "preimenovano ime {new_name} z imenom {old_name}",
"undo" => "razveljavi",
"perform delete operation" => "izvedi opravilo brisanja",
"'.' is an invalid file name." => "'.' je neveljavno ime datoteke.",
-"File name cannot be empty." => "Ime datoteke ne sme biti prazno.",
+"File name cannot be empty." => "Ime datoteke ne sme biti prazno polje.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neveljavno ime, znaki '\\', '/', '<', '>', ':', '\"', '|', '?' in '*' niso dovoljeni.",
"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.",
+"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.",
"Unable to upload your file as it is a directory or has 0 bytes" => "Pošiljanje ni mogoče, saj gre za mapo, ali pa je datoteka velikosti 0 bajtov.",
"Upload Error" => "Napaka med pošiljanjem",
"Close" => "Zapri",
"1 file uploading" => "Pošiljanje 1 datoteke",
-"{count} files uploading" => "nalagam {count} datotek",
+"{count} files uploading" => "pošiljanje {count} datotek",
"Upload cancelled." => "Pošiljanje je preklicano.",
"File upload is in progress. Leaving the page now will cancel the upload." => "V teku je pošiljanje datoteke. Če zapustite to stran zdaj, bo pošiljanje preklicano.",
-"URL cannot be empty." => "Naslov URL ne sme biti prazen.",
-"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Neveljavno ime mape. Uporaba oznake \"Souporaba\" je zadržan za sistem ownCloud",
+"URL cannot be empty." => "Naslov URL ne sme biti prazna vrednost.",
+"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",
diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php
index bcbef8daf35..547b490330a 100644
--- a/apps/files/l10n/tr.php
+++ b/apps/files/l10n/tr.php
@@ -61,6 +61,7 @@
"From link" => "Bağlantıdan",
"Deleted files" => "Dosyalar silindi",
"Cancel upload" => "Yüklemeyi iptal et",
+"You don’t have write permissions here." => "Buraya erişim hakkınız yok.",
"Nothing in here. Upload something!" => "Burada hiçbir şey yok. Birşeyler yükleyin!",
"Download" => "İndir",
"Unshare" => "Paylaşılmayan",
diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php
index 88fdc537c3a..2923126d10f 100644
--- a/apps/files/l10n/zh_CN.php
+++ b/apps/files/l10n/zh_CN.php
@@ -10,8 +10,10 @@
"No file was uploaded" => "文件没有上传",
"Missing a temporary folder" => "缺少临时目录",
"Failed to write to disk" => "写入磁盘失败",
+"Not enough storage available" => "没有足够的存储空间",
"Invalid directory." => "无效文件夹。",
"Files" => "文件",
+"Delete permanently" => "永久删除",
"Delete" => "删除",
"Rename" => "重命名",
"Pending" => "操作等待中",
@@ -21,9 +23,12 @@
"cancel" => "取消",
"replaced {new_name} with {old_name}" => "已将 {old_name}替换成 {new_name}",
"undo" => "撤销",
+"perform delete operation" => "进行删除操作",
"'.' 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." => "下载正在准备中。如果文件较大可能会花费一些时间。",
"Unable to upload your file as it is a directory or has 0 bytes" => "无法上传文件,因为它是一个目录或者大小为 0 字节",
"Upload Error" => "上传错误",
@@ -54,12 +59,15 @@
"Text file" => "文本文件",
"Folder" => "文件夹",
"From link" => "来自链接",
+"Deleted files" => "删除文件",
"Cancel upload" => "取消上传",
+"You don’t have write permissions here." => "您没有写权限",
"Nothing in here. Upload something!" => "这里还什么都没有。上传些东西吧!",
"Download" => "下载",
"Unshare" => "取消分享",
"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" => "当前扫描"
+"Current scanning" => "当前扫描",
+"Upgrading filesystem cache..." => "正在更新文件系统缓存..."
);
diff --git a/apps/files/l10n/zh_HK.php b/apps/files/l10n/zh_HK.php
new file mode 100644
index 00000000000..4eaa908476b
--- /dev/null
+++ b/apps/files/l10n/zh_HK.php
@@ -0,0 +1,9 @@
+<?php $TRANSLATIONS = array(
+"Files" => "文件",
+"Delete" => "刪除",
+"Name" => "名稱",
+"Upload" => "上傳",
+"Save" => "儲存",
+"Download" => "下載",
+"Unshare" => "取消分享"
+);
diff --git a/apps/files_encryption/l10n/sl.php b/apps/files_encryption/l10n/sl.php
index 39a5a0d40f8..4754e21214e 100644
--- a/apps/files_encryption/l10n/sl.php
+++ b/apps/files_encryption/l10n/sl.php
@@ -2,6 +2,6 @@
"Encryption" => "Šifriranje",
"File encryption is enabled." => "Šifriranje datotek je omogočeno.",
"The following file types will not be encrypted:" => "Navedene vrste datotek ne bodo šifrirane:",
-"Exclude the following file types from encryption:" => "Izloči navedene vrste datotek med šifriranjem:",
+"Exclude the following file types from encryption:" => "Ne šifriraj navedenih vrst datotek:",
"None" => "Brez"
);
diff --git a/apps/files_encryption/l10n/zh_CN.php b/apps/files_encryption/l10n/zh_CN.php
index 867d000f2ed..13fa95203e4 100644
--- a/apps/files_encryption/l10n/zh_CN.php
+++ b/apps/files_encryption/l10n/zh_CN.php
@@ -1,4 +1,7 @@
<?php $TRANSLATIONS = array(
"Encryption" => "加密",
-"None" => "None"
+"File encryption is enabled." => "文件加密已启用.",
+"The following file types will not be encrypted:" => "如下的文件类型将不会被加密:",
+"Exclude the following file types from encryption:" => "从加密中排除如下的文件类型:",
+"None" => "无"
);
diff --git a/apps/files_encryption/l10n/zh_HK.php b/apps/files_encryption/l10n/zh_HK.php
new file mode 100644
index 00000000000..0c0b709fdc1
--- /dev/null
+++ b/apps/files_encryption/l10n/zh_HK.php
@@ -0,0 +1,6 @@
+<?php $TRANSLATIONS = array(
+"Encryption" => "加密",
+"File encryption is enabled." => "檔案加密已開啟",
+"The following file types will not be encrypted:" => "以下文件類別將不會被加密",
+"None" => "空"
+);
diff --git a/apps/files_external/l10n/fr.php b/apps/files_external/l10n/fr.php
index db4140b483d..c42c89f8572 100644
--- a/apps/files_external/l10n/fr.php
+++ b/apps/files_external/l10n/fr.php
@@ -8,9 +8,11 @@
"<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>Attention : </b> Le support FTP de PHP n'est pas activé ou installé. Le montage des partages FTP n'est pas disponible. Contactez votre administrateur système pour l'installer.",
"External Storage" => "Stockage externe",
"Folder name" => "Nom du dossier",
+"External storage" => "Stockage externe",
"Configuration" => "Configuration",
"Options" => "Options",
"Applicable" => "Disponible",
+"Add storage" => "Ajouter un support de stockage",
"None set" => "Aucun spécifié",
"All Users" => "Tous les utilisateurs",
"Groups" => "Groupes",
diff --git a/apps/files_external/l10n/sl.php b/apps/files_external/l10n/sl.php
index 5614c93585a..4ff2eed3bf0 100644
--- a/apps/files_external/l10n/sl.php
+++ b/apps/files_external/l10n/sl.php
@@ -2,21 +2,23 @@
"Access granted" => "Dostop je odobren",
"Error configuring Dropbox storage" => "Napaka nastavljanja shrambe Dropbox",
"Grant access" => "Odobri dostop",
-"Please provide a valid Dropbox app key and secret." => "Vpišite veljaven ključ programa in kodo za Dropbox",
+"Please provide a valid Dropbox app key and secret." => "Vpisati je treba veljaven ključ programa in kodo za Dropbox",
"Error configuring Google Drive storage" => "Napaka nastavljanja shrambe 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>Opozorilo:</b> \"smbclient\" ni nameščen. Priklapljanje CIFS/SMB pogonov ni mogoče. Prosimo, prosite vašega skrbnika, če ga namesti.",
-"<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>Opozorilo:</b> FTP podpora v PHP ni omogočena ali nameščena. Priklapljanje FTP pogonov ni mogoče. Prosimo, prosite vašega skrbnika, če jo namesti ali omogoči.",
+"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Opozorilo:</b> paket \"smbclient\" ni nameščen. Priklapljanje pogonov CIFS/SMB ne bo mogoče.",
+"<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>Opozorilo:</b> podpora FTP v PHP ni omogočena ali pa ni nameščena. Priklapljanje pogonov FTP zato ni mogoče.",
"External Storage" => "Zunanja podatkovna shramba",
"Folder name" => "Ime mape",
+"External storage" => "Zunanja shramba",
"Configuration" => "Nastavitve",
"Options" => "Možnosti",
"Applicable" => "Se uporablja",
+"Add storage" => "Dodaj shrambo",
"None set" => "Ni nastavljeno",
"All Users" => "Vsi uporabniki",
"Groups" => "Skupine",
"Users" => "Uporabniki",
"Delete" => "Izbriši",
-"Enable User External Storage" => "Omogoči uporabo zunanje podatkovne shrambe za uporabnike",
+"Enable User External Storage" => "Omogoči uporabniško zunanjo podatkovno shrambo",
"Allow users to mount their own external storage" => "Dovoli uporabnikom priklop lastne zunanje podatkovne shrambe",
"SSL root certificates" => "Korenska potrdila SSL",
"Import Root Certificate" => "Uvozi korensko potrdilo"
diff --git a/apps/files_external/l10n/zh_CN.php b/apps/files_external/l10n/zh_CN.php
index 1860b6f70d7..7f95320511f 100644
--- a/apps/files_external/l10n/zh_CN.php
+++ b/apps/files_external/l10n/zh_CN.php
@@ -8,9 +8,11 @@
"<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 分享挂载无法实现。请咨询系统管理员进行安装。",
"External Storage" => "外部存储",
"Folder name" => "目录名称",
+"External storage" => "外部存储",
"Configuration" => "配置",
"Options" => "选项",
"Applicable" => "适用的",
+"Add storage" => "添加存储",
"None set" => "未设置",
"All Users" => "所有用户",
"Groups" => "组",
diff --git a/apps/files_external/l10n/zh_HK.php b/apps/files_external/l10n/zh_HK.php
new file mode 100644
index 00000000000..a85b5a03b8a
--- /dev/null
+++ b/apps/files_external/l10n/zh_HK.php
@@ -0,0 +1,5 @@
+<?php $TRANSLATIONS = array(
+"Groups" => "群組",
+"Users" => "用戶",
+"Delete" => "刪除"
+);
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 86492699fc2..b3b94a1dafd 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -155,7 +155,7 @@
</tbody>
</table>
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']); ?>">
- <input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;">
+ <input type="file" id="rootcert_import" name="rootcert_import">
<input type="submit" name="cert_import" value="<?php p($l->t('Import Root Certificate')); ?>" />
</fieldset>
</form>
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 5b5893abc93..9363a5431fa 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -5,8 +5,14 @@ OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php'
OC::$CLASSPATH['OC\Files\Storage\Shared'] = 'files_sharing/lib/sharedstorage.php';
OC::$CLASSPATH['OC\Files\Cache\Shared_Cache'] = 'files_sharing/lib/cache.php';
OC::$CLASSPATH['OC\Files\Cache\Shared_Permissions'] = 'files_sharing/lib/permissions.php';
+OC::$CLASSPATH['OC\Files\Cache\Shared_Updater'] = 'files_sharing/lib/updater.php';
OC::$CLASSPATH['OC\Files\Cache\Shared_Watcher'] = 'files_sharing/lib/watcher.php';
OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
OCP\Util::addScript('files_sharing', 'share');
+\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Shared_Updater', 'writeHook');
+\OC_Hook::connect('OC_Filesystem', 'delete', '\OC\Files\Cache\Shared_Updater', 'deleteHook');
+\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Shared_Updater', 'renameHook');
+\OC_Hook::connect('OCP\Share', 'post_shared', '\OC\Files\Cache\Shared_Updater', 'shareHook');
+\OC_Hook::connect('OCP\Share', 'pre_unshare', '\OC\Files\Cache\Shared_Updater', 'shareHook'); \ No newline at end of file
diff --git a/apps/files_sharing/l10n/zh_HK.php b/apps/files_sharing/l10n/zh_HK.php
new file mode 100644
index 00000000000..7ef0f19ca43
--- /dev/null
+++ b/apps/files_sharing/l10n/zh_HK.php
@@ -0,0 +1,4 @@
+<?php $TRANSLATIONS = array(
+"Password" => "密碼",
+"Download" => "下載"
+);
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index fb0f6c7b5a6..9fccd0b46f3 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -28,10 +28,11 @@ namespace OC\Files\Cache;
*/
class Shared_Cache extends Cache {
+ private $storage;
private $files = array();
public function __construct($storage) {
-
+ $this->storage = $storage;
}
/**
@@ -41,16 +42,19 @@ class Shared_Cache extends Cache {
*/
private function getSourceCache($target) {
$source = \OC_Share_Backend_File::getSource($target);
- if (isset($source['path'])) {
- $source['path'] = '/' . $source['uid_owner'] . '/' . $source['path'];
- \OC\Files\Filesystem::initMountPoints($source['uid_owner']);
- list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source['path']);
- if ($storage) {
- $this->files[$target] = $internalPath;
- $cache = $storage->getCache();
- $this->storageId = $storage->getId();
- $this->numericId = $cache->getNumericStorageId();
- return $cache;
+ if (isset($source['path']) && isset($source['fileOwner'])) {
+ \OC\Files\Filesystem::initMountPoints($source['fileOwner']);
+ $mount = \OC\Files\Mount::findByNumericId($source['storage']);
+ if ($mount) {
+ $fullPath = $mount->getMountPoint().$source['path'];
+ list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($fullPath);
+ if ($storage) {
+ $this->files[$target] = $internalPath;
+ $cache = $storage->getCache();
+ $this->storageId = $storage->getId();
+ $this->numericId = $cache->getNumericStorageId();
+ return $cache;
+ }
}
}
return false;
@@ -64,7 +68,14 @@ class Shared_Cache extends Cache {
*/
public function get($file) {
if ($file == '') {
- return \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_FILE_APP_ROOT);
+ $data = \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_FILE_APP_ROOT);
+ $etag = \OCP\Config::getUserValue(\OCP\User::getUser(), 'files_sharing', 'etag');
+ if (!isset($etag)) {
+ $etag = $this->storage->getETag('');
+ \OCP\Config::setUserValue(\OCP\User::getUser(), 'files_sharing', 'etag', $etag);
+ }
+ $data['etag'] = $etag;
+ return $data;
} else if (is_string($file)) {
if ($cache = $this->getSourceCache($file)) {
return $cache->get($this->files[$file]);
@@ -118,7 +129,9 @@ class Shared_Cache extends Cache {
* @return int file id
*/
public function put($file, array $data) {
- if ($cache = $this->getSourceCache($file)) {
+ if ($file === '' && isset($data['etag'])) {
+ return \OCP\Config::setUserValue(\OCP\User::getUser(), 'files_sharing', 'etag', $data['etag']);
+ } else if ($cache = $this->getSourceCache($file)) {
return $cache->put($this->files[$file], $data);
}
return false;
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php
index fa43e87b49e..62948651806 100644
--- a/apps/files_sharing/lib/share/file.php
+++ b/apps/files_sharing/lib/share/file.php
@@ -93,6 +93,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
$file['size'] = $item['size'];
$file['mtime'] = $item['mtime'];
$file['encrypted'] = $item['encrypted'];
+ $file['etag'] = $item['etag'];
$files[] = $file;
}
return $files;
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index be0e59e6732..ffd4e5ced22 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -45,7 +45,18 @@ class Shared extends \OC\Files\Storage\Common {
*/
private function getFile($target) {
if (!isset($this->files[$target])) {
- $this->files[$target] = \OC_Share_Backend_File::getSource($target);
+ // Check for partial files
+ if (pathinfo($target, PATHINFO_EXTENSION) === 'part') {
+ $source = \OC_Share_Backend_File::getSource(substr($target, 0, -5));
+ if ($source) {
+ $source['path'] .= '.part';
+ // All partial files have delete permission
+ $source['permissions'] |= \OCP\PERMISSION_DELETE;
+ }
+ } else {
+ $source = \OC_Share_Backend_File::getSource($target);
+ }
+ $this->files[$target] = $source;
}
return $this->files[$target];
}
@@ -280,34 +291,43 @@ class Shared extends \OC\Files\Storage\Common {
}
public function rename($path1, $path2) {
- // Renaming/moving is only allowed within shared folders
- $pos1 = strpos($path1, '/', 1);
- $pos2 = strpos($path2, '/', 1);
- if ($pos1 !== false && $pos2 !== false && ($oldSource = $this->getSourcePath($path1))) {
- $newSource = $this->getSourcePath(dirname($path2)).'/'.basename($path2);
- if (dirname($path1) == dirname($path2)) {
- // Rename the file if UPDATE permission is granted
- if ($this->isUpdatable($path1)) {
- list($storage, $oldInternalPath) = \OC\Files\Filesystem::resolvePath($oldSource);
- list( , $newInternalPath) = \OC\Files\Filesystem::resolvePath($newSource);
- return $storage->rename($oldInternalPath, $newInternalPath);
- }
- } else {
- // Move the file if DELETE and CREATE permissions are granted
- if ($this->isDeletable($path1) && $this->isCreatable(dirname($path2))) {
- // Get the root shared folder
- $folder1 = substr($path1, 0, $pos1);
- $folder2 = substr($path2, 0, $pos2);
- // Copy and unlink the file if it exists in a different shared folder
- if ($folder1 != $folder2) {
- if ($this->copy($path1, $path2)) {
- return $this->unlink($path1);
- }
- } else {
+ // Check for partial files
+ if (pathinfo($path1, PATHINFO_EXTENSION) === 'part') {
+ if ($oldSource = $this->getSourcePath($path1)) {
+ list($storage, $oldInternalPath) = \OC\Files\Filesystem::resolvePath($oldSource);
+ $newInternalPath = substr($oldInternalPath, 0, -5);
+ return $storage->rename($oldInternalPath, $newInternalPath);
+ }
+ } else {
+ // Renaming/moving is only allowed within shared folders
+ $pos1 = strpos($path1, '/', 1);
+ $pos2 = strpos($path2, '/', 1);
+ if ($pos1 !== false && $pos2 !== false && ($oldSource = $this->getSourcePath($path1))) {
+ $newSource = $this->getSourcePath(dirname($path2)).'/'.basename($path2);
+ if (dirname($path1) == dirname($path2)) {
+ // Rename the file if UPDATE permission is granted
+ if ($this->isUpdatable($path1)) {
list($storage, $oldInternalPath) = \OC\Files\Filesystem::resolvePath($oldSource);
list( , $newInternalPath) = \OC\Files\Filesystem::resolvePath($newSource);
return $storage->rename($oldInternalPath, $newInternalPath);
}
+ } else {
+ // Move the file if DELETE and CREATE permissions are granted
+ if ($this->isDeletable($path1) && $this->isCreatable(dirname($path2))) {
+ // Get the root shared folder
+ $folder1 = substr($path1, 0, $pos1);
+ $folder2 = substr($path2, 0, $pos2);
+ // Copy and unlink the file if it exists in a different shared folder
+ if ($folder1 != $folder2) {
+ if ($this->copy($path1, $path2)) {
+ return $this->unlink($path1);
+ }
+ } else {
+ list($storage, $oldInternalPath) = \OC\Files\Filesystem::resolvePath($oldSource);
+ list( , $newInternalPath) = \OC\Files\Filesystem::resolvePath($newSource);
+ return $storage->rename($oldInternalPath, $newInternalPath);
+ }
+ }
}
}
}
@@ -371,7 +391,7 @@ class Shared extends \OC\Files\Storage\Common {
public function free_space($path) {
if ($path == '') {
- return -1;
+ return \OC\Files\FREE_SPACE_UNKNOWN;
}
$source = $this->getSourcePath($path);
if ($source) {
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
new file mode 100644
index 00000000000..73e7808f24a
--- /dev/null
+++ b/apps/files_sharing/lib/updater.php
@@ -0,0 +1,102 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Michael Gapczynski
+ * @copyright 2013 Michael Gapczynski mtgap@owncloud.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/>.
+ */
+
+namespace OC\Files\Cache;
+
+class Shared_Updater {
+
+ /**
+ * Correct the parent folders' ETags for all users shared the file at $target
+ *
+ * @param string $target
+ */
+ static public function correctFolders($target) {
+ $uid = \OCP\User::getUser();
+ $uidOwner = \OC\Files\Filesystem::getOwner($target);
+ $info = \OC\Files\Filesystem::getFileInfo($target);
+ // Correct Shared folders of other users shared with
+ $users = \OCP\Share::getUsersItemShared('file', $info['fileid'], $uidOwner, true);
+ if (!empty($users)) {
+ while (!empty($users)) {
+ $reshareUsers = array();
+ foreach ($users as $user) {
+ $etag = \OC\Files\Filesystem::getETag('');
+ \OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
+ // Look for reshares
+ $reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $info['fileid'], $user, true));
+ }
+ $users = $reshareUsers;
+ }
+ // Correct folders of shared file owner
+ $target = substr($target, 8);
+ if ($uidOwner !== $uid && $source = \OC_Share_Backend_File::getSource($target)) {
+ \OC\Files\Filesystem::initMountPoints($uidOwner);
+ $source = '/'.$uidOwner.'/'.$source['path'];
+ \OC\Files\Cache\Updater::correctFolder($source, $info['mtime']);
+ }
+ }
+ }
+
+ /**
+ * @param array $params
+ */
+ static public function writeHook($params) {
+ self::correctFolders($params['path']);
+ }
+
+ /**
+ * @param array $params
+ */
+ static public function renameHook($params) {
+ self::correctFolders($params['oldpath']);
+ self::correctFolders($params['newpath']);
+ }
+
+ /**
+ * @param array $params
+ */
+ static public function deleteHook($params) {
+ self::correctFolders($params['path']);
+ }
+
+ /**
+ * @param array $params
+ */
+ static public function shareHook($params) {
+ if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
+ $uidOwner = \OCP\User::getUser();
+ $users = \OCP\Share::getUsersItemShared($params['itemType'], $params['fileSource'], $uidOwner, true);
+ if (!empty($users)) {
+ while (!empty($users)) {
+ $reshareUsers = array();
+ foreach ($users as $user) {
+ $etag = \OC\Files\Filesystem::getETag('');
+ \OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
+ // Look for reshares
+ $reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $params['fileSource'], $user, true));
+ }
+ $users = $reshareUsers;
+ }
+ }
+ }
+ }
+
+}
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index 24ccd8c4609..8a5875b9ce6 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -43,7 +43,7 @@ if ($dir) {
} else {
$dirlisting = false;
- $query = \OC_DB::prepare('SELECT `id`,`location`,`timestamp`,`type`,`mime` FROM `*PREFIX*files_trash` WHERE user = ?');
+ $query = \OC_DB::prepare('SELECT `id`,`location`,`timestamp`,`type`,`mime` FROM `*PREFIX*files_trash` WHERE `user` = ?');
$result = $query->execute(array($user))->fetchAll();
}
diff --git a/apps/files_trashbin/l10n/de.php b/apps/files_trashbin/l10n/de.php
index b1c9e13defb..60a0e40d455 100644
--- a/apps/files_trashbin/l10n/de.php
+++ b/apps/files_trashbin/l10n/de.php
@@ -3,7 +3,7 @@
"Couldn't restore %s" => "Konnte %s nicht wiederherstellen",
"perform restore operation" => "Wiederherstellung ausführen",
"delete file permanently" => "Datei dauerhaft löschen",
-"Delete permanently" => "Permanent löschen",
+"Delete permanently" => "Endgültig löschen",
"Name" => "Name",
"Deleted" => "gelöscht",
"1 folder" => "1 Ordner",
diff --git a/apps/files_trashbin/l10n/de_DE.php b/apps/files_trashbin/l10n/de_DE.php
index 48d1425ded7..802a110fd18 100644
--- a/apps/files_trashbin/l10n/de_DE.php
+++ b/apps/files_trashbin/l10n/de_DE.php
@@ -13,5 +13,5 @@
"Nothing in here. Your trash bin is empty!" => "Nichts zu löschen, Ihr Papierkorb ist leer!",
"Restore" => "Wiederherstellen",
"Delete" => "Löschen",
-"Deleted Files" => "gelöschte Dateien"
+"Deleted Files" => "Gelöschte Dateien"
);
diff --git a/apps/files_trashbin/l10n/fa.php b/apps/files_trashbin/l10n/fa.php
index 879ee722a63..57ca6d10d6b 100644
--- a/apps/files_trashbin/l10n/fa.php
+++ b/apps/files_trashbin/l10n/fa.php
@@ -1,10 +1,17 @@
<?php $TRANSLATIONS = array(
+"Couldn't delete %s permanently" => "%s را نمی توان برای همیشه حذف کرد",
+"Couldn't restore %s" => "%s را نمی توان بازگرداند",
+"perform restore operation" => "انجام عمل بازگرداندن",
+"delete file permanently" => "حذف فایل برای همیشه",
"Delete permanently" => "حذف قطعی",
"Name" => "نام",
+"Deleted" => "حذف شده",
"1 folder" => "1 پوشه",
"{count} folders" => "{ شمار} پوشه ها",
"1 file" => "1 پرونده",
"{count} files" => "{ شمار } فایل ها",
+"Nothing in here. Your trash bin is empty!" => "هیچ چیزی اینجا نیست. سطل زباله ی شما خالی است.",
"Restore" => "بازیابی",
-"Delete" => "حذف"
+"Delete" => "حذف",
+"Deleted Files" => "فایلهای حذف شده"
);
diff --git a/apps/files_trashbin/l10n/hu_HU.php b/apps/files_trashbin/l10n/hu_HU.php
index 9c158c2b9ec..1d86190daa3 100644
--- a/apps/files_trashbin/l10n/hu_HU.php
+++ b/apps/files_trashbin/l10n/hu_HU.php
@@ -12,5 +12,6 @@
"{count} files" => "{count} fájl",
"Nothing in here. Your trash bin is empty!" => "Itt nincs semmi. Az Ön szemetes mappája üres!",
"Restore" => "Visszaállítás",
-"Delete" => "Törlés"
+"Delete" => "Törlés",
+"Deleted Files" => "Törölt fájlok"
);
diff --git a/apps/files_trashbin/l10n/zh_CN.php b/apps/files_trashbin/l10n/zh_CN.php
index 17bbe93f2b5..c2cc1f123e2 100644
--- a/apps/files_trashbin/l10n/zh_CN.php
+++ b/apps/files_trashbin/l10n/zh_CN.php
@@ -1,9 +1,17 @@
<?php $TRANSLATIONS = array(
+"Couldn't delete %s permanently" => "无法彻底删除文件%s",
+"Couldn't restore %s" => "无法恢复%s",
+"perform restore operation" => "执行恢复操作",
+"delete file permanently" => "彻底删除文件",
+"Delete permanently" => "永久删除",
"Name" => "名称",
+"Deleted" => "已删除",
"1 folder" => "1个文件夹",
"{count} folders" => "{count} 个文件夹",
"1 file" => "1 个文件",
"{count} files" => "{count} 个文件",
+"Nothing in here. Your trash bin is empty!" => "这里没有东西. 你的回收站是空的!",
+"Restore" => "恢复",
"Delete" => "删除",
"Deleted Files" => "已删除文件"
);
diff --git a/apps/files_trashbin/l10n/zh_HK.php b/apps/files_trashbin/l10n/zh_HK.php
new file mode 100644
index 00000000000..6967e190355
--- /dev/null
+++ b/apps/files_trashbin/l10n/zh_HK.php
@@ -0,0 +1,4 @@
+<?php $TRANSLATIONS = array(
+"Name" => "名稱",
+"Delete" => "刪除"
+);
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php
index 2fc8a8bc3c6..33abe608d8f 100644
--- a/apps/files_trashbin/lib/trash.php
+++ b/apps/files_trashbin/lib/trash.php
@@ -64,7 +64,7 @@ class Trashbin {
$trashbinSize += self::copy_recursive($file_path, 'files_trashbin/files/'.$deleted.'.d'.$timestamp, $view);
if ( $view->file_exists('files_trashbin/files/'.$deleted.'.d'.$timestamp) ) {
- $query = \OC_DB::prepare("INSERT INTO *PREFIX*files_trash (id,timestamp,location,type,mime,user) VALUES (?,?,?,?,?,?)");
+ $query = \OC_DB::prepare("INSERT INTO *PREFIX*files_trash (`id`,`timestamp`,`location`,`type`,`mime`,`user`) VALUES (?,?,?,?,?,?)");
$result = $query->execute(array($deleted, $timestamp, $location, $type, $mime, $user));
if ( !$result ) { // if file couldn't be added to the database than also don't store it in the trash bin.
$view->deleteAll('files_trashbin/files/'.$deleted.'.d'.$timestamp);
@@ -144,8 +144,8 @@ class Trashbin {
$trashbinSize = self::calculateSize(new \OC\Files\View('/'. $user.'/files_trashbin'));
}
if ( $timestamp ) {
- $query = \OC_DB::prepare('SELECT location,type FROM *PREFIX*files_trash'
- .' WHERE user=? AND id=? AND timestamp=?');
+ $query = \OC_DB::prepare('SELECT `location`,`type` FROM *PREFIX*files_trash'
+ .' WHERE `user`=? AND `id`=? AND `timestamp`=?');
$result = $query->execute(array($user,$filename,$timestamp))->fetchAll();
if ( count($result) != 1 ) {
\OC_Log::write('files_trashbin', 'trash bin database inconsistent!', \OC_Log::ERROR);
@@ -228,7 +228,7 @@ class Trashbin {
}
if ( $timestamp ) {
- $query = \OC_DB::prepare('DELETE FROM *PREFIX*files_trash WHERE user=? AND id=? AND timestamp=?');
+ $query = \OC_DB::prepare('DELETE FROM *PREFIX*files_trash WHERE `user`=? AND `id`=? AND `timestamp`=?');
$query->execute(array($user,$filename,$timestamp));
}
@@ -259,7 +259,7 @@ class Trashbin {
}
if ( $timestamp ) {
- $query = \OC_DB::prepare('DELETE FROM *PREFIX*files_trash WHERE user=? AND id=? AND timestamp=?');
+ $query = \OC_DB::prepare('DELETE FROM *PREFIX*files_trash WHERE `user`=? AND `id`=? AND `timestamp`=?');
$query->execute(array($user,$filename,$timestamp));
$file = $filename.'.d'.$timestamp;
} else {
@@ -344,7 +344,7 @@ class Trashbin {
$view = new \OC\Files\View('/'.$user);
$size = 0;
- $query = \OC_DB::prepare('SELECT location,type,id,timestamp FROM *PREFIX*files_trash WHERE user=?');
+ $query = \OC_DB::prepare('SELECT `location`,`type`,`id`,`timestamp` FROM *PREFIX*files_trash WHERE `user`=?');
$result = $query->execute(array($user))->fetchAll();
$retention_obligation = \OC_Config::getValue('trashbin_retention_obligation',
@@ -362,8 +362,8 @@ class Trashbin {
$availableSpace = $availableSpace + $size;
// if size limit for trash bin reached, delete oldest files in trash bin
if ($availableSpace < 0) {
- $query = \OC_DB::prepare('SELECT location,type,id,timestamp FROM *PREFIX*files_trash'
- .' WHERE user=? ORDER BY timestamp ASC');
+ $query = \OC_DB::prepare('SELECT `location`,`type`,`id`,`timestamp` FROM *PREFIX*files_trash'
+ .' WHERE `user`=? ORDER BY `timestamp` ASC');
$result = $query->execute(array($user))->fetchAll();
$length = count($result);
$i = 0;
@@ -490,7 +490,7 @@ class Trashbin {
* @return mixed trash bin size or false if no trash bin size is stored
*/
private static function getTrashbinSize($user) {
- $query = \OC_DB::prepare('SELECT size FROM *PREFIX*files_trashsize WHERE user=?');
+ $query = \OC_DB::prepare('SELECT `size` FROM *PREFIX*files_trashsize WHERE `user`=?');
$result = $query->execute(array($user))->fetchAll();
if ($result) {
@@ -507,9 +507,9 @@ class Trashbin {
*/
private static function setTrashbinSize($user, $size) {
if ( self::getTrashbinSize($user) === false) {
- $query = \OC_DB::prepare('INSERT INTO *PREFIX*files_trashsize (size, user) VALUES (?, ?)');
+ $query = \OC_DB::prepare('INSERT INTO *PREFIX*files_trashsize (`size`, `user`) VALUES (?, ?)');
}else {
- $query = \OC_DB::prepare('UPDATE *PREFIX*files_trashsize SET size=? WHERE user=?');
+ $query = \OC_DB::prepare('UPDATE *PREFIX*files_trashsize SET `size`=? WHERE `user`=?');
}
$query->execute(array($size, $user));
}
diff --git a/apps/files_versions/l10n/fr.php b/apps/files_versions/l10n/fr.php
index 76ad8fc97a6..e2698c5c4aa 100644
--- a/apps/files_versions/l10n/fr.php
+++ b/apps/files_versions/l10n/fr.php
@@ -6,5 +6,6 @@
"File %s could not be reverted to version %s" => "Le fichier %s ne peut être restauré dans sa version %s",
"No old versions available" => "Aucune ancienne version n'est disponible",
"No path specified" => "Aucun chemin spécifié",
+"Versions" => "Versions",
"Revert a file to a previous version by clicking on its revert button" => "Restaurez un fichier dans une version antérieure en cliquant sur son bouton de restauration"
);
diff --git a/apps/files_versions/l10n/sl.php b/apps/files_versions/l10n/sl.php
index d6dfbee6aaf..2df00fc8264 100644
--- a/apps/files_versions/l10n/sl.php
+++ b/apps/files_versions/l10n/sl.php
@@ -3,7 +3,7 @@
"success" => "uspešno",
"File %s was reverted to version %s" => "Datoteka %s je povrnjena na različico %s.",
"failure" => "spodletelo",
-"File %s could not be reverted to version %s" => "Datoteka %s ni mogoče povrniti na različico %s.",
+"File %s could not be reverted to version %s" => "Datoteke %s ni mogoče povrniti na različico %s.",
"No old versions available" => "Ni starejših različic.",
"No path specified" => "Ni določene poti",
"Versions" => "Različice",
diff --git a/apps/files_versions/l10n/zh_HK.php b/apps/files_versions/l10n/zh_HK.php
new file mode 100644
index 00000000000..71bd3bbbd94
--- /dev/null
+++ b/apps/files_versions/l10n/zh_HK.php
@@ -0,0 +1,6 @@
+<?php $TRANSLATIONS = array(
+"success" => "成功",
+"failure" => "失敗",
+"No old versions available" => "沒有以往版本",
+"Versions" => "版本"
+);
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 20611c61ec7..6da0e434541 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -53,7 +53,7 @@ class Storage {
* @return mixed versions size or false if no versions size is stored
*/
private static function getVersionsSize($user) {
- $query = \OC_DB::prepare('SELECT size FROM *PREFIX*files_versions WHERE user=?');
+ $query = \OC_DB::prepare('SELECT `size` FROM *PREFIX*files_versions WHERE `user`=?');
$result = $query->execute(array($user))->fetchAll();
if ($result) {
@@ -70,9 +70,9 @@ class Storage {
*/
private static function setVersionsSize($user, $size) {
if ( self::getVersionsSize($user) === false) {
- $query = \OC_DB::prepare('INSERT INTO *PREFIX*files_versions (size, user) VALUES (?, ?)');
+ $query = \OC_DB::prepare('INSERT INTO *PREFIX*files_versions (`size`, `user`) VALUES (?, ?)');
}else {
- $query = \OC_DB::prepare('UPDATE *PREFIX*files_versions SET size=? WHERE user=?');
+ $query = \OC_DB::prepare('UPDATE *PREFIX*files_versions SET `size`=? WHERE `user`=?');
}
$query->execute(array($size, $user));
}
@@ -156,11 +156,18 @@ class Storage {
/**
* rename versions of a file
*/
- public static function rename($oldpath, $newpath) {
- list($uid, $oldpath) = self::getUidAndFilename($oldpath);
- list($uidn, $newpath) = self::getUidAndFilename($newpath);
+ public static function rename($old_path, $new_path) {
+ list($uid, $oldpath) = self::getUidAndFilename($old_path);
+ list($uidn, $newpath) = self::getUidAndFilename($new_path);
$versions_view = new \OC\Files\View('/'.$uid .'/files_versions');
$files_view = new \OC\Files\View('/'.$uid .'/files');
+
+ // if the file already exists than it was a upload of a existing file
+ // over the web interface -> store() is the right function we need here
+ if ($files_view->file_exists($newpath)) {
+ return self::store($new_path);
+ }
+
$abs_newpath = $versions_view->getLocalFile($newpath);
if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) {
diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version
index e619108dd63..60a2d3e96c8 100644
--- a/apps/user_ldap/appinfo/version
+++ b/apps/user_ldap/appinfo/version
@@ -1 +1 @@
-0.3.9.5 \ No newline at end of file
+0.4.0 \ No newline at end of file
diff --git a/apps/user_ldap/l10n/de.php b/apps/user_ldap/l10n/de.php
index 6217a6d4821..399bfdc037a 100644
--- a/apps/user_ldap/l10n/de.php
+++ b/apps/user_ldap/l10n/de.php
@@ -48,6 +48,7 @@
"Turn off SSL certificate validation." => "Schalte die SSL-Zertifikatsprüfung aus.",
"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Falls die Verbindung es erfordert, muss das SSL-Zertifikat des LDAP-Server importiert werden.",
"Not recommended, use for testing only." => "Nicht empfohlen, nur zu Testzwecken.",
+"Cache Time-To-Live" => "Speichere Time-To-Live zwischen",
"in seconds. A change empties the cache." => "in Sekunden. Eine Änderung leert den Cache.",
"Directory Settings" => "Ordnereinstellungen",
"User Display Name Field" => "Feld für den Anzeigenamen des Benutzers",
@@ -63,7 +64,12 @@
"Group Search Attributes" => "Gruppensucheigenschaften",
"Group-Member association" => "Assoziation zwischen Gruppe und Benutzer",
"Special Attributes" => "Spezielle Eigenschaften",
+"Quota Field" => "Kontingent Feld",
+"Quota Default" => "Kontingent Standard",
"in bytes" => "in Bytes",
+"Email Field" => "E-Mail Feld",
+"User Home Folder Naming Rule" => "Benennungsregel für das Heimatverzeichnis des Benutzers",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Ohne Eingabe wird der Benutzername (Standard) verwendet. Anderenfall trage ein LDAP/AD-Attribut ein.",
+"Test Configuration" => "Testkonfiguration",
"Help" => "Hilfe"
);
diff --git a/apps/user_ldap/l10n/es_AR.php b/apps/user_ldap/l10n/es_AR.php
index b0e7ec12b21..c8aec0cd41b 100644
--- a/apps/user_ldap/l10n/es_AR.php
+++ b/apps/user_ldap/l10n/es_AR.php
@@ -48,6 +48,7 @@
"Turn off SSL certificate validation." => "Desactivar la validación por certificado SSL.",
"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Si la conexión sólo funciona con esta opción, importá el certificado SSL del servidor LDAP en tu servidor ownCloud.",
"Not recommended, use for testing only." => "No recomendado, sólo para pruebas.",
+"Cache Time-To-Live" => "Tiempo de vida del caché",
"in seconds. A change empties the cache." => "en segundos. Cambiarlo vacía la cache.",
"Directory Settings" => "Configuración de Directorio",
"User Display Name Field" => "Campo de nombre de usuario a mostrar",
@@ -63,7 +64,12 @@
"Group Search Attributes" => "Atributos de búsqueda de grupo",
"Group-Member association" => "Asociación Grupo-Miembro",
"Special Attributes" => "Atributos Especiales",
+"Quota Field" => "Campo de cuota",
+"Quota Default" => "Cuota por defecto",
"in bytes" => "en bytes",
+"Email Field" => "Campo de e-mail",
+"User Home Folder Naming Rule" => "Regla de nombre de los directorios de usuario",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Vacío para el nombre de usuario (por defecto). En otro caso, especificá un atributo LDAP/AD.",
+"Test Configuration" => "Probar configuración",
"Help" => "Ayuda"
);
diff --git a/apps/user_ldap/l10n/fa.php b/apps/user_ldap/l10n/fa.php
index 7816ef7c6f7..9a01a67703d 100644
--- a/apps/user_ldap/l10n/fa.php
+++ b/apps/user_ldap/l10n/fa.php
@@ -11,6 +11,7 @@
"Add Server Configuration" => "افزودن پیکربندی سرور",
"Host" => "میزبانی",
"Password" => "رمز عبور",
+"Group Filter" => "فیلتر گروه",
"Port" => "درگاه",
"in bytes" => "در بایت",
"Help" => "راه‌نما"
diff --git a/apps/user_ldap/l10n/fr.php b/apps/user_ldap/l10n/fr.php
index abe13635698..990658e147e 100644
--- a/apps/user_ldap/l10n/fr.php
+++ b/apps/user_ldap/l10n/fr.php
@@ -48,6 +48,7 @@
"Turn off SSL certificate validation." => "Désactiver la validation du certificat SSL.",
"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Si la connexion ne fonctionne qu'avec cette option, importez le certificat SSL du serveur LDAP dans le serveur ownCloud.",
"Not recommended, use for testing only." => "Non recommandé, utilisation pour tests uniquement.",
+"Cache Time-To-Live" => "Durée de vie du cache",
"in seconds. A change empties the cache." => "en secondes. Tout changement vide le cache.",
"Directory Settings" => "Paramètres du répertoire",
"User Display Name Field" => "Champ \"nom d'affichage\" de l'utilisateur",
@@ -63,7 +64,12 @@
"Group Search Attributes" => "Recherche des attributs du groupe",
"Group-Member association" => "Association groupe-membre",
"Special Attributes" => "Attributs spéciaux",
+"Quota Field" => "Champ du quota",
+"Quota Default" => "Quota par défaut",
"in bytes" => "en octets",
+"Email Field" => "Champ Email",
+"User Home Folder Naming Rule" => "Convention de nommage du répertoire utilisateur",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Laisser vide ",
+"Test Configuration" => "Tester la configuration",
"Help" => "Aide"
);
diff --git a/apps/user_ldap/l10n/sl.php b/apps/user_ldap/l10n/sl.php
index 9508d495578..8ff1fd53440 100644
--- a/apps/user_ldap/l10n/sl.php
+++ b/apps/user_ldap/l10n/sl.php
@@ -1,15 +1,24 @@
<?php $TRANSLATIONS = array(
"Failed to delete the server configuration" => "Brisanje nastavitev strežnika je spodletelo.",
+"The configuration is valid and the connection could be established!" => "Nastavitev je veljavna, zato je povezavo mogoče vzpostaviti!",
+"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Nastavitev je veljavna, vendar pa je vez Bind spodletela. Preveriti je treba nastavitve strežnika in ustreznost poveril.",
+"The configuration is invalid. Please look in the ownCloud log for further details." => "Nastavitev je veljavna. Več podrobnosti je zapisanih v dnevniku ownCloud.",
"Deletion failed" => "Brisanje je spodletelo.",
+"Take over settings from recent server configuration?" => "Ali naj se prevzame nastavitve nedavne nastavitve strežnika?",
"Keep settings?" => "Ali nas se nastavitve ohranijo?",
+"Cannot add server configuration" => "Ni mogoče dodati nastavitev strežnika",
+"Connection test succeeded" => "Preizkus povezave je uspešno končan.",
+"Connection test failed" => "Preizkus povezave je spodletel.",
"Do you really want to delete the current Server Configuration?" => "Ali res želite izbrisati trenutne nastavitve strežnika?",
"Confirm Deletion" => "Potrdi brisanje",
"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Opozorilo:</b> možnosti user_ldap in user_webdavauth nista združljivi. Pri uporabi je mogoče nepričakovano obnašanje sistema. Eno izmed možnosti je priporočeno onemgočiti.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Opozorilo:</b> modul PHP LDAP mora biti nameščen, sicer vmesnik ne bo deloval. Paket je treba namestiti.",
+"Server configuration" => "Nastavitev strežnika",
"Add Server Configuration" => "Dodaj nastavitve strežnika",
"Host" => "Gostitelj",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokol je lahko izpuščen, če ni posebej zahtevan SSL. V tem primeru se mora naslov začeti z ldaps://",
"Base DN" => "Osnovni DN",
+"One Base DN per line" => "En osnovni DN na vrstico",
"You can specify Base DN for users and groups in the Advanced tab" => "Osnovni DN za uporabnike in skupine lahko določite v zavihku naprednih možnosti.",
"User DN" => "Uporabnik 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 uporabnikovega odjemalca, s katerim naj se opravi vezava, npr. uid=agent,dc=example,dc=com. Za brezimni dostop sta polji DN in geslo prazni.",
@@ -25,19 +34,29 @@
"Defines the filter to apply, when retrieving groups." => "Določi filter za uporabo med pridobivanjem skupin.",
"without any placeholder, e.g. \"objectClass=posixGroup\"." => "Brez katerekoli vsebnika, npr. \"objectClass=posixGroup\".",
"Connection Settings" => "Nastavitve povezave",
+"Configuration Active" => "Dejavna nastavitev",
+"When unchecked, this configuration will be skipped." => "Neizbrana možnost preskoči nastavitev.",
"Port" => "Vrata",
+"Backup (Replica) Host" => "Varnostna kopija (replika) podatkov gostitelja",
+"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Podati je treba izbirno varnostno kopijo gostitelja. Ta mora biti natančna replika strežnika LDAP/AD.",
+"Backup (Replica) Port" => "Varnostna kopija (replika) podatka vrat",
"Disable Main Server" => "Onemogoči glavni strežnik",
+"When switched on, ownCloud will only connect to the replica server." => "Ob priklopu bo strežnik ownCloud povezan le s kopijo (repliko) strežnika.",
"Use TLS" => "Uporabi TLS",
+"Do not use it additionally for LDAPS connections, it will fail." => "Strežnika ni priporočljivo uporabljati za povezave LDAPS. Povezava bo spodletela.",
"Case insensitve LDAP server (Windows)" => "Strežnik LDAP ne upošteva velikosti črk (Windows)",
"Turn off SSL certificate validation." => "Onemogoči določanje veljavnosti potrdila SSL.",
"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Kadar deluje povezava le s to možnostjo, uvozite potrdilo SSL iz strežnika LDAP na vaš strežnik ownCloud.",
"Not recommended, use for testing only." => "Dejanje ni priporočeno; uporabljeno naj bo le za preizkušanje delovanja.",
+"Cache Time-To-Live" => "Predpomni podatke TTL",
"in seconds. A change empties the cache." => "v sekundah. Sprememba izprazni predpomnilnik.",
"Directory Settings" => "Nastavitve mape",
"User Display Name Field" => "Polje za uporabnikovo prikazano ime",
"The LDAP attribute to use to generate the user`s ownCloud name." => "Atribut LDAP, uporabljen pri ustvarjanju uporabniških imen ownCloud.",
"Base User Tree" => "Osnovno uporabniško drevo",
"One User Base DN per line" => "Eno osnovno uporabniško ime DN na vrstico",
+"User Search Attributes" => "Uporabi atribute iskanja",
+"Optional; one attribute per line" => "Izbirno; en atribut na vrstico",
"Group Display Name Field" => "Polje za prikazano ime skupine",
"The LDAP attribute to use to generate the groups`s ownCloud name." => "Atribut LDAP, uporabljen pri ustvarjanju imen skupin ownCloud.",
"Base Group Tree" => "Osnovno drevo skupine",
@@ -49,6 +68,7 @@
"Quota Default" => "Privzeta količinska omejitev",
"in bytes" => "v bajtih",
"Email Field" => "Polje elektronske pošte",
+"User Home Folder Naming Rule" => "Pravila poimenovanja uporabniške osebne mape",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Pustite prazno za uporabniško ime (privzeto), sicer navedite atribut LDAP/AD.",
"Test Configuration" => "Preizkusne nastavitve",
"Help" => "Pomoč"
diff --git a/apps/user_ldap/l10n/zh_CN.php b/apps/user_ldap/l10n/zh_CN.php
index d494945e2e4..1911734805f 100644
--- a/apps/user_ldap/l10n/zh_CN.php
+++ b/apps/user_ldap/l10n/zh_CN.php
@@ -1,9 +1,24 @@
<?php $TRANSLATIONS = array(
+"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 日志。",
"Deletion failed" => "删除失败",
+"Take over settings from recent server configuration?" => "从近期的服务器配置中导入设置?",
+"Keep settings?" => "保留设置吗?",
+"Cannot add server configuration" => "无法添加服务器配置",
+"Connection test succeeded" => "连接测试成功",
+"Connection test failed" => "连接测试失败",
+"Do you really want to delete the current Server Configuration?" => "您真的想要删除当前服务器配置吗?",
+"Confirm Deletion" => "确认删除",
"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>警告:</b>应用 user_ldap 和 user_webdavauth 不兼容。您可能遭遇未预料的行为。请垂询您的系统管理员禁用其中一个。",
+"<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://开头",
"Base DN" => "Base DN",
+"One Base DN per line" => "每行一个基本判别名",
"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\n如需匿名访问,将DN和密码保留为空",
@@ -18,21 +33,43 @@
"Group Filter" => "组过滤",
"Defines the filter to apply, when retrieving groups." => "定义拉取组信息时的过滤器",
"without any placeholder, e.g. \"objectClass=posixGroup\"." => "无需占位符,例如\"objectClass=posixGroup\"",
+"Connection Settings" => "连接设置",
+"Configuration Active" => "现行配置",
+"When unchecked, this configuration will be skipped." => "当反选后,此配置将被忽略。",
"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" => "备份 (镜像) 端口",
+"Disable Main Server" => "禁用主服务器",
+"When switched on, ownCloud will only connect to the replica server." => "当开启后,ownCloud 将仅连接到镜像服务器。",
"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证书验证",
"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "如果链接仅在此选项时可用,在您的ownCloud服务器中导入LDAP服务器的SSL证书。",
"Not recommended, use for testing only." => "暂不推荐,仅供测试",
+"Cache Time-To-Live" => "缓存存活时间",
"in seconds. A change empties the cache." => "以秒计。修改将清空缓存。",
+"Directory Settings" => "目录设置",
"User Display Name Field" => "用户显示名称字段",
"The LDAP attribute to use to generate the user`s ownCloud name." => "用来生成用户的ownCloud名称的 LDAP属性",
"Base User Tree" => "基础用户树",
+"One User Base DN per line" => "每行一个用户基准判别名",
+"User Search Attributes" => "用户搜索属性",
+"Optional; one attribute per line" => "可选;每行一个属性",
"Group Display Name Field" => "组显示名称字段",
"The LDAP attribute to use to generate the groups`s ownCloud name." => "用来生成组的ownCloud名称的LDAP属性",
"Base Group Tree" => "基础组树",
+"One Group Base DN per line" => "每行一个群组基准判别名",
+"Group Search Attributes" => "群组搜索属性",
"Group-Member association" => "组成员关联",
+"Special Attributes" => "特殊属性",
+"Quota Field" => "配额字段",
+"Quota Default" => "默认配额",
"in bytes" => "字节数",
+"Email Field" => "电邮字段",
+"User Home Folder Naming Rule" => "用户主目录命名规则",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "将用户名称留空(默认)。否则指定一个LDAP/AD属性",
+"Test Configuration" => "测试配置",
"Help" => "帮助"
);
diff --git a/apps/user_ldap/l10n/zh_HK.php b/apps/user_ldap/l10n/zh_HK.php
new file mode 100644
index 00000000000..190e4eba798
--- /dev/null
+++ b/apps/user_ldap/l10n/zh_HK.php
@@ -0,0 +1,5 @@
+<?php $TRANSLATIONS = array(
+"Password" => "密碼",
+"Port" => "連接埠",
+"Help" => "幫助"
+);
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index a8cfd45bf4d..90d026962db 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -84,7 +84,7 @@ abstract class Access {
for($i=0;$i<$result[$attr]['count'];$i++) {
if($this->resemblesDN($attr)) {
$values[] = $this->sanitizeDN($result[$attr][$i]);
- } elseif(strtolower($attr) == 'objectguid') {
+ } elseif(strtolower($attr) == 'objectguid' || strtolower($attr) == 'guid') {
$values[] = $this->convertObjectGUID2Str($result[$attr][$i]);
} else {
$values[] = $result[$attr][$i];
@@ -895,7 +895,7 @@ abstract class Access {
}
//for now, supported (known) attributes are entryUUID, nsuniqueid, objectGUID
- $testAttributes = array('entryuuid', 'nsuniqueid', 'objectguid');
+ $testAttributes = array('entryuuid', 'nsuniqueid', 'objectguid', 'guid');
foreach($testAttributes as $attribute) {
\OCP\Util::writeLog('user_ldap', 'Testing '.$attribute.' as UUID attr', \OCP\Util::DEBUG);