diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-30 22:59:55 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-30 22:59:55 +0100 |
commit | 6e9e2634978f08494a13bb3c5185032fc0ed7792 (patch) | |
tree | 8f0cf5eef65c29715c84b2c253834a2fa047bbd7 /apps | |
parent | 890fbb82993db294489fb6ecf14d91d7652763d1 (diff) | |
parent | 6738275b01abf514d32171da604da8d63a2808e0 (diff) | |
download | nextcloud-server-6e9e2634978f08494a13bb3c5185032fc0ed7792.tar.gz nextcloud-server-6e9e2634978f08494a13bb3c5185032fc0ed7792.zip |
merge master into filesystem
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/ajax/move.php | 4 | ||||
-rw-r--r-- | apps/files/ajax/timezone.php | 5 | ||||
-rw-r--r-- | apps/files/appinfo/remote.php | 4 | ||||
-rw-r--r-- | apps/files/index.php | 2 | ||||
-rw-r--r-- | apps/files/js/fileactions.js | 208 | ||||
-rw-r--r-- | apps/files/js/files.js | 8 | ||||
-rw-r--r-- | apps/files/l10n/de.php | 2 | ||||
-rw-r--r-- | apps/files/l10n/de_DE.php | 26 | ||||
-rw-r--r-- | apps/files/l10n/th_TH.php | 14 | ||||
-rw-r--r-- | apps/files_encryption/lib/crypt.php | 22 | ||||
-rw-r--r-- | apps/files_encryption/lib/cryptstream.php | 42 | ||||
-rw-r--r-- | apps/files_external/lib/webdav.php | 34 | ||||
-rw-r--r-- | apps/files_sharing/js/share.js | 34 | ||||
-rw-r--r-- | apps/files_sharing/l10n/et_EE.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/l10n/et_EE.php | 6 |
15 files changed, 198 insertions, 215 deletions
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index e8b0aea063f..d4eacd962a0 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -9,9 +9,9 @@ OCP\JSON::callCheck(); // Get data $dir = stripslashes($_GET["dir"]); $file = stripslashes($_GET["file"]); -$target = stripslashes(urldecode($_GET["target"])); +$target = stripslashes(rawurldecode($_GET["target"])); -if (OC_User::isLoggedIn() && ($dir != '' || $file != 'Shared')) { +if ($dir != '' || $file != 'Shared') { $targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file); $sourceFile = \OC\Files\Filesystem::normalizePath($target . '/' . $file); if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) { diff --git a/apps/files/ajax/timezone.php b/apps/files/ajax/timezone.php index b71fa3940cb..b547d162b3e 100644 --- a/apps/files/ajax/timezone.php +++ b/apps/files/ajax/timezone.php @@ -1,5 +1,2 @@ <?php - // FIXME: this should start a secure session if forcessl is enabled - // see lib/base.php for an example - //session_start(); - $_SESSION['timezone'] = $_GET['time']; +$_SESSION['timezone'] = $_GET['time']; diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index a84216b61b7..9c7b9ab6d5b 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -23,7 +23,7 @@ * */ // only need filesystem apps -$RUNTIME_APPTYPES=array('filesystem','authentication'); +$RUNTIME_APPTYPES=array('filesystem', 'authentication'); OC_App::loadApps($RUNTIME_APPTYPES); // Backends @@ -38,7 +38,7 @@ $server = new Sabre_DAV_Server($publicDir); $server->setBaseUri($baseuri); // Load plugins -$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); +$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend, 'ownCloud')); $server->addPlugin(new Sabre_DAV_Locks_Plugin($lockBackend)); $server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload diff --git a/apps/files/index.php b/apps/files/index.php index 43a559d034e..cdb88ab83f2 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -36,7 +36,7 @@ if(!isset($_SESSION['timezone'])) { } OCP\App::setActiveNavigationEntry( 'files_index' ); // Load the files -$dir = isset( $_GET['dir'] ) ? urldecode(stripslashes($_GET['dir'])) : ''; +$dir = isset( $_GET['dir'] ) ? rawurldecode(stripslashes($_GET['dir'])) : ''; // Redirect if directory does not exist if(!\OC\Files\Filesystem::is_dir($dir.'/')) { header('Location: '.$_SERVER['SCRIPT_NAME'].''); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 1cf80352bef..82d990bf780 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -1,191 +1,189 @@ -var FileActions={ - actions:{}, - defaults:{}, - icons:{}, - currentFile:null, - register:function(mime,name,permissions,icon,action){ - if(!FileActions.actions[mime]){ - FileActions.actions[mime]={}; +var FileActions = { + actions: {}, + defaults: {}, + icons: {}, + currentFile: null, + register: function (mime, name, permissions, icon, action) { + if (!FileActions.actions[mime]) { + FileActions.actions[mime] = {}; } if (!FileActions.actions[mime][name]) { FileActions.actions[mime][name] = {}; } FileActions.actions[mime][name]['action'] = action; FileActions.actions[mime][name]['permissions'] = permissions; - FileActions.icons[name]=icon; + FileActions.icons[name] = icon; }, - setDefault:function(mime,name){ - FileActions.defaults[mime]=name; + setDefault: function (mime, name) { + FileActions.defaults[mime] = name; }, - get:function(mime,type,permissions){ - var actions={}; - if(FileActions.actions.all){ - actions=$.extend( actions, FileActions.actions.all ); + get: function (mime, type, permissions) { + var actions = {}; + if (FileActions.actions.all) { + actions = $.extend(actions, FileActions.actions.all); } - if(mime){ - if(FileActions.actions[mime]){ - actions=$.extend( actions, FileActions.actions[mime] ); + if (mime) { + if (FileActions.actions[mime]) { + actions = $.extend(actions, FileActions.actions[mime]); } - var mimePart=mime.substr(0,mime.indexOf('/')); - if(FileActions.actions[mimePart]){ - actions=$.extend( actions, FileActions.actions[mimePart] ); + var mimePart = mime.substr(0, mime.indexOf('/')); + if (FileActions.actions[mimePart]) { + actions = $.extend(actions, FileActions.actions[mimePart]); } } - if(type){//type is 'dir' or 'file' - if(FileActions.actions[type]){ - actions=$.extend( actions, FileActions.actions[type] ); + if (type) {//type is 'dir' or 'file' + if (FileActions.actions[type]) { + actions = $.extend(actions, FileActions.actions[type]); } } var filteredActions = {}; - $.each(actions, function(name, action) { + $.each(actions, function (name, action) { if (action.permissions & permissions) { filteredActions[name] = action.action; } }); return filteredActions; }, - getDefault:function(mime,type,permissions){ - if(mime){ - var mimePart=mime.substr(0,mime.indexOf('/')); + getDefault: function (mime, type, permissions) { + if (mime) { + var mimePart = mime.substr(0, mime.indexOf('/')); } - var name=false; - if(mime && FileActions.defaults[mime]){ - name=FileActions.defaults[mime]; - }else if(mime && FileActions.defaults[mimePart]){ - name=FileActions.defaults[mimePart]; - }else if(type && FileActions.defaults[type]){ - name=FileActions.defaults[type]; - }else{ - name=FileActions.defaults.all; + var name = false; + if (mime && FileActions.defaults[mime]) { + name = FileActions.defaults[mime]; + } else if (mime && FileActions.defaults[mimePart]) { + name = FileActions.defaults[mimePart]; + } else if (type && FileActions.defaults[type]) { + name = FileActions.defaults[type]; + } else { + name = FileActions.defaults.all; } - var actions=this.get(mime,type,permissions); + var actions = this.get(mime, type, permissions); return actions[name]; }, - display:function(parent){ - FileActions.currentFile=parent; - $('#fileList span.fileactions, #fileList td.date a.action').remove(); - var actions=FileActions.get(FileActions.getCurrentMimeType(),FileActions.getCurrentType(), FileActions.getCurrentPermissions()); - var file=FileActions.getCurrentFile(); - if($('tr').filterAttr('data-file',file).data('renaming')){ + display: function (parent) { + FileActions.currentFile = parent; + var actions = FileActions.get(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); + var file = FileActions.getCurrentFile(); + if ($('tr').filterAttr('data-file', file).data('renaming')) { return; } parent.children('a.name').append('<span class="fileactions" />'); - var defaultAction=FileActions.getDefault(FileActions.getCurrentMimeType(),FileActions.getCurrentType(), FileActions.getCurrentPermissions()); - for(name in actions){ + var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); + for (name in actions) { // NOTE: Temporary fix to prevent rename action in root of Shared directory - if (name == 'Rename' && $('#dir').val() == '/Shared') { + if (name === 'Rename' && $('#dir').val() === '/Shared') { continue; } - if((name=='Download' || actions[name]!=defaultAction) && name!='Delete'){ - var img=FileActions.icons[name]; - if(img.call){ - img=img(file); + if ((name === 'Download' || actions[name] !== defaultAction) && name !== 'Delete') { + var img = FileActions.icons[name]; + if (img.call) { + img = img(file); } - var html='<a href="#" class="action" style="display:none">'; - if(img) { html+='<img src="'+img+'"/> '; } - html += t('files', name) +'</a>'; - var element=$(html); - element.data('action',name); - element.click(function(event){ + var html = '<a href="#" class="action" data-action="'+name+'">'; + if (img) { + html += '<img class ="svg" src="' + img + '"/> '; + } + html += t('files', name) + '</a>'; + var element = $(html); + element.data('action', name); + element.click(function (event) { + FileActions.currentFile = $(this).parent().parent().parent(); event.stopPropagation(); event.preventDefault(); - var action=actions[$(this).data('action')]; - var currentFile=FileActions.getCurrentFile(); - FileActions.hide(); + var action = actions[$(this).data('action')]; + var currentFile = FileActions.getCurrentFile(); action(currentFile); }); - element.hide(); parent.find('a.name>span.fileactions').append(element); } } - if(actions['Delete']){ - var img=FileActions.icons['Delete']; - if(img.call){ - img=img(file); + if (actions['Delete']) { + var img = FileActions.icons['Delete']; + if (img.call) { + img = img(file); } // NOTE: Temporary fix to allow unsharing of files in root of Shared folder if ($('#dir').val() == '/Shared') { - var html = '<a href="#" original-title="' + t('files', 'Unshare') + '" class="action delete" style="display:none" />'; + var html = '<a href="#" original-title="' + t('files', 'Unshare') + '" class="action delete" />'; } else { - var html='<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete" style="display:none" />'; + var html = '<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete" />'; } - var element=$(html); - if(img){ - element.append($('<img src="'+img+'"/>')); + var element = $(html); + if (img) { + element.append($('<img class ="svg" src="' + img + '"/>')); } - element.data('action','Delete'); - element.click(function(event){ + element.data('action', 'Delete'); + element.click(function (event) { event.stopPropagation(); event.preventDefault(); - var action=actions[$(this).data('action')]; - var currentFile=FileActions.getCurrentFile(); - FileActions.hide(); + var action = actions[$(this).data('action')]; + var currentFile = FileActions.getCurrentFile(); action(currentFile); }); - element.hide(); parent.parent().children().last().append(element); } - $('#fileList .action').css('-o-transition-property','none');//temporarly disable - $('#fileList .action').fadeIn(200,function(){ - $('#fileList .action').css('-o-transition-property','opacity'); - }); - return false; - }, - hide:function(){ - $('#fileList span.fileactions, #fileList td.date a.action').fadeOut(200,function(){ - $(this).remove(); - }); }, - getCurrentFile:function(){ + getCurrentFile: function () { return FileActions.currentFile.parent().attr('data-file'); }, - getCurrentMimeType:function(){ + getCurrentMimeType: function () { return FileActions.currentFile.parent().attr('data-mime'); }, - getCurrentType:function(){ + getCurrentType: function () { return FileActions.currentFile.parent().attr('data-type'); }, - getCurrentPermissions:function() { + getCurrentPermissions: function () { return FileActions.currentFile.parent().data('permissions'); } }; -$(document).ready(function(){ - if($('#allowZipDownload').val() == 1){ +$(document).ready(function () { + if ($('#allowZipDownload').val() == 1) { var downloadScope = 'all'; } else { var downloadScope = 'file'; } - FileActions.register(downloadScope,'Download', OC.PERMISSION_READ, function(){return OC.imagePath('core','actions/download');},function(filename){ - window.location=OC.filePath('files', 'ajax', 'download.php') + '?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val()); + FileActions.register(downloadScope, 'Download', OC.PERMISSION_READ, function () { + return OC.imagePath('core', 'actions/download'); + }, function (filename) { + window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val()); + }); + + $('#fileList tr').each(function(){ + FileActions.display($(this).children('td.filename')); }); }); -FileActions.register('all','Delete', OC.PERMISSION_DELETE, function(){return OC.imagePath('core','actions/delete');},function(filename){ - if(Files.cancelUpload(filename)) { - if(filename.substr){ - filename=[filename]; +FileActions.register('all', 'Delete', OC.PERMISSION_DELETE, function () { + return OC.imagePath('core', 'actions/delete'); +}, function (filename) { + if (Files.cancelUpload(filename)) { + if (filename.substr) { + filename = [filename]; } - $.each(filename,function(index,file){ - var filename = $('tr').filterAttr('data-file',file); + $.each(filename, function (index, file) { + var filename = $('tr').filterAttr('data-file', file); filename.hide(); filename.find('input[type="checkbox"]').removeAttr('checked'); filename.removeClass('selected'); }); procesSelection(); - }else{ + } else { FileList.do_delete(filename); } $('.tipsy').remove(); }); // t('files', 'Rename') -FileActions.register('all','Rename', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/rename');},function(filename){ +FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () { + return OC.imagePath('core', 'actions/rename'); +}, function (filename) { FileList.rename(filename); }); -FileActions.register('dir','Open', OC.PERMISSION_READ, '', function(filename){ - window.location=OC.linkTo('files', 'index.php') + '?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); +FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) { + window.location = OC.linkTo('files', 'index.php') + '?dir=' + encodeURIComponent($('#dir').val()).replace(/%2F/g, '/') + '/' + encodeURIComponent(filename); }); -FileActions.setDefault('dir','Open'); +FileActions.setDefault('dir', 'Open'); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 549204e8572..2d9ccba424a 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -62,14 +62,6 @@ $(document).ready(function() { return false; }); - // Sets the file-action buttons behaviour : - $('tr').live('mouseenter',function(event) { - FileActions.display($(this).children('td.filename')); - }); - $('tr').live('mouseleave',function(event) { - FileActions.hide(); - }); - var lastChecked; // Sets the file link behaviour : diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index 545f840d8ce..7dc5831e639 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -37,7 +37,7 @@ "{count} folders" => "{count} Ordner", "1 file" => "1 Datei", "{count} files" => "{count} Dateien", -"seconds ago" => "Vor wenigen Sekunden", +"seconds ago" => "Gerade eben", "1 minute ago" => "vor einer Minute", "{minutes} minutes ago" => "Vor {minutes} Minuten", "today" => "Heute", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index 37e77472ab6..194bf6b4fda 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -1,10 +1,10 @@ <?php $TRANSLATIONS = array( -"There is no error, the file uploaded with success" => "Datei fehlerfrei hochgeladen.", +"There is no error, the file uploaded with success" => "Es sind keine Fehler aufgetreten. Die Datei wurde erfolgreich hochgeladen.", "The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Die Größe der hochzuladenden Datei überschreitet die upload_max_filesize-Richtlinie in php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Die Größe der hochzuladenden Datei überschreitet die MAX_FILE_SIZE-Richtlinie, die im HTML-Formular angegeben wurde", "The uploaded file was only partially uploaded" => "Die Datei wurde nur teilweise hochgeladen.", "No file was uploaded" => "Es wurde keine Datei hochgeladen.", -"Missing a temporary folder" => "Temporärer Ordner fehlt.", +"Missing a temporary folder" => "Der temporäre Ordner fehlt.", "Failed to write to disk" => "Fehler beim Schreiben auf die Festplatte", "Files" => "Dateien", "Unshare" => "Nicht mehr freigeben", @@ -14,19 +14,19 @@ "replace" => "ersetzen", "suggest name" => "Name vorschlagen", "cancel" => "abbrechen", -"replaced {new_name}" => "{new_name} ersetzt", +"replaced {new_name}" => "{new_name} wurde ersetzt", "undo" => "rückgängig machen", -"replaced {new_name} with {old_name}" => "{old_name} ersetzt durch {new_name}", +"replaced {new_name} with {old_name}" => "{old_name} wurde ersetzt durch {new_name}", "unshared {files}" => "Freigabe für {files} beendet", "deleted {files}" => "{files} gelöscht", "generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Ihre Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist.", "Upload Error" => "Fehler beim Upload", "Pending" => "Ausstehend", -"1 file uploading" => "Eine Datei wird hoch geladen", +"1 file uploading" => "1 Datei wird hochgeladen", "{count} files uploading" => "{count} Dateien wurden hochgeladen", "Upload cancelled." => "Upload abgebrochen.", -"File upload is in progress. Leaving the page now will cancel the upload." => "Dateiupload läuft. Wenn Sie die Seite jetzt verlassen, wird der Upload abgebrochen.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Der Dateiupload läuft. Wenn Sie die Seite jetzt verlassen, wird der Upload abgebrochen.", "Invalid name, '/' is not allowed." => "Ungültiger Name: \"/\" ist nicht erlaubt.", "{count} files scanned" => "{count} Dateien wurden gescannt", "error while scanning" => "Fehler beim Scannen", @@ -37,16 +37,16 @@ "{count} folders" => "{count} Ordner", "1 file" => "1 Datei", "{count} files" => "{count} Dateien", -"seconds ago" => "Vor wenigen Sekunden", -"1 minute ago" => "vor einer Minute", -"{minutes} minutes ago" => "vor {minutes} Minuten", +"seconds ago" => "Gerade eben", +"1 minute ago" => "Vor 1 Minute", +"{minutes} minutes ago" => "Vor {minutes} Minuten", "today" => "Heute", "yesterday" => "Gestern", -"{days} days ago" => "vor {days} Tage(en)", +"{days} days ago" => "Vor {days} Tage(en)", "last month" => "Letzten Monat", -"months ago" => "Monate her", +"months ago" => "Vor Monaten", "last year" => "Letztes Jahr", -"years ago" => "Jahre her", +"years ago" => "Vor Jahren", "File handling" => "Dateibehandlung", "Maximum upload size" => "Maximale Upload-Größe", "max. possible: " => "maximal möglich:", @@ -64,7 +64,7 @@ "Nothing in here. Upload something!" => "Alles leer. Bitte laden Sie etwas hoch!", "Share" => "Teilen", "Download" => "Herunterladen", -"Upload too large" => "Upload zu groß", +"Upload too large" => "Der Upload ist zu groß", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Die Datei überschreitet die Maximalgröße für Uploads auf diesem Server.", "Files are being scanned, please wait." => "Dateien werden gescannt, bitte warten.", "Current scanning" => "Scanne" diff --git a/apps/files/l10n/th_TH.php b/apps/files/l10n/th_TH.php index 3645435e54b..9bde85229b4 100644 --- a/apps/files/l10n/th_TH.php +++ b/apps/files/l10n/th_TH.php @@ -10,25 +10,39 @@ "Unshare" => "ยกเลิกการแชร์ข้อมูล", "Delete" => "ลบ", "Rename" => "เปลี่ยนชื่อ", +"{new_name} already exists" => "{new_name} มีอยู่แล้วในระบบ", "replace" => "แทนที่", "suggest name" => "แนะนำชื่อ", "cancel" => "ยกเลิก", +"replaced {new_name}" => "แทนที่ {new_name} แล้ว", "undo" => "เลิกทำ", +"replaced {new_name} with {old_name}" => "แทนที่ {new_name} ด้วย {old_name} แล้ว", +"unshared {files}" => "ยกเลิกการแชร์แล้ว {files} ไฟล์", +"deleted {files}" => "ลบไฟล์แล้ว {files} ไฟล์", "generating ZIP-file, it may take some time." => "กำลังสร้างไฟล์บีบอัด ZIP อาจใช้เวลาสักครู่", "Unable to upload your file as it is a directory or has 0 bytes" => "ไม่สามารถอัพโหลดไฟล์ของคุณได้ เนื่องจากไฟล์ดังกล่าวเป็นไดเร็กทอรี่หรือมีขนาด 0 ไบต์", "Upload Error" => "เกิดข้อผิดพลาดในการอัพโหลด", "Pending" => "อยู่ระหว่างดำเนินการ", "1 file uploading" => "กำลังอัพโหลดไฟล์ 1 ไฟล์", +"{count} files uploading" => "กำลังอัพโหลด {count} ไฟล์", "Upload cancelled." => "การอัพโหลดถูกยกเลิก", "File upload is in progress. Leaving the page now will cancel the upload." => "การอัพโหลดไฟล์กำลังอยู่ในระหว่างดำเนินการ การออกจากหน้าเว็บนี้จะทำให้การอัพโหลดถูกยกเลิก", "Invalid name, '/' is not allowed." => "ชื่อที่ใช้ไม่ถูกต้อง '/' ไม่อนุญาตให้ใช้งาน", +"{count} files scanned" => "สแกนไฟล์แล้ว {count} ไฟล์", "error while scanning" => "พบข้อผิดพลาดในระหว่างการสแกนไฟล์", "Name" => "ชื่อ", "Size" => "ขนาด", "Modified" => "ปรับปรุงล่าสุด", +"1 folder" => "1 โฟลเดอร์", +"{count} folders" => "{count} โฟลเดอร์", +"1 file" => "1 ไฟล์", +"{count} files" => "{count} ไฟล์", "seconds ago" => "วินาที ก่อนหน้านี้", +"1 minute ago" => "1 นาทีก่อนหน้านี้", +"{minutes} minutes ago" => "{minutes} นาทีก่อนหน้านี้", "today" => "วันนี้", "yesterday" => "เมื่อวานนี้", +"{days} days ago" => "{day} วันก่อนหน้านี้", "last month" => "เดือนที่แล้ว", "months ago" => "เดือน ที่ผ่านมา", "last year" => "ปีที่แล้ว", diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index c9d4ff27104..8b566e0aa09 100644 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -40,7 +40,7 @@ class OC_Crypt { static private $bf = null; public static function loginListener($params) { - self::init($params['uid'],$params['password']); + self::init($params['uid'], $params['password']); } public static function init($login,$password) { @@ -51,7 +51,7 @@ class OC_Crypt { OC_FileProxy::$enabled=false; if(!$view->file_exists('/'.$login.'/encryption.key')) {// does key exist? - OC_Crypt::createkey($login,$password); + OC_Crypt::createkey($login, $password); } $key=$view->file_get_contents('/'.$login.'/encryption.key'); OC_FileProxy::$enabled=true; @@ -82,16 +82,16 @@ class OC_Crypt { public static function createkey($username,$passcode) { // generate a random key - $key=mt_rand(10000,99999).mt_rand(10000,99999).mt_rand(10000,99999).mt_rand(10000,99999); + $key=mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999); // encrypt the key with the passcode of the user - $enckey=OC_Crypt::encrypt($key,$passcode); + $enckey=OC_Crypt::encrypt($key, $passcode); // Write the file $proxyEnabled=OC_FileProxy::$enabled; OC_FileProxy::$enabled=false; - $view=new \OC\Files\View('/'.$username); - $view->file_put_contents('/encryption.key',$enckey); + $view = new \OC\Files\View('/' . $username); + $view->file_put_contents('/encryption.key', $enckey); OC_FileProxy::$enabled=$proxyEnabled; } @@ -195,8 +195,8 @@ class OC_Crypt { public static function blockEncrypt($data, $key='') { $result=''; while(strlen($data)) { - $result.=self::encrypt(substr($data,0,8192),$key); - $data=substr($data,8192); + $result.=self::encrypt(substr($data, 0, 8192),$key); + $data=substr($data, 8192); } return $result; } @@ -207,11 +207,11 @@ class OC_Crypt { public static function blockDecrypt($data, $key='',$maxLength=0) { $result=''; while(strlen($data)) { - $result.=self::decrypt(substr($data,0,8192),$key); - $data=substr($data,8192); + $result.=self::decrypt(substr($data, 0, 8192),$key); + $data=substr($data, 8192); } if($maxLength>0) { - return substr($result,0,$maxLength); + return substr($result, 0, $maxLength); }else{ return rtrim($result, "\0"); } diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php index c4298382646..340caee3fb6 100644 --- a/apps/files_encryption/lib/cryptstream.php +++ b/apps/files_encryption/lib/cryptstream.php @@ -40,7 +40,7 @@ class OC_CryptStream{ if(!self::$rootView) { self::$rootView=new \OC\Files\View(''); } - $path=str_replace('crypt://','',$path); + $path=str_replace('crypt://', '', $path); if(dirname($path)=='streams' and isset(self::$sourceStreams[basename($path)])) { $this->source=self::$sourceStreams[basename($path)]['stream']; $this->path=self::$sourceStreams[basename($path)]['path']; @@ -50,13 +50,13 @@ class OC_CryptStream{ if($mode=='w' or $mode=='w+' or $mode=='wb' or $mode=='wb+') { $this->size=0; }else{ - $this->size=self::$rootView->filesize($path,$mode); + $this->size=self::$rootView->filesize($path, $mode); } OC_FileProxy::$enabled=false;//disable fileproxies so we can open the source file - $this->source=self::$rootView->fopen($path,$mode); + $this->source=self::$rootView->fopen($path, $mode); OC_FileProxy::$enabled=true; if(!is_resource($this->source)) { - OCP\Util::writeLog('files_encryption','failed to open '.$path,OCP\Util::ERROR); + OCP\Util::writeLog('files_encryption', 'failed to open '.$path, OCP\Util::ERROR); } } if(is_resource($this->source)) { @@ -67,7 +67,7 @@ class OC_CryptStream{ public function stream_seek($offset, $whence=SEEK_SET) { $this->flush(); - fseek($this->source,$offset,$whence); + fseek($this->source, $offset, $whence); } public function stream_tell() { @@ -79,11 +79,11 @@ class OC_CryptStream{ //This makes this function a lot simpler but will breake everything the moment it's fixed $this->writeCache=''; if($count!=8192) { - OCP\Util::writeLog('files_encryption','php bug 21641 no longer holds, decryption will not work',OCP\Util::FATAL); + OCP\Util::writeLog('files_encryption', 'php bug 21641 no longer holds, decryption will not work', OCP\Util::FATAL); die(); } $pos=ftell($this->source); - $data=fread($this->source,8192); + $data=fread($this->source, 8192); if(strlen($data)) { $result=OC_Crypt::decrypt($data); }else{ @@ -91,7 +91,7 @@ class OC_CryptStream{ } $length=$this->size-$pos; if($length<8192) { - $result=substr($result,0,$length); + $result=substr($result, 0, $length); } return $result; } @@ -105,12 +105,12 @@ class OC_CryptStream{ } if($currentPos%8192!=0) { //make sure we always start on a block start - fseek($this->source,-($currentPos%8192),SEEK_CUR); + fseek($this->source, -($currentPos%8192), SEEK_CUR); $encryptedBlock=fread($this->source,8192); - fseek($this->source,-($currentPos%8192),SEEK_CUR); + fseek($this->source, -($currentPos%8192), SEEK_CUR); $block=OC_Crypt::decrypt($encryptedBlock); - $data=substr($block,0,$currentPos%8192).$data; - fseek($this->source,-($currentPos%8192),SEEK_CUR); + $data=substr($block, 0, $currentPos%8192).$data; + fseek($this->source, -($currentPos%8192), SEEK_CUR); } $currentPos=ftell($this->source); while($remainingLength=strlen($data)>0) { @@ -118,9 +118,9 @@ class OC_CryptStream{ $this->writeCache=$data; $data=''; }else{ - $encrypted=OC_Crypt::encrypt(substr($data,0,8192)); - fwrite($this->source,$encrypted); - $data=substr($data,8192); + $encrypted=OC_Crypt::encrypt(substr($data, 0, 8192)); + fwrite($this->source, $encrypted); + $data=substr($data, 8192); } } $this->size=max($this->size,$currentPos+$length); @@ -130,13 +130,13 @@ class OC_CryptStream{ public function stream_set_option($option,$arg1,$arg2) { switch($option) { case STREAM_OPTION_BLOCKING: - stream_set_blocking($this->source,$arg1); + stream_set_blocking($this->source, $arg1); break; case STREAM_OPTION_READ_TIMEOUT: - stream_set_timeout($this->source,$arg1,$arg2); + stream_set_timeout($this->source, $arg1, $arg2); break; case STREAM_OPTION_WRITE_BUFFER: - stream_set_write_buffer($this->source,$arg1,$arg2); + stream_set_write_buffer($this->source, $arg1, $arg2); } } @@ -145,7 +145,7 @@ class OC_CryptStream{ } public function stream_lock($mode) { - flock($this->source,$mode); + flock($this->source, $mode); } public function stream_flush() { @@ -159,7 +159,7 @@ class OC_CryptStream{ private function flush() { if($this->writeCache) { $encrypted=OC_Crypt::encrypt($this->writeCache); - fwrite($this->source,$encrypted); + fwrite($this->source, $encrypted); $this->writeCache=''; } } @@ -167,7 +167,7 @@ class OC_CryptStream{ public function stream_close() { $this->flush(); if($this->meta['mode']!='r' and $this->meta['mode']!='rb') { - \OC\Files\Filesystem::putFileInfo($this->path, array('encrypted'=>true,'size'=>$this->size),''); + \OC\Files\Filesystem::putFileInfo($this->path, array('encrypted' => true, 'size' => $this->size), ''); } return fclose($this->source); } diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index aafecdab672..26d24ceff03 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -25,8 +25,8 @@ class DAV extends \OC\Files\Storage\Common{ public function __construct($params) { $host = $params['host']; //remove leading http[s], will be generated in createBaseUri() - if (substr($host,0,8) == "https://") $host = substr($host, 8); - else if (substr($host,0,7) == "http://") $host = substr($host, 7); + if (substr($host, 0, 8) == "https://") $host = substr($host, 8); + else if (substr($host, 0, 7) == "http://") $host = substr($host, 7); $this->host=$host; $this->user=$params['user']; $this->password=$params['password']; @@ -35,7 +35,7 @@ class DAV extends \OC\Files\Storage\Common{ if(!$this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } - if(substr($this->root,-1,1)!='/') { + if(substr($this->root, -1, 1)!='/') { $this->root.='/'; } } @@ -80,20 +80,20 @@ class DAV extends \OC\Files\Storage\Common{ public function mkdir($path) { $this->init(); $path=$this->cleanPath($path); - return $this->simpleResponse('MKCOL',$path, null,201); + return $this->simpleResponse('MKCOL', $path, null, 201); } public function rmdir($path) { $this->init(); $path=$this->cleanPath($path); - return $this->simpleResponse('DELETE',$path, null,204); + return $this->simpleResponse('DELETE', $path, null, 204); } public function opendir($path) { $this->init(); $path=$this->cleanPath($path); try{ - $response=$this->client->propfind($path, array(),1); + $response=$this->client->propfind($path, array(), 1); $id=md5('webdav'.$this->root.$path); \OC_FakeDirStream::$dirs[$id]=array(); $files=array_keys($response); @@ -158,7 +158,7 @@ class DAV extends \OC\Files\Storage\Common{ //straight up curl instead of sabredav here, sabredav put's the entire get result in memory $curl = curl_init(); $fp = fopen('php://temp', 'r+'); - curl_setopt($curl,CURLOPT_USERPWD,$this->user.':'.$this->password); + curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password); curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$path); curl_setopt($curl, CURLOPT_FILE, $fp); @@ -179,18 +179,18 @@ class DAV extends \OC\Files\Storage\Common{ case 'c': case 'c+': //emulate these - if(strrpos($path,'.')!==false) { - $ext=substr($path, strrpos($path,'.')); + if(strrpos($path, '.')!==false) { + $ext=substr($path, strrpos($path, '.')); }else{ $ext=''; } - $tmpFile=\OCP\Files::tmpFile($ext); - \OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this,'writeBack'); + $tmpFile = \OCP\Files::tmpFile($ext); + \OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack'); if($this->file_exists($path)) { - $this->getFile($path,$tmpFile); + $this->getFile($path, $tmpFile); } self::$tempFiles[$tmpFile]=$path; - return fopen('close://'.$tmpFile,$mode); + return fopen('close://'.$tmpFile, $mode); } } @@ -233,10 +233,10 @@ class DAV extends \OC\Files\Storage\Common{ public function uploadFile($path,$target) { $this->init(); - $source=fopen($path,'r'); + $source=fopen($path, 'r'); $curl = curl_init(); - curl_setopt($curl,CURLOPT_USERPWD,$this->user.':'.$this->password); + curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password); curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$target); curl_setopt($curl, CURLOPT_BINARYTRANSFER, true); curl_setopt($curl, CURLOPT_INFILE, $source); // file pointer @@ -305,7 +305,7 @@ class DAV extends \OC\Files\Storage\Common{ private function cleanPath($path) { if(!$path || $path[0]=='/') { - return substr($path,1); + return substr($path, 1); }else{ return $path; } @@ -314,7 +314,7 @@ class DAV extends \OC\Files\Storage\Common{ private function simpleResponse($method,$path,$body,$expected) { $path=$this->cleanPath($path); try{ - $response=$this->client->request($method,$path,$body); + $response=$this->client->request($method, $path, $body); return $response['statusCode']==$expected; }catch(\Exception $e) { return false; diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 72663c068c9..7eb086712f4 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -1,36 +1,8 @@ $(document).ready(function() { if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !publicListView) { - OC.Share.loadIcons('file'); - FileActions.register('all', 'Share', OC.PERMISSION_READ, function(filename) { - // Return the correct sharing icon - if (scanFiles.scanning) { return; } // workaround to prevent additional http request block scanning feedback - if ($('#dir').val() == '/') { - var item = $('#dir').val() + filename; - } else { - var item = $('#dir').val() + '/' + filename; - } - // Check if status is in cache - if (OC.Share.statuses[item] === true) { - return OC.imagePath('core', 'actions/public'); - } else if (OC.Share.statuses[item] === false) { - return OC.imagePath('core', 'actions/shared'); - } else { - var last = ''; - var path = OC.Share.dirname(item); - // Search for possible parent folders that are shared - while (path != last) { - if (OC.Share.statuses[path] === true) { - return OC.imagePath('core', 'actions/public'); - } else if (OC.Share.statuses[path] === false) { - return OC.imagePath('core', 'actions/shared'); - } - last = path; - path = OC.Share.dirname(path); - } - return OC.imagePath('core', 'actions/share'); - } - }, function(filename) { + + FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) { if ($('#dir').val() == '/') { var item = $('#dir').val() + filename; } else { @@ -59,6 +31,8 @@ $(document).ready(function() { OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions); } }); + OC.Share.loadIcons('file'); } + });
\ No newline at end of file diff --git a/apps/files_sharing/l10n/et_EE.php b/apps/files_sharing/l10n/et_EE.php index 94b9b1d7aef..36290ad2787 100644 --- a/apps/files_sharing/l10n/et_EE.php +++ b/apps/files_sharing/l10n/et_EE.php @@ -1,6 +1,8 @@ <?php $TRANSLATIONS = array( "Password" => "Parool", "Submit" => "Saada", +"%s shared the folder %s with you" => "%s jagas sinuga kausta %s", +"%s shared the file %s with you" => "%s jagas sinuga faili %s", "Download" => "Lae alla", "No preview available for" => "Eelvaadet pole saadaval", "web services under your control" => "veebitenused sinu kontrolli all" diff --git a/apps/user_ldap/l10n/et_EE.php b/apps/user_ldap/l10n/et_EE.php index f83142225e2..9752d73c1c0 100644 --- a/apps/user_ldap/l10n/et_EE.php +++ b/apps/user_ldap/l10n/et_EE.php @@ -1,9 +1,14 @@ <?php $TRANSLATIONS = array( "Host" => "Host", +"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Sa ei saa protokolli ära jätta, välja arvatud siis, kui sa nõuad SSL-ühendust. Sel juhul alusta eesliitega ldaps://", "Base DN" => "Baas DN", +"You can specify Base DN for users and groups in the Advanced tab" => "Sa saad kasutajate ja gruppide baas DN-i määrata lisavalikute vahekaardilt", "User DN" => "Kasutaja 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." => "Klientkasutaja DN, kellega seotakse, nt. uid=agent,dc=näidis,dc=com. Anonüümseks ligipääsuks jäta DN ja parool tühjaks.", "Password" => "Parool", +"For anonymous access, leave DN and Password empty." => "Anonüümseks ligipääsuks jäta DN ja parool tühjaks.", "User Login Filter" => "Kasutajanime filter", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Määrab sisselogimisel kasutatava filtri. %%uid asendab sisselogimistegevuses kasutajanime.", "use %%uid placeholder, e.g. \"uid=%%uid\"" => "kasuta %%uid kohatäitjat, nt. \"uid=%%uid\"", "User List Filter" => "Kasutajate nimekirja filter", "Defines the filter to apply, when retrieving users." => "Määrab kasutajaid hankides filtri, mida rakendatakse.", @@ -19,6 +24,7 @@ "Do not use it for SSL connections, it will fail." => "Ära kasuta seda SSL ühenduse jaoks, see ei toimi.", "Case insensitve LDAP server (Windows)" => "Mittetõstutundlik LDAP server (Windows)", "Turn off SSL certificate validation." => "Lülita SSL sertifikaadi kontrollimine välja.", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Kui ühendus toimib ainult selle valikuga, siis impordi LDAP serveri SSL sertifikaat oma ownCloud serverisse.", "Not recommended, use for testing only." => "Pole soovitatav, kasuta ainult testimiseks.", "User Display Name Field" => "Kasutaja näidatava nime väli", "The LDAP attribute to use to generate the user`s ownCloud name." => "LDAP omadus, mida kasutatakse kasutaja ownCloudi nime loomiseks.", |