diff options
Diffstat (limited to 'apps')
33 files changed, 204 insertions, 128 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 07977f5ddf1..9031c729eff 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -48,7 +48,7 @@ $totalSize = 0; foreach ($files['size'] as $size) { $totalSize += $size; } -if ($totalSize > \OC\Files\Filesystem::free_space($dir)) { +if ($totalSize > $maxUploadFilesize) { OCP\JSON::error(array('data' => array('message' => $l->t('Not enough storage available'), 'uploadMaxFilesize' => $maxUploadFilesize, 'maxHumanFilesize' => $maxHumanFilesize))); diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index e2af33da77f..e8d65ccb3e5 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -60,6 +60,7 @@ "Text file" => "Fichier texte", "Folder" => "Dossier", "From link" => "Depuis le lien", +"Deleted files" => "Fichiers supprimés", "Cancel upload" => "Annuler l'envoi", "Nothing in here. Upload something!" => "Il n'y a rien ici ! Envoyez donc quelque chose :)", "Download" => "Télécharger", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index 381325d113c..a92ec933b22 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -60,6 +60,7 @@ "Text file" => "Tekstbestand", "Folder" => "Map", "From link" => "Vanaf link", +"Deleted files" => "Verwijderde bestanden", "Cancel upload" => "Upload afbreken", "Nothing in here. Upload something!" => "Er bevindt zich hier niets. Upload een bestand!", "Download" => "Download", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index 83091bad18c..d68a871a7d7 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -10,6 +10,7 @@ "No file was uploaded" => "Nie przesłano żadnego pliku", "Missing a temporary folder" => "Brak katalogu tymczasowego", "Failed to write to disk" => "Błąd zapisu na dysk", +"Not enough storage available" => "Za mało miejsca", "Invalid directory." => "Zła ścieżka.", "Files" => "Pliki", "Delete" => "Usuwa element", @@ -54,6 +55,7 @@ "Text file" => "Plik tekstowy", "Folder" => "Katalog", "From link" => "Z linku", +"Deleted files" => "Pliki usnięte", "Cancel upload" => "Przestań wysyłać", "Nothing in here. Upload something!" => "Brak zawartości. Proszę wysłać pliki!", "Download" => "Pobiera element", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index f6943f1f4d1..3dbc8ec7a22 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -10,8 +10,10 @@ "No file was uploaded" => "Hiç dosya yüklenmedi", "Missing a temporary folder" => "Geçici bir klasör eksik", "Failed to write to disk" => "Diske yazılamadı", +"Not enough storage available" => "Yeterli disk alanı yok", "Invalid directory." => "Geçersiz dizin.", "Files" => "Dosyalar", +"Delete permanently" => "Kalıcı olarak sil", "Delete" => "Sil", "Rename" => "İsim değiştir.", "Pending" => "Bekliyor", @@ -22,9 +24,12 @@ "replaced {new_name}" => "değiştirilen {new_name}", "undo" => "geri al", "replaced {new_name} with {old_name}" => "{new_name} ismi {old_name} ile değiştirildi", +"perform delete operation" => "Silme işlemini gerçekleştir", "'.' is an invalid file name." => "'.' geçersiz dosya adı.", "File name cannot be empty." => "Dosya adı boş olamaz.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Geçersiz isim, '\\', '/', '<', '>', ':', '\"', '|', '?' ve '*' karakterlerine izin verilmemektedir.", +"Your storage is full, files can not be updated or synced anymore!" => "Depolama alanınız dolu, artık dosyalar güncellenmeyecek yada senkronizasyon edilmeyecek.", +"Your storage is almost full ({usedSpacePercent}%)" => "Depolama alanınız neredeyse dolu ({usedSpacePercent}%)", "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.", "Unable to upload your file as it is a directory or has 0 bytes" => "Dosyanızın boyutu 0 byte olduğundan veya bir dizin olduğundan yüklenemedi", "Upload Error" => "Yükleme hatası", @@ -55,6 +60,7 @@ "Text file" => "Metin dosyası", "Folder" => "Klasör", "From link" => "Bağlantıdan", +"Deleted files" => "Dosyalar silindi", "Cancel upload" => "Yüklemeyi iptal et", "Nothing in here. Upload something!" => "Burada hiçbir şey yok. Birşeyler yükleyin!", "Download" => "İndir", @@ -62,5 +68,6 @@ "Upload too large" => "Yüklemeniz çok büyük", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Yüklemeye çalıştığınız dosyalar bu sunucudaki maksimum yükleme boyutunu aşıyor.", "Files are being scanned, please wait." => "Dosyalar taranıyor, lütfen bekleyin.", -"Current scanning" => "Güncel tarama" +"Current scanning" => "Güncel tarama", +"Upgrading filesystem cache..." => "Sistem dosyası önbelleği güncelleniyor" ); diff --git a/apps/files/l10n/uk.php b/apps/files/l10n/uk.php index 7e499e6c2c8..20eb355e42d 100644 --- a/apps/files/l10n/uk.php +++ b/apps/files/l10n/uk.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Не вдалося перемістити %s - Файл з таким ім'ям вже існує", +"Could not move %s" => "Не вдалося перемістити %s", +"Unable to rename file" => "Не вдалося перейменувати файл", "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: " => "Розмір звантаження перевищує upload_max_filesize параметра в php.ini: ", @@ -7,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" => "Видалити назавжди", @@ -56,6 +60,7 @@ "Text file" => "Текстовий файл", "Folder" => "Папка", "From link" => "З посилання", +"Deleted files" => "Видалено файлів", "Cancel upload" => "Перервати завантаження", "Nothing in here. Upload something!" => "Тут нічого немає. Відвантажте що-небудь!", "Download" => "Завантажити", diff --git a/apps/files_encryption/l10n/tr.php b/apps/files_encryption/l10n/tr.php index 0868d0a6905..6b42c757e65 100644 --- a/apps/files_encryption/l10n/tr.php +++ b/apps/files_encryption/l10n/tr.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( "Encryption" => "Şifreleme", +"File encryption is enabled." => "Dosya şifreleme aktif.", +"The following file types will not be encrypted:" => "Belirtilen dosya tipleri şifrelenmeyecek:", +"Exclude the following file types from encryption:" => "Seçilen dosya tiplerini şifreleme:", "None" => "Hiçbiri" ); diff --git a/apps/files_encryption/l10n/uk.php b/apps/files_encryption/l10n/uk.php index 8236c5afefd..d4957141191 100644 --- a/apps/files_encryption/l10n/uk.php +++ b/apps/files_encryption/l10n/uk.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( "Encryption" => "Шифрування", +"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_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php index 7794238ab36..43fd6752c4a 100644 --- a/apps/files_external/ajax/addRootCertificate.php +++ b/apps/files_external/ajax/addRootCertificate.php @@ -37,5 +37,5 @@ if ( $isValid ) { OCP\Util::WARN); } -header('Location: settings/personal.php'); +header('Location:' . OCP\Util::linkToRoute( "settings_personal" )); exit; diff --git a/apps/files_external/l10n/tr.php b/apps/files_external/l10n/tr.php index e9a045aab57..bbe6f5b6bec 100644 --- a/apps/files_external/l10n/tr.php +++ b/apps/files_external/l10n/tr.php @@ -1,4 +1,8 @@ <?php $TRANSLATIONS = array( +"Access granted" => "Giriş kabul edildi", +"Grant access" => "Erişim sağlandı", +"Fill out all required fields" => "Doldurulması zorunlu alanları doldur", +"Please provide a valid Dropbox app key and secret." => "Lütfen Dropbox app key ve secret temin ediniz", "External Storage" => "Harici Depolama", "Mount point" => "Bağlama Noktası", "Backend" => "Yönetici", @@ -11,6 +15,8 @@ "Groups" => "Gruplar", "Users" => "Kullanıcılar", "Delete" => "Sil", +"Enable User External Storage" => "Kullanıcılar için Harici Depolamayı Etkinleştir", +"Allow users to mount their own external storage" => "Kullanıcıların kendi harici depolamalarını bağlamalarına izin ver", "SSL root certificates" => "SSL kök sertifikaları", "Import Root Certificate" => "Kök Sertifikalarını İçe Aktar" ); diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index 494885a1dd3..37e53a3a670 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -229,11 +229,6 @@ class AmazonS3 extends \OC\Files\Storage\Common { return false; } - public function free_space($path) { - // Infinite? - return false; - } - public function touch($path, $mtime = null) { if (is_null($mtime)) { $mtime = time(); diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index a3d1da68845..d31c2f35a68 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -279,13 +279,21 @@ class OC_Mount_Config { * @return array */ private static function readData($isPersonal) { + $parser = new \OC\ArrayParser(); if ($isPersonal) { - $file = OC_User::getHome(OCP\User::getUser()).'/mount.php'; + $phpFile = OC_User::getHome(OCP\User::getUser()).'/mount.php'; + $jsonFile = OC_User::getHome(OCP\User::getUser()).'/mount.json'; } else { - $file = OC::$SERVERROOT.'/config/mount.php'; + $phpFile = OC::$SERVERROOT.'/config/mount.php'; + $jsonFile = OC::$SERVERROOT.'/config/mount.json'; } - if (is_file($file)) { - $mountPoints = include $file; + if (is_file($jsonFile)) { + $mountPoints = json_decode(file_get_contents($jsonFile), true); + if (is_array($mountPoints)) { + return $mountPoints; + } + } elseif (is_file($phpFile)) { + $mountPoints = $parser->parsePHP(file_get_contents($phpFile)); if (is_array($mountPoints)) { return $mountPoints; } @@ -300,39 +308,11 @@ class OC_Mount_Config { */ private static function writeData($isPersonal, $data) { if ($isPersonal) { - $file = OC_User::getHome(OCP\User::getUser()).'/mount.php'; + $file = OC_User::getHome(OCP\User::getUser()).'/mount.json'; } else { - $file = OC::$SERVERROOT.'/config/mount.php'; - } - $content = "<?php return array (\n"; - if (isset($data[self::MOUNT_TYPE_GROUP])) { - $content .= "\t'group' => array (\n"; - foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) { - $content .= "\t\t'".$group."' => array (\n"; - foreach ($mounts as $mountPoint => $mount) { - $content .= "\t\t\t'".addcslashes($mountPoint, "'") - ."' => " - .str_replace("\n", '', var_export($mount, true)).", \n"; - - } - $content .= "\t\t),\n"; - } - $content .= "\t),\n"; - } - if (isset($data[self::MOUNT_TYPE_USER])) { - $content .= "\t'user' => array (\n"; - foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) { - $content .= "\t\t'".$user."' => array (\n"; - foreach ($mounts as $mountPoint => $mount) { - $content .= "\t\t\t'".addcslashes($mountPoint, "'") - ."' => " - .str_replace("\n", '', var_export($mount, true)).",\n"; - } - $content .= "\t\t),\n"; - } - $content .= "\t),\n"; + $file = OC::$SERVERROOT.'/config/mount.json'; } - $content .= ");\n?>"; + $content = json_encode($data); @file_put_contents($file, $content); } diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index 3527f50ec98..785eb7dfc42 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -242,10 +242,6 @@ class SFTP extends \OC\Files\Storage\Common { } } - public function free_space($path) { - return -1; - } - public function touch($path, $mtime=null) { try { if (!is_null($mtime)) return false; diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php index a631e7ce06a..4685877f26b 100644 --- a/apps/files_external/lib/streamwrapper.php +++ b/apps/files_external/lib/streamwrapper.php @@ -76,10 +76,6 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{ return fopen($this->constructUrl($path), $mode); } - public function free_space($path) { - return 0; - } - public function touch($path, $mtime=null) { $this->init(); if(is_null($mtime)) { diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 0fd6fa143b8..a00316c1f84 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -478,10 +478,6 @@ class SWIFT extends \OC\Files\Storage\Common{ } } - public function free_space($path) { - return 1024*1024*1024*8; - } - public function touch($path, $mtime=null) { $this->init(); $obj=$this->getObject($path); diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 039a07b1ef2..91cc22779e6 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -222,7 +222,7 @@ class DAV extends \OC\Files\Storage\Common{ return 0; } } catch(\Exception $e) { - return 0; + return \OC\Files\FREE_SPACE_UNKNOWN; } } diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index d7a4dd5150d..3709fd2e51d 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -18,7 +18,7 @@ <?php foreach ($_['mounts'] as $mountPoint => $mount): ?> <tr <?php echo ($mountPoint != '') ? 'class="'.$mount['class'].'"' : 'id="addMountPoint"'; ?>> <td class="mountPoint"><input type="text" name="mountPoint" - value="<?php echo $mountPoint; ?>" + value="<?php p($mountPoint); ?>" placeholder="<?php echo $l->t('Mount point'); ?>" /></td> <?php if ($mountPoint == ''): ?> <td class="backend"> diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php index 7a6bd1342ea..f41482bef55 100644 --- a/apps/files_trashbin/ajax/delete.php +++ b/apps/files_trashbin/ajax/delete.php @@ -15,7 +15,9 @@ if ($path_parts['dirname'] == '.') { $timestamp = null; } -if (OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp)) { +OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp); + +if (!OCA\Files_Trashbin\Trashbin::file_exists($filename)) { OCP\JSON::success(array("data" => array("filename" => $file))); } else { $l = OC_L10N::get('files_trashbin'); diff --git a/apps/files_trashbin/l10n/tr.php b/apps/files_trashbin/l10n/tr.php index 5b7064eceaf..cebe615a05f 100644 --- a/apps/files_trashbin/l10n/tr.php +++ b/apps/files_trashbin/l10n/tr.php @@ -1,7 +1,14 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "%s Kalıcı olarak silinemedi", +"Couldn't restore %s" => "%s Geri yüklenemedi", +"perform restore operation" => "Geri yükleme işlemini gerçekleştir", +"delete file permanently" => "Dosyayı kalıcı olarak sil", "Name" => "İsim", +"Deleted" => "Silindi", "1 folder" => "1 dizin", "{count} folders" => "{count} dizin", "1 file" => "1 dosya", -"{count} files" => "{count} dosya" +"{count} files" => "{count} dosya", +"Nothing in here. Your trash bin is empty!" => "Burası boş. Çöp kutun tamamen boş.", +"Restore" => "Geri yükle" ); diff --git a/apps/files_trashbin/l10n/uk.php b/apps/files_trashbin/l10n/uk.php index 14c6931255a..06474d9b2cd 100644 --- a/apps/files_trashbin/l10n/uk.php +++ b/apps/files_trashbin/l10n/uk.php @@ -1,7 +1,14 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "Неможливо видалити %s назавжди", +"Couldn't restore %s" => "Неможливо відновити %s", +"perform restore operation" => "виконати операцію відновлення", +"delete file permanently" => "видалити файл назавжди", "Name" => "Ім'я", +"Deleted" => "Видалено", "1 folder" => "1 папка", "{count} folders" => "{count} папок", "1 file" => "1 файл", -"{count} files" => "{count} файлів" +"{count} files" => "{count} файлів", +"Nothing in here. Your trash bin is empty!" => "Нічого немає. Ваший кошик для сміття пустий!", +"Restore" => "Відновити" ); diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php index 76844ca92e9..8d54a471b42 100644 --- a/apps/files_trashbin/lib/trash.php +++ b/apps/files_trashbin/lib/trash.php @@ -246,8 +246,27 @@ class Trashbin { return $size;
} - - + + /** + * check to see whether a file exists in trashbin + * @param $filename path to the file + * @param $timestamp of deletion time + * @return true if file exists, otherwise false + */ + public static function file_exists($filename, $timestamp=null) { + $user = \OCP\User::getUser(); + $view = new \OC_FilesystemView('/'.$user); + + if ($timestamp) { + $filename = $filename.'.d'.$timestamp; + } else { + $filename = $filename; + } + + $target = \OC_Filesystem::normalizePath('files_trashbin/'.$filename); + return $view->file_exists($target); + } + /**
* clean up the trash bin * @param max. available disk space for trashbin
@@ -396,6 +415,9 @@ class Trashbin { */
private static function calculateSize($view) {
$root = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath('');
+ if (!file_exists($root)) { + return 0; + } $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($root), \RecursiveIteratorIterator::CHILD_FIRST);
$size = 0;
diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index f7c6989ce2d..8e0356ada20 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -5,12 +5,11 @@ OC::$CLASSPATH['OCA\Files_Versions\Storage'] = 'apps/files_versions/lib/versions OC::$CLASSPATH['OCA\Files_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php'; OCP\App::registerAdmin('files_versions', 'settings'); -OCP\App::registerPersonal('files_versions', 'settings-personal'); OCP\Util::addscript('files_versions', 'versions'); // Listen to write signals OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\Files_Versions\Hooks", "write_hook"); // Listen to delete and rename signals -OCP\Util::connectHook('OC_Filesystem', 'post-delete', "OCA\Files_Versions\Hooks", "remove_hook"); +OCP\Util::connectHook('OC_Filesystem', 'post_delete', "OCA\Files_Versions\Hooks", "remove_hook"); OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook"); diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index b9c54689813..dec222eefce 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -41,6 +41,10 @@ $(document).ready(function(){ } }); +function goToVersionPage(url){ + window.location(url); +} + function createVersionsDropdown(filename, files) { var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ); @@ -51,7 +55,7 @@ function createVersionsDropdown(filename, files) { html += '<option value=""></option>'; html += '</select>'; html += '</div>'; - html += '<input type="button" value="All versions..." onclick="window.location=\''+historyUrl+'\'" name="makelink" id="makelink" />'; + html += '<input type="button" value="All versions..." name="makelink" id="makelink" />'; html += '<input id="link" style="display:none; width:90%;" />'; if (filename) { @@ -60,6 +64,10 @@ function createVersionsDropdown(filename, files) { } else { $(html).appendTo($('thead .share')); } + + $("#makelink").click(function() { + goToVersionPage(historyUrl); + }); $.ajax({ type: 'GET', diff --git a/apps/files_versions/l10n/tr.php b/apps/files_versions/l10n/tr.php index e9a4c4702e1..3db3a4bc822 100644 --- a/apps/files_versions/l10n/tr.php +++ b/apps/files_versions/l10n/tr.php @@ -1,4 +1,11 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "Geri alınamıyor: %s", +"success" => "Başarılı.", +"File %s was reverted to version %s" => "Dosya %s, %s versiyonuna döndürüldü", +"failure" => "hata", +"File %s could not be reverted to version %s" => "Dosya %s, %s versiyonuna döndürülemedi.", +"No old versions available" => "Eski versiyonlar mevcut değil.", +"No path specified" => "Yama belirtilmemiş", "History" => "Geçmiş", "Files Versioning" => "Dosya Sürümleri", "Enable" => "Etkinleştir" diff --git a/apps/files_versions/l10n/uk.php b/apps/files_versions/l10n/uk.php index 49acda81079..861523bf6a4 100644 --- a/apps/files_versions/l10n/uk.php +++ b/apps/files_versions/l10n/uk.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "Не вдалося відновити: %s", +"success" => "успішно", +"File %s was reverted to version %s" => "Файл %s був відновлений до версії %s", +"failure" => "неуспішно", +"File %s could not be reverted to version %s" => "Файл %s не може бути відновлений до версії %s", +"No old versions available" => "Старі версії недоступні", +"No path specified" => "Шлях не вказаний", "History" => "Історія", +"Revert a file to a previous version by clicking on its revert button" => "Відновити файл на попередню версію, натиснувши на кнопку Відновити", "Files Versioning" => "Версії файлів", "Enable" => "Включити" ); diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index dc02c605c44..6c87eba423d 100644 --- a/apps/files_versions/lib/hooks.php +++ b/apps/files_versions/lib/hooks.php @@ -20,13 +20,10 @@ class Hooks { public static function write_hook( $params ) { if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - - $versions = new Storage( new \OC\Files\View('') ); - $path = $params[\OC\Files\Filesystem::signal_param_path]; - - if($path<>'') $versions->store( $path ); - + if($path<>'') { + Storage::store($path); + } } } @@ -40,12 +37,10 @@ class Hooks { */ public static function remove_hook($params) { if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - - $versions = new Storage( new \OC_FilesystemView('') ); - $path = $params[\OC\Files\Filesystem::signal_param_path]; - - if($path<>'') $versions->delete( $path ); + if($path<>'') { + Storage::delete($path); + } } } @@ -59,13 +54,11 @@ class Hooks { */ public static function rename_hook($params) { if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - - $versions = new Storage( new \OC_FilesystemView('') ); - $oldpath = $params['oldpath']; $newpath = $params['newpath']; - - if($oldpath<>'' && $newpath<>'') $versions->rename( $oldpath, $newpath ); + if($oldpath<>'' && $newpath<>'') { + Storage::rename( $oldpath, $newpath ); + } } } diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index f23381cb156..ba9f8ba41cb 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -35,37 +35,25 @@ class Storage { 'step' => 604800), ); - private static function getUidAndFilename($filename) - { - if (\OCP\App::isEnabled('files_sharing') - && substr($filename, 0, 7) == '/Shared' - && $source = \OCP\Share::getItemSharedWith('file', - substr($filename, 7), - \OC_Share_Backend_File::FORMAT_SHARED_STORAGE)) { - $filename = $source['path']; - $pos = strpos($filename, '/files', 1); - $uid = substr($filename, 1, $pos - 1); - $filename = substr($filename, $pos + 6); - } else { - $uid = \OCP\User::getUser(); + private static function getUidAndFilename($filename) { + $uid = \OC\Files\Filesystem::getOwner($filename); + if ( $uid != \OCP\User::getUser() ) { + $info = \OC\Files\Filesystem::getFileInfo($filename); + $ownerView = new \OC\Files\View('/'.$uid.'/files'); + $filename = $ownerView->getPath($info['fileid']); } return array($uid, $filename); } - + /** * store a new version of a file. */ - public function store($filename) { + public static function store($filename) { if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { list($uid, $filename) = self::getUidAndFilename($filename); - $files_view = new \OC\Files\View('/'.\OCP\User::getUser() .'/files'); - $users_view = new \OC\Files\View('/'.\OCP\User::getUser()); - - //check if source file already exist as version to avoid recursions. - // todo does this check work? - if ($users_view->file_exists($filename)) { - return false; - } + + $files_view = new \OC\Files\View('/'.$uid .'/files'); + $users_view = new \OC\Files\View('/'.$uid); // check if filename is a directory if($files_view->is_dir($filename)) { @@ -106,10 +94,10 @@ class Storage { */ public static function delete($filename) { list($uid, $filename) = self::getUidAndFilename($filename); - $versions_fileview = new \OC_FilesystemView('/'.$uid .'/files_versions'); + $versions_fileview = new \OC\Files\View('/'.$uid .'/files_versions'); $abs_path = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$filename.'.v'; - if( ($versions = self::getVersions($filename)) ) { + if( ($versions = self::getVersions($uid, $filename)) ) { if ( ($versionsSize = \OCP\Config::getAppValue('files_versions', 'size')) === null ) { $versionsSize = self::calculateSize($uid); } @@ -127,16 +115,15 @@ class Storage { public static function rename($oldpath, $newpath) { list($uid, $oldpath) = self::getUidAndFilename($oldpath); list($uidn, $newpath) = self::getUidAndFilename($newpath); - $versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions'); - $files_view = new \OC_FilesystemView('/'.$uid .'/files'); + $versions_view = new \OC\Files\View('/'.$uid .'/files_versions'); + $files_view = new \OC\Files\View('/'.$uid .'/files'); $abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_view->getAbsolutePath('').$newpath; if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) { $versions_view->rename($oldpath, $newpath); - } else if ( ($versions = Storage::getVersions($oldpath)) ) { + } else if ( ($versions = Storage::getVersions($uid, $oldpath)) ) { $info=pathinfo($abs_newpath); if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true); - $versions = Storage::getVersions($oldpath); foreach ($versions as $v) { $versions_view->rename($oldpath.'.v'.$v['version'], $newpath.'.v'.$v['version']); } @@ -177,14 +164,14 @@ class Storage { /** * @brief get a list of all available versions of a file in descending chronological order + * @param $uid user id from the owner of the file * @param $filename file to find versions of, relative to the user files dir * @param $count number of versions to return * @returns array */ - public static function getVersions( $filename, $count = 0 ) { + public static function getVersions($uid, $filename, $count = 0 ) { if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) { - list($uid, $filename) = self::getUidAndFilename($filename); - $versions_fileview = new \OC\Files\View('/' . \OCP\User::getUser() . '/files_versions'); + $versions_fileview = new \OC\Files\View('/' . $uid . '/files_versions'); $versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); $versions = array(); @@ -197,7 +184,7 @@ class Storage { sort( $matches ); - $files_view = new \OC_FilesystemView('/'.$uid.'/files'); + $files_view = new \OC\Files\View('/'.$uid.'/files'); $local_file = $files_view->getLocalFile($filename); $local_file_md5 = \md5_file( $local_file ); @@ -248,7 +235,7 @@ class Storage { */ private static function calculateSize($uid) { if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) { - $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions'); $versionsRoot = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath(''); $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($versionsRoot), \RecursiveIteratorIterator::CHILD_FIRST); @@ -273,7 +260,7 @@ class Storage { */ private static function getAllVersions($uid) { if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) { - $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions'); $versionsRoot = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath(''); $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($versionsRoot), \RecursiveIteratorIterator::CHILD_FIRST); @@ -319,7 +306,7 @@ class Storage { private static function expire($filename, $versionsSize = null) { if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { list($uid, $filename) = self::getUidAndFilename($filename); - $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions'); // get available disk space for user $quota = \OCP\Util::computerFileSize(\OC_Preferences::getValue($uid, 'files', 'quota')); @@ -338,7 +325,7 @@ class Storage { } // calculate available space for version history - $files_view = new \OC_FilesystemView('/'.$uid.'/files'); + $files_view = new \OC\Files\View('/'.$uid.'/files'); $rootInfo = $files_view->getFileInfo('/'); $free = $quota-$rootInfo['size']; // remaining free space for user if ( $free > 0 ) { @@ -354,7 +341,7 @@ class Storage { $versions_by_file = $result['by_file']; $all_versions = $result['all']; } else { - $all_versions = Storage::getVersions($filename); + $all_versions = Storage::getVersions($uid, $filename); $versions_by_file[$filename] = $all_versions; } diff --git a/apps/user_ldap/l10n/de_DE.php b/apps/user_ldap/l10n/de_DE.php index 45edda2debb..9bee0a219ae 100644 --- a/apps/user_ldap/l10n/de_DE.php +++ b/apps/user_ldap/l10n/de_DE.php @@ -38,12 +38,12 @@ "When unchecked, this configuration will be skipped." => "Wenn nicht angehakt, wird diese Konfiguration übersprungen.", "Port" => "Port", "Backup (Replica) Host" => "Back-Up (Replikation) Host", -"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Optionaler Backup Host. Es muss ein Replikat des eigentlichen LDAP/AD Servers sein.", +"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Geben Sie einen optionalen Backup Host an. Es muss ein Replikat des Haupt- LDAP/AD Servers sein.", "Backup (Replica) Port" => "Back-Up (Replikation) Port", "Disable Main Server" => "Hauptserver deaktivieren", -"When switched on, ownCloud will only connect to the replica server." => "Wenn eingeschaltet wird sich ownCloud nur mit dem Replikat-Server verbinden.", +"When switched on, ownCloud will only connect to the replica server." => "Wenn eingeschaltet wird sich die ownCloud nur mit dem Replikat-Server verbinden.", "Use TLS" => "Nutze TLS", -"Do not use it additionally for LDAPS connections, it will fail." => "Benutze es nicht zusätzlich für LDAPS Verbindungen, es wird scheitern.", +"Do not use it additionally for LDAPS connections, it will fail." => "Benutzen Sie es nicht zusätzlich für LDAPS Verbindungen, es wird fehlschlagen.", "Case insensitve LDAP server (Windows)" => "LDAP-Server (Windows: Groß- und Kleinschreibung bleibt unbeachtet)", "Turn off SSL certificate validation." => "Schalten Sie 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.", diff --git a/apps/user_ldap/l10n/pt_BR.php b/apps/user_ldap/l10n/pt_BR.php index dd4019fc35e..c86263d52a8 100644 --- a/apps/user_ldap/l10n/pt_BR.php +++ b/apps/user_ldap/l10n/pt_BR.php @@ -1,12 +1,23 @@ <?php $TRANSLATIONS = array( +"Failed to delete the server configuration" => "Falha ao deletar a configuração do servidor", +"The configuration is valid and the connection could be established!" => "A configuração é válida e a conexão foi estabelecida!", +"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "A configuração é válida, mas o Bind falhou. Confira as configurações do servidor e as credenciais.", +"The configuration is invalid. Please look in the ownCloud log for further details." => "A configuração é inválida. Leia o \"log\" do ownCloud para mais detalhes.", "Deletion failed" => "Remoção falhou", "Keep settings?" => "Manter ajustes?", +"Cannot add server configuration" => "Não foi possível adicionar a configuração do servidor", +"Connection test succeeded" => "Teste de conexão bem sucedido", +"Connection test failed" => "Teste de conexão falhou", +"Do you really want to delete the current Server Configuration?" => "Você quer realmente deletar as atuais Configurações de Servidor?", "Confirm Deletion" => "Confirmar Exclusão", "<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>Aviso:</b> Os aplicativos user_ldap e user_webdavauth são incompatíveis. Você deverá experienciar comportamento inesperado. Por favor, peça ao seu administrador do sistema para desabilitar um deles.", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Aviso:</b> O módulo PHP LDAP não está instalado, o backend não funcionará. Por favor, peça ao seu administrador do sistema para instalá-lo.", +"Server configuration" => "Configuração de servidor", +"Add Server Configuration" => "Adicionar configuração de servidor", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Você pode omitir o protocolo, exceto quando requerer SSL. Então inicie com ldaps://", "Base DN" => "DN Base", +"One Base DN per line" => "Uma base DN por linha", "You can specify Base DN for users and groups in the Advanced tab" => "Você pode especificar DN Base para usuários e grupos na guia Avançada", "User DN" => "DN Usuário", "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." => "O DN do cliente usuário com qual a ligação deverá ser feita, ex. uid=agent,dc=example,dc=com. Para acesso anônimo, deixe DN e Senha vazios.", @@ -21,20 +32,33 @@ "Group Filter" => "Filtro de Grupo", "Defines the filter to apply, when retrieving groups." => "Define o filtro a aplicar ao obter grupos.", "without any placeholder, e.g. \"objectClass=posixGroup\"." => "sem nenhum espaço reservado, ex. \"objectClass=posixGroup\"", +"Connection Settings" => "Configurações de conexão", +"Configuration Active" => "Configuração ativa", +"When unchecked, this configuration will be skipped." => "Quando assinalada, esta configuração será pulada.", "Port" => "Porta", +"Disable Main Server" => "Desativar Servidor Principal", +"When switched on, ownCloud will only connect to the replica server." => "Quando ativado, ownCloud somente conectar-se-á ao servidor réplica.", "Use TLS" => "Usar TLS", +"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.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se a conexão só funciona com essa opção, importe o certificado SSL do servidor LDAP no seu servidor ownCloud.", "Not recommended, use for testing only." => "Não recomendado, use somente para testes.", "in seconds. A change empties the cache." => "em segundos. Uma mudança esvaziará o cache.", +"Directory Settings" => "Configurações de Diretório", "User Display Name Field" => "Campo Nome de Exibição de Usuário", "The LDAP attribute to use to generate the user`s ownCloud name." => "O atributo LDAP para usar para gerar nome ownCloud do usuário.", "Base User Tree" => "Árvore de Usuário Base", +"One User Base DN per line" => "Um usuário-base DN por linha", +"User Search Attributes" => "Atributos de busca de usuário", +"Optional; one attribute per line" => "Opcional; um atributo por linha", "Group Display Name Field" => "Campo Nome de Exibição de Grupo", "The LDAP attribute to use to generate the groups`s ownCloud name." => "O atributo LDAP para usar para gerar nome ownCloud do grupo.", "Base Group Tree" => "Árvore de Grupo Base", +"One Group Base DN per line" => "Um grupo-base DN por linha", +"Group Search Attributes" => "Atributos de busca de grupo", "Group-Member association" => "Associação Grupo-Membro", +"Special Attributes" => "Atributos Especiais", "in bytes" => "em bytes", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Deixe vazio para nome de usuário (padrão). Caso contrário, especifique um atributo LDAP/AD.", "Help" => "Ajuda" diff --git a/apps/user_ldap/l10n/tr.php b/apps/user_ldap/l10n/tr.php index 1bed9e246c9..7bcabb0448a 100644 --- a/apps/user_ldap/l10n/tr.php +++ b/apps/user_ldap/l10n/tr.php @@ -1,16 +1,22 @@ <?php $TRANSLATIONS = array( "Deletion failed" => "Silme başarısız oldu", -"Host" => "Konak", -"Base DN" => "Base DN", -"User DN" => "User DN", +"Keep settings?" => "Ayarları kalsınmı?", +"Connection test succeeded" => "Bağlantı testi başarılı oldu", +"Connection test failed" => "Bağlantı testi başarısız oldu", +"Confirm Deletion" => "Silmeyi onayla", +"Host" => "Sunucu", +"Base DN" => "Ana DN", +"User DN" => "Kullanıcı DN", "Password" => "Parola", "For anonymous access, leave DN and Password empty." => "Anonim erişim için DN ve Parola alanlarını boş bırakın.", -"User Login Filter" => "Kullanıcı Oturum Açma Süzgeci", +"User Login Filter" => "Kullanıcı Oturum Filtresi", "use %%uid placeholder, e.g. \"uid=%%uid\"" => "%%uid yer tutucusunu kullanın, örneğin \"uid=%%uid\"", -"User List Filter" => "Kullanıcı Liste Süzgeci", +"User List Filter" => "Kullanıcı Liste Filtresi", "without any placeholder, e.g. \"objectClass=person\"." => "bir yer tutucusu olmadan, örneğin \"objectClass=person\"", "Group Filter" => "Grup Süzgeci", +"Connection Settings" => "Bağlantı ayarları", "Port" => "Port", +"Disable Main Server" => "Ana sunucuyu devredışı birak", "Use TLS" => "TLS kullan", "Turn off SSL certificate validation." => "SSL sertifika doğrulamasını kapat.", "Not recommended, use for testing only." => "Önerilmez, sadece test için kullanın.", diff --git a/apps/user_ldap/l10n/uk.php b/apps/user_ldap/l10n/uk.php index 643a7495890..3b85e095ff0 100644 --- a/apps/user_ldap/l10n/uk.php +++ b/apps/user_ldap/l10n/uk.php @@ -33,24 +33,36 @@ "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." => "Не використовуйте це додатково для під'єднання до LDAP, бо виконано не буде.", "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." => "Якщо з'єднання працює лише з цією опцією, імпортуйте SSL сертифікат LDAP сервера у ваший ownCloud сервер.", "Not recommended, use for testing only." => "Не рекомендується, використовуйте лише для тестів.", "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." => "Атрибут LDAP, який використовується для генерації імен користувачів ownCloud.", "Base User Tree" => "Основне Дерево Користувачів", "One User Base DN per line" => "Один Користувач Base DN на одній строчці", +"User Search Attributes" => "Пошукові Атрибути Користувача", +"Optional; one attribute per line" => "Додатково; один атрибут на строчку", "Group Display Name Field" => "Поле, яке відображає Ім'я Групи", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Атрибут LDAP, який використовується для генерації імен груп ownCloud.", "Base Group Tree" => "Основне Дерево Груп", "One Group Base DN per line" => "Одна Група Base DN на одній строчці", +"Group Search Attributes" => "Пошукові Атрибути Групи", "Group-Member association" => "Асоціація Група-Член", +"Special Attributes" => "Спеціальні Атрибути", "in bytes" => "в байтах", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Залиште порожнім для імені користувача (за замовчанням). Інакше, вкажіть атрибут LDAP/AD.", "Help" => "Допомога" diff --git a/apps/user_webdavauth/l10n/tr.php b/apps/user_webdavauth/l10n/tr.php index 245a5101341..4a2f6d2403b 100644 --- a/apps/user_webdavauth/l10n/tr.php +++ b/apps/user_webdavauth/l10n/tr.php @@ -1,3 +1,4 @@ <?php $TRANSLATIONS = array( +"WebDAV Authentication" => "WebDAV Kimlik doğrulaması", "URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/uk.php b/apps/user_webdavauth/l10n/uk.php index 245a5101341..66887df54b5 100644 --- a/apps/user_webdavauth/l10n/uk.php +++ b/apps/user_webdavauth/l10n/uk.php @@ -1,3 +1,5 @@ <?php $TRANSLATIONS = array( -"URL: http://" => "URL: http://" +"WebDAV Authentication" => "Аутентифікація WebDAV", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud надішле облікові дані на цей URL. Цей плагін перевірить відповідь і буде інтерпретувати HTTP коди 401 і 403 як повідомлення про недійсні повноваження, а решту відповідей як дійсні облікові дані." ); |