From 33dcb3b1f4dad26c334bfdbddfb255817d4cedbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 10 Oct 2012 11:47:19 +0200 Subject: [PATCH 01/26] fix missing dir creation for file versions (OC_Filesystemview::mkdir doesn't work here because it doesn't create directories recursively) --- apps/files_versions/lib/hooks.php | 2 +- apps/files_versions/lib/versions.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index 9ec0b01a7f..500ce0ef06 100644 --- a/apps/files_versions/lib/hooks.php +++ b/apps/files_versions/lib/hooks.php @@ -64,7 +64,7 @@ class Hooks { $abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$params['newpath'].'.v'; if(Storage::isversioned($rel_oldpath)) { $info=pathinfo($abs_newpath); - if(!file_exists($info['dirname'])) mkdir($info['dirname'],0700,true); + if(!file_exists($info['dirname'])) mkdir($info['dirname'],0750,true); $versions = Storage::getVersions($rel_oldpath); foreach ($versions as $v) { rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']); diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 7d12e58f94..b68fa28a1f 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -106,9 +106,9 @@ class Storage { // create all parent folders - $dirname = dirname($filename); - if(!$users_view->file_exists('/files_versions/'.$dirname)) { - $users_view->mkdir('/files_versions/'.$dirname,0700,true); + $info=pathinfo($filename); + if(!file_exists($versionsFolderName.'/'.$info['dirname'])) { + mkdir($versionsFolderName.'/'.$info['dirname'],0750,true); } // store a new version of a file From 4a712bdd483cf3a25bc694e625bf1cb7499a96ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 10 Oct 2012 13:46:51 +0200 Subject: [PATCH 02/26] only check if #dropdown hasClass drop-versions if a drop down is open. Otherwise it will never open the history drop-down --- apps/files_versions/js/versions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index aa79cffeca..87396cd0ba 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -21,11 +21,11 @@ $(document).ready(function(){ } ,function(filename){ // Action to perform when clicked - if (scanFiles.scanning || !$('#dropdown').hasClass('drop-versions')){return;}//workaround to prevent additional http request block scanning feedback + if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback var file = $('#dir').val()+'/'+filename; // Check if drop down is already visible for a different file - if (($('#dropdown').length > 0)) { + if (($('#dropdown').length > 0) && $('#dropdown').hasClass('drop-versions') ) { if (file != $('#dropdown').data('file')) { $('#dropdown').hide('blind', function() { $('#dropdown').remove(); From fe5b4d2fbab18a9cf2bc690ce68ad3ba6ee7c787 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Wed, 10 Oct 2012 15:35:19 +0200 Subject: [PATCH 03/26] marks as 5.0 pre alpha --- lib/util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util.php b/lib/util.php index 91e2d07312..4d327e023b 100755 --- a/lib/util.php +++ b/lib/util.php @@ -81,7 +81,7 @@ class OC_Util { */ public static function getVersion() { // hint: We only can count up. So the internal version number of ownCloud 4.5 will be 4.90.0. This is not visible to the user - return array(4,90,00); + return array(4,91,00); } /** @@ -89,7 +89,7 @@ class OC_Util { * @return string */ public static function getVersionString() { - return '4.5'; + return '5.0 pre alpha'; } /** From 41640b4b91c7f8d407fb17e085f83d95ca900311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 10 Oct 2012 17:43:09 +0200 Subject: [PATCH 04/26] don't show the share action in the file view for publically shared files. --- apps/files/templates/part.list.php | 9 +++++++++ apps/files_sharing/js/share.js | 2 +- apps/files_sharing/public.php | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 8faeae3939..1329b5dc5c 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -1,3 +1,12 @@ + + assign('files', $files, false); + $list->assign('publicListView', true); $list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.$_GET['dir'].'&path=', false); $list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.$_GET['dir'].'&path=', false); $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' ); From 2f4b1b0e4c52b1685642513482a697f9ab1e5fc1 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 10 Oct 2012 18:05:34 +0200 Subject: [PATCH 05/26] Disallow users to delete their own accounts --- settings/ajax/removeuser.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php index 6b11fa5c4f..1e3cd2993b 100644 --- a/settings/ajax/removeuser.php +++ b/settings/ajax/removeuser.php @@ -8,6 +8,11 @@ OCP\JSON::callCheck(); $username = $_POST["username"]; +// A user shouldn't be able to delete his own account +if(OC_User::getUser() === $username) { + exit; +} + if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { $l = OC_L10N::get('core'); OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); @@ -20,4 +25,4 @@ if( OC_User::deleteUser( $username )) { } else{ OC_JSON::error(array("data" => array( "message" => $l->t("Unable to delete user") ))); -} +} \ No newline at end of file From cda213596672b50e4c1dff3846444a61a47cfd7d Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 10 Oct 2012 18:56:14 +0200 Subject: [PATCH 06/26] Send a HSTS HTTP header to enforce SSL --- lib/base.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/base.php b/lib/base.php index c898273d9e..21b7165e5e 100644 --- a/lib/base.php +++ b/lib/base.php @@ -193,6 +193,7 @@ class OC{ public static function checkSSL() { // redirect to https site if configured if( OC_Config::getValue( "forcessl", false )) { + header('Strict-Transport-Security: max-age=31536000'); ini_set("session.cookie_secure", "on"); if(OC_Request::serverProtocol()<>'https' and !OC::$CLI) { $url = "https://". OC_Request::serverHost() . $_SERVER['REQUEST_URI']; From d525654fcd9af0a8887bae510377da71406cc4a9 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 10 Oct 2012 19:01:32 +0200 Subject: [PATCH 07/26] Correct indentation --- lib/template.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/template.php b/lib/template.php index fb81ec6251..1c529932a3 100644 --- a/lib/template.php +++ b/lib/template.php @@ -159,9 +159,11 @@ class OC_Template{ $this->vars['requestlifespan'] = OC_Util::$callLifespan; $parts = explode('/', $app); // fix translation when app is something like core/lostpassword $this->l10n = OC_L10N::get($parts[0]); - header('X-Frame-Options: Sameorigin'); - header('X-XSS-Protection: 1; mode=block'); - header('X-Content-Type-Options: nosniff'); + + // Some headers to enhance security + header('X-Frame-Options: Sameorigin'); + header('X-XSS-Protection: 1; mode=block'); + header('X-Content-Type-Options: nosniff'); $this->findTemplate($name); } From fe40277ec2321692865041117e90bea558f83c15 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 28 Sep 2012 15:29:41 +0200 Subject: [PATCH 08/26] Use __DIR__ instead of __FILE__ to get SERVERROOT --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 21b7165e5e..50f113543c 100644 --- a/lib/base.php +++ b/lib/base.php @@ -104,7 +104,7 @@ class OC{ public static function initPaths() { // calculate the root directories - OC::$SERVERROOT=str_replace("\\", '/', substr(__FILE__, 0, -13)); + OC::$SERVERROOT=str_replace("\\", '/', substr(__DIR__, 0, -4)); OC::$SUBURI= str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT))); $scriptName=$_SERVER["SCRIPT_NAME"]; if(substr($scriptName, -1)=='/') { From c5983d37ad722069709ccb9ca20b7354652fdfc9 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sat, 29 Sep 2012 14:39:28 +0200 Subject: [PATCH 09/26] No need to use array_search --- lib/templatelayout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/templatelayout.php b/lib/templatelayout.php index c898628bcd..966d02011f 100644 --- a/lib/templatelayout.php +++ b/lib/templatelayout.php @@ -13,7 +13,7 @@ class OC_TemplateLayout extends OC_Template { if( $renderas == 'user' ) { parent::__construct( 'core', 'layout.user' ); $this->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ), false); - if(array_search(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false) { + if(in_array(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false) { $this->assign('bodyid','body-settings', false); }else{ $this->assign('bodyid','body-user', false); From d4feb77eaf204ae37f60067e7f083b44338cba89 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sat, 29 Sep 2012 14:45:22 +0200 Subject: [PATCH 10/26] Remove unused search code --- lib/templatelayout.php | 1 - search/index.php | 51 -------------------------------------- search/templates/index.php | 17 ------------- 3 files changed, 69 deletions(-) delete mode 100644 search/index.php delete mode 100644 search/templates/index.php diff --git a/lib/templatelayout.php b/lib/templatelayout.php index 966d02011f..4f26775b48 100644 --- a/lib/templatelayout.php +++ b/lib/templatelayout.php @@ -12,7 +12,6 @@ class OC_TemplateLayout extends OC_Template { if( $renderas == 'user' ) { parent::__construct( 'core', 'layout.user' ); - $this->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ), false); if(in_array(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false) { $this->assign('bodyid','body-settings', false); }else{ diff --git a/search/index.php b/search/index.php deleted file mode 100644 index 9c515ff3dd..0000000000 --- a/search/index.php +++ /dev/null @@ -1,51 +0,0 @@ -. -* -*/ - - -// Init owncloud -require_once '../lib/base.php'; - -// Check if we are a user -OC_Util::checkLoggedIn(); - -// Load the files we need -OC_Util::addStyle( 'search', 'search' ); - -$query=(isset($_POST['query']))?$_POST['query']:''; -if($query) { - $results=OC_Search::search($query); -}else{ - OC_Util::redirectToDefaultPage(); -} - -$resultTypes=array(); -foreach($results as $result) { - if(!isset($resultTypes[$result->type])) { - $resultTypes[$result->type]=array(); - } - $resultTypes[$result->type][]=$result; -} - -$tmpl = new OC_Template( 'search', 'index', 'user' ); -$tmpl->assign('resultTypes', $resultTypes); -$tmpl->printPage(); diff --git a/search/templates/index.php b/search/templates/index.php deleted file mode 100644 index 7241553e7f..0000000000 --- a/search/templates/index.php +++ /dev/null @@ -1,17 +0,0 @@ -
    - -
  • -

    type?>

    -
  • - -
  • -

    - name?> -

    -

    - text?> -

    -
  • - - -
From 2c3674ea87c6303f8dc1345d056871ca3637b437 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Tue, 9 Oct 2012 18:26:38 +0200 Subject: [PATCH 11/26] Add logging when stripping apps from autoload include path --- lib/base.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/base.php b/lib/base.php index 50f113543c..6305da1693 100644 --- a/lib/base.php +++ b/lib/base.php @@ -72,11 +72,14 @@ class OC{ */ public static function autoload($className) { if(array_key_exists($className, OC::$CLASSPATH)) { + $path = OC::$CLASSPATH[$className]; /** @TODO: Remove this when necessary Remove "apps/" from inclusion path for smooth migration to mutli app dir */ - $path = str_replace('apps/', '', OC::$CLASSPATH[$className]); - require_once $path; + if (strpos($path, 'apps/')===0) { + OC_Log::write('core', 'include path for class "'.$className.'" starts with "apps/"', OC_Log::DEBUG); + $path = str_replace('apps/', '', $path); + } } elseif(strpos($className, 'OC_')===0) { $path = strtolower(str_replace('_', '/', substr($className, 3)) . '.php'); From 39e1c22e0a85bc934932d458fd7e08b85d33cee4 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 10 Oct 2012 23:37:15 +0200 Subject: [PATCH 12/26] move autotest to phpunit --- autotest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autotest.sh b/autotest.sh index a42c6ab059..54f1eda993 100755 --- a/autotest.sh +++ b/autotest.sh @@ -86,7 +86,8 @@ function execute_tests { #test execution echo "Testing with $1 ..." cd tests - php -f index.php -- xml $1 > autotest-results-$1.xml + #php -f index.php -- xml $1 > autotest-results-$1.xml + phpunit --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml } # From 673e3dae3f8db23b71690c6726a985bba4aea5fb Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Thu, 11 Oct 2012 02:07:32 +0200 Subject: [PATCH 13/26] [tx-robot] updated from transifex --- apps/files/l10n/ru_RU.php | 15 ++++ apps/files_external/l10n/es_AR.php | 6 ++ apps/files_external/l10n/ru_RU.php | 4 ++ apps/files_versions/l10n/ru_RU.php | 2 + apps/user_ldap/l10n/pt_PT.php | 1 + apps/user_ldap/l10n/ru_RU.php | 1 + core/l10n/ku_IQ.php | 21 ++++++ core/l10n/ru_RU.php | 5 ++ l10n/es_AR/files_external.po | 18 ++--- l10n/es_AR/settings.po | 12 ++-- l10n/ku_IQ/core.po | 81 ++++++++++----------- l10n/pl/settings.po | 12 ++-- l10n/pt_BR/settings.po | 12 ++-- l10n/pt_PT/user_ldap.po | 9 +-- l10n/ru_RU/core.po | 72 +++++++++---------- l10n/ru_RU/files.po | 108 ++++++++++++++-------------- l10n/ru_RU/files_external.po | 14 ++-- l10n/ru_RU/files_versions.po | 10 +-- l10n/ru_RU/settings.po | 16 ++--- l10n/ru_RU/user_ldap.po | 6 +- l10n/templates/core.pot | 28 ++++---- l10n/templates/files.pot | 2 +- l10n/templates/files_encryption.pot | 2 +- l10n/templates/files_external.pot | 2 +- l10n/templates/files_sharing.pot | 2 +- l10n/templates/files_versions.pot | 2 +- l10n/templates/lib.pot | 2 +- l10n/templates/settings.pot | 6 +- l10n/templates/user_ldap.pot | 2 +- settings/l10n/es_AR.php | 1 + settings/l10n/pl.php | 1 + settings/l10n/pt_BR.php | 1 + settings/l10n/ru_RU.php | 3 + 33 files changed, 271 insertions(+), 208 deletions(-) create mode 100644 core/l10n/ku_IQ.php diff --git a/apps/files/l10n/ru_RU.php b/apps/files/l10n/ru_RU.php index 0574e2dfcd..34e9d19ca3 100644 --- a/apps/files/l10n/ru_RU.php +++ b/apps/files/l10n/ru_RU.php @@ -9,6 +9,7 @@ "Files" => "Файлы", "Unshare" => "Скрыть", "Delete" => "Удалить", +"Rename" => "Переименовать", "already exists" => "уже существует", "replace" => "отмена", "suggest name" => "подобрать название", @@ -22,9 +23,13 @@ "Unable to upload your file as it is a directory or has 0 bytes" => "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией", "Upload Error" => "Ошибка загрузки", "Pending" => "Ожидающий решения", +"1 file uploading" => "загрузка 1 файла", +"files uploading" => "загрузка файлов", "Upload cancelled." => "Загрузка отменена", "File upload is in progress. Leaving the page now will cancel the upload." => "Процесс загрузки файла. Если покинуть страницу сейчас, загрузка будет отменена.", "Invalid name, '/' is not allowed." => "Неправильное имя, '/' не допускается.", +"files scanned" => "файлы отсканированы", +"error while scanning" => "ошибка при сканировании", "Name" => "Имя", "Size" => "Размер", "Modified" => "Изменен", @@ -32,6 +37,16 @@ "folders" => "папки", "file" => "файл", "files" => "файлы", +"seconds ago" => "секунд назад", +"minute ago" => "минуту назад", +"minutes ago" => "минут назад", +"today" => "сегодня", +"yesterday" => "вчера", +"days ago" => "дней назад", +"last month" => "в прошлом месяце", +"months ago" => "месяцев назад", +"last year" => "в прошлом году", +"years ago" => "лет назад", "File handling" => "Работа с файлами", "Maximum upload size" => "Максимальный размер загружаемого файла", "max. possible: " => "Максимально возможный", diff --git a/apps/files_external/l10n/es_AR.php b/apps/files_external/l10n/es_AR.php index 80d5729af4..055fbe782e 100644 --- a/apps/files_external/l10n/es_AR.php +++ b/apps/files_external/l10n/es_AR.php @@ -1,4 +1,10 @@ "Acceso permitido", +"Error configuring Dropbox storage" => "Error al configurar el almacenamiento de Dropbox", +"Grant access" => "Permitir acceso", +"Fill out all required fields" => "Rellenar todos los campos requeridos", +"Please provide a valid Dropbox app key and secret." => "Por favor, proporcioná un secreto y una contraseña válida para la aplicación Dropbox.", +"Error configuring Google Drive storage" => "Error al configurar el almacenamiento de Google Drive", "External Storage" => "Almacenamiento externo", "Mount point" => "Punto de montaje", "Backend" => "Motor", diff --git a/apps/files_external/l10n/ru_RU.php b/apps/files_external/l10n/ru_RU.php index 69cf7544dd..4bd2e2e964 100644 --- a/apps/files_external/l10n/ru_RU.php +++ b/apps/files_external/l10n/ru_RU.php @@ -1,4 +1,8 @@ "Доступ разрешен", +"Error configuring Dropbox storage" => "Ошибка при конфигурировании хранилища Dropbox", +"Grant access" => "Предоставить доступ", +"Fill out all required fields" => "Заполните все требуемые поля", "External Storage" => "Внешние системы хранения данных", "Mount point" => "Точка монтирования", "Backend" => "Бэкэнд", diff --git a/apps/files_versions/l10n/ru_RU.php b/apps/files_versions/l10n/ru_RU.php index 2563c318bc..a14258eea8 100644 --- a/apps/files_versions/l10n/ru_RU.php +++ b/apps/files_versions/l10n/ru_RU.php @@ -1,4 +1,6 @@ "Срок действия всех версий истекает", +"History" => "История", "Versions" => "Версии", "This will delete all existing backup versions of your files" => "Это приведет к удалению всех существующих версий резервной копии ваших файлов", "Files Versioning" => "Файлы управления версиями", diff --git a/apps/user_ldap/l10n/pt_PT.php b/apps/user_ldap/l10n/pt_PT.php index fe276f9fab..bf32a29537 100644 --- a/apps/user_ldap/l10n/pt_PT.php +++ b/apps/user_ldap/l10n/pt_PT.php @@ -1,5 +1,6 @@ "Anfitrião", +"You can specify Base DN for users and groups in the Advanced tab" => "Pode especificar o ND Base para utilizadores e grupos no separador Avançado", "Password" => "Palavra-passe", "Group Filter" => "Filtrar por grupo", "Port" => "Porto", diff --git a/apps/user_ldap/l10n/ru_RU.php b/apps/user_ldap/l10n/ru_RU.php index 62c0cfaec3..4b8aa36f18 100644 --- a/apps/user_ldap/l10n/ru_RU.php +++ b/apps/user_ldap/l10n/ru_RU.php @@ -18,6 +18,7 @@ "The LDAP attribute to use to generate the user`s ownCloud name." => "Атрибут LDAP, используемый для создания имени пользователя в ownCloud.", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Атрибут LDAP, используемый для создания группового имени в ownCloud.", "in bytes" => "в байтах", +"in seconds. A change empties the cache." => "в секундах. Изменение очищает кэш.", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Оставьте пустым под имя пользователя (по умолчанию). В противном случае задайте LDAP/AD атрибут.", "Help" => "Помощь" ); diff --git a/core/l10n/ku_IQ.php b/core/l10n/ku_IQ.php new file mode 100644 index 0000000000..8eb72e588d --- /dev/null +++ b/core/l10n/ku_IQ.php @@ -0,0 +1,21 @@ + "ده‌ستكاری", +"Password" => "وشەی تێپەربو", +"New password" => "وشەی نهێنی نوێ", +"Reset password" => "دووباره‌ كردنه‌وه‌ی وشه‌ی نهێنی", +"Users" => "به‌كارهێنه‌ر", +"Apps" => "به‌رنامه‌كان", +"Admin" => "به‌ڕێوه‌به‌ری سه‌ره‌كی", +"Help" => "یارمەتی", +"Cloud not found" => "هیچ نه‌دۆزرایه‌وه‌", +"Advanced" => "هه‌ڵبژاردنی پیشكه‌وتوو", +"Data folder" => "زانیاری فۆڵده‌ر", +"Database user" => "به‌كارهێنه‌ری داتابه‌یس", +"Database password" => "وشه‌ی نهێنی داتا به‌یس", +"Database name" => "ناوی داتابه‌یس", +"Database host" => "هۆستی داتابه‌یس", +"Finish setup" => "كۆتایی هات ده‌ستكاریه‌كان", +"Log out" => "چوونەدەرەوە", +"prev" => "پێشتر", +"next" => "دواتر" +); diff --git a/core/l10n/ru_RU.php b/core/l10n/ru_RU.php index 00a46c0424..be86bb2ea5 100644 --- a/core/l10n/ru_RU.php +++ b/core/l10n/ru_RU.php @@ -25,15 +25,20 @@ "Error while sharing" => "Ошибка создания общего доступа", "Error while unsharing" => "Ошибка отключения общего доступа", "Error while changing permissions" => "Ошибка при изменении прав доступа", +"Share with" => "Сделать общим с", "Password protect" => "Защитить паролем", "Password" => "Пароль", +"Set expiration date" => "Установить срок действия", +"Expiration date" => "Дата истечения срока действия", "No people found" => "Не найдено людей", +"with" => "с", "Unshare" => "Отключить общий доступ", "access control" => "контроль доступа", "create" => "создать", "update" => "обновить", "delete" => "удалить", "share" => "сделать общим", +"Password protected" => "Пароль защищен", "ownCloud password reset" => "Переназначение пароля", "Use the following link to reset your password: {link}" => "Воспользуйтесь следующей ссылкой для переназначения пароля: {link}", "You will receive a link to reset your password via Email." => "Вы получите ссылку для восстановления пароля по электронной почте.", diff --git a/l10n/es_AR/files_external.po b/l10n/es_AR/files_external.po index 9422597595..55fe0810c4 100644 --- a/l10n/es_AR/files_external.po +++ b/l10n/es_AR/files_external.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-02 23:16+0200\n" -"PO-Revision-Date: 2012-10-02 21:17+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 07:08+0000\n" +"Last-Translator: cjtess \n" "Language-Team: Spanish (Argentina) (http://www.transifex.com/projects/p/owncloud/language/es_AR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,27 +20,27 @@ msgstr "" #: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23 msgid "Access granted" -msgstr "" +msgstr "Acceso permitido" #: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86 msgid "Error configuring Dropbox storage" -msgstr "" +msgstr "Error al configurar el almacenamiento de Dropbox" #: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40 msgid "Grant access" -msgstr "" +msgstr "Permitir acceso" #: js/dropbox.js:73 js/google.js:72 msgid "Fill out all required fields" -msgstr "" +msgstr "Rellenar todos los campos requeridos" #: js/dropbox.js:85 msgid "Please provide a valid Dropbox app key and secret." -msgstr "" +msgstr "Por favor, proporcioná un secreto y una contraseña válida para la aplicación Dropbox." #: js/google.js:26 js/google.js:73 js/google.js:78 msgid "Error configuring Google Drive storage" -msgstr "" +msgstr "Error al configurar el almacenamiento de Google Drive" #: templates/settings.php:3 msgid "External Storage" diff --git a/l10n/es_AR/settings.po b/l10n/es_AR/settings.po index 63551c5cad..bad107a5f8 100644 --- a/l10n/es_AR/settings.po +++ b/l10n/es_AR/settings.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-09 02:03+0200\n" -"PO-Revision-Date: 2012-10-09 00:04+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 06:43+0000\n" +"Last-Translator: cjtess \n" "Language-Team: Spanish (Argentina) (http://www.transifex.com/projects/p/owncloud/language/es_AR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,7 +22,7 @@ msgstr "" msgid "Unable to load list from App Store" msgstr "Imposible cargar la lista desde el App Store" -#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 +#: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18 #: ajax/togglegroups.php:15 msgid "Authentication error" msgstr "Error al autenticar" @@ -59,7 +59,7 @@ msgstr "Solicitud no válida" msgid "Unable to delete group" msgstr "No fue posible eliminar el grupo" -#: ajax/removeuser.php:22 +#: ajax/removeuser.php:27 msgid "Unable to delete user" msgstr "No fue posible eliminar el usuario" @@ -186,7 +186,7 @@ msgstr "Añadí tu aplicación" #: templates/apps.php:11 msgid "More Apps" -msgstr "" +msgstr "Más aplicaciones" #: templates/apps.php:27 msgid "Select an App" diff --git a/l10n/ku_IQ/core.po b/l10n/ku_IQ/core.po index 84f4339a3e..01e916f1eb 100644 --- a/l10n/ku_IQ/core.po +++ b/l10n/ku_IQ/core.po @@ -3,13 +3,14 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# , 2012. msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-07 02:03+0200\n" -"PO-Revision-Date: 2011-07-25 16:05+0000\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 15:25+0000\n" +"Last-Translator: kurdboy \n" "Language-Team: Kurdish (Iraq) (http://www.transifex.com/projects/p/owncloud/language/ku_IQ/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -29,55 +30,55 @@ msgstr "" msgid "This category already exists: " msgstr "" -#: js/js.js:213 templates/layout.user.php:49 templates/layout.user.php:50 +#: js/js.js:229 templates/layout.user.php:49 templates/layout.user.php:50 msgid "Settings" -msgstr "" +msgstr "ده‌ستكاری" -#: js/js.js:645 +#: js/js.js:661 msgid "January" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "February" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "March" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "April" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "May" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "June" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "July" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "August" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "September" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "October" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "November" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "December" msgstr "" @@ -105,8 +106,8 @@ msgstr "" msgid "No categories selected for deletion." msgstr "" -#: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:494 -#: js/share.js:506 +#: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:497 +#: js/share.js:509 msgid "Error" msgstr "" @@ -148,7 +149,7 @@ msgstr "" #: js/share.js:147 templates/installation.php:30 templates/login.php:13 msgid "Password" -msgstr "" +msgstr "وشەی تێپەربو" #: js/share.js:152 msgid "Set expiration date" @@ -206,15 +207,15 @@ msgstr "" msgid "share" msgstr "" -#: js/share.js:322 js/share.js:481 +#: js/share.js:322 js/share.js:484 msgid "Password protected" msgstr "" -#: js/share.js:494 +#: js/share.js:497 msgid "Error unsetting expiration date" msgstr "" -#: js/share.js:506 +#: js/share.js:509 msgid "Error setting expiration date" msgstr "" @@ -257,11 +258,11 @@ msgstr "" #: lostpassword/templates/resetpassword.php:8 msgid "New password" -msgstr "" +msgstr "وشەی نهێنی نوێ" #: lostpassword/templates/resetpassword.php:11 msgid "Reset password" -msgstr "" +msgstr "دووباره‌ كردنه‌وه‌ی وشه‌ی نهێنی" #: strings.php:5 msgid "Personal" @@ -269,19 +270,19 @@ msgstr "" #: strings.php:6 msgid "Users" -msgstr "" +msgstr "به‌كارهێنه‌ر" #: strings.php:7 msgid "Apps" -msgstr "" +msgstr "به‌رنامه‌كان" #: strings.php:8 msgid "Admin" -msgstr "" +msgstr "به‌ڕێوه‌به‌ری سه‌ره‌كی" #: strings.php:9 msgid "Help" -msgstr "" +msgstr "یارمەتی" #: templates/403.php:12 msgid "Access forbidden" @@ -289,7 +290,7 @@ msgstr "" #: templates/404.php:12 msgid "Cloud not found" -msgstr "" +msgstr "هیچ نه‌دۆزرایه‌وه‌" #: templates/edit_categories_dialog.php:4 msgid "Edit categories" @@ -305,11 +306,11 @@ msgstr "" #: templates/installation.php:36 msgid "Advanced" -msgstr "" +msgstr "هه‌ڵبژاردنی پیشكه‌وتوو" #: templates/installation.php:38 msgid "Data folder" -msgstr "" +msgstr "زانیاری فۆڵده‌ر" #: templates/installation.php:45 msgid "Configure the database" @@ -322,15 +323,15 @@ msgstr "" #: templates/installation.php:93 msgid "Database user" -msgstr "" +msgstr "به‌كارهێنه‌ری داتابه‌یس" #: templates/installation.php:97 msgid "Database password" -msgstr "" +msgstr "وشه‌ی نهێنی داتا به‌یس" #: templates/installation.php:101 msgid "Database name" -msgstr "" +msgstr "ناوی داتابه‌یس" #: templates/installation.php:109 msgid "Database tablespace" @@ -338,11 +339,11 @@ msgstr "" #: templates/installation.php:115 msgid "Database host" -msgstr "" +msgstr "هۆستی داتابه‌یس" #: templates/installation.php:120 msgid "Finish setup" -msgstr "" +msgstr "كۆتایی هات ده‌ستكاریه‌كان" #: templates/layout.guest.php:38 msgid "web services under your control" @@ -350,7 +351,7 @@ msgstr "" #: templates/layout.user.php:34 msgid "Log out" -msgstr "" +msgstr "چوونەدەرەوە" #: templates/login.php:6 msgid "Lost your password?" @@ -370,8 +371,8 @@ msgstr "" #: templates/part.pagenavi.php:3 msgid "prev" -msgstr "" +msgstr "پێشتر" #: templates/part.pagenavi.php:20 msgid "next" -msgstr "" +msgstr "دواتر" diff --git a/l10n/pl/settings.po b/l10n/pl/settings.po index 7ce870696b..6210dabfa5 100644 --- a/l10n/pl/settings.po +++ b/l10n/pl/settings.po @@ -16,9 +16,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-09 02:03+0200\n" -"PO-Revision-Date: 2012-10-09 00:03+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 06:42+0000\n" +"Last-Translator: Cyryl Sochacki \n" "Language-Team: Polish (http://www.transifex.com/projects/p/owncloud/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -30,7 +30,7 @@ msgstr "" msgid "Unable to load list from App Store" msgstr "Nie mogę załadować listy aplikacji" -#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 +#: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18 #: ajax/togglegroups.php:15 msgid "Authentication error" msgstr "Błąd uwierzytelniania" @@ -67,7 +67,7 @@ msgstr "Nieprawidłowe żądanie" msgid "Unable to delete group" msgstr "Nie można usunąć grupy" -#: ajax/removeuser.php:22 +#: ajax/removeuser.php:27 msgid "Unable to delete user" msgstr "Nie można usunąć użytkownika" @@ -194,7 +194,7 @@ msgstr "Dodaj aplikacje" #: templates/apps.php:11 msgid "More Apps" -msgstr "" +msgstr "Więcej aplikacji" #: templates/apps.php:27 msgid "Select an App" diff --git a/l10n/pt_BR/settings.po b/l10n/pt_BR/settings.po index 5ff37439d0..4116e5e1a6 100644 --- a/l10n/pt_BR/settings.po +++ b/l10n/pt_BR/settings.po @@ -14,9 +14,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-09 02:03+0200\n" -"PO-Revision-Date: 2012-10-09 00:03+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 03:46+0000\n" +"Last-Translator: sedir \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/owncloud/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -28,7 +28,7 @@ msgstr "" msgid "Unable to load list from App Store" msgstr "Não foi possivel carregar lista da App Store" -#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 +#: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18 #: ajax/togglegroups.php:15 msgid "Authentication error" msgstr "erro de autenticação" @@ -65,7 +65,7 @@ msgstr "Pedido inválido" msgid "Unable to delete group" msgstr "Não foi possivel remover grupo" -#: ajax/removeuser.php:22 +#: ajax/removeuser.php:27 msgid "Unable to delete user" msgstr "Não foi possivel remover usuário" @@ -192,7 +192,7 @@ msgstr "Adicione seu Aplicativo" #: templates/apps.php:11 msgid "More Apps" -msgstr "" +msgstr "Mais Apps" #: templates/apps.php:27 msgid "Select an App" diff --git a/l10n/pt_PT/user_ldap.po b/l10n/pt_PT/user_ldap.po index 1d18160531..f9ac903822 100644 --- a/l10n/pt_PT/user_ldap.po +++ b/l10n/pt_PT/user_ldap.po @@ -4,13 +4,14 @@ # # Translators: # Duarte Velez Grilo , 2012. +# Helder Meneses , 2012. msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-04 02:04+0200\n" -"PO-Revision-Date: 2012-10-03 13:31+0000\n" -"Last-Translator: Duarte Velez Grilo \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 21:26+0000\n" +"Last-Translator: Helder Meneses \n" "Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/owncloud/language/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -33,7 +34,7 @@ msgstr "" #: templates/settings.php:9 msgid "You can specify Base DN for users and groups in the Advanced tab" -msgstr "" +msgstr "Pode especificar o ND Base para utilizadores e grupos no separador Avançado" #: templates/settings.php:10 msgid "User DN" diff --git a/l10n/ru_RU/core.po b/l10n/ru_RU/core.po index 6b8d6d1268..f9d5fc9167 100644 --- a/l10n/ru_RU/core.po +++ b/l10n/ru_RU/core.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-09-28 23:34+0200\n" -"PO-Revision-Date: 2012-09-28 21:34+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 13:35+0000\n" +"Last-Translator: AnnaSch \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" @@ -30,55 +30,55 @@ msgstr "Нет категории для добавления?" msgid "This category already exists: " msgstr "Эта категория уже существует:" -#: js/js.js:213 templates/layout.user.php:49 templates/layout.user.php:50 +#: js/js.js:229 templates/layout.user.php:49 templates/layout.user.php:50 msgid "Settings" msgstr "Настройки" -#: js/js.js:645 +#: js/js.js:661 msgid "January" msgstr "Январь" -#: js/js.js:645 +#: js/js.js:661 msgid "February" msgstr "Февраль" -#: js/js.js:645 +#: js/js.js:661 msgid "March" msgstr "Март" -#: js/js.js:645 +#: js/js.js:661 msgid "April" msgstr "Апрель" -#: js/js.js:645 +#: js/js.js:661 msgid "May" msgstr "Май" -#: js/js.js:645 +#: js/js.js:661 msgid "June" msgstr "Июнь" -#: js/js.js:646 +#: js/js.js:662 msgid "July" msgstr "Июль" -#: js/js.js:646 +#: js/js.js:662 msgid "August" msgstr "Август" -#: js/js.js:646 +#: js/js.js:662 msgid "September" msgstr "Сентябрь" -#: js/js.js:646 +#: js/js.js:662 msgid "October" msgstr "Октябрь" -#: js/js.js:646 +#: js/js.js:662 msgid "November" msgstr "Ноябрь" -#: js/js.js:646 +#: js/js.js:662 msgid "December" msgstr "Декабрь" @@ -106,8 +106,8 @@ msgstr "Да" msgid "No categories selected for deletion." msgstr "Нет категорий, выбранных для удаления." -#: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:489 -#: js/share.js:501 +#: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:497 +#: js/share.js:509 msgid "Error" msgstr "Ошибка" @@ -137,7 +137,7 @@ msgstr "" #: js/share.js:137 msgid "Share with" -msgstr "" +msgstr "Сделать общим с" #: js/share.js:142 msgid "Share with link" @@ -153,11 +153,11 @@ msgstr "Пароль" #: js/share.js:152 msgid "Set expiration date" -msgstr "" +msgstr "Установить срок действия" #: js/share.js:153 msgid "Expiration date" -msgstr "" +msgstr "Дата истечения срока действия" #: js/share.js:185 msgid "Share via email:" @@ -177,45 +177,45 @@ msgstr "" #: js/share.js:250 msgid "with" -msgstr "" +msgstr "с" #: js/share.js:271 msgid "Unshare" msgstr "Отключить общий доступ" -#: js/share.js:279 +#: js/share.js:283 msgid "can edit" msgstr "" -#: js/share.js:281 +#: js/share.js:285 msgid "access control" msgstr "контроль доступа" -#: js/share.js:284 +#: js/share.js:288 msgid "create" msgstr "создать" -#: js/share.js:287 +#: js/share.js:291 msgid "update" msgstr "обновить" -#: js/share.js:290 +#: js/share.js:294 msgid "delete" msgstr "удалить" -#: js/share.js:293 +#: js/share.js:297 msgid "share" msgstr "сделать общим" -#: js/share.js:317 js/share.js:476 +#: js/share.js:322 js/share.js:484 msgid "Password protected" -msgstr "" +msgstr "Пароль защищен" -#: js/share.js:489 +#: js/share.js:497 msgid "Error unsetting expiration date" msgstr "" -#: js/share.js:501 +#: js/share.js:509 msgid "Error setting expiration date" msgstr "" @@ -244,7 +244,7 @@ msgstr "Войти не удалось!" msgid "Username" msgstr "Имя пользователя" -#: lostpassword/templates/lostpassword.php:15 +#: lostpassword/templates/lostpassword.php:14 msgid "Request reset" msgstr "Сброс запроса" @@ -345,7 +345,7 @@ msgstr "Сервер базы данных" msgid "Finish setup" msgstr "Завершение настройки" -#: templates/layout.guest.php:36 +#: templates/layout.guest.php:38 msgid "web services under your control" msgstr "веб-сервисы под Вашим контролем" @@ -357,11 +357,11 @@ msgstr "Выйти" msgid "Lost your password?" msgstr "Забыли пароль?" -#: templates/login.php:17 +#: templates/login.php:16 msgid "remember" msgstr "запомнить" -#: templates/login.php:18 +#: templates/login.php:17 msgid "Log in" msgstr "Войти" diff --git a/l10n/ru_RU/files.po b/l10n/ru_RU/files.po index 767e9967c9..4951fe271a 100644 --- a/l10n/ru_RU/files.po +++ b/l10n/ru_RU/files.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-09-26 13:19+0200\n" -"PO-Revision-Date: 2012-09-26 11:20+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 13:26+0000\n" +"Last-Translator: AnnaSch \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" @@ -62,41 +62,41 @@ msgstr "Удалить" #: js/fileactions.js:182 msgid "Rename" -msgstr "" +msgstr "Переименовать" -#: js/filelist.js:190 js/filelist.js:192 +#: js/filelist.js:192 js/filelist.js:194 msgid "already exists" msgstr "уже существует" -#: js/filelist.js:190 js/filelist.js:192 +#: js/filelist.js:192 js/filelist.js:194 msgid "replace" msgstr "отмена" -#: js/filelist.js:190 +#: js/filelist.js:192 msgid "suggest name" msgstr "подобрать название" -#: js/filelist.js:190 js/filelist.js:192 +#: js/filelist.js:192 js/filelist.js:194 msgid "cancel" msgstr "отменить" -#: js/filelist.js:239 js/filelist.js:241 +#: js/filelist.js:241 js/filelist.js:243 msgid "replaced" msgstr "заменено" -#: js/filelist.js:239 js/filelist.js:241 js/filelist.js:273 js/filelist.js:275 +#: js/filelist.js:241 js/filelist.js:243 js/filelist.js:275 js/filelist.js:277 msgid "undo" msgstr "отменить действие" -#: js/filelist.js:241 +#: js/filelist.js:243 msgid "with" msgstr "с" -#: js/filelist.js:273 +#: js/filelist.js:275 msgid "unshared" msgstr "скрытый" -#: js/filelist.js:275 +#: js/filelist.js:277 msgid "deleted" msgstr "удалено" @@ -104,114 +104,114 @@ msgstr "удалено" msgid "generating ZIP-file, it may take some time." msgstr "Создание ZIP-файла, это может занять некоторое время." -#: js/files.js:208 +#: js/files.js:214 msgid "Unable to upload your file as it is a directory or has 0 bytes" msgstr "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией" -#: js/files.js:208 +#: js/files.js:214 msgid "Upload Error" msgstr "Ошибка загрузки" -#: js/files.js:236 js/files.js:341 js/files.js:371 +#: js/files.js:242 js/files.js:347 js/files.js:377 msgid "Pending" msgstr "Ожидающий решения" -#: js/files.js:256 +#: js/files.js:262 msgid "1 file uploading" -msgstr "" +msgstr "загрузка 1 файла" -#: js/files.js:259 js/files.js:304 js/files.js:319 +#: js/files.js:265 js/files.js:310 js/files.js:325 msgid "files uploading" -msgstr "" +msgstr "загрузка файлов" -#: js/files.js:322 js/files.js:355 +#: js/files.js:328 js/files.js:361 msgid "Upload cancelled." msgstr "Загрузка отменена" -#: js/files.js:424 +#: js/files.js:430 msgid "" "File upload is in progress. Leaving the page now will cancel the upload." msgstr "Процесс загрузки файла. Если покинуть страницу сейчас, загрузка будет отменена." -#: js/files.js:494 +#: js/files.js:500 msgid "Invalid name, '/' is not allowed." msgstr "Неправильное имя, '/' не допускается." -#: js/files.js:667 +#: js/files.js:681 msgid "files scanned" -msgstr "" +msgstr "файлы отсканированы" -#: js/files.js:675 +#: js/files.js:689 msgid "error while scanning" -msgstr "" +msgstr "ошибка при сканировании" -#: js/files.js:748 templates/index.php:48 +#: js/files.js:762 templates/index.php:48 msgid "Name" msgstr "Имя" -#: js/files.js:749 templates/index.php:56 +#: js/files.js:763 templates/index.php:56 msgid "Size" msgstr "Размер" -#: js/files.js:750 templates/index.php:58 +#: js/files.js:764 templates/index.php:58 msgid "Modified" msgstr "Изменен" -#: js/files.js:777 +#: js/files.js:791 msgid "folder" msgstr "папка" -#: js/files.js:779 +#: js/files.js:793 msgid "folders" msgstr "папки" -#: js/files.js:787 +#: js/files.js:801 msgid "file" msgstr "файл" -#: js/files.js:789 +#: js/files.js:803 msgid "files" msgstr "файлы" -#: js/files.js:833 +#: js/files.js:847 msgid "seconds ago" -msgstr "" +msgstr "секунд назад" -#: js/files.js:834 +#: js/files.js:848 msgid "minute ago" -msgstr "" +msgstr "минуту назад" -#: js/files.js:835 +#: js/files.js:849 msgid "minutes ago" -msgstr "" +msgstr "минут назад" -#: js/files.js:838 +#: js/files.js:852 msgid "today" -msgstr "" +msgstr "сегодня" -#: js/files.js:839 +#: js/files.js:853 msgid "yesterday" -msgstr "" +msgstr "вчера" -#: js/files.js:840 +#: js/files.js:854 msgid "days ago" -msgstr "" +msgstr "дней назад" -#: js/files.js:841 +#: js/files.js:855 msgid "last month" -msgstr "" +msgstr "в прошлом месяце" -#: js/files.js:843 +#: js/files.js:857 msgid "months ago" -msgstr "" +msgstr "месяцев назад" -#: js/files.js:844 +#: js/files.js:858 msgid "last year" -msgstr "" +msgstr "в прошлом году" -#: js/files.js:845 +#: js/files.js:859 msgid "years ago" -msgstr "" +msgstr "лет назад" #: templates/admin.php:5 msgid "File handling" diff --git a/l10n/ru_RU/files_external.po b/l10n/ru_RU/files_external.po index 0ba1faa0ab..62d3e49427 100644 --- a/l10n/ru_RU/files_external.po +++ b/l10n/ru_RU/files_external.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-02 23:16+0200\n" -"PO-Revision-Date: 2012-10-02 21:17+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 12:39+0000\n" +"Last-Translator: AnnaSch \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" @@ -20,19 +20,19 @@ msgstr "" #: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23 msgid "Access granted" -msgstr "" +msgstr "Доступ разрешен" #: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86 msgid "Error configuring Dropbox storage" -msgstr "" +msgstr "Ошибка при конфигурировании хранилища Dropbox" #: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40 msgid "Grant access" -msgstr "" +msgstr "Предоставить доступ" #: js/dropbox.js:73 js/google.js:72 msgid "Fill out all required fields" -msgstr "" +msgstr "Заполните все требуемые поля" #: js/dropbox.js:85 msgid "Please provide a valid Dropbox app key and secret." diff --git a/l10n/ru_RU/files_versions.po b/l10n/ru_RU/files_versions.po index e8828a703f..cb0853d718 100644 --- a/l10n/ru_RU/files_versions.po +++ b/l10n/ru_RU/files_versions.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-09-22 01:14+0200\n" -"PO-Revision-Date: 2012-09-21 23:15+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 13:22+0000\n" +"Last-Translator: AnnaSch \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" @@ -20,11 +20,11 @@ msgstr "" #: js/settings-personal.js:31 templates/settings-personal.php:10 msgid "Expire all versions" -msgstr "" +msgstr "Срок действия всех версий истекает" #: js/versions.js:16 msgid "History" -msgstr "" +msgstr "История" #: templates/settings-personal.php:4 msgid "Versions" diff --git a/l10n/ru_RU/settings.po b/l10n/ru_RU/settings.po index b70f0c47e8..b4ad0e132f 100644 --- a/l10n/ru_RU/settings.po +++ b/l10n/ru_RU/settings.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-09 02:03+0200\n" -"PO-Revision-Date: 2012-10-09 00:04+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 13:52+0000\n" +"Last-Translator: AnnaSch \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" @@ -22,7 +22,7 @@ msgstr "" msgid "Unable to load list from App Store" msgstr "Невозможно загрузить список из App Store" -#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 +#: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18 #: ajax/togglegroups.php:15 msgid "Authentication error" msgstr "Ошибка авторизации" @@ -59,7 +59,7 @@ msgstr "Неверный запрос" msgid "Unable to delete group" msgstr "Невозможно удалить группу" -#: ajax/removeuser.php:22 +#: ajax/removeuser.php:27 msgid "Unable to delete user" msgstr "Невозможно удалить пользователя" @@ -186,7 +186,7 @@ msgstr "Добавить Ваше приложение" #: templates/apps.php:11 msgid "More Apps" -msgstr "" +msgstr "Больше приложений" #: templates/apps.php:27 msgid "Select an App" @@ -227,7 +227,7 @@ msgstr "Ответ" #: templates/personal.php:8 #, php-format msgid "You have used %s of the available %s" -msgstr "" +msgstr "Вы использовали %s из доступных%s" #: templates/personal.php:12 msgid "Desktop and Mobile Syncing Clients" @@ -239,7 +239,7 @@ msgstr "Загрузка" #: templates/personal.php:19 msgid "Your password was changed" -msgstr "" +msgstr "Ваш пароль был изменен" #: templates/personal.php:20 msgid "Unable to change your password" diff --git a/l10n/ru_RU/user_ldap.po b/l10n/ru_RU/user_ldap.po index 0ae4a652e0..ed1fc49dd0 100644 --- a/l10n/ru_RU/user_ldap.po +++ b/l10n/ru_RU/user_ldap.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" -"PO-Revision-Date: 2012-10-09 13:45+0000\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" +"PO-Revision-Date: 2012-10-10 12:58+0000\n" "Last-Translator: AnnaSch \n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n" "MIME-Version: 1.0\n" @@ -158,7 +158,7 @@ msgstr "в байтах" #: templates/settings.php:29 msgid "in seconds. A change empties the cache." -msgstr "" +msgstr "в секундах. Изменение очищает кэш." #: templates/settings.php:30 msgid "" diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot index 616766556e..55bd36d978 100644 --- a/l10n/templates/core.pot +++ b/l10n/templates/core.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,55 +29,55 @@ msgstr "" msgid "This category already exists: " msgstr "" -#: js/js.js:213 templates/layout.user.php:49 templates/layout.user.php:50 +#: js/js.js:229 templates/layout.user.php:49 templates/layout.user.php:50 msgid "Settings" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "January" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "February" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "March" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "April" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "May" msgstr "" -#: js/js.js:645 +#: js/js.js:661 msgid "June" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "July" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "August" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "September" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "October" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "November" msgstr "" -#: js/js.js:646 +#: js/js.js:662 msgid "December" msgstr "" diff --git a/l10n/templates/files.pot b/l10n/templates/files.pot index d8deaacef2..e57983ba83 100644 --- a/l10n/templates/files.pot +++ b/l10n/templates/files.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_encryption.pot b/l10n/templates/files_encryption.pot index 0fc76b9eda..159ecf6477 100644 --- a/l10n/templates/files_encryption.pot +++ b/l10n/templates/files_encryption.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_external.pot b/l10n/templates/files_external.pot index 76772c8f71..b6721e8f6e 100644 --- a/l10n/templates/files_external.pot +++ b/l10n/templates/files_external.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_sharing.pot b/l10n/templates/files_sharing.pot index 281ac6daad..c44e4e4ac0 100644 --- a/l10n/templates/files_sharing.pot +++ b/l10n/templates/files_sharing.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_versions.pot b/l10n/templates/files_versions.pot index 8d2f16806c..c08db0f8e1 100644 --- a/l10n/templates/files_versions.pot +++ b/l10n/templates/files_versions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/lib.pot b/l10n/templates/lib.pot index cdde783954..db68096910 100644 --- a/l10n/templates/lib.pot +++ b/l10n/templates/lib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:05+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot index 80a2da76fb..aadb83c77f 100644 --- a/l10n/templates/settings.pot +++ b/l10n/templates/settings.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:05+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid "Unable to load list from App Store" msgstr "" -#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 +#: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18 #: ajax/togglegroups.php:15 msgid "Authentication error" msgstr "" @@ -58,7 +58,7 @@ msgstr "" msgid "Unable to delete group" msgstr "" -#: ajax/removeuser.php:22 +#: ajax/removeuser.php:27 msgid "Unable to delete user" msgstr "" diff --git a/l10n/templates/user_ldap.pot b/l10n/templates/user_ldap.pot index 07062370bb..cda0cbff69 100644 --- a/l10n/templates/user_ldap.pot +++ b/l10n/templates/user_ldap.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 02:04+0200\n" +"POT-Creation-Date: 2012-10-11 02:04+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/settings/l10n/es_AR.php b/settings/l10n/es_AR.php index 06f808ee51..0b103406fa 100644 --- a/settings/l10n/es_AR.php +++ b/settings/l10n/es_AR.php @@ -36,6 +36,7 @@ "More" => "Más", "Developed by the ownCloud community, the source code is licensed under the AGPL." => "Desarrollado por la comunidad ownCloud, el código fuente está bajo licencia AGPL.", "Add your App" => "Añadí tu aplicación", +"More Apps" => "Más aplicaciones", "Select an App" => "Seleccionar una aplicación", "See application page at apps.owncloud.com" => "Mirá la web de aplicaciones apps.owncloud.com", "-licensed by " => "-licenciado por ", diff --git a/settings/l10n/pl.php b/settings/l10n/pl.php index 16c40ac0b0..5ea1f022c6 100644 --- a/settings/l10n/pl.php +++ b/settings/l10n/pl.php @@ -36,6 +36,7 @@ "More" => "Więcej", "Developed by the ownCloud community, the source code is licensed under the AGPL." => "Stwirzone przez społeczność ownCloud, the kod źródłowy na licencji AGPL.", "Add your App" => "Dodaj aplikacje", +"More Apps" => "Więcej aplikacji", "Select an App" => "Zaznacz aplikacje", "See application page at apps.owncloud.com" => "Zobacz stronę aplikacji na apps.owncloud.com", "-licensed by " => "-licencjonowane przez ", diff --git a/settings/l10n/pt_BR.php b/settings/l10n/pt_BR.php index 7c1dff06ef..7ca5160d9a 100644 --- a/settings/l10n/pt_BR.php +++ b/settings/l10n/pt_BR.php @@ -36,6 +36,7 @@ "More" => "Mais", "Developed by the ownCloud community, the source code is licensed under the AGPL." => "Desenvolvido pela comunidade ownCloud, o código fonte está licenciado sob AGPL.", "Add your App" => "Adicione seu Aplicativo", +"More Apps" => "Mais Apps", "Select an App" => "Selecione uma Aplicação", "See application page at apps.owncloud.com" => "Ver página do aplicativo em apps.owncloud.com", "-licensed by " => "-licenciado por ", diff --git a/settings/l10n/ru_RU.php b/settings/l10n/ru_RU.php index a61b40e4fb..847716155d 100644 --- a/settings/l10n/ru_RU.php +++ b/settings/l10n/ru_RU.php @@ -34,6 +34,7 @@ "More" => "Подробнее", "Developed by the ownCloud community, the source code is licensed under the AGPL." => "Разработанный ownCloud community, the source code is licensed under the AGPL.", "Add your App" => "Добавить Ваше приложение", +"More Apps" => "Больше приложений", "Select an App" => "Выбрать приложение", "See application page at apps.owncloud.com" => "Обратитесь к странице приложений на apps.owncloud.com", "-licensed by " => "-licensed by ", @@ -43,8 +44,10 @@ "Problems connecting to help database." => "Проблемы, связанные с разделом Помощь базы данных", "Go there manually." => "Сделать вручную.", "Answer" => "Ответ", +"You have used %s of the available %s" => "Вы использовали %s из доступных%s", "Desktop and Mobile Syncing Clients" => "Клиенты синхронизации настольной и мобильной систем", "Download" => "Загрузка", +"Your password was changed" => "Ваш пароль был изменен", "Unable to change your password" => "Невозможно изменить Ваш пароль", "Current password" => "Текущий пароль", "New password" => "Новый пароль", From 4d451f649d4bdcab9fd5aef750f6aa8823e919a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 11 Oct 2012 12:42:57 +0200 Subject: [PATCH 14/26] fixed offset calculation (bug #1961) --- lib/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper.php b/lib/helper.php index 908a61b5a2..2c221ddf19 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -661,7 +661,7 @@ class OC_Helper { $length = mb_strlen($search, $encoding); while(($i = mb_strrpos($subject, $search, $offset, $encoding)) !== false ) { $subject = OC_Helper::mb_substr_replace($subject, $replace, $i, $length); - $offset = $i - mb_strlen($subject, $encoding) - 1; + $offset = $i - mb_strlen($subject, $encoding); $count++; } return $subject; From 77d91d5a03819cf1f768ecdfbd2f67090a84790b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 11 Oct 2012 13:45:16 +0200 Subject: [PATCH 15/26] generate correct link for shared files and shared directories --- apps/files_sharing/public.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 5119086ce0..e9f318efd9 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -45,6 +45,11 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { } if (isset($linkItem['share_with'])) { // Check password + if (isset($_GET['file'])) { + $url = OCP\Util::linkToPublic('files').'&file='.$_GET['file']; + } else { + $url = OCP\Util::linkToPublic('files').'&dir='.$_GET['dir']; + } if (isset($_POST['password'])) { $password = $_POST['password']; $storedHash = $linkItem['share_with']; @@ -52,7 +57,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { $hasher = new PasswordHash(8, $forcePortable); if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $storedHash))) { $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); - $tmpl->assign('URL', OCP\Util::linkToPublic('files').'&file='.$_GET['file']); + $tmpl->assign('URL', $url); $tmpl->assign('error', true); $tmpl->printPage(); exit(); @@ -64,7 +69,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { } else if (!isset($_SESSION['public_link_authenticated']) || $_SESSION['public_link_authenticated'] !== $linkItem['id']) { // Prompt for password $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); - $tmpl->assign('URL', OCP\Util::linkToPublic('files').'&file='.$_GET['file']); + $tmpl->assign('URL', $url); $tmpl->printPage(); exit(); } From 8336b3287e557c326f60ac8a7afd710267c38407 Mon Sep 17 00:00:00 2001 From: Benjamin Liles Date: Thu, 11 Oct 2012 08:52:21 -0500 Subject: [PATCH 16/26] Various bug fixes for swift --- apps/files_external/lib/swift.php | 38 ++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index c29d28b44c..4b0b8c25fd 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -39,7 +39,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return string */ private function getContainerName($path) { - $path=trim($this->root.$path,'/'); + $path=trim(trim($this->root,'/')."/".$path,'/.'); return str_replace('/','\\',$path); } @@ -70,11 +70,11 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return CF_Container */ private function createContainer($path) { - if($path=='' or $path=='/') { + if($path=='' or $path=='/' or $path=='.') { return $this->conn->create_container($this->getContainerName($path)); } $parent=dirname($path); - if($parent=='' or $parent=='/') { + if($parent=='' or $parent=='/' or $parent=='.') { $parentContainer=$this->rootContainer; }else{ if(!$this->containerExists($parent)) { @@ -100,6 +100,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ if(is_null($container)) { return null; }else{ + if ($path=="/" or $path=='') { + return null; + } try{ $obj=$container->get_object(basename($path)); $this->objects[$path]=$obj; @@ -135,7 +138,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ private function createObject($path) { $container=$this->getContainer(dirname($path)); if(!is_null($container)) { - $container=$this->createContainer($path); + $container=$this->createContainer(dirname($path)); } return $container->create_object(basename($path)); } @@ -277,7 +280,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ $this->conn = new CF_Connection($this->auth); - if(!$this->containerExists($this->root)) { + if(!$this->containerExists('/')) { $this->rootContainer=$this->createContainer('/'); }else{ $this->rootContainer=$this->getContainer('/'); @@ -391,6 +394,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } public function unlink($path) { + if($this->containerExists($path)) { + return $this->rmdir($path); + } if($this->objectExists($path)) { $container=$this->getContainer(dirname($path)); $container->delete_object(basename($path)); @@ -401,13 +407,13 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } public function fopen($path,$mode) { - $obj=$this->getObject($path); - if(is_null($obj)) { - return false; - } switch($mode) { case 'r': case 'rb': + $obj=$this->getObject($path); + if (is_null($obj)) { + return false; + } $fp = fopen('php://temp', 'r+'); $obj->stream($fp); @@ -440,7 +446,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } public function free_space($path) { - return 0; + return 1024*1024*1024*8; } public function touch($path,$mtime=null) { @@ -481,7 +487,17 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } public function stat($path) { + $container=$this->getContainer($path); + if (!is_null($container)) { + return array( + 'mtime'=>-1, + 'size'=>$container->bytes_used, + 'ctime'=>-1 + ); + } + $obj=$this->getObject($path); + if(is_null($obj)) { return false; } @@ -505,7 +521,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ $obj->save_to_filename($tmpFile); return $tmpFile; }else{ - return false; + return OCP\Files::tmpFile(); } } From 86d978be7801e23b67c3fc6241aa7f21184011cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 11 Oct 2012 16:14:29 +0200 Subject: [PATCH 17/26] add *.ai files to the mimetypes list --- lib/mimetypes.list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mimetypes.list.php b/lib/mimetypes.list.php index 8386bcb93f..77b9791758 100644 --- a/lib/mimetypes.list.php +++ b/lib/mimetypes.list.php @@ -94,4 +94,5 @@ return array( 'sgf' => 'application/sgf', 'cdr' => 'application/coreldraw', 'impress' => 'text/impress', + 'ai' => 'application/illustrator', ); From c4e301d48f470f46a7c37170cebe3e6f62d5285d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 19:30:27 +0200 Subject: [PATCH 18/26] code style --- tests/lib/filestorage.php | 300 +++++++++++++++++++------------------- 1 file changed, 150 insertions(+), 150 deletions(-) diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php index ae780bee85..7c2d86e6b6 100644 --- a/tests/lib/filestorage.php +++ b/tests/lib/filestorage.php @@ -1,24 +1,24 @@ . -* -*/ + * ownCloud + * + * @author Robin Appelman + * @copyright 2012 Robin Appelman icewind@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 . + * + */ abstract class Test_FileStorage extends UnitTestCase { /** @@ -30,195 +30,195 @@ abstract class Test_FileStorage extends UnitTestCase { * the root folder of the storage should always exist, be readable and be recognized as a directory */ public function testRoot() { - $this->assertTrue($this->instance->file_exists('/'),'Root folder does not exist'); - $this->assertTrue($this->instance->isReadable('/'),'Root folder is not readable'); - $this->assertTrue($this->instance->is_dir('/'),'Root folder is not a directory'); - $this->assertFalse($this->instance->is_file('/'),'Root folder is a file'); - $this->assertEqual('dir',$this->instance->filetype('/')); - + $this->assertTrue($this->instance->file_exists('/'), 'Root folder does not exist'); + $this->assertTrue($this->instance->isReadable('/'), 'Root folder is not readable'); + $this->assertTrue($this->instance->is_dir('/'), 'Root folder is not a directory'); + $this->assertFalse($this->instance->is_file('/'), 'Root folder is a file'); + $this->assertEqual('dir', $this->instance->filetype('/')); + //without this, any further testing would be useless, not an acutal requirement for filestorage though - $this->assertTrue($this->instance->isUpdatable('/'),'Root folder is not writable'); + $this->assertTrue($this->instance->isUpdatable('/'), 'Root folder is not writable'); } - + public function testDirectories() { $this->assertFalse($this->instance->file_exists('/folder')); - + $this->assertTrue($this->instance->mkdir('/folder')); - + $this->assertTrue($this->instance->file_exists('/folder')); $this->assertTrue($this->instance->is_dir('/folder')); $this->assertFalse($this->instance->is_file('/folder')); - $this->assertEqual('dir',$this->instance->filetype('/folder')); - $this->assertEqual(0,$this->instance->filesize('/folder')); + $this->assertEqual('dir', $this->instance->filetype('/folder')); + $this->assertEqual(0, $this->instance->filesize('/folder')); $this->assertTrue($this->instance->isReadable('/folder')); $this->assertTrue($this->instance->isUpdatable('/folder')); - - $dh=$this->instance->opendir('/'); - $content=array(); - while($file=readdir($dh)) { - if($file!='.' and $file!='..') { - $content[]=$file; - } - } - $this->assertEqual(array('folder'),$content); - - $this->assertFalse($this->instance->mkdir('/folder'));//cant create existing folders - $this->assertTrue($this->instance->rmdir('/folder')); - - $this->assertFalse($this->instance->file_exists('/folder')); - - $this->assertFalse($this->instance->rmdir('/folder'));//cant remove non existing folders - $dh=$this->instance->opendir('/'); - $content=array(); - while($file=readdir($dh)) { - if($file!='.' and $file!='..') { - $content[]=$file; + $dh = $this->instance->opendir('/'); + $content = array(); + while ($file = readdir($dh)) { + if ($file != '.' and $file != '..') { + $content[] = $file; } } - $this->assertEqual(array(),$content); + $this->assertEqual(array('folder'), $content); + + $this->assertFalse($this->instance->mkdir('/folder')); //cant create existing folders + $this->assertTrue($this->instance->rmdir('/folder')); + + $this->assertFalse($this->instance->file_exists('/folder')); + + $this->assertFalse($this->instance->rmdir('/folder')); //cant remove non existing folders + + $dh = $this->instance->opendir('/'); + $content = array(); + while ($file = readdir($dh)) { + if ($file != '.' and $file != '..') { + $content[] = $file; + } + } + $this->assertEqual(array(), $content); } /** * test the various uses of file_get_contents and file_put_contents */ public function testGetPutContents() { - $sourceFile=OC::$SERVERROOT.'/tests/data/lorem.txt'; - $sourceText=file_get_contents($sourceFile); - + $sourceFile = OC::$SERVERROOT . '/tests/data/lorem.txt'; + $sourceText = file_get_contents($sourceFile); + //fill a file with string data - $this->instance->file_put_contents('/lorem.txt',$sourceText); + $this->instance->file_put_contents('/lorem.txt', $sourceText); $this->assertFalse($this->instance->is_dir('/lorem.txt')); - $this->assertEqual($sourceText,$this->instance->file_get_contents('/lorem.txt'),'data returned from file_get_contents is not equal to the source data'); + $this->assertEqual($sourceText, $this->instance->file_get_contents('/lorem.txt'), 'data returned from file_get_contents is not equal to the source data'); //empty the file - $this->instance->file_put_contents('/lorem.txt',''); - $this->assertEqual('',$this->instance->file_get_contents('/lorem.txt'),'file not emptied'); + $this->instance->file_put_contents('/lorem.txt', ''); + $this->assertEqual('', $this->instance->file_get_contents('/lorem.txt'), 'file not emptied'); } - + /** * test various known mimetypes */ public function testMimeType() { - $this->assertEqual('httpd/unix-directory',$this->instance->getMimeType('/')); - $this->assertEqual(false,$this->instance->getMimeType('/non/existing/file')); - - $textFile=OC::$SERVERROOT.'/tests/data/lorem.txt'; - $this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile,'r')); - $this->assertEqual('text/plain',$this->instance->getMimeType('/lorem.txt')); - - $pngFile=OC::$SERVERROOT.'/tests/data/logo-wide.png'; - $this->instance->file_put_contents('/logo-wide.png',file_get_contents($pngFile,'r')); - $this->assertEqual('image/png',$this->instance->getMimeType('/logo-wide.png')); - - $svgFile=OC::$SERVERROOT.'/tests/data/logo-wide.svg'; - $this->instance->file_put_contents('/logo-wide.svg',file_get_contents($svgFile,'r')); - $this->assertEqual('image/svg+xml',$this->instance->getMimeType('/logo-wide.svg')); + $this->assertEqual('httpd/unix-directory', $this->instance->getMimeType('/')); + $this->assertEqual(false, $this->instance->getMimeType('/non/existing/file')); + + $textFile = OC::$SERVERROOT . '/tests/data/lorem.txt'; + $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile, 'r')); + $this->assertEqual('text/plain', $this->instance->getMimeType('/lorem.txt')); + + $pngFile = OC::$SERVERROOT . '/tests/data/logo-wide.png'; + $this->instance->file_put_contents('/logo-wide.png', file_get_contents($pngFile, 'r')); + $this->assertEqual('image/png', $this->instance->getMimeType('/logo-wide.png')); + + $svgFile = OC::$SERVERROOT . '/tests/data/logo-wide.svg'; + $this->instance->file_put_contents('/logo-wide.svg', file_get_contents($svgFile, 'r')); + $this->assertEqual('image/svg+xml', $this->instance->getMimeType('/logo-wide.svg')); } - + public function testCopyAndMove() { - $textFile=OC::$SERVERROOT.'/tests/data/lorem.txt'; - $this->instance->file_put_contents('/source.txt',file_get_contents($textFile)); - $this->instance->copy('/source.txt','/target.txt'); + $textFile = OC::$SERVERROOT . '/tests/data/lorem.txt'; + $this->instance->file_put_contents('/source.txt', file_get_contents($textFile)); + $this->instance->copy('/source.txt', '/target.txt'); $this->assertTrue($this->instance->file_exists('/target.txt')); - $this->assertEqual($this->instance->file_get_contents('/source.txt'),$this->instance->file_get_contents('/target.txt')); - - $this->instance->rename('/source.txt','/target2.txt'); + $this->assertEqual($this->instance->file_get_contents('/source.txt'), $this->instance->file_get_contents('/target.txt')); + + $this->instance->rename('/source.txt', '/target2.txt'); $this->assertTrue($this->instance->file_exists('/target2.txt')); $this->assertFalse($this->instance->file_exists('/source.txt')); - $this->assertEqual(file_get_contents($textFile),$this->instance->file_get_contents('/target.txt')); + $this->assertEqual(file_get_contents($textFile), $this->instance->file_get_contents('/target.txt')); } - + public function testLocal() { - $textFile=OC::$SERVERROOT.'/tests/data/lorem.txt'; - $this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile)); - $localFile=$this->instance->getLocalFile('/lorem.txt'); + $textFile = OC::$SERVERROOT . '/tests/data/lorem.txt'; + $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile)); + $localFile = $this->instance->getLocalFile('/lorem.txt'); $this->assertTrue(file_exists($localFile)); - $this->assertEqual(file_get_contents($localFile),file_get_contents($textFile)); - + $this->assertEqual(file_get_contents($localFile), file_get_contents($textFile)); + $this->instance->mkdir('/folder'); - $this->instance->file_put_contents('/folder/lorem.txt',file_get_contents($textFile)); - $this->instance->file_put_contents('/folder/bar.txt','asd'); + $this->instance->file_put_contents('/folder/lorem.txt', file_get_contents($textFile)); + $this->instance->file_put_contents('/folder/bar.txt', 'asd'); $this->instance->mkdir('/folder/recursive'); - $this->instance->file_put_contents('/folder/recursive/file.txt','foo'); - $localFolder=$this->instance->getLocalFolder('/folder'); + $this->instance->file_put_contents('/folder/recursive/file.txt', 'foo'); + $localFolder = $this->instance->getLocalFolder('/folder'); $this->assertTrue(is_dir($localFolder)); - $this->assertTrue(file_exists($localFolder.'/lorem.txt')); - $this->assertEqual(file_get_contents($localFolder.'/lorem.txt'),file_get_contents($textFile)); - $this->assertEqual(file_get_contents($localFolder.'/bar.txt'),'asd'); - $this->assertEqual(file_get_contents($localFolder.'/recursive/file.txt'),'foo'); + $this->assertTrue(file_exists($localFolder . '/lorem.txt')); + $this->assertEqual(file_get_contents($localFolder . '/lorem.txt'), file_get_contents($textFile)); + $this->assertEqual(file_get_contents($localFolder . '/bar.txt'), 'asd'); + $this->assertEqual(file_get_contents($localFolder . '/recursive/file.txt'), 'foo'); } public function testStat() { - $textFile=OC::$SERVERROOT.'/tests/data/lorem.txt'; - $ctimeStart=time(); - $this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile)); + $textFile = OC::$SERVERROOT . '/tests/data/lorem.txt'; + $ctimeStart = time(); + $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile)); $this->assertTrue($this->instance->isReadable('/lorem.txt')); - $ctimeEnd=time(); - $cTime=$this->instance->filectime('/lorem.txt'); - $mTime=$this->instance->filemtime('/lorem.txt'); - if($cTime!=-1) {//not everything can support ctime - $this->assertTrue(($ctimeStart-1)<=$cTime); - $this->assertTrue($cTime<=($ctimeEnd+1)); + $ctimeEnd = time(); + $cTime = $this->instance->filectime('/lorem.txt'); + $mTime = $this->instance->filemtime('/lorem.txt'); + if ($cTime != -1) { //not everything can support ctime + $this->assertTrue(($ctimeStart - 1) <= $cTime); + $this->assertTrue($cTime <= ($ctimeEnd + 1)); } - $this->assertTrue($this->instance->hasUpdated('/lorem.txt',$ctimeStart-1)); - $this->assertTrue($this->instance->hasUpdated('/',$ctimeStart-1)); - - $this->assertTrue(($ctimeStart-1)<=$mTime); - $this->assertTrue($mTime<=($ctimeEnd+1)); - $this->assertEqual(filesize($textFile),$this->instance->filesize('/lorem.txt')); - - $stat=$this->instance->stat('/lorem.txt'); + $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $ctimeStart - 1)); + $this->assertTrue($this->instance->hasUpdated('/', $ctimeStart - 1)); + + $this->assertTrue(($ctimeStart - 1) <= $mTime); + $this->assertTrue($mTime <= ($ctimeEnd + 1)); + $this->assertEqual(filesize($textFile), $this->instance->filesize('/lorem.txt')); + + $stat = $this->instance->stat('/lorem.txt'); //only size, mtime and ctime are requered in the result - $this->assertEqual($stat['size'],$this->instance->filesize('/lorem.txt')); - $this->assertEqual($stat['mtime'],$mTime); - $this->assertEqual($stat['ctime'],$cTime); - - $mtimeStart=time(); + $this->assertEqual($stat['size'], $this->instance->filesize('/lorem.txt')); + $this->assertEqual($stat['mtime'], $mTime); + $this->assertEqual($stat['ctime'], $cTime); + + $mtimeStart = time(); $supportsTouch = $this->instance->touch('/lorem.txt'); - $mtimeEnd=time(); - if($supportsTouch !== false){ - $originalCTime=$cTime; - $cTime=$this->instance->filectime('/lorem.txt'); - $mTime=$this->instance->filemtime('/lorem.txt'); - $this->assertTrue(($mtimeStart-1)<=$mTime); - $this->assertTrue($mTime<=($mtimeEnd+1)); - $this->assertEqual($cTime,$originalCTime); + $mtimeEnd = time(); + if ($supportsTouch !== false) { + $originalCTime = $cTime; + $cTime = $this->instance->filectime('/lorem.txt'); + $mTime = $this->instance->filemtime('/lorem.txt'); + $this->assertTrue(($mtimeStart - 1) <= $mTime); + $this->assertTrue($mTime <= ($mtimeEnd + 1)); + $this->assertEqual($cTime, $originalCTime); - $this->assertTrue($this->instance->hasUpdated('/lorem.txt',$mtimeStart-1)); + $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 1)); - if($this->instance->touch('/lorem.txt',100)!==false) { - $mTime=$this->instance->filemtime('/lorem.txt'); - $this->assertEqual($mTime,100); + if ($this->instance->touch('/lorem.txt', 100) !== false) { + $mTime = $this->instance->filemtime('/lorem.txt'); + $this->assertEqual($mTime, 100); } } - $mtimeStart=time(); - $fh=$this->instance->fopen('/lorem.txt','a'); - fwrite($fh,' '); + $mtimeStart = time(); + $fh = $this->instance->fopen('/lorem.txt', 'a'); + fwrite($fh, ' '); fclose($fh); clearstatcache(); - $mtimeEnd=time(); - $originalCTime=$cTime; - $mTime=$this->instance->filemtime('/lorem.txt'); - $this->assertTrue(($mtimeStart-1)<=$mTime); - $this->assertTrue($mTime<=($mtimeEnd+1)); + $mtimeEnd = time(); + $originalCTime = $cTime; + $mTime = $this->instance->filemtime('/lorem.txt'); + $this->assertTrue(($mtimeStart - 1) <= $mTime); + $this->assertTrue($mTime <= ($mtimeEnd + 1)); $this->instance->unlink('/lorem.txt'); - $this->assertTrue($this->instance->hasUpdated('/',$mtimeStart-1)); + $this->assertTrue($this->instance->hasUpdated('/', $mtimeStart - 1)); } public function testSearch() { - $textFile=OC::$SERVERROOT.'/tests/data/lorem.txt'; - $this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile,'r')); - $pngFile=OC::$SERVERROOT.'/tests/data/logo-wide.png'; - $this->instance->file_put_contents('/logo-wide.png',file_get_contents($pngFile,'r')); - $svgFile=OC::$SERVERROOT.'/tests/data/logo-wide.svg'; - $this->instance->file_put_contents('/logo-wide.svg',file_get_contents($svgFile,'r')); - $result=$this->instance->search('logo'); - $this->assertEqual(2,count($result)); - $this->assertContains('/logo-wide.svg',$result); - $this->assertContains('/logo-wide.png',$result); + $textFile = OC::$SERVERROOT . '/tests/data/lorem.txt'; + $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile, 'r')); + $pngFile = OC::$SERVERROOT . '/tests/data/logo-wide.png'; + $this->instance->file_put_contents('/logo-wide.png', file_get_contents($pngFile, 'r')); + $svgFile = OC::$SERVERROOT . '/tests/data/logo-wide.svg'; + $this->instance->file_put_contents('/logo-wide.svg', file_get_contents($svgFile, 'r')); + $result = $this->instance->search('logo'); + $this->assertEqual(2, count($result)); + $this->assertContains('/logo-wide.svg', $result); + $this->assertContains('/logo-wide.png', $result); } } From 29c43b7d61dd0c3a34566291a6ab1f9a8e077bdd Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 19:38:32 +0200 Subject: [PATCH 19/26] some test cases for fopen of storage backends --- tests/lib/filestorage.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php index 7c2d86e6b6..d1f70e8709 100644 --- a/tests/lib/filestorage.php +++ b/tests/lib/filestorage.php @@ -221,4 +221,24 @@ abstract class Test_FileStorage extends UnitTestCase { $this->assertContains('/logo-wide.svg', $result); $this->assertContains('/logo-wide.png', $result); } + + public function testFOpen() { + $textFile = OC::$SERVERROOT . '/tests/data/lorem.txt'; + + $fh = @$this->instance->fopen('foo', 'r'); + if ($fh) { + fclose($fh); + } + $this->assertFalse($fh); + $this->assertFalse($this->instance->file_exists('foo')); + + $fh = $this->instance->fopen('foo', 'w'); + fwrite($fh, file_get_contents($textFile)); + fclose($fh); + $this->assertTrue($this->instance->file_exists('foo')); + + $fh = $this->instance->fopen('foo', 'r'); + $content = stream_get_contents($fh); + $this->assertEqual(file_get_contents($textFile), $content); + } } From 5256301a536f4308c0de6ff7e2494df98336d259 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 21:12:52 +0200 Subject: [PATCH 20/26] skip the files_external test cases the correct way --- apps/files_external/tests/amazons3.php | 63 +++++++++++++------------- apps/files_external/tests/config.php | 6 +-- apps/files_external/tests/dropbox.php | 25 +++++----- apps/files_external/tests/ftp.php | 25 +++++----- apps/files_external/tests/google.php | 61 ++++++++++++------------- apps/files_external/tests/smb.php | 26 +++++------ apps/files_external/tests/swift.php | 28 ++++++------ apps/files_external/tests/webdav.php | 25 +++++----- 8 files changed, 125 insertions(+), 134 deletions(-) diff --git a/apps/files_external/tests/amazons3.php b/apps/files_external/tests/amazons3.php index b9b4cf65bd..725f4ba05d 100644 --- a/apps/files_external/tests/amazons3.php +++ b/apps/files_external/tests/amazons3.php @@ -1,43 +1,42 @@ . -*/ + * ownCloud + * + * @author Michael Gapczynski + * @copyright 2012 Michael Gapczynski mtgap@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + */ -$config = include('apps/files_external/tests/config.php'); -if (!is_array($config) or !isset($config['amazons3']) or !$config['amazons3']['run']) { - abstract class Test_Filestorage_AmazonS3 extends Test_FileStorage{} - return; -} else { - class Test_Filestorage_AmazonS3 extends Test_FileStorage { +class Test_Filestorage_AmazonS3 extends Test_FileStorage { - private $config; - private $id; + private $config; + private $id; - public function setUp() { - $id = uniqid(); - $this->config = include('apps/files_external/tests/config.php'); - $this->config['amazons3']['bucket'] = $id; // Make sure we have a new empty bucket to work in - $this->instance = new OC_Filestorage_AmazonS3($this->config['amazons3']); + public function setUp() { + $id = uniqid(); + $this->config = include('files_external/tests/config.php'); + if (!is_array($this->config) or !isset($this->config['amazons3']) or !$this->config['amazons3']['run']) { + $this->markTestSkipped('AmazonS3 backend not configured'); } + $this->config['amazons3']['bucket'] = $id; // Make sure we have a new empty bucket to work in + $this->instance = new OC_Filestorage_AmazonS3($this->config['amazons3']); + } - public function tearDown() { + public function tearDown() { + if ($this->instance) { $s3 = new AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret'])); if ($s3->delete_all_objects($this->id)) { $s3->delete_bucket($this->id); diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php index 7779f61894..47dd7c4bf8 100644 --- a/apps/files_external/tests/config.php +++ b/apps/files_external/tests/config.php @@ -8,7 +8,7 @@ return array( 'root'=>'/test', ), 'webdav'=>array( - 'run'=>false, + 'run'=>true, 'host'=>'localhost', 'user'=>'test', 'password'=>'test', @@ -26,11 +26,11 @@ return array( 'run'=>false, 'user'=>'test:tester', 'token'=>'testing', - 'host'=>'localhost:8080/auth', + 'host'=>'ubuntu.local:8080/auth', 'root'=>'/', ), 'smb'=>array( - 'run'=>false, + 'run'=>true, 'user'=>'test', 'password'=>'test', 'host'=>'localhost', diff --git a/apps/files_external/tests/dropbox.php b/apps/files_external/tests/dropbox.php index 64eb2556c9..56319b9f5d 100644 --- a/apps/files_external/tests/dropbox.php +++ b/apps/files_external/tests/dropbox.php @@ -6,22 +6,21 @@ * See the COPYING-README file. */ -$config=include('files_external/tests/config.php'); -if(!is_array($config) or !isset($config['dropbox']) or !$config['dropbox']['run']) { - abstract class Test_Filestorage_Dropbox extends Test_FileStorage{} - return; -}else{ - class Test_Filestorage_Dropbox extends Test_FileStorage { - private $config; +class Test_Filestorage_Dropbox extends Test_FileStorage { + private $config; - public function setUp() { - $id=uniqid(); - $this->config=include('files_external/tests/config.php'); - $this->config['dropbox']['root'].='/'.$id;//make sure we have an new empty folder to work in - $this->instance=new OC_Filestorage_Dropbox($this->config['dropbox']); + public function setUp() { + $id = uniqid(); + $this->config = include('files_external/tests/config.php'); + if (!is_array($this->config) or !isset($this->config['dropbox']) or !$this->config['dropbox']['run']) { + $this->markTestSkipped('Dropbox backend not configured'); } + $this->config['dropbox']['root'] .= '/' . $id; //make sure we have an new empty folder to work in + $this->instance = new OC_Filestorage_Dropbox($this->config['dropbox']); + } - public function tearDown() { + public function tearDown() { + if ($this->instance) { $this->instance->unlink('/'); } } diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php index 12f3ec3908..4549c42041 100644 --- a/apps/files_external/tests/ftp.php +++ b/apps/files_external/tests/ftp.php @@ -6,22 +6,21 @@ * See the COPYING-README file. */ -$config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']) { - abstract class Test_Filestorage_FTP extends Test_FileStorage{} - return; -}else{ - class Test_Filestorage_FTP extends Test_FileStorage { - private $config; +class Test_Filestorage_FTP extends Test_FileStorage { + private $config; - public function setUp() { - $id=uniqid(); - $this->config=include('apps/files_external/tests/config.php'); - $this->config['ftp']['root'].='/'.$id;//make sure we have an new empty folder to work in - $this->instance=new OC_Filestorage_FTP($this->config['ftp']); + public function setUp() { + $id = uniqid(); + $this->config = include('files_external/tests/config.php'); + if (!is_array($this->config) or !isset($this->config['ftp']) or !$this->config['ftp']['run']) { + $this->markTestSkipped('FTP backend not configured'); } + $this->config['ftp']['root'] .= '/' . $id; //make sure we have an new empty folder to work in + $this->instance = new OC_Filestorage_FTP($this->config['ftp']); + } - public function tearDown() { + public function tearDown() { + if ($this->instance) { OCP\Files::rmdirr($this->instance->constructUrl('')); } } diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php index d2a6358ade..46e622cc18 100644 --- a/apps/files_external/tests/google.php +++ b/apps/files_external/tests/google.php @@ -1,42 +1,41 @@ . -*/ + * ownCloud + * + * @author Michael Gapczynski + * @copyright 2012 Michael Gapczynski mtgap@owncloud.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + */ -$config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['google']) or !$config['google']['run']) { - abstract class Test_Filestorage_Google extends Test_FileStorage{} - return; -}else{ - class Test_Filestorage_Google extends Test_FileStorage { +class Test_Filestorage_Google extends Test_FileStorage { - private $config; + private $config; - public function setUp() { - $id=uniqid(); - $this->config=include('apps/files_external/tests/config.php'); - $this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in - $this->instance=new OC_Filestorage_Google($this->config['google']); + public function setUp() { + $id = uniqid(); + $this->config = include('files_external/tests/config.php'); + if (!is_array($this->config) or !isset($this->config['google']) or !$this->config['google']['run']) { + $this->markTestSkipped('Google backend not configured'); } + $this->config['google']['root'] .= '/' . $id; //make sure we have an new empty folder to work in + $this->instance = new OC_Filestorage_Google($this->config['google']); + } - public function tearDown() { + public function tearDown() { + if ($this->instance) { $this->instance->rmdir('/'); } } diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php index 7de4fddbb3..2c03ef5dbd 100644 --- a/apps/files_external/tests/smb.php +++ b/apps/files_external/tests/smb.php @@ -6,23 +6,21 @@ * See the COPYING-README file. */ -$config=include('apps/files_external/tests/config.php'); +class Test_Filestorage_SMB extends Test_FileStorage { + private $config; -if(!is_array($config) or !isset($config['smb']) or !$config['smb']['run']) { - abstract class Test_Filestorage_SMB extends Test_FileStorage{} - return; -}else{ - class Test_Filestorage_SMB extends Test_FileStorage { - private $config; - - public function setUp() { - $id=uniqid(); - $this->config=include('apps/files_external/tests/config.php'); - $this->config['smb']['root'].=$id;//make sure we have an new empty folder to work in - $this->instance=new OC_Filestorage_SMB($this->config['smb']); + public function setUp() { + $id = uniqid(); + $this->config = include('files_external/tests/config.php'); + if (!is_array($this->config) or !isset($this->config['smb']) or !$this->config['smb']['run']) { + $this->markTestSkipped('Samba backend not configured'); } + $this->config['smb']['root'] .= $id; //make sure we have an new empty folder to work in + $this->instance = new OC_Filestorage_SMB($this->config['smb']); + } - public function tearDown() { + public function tearDown() { + if ($this->instance) { OCP\Files::rmdirr($this->instance->constructUrl('')); } } diff --git a/apps/files_external/tests/swift.php b/apps/files_external/tests/swift.php index a6f5eace1c..8cf2a3abc7 100644 --- a/apps/files_external/tests/swift.php +++ b/apps/files_external/tests/swift.php @@ -6,25 +6,23 @@ * See the COPYING-README file. */ -$config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']) { - abstract class Test_Filestorage_SWIFT extends Test_FileStorage{} - return; -}else{ - class Test_Filestorage_SWIFT extends Test_FileStorage { - private $config; +class Test_Filestorage_SWIFT extends Test_FileStorage { + private $config; - public function setUp() { - $id=uniqid(); - $this->config=include('apps/files_external/tests/config.php'); - $this->config['swift']['root'].='/'.$id;//make sure we have an new empty folder to work in - $this->instance=new OC_Filestorage_SWIFT($this->config['swift']); + public function setUp() { + $id = uniqid(); + $this->config = include('files_external/tests/config.php'); + if (!is_array($this->config) or !isset($this->config['swift']) or !$this->config['swift']['run']) { + $this->markTestSkipped('OpenStack SWIFT backend not configured'); } + $this->config['swift']['root'] .= '/' . $id; //make sure we have an new empty folder to work in + $this->instance = new OC_Filestorage_SWIFT($this->config['swift']); + } - public function tearDown() { - $this->instance->rmdir(''); + public function tearDown() { + if ($this->instance) { + $this->instance->rmdir(''); } - } } diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php index 74d980aa3f..2da88f63ed 100644 --- a/apps/files_external/tests/webdav.php +++ b/apps/files_external/tests/webdav.php @@ -6,22 +6,21 @@ * See the COPYING-README file. */ -$config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run']) { - abstract class Test_Filestorage_DAV extends Test_FileStorage{} - return; -}else{ - class Test_Filestorage_DAV extends Test_FileStorage { - private $config; +class Test_Filestorage_DAV extends Test_FileStorage { + private $config; - public function setUp() { - $id=uniqid(); - $this->config=include('apps/files_external/tests/config.php'); - $this->config['webdav']['root'].='/'.$id;//make sure we have an new empty folder to work in - $this->instance=new OC_Filestorage_DAV($this->config['webdav']); + public function setUp() { + $id = uniqid(); + $this->config = include('files_external/tests/config.php'); + if (!is_array($this->config) or !isset($this->config['webdav']) or !$this->config['webdav']['run']) { + $this->markTestSkipped('WebDAV backend not configured'); } + $this->config['webdav']['root'] .= '/' . $id; //make sure we have an new empty folder to work in + $this->instance = new OC_Filestorage_DAV($this->config['webdav']); + } - public function tearDown() { + public function tearDown() { + if ($this->instance) { $this->instance->rmdir('/'); } } From 5698c8519ad48e9ffa4497e8ce951888922903c3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 21:13:19 +0200 Subject: [PATCH 21/26] fix webdav storage backend when trying to open a non existing file for reading --- apps/files_external/lib/webdav.php | 3 +++ apps/files_external/tests/config.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 3c18b227fa..5e18583915 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -131,6 +131,9 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ switch($mode) { case 'r': case 'rb': + if(!$this->file_exists($path)) { + return false; + } //straight up curl instead of sabredav here, sabredav put's the entire get result in memory $curl = curl_init(); $fp = fopen('php://temp', 'r+'); diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php index 47dd7c4bf8..ff16b1c1d8 100644 --- a/apps/files_external/tests/config.php +++ b/apps/files_external/tests/config.php @@ -8,7 +8,7 @@ return array( 'root'=>'/test', ), 'webdav'=>array( - 'run'=>true, + 'run'=>false, 'host'=>'localhost', 'user'=>'test', 'password'=>'test', @@ -26,11 +26,11 @@ return array( 'run'=>false, 'user'=>'test:tester', 'token'=>'testing', - 'host'=>'ubuntu.local:8080/auth', + 'host'=>'localhost.local:8080/auth', 'root'=>'/', ), 'smb'=>array( - 'run'=>true, + 'run'=>false, 'user'=>'test', 'password'=>'test', 'host'=>'localhost', From 92ddefe5a6b549daf267322f8e25942d4970de7c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 21:17:48 +0200 Subject: [PATCH 22/26] fix filetype for smb storage backend --- apps/files_external/lib/smb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index e5ba7a1774..eed2582dc9 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -59,7 +59,7 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ } public function filetype($path) { - return (bool)@$this->opendir($path);//using opendir causes the same amount of requests and caches the content of the folder in one go + return (bool)@$this->opendir($path) ? 'dir' : 'file';//using opendir causes the same amount of requests and caches the content of the folder in one go } /** From b9f820d828ff517c952971ece649ef8e28c74bd2 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 21:27:44 +0200 Subject: [PATCH 23/26] normalize paths for dir and statcache in smb stream wrapper --- 3rdparty/smb4php/smb.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/3rdparty/smb4php/smb.php b/3rdparty/smb4php/smb.php index c50b26b935..c080c1b590 100644 --- a/3rdparty/smb4php/smb.php +++ b/3rdparty/smb4php/smb.php @@ -229,6 +229,8 @@ class smb { } function addstatcache ($url, $info) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; $is_file = (strpos ($info['attr'],'D') === FALSE); $s = ($is_file) ? stat ('/etc/passwd') : stat ('/tmp'); @@ -238,11 +240,15 @@ class smb { } function getstatcache ($url) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; return isset ($__smb_cache['stat'][$url]) ? $__smb_cache['stat'][$url] : FALSE; } function clearstatcache ($url='') { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; if ($url == '') $__smb_cache['stat'] = array (); else unset ($__smb_cache['stat'][$url]); } @@ -358,16 +364,22 @@ class smb_stream_wrapper extends smb { # cache function adddircache ($url, $content) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; return $__smb_cache['dir'][$url] = $content; } function getdircache ($url) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; return isset ($__smb_cache['dir'][$url]) ? $__smb_cache['dir'][$url] : FALSE; } function cleardircache ($url='') { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; if ($url == ''){ $__smb_cache['dir'] = array (); From 517354580d4a31e559e27be8a1ef165d17b33d9e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 21:28:36 +0200 Subject: [PATCH 24/26] remove ctime tests for filestorage, ctime will be removed from the storage api in the future --- tests/lib/filestorage.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php index d1f70e8709..9c6e3f6b8c 100644 --- a/tests/lib/filestorage.php +++ b/tests/lib/filestorage.php @@ -156,12 +156,7 @@ abstract class Test_FileStorage extends UnitTestCase { $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile)); $this->assertTrue($this->instance->isReadable('/lorem.txt')); $ctimeEnd = time(); - $cTime = $this->instance->filectime('/lorem.txt'); $mTime = $this->instance->filemtime('/lorem.txt'); - if ($cTime != -1) { //not everything can support ctime - $this->assertTrue(($ctimeStart - 1) <= $cTime); - $this->assertTrue($cTime <= ($ctimeEnd + 1)); - } $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $ctimeStart - 1)); $this->assertTrue($this->instance->hasUpdated('/', $ctimeStart - 1)); @@ -170,17 +165,15 @@ abstract class Test_FileStorage extends UnitTestCase { $this->assertEqual(filesize($textFile), $this->instance->filesize('/lorem.txt')); $stat = $this->instance->stat('/lorem.txt'); - //only size, mtime and ctime are requered in the result + //only size and mtime are requered in the result $this->assertEqual($stat['size'], $this->instance->filesize('/lorem.txt')); $this->assertEqual($stat['mtime'], $mTime); - $this->assertEqual($stat['ctime'], $cTime); $mtimeStart = time(); $supportsTouch = $this->instance->touch('/lorem.txt'); $mtimeEnd = time(); if ($supportsTouch !== false) { $originalCTime = $cTime; - $cTime = $this->instance->filectime('/lorem.txt'); $mTime = $this->instance->filemtime('/lorem.txt'); $this->assertTrue(($mtimeStart - 1) <= $mTime); $this->assertTrue($mTime <= ($mtimeEnd + 1)); From 87d4aaf287f149bb837e3f0b56fb7a0a0dc5c107 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 22:08:11 +0200 Subject: [PATCH 25/26] supress some warning in cloudfiles library --- 3rdparty/php-cloudfiles/cloudfiles.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3rdparty/php-cloudfiles/cloudfiles.php b/3rdparty/php-cloudfiles/cloudfiles.php index 5f7e2100a9..7b1014265e 100644 --- a/3rdparty/php-cloudfiles/cloudfiles.php +++ b/3rdparty/php-cloudfiles/cloudfiles.php @@ -2000,7 +2000,7 @@ class CF_Object // } //use OC's mimetype detection for files - if(is_file($handle)){ + if(@is_file($handle)){ $this->content_type=OC_Helper::getMimeType($handle); }else{ $this->content_type=OC_Helper::getStringMimeType($handle); @@ -2537,7 +2537,7 @@ class CF_Object } $md5 = hash_final($ctx, false); rewind($data); - } elseif ((string)is_file($data)) { + } elseif ((string)@is_file($data)) { $md5 = md5_file($data); } else { $md5 = md5($data); From ee28e35ba93032a3d43601c030d3d44df9b092f0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 22:39:20 +0200 Subject: [PATCH 26/26] fix storage test case --- tests/lib/filestorage.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php index 9c6e3f6b8c..e82a6f54e3 100644 --- a/tests/lib/filestorage.php +++ b/tests/lib/filestorage.php @@ -173,11 +173,9 @@ abstract class Test_FileStorage extends UnitTestCase { $supportsTouch = $this->instance->touch('/lorem.txt'); $mtimeEnd = time(); if ($supportsTouch !== false) { - $originalCTime = $cTime; $mTime = $this->instance->filemtime('/lorem.txt'); $this->assertTrue(($mtimeStart - 1) <= $mTime); $this->assertTrue($mTime <= ($mtimeEnd + 1)); - $this->assertEqual($cTime, $originalCTime); $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 1)); @@ -193,7 +191,6 @@ abstract class Test_FileStorage extends UnitTestCase { fclose($fh); clearstatcache(); $mtimeEnd = time(); - $originalCTime = $cTime; $mTime = $this->instance->filemtime('/lorem.txt'); $this->assertTrue(($mtimeStart - 1) <= $mTime); $this->assertTrue($mTime <= ($mtimeEnd + 1));