Merge branch 'master' into mobile-style

Conflicts:
	apps/files/js/files.js
	apps/files_sharing/css/public.css
	apps/files_sharing/js/public.js
	apps/files_sharing/templates/public.php
This commit is contained in:
Thomas Müller 2014-01-23 00:39:11 +01:00
commit f950ce82ae
105 changed files with 1037 additions and 3719 deletions

@ -1 +1 @@
Subproject commit 95ab25149c4903650a1113c01ccb1732fb089f14
Subproject commit 7c2c94c904c2721763e97d5bafd115f863080a60

View File

@ -34,6 +34,7 @@ if (empty($_POST['dirToken'])) {
// resolve reshares
$rootLinkItem = OCP\Share::resolveReShare($linkItem);
OCP\JSON::checkUserExists($rootLinkItem['uid_owner']);
// Setup FS with owner
OC_Util::tearDownFS();
OC_Util::setupFS($rootLinkItem['uid_owner']);

View File

@ -222,6 +222,14 @@ $(document).ready(function() {
//examine file
var file = data.files[0];
try {
// FIXME: not so elegant... need to refactor that method to return a value
Files.isFileNameValid(file.name);
}
catch (errorMessage) {
data.textStatus = 'invalidcharacters';
data.errorThrown = errorMessage;
}
if (file.type === '' && file.size === 4096) {
data.textStatus = 'dirorzero';
@ -605,7 +613,7 @@ $(document).ready(function() {
if (result.status === 'success') {
var date=new Date();
FileList.addDir(name, 0, date, hidden);
var tr=$('tr[data-file="'+name+'"]');
var tr = FileList.findFileEl(name);
tr.attr('data-id', result.data.id);
} else {
OC.dialogs.alert(result.data.message, t('core', 'Could not create folder'));
@ -647,7 +655,7 @@ $(document).ready(function() {
$('#uploadprogressbar').fadeOut();
var date = new Date();
FileList.addFile(localName, size, date, false, hidden);
var tr = $('tr[data-file="'+localName+'"]');
var tr = FileList.findFileEl(localName);
tr.data('mime', mime).data('id', id);
tr.attr('data-id', id);
var path = $('#dir').val()+'/'+localName;

View File

@ -71,7 +71,7 @@ var FileActions = {
FileActions.currentFile = parent;
var actions = FileActions.get(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions());
var file = FileActions.getCurrentFile();
if ($('tr[data-file="'+file+'"]').data('renaming')) {
if (FileList.findFileEl(file).data('renaming')) {
return;
}

View File

@ -6,6 +6,13 @@ var FileList={
$(this).attr('data-file',decodeURIComponent($(this).attr('data-file')));
});
},
/**
* Returns the tr element for a given file name
*/
findFileEl: function(fileName){
// use filterAttr to avoid escaping issues
return $('#fileList tr').filterAttr('data-file', fileName);
},
update:function(fileListHtml) {
var $fileList = $('#fileList');
$fileList.empty().html(fileListHtml);
@ -20,6 +27,8 @@ var FileList={
Files.setupDragAndDrop();
}
FileList.updateFileSummary();
procesSelection();
$fileList.trigger(jQuery.Event("updated"));
},
createRow:function(type, name, iconurl, linktarget, size, lastModified, permissions) {
@ -292,8 +301,12 @@ var FileList={
$('#filestable').toggleClass('hidden', show);
},
remove:function(name){
$('tr').filterAttr('data-file',name).find('td.filename').draggable('destroy');
$('tr').filterAttr('data-file',name).remove();
var fileEl = FileList.findFileEl(name);
if (fileEl.data('permissions') & OC.PERMISSION_DELETE) {
// file is only draggable when delete permissions are set
fileEl.find('td.filename').draggable('destroy');
}
fileEl.remove();
FileList.updateFileSummary();
if ( ! $('tr[data-file]').exists() ) {
$('#emptycontent').removeClass('hidden');
@ -334,7 +347,7 @@ var FileList={
FileList.updateFileSummary();
},
loadingDone:function(name, id) {
var mime, tr = $('tr[data-file="'+name+'"]');
var mime, tr = FileList.findFileEl(name);
tr.data('loading', false);
mime = tr.data('mime');
tr.attr('data-mime', mime);
@ -347,12 +360,12 @@ var FileList={
}, null, null, tr.attr('data-etag'));
tr.find('td.filename').draggable(dragOptions);
},
isLoading:function(name) {
return $('tr[data-file="'+name+'"]').data('loading');
isLoading:function(file) {
return FileList.findFileEl(file).data('loading');
},
rename:function(oldname) {
var tr, td, input, form;
tr = $('tr[data-file="'+oldname+'"]');
tr = FileList.findFileEl(oldname);
tr.data('renaming',true);
td = tr.children('td.filename');
input = $('<input type="text" class="filename"/>').val(oldname);
@ -500,14 +513,16 @@ var FileList={
form.trigger('submit');
});
},
inList:function(filename) {
return $('#fileList tr[data-file="'+filename+'"]').length;
inList:function(file) {
return FileList.findFileEl(file).length;
},
replace:function(oldName, newName, isNewFile) {
// Finish any existing actions
$('tr[data-file="'+oldName+'"]').hide();
$('tr[data-file="'+newName+'"]').hide();
var tr = $('tr[data-file="'+oldName+'"]').clone();
var oldFileEl = FileList.findFileEl(oldName);
var newFileEl = FileList.findFileEl(newName);
oldFileEl.hide();
newFileEl.hide();
var tr = oldFileEl.clone();
tr.attr('data-replace', 'true');
tr.attr('data-file', newName);
var td = tr.children('td.filename');
@ -559,7 +574,7 @@ var FileList={
files=[files];
}
for (var i=0; i<files.length; i++) {
var deleteAction = $('tr[data-file="'+files[i]+'"]').children("td.date").children(".action.delete");
var deleteAction = FileList.findFileEl(files[i]).children("td.date").children(".action.delete");
deleteAction.removeClass('delete-icon').addClass('progress-icon');
}
// Finish any existing actions
@ -573,7 +588,7 @@ var FileList={
function(result) {
if (result.status === 'success') {
$.each(files,function(index,file) {
var files = $('tr[data-file="'+file+'"]');
var files = FileList.findFileEl(file);
files.remove();
files.find('input[type="checkbox"]').removeAttr('checked');
files.removeClass('selected');
@ -595,7 +610,7 @@ var FileList={
OC.Notification.hide();
}, 10000);
$.each(files,function(index,file) {
var deleteAction = $('tr[data-file="' + file + '"] .action.delete');
var deleteAction = FileList.findFileEl(file).find('.action.delete');
deleteAction.removeClass('progress-icon').addClass('delete-icon');
});
}
@ -737,7 +752,7 @@ var FileList={
},
scrollTo:function(file) {
//scroll to and highlight preselected file
var $scrolltorow = $('tr[data-file="'+file+'"]');
var $scrolltorow = FileList.findFileEl(file);
if ($scrolltorow.exists()) {
$scrolltorow.addClass('searchresult');
$(window).scrollTop($scrolltorow.position().top);
@ -949,7 +964,7 @@ $(document).ready(function() {
$('#notification').on('click', '.undo', function() {
if (FileList.deleteFiles) {
$.each(FileList.deleteFiles,function(index,file) {
$('tr[data-file="'+file+'"]').show();
FileList.findFileEl(file).show();
});
FileList.deleteCanceled=true;
FileList.deleteFiles=null;
@ -959,10 +974,10 @@ $(document).ready(function() {
FileList.deleteCanceled = false;
FileList.deleteFiles = [FileList.replaceOldName];
} else {
$('tr[data-file="'+FileList.replaceOldName+'"]').show();
FileList.findFileEl(FileList.replaceOldName).show();
}
$('tr[data-replace="true"').remove();
$('tr[data-file="'+FileList.replaceNewName+'"]').show();
FileList.findFileEl(FileList.replaceNewName).show();
FileList.replaceCanceled = true;
FileList.replaceOldName = null;
FileList.replaceNewName = null;
@ -977,7 +992,8 @@ $(document).ready(function() {
});
});
$('#notification:first-child').on('click', '.suggest', function() {
$('tr[data-file="'+$('#notification > span').attr('data-oldName')+'"]').show();
var file = $('#notification > span').attr('data-oldName');
FileList.findFileEl(file).show();
OC.Notification.hide();
});
$('#notification:first-child').on('click', '.cancel', function() {

View File

@ -282,7 +282,7 @@ $(document).ready(function() {
procesSelection();
} else {
var filename=$(this).parent().parent().attr('data-file');
var tr=$('tr[data-file="'+filename+'"]');
var tr = FileList.findFileEl(filename);
var renaming=tr.data('renaming');
if (!renaming && !FileList.isLoading(filename)) {
FileActions.currentFile = $(this).parent();
@ -541,10 +541,12 @@ var folderDropOptions={
if (result) {
if (result.status === 'success') {
//recalculate folder size
var oldSize = $('#fileList tr[data-file="'+target+'"]').data('size');
var newSize = oldSize + $('#fileList tr[data-file="'+file+'"]').data('size');
$('#fileList tr[data-file="'+target+'"]').data('size', newSize);
$('#fileList tr[data-file="'+target+'"]').find('td.filesize').text(humanFileSize(newSize));
var oldFile = FileList.findFileEl(target);
var newFile = FileList.findFileEl(file);
var oldSize = oldFile.data('size');
var newSize = oldSize + newFile.data('size');
oldFile.data('size', newSize);
oldFile.find('td.filesize').text(humanFileSize(newSize));
FileList.remove(file);
procesSelection();
@ -610,11 +612,12 @@ function procesSelection() {
return el.type==='dir';
});
if (selectedFiles.length === 0 && selectedFolders.length === 0) {
$('#headerName>span.name').text(t('files','Name'));
$('#headerName span.name').text(t('files','Name'));
$('#headerSize').text(t('files','Size'));
$('#modified').text(t('files','Modified'));
$('table').removeClass('multiselect');
$('.selectedActions').hide();
$('#select_all').removeAttr('checked');
}
else {
$('.selectedActions').show();
@ -738,7 +741,7 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) {
}
function getUniqueName(name) {
if ($('tr[data-file="'+name+'"]').exists()) {
if (FileList.findFileEl(name).exists()) {
var parts=name.split('.');
var extension = "";
if (parts.length > 1) {

View File

@ -1,21 +0,0 @@
<?php
$TRANSLATIONS = array(
"File name cannot be empty." => "Имя файла не может быть пустым.",
"Files" => "Файлы",
"Share" => "Сделать общим",
"Rename" => "Переименовать",
"_%n folder_::_%n folders_" => array("","",""),
"_%n file_::_%n files_" => array("","",""),
"_Uploading %n file_::_Uploading %n files_" => array("","",""),
"'.' is an invalid file name." => "'.' является неверным именем файла.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Некорректное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' не допустимы.",
"Error" => "Ошибка",
"Size" => "Размер",
"Upload" => "Загрузка",
"0 is unlimited" => "0 без ограничений",
"Save" => "Сохранить",
"Cancel upload" => "Отмена загрузки",
"Download" => "Загрузка",
"Delete" => "Удалить"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -1,6 +1,10 @@
<div class="crumb <?php if(!count($_["breadcrumb"])) p('last');?>" data-dir=''>
<a href="<?php print_unescaped($_['baseURL']); ?>">
<img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" />
<?php if(isset($_['rootBreadCrumb'])):
echo $_['rootBreadCrumb'];
else:?>
<img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" />
<?php endif;?>
</a>
</div>
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):

View File

@ -18,7 +18,7 @@ $totalsize = 0; ?>
data-size="<?php p($file['size']);?>"
data-etag="<?php p($file['etag']);?>"
data-permissions="<?php p($file['permissions']); ?>">
<?php if($file['isPreviewAvailable']): ?>
<?php if(isset($file['isPreviewAvailable']) and $file['isPreviewAvailable']): ?>
<td class="filename svg preview-icon"
<?php else: ?>
<td class="filename svg"

View File

@ -6,6 +6,7 @@ if (OC::$CLI) {
if (count($argv) === 2) {
$file = $argv[1];
list(, $user) = explode('/', $file);
OCP\JSON::checkUserExists($owner);
OC_Util::setupFS($user);
$view = new \OC\Files\View('');
/**

View File

@ -2,11 +2,15 @@
<info>
<id>files_encryption</id>
<name>Encryption</name>
<description>The new ownCloud 5 files encryption system. After the app was enabled you need to re-login to initialize your encryption keys.</description>
<description>The ownCloud files encryption system provides server side-encryption. After the app was enabled you need to re-login to initialize your encryption keys.</description>
<licence>AGPL</licence>
<author>Sam Tuke, Bjoern Schiessle, Florin Peter</author>
<require>4</require>
<shipped>true</shipped>
<documentation>
<user>http://doc.owncloud.org/server/6.0/user_manual/files/encryption.html</user>
<admin>http://doc.owncloud.org/server/6.0/admin_manual/configuration/configuration_encryption.html</admin>
</documentation>
<rememberlogin>false</rememberlogin>
<types>
<filesystem/>

View File

@ -255,8 +255,8 @@ class Proxy extends \OC_FileProxy {
// split the path parts
$pathParts = explode('/', $path);
// FIXME: handling for /userId/cache used by webdav for chunking. The cache chunks are NOT encrypted
if (isset($pathParts[2]) && $pathParts[2] === 'cache') {
// don't try to encrypt/decrypt cache chunks or files in the trash bin
if (isset($pathParts[2]) && ($pathParts[2] === 'cache' || $pathParts[2] === 'files_trashbin')) {
return $result;
}

View File

@ -155,7 +155,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
*/
function testSymmetricStreamEncryptShortFileContent() {
$filename = 'tmp-' . time() . '.test';
$filename = 'tmp-' . uniqid() . '.test';
$util = new Encryption\Util(new \OC_FilesystemView(), $this->userId);
@ -214,7 +214,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
function testSymmetricStreamEncryptLongFileContent() {
// Generate a a random filename
$filename = 'tmp-' . time() . '.test';
$filename = 'tmp-' . uniqid() . '.test';
$util = new Encryption\Util(new \OC_FilesystemView(), $this->userId);
@ -297,7 +297,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
*/
function testSymmetricStreamDecryptShortFileContent() {
$filename = 'tmp-' . time();
$filename = 'tmp-' . uniqid();
// Save long data as encrypted file using stream wrapper
$cryptedFile = file_put_contents('crypt:///'. $this->userId . '/files/' . $filename, $this->dataShort);
@ -327,7 +327,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
*/
function testSymmetricStreamDecryptLongFileContent() {
$filename = 'tmp-' . time();
$filename = 'tmp-' . uniqid();
// Save long data as encrypted file using stream wrapper
$cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong);
@ -418,7 +418,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
*/
function testRenameFile() {
$filename = 'tmp-' . time();
$filename = 'tmp-' . uniqid();
// Save long data as encrypted file using stream wrapper
$cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong);
@ -431,7 +431,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
$this->assertEquals($this->dataLong, $decrypt);
$newFilename = 'tmp-new-' . time();
$newFilename = 'tmp-new-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
$view->rename($filename, $newFilename);
@ -449,7 +449,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
*/
function testMoveFileIntoFolder() {
$filename = 'tmp-' . time();
$filename = 'tmp-' . uniqid();
// Save long data as encrypted file using stream wrapper
$cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong);
@ -462,8 +462,8 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
$this->assertEquals($this->dataLong, $decrypt);
$newFolder = '/newfolder' . time();
$newFilename = 'tmp-new-' . time();
$newFolder = '/newfolder' . uniqid();
$newFilename = 'tmp-new-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
$view->mkdir($newFolder);
$view->rename($filename, $newFolder . '/' . $newFilename);
@ -484,8 +484,8 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
$view = new \OC\Files\View('/' . $this->userId . '/files');
$filename = '/tmp-' . time();
$folder = '/folder' . time();
$filename = '/tmp-' . uniqid();
$folder = '/folder' . uniqid();
$view->mkdir($folder);
@ -500,7 +500,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
$this->assertEquals($this->dataLong, $decrypt);
$newFolder = '/newfolder/subfolder' . time();
$newFolder = '/newfolder/subfolder' . uniqid();
$view->mkdir('/newfolder');
$view->rename($folder, $newFolder);
@ -519,7 +519,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
* @medium
*/
function testChangePassphrase() {
$filename = 'tmp-' . time();
$filename = 'tmp-' . uniqid();
// Save long data as encrypted file using stream wrapper
$cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong);
@ -557,7 +557,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
*/
function testViewFilePutAndGetContents() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
// Save short data as encrypted file using stream wrapper
@ -590,7 +590,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
* @large
*/
function testTouchExistingFile() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
// Save short data as encrypted file using stream wrapper
@ -614,7 +614,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
* @medium
*/
function testTouchFile() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
$view->touch($filename);
@ -638,7 +638,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
* @medium
*/
function testFopenFile() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
// Save short data as encrypted file using stream wrapper

View File

@ -143,7 +143,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
$key = $this->randomKey;
$file = 'unittest-' . time() . '.txt';
$file = 'unittest-' . uniqid() . '.txt';
$util = new Encryption\Util($this->view, $this->userId);
@ -196,7 +196,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
function testRecursiveDelShareKeys() {
// generate filename
$filename = '/tmp-' . time() . '.txt';
$filename = '/tmp-' . uniqid() . '.txt';
// create folder structure
$this->view->mkdir('/'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1');

View File

@ -80,7 +80,7 @@ class Test_Encryption_Proxy extends \PHPUnit_Framework_TestCase {
// init short data
$this->data = 'hats';
$this->filename = 'enc_proxy_tests-' . time() . '.txt';
$this->filename = 'enc_proxy_tests-' . uniqid() . '.txt';
}

View File

@ -99,7 +99,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase {
}
function testStreamOptions() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
// Save short data as encrypted file using stream wrapper
@ -122,7 +122,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase {
}
function testStreamSetBlocking() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
// Save short data as encrypted file using stream wrapper
@ -144,7 +144,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase {
* @medium
*/
function testStreamSetTimeout() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
// Save short data as encrypted file using stream wrapper
@ -163,7 +163,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase {
}
function testStreamSetWriteBuffer() {
$filename = '/tmp-' . time();
$filename = '/tmp-' . uniqid();
$view = new \OC\Files\View('/' . $this->userId . '/files');
// Save short data as encrypted file using stream wrapper
@ -187,9 +187,9 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase {
*/
function testStreamFromLocalFile() {
$filename = '/' . $this->userId . '/files/' . 'tmp-' . time().'.txt';
$filename = '/' . $this->userId . '/files/' . 'tmp-' . uniqid().'.txt';
$tmpFilename = "/tmp/" . time() . ".txt";
$tmpFilename = "/tmp/" . uniqid() . ".txt";
// write an encrypted file
$cryptedFile = $this->view->file_put_contents($filename, $this->dataShort);

View File

@ -119,7 +119,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase {
function testDeleteFile() {
// generate filename
$filename = 'tmp-' . time() . '.txt';
$filename = 'tmp-' . uniqid() . '.txt';
// save file with content
$cryptedFile = file_put_contents('crypt:///' .\Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1. '/files/'. $filename, $this->dataShort);
@ -223,7 +223,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase {
function testPermanentDeleteFile() {
// generate filename
$filename = 'tmp-' . time() . '.txt';
$filename = 'tmp-' . uniqid() . '.txt';
// save file with content
$cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/' . $filename, $this->dataShort);

View File

@ -142,8 +142,8 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
self::loginHelper($this->userId);
$unencryptedFile = '/tmpUnencrypted-' . time() . '.txt';
$encryptedFile = '/tmpEncrypted-' . time() . '.txt';
$unencryptedFile = '/tmpUnencrypted-' . uniqid() . '.txt';
$encryptedFile = '/tmpEncrypted-' . uniqid() . '.txt';
// Disable encryption proxy to write a unencrypted file
$proxyStatus = \OC_FileProxy::$enabled;
@ -254,7 +254,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
\OC_User::setUserId(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
$filename = '/tmp-' . time() . '.test';
$filename = '/tmp-' . uniqid() . '.test';
// Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled;
@ -282,7 +282,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
function testGetFileSize() {
\Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
$filename = 'tmp-' . time();
$filename = 'tmp-' . uniqid();
$externalFilename = '/' . $this->userId . '/files/' . $filename;
// Test for 0 byte files
@ -318,7 +318,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
function testEncryptAll() {
$filename = "/encryptAll" . time() . ".txt";
$filename = "/encryptAll" . uniqid() . ".txt";
$util = new Encryption\Util($this->view, $this->userId);
// disable encryption to upload a unencrypted file
@ -350,7 +350,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
function testDecryptAll() {
$filename = "/decryptAll" . time() . ".txt";
$filename = "/decryptAll" . uniqid() . ".txt";
$util = new Encryption\Util($this->view, $this->userId);
$this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);

View File

@ -113,7 +113,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase {
function testWebdavPUT() {
// generate filename
$filename = '/tmp-' . time() . '.txt';
$filename = '/tmp-' . uniqid() . '.txt';
// set server vars
$_SERVER['REQUEST_METHOD'] = 'OPTIONS';

View File

@ -130,7 +130,7 @@ class smb {
// this put env is necessary to read the output of smbclient correctly
$old_locale = getenv('LC_ALL');
putenv('LC_ALL=en_US.UTF-8');
$output = popen (SMB4PHP_SMBCLIENT." -N {$auth} {$options} {$port} {$options} {$params} 2>/dev/null", 'r');
$output = popen ('TZ=UTC '.SMB4PHP_SMBCLIENT." -N {$auth} {$options} {$port} {$options} {$params} 2>/dev/null", 'r');
$gotInfo = false;
$info = array ();
$info['info']= array ();

View File

@ -23,9 +23,12 @@ $(document).ready(function() {
$(token).val(result.access_token);
$(token_secret).val(result.access_token_secret);
$(configured).val('true');
OC.MountConfig.saveStorage(tr);
$(tr).find('.configuration input').attr('disabled', 'disabled');
$(tr).find('.configuration').append('<span id="access" style="padding-left:0.5em;">'+t('files_external', 'Access granted')+'</span>');
OC.MountConfig.saveStorage(tr, function(status) {
if (status) {
$(tr).find('.configuration input').attr('disabled', 'disabled');
$(tr).find('.configuration').append('<span id="access" style="padding-left:0.5em;">'+t('files_external', 'Access granted')+'</span>');
}
});
} else {
OC.dialogs.alert(result.data.message, t('files_external', 'Error configuring Dropbox storage'));
}
@ -77,7 +80,6 @@ $(document).ready(function() {
var tr = $(this).parent().parent();
var app_key = $(this).parent().find('[data-parameter="app_key"]').val();
var app_secret = $(this).parent().find('[data-parameter="app_secret"]').val();
var statusSpan = $(tr).find('.status span');
if (app_key != '' && app_secret != '') {
var tr = $(this).parent().parent();
var configured = $(this).parent().find('[data-parameter="configured"]');
@ -88,10 +90,9 @@ $(document).ready(function() {
$(configured).val('false');
$(token).val(result.data.request_token);
$(token_secret).val(result.data.request_token_secret);
OC.MountConfig.saveStorage(tr);
statusSpan.removeClass();
statusSpan.addClass('waiting');
window.location = result.data.url;
OC.MountConfig.saveStorage(tr, function() {
window.location = result.data.url;
});
} else {
OC.dialogs.alert(result.data.message, t('files_external', 'Error configuring Dropbox storage'));
}

View File

@ -32,11 +32,14 @@ $(document).ready(function() {
if (result && result.status == 'success') {
$(token).val(result.data.token);
$(configured).val('true');
OC.MountConfig.saveStorage(tr);
$(tr).find('.configuration input').attr('disabled', 'disabled');
$(tr).find('.configuration').append($('<span/>')
.attr('id', 'access')
.text(t('files_external', 'Access granted')));
OC.MountConfig.saveStorage(tr, function(status) {
if (status) {
$(tr).find('.configuration input').attr('disabled', 'disabled');
$(tr).find('.configuration').append($('<span/>')
.attr('id', 'access')
.text(t('files_external', 'Access granted')));
}
});
} else {
OC.dialogs.alert(result.data.message,
t('files_external', 'Error configuring Google Drive storage')
@ -99,7 +102,6 @@ $(document).ready(function() {
var configured = $(this).parent().find('[data-parameter="configured"]');
var client_id = $(this).parent().find('[data-parameter="client_id"]').val();
var client_secret = $(this).parent().find('[data-parameter="client_secret"]').val();
var statusSpan = $(tr).find('.status span');
if (client_id != '' && client_secret != '') {
var token = $(this).parent().find('[data-parameter="token"]');
$.post(OC.filePath('files_external', 'ajax', 'google.php'),
@ -112,10 +114,9 @@ $(document).ready(function() {
if (result && result.status == 'success') {
$(configured).val('false');
$(token).val('false');
OC.MountConfig.saveStorage(tr);
statusSpan.removeClass();
statusSpan.addClass('waiting');
window.location = result.data.url;
OC.MountConfig.saveStorage(tr, function(status) {
window.location = result.data.url;
});
} else {
OC.dialogs.alert(result.data.message,
t('files_external', 'Error configuring Google Drive storage')

View File

@ -12,7 +12,7 @@ function updateStatus(statusEl, result){
}
OC.MountConfig={
saveStorage:function(tr) {
saveStorage:function(tr, callback) {
var mountPoint = $(tr).find('.mountPoint input').val();
if (mountPoint == '') {
return false;
@ -84,9 +84,15 @@ OC.MountConfig={
},
success: function(result) {
status = updateStatus(statusSpan, result);
if (callback) {
callback(status);
}
},
error: function(result){
status = updateStatus(statusSpan, result);
if (callback) {
callback(status);
}
}
});
});
@ -137,9 +143,15 @@ OC.MountConfig={
},
success: function(result) {
status = updateStatus(statusSpan, result);
if (callback) {
callback(status);
}
},
error: function(result){
status = updateStatus(statusSpan, result);
if (callback) {
callback(status);
}
}
});
}

View File

@ -1,6 +0,0 @@
<?php
$TRANSLATIONS = array(
"Options" => "Опции",
"Delete" => "Удалить"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -392,8 +392,7 @@ class OC_Mount_Config {
* @return array
*/
public static function getCertificates() {
$view = \OCP\Files::getStorage('files_external');
$path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/';
$path=OC_User::getHome(OC_User::getUser()) . '/files_external/uploads/';
\OCP\Util::writeLog('files_external', 'checking path '.$path, \OCP\Util::INFO);
if ( ! is_dir($path)) {
//path might not exist (e.g. non-standard OC_User::getHome() value)
@ -415,8 +414,7 @@ class OC_Mount_Config {
* creates certificate bundle
*/
public static function createCertificateBundle() {
$view = \OCP\Files::getStorage("files_external");
$path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("");
$path=OC_User::getHome(OC_User::getUser()) . '/files_external';
$certs = OC_Mount_Config::getCertificates();
$fh_certs = fopen($path."/rootcerts.crt", 'w');

View File

@ -14,6 +14,7 @@ class DAV extends \OC\Files\Storage\Common{
private $host;
private $secure;
private $root;
private $certPath;
private $ready;
/**
* @var \Sabre_DAV_Client
@ -40,6 +41,12 @@ class DAV extends \OC\Files\Storage\Common{
} else {
$this->secure = false;
}
if ($this->secure === true) {
$certPath=\OC_User::getHome(\OC_User::getUser()) . '/files_external/rootcerts.crt';
if (file_exists($certPath)) {
$this->certPath=$certPath;
}
}
$this->root=isset($params['root'])?$params['root']:'/';
if ( ! $this->root || $this->root[0]!='/') {
$this->root='/'.$this->root;
@ -58,20 +65,16 @@ class DAV extends \OC\Files\Storage\Common{
}
$this->ready = true;
$settings = array(
'baseUri' => $this->createBaseUri(),
'userName' => $this->user,
'password' => $this->password,
);
$settings = array(
'baseUri' => $this->createBaseUri(),
'userName' => $this->user,
'password' => $this->password,
);
$this->client = new \Sabre_DAV_Client($settings);
$caview = \OCP\Files::getStorage('files_external');
if ($caview) {
$certPath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("").'rootcerts.crt';
if (file_exists($certPath)) {
$this->client->addTrustedCertificates($certPath);
}
if ($this->secure === true && $this->certPath) {
$this->client->addTrustedCertificates($this->certPath);
}
}
@ -166,7 +169,14 @@ class DAV extends \OC\Files\Storage\Common{
curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().str_replace(' ', '%20', $path));
curl_setopt($curl, CURLOPT_FILE, $fp);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
if ($this->secure === true) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
if($this->certPath){
curl_setopt($curl, CURLOPT_CAINFO, $this->certPath);
}
}
curl_exec ($curl);
curl_close ($curl);
rewind($fp);
@ -214,7 +224,7 @@ class DAV extends \OC\Files\Storage\Common{
if (isset($response['{DAV:}quota-available-bytes'])) {
return (int)$response['{DAV:}quota-available-bytes'];
} else {
return 0;
return \OC\Files\SPACE_UNKNOWN;
}
} catch(\Exception $e) {
return \OC\Files\SPACE_UNKNOWN;
@ -254,6 +264,13 @@ class DAV extends \OC\Files\Storage\Common{
curl_setopt($curl, CURLOPT_INFILE, $source); // file pointer
curl_setopt($curl, CURLOPT_INFILESIZE, filesize($path));
curl_setopt($curl, CURLOPT_PUT, true);
if ($this->secure === true) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
if($this->certPath){
curl_setopt($curl, CURLOPT_CAINFO, $this->certPath);
}
}
curl_exec ($curl);
curl_close ($curl);
}
@ -331,3 +348,4 @@ class DAV extends \OC\Files\Storage\Common{
}
}
}

View File

@ -39,6 +39,7 @@ if(!isset($linkedItem['uid_owner']) || !isset($linkedItem['file_source'])) {
$rootLinkItem = OCP\Share::resolveReShare($linkedItem);
$userId = $rootLinkItem['uid_owner'];
OCP\JSON::checkUserExists($rootLinkItem['uid_owner']);
\OC_Util::setupFS($userId);
\OC\Files\Filesystem::initMountPoints($userId);
$view = new \OC\Files\View('/' . $userId . '/files');
@ -88,4 +89,4 @@ try{
} catch (\Exception $e) {
\OC_Response::setStatus(500);
\OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG);
}
}

View File

@ -44,6 +44,7 @@ if (version_compare($installedVersion, '0.3', '<')) {
$shareType = OCP\Share::SHARE_TYPE_USER;
$shareWith = $row['uid_shared_with'];
}
OCP\JSON::checkUserExists($row['uid_owner']);
OC_User::setUserId($row['uid_owner']);
//we need to setup the filesystem for the user, otherwise OC_FileSystem::getRoot will fail and break
OC_Util::setupFS($row['uid_owner']);

View File

@ -92,16 +92,24 @@ thead{
.directLink {
margin-bottom: 20px;
}
.directDownload .button img {
vertical-align: text-bottom;
}
.directLink label {
font-weight: normal;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
opacity: .5;
}
.directLink input {
margin-left: 5px;
width: 300px;
}
.directDownload .button img {
vertical-align: text-bottom;
}
.directLink label {
font-weight: normal;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
opacity: .5;
}
.directLink input {
margin-left: 5px;
width: 300px;
}
/*.directLink label {*/
/*font-weight: normal;*/
/*}*/
/*.directLink input {*/
/*margin-left: 10px;*/
/*width: 300px;*/
/*}*/

View File

@ -27,19 +27,19 @@ $(document).ready(function() {
}
}
FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename) {
var tr = $('tr').filterAttr('data-file', filename);
var tr = FileList.findFileEl(filename);
if (tr.length > 0) {
window.location = $(tr).find('a.name').attr('href');
}
});
FileActions.register('file', 'Download', OC.PERMISSION_READ, '', function(filename) {
var tr = $('tr').filterAttr('data-file', filename);
var tr = FileList.findFileEl(filename);
if (tr.length > 0) {
window.location = $(tr).find('a.name').attr('href');
}
});
FileActions.register('dir', 'Download', OC.PERMISSION_READ, '', function(filename) {
var tr = $('tr').filterAttr('data-file', filename);
var tr = FileList.findFileEl(filename);
if (tr.length > 0) {
window.location = $(tr).find('a.name').attr('href')+'&download';
}

View File

@ -22,7 +22,7 @@ $(document).ready(function() {
} else {
var item = $('#dir').val() + '/' + filename;
}
var tr = $('tr').filterAttr('data-file', filename);
var tr = FileList.findFileEl(filename);
if ($(tr).data('type') == 'dir') {
var itemType = 'folder';
} else {

View File

@ -1,8 +0,0 @@
<?php
$TRANSLATIONS = array(
"Password" => "Пароль",
"Download" => "Загрузка",
"Upload" => "Загрузка",
"Cancel upload" => "Отмена загрузки"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -172,7 +172,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
$source['fileOwner'] = $fileOwner;
return $source;
}
\OCP\Util::writeLog('files_sharing', 'File source not found for: '.$target, \OCP\Util::ERROR);
\OCP\Util::writeLog('files_sharing', 'File source not found for: '.$target, \OCP\Util::DEBUG);
return false;
}

View File

@ -279,14 +279,6 @@ class Shared extends \OC\Files\Storage\Common {
if ($this->isDeletable($path)) {
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
return $storage->unlink($internalPath);
} else if (dirname($path) == '/' || dirname($path) == '.') {
// Unshare the file from the user if in the root of the Shared folder
if ($this->is_dir($path)) {
$itemType = 'folder';
} else {
$itemType = 'file';
}
return \OCP\Share::unshareFromSelf($itemType, $path);
}
}
return false;

View File

@ -32,7 +32,7 @@ class Shared_Watcher extends Watcher {
* @param string $path
*/
public function checkUpdate($path) {
if ($path != '' && parent::checkUpdate($path)) {
if ($path != '' && parent::checkUpdate($path) === true) {
// since checkUpdate() has already updated the size of the subdirs,
// only apply the update to the owner's parent dirs

View File

@ -35,7 +35,7 @@ function determineIcon($file, $sharingRoot, $sharingToken) {
if (isset($_GET['t'])) {
$token = $_GET['t'];
$linkItem = OCP\Share::getShareByToken($token);
$linkItem = OCP\Share::getShareByToken($token, false);
if (is_array($linkItem) && isset($linkItem['uid_owner'])) {
// seems to be a valid share
$type = $linkItem['item_type'];
@ -43,10 +43,10 @@ if (isset($_GET['t'])) {
$shareOwner = $linkItem['uid_owner'];
$path = null;
$rootLinkItem = OCP\Share::resolveReShare($linkItem);
$fileOwner = $rootLinkItem['uid_owner'];
if (isset($fileOwner)) {
if (isset($rootLinkItem['uid_owner'])) {
OCP\JSON::checkUserExists($rootLinkItem['uid_owner']);
OC_Util::tearDownFS();
OC_Util::setupFS($fileOwner);
OC_Util::setupFS($rootLinkItem['uid_owner']);
$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
}
}
@ -111,6 +111,7 @@ if (isset($path)) {
}
}
$basePath = $path;
$rootName = basename($path);
if (isset($_GET['path']) && \OC\Files\Filesystem::isReadable($basePath . $_GET['path'])) {
$getPath = \OC\Files\Filesystem::normalizePath($_GET['path']);
$path .= $getPath;
@ -188,8 +189,8 @@ if (isset($path)) {
} else {
$i['extension'] = '';
}
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
}
$i['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($i['mimetype']);
$i['directory'] = $getPath;
$i['permissions'] = OCP\PERMISSION_READ;
$i['icon'] = determineIcon($i, $basePath, $token);
@ -216,6 +217,7 @@ if (isset($path)) {
$list->assign('sharingroot', $basePath);
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb);
$breadcrumbNav->assign('rootBreadCrumb', $rootName);
$breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path=');
$maxUploadFilesize=OCP\Util::maxUploadFilesize($path);
$fileHeader = (!isset($files) or count($files) > 0);

View File

@ -16,7 +16,7 @@
<div class="header-right">
<span id="details"><?php p($l->t('shared by %s', array($_['displayName']))) ?></span>
</div>
</div></header>
</header>
<div id="content">
<div id="preview">
<?php if (isset($_['folder'])): ?>

View File

@ -3,8 +3,8 @@ $(document).ready(function() {
if (typeof FileActions !== 'undefined') {
FileActions.register('all', 'Restore', OC.PERMISSION_READ, OC.imagePath('core', 'actions/history'), function(filename) {
var tr = $('tr').filterAttr('data-file', filename);
var deleteAction = $('tr').filterAttr('data-file', filename).children("td.date").children(".action.delete");
var tr = FileList.findFileEl(filename);
var deleteAction = tr.children("td.date").children(".action.delete");
deleteAction.removeClass('delete-icon').addClass('progress-icon');
disableActions();
$.post(OC.filePath('files_trashbin', 'ajax', 'undelete.php'),
@ -30,8 +30,8 @@ $(document).ready(function() {
return OC.imagePath('core', 'actions/delete');
}, function(filename) {
$('.tipsy').remove();
var tr = $('tr').filterAttr('data-file', filename);
var deleteAction = $('tr').filterAttr('data-file', filename).children("td.date").children(".action.delete");
var tr = FileList.findFileEl(filename);
var deleteAction = tr.children("td.date").children(".action.delete");
deleteAction.removeClass('delete-icon').addClass('progress-icon');
disableActions();
$.post(OC.filePath('files_trashbin', 'ajax', 'delete.php'),
@ -73,7 +73,7 @@ $(document).ready(function() {
var dirlisting = getSelectedFiles('dirlisting')[0];
disableActions();
for (var i = 0; i < files.length; i++) {
var deleteAction = $('tr').filterAttr('data-file', files[i]).children("td.date").children(".action.delete");
var deleteAction = FileList.findFileEl(files[i]).children("td.date").children(".action.delete");
deleteAction.removeClass('delete-icon').addClass('progress-icon');
}
@ -119,7 +119,7 @@ $(document).ready(function() {
}
else {
for (var i = 0; i < files.length; i++) {
var deleteAction = $('tr').filterAttr('data-file', files[i]).children("td.date").children(".action.delete");
var deleteAction = FileList.findFileEl(files[i]).children("td.date").children(".action.delete");
deleteAction.removeClass('delete-icon').addClass('progress-icon');
}
}
@ -169,7 +169,7 @@ $(document).ready(function() {
event.preventDefault();
}
var filename = $(this).parent().parent().attr('data-file');
var tr = $('tr').filterAttr('data-file',filename);
var tr = FileList.findFileEl(filename);
var renaming = tr.data('renaming');
if(!renaming && !FileList.isLoading(filename)){
if(mime.substr(0, 5) === 'text/'){ //no texteditor for now

View File

@ -1,6 +0,0 @@
<?php
$TRANSLATIONS = array(
"Error" => "Ошибка",
"Delete" => "Удалить"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -189,7 +189,7 @@ class Trashbin {
if ($rootView->is_dir($owner . '/files_versions/' . $ownerPath)) {
$size += self::calculateSize(new \OC\Files\View('/' . $owner . '/files_versions/' . $ownerPath));
if ($owner !== $user) {
$rootView->copy($owner . '/files_versions/' . $ownerPath, $owner . '/files_trashbin/versions/' . basename($ownerPath) . '.d' . $timestamp);
self::copy_recursive($owner . '/files_versions/' . $ownerPath, $owner . '/files_trashbin/versions/' . basename($ownerPath) . '.d' . $timestamp, $rootView);
}
$rootView->rename($owner . '/files_versions/' . $ownerPath, $user . '/files_trashbin/versions/' . $filename . '.d' . $timestamp);
} else if ($versions = \OCA\Files_Versions\Storage::getVersions($owner, $ownerPath)) {
@ -247,7 +247,7 @@ class Trashbin {
if ($rootView->is_dir($keyfile)) {
$size += self::calculateSize(new \OC\Files\View($keyfile));
if ($owner !== $user) {
$rootView->copy($keyfile, $owner . '/files_trashbin/keyfiles/' . basename($ownerPath) . '.d' . $timestamp);
self::copy_recursive($keyfile, $owner . '/files_trashbin/keyfiles/' . basename($ownerPath) . '.d' . $timestamp, $rootView);
}
$rootView->rename($keyfile, $user . '/files_trashbin/keyfiles/' . $filename . '.d' . $timestamp);
} else {
@ -265,7 +265,7 @@ class Trashbin {
if ($rootView->is_dir($sharekeys)) {
$size += self::calculateSize(new \OC\Files\View($sharekeys));
if ($owner !== $user) {
$rootView->copy($sharekeys, $owner . '/files_trashbin/share-keys/' . basename($ownerPath) . '.d' . $timestamp);
self::copy_recursive($sharekeys, $owner . '/files_trashbin/share-keys/' . basename($ownerPath) . '.d' . $timestamp, $rootView);
}
$rootView->rename($sharekeys, $user . '/files_trashbin/share-keys/' . $filename . '.d' . $timestamp);
} else {
@ -734,7 +734,7 @@ class Trashbin {
// calculate available space for trash bin
// subtract size of files and current trash bin size from quota
if ($softQuota) {
$rootInfo = $view->getFileInfo('/files/');
$rootInfo = $view->getFileInfo('/files/', false);
$free = $quota - $rootInfo['size']; // remaining free space for user
if ($free > 0) {
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $trashbinSize; // how much space can be used for versions

View File

@ -5,7 +5,8 @@ $source = $_GET['source'];
$start = $_GET['start'];
list ($uid, $filename) = OCA\Files_Versions\Storage::getUidAndFilename($source);
$count = 5; //show the newest revisions
if( ($versions = OCA\Files_Versions\Storage::getVersions($uid, $filename)) ) {
$versions = OCA\Files_Versions\Storage::getVersions($uid, $filename, $source);
if( $versions ) {
$endReached = false;
if (count($versions) <= $start+$count) {

View File

@ -12,18 +12,11 @@ if(!\OC_App::isEnabled('files_versions')){
}
$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
$user = array_key_exists('user', $_GET) ? $_GET['user'] : '';
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : 44;
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : 44;
$version = array_key_exists('version', $_GET) ? $_GET['version'] : '';
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
if($user === '') {
\OC_Response::setStatus(400); //400 Bad Request
\OC_Log::write('versions-preview', 'No user parameter was passed', \OC_Log::DEBUG);
exit;
}
if($file === '' && $version === '') {
\OC_Response::setStatus(400); //400 Bad Request
\OC_Log::write('versions-preview', 'No file parameter was passed', \OC_Log::DEBUG);
@ -36,7 +29,8 @@ if($maxX === 0 || $maxY === 0) {
exit;
}
try{
try {
list($user, $file) = \OCA\Files_Versions\Storage::getUidAndFilename($file);
$preview = new \OC\Preview($user, 'files_versions', $file.'.v'.$version);
$mimetype = \OC_Helper::getFileNameMimeType($file);
$preview->setMimetype($mimetype);

View File

@ -77,6 +77,7 @@ function goToVersionPage(url){
function createVersionsDropdown(filename, files) {
var start = 0;
var fileEl;
var html = '<div id="dropdown" class="drop drop-versions" data-file="'+escapeHTML(files)+'">';
html += '<div id="private">';
@ -86,8 +87,9 @@ function createVersionsDropdown(filename, files) {
html += '<input type="button" value="'+ t('files_versions', 'More versions...') + '" name="show-more-versions" id="show-more-versions" style="display: none;" />';
if (filename) {
$('tr').filterAttr('data-file',filename).addClass('mouseOver');
$(html).appendTo($('tr').filterAttr('data-file',filename).find('td.filename'));
fileEl = FileList.findFileEl(filename);
fileEl.addClass('mouseOver');
$(html).appendTo(fileEl.find('td.filename'));
} else {
$(html).appendTo($('thead .share'));
}
@ -138,7 +140,7 @@ function createVersionsDropdown(filename, files) {
var preview = '<img class="preview" src="'+revision.preview+'"/>';
var download ='<a href="' + path + "?file=" + files + '&revision=' + revision.version + '">';
var download ='<a href="' + path + "?file=" + encodeURIComponent(files) + '&revision=' + revision.version + '">';
download+='<img';
download+=' src="' + OC.imagePath('core', 'actions/download') + '"';
download+=' name="downloadVersion" />';
@ -146,8 +148,7 @@ function createVersionsDropdown(filename, files) {
download+='</a>';
var revert='<span class="revertVersion"';
revert+=' id="' + revision.version + '"';
revert+=' value="' + files + '">';
revert+=' id="' + revision.version + '">';
revert+='<img';
revert+=' src="' + OC.imagePath('core', 'actions/history') + '"';
revert+=' name="revertVersion"';
@ -156,14 +157,13 @@ function createVersionsDropdown(filename, files) {
var version=$('<li/>');
version.attr('value', revision.version);
version.html(preview + download + revert);
// add file here for proper name escaping
version.find('span.revertVersion').attr('value', files);
version.appendTo('#found_versions');
}
$('tr').filterAttr('data-file',filename).addClass('mouseOver');
$('#dropdown').show('blind');
}
$(this).click(

View File

@ -98,7 +98,6 @@ class Storage {
$files_view = new \OC\Files\View('/'.$uid .'/files');
$users_view = new \OC\Files\View('/'.$uid);
$versions_view = new \OC\Files\View('/'.$uid.'/files_versions');
// check if filename is a directory
if($files_view->is_dir($filename)) {
@ -132,7 +131,10 @@ class Storage {
\OC_FileProxy::$enabled = false;
// store a new version of a file
$users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename));
$mtime = $users_view->filemtime('files'.$filename);
$users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'. $mtime);
// call getFileInfo to enforce a file cache entry for the new version
$users_view->getFileInfo('files_versions'.$filename.'.v'.$mtime);
// reset proxy state
\OC_FileProxy::$enabled = $proxyStatus;
@ -259,11 +261,12 @@ 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
* @returns array
* @param string $uid user id from the owner of the file
* @param string $filename file to find versions of, relative to the user files dir
* @param string $userFullPath
* @returns array versions newest version first
*/
public static function getVersions($uid, $filename) {
public static function getVersions($uid, $filename, $userFullPath = '') {
$versions = array();
// fetch for old versions
$view = new \OC\Files\View('/' . $uid . '/' . self::VERSIONS_ROOT);
@ -284,7 +287,11 @@ class Storage {
$versions[$key]['cur'] = 0;
$versions[$key]['version'] = $version;
$versions[$key]['humanReadableTimestamp'] = self::getHumanReadableTimestamp($version);
$versions[$key]['preview'] = \OCP\Util::linkToRoute('core_ajax_versions_preview', array('file' => $filename, 'version' => $version, 'user' => $uid));
if (empty($userFullPath)) {
$versions[$key]['preview'] = '';
} else {
$versions[$key]['preview'] = \OCP\Util::linkToRoute('core_ajax_versions_preview', array('file' => $userFullPath, 'version' => $version));
}
$versions[$key]['path'] = $filename;
$versions[$key]['name'] = $versionedFile;
$versions[$key]['size'] = $file['size'];
@ -390,12 +397,13 @@ class Storage {
}
}
ksort($versions);
// newest version first
krsort($versions);
$result = array();
foreach ($versions as $key => $value) {
$size = $view->filesize($value['path']);
$size = $view->filesize(self::VERSIONS_ROOT.'/'.$value['path'].'.v'.$value['timestamp']);
$filename = $value['path'];
$result['all'][$key]['version'] = $value['timestamp'];
@ -410,6 +418,63 @@ class Storage {
return $result;
}
/**
* @brief get list of files we want to expire
* @param int $currentTime timestamp of current time
* @param array $versions list of versions
* @return array containing the list of to deleted versions and the size of them
*/
protected static function getExpireList($time, $versions) {
$size = 0;
$toDelete = array(); // versions we want to delete
$interval = 1;
$step = Storage::$max_versions_per_interval[$interval]['step'];
if (Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'] == -1) {
$nextInterval = -1;
} else {
$nextInterval = $time - Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'];
}
$firstVersion = reset($versions);
$firstKey = key($versions);
$prevTimestamp = $firstVersion['version'];
$nextVersion = $firstVersion['version'] - $step;
unset($versions[$firstKey]);
foreach ($versions as $key => $version) {
$newInterval = true;
while ($newInterval) {
if ($nextInterval == -1 || $prevTimestamp > $nextInterval) {
if ($version['version'] > $nextVersion) {
//distance between two version too small, mark to delete
$toDelete[$key] = $version['path'] . '.v' . $version['version'];
$size += $version['size'];
\OCP\Util::writeLog('files_versions', 'Mark to expire '. $version['path'] .' next version should be ' . $nextVersion . " or smaller. (prevTimestamp: " . $prevTimestamp . "; step: " . $step, \OCP\Util::DEBUG);
} else {
$nextVersion = $version['version'] - $step;
$prevTimestamp = $version['version'];
}
$newInterval = false; // version checked so we can move to the next one
} else { // time to move on to the next interval
$interval++;
$step = Storage::$max_versions_per_interval[$interval]['step'];
$nextVersion = $prevTimestamp - $step;
if (Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'] == -1) {
$nextInterval = -1;
} else {
$nextInterval = $time - Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'];
}
$newInterval = true; // we changed the interval -> check same version with new interval
}
}
}
return array($toDelete, $size);
}
/**
* @brief Erase a file's versions which exceed the set quota
*/
@ -443,7 +508,7 @@ class Storage {
// subtract size of files and current versions size from quota
if ($softQuota) {
$files_view = new \OC\Files\View('/'.$uid.'/files');
$rootInfo = $files_view->getFileInfo('/');
$rootInfo = $files_view->getFileInfo('/', false);
$free = $quota-$rootInfo['size']; // remaining free space for user
if ( $free > 0 ) {
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - ($versionsSize + $offset); // how much space can be used for versions
@ -454,33 +519,35 @@ class Storage {
$availableSpace = $quota - $offset;
}
// with the probability of 0.1% we reduce the number of all versions not only for the current file
$random = rand(0, 1000);
if ($random == 0) {
$allFiles = true;
} else {
$allFiles = false;
}
$allVersions = Storage::getVersions($uid, $filename);
$versionsByFile[$filename] = $allVersions;
$sizeOfDeletedVersions = self::delOldVersions($versionsByFile, $allVersions, $versionsFileview);
$time = time();
list($toDelete, $sizeOfDeletedVersions) = self::getExpireList($time, $allVersions);
$availableSpace = $availableSpace + $sizeOfDeletedVersions;
$versionsSize = $versionsSize - $sizeOfDeletedVersions;
// if still not enough free space we rearrange the versions from all files
if ($availableSpace <= 0 || $allFiles) {
if ($availableSpace <= 0) {
$result = Storage::getAllVersions($uid);
$versionsByFile = $result['by_file'];
$allVersions = $result['all'];
$sizeOfDeletedVersions = self::delOldVersions($versionsByFile, $allVersions, $versionsFileview);
foreach ($result['by_file'] as $versions) {
list($toDeleteNew, $size) = self::getExpireList($time, $versions);
$toDelete = array_merge($toDelete, $toDeleteNew);
$sizeOfDeletedVersions += $size;
}
$availableSpace = $availableSpace + $sizeOfDeletedVersions;
$versionsSize = $versionsSize - $sizeOfDeletedVersions;
}
foreach($toDelete as $key => $path) {
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $path));
$versionsFileview->unlink($path);
unset($allVersions[$key]); // update array with the versions we keep
\OCP\Util::writeLog('files_versions', "Expire: " . $path, \OCP\Util::DEBUG);
}
// Check if enough space is available after versions are rearranged.
// If not we delete the oldest versions until we meet the size limit for versions,
// but always keep the two latest versions
@ -490,6 +557,7 @@ class Storage {
$version = current($allVersions);
$versionsFileview->unlink($version['path'].'.v'.$version['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $version['path'].'.v'.$version['version']));
\OCP\Util::writeLog('files_versions', 'running out of space! Delete oldest version: ' . $version['path'].'.v'.$version['version'] , \OCP\Util::DEBUG);
$versionsSize -= $version['size'];
$availableSpace += $version['size'];
next($allVersions);
@ -502,69 +570,6 @@ class Storage {
return false;
}
/**
* @brief delete old version from a given list of versions
*
* @param array $versionsByFile list of versions ordered by files
* @param array $allVversions all versions accross multiple files
* @param $versionsFileview OC\Files\View on data/user/files_versions
* @return size of releted versions
*/
private static function delOldVersions($versionsByFile, &$allVersions, $versionsFileview) {
$time = time();
$size = 0;
// delete old versions for every given file
foreach ($versionsByFile as $versions) {
$versions = array_reverse($versions); // newest version first
$interval = 1;
$step = Storage::$max_versions_per_interval[$interval]['step'];
if (Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'] == -1) {
$nextInterval = -1;
} else {
$nextInterval = $time - Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'];
}
$firstVersion = reset($versions);
$firstKey = key($versions);
$prevTimestamp = $firstVersion['version'];
$nextVersion = $firstVersion['version'] - $step;
unset($versions[$firstKey]);
foreach ($versions as $key => $version) {
$newInterval = true;
while ($newInterval) {
if ($nextInterval == -1 || $version['version'] >= $nextInterval) {
if ($version['version'] > $nextVersion) {
//distance between two version too small, delete version
$versionsFileview->unlink($version['path'] . '.v' . $version['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $version['path'] . '.v' . $version['version']));
$size += $version['size'];
unset($allVersions[$key]); // update array with all versions
} else {
$nextVersion = $version['version'] - $step;
}
$newInterval = false; // version checked so we can move to the next one
} else { // time to move on to the next interval
$interval++;
$step = Storage::$max_versions_per_interval[$interval]['step'];
$nextVersion = $prevTimestamp - $step;
if (Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'] == -1) {
$nextInterval = -1;
} else {
$nextInterval = $time - Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'];
}
$newInterval = true; // we changed the interval -> check same version with new interval
}
}
$prevTimestamp = $version['version'];
}
}
return $size;
}
/**
* @brief create recursively missing directories
* @param string $filename $path to a file

View File

@ -0,0 +1,188 @@
<?php
/**
* ownCloud
*
* @author Bjoern Schiessle
* @copyright 2014 Bjoern Schiessle <schiessle@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/>.
*
*/
require_once __DIR__ . '/../lib/versions.php';
/**
* Class Test_Files_versions
* @brief this class provide basic files versions test
*/
class Test_Files_Versioning extends \PHPUnit_Framework_TestCase {
/**
* @medium
* @brief test expire logic
* @dataProvider versionsProvider
*/
function testGetExpireList($versions, $sizeOfAllDeletedFiles) {
// last interval enda at 2592000
$startTime = 5000000;
$testClass = new VersionStorageToTest();
list($deleted, $size) = $testClass->callProtectedGetExpireList($startTime, $versions);
// we should have deleted 16 files each of the size 1
$this->assertEquals($sizeOfAllDeletedFiles, $size);
// the deleted array should only contain versions which should be deleted
foreach($deleted as $key => $path) {
unset($versions[$key]);
$this->assertEquals("delete", substr($path, 0, strlen("delete")));
}
// the versions array should only contain versions which should be kept
foreach ($versions as $version) {
$this->assertEquals("keep", $version['path']);
}
}
public function versionsProvider() {
return array(
// first set of versions uniformly distributed versions
array(
array(
// first slice (10sec) keep one version every 2 seconds
array("version" => 4999999, "path" => "keep", "size" => 1),
array("version" => 4999998, "path" => "delete", "size" => 1),
array("version" => 4999997, "path" => "keep", "size" => 1),
array("version" => 4999995, "path" => "keep", "size" => 1),
array("version" => 4999994, "path" => "delete", "size" => 1),
//next slice (60sec) starts at 4999990 keep one version every 10 secons
array("version" => 4999988, "path" => "keep", "size" => 1),
array("version" => 4999978, "path" => "keep", "size" => 1),
array("version" => 4999975, "path" => "delete", "size" => 1),
array("version" => 4999972, "path" => "delete", "size" => 1),
array("version" => 4999967, "path" => "keep", "size" => 1),
array("version" => 4999958, "path" => "delete", "size" => 1),
array("version" => 4999957, "path" => "keep", "size" => 1),
//next slice (3600sec) start at 4999940 keep one version every 60 seconds
array("version" => 4999900, "path" => "keep", "size" => 1),
array("version" => 4999841, "path" => "delete", "size" => 1),
array("version" => 4999840, "path" => "keep", "size" => 1),
array("version" => 4999780, "path" => "keep", "size" => 1),
array("version" => 4996401, "path" => "keep", "size" => 1),
// next slice (86400sec) start at 4996400 keep one version every 3600 seconds
array("version" => 4996350, "path" => "delete", "size" => 1),
array("version" => 4992800, "path" => "keep", "size" => 1),
array("version" => 4989800, "path" => "delete", "size" => 1),
array("version" => 4989700, "path" => "delete", "size" => 1),
array("version" => 4989200, "path" => "keep", "size" => 1),
// next slice (2592000sec) start at 4913600 keep one version every 86400 seconds
array("version" => 4913600, "path" => "keep", "size" => 1),
array("version" => 4852800, "path" => "delete", "size" => 1),
array("version" => 4827201, "path" => "delete", "size" => 1),
array("version" => 4827200, "path" => "keep", "size" => 1),
array("version" => 4777201, "path" => "delete", "size" => 1),
array("version" => 4777501, "path" => "delete", "size" => 1),
array("version" => 4740000, "path" => "keep", "size" => 1),
// final slice starts at 2408000 keep one version every 604800 secons
array("version" => 2408000, "path" => "keep", "size" => 1),
array("version" => 1803201, "path" => "delete", "size" => 1),
array("version" => 1803200, "path" => "keep", "size" => 1),
array("version" => 1800199, "path" => "delete", "size" => 1),
array("version" => 1800100, "path" => "delete", "size" => 1),
array("version" => 1198300, "path" => "keep", "size" => 1),
),
16 // size of all deleted files (every file has the size 1)
),
// second set of versions, here we have only really old versions
array(
array(
// first slice (10sec) keep one version every 2 seconds
// next slice (60sec) starts at 4999990 keep one version every 10 secons
// next slice (3600sec) start at 4999940 keep one version every 60 seconds
// next slice (86400sec) start at 4996400 keep one version every 3600 seconds
array("version" => 4996400, "path" => "keep", "size" => 1),
array("version" => 4996350, "path" => "delete", "size" => 1),
array("version" => 4996350, "path" => "delete", "size" => 1),
array("version" => 4992800, "path" => "keep", "size" => 1),
array("version" => 4989800, "path" => "delete", "size" => 1),
array("version" => 4989700, "path" => "delete", "size" => 1),
array("version" => 4989200, "path" => "keep", "size" => 1),
// next slice (2592000sec) start at 4913600 keep one version every 86400 seconds
array("version" => 4913600, "path" => "keep", "size" => 1),
array("version" => 4852800, "path" => "delete", "size" => 1),
array("version" => 4827201, "path" => "delete", "size" => 1),
array("version" => 4827200, "path" => "keep", "size" => 1),
array("version" => 4777201, "path" => "delete", "size" => 1),
array("version" => 4777501, "path" => "delete", "size" => 1),
array("version" => 4740000, "path" => "keep", "size" => 1),
// final slice starts at 2408000 keep one version every 604800 secons
array("version" => 2408000, "path" => "keep", "size" => 1),
array("version" => 1803201, "path" => "delete", "size" => 1),
array("version" => 1803200, "path" => "keep", "size" => 1),
array("version" => 1800199, "path" => "delete", "size" => 1),
array("version" => 1800100, "path" => "delete", "size" => 1),
array("version" => 1198300, "path" => "keep", "size" => 1),
),
11 // size of all deleted files (every file has the size 1)
),
// third set of versions, with some gaps inbetween
array(
array(
// first slice (10sec) keep one version every 2 seconds
array("version" => 4999999, "path" => "keep", "size" => 1),
array("version" => 4999998, "path" => "delete", "size" => 1),
array("version" => 4999997, "path" => "keep", "size" => 1),
array("version" => 4999995, "path" => "keep", "size" => 1),
array("version" => 4999994, "path" => "delete", "size" => 1),
//next slice (60sec) starts at 4999990 keep one version every 10 secons
array("version" => 4999988, "path" => "keep", "size" => 1),
array("version" => 4999978, "path" => "keep", "size" => 1),
//next slice (3600sec) start at 4999940 keep one version every 60 seconds
// next slice (86400sec) start at 4996400 keep one version every 3600 seconds
array("version" => 4989200, "path" => "keep", "size" => 1),
// next slice (2592000sec) start at 4913600 keep one version every 86400 seconds
array("version" => 4913600, "path" => "keep", "size" => 1),
array("version" => 4852800, "path" => "delete", "size" => 1),
array("version" => 4827201, "path" => "delete", "size" => 1),
array("version" => 4827200, "path" => "keep", "size" => 1),
array("version" => 4777201, "path" => "delete", "size" => 1),
array("version" => 4777501, "path" => "delete", "size" => 1),
array("version" => 4740000, "path" => "keep", "size" => 1),
// final slice starts at 2408000 keep one version every 604800 secons
array("version" => 2408000, "path" => "keep", "size" => 1),
array("version" => 1803201, "path" => "delete", "size" => 1),
array("version" => 1803200, "path" => "keep", "size" => 1),
array("version" => 1800199, "path" => "delete", "size" => 1),
array("version" => 1800100, "path" => "delete", "size" => 1),
array("version" => 1198300, "path" => "keep", "size" => 1),
),
9 // size of all deleted files (every file has the size 1)
),
);
}
}
// extend the original class to make it possible to test protected methods
class VersionStorageToTest extends \OCA\Files_Versions\Storage {
public function callProtectedGetExpireList($time, $versions) {
return self::getExpireList($time, $versions);
}
}

View File

@ -1,12 +0,0 @@
<?php
$TRANSLATIONS = array(
"Error" => "Ошибка",
"Select groups" => "Выбрать группы",
"_%s group found_::_%s groups found_" => array("","",""),
"_%s user found_::_%s users found_" => array("","",""),
"Save" => "Сохранить",
"Help" => "Помощь",
"Password" => "Пароль",
"Back" => "Назад"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -50,7 +50,8 @@ class Connection extends LDAPUtility {
parent::__construct($ldap);
$this->configPrefix = $configPrefix;
$this->configID = $configID;
$this->configuration = new Configuration($configPrefix);
$this->configuration = new Configuration($configPrefix,
!is_null($configID));
$memcache = new \OC\Memcache\Factory();
if($memcache->isAvailable()) {
$this->cache = $memcache->create();

View File

@ -48,18 +48,25 @@ class Helper {
static public function getServerConfigurationPrefixes($activeConfigurations = false) {
$referenceConfigkey = 'ldap_configuration_active';
$query = '
$sql = '
SELECT DISTINCT `configkey`
FROM `*PREFIX*appconfig`
WHERE `appid` = \'user_ldap\'
AND `configkey` LIKE ?
';
if($activeConfigurations) {
$query .= ' AND `configvalue` = \'1\'';
}
$query = \OCP\DB::prepare($query);
$serverConfigs = $query->execute(array('%'.$referenceConfigkey))->fetchAll();
if($activeConfigurations) {
if (\OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') {
//FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
$sql .= ' AND to_char(`configvalue`)=\'1\'';
} else {
$sql .= ' AND `configvalue` = \'1\'';
}
}
$stmt = \OCP\DB::prepare($sql);
$serverConfigs = $stmt->execute(array('%'.$referenceConfigkey))->fetchAll();
$prefixes = array();
foreach($serverConfigs as $serverConfig) {

View File

@ -792,10 +792,13 @@ class Wizard extends LDAPUtility {
\OCP\Util::writeLog('user_ldap', 'Wiz: Setting LDAP Options ', \OCP\Util::DEBUG);
//set LDAP options
$a = $this->ldap->setOption($cr, LDAP_OPT_PROTOCOL_VERSION, 3);
$c = $this->ldap->setOption($cr, LDAP_OPT_NETWORK_TIMEOUT, self::LDAP_NW_TIMEOUT);
$this->ldap->setOption($cr, LDAP_OPT_PROTOCOL_VERSION, 3);
$this->ldap->setOption($cr, LDAP_OPT_NETWORK_TIMEOUT, self::LDAP_NW_TIMEOUT);
if($tls) {
$this->ldap->startTls($cr);
$isTlsWorking = @$this->ldap->startTls($cr);
if(!$isTlsWorking) {
return false;
}
}
\OCP\Util::writeLog('user_ldap', 'Wiz: Attemping to Bind ', \OCP\Util::DEBUG);
@ -809,7 +812,7 @@ class Wizard extends LDAPUtility {
if($ncc) {
throw new \Exception('Certificate cannot be validated.');
}
\OCP\Util::writeLog('user_ldap', 'Wiz: Bind succesfull with Port '. $port, \OCP\Util::DEBUG);
\OCP\Util::writeLog('user_ldap', 'Wiz: Bind successfull to Port '. $port . ' TLS ' . intval($tls), \OCP\Util::DEBUG);
return true;
}

View File

@ -63,3 +63,9 @@
.ie8 #nojavascript {
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#4c320000', endColorstr='#4c320000'); /* IE */
}
/* IE8 doesn't have rounded corners, so the strengthify bar should be wider */
.lte8 #body-login .strengthify-wrapper {
width: 271px;
left: 6px;
}

View File

@ -341,7 +341,7 @@ input[type="submit"].enabled {
margin-bottom: 20px;
text-align: left;
}
#body-login form #adminaccount { margin-bottom:5px; }
#body-login form #adminaccount { margin-bottom:15px; }
#body-login form fieldset legend, #datadirContent label {
width: 100%;
font-weight: bold;
@ -361,6 +361,21 @@ input[type="submit"].enabled {
margin-left: -4px;
}
/* strengthify wrapper */
#body-login .strengthify-wrapper {
display: inline-block;
position: relative;
left: 15px;
top: -21px;
width: 252px;
}
/* tipsy for the strengthify wrapper looks better with following font settings */
#body-login .tipsy-inner {
font-weight: bold;
color: #ccc;
}
/* Icons for username and password fields to better recognize them */
#adminlogin, #adminpass, #user, #password { width:11.7em!important; padding-left:1.8em; }
#adminlogin+label+img, #adminpass-icon, #user+label+img, #password-icon {

View File

@ -416,6 +416,9 @@ var OC={
throw e;
});
}
if(!SVGSupport()) {
replaceSVG();
}
}).show();
}, 'html');
}

View File

@ -7,9 +7,9 @@ $(document).ready(function() {
oracle:!!$('#hasOracle').val(),
mssql:!!$('#hasMSSQL').val()
};
$('#selectDbType').buttonset();
if($('#hasSQLite').val()){
$('#use_other_db').hide();
$('#use_oracle_db').hide();
@ -63,17 +63,27 @@ $(document).ready(function() {
form.submit();
return false;
});
// Expand latest db settings if page was reloaded on error
var currentDbType = $('input[type="radio"]:checked').val();
if (currentDbType === undefined){
$('input[type="radio"]').first().click();
}
if (currentDbType === 'sqlite' || (dbtypes.sqlite && currentDbType === undefined)){
$('#datadirContent').hide(250);
$('#databaseField').hide(250);
}
$('#adminpass').strengthify({
zxcvbn: OC.linkTo('3rdparty','zxcvbn/js/zxcvbn.js'),
titles: [
t('core', 'Very weak password'),
t('core', 'Weak password'),
t('core', 'So-so password'),
t('core', 'Good password'),
t('core', 'Strong password')
]
});
});

View File

@ -181,7 +181,8 @@ OC.Share={
},
showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) {
var data = OC.Share.loadItem(itemType, itemSource);
var html = '<div id="dropdown" class="drop" data-item-type="'+itemType+'" data-item-source="'+itemSource+'"" data-item-source-name="'+filename+'">';
var dropDownEl;
var html = '<div id="dropdown" class="drop" data-item-type="'+itemType+'" data-item-source="'+itemSource+'">';
if (data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) {
if (data.reshare.share_type == OC.Share.SHARE_TYPE_GROUP) {
html += '<span class="reshare">'+t('core', 'Shared with you and the group {group} by {owner}', {group: escapeHTML(data.reshare.share_with), owner: escapeHTML(data.reshare.displayname_owner)})+'</span>';
@ -239,7 +240,8 @@ OC.Share={
html += '<input type="checkbox" name="expirationCheckbox" id="expirationCheckbox" value="1" /><label for="expirationCheckbox">'+t('core', 'Set expiration date')+'</label>';
html += '<input id="expirationDate" type="text" placeholder="'+t('core', 'Expiration date')+'" style="display:none; width:90%;" />';
html += '</div>';
$(html).appendTo(appendTo);
dropDownEl = $(html);
dropDownEl = dropDownEl.appendTo(appendTo);
// Reset item shares
OC.Share.itemShares = [];
if (data.shares) {
@ -332,8 +334,10 @@ OC.Share={
} else {
html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Resharing is not allowed')+'" style="width:90%;" disabled="disabled"/>';
html += '</div>';
$(html).appendTo(appendTo);
dropDownEl = $(html);
dropDownEl.appendTo(appendTo);
}
dropDownEl.attr('data-item-source-name', filename);
$('#dropdown').show('blind', function() {
OC.Share.droppedDown = true;
});

View File

@ -1,21 +0,0 @@
<?php
$TRANSLATIONS = array(
"Settings" => "Настройки",
"_%n minute ago_::_%n minutes ago_" => array("","",""),
"_%n hour ago_::_%n hours ago_" => array("","",""),
"_%n day ago_::_%n days ago_" => array("","",""),
"_%n month ago_::_%n months ago_" => array("","",""),
"Yes" => "Да",
"No" => "Нет",
"_{count} file conflict_::_{count} file conflicts_" => array("","",""),
"Cancel" => "Отмена",
"Share" => "Сделать общим",
"Error" => "Ошибка",
"Password" => "Пароль",
"can edit" => "возможно редактирование",
"Warning" => "Предупреждение",
"Delete" => "Удалить",
"Username" => "Имя пользователя",
"Help" => "Помощь"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -20,6 +20,8 @@ if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) {
}
}
OC_Util::addScript( '3rdparty', 'strengthify/jquery.strengthify' );
OC_Util::addStyle( '3rdparty', 'strengthify/strengthify' );
OC_Util::addScript('setup');
$hasSQLite = class_exists('SQLite3');

View File

@ -59,6 +59,7 @@
<img class="svg" id="adminpass-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt="" />
<input type="checkbox" id="show" name="show" />
<label for="show"></label>
<div class="strengthify-wrapper"></div>
</p>
</fieldset>

View File

@ -12,7 +12,7 @@
<td bgcolor="#f8f8f8" width="20px">&nbsp;</td>
<td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
<?php
print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared »%s« with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link'])));
print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link'])));
if ( isset($_['expiration']) ) {
p($l->t("The share will expire on %s.", array($_['expiration'])));
print_unescaped('<br><br>');

View File

@ -1,780 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-12-20 01:55-0500\n"
"PO-Revision-Date: 2013-12-20 06:23+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ajax/share.php:119 ajax/share.php:198
#, php-format
msgid "%s shared »%s« with you"
msgstr ""
#: ajax/share.php:169
#, php-format
msgid "Couldn't send mail to following users: %s "
msgstr ""
#: ajax/update.php:11
msgid "Turned on maintenance mode"
msgstr ""
#: ajax/update.php:14
msgid "Turned off maintenance mode"
msgstr ""
#: ajax/update.php:17
msgid "Updated database"
msgstr ""
#: ajax/update.php:20
msgid "Updating filecache, this may take really long..."
msgstr ""
#: ajax/update.php:23
msgid "Updated filecache"
msgstr ""
#: ajax/update.php:26
#, php-format
msgid "... %d%% done ..."
msgstr ""
#: avatar/controller.php:62
msgid "No image or file provided"
msgstr ""
#: avatar/controller.php:81
msgid "Unknown filetype"
msgstr ""
#: avatar/controller.php:85
msgid "Invalid image"
msgstr ""
#: avatar/controller.php:115 avatar/controller.php:142
msgid "No temporary profile picture available, try again"
msgstr ""
#: avatar/controller.php:135
msgid "No crop data provided"
msgstr ""
#: js/config.php:32
msgid "Sunday"
msgstr ""
#: js/config.php:33
msgid "Monday"
msgstr ""
#: js/config.php:34
msgid "Tuesday"
msgstr ""
#: js/config.php:35
msgid "Wednesday"
msgstr ""
#: js/config.php:36
msgid "Thursday"
msgstr ""
#: js/config.php:37
msgid "Friday"
msgstr ""
#: js/config.php:38
msgid "Saturday"
msgstr ""
#: js/config.php:43
msgid "January"
msgstr ""
#: js/config.php:44
msgid "February"
msgstr ""
#: js/config.php:45
msgid "March"
msgstr ""
#: js/config.php:46
msgid "April"
msgstr ""
#: js/config.php:47
msgid "May"
msgstr ""
#: js/config.php:48
msgid "June"
msgstr ""
#: js/config.php:49
msgid "July"
msgstr ""
#: js/config.php:50
msgid "August"
msgstr ""
#: js/config.php:51
msgid "September"
msgstr ""
#: js/config.php:52
msgid "October"
msgstr ""
#: js/config.php:53
msgid "November"
msgstr ""
#: js/config.php:54
msgid "December"
msgstr ""
#: js/js.js:398
msgid "Settings"
msgstr "Настройки"
#: js/js.js:869
msgid "seconds ago"
msgstr ""
#: js/js.js:870
msgid "%n minute ago"
msgid_plural "%n minutes ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/js.js:871
msgid "%n hour ago"
msgid_plural "%n hours ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/js.js:872
msgid "today"
msgstr ""
#: js/js.js:873
msgid "yesterday"
msgstr ""
#: js/js.js:874
msgid "%n day ago"
msgid_plural "%n days ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/js.js:875
msgid "last month"
msgstr ""
#: js/js.js:876
msgid "%n month ago"
msgid_plural "%n months ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/js.js:877
msgid "months ago"
msgstr ""
#: js/js.js:878
msgid "last year"
msgstr ""
#: js/js.js:879
msgid "years ago"
msgstr ""
#: js/oc-dialogs.js:123
msgid "Choose"
msgstr ""
#: js/oc-dialogs.js:146
msgid "Error loading file picker template: {error}"
msgstr ""
#: js/oc-dialogs.js:172
msgid "Yes"
msgstr "Да"
#: js/oc-dialogs.js:182
msgid "No"
msgstr "Нет"
#: js/oc-dialogs.js:199
msgid "Ok"
msgstr ""
#: js/oc-dialogs.js:219
msgid "Error loading message template: {error}"
msgstr ""
#: js/oc-dialogs.js:347
msgid "{count} file conflict"
msgid_plural "{count} file conflicts"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/oc-dialogs.js:361
msgid "One file conflict"
msgstr ""
#: js/oc-dialogs.js:367
msgid "Which files do you want to keep?"
msgstr ""
#: js/oc-dialogs.js:368
msgid ""
"If you select both versions, the copied file will have a number added to its"
" name."
msgstr ""
#: js/oc-dialogs.js:376
msgid "Cancel"
msgstr "Отмена"
#: js/oc-dialogs.js:386
msgid "Continue"
msgstr ""
#: js/oc-dialogs.js:433 js/oc-dialogs.js:446
msgid "(all selected)"
msgstr ""
#: js/oc-dialogs.js:436 js/oc-dialogs.js:449
msgid "({count} selected)"
msgstr ""
#: js/oc-dialogs.js:457
msgid "Error loading file exists template"
msgstr ""
#: js/share.js:51 js/share.js:66 js/share.js:106
msgid "Shared"
msgstr ""
#: js/share.js:109
msgid "Share"
msgstr "Сделать общим"
#: js/share.js:158 js/share.js:171 js/share.js:178 js/share.js:707
#: js/share.js:719 templates/installation.php:10
msgid "Error"
msgstr "Ошибка"
#: js/share.js:160 js/share.js:747
msgid "Error while sharing"
msgstr ""
#: js/share.js:171
msgid "Error while unsharing"
msgstr ""
#: js/share.js:178
msgid "Error while changing permissions"
msgstr ""
#: js/share.js:187
msgid "Shared with you and the group {group} by {owner}"
msgstr ""
#: js/share.js:189
msgid "Shared with you by {owner}"
msgstr ""
#: js/share.js:213
msgid "Share with user or group …"
msgstr ""
#: js/share.js:219
msgid "Share link"
msgstr ""
#: js/share.js:222
msgid "Password protect"
msgstr ""
#: js/share.js:224 templates/installation.php:58 templates/login.php:38
msgid "Password"
msgstr "Пароль"
#: js/share.js:229
msgid "Allow Public Upload"
msgstr ""
#: js/share.js:233
msgid "Email link to person"
msgstr ""
#: js/share.js:234
msgid "Send"
msgstr ""
#: js/share.js:239
msgid "Set expiration date"
msgstr ""
#: js/share.js:240
msgid "Expiration date"
msgstr ""
#: js/share.js:275
msgid "Share via email:"
msgstr ""
#: js/share.js:278
msgid "No people found"
msgstr ""
#: js/share.js:322 js/share.js:359
msgid "group"
msgstr ""
#: js/share.js:333
msgid "Resharing is not allowed"
msgstr ""
#: js/share.js:375
msgid "Shared in {item} with {user}"
msgstr ""
#: js/share.js:397
msgid "Unshare"
msgstr ""
#: js/share.js:405
msgid "notify by email"
msgstr ""
#: js/share.js:408
msgid "can edit"
msgstr "возможно редактирование"
#: js/share.js:410
msgid "access control"
msgstr ""
#: js/share.js:413
msgid "create"
msgstr ""
#: js/share.js:416
msgid "update"
msgstr ""
#: js/share.js:419
msgid "delete"
msgstr ""
#: js/share.js:422
msgid "share"
msgstr ""
#: js/share.js:694
msgid "Password protected"
msgstr ""
#: js/share.js:707
msgid "Error unsetting expiration date"
msgstr ""
#: js/share.js:719
msgid "Error setting expiration date"
msgstr ""
#: js/share.js:734
msgid "Sending ..."
msgstr ""
#: js/share.js:745
msgid "Email sent"
msgstr ""
#: js/share.js:769
msgid "Warning"
msgstr "Предупреждение"
#: js/tags.js:4
msgid "The object type is not specified."
msgstr ""
#: js/tags.js:13
msgid "Enter new"
msgstr ""
#: js/tags.js:27
msgid "Delete"
msgstr "Удалить"
#: js/tags.js:31
msgid "Add"
msgstr ""
#: js/tags.js:39
msgid "Edit tags"
msgstr ""
#: js/tags.js:57
msgid "Error loading dialog template: {error}"
msgstr ""
#: js/tags.js:261
msgid "No tags selected for deletion."
msgstr ""
#: js/update.js:8
msgid "Please reload the page."
msgstr ""
#: js/update.js:17
msgid ""
"The update was unsuccessful. Please report this issue to the <a "
"href=\"https://github.com/owncloud/core/issues\" target=\"_blank\">ownCloud "
"community</a>."
msgstr ""
#: js/update.js:21
msgid "The update was successful. Redirecting you to ownCloud now."
msgstr ""
#: lostpassword/controller.php:62
#, php-format
msgid "%s password reset"
msgstr ""
#: lostpassword/templates/email.php:2
msgid "Use the following link to reset your password: {link}"
msgstr ""
#: lostpassword/templates/lostpassword.php:7
msgid ""
"The link to reset your password has been sent to your email.<br>If you do "
"not receive it within a reasonable amount of time, check your spam/junk "
"folders.<br>If it is not there ask your local administrator ."
msgstr ""
#: lostpassword/templates/lostpassword.php:15
msgid "Request failed!<br>Did you make sure your email/username was right?"
msgstr ""
#: lostpassword/templates/lostpassword.php:18
msgid "You will receive a link to reset your password via Email."
msgstr ""
#: lostpassword/templates/lostpassword.php:21 templates/installation.php:52
#: templates/login.php:31
msgid "Username"
msgstr "Имя пользователя"
#: lostpassword/templates/lostpassword.php:25
msgid ""
"Your files are encrypted. If you haven't enabled the recovery key, there "
"will be no way to get your data back after your password is reset. If you "
"are not sure what to do, please contact your administrator before you "
"continue. Do you really want to continue?"
msgstr ""
#: lostpassword/templates/lostpassword.php:27
msgid "Yes, I really want to reset my password now"
msgstr ""
#: lostpassword/templates/lostpassword.php:30
msgid "Reset"
msgstr ""
#: lostpassword/templates/resetpassword.php:4
msgid "Your password was reset"
msgstr ""
#: lostpassword/templates/resetpassword.php:5
msgid "To login page"
msgstr ""
#: lostpassword/templates/resetpassword.php:8
msgid "New password"
msgstr ""
#: lostpassword/templates/resetpassword.php:11
msgid "Reset password"
msgstr ""
#: strings.php:5
msgid "Personal"
msgstr ""
#: strings.php:6
msgid "Users"
msgstr ""
#: strings.php:7 templates/layout.user.php:111
msgid "Apps"
msgstr ""
#: strings.php:8
msgid "Admin"
msgstr ""
#: strings.php:9
msgid "Help"
msgstr "Помощь"
#: tags/controller.php:22
msgid "Error loading tags"
msgstr ""
#: tags/controller.php:48
msgid "Tag already exists"
msgstr ""
#: tags/controller.php:64
msgid "Error deleting tag(s)"
msgstr ""
#: tags/controller.php:75
msgid "Error tagging"
msgstr ""
#: tags/controller.php:86
msgid "Error untagging"
msgstr ""
#: tags/controller.php:97
msgid "Error favoriting"
msgstr ""
#: tags/controller.php:108
msgid "Error unfavoriting"
msgstr ""
#: templates/403.php:12
msgid "Access forbidden"
msgstr ""
#: templates/404.php:15
msgid "Cloud not found"
msgstr ""
#: templates/altmail.php:2
#, php-format
msgid ""
"Hey there,\n"
"\n"
"just letting you know that %s shared %s with you.\n"
"View it: %s\n"
"\n"
msgstr ""
#: templates/altmail.php:4 templates/mail.php:17
#, php-format
msgid "The share will expire on %s."
msgstr ""
#: templates/altmail.php:7 templates/mail.php:20
msgid "Cheers!"
msgstr ""
#: templates/installation.php:25 templates/installation.php:32
#: templates/installation.php:39
msgid "Security Warning"
msgstr ""
#: templates/installation.php:26
msgid "Your PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243)"
msgstr ""
#: templates/installation.php:27
#, php-format
msgid "Please update your PHP installation to use %s securely."
msgstr ""
#: templates/installation.php:33
msgid ""
"No secure random number generator is available, please enable the PHP "
"OpenSSL extension."
msgstr ""
#: templates/installation.php:34
msgid ""
"Without a secure random number generator an attacker may be able to predict "
"password reset tokens and take over your account."
msgstr ""
#: templates/installation.php:40
msgid ""
"Your data directory and files are probably accessible from the internet "
"because the .htaccess file does not work."
msgstr ""
#: templates/installation.php:42
#, php-format
msgid ""
"For information how to properly configure your server, please see the <a "
"href=\"%s\" target=\"_blank\">documentation</a>."
msgstr ""
#: templates/installation.php:48
msgid "Create an <strong>admin account</strong>"
msgstr ""
#: templates/installation.php:67
msgid "Advanced"
msgstr ""
#: templates/installation.php:74
msgid "Data folder"
msgstr ""
#: templates/installation.php:86
msgid "Configure the database"
msgstr ""
#: templates/installation.php:91 templates/installation.php:103
#: templates/installation.php:114 templates/installation.php:125
#: templates/installation.php:137
msgid "will be used"
msgstr ""
#: templates/installation.php:149
msgid "Database user"
msgstr ""
#: templates/installation.php:156
msgid "Database password"
msgstr ""
#: templates/installation.php:161
msgid "Database name"
msgstr ""
#: templates/installation.php:169
msgid "Database tablespace"
msgstr ""
#: templates/installation.php:176
msgid "Database host"
msgstr ""
#: templates/installation.php:185
msgid "Finish setup"
msgstr ""
#: templates/installation.php:185
msgid "Finishing …"
msgstr ""
#: templates/layout.user.php:40
msgid ""
"This application requires JavaScript to be enabled for correct operation. "
"Please <a href=\"http://enable-javascript.com/\" target=\"_blank\">enable "
"JavaScript</a> and re-load this interface."
msgstr ""
#: templates/layout.user.php:44
#, php-format
msgid "%s is available. Get more information on how to update."
msgstr ""
#: templates/layout.user.php:72 templates/singleuser.user.php:8
msgid "Log out"
msgstr ""
#: templates/login.php:9
msgid "Automatic logon rejected!"
msgstr ""
#: templates/login.php:10
msgid ""
"If you did not change your password recently, your account may be "
"compromised!"
msgstr ""
#: templates/login.php:12
msgid "Please change your password to secure your account again."
msgstr ""
#: templates/login.php:17
msgid "Server side authentication failed!"
msgstr ""
#: templates/login.php:18
msgid "Please contact your administrator."
msgstr ""
#: templates/login.php:44
msgid "Lost your password?"
msgstr ""
#: templates/login.php:49
msgid "remember"
msgstr ""
#: templates/login.php:52
msgid "Log in"
msgstr ""
#: templates/login.php:58
msgid "Alternative Logins"
msgstr ""
#: templates/mail.php:15
#, php-format
msgid ""
"Hey there,<br><br>just letting you know that %s shared »%s« with you.<br><a "
"href=\"%s\">View it!</a><br><br>"
msgstr ""
#: templates/singleuser.user.php:3
msgid "This ownCloud instance is currently in single user mode."
msgstr ""
#: templates/singleuser.user.php:4
msgid "This means only administrators can use the instance."
msgstr ""
#: templates/singleuser.user.php:5 templates/update.user.php:5
msgid ""
"Contact your system administrator if this message persists or appeared "
"unexpectedly."
msgstr ""
#: templates/singleuser.user.php:7 templates/update.user.php:6
msgid "Thank you for your patience."
msgstr ""
#: templates/update.admin.php:3
#, php-format
msgid "Updating ownCloud to version %s, this may take a while."
msgstr ""
#: templates/update.user.php:3
msgid ""
"This ownCloud instance is currently being updated, which may take a while."
msgstr ""
#: templates/update.user.php:4
msgid "Please reload this page after a short time to continue using ownCloud."
msgstr ""

View File

@ -1,416 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-12-20 01:55-0500\n"
"PO-Revision-Date: 2013-12-20 06:23+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ajax/move.php:17
#, php-format
msgid "Could not move %s - File with this name already exists"
msgstr ""
#: ajax/move.php:27 ajax/move.php:30
#, php-format
msgid "Could not move %s"
msgstr ""
#: ajax/newfile.php:56 js/files.js:74
msgid "File name cannot be empty."
msgstr "Имя файла не может быть пустым."
#: ajax/newfile.php:62
msgid "File name must not contain \"/\". Please choose a different name."
msgstr ""
#: ajax/newfile.php:72 ajax/newfolder.php:37 lib/app.php:67
#, php-format
msgid ""
"The name %s is already used in the folder %s. Please choose a different "
"name."
msgstr ""
#: ajax/newfile.php:81
msgid "Not a valid source"
msgstr ""
#: ajax/newfile.php:86
msgid ""
"Server is not allowed to open URLs, please check the server configuration"
msgstr ""
#: ajax/newfile.php:103
#, php-format
msgid "Error while downloading %s to %s"
msgstr ""
#: ajax/newfile.php:140
msgid "Error when creating the file"
msgstr ""
#: ajax/newfolder.php:21
msgid "Folder name cannot be empty."
msgstr ""
#: ajax/newfolder.php:27
msgid "Folder name must not contain \"/\". Please choose a different name."
msgstr ""
#: ajax/newfolder.php:56
msgid "Error when creating the folder"
msgstr ""
#: ajax/upload.php:18 ajax/upload.php:50
msgid "Unable to set upload directory."
msgstr ""
#: ajax/upload.php:27
msgid "Invalid Token"
msgstr ""
#: ajax/upload.php:64
msgid "No file was uploaded. Unknown error"
msgstr ""
#: ajax/upload.php:71
msgid "There is no error, the file uploaded with success"
msgstr ""
#: ajax/upload.php:72
msgid ""
"The uploaded file exceeds the upload_max_filesize directive in php.ini: "
msgstr ""
#: ajax/upload.php:74
msgid ""
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
"the HTML form"
msgstr ""
#: ajax/upload.php:75
msgid "The uploaded file was only partially uploaded"
msgstr ""
#: ajax/upload.php:76
msgid "No file was uploaded"
msgstr ""
#: ajax/upload.php:77
msgid "Missing a temporary folder"
msgstr ""
#: ajax/upload.php:78
msgid "Failed to write to disk"
msgstr ""
#: ajax/upload.php:96
msgid "Not enough storage available"
msgstr ""
#: ajax/upload.php:127 ajax/upload.php:154
msgid "Upload failed. Could not get file info."
msgstr ""
#: ajax/upload.php:144
msgid "Upload failed. Could not find uploaded file"
msgstr ""
#: ajax/upload.php:172
msgid "Invalid directory."
msgstr ""
#: appinfo/app.php:11
msgid "Files"
msgstr "Файлы"
#: js/file-upload.js:228
msgid "Unable to upload {filename} as it is a directory or has 0 bytes"
msgstr ""
#: js/file-upload.js:239
msgid "Not enough space available"
msgstr ""
#: js/file-upload.js:306
msgid "Upload cancelled."
msgstr ""
#: js/file-upload.js:344
msgid "Could not get result from server."
msgstr ""
#: js/file-upload.js:436
msgid ""
"File upload is in progress. Leaving the page now will cancel the upload."
msgstr ""
#: js/file-upload.js:523
msgid "URL cannot be empty"
msgstr ""
#: js/file-upload.js:527 js/filelist.js:377
msgid "In the home folder 'Shared' is a reserved filename"
msgstr ""
#: js/file-upload.js:529 js/filelist.js:379
msgid "{new_name} already exists"
msgstr ""
#: js/file-upload.js:595
msgid "Could not create file"
msgstr ""
#: js/file-upload.js:611
msgid "Could not create folder"
msgstr ""
#: js/file-upload.js:661
msgid "Error fetching URL"
msgstr ""
#: js/fileactions.js:125
msgid "Share"
msgstr "Сделать общим"
#: js/fileactions.js:137
msgid "Delete permanently"
msgstr ""
#: js/fileactions.js:194
msgid "Rename"
msgstr "Переименовать"
#: js/filelist.js:69 js/filelist.js:72 js/filelist.js:889
msgid "Pending"
msgstr ""
#: js/filelist.js:405
msgid "Could not rename file"
msgstr ""
#: js/filelist.js:539
msgid "replaced {new_name} with {old_name}"
msgstr ""
#: js/filelist.js:539
msgid "undo"
msgstr ""
#: js/filelist.js:591
msgid "Error deleting file."
msgstr ""
#: js/filelist.js:609 js/filelist.js:683 js/files.js:631
msgid "%n folder"
msgid_plural "%n folders"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/filelist.js:610 js/filelist.js:684 js/files.js:637
msgid "%n file"
msgid_plural "%n files"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/filelist.js:617
msgid "{dirs} and {files}"
msgstr ""
#: js/filelist.js:828 js/filelist.js:866
msgid "Uploading %n file"
msgid_plural "Uploading %n files"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: js/files.js:72
msgid "'.' is an invalid file name."
msgstr "'.' является неверным именем файла."
#: js/files.js:81
msgid ""
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not "
"allowed."
msgstr "Некорректное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' не допустимы."
#: js/files.js:93
msgid "Your storage is full, files can not be updated or synced anymore!"
msgstr ""
#: js/files.js:97
msgid "Your storage is almost full ({usedSpacePercent}%)"
msgstr ""
#: js/files.js:110
msgid ""
"Encryption App is enabled but your keys are not initialized, please log-out "
"and log-in again"
msgstr ""
#: js/files.js:114
msgid ""
"Invalid private key for Encryption App. Please update your private key "
"password in your personal settings to recover access to your encrypted "
"files."
msgstr ""
#: js/files.js:118
msgid ""
"Encryption was disabled but your files are still encrypted. Please go to "
"your personal settings to decrypt your files."
msgstr ""
#: js/files.js:349
msgid ""
"Your download is being prepared. This might take some time if the files are "
"big."
msgstr ""
#: js/files.js:558 js/files.js:596
msgid "Error moving file"
msgstr ""
#: js/files.js:558 js/files.js:596
msgid "Error"
msgstr "Ошибка"
#: js/files.js:613 templates/index.php:56
msgid "Name"
msgstr ""
#: js/files.js:614 templates/index.php:68
msgid "Size"
msgstr "Размер"
#: js/files.js:615 templates/index.php:70
msgid "Modified"
msgstr ""
#: lib/app.php:60
msgid "Invalid folder name. Usage of 'Shared' is reserved."
msgstr ""
#: lib/app.php:101
#, php-format
msgid "%s could not be renamed"
msgstr ""
#: lib/helper.php:11 templates/index.php:16
msgid "Upload"
msgstr "Загрузка"
#: templates/admin.php:5
msgid "File handling"
msgstr ""
#: templates/admin.php:7
msgid "Maximum upload size"
msgstr ""
#: templates/admin.php:10
msgid "max. possible: "
msgstr ""
#: templates/admin.php:15
msgid "Needed for multi-file and folder downloads."
msgstr ""
#: templates/admin.php:17
msgid "Enable ZIP-download"
msgstr ""
#: templates/admin.php:20
msgid "0 is unlimited"
msgstr "0 без ограничений"
#: templates/admin.php:22
msgid "Maximum input size for ZIP files"
msgstr ""
#: templates/admin.php:26
msgid "Save"
msgstr "Сохранить"
#: templates/index.php:5
msgid "New"
msgstr ""
#: templates/index.php:8
msgid "New text file"
msgstr ""
#: templates/index.php:8
msgid "Text file"
msgstr ""
#: templates/index.php:10
msgid "New folder"
msgstr ""
#: templates/index.php:10
msgid "Folder"
msgstr ""
#: templates/index.php:12
msgid "From link"
msgstr ""
#: templates/index.php:29
msgid "Deleted files"
msgstr ""
#: templates/index.php:34
msgid "Cancel upload"
msgstr "Отмена загрузки"
#: templates/index.php:40
msgid "You dont have permission to upload or create files here"
msgstr ""
#: templates/index.php:45
msgid "Nothing in here. Upload something!"
msgstr ""
#: templates/index.php:62
msgid "Download"
msgstr "Загрузка"
#: templates/index.php:73 templates/index.php:74
msgid "Delete"
msgstr "Удалить"
#: templates/index.php:86
msgid "Upload too large"
msgstr ""
#: templates/index.php:88
msgid ""
"The files you are trying to upload exceed the maximum size for file uploads "
"on this server."
msgstr ""
#: templates/index.php:93
msgid "Files are being scanned, please wait."
msgstr ""
#: templates/index.php:96
msgid "Current scanning"
msgstr ""
#: templates/upgrade.php:2
msgid "Upgrading filesystem cache..."
msgstr ""

View File

@ -1,201 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-11-29 14:08-0500\n"
"PO-Revision-Date: 2013-11-29 19:08+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ajax/adminrecovery.php:29
msgid "Recovery key successfully enabled"
msgstr ""
#: ajax/adminrecovery.php:34
msgid ""
"Could not enable recovery key. Please check your recovery key password!"
msgstr ""
#: ajax/adminrecovery.php:48
msgid "Recovery key successfully disabled"
msgstr ""
#: ajax/adminrecovery.php:53
msgid ""
"Could not disable recovery key. Please check your recovery key password!"
msgstr ""
#: ajax/changeRecoveryPassword.php:49
msgid "Password successfully changed."
msgstr ""
#: ajax/changeRecoveryPassword.php:51
msgid "Could not change the password. Maybe the old password was not correct."
msgstr ""
#: ajax/updatePrivateKeyPassword.php:52
msgid "Private key password successfully updated."
msgstr ""
#: ajax/updatePrivateKeyPassword.php:54
msgid ""
"Could not update the private key password. Maybe the old password was not "
"correct."
msgstr ""
#: files/error.php:12
msgid ""
"Encryption app not initialized! Maybe the encryption app was re-enabled "
"during your session. Please try to log out and log back in to initialize the"
" encryption app."
msgstr ""
#: files/error.php:16
#, php-format
msgid ""
"Your private key is not valid! Likely your password was changed outside of "
"%s (e.g. your corporate directory). You can update your private key password"
" in your personal settings to recover access to your encrypted files."
msgstr ""
#: files/error.php:19
msgid ""
"Can not decrypt this file, probably this is a shared file. Please ask the "
"file owner to reshare the file with you."
msgstr ""
#: files/error.php:22 files/error.php:27
msgid ""
"Unknown error please check your system settings or contact your "
"administrator"
msgstr ""
#: hooks/hooks.php:59
msgid "Missing requirements."
msgstr ""
#: hooks/hooks.php:60
msgid ""
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL "
"together with the PHP extension is enabled and configured properly. For now,"
" the encryption app has been disabled."
msgstr ""
#: hooks/hooks.php:273
msgid "Following users are not set up for encryption:"
msgstr ""
#: js/detect-migration.js:21
msgid "Initial encryption started... This can take some time. Please wait."
msgstr ""
#: js/settings-admin.js:13
msgid "Saving..."
msgstr ""
#: templates/invalid_private_key.php:8
msgid "Go directly to your "
msgstr ""
#: templates/invalid_private_key.php:8
msgid "personal settings"
msgstr ""
#: templates/settings-admin.php:4 templates/settings-personal.php:3
msgid "Encryption"
msgstr ""
#: templates/settings-admin.php:7
msgid ""
"Enable recovery key (allow to recover users files in case of password loss):"
msgstr ""
#: templates/settings-admin.php:11
msgid "Recovery key password"
msgstr ""
#: templates/settings-admin.php:14
msgid "Repeat Recovery key password"
msgstr ""
#: templates/settings-admin.php:21 templates/settings-personal.php:51
msgid "Enabled"
msgstr ""
#: templates/settings-admin.php:29 templates/settings-personal.php:59
msgid "Disabled"
msgstr ""
#: templates/settings-admin.php:34
msgid "Change recovery key password:"
msgstr ""
#: templates/settings-admin.php:40
msgid "Old Recovery key password"
msgstr ""
#: templates/settings-admin.php:47
msgid "New Recovery key password"
msgstr ""
#: templates/settings-admin.php:53
msgid "Repeat New Recovery key password"
msgstr ""
#: templates/settings-admin.php:58
msgid "Change Password"
msgstr ""
#: templates/settings-personal.php:9
msgid "Your private key password no longer match your log-in password:"
msgstr ""
#: templates/settings-personal.php:12
msgid "Set your old private key password to your current log-in password."
msgstr ""
#: templates/settings-personal.php:14
msgid ""
" If you don't remember your old password you can ask your administrator to "
"recover your files."
msgstr ""
#: templates/settings-personal.php:22
msgid "Old log-in password"
msgstr ""
#: templates/settings-personal.php:28
msgid "Current log-in password"
msgstr ""
#: templates/settings-personal.php:33
msgid "Update Private Key Password"
msgstr ""
#: templates/settings-personal.php:42
msgid "Enable password recovery:"
msgstr ""
#: templates/settings-personal.php:44
msgid ""
"Enabling this option will allow you to reobtain access to your encrypted "
"files in case of password loss"
msgstr ""
#: templates/settings-personal.php:60
msgid "File recovery settings updated"
msgstr ""
#: templates/settings-personal.php:61
msgid "Could not update file recovery"
msgstr ""

View File

@ -1,123 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-11-21 10:01-0500\n"
"PO-Revision-Date: 2013-11-16 07:50+0000\n"
"Last-Translator: masensio <masensio@solidgear.es>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: js/dropbox.js:7 js/dropbox.js:28 js/google.js:8 js/google.js:39
msgid "Access granted"
msgstr ""
#: js/dropbox.js:30 js/dropbox.js:96 js/dropbox.js:102
msgid "Error configuring Dropbox storage"
msgstr ""
#: js/dropbox.js:65 js/google.js:86
msgid "Grant access"
msgstr ""
#: js/dropbox.js:101
msgid "Please provide a valid Dropbox app key and secret."
msgstr ""
#: js/google.js:42 js/google.js:121
msgid "Error configuring Google Drive storage"
msgstr ""
#: lib/config.php:461
msgid ""
"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares "
"is not possible. Please ask your system administrator to install it."
msgstr ""
#: lib/config.php:465
msgid ""
"<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."
msgstr ""
#: lib/config.php:468
msgid ""
"<b>Warning:</b> The Curl support in PHP is not enabled or installed. "
"Mounting of ownCloud / WebDAV or GoogleDrive is not possible. Please ask "
"your system administrator to install it."
msgstr ""
#: templates/settings.php:3
msgid "External Storage"
msgstr ""
#: templates/settings.php:9 templates/settings.php:28
msgid "Folder name"
msgstr ""
#: templates/settings.php:10
msgid "External storage"
msgstr ""
#: templates/settings.php:11
msgid "Configuration"
msgstr ""
#: templates/settings.php:12
msgid "Options"
msgstr "Опции"
#: templates/settings.php:13
msgid "Applicable"
msgstr ""
#: templates/settings.php:33
msgid "Add storage"
msgstr ""
#: templates/settings.php:90
msgid "None set"
msgstr ""
#: templates/settings.php:91
msgid "All Users"
msgstr ""
#: templates/settings.php:92
msgid "Groups"
msgstr ""
#: templates/settings.php:100
msgid "Users"
msgstr ""
#: templates/settings.php:113 templates/settings.php:114
#: templates/settings.php:149 templates/settings.php:150
msgid "Delete"
msgstr "Удалить"
#: templates/settings.php:129
msgid "Enable User External Storage"
msgstr ""
#: templates/settings.php:130
msgid "Allow users to mount their own external storage"
msgstr ""
#: templates/settings.php:141
msgid "SSL root certificates"
msgstr ""
#: templates/settings.php:159
msgid "Import Root Certificate"
msgstr ""

View File

@ -1,84 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-11-15 22:54-0500\n"
"PO-Revision-Date: 2013-11-13 16:11+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: templates/authenticate.php:4
msgid "This share is password-protected"
msgstr ""
#: templates/authenticate.php:7
msgid "The password is wrong. Try again."
msgstr ""
#: templates/authenticate.php:10
msgid "Password"
msgstr "Пароль"
#: templates/part.404.php:3
msgid "Sorry, this link doesnt seem to work anymore."
msgstr ""
#: templates/part.404.php:4
msgid "Reasons might be:"
msgstr ""
#: templates/part.404.php:6
msgid "the item was removed"
msgstr ""
#: templates/part.404.php:7
msgid "the link expired"
msgstr ""
#: templates/part.404.php:8
msgid "sharing is disabled"
msgstr ""
#: templates/part.404.php:10
msgid "For more info, please ask the person who sent this link."
msgstr ""
#: templates/public.php:18
#, php-format
msgid "%s shared the folder %s with you"
msgstr ""
#: templates/public.php:21
#, php-format
msgid "%s shared the file %s with you"
msgstr ""
#: templates/public.php:29 templates/public.php:95
msgid "Download"
msgstr "Загрузка"
#: templates/public.php:46 templates/public.php:49
msgid "Upload"
msgstr "Загрузка"
#: templates/public.php:59
msgid "Cancel upload"
msgstr "Отмена загрузки"
#: templates/public.php:92
msgid "No preview available for"
msgstr ""
#: templates/public.php:99
msgid "Direct link"
msgstr ""

View File

@ -1,60 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-11-21 10:01-0500\n"
"PO-Revision-Date: 2013-11-16 07:50+0000\n"
"Last-Translator: masensio <masensio@solidgear.es>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ajax/delete.php:42
#, php-format
msgid "Couldn't delete %s permanently"
msgstr ""
#: ajax/undelete.php:42
#, php-format
msgid "Couldn't restore %s"
msgstr ""
#: js/trash.js:18 js/trash.js:44 js/trash.js:121 js/trash.js:149
msgid "Error"
msgstr "Ошибка"
#: lib/trashbin.php:815 lib/trashbin.php:817
msgid "restored"
msgstr ""
#: templates/index.php:8
msgid "Nothing in here. Your trash bin is empty!"
msgstr ""
#: templates/index.php:22
msgid "Name"
msgstr ""
#: templates/index.php:25 templates/index.php:27
msgid "Restore"
msgstr ""
#: templates/index.php:33
msgid "Deleted"
msgstr ""
#: templates/index.php:36 templates/index.php:37
msgid "Delete"
msgstr "Удалить"
#: templates/part.breadcrumb.php:9
msgid "Deleted Files"
msgstr ""

View File

@ -1,43 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-10-19 08:26-0400\n"
"PO-Revision-Date: 2013-10-18 09:15+0000\n"
"Last-Translator: masensio <masensio@solidgear.es>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ajax/rollbackVersion.php:13
#, php-format
msgid "Could not revert: %s"
msgstr ""
#: js/versions.js:14
msgid "Versions"
msgstr ""
#: js/versions.js:60
msgid "Failed to revert {file} to revision {timestamp}."
msgstr ""
#: js/versions.js:86
msgid "More versions..."
msgstr ""
#: js/versions.js:123
msgid "No other versions available"
msgstr ""
#: js/versions.js:154
msgid "Restore"
msgstr ""

View File

@ -1,337 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-12-20 01:55-0500\n"
"PO-Revision-Date: 2013-12-20 06:23+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: private/app.php:243
#, php-format
msgid ""
"App \"%s\" can't be installed because it is not compatible with this version"
" of ownCloud."
msgstr ""
#: private/app.php:255
msgid "No app name specified"
msgstr ""
#: private/app.php:360
msgid "Help"
msgstr "Помощь"
#: private/app.php:373
msgid "Personal"
msgstr ""
#: private/app.php:384
msgid "Settings"
msgstr "Настройки"
#: private/app.php:396
msgid "Users"
msgstr ""
#: private/app.php:409
msgid "Admin"
msgstr ""
#: private/app.php:873
#, php-format
msgid "Failed to upgrade \"%s\"."
msgstr ""
#: private/avatar.php:66
msgid "Unknown filetype"
msgstr ""
#: private/avatar.php:71
msgid "Invalid image"
msgstr ""
#: private/defaults.php:34
msgid "web services under your control"
msgstr ""
#: private/files.php:66 private/files.php:98
#, php-format
msgid "cannot open \"%s\""
msgstr ""
#: private/files.php:231
msgid "ZIP download is turned off."
msgstr ""
#: private/files.php:232
msgid "Files need to be downloaded one by one."
msgstr ""
#: private/files.php:233 private/files.php:261
msgid "Back to Files"
msgstr ""
#: private/files.php:258
msgid "Selected files too large to generate zip file."
msgstr ""
#: private/files.php:259
msgid ""
"Please download the files separately in smaller chunks or kindly ask your "
"administrator."
msgstr ""
#: private/installer.php:63
msgid "No source specified when installing app"
msgstr ""
#: private/installer.php:70
msgid "No href specified when installing app from http"
msgstr ""
#: private/installer.php:75
msgid "No path specified when installing app from local file"
msgstr ""
#: private/installer.php:89
#, php-format
msgid "Archives of type %s are not supported"
msgstr ""
#: private/installer.php:103
msgid "Failed to open archive when installing app"
msgstr ""
#: private/installer.php:125
msgid "App does not provide an info.xml file"
msgstr ""
#: private/installer.php:131
msgid "App can't be installed because of not allowed code in the App"
msgstr ""
#: private/installer.php:140
msgid ""
"App can't be installed because it is not compatible with this version of "
"ownCloud"
msgstr ""
#: private/installer.php:146
msgid ""
"App can't be installed because it contains the <shipped>true</shipped> tag "
"which is not allowed for non shipped apps"
msgstr ""
#: private/installer.php:159
msgid ""
"App can't be installed because the version in info.xml/version is not the "
"same as the version reported from the app store"
msgstr ""
#: private/installer.php:169
msgid "App directory already exists"
msgstr ""
#: private/installer.php:182
#, php-format
msgid "Can't create app folder. Please fix permissions. %s"
msgstr ""
#: private/json.php:28
msgid "Application is not enabled"
msgstr ""
#: private/json.php:39 private/json.php:62 private/json.php:73
msgid "Authentication error"
msgstr ""
#: private/json.php:51
msgid "Token expired. Please reload page."
msgstr ""
#: private/search/provider/file.php:18 private/search/provider/file.php:36
msgid "Files"
msgstr "Файлы"
#: private/search/provider/file.php:27 private/search/provider/file.php:34
msgid "Text"
msgstr "Текст"
#: private/search/provider/file.php:30
msgid "Images"
msgstr ""
#: private/setup/abstractdatabase.php:26
#, php-format
msgid "%s enter the database username."
msgstr ""
#: private/setup/abstractdatabase.php:29
#, php-format
msgid "%s enter the database name."
msgstr ""
#: private/setup/abstractdatabase.php:32
#, php-format
msgid "%s you may not use dots in the database name"
msgstr ""
#: private/setup/mssql.php:20
#, php-format
msgid "MS SQL username and/or password not valid: %s"
msgstr ""
#: private/setup/mssql.php:21 private/setup/mysql.php:13
#: private/setup/oci.php:114 private/setup/postgresql.php:24
#: private/setup/postgresql.php:70
msgid "You need to enter either an existing account or the administrator."
msgstr ""
#: private/setup/mysql.php:12
msgid "MySQL username and/or password not valid"
msgstr ""
#: private/setup/mysql.php:67 private/setup/oci.php:54
#: private/setup/oci.php:121 private/setup/oci.php:144
#: private/setup/oci.php:151 private/setup/oci.php:162
#: private/setup/oci.php:169 private/setup/oci.php:178
#: private/setup/oci.php:186 private/setup/oci.php:195
#: private/setup/oci.php:201 private/setup/postgresql.php:89
#: private/setup/postgresql.php:98 private/setup/postgresql.php:115
#: private/setup/postgresql.php:125 private/setup/postgresql.php:134
#, php-format
msgid "DB Error: \"%s\""
msgstr ""
#: private/setup/mysql.php:68 private/setup/oci.php:55
#: private/setup/oci.php:122 private/setup/oci.php:145
#: private/setup/oci.php:152 private/setup/oci.php:163
#: private/setup/oci.php:179 private/setup/oci.php:187
#: private/setup/oci.php:196 private/setup/postgresql.php:90
#: private/setup/postgresql.php:99 private/setup/postgresql.php:116
#: private/setup/postgresql.php:126 private/setup/postgresql.php:135
#, php-format
msgid "Offending command was: \"%s\""
msgstr ""
#: private/setup/mysql.php:85
#, php-format
msgid "MySQL user '%s'@'localhost' exists already."
msgstr ""
#: private/setup/mysql.php:86
msgid "Drop this user from MySQL"
msgstr ""
#: private/setup/mysql.php:91
#, php-format
msgid "MySQL user '%s'@'%%' already exists"
msgstr ""
#: private/setup/mysql.php:92
msgid "Drop this user from MySQL."
msgstr ""
#: private/setup/oci.php:34
msgid "Oracle connection could not be established"
msgstr ""
#: private/setup/oci.php:41 private/setup/oci.php:113
msgid "Oracle username and/or password not valid"
msgstr ""
#: private/setup/oci.php:170 private/setup/oci.php:202
#, php-format
msgid "Offending command was: \"%s\", name: %s, password: %s"
msgstr ""
#: private/setup/postgresql.php:23 private/setup/postgresql.php:69
msgid "PostgreSQL username and/or password not valid"
msgstr ""
#: private/setup.php:28
msgid "Set an admin username."
msgstr ""
#: private/setup.php:31
msgid "Set an admin password."
msgstr ""
#: private/setup.php:195
msgid ""
"Your web server is not yet properly setup to allow files synchronization "
"because the WebDAV interface seems to be broken."
msgstr ""
#: private/setup.php:196
#, php-format
msgid "Please double check the <a href='%s'>installation guides</a>."
msgstr ""
#: private/tags.php:194
#, php-format
msgid "Could not find category \"%s\""
msgstr ""
#: private/template/functions.php:130
msgid "seconds ago"
msgstr ""
#: private/template/functions.php:131
msgid "%n minute ago"
msgid_plural "%n minutes ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: private/template/functions.php:132
msgid "%n hour ago"
msgid_plural "%n hours ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: private/template/functions.php:133
msgid "today"
msgstr ""
#: private/template/functions.php:134
msgid "yesterday"
msgstr ""
#: private/template/functions.php:136
msgid "%n day go"
msgid_plural "%n days ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: private/template/functions.php:138
msgid "last month"
msgstr ""
#: private/template/functions.php:139
msgid "%n month ago"
msgid_plural "%n months ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: private/template/functions.php:141
msgid "last year"
msgstr ""
#: private/template/functions.php:142
msgid "years ago"
msgstr ""

View File

@ -1,668 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-12-04 18:12-0500\n"
"PO-Revision-Date: 2013-12-04 23:13+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ajax/apps/ocs.php:20
msgid "Unable to load list from App Store"
msgstr ""
#: ajax/changedisplayname.php:25 ajax/removeuser.php:15 ajax/setquota.php:17
#: ajax/togglegroups.php:20 changepassword/controller.php:55
msgid "Authentication error"
msgstr ""
#: ajax/changedisplayname.php:31
msgid "Your full name has been changed."
msgstr ""
#: ajax/changedisplayname.php:34
msgid "Unable to change full name"
msgstr ""
#: ajax/creategroup.php:10
msgid "Group already exists"
msgstr ""
#: ajax/creategroup.php:19
msgid "Unable to add group"
msgstr ""
#: ajax/lostpassword.php:12
msgid "Email saved"
msgstr ""
#: ajax/lostpassword.php:14
msgid "Invalid email"
msgstr ""
#: ajax/removegroup.php:13
msgid "Unable to delete group"
msgstr ""
#: ajax/removeuser.php:25
msgid "Unable to delete user"
msgstr ""
#: ajax/setlanguage.php:15
msgid "Language changed"
msgstr ""
#: ajax/setlanguage.php:17 ajax/setlanguage.php:20
msgid "Invalid request"
msgstr ""
#: ajax/togglegroups.php:12
msgid "Admins can't remove themself from the admin group"
msgstr ""
#: ajax/togglegroups.php:30
#, php-format
msgid "Unable to add user to group %s"
msgstr ""
#: ajax/togglegroups.php:36
#, php-format
msgid "Unable to remove user from group %s"
msgstr ""
#: ajax/updateapp.php:14
msgid "Couldn't update app."
msgstr ""
#: changepassword/controller.php:20
msgid "Wrong password"
msgstr ""
#: changepassword/controller.php:42
msgid "No user supplied"
msgstr ""
#: changepassword/controller.php:74
msgid ""
"Please provide an admin recovery password, otherwise all user data will be "
"lost"
msgstr ""
#: changepassword/controller.php:79
msgid ""
"Wrong admin recovery password. Please check the password and try again."
msgstr ""
#: changepassword/controller.php:87
msgid ""
"Back-end doesn't support password change, but the users encryption key was "
"successfully updated."
msgstr ""
#: changepassword/controller.php:92 changepassword/controller.php:103
msgid "Unable to change password"
msgstr ""
#: js/apps.js:43
msgid "Update to {appversion}"
msgstr ""
#: js/apps.js:49 js/apps.js:82 js/apps.js:110
msgid "Disable"
msgstr ""
#: js/apps.js:49 js/apps.js:90 js/apps.js:103 js/apps.js:119
msgid "Enable"
msgstr ""
#: js/apps.js:71
msgid "Please wait...."
msgstr ""
#: js/apps.js:79 js/apps.js:80 js/apps.js:101
msgid "Error while disabling app"
msgstr ""
#: js/apps.js:100 js/apps.js:114 js/apps.js:115
msgid "Error while enabling app"
msgstr ""
#: js/apps.js:125
msgid "Updating...."
msgstr ""
#: js/apps.js:128
msgid "Error while updating app"
msgstr ""
#: js/apps.js:128
msgid "Error"
msgstr "Ошибка"
#: js/apps.js:129 templates/apps.php:43
msgid "Update"
msgstr ""
#: js/apps.js:132
msgid "Updated"
msgstr ""
#: js/personal.js:220
msgid "Select a profile picture"
msgstr ""
#: js/personal.js:266
msgid "Decrypting files... Please wait, this can take some time."
msgstr ""
#: js/personal.js:287
msgid "Saving..."
msgstr ""
#: js/users.js:47
msgid "deleted"
msgstr ""
#: js/users.js:47
msgid "undo"
msgstr ""
#: js/users.js:79
msgid "Unable to remove user"
msgstr ""
#: js/users.js:95 templates/users.php:26 templates/users.php:90
#: templates/users.php:118
msgid "Groups"
msgstr ""
#: js/users.js:100 templates/users.php:92 templates/users.php:130
msgid "Group Admin"
msgstr ""
#: js/users.js:123 templates/users.php:170
msgid "Delete"
msgstr "Удалить"
#: js/users.js:284
msgid "add group"
msgstr ""
#: js/users.js:451
msgid "A valid username must be provided"
msgstr ""
#: js/users.js:452 js/users.js:458 js/users.js:473
msgid "Error creating user"
msgstr ""
#: js/users.js:457
msgid "A valid password must be provided"
msgstr ""
#: js/users.js:481
msgid "Warning: Home directory for user \"{user}\" already exists"
msgstr ""
#: personal.php:45 personal.php:46
msgid "__language_name__"
msgstr ""
#: templates/admin.php:8
msgid "Everything (fatal issues, errors, warnings, info, debug)"
msgstr ""
#: templates/admin.php:9
msgid "Info, warnings, errors and fatal issues"
msgstr ""
#: templates/admin.php:10
msgid "Warnings, errors and fatal issues"
msgstr ""
#: templates/admin.php:11
msgid "Errors and fatal issues"
msgstr ""
#: templates/admin.php:12
msgid "Fatal issues only"
msgstr ""
#: templates/admin.php:22 templates/admin.php:36
msgid "Security Warning"
msgstr ""
#: templates/admin.php:25
#, php-format
msgid ""
"You are accessing %s via HTTP. We strongly suggest you configure your server"
" to require using HTTPS instead."
msgstr ""
#: templates/admin.php:39
msgid ""
"Your data directory and your files are probably accessible from the "
"internet. The .htaccess file is not working. We strongly suggest that you "
"configure your webserver in a way that the data directory is no longer "
"accessible or you move the data directory outside the webserver document "
"root."
msgstr ""
#: templates/admin.php:50
msgid "Setup Warning"
msgstr ""
#: templates/admin.php:53
msgid ""
"Your web server is not yet properly setup to allow files synchronization "
"because the WebDAV interface seems to be broken."
msgstr ""
#: templates/admin.php:54
#, php-format
msgid "Please double check the <a href=\"%s\">installation guides</a>."
msgstr ""
#: templates/admin.php:65
msgid "Module 'fileinfo' missing"
msgstr ""
#: templates/admin.php:68
msgid ""
"The PHP module 'fileinfo' is missing. We strongly recommend to enable this "
"module to get best results with mime-type detection."
msgstr ""
#: templates/admin.php:79
msgid "Your PHP version is outdated"
msgstr ""
#: templates/admin.php:82
msgid ""
"Your PHP version is outdated. We strongly recommend to update to 5.3.8 or "
"newer because older versions are known to be broken. It is possible that "
"this installation is not working correctly."
msgstr ""
#: templates/admin.php:93
msgid "Locale not working"
msgstr ""
#: templates/admin.php:98
msgid "System locale can not be set to a one which supports UTF-8."
msgstr ""
#: templates/admin.php:102
msgid ""
"This means that there might be problems with certain characters in file "
"names."
msgstr ""
#: templates/admin.php:106
#, php-format
msgid ""
"We strongly suggest to install the required packages on your system to "
"support one of the following locales: %s."
msgstr ""
#: templates/admin.php:118
msgid "Internet connection not working"
msgstr ""
#: templates/admin.php:121
msgid ""
"This server has no working internet connection. This means that some of the "
"features like mounting of external storage, notifications about updates or "
"installation of 3rd party apps don´t work. Accessing files from remote and "
"sending of notification emails might also not work. We suggest to enable "
"internet connection for this server if you want to have all features."
msgstr ""
#: templates/admin.php:135
msgid "Cron"
msgstr ""
#: templates/admin.php:142
msgid "Execute one task with each page loaded"
msgstr ""
#: templates/admin.php:150
msgid ""
"cron.php is registered at a webcron service to call cron.php every 15 "
"minutes over http."
msgstr ""
#: templates/admin.php:158
msgid "Use systems cron service to call the cron.php file every 15 minutes."
msgstr ""
#: templates/admin.php:163
msgid "Sharing"
msgstr ""
#: templates/admin.php:169
msgid "Enable Share API"
msgstr ""
#: templates/admin.php:170
msgid "Allow apps to use the Share API"
msgstr ""
#: templates/admin.php:177
msgid "Allow links"
msgstr ""
#: templates/admin.php:178
msgid "Allow users to share items to the public with links"
msgstr ""
#: templates/admin.php:186
msgid "Allow public uploads"
msgstr ""
#: templates/admin.php:187
msgid ""
"Allow users to enable others to upload into their publicly shared folders"
msgstr ""
#: templates/admin.php:195
msgid "Allow resharing"
msgstr ""
#: templates/admin.php:196
msgid "Allow users to share items shared with them again"
msgstr ""
#: templates/admin.php:203
msgid "Allow users to share with anyone"
msgstr ""
#: templates/admin.php:206
msgid "Allow users to only share with users in their groups"
msgstr ""
#: templates/admin.php:213
msgid "Allow mail notification"
msgstr ""
#: templates/admin.php:214
msgid "Allow user to send mail notification for shared files"
msgstr ""
#: templates/admin.php:221
msgid "Security"
msgstr ""
#: templates/admin.php:234
msgid "Enforce HTTPS"
msgstr ""
#: templates/admin.php:236
#, php-format
msgid "Forces the clients to connect to %s via an encrypted connection."
msgstr ""
#: templates/admin.php:242
#, php-format
msgid ""
"Please connect to your %s via HTTPS to enable or disable the SSL "
"enforcement."
msgstr ""
#: templates/admin.php:254
msgid "Log"
msgstr ""
#: templates/admin.php:255
msgid "Log level"
msgstr ""
#: templates/admin.php:287
msgid "More"
msgstr "Подробнее"
#: templates/admin.php:288
msgid "Less"
msgstr ""
#: templates/admin.php:294 templates/personal.php:173
msgid "Version"
msgstr ""
#: templates/admin.php:298 templates/personal.php:176
msgid ""
"Developed by the <a href=\"http://ownCloud.org/contact\" "
"target=\"_blank\">ownCloud community</a>, the <a "
"href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is "
"licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" "
"target=\"_blank\"><abbr title=\"Affero General Public "
"License\">AGPL</abbr></a>."
msgstr ""
#: templates/apps.php:13
msgid "Add your App"
msgstr ""
#: templates/apps.php:28
msgid "More Apps"
msgstr ""
#: templates/apps.php:33
msgid "Select an App"
msgstr ""
#: templates/apps.php:39
msgid "See application page at apps.owncloud.com"
msgstr ""
#: templates/apps.php:41
msgid "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>"
msgstr ""
#: templates/help.php:4
msgid "User Documentation"
msgstr ""
#: templates/help.php:6
msgid "Administrator Documentation"
msgstr ""
#: templates/help.php:9
msgid "Online Documentation"
msgstr ""
#: templates/help.php:11
msgid "Forum"
msgstr ""
#: templates/help.php:14
msgid "Bugtracker"
msgstr ""
#: templates/help.php:17
msgid "Commercial Support"
msgstr ""
#: templates/personal.php:8
msgid "Get the apps to sync your files"
msgstr ""
#: templates/personal.php:19
msgid "Show First Run Wizard again"
msgstr ""
#: templates/personal.php:27
#, php-format
msgid "You have used <strong>%s</strong> of the available <strong>%s</strong>"
msgstr ""
#: templates/personal.php:39 templates/users.php:23 templates/users.php:89
msgid "Password"
msgstr "Пароль"
#: templates/personal.php:40
msgid "Your password was changed"
msgstr ""
#: templates/personal.php:41
msgid "Unable to change your password"
msgstr ""
#: templates/personal.php:42
msgid "Current password"
msgstr ""
#: templates/personal.php:44
msgid "New password"
msgstr ""
#: templates/personal.php:46
msgid "Change password"
msgstr ""
#: templates/personal.php:58 templates/users.php:88
msgid "Full Name"
msgstr ""
#: templates/personal.php:73
msgid "Email"
msgstr ""
#: templates/personal.php:75
msgid "Your email address"
msgstr ""
#: templates/personal.php:76
msgid "Fill in an email address to enable password recovery"
msgstr ""
#: templates/personal.php:86
msgid "Profile picture"
msgstr ""
#: templates/personal.php:91
msgid "Upload new"
msgstr ""
#: templates/personal.php:93
msgid "Select new from Files"
msgstr ""
#: templates/personal.php:94
msgid "Remove image"
msgstr ""
#: templates/personal.php:95
msgid "Either png or jpg. Ideally square but you will be able to crop it."
msgstr ""
#: templates/personal.php:97
msgid "Your avatar is provided by your original account."
msgstr ""
#: templates/personal.php:101
msgid "Abort"
msgstr ""
#: templates/personal.php:102
msgid "Choose as profile image"
msgstr ""
#: templates/personal.php:110 templates/personal.php:111
msgid "Language"
msgstr ""
#: templates/personal.php:130
msgid "Help translate"
msgstr ""
#: templates/personal.php:137
msgid "WebDAV"
msgstr ""
#: templates/personal.php:139
#, php-format
msgid ""
"Use this address to <a href=\"%s\" target=\"_blank\">access your Files via "
"WebDAV</a>"
msgstr ""
#: templates/personal.php:150
msgid "Encryption"
msgstr ""
#: templates/personal.php:152
msgid "The encryption app is no longer enabled, please decrypt all your files"
msgstr ""
#: templates/personal.php:158
msgid "Log-in password"
msgstr ""
#: templates/personal.php:163
msgid "Decrypt all Files"
msgstr ""
#: templates/users.php:21
msgid "Login Name"
msgstr ""
#: templates/users.php:30
msgid "Create"
msgstr "Создать"
#: templates/users.php:36
msgid "Admin Recovery Password"
msgstr ""
#: templates/users.php:37 templates/users.php:38
msgid ""
"Enter the recovery password in order to recover the users files during "
"password change"
msgstr ""
#: templates/users.php:42
msgid "Default Storage"
msgstr ""
#: templates/users.php:44 templates/users.php:139
msgid "Please enter storage quota (ex: \"512 MB\" or \"12 GB\")"
msgstr ""
#: templates/users.php:48 templates/users.php:148
msgid "Unlimited"
msgstr ""
#: templates/users.php:66 templates/users.php:163
msgid "Other"
msgstr ""
#: templates/users.php:87
msgid "Username"
msgstr "Имя пользователя"
#: templates/users.php:94
msgid "Storage"
msgstr ""
#: templates/users.php:108
msgid "change full name"
msgstr ""
#: templates/users.php:112
msgid "set new password"
msgstr ""
#: templates/users.php:143
msgid "Default"
msgstr ""

View File

@ -1,515 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2013-12-20 01:55-0500\n"
"PO-Revision-Date: 2013-12-20 06:23+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ajax/clearMappings.php:34
msgid "Failed to clear the mappings."
msgstr ""
#: ajax/deleteConfiguration.php:34
msgid "Failed to delete the server configuration"
msgstr ""
#: ajax/testConfiguration.php:39
msgid "The configuration is valid and the connection could be established!"
msgstr ""
#: ajax/testConfiguration.php:42
msgid ""
"The configuration is valid, but the Bind failed. Please check the server "
"settings and credentials."
msgstr ""
#: ajax/testConfiguration.php:46
msgid ""
"The configuration is invalid. Please have a look at the logs for further "
"details."
msgstr ""
#: ajax/wizard.php:32
msgid "No action specified"
msgstr ""
#: ajax/wizard.php:38
msgid "No configuration specified"
msgstr ""
#: ajax/wizard.php:81
msgid "No data specified"
msgstr ""
#: ajax/wizard.php:89
#, php-format
msgid " Could not set configuration %s"
msgstr ""
#: js/settings.js:67
msgid "Deletion failed"
msgstr ""
#: js/settings.js:83
msgid "Take over settings from recent server configuration?"
msgstr ""
#: js/settings.js:84
msgid "Keep settings?"
msgstr ""
#: js/settings.js:99
msgid "Cannot add server configuration"
msgstr ""
#: js/settings.js:127
msgid "mappings cleared"
msgstr ""
#: js/settings.js:128
msgid "Success"
msgstr ""
#: js/settings.js:133
msgid "Error"
msgstr "Ошибка"
#: js/settings.js:837
msgid "Configuration OK"
msgstr ""
#: js/settings.js:846
msgid "Configuration incorrect"
msgstr ""
#: js/settings.js:855
msgid "Configuration incomplete"
msgstr ""
#: js/settings.js:872 js/settings.js:881
msgid "Select groups"
msgstr "Выбрать группы"
#: js/settings.js:875 js/settings.js:884
msgid "Select object classes"
msgstr ""
#: js/settings.js:878
msgid "Select attributes"
msgstr ""
#: js/settings.js:905
msgid "Connection test succeeded"
msgstr ""
#: js/settings.js:912
msgid "Connection test failed"
msgstr ""
#: js/settings.js:921
msgid "Do you really want to delete the current Server Configuration?"
msgstr ""
#: js/settings.js:922
msgid "Confirm Deletion"
msgstr ""
#: lib/wizard.php:79 lib/wizard.php:93
#, php-format
msgid "%s group found"
msgid_plural "%s groups found"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: lib/wizard.php:122
#, php-format
msgid "%s user found"
msgid_plural "%s users found"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: lib/wizard.php:778 lib/wizard.php:790
msgid "Invalid Host"
msgstr ""
#: lib/wizard.php:951
msgid "Could not find the desired feature"
msgstr ""
#: templates/part.settingcontrols.php:2
msgid "Save"
msgstr "Сохранить"
#: templates/part.settingcontrols.php:4
msgid "Test Configuration"
msgstr ""
#: templates/part.settingcontrols.php:10 templates/part.wizardcontrols.php:14
msgid "Help"
msgstr "Помощь"
#: templates/part.wizard-groupfilter.php:4
#, php-format
msgid "Limit the access to %s to groups meeting this criteria:"
msgstr ""
#: templates/part.wizard-groupfilter.php:8
#: templates/part.wizard-userfilter.php:8
msgid "only those object classes:"
msgstr ""
#: templates/part.wizard-groupfilter.php:17
#: templates/part.wizard-userfilter.php:17
msgid "only from those groups:"
msgstr ""
#: templates/part.wizard-groupfilter.php:25
#: templates/part.wizard-loginfilter.php:32
#: templates/part.wizard-userfilter.php:25
msgid "Edit raw filter instead"
msgstr ""
#: templates/part.wizard-groupfilter.php:30
#: templates/part.wizard-loginfilter.php:37
#: templates/part.wizard-userfilter.php:30
msgid "Raw LDAP filter"
msgstr ""
#: templates/part.wizard-groupfilter.php:31
#, php-format
msgid ""
"The filter specifies which LDAP groups shall have access to the %s instance."
msgstr ""
#: templates/part.wizard-groupfilter.php:38
msgid "groups found"
msgstr ""
#: templates/part.wizard-loginfilter.php:4
msgid "What attribute shall be used as login name:"
msgstr ""
#: templates/part.wizard-loginfilter.php:8
msgid "LDAP Username:"
msgstr ""
#: templates/part.wizard-loginfilter.php:16
msgid "LDAP Email Address:"
msgstr ""
#: templates/part.wizard-loginfilter.php:24
msgid "Other Attributes:"
msgstr ""
#: templates/part.wizard-loginfilter.php:38
#, php-format
msgid ""
"Defines the filter to apply, when login is attempted. %%uid replaces the "
"username in the login action. Example: \"uid=%%uid\""
msgstr ""
#: templates/part.wizard-server.php:18
msgid "Add Server Configuration"
msgstr ""
#: templates/part.wizard-server.php:30
msgid "Host"
msgstr ""
#: templates/part.wizard-server.php:31
msgid ""
"You can omit the protocol, except you require SSL. Then start with ldaps://"
msgstr ""
#: templates/part.wizard-server.php:36
msgid "Port"
msgstr ""
#: templates/part.wizard-server.php:44
msgid "User DN"
msgstr ""
#: templates/part.wizard-server.php:45
msgid ""
"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."
msgstr ""
#: templates/part.wizard-server.php:52
msgid "Password"
msgstr "Пароль"
#: templates/part.wizard-server.php:53
msgid "For anonymous access, leave DN and Password empty."
msgstr ""
#: templates/part.wizard-server.php:60
msgid "One Base DN per line"
msgstr ""
#: templates/part.wizard-server.php:61
msgid "You can specify Base DN for users and groups in the Advanced tab"
msgstr ""
#: templates/part.wizard-userfilter.php:4
#, php-format
msgid "Limit the access to %s to users meeting this criteria:"
msgstr ""
#: templates/part.wizard-userfilter.php:31
#, php-format
msgid ""
"The filter specifies which LDAP users shall have access to the %s instance."
msgstr ""
#: templates/part.wizard-userfilter.php:38
msgid "users found"
msgstr ""
#: templates/part.wizardcontrols.php:5
msgid "Back"
msgstr "Назад"
#: templates/part.wizardcontrols.php:8
msgid "Continue"
msgstr ""
#: templates/settings.php:11
msgid ""
"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may"
" experience unexpected behavior. Please ask your system administrator to "
"disable one of them."
msgstr ""
#: templates/settings.php:14
msgid ""
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not "
"work. Please ask your system administrator to install it."
msgstr ""
#: templates/settings.php:20
msgid "Connection Settings"
msgstr ""
#: templates/settings.php:22
msgid "Configuration Active"
msgstr ""
#: templates/settings.php:22
msgid "When unchecked, this configuration will be skipped."
msgstr ""
#: templates/settings.php:23
msgid "Backup (Replica) Host"
msgstr ""
#: templates/settings.php:23
msgid ""
"Give an optional backup host. It must be a replica of the main LDAP/AD "
"server."
msgstr ""
#: templates/settings.php:24
msgid "Backup (Replica) Port"
msgstr ""
#: templates/settings.php:25
msgid "Disable Main Server"
msgstr ""
#: templates/settings.php:25
msgid "Only connect to the replica server."
msgstr ""
#: templates/settings.php:26
msgid "Case insensitve LDAP server (Windows)"
msgstr ""
#: templates/settings.php:27
msgid "Turn off SSL certificate validation."
msgstr ""
#: templates/settings.php:27
#, php-format
msgid ""
"Not recommended, use it for testing only! If connection only works with this"
" option, import the LDAP server's SSL certificate in your %s server."
msgstr ""
#: templates/settings.php:28
msgid "Cache Time-To-Live"
msgstr ""
#: templates/settings.php:28
msgid "in seconds. A change empties the cache."
msgstr ""
#: templates/settings.php:30
msgid "Directory Settings"
msgstr ""
#: templates/settings.php:32
msgid "User Display Name Field"
msgstr ""
#: templates/settings.php:32
msgid "The LDAP attribute to use to generate the user's display name."
msgstr ""
#: templates/settings.php:33
msgid "Base User Tree"
msgstr ""
#: templates/settings.php:33
msgid "One User Base DN per line"
msgstr ""
#: templates/settings.php:34
msgid "User Search Attributes"
msgstr ""
#: templates/settings.php:34 templates/settings.php:37
msgid "Optional; one attribute per line"
msgstr ""
#: templates/settings.php:35
msgid "Group Display Name Field"
msgstr ""
#: templates/settings.php:35
msgid "The LDAP attribute to use to generate the groups's display name."
msgstr ""
#: templates/settings.php:36
msgid "Base Group Tree"
msgstr ""
#: templates/settings.php:36
msgid "One Group Base DN per line"
msgstr ""
#: templates/settings.php:37
msgid "Group Search Attributes"
msgstr ""
#: templates/settings.php:38
msgid "Group-Member association"
msgstr ""
#: templates/settings.php:40
msgid "Special Attributes"
msgstr ""
#: templates/settings.php:42
msgid "Quota Field"
msgstr ""
#: templates/settings.php:43
msgid "Quota Default"
msgstr ""
#: templates/settings.php:43
msgid "in bytes"
msgstr ""
#: templates/settings.php:44
msgid "Email Field"
msgstr ""
#: templates/settings.php:45
msgid "User Home Folder Naming Rule"
msgstr ""
#: templates/settings.php:45
msgid ""
"Leave empty for user name (default). Otherwise, specify an LDAP/AD "
"attribute."
msgstr ""
#: templates/settings.php:51
msgid "Internal Username"
msgstr ""
#: templates/settings.php:52
msgid ""
"By default the internal username will be created from the UUID attribute. It"
" makes sure that the username is unique and characters do not need to be "
"converted. The internal username has the restriction that only these "
"characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced "
"with their ASCII correspondence or simply omitted. On collisions a number "
"will be added/increased. The internal username is used to identify a user "
"internally. It is also the default name for the user home folder. It is also"
" a part of remote URLs, for instance for all *DAV services. With this "
"setting, the default behavior can be overridden. To achieve a similar "
"behavior as before ownCloud 5 enter the user display name attribute in the "
"following field. Leave it empty for default behavior. Changes will have "
"effect only on newly mapped (added) LDAP users."
msgstr ""
#: templates/settings.php:53
msgid "Internal Username Attribute:"
msgstr ""
#: templates/settings.php:54
msgid "Override UUID detection"
msgstr ""
#: templates/settings.php:55
msgid ""
"By default, the UUID attribute is automatically detected. The UUID attribute"
" is used to doubtlessly identify LDAP users and groups. Also, the internal "
"username will be created based on the UUID, if not specified otherwise "
"above. You can override the setting and pass an attribute of your choice. "
"You must make sure that the attribute of your choice can be fetched for both"
" users and groups and it is unique. Leave it empty for default behavior. "
"Changes will have effect only on newly mapped (added) LDAP users and groups."
msgstr ""
#: templates/settings.php:56
msgid "UUID Attribute for Users:"
msgstr ""
#: templates/settings.php:57
msgid "UUID Attribute for Groups:"
msgstr ""
#: templates/settings.php:58
msgid "Username-LDAP User Mapping"
msgstr ""
#: templates/settings.php:59
msgid ""
"Usernames are used to store and assign (meta) data. In order to precisely "
"identify and recognize users, each LDAP user will have a internal username. "
"This requires a mapping from username to LDAP user. The created username is "
"mapped to the UUID of the LDAP user. Additionally the DN is cached as well "
"to reduce LDAP interaction, but it is not used for identification. If the DN"
" changes, the changes will be found. The internal username is used all over."
" Clearing the mappings will have leftovers everywhere. Clearing the mappings"
" is not configuration sensitive, it affects all LDAP configurations! Never "
"clear the mappings in a production environment, only in a testing or "
"experimental stage."
msgstr ""
#: templates/settings.php:60
msgid "Clear Username-LDAP User Mapping"
msgstr ""
#: templates/settings.php:60
msgid "Clear Groupname-LDAP Group Mapping"
msgstr ""

View File

@ -1,36 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# AnnaSch <cdewqazxsqwe@gmail.com>, 2013
# AnnaSch <cdewqazxsqwe@gmail.com>, 2012
# skoptev <skoptev@ukr.net>, 2012
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-10-19 08:26-0400\n"
"PO-Revision-Date: 2013-10-18 09:15+0000\n"
"Last-Translator: masensio <masensio@solidgear.es>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: templates/settings.php:3
msgid "WebDAV Authentication"
msgstr ""
#: templates/settings.php:4
msgid "Address: "
msgstr ""
#: templates/settings.php:7
msgid ""
"The user credentials will be sent to this address. This plugin checks the "
"response and will interpret the HTTP statuscodes 401 and 403 as invalid "
"credentials, and all other responses as valid credentials."
msgstr ""

View File

@ -57,6 +57,9 @@ class OC {
* web path in 'url'
*/
public static $APPSROOTS = array();
public static $configDir;
/*
* requested app
*/
@ -100,6 +103,13 @@ class OC {
get_include_path()
);
if(defined('PHPUNIT_RUN') and PHPUNIT_RUN and is_dir(OC::$SERVERROOT . '/tests/config/')) {
self::$configDir = OC::$SERVERROOT . '/tests/config/';
} else {
self::$configDir = OC::$SERVERROOT . '/config/';
}
OC_Config::$object = new \OC\Config(self::$configDir);
OC::$SUBURI = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT)));
$scriptName = OC_Request::scriptName();
if (substr($scriptName, -1) == '/') {
@ -175,8 +185,8 @@ class OC {
}
public static function checkConfig() {
if (file_exists(OC::$SERVERROOT . "/config/config.php")
and !is_writable(OC::$SERVERROOT . "/config/config.php")
if (file_exists(self::$configDir . "/config.php")
and !is_writable(self::$configDir . "/config.php")
) {
$defaults = new OC_Defaults();
if (self::$CLI) {

View File

@ -1,12 +0,0 @@
<?php
$TRANSLATIONS = array(
"Help" => "Помощь",
"Settings" => "Настройки",
"Files" => "Файлы",
"Text" => "Текст",
"_%n minute ago_::_%n minutes ago_" => array("","",""),
"_%n hour ago_::_%n hours ago_" => array("","",""),
"_%n day go_::_%n days ago_" => array("","",""),
"_%n month ago_::_%n months ago_" => array("","","")
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -33,7 +33,7 @@ class OC_API {
const USER_AUTH = 1;
const SUBADMIN_AUTH = 2;
const ADMIN_AUTH = 3;
/**
* API Response Codes
*/
@ -41,13 +41,13 @@ class OC_API {
const RESPOND_SERVER_ERROR = 996;
const RESPOND_NOT_FOUND = 998;
const RESPOND_UNKNOWN_ERROR = 999;
/**
* api actions
*/
protected static $actions = array();
private static $logoutRequired = false;
/**
* registers an api call
* @param string $method the http method
@ -58,7 +58,7 @@ class OC_API {
* @param array $defaults
* @param array $requirements
*/
public static function register($method, $url, $action, $app,
public static function register($method, $url, $action, $app,
$authLevel = OC_API::USER_AUTH,
$defaults = array(),
$requirements = array()) {
@ -75,7 +75,7 @@ class OC_API {
}
self::$actions[$name][] = array('app' => $app, 'action' => $action, 'authlevel' => $authLevel);
}
/**
* handles an api call
* @param array $parameters
@ -125,7 +125,7 @@ class OC_API {
self::respond($response, $format);
}
/**
* merge the returned result objects into one response
* @param array $responses
@ -166,32 +166,31 @@ class OC_API {
// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
// Merge failed responses if more than one
$data = array();
$meta = array();
foreach($shipped['failed'] as $failure) {
$data = array_merge_recursive($data, $failure['response']->getData());
}
$picked = reset($shipped['failed']);
$code = $picked['response']->getStatusCode();
$response = new OC_OCS_Result($data, $code);
$meta = $picked['response']->getMeta();
$response = new OC_OCS_Result($data, $code, $meta['message']);
return $response;
} elseif(!empty($shipped['succeeded'])) {
$responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
} elseif(!empty($thirdparty['failed'])) {
// Merge failed responses if more than one
$data = array();
$meta = array();
foreach($thirdparty['failed'] as $failure) {
$data = array_merge_recursive($data, $failure['response']->getData());
}
$picked = reset($thirdparty['failed']);
$code = $picked['response']->getStatusCode();
$response = new OC_OCS_Result($data, $code);
$meta = $picked['response']->getMeta();
$response = new OC_OCS_Result($data, $code, $meta['message']);
return $response;
} else {
$responses = $thirdparty['succeeded'];
}
// Merge the successful responses
$meta = array();
$data = array();
foreach($responses as $app => $response) {
@ -200,22 +199,25 @@ class OC_API {
} else {
$data = array_merge_recursive($data, $response['response']->getData());
}
$codes[] = $response['response']->getStatusCode();
$codes[] = array('code' => $response['response']->getStatusCode(),
'meta' => $response['response']->getMeta());
}
// Use any non 100 status codes
$statusCode = 100;
$statusMessage = null;
foreach($codes as $code) {
if($code != 100) {
$statusCode = $code;
if($code['code'] != 100) {
$statusCode = $code['code'];
$statusMessage = $code['meta']['message'];
break;
}
}
$result = new OC_OCS_Result($data, $statusCode);
$result = new OC_OCS_Result($data, $statusCode, $statusMessage);
return $result;
}
/**
* authenticate the api call
* @param array $action the action details as supplied to OC_API::register()
@ -261,8 +263,8 @@ class OC_API {
return false;
break;
}
}
}
/**
* http basic auth
* @return string|false (username, or false on failure)
@ -294,7 +296,7 @@ class OC_API {
return false;
}
/**
* respond to a call
* @param OC_OCS_Result $result
@ -343,5 +345,5 @@ class OC_API {
}
}
}
}

View File

@ -555,6 +555,10 @@ class OC_App{
}elseif($child->getName()=='description') {
$xml=(string)$child->asXML();
$data[$child->getName()]=substr($xml, 13, -14);//script <description> tags
}elseif($child->getName()=='documentation') {
foreach($child as $subchild) {
$data["documentation"][$subchild->getName()] = (string)$subchild;
}
}else{
$data[$child->getName()]=(string)$child;
}

View File

@ -50,7 +50,7 @@ class Config {
protected $debugMode;
/**
* @param $configDir path to the config dir, needs to end with '/'
* @param string $configDir path to the config dir, needs to end with '/'
*/
public function __construct($configDir) {
$this->configDir = $configDir;

View File

@ -83,7 +83,7 @@ class OC_Files {
if ($basename) {
$name = $basename . '.zip';
} else {
$name = 'owncloud.zip';
$name = 'download.zip';
}
set_time_limit($executionTime);

View File

@ -178,7 +178,7 @@ class Cache {
if ($file['storage_mtime'] == 0) {
$file['storage_mtime'] = $file['mtime'];
}
if ($file['encrypted']) {
if ($file['encrypted'] or ($file['unencrypted_size'] > 0 and $file['mimetype'] === 'httpd/unix-directory')) {
$file['encrypted_size'] = $file['size'];
$file['size'] = $file['unencrypted_size'];
}
@ -511,22 +511,34 @@ class Cache {
$entry = $this->get($path);
if ($entry && $entry['mimetype'] === 'httpd/unix-directory') {
$id = $entry['fileid'];
$sql = 'SELECT SUM(`size`) AS f1, MIN(`size`) AS f2 FROM `*PREFIX*filecache` '.
$sql = 'SELECT SUM(`size`) AS f1, MIN(`size`) AS f2, ' .
'SUM(`unencrypted_size`) AS f3 ' .
'FROM `*PREFIX*filecache` ' .
'WHERE `parent` = ? AND `storage` = ?';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
list($sum, $min) = array_values($row);
list($sum, $min, $unencryptedSum) = array_values($row);
$sum = (int)$sum;
$min = (int)$min;
$unencryptedSum = (int)$unencryptedSum;
if ($min === -1) {
$totalSize = $min;
} else {
$totalSize = $sum;
}
$update = array();
if ($entry['size'] !== $totalSize) {
$this->update($id, array('size' => $totalSize));
$update['size'] = $totalSize;
}
if ($entry['unencrypted_size'] !== $unencryptedSum) {
$update['unencrypted_size'] = $unencryptedSum;
}
if (count($update) > 0) {
$this->update($id, $update);
}
if ($totalSize !== -1 and $unencryptedSum > 0) {
$totalSize = $unencryptedSum;
}
}
}
return $totalSize;

View File

@ -122,7 +122,7 @@ class Scanner extends BasicEmitter {
$propagateETagChange = true;
}
// only reuse data if the file hasn't explicitly changed
if (isset($data['mtime']) && isset($cacheData['mtime']) && $data['mtime'] === $cacheData['mtime']) {
if (isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) {
if (($reuseExisting & self::REUSE_SIZE) && ($data['size'] === -1)) {
$data['size'] = $cacheData['size'];
}

View File

@ -40,7 +40,7 @@ class Watcher {
* check $path for updates
*
* @param string $path
* @return boolean true if path was updated, false otherwise
* @return boolean | array true if path was updated, otherwise the cached data is returned
*/
public function checkUpdate($path) {
$cachedEntry = $this->cache->get($path);
@ -56,7 +56,7 @@ class Watcher {
$this->cache->correctFolderSize($path);
return true;
}
return false;
return $cachedEntry;
}
/**

View File

@ -95,7 +95,7 @@ class Quota extends Wrapper {
public function fopen($path, $mode) {
$source = $this->storage->fopen($path, $mode);
$free = $this->free_space('');
if ($free >= 0 && $mode !== 'r') {
if ($source && $free >= 0 && $mode !== 'r' && $mode !== 'rb') {
return \OC\Files\Stream\Quota::wrap($source, $free);
} else {
return $source;

View File

@ -801,6 +801,7 @@ class View {
* @var string $internalPath
*/
list($storage, $internalPath) = Filesystem::resolvePath($path);
$data = null;
if ($storage) {
$cache = $storage->getCache($internalPath);
$permissionsCache = $storage->getPermissionsCache($internalPath);
@ -811,10 +812,12 @@ class View {
$scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW);
} else {
$watcher = $storage->getWatcher($internalPath);
$watcher->checkUpdate($internalPath);
$data = $watcher->checkUpdate($internalPath);
}
$data = $cache->get($internalPath);
if (!is_array($data)) {
$data = $cache->get($internalPath);
}
if ($data and $data['fileid']) {
if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') {

View File

@ -407,6 +407,9 @@ class OC_Installer{
include OC_App::getAppPath($app)."/appinfo/install.php";
}
$info=OC_App::getAppInfo($app);
if (is_null($info)) {
return false;
}
OC_Appconfig::setValue($app, 'installed_version', OC_App::getAppVersion($app));
//set remote/public handelers

View File

@ -64,6 +64,20 @@ class OC_JSON{
}
}
/**
* Check is a given user exists - send json error msg if not
* @param string $user
*/
public static function checkUserExists($user) {
if (!OCP\User::userExists($user)) {
$l = OC_L10N::get('lib');
OCP\JSON::error(array('data' => array('message' => $l->t('Unknown user'))));
exit;
}
}
/**
* Check if the user is a subadmin, send json error msg if not
*/

View File

@ -38,7 +38,6 @@
* This class is responsible for reading and writing config.php, the very basic
* configuration file of ownCloud.
*/
OC_Config::$object = new \OC\Config(OC::$SERVERROOT.'/config/');
class OC_Config {
/**

View File

@ -22,7 +22,7 @@ class CSSResourceLocator extends ResourceLocator {
$app = substr($style, 0, strpos($style, '/'));
$style = substr($style, strpos($style, '/')+1);
$app_path = \OC_App::getAppPath($app);
$app_url = \OC_App::getAppWebPath($app);
$app_url = $this->webroot . '/index.php/apps/' . $app;
if ($this->appendIfExist($app_path, $style.$this->form_factor.'.css', $app_url)
|| $this->appendIfExist($app_path, $style.'.css', $app_url)
) {

View File

@ -51,6 +51,10 @@ class OC_Util {
self::$rootMounted = true;
}
if ($user != '' && !OCP\User::userExists($user)) {
return false;
}
//if we aren't logged in, there is no use to set up the filesystem
if( $user != "" ) {
\OC\Files\Filesystem::addStorageWrapper(function($mountPoint, $storage){
@ -312,7 +316,7 @@ class OC_Util {
.'" target="_blank">giving the webserver write access to the root directory</a>.';
// Check if config folder is writable.
if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
if(!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
$errors[] = array(
'error' => "Can't write into config directory",
'hint' => 'This can usually be fixed by '
@ -580,7 +584,7 @@ class OC_Util {
// Check if we are a user
if( !OC_User::isLoggedIn()) {
header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php',
array('redirectUrl' => OC_Request::requestUri())
array('redirect_url' => OC_Request::requestUri())
));
exit();
}
@ -892,6 +896,11 @@ class OC_Util {
return false;
}
// in case the connection is via proxy return true to avoid connecting to owncloud.org
if(OC_Config::getValue('proxy', '') != '') {
return true;
}
// try to connect to owncloud.org to see if http connections to the internet are possible.
$connected = @fsockopen("www.owncloud.org", 80);
if ($connected) {

View File

@ -167,7 +167,7 @@ class JSON {
* @return string json formatted string if not admin user.
*/
public static function checkAdminUser() {
return(\OC_JSON::checkAdminUser());
\OC_JSON::checkAdminUser();
}
/**
@ -177,4 +177,12 @@ class JSON {
public static function encode($data) {
return(\OC_JSON::encode($data));
}
/**
* Check is a given user exists - send json error msg if not
* @param string $user
*/
public static function checkUserExists($user) {
\OC_JSON::checkUserExists($user);
}
}

View File

@ -347,20 +347,29 @@ class Share {
}
/**
* Get the item shared by a token
* @param string token
* @return Item
* Based on the given token the share information will be returned - password protected shares will be verified
* @param string $token
* @return array | bool false will be returned in case the token is unknown or unauthorized
*/
public static function getShareByToken($token) {
public static function getShareByToken($token, $checkPasswordProtection = true) {
$query = \OC_DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `token` = ?', 1);
$result = $query->execute(array($token));
if (\OC_DB::isError($result)) {
\OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result) . ', token=' . $token, \OC_Log::ERROR);
}
$row = $result->fetchRow();
if ($row === false) {
return false;
}
if (is_array($row) and self::expireItem($row)) {
return false;
}
// password protected shares need to be authenticated
if ($checkPasswordProtection && !\OCP\Share::checkPasswordProtectedShare($row)) {
return false;
}
return $row;
}
@ -655,7 +664,15 @@ class Share {
* @return Returns true on success or false on failure
*/
public static function unshareAll($itemType, $itemSource) {
if ($shares = self::getItemShared($itemType, $itemSource)) {
// Get all of the owners of shares of this item.
$query = \OC_DB::prepare( 'SELECT `uid_owner` from `*PREFIX*share` WHERE `item_type`=? AND `item_source`=?' );
$result = $query->execute(array($itemType, $itemSource));
$shares = array();
// Add each owner's shares to the array of all shares for this item.
while ($row = $result->fetchRow()) {
$shares = array_merge($shares, self::getItems($itemType, $itemSource, null, null, $row['uid_owner']));
}
if (!empty($shares)) {
// Pass all the vars we have for now, they may be useful
$hookParams = array(
'itemType' => $itemType,
@ -1880,6 +1897,34 @@ class Share {
}
}
/**
* In case a password protected link is not yet authenticated this function will return false
*
* @param array $linkItem
* @return bool
*/
public static function checkPasswordProtectedShare(array $linkItem) {
if (!isset($linkItem['share_with'])) {
return true;
}
if (!isset($linkItem['share_type'])) {
return true;
}
if (!isset($linkItem['id'])) {
return true;
}
if ($linkItem['share_type'] != \OCP\Share::SHARE_TYPE_LINK) {
return true;
}
if ( \OC::$session->exists('public_link_authenticated')
&& \OC::$session->get('public_link_authenticated') === $linkItem['id'] ) {
return true;
}
return false;
}
}
/**

View File

@ -131,6 +131,12 @@ span.version { margin-left:1em; margin-right:1em; color:#555; }
.appslink { text-decoration: underline; }
.score { color:#666; font-weight:bold; font-size:0.8em; }
.appinfo .documentation {
margin-top: 1em;
margin-bottom: 1em;
}
/* LOG */
#log { white-space:normal; }
#lessLog { display:none; }
@ -147,3 +153,16 @@ table.shareAPI td { padding-bottom: 0.8em; }
/* HELP */
.pressed {background-color:#DDD;}
/* PASSWORD */
.strengthify-wrapper {
position: absolute;
left: 189px;
width: 131px;
margin-top: -7px;
}
/* OPERA hack for strengthify*/
doesnotexist:-o-prefocus, .strengthify-wrapper {
left: 185px;
width: 129px;
}

View File

@ -37,6 +37,30 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
page.find('span.licence').text(appLicense);
var userDocumentation = false;
var adminDocumentation = false;
if (typeof(app.documentation) !== 'undefined') {
if (typeof(app.documentation.user) !== 'undefined') {
userDocumentation = true;
page.find('span.userDocumentation').html("<a id='userDocumentation' href='" + app.documentation.user + "'>" + t('settings', 'User Documentation') + "</a>");
page.find('p.documentation').show();
}
if (typeof(app.documentation.admin) !== 'undefined') {
adminDocumentation = true;
page.find('span.adminDocumentation').html("<a id='adminDocumentation' href='" + app.documentation.admin + "'>" + t('settings', 'Admin Documentation') + "</a>");
page.find('p.documentation').show();
}
if(userDocumentation && adminDocumentation) {
page.find('span.userDocumentation').after(', ');
}
}
if (typeof(app.website) !== 'undefined') {
page.find('p.website').show();
page.find('a#websitelink').attr('href', app.website);
}
if (app.update !== false) {
page.find('input.update').show();
page.find('input.update').data('appid', app.id);
@ -51,8 +75,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
page.find('input.enable').data('active', app.active);
if (app.internal === false) {
page.find('span.score').show();
page.find('p.appslink').show();
page.find('a').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id);
page.find('p.appstore').show();
page.find('a#appstorelink').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id);
page.find('small.externalapp').hide();
} else {
page.find('p.appslink').hide();
@ -110,7 +134,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
element.val(t('settings','Disable'));
}
},'json')
.fail(function() {
.fail(function() {
OC.Settings.Apps.showErrorMessage(t('settings', 'Error while enabling app'));
appitem.data('errormsg', t('settings', 'Error while enabling app'));
appitem.data('active',false);

View File

@ -1,5 +1,6 @@
/**
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
* 2013, Morris Jobke <morris.jobke@gmail.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
@ -243,6 +244,17 @@ $(document).ready(function(){
$('#sendcropperbutton').click(function(){
sendCropData();
});
$('#pass2').strengthify({
zxcvbn: OC.linkTo('3rdparty','zxcvbn/js/zxcvbn.js'),
titles: [
t('core', 'Very weak password'),
t('core', 'Weak password'),
t('core', 'So-so password'),
t('core', 'Good password'),
t('core', 'Strong password')
]
});
} );
OC.Encryption = {

View File

@ -44,7 +44,7 @@ var UserList = {
// Provide user with option to undo
$('#notification').data('deleteuser', true);
OC.Notification.showHtml(t('users', 'deleted') + ' ' + escapeHTML(uid) + '<span class="undo">' + t('users', 'undo') + '</span>');
OC.Notification.showHtml(t('settings', 'deleted') + ' ' + escapeHTML(uid) + '<span class="undo">' + t('settings', 'undo') + '</span>');
},
/**

View File

@ -1,10 +0,0 @@
<?php
$TRANSLATIONS = array(
"Error" => "Ошибка",
"Delete" => "Удалить",
"More" => "Подробнее",
"Password" => "Пароль",
"Create" => "Создать",
"Username" => "Имя пользователя"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";

View File

@ -13,6 +13,8 @@ $defaults = new OC_Defaults(); // initialize themable default strings and urls
// Highlight navigation entry
OC_Util::addScript( 'settings', 'personal' );
OC_Util::addStyle( 'settings', 'settings' );
OC_Util::addScript( '3rdparty', 'strengthify/jquery.strengthify' );
OC_Util::addStyle( '3rdparty', 'strengthify/strengthify' );
OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' );
OC_Util::addStyle( '3rdparty', 'chosen' );
\OC_Util::addScript('files', 'jquery.fileupload');
@ -20,6 +22,8 @@ if (\OC_Config::getValue('enable_avatars', true) === true) {
\OC_Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop.min');
\OC_Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop.min');
}
// Highlight navigation entry
OC_App::setActiveNavigationEntry( 'personal' );
$storageInfo=OC_Helper::getStorageInfo('/');

View File

@ -34,9 +34,16 @@
class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3>
<span class="score"></span>
<p class="description"></p>
<p class="documentation hidden">
<?php p($l->t("Documentation:"));?>
<span class="userDocumentation appslink"></span>
<span class="adminDocumentation appslink"></span>
</p>
<img src="" class="preview hidden" />
<p class="appslink hidden"><a href="#" target="_blank"><?php
<p class="appslink appstore hidden"><a id="appstorelink" href="#" target="_blank"><?php
p($l->t('See application page at apps.owncloud.com'));?></a></p>
<p class="appslink website hidden"><a id="websitelink" href="#" target="_blank"><?php
p($l->t('See application website'));?></a></p>
<p class="license hidden"><?php
print_unescaped($l->t('<span class="licence"></span>-licensed by <span class="author"></span>'));?></p>
<input class="enable hidden" type="submit" />

View File

@ -44,6 +44,8 @@ if($_['passwordChangeSupported']) {
placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" />
<input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label>
<input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" />
<br/>
<div class="strengthify-wrapper"></div>
</fieldset>
</form>
<?php

View File

@ -21,6 +21,7 @@
<autoincrement>1</autoincrement>
<unsigned>true</unsigned>
<length>4</length>
<comments>This is the id</comments>
</field>
<field>

View File

@ -8,16 +8,17 @@
require_once __DIR__.'/../lib/base.php';
OC_App::enable('files_sharing');
OC_App::enable('files_encryption');
OC_App::enable('user_ldap');
OC_App::enable('calendar');
OC_App::enable('contacts');
OC_App::enable('apptemplateadvanced');
OC_App::enable('appframework');
#OC_App::enable('files_archive');
#OC_App::enable('mozilla_sync');
#OC_App::enable('news');
#OC_App::enable('provisioning_api');
#OC_App::enable('user_external');
function enableApp($app) {
try {
OC_App::enable($app);
} catch (Exception $e) {
echo $e;
}
}
enableApp('files_sharing');
enableApp('files_encryption');
//enableApp('files_external');
enableApp('user_ldap');
enableApp('files_versions');

View File

@ -7,12 +7,12 @@
*/
class Test_API extends PHPUnit_Framework_TestCase {
// Helps build a response variable
function buildResponse($shipped, $data, $code) {
function buildResponse($shipped, $data, $code, $message=null) {
return array(
'shipped' => $shipped,
'response' => new OC_OCS_Result($data, $code),
'response' => new OC_OCS_Result($data, $code, $message),
'app' => uniqid('testapp_', true),
);
}
@ -64,24 +64,24 @@ class Test_API extends PHPUnit_Framework_TestCase {
// Two shipped success results
array(true, 100, true, 100, true),
// Two shipped results, one success and one failure
array(true, 100, true, 997, false),
array(true, 100, true, 998, false),
// Two shipped results, both failure
array(true, 997, true, 997, false),
array(true, 997, true, 998, false),
// Two third party success results
array(false, 100, false, 100, true),
// Two third party results, one success and one failure
array(false, 100, false, 997, false),
array(false, 100, false, 998, false),
// Two third party results, both failure
array(false, 997, false, 997, false),
array(false, 997, false, 998, false),
// One of each, both success
array(false, 100, true, 100, true),
array(true, 100, false, 100, true),
// One of each, both failure
array(false, 997, true, 997, false),
array(false, 997, true, 998, false),
// One of each, shipped success
array(false, 997, true, 100, true),
// One of each, third party success
array(false, 100, true, 997, false),
array(false, 100, true, 998, false),
);
}
/**
@ -117,12 +117,25 @@ class Test_API extends PHPUnit_Framework_TestCase {
// Two shipped success results
$result = OC_API::mergeResponses(array(
$this->buildResponse($shipped1, $data1, $statusCode1),
$this->buildResponse($shipped2, $data2, $statusCode2),
$this->buildResponse($shipped1, $data1, $statusCode1, "message1"),
$this->buildResponse($shipped2, $data2, $statusCode2, "message2"),
));
$this->checkResult($result, $succeeded);
$resultData = $result->getData();
$resultMeta = $result->getMeta();
$resultStatusCode = $result->getStatusCode();
$this->assertArrayHasKey('jan', $resultData['users']);
// check if the returned status message matches the selected status code
if ($resultStatusCode === 997) {
$this->assertEquals('message1', $resultMeta['message']);
} elseif ($resultStatusCode === 998) {
$this->assertEquals('message2', $resultMeta['message']);
} elseif ($resultStatusCode === 100) {
$this->assertEquals(null, $resultMeta['message']);
}
}
}

View File

@ -137,6 +137,52 @@ class Cache extends \PHPUnit_Framework_TestCase {
$this->assertFalse($this->cache->inCache('folder/bar'));
}
public function testEncryptedFolder() {
$file1 = 'folder';
$file2 = 'folder/bar';
$file3 = 'folder/foo';
$data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
$fileData = array();
$fileData['bar'] = array('size' => 1000, 'unencrypted_size' => 900, 'encrypted' => 1, 'mtime' => 20, 'mimetype' => 'foo/file');
$fileData['foo'] = array('size' => 20, 'unencrypted_size' => 16, 'encrypted' => 1, 'mtime' => 25, 'mimetype' => 'foo/file');
$this->cache->put($file1, $data1);
$this->cache->put($file2, $fileData['bar']);
$this->cache->put($file3, $fileData['foo']);
$content = $this->cache->getFolderContents($file1);
$this->assertEquals(count($content), 2);
foreach ($content as $cachedData) {
$data = $fileData[$cachedData['name']];
// indirect retrieval swaps unencrypted_size and size
$this->assertEquals($data['unencrypted_size'], $cachedData['size']);
}
$file4 = 'folder/unkownSize';
$fileData['unkownSize'] = array('size' => -1, 'mtime' => 25, 'mimetype' => 'foo/file');
$this->cache->put($file4, $fileData['unkownSize']);
$this->assertEquals(-1, $this->cache->calculateFolderSize($file1));
$fileData['unkownSize'] = array('size' => 5, 'mtime' => 25, 'mimetype' => 'foo/file');
$this->cache->put($file4, $fileData['unkownSize']);
$this->assertEquals(916, $this->cache->calculateFolderSize($file1));
// direct cache entry retrieval returns the original values
$entry = $this->cache->get($file1);
$this->assertEquals(1025, $entry['size']);
$this->assertEquals(916, $entry['unencrypted_size']);
$this->cache->remove($file2);
$this->cache->remove($file3);
$this->cache->remove($file4);
$this->assertEquals(0, $this->cache->calculateFolderSize($file1));
$this->cache->remove('folder');
$this->assertFalse($this->cache->inCache('folder/foo'));
$this->assertFalse($this->cache->inCache('folder/bar'));
}
public function testRootFolderSizeForNonHomeStorage() {
$dir1 = 'knownsize';
$dir2 = 'unknownsize';

View File

@ -147,7 +147,7 @@ class Scanner extends \PHPUnit_Framework_TestCase {
$this->scanner->scan('');
$oldData = $this->cache->get('');
$this->storage->unlink('folder/bar.txt');
$this->cache->put('folder', array('mtime' => $this->storage->filemtime('folder')));
$this->cache->put('folder', array('mtime' => $this->storage->filemtime('folder'), 'storage_mtime' => $this->storage->filemtime('folder')));
$this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE);
$newData = $this->cache->get('');
$this->assertNotEquals($oldData['etag'], $newData['etag']);

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