diff options
Diffstat (limited to 'apps')
249 files changed, 3222 insertions, 1889 deletions
diff --git a/apps/files/admin.php b/apps/files/admin.php index 76616bc4373..80fd4f4e4a5 100644 --- a/apps/files/admin.php +++ b/apps/files/admin.php @@ -49,7 +49,8 @@ if($_POST && OC_Util::isCallRegistered()) { OCP\Config::setSystemValue('allowZipDownload', isset($_POST['allowZipDownload'])); } } -$maxZipInputSize = OCP\Util::humanFileSize(OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB'))); +$maxZipInputSizeDefault = OCP\Util::computerFileSize('800 MB'); +$maxZipInputSize = OCP\Util::humanFileSize(OCP\Config::getSystemValue('maxZipInputSize', $maxZipInputSizeDefault)); $allowZipDownload = intval(OCP\Config::getSystemValue('allowZipDownload', true)); OCP\App::setActiveNavigationEntry( "files_administration" ); diff --git a/apps/files/ajax/autocomplete.php b/apps/files/ajax/autocomplete.php index fae38368a85..b32ba7c3d5b 100644 --- a/apps/files/ajax/autocomplete.php +++ b/apps/files/ajax/autocomplete.php @@ -44,7 +44,7 @@ if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)) { if(substr(strtolower($file), 0, $queryLen)==$query) { $item=$base.$file; if((!$dirOnly or OC_Filesystem::is_dir($item))) { - $files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item); + $files[]=(object)array('id'=>$item, 'label'=>$item, 'name'=>$item); } } } diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index 57c8c15c197..6532b76df21 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -10,7 +10,7 @@ OCP\JSON::callCheck(); $dir = stripslashes($_POST["dir"]); $files = isset($_POST["file"]) ? stripslashes($_POST["file"]) : stripslashes($_POST["files"]); -$files = explode(';', $files); +$files = json_decode($files); $filesWithError = ''; $success = true; //Now delete diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index 568fe754c02..cade7e872b3 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -25,7 +25,7 @@ if($doBreadcrumb) { } $breadcrumbNav = new OCP\Template( "files", "part.breadcrumb", "" ); - $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); + $breadcrumbNav->assign( "breadcrumb", $breadcrumb, false ); $data['breadcrumb'] = $breadcrumbNav->fetchPage(); } diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 0541bb16062..5612716b7e4 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -12,7 +12,7 @@ $file = stripslashes($_GET["file"]); $target = stripslashes(rawurldecode($_GET["target"])); -if(OC_Filesystem::file_exists($target . '/' . $file)){ +if(OC_Filesystem::file_exists($target . '/' . $file)) { OCP\JSON::error(array("data" => array( "message" => "Could not move $file - File with this name already exists" ))); exit; } diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index b87079f2712..2bac9bb20ba 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -65,6 +65,7 @@ if($source) { $target=$dir.'/'.$filename; $result=OC_Filesystem::file_put_contents($target, $sourceStream); if($result) { + $target = OC_Filesystem::normalizePath($target); $meta = OC_FileCache::get($target); $mime=$meta['mimetype']; $id = OC_FileCache::getId($target); diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index dc830570403..e7823bc4ffb 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -10,22 +10,24 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); if (!isset($_FILES['files'])) { - OCP\JSON::error(array("data" => array( "message" => "No file was uploaded. Unknown error" ))); + OCP\JSON::error(array('data' => array( 'message' => 'No file was uploaded. Unknown error' ))); exit(); } foreach ($_FILES['files']['error'] as $error) { if ($error != 0) { $l=OC_L10N::get('files'); $errors = array( - UPLOAD_ERR_OK=>$l->t("There is no error, the file uploaded with success"), - UPLOAD_ERR_INI_SIZE=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'), - UPLOAD_ERR_FORM_SIZE=>$l->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"), - UPLOAD_ERR_PARTIAL=>$l->t("The uploaded file was only partially uploaded"), - UPLOAD_ERR_NO_FILE=>$l->t("No file was uploaded"), - UPLOAD_ERR_NO_TMP_DIR=>$l->t("Missing a temporary folder"), + UPLOAD_ERR_OK=>$l->t('There is no error, the file uploaded with success'), + UPLOAD_ERR_INI_SIZE=>$l->t('The uploaded file exceeds the upload_max_filesize directive in php.ini: ') + .ini_get('upload_max_filesize'), + UPLOAD_ERR_FORM_SIZE=>$l->t('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified' + .' in the HTML form'), + UPLOAD_ERR_PARTIAL=>$l->t('The uploaded file was only partially uploaded'), + UPLOAD_ERR_NO_FILE=>$l->t('No file was uploaded'), + UPLOAD_ERR_NO_TMP_DIR=>$l->t('Missing a temporary folder'), UPLOAD_ERR_CANT_WRITE=>$l->t('Failed to write to disk'), ); - OCP\JSON::error(array("data" => array( "message" => $errors[$error] ))); + OCP\JSON::error(array('data' => array( 'message' => $errors[$error] ))); exit(); } } @@ -38,8 +40,8 @@ $totalSize=0; foreach($files['size'] as $size) { $totalSize+=$size; } -if($totalSize>OC_Filesystem::free_space($dir)){ - OCP\JSON::error(array("data" => array( "message" => "Not enough space available" ))); +if($totalSize>OC_Filesystem::free_space($dir)) { + OCP\JSON::error(array('data' => array( 'message' => 'Not enough space available' ))); exit(); } @@ -47,11 +49,17 @@ $result=array(); if(strpos($dir, '..') === false) { $fileCount=count($files['name']); for($i=0;$i<$fileCount;$i++) { - $target = OCP\Files::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]); + $target = OCP\Files::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]); + // $path needs to be normalized - this failed within drag'n'drop upload to a sub-folder + $target = OC_Filesystem::normalizePath($target); if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) { $meta = OC_FileCache::get($target); $id = OC_FileCache::getId($target); - $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'], 'id'=>$id, 'name'=>basename($target)); + $result[]=array( 'status' => 'success', + 'mime'=>$meta['mimetype'], + 'size'=>$meta['size'], + 'id'=>$id, + 'name'=>basename($target)); } } OCP\JSON::encodedPrint($result); @@ -60,4 +68,4 @@ if(strpos($dir, '..') === false) { $error='invalid dir'; } -OCP\JSON::error(array('data' => array('error' => $error, "file" => $fileName))); +OCP\JSON::error(array('data' => array('error' => $error, 'file' => $fileName))); diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php index 3f437679e05..dfab94b15ea 100644 --- a/apps/files/appinfo/app.php +++ b/apps/files/appinfo/app.php @@ -3,6 +3,10 @@ $l=OC_L10N::get('files'); OCP\App::registerAdmin('files', 'admin'); -OCP\App::addNavigationEntry( array( "id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo( "files", "index.php" ), "icon" => OCP\Util::imagePath( "core", "places/files.svg" ), "name" => $l->t("Files") )); +OCP\App::addNavigationEntry( array( "id" => "files_index", + "order" => 0, + "href" => OCP\Util::linkTo( "files", "index.php" ), + "icon" => OCP\Util::imagePath( "core", "places/files.svg" ), + "name" => $l->t("Files") )); OC_Search::registerProvider('OC_Search_Provider_File'); diff --git a/apps/files/appinfo/filesync.php b/apps/files/appinfo/filesync.php index 47fc6fb4de6..cbed56a6de5 100644 --- a/apps/files/appinfo/filesync.php +++ b/apps/files/appinfo/filesync.php @@ -21,22 +21,22 @@ */ // load needed apps -$RUNTIME_APPTYPES=array('filesystem','authentication','logging'); +$RUNTIME_APPTYPES=array('filesystem', 'authentication', 'logging'); OC_App::loadApps($RUNTIME_APPTYPES); if(!OC_User::isLoggedIn()) { - if(!isset($_SERVER['PHP_AUTH_USER'])) { - header('WWW-Authenticate: Basic realm="ownCloud Server"'); - header('HTTP/1.0 401 Unauthorized'); - echo 'Valid credentials must be supplied'; - exit(); - } else { - if(!OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) { - exit(); - } - } + if(!isset($_SERVER['PHP_AUTH_USER'])) { + header('WWW-Authenticate: Basic realm="ownCloud Server"'); + header('HTTP/1.0 401 Unauthorized'); + echo 'Valid credentials must be supplied'; + exit(); + } else { + if(!OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) { + exit(); + } + } } -list($type,$file) = explode('/', substr($path_info,1+strlen($service)+1), 2); +list($type, $file) = explode('/', substr($path_info, 1+strlen($service)+1), 2); if ($type != 'oc_chunked') { OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index f12430f24dd..1713bcc22ce 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -23,10 +23,12 @@ * */ // load needed apps -$RUNTIME_APPTYPES=array('filesystem','authentication','logging'); +$RUNTIME_APPTYPES=array('filesystem', 'authentication', 'logging'); OC_App::loadApps($RUNTIME_APPTYPES); +OC_Util::obEnd(); + // Backends $authBackend = new OC_Connector_Sabre_Auth(); $lockBackend = new OC_Connector_Sabre_Locks(); diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index e1ab560803d..043782a9c04 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -8,5 +8,4 @@ $this->create('download', 'download{file}') ->requirements(array('file' => '.*')) - ->actionInclude('files/download.php'); - + ->actionInclude('files/download.php');
\ No newline at end of file diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index bcbbc6035fa..3503678e7c7 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -3,12 +3,15 @@ // fix webdav properties,add namespace in front of the property, update for OC4.5 $installedVersion=OCP\Config::getAppValue('files', 'installed_version'); if (version_compare($installedVersion, '1.1.6', '<')) { - $query = OC_DB::prepare( "SELECT `propertyname`, `propertypath`, `userid` FROM `*PREFIX*properties`" ); + $query = OC_DB::prepare( 'SELECT `propertyname`, `propertypath`, `userid` FROM `*PREFIX*properties`' ); $result = $query->execute(); - while( $row = $result->fetchRow()){ - if ( $row["propertyname"][0] != '{' ) { - $query = OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertyname` = ? WHERE `userid` = ? AND `propertypath` = ?' ); - $query->execute( array( '{DAV:}' + $row["propertyname"], $row["userid"], $row["propertypath"] )); + $updateQuery = OC_DB::prepare('UPDATE `*PREFIX*properties`' + .' SET `propertyname` = ?' + .' WHERE `userid` = ?' + .' AND `propertypath` = ?'); + while( $row = $result->fetchRow()) { + if ( $row['propertyname'][0] != '{' ) { + $updateQuery->execute(array('{DAV:}' + $row['propertyname'], $row['userid'], $row['propertypath'])); } } } @@ -36,10 +39,11 @@ foreach($filesToRemove as $file) { if(!file_exists($filepath)) { continue; } - $success = OCP\Files::rmdirr($filepath); - if($success === false) { + $success = OCP\Files::rmdirr($filepath); + if($success === false) { //probably not sufficient privileges, give up and give a message. - OCP\Util::writeLog('files','Could not clean /files/ directory. Please remove everything except webdav.php from ' . OC::$SERVERROOT . '/files/', OCP\Util::ERROR); + OCP\Util::writeLog('files', 'Could not clean /files/ directory.' + .' Please remove everything except webdav.php from ' . OC::$SERVERROOT . '/files/', OCP\Util::ERROR); break; - } + } } diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 69cdb48e567..4fd43cb2c0f 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -4,40 +4,55 @@ /* FILE MENU */ .actions { padding:.3em; float:left; height:2em; } -.actions input, .actions button, .actions .button { margin:0; } -#file_menu { right:0; position:absolute; top:0; } -#file_menu a { display:block; float:left; background-image:none; text-decoration:none; } -.file_upload_form, #file_newfolder_form { display:inline; float: left; margin-left:0; } -#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; } -.file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .5em; padding-left:2em; } -.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:block; float:left; padding-left:0; overflow:hidden; position:relative; margin:0; margin-left:2px; } -.file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; } -#new { background-color:#5bb75b; float:left; margin:0; border-right:none; z-index:1010; height:1.3em; } -#new:hover, a.file_upload_button_wrapper:hover + button.file_upload_filename { background-color:#4b964b; } +.actions input, .actions button, .actions .button { margin:0; float:left; } + +#new { + height:17px; margin:0 0 0 1em; z-index:1010; float:left; +} #new.active { border-bottom-left-radius:0; border-bottom-right-radius:0; border-bottom:none; } -#new>a { padding:.5em 1.2em .3em; color:#fff; text-shadow:0 1px 0 #51a351; } -#new>ul { display:none; position:fixed; text-align:left; padding:.5em; background:#f8f8f8; margin-top:0.075em; border:1px solid #ddd; min-width:7em; margin-left:-.5em; z-index:-1; } -#new>ul>li { margin:.3em; padding-left:2em; background-repeat:no-repeat; cursor:pointer; padding-bottom:0.1em } +#new>a { padding:.5em 1.2em .3em; } +#new>ul { + display:none; position:fixed; min-width:7em; z-index:-1; + padding:.5em; margin-top:0.075em; margin-left:-.5em; + text-align:left; + background:#f8f8f8; border:1px solid #ddd; +} +#new>ul>li { height:20px; margin:.3em; padding-left:2em; padding-bottom:0.1em; + background-repeat:no-repeat; cursor:pointer; } #new>ul>li>p { cursor:pointer; } #new>ul>li>input { padding:0.3em; margin:-0.3em; } -#new, .file_upload_filename { border:1px solid; border-color:#51a351 #419341 #387038; -moz-box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; -webkit-box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; box-shadow:0 1px 1px #f8f8f8, 1px 1px 1px #ada inset; } #new .popup { border-top-left-radius:0; z-index:10; } -#file_newfolder_name { background-image:url('%webroot%/core/img/places/folder.svg'); font-weight:normal; width:7em; } -.file_upload_start, .file_upload_filename { font-size:1em; } -#file_newfolder_submit, #file_upload_submit { width:3em; } +#upload { + height:27px; padding:0; margin-left:0.2em; overflow:hidden; +} +#upload a { + position:relative; display:block; width:100%; height:27px; + cursor:pointer; z-index:1000; + background-image:url('%webroot%/core/img/actions/upload.svg'); + background-repeat:no-repeat; + background-position:7px 6px; +} .file_upload_target { display:none; } +.file_upload_form { display:inline; float:left; margin:0; padding:0; cursor:pointer; overflow:visible; } +#file_upload_start { + left:0; top:0; width:28px; height:27px; padding:0; + font-size:1em; + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; + z-index:-1; position:relative; cursor:pointer; overflow:hidden; +} -.file_upload_start { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; z-index:1; position:absolute; left:0; top:0; width:100%; cursor:pointer;} -.file_upload_filename { background-color:#5bb75b; z-index:100; cursor:pointer; background-image: url('%webroot%/core/img/actions/upload-white.svg'); background-repeat: no-repeat; background-position: center; height: 2.29em; width: 2.5em; } - -#upload { position:absolute; right:13.5em; top:0em; } -#upload #uploadprogressbar { position:relative; display:inline-block; width:10em; height:1.5em; top:.4em; } - -.file_upload_form, .file_upload_wrapper, .file_upload_start, .file_upload_filename, #file_upload_submit { cursor:pointer; } +#uploadprogresswrapper { position:absolute; right:13.5em; top:0em; } +#uploadprogresswrapper #uploadprogressbar { position:relative; display:inline-block; width:10em; height:1.5em; top:.4em; } /* FILE TABLE */ -#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; } + +#emptyfolder { + position:absolute; + margin:10em 0 0 10em; + font-size:1.5em; font-weight:bold; + color:#888; text-shadow:#fff 0 1px 0; +} table { position:relative; top:37px; width:100%; } tbody tr { background-color:#fff; height:2.5em; } tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#f8f8f8; } @@ -60,13 +75,13 @@ table tr[data-type="dir"] td.filename a.name span.nametext {font-weight:bold; } table td.filename input.filename { width:100%; cursor:text; } table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 0; } table td.filename .nametext, .uploadtext, .modified { float:left; padding:.3em 0; } -// TODO fix usability bug (accidental file/folder selection) -table td.filename .nametext { width:40em; overflow:hidden; text-overflow:ellipsis; } +/* TODO fix usability bug (accidental file/folder selection) */ +table td.filename .nametext { overflow:hidden; text-overflow:ellipsis; } table td.filename .uploadtext { font-weight:normal; margin-left:.5em; } table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } table thead.fixed tr{ position:fixed; top:6.5em; z-index:49; -moz-box-shadow:0 -3px 7px #ddd; -webkit-box-shadow:0 -3px 7px #ddd; box-shadow:0 -3px 7px #ddd; } table thead.fixed { height:2em; } -#fileList tr td.filename>input[type=checkbox]:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 200ms; -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition:opacity 200ms; } +#fileList tr td.filename>input[type="checkbox"]:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 200ms; -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition:opacity 200ms; } #fileList tr td.filename>input[type="checkbox"]:hover:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter:alpha(opacity=80); opacity:.8; } #fileList tr td.filename>input[type="checkbox"]:checked:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } #fileList tr td.filename { -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; position:relative; } @@ -84,3 +99,4 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; } #scanning-message{ top:40%; left:40%; position:absolute; display:none; } +div.crumb a{ padding:0.9em 0 0.7em 0; } diff --git a/apps/files/download.php b/apps/files/download.php index ff6aefbbe0f..6475afb56e0 100644 --- a/apps/files/download.php +++ b/apps/files/download.php @@ -32,7 +32,7 @@ $filename = $_GET["file"]; if(!OC_Filesystem::file_exists($filename)) { header("HTTP/1.0 404 Not Found"); $tmpl = new OCP\Template( '', '404', 'guest' ); - $tmpl->assign('file',$filename); + $tmpl->assign('file', $filename); $tmpl->printPage(); exit; } @@ -44,5 +44,5 @@ header('Content-Disposition: attachment; filename="'.basename($filename).'"'); OCP\Response::disableCaching(); header('Content-Length: '.OC_Filesystem::filesize($filename)); -@ob_end_clean(); +OC_Util::obEnd(); OC_Filesystem::readfile( $filename ); diff --git a/apps/files/index.php b/apps/files/index.php index 8b8b0fd7610..c45fe60e4f7 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -31,12 +31,13 @@ OCP\Util::addscript( 'files', 'jquery.fileupload' ); OCP\Util::addscript( 'files', 'files' ); OCP\Util::addscript( 'files', 'filelist' ); OCP\Util::addscript( 'files', 'fileactions' ); +OCP\Util::addscript( 'files', 'keyboardshortcuts' ); if(!isset($_SESSION['timezone'])) { OCP\Util::addscript( 'files', 'timezone' ); } OCP\App::setActiveNavigationEntry( 'files_index' ); // Load the files -$dir = isset( $_GET['dir'] ) ? rawurldecode(stripslashes($_GET['dir'])) : ''; +$dir = isset( $_GET['dir'] ) ? stripslashes($_GET['dir']) : ''; // Redirect if directory does not exist if(!OC_Filesystem::is_dir($dir.'/')) { header('Location: '.$_SERVER['SCRIPT_NAME'].''); @@ -67,7 +68,7 @@ $breadcrumb = array(); $pathtohere = ''; foreach( explode( '/', $dir ) as $i ) { if( $i != '' ) { - $pathtohere .= '/'.str_replace('+','%20', urlencode($i)); + $pathtohere .= '/'.$i; $breadcrumb[] = array( 'dir' => $pathtohere, 'name' => $i ); } } @@ -86,18 +87,18 @@ $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); $maxUploadFilesize = min($upload_max_filesize, $post_max_size); $freeSpace=OC_Filesystem::free_space($dir); -$freeSpace=max($freeSpace,0); +$freeSpace=max($freeSpace, 0); $maxUploadFilesize = min($maxUploadFilesize, $freeSpace); -$permissions = OCP\Share::PERMISSION_READ; +$permissions = OCP\PERMISSION_READ; if (OC_Filesystem::isUpdatable($dir.'/')) { - $permissions |= OCP\Share::PERMISSION_UPDATE; + $permissions |= OCP\PERMISSION_UPDATE; } if (OC_Filesystem::isDeletable($dir.'/')) { - $permissions |= OCP\Share::PERMISSION_DELETE; + $permissions |= OCP\PERMISSION_DELETE; } if (OC_Filesystem::isSharable($dir.'/')) { - $permissions |= OCP\Share::PERMISSION_SHARE; + $permissions |= OCP\PERMISSION_SHARE; } $tmpl = new OCP\Template( 'files', 'index', 'user' ); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 82d990bf780..80b9c01f838 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -70,34 +70,43 @@ var FileActions = { } parent.children('a.name').append('<span class="fileactions" />'); var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); - for (name in actions) { + + var actionHandler = function (event) { + event.stopPropagation(); + event.preventDefault(); + + FileActions.currentFile = event.data.elem; + var file = FileActions.getCurrentFile(); + + event.data.actionFunc(file); + }; + + $.each(actions, function (name, action) { // NOTE: Temporary fix to prevent rename action in root of Shared directory if (name === 'Rename' && $('#dir').val() === '/Shared') { - continue; + return true; } - if ((name === 'Download' || actions[name] !== defaultAction) && name !== 'Delete') { + + if ((name === 'Download' || action !== defaultAction) && name !== 'Delete') { var img = FileActions.icons[name]; if (img.call) { img = img(file); } var html = '<a href="#" class="action" data-action="'+name+'">'; if (img) { - html += '<img class ="svg" src="' + img + '"/> '; + html += '<img class ="svg" src="' + img + '" /> '; } html += t('files', name) + '</a>'; + var element = $(html); element.data('action', name); - element.click(function (event) { - FileActions.currentFile = $(this).parent().parent().parent(); - event.stopPropagation(); - event.preventDefault(); - var action = actions[$(this).data('action')]; - var currentFile = FileActions.getCurrentFile(); - action(currentFile); - }); + //alert(element); + element.on('click',{a:null, elem:parent, actionFunc:actions[name]},actionHandler); parent.find('a.name>span.fileactions').append(element); } - } + + }); + if (actions['Delete']) { var img = FileActions.icons['Delete']; if (img.call) { @@ -113,14 +122,8 @@ var FileActions = { if (img) { element.append($('<img class ="svg" src="' + img + '"/>')); } - element.data('action', 'Delete'); - element.click(function (event) { - event.stopPropagation(); - event.preventDefault(); - var action = actions[$(this).data('action')]; - var currentFile = FileActions.getCurrentFile(); - action(currentFile); - }); + element.data('action', actions['Delete']); + element.on('click',{a:null, elem:parent, actionFunc:actions['Delete']},actionHandler); parent.parent().children().last().append(element); } }, diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index f08e412921e..96dd0323d29 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -32,14 +32,16 @@ var FileList={ html+='<td class="date"><span class="modified" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</span></td>'; html+='</tr>'; FileList.insertElement(name,'file',$(html).attr('data-file',name)); + var row = $('tr').filterAttr('data-file',name); if(loading){ - $('tr').filterAttr('data-file',name).data('loading',true); + row.data('loading',true); }else{ - $('tr').filterAttr('data-file',name).find('td.filename').draggable(dragOptions); + row.find('td.filename').draggable(dragOptions); } if (hidden) { - $('tr').filterAttr('data-file', name).hide(); + row.hide(); } + FileActions.display(row.find('td.filename')); }, addDir:function(name,size,lastModified,hidden){ var html, td, link_elem, sizeColor, lastModifiedTime, modifiedColor; @@ -66,11 +68,13 @@ var FileList={ td.append($('<span></span>').attr({ "class": "modified", "title": formatDate(lastModified), "style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')' }).text( relative_modified_date(lastModified.getTime() / 1000) )); html.append(td); FileList.insertElement(name,'dir',html); - $('tr').filterAttr('data-file',name).find('td.filename').draggable(dragOptions); - $('tr').filterAttr('data-file',name).find('td.filename').droppable(folderDropOptions); + var row = $('tr').filterAttr('data-file',name); + row.find('td.filename').draggable(dragOptions); + row.find('td.filename').droppable(folderDropOptions); if (hidden) { - $('tr').filterAttr('data-file', name).hide(); + row.hide(); } + FileActions.display(row.find('td.filename')); }, refresh:function(data) { var result = jQuery.parseJSON(data.responseText); @@ -85,7 +89,6 @@ var FileList={ $('tr').filterAttr('data-file',name).remove(); if($('tr[data-file]').length==0){ $('#emptyfolder').show(); - $('.file_upload_filename').addClass('highlight'); } }, insertElement:function(name,type,element){ @@ -114,7 +117,6 @@ var FileList={ $('#fileList').append(element); } $('#emptyfolder').hide(); - $('.file_upload_filename').removeClass('highlight'); }, loadingDone:function(name, id){ var mime, tr=$('tr').filterAttr('data-file',name); @@ -137,7 +139,7 @@ var FileList={ tr=$('tr').filterAttr('data-file',name); tr.data('renaming',true); td=tr.children('td.filename'); - input=$('<input class="filename"></input>').val(name); + input=$('<input class="filename"/>').val(name); form=$('<form></form>'); form.append(input); td.children('a.name').hide(); @@ -147,6 +149,9 @@ var FileList={ event.stopPropagation(); event.preventDefault(); var newname=input.val(); + if (Files.containsInvalidCharacters(newname)) { + return false; + } if (newname != name) { if (FileList.checkName(name, newname, false)) { newname = name; @@ -156,11 +161,11 @@ var FileList={ OC.dialogs.alert(result.data.message, 'Error moving file'); newname = name; } - tr.data('renaming',false); }); } } + tr.data('renaming',false); tr.attr('data-file', newname); var path = td.children('a.name').attr('href'); td.children('a.name').attr('href', path.replace(encodeURIComponent(name), encodeURIComponent(newname))); @@ -283,7 +288,7 @@ var FileList={ }, finishDelete:function(ready,sync){ if(!FileList.deleteCanceled && FileList.deleteFiles){ - var fileNames=FileList.deleteFiles.join(';'); + var fileNames=JSON.stringify(FileList.deleteFiles); $.ajax({ url: OC.filePath('files', 'ajax', 'delete.php'), async:!sync, @@ -375,4 +380,7 @@ $(document).ready(function(){ FileList.lastAction(); } }); + $(window).unload(function (){ + $(window).trigger('beforeunload'); + }); }); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 2d9ccba424a..33c775fc8ec 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -25,18 +25,27 @@ Files={ delete uploadingFiles[index]; }); procesSelection(); + }, + containsInvalidCharacters:function (name) { + var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*']; + for (var i = 0; i < invalid_characters.length; i++) { + if (name.indexOf(invalid_characters[i]) != -1) { + $('#notification').text(t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed.")); + $('#notification').fadeIn(); + return true; + } + } + $('#notification').fadeOut(); + return false; } }; $(document).ready(function() { + Files.bindKeyboardShortcuts(document, jQuery); $('#fileList tr').each(function(){ //little hack to set unescape filenames in attribute $(this).attr('data-file',decodeURIComponent($(this).attr('data-file'))); }); - if($('tr[data-file]').length==0){ - $('.file_upload_filename').addClass('highlight'); - } - $('#file_action_panel').attr('activeAction', false); //drag/drop of files @@ -57,8 +66,8 @@ $(document).ready(function() { } // Triggers invisible file input - $('.file_upload_button_wrapper').live('click', function() { - $(this).parent().children('.file_upload_start').trigger('click'); + $('#upload a').live('click', function() { + $(this).parent().children('#file_upload_start').trigger('click'); return false; }); @@ -159,12 +168,6 @@ $(document).ready(function() { procesSelection(); }); - $('#file_newfolder_name').click(function(){ - if($('#file_newfolder_name').val() == 'New Folder'){ - $('#file_newfolder_name').val(''); - } - }); - $('.download').click('click',function(event) { var files=getSelectedFiles('name').join(';'); var dir=$('#dir').val()||'/'; @@ -192,16 +195,16 @@ $(document).ready(function() { e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone }); - if ( document.getElementById("data-upload-form") ) { + if ( document.getElementById('data-upload-form') ) { $(function() { - $('.file_upload_start').fileupload({ + $('#file_upload_start').fileupload({ dropZone: $('#content'), // restrict dropZone to content div add: function(e, data) { var files = data.files; var totalSize=0; if(files){ for(var i=0;i<files.length;i++){ - if(files[i].size ==0 || files[i].type== '') + if(files[i].size ==0 && files[i].type== '') { OC.dialogs.alert(t('files', 'Unable to upload your file as it is a directory or has 0 bytes'), t('files', 'Upload Error')); return; @@ -209,7 +212,7 @@ $(document).ready(function() { totalSize+=files[i].size; if(FileList.deleteFiles && FileList.deleteFiles.indexOf(files[i].name)!=-1){//finish delete if we are uploading a deleted file FileList.finishDelete(function(){ - $('.file_upload_start').change(); + $('#file_upload_start').change(); }); return; } @@ -219,13 +222,21 @@ $(document).ready(function() { $( '#uploadsize-message' ).dialog({ modal: true, buttons: { - Close: function() { - $( this ).dialog( 'close' ); + Close: { + text:t('files', 'Close'), + click:function() { + $( this ).dialog( 'close' ); + } } } }); }else{ - var date=new Date(); + var dropTarget = $(e.originalEvent.target).closest('tr'); + if(dropTarget && dropTarget.attr('data-type') === 'dir') { // drag&drop upload to folder + var dirName = dropTarget.attr('data-file') + } + + var date=new Date(); if(files){ for(var i=0;i<files.length;i++){ if(files[i].size>0){ @@ -274,11 +285,14 @@ $(document).ready(function() { var fileName = files[i].name var dropTarget = $(e.originalEvent.target).closest('tr'); if(dropTarget && dropTarget.attr('data-type') === 'dir') { // drag&drop upload to folder - var dirName = dropTarget.attr('data-file'); - var jqXHR = $('.file_upload_start').fileupload('send', {files: files[i], + var dirName = dropTarget.attr('data-file') + var jqXHR = $('#file_upload_start').fileupload('send', {files: files[i], formData: function(form) { var formArray = form.serializeArray(); - formArray[1]['value'] = dirName; + // array index 0 contains the max files size + // array index 1 contains the request token + // array index 2 contains the directory + formArray[2]['value'] = dirName; return formArray; }}).success(function(result, textStatus, jqXHR) { var response; @@ -288,7 +302,13 @@ $(document).ready(function() { $('#notification').fadeIn(); } var file=response[0]; + // TODO: this doesn't work if the file name has been changed server side delete uploadingFiles[dirName][file.name]; + if ($.assocArraySize(uploadingFiles[dirName]) == 0) { + delete uploadingFiles[dirName]; + } + + var uploadtext = $('tr').filterAttr('data-type', 'dir').filterAttr('data-file', dirName).find('.uploadtext') var currentUploads = parseInt(uploadtext.attr('currentUploads')); currentUploads -= 1; uploadtext.attr('currentUploads', currentUploads); @@ -327,7 +347,7 @@ $(document).ready(function() { } uploadingFiles[dirName][fileName] = jqXHR; } else { - var jqXHR = $('.file_upload_start').fileupload('send', {files: files[i]}) + var jqXHR = $('#file_upload_start').fileupload('send', {files: files[i]}) .success(function(result, textStatus, jqXHR) { var response; response=jQuery.parseJSON(result); @@ -424,7 +444,7 @@ $(document).ready(function() { //add multiply file upload attribute to all browsers except konqueror (which crashes when it's used) if(navigator.userAgent.search(/konqueror/i)==-1){ - $('.file_upload_start').attr('multiple','multiple') + $('#file_upload_start').attr('multiple','multiple') } //if the breadcrumb is to long, start by replacing foldernames with '...' except for the current folder @@ -452,7 +472,6 @@ $(document).ready(function() { $(window).click(function(){ $('#new>ul').hide(); $('#new').removeClass('active'); - $('button.file_upload_filename').removeClass('active'); $('#new li').each(function(i,element){ if($(element).children('p').length==0){ $(element).children('input').remove(); @@ -466,7 +485,6 @@ $(document).ready(function() { $('#new>a').click(function(){ $('#new>ul').toggle(); $('#new').toggleClass('active'); - $('button.file_upload_filename').toggleClass('active'); }); $('#new li').click(function(){ if($(this).children('p').length==0){ @@ -488,8 +506,10 @@ $(document).ready(function() { $(this).append(input); input.focus(); input.change(function(){ - if(type != 'web' && $(this).val().indexOf('/')!=-1){ - $('#notification').text(t('files','Invalid name, \'/\' is not allowed.')); + if (type != 'web' && Files.containsInvalidCharacters($(this).val())) { + return; + } else if( type == 'folder' && $('#dir').val() == '/' && $(this).val() == 'Shared') { + $('#notification').text(t('files','Invalid folder name. Usage of "Shared" is reserved by Owncloud')); $('#notification').fadeIn(); return; } @@ -699,7 +719,7 @@ function updateBreadcrumb(breadcrumbHtml) { //options for file drag/dropp var dragOptions={ - distance: 20, revert: 'invalid', opacity: 0.7, + distance: 20, revert: 'invalid', opacity: 0.7, helper: 'clone', stop: function(event, ui) { $('#fileList tr td.filename').addClass('ui-draggable'); } @@ -722,7 +742,7 @@ var folderDropOptions={ } var crumbDropOptions={ drop: function( event, ui ) { - var file=ui.draggable.text().trim(); + var file=ui.draggable.parent().data('file'); var target=$(this).data('dir'); var dir=$('#dir').val(); while(dir.substr(0,1)=='/'){//remove extra leading /'s @@ -818,7 +838,7 @@ function getSelectedFiles(property){ name:$(element).attr('data-file'), mime:$(element).data('mime'), type:$(element).data('type'), - size:$(element).data('size'), + size:$(element).data('size') }; if(property){ files.push(file[property]); @@ -829,32 +849,11 @@ function getSelectedFiles(property){ return files; } -function relative_modified_date(timestamp) { - var timediff = Math.round((new Date()).getTime() / 1000) - timestamp; - var diffminutes = Math.round(timediff/60); - var diffhours = Math.round(diffminutes/60); - var diffdays = Math.round(diffhours/24); - var diffmonths = Math.round(diffdays/31); - if(timediff < 60) { return t('files','seconds ago'); } - else if(timediff < 120) { return t('files','1 minute ago'); } - else if(timediff < 3600) { return t('files','{minutes} minutes ago',{minutes: diffminutes}); } - //else if($timediff < 7200) { return '1 hour ago'; } - //else if($timediff < 86400) { return $diffhours.' hours ago'; } - else if(timediff < 86400) { return t('files','today'); } - else if(timediff < 172800) { return t('files','yesterday'); } - else if(timediff < 2678400) { return t('files','{days} days ago',{days: diffdays}); } - else if(timediff < 5184000) { return t('files','last month'); } - //else if($timediff < 31556926) { return $diffmonths.' months ago'; } - else if(timediff < 31556926) { return t('files','months ago'); } - else if(timediff < 63113852) { return t('files','last year'); } - else { return t('files','years ago'); } -} - function getMimeIcon(mime, ready){ if(getMimeIcon.cache[mime]){ ready(getMimeIcon.cache[mime]); }else{ - $.get( OC.filePath('files','ajax','mimeicon.php')+'?mime='+mime, function(path){ + $.get( OC.filePath('files','ajax','mimeicon.php'), {mime: mime}, function(path){ getMimeIcon.cache[mime]=path; ready(getMimeIcon.cache[mime]); }); diff --git a/apps/files/js/keyboardshortcuts.js b/apps/files/js/keyboardshortcuts.js new file mode 100644 index 00000000000..562755f55b7 --- /dev/null +++ b/apps/files/js/keyboardshortcuts.js @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2012 Erik Sargent <esthepiking at gmail dot com> + * This file is licensed under the Affero General Public License version 3 or + * later. + */ +/***************************** + * Keyboard shortcuts for Files app + * ctrl/cmd+n: new folder + * ctrl/cmd+shift+n: new file + * esc (while new file context menu is open): close menu + * up/down: select file/folder + * enter: open file/folder + * delete/backspace: delete file/folder + *****************************/ +var Files = Files || {}; +(function(Files) { + var keys = []; + var keyCodes = { + shift: 16, + n: 78, + cmdFirefox: 224, + cmdOpera: 17, + leftCmdWebKit: 91, + rightCmdWebKit: 93, + ctrl: 17, + esc: 27, + downArrow: 40, + upArrow: 38, + enter: 13, + del: 46 + }; + + function removeA(arr) { + var what, a = arguments, + L = a.length, + ax; + while (L > 1 && arr.length) { + what = a[--L]; + while ((ax = arr.indexOf(what)) !== -1) { + arr.splice(ax, 1); + } + } + return arr; + } + + function newFile() { + $("#new").addClass("active"); + $(".popup.popupTop").toggle(true); + $('#new li[data-type="file"]').trigger('click'); + removeA(keys, keyCodes.n); + } + + function newFolder() { + $("#new").addClass("active"); + $(".popup.popupTop").toggle(true); + $('#new li[data-type="folder"]').trigger('click'); + removeA(keys, keyCodes.n); + } + + function esc() { + $("#controls").trigger('click'); + } + + function down() { + var select = -1; + $("#fileList tr").each(function(index) { + if ($(this).hasClass("mouseOver")) { + select = index + 1; + $(this).removeClass("mouseOver"); + } + }); + if (select === -1) { + $("#fileList tr:first").addClass("mouseOver"); + } else { + $("#fileList tr").each(function(index) { + if (index === select) { + $(this).addClass("mouseOver"); + } + }); + } + } + + function up() { + var select = -1; + $("#fileList tr").each(function(index) { + if ($(this).hasClass("mouseOver")) { + select = index - 1; + $(this).removeClass("mouseOver"); + } + }); + if (select === -1) { + $("#fileList tr:last").addClass("mouseOver"); + } else { + $("#fileList tr").each(function(index) { + if (index === select) { + $(this).addClass("mouseOver"); + } + }); + } + } + + function enter() { + $("#fileList tr").each(function(index) { + if ($(this).hasClass("mouseOver")) { + $(this).removeClass("mouseOver"); + $(this).find("span.nametext").trigger('click'); + } + }); + } + + function del() { + $("#fileList tr").each(function(index) { + if ($(this).hasClass("mouseOver")) { + $(this).removeClass("mouseOver"); + $(this).find("a.action.delete").trigger('click'); + } + }); + } + + function rename() { + $("#fileList tr").each(function(index) { + if ($(this).hasClass("mouseOver")) { + $(this).removeClass("mouseOver"); + $(this).find("a[data-action='Rename']").trigger('click'); + } + }); + } + Files.bindKeyboardShortcuts = function(document, $) { + $(document).keydown(function(event) { //check for modifier keys + var preventDefault = false; + if ($.inArray(event.keyCode, keys) === -1) keys.push(event.keyCode); + if ( + $.inArray(keyCodes.n, keys) !== -1 && ($.inArray(keyCodes.cmdFirefox, keys) !== -1 || $.inArray(keyCodes.cmdOpera, keys) !== -1 || $.inArray(keyCodes.leftCmdWebKit, keys) !== -1 || $.inArray(keyCodes.rightCmdWebKit, keys) !== -1 || $.inArray(keyCodes.ctrl, keys) !== -1 || event.ctrlKey)) { + preventDefault = true; //new file/folder prevent browser from responding + } + if (preventDefault) { + event.preventDefault(); //Prevent web browser from responding + event.stopPropagation(); + return false; + } + }); + $(document).keyup(function(event) { + // do your event.keyCode checks in here + if ( + $.inArray(keyCodes.n, keys) !== -1 && ($.inArray(keyCodes.cmdFirefox, keys) !== -1 || $.inArray(keyCodes.cmdOpera, keys) !== -1 || $.inArray(keyCodes.leftCmdWebKit, keys) !== -1 || $.inArray(keyCodes.rightCmdWebKit, keys) !== -1 || $.inArray(keyCodes.ctrl, keys) !== -1 || event.ctrlKey)) { + if ($.inArray(keyCodes.shift, keys) !== -1) { //16=shift, New File + newFile(); + } else { //New Folder + newFolder(); + } + } else if ($("#new").hasClass("active") && $.inArray(keyCodes.esc, keys) !== -1) { //close new window + esc(); + } else if ($.inArray(keyCodes.downArrow, keys) !== -1) { //select file + down(); + } else if ($.inArray(keyCodes.upArrow, keys) !== -1) { //select file + up(); + } else if (!$("#new").hasClass("active") && $.inArray(keyCodes.enter, keys) !== -1) { //open file + enter(); + } else if (!$("#new").hasClass("active") && $.inArray(keyCodes.del, keys) !== -1) { //delete file + del(); + } + removeA(keys, event.keyCode); + }); + }; +})(Files);
\ No newline at end of file diff --git a/apps/files/l10n/ar.php b/apps/files/l10n/ar.php index a5530851d2e..5740d54f8b1 100644 --- a/apps/files/l10n/ar.php +++ b/apps/files/l10n/ar.php @@ -1,16 +1,18 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "تم ترفيع الملفات بنجاح.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "حجم الملف الذي تريد ترفيعه أعلى مما upload_max_filesize يسمح به في ملف php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "حجم الملف الذي تريد ترفيعه أعلى مما MAX_FILE_SIZE يسمح به في واجهة ال HTML.", "The uploaded file was only partially uploaded" => "تم ترفيع جزء من الملفات الذي تريد ترفيعها فقط", "No file was uploaded" => "لم يتم ترفيع أي من الملفات", "Missing a temporary folder" => "المجلد المؤقت غير موجود", "Files" => "الملفات", +"Unshare" => "إلغاء مشاركة", "Delete" => "محذوف", +"Close" => "إغلق", "Name" => "الاسم", "Size" => "حجم", "Modified" => "معدل", "Maximum upload size" => "الحد الأقصى لحجم الملفات التي يمكن رفعها", +"Save" => "حفظ", "New" => "جديد", "Text file" => "ملف", "Folder" => "مجلد", diff --git a/apps/files/l10n/bg_BG.php b/apps/files/l10n/bg_BG.php index 83873948162..b527b0e027f 100644 --- a/apps/files/l10n/bg_BG.php +++ b/apps/files/l10n/bg_BG.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Файлът е качен успешно", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Файлът който се опитвате да качите, надвишава зададените стойности в upload_max_filesize в PHP.INI", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Файлът който се опитвате да качите надвишава стойностите в MAX_FILE_SIZE в HTML формата.", "The uploaded file was only partially uploaded" => "Файлът е качен частично", "No file was uploaded" => "Фахлът не бе качен", @@ -10,19 +9,18 @@ "Delete" => "Изтриване", "Upload Error" => "Грешка при качване", "Upload cancelled." => "Качването е отменено.", -"Invalid name, '/' is not allowed." => "Неправилно име – \"/\" не е позволено.", "Name" => "Име", "Size" => "Размер", "Modified" => "Променено", "Maximum upload size" => "Макс. размер за качване", "0 is unlimited" => "0 означава без ограничение", +"Save" => "Запис", "New" => "Нов", "Text file" => "Текстов файл", "Folder" => "Папка", "Upload" => "Качване", "Cancel upload" => "Отказване на качването", "Nothing in here. Upload something!" => "Няма нищо, качете нещо!", -"Share" => "Споделяне", "Download" => "Изтегляне", "Upload too large" => "Файлът е прекалено голям", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файловете които се опитвате да качите са по-големи от позволеното за сървъра.", diff --git a/apps/files/l10n/ca.php b/apps/files/l10n/ca.php index a10ad5c16c5..0866d97bd74 100644 --- a/apps/files/l10n/ca.php +++ b/apps/files/l10n/ca.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "El fitxer s'ha pujat correctament", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "El fitxer de pujada excedeix la directiva upload_max_filesize establerta a php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "L’arxiu que voleu carregar supera el màxim definit en la directiva upload_max_filesize del php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "El fitxer de pujada excedeix la directiva MAX_FILE_SIZE especificada al formulari HTML", "The uploaded file was only partially uploaded" => "El fitxer només s'ha pujat parcialment", "No file was uploaded" => "El fitxer no s'ha pujat", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "s'ha substituït {old_name} per {new_name}", "unshared {files}" => "no compartits {files}", "deleted {files}" => "eliminats {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "El nóm no és vàlid, '\\', '/', '<', '>', ':', '\"', '|', '?' i '*' no estan permesos.", "generating ZIP-file, it may take some time." => "s'estan generant fitxers ZIP, pot trigar una estona.", "Unable to upload your file as it is a directory or has 0 bytes" => "No es pot pujar el fitxer perquè és una carpeta o té 0 bytes", "Upload Error" => "Error en la pujada", +"Close" => "Tanca", "Pending" => "Pendents", "1 file uploading" => "1 fitxer pujant", "{count} files uploading" => "{count} fitxers en pujada", "Upload cancelled." => "La pujada s'ha cancel·lat.", "File upload is in progress. Leaving the page now will cancel the upload." => "Hi ha una pujada en curs. Si abandoneu la pàgina la pujada es cancel·larà.", -"Invalid name, '/' is not allowed." => "El nom no és vàlid, no es permet '/'.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "El nom de la carpeta no és vàlid. L'ús de \"Compartit\" està reservat per a OwnCloud", "{count} files scanned" => "{count} fitxers escannejats", "error while scanning" => "error durant l'escaneig", "Name" => "Nom", @@ -37,16 +39,6 @@ "{count} folders" => "{count} carpetes", "1 file" => "1 fitxer", "{count} files" => "{count} fitxers", -"seconds ago" => "segons enrere", -"1 minute ago" => "fa 1 minut", -"{minutes} minutes ago" => "fa {minutes} minuts", -"today" => "avui", -"yesterday" => "ahir", -"{days} days ago" => "fa {days} dies", -"last month" => "el mes passat", -"months ago" => "mesos enrere", -"last year" => "l'any passat", -"years ago" => "anys enrere", "File handling" => "Gestió de fitxers", "Maximum upload size" => "Mida màxima de pujada", "max. possible: " => "màxim possible:", @@ -58,10 +50,10 @@ "New" => "Nou", "Text file" => "Fitxer de text", "Folder" => "Carpeta", +"From link" => "Des d'enllaç", "Upload" => "Puja", "Cancel upload" => "Cancel·la la pujada", "Nothing in here. Upload something!" => "Res per aquí. Pugeu alguna cosa!", -"Share" => "Comparteix", "Download" => "Baixa", "Upload too large" => "La pujada és massa gran", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Els fitxers que esteu intentant pujar excedeixen la mida màxima de pujada del servidor", diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php index c216f6bce44..12eb79a1a10 100644 --- a/apps/files/l10n/cs_CZ.php +++ b/apps/files/l10n/cs_CZ.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Soubor byl odeslán úspěšně", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Odeslaný soubor přesáhl svou velikostí parametr upload_max_filesize v php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Odesílaný soubor přesahuje velikost upload_max_filesize povolenou v php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Odeslaný soubor přesáhl svou velikostí parametr MAX_FILE_SIZE specifikovaný v formuláři HTML", "The uploaded file was only partially uploaded" => "Soubor byl odeslán pouze částečně", "No file was uploaded" => "Žádný soubor nebyl odeslán", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "nahrazeno {new_name} s {old_name}", "unshared {files}" => "sdílení zrušeno pro {files}", "deleted {files}" => "smazáno {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neplatný název, znaky '\\', '/', '<', '>', ':', '\"', '|', '?' a '*' nejsou povoleny.", "generating ZIP-file, it may take some time." => "generuji ZIP soubor, může to nějakou dobu trvat.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nelze odeslat Váš soubor, protože je to adresář nebo má velikost 0 bajtů", "Upload Error" => "Chyba odesílání", +"Close" => "Zavřít", "Pending" => "Čekající", "1 file uploading" => "odesílá se 1 soubor", "{count} files uploading" => "odesílám {count} souborů", "Upload cancelled." => "Odesílání zrušeno.", "File upload is in progress. Leaving the page now will cancel the upload." => "Probíhá odesílání souboru. Opuštění stránky vyústí ve zrušení nahrávání.", -"Invalid name, '/' is not allowed." => "Neplatný název, znak '/' není povolen", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Neplatný název složky. Použití názvu \"Shared\" je rezervováno pro interní úžití službou Owncloud.", "{count} files scanned" => "prozkoumáno {count} souborů", "error while scanning" => "chyba při prohledávání", "Name" => "Název", @@ -37,16 +39,6 @@ "{count} folders" => "{count} složky", "1 file" => "1 soubor", "{count} files" => "{count} soubory", -"seconds ago" => "před pár sekundami", -"1 minute ago" => "před 1 minutou", -"{minutes} minutes ago" => "před {minutes} minutami", -"today" => "dnes", -"yesterday" => "včera", -"{days} days ago" => "před {days} dny", -"last month" => "minulý měsíc", -"months ago" => "před pár měsíci", -"last year" => "minulý rok", -"years ago" => "před pár lety", "File handling" => "Zacházení se soubory", "Maximum upload size" => "Maximální velikost pro odesílání", "max. possible: " => "největší možná: ", @@ -58,10 +50,10 @@ "New" => "Nový", "Text file" => "Textový soubor", "Folder" => "Složka", +"From link" => "Z odkazu", "Upload" => "Odeslat", "Cancel upload" => "Zrušit odesílání", "Nothing in here. Upload something!" => "Žádný obsah. Nahrajte něco.", -"Share" => "Sdílet", "Download" => "Stáhnout", "Upload too large" => "Odeslaný soubor je příliš velký", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Soubory, které se snažíte odeslat, překračují limit velikosti odesílání na tomto serveru.", diff --git a/apps/files/l10n/da.php b/apps/files/l10n/da.php index a72ecf5f9ab..24652622c61 100644 --- a/apps/files/l10n/da.php +++ b/apps/files/l10n/da.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Der er ingen fejl, filen blev uploadet med success", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Den uploadede fil overskrider upload_max_filesize direktivet i php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Den uploadede fil overskrider MAX_FILE_SIZE -direktivet som er specificeret i HTML-formularen", "The uploaded file was only partially uploaded" => "Den uploadede file blev kun delvist uploadet", "No file was uploaded" => "Ingen fil blev uploadet", @@ -22,12 +21,12 @@ "generating ZIP-file, it may take some time." => "genererer ZIP-fil, det kan tage lidt tid.", "Unable to upload your file as it is a directory or has 0 bytes" => "Kunne ikke uploade din fil, da det enten er en mappe eller er tom", "Upload Error" => "Fejl ved upload", +"Close" => "Luk", "Pending" => "Afventer", "1 file uploading" => "1 fil uploades", "{count} files uploading" => "{count} filer uploades", "Upload cancelled." => "Upload afbrudt.", "File upload is in progress. Leaving the page now will cancel the upload." => "Fil upload kører. Hvis du forlader siden nu, vil uploadet blive annuleret.", -"Invalid name, '/' is not allowed." => "Ugyldigt navn, '/' er ikke tilladt.", "{count} files scanned" => "{count} filer skannet", "error while scanning" => "fejl under scanning", "Name" => "Navn", @@ -37,16 +36,6 @@ "{count} folders" => "{count} mapper", "1 file" => "1 fil", "{count} files" => "{count} filer", -"seconds ago" => "sekunder siden", -"1 minute ago" => "1 minut siden", -"{minutes} minutes ago" => "{minutes} minutter siden", -"today" => "i dag", -"yesterday" => "i går", -"{days} days ago" => "{days} dage siden", -"last month" => "sidste måned", -"months ago" => "måneder siden", -"last year" => "sidste år", -"years ago" => "år siden", "File handling" => "Filhåndtering", "Maximum upload size" => "Maksimal upload-størrelse", "max. possible: " => "max. mulige: ", @@ -61,7 +50,6 @@ "Upload" => "Upload", "Cancel upload" => "Fortryd upload", "Nothing in here. Upload something!" => "Her er tomt. Upload noget!", -"Share" => "Del", "Download" => "Download", "Upload too large" => "Upload for stor", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Filerne, du prøver at uploade, er større end den maksimale størrelse for fil-upload på denne server.", diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index f0c2f56a86e..8073ee28da5 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Datei fehlerfrei hochgeladen.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Die Größe der hochzuladenden Datei überschreitet die upload_max_filesize-Richtlinie in php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Die hochgeladene Datei überschreitet die upload_max_filesize Vorgabe in php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Die Größe der hochzuladenden Datei überschreitet die MAX_FILE_SIZE-Richtlinie, die im HTML-Formular angegeben wurde", "The uploaded file was only partially uploaded" => "Die Datei wurde nur teilweise hochgeladen.", "No file was uploaded" => "Es wurde keine Datei hochgeladen.", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "{old_name} ersetzt durch {new_name}", "unshared {files}" => "Freigabe von {files} aufgehoben", "deleted {files}" => "{files} gelöscht", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.", "generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Deine Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist.", "Upload Error" => "Fehler beim Upload", +"Close" => "Schließen", "Pending" => "Ausstehend", "1 file uploading" => "Eine Datei wird hoch geladen", "{count} files uploading" => "{count} Dateien werden hochgeladen", "Upload cancelled." => "Upload abgebrochen.", "File upload is in progress. Leaving the page now will cancel the upload." => "Dateiupload läuft. Wenn Du die Seite jetzt verlässt, wird der Upload abgebrochen.", -"Invalid name, '/' is not allowed." => "Ungültiger Name: \"/\" ist nicht erlaubt.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Ungültiger Ordnername. Die Verwendung von \"Shared\" ist ownCloud vorbehalten.", "{count} files scanned" => "{count} Dateien wurden gescannt", "error while scanning" => "Fehler beim Scannen", "Name" => "Name", @@ -37,16 +39,6 @@ "{count} folders" => "{count} Ordner", "1 file" => "1 Datei", "{count} files" => "{count} Dateien", -"seconds ago" => "Gerade eben", -"1 minute ago" => "vor einer Minute", -"{minutes} minutes ago" => "Vor {minutes} Minuten", -"today" => "Heute", -"yesterday" => "Gestern", -"{days} days ago" => "Vor {days} Tag(en)", -"last month" => "Letzten Monat", -"months ago" => "Monate her", -"last year" => "Letztes Jahr", -"years ago" => "Jahre her", "File handling" => "Dateibehandlung", "Maximum upload size" => "Maximale Upload-Größe", "max. possible: " => "maximal möglich:", @@ -58,10 +50,10 @@ "New" => "Neu", "Text file" => "Textdatei", "Folder" => "Ordner", +"From link" => "Von einem Link", "Upload" => "Hochladen", "Cancel upload" => "Upload abbrechen", "Nothing in here. Upload something!" => "Alles leer. Lade etwas hoch!", -"Share" => "Freigabe", "Download" => "Herunterladen", "Upload too large" => "Upload zu groß", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Die Datei überschreitet die Maximalgröße für Uploads auf diesem Server.", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index dd2ebbbdd1e..6a9730e94b0 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Es sind keine Fehler aufgetreten. Die Datei wurde erfolgreich hochgeladen.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Die Größe der hochzuladenden Datei überschreitet die upload_max_filesize-Richtlinie in php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Die hochgeladene Datei überschreitet die upload_max_filesize Vorgabe in php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Die Größe der hochzuladenden Datei überschreitet die MAX_FILE_SIZE-Richtlinie, die im HTML-Formular angegeben wurde", "The uploaded file was only partially uploaded" => "Die Datei wurde nur teilweise hochgeladen.", "No file was uploaded" => "Es wurde keine Datei hochgeladen.", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "{old_name} wurde ersetzt durch {new_name}", "unshared {files}" => "Freigabe für {files} beendet", "deleted {files}" => "{files} gelöscht", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.", "generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Ihre Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist.", "Upload Error" => "Fehler beim Upload", +"Close" => "Schließen", "Pending" => "Ausstehend", "1 file uploading" => "1 Datei wird hochgeladen", "{count} files uploading" => "{count} Dateien wurden hochgeladen", "Upload cancelled." => "Upload abgebrochen.", "File upload is in progress. Leaving the page now will cancel the upload." => "Der Dateiupload läuft. Wenn Sie die Seite jetzt verlassen, wird der Upload abgebrochen.", -"Invalid name, '/' is not allowed." => "Ungültiger Name: \"/\" ist nicht erlaubt.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Ungültiger Ordnername. Die Verwendung von \"Shared\" ist ownCloud vorbehalten.", "{count} files scanned" => "{count} Dateien wurden gescannt", "error while scanning" => "Fehler beim Scannen", "Name" => "Name", @@ -37,16 +39,6 @@ "{count} folders" => "{count} Ordner", "1 file" => "1 Datei", "{count} files" => "{count} Dateien", -"seconds ago" => "Gerade eben", -"1 minute ago" => "Vor 1 Minute", -"{minutes} minutes ago" => "Vor {minutes} Minuten", -"today" => "Heute", -"yesterday" => "Gestern", -"{days} days ago" => "Vor {days} Tage(en)", -"last month" => "Letzten Monat", -"months ago" => "Vor Monaten", -"last year" => "Letztes Jahr", -"years ago" => "Vor Jahren", "File handling" => "Dateibehandlung", "Maximum upload size" => "Maximale Upload-Größe", "max. possible: " => "maximal möglich:", @@ -58,10 +50,10 @@ "New" => "Neu", "Text file" => "Textdatei", "Folder" => "Ordner", +"From link" => "Von einem Link", "Upload" => "Hochladen", "Cancel upload" => "Upload abbrechen", "Nothing in here. Upload something!" => "Alles leer. Bitte laden Sie etwas hoch!", -"Share" => "Teilen", "Download" => "Herunterladen", "Upload too large" => "Der Upload ist zu groß", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Die Datei überschreitet die Maximalgröße für Uploads auf diesem Server.", diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php index 93c050b93db..ddbea421241 100644 --- a/apps/files/l10n/el.php +++ b/apps/files/l10n/el.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Δεν υπάρχει σφάλμα, το αρχείο εστάλει επιτυχώς", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Το αρχείο που εστάλει υπερβαίνει την οδηγία μέγιστου επιτρεπτού μεγέθους \"upload_max_filesize\" του php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Το απεσταλμένο αρχείο ξεπερνά την οδηγία upload_max_filesize στο php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Το αρχείο υπερβαίνει την οδηγία μέγιστου επιτρεπτού μεγέθους \"MAX_FILE_SIZE\" που έχει οριστεί στην HTML φόρμα", "The uploaded file was only partially uploaded" => "Το αρχείο εστάλει μόνο εν μέρει", "No file was uploaded" => "Κανένα αρχείο δεν στάλθηκε", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "αντικαταστάθηκε το {new_name} με {old_name}", "unshared {files}" => "μη διαμοιρασμένα {files}", "deleted {files}" => "διαγραμμένα {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Μη έγκυρο όνομα, '\\', '/', '<', '>', ':', '\"', '|', '?' και '*' δεν επιτρέπονται.", "generating ZIP-file, it may take some time." => "παραγωγή αρχείου ZIP, ίσως διαρκέσει αρκετά.", "Unable to upload your file as it is a directory or has 0 bytes" => "Αδυναμία στην αποστολή του αρχείου σας αφού είναι φάκελος ή έχει 0 bytes", "Upload Error" => "Σφάλμα Αποστολής", +"Close" => "Κλείσιμο", "Pending" => "Εκκρεμεί", "1 file uploading" => "1 αρχείο ανεβαίνει", "{count} files uploading" => "{count} αρχεία ανεβαίνουν", "Upload cancelled." => "Η αποστολή ακυρώθηκε.", "File upload is in progress. Leaving the page now will cancel the upload." => "Η αποστολή του αρχείου βρίσκεται σε εξέλιξη. Έξοδος από την σελίδα τώρα θα ακυρώσει την αποστολή.", -"Invalid name, '/' is not allowed." => "Μη έγκυρο όνομα, το '/' δεν επιτρέπεται.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Μη έγκυρο όνομα φακέλου. Η χρήση του \"Shared\" είναι δεσμευμένη από το Owncloud", "{count} files scanned" => "{count} αρχεία ανιχνεύτηκαν", "error while scanning" => "σφάλμα κατά την ανίχνευση", "Name" => "Όνομα", @@ -37,16 +39,6 @@ "{count} folders" => "{count} φάκελοι", "1 file" => "1 αρχείο", "{count} files" => "{count} αρχεία", -"seconds ago" => "δευτερόλεπτα πριν", -"1 minute ago" => "1 λεπτό πριν", -"{minutes} minutes ago" => "{minutes} λεπτά πριν", -"today" => "σήμερα", -"yesterday" => "χτες", -"{days} days ago" => "{days} ημέρες πριν", -"last month" => "τελευταίο μήνα", -"months ago" => "μήνες πριν", -"last year" => "τελευταίο χρόνο", -"years ago" => "χρόνια πριν", "File handling" => "Διαχείριση αρχείων", "Maximum upload size" => "Μέγιστο μέγεθος αποστολής", "max. possible: " => "μέγιστο δυνατό:", @@ -58,10 +50,10 @@ "New" => "Νέο", "Text file" => "Αρχείο κειμένου", "Folder" => "Φάκελος", +"From link" => "Από σύνδεσμο", "Upload" => "Αποστολή", "Cancel upload" => "Ακύρωση αποστολής", "Nothing in here. Upload something!" => "Δεν υπάρχει τίποτα εδώ. Ανέβασε κάτι!", -"Share" => "Διαμοιρασμός", "Download" => "Λήψη", "Upload too large" => "Πολύ μεγάλο αρχείο προς αποστολή", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Τα αρχεία που προσπαθείτε να ανεβάσετε υπερβαίνουν το μέγιστο μέγεθος αποστολής αρχείων σε αυτόν το διακομιστή.", diff --git a/apps/files/l10n/eo.php b/apps/files/l10n/eo.php index bba06c3f9ce..bdde6d0fece 100644 --- a/apps/files/l10n/eo.php +++ b/apps/files/l10n/eo.php @@ -1,7 +1,7 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Ne estas eraro, la dosiero alŝutiĝis sukcese", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "La dosiero alŝutita superas la regulon upload_max_filesize el php.ini", -"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "La dosiero alŝutita superas laregulon MAX_FILE_SIZE, kiu estas difinita en la HTML-formularo", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "La dosiero alŝutita superas la regulon upload_max_filesize el php.ini: ", +"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "La dosiero alŝutita superas la regulon MAX_FILE_SIZE, kiu estas difinita en la HTML-formularo", "The uploaded file was only partially uploaded" => "La alŝutita dosiero nur parte alŝutiĝis", "No file was uploaded" => "Neniu dosiero estas alŝutita", "Missing a temporary folder" => "Mankas tempa dosierujo", @@ -10,29 +10,35 @@ "Unshare" => "Malkunhavigi", "Delete" => "Forigi", "Rename" => "Alinomigi", +"{new_name} already exists" => "{new_name} jam ekzistas", "replace" => "anstataŭigi", "suggest name" => "sugesti nomon", "cancel" => "nuligi", +"replaced {new_name}" => "anstataŭiĝis {new_name}", "undo" => "malfari", +"replaced {new_name} with {old_name}" => "anstataŭiĝis {new_name} per {old_name}", +"unshared {files}" => "malkunhaviĝis {files}", +"deleted {files}" => "foriĝis {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nevalida nomo: “\\”, “/”, “<”, “>”, “:”, “\"”, “|”, “?” kaj “*” ne permesatas.", "generating ZIP-file, it may take some time." => "generanta ZIP-dosiero, ĝi povas daŭri iom da tempo", "Unable to upload your file as it is a directory or has 0 bytes" => "Ne eblis alŝuti vian dosieron ĉar ĝi estas dosierujo aŭ havas 0 duumokojn", "Upload Error" => "Alŝuta eraro", +"Close" => "Fermi", "Pending" => "Traktotaj", "1 file uploading" => "1 dosiero estas alŝutata", +"{count} files uploading" => "{count} dosieroj alŝutatas", "Upload cancelled." => "La alŝuto nuliĝis.", "File upload is in progress. Leaving the page now will cancel the upload." => "Dosieralŝuto plenumiĝas. Lasi la paĝon nun nuligus la alŝuton.", -"Invalid name, '/' is not allowed." => "Nevalida nomo, “/” ne estas permesata.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nevalida nomo de dosierujo. Uzo de “Shared” rezervitas de Owncloud", +"{count} files scanned" => "{count} dosieroj skaniĝis", "error while scanning" => "eraro dum skano", "Name" => "Nomo", "Size" => "Grando", "Modified" => "Modifita", -"seconds ago" => "sekundoj antaŭe", -"today" => "hodiaŭ", -"yesterday" => "hieraŭ", -"last month" => "lastamonate", -"months ago" => "monatoj antaŭe", -"last year" => "lastajare", -"years ago" => "jaroj antaŭe", +"1 folder" => "1 dosierujo", +"{count} folders" => "{count} dosierujoj", +"1 file" => "1 dosiero", +"{count} files" => "{count} dosierujoj", "File handling" => "Dosieradministro", "Maximum upload size" => "Maksimuma alŝutogrando", "max. possible: " => "maks. ebla: ", @@ -44,10 +50,10 @@ "New" => "Nova", "Text file" => "Tekstodosiero", "Folder" => "Dosierujo", +"From link" => "El ligilo", "Upload" => "Alŝuti", "Cancel upload" => "Nuligi alŝuton", "Nothing in here. Upload something!" => "Nenio estas ĉi tie. Alŝutu ion!", -"Share" => "Kunhavigi", "Download" => "Elŝuti", "Upload too large" => "Elŝuto tro larĝa", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "La dosieroj, kiujn vi provas alŝuti, transpasas la maksimuman grandon por dosieralŝutoj en ĉi tiu servilo.", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 8a337681466..40b9ea9f23f 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "No se ha producido ningún error, el archivo se ha subido con éxito", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "El archivo que intentas subir sobrepasa el tamaño definido por la variable upload_max_filesize en php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "El archivo que intentas subir sobrepasa el tamaño definido por la variable upload_max_filesize en php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "El archivo que intentas subir sobrepasa el tamaño definido por la variable MAX_FILE_SIZE especificada en el formulario HTML", "The uploaded file was only partially uploaded" => "El archivo que intentas subir solo se subió parcialmente", "No file was uploaded" => "No se ha subido ningún archivo", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "reemplazado {new_name} con {old_name}", "unshared {files}" => "{files} descompartidos", "deleted {files}" => "{files} eliminados", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre Invalido, \"\\\", \"/\", \"<\", \">\", \":\", \"\", \"|\" \"?\" y \"*\" no están permitidos ", "generating ZIP-file, it may take some time." => "generando un fichero ZIP, puede llevar un tiempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "No ha sido posible subir tu archivo porque es un directorio o tiene 0 bytes", "Upload Error" => "Error al subir el archivo", +"Close" => "cerrrar", "Pending" => "Pendiente", "1 file uploading" => "subiendo 1 archivo", "{count} files uploading" => "Subiendo {count} archivos", "Upload cancelled." => "Subida cancelada.", "File upload is in progress. Leaving the page now will cancel the upload." => "La subida del archivo está en proceso. Salir de la página ahora cancelará la subida.", -"Invalid name, '/' is not allowed." => "Nombre no válido, '/' no está permitido.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nombre de la carpeta invalido. El uso de \"Shared\" esta reservado para Owncloud", "{count} files scanned" => "{count} archivos escaneados", "error while scanning" => "error escaneando", "Name" => "Nombre", @@ -37,16 +39,6 @@ "{count} folders" => "{count} carpetas", "1 file" => "1 archivo", "{count} files" => "{count} archivos", -"seconds ago" => "hace segundos", -"1 minute ago" => "hace 1 minuto", -"{minutes} minutes ago" => "hace {minutes} minutos", -"today" => "hoy", -"yesterday" => "ayer", -"{days} days ago" => "hace {days} días", -"last month" => "mes pasado", -"months ago" => "hace meses", -"last year" => "año pasado", -"years ago" => "hace años", "File handling" => "Tratamiento de archivos", "Maximum upload size" => "Tamaño máximo de subida", "max. possible: " => "máx. posible:", @@ -58,10 +50,10 @@ "New" => "Nuevo", "Text file" => "Archivo de texto", "Folder" => "Carpeta", +"From link" => "Desde el enlace", "Upload" => "Subir", "Cancel upload" => "Cancelar subida", "Nothing in here. Upload something!" => "Aquí no hay nada. ¡Sube algo!", -"Share" => "Compartir", "Download" => "Descargar", "Upload too large" => "El archivo es demasiado grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Los archivos que estás intentando subir sobrepasan el tamaño máximo permitido por este servidor.", diff --git a/apps/files/l10n/es_AR.php b/apps/files/l10n/es_AR.php index baa9f257808..e514d8de59a 100644 --- a/apps/files/l10n/es_AR.php +++ b/apps/files/l10n/es_AR.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "No se han producido errores, el archivo se ha subido con éxito", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "El archivo que intentás subir sobrepasa el tamaño definido por la variable upload_max_filesize en php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "El archivo que intentás subir excede el tamaño definido por upload_max_filesize en el php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "El archivo que intentás subir sobrepasa el tamaño definido por la variable MAX_FILE_SIZE especificada en el formulario HTML", "The uploaded file was only partially uploaded" => "El archivo que intentás subir solo se subió parcialmente", "No file was uploaded" => "El archivo no fue subido", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "reemplazado {new_name} con {old_name}", "unshared {files}" => "{files} se dejaron de compartir", "deleted {files}" => "{files} borrados", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre invalido, '\\', '/', '<', '>', ':', '\"', '|', '?' y '*' no están permitidos.", "generating ZIP-file, it may take some time." => "generando un archivo ZIP, puede llevar un tiempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "No fue posible subir el archivo porque es un directorio o porque su tamaño es 0 bytes", "Upload Error" => "Error al subir el archivo", +"Close" => "Cerrar", "Pending" => "Pendiente", "1 file uploading" => "Subiendo 1 archivo", "{count} files uploading" => "Subiendo {count} archivos", "Upload cancelled." => "La subida fue cancelada", "File upload is in progress. Leaving the page now will cancel the upload." => "La subida del archivo está en proceso. Si salís de la página ahora, la subida se cancelará.", -"Invalid name, '/' is not allowed." => "Nombre no válido, no se permite '/' en él.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nombre del directorio inválido. Usar \"Shared\" está reservado por ownCloud.", "{count} files scanned" => "{count} archivos escaneados", "error while scanning" => "error mientras se escaneaba", "Name" => "Nombre", @@ -37,16 +39,6 @@ "{count} folders" => "{count} directorios", "1 file" => "1 archivo", "{count} files" => "{count} archivos", -"seconds ago" => "segundos atrás", -"1 minute ago" => "hace 1 minuto", -"{minutes} minutes ago" => "hace {minutes} minutos", -"today" => "hoy", -"yesterday" => "ayer", -"{days} days ago" => "hace {days} días", -"last month" => "el mes pasado", -"months ago" => "meses atrás", -"last year" => "el año pasado", -"years ago" => "años atrás", "File handling" => "Tratamiento de archivos", "Maximum upload size" => "Tamaño máximo de subida", "max. possible: " => "máx. posible:", @@ -58,10 +50,10 @@ "New" => "Nuevo", "Text file" => "Archivo de texto", "Folder" => "Carpeta", +"From link" => "Desde enlace", "Upload" => "Subir", "Cancel upload" => "Cancelar subida", "Nothing in here. Upload something!" => "No hay nada. ¡Subí contenido!", -"Share" => "Compartir", "Download" => "Descargar", "Upload too large" => "El archivo es demasiado grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Los archivos que intentás subir sobrepasan el tamaño máximo ", diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php index 20789dde99c..0fddbfdca46 100644 --- a/apps/files/l10n/et_EE.php +++ b/apps/files/l10n/et_EE.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Ühtegi viga pole, fail on üles laetud", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Üles laetud faili suurus ületab php.ini määratud upload_max_filesize suuruse", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Üles laetud faili suurus ületab HTML vormis määratud upload_max_filesize suuruse", "The uploaded file was only partially uploaded" => "Fail laeti üles ainult osaliselt", "No file was uploaded" => "Ühtegi faili ei laetud üles", @@ -19,15 +18,17 @@ "replaced {new_name} with {old_name}" => "asendas nime {old_name} nimega {new_name}", "unshared {files}" => "jagamata {files}", "deleted {files}" => "kustutatud {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Vigane nimi, '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' pole lubatud.", "generating ZIP-file, it may take some time." => "ZIP-faili loomine, see võib veidi aega võtta.", "Unable to upload your file as it is a directory or has 0 bytes" => "Sinu faili üleslaadimine ebaõnnestus, kuna see on kaust või selle suurus on 0 baiti", "Upload Error" => "Üleslaadimise viga", +"Close" => "Sulge", "Pending" => "Ootel", "1 file uploading" => "1 faili üleslaadimisel", "{count} files uploading" => "{count} faili üleslaadimist", "Upload cancelled." => "Üleslaadimine tühistati.", "File upload is in progress. Leaving the page now will cancel the upload." => "Faili üleslaadimine on töös. Lehelt lahkumine katkestab selle üleslaadimise.", -"Invalid name, '/' is not allowed." => "Vigane nimi, '/' pole lubatud.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Vigane kausta nimi. Nime \"Jagatud\" kasutamine on Owncloudi poolt broneeritud ", "{count} files scanned" => "{count} faili skännitud", "error while scanning" => "viga skännimisel", "Name" => "Nimi", @@ -37,16 +38,6 @@ "{count} folders" => "{count} kausta", "1 file" => "1 fail", "{count} files" => "{count} faili", -"seconds ago" => "sekundit tagasi", -"1 minute ago" => "1 minut tagasi", -"{minutes} minutes ago" => "{minutes} minutit tagasi", -"today" => "täna", -"yesterday" => "eile", -"{days} days ago" => "{days} päeva tagasi", -"last month" => "viimasel kuul", -"months ago" => "kuu tagasi", -"last year" => "viimasel aastal", -"years ago" => "aastat tagasi", "File handling" => "Failide käsitlemine", "Maximum upload size" => "Maksimaalne üleslaadimise suurus", "max. possible: " => "maks. võimalik: ", @@ -58,10 +49,10 @@ "New" => "Uus", "Text file" => "Tekstifail", "Folder" => "Kaust", +"From link" => "Allikast", "Upload" => "Lae üles", "Cancel upload" => "Tühista üleslaadimine", "Nothing in here. Upload something!" => "Siin pole midagi. Lae midagi üles!", -"Share" => "Jaga", "Download" => "Lae alla", "Upload too large" => "Üleslaadimine on liiga suur", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Failid, mida sa proovid üles laadida, ületab serveri poolt üleslaetavatele failidele määratud maksimaalse suuruse.", diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php index 2a923a28137..0b223b93d8c 100644 --- a/apps/files/l10n/eu.php +++ b/apps/files/l10n/eu.php @@ -1,38 +1,44 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Ez da arazorik izan, fitxategia ongi igo da", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Igotako fitxategiaren tamaina php.ini-ko upload_max_filesize direktiban adierazitakoa baino handiagoa da", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Igotako fitxategiak php.ini fitxategian ezarritako upload_max_filesize muga gainditu du:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Igotako fitxategiaren tamaina HTML inprimakiko MAX_FILESIZE direktiban adierazitakoa baino handiagoa da", "The uploaded file was only partially uploaded" => "Igotako fitxategiaren zati bat baino gehiago ez da igo", "No file was uploaded" => "Ez da fitxategirik igo", "Missing a temporary folder" => "Aldi baterako karpeta falta da", "Failed to write to disk" => "Errore bat izan da diskoan idazterakoan", "Files" => "Fitxategiak", -"Unshare" => "Ez partekatu", +"Unshare" => "Ez elkarbanatu", "Delete" => "Ezabatu", "Rename" => "Berrizendatu", +"{new_name} already exists" => "{new_name} dagoeneko existitzen da", "replace" => "ordeztu", "suggest name" => "aholkatu izena", "cancel" => "ezeztatu", +"replaced {new_name}" => "ordezkatua {new_name}", "undo" => "desegin", +"replaced {new_name} with {old_name}" => " {new_name}-k {old_name} ordezkatu du", +"unshared {files}" => "elkarbanaketa utzita {files}", +"deleted {files}" => "ezabatuta {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "IZen aliogabea, '\\', '/', '<', '>', ':', '\"', '|', '?' eta '*' ez daude baimenduta.", "generating ZIP-file, it may take some time." => "ZIP-fitxategia sortzen ari da, denbora har dezake", "Unable to upload your file as it is a directory or has 0 bytes" => "Ezin da zure fitxategia igo, karpeta bat da edo 0 byt ditu", "Upload Error" => "Igotzean errore bat suertatu da", +"Close" => "Itxi", "Pending" => "Zain", "1 file uploading" => "fitxategi 1 igotzen", +"{count} files uploading" => "{count} fitxategi igotzen", "Upload cancelled." => "Igoera ezeztatuta", "File upload is in progress. Leaving the page now will cancel the upload." => "Fitxategien igoera martxan da. Orria orain uzteak igoera ezeztatutko du.", -"Invalid name, '/' is not allowed." => "Baliogabeko izena, '/' ezin da erabili. ", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Karpeta izen baliogabea. \"Shared\" karpetaren erabilera Owncloudek erreserbatuta dauka", +"{count} files scanned" => "{count} fitxategi eskaneatuta", "error while scanning" => "errore bat egon da eskaneatzen zen bitartean", "Name" => "Izena", "Size" => "Tamaina", "Modified" => "Aldatuta", -"seconds ago" => "segundu", -"today" => "gaur", -"yesterday" => "atzo", -"last month" => "joan den hilabetean", -"months ago" => "hilabete", -"last year" => "joan den urtean", -"years ago" => "urte", +"1 folder" => "karpeta bat", +"{count} folders" => "{count} karpeta", +"1 file" => "fitxategi bat", +"{count} files" => "{count} fitxategi", "File handling" => "Fitxategien kudeaketa", "Maximum upload size" => "Igo daitekeen gehienezko tamaina", "max. possible: " => "max, posiblea:", @@ -44,10 +50,10 @@ "New" => "Berria", "Text file" => "Testu fitxategia", "Folder" => "Karpeta", +"From link" => "Estekatik", "Upload" => "Igo", "Cancel upload" => "Ezeztatu igoera", "Nothing in here. Upload something!" => "Ez dago ezer. Igo zerbait!", -"Share" => "Elkarbanatu", "Download" => "Deskargatu", "Upload too large" => "Igotakoa handiegia da", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Igotzen saiatzen ari zaren fitxategiak zerbitzari honek igotzeko onartzen duena baino handiagoak dira.", diff --git a/apps/files/l10n/fa.php b/apps/files/l10n/fa.php index 2eb3b47ac0d..8284593e886 100644 --- a/apps/files/l10n/fa.php +++ b/apps/files/l10n/fa.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "هیچ خطایی وجود ندارد فایل با موفقیت بار گذاری شد", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "حداکثر حجم تعیین شده برای بارگذاری در php.ini قابل ویرایش است", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "حداکثر حجم مجاز برای بارگذاری از طریق HTML \nMAX_FILE_SIZE", "The uploaded file was only partially uploaded" => "مقدار کمی از فایل بارگذاری شده", "No file was uploaded" => "هیچ فایلی بارگذاری نشده", @@ -8,15 +7,16 @@ "Failed to write to disk" => "نوشتن بر روی دیسک سخت ناموفق بود", "Files" => "فایل ها", "Delete" => "پاک کردن", +"Rename" => "تغییرنام", "replace" => "جایگزین", "cancel" => "لغو", "undo" => "بازگشت", "generating ZIP-file, it may take some time." => "در حال ساخت فایل فشرده ممکن است زمان زیادی به طول بیانجامد", "Unable to upload your file as it is a directory or has 0 bytes" => "ناتوان در بارگذاری یا فایل یک پوشه است یا 0بایت دارد", "Upload Error" => "خطا در بار گذاری", +"Close" => "بستن", "Pending" => "در انتظار", "Upload cancelled." => "بار گذاری لغو شد", -"Invalid name, '/' is not allowed." => "نام نامناسب '/' غیرفعال است", "Name" => "نام", "Size" => "اندازه", "Modified" => "تغییر یافته", @@ -27,13 +27,13 @@ "Enable ZIP-download" => "فعال سازی بارگیری پرونده های فشرده", "0 is unlimited" => "0 نامحدود است", "Maximum input size for ZIP files" => "حداکثرمقدار برای بار گزاری پرونده های فشرده", +"Save" => "ذخیره", "New" => "جدید", "Text file" => "فایل متنی", "Folder" => "پوشه", "Upload" => "بارگذاری", "Cancel upload" => "متوقف کردن بار گذاری", "Nothing in here. Upload something!" => "اینجا هیچ چیز نیست.", -"Share" => "به اشتراک گذاری", "Download" => "بارگیری", "Upload too large" => "حجم بارگذاری بسیار زیاد است", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "فایلها بیش از حد تعیین شده در این سرور هستند\nمترجم:با تغییر فایل php,ini میتوان این محدودیت را برطرف کرد", diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php index b17b542405d..772dabbb392 100644 --- a/apps/files/l10n/fi_FI.php +++ b/apps/files/l10n/fi_FI.php @@ -1,12 +1,12 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Ei virheitä, tiedosto lähetettiin onnistuneesti", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Lähetetty tiedosto ylittää upload_max_filesize-arvon rajan php.ini-tiedostossa", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Lähetetty tiedosto ylittää HTML-lomakkeessa määritetyn MAX_FILE_SIZE-arvon ylärajan", "The uploaded file was only partially uploaded" => "Tiedoston lähetys onnistui vain osittain", "No file was uploaded" => "Yhtäkään tiedostoa ei lähetetty", "Missing a temporary folder" => "Väliaikaiskansiota ei ole olemassa", "Failed to write to disk" => "Levylle kirjoitus epäonnistui", "Files" => "Tiedostot", +"Unshare" => "Peru jakaminen", "Delete" => "Poista", "Rename" => "Nimeä uudelleen", "{new_name} already exists" => "{new_name} on jo olemassa", @@ -14,13 +14,14 @@ "suggest name" => "ehdota nimeä", "cancel" => "peru", "undo" => "kumoa", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Virheellinen nimi, merkit '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' eivät ole sallittuja.", "generating ZIP-file, it may take some time." => "luodaan ZIP-tiedostoa, tämä saattaa kestää hetken.", "Unable to upload your file as it is a directory or has 0 bytes" => "Tiedoston lähetys epäonnistui, koska sen koko on 0 tavua tai kyseessä on kansio", "Upload Error" => "Lähetysvirhe.", +"Close" => "Sulje", "Pending" => "Odottaa", "Upload cancelled." => "Lähetys peruttu.", "File upload is in progress. Leaving the page now will cancel the upload." => "Tiedoston lähetys on meneillään. Sivulta poistuminen nyt peruu tiedoston lähetyksen.", -"Invalid name, '/' is not allowed." => "Virheellinen nimi, merkki '/' ei ole sallittu.", "Name" => "Nimi", "Size" => "Koko", "Modified" => "Muutettu", @@ -28,16 +29,6 @@ "{count} folders" => "{count} kansiota", "1 file" => "1 tiedosto", "{count} files" => "{count} tiedostoa", -"seconds ago" => "sekuntia sitten", -"1 minute ago" => "1 minuutti sitten", -"{minutes} minutes ago" => "{minutes} minuuttia sitten", -"today" => "tänään", -"yesterday" => "eilen", -"{days} days ago" => "{days} päivää sitten", -"last month" => "viime kuussa", -"months ago" => "kuukautta sitten", -"last year" => "viime vuonna", -"years ago" => "vuotta sitten", "File handling" => "Tiedostonhallinta", "Maximum upload size" => "Lähetettävän tiedoston suurin sallittu koko", "max. possible: " => "suurin mahdollinen:", @@ -52,7 +43,6 @@ "Upload" => "Lähetä", "Cancel upload" => "Peru lähetys", "Nothing in here. Upload something!" => "Täällä ei ole mitään. Lähetä tänne jotakin!", -"Share" => "Jaa", "Download" => "Lataa", "Upload too large" => "Lähetettävä tiedosto on liian suuri", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Lähetettäväksi valitsemasi tiedostot ylittävät palvelimen salliman tiedostokoon rajan.", diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index aa63dbb0549..86d476873d0 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Aucune erreur, le fichier a été téléversé avec succès", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Le fichier téléversé excède la valeur de upload_max_filesize spécifiée dans php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Le fichier envoyé dépasse la valeur upload_max_filesize située dans le fichier php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Le fichier téléversé excède la valeur de MAX_FILE_SIZE spécifiée dans le formulaire HTML", "The uploaded file was only partially uploaded" => "Le fichier n'a été que partiellement téléversé", "No file was uploaded" => "Aucun fichier n'a été téléversé", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "{new_name} a été remplacé par {old_name}", "unshared {files}" => "Fichiers non partagés : {files}", "deleted {files}" => "Fichiers supprimés : {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nom invalide, les caractères '\\', '/', '<', '>', ':', '\"', '|', '?' et '*' ne sont pas autorisés.", "generating ZIP-file, it may take some time." => "Fichier ZIP en cours d'assemblage ; cela peut prendre du temps.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossible de charger vos fichiers car il s'agit d'un dossier ou le fichier fait 0 octet.", "Upload Error" => "Erreur de chargement", +"Close" => "Fermer", "Pending" => "En cours", "1 file uploading" => "1 fichier en cours de téléchargement", "{count} files uploading" => "{count} fichiers téléversés", "Upload cancelled." => "Chargement annulé.", "File upload is in progress. Leaving the page now will cancel the upload." => "L'envoi du fichier est en cours. Quitter cette page maintenant annulera l'envoi du fichier.", -"Invalid name, '/' is not allowed." => "Nom invalide, '/' n'est pas autorisé.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nom de répertoire invalide. \"Shared\" est réservé par ownCloud", "{count} files scanned" => "{count} fichiers indexés", "error while scanning" => "erreur lors de l'indexation", "Name" => "Nom", @@ -37,16 +39,6 @@ "{count} folders" => "{count} dossiers", "1 file" => "1 fichier", "{count} files" => "{count} fichiers", -"seconds ago" => "secondes passées", -"1 minute ago" => "Il y a une minute", -"{minutes} minutes ago" => "Il y a {minutes} minutes", -"today" => "aujourd'hui", -"yesterday" => "hier", -"{days} days ago" => "Il y a {days} jours", -"last month" => "mois dernier", -"months ago" => "mois passés", -"last year" => "année dernière", -"years ago" => "années passées", "File handling" => "Gestion des fichiers", "Maximum upload size" => "Taille max. d'envoi", "max. possible: " => "Max. possible :", @@ -58,10 +50,10 @@ "New" => "Nouveau", "Text file" => "Fichier texte", "Folder" => "Dossier", +"From link" => "Depuis le lien", "Upload" => "Envoyer", "Cancel upload" => "Annuler l'envoi", "Nothing in here. Upload something!" => "Il n'y a rien ici ! Envoyez donc quelque chose :)", -"Share" => "Partager", "Download" => "Téléchargement", "Upload too large" => "Fichier trop volumineux", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Les fichiers que vous essayez d'envoyer dépassent la taille maximale permise par ce serveur.", diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index 1c5dfceb4f3..5c50e3764cf 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( -"There is no error, the file uploaded with success" => "Non hai erros, o ficheiro enviouse correctamente", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "O ficheiro enviado supera a directiva upload_max_filesize no php.ini", +"There is no error, the file uploaded with success" => "Non hai erros. O ficheiro enviouse correctamente", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "O ficheiro subido excede a directiva indicada polo tamaño_máximo_de_subida de php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "O ficheiro enviado supera a directiva MAX_FILE_SIZE que foi indicada no formulario HTML", "The uploaded file was only partially uploaded" => "O ficheiro enviado foi só parcialmente enviado", "No file was uploaded" => "Non se enviou ningún ficheiro", @@ -9,25 +9,40 @@ "Files" => "Ficheiros", "Unshare" => "Deixar de compartir", "Delete" => "Eliminar", +"Rename" => "Mudar o nome", +"{new_name} already exists" => "xa existe un {new_name}", "replace" => "substituír", -"suggest name" => "suxira nome", +"suggest name" => "suxerir nome", "cancel" => "cancelar", +"replaced {new_name}" => "substituír {new_name}", "undo" => "desfacer", -"generating ZIP-file, it may take some time." => "xerando ficheiro ZIP, pode levar un anaco.", +"replaced {new_name} with {old_name}" => "substituír {new_name} polo {old_name}", +"unshared {files}" => "{files} sen compartir", +"deleted {files}" => "{files} eliminados", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome non válido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' non se permiten.", +"generating ZIP-file, it may take some time." => "xerando un ficheiro ZIP, o que pode levar un anaco.", "Unable to upload your file as it is a directory or has 0 bytes" => "Non se puido subir o ficheiro pois ou é un directorio ou ten 0 bytes", "Upload Error" => "Erro na subida", +"Close" => "Pechar", "Pending" => "Pendentes", +"1 file uploading" => "1 ficheiro subíndose", +"{count} files uploading" => "{count} ficheiros subíndose", "Upload cancelled." => "Subida cancelada.", "File upload is in progress. Leaving the page now will cancel the upload." => "A subida do ficheiro está en curso. Saír agora da páxina cancelará a subida.", -"Invalid name, '/' is not allowed." => "Nome non válido, '/' non está permitido.", -"error while scanning" => "erro mentras analizaba", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nome de cartafol non válido. O uso de \"compartido\" está reservado exclusivamente para ownCloud", +"{count} files scanned" => "{count} ficheiros escaneados", +"error while scanning" => "erro mentres analizaba", "Name" => "Nome", "Size" => "Tamaño", "Modified" => "Modificado", +"1 folder" => "1 cartafol", +"{count} folders" => "{count} cartafoles", +"1 file" => "1 ficheiro", +"{count} files" => "{count} ficheiros", "File handling" => "Manexo de ficheiro", "Maximum upload size" => "Tamaño máximo de envío", "max. possible: " => "máx. posible: ", -"Needed for multi-file and folder downloads." => "Preciso para descarga de varios ficheiros e cartafoles.", +"Needed for multi-file and folder downloads." => "Precísase para a descarga de varios ficheiros e cartafoles.", "Enable ZIP-download" => "Habilitar a descarga-ZIP", "0 is unlimited" => "0 significa ilimitado", "Maximum input size for ZIP files" => "Tamaño máximo de descarga para os ZIP", @@ -35,13 +50,13 @@ "New" => "Novo", "Text file" => "Ficheiro de texto", "Folder" => "Cartafol", +"From link" => "Dende a ligazón", "Upload" => "Enviar", -"Cancel upload" => "Cancelar subida", -"Nothing in here. Upload something!" => "Nada por aquí. Envíe algo.", -"Share" => "Compartir", +"Cancel upload" => "Cancelar a subida", +"Nothing in here. Upload something!" => "Nada por aquí. Envía algo.", "Download" => "Descargar", "Upload too large" => "Envío demasiado grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Os ficheiros que trata de subir superan o tamaño máximo permitido neste servidor", -"Files are being scanned, please wait." => "Estanse analizando os ficheiros, espere por favor.", -"Current scanning" => "Análise actual." +"Files are being scanned, please wait." => "Estanse analizando os ficheiros. Agarda.", +"Current scanning" => "Análise actual" ); diff --git a/apps/files/l10n/he.php b/apps/files/l10n/he.php index 1f63978abbf..4c73493211d 100644 --- a/apps/files/l10n/he.php +++ b/apps/files/l10n/he.php @@ -1,22 +1,44 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "לא אירעה תקלה, הקבצים הועלו בהצלחה", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "הקובץ שהועלה חרג מההנחיה upload_max_filesize בקובץ php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "הקבצים שנשלחו חורגים מהגודל שצוין בהגדרה upload_max_filesize שבקובץ php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "הקובץ שהועלה חרג מההנחיה MAX_FILE_SIZE שצוינה בטופס ה־HTML", "The uploaded file was only partially uploaded" => "הקובץ שהועלה הועלה בצורה חלקית", "No file was uploaded" => "לא הועלו קבצים", "Missing a temporary folder" => "תיקייה זמנית חסרה", "Failed to write to disk" => "הכתיבה לכונן נכשלה", "Files" => "קבצים", +"Unshare" => "הסר שיתוף", "Delete" => "מחיקה", +"Rename" => "שינוי שם", +"{new_name} already exists" => "{new_name} כבר קיים", +"replace" => "החלפה", +"suggest name" => "הצעת שם", +"cancel" => "ביטול", +"replaced {new_name}" => "{new_name} הוחלף", +"undo" => "ביטול", +"replaced {new_name} with {old_name}" => "{new_name} הוחלף ב־{old_name}", +"unshared {files}" => "בוטל שיתופם של {files}", +"deleted {files}" => "{files} נמחקו", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "השם שגוי, אסור להשתמש בתווים '\\', '/', '<', '>', ':', '\"', '|', '?' ו־'*'.", "generating ZIP-file, it may take some time." => "יוצר קובץ ZIP, אנא המתן.", "Unable to upload your file as it is a directory or has 0 bytes" => "לא יכול להעלות את הקובץ מכיוון שזו תקיה או שמשקל הקובץ 0 בתים", "Upload Error" => "שגיאת העלאה", +"Close" => "סגירה", "Pending" => "ממתין", +"1 file uploading" => "קובץ אחד נשלח", +"{count} files uploading" => "{count} קבצים נשלחים", "Upload cancelled." => "ההעלאה בוטלה.", -"Invalid name, '/' is not allowed." => "שם לא חוקי, '/' אסור לשימוש.", +"File upload is in progress. Leaving the page now will cancel the upload." => "מתבצעת כעת העלאת קבצים. עזיבה של העמוד תבטל את ההעלאה.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "שם התיקייה שגוי. השימוש בשם „Shared“ שמור לטובת Owncloud", +"{count} files scanned" => "{count} קבצים נסרקו", +"error while scanning" => "אירעה שגיאה במהלך הסריקה", "Name" => "שם", "Size" => "גודל", "Modified" => "זמן שינוי", +"1 folder" => "תיקייה אחת", +"{count} folders" => "{count} תיקיות", +"1 file" => "קובץ אחד", +"{count} files" => "{count} קבצים", "File handling" => "טיפול בקבצים", "Maximum upload size" => "גודל העלאה מקסימלי", "max. possible: " => "המרבי האפשרי: ", @@ -24,13 +46,14 @@ "Enable ZIP-download" => "הפעלת הורדת ZIP", "0 is unlimited" => "0 - ללא הגבלה", "Maximum input size for ZIP files" => "גודל הקלט המרבי לקובצי ZIP", +"Save" => "שמירה", "New" => "חדש", "Text file" => "קובץ טקסט", "Folder" => "תיקייה", +"From link" => "מקישור", "Upload" => "העלאה", "Cancel upload" => "ביטול ההעלאה", "Nothing in here. Upload something!" => "אין כאן שום דבר. אולי ברצונך להעלות משהו?", -"Share" => "שיתוף", "Download" => "הורדה", "Upload too large" => "העלאה גדולה מידי", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "הקבצים שניסית להעלות חרגו מהגודל המקסימלי להעלאת קבצים על שרת זה.", diff --git a/apps/files/l10n/hr.php b/apps/files/l10n/hr.php index 2209d1f4699..4db4ac3f3e3 100644 --- a/apps/files/l10n/hr.php +++ b/apps/files/l10n/hr.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Datoteka je poslana uspješno i bez pogrešaka", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Poslana datoteka izlazi iz okvira upload_max_size direktive postavljene u php.ini konfiguracijskoj datoteci", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Poslana datoteka izlazi iz okvira MAX_FILE_SIZE direktive postavljene u HTML obrascu", "The uploaded file was only partially uploaded" => "Datoteka je poslana samo djelomično", "No file was uploaded" => "Ni jedna datoteka nije poslana", @@ -17,22 +16,15 @@ "generating ZIP-file, it may take some time." => "generiranje ZIP datoteke, ovo može potrajati.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nemoguće poslati datoteku jer je prazna ili je direktorij", "Upload Error" => "Pogreška pri slanju", +"Close" => "Zatvori", "Pending" => "U tijeku", "1 file uploading" => "1 datoteka se učitava", "Upload cancelled." => "Slanje poništeno.", "File upload is in progress. Leaving the page now will cancel the upload." => "Učitavanje datoteke. Napuštanjem stranice će prekinuti učitavanje.", -"Invalid name, '/' is not allowed." => "Neispravan naziv, znak '/' nije dozvoljen.", "error while scanning" => "grečka prilikom skeniranja", "Name" => "Naziv", "Size" => "Veličina", "Modified" => "Zadnja promjena", -"seconds ago" => "sekundi prije", -"today" => "danas", -"yesterday" => "jučer", -"last month" => "prošli mjesec", -"months ago" => "mjeseci", -"last year" => "prošlu godinu", -"years ago" => "godina", "File handling" => "datoteka za rukovanje", "Maximum upload size" => "Maksimalna veličina prijenosa", "max. possible: " => "maksimalna moguća: ", @@ -47,7 +39,6 @@ "Upload" => "Pošalji", "Cancel upload" => "Prekini upload", "Nothing in here. Upload something!" => "Nema ničega u ovoj mapi. Pošalji nešto!", -"Share" => "podjeli", "Download" => "Preuzmi", "Upload too large" => "Prijenos je preobiman", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Datoteke koje pokušavate prenijeti prelaze maksimalnu veličinu za prijenos datoteka na ovom poslužitelju.", diff --git a/apps/files/l10n/hu_HU.php b/apps/files/l10n/hu_HU.php index c11469e3ed4..083d5a391e1 100644 --- a/apps/files/l10n/hu_HU.php +++ b/apps/files/l10n/hu_HU.php @@ -1,12 +1,12 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Nincs hiba, a fájl sikeresen feltöltve.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "A feltöltött file meghaladja az upload_max_filesize direktívát a php.ini-ben.", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "A feltöltött fájl meghaladja a MAX_FILE_SIZE direktívát ami meghatározott a HTML form-ban.", "The uploaded file was only partially uploaded" => "Az eredeti fájl csak részlegesen van feltöltve.", "No file was uploaded" => "Nem lett fájl feltöltve.", "Missing a temporary folder" => "Hiányzik az ideiglenes könyvtár", "Failed to write to disk" => "Nem írható lemezre", "Files" => "Fájlok", +"Unshare" => "Nem oszt meg", "Delete" => "Törlés", "replace" => "cserél", "cancel" => "mégse", @@ -14,9 +14,9 @@ "generating ZIP-file, it may take some time." => "ZIP-fájl generálása, ez eltarthat egy ideig.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nem tölthető fel, mert mappa volt, vagy 0 byte méretű", "Upload Error" => "Feltöltési hiba", +"Close" => "Bezár", "Pending" => "Folyamatban", "Upload cancelled." => "Feltöltés megszakítva", -"Invalid name, '/' is not allowed." => "Érvénytelen név, a '/' nem megengedett", "Name" => "Név", "Size" => "Méret", "Modified" => "Módosítva", @@ -27,13 +27,13 @@ "Enable ZIP-download" => "ZIP-letöltés engedélyezése", "0 is unlimited" => "0 = korlátlan", "Maximum input size for ZIP files" => "ZIP file-ok maximum mérete", +"Save" => "Mentés", "New" => "Új", "Text file" => "Szövegfájl", "Folder" => "Mappa", "Upload" => "Feltöltés", "Cancel upload" => "Feltöltés megszakítása", "Nothing in here. Upload something!" => "Töltsön fel egy fájlt.", -"Share" => "Megosztás", "Download" => "Letöltés", "Upload too large" => "Feltöltés túl nagy", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "A fájlokat amit próbálsz feltölteni meghaladta a legnagyobb fájlméretet ezen a szerveren.", diff --git a/apps/files/l10n/ia.php b/apps/files/l10n/ia.php index 21a0bb52374..ada64cd7574 100644 --- a/apps/files/l10n/ia.php +++ b/apps/files/l10n/ia.php @@ -1,12 +1,15 @@ <?php $TRANSLATIONS = array( "The uploaded file was only partially uploaded" => "Le file incargate solmente esseva incargate partialmente", "No file was uploaded" => "Nulle file esseva incargate", +"Missing a temporary folder" => "Manca un dossier temporari", "Files" => "Files", "Delete" => "Deler", +"Close" => "Clauder", "Name" => "Nomine", "Size" => "Dimension", "Modified" => "Modificate", "Maximum upload size" => "Dimension maxime de incargamento", +"Save" => "Salveguardar", "New" => "Nove", "Text file" => "File de texto", "Folder" => "Dossier", diff --git a/apps/files/l10n/id.php b/apps/files/l10n/id.php index cc067bf9a18..1f8cb444d26 100644 --- a/apps/files/l10n/id.php +++ b/apps/files/l10n/id.php @@ -1,12 +1,12 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Tidak ada galat, berkas sukses diunggah", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "File yang diunggah melampaui directive upload_max_filesize di php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "File yang diunggah melampaui directive MAX_FILE_SIZE yang disebutan dalam form HTML.", "The uploaded file was only partially uploaded" => "Berkas hanya diunggah sebagian", "No file was uploaded" => "Tidak ada berkas yang diunggah", "Missing a temporary folder" => "Kehilangan folder temporer", "Failed to write to disk" => "Gagal menulis ke disk", "Files" => "Berkas", +"Unshare" => "batalkan berbagi", "Delete" => "Hapus", "replace" => "mengganti", "cancel" => "batalkan", @@ -14,9 +14,9 @@ "generating ZIP-file, it may take some time." => "membuat berkas ZIP, ini mungkin memakan waktu.", "Unable to upload your file as it is a directory or has 0 bytes" => "Gagal mengunggah berkas anda karena berupa direktori atau mempunyai ukuran 0 byte", "Upload Error" => "Terjadi Galat Pengunggahan", +"Close" => "tutup", "Pending" => "Menunggu", "Upload cancelled." => "Pengunggahan dibatalkan.", -"Invalid name, '/' is not allowed." => "Kesalahan nama, '/' tidak diijinkan.", "Name" => "Nama", "Size" => "Ukuran", "Modified" => "Dimodifikasi", @@ -27,13 +27,13 @@ "Enable ZIP-download" => "Aktifkan unduhan ZIP", "0 is unlimited" => "0 adalah tidak terbatas", "Maximum input size for ZIP files" => "Ukuran masukan maksimal untuk berkas ZIP", +"Save" => "simpan", "New" => "Baru", "Text file" => "Berkas teks", "Folder" => "Folder", "Upload" => "Unggah", "Cancel upload" => "Batal mengunggah", "Nothing in here. Upload something!" => "Tidak ada apa-apa di sini. Unggah sesuatu!", -"Share" => "Bagikan", "Download" => "Unduh", "Upload too large" => "Unggahan terlalu besar", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Berkas yang anda coba unggah melebihi ukuran maksimum untuk pengunggahan berkas di server ini.", diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php index 91fda49e270..90b34171220 100644 --- a/apps/files/l10n/it.php +++ b/apps/files/l10n/it.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Non ci sono errori, file caricato con successo", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Il file caricato supera il valore upload_max_filesize in php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Il file caricato supera la direttiva upload_max_filesize in php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Il file caricato supera il valore MAX_FILE_SIZE definito nel form HTML", "The uploaded file was only partially uploaded" => "Il file è stato parzialmente caricato", "No file was uploaded" => "Nessun file è stato caricato", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "sostituito {new_name} con {old_name}", "unshared {files}" => "non condivisi {files}", "deleted {files}" => "eliminati {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome non valido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' non sono consentiti.", "generating ZIP-file, it may take some time." => "creazione file ZIP, potrebbe richiedere del tempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossibile inviare il file poiché è una cartella o ha dimensione 0 byte", "Upload Error" => "Errore di invio", +"Close" => "Chiudi", "Pending" => "In corso", "1 file uploading" => "1 file in fase di caricamento", "{count} files uploading" => "{count} file in fase di caricamentoe", "Upload cancelled." => "Invio annullato", "File upload is in progress. Leaving the page now will cancel the upload." => "Caricamento del file in corso. La chiusura della pagina annullerà il caricamento.", -"Invalid name, '/' is not allowed." => "Nome non valido", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nome della cartella non valido. L'uso di \"Shared\" è riservato a ownCloud", "{count} files scanned" => "{count} file analizzati", "error while scanning" => "errore durante la scansione", "Name" => "Nome", @@ -37,16 +39,6 @@ "{count} folders" => "{count} cartelle", "1 file" => "1 file", "{count} files" => "{count} file", -"seconds ago" => "secondi fa", -"1 minute ago" => "1 minuto fa", -"{minutes} minutes ago" => "{minutes} minuti fa", -"today" => "oggi", -"yesterday" => "ieri", -"{days} days ago" => "{days} giorni fa", -"last month" => "mese scorso", -"months ago" => "mesi fa", -"last year" => "anno scorso", -"years ago" => "anni fa", "File handling" => "Gestione file", "Maximum upload size" => "Dimensione massima upload", "max. possible: " => "numero mass.: ", @@ -58,10 +50,10 @@ "New" => "Nuovo", "Text file" => "File di testo", "Folder" => "Cartella", +"From link" => "Da collegamento", "Upload" => "Carica", "Cancel upload" => "Annulla invio", "Nothing in here. Upload something!" => "Non c'è niente qui. Carica qualcosa!", -"Share" => "Condividi", "Download" => "Scarica", "Upload too large" => "Il file caricato è troppo grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "I file che stai provando a caricare superano la dimensione massima consentita su questo server.", diff --git a/apps/files/l10n/ja_JP.php b/apps/files/l10n/ja_JP.php index 41f26fe3ebc..7b8c3ca4778 100644 --- a/apps/files/l10n/ja_JP.php +++ b/apps/files/l10n/ja_JP.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "エラーはありません。ファイルのアップロードは成功しました", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "アップロードされたファイルはphp.iniのupload_max_filesizeに設定されたサイズを超えています", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "アップロードされたファイルはphp.ini の upload_max_filesize に設定されたサイズを超えています:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "アップロードされたファイルはHTMLのフォームに設定されたMAX_FILE_SIZEに設定されたサイズを超えています", "The uploaded file was only partially uploaded" => "ファイルは一部分しかアップロードされませんでした", "No file was uploaded" => "ファイルはアップロードされませんでした", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "{old_name} を {new_name} に置換", "unshared {files}" => "未共有 {files}", "deleted {files}" => "削除 {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "無効な名前、'\\', '/', '<', '>', ':', '\"', '|', '?', '*' は使用できません。", "generating ZIP-file, it may take some time." => "ZIPファイルを生成中です、しばらくお待ちください。", -"Unable to upload your file as it is a directory or has 0 bytes" => "アップロード使用としているファイルがディレクトリ、もしくはサイズが0バイトのため、アップロードできません。", +"Unable to upload your file as it is a directory or has 0 bytes" => "ディレクトリもしくは0バイトのファイルはアップロードできません", "Upload Error" => "アップロードエラー", +"Close" => "閉じる", "Pending" => "保留", "1 file uploading" => "ファイルを1つアップロード中", "{count} files uploading" => "{count} ファイルをアップロード中", "Upload cancelled." => "アップロードはキャンセルされました。", "File upload is in progress. Leaving the page now will cancel the upload." => "ファイル転送を実行中です。今このページから移動するとアップロードが中止されます。", -"Invalid name, '/' is not allowed." => "無効な名前、'/' は使用できません。", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "無効なフォルダ名です。\"Shared\" の利用は ownCloud が予約済みです。", "{count} files scanned" => "{count} ファイルをスキャン", "error while scanning" => "スキャン中のエラー", "Name" => "名前", @@ -37,16 +39,6 @@ "{count} folders" => "{count} フォルダ", "1 file" => "1 ファイル", "{count} files" => "{count} ファイル", -"seconds ago" => "秒前", -"1 minute ago" => "1 分前", -"{minutes} minutes ago" => "{minutes} 分前", -"today" => "今日", -"yesterday" => "昨日", -"{days} days ago" => "{days} 日前", -"last month" => "一月前", -"months ago" => "月前", -"last year" => "一年前", -"years ago" => "年前", "File handling" => "ファイル操作", "Maximum upload size" => "最大アップロードサイズ", "max. possible: " => "最大容量: ", @@ -58,10 +50,10 @@ "New" => "新規", "Text file" => "テキストファイル", "Folder" => "フォルダ", +"From link" => "リンク", "Upload" => "アップロード", "Cancel upload" => "アップロードをキャンセル", "Nothing in here. Upload something!" => "ここには何もありません。何かアップロードしてください。", -"Share" => "共有", "Download" => "ダウンロード", "Upload too large" => "ファイルサイズが大きすぎます", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "アップロードしようとしているファイルは、サーバで規定された最大サイズを超えています。", diff --git a/apps/files/l10n/ka_GE.php b/apps/files/l10n/ka_GE.php index cfd0b2fa6ec..9a73abfbe3b 100644 --- a/apps/files/l10n/ka_GE.php +++ b/apps/files/l10n/ka_GE.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "ჭოცდომა არ დაფიქსირდა, ფაილი წარმატებით აიტვირთა", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "ატვირთული ფაილი აჭარბებს upload_max_filesize დირექტივას php.ini ფაილში", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "ატვირთული ფაილი აჭარბებს MAX_FILE_SIZE დირექტივას, რომელიც მითითებულია HTML ფორმაში", "The uploaded file was only partially uploaded" => "ატვირთული ფაილი მხოლოდ ნაწილობრივ აიტვირთა", "No file was uploaded" => "ფაილი არ აიტვირთა", @@ -22,12 +21,12 @@ "generating ZIP-file, it may take some time." => "ZIP-ფაილის გენერირება, ამას ჭირდება გარკვეული დრო.", "Unable to upload your file as it is a directory or has 0 bytes" => "თქვენი ფაილის ატვირთვა ვერ მოხერხდა. ის არის საქაღალდე და შეიცავს 0 ბაიტს", "Upload Error" => "შეცდომა ატვირთვისას", +"Close" => "დახურვა", "Pending" => "მოცდის რეჟიმში", "1 file uploading" => "1 ფაილის ატვირთვა", "{count} files uploading" => "{count} ფაილი იტვირთება", "Upload cancelled." => "ატვირთვა შეჩერებულ იქნა.", "File upload is in progress. Leaving the page now will cancel the upload." => "მიმდინარეობს ფაილის ატვირთვა. სხვა გვერდზე გადასვლა გამოიწვევს ატვირთვის შეჩერებას", -"Invalid name, '/' is not allowed." => "არასწორი სახელი, '/' არ დაიშვება.", "{count} files scanned" => "{count} ფაილი სკანირებულია", "error while scanning" => "შეცდომა სკანირებისას", "Name" => "სახელი", @@ -37,16 +36,6 @@ "{count} folders" => "{count} საქაღალდე", "1 file" => "1 ფაილი", "{count} files" => "{count} ფაილი", -"seconds ago" => "წამის წინ", -"1 minute ago" => "1 წუთის წინ", -"{minutes} minutes ago" => "{minutes} წუთის წინ", -"today" => "დღეს", -"yesterday" => "გუშინ", -"{days} days ago" => "{days} დღის წინ", -"last month" => "გასულ თვეში", -"months ago" => "თვის წინ", -"last year" => "გასულ წელს", -"years ago" => "წლის წინ", "File handling" => "ფაილის დამუშავება", "Maximum upload size" => "მაქსიმუმ ატვირთის ზომა", "max. possible: " => "მაქს. შესაძლებელი:", @@ -61,7 +50,6 @@ "Upload" => "ატვირთვა", "Cancel upload" => "ატვირთვის გაუქმება", "Nothing in here. Upload something!" => "აქ არაფერი არ არის. ატვირთე რამე!", -"Share" => "გაზიარება", "Download" => "ჩამოტვირთვა", "Upload too large" => "ასატვირთი ფაილი ძალიან დიდია", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "ფაილის ზომა რომლის ატვირთვასაც თქვენ აპირებთ, აჭარბებს სერვერზე დაშვებულ მაქსიმუმს.", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index 896e979dc8c..4b5d57dff92 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -1,42 +1,62 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "업로드에 성공하였습니다.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "업로드한 파일이 php.ini에서 지정한 upload_max_filesize보다 더 큼", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "업로드한 파일이 php.ini의 upload_max_filesize보다 큽니다:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "업로드한 파일이 HTML 문서에 지정한 MAX_FILE_SIZE보다 더 큼", "The uploaded file was only partially uploaded" => "파일이 부분적으로 업로드됨", "No file was uploaded" => "업로드된 파일 없음", "Missing a temporary folder" => "임시 폴더가 사라짐", "Failed to write to disk" => "디스크에 쓰지 못했습니다", "Files" => "파일", +"Unshare" => "공유 해제", "Delete" => "삭제", -"replace" => "대체", +"Rename" => "이름 바꾸기", +"{new_name} already exists" => "{new_name}이(가) 이미 존재함", +"replace" => "바꾸기", +"suggest name" => "이름 제안", "cancel" => "취소", -"undo" => "복구", -"generating ZIP-file, it may take some time." => "ZIP파일 생성에 시간이 걸릴 수 있습니다.", -"Unable to upload your file as it is a directory or has 0 bytes" => "이 파일은 디렉토리이거나 0 바이트이기 때문에 업로드 할 수 없습니다.", -"Upload Error" => "업로드 에러", +"replaced {new_name}" => "{new_name}을(를) 대체함", +"undo" => "실행 취소", +"replaced {new_name} with {old_name}" => "{old_name}이(가) {new_name}(으)로 대체됨", +"unshared {files}" => "{files} 공유 해제됨", +"deleted {files}" => "{files} 삭제됨", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "폴더 이름이 올바르지 않습니다. 이름에 문자 '\\', '/', '<', '>', ':', '\"', '|', '? ', '*'는 사용할 수 없습니다.", +"generating ZIP-file, it may take some time." => "ZIP 파일을 생성하고 있습니다. 시간이 걸릴 수도 있습니다.", +"Unable to upload your file as it is a directory or has 0 bytes" => "이 파일은 디렉터리이거나 비어 있기 때문에 업로드할 수 없습니다", +"Upload Error" => "업로드 오류", +"Close" => "닫기", "Pending" => "보류 중", -"Upload cancelled." => "업로드 취소.", -"Invalid name, '/' is not allowed." => "잘못된 이름, '/' 은 허용이 되지 않습니다.", +"1 file uploading" => "파일 1개 업로드 중", +"{count} files uploading" => "파일 {count}개 업로드 중", +"Upload cancelled." => "업로드가 취소되었습니다.", +"File upload is in progress. Leaving the page now will cancel the upload." => "파일 업로드가 진행 중입니다. 이 페이지를 벗어나면 업로드가 취소됩니다.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "폴더 이름이 올바르지 않습니다. \"Shared\" 폴더는 ownCloud에서 예약되었습니다.", +"{count} files scanned" => "파일 {count}개 검색됨", +"error while scanning" => "검색 중 오류 발생", "Name" => "이름", "Size" => "크기", "Modified" => "수정됨", +"1 folder" => "폴더 1개", +"{count} folders" => "폴더 {count}개", +"1 file" => "파일 1개", +"{count} files" => "파일 {count}개", "File handling" => "파일 처리", "Maximum upload size" => "최대 업로드 크기", -"max. possible: " => "최대. 가능한:", -"Needed for multi-file and folder downloads." => "멀티 파일 및 폴더 다운로드에 필요.", -"Enable ZIP-download" => "ZIP- 다운로드 허용", -"0 is unlimited" => "0은 무제한 입니다", -"Maximum input size for ZIP files" => "ZIP 파일에 대한 최대 입력 크기", +"max. possible: " => "최대 가능:", +"Needed for multi-file and folder downloads." => "다중 파일 및 폴더 다운로드에 필요합니다.", +"Enable ZIP-download" => "ZIP 다운로드 허용", +"0 is unlimited" => "0은 무제한입니다", +"Maximum input size for ZIP files" => "ZIP 파일 최대 크기", +"Save" => "저장", "New" => "새로 만들기", "Text file" => "텍스트 파일", "Folder" => "폴더", +"From link" => "링크에서", "Upload" => "업로드", "Cancel upload" => "업로드 취소", "Nothing in here. Upload something!" => "내용이 없습니다. 업로드할 수 있습니다!", -"Share" => "공유", "Download" => "다운로드", "Upload too large" => "업로드 용량 초과", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "이 파일이 서버에서 허용하는 최대 업로드 가능 용량보다 큽니다.", -"Files are being scanned, please wait." => "파일을 검색중입니다, 기다려 주십시오.", -"Current scanning" => "커런트 스캐닝" +"Files are being scanned, please wait." => "파일을 검색하고 있습니다. 기다려 주십시오.", +"Current scanning" => "현재 검색" ); diff --git a/apps/files/l10n/ku_IQ.php b/apps/files/l10n/ku_IQ.php new file mode 100644 index 00000000000..49995f8df86 --- /dev/null +++ b/apps/files/l10n/ku_IQ.php @@ -0,0 +1,8 @@ +<?php $TRANSLATIONS = array( +"Close" => "داخستن", +"Name" => "ناو", +"Save" => "پاشکهوتکردن", +"Folder" => "بوخچه", +"Upload" => "بارکردن", +"Download" => "داگرتن" +); diff --git a/apps/files/l10n/lb.php b/apps/files/l10n/lb.php index 02f546ad85f..229ec3f2024 100644 --- a/apps/files/l10n/lb.php +++ b/apps/files/l10n/lb.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Keen Feeler, Datei ass komplett ropgelueden ginn", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Déi ropgelueden Datei ass méi grouss wei d'upload_max_filesize Eegenschaft an der php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Déi ropgelueden Datei ass méi grouss wei d'MAX_FILE_SIZE Eegenschaft déi an der HTML form uginn ass", "The uploaded file was only partially uploaded" => "Déi ropgelueden Datei ass nëmmen hallef ropgelueden ginn", "No file was uploaded" => "Et ass keng Datei ropgelueden ginn", @@ -14,9 +13,9 @@ "generating ZIP-file, it may take some time." => "Et gëtt eng ZIP-File generéiert, dëst ka bëssen daueren.", "Unable to upload your file as it is a directory or has 0 bytes" => "Kann deng Datei net eroplueden well et en Dossier ass oder 0 byte grouss ass.", "Upload Error" => "Fehler beim eroplueden", +"Close" => "Zoumaachen", "Upload cancelled." => "Upload ofgebrach.", "File upload is in progress. Leaving the page now will cancel the upload." => "File Upload am gaang. Wann's de des Säit verléiss gëtt den Upload ofgebrach.", -"Invalid name, '/' is not allowed." => "Ongültege Numm, '/' net erlaabt.", "Name" => "Numm", "Size" => "Gréisst", "Modified" => "Geännert", @@ -27,13 +26,13 @@ "Enable ZIP-download" => "ZIP-download erlaben", "0 is unlimited" => "0 ass onlimitéiert", "Maximum input size for ZIP files" => "Maximal Gréisst fir ZIP Fichieren", +"Save" => "Späicheren", "New" => "Nei", "Text file" => "Text Fichier", "Folder" => "Dossier", "Upload" => "Eroplueden", "Cancel upload" => "Upload ofbriechen", "Nothing in here. Upload something!" => "Hei ass näischt. Lued eppes rop!", -"Share" => "Share", "Download" => "Eroflueden", "Upload too large" => "Upload ze grouss", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Déi Dateien déi Dir probéiert erop ze lueden sinn méi grouss wei déi Maximal Gréisst déi op dësem Server erlaabt ass.", diff --git a/apps/files/l10n/lt_LT.php b/apps/files/l10n/lt_LT.php index 87c0f578c5f..fd9824e0c19 100644 --- a/apps/files/l10n/lt_LT.php +++ b/apps/files/l10n/lt_LT.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Klaidų nėra, failas įkeltas sėkmingai", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Įkeliamo failo dydis viršija upload_max_filesize parametrą php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Įkeliamo failo dydis viršija MAX_FILE_SIZE parametrą, kuris yra nustatytas HTML formoje", "The uploaded file was only partially uploaded" => "Failas buvo įkeltas tik dalinai", "No file was uploaded" => "Nebuvo įkeltas nė vienas failas", @@ -22,12 +21,12 @@ "generating ZIP-file, it may take some time." => "kuriamas ZIP archyvas, tai gali užtrukti šiek tiek laiko.", "Unable to upload your file as it is a directory or has 0 bytes" => "Neįmanoma įkelti failo - jo dydis gali būti 0 bitų arba tai katalogas", "Upload Error" => "Įkėlimo klaida", +"Close" => "Užverti", "Pending" => "Laukiantis", "1 file uploading" => "įkeliamas 1 failas", "{count} files uploading" => "{count} įkeliami failai", "Upload cancelled." => "Įkėlimas atšauktas.", "File upload is in progress. Leaving the page now will cancel the upload." => "Failo įkėlimas pradėtas. Jei paliksite šį puslapį, įkėlimas nutrūks.", -"Invalid name, '/' is not allowed." => "Pavadinime negali būti naudojamas ženklas \"/\".", "{count} files scanned" => "{count} praskanuoti failai", "error while scanning" => "klaida skanuojant", "Name" => "Pavadinimas", @@ -37,16 +36,6 @@ "{count} folders" => "{count} aplankalai", "1 file" => "1 failas", "{count} files" => "{count} failai", -"seconds ago" => "prieš sekundę", -"1 minute ago" => "Prieš 1 minutę", -"{minutes} minutes ago" => "Prieš {count} minutes", -"today" => "šiandien", -"yesterday" => "vakar", -"{days} days ago" => "Prieš {days} dienas", -"last month" => "praeitą mėnesį", -"months ago" => "prieš mėnesį", -"last year" => "praeitais metais", -"years ago" => "prieš metus", "File handling" => "Failų tvarkymas", "Maximum upload size" => "Maksimalus įkeliamo failo dydis", "max. possible: " => "maks. galima:", @@ -61,7 +50,6 @@ "Upload" => "Įkelti", "Cancel upload" => "Atšaukti siuntimą", "Nothing in here. Upload something!" => "Čia tuščia. Įkelkite ką nors!", -"Share" => "Dalintis", "Download" => "Atsisiųsti", "Upload too large" => "Įkėlimui failas per didelis", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Bandomų įkelti failų dydis viršija maksimalų leidžiamą šiame serveryje", diff --git a/apps/files/l10n/lv.php b/apps/files/l10n/lv.php index e550f6dc5e5..33367984918 100644 --- a/apps/files/l10n/lv.php +++ b/apps/files/l10n/lv.php @@ -1,9 +1,14 @@ <?php $TRANSLATIONS = array( +"There is no error, the file uploaded with success" => "Viss kārtībā, augšupielāde veiksmīga", "No file was uploaded" => "Neviens fails netika augšuplādēts", +"Missing a temporary folder" => "Trūkst pagaidu mapes", "Failed to write to disk" => "Nav iespējams saglabāt", "Files" => "Faili", +"Unshare" => "Pārtraukt līdzdalīšanu", "Delete" => "Izdzēst", +"Rename" => "Pārdēvēt", "replace" => "aizvietot", +"suggest name" => "Ieteiktais nosaukums", "cancel" => "atcelt", "undo" => "vienu soli atpakaļ", "generating ZIP-file, it may take some time." => "lai uzģenerētu ZIP failu, kāds brīdis ir jāpagaida", @@ -11,23 +16,26 @@ "Upload Error" => "Augšuplādēšanas laikā radās kļūda", "Pending" => "Gaida savu kārtu", "Upload cancelled." => "Augšuplāde ir atcelta", -"Invalid name, '/' is not allowed." => "Šis simbols '/', nav atļauts.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Notiek augšupielāde. Pametot lapu tagad, tiks atcelta augšupielāde.", "Name" => "Nosaukums", "Size" => "Izmērs", "Modified" => "Izmainīts", +"File handling" => "Failu pārvaldība", "Maximum upload size" => "Maksimālais failu augšuplādes apjoms", "max. possible: " => "maksīmālais iespējamais:", +"Needed for multi-file and folder downloads." => "Vajadzīgs vairāku failu un mapju lejuplādei", "Enable ZIP-download" => "Iespējot ZIP lejuplādi", "0 is unlimited" => "0 ir neierobežots", +"Save" => "Saglabāt", "New" => "Jauns", "Text file" => "Teksta fails", "Folder" => "Mape", "Upload" => "Augšuplādet", "Cancel upload" => "Atcelt augšuplādi", "Nothing in here. Upload something!" => "Te vēl nekas nav. Rīkojies, sāc augšuplādēt", -"Share" => "Līdzdalīt", "Download" => "Lejuplādēt", "Upload too large" => "Fails ir par lielu lai to augšuplādetu", +"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Jūsu augšuplādējamie faili pārsniedz servera pieļaujamo failu augšupielādes apjomu", "Files are being scanned, please wait." => "Faili šobrīd tiek caurskatīti, nedaudz jāpagaida.", "Current scanning" => "Šobrīd tiek pārbaudīti" ); diff --git a/apps/files/l10n/mk.php b/apps/files/l10n/mk.php index b908da2bb26..c47fdbdbf4f 100644 --- a/apps/files/l10n/mk.php +++ b/apps/files/l10n/mk.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Нема грешка, датотеката беше подигната успешно", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Подигнатата датотека ја надминува upload_max_filesize директивата во php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Подигнатата датотеката ја надминува MAX_FILE_SIZE директивата која беше поставена во HTML формата", "The uploaded file was only partially uploaded" => "Датотеката беше само делумно подигната.", "No file was uploaded" => "Не беше подигната датотека", @@ -11,9 +10,9 @@ "generating ZIP-file, it may take some time." => "Се генерира ZIP фајлот, ќе треба извесно време.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не може да се преземе вашата датотека бидејќи фолдерот во кој се наоѓа фајлот има големина од 0 бајти", "Upload Error" => "Грешка при преземање", +"Close" => "Затвои", "Pending" => "Чека", "Upload cancelled." => "Преземањето е прекинато.", -"Invalid name, '/' is not allowed." => "неисправно име, '/' не е дозволено.", "Name" => "Име", "Size" => "Големина", "Modified" => "Променето", @@ -24,13 +23,13 @@ "Enable ZIP-download" => "Овозможи ZIP симнување ", "0 is unlimited" => "0 е неограничено", "Maximum input size for ZIP files" => "Максимална големина за внес на ZIP датотеки", +"Save" => "Сними", "New" => "Ново", "Text file" => "Текстуална датотека", "Folder" => "Папка", "Upload" => "Подигни", "Cancel upload" => "Откажи прикачување", "Nothing in here. Upload something!" => "Тука нема ништо. Снимете нешто!", -"Share" => "Сподели", "Download" => "Преземи", "Upload too large" => "Датотеката е премногу голема", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Датотеките кои се обидувате да ги подигнете ја надминуваат максималната големина за подигнување датотеки на овој сервер.", diff --git a/apps/files/l10n/ms_MY.php b/apps/files/l10n/ms_MY.php index 1dabec18ea2..d7756698d0c 100644 --- a/apps/files/l10n/ms_MY.php +++ b/apps/files/l10n/ms_MY.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Tiada ralat, fail berjaya dimuat naik.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Fail yang dimuat naik melebihi penyata upload_max_filesize dalam php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Fail yang dimuat naik melebihi MAX_FILE_SIZE yang dinyatakan dalam form HTML ", "The uploaded file was only partially uploaded" => "Sebahagian daripada fail telah dimuat naik. ", "No file was uploaded" => "Tiada fail yang dimuat naik", @@ -13,9 +12,9 @@ "generating ZIP-file, it may take some time." => "sedang menghasilkan fail ZIP, mungkin mengambil sedikit masa.", "Unable to upload your file as it is a directory or has 0 bytes" => "Tidak boleh memuatnaik fail anda kerana mungkin ianya direktori atau saiz fail 0 bytes", "Upload Error" => "Muat naik ralat", +"Close" => "Tutup", "Pending" => "Dalam proses", "Upload cancelled." => "Muatnaik dibatalkan.", -"Invalid name, '/' is not allowed." => "penggunaa nama tidak sah, '/' tidak dibenarkan.", "Name" => "Nama ", "Size" => "Saiz", "Modified" => "Dimodifikasi", @@ -26,13 +25,13 @@ "Enable ZIP-download" => "Aktifkan muatturun ZIP", "0 is unlimited" => "0 adalah tanpa had", "Maximum input size for ZIP files" => "Saiz maksimum input untuk fail ZIP", +"Save" => "Simpan", "New" => "Baru", "Text file" => "Fail teks", "Folder" => "Folder", "Upload" => "Muat naik", "Cancel upload" => "Batal muat naik", "Nothing in here. Upload something!" => "Tiada apa-apa di sini. Muat naik sesuatu!", -"Share" => "Kongsi", "Download" => "Muat turun", "Upload too large" => "Muat naik terlalu besar", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Fail yang cuba dimuat naik melebihi saiz maksimum fail upload server", diff --git a/apps/files/l10n/nb_NO.php b/apps/files/l10n/nb_NO.php index 1d914b866aa..e5615a1c29b 100644 --- a/apps/files/l10n/nb_NO.php +++ b/apps/files/l10n/nb_NO.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Det er ingen feil. Filen ble lastet opp.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Filstørrelsen overskrider maksgrensedirektivet upload_max_filesize i php.ini-konfigurasjonen.", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Filstørrelsen overskrider maksgrensen på MAX_FILE_SIZE som ble oppgitt i HTML-skjemaet", "The uploaded file was only partially uploaded" => "Filopplastningen ble bare delvis gjennomført", "No file was uploaded" => "Ingen fil ble lastet opp", @@ -21,12 +20,12 @@ "generating ZIP-file, it may take some time." => "opprettet ZIP-fil, dette kan ta litt tid", "Unable to upload your file as it is a directory or has 0 bytes" => "Kan ikke laste opp filen din siden det er en mappe eller den har 0 bytes", "Upload Error" => "Opplasting feilet", +"Close" => "Lukk", "Pending" => "Ventende", "1 file uploading" => "1 fil lastes opp", "{count} files uploading" => "{count} filer laster opp", "Upload cancelled." => "Opplasting avbrutt.", "File upload is in progress. Leaving the page now will cancel the upload." => "Filopplasting pågår. Forlater du siden nå avbrytes opplastingen.", -"Invalid name, '/' is not allowed." => "Ugyldig navn, '/' er ikke tillatt. ", "{count} files scanned" => "{count} filer lest inn", "error while scanning" => "feil under skanning", "Name" => "Navn", @@ -36,16 +35,6 @@ "{count} folders" => "{count} mapper", "1 file" => "1 fil", "{count} files" => "{count} filer", -"seconds ago" => "sekunder siden", -"1 minute ago" => "1 minutt siden", -"{minutes} minutes ago" => "{minutes} minutter siden", -"today" => "i dag", -"yesterday" => "i går", -"{days} days ago" => "{days} dager siden", -"last month" => "forrige måned", -"months ago" => "måneder siden", -"last year" => "forrige år", -"years ago" => "år siden", "File handling" => "Filhåndtering", "Maximum upload size" => "Maksimum opplastingsstørrelse", "max. possible: " => "max. mulige:", @@ -60,7 +49,6 @@ "Upload" => "Last opp", "Cancel upload" => "Avbryt opplasting", "Nothing in here. Upload something!" => "Ingenting her. Last opp noe!", -"Share" => "Del", "Download" => "Last ned", "Upload too large" => "Opplasting for stor", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Filene du prøver å laste opp er for store for å laste opp til denne serveren.", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index f3bfb397c4f..093a5430d53 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Geen fout opgetreden, bestand successvol geupload.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Het geüploade bestand is groter dan de upload_max_filesize instelling in php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Het geüploade bestand overscheidt de upload_max_filesize optie in php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Het geüploade bestand is groter dan de MAX_FILE_SIZE richtlijn die is opgegeven in de HTML-formulier", "The uploaded file was only partially uploaded" => "Het bestand is slechts gedeeltelijk geupload", "No file was uploaded" => "Geen bestand geüpload", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "verving {new_name} met {old_name}", "unshared {files}" => "delen gestopt {files}", "deleted {files}" => "verwijderde {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Onjuiste naam; '\\', '/', '<', '>', ':', '\"', '|', '?' en '*' zijn niet toegestaan.", "generating ZIP-file, it may take some time." => "aanmaken ZIP-file, dit kan enige tijd duren.", "Unable to upload your file as it is a directory or has 0 bytes" => "uploaden van de file mislukt, het is of een directory of de bestandsgrootte is 0 bytes", "Upload Error" => "Upload Fout", +"Close" => "Sluit", "Pending" => "Wachten", "1 file uploading" => "1 bestand wordt ge-upload", "{count} files uploading" => "{count} bestanden aan het uploaden", "Upload cancelled." => "Uploaden geannuleerd.", -"File upload is in progress. Leaving the page now will cancel the upload." => "Bestands upload is bezig. Wanneer de pagina nu verlaten wordt, stopt de upload.", -"Invalid name, '/' is not allowed." => "Ongeldige naam, '/' is niet toegestaan.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Bestandsupload is bezig. Wanneer de pagina nu verlaten wordt, stopt de upload.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Folder naam niet toegestaan. Het gebruik van \"Shared\" is aan Owncloud voorbehouden", "{count} files scanned" => "{count} bestanden gescanned", "error while scanning" => "Fout tijdens het scannen", "Name" => "Naam", @@ -37,16 +39,6 @@ "{count} folders" => "{count} mappen", "1 file" => "1 bestand", "{count} files" => "{count} bestanden", -"seconds ago" => "seconden geleden", -"1 minute ago" => "1 minuut geleden", -"{minutes} minutes ago" => "{minutes} minuten geleden", -"today" => "vandaag", -"yesterday" => "gisteren", -"{days} days ago" => "{days} dagen geleden", -"last month" => "vorige maand", -"months ago" => "maanden geleden", -"last year" => "vorig jaar", -"years ago" => "jaar geleden", "File handling" => "Bestand", "Maximum upload size" => "Maximale bestandsgrootte voor uploads", "max. possible: " => "max. mogelijk: ", @@ -58,10 +50,10 @@ "New" => "Nieuw", "Text file" => "Tekstbestand", "Folder" => "Map", +"From link" => "Vanaf link", "Upload" => "Upload", "Cancel upload" => "Upload afbreken", "Nothing in here. Upload something!" => "Er bevindt zich hier niets. Upload een bestand!", -"Share" => "Delen", "Download" => "Download", "Upload too large" => "Bestanden te groot", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "De bestanden die u probeert te uploaden zijn groter dan de maximaal toegestane bestandsgrootte voor deze server.", diff --git a/apps/files/l10n/nn_NO.php b/apps/files/l10n/nn_NO.php index 7af37057ce0..04e01a39cfc 100644 --- a/apps/files/l10n/nn_NO.php +++ b/apps/files/l10n/nn_NO.php @@ -1,16 +1,17 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Ingen feil, fila vart lasta opp", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Den opplasta fila er større enn variabelen upload_max_filesize i php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Den opplasta fila er større enn variabelen MAX_FILE_SIZE i HTML-skjemaet", "The uploaded file was only partially uploaded" => "Fila vart berre delvis lasta opp", "No file was uploaded" => "Ingen filer vart lasta opp", "Missing a temporary folder" => "Manglar ei mellombels mappe", "Files" => "Filer", "Delete" => "Slett", +"Close" => "Lukk", "Name" => "Namn", "Size" => "Storleik", "Modified" => "Endra", "Maximum upload size" => "Maksimal opplastingsstorleik", +"Save" => "Lagre", "New" => "Ny", "Text file" => "Tekst fil", "Folder" => "Mappe", diff --git a/apps/files/l10n/oc.php b/apps/files/l10n/oc.php index 4542396a535..36bbb433394 100644 --- a/apps/files/l10n/oc.php +++ b/apps/files/l10n/oc.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Amontcargament capitat, pas d'errors", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Lo fichièr amontcargat es tròp bèl per la directiva «upload_max_filesize » del php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Lo fichièr amontcargat es mai gròs que la directiva «MAX_FILE_SIZE» especifiada dins lo formulari HTML", "The uploaded file was only partially uploaded" => "Lo fichièr foguèt pas completament amontcargat", "No file was uploaded" => "Cap de fichièrs son estats amontcargats", @@ -21,18 +20,10 @@ "1 file uploading" => "1 fichièr al amontcargar", "Upload cancelled." => "Amontcargar anullat.", "File upload is in progress. Leaving the page now will cancel the upload." => "Un amontcargar es a se far. Daissar aquesta pagina ara tamparà lo cargament. ", -"Invalid name, '/' is not allowed." => "Nom invalid, '/' es pas permis.", "error while scanning" => "error pendant l'exploracion", "Name" => "Nom", "Size" => "Talha", "Modified" => "Modificat", -"seconds ago" => "secondas", -"today" => "uèi", -"yesterday" => "ièr", -"last month" => "mes passat", -"months ago" => "meses", -"last year" => "an passat", -"years ago" => "ans", "File handling" => "Manejament de fichièr", "Maximum upload size" => "Talha maximum d'amontcargament", "max. possible: " => "max. possible: ", @@ -47,7 +38,6 @@ "Upload" => "Amontcarga", "Cancel upload" => " Anulla l'amontcargar", "Nothing in here. Upload something!" => "Pas res dedins. Amontcarga qualquaren", -"Share" => "Parteja", "Download" => "Avalcarga", "Upload too large" => "Amontcargament tròp gròs", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Los fichièrs que sias a amontcargar son tròp pesucs per la talha maxi pel servidor.", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index f2460562087..8051eae8c42 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Przesłano plik", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Rozmiar przesłanego pliku przekracza maksymalną wartość dyrektywy upload_max_filesize, zawartą w pliku php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Wgrany plik przekracza wartość upload_max_filesize zdefiniowaną w php.ini: ", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Rozmiar przesłanego pliku przekracza maksymalną wartość dyrektywy upload_max_filesize, zawartą formularzu HTML", "The uploaded file was only partially uploaded" => "Plik przesłano tylko częściowo", "No file was uploaded" => "Nie przesłano żadnego pliku", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "zastąpiony {new_name} z {old_name}", "unshared {files}" => "Udostępniane wstrzymane {files}", "deleted {files}" => "usunięto {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Niepoprawna nazwa, Znaki '\\', '/', '<', '>', ':', '\"', '|', '?' oraz '*'są niedozwolone.", "generating ZIP-file, it may take some time." => "Generowanie pliku ZIP, może potrwać pewien czas.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nie można wczytać pliku jeśli jest katalogiem lub ma 0 bajtów", "Upload Error" => "Błąd wczytywania", +"Close" => "Zamknij", "Pending" => "Oczekujące", "1 file uploading" => "1 plik wczytany", "{count} files uploading" => "{count} przesyłanie plików", "Upload cancelled." => "Wczytywanie anulowane.", "File upload is in progress. Leaving the page now will cancel the upload." => "Wysyłanie pliku jest w toku. Teraz opuszczając stronę wysyłanie zostanie anulowane.", -"Invalid name, '/' is not allowed." => "Nieprawidłowa nazwa '/' jest niedozwolone.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Błędna nazwa folderu. Nazwa \"Shared\" jest zarezerwowana dla Owncloud", "{count} files scanned" => "{count} pliki skanowane", "error while scanning" => "Wystąpił błąd podczas skanowania", "Name" => "Nazwa", @@ -37,16 +39,6 @@ "{count} folders" => "{count} foldery", "1 file" => "1 plik", "{count} files" => "{count} pliki", -"seconds ago" => "sekund temu", -"1 minute ago" => "1 minute temu", -"{minutes} minutes ago" => "{minutes} minut temu", -"today" => "dziś", -"yesterday" => "wczoraj", -"{days} days ago" => "{days} dni temu", -"last month" => "ostani miesiąc", -"months ago" => "miesięcy temu", -"last year" => "ostatni rok", -"years ago" => "lat temu", "File handling" => "Zarządzanie plikami", "Maximum upload size" => "Maksymalny rozmiar wysyłanego pliku", "max. possible: " => "max. możliwych", @@ -58,10 +50,10 @@ "New" => "Nowy", "Text file" => "Plik tekstowy", "Folder" => "Katalog", +"From link" => "Z linku", "Upload" => "Prześlij", "Cancel upload" => "Przestań wysyłać", "Nothing in here. Upload something!" => "Brak zawartości. Proszę wysłać pliki!", -"Share" => "Współdziel", "Download" => "Pobiera element", "Upload too large" => "Wysyłany plik ma za duży rozmiar", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Pliki które próbujesz przesłać, przekraczają maksymalną, dopuszczalną wielkość.", diff --git a/apps/files/l10n/pl_PL.php b/apps/files/l10n/pl_PL.php new file mode 100644 index 00000000000..157d9a41e4d --- /dev/null +++ b/apps/files/l10n/pl_PL.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"Save" => "Zapisz" +); diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php index 43f961156f6..97e5c94fb31 100644 --- a/apps/files/l10n/pt_BR.php +++ b/apps/files/l10n/pt_BR.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Não houve nenhum erro, o arquivo foi transferido com sucesso", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "O tamanho do arquivo excede o limed especifiicado em upload_max_filesize no php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "O arquivo enviado excede a diretiva upload_max_filesize no php.ini: ", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "O arquivo carregado excede o MAX_FILE_SIZE que foi especificado no formulário HTML", "The uploaded file was only partially uploaded" => "O arquivo foi transferido parcialmente", "No file was uploaded" => "Nenhum arquivo foi transferido", @@ -10,29 +10,35 @@ "Unshare" => "Descompartilhar", "Delete" => "Excluir", "Rename" => "Renomear", +"{new_name} already exists" => "{new_name} já existe", "replace" => "substituir", "suggest name" => "sugerir nome", "cancel" => "cancelar", +"replaced {new_name}" => "substituído {new_name}", "undo" => "desfazer", +"replaced {new_name} with {old_name}" => "Substituído {old_name} por {new_name} ", +"unshared {files}" => "{files} não compartilhados", +"deleted {files}" => "{files} apagados", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome inválido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' não são permitidos.", "generating ZIP-file, it may take some time." => "gerando arquivo ZIP, isso pode levar um tempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossível enviar seus arquivo como diretório ou ele tem 0 bytes.", "Upload Error" => "Erro de envio", +"Close" => "Fechar", "Pending" => "Pendente", "1 file uploading" => "enviando 1 arquivo", +"{count} files uploading" => "Enviando {count} arquivos", "Upload cancelled." => "Envio cancelado.", "File upload is in progress. Leaving the page now will cancel the upload." => "Upload em andamento. Sair da página agora resultará no cancelamento do envio.", -"Invalid name, '/' is not allowed." => "Nome inválido, '/' não é permitido.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nome de pasta inválido. O nome \"Shared\" é reservado pelo Owncloud", +"{count} files scanned" => "{count} arquivos scaneados", "error while scanning" => "erro durante verificação", "Name" => "Nome", "Size" => "Tamanho", "Modified" => "Modificado", -"seconds ago" => "segundos atrás", -"today" => "hoje", -"yesterday" => "ontem", -"last month" => "último mês", -"months ago" => "meses atrás", -"last year" => "último ano", -"years ago" => "anos atrás", +"1 folder" => "1 pasta", +"{count} folders" => "{count} pastas", +"1 file" => "1 arquivo", +"{count} files" => "{count} arquivos", "File handling" => "Tratamento de Arquivo", "Maximum upload size" => "Tamanho máximo para carregar", "max. possible: " => "max. possível:", @@ -44,10 +50,10 @@ "New" => "Novo", "Text file" => "Arquivo texto", "Folder" => "Pasta", +"From link" => "Do link", "Upload" => "Carregar", "Cancel upload" => "Cancelar upload", "Nothing in here. Upload something!" => "Nada aqui.Carrege alguma coisa!", -"Share" => "Compartilhar", "Download" => "Baixar", "Upload too large" => "Arquivo muito grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Os arquivos que você está tentando carregar excedeu o tamanho máximo para arquivos no servidor.", diff --git a/apps/files/l10n/pt_PT.php b/apps/files/l10n/pt_PT.php index 33bfee5b2d2..8c90fd47714 100644 --- a/apps/files/l10n/pt_PT.php +++ b/apps/files/l10n/pt_PT.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Sem erro, ficheiro enviado com sucesso", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "O ficheiro enviado excede a directiva upload_max_filesize no php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "O ficheiro enviado excede o limite permitido na directiva do php.ini upload_max_filesize", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "O ficheiro enviado excede o diretivo MAX_FILE_SIZE especificado no formulário HTML", "The uploaded file was only partially uploaded" => "O ficheiro enviado só foi enviado parcialmente", "No file was uploaded" => "Não foi enviado nenhum ficheiro", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "substituido {new_name} por {old_name}", "unshared {files}" => "{files} não partilhado(s)", "deleted {files}" => "{files} eliminado(s)", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome Inválido, os caracteres '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' não são permitidos.", "generating ZIP-file, it may take some time." => "a gerar o ficheiro ZIP, poderá demorar algum tempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "Não é possível fazer o envio do ficheiro devido a ser uma pasta ou ter 0 bytes", "Upload Error" => "Erro no envio", +"Close" => "Fechar", "Pending" => "Pendente", "1 file uploading" => "A enviar 1 ficheiro", "{count} files uploading" => "A carregar {count} ficheiros", "Upload cancelled." => "O envio foi cancelado.", "File upload is in progress. Leaving the page now will cancel the upload." => "Envio de ficheiro em progresso. Irá cancelar o envio se sair da página agora.", -"Invalid name, '/' is not allowed." => "Nome inválido, '/' não permitido.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nome de pasta inválido! O uso de \"Shared\" (Partilhado) está reservado pelo OwnCloud", "{count} files scanned" => "{count} ficheiros analisados", "error while scanning" => "erro ao analisar", "Name" => "Nome", @@ -37,16 +39,6 @@ "{count} folders" => "{count} pastas", "1 file" => "1 ficheiro", "{count} files" => "{count} ficheiros", -"seconds ago" => "há segundos", -"1 minute ago" => "há 1 minuto", -"{minutes} minutes ago" => "há {minutes} minutos", -"today" => "hoje", -"yesterday" => "ontem", -"{days} days ago" => "há {days} dias", -"last month" => "mês passado", -"months ago" => "há meses", -"last year" => "ano passado", -"years ago" => "há anos", "File handling" => "Manuseamento de ficheiros", "Maximum upload size" => "Tamanho máximo de envio", "max. possible: " => "max. possivel: ", @@ -58,10 +50,10 @@ "New" => "Novo", "Text file" => "Ficheiro de texto", "Folder" => "Pasta", +"From link" => "Da ligação", "Upload" => "Enviar", "Cancel upload" => "Cancelar envio", "Nothing in here. Upload something!" => "Vazio. Envie alguma coisa!", -"Share" => "Partilhar", "Download" => "Transferir", "Upload too large" => "Envio muito grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Os ficheiros que está a tentar enviar excedem o tamanho máximo de envio permitido neste servidor.", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index df0c4bd685b..34e8dc8a50e 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Nicio eroare, fișierul a fost încărcat cu succes", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Fișierul are o dimensiune mai mare decât cea specificată în variabila upload_max_filesize din php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Fișierul are o dimensiune mai mare decât variabile MAX_FILE_SIZE specificată în formularul HTML", "The uploaded file was only partially uploaded" => "Fișierul a fost încărcat doar parțial", "No file was uploaded" => "Niciun fișier încărcat", @@ -17,22 +16,15 @@ "generating ZIP-file, it may take some time." => "se generază fișierul ZIP, va dura ceva timp.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nu s-a putut încărca fișierul tău deoarece pare să fie un director sau are 0 bytes.", "Upload Error" => "Eroare la încărcare", +"Close" => "Închide", "Pending" => "În așteptare", "1 file uploading" => "un fișier se încarcă", "Upload cancelled." => "Încărcare anulată.", "File upload is in progress. Leaving the page now will cancel the upload." => "Fișierul este în curs de încărcare. Părăsirea paginii va întrerupe încărcarea.", -"Invalid name, '/' is not allowed." => "Nume invalid, '/' nu este permis.", "error while scanning" => "eroare la scanarea", "Name" => "Nume", "Size" => "Dimensiune", "Modified" => "Modificat", -"seconds ago" => "secunde în urmă", -"today" => "astăzi", -"yesterday" => "ieri", -"last month" => "ultima lună", -"months ago" => "luni în urmă", -"last year" => "ultimul an", -"years ago" => "ani în urmă", "File handling" => "Manipulare fișiere", "Maximum upload size" => "Dimensiune maximă admisă la încărcare", "max. possible: " => "max. posibil:", @@ -47,7 +39,6 @@ "Upload" => "Încarcă", "Cancel upload" => "Anulează încărcarea", "Nothing in here. Upload something!" => "Nimic aici. Încarcă ceva!", -"Share" => "Partajează", "Download" => "Descarcă", "Upload too large" => "Fișierul încărcat este prea mare", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Fișierul care l-ai încărcat a depășită limita maximă admisă la încărcare pe acest server.", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index 55901937b47..4b6d0a8b151 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Файл успешно загружен", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Файл превышает допустимые размеры (описаны как upload_max_filesize в php.ini)", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Файл превышает размер установленный upload_max_filesize в php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Файл превышает размер MAX_FILE_SIZE, указаный в HTML-форме", "The uploaded file was only partially uploaded" => "Файл был загружен не полностью", "No file was uploaded" => "Файл не был загружен", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "заменено {new_name} на {old_name}", "unshared {files}" => "не опубликованные {files}", "deleted {files}" => "удаленные {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Неправильное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' недопустимы.", "generating ZIP-file, it may take some time." => "создание ZIP-файла, это может занять некоторое время.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не удается загрузить файл размером 0 байт в каталог", "Upload Error" => "Ошибка загрузки", +"Close" => "Закрыть", "Pending" => "Ожидание", "1 file uploading" => "загружается 1 файл", "{count} files uploading" => "{count} файлов загружается", "Upload cancelled." => "Загрузка отменена.", "File upload is in progress. Leaving the page now will cancel the upload." => "Файл в процессе загрузки. Покинув страницу вы прервёте загрузку.", -"Invalid name, '/' is not allowed." => "Неверное имя, '/' не допускается.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Не правильное имя папки. Имя \"Shared\" резервировано в Owncloud", "{count} files scanned" => "{count} файлов просканировано", "error while scanning" => "ошибка во время санирования", "Name" => "Название", @@ -37,16 +39,6 @@ "{count} folders" => "{count} папок", "1 file" => "1 файл", "{count} files" => "{count} файлов", -"seconds ago" => "несколько секунд назад", -"1 minute ago" => "1 минуту назад", -"{minutes} minutes ago" => "{minutes} минут назад", -"today" => "сегодня", -"yesterday" => "вчера", -"{days} days ago" => "{days} дней назад", -"last month" => "в прошлом месяце", -"months ago" => "несколько месяцев назад", -"last year" => "в прошлом году", -"years ago" => "несколько лет назад", "File handling" => "Управление файлами", "Maximum upload size" => "Максимальный размер загружаемого файла", "max. possible: " => "макс. возможно: ", @@ -58,10 +50,10 @@ "New" => "Новый", "Text file" => "Текстовый файл", "Folder" => "Папка", +"From link" => "Из ссылки", "Upload" => "Загрузить", "Cancel upload" => "Отмена загрузки", "Nothing in here. Upload something!" => "Здесь ничего нет. Загрузите что-нибудь!", -"Share" => "Опубликовать", "Download" => "Скачать", "Upload too large" => "Файл слишком большой", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файлы, которые Вы пытаетесь загрузить, превышают лимит для файлов на этом сервере.", diff --git a/apps/files/l10n/ru_RU.php b/apps/files/l10n/ru_RU.php index 7630647e9ad..5a6c032ed96 100644 --- a/apps/files/l10n/ru_RU.php +++ b/apps/files/l10n/ru_RU.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Ошибка отсутствует, файл загружен успешно.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Размер загруженного файла превышает заданный в директиве upload_max_filesize в php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Размер загруженного", "The uploaded file was only partially uploaded" => "Загружаемый файл был загружен частично", "No file was uploaded" => "Файл не был загружен", @@ -19,15 +18,17 @@ "replaced {new_name} with {old_name}" => "заменено {новое_имя} с {старое_имя}", "unshared {files}" => "Cовместное использование прекращено {файлы}", "deleted {files}" => "удалено {файлы}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Некорректное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' не допустимы.", "generating ZIP-file, it may take some time." => "Создание ZIP-файла, это может занять некоторое время.", "Unable to upload your file as it is a directory or has 0 bytes" => "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией", "Upload Error" => "Ошибка загрузки", +"Close" => "Закрыть", "Pending" => "Ожидающий решения", "1 file uploading" => "загрузка 1 файла", "{count} files uploading" => "{количество} загружено файлов", "Upload cancelled." => "Загрузка отменена", "File upload is in progress. Leaving the page now will cancel the upload." => "Процесс загрузки файла. Если покинуть страницу сейчас, загрузка будет отменена.", -"Invalid name, '/' is not allowed." => "Неправильное имя, '/' не допускается.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Некорректное имя папки. Нименование \"Опубликовано\" зарезервировано ownCloud", "{count} files scanned" => "{количество} файлов отсканировано", "error while scanning" => "ошибка при сканировании", "Name" => "Имя", @@ -37,16 +38,6 @@ "{count} folders" => "{количество} папок", "1 file" => "1 файл", "{count} files" => "{количество} файлов", -"seconds ago" => "секунд назад", -"1 minute ago" => "1 минуту назад", -"{minutes} minutes ago" => "{minutes} минут назад", -"today" => "сегодня", -"yesterday" => "вчера", -"{days} days ago" => "{days} дней назад", -"last month" => "в прошлом месяце", -"months ago" => "месяцев назад", -"last year" => "в прошлом году", -"years ago" => "лет назад", "File handling" => "Работа с файлами", "Maximum upload size" => "Максимальный размер загружаемого файла", "max. possible: " => "Максимально возможный", @@ -58,10 +49,10 @@ "New" => "Новый", "Text file" => "Текстовый файл", "Folder" => "Папка", +"From link" => "По ссылке", "Upload" => "Загрузить ", "Cancel upload" => "Отмена загрузки", "Nothing in here. Upload something!" => "Здесь ничего нет. Загрузите что-нибудь!", -"Share" => "Сделать общим", "Download" => "Загрузить", "Upload too large" => "Загрузка слишком велика", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Размер файлов, которые Вы пытаетесь загрузить, превышает максимально допустимый размер для загрузки на данный сервер.", diff --git a/apps/files/l10n/si_LK.php b/apps/files/l10n/si_LK.php index 0f85061f8de..e256075896f 100644 --- a/apps/files/l10n/si_LK.php +++ b/apps/files/l10n/si_LK.php @@ -1,38 +1,48 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "නිවැරදි ව ගොනුව උඩුගත කෙරිනි", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "php.ini හි upload_max_filesize නියමයට වඩා උඩුගත කළ ගොනුව විශාලයි", +"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "උඩුගත කළ ගොනුවේ විශාලත්වය HTML පෝරමයේ නියම කළ ඇති MAX_FILE_SIZE විශාලත්වයට වඩා වැඩිය", "The uploaded file was only partially uploaded" => "උඩුගත කළ ගොනුවේ කොටසක් පමණක් උඩුගත විය", "No file was uploaded" => "කිසිදු ගොනවක් උඩුගත නොවිනි", "Missing a temporary folder" => "තාවකාලික ෆොල්ඩරයක් සොයාගත නොහැක", "Failed to write to disk" => "තැටිගත කිරීම අසාර්ථකයි", "Files" => "ගොනු", +"Unshare" => "නොබෙදු", "Delete" => "මකන්න", "Rename" => "නැවත නම් කරන්න", "replace" => "ප්රතිස්ථාපනය කරන්න", "suggest name" => "නමක් යෝජනා කරන්න", "cancel" => "අත් හරින්න", "undo" => "නිෂ්ප්රභ කරන්න", +"generating ZIP-file, it may take some time." => "ගොනුවක් සෑදෙමින් පවතී. කෙටි වේලාවක් ගත විය හැක", "Upload Error" => "උඩුගත කිරීමේ දෝශයක්", +"Close" => "වසන්න", +"1 file uploading" => "1 ගොනුවක් උඩගත කෙරේ", "Upload cancelled." => "උඩුගත කිරීම අත් හරින්න ලදී", +"File upload is in progress. Leaving the page now will cancel the upload." => "උඩුගතකිරීමක් සිදුවේ. පිටුව හැර යාමෙන් එය නැවතෙනු ඇත", +"error while scanning" => "පරීක්ෂා කිරීමේදී දෝෂයක්", "Name" => "නම", "Size" => "ප්රමාණය", "Modified" => "වෙනස් කළ", +"1 folder" => "1 ෆොල්ඩරයක්", "1 file" => "1 ගොනුවක්", -"today" => "අද", -"yesterday" => "පෙර දින", "File handling" => "ගොනු පරිහරණය", "Maximum upload size" => "උඩුගත කිරීමක උපරිම ප්රමාණය", "max. possible: " => "හැකි උපරිමය:", +"Needed for multi-file and folder downloads." => "බහු-ගොනු හා ෆොල්ඩර බාගත කිරීමට අවශ්යයි", +"Enable ZIP-download" => "ZIP-බාගත කිරීම් සක්රිය කරන්න", "0 is unlimited" => "0 යනු සීමාවක් නැති බවය", +"Maximum input size for ZIP files" => "ZIP ගොනු සඳහා දැමිය හැකි උපරිම විශාලතවය", "Save" => "සුරකින්න", "New" => "නව", "Text file" => "පෙළ ගොනුව", "Folder" => "ෆෝල්ඩරය", +"From link" => "යොමුවෙන්", "Upload" => "උඩුගත කිරීම", "Cancel upload" => "උඩුගත කිරීම අත් හරින්න", "Nothing in here. Upload something!" => "මෙහි කිසිවක් නොමැත. යමක් උඩුගත කරන්න", -"Share" => "බෙදාහදාගන්න", "Download" => "බාගත කිරීම", "Upload too large" => "උඩුගත කිරීම විශාල වැඩිය", -"The files you are trying to upload exceed the maximum size for file uploads on this server." => "ඔබ උඩුගත කිරීමට තැත් කරන ගොනු මෙම සේවාදායකයා උඩුගත කිරීමට ඉඩදී ඇති උපරිම ගොනු විශාලත්වයට වඩා වැඩිය" +"The files you are trying to upload exceed the maximum size for file uploads on this server." => "ඔබ උඩුගත කිරීමට තැත් කරන ගොනු මෙම සේවාදායකයා උඩුගත කිරීමට ඉඩදී ඇති උපරිම ගොනු විශාලත්වයට වඩා වැඩිය", +"Files are being scanned, please wait." => "ගොනු පරික්ෂා කෙරේ. මඳක් රැඳී සිටින්න", +"Current scanning" => "වර්තමාන පරික්ෂාව" ); diff --git a/apps/files/l10n/sk_SK.php b/apps/files/l10n/sk_SK.php index 2b7991b3a2a..21d9710f6ba 100644 --- a/apps/files/l10n/sk_SK.php +++ b/apps/files/l10n/sk_SK.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Nenastala žiadna chyba, súbor bol úspešne nahraný", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Nahraný súbor presiahol direktívu upload_max_filesize v php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Nahraný súbor predčil konfiguračnú direktívu upload_max_filesize v súbore php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Nahrávaný súbor presiahol MAX_FILE_SIZE direktívu, ktorá bola špecifikovaná v HTML formulári", "The uploaded file was only partially uploaded" => "Nahrávaný súbor bol iba čiastočne nahraný", "No file was uploaded" => "Žiaden súbor nebol nahraný", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "prepísaný {new_name} súborom {old_name}", "unshared {files}" => "zdieľanie zrušené pre {files}", "deleted {files}" => "zmazané {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nesprávne meno, '\\', '/', '<', '>', ':', '\"', '|', '?' a '*' nie sú povolené hodnoty.", "generating ZIP-file, it may take some time." => "generujem ZIP-súbor, môže to chvíľu trvať.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nemôžem nahrať súbor lebo je to priečinok alebo má 0 bajtov.", "Upload Error" => "Chyba odosielania", +"Close" => "Zavrieť", "Pending" => "Čaká sa", "1 file uploading" => "1 súbor sa posiela ", "{count} files uploading" => "{count} súborov odosielaných", "Upload cancelled." => "Odosielanie zrušené", "File upload is in progress. Leaving the page now will cancel the upload." => "Opustenie stránky zruší práve prebiehajúce odosielanie súboru.", -"Invalid name, '/' is not allowed." => "Chybný názov, \"/\" nie je povolené", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Nesprávne meno adresára. Použitie slova \"Shared\" (Zdieľané) je vyhradené službou ownCloud.", "{count} files scanned" => "{count} súborov prehľadaných", "error while scanning" => "chyba počas kontroly", "Name" => "Meno", @@ -37,16 +39,6 @@ "{count} folders" => "{count} priečinkov", "1 file" => "1 súbor", "{count} files" => "{count} súborov", -"seconds ago" => "pred sekundami", -"1 minute ago" => "pred minútou", -"{minutes} minutes ago" => "pred {minutes} minútami", -"today" => "dnes", -"yesterday" => "včera", -"{days} days ago" => "pred {days} dňami", -"last month" => "minulý mesiac", -"months ago" => "pred mesiacmi", -"last year" => "minulý rok", -"years ago" => "pred rokmi", "File handling" => "Nastavenie správanie k súborom", "Maximum upload size" => "Maximálna veľkosť odosielaného súboru", "max. possible: " => "najväčšie možné:", @@ -58,10 +50,10 @@ "New" => "Nový", "Text file" => "Textový súbor", "Folder" => "Priečinok", +"From link" => "Z odkazu", "Upload" => "Odoslať", "Cancel upload" => "Zrušiť odosielanie", "Nothing in here. Upload something!" => "Žiadny súbor. Nahrajte niečo!", -"Share" => "Zdielať", "Download" => "Stiahnuť", "Upload too large" => "Odosielaný súbor je príliš veľký", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Súbory, ktoré sa snažíte nahrať, presahujú maximálnu veľkosť pre nahratie súborov na tento server.", diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php index cb240ab33a8..c5ee6c422d5 100644 --- a/apps/files/l10n/sl.php +++ b/apps/files/l10n/sl.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Datoteka je uspešno naložena brez napak.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Naložena datoteka presega velikost, ki jo določa parameter upload_max_filesize v datoteki php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Naložena datoteka presega dovoljeno velikost. Le-ta je določena z vrstico upload_max_filesize v datoteki php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Naložena datoteka presega velikost, ki jo določa parameter MAX_FILE_SIZE v HTML obrazcu", "The uploaded file was only partially uploaded" => "Datoteka je le delno naložena", "No file was uploaded" => "Nobena datoteka ni bila naložena", @@ -17,28 +17,28 @@ "replaced {new_name}" => "zamenjano je ime {new_name}", "undo" => "razveljavi", "replaced {new_name} with {old_name}" => "zamenjano ime {new_name} z imenom {old_name}", +"unshared {files}" => "odstranjeno iz souporabe {files}", +"deleted {files}" => "izbrisano {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neveljavno ime, znaki '\\', '/', '<', '>', ':', '\"', '|', '?' in '*' niso dovoljeni.", "generating ZIP-file, it may take some time." => "Ustvarjanje datoteke ZIP. To lahko traja nekaj časa.", "Unable to upload your file as it is a directory or has 0 bytes" => "Pošiljanje ni mogoče, saj gre za mapo, ali pa je datoteka velikosti 0 bajtov.", "Upload Error" => "Napaka med nalaganjem", +"Close" => "Zapri", "Pending" => "V čakanju ...", "1 file uploading" => "Pošiljanje 1 datoteke", +"{count} files uploading" => "nalagam {count} datotek", "Upload cancelled." => "Pošiljanje je preklicano.", "File upload is in progress. Leaving the page now will cancel the upload." => "V teku je pošiljanje datoteke. Če zapustite to stran zdaj, bo pošiljanje preklicano.", -"Invalid name, '/' is not allowed." => "Neveljavno ime. Znak '/' ni dovoljen.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Neveljavno ime datoteke. Uporaba mape \"Share\" je rezervirana za ownCloud.", +"{count} files scanned" => "{count} files scanned", "error while scanning" => "napaka med pregledovanjem datotek", "Name" => "Ime", "Size" => "Velikost", "Modified" => "Spremenjeno", "1 folder" => "1 mapa", +"{count} folders" => "{count} map", "1 file" => "1 datoteka", -"seconds ago" => "sekund nazaj", -"1 minute ago" => "Pred 1 minuto", -"today" => "danes", -"yesterday" => "včeraj", -"last month" => "zadnji mesec", -"months ago" => "mesecev nazaj", -"last year" => "lansko leto", -"years ago" => "let nazaj", +"{count} files" => "{count} datotek", "File handling" => "Upravljanje z datotekami", "Maximum upload size" => "Največja velikost za pošiljanja", "max. possible: " => "največ mogoče:", @@ -50,10 +50,10 @@ "New" => "Nova", "Text file" => "Besedilna datoteka", "Folder" => "Mapa", +"From link" => "Iz povezave", "Upload" => "Pošlji", "Cancel upload" => "Prekliči pošiljanje", "Nothing in here. Upload something!" => "Tukaj ni ničesar. Naložite kaj!", -"Share" => "Souporaba", "Download" => "Prejmi", "Upload too large" => "Nalaganje ni mogoče, ker je preveliko", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Datoteke, ki jih želite naložiti, presegajo največjo dovoljeno velikost na tem strežniku.", diff --git a/apps/files/l10n/sr.php b/apps/files/l10n/sr.php index 99e4b12697c..48b258862b5 100644 --- a/apps/files/l10n/sr.php +++ b/apps/files/l10n/sr.php @@ -1,22 +1,62 @@ <?php $TRANSLATIONS = array( -"There is no error, the file uploaded with success" => "Нема грешке, фајл је успешно послат", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Послати фајл превазилази директиву upload_max_filesize из ", -"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Послати фајл превазилази директиву MAX_FILE_SIZE која је наведена у ХТМЛ форми", -"The uploaded file was only partially uploaded" => "Послати фајл је само делимично отпремљен!", -"No file was uploaded" => "Ниједан фајл није послат", +"There is no error, the file uploaded with success" => "Није дошло до грешке. Датотека је успешно отпремљена.", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Отпремљена датотека прелази смерницу upload_max_filesize у датотеци php.ini:", +"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Отпремљена датотека прелази смерницу MAX_FILE_SIZE која је наведена у HTML обрасцу", +"The uploaded file was only partially uploaded" => "Датотека је делимично отпремљена", +"No file was uploaded" => "Датотека није отпремљена", "Missing a temporary folder" => "Недостаје привремена фасцикла", -"Files" => "Фајлови", +"Failed to write to disk" => "Не могу да пишем на диск", +"Files" => "Датотеке", +"Unshare" => "Укини дељење", "Delete" => "Обриши", -"Name" => "Име", +"Rename" => "Преименуј", +"{new_name} already exists" => "{new_name} већ постоји", +"replace" => "замени", +"suggest name" => "предложи назив", +"cancel" => "откажи", +"replaced {new_name}" => "замењено {new_name}", +"undo" => "опозови", +"replaced {new_name} with {old_name}" => "замењено {new_name} са {old_name}", +"unshared {files}" => "укинуто дељење {files}", +"deleted {files}" => "обрисано {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Неисправан назив. Следећи знакови нису дозвољени: \\, /, <, >, :, \", |, ? и *.", +"generating ZIP-file, it may take some time." => "правим ZIP датотеку…", +"Unable to upload your file as it is a directory or has 0 bytes" => "Не могу да отпремим датотеку као фасциклу или она има 0 бајтова", +"Upload Error" => "Грешка при отпремању", +"Close" => "Затвори", +"Pending" => "На чекању", +"1 file uploading" => "Отпремам 1 датотеку", +"{count} files uploading" => "Отпремам {count} датотеке/а", +"Upload cancelled." => "Отпремање је прекинуто.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Отпремање датотеке је у току. Ако сада напустите страницу, прекинућете отпремање.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Неисправан назив фасцикле. „Дељено“ користи Оунклауд.", +"{count} files scanned" => "Скенирано датотека: {count}", +"error while scanning" => "грешка при скенирању", +"Name" => "Назив", "Size" => "Величина", -"Modified" => "Задња измена", -"Maximum upload size" => "Максимална величина пошиљке", -"New" => "Нови", -"Text file" => "текстуални фајл", +"Modified" => "Измењено", +"1 folder" => "1 фасцикла", +"{count} folders" => "{count} фасцикле/и", +"1 file" => "1 датотека", +"{count} files" => "{count} датотеке/а", +"File handling" => "Управљање датотекама", +"Maximum upload size" => "Највећа величина датотеке", +"max. possible: " => "највећа величина:", +"Needed for multi-file and folder downloads." => "Неопходно за преузимање вишеделних датотека и фасцикли.", +"Enable ZIP-download" => "Омогући преузимање у ZIP-у", +"0 is unlimited" => "0 је неограничено", +"Maximum input size for ZIP files" => "Највећа величина ZIP датотека", +"Save" => "Сачувај", +"New" => "Нова", +"Text file" => "текстуална датотека", "Folder" => "фасцикла", -"Upload" => "Пошаљи", -"Nothing in here. Upload something!" => "Овде нема ничег. Пошаљите нешто!", +"From link" => "Са везе", +"Upload" => "Отпреми", +"Cancel upload" => "Прекини отпремање", +"Nothing in here. Upload something!" => "Овде нема ничег. Отпремите нешто!", "Download" => "Преузми", -"Upload too large" => "Пошиљка је превелика", -"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Фајлови које желите да пошаљете превазилазе ограничење максималне величине пошиљке на овом серверу." +"Upload too large" => "Датотека је превелика", +"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Датотеке које желите да отпремите прелазе ограничење у величини.", +"Files are being scanned, please wait." => "Скенирам датотеке…", +"Current scanning" => "Тренутно скенирање" ); diff --git a/apps/files/l10n/sr@latin.php b/apps/files/l10n/sr@latin.php index d8c7ef18989..fddaf5840ce 100644 --- a/apps/files/l10n/sr@latin.php +++ b/apps/files/l10n/sr@latin.php @@ -1,16 +1,17 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Nema greške, fajl je uspešno poslat", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Poslati fajl prevazilazi direktivu upload_max_filesize iz ", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Poslati fajl prevazilazi direktivu MAX_FILE_SIZE koja je navedena u HTML formi", "The uploaded file was only partially uploaded" => "Poslati fajl je samo delimično otpremljen!", "No file was uploaded" => "Nijedan fajl nije poslat", "Missing a temporary folder" => "Nedostaje privremena fascikla", "Files" => "Fajlovi", "Delete" => "Obriši", +"Close" => "Zatvori", "Name" => "Ime", "Size" => "Veličina", "Modified" => "Zadnja izmena", "Maximum upload size" => "Maksimalna veličina pošiljke", +"Save" => "Snimi", "Upload" => "Pošalji", "Nothing in here. Upload something!" => "Ovde nema ničeg. Pošaljite nešto!", "Download" => "Preuzmi", diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php index d58ba61be33..bcc849242ac 100644 --- a/apps/files/l10n/sv.php +++ b/apps/files/l10n/sv.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Inga fel uppstod. Filen laddades upp utan problem", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Den uppladdade filen överskrider upload_max_filesize direktivet i php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Den uppladdade filen överskrider upload_max_filesize direktivet php.ini:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Den uppladdade filen överstiger MAX_FILE_SIZE direktivet som anges i HTML-formulär", "The uploaded file was only partially uploaded" => "Den uppladdade filen var endast delvis uppladdad", "No file was uploaded" => "Ingen fil blev uppladdad", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "ersatt {new_name} med {old_name}", "unshared {files}" => "stoppad delning {files}", "deleted {files}" => "raderade {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ogiltigt namn, '\\', '/', '<', '>', ':', '\"', '|', '?' och '*' är inte tillåtet.", "generating ZIP-file, it may take some time." => "genererar ZIP-fil, det kan ta lite tid.", "Unable to upload your file as it is a directory or has 0 bytes" => "Kunde inte ladda upp dina filer eftersom det antingen är en mapp eller har 0 bytes.", "Upload Error" => "Uppladdningsfel", +"Close" => "Stäng", "Pending" => "Väntar", "1 file uploading" => "1 filuppladdning", "{count} files uploading" => "{count} filer laddas upp", "Upload cancelled." => "Uppladdning avbruten.", "File upload is in progress. Leaving the page now will cancel the upload." => "Filuppladdning pågår. Lämnar du sidan så avbryts uppladdningen.", -"Invalid name, '/' is not allowed." => "Ogiltigt namn, '/' är inte tillåten.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Ogiltigt mappnamn. Ordet \"Delad\" är reserverat av ownCloud.", "{count} files scanned" => "{count} filer skannade", "error while scanning" => "fel vid skanning", "Name" => "Namn", @@ -37,16 +39,6 @@ "{count} folders" => "{count} mappar", "1 file" => "1 fil", "{count} files" => "{count} filer", -"seconds ago" => "sekunder sedan", -"1 minute ago" => "1 minut sedan", -"{minutes} minutes ago" => "{minutes} minuter sedan", -"today" => "i dag", -"yesterday" => "i går", -"{days} days ago" => "{days} dagar sedan", -"last month" => "förra månaden", -"months ago" => "månader sedan", -"last year" => "förra året", -"years ago" => "år sedan", "File handling" => "Filhantering", "Maximum upload size" => "Maximal storlek att ladda upp", "max. possible: " => "max. möjligt:", @@ -58,10 +50,10 @@ "New" => "Ny", "Text file" => "Textfil", "Folder" => "Mapp", +"From link" => "Från länk", "Upload" => "Ladda upp", "Cancel upload" => "Avbryt uppladdning", "Nothing in here. Upload something!" => "Ingenting här. Ladda upp något!", -"Share" => "Dela", "Download" => "Ladda ner", "Upload too large" => "För stor uppladdning", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Filerna du försöker ladda upp överstiger den maximala storleken för filöverföringar på servern.", diff --git a/apps/files/l10n/ta_LK.php b/apps/files/l10n/ta_LK.php index 27c408cdf3a..9399089bc78 100644 --- a/apps/files/l10n/ta_LK.php +++ b/apps/files/l10n/ta_LK.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "இங்கு வழு இல்லை, கோப்பு வெற்றிகரமாக பதிவேற்றப்பட்டது", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "பதிவேற்றப்பட்ட கோப்பானது php.ini இலுள்ள upload_max_filesize directive ஐ விட கூடியது", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "பதிவேற்றப்பட்ட கோப்பானது HTML படிவத்தில் குறிப்பிடப்பட்டுள்ள MAX_FILE_SIZE directive ஐ விட கூடியது", "The uploaded file was only partially uploaded" => "பதிவேற்றப்பட்ட கோப்பானது பகுதியாக மட்டுமே பதிவேற்றப்பட்டுள்ளது", "No file was uploaded" => "எந்த கோப்பும் பதிவேற்றப்படவில்லை", @@ -19,15 +18,17 @@ "replaced {new_name} with {old_name}" => "{new_name} ஆனது {old_name} இனால் மாற்றப்பட்டது", "unshared {files}" => "பகிரப்படாதது {கோப்புகள்}", "deleted {files}" => "நீக்கப்பட்டது {கோப்புகள்}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "செல்லுபடியற்ற பெயர்,'\\', '/', '<', '>', ':', '\"', '|', '?' மற்றும் '*' ஆகியன அனுமதிக்கப்படமாட்டாது.", "generating ZIP-file, it may take some time." => " ZIP கோப்பு உருவாக்கப்படுகின்றது, இது சில நேரம் ஆகலாம்.", "Unable to upload your file as it is a directory or has 0 bytes" => "அடைவு அல்லது 0 bytes ஐ கொண்டுள்ளதால் உங்களுடைய கோப்பை பதிவேற்ற முடியவில்லை", "Upload Error" => "பதிவேற்றல் வழு", +"Close" => "மூடுக", "Pending" => "நிலுவையிலுள்ள", "1 file uploading" => "1 கோப்பு பதிவேற்றப்படுகிறது", "{count} files uploading" => "{எண்ணிக்கை} கோப்புகள் பதிவேற்றப்படுகின்றது", "Upload cancelled." => "பதிவேற்றல் இரத்து செய்யப்பட்டுள்ளது", "File upload is in progress. Leaving the page now will cancel the upload." => "கோப்பு பதிவேற்றம் செயல்பாட்டில் உள்ளது. இந்தப் பக்கத்திலிருந்து வெறியேறுவதானது பதிவேற்றலை இரத்து செய்யும்.", -"Invalid name, '/' is not allowed." => "செல்லுபடியற்ற பெயர், '/ ' அனுமதிக்கப்படமாட்டாது", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "செல்லுபடியற்ற கோப்புறை பெயர். \"பகிர்வின்\" பாவனை Owncloud இனால் ஒதுக்கப்பட்டுள்ளது", "{count} files scanned" => "{எண்ணிக்கை} கோப்புகள் வருடப்பட்டது", "error while scanning" => "வருடும் போதான வழு", "Name" => "பெயர்", @@ -37,16 +38,6 @@ "{count} folders" => "{எண்ணிக்கை} கோப்புறைகள்", "1 file" => "1 கோப்பு", "{count} files" => "{எண்ணிக்கை} கோப்புகள்", -"seconds ago" => "செக்கன்களுக்கு முன்", -"1 minute ago" => "1 நிமிடத்திற்கு முன் ", -"{minutes} minutes ago" => "{நிமிடங்கள்} நிமிடங்களுக்கு முன் ", -"today" => "இன்று", -"yesterday" => "நேற்று", -"{days} days ago" => "{நாட்கள்} நாட்களுக்கு முன்", -"last month" => "கடந்த மாதம்", -"months ago" => "மாதங்களுக்கு முன", -"last year" => "கடந்த வருடம்", -"years ago" => "வருடங்களுக்கு முன்", "File handling" => "கோப்பு கையாளுதல்", "Maximum upload size" => "பதிவேற்றக்கூடிய ஆகக்கூடிய அளவு ", "max. possible: " => "ஆகக் கூடியது:", @@ -58,10 +49,10 @@ "New" => "புதிய", "Text file" => "கோப்பு உரை", "Folder" => "கோப்புறை", +"From link" => "இணைப்பிலிருந்து", "Upload" => "பதிவேற்றுக", "Cancel upload" => "பதிவேற்றலை இரத்து செய்க", "Nothing in here. Upload something!" => "இங்கு ஒன்றும் இல்லை. ஏதாவது பதிவேற்றுக!", -"Share" => "பகிர்வு", "Download" => "பதிவிறக்குக", "Upload too large" => "பதிவேற்றல் மிகப்பெரியது", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "நீங்கள் பதிவேற்ற முயற்சிக்கும் கோப்புகளானது இந்த சேவையகத்தில் கோப்பு பதிவேற்றக்கூடிய ஆகக்கூடிய அளவிலும் கூடியது.", diff --git a/apps/files/l10n/th_TH.php b/apps/files/l10n/th_TH.php index 2dc93d394cc..343138ba126 100644 --- a/apps/files/l10n/th_TH.php +++ b/apps/files/l10n/th_TH.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "ไม่มีข้อผิดพลาดใดๆ ไฟล์ถูกอัพโหลดเรียบร้อยแล้ว", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "ไฟล์ที่อัพโหลดมีขนาดเกินคำสั่ง upload_max_filesize ที่ระบุเอาไว้ในไฟล์ php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "ไฟล์ที่อัพโหลดมีขนาดเกินคำสั่ง MAX_FILE_SIZE ที่ระบุเอาไว้ในรูปแบบคำสั่งในภาษา HTML", "The uploaded file was only partially uploaded" => "ไฟล์ที่อัพโหลดยังไม่ได้ถูกอัพโหลดอย่างสมบูรณ์", "No file was uploaded" => "ยังไม่มีไฟล์ที่ถูกอัพโหลด", @@ -19,15 +18,17 @@ "replaced {new_name} with {old_name}" => "แทนที่ {new_name} ด้วย {old_name} แล้ว", "unshared {files}" => "ยกเลิกการแชร์แล้ว {files} ไฟล์", "deleted {files}" => "ลบไฟล์แล้ว {files} ไฟล์", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "ชื่อที่ใช้ไม่ถูกต้อง, '\\', '/', '<', '>', ':', '\"', '|', '?' และ '*' ไม่ได้รับอนุญาตให้ใช้งานได้", "generating ZIP-file, it may take some time." => "กำลังสร้างไฟล์บีบอัด ZIP อาจใช้เวลาสักครู่", "Unable to upload your file as it is a directory or has 0 bytes" => "ไม่สามารถอัพโหลดไฟล์ของคุณได้ เนื่องจากไฟล์ดังกล่าวเป็นไดเร็กทอรี่หรือมีขนาด 0 ไบต์", "Upload Error" => "เกิดข้อผิดพลาดในการอัพโหลด", +"Close" => "ปิด", "Pending" => "อยู่ระหว่างดำเนินการ", "1 file uploading" => "กำลังอัพโหลดไฟล์ 1 ไฟล์", "{count} files uploading" => "กำลังอัพโหลด {count} ไฟล์", "Upload cancelled." => "การอัพโหลดถูกยกเลิก", "File upload is in progress. Leaving the page now will cancel the upload." => "การอัพโหลดไฟล์กำลังอยู่ในระหว่างดำเนินการ การออกจากหน้าเว็บนี้จะทำให้การอัพโหลดถูกยกเลิก", -"Invalid name, '/' is not allowed." => "ชื่อที่ใช้ไม่ถูกต้อง '/' ไม่อนุญาตให้ใช้งาน", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "ชื่อโฟลเดอร์ที่ใช้ไม่ถูกต้อง การใช้งาน \"ถูกแชร์\" ถูกสงวนไว้เฉพาะ Owncloud เท่านั้น", "{count} files scanned" => "สแกนไฟล์แล้ว {count} ไฟล์", "error while scanning" => "พบข้อผิดพลาดในระหว่างการสแกนไฟล์", "Name" => "ชื่อ", @@ -37,16 +38,6 @@ "{count} folders" => "{count} โฟลเดอร์", "1 file" => "1 ไฟล์", "{count} files" => "{count} ไฟล์", -"seconds ago" => "วินาที ก่อนหน้านี้", -"1 minute ago" => "1 นาทีก่อนหน้านี้", -"{minutes} minutes ago" => "{minutes} นาทีก่อนหน้านี้", -"today" => "วันนี้", -"yesterday" => "เมื่อวานนี้", -"{days} days ago" => "{day} วันก่อนหน้านี้", -"last month" => "เดือนที่แล้ว", -"months ago" => "เดือน ที่ผ่านมา", -"last year" => "ปีที่แล้ว", -"years ago" => "ปี ที่ผ่านมา", "File handling" => "การจัดกาไฟล์", "Maximum upload size" => "ขนาดไฟล์สูงสุดที่อัพโหลดได้", "max. possible: " => "จำนวนสูงสุดที่สามารถทำได้: ", @@ -58,10 +49,10 @@ "New" => "อัพโหลดไฟล์ใหม่", "Text file" => "ไฟล์ข้อความ", "Folder" => "แฟ้มเอกสาร", +"From link" => "จากลิงก์", "Upload" => "อัพโหลด", "Cancel upload" => "ยกเลิกการอัพโหลด", "Nothing in here. Upload something!" => "ยังไม่มีไฟล์ใดๆอยู่ที่นี่ กรุณาอัพโหลดไฟล์!", -"Share" => "แชร์", "Download" => "ดาวน์โหลด", "Upload too large" => "ไฟล์ที่อัพโหลดมีขนาดใหญ่เกินไป", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "ไฟล์ที่คุณพยายามที่จะอัพโหลดมีขนาดเกินกว่าขนาดสูงสุดที่กำหนดไว้ให้อัพโหลดได้สำหรับเซิร์ฟเวอร์นี้", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index ea5cbe484fa..061ed1f3ae2 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -1,23 +1,31 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Bir hata yok, dosya başarıyla yüklendi", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Yüklenen dosya php.ini de belirtilen upload_max_filesize sınırını aşıyor", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Yüklenen dosya HTML formundaki MAX_FILE_SIZE sınırını aşıyor", "The uploaded file was only partially uploaded" => "Yüklenen dosyanın sadece bir kısmı yüklendi", "No file was uploaded" => "Hiç dosya yüklenmedi", "Missing a temporary folder" => "Geçici bir klasör eksik", "Failed to write to disk" => "Diske yazılamadı", "Files" => "Dosyalar", +"Unshare" => "Paylaşılmayan", "Delete" => "Sil", +"Rename" => "İsim değiştir.", +"{new_name} already exists" => "{new_name} zaten mevcut", "replace" => "değiştir", +"suggest name" => "Öneri ad", "cancel" => "iptal", +"replaced {new_name}" => "değiştirilen {new_name}", "undo" => "geri al", +"unshared {files}" => "paylaşılmamış {files}", +"deleted {files}" => "silinen {files}", "generating ZIP-file, it may take some time." => "ZIP dosyası oluşturuluyor, biraz sürebilir.", "Unable to upload your file as it is a directory or has 0 bytes" => "Dosyanızın boyutu 0 byte olduğundan veya bir dizin olduğundan yüklenemedi", "Upload Error" => "Yükleme hatası", +"Close" => "Kapat", "Pending" => "Bekliyor", +"1 file uploading" => "1 dosya yüklendi", "Upload cancelled." => "Yükleme iptal edildi.", "File upload is in progress. Leaving the page now will cancel the upload." => "Dosya yükleme işlemi sürüyor. Şimdi sayfadan ayrılırsanız işleminiz iptal olur.", -"Invalid name, '/' is not allowed." => "Geçersiz isim, '/' işaretine izin verilmiyor.", +"error while scanning" => "tararamada hata oluşdu", "Name" => "Ad", "Size" => "Boyut", "Modified" => "Değiştirilme", @@ -28,13 +36,13 @@ "Enable ZIP-download" => "ZIP indirmeyi aktif et", "0 is unlimited" => "0 limitsiz demektir", "Maximum input size for ZIP files" => "ZIP dosyaları için en fazla girdi sayısı", +"Save" => "Kaydet", "New" => "Yeni", "Text file" => "Metin dosyası", "Folder" => "Klasör", "Upload" => "Yükle", "Cancel upload" => "Yüklemeyi iptal et", "Nothing in here. Upload something!" => "Burada hiçbir şey yok. Birşeyler yükleyin!", -"Share" => "Paylaş", "Download" => "İndir", "Upload too large" => "Yüklemeniz çok büyük", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Yüklemeye çalıştığınız dosyalar bu sunucudaki maksimum yükleme boyutunu aşıyor.", diff --git a/apps/files/l10n/uk.php b/apps/files/l10n/uk.php index d487571d708..00491bcc2d6 100644 --- a/apps/files/l10n/uk.php +++ b/apps/files/l10n/uk.php @@ -1,32 +1,59 @@ <?php $TRANSLATIONS = array( -"There is no error, the file uploaded with success" => "Файл успішно відвантажено без помилок.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Розмір відвантаженого файлу перевищує директиву upload_max_filesize в php.ini", +"There is no error, the file uploaded with success" => "Файл успішно вивантажено без помилок.", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Розмір звантаження перевищує upload_max_filesize параметра в php.ini: ", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Розмір відвантаженого файлу перевищує директиву MAX_FILE_SIZE вказану в HTML формі", "The uploaded file was only partially uploaded" => "Файл відвантажено лише частково", "No file was uploaded" => "Не відвантажено жодного файлу", "Missing a temporary folder" => "Відсутній тимчасовий каталог", +"Failed to write to disk" => "Невдалося записати на диск", "Files" => "Файли", +"Unshare" => "Заборонити доступ", "Delete" => "Видалити", +"Rename" => "Перейменувати", +"{new_name} already exists" => "{new_name} вже існує", +"replace" => "заміна", +"suggest name" => "запропонуйте назву", +"cancel" => "відміна", +"replaced {new_name}" => "замінено {new_name}", "undo" => "відмінити", +"replaced {new_name} with {old_name}" => "замінено {new_name} на {old_name}", +"unshared {files}" => "неопубліковано {files}", +"deleted {files}" => "видалено {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Невірне ім'я, '\\', '/', '<', '>', ':', '\"', '|', '?' та '*' не дозволені.", "generating ZIP-file, it may take some time." => "Створення ZIP-файлу, це може зайняти певний час.", "Unable to upload your file as it is a directory or has 0 bytes" => "Неможливо завантажити ваш файл тому, що він тека або файл розміром 0 байт", "Upload Error" => "Помилка завантаження", +"Close" => "Закрити", "Pending" => "Очікування", +"1 file uploading" => "1 файл завантажується", +"{count} files uploading" => "{count} файлів завантажується", "Upload cancelled." => "Завантаження перервано.", -"Invalid name, '/' is not allowed." => "Некоректне ім'я, '/' не дозволено.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Виконується завантаження файлу. Закриття цієї сторінки приведе до відміни завантаження.", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Невірне ім'я каталогу. Використання \"Shared\" зарезервовано Owncloud", +"{count} files scanned" => "{count} файлів проскановано", +"error while scanning" => "помилка при скануванні", "Name" => "Ім'я", "Size" => "Розмір", "Modified" => "Змінено", +"1 folder" => "1 папка", +"{count} folders" => "{count} папок", +"1 file" => "1 файл", +"{count} files" => "{count} файлів", +"File handling" => "Робота з файлами", "Maximum upload size" => "Максимальний розмір відвантажень", "max. possible: " => "макс.можливе:", +"Needed for multi-file and folder downloads." => "Необхідно для мульти-файлового та каталогового завантаження.", +"Enable ZIP-download" => "Активувати ZIP-завантаження", "0 is unlimited" => "0 є безліміт", +"Maximum input size for ZIP files" => "Максимальний розмір завантажуємого ZIP файлу", +"Save" => "Зберегти", "New" => "Створити", "Text file" => "Текстовий файл", "Folder" => "Папка", +"From link" => "З посилання", "Upload" => "Відвантажити", "Cancel upload" => "Перервати завантаження", "Nothing in here. Upload something!" => "Тут нічого немає. Відвантажте що-небудь!", -"Share" => "Поділитися", "Download" => "Завантажити", "Upload too large" => "Файл занадто великий", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файли,що ви намагаєтесь відвантажити перевищують максимальний дозволений розмір файлів на цьому сервері.", diff --git a/apps/files/l10n/vi.php b/apps/files/l10n/vi.php index f152a8c989d..4f58e623178 100644 --- a/apps/files/l10n/vi.php +++ b/apps/files/l10n/vi.php @@ -1,11 +1,10 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "Không có lỗi, các tập tin đã được tải lên thành công", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Những tập tin được tải lên vượt quá upload_max_filesize được chỉ định trong php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Kích thước những tập tin tải lên vượt quá MAX_FILE_SIZE đã được quy định", "The uploaded file was only partially uploaded" => "Tập tin tải lên mới chỉ tải lên được một phần", "No file was uploaded" => "Không có tập tin nào được tải lên", "Missing a temporary folder" => "Không tìm thấy thư mục tạm", -"Failed to write to disk" => "Không thể ghi vào đĩa cứng", +"Failed to write to disk" => "Không thể ghi ", "Files" => "Tập tin", "Unshare" => "Không chia sẽ", "Delete" => "Xóa", @@ -19,15 +18,17 @@ "replaced {new_name} with {old_name}" => "đã thay thế {new_name} bằng {old_name}", "unshared {files}" => "hủy chia sẽ {files}", "deleted {files}" => "đã xóa {files}", -"generating ZIP-file, it may take some time." => "Tạo tập tinh ZIP, điều này có thể mất một ít thời gian", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Tên không hợp lệ, '\\', '/', '<', '>', ':', '\"', '|', '?' và '*' thì không được phép dùng.", +"generating ZIP-file, it may take some time." => "Tạo tập tin ZIP, điều này có thể làm mất một chút thời gian", "Unable to upload your file as it is a directory or has 0 bytes" => "Không thể tải lên tập tin này do nó là một thư mục hoặc kích thước tập tin bằng 0 byte", "Upload Error" => "Tải lên lỗi", +"Close" => "Đóng", "Pending" => "Chờ", "1 file uploading" => "1 tệp tin đang được tải lên", "{count} files uploading" => "{count} tập tin đang tải lên", "Upload cancelled." => "Hủy tải lên", "File upload is in progress. Leaving the page now will cancel the upload." => "Tập tin tải lên đang được xử lý. Nếu bạn rời khỏi trang bây giờ sẽ hủy quá trình này.", -"Invalid name, '/' is not allowed." => "Tên không hợp lệ ,không được phép dùng '/'", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "Tên thư mục không hợp lệ. Sử dụng \"Chia sẻ\" được dành riêng bởi Owncloud", "{count} files scanned" => "{count} tập tin đã được quét", "error while scanning" => "lỗi trong khi quét", "Name" => "Tên", @@ -37,19 +38,9 @@ "{count} folders" => "{count} thư mục", "1 file" => "1 tập tin", "{count} files" => "{count} tập tin", -"seconds ago" => "giây trước", -"1 minute ago" => "1 phút trước", -"{minutes} minutes ago" => "{minutes} phút trước", -"today" => "hôm nay", -"yesterday" => "hôm qua", -"{days} days ago" => "{days} ngày trước", -"last month" => "tháng trước", -"months ago" => "tháng trước", -"last year" => "năm trước", -"years ago" => "năm trước", "File handling" => "Xử lý tập tin", "Maximum upload size" => "Kích thước tối đa ", -"max. possible: " => "tối đa cho phép", +"max. possible: " => "tối đa cho phép:", "Needed for multi-file and folder downloads." => "Cần thiết cho tải nhiều tập tin và thư mục.", "Enable ZIP-download" => "Cho phép ZIP-download", "0 is unlimited" => "0 là không giới hạn", @@ -57,14 +48,14 @@ "Save" => "Lưu", "New" => "Mới", "Text file" => "Tập tin văn bản", -"Folder" => "Folder", +"Folder" => "Thư mục", +"From link" => "Từ liên kết", "Upload" => "Tải lên", "Cancel upload" => "Hủy upload", "Nothing in here. Upload something!" => "Không có gì ở đây .Hãy tải lên một cái gì đó !", -"Share" => "Chia sẻ", "Download" => "Tải xuống", -"Upload too large" => "File tải lên quá lớn", -"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Các tập tin bạn đang cố gắng tải lên vượt quá kích thước tối đa cho phép trên máy chủ này.", +"Upload too large" => "Tập tin tải lên quá lớn", +"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Các tập tin bạn đang tải lên vượt quá kích thước tối đa cho phép trên máy chủ .", "Files are being scanned, please wait." => "Tập tin đang được quét ,vui lòng chờ.", "Current scanning" => "Hiện tại đang quét" ); diff --git a/apps/files/l10n/zh_CN.GB2312.php b/apps/files/l10n/zh_CN.GB2312.php index f7e76c89bd4..ccf0efff050 100644 --- a/apps/files/l10n/zh_CN.GB2312.php +++ b/apps/files/l10n/zh_CN.GB2312.php @@ -1,6 +1,5 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "没有任何错误,文件上传成功了", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "上传的文件超过了php.ini指定的upload_max_filesize", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "上传的文件超过了HTML表单指定的MAX_FILE_SIZE", "The uploaded file was only partially uploaded" => "文件只有部分被上传", "No file was uploaded" => "没有上传完成的文件", @@ -10,29 +9,33 @@ "Unshare" => "取消共享", "Delete" => "删除", "Rename" => "重命名", +"{new_name} already exists" => "{new_name} 已存在", "replace" => "替换", "suggest name" => "推荐名称", "cancel" => "取消", +"replaced {new_name}" => "已替换 {new_name}", "undo" => "撤销", +"replaced {new_name} with {old_name}" => "已用 {old_name} 替换 {new_name}", +"unshared {files}" => "未分享的 {files}", +"deleted {files}" => "已删除的 {files}", "generating ZIP-file, it may take some time." => "正在生成ZIP文件,这可能需要点时间", "Unable to upload your file as it is a directory or has 0 bytes" => "不能上传你指定的文件,可能因为它是个文件夹或者大小为0", "Upload Error" => "上传错误", +"Close" => "关闭", "Pending" => "Pending", "1 file uploading" => "1 个文件正在上传", +"{count} files uploading" => "{count} 个文件正在上传", "Upload cancelled." => "上传取消了", "File upload is in progress. Leaving the page now will cancel the upload." => "文件正在上传。关闭页面会取消上传。", -"Invalid name, '/' is not allowed." => "非法文件名,\"/\"是不被许可的", +"{count} files scanned" => "{count} 个文件已扫描", "error while scanning" => "扫描出错", "Name" => "名字", "Size" => "大小", "Modified" => "修改日期", -"seconds ago" => "秒前", -"today" => "今天", -"yesterday" => "昨天", -"last month" => "上个月", -"months ago" => "月前", -"last year" => "去年", -"years ago" => "年前", +"1 folder" => "1 个文件夹", +"{count} folders" => "{count} 个文件夹", +"1 file" => "1 个文件", +"{count} files" => "{count} 个文件", "File handling" => "文件处理中", "Maximum upload size" => "最大上传大小", "max. possible: " => "最大可能", @@ -44,10 +47,10 @@ "New" => "新建", "Text file" => "文本文档", "Folder" => "文件夹", +"From link" => "来自链接", "Upload" => "上传", "Cancel upload" => "取消上传", "Nothing in here. Upload something!" => "这里没有东西.上传点什么!", -"Share" => "分享", "Download" => "下载", "Upload too large" => "上传的文件太大了", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "你正在试图上传的文件超过了此服务器支持的最大的文件大小.", diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php index 0046751b24c..8db652f003e 100644 --- a/apps/files/l10n/zh_CN.php +++ b/apps/files/l10n/zh_CN.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "没有发生错误,文件上传成功。", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "上传的文件大小超过了php.ini 中指定的upload_max_filesize", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "上传文件大小已超过php.ini中upload_max_filesize所规定的值", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "上传的文件超过了在HTML 表单中指定的MAX_FILE_SIZE", "The uploaded file was only partially uploaded" => "只上传了文件的一部分", "No file was uploaded" => "文件没有上传", @@ -19,15 +19,17 @@ "replaced {new_name} with {old_name}" => "已将 {old_name}替换成 {new_name}", "unshared {files}" => "取消了共享 {files}", "deleted {files}" => "删除了 {files}", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "无效名称,'\\', '/', '<', '>', ':', '\"', '|', '?' 和 '*' 不被允许使用。", "generating ZIP-file, it may take some time." => "正在生成 ZIP 文件,可能需要一些时间", "Unable to upload your file as it is a directory or has 0 bytes" => "无法上传文件,因为它是一个目录或者大小为 0 字节", "Upload Error" => "上传错误", +"Close" => "关闭", "Pending" => "操作等待中", "1 file uploading" => "1个文件上传中", "{count} files uploading" => "{count} 个文件上传中", "Upload cancelled." => "上传已取消", "File upload is in progress. Leaving the page now will cancel the upload." => "文件正在上传中。现在离开此页会导致上传动作被取消。", -"Invalid name, '/' is not allowed." => "非法的名称,不允许使用‘/’。", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "无效的文件夹名称。”Shared“ 是 Owncloud 保留字符。", "{count} files scanned" => "{count} 个文件已扫描。", "error while scanning" => "扫描时出错", "Name" => "名称", @@ -37,16 +39,6 @@ "{count} folders" => "{count} 个文件夹", "1 file" => "1 个文件", "{count} files" => "{count} 个文件", -"seconds ago" => "秒前", -"1 minute ago" => "一分钟前", -"{minutes} minutes ago" => "{minutes} 分钟前", -"today" => "今天", -"yesterday" => "昨天", -"{days} days ago" => "{days} 天前", -"last month" => "上月", -"months ago" => "月前", -"last year" => "去年", -"years ago" => "年前", "File handling" => "文件处理", "Maximum upload size" => "最大上传大小", "max. possible: " => "最大允许: ", @@ -58,10 +50,10 @@ "New" => "新建", "Text file" => "文本文件", "Folder" => "文件夹", +"From link" => "来自链接", "Upload" => "上传", "Cancel upload" => "取消上传", "Nothing in here. Upload something!" => "这里还什么都没有。上传些东西吧!", -"Share" => "共享", "Download" => "下载", "Upload too large" => "上传文件过大", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "您正尝试上传的文件超过了此服务器可以上传的最大容量限制", diff --git a/apps/files/l10n/zh_TW.php b/apps/files/l10n/zh_TW.php index 089381bcc5a..5333209eff7 100644 --- a/apps/files/l10n/zh_TW.php +++ b/apps/files/l10n/zh_TW.php @@ -1,24 +1,37 @@ <?php $TRANSLATIONS = array( "There is no error, the file uploaded with success" => "無錯誤,檔案上傳成功", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "上傳的檔案超過了 php.ini 中的 upload_max_filesize 設定", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "上傳黨案的超過 HTML 表單中指定 MAX_FILE_SIZE 限制", "The uploaded file was only partially uploaded" => "只有部分檔案被上傳", "No file was uploaded" => "無已上傳檔案", "Missing a temporary folder" => "遺失暫存資料夾", "Failed to write to disk" => "寫入硬碟失敗", "Files" => "檔案", +"Unshare" => "取消共享", "Delete" => "刪除", +"Rename" => "重新命名", +"{new_name} already exists" => "{new_name} 已經存在", "replace" => "取代", "cancel" => "取消", +"replaced {new_name}" => "已取代 {new_name}", +"undo" => "復原", +"replaced {new_name} with {old_name}" => "使用 {new_name} 取代 {old_name}", "generating ZIP-file, it may take some time." => "產生壓縮檔, 它可能需要一段時間.", "Unable to upload your file as it is a directory or has 0 bytes" => "無法上傳您的檔案因為它可能是一個目錄或檔案大小為0", "Upload Error" => "上傳發生錯誤", +"Close" => "關閉", +"1 file uploading" => "1 個檔案正在上傳", +"{count} files uploading" => "{count} 個檔案正在上傳", "Upload cancelled." => "上傳取消", "File upload is in progress. Leaving the page now will cancel the upload." => "檔案上傳中. 離開此頁面將會取消上傳.", -"Invalid name, '/' is not allowed." => "無效的名稱, '/'是不被允許的", +"Invalid folder name. Usage of \"Shared\" is reserved by Owncloud" => "無效的資料夾名稱. \"Shared\" 名稱已被 Owncloud 所保留使用", +"error while scanning" => "掃描時發生錯誤", "Name" => "名稱", "Size" => "大小", "Modified" => "修改", +"1 folder" => "1 個資料夾", +"{count} folders" => "{count} 個資料夾", +"1 file" => "1 個檔案", +"{count} files" => "{count} 個檔案", "File handling" => "檔案處理", "Maximum upload size" => "最大上傳容量", "max. possible: " => "最大允許: ", @@ -26,13 +39,13 @@ "Enable ZIP-download" => "啟用 Zip 下載", "0 is unlimited" => "0代表沒有限制", "Maximum input size for ZIP files" => "針對ZIP檔案最大輸入大小", +"Save" => "儲存", "New" => "新增", "Text file" => "文字檔", "Folder" => "資料夾", "Upload" => "上傳", "Cancel upload" => "取消上傳", "Nothing in here. Upload something!" => "沒有任何東西。請上傳內容!", -"Share" => "分享", "Download" => "下載", "Upload too large" => "上傳過大", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "你試圖上傳的檔案已超過伺服器的最大容量限制。 ", diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php index 5869ed21072..66fec4cd536 100644 --- a/apps/files/templates/admin.php +++ b/apps/files/templates/admin.php @@ -1,17 +1,25 @@ -<?php OCP\Util::addscript('files','admin'); ?> +<?php OCP\Util::addscript('files', 'admin'); ?> <form name="filesForm" action='#' method='post'> <fieldset class="personalblock"> <legend><strong><?php echo $l->t('File handling');?></strong></legend> <?php if($_['uploadChangable']):?> - <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>(<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/> + <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label> + <input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/> + (<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/> <?php endif;?> - <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"<?php if ($_['allowZipDownload']) echo ' checked="checked"'; ?> /> <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label> <br/> + <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" + title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>" + <?php if ($_['allowZipDownload']): ?> checked="checked"<?php endif; ?> /> + <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label><br/> - <input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> /> - <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </label><br /> + <input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>' + title="<?php echo $l->t( '0 is unlimited' ); ?>" + <?php if (!$_['allowZipDownload']): ?> disabled="disabled"<?php endif; ?> /> + <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </label><br /> <input type="hidden" value="<?php echo $_['requesttoken']; ?>" name="requesttoken" /> - <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" value="<?php echo $l->t( 'Save' ); ?>"/> + <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" + value="<?php echo $l->t( 'Save' ); ?>"/> </fieldset> -</form> +</form>
\ No newline at end of file diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 7cdff024ddf..bd34c9a76d9 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -3,31 +3,47 @@ <?php echo($_['breadcrumb']); ?> <?php if ($_['isCreatable']):?> <div class="actions <?php if (isset($_['files']) and count($_['files'])==0):?>emptyfolder<?php endif; ?>"> - <div id='new' class='button'> + <div id="new" class="button"> <a><?php echo $l->t('New');?></a> <ul class="popup popupTop"> - <li style="background-image:url('<?php echo OCP\mimetype_icon('text/plain') ?>')" data-type='file'><p><?php echo $l->t('Text file');?></p></li> - <li style="background-image:url('<?php echo OCP\mimetype_icon('dir') ?>')" data-type='folder'><p><?php echo $l->t('Folder');?></p></li> - <li style="background-image:url('<?php echo OCP\image_path('core','actions/public.png') ?>')" data-type='web'><p><?php echo $l->t('From link');?></p></li> + <li style="background-image:url('<?php echo OCP\mimetype_icon('text/plain') ?>')" + data-type='file'><p><?php echo $l->t('Text file');?></p></li> + <li style="background-image:url('<?php echo OCP\mimetype_icon('dir') ?>')" + data-type='folder'><p><?php echo $l->t('Folder');?></p></li> + <li style="background-image:url('<?php echo OCP\image_path('core', 'actions/public.png') ?>')" + data-type='web'><p><?php echo $l->t('From link');?></p></li> </ul> </div> - <div class="file_upload_wrapper svg"> - <form data-upload-id='1' id="data-upload-form" class="file_upload_form" action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target_1"> - <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload"> - <!-- Send the requesttoken, this is needed for older IE versions because they don't send the CSRF token via HTTP header in this case --> + <div id="upload" class="button"> + <form data-upload-id='1' + id="data-upload-form" + class="file_upload_form" + action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>" + method="post" + enctype="multipart/form-data" + target="file_upload_target_1"> + <input type="hidden" name="MAX_FILE_SIZE" id="max_upload" + value="<?php echo $_['uploadMaxFilesize'] ?>"> + <!-- Send the requesttoken, this is needed for older IE versions + because they don't send the CSRF token via HTTP header in this case --> <input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken"> - <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)"> + <input type="hidden" class="max_human_file_size" + value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)"> <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir"> - <input class="file_upload_start" type="file" name='files[]'/> - <a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo $l->t('Upload'); echo ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a> - <button class="file_upload_filename"></button> - <iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe> + <input type="file" id="file_upload_start" name='files[]'/> + <a href="#" class="svg" onclick="return false;" + title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a> + + <iframe name="file_upload_target_1" class="file_upload_target" src=""></iframe> </form> </div> - <div id="upload"> - <div id="uploadprogressbar"></div> - <input type="button" class="stop" style="display:none" value="<?php echo $l->t('Cancel upload');?>" onclick="javascript:Files.cancelUploads();" /> - </div> + <div id="uploadprogresswrapper"> + <div id="uploadprogressbar"></div> + <input type="button" class="stop" style="display:none" + value="<?php echo $l->t('Cancel upload');?>" + onclick="javascript:Files.cancelUploads();" + /> + </div> </div> <div id="file_action_panel"></div> @@ -49,21 +65,32 @@ <input type="checkbox" id="select_all" /> <span class='name'><?php echo $l->t( 'Name' ); ?></span> <span class='selectedActions'> -<!-- <a href="" class="share"><img class='svg' alt="Share" src="<?php echo OCP\image_path("core", "actions/share.svg"); ?>" /> <?php echo $l->t('Share')?></a> --> <?php if($_['allowZipDownload']) : ?> - <a href="" class="download"><img class='svg' alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /> <?php echo $l->t('Download')?></a> + <a href="" class="download"> + <img class="svg" alt="Download" + src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /> + <?php echo $l->t('Download')?> + </a> <?php endif; ?> </span> </th> <th id="headerSize"><?php echo $l->t( 'Size' ); ?></th> <th id="headerDate"> <span id="modified"><?php echo $l->t( 'Modified' ); ?></span> - <?php if ($_['permissions'] & OCP\Share::PERMISSION_DELETE): ?> + <?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?> <!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder --> <?php if ($_['dir'] == '/Shared'): ?> - <span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Unshare')?> <img class="svg" alt="<?php echo $l->t('Unshare')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span> + <span class="selectedActions"><a href="" class="delete"> + <?php echo $l->t('Unshare')?> + <img class="svg" alt="<?php echo $l->t('Unshare')?>" + src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /> + </a></span> <?php else: ?> - <span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Delete')?> <img class="svg" alt="<?php echo $l->t('Delete')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span> + <span class="selectedActions"><a href="" class="delete"> + <?php echo $l->t('Delete')?> + <img class="svg" alt="<?php echo $l->t('Delete')?>" + src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /> + </a></span> <?php endif; ?> <?php endif; ?> </th> @@ -76,7 +103,7 @@ <div id="editor"></div> <div id="uploadsize-message" title="<?php echo $l->t('Upload too large')?>"> <p> - <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?> + <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?> </p> </div> <div id="scanning-message"> diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index 37b6b63eabd..876cd19bc13 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -6,8 +6,11 @@ </div> <?php endif;?> <?php for($i=0; $i<count($_["breadcrumb"]); $i++): - $crumb = $_["breadcrumb"][$i]; ?> - <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo urlencode($crumb["dir"]);?>'> - <a href="<?php echo $_['baseURL'].urlencode($crumb['dir']); ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a> + $crumb = $_["breadcrumb"][$i]; + $dir = str_replace('+', '%20', urlencode($crumb["dir"])); ?> + <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" + data-dir='<?php echo $dir;?>' + style='background-image:url("<?php echo OCP\image_path('core', 'breadcrumb.png');?>")'> + <a href="<?php echo $_['baseURL'].$dir; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a> </div> - <?php endfor;?> + <?php endfor; diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index aaf9c5f57ee..4c765adb7af 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -1,32 +1,49 @@ <script type="text/javascript"> - <?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) { - echo "var publicListView = true;"; - } else { - echo "var publicListView = false;"; - } - ?> + <?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?> + var publicListView = true; + <?php else: ?> + var publicListView = false; + <?php endif; ?> </script> <?php foreach($_['files'] as $file): $simple_file_size = OCP\simple_file_size($file['size']); - $simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2 + // the bigger the file, the darker the shade of grey; megabytes*2 + $simple_size_color = intval(200-$file['size']/(1024*1024)*2); if($simple_size_color<0) $simple_size_color = 0; $relative_modified_date = OCP\relative_modified_date($file['mtime']); - $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14 + // the older the file, the brighter the shade of grey; days*14 + $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); if($relative_date_color>200) $relative_date_color = 200; - $name = str_replace('+','%20', urlencode($file['name'])); - $name = str_replace('%2F','/', $name); - $directory = str_replace('+','%20', urlencode($file['directory'])); - $directory = str_replace('%2F','/', $directory); ?> - <tr data-id="<?php echo $file['id']; ?>" data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-permissions='<?php echo $file['permissions']; ?>'> - <td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo OCP\mimetype_icon('dir'); else echo OCP\mimetype_icon($file['mimetype']); ?>)"> - <?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?> - <a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$directory.'/'.$name; else echo $_['downloadURL'].$directory.'/'.$name; ?>" title=""> + $name = str_replace('+', '%20', urlencode($file['name'])); + $name = str_replace('%2F', '/', $name); + $directory = str_replace('+', '%20', urlencode($file['directory'])); + $directory = str_replace('%2F', '/', $directory); ?> + <tr data-id="<?php echo $file['id']; ?>" + data-file="<?php echo $name;?>" + data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" + data-mime="<?php echo $file['mimetype']?>" + data-size='<?php echo $file['size'];?>' + data-permissions='<?php echo $file['permissions']; ?>'> + <td class="filename svg" + <?php if($file['type'] == 'dir'): ?> + style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)" + <?php else: ?> + style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)" + <?php endif; ?> + > + <?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?> + <?php if($file['type'] == 'dir'): ?> + <a class="name" href="<?php $_['baseURL'].$directory.'/'.$name; ?>)" title=""> + <?php else: ?> + <a class="name" href="<?php echo $_['downloadURL'].$directory.'/'.$name; ?>" title=""> + <?php endif; ?> <span class="nametext"> <?php if($file['type'] == 'dir'):?> <?php echo htmlspecialchars($file['name']);?> <?php else:?> - <?php echo htmlspecialchars($file['basename']);?><span class='extension'><?php echo $file['extension'];?></span> + <?php echo htmlspecialchars($file['basename']);?><span + class='extension'><?php echo $file['extension'];?></span> <?php endif;?> </span> <?php if($file['type'] == 'dir'):?> @@ -35,7 +52,19 @@ <?php endif;?> </a> </td> - <td class="filesize" title="<?php echo OCP\human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td> - <td class="date"><span class="modified" title="<?php echo $file['date']; ?>" style="color:rgb(<?php echo $relative_date_color.','.$relative_date_color.','.$relative_date_color ?>)"><?php echo $relative_modified_date; ?></span></td> + <td class="filesize" + title="<?php echo OCP\human_file_size($file['size']); ?>" + style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"> + <?php echo $simple_file_size; ?> + </td> + <td class="date"> + <span class="modified" + title="<?php echo $file['date']; ?>" + style="color:rgb(<?php echo $relative_date_color.',' + .$relative_date_color.',' + .$relative_date_color ?>)"> + <?php echo $relative_modified_date; ?> + </span> + </td> </tr> - <?php endforeach; ?> + <?php endforeach;
\ No newline at end of file diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index bb130a366be..2a30d0beb67 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -6,14 +6,16 @@ OC::$CLASSPATH['OC_FileProxy_Encryption'] = 'apps/files_encryption/lib/proxy.php OC_FileProxy::register(new OC_FileProxy_Encryption()); -OCP\Util::connectHook('OC_User','post_login','OC_Crypt','loginListener'); +OCP\Util::connectHook('OC_User', 'post_login', 'OC_Crypt', 'loginListener'); -stream_wrapper_register('crypt','OC_CryptStream'); +stream_wrapper_register('crypt', 'OC_CryptStream'); -if(!isset($_SESSION['enckey']) and OCP\User::isLoggedIn()) {//force the user to re-loggin if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled) +// force the user to re-loggin if the encryption key isn't unlocked +// (happens when a user is logged in before the encryption app is enabled) +if ( ! isset($_SESSION['enckey']) and OCP\User::isLoggedIn()) { OCP\User::logout(); header("Location: ".OC::$WEBROOT.'/'); exit(); } -OCP\App::registerAdmin('files_encryption', 'settings'); +OCP\App::registerAdmin('files_encryption', 'settings');
\ No newline at end of file diff --git a/apps/files_encryption/l10n/ar.php b/apps/files_encryption/l10n/ar.php new file mode 100644 index 00000000000..756a9d72799 --- /dev/null +++ b/apps/files_encryption/l10n/ar.php @@ -0,0 +1,6 @@ +<?php $TRANSLATIONS = array( +"Encryption" => "التشفير", +"Exclude the following file types from encryption" => "استبعد أنواع الملفات التالية من التشفير", +"None" => "لا شيء", +"Enable Encryption" => "تفعيل التشفير" +); diff --git a/apps/files_encryption/l10n/fa.php b/apps/files_encryption/l10n/fa.php index 0faa3f3aae7..01582e48e60 100644 --- a/apps/files_encryption/l10n/fa.php +++ b/apps/files_encryption/l10n/fa.php @@ -1,5 +1,6 @@ <?php $TRANSLATIONS = array( "Encryption" => "رمزگذاری", +"Exclude the following file types from encryption" => "نادیده گرفتن فایل های زیر برای رمز گذاری", "None" => "هیچکدام", "Enable Encryption" => "فعال کردن رمزگذاری" ); diff --git a/apps/files_encryption/l10n/gl.php b/apps/files_encryption/l10n/gl.php index 1434ff48aac..91d155ccad3 100644 --- a/apps/files_encryption/l10n/gl.php +++ b/apps/files_encryption/l10n/gl.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( -"Encryption" => "Encriptado", -"Exclude the following file types from encryption" => "Excluír os seguintes tipos de ficheiro da encriptación", +"Encryption" => "Cifrado", +"Exclude the following file types from encryption" => "Excluír os seguintes tipos de ficheiro do cifrado", "None" => "Nada", -"Enable Encryption" => "Habilitar encriptación" +"Enable Encryption" => "Activar o cifrado" ); diff --git a/apps/files_encryption/l10n/ko.php b/apps/files_encryption/l10n/ko.php new file mode 100644 index 00000000000..4702753435e --- /dev/null +++ b/apps/files_encryption/l10n/ko.php @@ -0,0 +1,6 @@ +<?php $TRANSLATIONS = array( +"Encryption" => "암호화", +"Exclude the following file types from encryption" => "다음 파일 형식은 암호화하지 않음", +"None" => "없음", +"Enable Encryption" => "암호화 사용" +); diff --git a/apps/files_encryption/l10n/sr.php b/apps/files_encryption/l10n/sr.php new file mode 100644 index 00000000000..4718780ee52 --- /dev/null +++ b/apps/files_encryption/l10n/sr.php @@ -0,0 +1,6 @@ +<?php $TRANSLATIONS = array( +"Encryption" => "Шифровање", +"Exclude the following file types from encryption" => "Не шифруј следеће типове датотека", +"None" => "Ништа", +"Enable Encryption" => "Омогући шифровање" +); diff --git a/apps/files_encryption/l10n/ta_LK.php b/apps/files_encryption/l10n/ta_LK.php new file mode 100644 index 00000000000..1d1ef74007e --- /dev/null +++ b/apps/files_encryption/l10n/ta_LK.php @@ -0,0 +1,6 @@ +<?php $TRANSLATIONS = array( +"Encryption" => "மறைக்குறியீடு", +"Exclude the following file types from encryption" => "மறைக்குறியாக்கலில் பின்வரும் கோப்பு வகைகளை நீக்கவும்", +"None" => "ஒன்றுமில்லை", +"Enable Encryption" => "மறைக்குறியாக்கலை இயலுமைப்படுத்துக" +); diff --git a/apps/files_encryption/l10n/vi.php b/apps/files_encryption/l10n/vi.php index cabf2da7dce..6365084fdc6 100644 --- a/apps/files_encryption/l10n/vi.php +++ b/apps/files_encryption/l10n/vi.php @@ -1,6 +1,6 @@ <?php $TRANSLATIONS = array( "Encryption" => "Mã hóa", "Exclude the following file types from encryption" => "Loại trừ các loại tập tin sau đây từ mã hóa", -"None" => "none", +"None" => "Không có gì hết", "Enable Encryption" => "BẬT mã hóa" ); diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 28bf3c5c93e..666fedb4e1b 100644 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -27,7 +27,8 @@ // - Setting if crypto should be on by default // - Add a setting "Don´t encrypt files larger than xx because of performance reasons" // - Transparent decrypt/encrypt in filesystem.php. Autodetect if a file is encrypted (.encrypted extension) -// - Don't use a password directly as encryption key. but a key which is stored on the server and encrypted with the user password. -> password change faster +// - Don't use a password directly as encryption key, but a key which is stored on the server and encrypted with the +// user password. -> password change faster // - IMPORTANT! Check if the block lenght of the encrypted data stays the same @@ -43,14 +44,14 @@ class OC_Crypt { self::init($params['uid'], $params['password']); } - public static function init($login,$password) { + public static function init($login, $password) { $view=new OC_FilesystemView('/'); - if(!$view->file_exists('/'.$login)) { + if ( ! $view->file_exists('/'.$login)) { $view->mkdir('/'.$login); } OC_FileProxy::$enabled=false; - if(!$view->file_exists('/'.$login.'/encryption.key')) {// does key exist? + if ( ! $view->file_exists('/'.$login.'/encryption.key')) {// does key exist? OC_Crypt::createkey($login, $password); } $key=$view->file_get_contents('/'.$login.'/encryption.key'); @@ -67,20 +68,20 @@ class OC_Crypt { * if the key is left out, the default handeler will be used */ public static function getBlowfish($key='') { - if($key) { + if ($key) { return new Crypt_Blowfish($key); - }else{ - if(!isset($_SESSION['enckey'])) { + } else { + if ( ! isset($_SESSION['enckey'])) { return false; } - if(!self::$bf) { + if ( ! self::$bf) { self::$bf=new Crypt_Blowfish($_SESSION['enckey']); } return self::$bf; } } - public static function createkey($username,$passcode) { + public static function createkey($username, $passcode) { // generate a random key $key=mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999); @@ -96,7 +97,7 @@ class OC_Crypt { } public static function changekeypasscode($oldPassword, $newPassword) { - if(OCP\User::isLoggedIn()) { + if (OCP\User::isLoggedIn()) { $username=OCP\USER::getUser(); $view=new OC_FilesystemView('/'.$username); @@ -151,7 +152,7 @@ class OC_Crypt { */ public static function encryptFile( $source, $target, $key='') { $handleread = fopen($source, "rb"); - if($handleread!=false) { + if ($handleread!=false) { $handlewrite = fopen($target, "wb"); while (!feof($handleread)) { $content = fread($handleread, 8192); @@ -174,12 +175,12 @@ class OC_Crypt { */ public static function decryptFile( $source, $target, $key='') { $handleread = fopen($source, "rb"); - if($handleread!=false) { + if ($handleread!=false) { $handlewrite = fopen($target, "wb"); while (!feof($handleread)) { $content = fread($handleread, 8192); $enccontent=OC_CRYPT::decrypt( $content, $key); - if(feof($handleread)) { + if (feof($handleread)) { $enccontent=rtrim($enccontent, "\0"); } fwrite($handlewrite, $enccontent); @@ -194,8 +195,8 @@ class OC_Crypt { */ public static function blockEncrypt($data, $key='') { $result=''; - while(strlen($data)) { - $result.=self::encrypt(substr($data, 0, 8192),$key); + while (strlen($data)) { + $result.=self::encrypt(substr($data, 0, 8192), $key); $data=substr($data, 8192); } return $result; @@ -204,15 +205,15 @@ class OC_Crypt { /** * decrypt data in 8192b sized blocks */ - public static function blockDecrypt($data, $key='',$maxLength=0) { + public static function blockDecrypt($data, $key='', $maxLength=0) { $result=''; - while(strlen($data)) { - $result.=self::decrypt(substr($data, 0, 8192),$key); + while (strlen($data)) { + $result.=self::decrypt(substr($data, 0, 8192), $key); $data=substr($data, 8192); } - if($maxLength>0) { + if ($maxLength>0) { return substr($result, 0, $maxLength); - }else{ + } else { return rtrim($result, "\0"); } } diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php index 0dd2d4b7b1e..d516c0c21b2 100644 --- a/apps/files_encryption/lib/cryptstream.php +++ b/apps/files_encryption/lib/cryptstream.php @@ -23,8 +23,9 @@ /** * transparently encrypted filestream * - * you can use it as wrapper around an existing stream by setting OC_CryptStream::$sourceStreams['foo']=array('path'=>$path,'stream'=>$stream) - * and then fopen('crypt://streams/foo'); + * you can use it as wrapper around an existing stream by setting + * OC_CryptStream::$sourceStreams['foo']=array('path'=>$path, 'stream'=>$stream) + * and then fopen('crypt://streams/foo'); */ class OC_CryptStream{ @@ -37,29 +38,29 @@ class OC_CryptStream{ private static $rootView; public function stream_open($path, $mode, $options, &$opened_path) { - if(!self::$rootView) { + if ( ! self::$rootView) { self::$rootView=new OC_FilesystemView(''); } $path=str_replace('crypt://', '', $path); - if(dirname($path)=='streams' and isset(self::$sourceStreams[basename($path)])) { + if (dirname($path)=='streams' and isset(self::$sourceStreams[basename($path)])) { $this->source=self::$sourceStreams[basename($path)]['stream']; $this->path=self::$sourceStreams[basename($path)]['path']; $this->size=self::$sourceStreams[basename($path)]['size']; - }else{ + } else { $this->path=$path; - if($mode=='w' or $mode=='w+' or $mode=='wb' or $mode=='wb+') { + if ($mode=='w' or $mode=='w+' or $mode=='wb' or $mode=='wb+') { $this->size=0; - }else{ + } else { $this->size=self::$rootView->filesize($path, $mode); } OC_FileProxy::$enabled=false;//disable fileproxies so we can open the source file $this->source=self::$rootView->fopen($path, $mode); OC_FileProxy::$enabled=true; - if(!is_resource($this->source)) { + if ( ! is_resource($this->source)) { OCP\Util::writeLog('files_encryption', 'failed to open '.$path, OCP\Util::ERROR); } } - if(is_resource($this->source)) { + if (is_resource($this->source)) { $this->meta=stream_get_meta_data($this->source); } return is_resource($this->source); @@ -78,19 +79,21 @@ class OC_CryptStream{ //$count will always be 8192 https://bugs.php.net/bug.php?id=21641 //This makes this function a lot simpler but will breake everything the moment it's fixed $this->writeCache=''; - if($count!=8192) { - OCP\Util::writeLog('files_encryption', 'php bug 21641 no longer holds, decryption will not work', OCP\Util::FATAL); + if ($count!=8192) { + OCP\Util::writeLog('files_encryption', + 'php bug 21641 no longer holds, decryption will not work', + OCP\Util::FATAL); die(); } $pos=ftell($this->source); $data=fread($this->source, 8192); - if(strlen($data)) { + if (strlen($data)) { $result=OC_Crypt::decrypt($data); - }else{ + } else { $result=''; } $length=$this->size-$pos; - if($length<8192) { + if ($length<8192) { $result=substr($result, 0, $length); } return $result; @@ -99,35 +102,35 @@ class OC_CryptStream{ public function stream_write($data) { $length=strlen($data); $currentPos=ftell($this->source); - if($this->writeCache) { + if ($this->writeCache) { $data=$this->writeCache.$data; $this->writeCache=''; } - if($currentPos%8192!=0) { + if ($currentPos%8192!=0) { //make sure we always start on a block start fseek($this->source, -($currentPos%8192), SEEK_CUR); - $encryptedBlock=fread($this->source,8192); + $encryptedBlock=fread($this->source, 8192); fseek($this->source, -($currentPos%8192), SEEK_CUR); $block=OC_Crypt::decrypt($encryptedBlock); $data=substr($block, 0, $currentPos%8192).$data; fseek($this->source, -($currentPos%8192), SEEK_CUR); } $currentPos=ftell($this->source); - while($remainingLength=strlen($data)>0) { - if($remainingLength<8192) { + while ($remainingLength=strlen($data)>0) { + if ($remainingLength<8192) { $this->writeCache=$data; $data=''; - }else{ + } else { $encrypted=OC_Crypt::encrypt(substr($data, 0, 8192)); fwrite($this->source, $encrypted); $data=substr($data, 8192); } } - $this->size=max($this->size,$currentPos+$length); + $this->size=max($this->size, $currentPos+$length); return $length; } - public function stream_set_option($option,$arg1,$arg2) { + public function stream_set_option($option, $arg1, $arg2) { switch($option) { case STREAM_OPTION_BLOCKING: stream_set_blocking($this->source, $arg1); @@ -157,7 +160,7 @@ class OC_CryptStream{ } private function flush() { - if($this->writeCache) { + if ($this->writeCache) { $encrypted=OC_Crypt::encrypt($this->writeCache); fwrite($this->source, $encrypted); $this->writeCache=''; @@ -166,7 +169,7 @@ class OC_CryptStream{ public function stream_close() { $this->flush(); - if($this->meta['mode']!='r' and $this->meta['mode']!='rb') { + if ($this->meta['mode']!='r' and $this->meta['mode']!='rb') { OC_FileCache::put($this->path, array('encrypted'=>true, 'size'=>$this->size), ''); } return fclose($this->source); diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 61b87ab5463..e8dbd95c29d 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -35,20 +35,22 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ * @return bool */ private static function shouldEncrypt($path) { - if(is_null(self::$enableEncryption)) { - self::$enableEncryption=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true'); + if (is_null(self::$enableEncryption)) { + self::$enableEncryption=(OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true')=='true'); } - if(!self::$enableEncryption) { + if ( ! self::$enableEncryption) { return false; } - if(is_null(self::$blackList)) { - self::$blackList=explode(',', OCP\Config::getAppValue('files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); + if (is_null(self::$blackList)) { + self::$blackList=explode(',', OCP\Config::getAppValue('files_encryption', + 'type_blacklist', + 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); } - if(self::isEncrypted($path)) { + if (self::isEncrypted($path)) { return true; } $extension=substr($path, strrpos($path, '.')+1); - if(array_search($extension, self::$blackList)===false) { + if (array_search($extension, self::$blackList)===false) { return true; } } @@ -59,71 +61,71 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ * @return bool */ private static function isEncrypted($path) { - $metadata=OC_FileCache_Cached::get($path,''); + $metadata=OC_FileCache_Cached::get($path, ''); return isset($metadata['encrypted']) and (bool)$metadata['encrypted']; } public function preFile_put_contents($path,&$data) { - if(self::shouldEncrypt($path)) { - if (!is_resource($data)) {//stream put contents should have been converter to fopen + if (self::shouldEncrypt($path)) { + if ( ! is_resource($data)) {//stream put contents should have been converter to fopen $size=strlen($data); $data=OC_Crypt::blockEncrypt($data); - OC_FileCache::put($path, array('encrypted'=>true,'size'=>$size),''); + OC_FileCache::put($path, array('encrypted'=>true,'size'=>$size), ''); } } } - public function postFile_get_contents($path,$data) { - if(self::isEncrypted($path)) { - $cached=OC_FileCache_Cached::get($path,''); - $data=OC_Crypt::blockDecrypt($data,'',$cached['size']); + public function postFile_get_contents($path, $data) { + if (self::isEncrypted($path)) { + $cached=OC_FileCache_Cached::get($path, ''); + $data=OC_Crypt::blockDecrypt($data, '', $cached['size']); } return $data; } public function postFopen($path,&$result) { - if(!$result) { + if ( ! $result) { return $result; } $meta=stream_get_meta_data($result); - if(self::isEncrypted($path)) { + if (self::isEncrypted($path)) { fclose($result); - $result=fopen('crypt://'.$path,$meta['mode']); - }elseif(self::shouldEncrypt($path) and $meta['mode']!='r' and $meta['mode']!='rb') { - if(OC_Filesystem::file_exists($path) and OC_Filesystem::filesize($path)>0) { + $result=fopen('crypt://'.$path, $meta['mode']); + } elseif (self::shouldEncrypt($path) and $meta['mode']!='r' and $meta['mode']!='rb') { + if (OC_Filesystem::file_exists($path) and OC_Filesystem::filesize($path)>0) { //first encrypt the target file so we don't end up with a half encrypted file - OCP\Util::writeLog('files_encryption','Decrypting '.$path.' before writing',OCP\Util::DEBUG); + OCP\Util::writeLog('files_encryption', 'Decrypting '.$path.' before writing', OCP\Util::DEBUG); $tmp=fopen('php://temp'); - OCP\Files::streamCopy($result,$tmp); + OCP\Files::streamCopy($result, $tmp); fclose($result); - OC_Filesystem::file_put_contents($path,$tmp); + OC_Filesystem::file_put_contents($path, $tmp); fclose($tmp); } - $result=fopen('crypt://'.$path,$meta['mode']); + $result=fopen('crypt://'.$path, $meta['mode']); } return $result; } - public function postGetMimeType($path,$mime) { - if(self::isEncrypted($path)) { - $mime=OCP\Files::getMimeType('crypt://'.$path,'w'); + public function postGetMimeType($path, $mime) { + if (self::isEncrypted($path)) { + $mime=OCP\Files::getMimeType('crypt://'.$path, 'w'); } return $mime; } - public function postStat($path,$data) { - if(self::isEncrypted($path)) { - $cached=OC_FileCache_Cached::get($path,''); + public function postStat($path, $data) { + if (self::isEncrypted($path)) { + $cached=OC_FileCache_Cached::get($path, ''); $data['size']=$cached['size']; } return $data; } - public function postFileSize($path,$size) { - if(self::isEncrypted($path)) { - $cached=OC_FileCache_Cached::get($path,''); + public function postFileSize($path, $size) { + if (self::isEncrypted($path)) { + $cached=OC_FileCache_Cached::get($path, ''); return $cached['size']; - }else{ + } else { return $size; } } diff --git a/apps/files_encryption/settings.php b/apps/files_encryption/settings.php index 168124a8d22..6b2b03211e2 100644 --- a/apps/files_encryption/settings.php +++ b/apps/files_encryption/settings.php @@ -7,12 +7,14 @@ */ $tmpl = new OCP\Template( 'files_encryption', 'settings'); -$blackList=explode(',', OCP\Config::getAppValue('files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); -$enabled=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true'); -$tmpl->assign('blacklist',$blackList); -$tmpl->assign('encryption_enabled',$enabled); +$blackList=explode(',', OCP\Config::getAppValue('files_encryption', + 'type_blacklist', + 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); +$enabled=(OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true')=='true'); +$tmpl->assign('blacklist', $blackList); +$tmpl->assign('encryption_enabled', $enabled); -OCP\Util::addscript('files_encryption','settings'); -OCP\Util::addscript('core','multiselect'); +OCP\Util::addscript('files_encryption', 'settings'); +OCP\Util::addscript('core', 'multiselect'); -return $tmpl->fetchPage(); +return $tmpl->fetchPage();
\ No newline at end of file diff --git a/apps/files_encryption/templates/settings.php b/apps/files_encryption/templates/settings.php index 55e8cf1542c..75df784e397 100644 --- a/apps/files_encryption/templates/settings.php +++ b/apps/files_encryption/templates/settings.php @@ -1,12 +1,14 @@ <form id="calendar"> <fieldset class="personalblock"> <strong><?php echo $l->t('Encryption'); ?></strong> - <?php echo $l->t("Exclude the following file types from encryption"); ?> + <?php echo $l->t('Exclude the following file types from encryption'); ?> <select id='encryption_blacklist' title="<?php echo $l->t('None')?>" multiple="multiple"> - <?php foreach($_["blacklist"] as $type): ?> + <?php foreach ($_['blacklist'] as $type): ?> <option selected="selected" value="<?php echo $type;?>"><?php echo $type;?></option> <?php endforeach;?> </select> - <input type='checkbox' id='enable_encryption' <?php if($_['encryption_enabled']) {echo 'checked="checked"';} ?>></input><label for='enable_encryption'><?php echo $l->t('Enable Encryption')?></label> + <input type='checkbox'<?php if ($_['encryption_enabled']): ?> checked="checked"<?php endif; ?> + id='enable_encryption' ></input> + <label for='enable_encryption'><?php echo $l->t('Enable Encryption')?></label> </fieldset> </form> diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php index a7bc2df0e12..0e119f55bea 100644 --- a/apps/files_encryption/tests/encryption.php +++ b/apps/files_encryption/tests/encryption.php @@ -11,46 +11,46 @@ class Test_Encryption extends UnitTestCase { $key=uniqid(); $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $source=file_get_contents($file); //nice large text file - $encrypted=OC_Crypt::encrypt($source,$key); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $encrypted=OC_Crypt::encrypt($source, $key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertNotEqual($encrypted,$source); - $this->assertEqual($decrypted,$source); + $this->assertNotEqual($encrypted, $source); + $this->assertEqual($decrypted, $source); - $chunk=substr($source,0,8192); - $encrypted=OC_Crypt::encrypt($chunk,$key); + $chunk=substr($source, 0, 8192); + $encrypted=OC_Crypt::encrypt($chunk, $key); $this->assertEqual(strlen($chunk), strlen($encrypted)); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted,$chunk); + $this->assertEqual($decrypted, $chunk); - $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); - $this->assertNotEqual($encrypted,$source); - $this->assertEqual($decrypted,$source); + $encrypted=OC_Crypt::blockEncrypt($source, $key); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); + $this->assertNotEqual($encrypted, $source); + $this->assertEqual($decrypted, $source); $tmpFileEncrypted=OCP\Files::tmpFile(); - OC_Crypt::encryptfile($file,$tmpFileEncrypted,$key); + OC_Crypt::encryptfile($file, $tmpFileEncrypted, $key); $encrypted=file_get_contents($tmpFileEncrypted); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); - $this->assertNotEqual($encrypted,$source); - $this->assertEqual($decrypted,$source); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); + $this->assertNotEqual($encrypted, $source); + $this->assertEqual($decrypted, $source); $tmpFileDecrypted=OCP\Files::tmpFile(); - OC_Crypt::decryptfile($tmpFileEncrypted,$tmpFileDecrypted,$key); + OC_Crypt::decryptfile($tmpFileEncrypted, $tmpFileDecrypted, $key); $decrypted=file_get_contents($tmpFileDecrypted); - $this->assertEqual($decrypted,$source); + $this->assertEqual($decrypted, $source); $file=OC::$SERVERROOT.'/core/img/weather-clear.png'; $source=file_get_contents($file); //binary file - $encrypted=OC_Crypt::encrypt($source,$key); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $encrypted=OC_Crypt::encrypt($source, $key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted,$source); + $this->assertEqual($decrypted, $source); - $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); - $this->assertEqual($decrypted,$source); + $encrypted=OC_Crypt::blockEncrypt($source, $key); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key); + $this->assertEqual($decrypted, $source); } @@ -59,14 +59,14 @@ class Test_Encryption extends UnitTestCase { $file=__DIR__.'/binary'; $source=file_get_contents($file); //binary file - $encrypted=OC_Crypt::encrypt($source,$key); - $decrypted=OC_Crypt::decrypt($encrypted,$key); + $encrypted=OC_Crypt::encrypt($source, $key); + $decrypted=OC_Crypt::decrypt($encrypted, $key); $decrypted=rtrim($decrypted, "\0"); - $this->assertEqual($decrypted,$source); + $this->assertEqual($decrypted, $source); - $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key, strlen($source)); - $this->assertEqual($decrypted,$source); + $encrypted=OC_Crypt::blockEncrypt($source, $key); + $decrypted=OC_Crypt::blockDecrypt($encrypted, $key, strlen($source)); + $this->assertEqual($decrypted, $source); } } diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php index c3c8f4a2db0..5aa617e7472 100644 --- a/apps/files_encryption/tests/proxy.php +++ b/apps/files_encryption/tests/proxy.php @@ -13,8 +13,8 @@ class Test_CryptProxy extends UnitTestCase { public function setUp() { $user=OC_User::getUser(); - $this->oldConfig=OCP\Config::getAppValue('files_encryption','enable_encryption','true'); - OCP\Config::setAppValue('files_encryption','enable_encryption','true'); + $this->oldConfig=OCP\Config::getAppValue('files_encryption','enable_encryption', 'true'); + OCP\Config::setAppValue('files_encryption', 'enable_encryption', 'true'); $this->oldKey=isset($_SESSION['enckey'])?$_SESSION['enckey']:null; @@ -30,7 +30,7 @@ class Test_CryptProxy extends UnitTestCase { //set up temporary storage OC_Filesystem::clearMounts(); - OC_Filesystem::mount('OC_Filestorage_Temporary', array(),'/'); + OC_Filesystem::mount('OC_Filestorage_Temporary', array(), '/'); OC_Filesystem::init('/'.$user.'/files'); @@ -41,8 +41,8 @@ class Test_CryptProxy extends UnitTestCase { } public function tearDown() { - OCP\Config::setAppValue('files_encryption','enable_encryption',$this->oldConfig); - if(!is_null($this->oldKey)) { + OCP\Config::setAppValue('files_encryption', 'enable_encryption', $this->oldConfig); + if ( ! is_null($this->oldKey)) { $_SESSION['enckey']=$this->oldKey; } } @@ -51,16 +51,16 @@ class Test_CryptProxy extends UnitTestCase { $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $original=file_get_contents($file); - OC_Filesystem::file_put_contents('/file',$original); + OC_Filesystem::file_put_contents('/file', $original); OC_FileProxy::$enabled=false; $stored=OC_Filesystem::file_get_contents('/file'); OC_FileProxy::$enabled=true; $fromFile=OC_Filesystem::file_get_contents('/file'); - $this->assertNotEqual($original,$stored); + $this->assertNotEqual($original, $stored); $this->assertEqual(strlen($original), strlen($fromFile)); - $this->assertEqual($original,$fromFile); + $this->assertEqual($original, $fromFile); } @@ -72,46 +72,46 @@ class Test_CryptProxy extends UnitTestCase { $view=new OC_FilesystemView('/'.OC_User::getUser()); $userDir='/'.OC_User::getUser().'/files'; - $rootView->file_put_contents($userDir.'/file',$original); + $rootView->file_put_contents($userDir.'/file', $original); OC_FileProxy::$enabled=false; $stored=$rootView->file_get_contents($userDir.'/file'); OC_FileProxy::$enabled=true; - $this->assertNotEqual($original,$stored); + $this->assertNotEqual($original, $stored); $fromFile=$rootView->file_get_contents($userDir.'/file'); - $this->assertEqual($original,$fromFile); + $this->assertEqual($original, $fromFile); $fromFile=$view->file_get_contents('files/file'); - $this->assertEqual($original,$fromFile); + $this->assertEqual($original, $fromFile); } public function testBinary() { $file=__DIR__.'/binary'; $original=file_get_contents($file); - OC_Filesystem::file_put_contents('/file',$original); + OC_Filesystem::file_put_contents('/file', $original); OC_FileProxy::$enabled=false; $stored=OC_Filesystem::file_get_contents('/file'); OC_FileProxy::$enabled=true; $fromFile=OC_Filesystem::file_get_contents('/file'); - $this->assertNotEqual($original,$stored); + $this->assertNotEqual($original, $stored); $this->assertEqual(strlen($original), strlen($fromFile)); - $this->assertEqual($original,$fromFile); + $this->assertEqual($original, $fromFile); $file=__DIR__.'/zeros'; $original=file_get_contents($file); - OC_Filesystem::file_put_contents('/file',$original); + OC_Filesystem::file_put_contents('/file', $original); OC_FileProxy::$enabled=false; $stored=OC_Filesystem::file_get_contents('/file'); OC_FileProxy::$enabled=true; $fromFile=OC_Filesystem::file_get_contents('/file'); - $this->assertNotEqual($original,$stored); + $this->assertNotEqual($original, $stored); $this->assertEqual(strlen($original), strlen($fromFile)); } } diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 5ea0da48017..e4af17d47b5 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -10,27 +10,27 @@ class Test_CryptStream extends UnitTestCase { private $tmpFiles=array(); function testStream() { - $stream=$this->getStream('test1','w', strlen('foobar')); - fwrite($stream,'foobar'); + $stream=$this->getStream('test1', 'w', strlen('foobar')); + fwrite($stream, 'foobar'); fclose($stream); - $stream=$this->getStream('test1','r', strlen('foobar')); - $data=fread($stream,6); + $stream=$this->getStream('test1', 'r', strlen('foobar')); + $data=fread($stream, 6); fclose($stream); - $this->assertEqual('foobar',$data); + $this->assertEqual('foobar', $data); $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; - $source=fopen($file,'r'); - $target=$this->getStream('test2','w',0); - OCP\Files::streamCopy($source,$target); + $source=fopen($file, 'r'); + $target=$this->getStream('test2', 'w', 0); + OCP\Files::streamCopy($source, $target); fclose($target); fclose($source); - $stream=$this->getStream('test2','r', filesize($file)); + $stream=$this->getStream('test2', 'r', filesize($file)); $data=stream_get_contents($stream); $original=file_get_contents($file); $this->assertEqual(strlen($original), strlen($data)); - $this->assertEqual($original,$data); + $this->assertEqual($original, $data); } /** @@ -40,46 +40,46 @@ class Test_CryptStream extends UnitTestCase { * @param int size * @return resource */ - function getStream($id,$mode,$size) { - if($id==='') { + function getStream($id, $mode, $size) { + if ($id==='') { $id=uniqid(); } - if(!isset($this->tmpFiles[$id])) { + if ( ! isset($this->tmpFiles[$id])) { $file=OCP\Files::tmpFile(); $this->tmpFiles[$id]=$file; - }else{ + } else { $file=$this->tmpFiles[$id]; } - $stream=fopen($file,$mode); - OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id,'stream'=>$stream,'size'=>$size); - return fopen('crypt://streams/'.$id,$mode); + $stream=fopen($file, $mode); + OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id, 'stream'=>$stream, 'size'=>$size); + return fopen('crypt://streams/'.$id, $mode); } function testBinary() { $file=__DIR__.'/binary'; $source=file_get_contents($file); - $stream=$this->getStream('test','w', strlen($source)); - fwrite($stream,$source); + $stream=$this->getStream('test', 'w', strlen($source)); + fwrite($stream, $source); fclose($stream); - $stream=$this->getStream('test','r', strlen($source)); + $stream=$this->getStream('test', 'r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); $this->assertEqual(strlen($data), strlen($source)); - $this->assertEqual($source,$data); + $this->assertEqual($source, $data); $file=__DIR__.'/zeros'; $source=file_get_contents($file); - $stream=$this->getStream('test2','w', strlen($source)); - fwrite($stream,$source); + $stream=$this->getStream('test2', 'w', strlen($source)); + fwrite($stream, $source); fclose($stream); - $stream=$this->getStream('test2','r', strlen($source)); + $stream=$this->getStream('test2', 'r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); $this->assertEqual(strlen($data), strlen($source)); - $this->assertEqual($source,$data); + $this->assertEqual($source, $data); } } diff --git a/apps/files_external/ajax/addMountPoint.php b/apps/files_external/ajax/addMountPoint.php index e08f805942f..4cd8871b310 100644 --- a/apps/files_external/ajax/addMountPoint.php +++ b/apps/files_external/ajax/addMountPoint.php @@ -10,4 +10,9 @@ if ($_POST['isPersonal'] == 'true') { OCP\JSON::checkAdminUser(); $isPersonal = false; } -OC_Mount_Config::addMountPoint($_POST['mountPoint'], $_POST['class'], $_POST['classOptions'], $_POST['mountType'], $_POST['applicable'], $isPersonal); +OC_Mount_Config::addMountPoint($_POST['mountPoint'], + $_POST['class'], + $_POST['classOptions'], + $_POST['mountType'], + $_POST['applicable'], + $isPersonal);
\ No newline at end of file diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php index 72eb30009d1..be60b415e1b 100644 --- a/apps/files_external/ajax/addRootCertificate.php +++ b/apps/files_external/ajax/addRootCertificate.php @@ -2,7 +2,7 @@ OCP\JSON::checkAppEnabled('files_external'); -if ( !($filename = $_FILES['rootcert_import']['name']) ) { +if ( ! ($filename = $_FILES['rootcert_import']['name']) ) { header("Location: settings/personal.php"); exit; } @@ -13,7 +13,7 @@ fclose($fh); $filename = $_FILES['rootcert_import']['name']; $view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_external/uploads'); -if (!$view->file_exists('')) $view->mkdir(''); +if ( ! $view->file_exists('')) $view->mkdir(''); $isValid = openssl_pkey_get_public($data); @@ -29,8 +29,10 @@ if ( $isValid ) { $view->file_put_contents($filename, $data); OC_Mount_Config::createCertificateBundle(); } else { - OCP\Util::writeLog("files_external", "Couldn't import SSL root certificate ($filename), allowed formats: PEM and DER", OCP\Util::WARN); + OCP\Util::writeLog('files_external', + 'Couldn\'t import SSL root certificate ('.$filename.'), allowed formats: PEM and DER', + OCP\Util::WARN); } -header("Location: settings/personal.php"); +header('Location: settings/personal.php'); exit; diff --git a/apps/files_external/ajax/dropbox.php b/apps/files_external/ajax/dropbox.php index f5923940dc9..58c41d69062 100644 --- a/apps/files_external/ajax/dropbox.php +++ b/apps/files_external/ajax/dropbox.php @@ -16,9 +16,13 @@ if (isset($_POST['app_key']) && isset($_POST['app_secret'])) { $callback = null; } $token = $oauth->getRequestToken(); - OCP\JSON::success(array('data' => array('url' => $oauth->getAuthorizeUrl($callback), 'request_token' => $token['token'], 'request_token_secret' => $token['token_secret']))); + OCP\JSON::success(array('data' => array('url' => $oauth->getAuthorizeUrl($callback), + 'request_token' => $token['token'], + 'request_token_secret' => $token['token_secret']))); } catch (Exception $exception) { - OCP\JSON::error(array('data' => array('message' => 'Fetching request tokens failed. Verify that your Dropbox app key and secret are correct.'))); + OCP\JSON::error(array('data' => array('message' => + 'Fetching request tokens failed. Verify that your Dropbox app key and secret are correct.') + )); } break; case 2: @@ -26,9 +30,12 @@ if (isset($_POST['app_key']) && isset($_POST['app_secret'])) { try { $oauth->setToken($_POST['request_token'], $_POST['request_token_secret']); $token = $oauth->getAccessToken(); - OCP\JSON::success(array('access_token' => $token['token'], 'access_token_secret' => $token['token_secret'])); + OCP\JSON::success(array('access_token' => $token['token'], + 'access_token_secret' => $token['token_secret'])); } catch (Exception $exception) { - OCP\JSON::error(array('data' => array('message' => 'Fetching access tokens failed. Verify that your Dropbox app key and secret are correct.'))); + OCP\JSON::error(array('data' => array('message' => + 'Fetching access tokens failed. Verify that your Dropbox app key and secret are correct.') + )); } } break; diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php index 4cd01c06cc9..c76c7618e4d 100644 --- a/apps/files_external/ajax/google.php +++ b/apps/files_external/ajax/google.php @@ -14,7 +14,9 @@ if (isset($_POST['step'])) { } else { $callback = null; } - $scope = 'https://docs.google.com/feeds/ https://docs.googleusercontent.com/ https://spreadsheets.google.com/feeds/'; + $scope = 'https://docs.google.com/feeds/' + .' https://docs.googleusercontent.com/' + .' https://spreadsheets.google.com/feeds/'; $url = 'https://www.google.com/accounts/OAuthGetRequestToken?scope='.urlencode($scope); $params = array('scope' => $scope, 'oauth_callback' => $callback); $request = OAuthRequest::from_consumer_and_token($consumer, null, 'GET', $url, $params); @@ -24,24 +26,35 @@ if (isset($_POST['step'])) { parse_str($response, $token); if (isset($token['oauth_token']) && isset($token['oauth_token_secret'])) { $authUrl = 'https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token='.$token['oauth_token']; - OCP\JSON::success(array('data' => array('url' => $authUrl, 'request_token' => $token['oauth_token'], 'request_token_secret' => $token['oauth_token_secret']))); + OCP\JSON::success(array('data' => array('url' => $authUrl, + 'request_token' => $token['oauth_token'], + 'request_token_secret' => $token['oauth_token_secret']))); } else { - OCP\JSON::error(array('data' => array('message' => 'Fetching request tokens failed. Error: '.$response))); + OCP\JSON::error(array('data' => array( + 'message' => 'Fetching request tokens failed. Error: '.$response + ))); } break; case 2: - if (isset($_POST['oauth_verifier']) && isset($_POST['request_token']) && isset($_POST['request_token_secret'])) { + if (isset($_POST['oauth_verifier']) + && isset($_POST['request_token']) + && isset($_POST['request_token_secret']) + ) { $token = new OAuthToken($_POST['request_token'], $_POST['request_token_secret']); $url = 'https://www.google.com/accounts/OAuthGetAccessToken'; - $request = OAuthRequest::from_consumer_and_token($consumer, $token, 'GET', $url, array('oauth_verifier' => $_POST['oauth_verifier'])); + $request = OAuthRequest::from_consumer_and_token($consumer, $token, 'GET', $url, + array('oauth_verifier' => $_POST['oauth_verifier'])); $request->sign_request($sigMethod, $consumer, $token); $response = send_signed_request('GET', $url, array($request->to_header()), null, false); $token = array(); parse_str($response, $token); if (isset($token['oauth_token']) && isset($token['oauth_token_secret'])) { - OCP\JSON::success(array('access_token' => $token['oauth_token'], 'access_token_secret' => $token['oauth_token_secret'])); + OCP\JSON::success(array('access_token' => $token['oauth_token'], + 'access_token_secret' => $token['oauth_token_secret'])); } else { - OCP\JSON::error(array('data' => array('message' => 'Fetching access tokens failed. Error: '.$response))); + OCP\JSON::error(array('data' => array( + 'message' => 'Fetching access tokens failed. Error: '.$response + ))); } } break; diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 89f346574e2..0dc983ca8ad 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -142,7 +142,7 @@ $(document).ready(function() { $('td.remove>img').live('click', function() { var tr = $(this).parent().parent(); var mountPoint = $(tr).find('.mountPoint input').val(); - if (!mountPoint) { + if ( ! mountPoint) { var row=this.parentNode.parentNode; $.post(OC.filePath('files_external', 'ajax', 'removeRootCertificate.php'), { cert: row.id }); $(tr).remove(); diff --git a/apps/files_external/l10n/ar.php b/apps/files_external/l10n/ar.php new file mode 100644 index 00000000000..06837d5085c --- /dev/null +++ b/apps/files_external/l10n/ar.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "مجموعات", +"Users" => "المستخدمين", +"Delete" => "حذف" +); diff --git a/apps/files_external/l10n/bg_BG.php b/apps/files_external/l10n/bg_BG.php new file mode 100644 index 00000000000..48779581846 --- /dev/null +++ b/apps/files_external/l10n/bg_BG.php @@ -0,0 +1,4 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Групи", +"Delete" => "Изтриване" +); diff --git a/apps/files_external/l10n/ca.php b/apps/files_external/l10n/ca.php index fc6706381b7..e8a922ca0f9 100644 --- a/apps/files_external/l10n/ca.php +++ b/apps/files_external/l10n/ca.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "Ompliu els camps requerits", "Please provide a valid Dropbox app key and secret." => "Proporcioneu una clau d'aplicació i secret vàlids per a Dropbox", "Error configuring Google Drive storage" => "Error en configurar l'emmagatzemament Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Avís:</b> \"smbclient\" no està instal·lat. No es pot muntar la compartició CIFS/SMB. Demaneu a l'administrador del sistema que l'instal·li.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Avís:</b> El suport FTP per PHP no està activat o no està instal·lat. No es pot muntar la compartició FTP. Demaneu a l'administrador del sistema que l'instal·li.", "External Storage" => "Emmagatzemament extern", "Mount point" => "Punt de muntatge", "Backend" => "Dorsal", diff --git a/apps/files_external/l10n/cs_CZ.php b/apps/files_external/l10n/cs_CZ.php index 51951c19bfd..9c647fad939 100644 --- a/apps/files_external/l10n/cs_CZ.php +++ b/apps/files_external/l10n/cs_CZ.php @@ -5,12 +5,14 @@ "Fill out all required fields" => "Vyplňte všechna povinná pole", "Please provide a valid Dropbox app key and secret." => "Zadejte, prosím, platný klíč a bezpečnostní frázi aplikace Dropbox.", "Error configuring Google Drive storage" => "Chyba při nastavení úložiště Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Varování:</b> není nainstalován program \"smbclient\". Není možné připojení oddílů CIFS/SMB. Prosím požádejte svého správce systému ať jej nainstaluje.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Varování:</b> není nainstalována, nebo povolena, podpora FTP v PHP. Není možné připojení oddílů FTP. Prosím požádejte svého správce systému ať ji nainstaluje.", "External Storage" => "Externí úložiště", "Mount point" => "Přípojný bod", "Backend" => "Podpůrná vrstva", "Configuration" => "Nastavení", "Options" => "Možnosti", -"Applicable" => "Platný", +"Applicable" => "Přístupný pro", "Add mount point" => "Přidat bod připojení", "None set" => "Nenastaveno", "All Users" => "Všichni uživatelé", diff --git a/apps/files_external/l10n/de.php b/apps/files_external/l10n/de.php index 5d57e5e4598..196b3af2038 100644 --- a/apps/files_external/l10n/de.php +++ b/apps/files_external/l10n/de.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "Bitte alle notwendigen Felder füllen", "Please provide a valid Dropbox app key and secret." => "Bitte trage einen gültigen Dropbox-App-Key mit Secret ein.", "Error configuring Google Drive storage" => "Fehler beim Einrichten von Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Warnung:</b> \"smbclient\" ist nicht installiert. Das Einhängen von CIFS/SMB-Freigaben ist nicht möglich. Bitte Deinen System-Verwalter dies zu installieren.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Warnung:</b> \"smbclient\" ist nicht aktiv oder nicht installiert. Das Einhängen von FTP-Freigaben ist nicht möglich. Bitte Deinen System-Verwalter dies zu installieren.", "External Storage" => "Externer Speicher", "Mount point" => "Mount-Point", "Backend" => "Backend", diff --git a/apps/files_external/l10n/es.php b/apps/files_external/l10n/es.php index 32a0d896874..d4e56627649 100644 --- a/apps/files_external/l10n/es.php +++ b/apps/files_external/l10n/es.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "Rellenar todos los campos requeridos", "Please provide a valid Dropbox app key and secret." => "Por favor , proporcione un secreto y una contraseña válida de la app Dropbox.", "Error configuring Google Drive storage" => "Error configurando el almacenamiento de Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Advertencia:</b> El cliente smb (smbclient) no se encuentra instalado. El montado de archivos o ficheros CIFS/SMB no es posible. Por favor pida al administrador de su sistema que lo instale.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Advertencia:</b> El soporte de FTP en PHP no se encuentra instalado. El montado de archivos o ficheros FTP no es posible. Por favor pida al administrador de su sistema que lo instale.", "External Storage" => "Almacenamiento externo", "Mount point" => "Punto de montaje", "Backend" => "Motor", diff --git a/apps/files_external/l10n/es_AR.php b/apps/files_external/l10n/es_AR.php index 055fbe782e7..aa117e80274 100644 --- a/apps/files_external/l10n/es_AR.php +++ b/apps/files_external/l10n/es_AR.php @@ -5,6 +5,8 @@ "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", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Advertencia:</b> El cliente smb (smbclient) no se encuentra instalado. El montado de archivos o ficheros CIFS/SMB no es posible. Por favor pida al administrador de su sistema que lo instale.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Advertencia:</b> El soporte de FTP en PHP no se encuentra instalado. El montado de archivos o ficheros FTP no es posible. Por favor pida al administrador de su sistema que lo instale.", "External Storage" => "Almacenamiento externo", "Mount point" => "Punto de montaje", "Backend" => "Motor", diff --git a/apps/files_external/l10n/fa.php b/apps/files_external/l10n/fa.php new file mode 100644 index 00000000000..b866201361a --- /dev/null +++ b/apps/files_external/l10n/fa.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "گروه ها", +"Users" => "کاربران", +"Delete" => "حذف" +); diff --git a/apps/files_external/l10n/gl.php b/apps/files_external/l10n/gl.php index 3830efb70bf..5024dac4d8c 100644 --- a/apps/files_external/l10n/gl.php +++ b/apps/files_external/l10n/gl.php @@ -1,18 +1,24 @@ <?php $TRANSLATIONS = array( +"Access granted" => "Concedeuse acceso", +"Error configuring Dropbox storage" => "Produciuse un erro ao configurar o almacenamento en Dropbox", +"Grant access" => "Permitir o acceso", +"Fill out all required fields" => "Cubrir todos os campos obrigatorios", +"Please provide a valid Dropbox app key and secret." => "Dá o segredo e a chave correcta do aplicativo de Dropbox.", +"Error configuring Google Drive storage" => "Produciuse un erro ao configurar o almacenamento en Google Drive", "External Storage" => "Almacenamento externo", "Mount point" => "Punto de montaxe", -"Backend" => "Almacén", +"Backend" => "Infraestrutura", "Configuration" => "Configuración", "Options" => "Opcións", -"Applicable" => "Aplicable", -"Add mount point" => "Engadir punto de montaxe", -"None set" => "Non establecido", -"All Users" => "Tódolos usuarios", +"Applicable" => "Aplicábel", +"Add mount point" => "Engadir un punto de montaxe", +"None set" => "Ningún definido", +"All Users" => "Todos os usuarios", "Groups" => "Grupos", "Users" => "Usuarios", "Delete" => "Eliminar", -"Enable User External Storage" => "Habilitar almacenamento externo do usuario", +"Enable User External Storage" => "Activar o almacenamento externo do usuario", "Allow users to mount their own external storage" => "Permitir aos usuarios montar os seus propios almacenamentos externos", -"SSL root certificates" => "Certificados raíz SSL", -"Import Root Certificate" => "Importar Certificado Raíz" +"SSL root certificates" => "Certificados SSL root", +"Import Root Certificate" => "Importar o certificado root" ); diff --git a/apps/files_external/l10n/he.php b/apps/files_external/l10n/he.php index 12dfa62e7c8..3dc04d4e79c 100644 --- a/apps/files_external/l10n/he.php +++ b/apps/files_external/l10n/he.php @@ -1,7 +1,18 @@ <?php $TRANSLATIONS = array( +"Access granted" => "הוענקה גישה", +"Error configuring Dropbox storage" => "אירעה שגיאה בעת הגדרת אחסון ב־Dropbox", +"Grant access" => "הענקת גישה", +"Fill out all required fields" => "נא למלא את כל השדות הנדרשים", +"Please provide a valid Dropbox app key and secret." => "נא לספק קוד יישום וסוד תקניים של Dropbox.", +"Error configuring Google Drive storage" => "אירעה שגיאה בעת הגדרת אחסון ב־Google Drive", "External Storage" => "אחסון חיצוני", +"Mount point" => "נקודת עגינה", +"Backend" => "מנגנון", "Configuration" => "הגדרות", "Options" => "אפשרויות", +"Applicable" => "ניתן ליישום", +"Add mount point" => "הוספת נקודת עגינה", +"None set" => "לא הוגדרה", "All Users" => "כל המשתמשים", "Groups" => "קבוצות", "Users" => "משתמשים", diff --git a/apps/files_external/l10n/hr.php b/apps/files_external/l10n/hr.php new file mode 100644 index 00000000000..24f27ddf81b --- /dev/null +++ b/apps/files_external/l10n/hr.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Grupe", +"Users" => "Korisnici", +"Delete" => "Obriši" +); diff --git a/apps/files_external/l10n/hu_HU.php b/apps/files_external/l10n/hu_HU.php new file mode 100644 index 00000000000..e915c34b950 --- /dev/null +++ b/apps/files_external/l10n/hu_HU.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Csoportok", +"Users" => "Felhasználók", +"Delete" => "Törlés" +); diff --git a/apps/files_external/l10n/ia.php b/apps/files_external/l10n/ia.php new file mode 100644 index 00000000000..f57f96688bf --- /dev/null +++ b/apps/files_external/l10n/ia.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Gruppos", +"Users" => "Usatores", +"Delete" => "Deler" +); diff --git a/apps/files_external/l10n/it.php b/apps/files_external/l10n/it.php index 49effebdfc3..98c83146d48 100644 --- a/apps/files_external/l10n/it.php +++ b/apps/files_external/l10n/it.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "Compila tutti i campi richiesti", "Please provide a valid Dropbox app key and secret." => "Fornisci chiave di applicazione e segreto di Dropbox validi.", "Error configuring Google Drive storage" => "Errore durante la configurazione dell'archivio Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Avviso:</b> \"smbclient\" non è installato. Impossibile montare condivisioni CIFS/SMB. Chiedi all'amministratore di sistema di installarlo.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Avviso:</b> il supporto FTP di PHP non è abilitato o non è installato. Impossibile montare condivisioni FTP. Chiedi all'amministratore di sistema di installarlo.", "External Storage" => "Archiviazione esterna", "Mount point" => "Punto di mount", "Backend" => "Motore", diff --git a/apps/files_external/l10n/ja_JP.php b/apps/files_external/l10n/ja_JP.php index 92f74ce9f72..cd09bb43db7 100644 --- a/apps/files_external/l10n/ja_JP.php +++ b/apps/files_external/l10n/ja_JP.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "すべての必須フィールドを埋めて下さい", "Please provide a valid Dropbox app key and secret." => "有効なDropboxアプリのキーとパスワードを入力して下さい。", "Error configuring Google Drive storage" => "Googleドライブストレージの設定エラー", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>警告:</b> \"smbclient\" はインストールされていません。CIFS/SMB 共有のマウントはできません。システム管理者にインストールをお願いして下さい。", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>警告:</b> PHPのFTPサポートは無効もしくはインストールされていません。FTP共有のマウントはできません。システム管理者にインストールをお願いして下さい。", "External Storage" => "外部ストレージ", "Mount point" => "マウントポイント", "Backend" => "バックエンド", diff --git a/apps/files_external/l10n/ka_GE.php b/apps/files_external/l10n/ka_GE.php new file mode 100644 index 00000000000..efccca9fd78 --- /dev/null +++ b/apps/files_external/l10n/ka_GE.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "ჯგუფები", +"Users" => "მომხმარებელი", +"Delete" => "წაშლა" +); diff --git a/apps/files_external/l10n/ko.php b/apps/files_external/l10n/ko.php new file mode 100644 index 00000000000..74a400303b2 --- /dev/null +++ b/apps/files_external/l10n/ko.php @@ -0,0 +1,24 @@ +<?php $TRANSLATIONS = array( +"Access granted" => "접근 허가됨", +"Error configuring Dropbox storage" => "Dropbox 저장소 설정 오류", +"Grant access" => "접근 권한 부여", +"Fill out all required fields" => "모든 필수 항목을 입력하십시오", +"Please provide a valid Dropbox app key and secret." => "올바른 Dropbox 앱 키와 암호를 입력하십시오.", +"Error configuring Google Drive storage" => "Google 드라이브 저장소 설정 오류", +"External Storage" => "외부 저장소", +"Mount point" => "마운트 지점", +"Backend" => "백엔드", +"Configuration" => "설정", +"Options" => "옵션", +"Applicable" => "적용 가능", +"Add mount point" => "마운트 지점 추가", +"None set" => "설정되지 않음", +"All Users" => "모든 사용자", +"Groups" => "그룹", +"Users" => "사용자", +"Delete" => "삭제", +"Enable User External Storage" => "사용자 외부 저장소 사용", +"Allow users to mount their own external storage" => "사용자별 외부 저장소 마운트 허용", +"SSL root certificates" => "SSL 루트 인증서", +"Import Root Certificate" => "루트 인증서 가져오기" +); diff --git a/apps/files_external/l10n/ku_IQ.php b/apps/files_external/l10n/ku_IQ.php new file mode 100644 index 00000000000..c614168d773 --- /dev/null +++ b/apps/files_external/l10n/ku_IQ.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"Users" => "بهكارهێنهر" +); diff --git a/apps/files_external/l10n/lb.php b/apps/files_external/l10n/lb.php new file mode 100644 index 00000000000..7cbfaea6a57 --- /dev/null +++ b/apps/files_external/l10n/lb.php @@ -0,0 +1,4 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Gruppen", +"Delete" => "Läschen" +); diff --git a/apps/files_external/l10n/lv.php b/apps/files_external/l10n/lv.php new file mode 100644 index 00000000000..26452f98b01 --- /dev/null +++ b/apps/files_external/l10n/lv.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Grupas", +"Users" => "Lietotāji", +"Delete" => "Izdzēst" +); diff --git a/apps/files_external/l10n/mk.php b/apps/files_external/l10n/mk.php new file mode 100644 index 00000000000..8fde4fcde0f --- /dev/null +++ b/apps/files_external/l10n/mk.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Групи", +"Users" => "Корисници", +"Delete" => "Избриши" +); diff --git a/apps/files_external/l10n/ms_MY.php b/apps/files_external/l10n/ms_MY.php new file mode 100644 index 00000000000..2fdb089ebc6 --- /dev/null +++ b/apps/files_external/l10n/ms_MY.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Kumpulan", +"Users" => "Pengguna", +"Delete" => "Padam" +); diff --git a/apps/files_external/l10n/nn_NO.php b/apps/files_external/l10n/nn_NO.php new file mode 100644 index 00000000000..4b4b6167d88 --- /dev/null +++ b/apps/files_external/l10n/nn_NO.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Grupper", +"Users" => "Brukarar", +"Delete" => "Slett" +); diff --git a/apps/files_external/l10n/oc.php b/apps/files_external/l10n/oc.php new file mode 100644 index 00000000000..47db011473f --- /dev/null +++ b/apps/files_external/l10n/oc.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Grops", +"Users" => "Usancièrs", +"Delete" => "Escafa" +); diff --git a/apps/files_external/l10n/pl.php b/apps/files_external/l10n/pl.php index 00514e59a5f..0da31bb6b4a 100644 --- a/apps/files_external/l10n/pl.php +++ b/apps/files_external/l10n/pl.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "Wypełnij wszystkie wymagane pola", "Please provide a valid Dropbox app key and secret." => "Proszę podać prawidłowy klucz aplikacji Dropbox i klucz sekretny.", "Error configuring Google Drive storage" => "Wystąpił błąd podczas konfigurowania zasobu Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Ostrzeżenie:</b> \"smbclient\" nie jest zainstalowany. Zamontowanie katalogów CIFS/SMB nie jest możliwe. Skontaktuj sie z administratorem w celu zainstalowania.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Ostrzeżenie:</b> Wsparcie dla FTP w PHP nie jest zainstalowane lub włączone. Skontaktuj sie z administratorem w celu zainstalowania lub włączenia go.", "External Storage" => "Zewnętrzna zasoby dyskowe", "Mount point" => "Punkt montowania", "Backend" => "Zaplecze", diff --git a/apps/files_external/l10n/ru.php b/apps/files_external/l10n/ru.php index 34d34a18eda..b8b5f5b1cb2 100644 --- a/apps/files_external/l10n/ru.php +++ b/apps/files_external/l10n/ru.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "Заполните все обязательные поля", "Please provide a valid Dropbox app key and secret." => "Пожалуйста, предоставьте действующий ключ Dropbox и пароль.", "Error configuring Google Drive storage" => "Ошибка при настройке хранилища Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Внимание:</b> \"smbclient\" не установлен. Подключение по CIFS/SMB невозможно. Пожалуйста, обратитесь к системному администратору, чтобы установить его.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Внимание:</b> Поддержка FTP не включена в PHP. Подключение по FTP невозможно. Пожалуйста, обратитесь к системному администратору, чтобы включить.", "External Storage" => "Внешний носитель", "Mount point" => "Точка монтирования", "Backend" => "Подсистема", diff --git a/apps/files_external/l10n/sl.php b/apps/files_external/l10n/sl.php index 713e89578e2..f0db66ded96 100644 --- a/apps/files_external/l10n/sl.php +++ b/apps/files_external/l10n/sl.php @@ -5,6 +5,8 @@ "Fill out all required fields" => "Zapolni vsa zahtevana polja", "Please provide a valid Dropbox app key and secret." => "Vpišite veljaven ključ programa in kodo za Dropbox", "Error configuring Google Drive storage" => "Napaka nastavljanja shrambe Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Opozorilo:</b> \"smbclient\" ni nameščen. Priklapljanje CIFS/SMB pogonov ni mogoče. Prosimo, prosite vašega skrbnika, če ga namesti.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Opozorilo:</b> FTP podpora v PHP ni omogočena ali nameščena. Priklapljanje FTP pogonov ni mogoče. Prosimo, prosite vašega skrbnika, če jo namesti ali omogoči.", "External Storage" => "Zunanja podatkovna shramba", "Mount point" => "Priklopna točka", "Backend" => "Zaledje", diff --git a/apps/files_external/l10n/sr.php b/apps/files_external/l10n/sr.php new file mode 100644 index 00000000000..2554c498dda --- /dev/null +++ b/apps/files_external/l10n/sr.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Групе", +"Users" => "Корисници", +"Delete" => "Обриши" +); diff --git a/apps/files_external/l10n/sr@latin.php b/apps/files_external/l10n/sr@latin.php new file mode 100644 index 00000000000..24f27ddf81b --- /dev/null +++ b/apps/files_external/l10n/sr@latin.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Grupe", +"Users" => "Korisnici", +"Delete" => "Obriši" +); diff --git a/apps/files_external/l10n/ta_LK.php b/apps/files_external/l10n/ta_LK.php new file mode 100644 index 00000000000..1e01b22efa0 --- /dev/null +++ b/apps/files_external/l10n/ta_LK.php @@ -0,0 +1,24 @@ +<?php $TRANSLATIONS = array( +"Access granted" => "அனுமதி வழங்கப்பட்டது", +"Error configuring Dropbox storage" => "Dropbox சேமிப்பை தகவமைப்பதில் வழு", +"Grant access" => "அனுமதியை வழங்கல்", +"Fill out all required fields" => "தேவையான எல்லா புலங்களையும் நிரப்புக", +"Please provide a valid Dropbox app key and secret." => "தயவுசெய்து ஒரு செல்லுபடியான Dropbox செயலி சாவி மற்றும் இரகசியத்தை வழங்குக. ", +"Error configuring Google Drive storage" => "Google இயக்க சேமிப்பகத்தை தகமைப்பதில் வழு", +"External Storage" => "வெளி சேமிப்பு", +"Mount point" => "ஏற்றப்புள்ளி", +"Backend" => "பின்நிலை", +"Configuration" => "தகவமைப்பு", +"Options" => "தெரிவுகள்", +"Applicable" => "பயன்படத்தக்க", +"Add mount point" => "ஏற்றப்புள்ளியை சேர்க்க", +"None set" => "தொகுப்பில்லா", +"All Users" => "பயனாளர்கள் எல்லாம்", +"Groups" => "குழுக்கள்", +"Users" => "பயனாளர்", +"Delete" => "நீக்குக", +"Enable User External Storage" => "பயனாளர் வெளி சேமிப்பை இயலுமைப்படுத்துக", +"Allow users to mount their own external storage" => "பயனாளர் அவர்களுடைய சொந்த வெளியக சேமிப்பை ஏற்ற அனுமதிக்க", +"SSL root certificates" => "SSL வேர் சான்றிதழ்கள்", +"Import Root Certificate" => "வேர் சான்றிதழை இறக்குமதி செய்க" +); diff --git a/apps/files_external/l10n/tr.php b/apps/files_external/l10n/tr.php new file mode 100644 index 00000000000..c5e9f8f892f --- /dev/null +++ b/apps/files_external/l10n/tr.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( +"Groups" => "Gruplar", +"Users" => "Kullanıcılar", +"Delete" => "Sil" +); diff --git a/apps/files_external/l10n/uk.php b/apps/files_external/l10n/uk.php index 79920b9014a..56169171f64 100644 --- a/apps/files_external/l10n/uk.php +++ b/apps/files_external/l10n/uk.php @@ -1,5 +1,26 @@ <?php $TRANSLATIONS = array( +"Access granted" => "Доступ дозволено", +"Error configuring Dropbox storage" => "Помилка при налаштуванні сховища Dropbox", +"Grant access" => "Дозволити доступ", +"Fill out all required fields" => "Заповніть всі обов'язкові поля", +"Please provide a valid Dropbox app key and secret." => "Будь ласка, надайте дійсний ключ та пароль Dropbox.", +"Error configuring Google Drive storage" => "Помилка при налаштуванні сховища Google Drive", +"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Попередження:</b> Клієнт \"smbclient\" не встановлено. Під'єднанатися до CIFS/SMB тек неможливо. Попрохайте системного адміністратора встановити його.", +"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Попередження:</b> Підтримка FTP в PHP не увімкнута чи не встановлена. Під'єднанатися до FTP тек неможливо. Попрохайте системного адміністратора встановити її.", +"External Storage" => "Зовнішні сховища", +"Mount point" => "Точка монтування", +"Backend" => "Backend", +"Configuration" => "Налаштування", +"Options" => "Опції", +"Applicable" => "Придатний", +"Add mount point" => "Додати точку монтування", +"None set" => "Не встановлено", +"All Users" => "Усі користувачі", "Groups" => "Групи", "Users" => "Користувачі", -"Delete" => "Видалити" +"Delete" => "Видалити", +"Enable User External Storage" => "Активувати користувацькі зовнішні сховища", +"Allow users to mount their own external storage" => "Дозволити користувачам монтувати власні зовнішні сховища", +"SSL root certificates" => "SSL корневі сертифікати", +"Import Root Certificate" => "Імпортувати корневі сертифікати" ); diff --git a/apps/files_external/l10n/vi.php b/apps/files_external/l10n/vi.php index 80328bf957a..0160692cb65 100644 --- a/apps/files_external/l10n/vi.php +++ b/apps/files_external/l10n/vi.php @@ -3,6 +3,7 @@ "Error configuring Dropbox storage" => "Lỗi cấu hình lưu trữ Dropbox ", "Grant access" => "Cấp quyền truy cập", "Fill out all required fields" => "Điền vào tất cả các trường bắt buộc", +"Please provide a valid Dropbox app key and secret." => "Xin vui lòng cung cấp một ứng dụng Dropbox hợp lệ và mã bí mật.", "Error configuring Google Drive storage" => "Lỗi cấu hình lưu trữ Google Drive", "External Storage" => "Lưu trữ ngoài", "Mount point" => "Điểm gắn", diff --git a/apps/files_external/l10n/zh_TW.php b/apps/files_external/l10n/zh_TW.php new file mode 100644 index 00000000000..ab8c4caf24a --- /dev/null +++ b/apps/files_external/l10n/zh_TW.php @@ -0,0 +1,10 @@ +<?php $TRANSLATIONS = array( +"External Storage" => "外部儲存裝置", +"Mount point" => "掛載點", +"None set" => "尚未設定", +"All Users" => "所有使用者", +"Groups" => "群組", +"Users" => "使用者", +"Delete" => "刪除", +"Import Root Certificate" => "匯入根憑證" +); diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index 41ec3c70b45..235ade06db6 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -45,7 +45,7 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { if ($response) { $this->objects[$path] = $response; return $response; - // This object could be a folder, a '/' must be at the end of the path + // This object could be a folder, a '/' must be at the end of the path } else if (substr($path, -1) != '/') { $response = $this->s3->get_object_metadata($this->bucket, $path.'/'); if ($response) { @@ -108,11 +108,14 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { $stat['atime'] = time(); $stat['mtime'] = $stat['atime']; $stat['ctime'] = $stat['atime']; - } else if ($object = $this->getObject($path)) { - $stat['size'] = $object['Size']; - $stat['atime'] = time(); - $stat['mtime'] = strtotime($object['LastModified']); - $stat['ctime'] = $stat['mtime']; + } else { + $object = $this->getObject($path); + if ($object) { + $stat['size'] = $object['Size']; + $stat['atime'] = time(); + $stat['mtime'] = strtotime($object['LastModified']); + $stat['ctime'] = $stat['mtime']; + } } if (isset($stat)) { return $stat; @@ -123,12 +126,15 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { public function filetype($path) { if ($path == '' || $path == '/') { return 'dir'; - } else if ($object = $this->getObject($path)) { - // Amazon S3 doesn't have typical folders, this is an alternative method to detect a folder - if (substr($object['Key'], -1) == '/' && $object['Size'] == 0) { - return 'dir'; - } else { - return 'file'; + } else { + $object = $this->getObject($path); + if ($object) { + // Amazon S3 doesn't have typical folders, this is an alternative method to detect a folder + if (substr($object['Key'], -1) == '/' && $object['Size'] == 0) { + return 'dir'; + } else { + return 'file'; + } } } return false; @@ -199,7 +205,9 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { public function writeBack($tmpFile) { if (isset(self::$tempFiles[$tmpFile])) { $handle = fopen($tmpFile, 'r'); - $response = $this->s3->create_object($this->bucket, self::$tempFiles[$tmpFile], array('fileUpload' => $handle)); + $response = $this->s3->create_object($this->bucket, + self::$tempFiles[$tmpFile], + array('fileUpload' => $handle)); if ($response->isOK()) { unlink($tmpFile); } @@ -209,8 +217,11 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { public function getMimeType($path) { if ($this->filetype($path) == 'dir') { return 'httpd/unix-directory'; - } else if ($object = $this->getObject($path)) { - return $object['ContentType']; + } else { + $object = $this->getObject($path); + if ($object) { + return $object['ContentType']; + } } return false; } diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 9dc3cdd7147..c0864dc50d2 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -38,16 +38,74 @@ class OC_Mount_Config { * @return array */ public static function getBackends() { - return array( - 'OC_Filestorage_Local' => array('backend' => 'Local', 'configuration' => array('datadir' => 'Location')), - 'OC_Filestorage_AmazonS3' => array('backend' => 'Amazon S3', 'configuration' => array('key' => 'Key', 'secret' => '*Secret', 'bucket' => 'Bucket')), - 'OC_Filestorage_Dropbox' => array('backend' => 'Dropbox', 'configuration' => array('configured' => '#configured','app_key' => 'App key', 'app_secret' => 'App secret', 'token' => '#token', 'token_secret' => '#token_secret'), 'custom' => 'dropbox'), - 'OC_Filestorage_FTP' => array('backend' => 'FTP', 'configuration' => array('host' => 'URL', 'user' => 'Username', 'password' => '*Password', 'root' => '&Root', 'secure' => '!Secure ftps://')), - 'OC_Filestorage_Google' => array('backend' => 'Google Drive', 'configuration' => array('configured' => '#configured', 'token' => '#token', 'token_secret' => '#token secret'), 'custom' => 'google'), - 'OC_Filestorage_SWIFT' => array('backend' => 'OpenStack Swift', 'configuration' => array('host' => 'URL', 'user' => 'Username', 'token' => '*Token', 'root' => '&Root', 'secure' => '!Secure ftps://')), - 'OC_Filestorage_SMB' => array('backend' => 'SMB', 'configuration' => array('host' => 'URL', 'user' => 'Username', 'password' => '*Password', 'share' => 'Share', 'root' => '&Root')), - 'OC_Filestorage_DAV' => array('backend' => 'WebDAV', 'configuration' => array('host' => 'URL', 'user' => 'Username', 'password' => '*Password', 'root' => '&Root', 'secure' => '!Secure https://')) - ); + + $backends['OC_Filestorage_Local']=array( + 'backend' => 'Local', + 'configuration' => array( + 'datadir' => 'Location')); + + $backends['OC_Filestorage_AmazonS3']=array( + 'backend' => 'Amazon S3', + 'configuration' => array( + 'key' => 'Key', + 'secret' => '*Secret', + 'bucket' => 'Bucket')); + + $backends['OC_Filestorage_Dropbox']=array( + 'backend' => 'Dropbox', + 'configuration' => array( + 'configured' => '#configured', + 'app_key' => 'App key', + 'app_secret' => 'App secret', + 'token' => '#token', + 'token_secret' => '#token_secret'), + 'custom' => 'dropbox'); + + if(OC_Mount_Config::checkphpftp()) $backends['OC_Filestorage_FTP']=array( + 'backend' => 'FTP', + 'configuration' => array( + 'host' => 'URL', + 'user' => 'Username', + 'password' => '*Password', + 'root' => '&Root', + 'secure' => '!Secure ftps://')); + + $backends['OC_Filestorage_Google']=array( + 'backend' => 'Google Drive', + 'configuration' => array( + 'configured' => '#configured', + 'token' => '#token', + 'token_secret' => '#token secret'), + 'custom' => 'google'); + + $backends['OC_Filestorage_SWIFT']=array( + 'backend' => 'OpenStack Swift', + 'configuration' => array( + 'host' => 'URL', + 'user' => 'Username', + 'token' => '*Token', + 'root' => '&Root', + 'secure' => '!Secure ftps://')); + + if(OC_Mount_Config::checksmbclient()) $backends['OC_Filestorage_SMB']=array( + 'backend' => 'SMB / CIFS', + 'configuration' => array( + 'host' => 'URL', + 'user' => 'Username', + 'password' => '*Password', + 'share' => 'Share', + 'root' => '&Root')); + + $backends['OC_Filestorage_DAV']=array( + 'backend' => 'ownCloud / WebDAV', + 'configuration' => array( + 'host' => 'URL', + 'user' => 'Username', + 'password' => '*Password', + 'root' => '&Root', + 'secure' => '!Secure https://')); + + return($backends); } /** @@ -66,9 +124,14 @@ class OC_Mount_Config { $mountPoint = substr($mountPoint, 13); // Merge the mount point into the current mount points if (isset($system[$mountPoint]) && $system[$mountPoint]['configuration'] == $mount['options']) { - $system[$mountPoint]['applicable']['groups'] = array_merge($system[$mountPoint]['applicable']['groups'], array($group)); + $system[$mountPoint]['applicable']['groups'] + = array_merge($system[$mountPoint]['applicable']['groups'], array($group)); } else { - $system[$mountPoint] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options'], 'applicable' => array('groups' => array($group), 'users' => array())); + $system[$mountPoint] = array( + 'class' => $mount['class'], + 'backend' => $backends[$mount['class']]['backend'], + 'configuration' => $mount['options'], + 'applicable' => array('groups' => array($group), 'users' => array())); } } } @@ -80,9 +143,13 @@ class OC_Mount_Config { $mountPoint = substr($mountPoint, 13); // Merge the mount point into the current mount points if (isset($system[$mountPoint]) && $system[$mountPoint]['configuration'] == $mount['options']) { - $system[$mountPoint]['applicable']['users'] = array_merge($system[$mountPoint]['applicable']['users'], array($user)); + $system[$mountPoint]['applicable']['users'] + = array_merge($system[$mountPoint]['applicable']['users'], array($user)); } else { - $system[$mountPoint] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options'], 'applicable' => array('groups' => array(), 'users' => array($user))); + $system[$mountPoint] = array('class' => $mount['class'], + 'backend' => $backends[$mount['class']]['backend'], + 'configuration' => $mount['options'], + 'applicable' => array('groups' => array(), 'users' => array($user))); } } } @@ -103,7 +170,9 @@ class OC_Mount_Config { if (isset($mountPoints[self::MOUNT_TYPE_USER][$uid])) { foreach ($mountPoints[self::MOUNT_TYPE_USER][$uid] as $mountPoint => $mount) { // Remove '/uid/files/' from mount point - $personal[substr($mountPoint, strlen($uid) + 8)] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options']); + $personal[substr($mountPoint, strlen($uid) + 8)] = array('class' => $mount['class'], + 'backend' => $backends[$mount['class']]['backend'], + 'configuration' => $mount['options']); } } return $personal; @@ -135,7 +204,12 @@ class OC_Mount_Config { * @param bool Personal or system mount point i.e. is this being called from the personal or admin page * @return bool */ - public static function addMountPoint($mountPoint, $class, $classOptions, $mountType, $applicable, $isPersonal = false) { + public static function addMountPoint($mountPoint, + $class, + $classOptions, + $mountType, + $applicable, + $isPersonal = false) { if ($isPersonal) { // Verify that the mount point applies for the current user // Prevent non-admin users from mounting local storage @@ -176,7 +250,8 @@ class OC_Mount_Config { // Merge the new mount point into the current mount points if (isset($mountPoints[$mountType])) { if (isset($mountPoints[$mountType][$applicable])) { - $mountPoints[$mountType][$applicable] = array_merge($mountPoints[$mountType][$applicable], $mount[$applicable]); + $mountPoints[$mountType][$applicable] + = array_merge($mountPoints[$mountType][$applicable], $mount[$applicable]); } else { $mountPoints[$mountType] = array_merge($mountPoints[$mountType], $mount); } @@ -256,7 +331,7 @@ class OC_Mount_Config { foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) { $content .= "\t\t'".$group."' => array (\n"; foreach ($mounts as $mountPoint => $mount) { - $content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n"; + $content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).", \n"; } $content .= "\t\t),\n"; @@ -285,14 +360,19 @@ class OC_Mount_Config { public static function getCertificates() { $view = \OCP\Files::getStorage('files_external'); $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'; - if (!is_dir($path)) mkdir($path); + \OCP\Util::writeLog('files_external', 'checking path '.$path, \OCP\Util::INFO); + if ( ! is_dir($path)) { + //path might not exist (e.g. non-standard OC_User::getHome() value) + //in this case create full path using 3rd (recursive=true) parameter. + mkdir($path, 0777, true); + } $result = array(); $handle = opendir($path); - if (!$handle) { + if ( ! $handle) { return array(); } while (false !== ($file = readdir($handle))) { - if($file != '.' && $file != '..') $result[] = $file; + if ($file != '.' && $file != '..') $result[] = $file; } return $result; } @@ -322,4 +402,38 @@ class OC_Mount_Config { return true; } + /** + * check if smbclient is installed + */ + public static function checksmbclient() { + if(function_exists('shell_exec')) { + $output=shell_exec('which smbclient'); + return (empty($output)?false:true); + }else{ + return(false); + } + } + + /** + * check if php-ftp is installed + */ + public static function checkphpftp() { + if(function_exists('ftp_login')) { + return(true); + }else{ + return(false); + } + } + + /** + * check dependencies + */ + public static function checkDependencies() { + $l= new OC_L10N('files_external'); + $txt=''; + if(!OC_Mount_Config::checksmbclient()) $txt.=$l->t('<b>Warning:</b> "smbclient" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it.').'<br />'; + if(!OC_Mount_Config::checkphpftp()) $txt.=$l->t('<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it.').'<br />'; + + return($txt); + } } diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php index c8220832702..33ca14cab15 100755 --- a/apps/files_external/lib/dropbox.php +++ b/apps/files_external/lib/dropbox.php @@ -31,7 +31,12 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { private static $tempFiles = array(); public function __construct($params) { - if (isset($params['configured']) && $params['configured'] == 'true' && isset($params['app_key']) && isset($params['app_secret']) && isset($params['token']) && isset($params['token_secret'])) { + if (isset($params['configured']) && $params['configured'] == 'true' + && isset($params['app_key']) + && isset($params['app_secret']) + && isset($params['token']) + && isset($params['token_secret']) + ) { $this->root=isset($params['root'])?$params['root']:''; $oauth = new Dropbox_OAuth_Curl($params['app_key'], $params['app_secret']); $oauth->setToken($params['token'], $params['token_secret']); @@ -44,7 +49,7 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { private function getMetaData($path, $list = false) { $path = $this->root.$path; - if (!$list && isset($this->metaData[$path])) { + if ( ! $list && isset($this->metaData[$path])) { return $this->metaData[$path]; } else { if ($list) { @@ -95,7 +100,8 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { } public function opendir($path) { - if ($contents = $this->getMetaData($path, true)) { + $contents = $this->getMetaData($path, true); + if ($contents) { $files = array(); foreach ($contents as $file) { $files[] = basename($file['path']); @@ -107,7 +113,8 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { } public function stat($path) { - if ($metaData = $this->getMetaData($path)) { + $metaData = $this->getMetaData($path); + if ($metaData) { $stat['size'] = $metaData['bytes']; $stat['atime'] = time(); $stat['mtime'] = (isset($metaData['modified'])) ? strtotime($metaData['modified']) : time(); @@ -120,11 +127,14 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { public function filetype($path) { if ($path == '' || $path == '/') { return 'dir'; - } else if ($metaData = $this->getMetaData($path)) { - if ($metaData['is_dir'] == 'true') { - return 'dir'; - } else { - return 'file'; + } else { + $metaData = $this->getMetaData($path); + if ($metaData) { + if ($metaData['is_dir'] == 'true') { + return 'dir'; + } else { + return 'file'; + } } } return false; @@ -241,8 +251,11 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { public function getMimeType($path) { if ($this->filetype($path) == 'dir') { return 'httpd/unix-directory'; - } else if ($metaData = $this->getMetaData($path)) { - return $metaData['mime_type']; + } else { + $metaData = $this->getMetaData($path); + if ($metaData) { + return $metaData['mime_type']; + } } return false; } diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php index 13d1387f287..e796ae446bf 100644 --- a/apps/files_external/lib/ftp.php +++ b/apps/files_external/lib/ftp.php @@ -19,13 +19,21 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ $this->host=$params['host']; $this->user=$params['user']; $this->password=$params['password']; - $this->secure=isset($params['secure'])?(bool)$params['secure']:false; + if (isset($params['secure'])) { + if (is_string($params['secure'])) { + $this->secure = ($params['secure'] === 'true'); + } else { + $this->secure = (bool)$params['secure']; + } + } else { + $this->secure = false; + } $this->root=isset($params['root'])?$params['root']:'/'; - if(!$this->root || $this->root[0]!='/') { + if ( ! $this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } //create the root folder if necesary - if (!$this->is_dir('')) { + if ( ! $this->is_dir('')) { $this->mkdir(''); } } @@ -37,13 +45,13 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ */ public function constructUrl($path) { $url='ftp'; - if($this->secure) { + if ($this->secure) { $url.='s'; } $url.='://'.$this->user.':'.$this->password.'@'.$this->host.$this->root.$path; return $url; } - public function fopen($path,$mode) { + public function fopen($path, $mode) { switch($mode) { case 'r': case 'rb': @@ -53,7 +61,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ case 'ab': //these are supported by the wrapper $context = stream_context_create(array('ftp' => array('overwrite' => true))); - return fopen($this->constructUrl($path),$mode, false,$context); + return fopen($this->constructUrl($path), $mode, false, $context); case 'r+': case 'w+': case 'wb+': @@ -63,23 +71,23 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ case 'c': case 'c+': //emulate these - if(strrpos($path,'.')!==false) { - $ext=substr($path, strrpos($path,'.')); - }else{ + if (strrpos($path, '.')!==false) { + $ext=substr($path, strrpos($path, '.')); + } else { $ext=''; } $tmpFile=OCP\Files::tmpFile($ext); - OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this,'writeBack'); - if($this->file_exists($path)) { - $this->getFile($path,$tmpFile); + OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack'); + if ($this->file_exists($path)) { + $this->getFile($path, $tmpFile); } self::$tempFiles[$tmpFile]=$path; - return fopen('close://'.$tmpFile,$mode); + return fopen('close://'.$tmpFile, $mode); } } public function writeBack($tmpFile) { - if(isset(self::$tempFiles[$tmpFile])) { + if (isset(self::$tempFiles[$tmpFile])) { $this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]); unlink($tmpFile); } diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 32d57ed3cef..c836a5a07c0 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -32,7 +32,10 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { private static $tempFiles = array(); public function __construct($params) { - if (isset($params['configured']) && $params['configured'] == 'true' && isset($params['token']) && isset($params['token_secret'])) { + if (isset($params['configured']) && $params['configured'] == 'true' + && isset($params['token']) + && isset($params['token_secret']) + ) { $consumer_key = isset($params['consumer_key']) ? $params['consumer_key'] : 'anonymous'; $consumer_secret = isset($params['consumer_secret']) ? $params['consumer_secret'] : 'anonymous'; $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); @@ -44,7 +47,14 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } } - private function sendRequest($uri, $httpMethod, $postData = null, $extraHeaders = null, $isDownload = false, $returnHeaders = false, $isContentXML = true, $returnHTTPCode = false) { + private function sendRequest($uri, + $httpMethod, + $postData = null, + $extraHeaders = null, + $isDownload = false, + $returnHeaders = false, + $isContentXML = true, + $returnHTTPCode = false) { $uri = trim($uri); // create an associative array from each key/value url query param pair. $params = array(); @@ -58,7 +68,11 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { $tempStr .= '&' . urlencode($key) . '=' . urlencode($value); } $uri = preg_replace('/&/', '?', $tempStr, 1); - $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->oauth_token, $httpMethod, $uri, $params); + $request = OAuthRequest::from_consumer_and_token($this->consumer, + $this->oauth_token, + $httpMethod, + $uri, + $params); $request->sign_request($this->sig_method, $this->consumer, $this->oauth_token); $auth_header = $request->to_header(); $headers = array($auth_header, 'GData-Version: 3.0'); @@ -132,6 +146,11 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { return false; } + /** + * Base url for google docs feeds + */ + const BASE_URI='https://docs.google.com/feeds'; + private function getResource($path) { $file = basename($path); if (array_key_exists($file, $this->entries)) { @@ -140,14 +159,14 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { // Strip the file extension; file could be a native Google Docs resource if ($pos = strpos($file, '.')) { $title = substr($file, 0, $pos); - $dom = $this->getFeed('https://docs.google.com/feeds/default/private/full?showfolders=true&title='.$title, 'GET'); + $dom = $this->getFeed(self::BASE_URI.'/default/private/full?showfolders=true&title='.$title, 'GET'); // Check if request was successful and entry exists if ($dom && $entry = $dom->getElementsByTagName('entry')->item(0)) { $this->entries[$file] = $entry; return $entry; } } - $dom = $this->getFeed('https://docs.google.com/feeds/default/private/full?showfolders=true&title='.$file, 'GET'); + $dom = $this->getFeed(self::BASE_URI.'/default/private/full?showfolders=true&title='.$file, 'GET'); // Check if request was successful and entry exists if ($dom && $entry = $dom->getElementsByTagName('entry')->item(0)) { $this->entries[$file] = $entry; @@ -180,20 +199,25 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { $collection = dirname($path); // Check if path parent is root directory if ($collection == '/' || $collection == '\.' || $collection == '.') { - $uri = 'https://docs.google.com/feeds/default/private/full'; - // Get parent content link - } else if ($dom = $this->getResource(basename($collection))) { - $uri = $dom->getElementsByTagName('content')->item(0)->getAttribute('src'); + $uri = self::BASE_URI.'/default/private/full'; + } else { + // Get parent content link + $dom = $this->getResource(basename($collection)); + if ($dom) { + $uri = $dom->getElementsByTagName('content')->item(0)->getAttribute('src'); + } } if (isset($uri)) { $title = basename($path); // Construct post data $postData = '<?xml version="1.0" encoding="UTF-8"?>'; $postData .= '<entry xmlns="http://www.w3.org/2005/Atom">'; - $postData .= '<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/docs/2007#folder"/>'; + $postData .= '<category scheme="http://schemas.google.com/g/2005#kind"'; + $postData .= ' term="http://schemas.google.com/docs/2007#folder"/>'; $postData .= '<title>'.$title.'</title>'; $postData .= '</entry>'; - if ($dom = $this->sendRequest($uri, 'POST', $postData)) { + $dom = $this->sendRequest($uri, 'POST', $postData); + if ($dom) { return true; } } @@ -206,9 +230,10 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { public function opendir($path) { if ($path == '' || $path == '/') { - $next = 'https://docs.google.com/feeds/default/private/full/folder%3Aroot/contents'; + $next = self::BASE_URI.'/default/private/full/folder%3Aroot/contents'; } else { - if ($entry = $this->getResource($path)) { + $entry = $this->getResource($path); + if ($entry) { $next = $entry->getElementsByTagName('content')->item(0)->getAttribute('src'); } else { return false; @@ -230,7 +255,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { foreach ($entries as $entry) { $name = $entry->getElementsByTagName('title')->item(0)->nodeValue; // Google Docs resources don't always include extensions in title - if (!strpos($name, '.')) { + if ( ! strpos($name, '.')) { $extension = $this->getExtension($entry); if ($extension != '') { $name .= '.'.$extension; @@ -251,13 +276,19 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { $stat['atime'] = time(); $stat['mtime'] = time(); $stat['ctime'] = time(); - } else if ($entry = $this->getResource($path)) { - // NOTE: Native resources don't have a file size - $stat['size'] = $entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'quotaBytesUsed')->item(0)->nodeValue; -// if (isset($atime = $entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'lastViewed')->item(0)->nodeValue)) -// $stat['atime'] = strtotime($entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'lastViewed')->item(0)->nodeValue); - $stat['mtime'] = strtotime($entry->getElementsByTagName('updated')->item(0)->nodeValue); - $stat['ctime'] = strtotime($entry->getElementsByTagName('published')->item(0)->nodeValue); + } else { + $entry = $this->getResource($path); + if ($entry) { + // NOTE: Native resources don't have a file size + $stat['size'] = $entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', + 'quotaBytesUsed')->item(0)->nodeValue; + //if (isset($atime = $entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', + // 'lastViewed')->item(0)->nodeValue)) + //$stat['atime'] = strtotime($entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', + // 'lastViewed')->item(0)->nodeValue); + $stat['mtime'] = strtotime($entry->getElementsByTagName('updated')->item(0)->nodeValue); + $stat['ctime'] = strtotime($entry->getElementsByTagName('published')->item(0)->nodeValue); + } } if (isset($stat)) { return $stat; @@ -268,15 +299,18 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { public function filetype($path) { if ($path == '' || $path == '/') { return 'dir'; - } else if ($entry = $this->getResource($path)) { - $categories = $entry->getElementsByTagName('category'); - foreach ($categories as $category) { - if ($category->getAttribute('scheme') == 'http://schemas.google.com/g/2005#kind') { - $type = $category->getAttribute('label'); - if (strlen(strstr($type, 'folder')) > 0) { - return 'dir'; - } else { - return 'file'; + } else { + $entry = $this->getResource($path); + if ($entry) { + $categories = $entry->getElementsByTagName('category'); + foreach ($categories as $category) { + if ($category->getAttribute('scheme') == 'http://schemas.google.com/g/2005#kind') { + $type = $category->getAttribute('label'); + if (strlen(strstr($type, 'folder')) > 0) { + return 'dir'; + } else { + return 'file'; + } } } } @@ -291,14 +325,17 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { public function isUpdatable($path) { if ($path == '' || $path == '/') { return true; - } else if ($entry = $this->getResource($path)) { - // Check if edit or edit-media links exist - $links = $entry->getElementsByTagName('link'); - foreach ($links as $link) { - if ($link->getAttribute('rel') == 'edit') { - return true; - } else if ($link->getAttribute('rel') == 'edit-media') { - return true; + } else { + $entry = $this->getResource($path); + if ($entry) { + // Check if edit or edit-media links exist + $links = $entry->getElementsByTagName('link'); + foreach ($links as $link) { + if ($link->getAttribute('rel') == 'edit') { + return true; + } else if ($link->getAttribute('rel') == 'edit-media') { + return true; + } } } } @@ -316,7 +353,8 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { public function unlink($path) { // Get resource self link to trash resource - if ($entry = $this->getResource($path)) { + $entry = $this->getResource($path); + if ($entry) { $links = $entry->getElementsByTagName('link'); foreach ($links as $link) { if ($link->getAttribute('rel') == 'self') { @@ -333,7 +371,8 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } public function rename($path1, $path2) { - if ($entry = $this->getResource($path1)) { + $entry = $this->getResource($path1); + if ($entry) { $collection = dirname($path2); if (dirname($path1) == $collection) { // Get resource edit link to rename resource @@ -348,14 +387,18 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { $title = basename($path2); // Construct post data $postData = '<?xml version="1.0" encoding="UTF-8"?>'; - $postData .= '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:docs="http://schemas.google.com/docs/2007" xmlns:gd="http://schemas.google.com/g/2005" gd:etag='.$etag.'>'; + $postData .= '<entry xmlns="http://www.w3.org/2005/Atom"'; + $postData .= ' xmlns:docs="http://schemas.google.com/docs/2007"'; + $postData .= ' xmlns:gd="http://schemas.google.com/g/2005"'; + $postData .= ' gd:etag='.$etag.'>'; $postData .= '<title>'.$title.'</title>'; $postData .= '</entry>'; $this->sendRequest($uri, 'PUT', $postData); return true; } else { // Move to different collection - if ($collectionEntry = $this->getResource($collection)) { + $collectionEntry = $this->getResource($collection); + if ($collectionEntry) { $feedUri = $collectionEntry->getElementsByTagName('content')->item(0)->getAttribute('src'); // Construct post data $postData = '<?xml version="1.0" encoding="UTF-8"?>'; @@ -374,7 +417,8 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { switch ($mode) { case 'r': case 'rb': - if ($entry = $this->getResource($path)) { + $entry = $this->getResource($path); + if ($entry) { $extension = $this->getExtension($entry); $downloadUri = $entry->getElementsByTagName('content')->item(0)->getAttribute('src'); // TODO Non-native documents don't need these additional parameters @@ -394,8 +438,8 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { case 'x+': case 'c': case 'c+': - if (strrpos($path,'.') !== false) { - $ext = substr($path, strrpos($path,'.')); + if (strrpos($path, '.') !== false) { + $ext = substr($path, strrpos($path, '.')); } else { $ext = ''; } @@ -420,14 +464,14 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { private function uploadFile($path, $target) { $entry = $this->getResource($target); - if (!$entry) { + if ( ! $entry) { if (dirname($target) == '.' || dirname($target) == '/') { - $uploadUri = 'https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3Aroot/contents'; + $uploadUri = self::BASE_URI.'/upload/create-session/default/private/full/folder%3Aroot/contents'; } else { $entry = $this->getResource(dirname($target)); } } - if (!isset($uploadUri) && $entry) { + if ( ! isset($uploadUri) && $entry) { $links = $entry->getElementsByTagName('link'); foreach ($links as $link) { if ($link->getAttribute('rel') == 'http://schemas.google.com/g/2005#resumable-create-media') { @@ -466,7 +510,9 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } } $end = $i + $chunkSize - 1; - $headers = array('Content-Length: '.$chunkSize, 'Content-Type: '.$mimetype, 'Content-Range: bytes '.$i.'-'.$end.'/'.$size); + $headers = array('Content-Length: '.$chunkSize, + 'Content-Type: '.$mimetype, + 'Content-Range: bytes '.$i.'-'.$end.'/'.$size); $postData = fread($handle, $chunkSize); $result = $this->sendRequest($uploadUri, 'PUT', $postData, $headers, false, true, false, true); if ($result['code'] == '308') { @@ -484,7 +530,8 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } public function getMimeType($path, $entry = null) { - // Entry can be passed, because extension is required for opendir and the entry can't be cached without the extension + // Entry can be passed, because extension is required for opendir + // and the entry can't be cached without the extension if ($entry == null) { if ($path == '' || $path == '/') { return 'httpd/unix-directory'; @@ -494,8 +541,10 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } if ($entry) { $mimetype = $entry->getElementsByTagName('content')->item(0)->getAttribute('type'); - // Native Google Docs resources often default to text/html, but it may be more useful to default to a corresponding ODF mimetype - // Collections get reported as application/atom+xml, make sure it actually is a folder and fix the mimetype + // Native Google Docs resources often default to text/html, + // but it may be more useful to default to a corresponding ODF mimetype + // Collections get reported as application/atom+xml, + // make sure it actually is a folder and fix the mimetype if ($mimetype == 'text/html' || $mimetype == 'application/atom+xml;type=feed') { $categories = $entry->getElementsByTagName('category'); foreach ($categories as $category) { @@ -512,7 +561,8 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } else if (strlen(strstr($type, 'drawing')) > 0) { return 'application/vnd.oasis.opendocument.graphics'; } else { - // If nothing matches return text/html, all native Google Docs resources can be exported as text/html + // If nothing matches return text/html, + // all native Google Docs resources can be exported as text/html return 'text/html'; } } @@ -524,10 +574,13 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } public function free_space($path) { - if ($dom = $this->getFeed('https://docs.google.com/feeds/metadata/default', 'GET')) { + $dom = $this->getFeed(self::BASE_URI.'/metadata/default', 'GET'); + if ($dom) { // NOTE: Native Google Docs resources don't count towards quota - $total = $dom->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'quotaBytesTotal')->item(0)->nodeValue; - $used = $dom->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'quotaBytesUsed')->item(0)->nodeValue; + $total = $dom->getElementsByTagNameNS('http://schemas.google.com/g/2005', + 'quotaBytesTotal')->item(0)->nodeValue; + $used = $dom->getElementsByTagNameNS('http://schemas.google.com/g/2005', + 'quotaBytesUsed')->item(0)->nodeValue; return $total - $used; } return false; diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index eed2582dc99..071a9cd5f95 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -21,45 +21,46 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ $this->password=$params['password']; $this->share=$params['share']; $this->root=isset($params['root'])?$params['root']:'/'; - if(!$this->root || $this->root[0]!='/') { + if ( ! $this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } - if(substr($this->root,-1,1)!='/') { + if (substr($this->root, -1, 1)!='/') { $this->root.='/'; } - if(!$this->share || $this->share[0]!='/') { + if ( ! $this->share || $this->share[0]!='/') { $this->share='/'.$this->share; } - if(substr($this->share,-1,1)=='/') { - $this->share=substr($this->share,0,-1); + if (substr($this->share, -1, 1)=='/') { + $this->share=substr($this->share, 0, -1); } //create the root folder if necesary - if(!$this->is_dir('')) { + if ( ! $this->is_dir('')) { $this->mkdir(''); } } public function constructUrl($path) { - if(substr($path,-1)=='/') { - $path=substr($path,0,-1); + if (substr($path, -1)=='/') { + $path=substr($path, 0, -1); } return 'smb://'.$this->user.':'.$this->password.'@'.$this->host.$this->share.$this->root.$path; } public function stat($path) { - if(!$path and $this->root=='/') {//mtime doesn't work for shares + if ( ! $path and $this->root=='/') {//mtime doesn't work for shares $mtime=$this->shareMTime(); $stat=stat($this->constructUrl($path)); $stat['mtime']=$mtime; return $stat; - }else{ + } else { return stat($this->constructUrl($path)); } } public function filetype($path) { - 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 + // 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'; } /** @@ -67,11 +68,12 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ * @param int $time * @return bool */ - public function hasUpdated($path,$time) { - if(!$path and $this->root=='/') { - //mtime doesn't work for shares, but giving the nature of the backend, doing a full update is still just fast enough + public function hasUpdated($path, $time) { + if ( ! $path and $this->root=='/') { + // mtime doesn't work for shares, but giving the nature of the backend, + // doing a full update is still just fast enough return true; - }else{ + } else { $actualTime=$this->filemtime($path); return $actualTime>$time; } @@ -84,9 +86,9 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ $dh=$this->opendir(''); $lastCtime=0; while($file=readdir($dh)) { - if($file!='.' and $file!='..') { + if ($file!='.' and $file!='..') { $ctime=$this->filemtime($file); - if($ctime>$lastCtime) { + if ($ctime>$lastCtime) { $lastCtime=$ctime; } } diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php index 7263ef23253..a386e333995 100644 --- a/apps/files_external/lib/streamwrapper.php +++ b/apps/files_external/lib/streamwrapper.php @@ -15,11 +15,11 @@ abstract class OC_FileStorage_StreamWrapper extends OC_Filestorage_Common{ } public function rmdir($path) { - if($this->file_exists($path)) { - $succes=rmdir($this->constructUrl($path)); + if ($this->file_exists($path)) { + $succes = rmdir($this->constructUrl($path)); clearstatcache(); return $succes; - }else{ + } else { return false; } } @@ -45,45 +45,43 @@ abstract class OC_FileStorage_StreamWrapper extends OC_Filestorage_Common{ } public function unlink($path) { - $succes=unlink($this->constructUrl($path)); + $succes = unlink($this->constructUrl($path)); clearstatcache(); return $succes; } - public function fopen($path,$mode) { - return fopen($this->constructUrl($path),$mode); + public function fopen($path, $mode) { + return fopen($this->constructUrl($path), $mode); } public function free_space($path) { return 0; } - public function touch($path,$mtime=null) { - if(is_null($mtime)) { - $fh=$this->fopen($path,'a'); - fwrite($fh,''); + public function touch($path, $mtime = null) { + if (is_null($mtime)) { + $fh = $this->fopen($path, 'a'); + fwrite($fh, ''); fclose($fh); - }else{ + } else { return false;//not supported } } - public function getFile($path,$target) { - return copy($this->constructUrl($path),$target); + public function getFile($path, $target) { + return copy($this->constructUrl($path), $target); } - public function uploadFile($path,$target) { - return copy($path,$this->constructUrl($target)); + public function uploadFile($path, $target) { + return copy($path, $this->constructUrl($target)); } - public function rename($path1,$path2) { - return rename($this->constructUrl($path1),$this->constructUrl($path2)); + public function rename($path1, $path2) { + return rename($this->constructUrl($path1), $this->constructUrl($path2)); } public function stat($path) { return stat($this->constructUrl($path)); } - - } diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 632c72c280f..a071dfdbb03 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -39,8 +39,8 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return string */ private function getContainerName($path) { - $path=trim(trim($this->root,'/')."/".$path,'/.'); - return str_replace('/','\\',$path); + $path=trim(trim($this->root, '/')."/".$path, '/.'); + return str_replace('/', '\\', $path); } /** @@ -49,17 +49,17 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return CF_Container */ private function getContainer($path) { - if($path=='' or $path=='/') { + if ($path=='' or $path=='/') { return $this->rootContainer; } - if(isset($this->containers[$path])) { + if (isset($this->containers[$path])) { return $this->containers[$path]; } - try{ + try { $container=$this->conn->get_container($this->getContainerName($path)); $this->containers[$path]=$container; return $container; - }catch(NoSuchContainerException $e) { + } catch(NoSuchContainerException $e) { return null; } } @@ -70,16 +70,16 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return CF_Container */ private function createContainer($path) { - if($path=='' or $path=='/' or $path=='.') { + if ($path=='' or $path=='/' or $path=='.') { return $this->conn->create_container($this->getContainerName($path)); } $parent=dirname($path); - if($parent=='' or $parent=='/' or $parent=='.') { + if ($parent=='' or $parent=='/' or $parent=='.') { $parentContainer=$this->rootContainer; - }else{ - if(!$this->containerExists($parent)) { + } else { + if ( ! $this->containerExists($parent)) { $parentContainer=$this->createContainer($parent); - }else{ + } else { $parentContainer=$this->getContainer($parent); } } @@ -93,21 +93,21 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return CF_Object */ private function getObject($path) { - if(isset($this->objects[$path])) { + if (isset($this->objects[$path])) { return $this->objects[$path]; } $container=$this->getContainer(dirname($path)); - if(is_null($container)) { + if (is_null($container)) { return null; - }else{ + } else { if ($path=="/" or $path=='') { return null; } - try{ + try { $obj=$container->get_object(basename($path)); $this->objects[$path]=$obj; return $obj; - }catch(NoSuchObjectException $e) { + } catch(NoSuchObjectException $e) { return null; } } @@ -119,11 +119,11 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return array */ private function getObjects($container) { - if(is_null($container)) { + if (is_null($container)) { return array(); - }else{ + } else { $files=$container->get_objects(); - foreach($files as &$file) { + foreach ($files as &$file) { $file=$file->name; } return $files; @@ -137,7 +137,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ */ private function createObject($path) { $container=$this->getContainer(dirname($path)); - if(!is_null($container)) { + if ( ! is_null($container)) { $container=$this->createContainer(dirname($path)); } return $container->create_object(basename($path)); @@ -169,15 +169,15 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ private function getSubContainers($container) { $tmpFile=OCP\Files::tmpFile(); $obj=$this->getSubContainerFile($container); - try{ + try { $obj->save_to_filename($tmpFile); - }catch(Exception $e) { + } catch(Exception $e) { return array(); } $obj->save_to_filename($tmpFile); $containers=file($tmpFile); unlink($tmpFile); - foreach($containers as &$sub) { + foreach ($containers as &$sub) { $sub=trim($sub); } return $containers; @@ -189,28 +189,28 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string name * @return bool */ - private function addSubContainer($container,$name) { - if(!$name) { + private function addSubContainer($container, $name) { + if ( ! $name) { return false; } $tmpFile=OCP\Files::tmpFile(); $obj=$this->getSubContainerFile($container); - try{ + try { $obj->save_to_filename($tmpFile); $containers=file($tmpFile); - foreach($containers as &$sub) { + foreach ($containers as &$sub) { $sub=trim($sub); } - if(array_search($name,$containers)!==false) { + if (array_search($name, $containers)!==false) { unlink($tmpFile); return false; - }else{ - $fh=fopen($tmpFile,'a'); - fwrite($fh,$name."\n"); + } else { + $fh=fopen($tmpFile, 'a'); + fwrite($fh, $name."\n"); } - }catch(Exception $e) { + } catch(Exception $e) { $containers=array(); - file_put_contents($tmpFile,$name."\n"); + file_put_contents($tmpFile, $name."\n"); } $obj->load_from_filename($tmpFile); @@ -224,28 +224,28 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string name * @return bool */ - private function removeSubContainer($container,$name) { - if(!$name) { + private function removeSubContainer($container, $name) { + if ( ! $name) { return false; } $tmpFile=OCP\Files::tmpFile(); $obj=$this->getSubContainerFile($container); - try{ + try { $obj->save_to_filename($tmpFile); $containers=file($tmpFile); - }catch(Exception $e) { + } catch (Exception $e) { return false; } - foreach($containers as &$sub) { + foreach ($containers as &$sub) { $sub=trim($sub); } - $i=array_search($name,$containers); - if($i===false) { + $i=array_search($name, $containers); + if ($i===false) { unlink($tmpFile); return false; - }else{ + } else { unset($containers[$i]); - file_put_contents($tmpFile, implode("\n",$containers)."\n"); + file_put_contents($tmpFile, implode("\n", $containers)."\n"); } $obj->load_from_filename($tmpFile); @@ -259,9 +259,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @return CF_Object */ private function getSubContainerFile($container) { - try{ + try { return $container->get_object(self::SUBCONTAINER_FILE); - }catch(NoSuchObjectException $e) { + } catch(NoSuchObjectException $e) { return $container->create_object(self::SUBCONTAINER_FILE); } } @@ -271,8 +271,16 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ $this->host=$params['host']; $this->user=$params['user']; $this->root=isset($params['root'])?$params['root']:'/'; - $this->secure=isset($params['secure'])?(bool)$params['secure']:true; - if(!$this->root || $this->root[0]!='/') { + if (isset($params['secure'])) { + if (is_string($params['secure'])) { + $this->secure = ($params['secure'] === 'true'); + } else { + $this->secure = (bool)$params['secure']; + } + } else { + $this->secure = false; + } + if ( ! $this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } $this->auth = new CF_Authentication($this->user, $this->token, null, $this->host); @@ -280,29 +288,29 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ $this->conn = new CF_Connection($this->auth); - if(!$this->containerExists('/')) { + if ( ! $this->containerExists('/')) { $this->rootContainer=$this->createContainer('/'); - }else{ + } else { $this->rootContainer=$this->getContainer('/'); } } public function mkdir($path) { - if($this->containerExists($path)) { + if ($this->containerExists($path)) { return false; - }else{ + } else { $this->createContainer($path); return true; } } public function rmdir($path) { - if(!$this->containerExists($path)) { + if ( ! $this->containerExists($path)) { return false; - }else{ + } else { $this->emptyContainer($path); - if($path!='' and $path!='/') { + if ($path!='' and $path!='/') { $parentContainer=$this->getContainer(dirname($path)); $this->removeSubContainer($parentContainer, basename($path)); } @@ -315,12 +323,12 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ private function emptyContainer($path) { $container=$this->getContainer($path); - if(is_null($container)) { + if (is_null($container)) { return; } $subContainers=$this->getSubContainers($container); - foreach($subContainers as $sub) { - if($sub) { + foreach ($subContainers as $sub) { + if ($sub) { $this->emptyContainer($path.'/'.$sub); $this->conn->delete_container($this->getContainerName($path.'/'.$sub)); unset($this->containers[$path.'/'.$sub]); @@ -328,7 +336,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } $objects=$this->getObjects($container); - foreach($objects as $object) { + foreach ($objects as $object) { $container->delete_object($object); unset($this->objects[$path.'/'.$object]); } @@ -337,21 +345,21 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ public function opendir($path) { $container=$this->getContainer($path); $files=$this->getObjects($container); - $i=array_search(self::SUBCONTAINER_FILE,$files); - if($i!==false) { + $i=array_search(self::SUBCONTAINER_FILE, $files); + if ($i!==false) { unset($files[$i]); } $subContainers=$this->getSubContainers($container); - $files=array_merge($files,$subContainers); + $files=array_merge($files, $subContainers); $id=$this->getContainerName($path); OC_FakeDirStream::$dirs[$id]=$files; return opendir('fakedir://'.$id); } public function filetype($path) { - if($this->containerExists($path)) { + if ($this->containerExists($path)) { return 'dir'; - }else{ + } else { return 'file'; } } @@ -365,26 +373,26 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } public function file_exists($path) { - if($this->is_dir($path)) { + if ($this->is_dir($path)) { return true; - }else{ + } else { return $this->objectExists($path); } } public function file_get_contents($path) { $obj=$this->getObject($path); - if(is_null($obj)) { + if (is_null($obj)) { return false; } return $obj->read(); } - public function file_put_contents($path,$content) { + public function file_put_contents($path, $content) { $obj=$this->getObject($path); - if(is_null($obj)) { + if (is_null($obj)) { $container=$this->getContainer(dirname($path)); - if(is_null($container)) { + if (is_null($container)) { return false; } $obj=$container->create_object(basename($path)); @@ -394,19 +402,19 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } public function unlink($path) { - if($this->containerExists($path)) { + if ($this->containerExists($path)) { return $this->rmdir($path); } - if($this->objectExists($path)) { + if ($this->objectExists($path)) { $container=$this->getContainer(dirname($path)); $container->delete_object(basename($path)); unset($this->objects[$path]); - }else{ + } else { return false; } } - public function fopen($path,$mode) { + public function fopen($path, $mode) { switch($mode) { case 'r': case 'rb': @@ -432,14 +440,14 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ case 'c': case 'c+': $tmpFile=$this->getTmpFile($path); - OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this,'writeBack'); + OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack'); self::$tempFiles[$tmpFile]=$path; - return fopen('close://'.$tmpFile,$mode); + return fopen('close://'.$tmpFile, $mode); } } public function writeBack($tmpFile) { - if(isset(self::$tempFiles[$tmpFile])) { + if (isset(self::$tempFiles[$tmpFile])) { $this->fromTmpFile($tmpFile, self::$tempFiles[$tmpFile]); unlink($tmpFile); } @@ -449,12 +457,12 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ return 1024*1024*1024*8; } - public function touch($path,$mtime=null) { + public function touch($path, $mtime=null) { $obj=$this->getObject($path); - if(is_null($obj)) { + if (is_null($obj)) { return false; } - if(is_null($mtime)) { + if (is_null($mtime)) { $mtime=time(); } @@ -463,23 +471,23 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ $obj->sync_metadata(); } - public function rename($path1,$path2) { + public function rename($path1, $path2) { $sourceContainer=$this->getContainer(dirname($path1)); $targetContainer=$this->getContainer(dirname($path2)); - $result=$sourceContainer->move_object_to(basename($path1),$targetContainer, basename($path2)); + $result=$sourceContainer->move_object_to(basename($path1), $targetContainer, basename($path2)); unset($this->objects[$path1]); - if($result) { + if ($result) { $targetObj=$this->getObject($path2); $this->resetMTime($targetObj); } return $result; } - public function copy($path1,$path2) { + public function copy($path1, $path2) { $sourceContainer=$this->getContainer(dirname($path1)); $targetContainer=$this->getContainer(dirname($path2)); - $result=$sourceContainer->copy_object_to(basename($path1),$targetContainer, basename($path2)); - if($result) { + $result=$sourceContainer->copy_object_to(basename($path1), $targetContainer, basename($path2)); + if ($result) { $targetObj=$this->getObject($path2); $this->resetMTime($targetObj); } @@ -488,7 +496,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ public function stat($path) { $container=$this->getContainer($path); - if (!is_null($container)) { + if ( ! is_null($container)) { return array( 'mtime'=>-1, 'size'=>$container->bytes_used, @@ -498,13 +506,13 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ $obj=$this->getObject($path); - if(is_null($obj)) { + if (is_null($obj)) { return false; } - if(isset($obj->metadata['Mtime']) and $obj->metadata['Mtime']>-1) { + if (isset($obj->metadata['Mtime']) and $obj->metadata['Mtime']>-1) { $mtime=$obj->metadata['Mtime']; - }else{ + } else { $mtime=strtotime($obj->last_modified); } return array( @@ -516,18 +524,18 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ private function getTmpFile($path) { $obj=$this->getObject($path); - if(!is_null($obj)) { + if ( ! is_null($obj)) { $tmpFile=OCP\Files::tmpFile(); $obj->save_to_filename($tmpFile); return $tmpFile; - }else{ + } else { return OCP\Files::tmpFile(); } } - private function fromTmpFile($tmpFile,$path) { + private function fromTmpFile($tmpFile, $path) { $obj=$this->getObject($path); - if(is_null($obj)) { + if (is_null($obj)) { $obj=$this->createObject($path); } $obj->load_from_filename($tmpFile); @@ -539,7 +547,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param CF_Object obj */ private function resetMTime($obj) { - if(isset($obj->metadata['Mtime'])) { + if (isset($obj->metadata['Mtime'])) { $obj->metadata['Mtime']=-1; $obj->sync_metadata(); } diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index e29ec6cb8a2..68aca228bc5 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -27,12 +27,20 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->host=$host; $this->user=$params['user']; $this->password=$params['password']; - $this->secure=(isset($params['secure']) && $params['secure'] == 'true')?true:false; + if (isset($params['secure'])) { + if (is_string($params['secure'])) { + $this->secure = ($params['secure'] === 'true'); + } else { + $this->secure = (bool)$params['secure']; + } + } else { + $this->secure = false; + } $this->root=isset($params['root'])?$params['root']:'/'; - if(!$this->root || $this->root[0]!='/') { + if ( ! $this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } - if(substr($this->root, -1, 1)!='/') { + if (substr($this->root, -1, 1)!='/') { $this->root.='/'; } @@ -44,9 +52,10 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->client = new OC_Connector_Sabre_Client($settings); - if($caview = \OCP\Files::getStorage('files_external')) { + $caview = \OCP\Files::getStorage('files_external'); + if ($caview) { $certPath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("").'rootcerts.crt'; - if (file_exists($certPath)) { + if (file_exists($certPath)) { $this->client->addTrustedCertificates($certPath); } } @@ -56,7 +65,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ private function createBaseUri() { $baseUri='http'; - if($this->secure) { + if ($this->secure) { $baseUri.='s'; } $baseUri.='://'.$this->host.$this->root; @@ -75,29 +84,29 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ public function opendir($path) { $path=$this->cleanPath($path); - try{ + try { $response=$this->client->propfind($path, array(), 1); $id=md5('webdav'.$this->root.$path); OC_FakeDirStream::$dirs[$id]=array(); $files=array_keys($response); array_shift($files);//the first entry is the current directory - foreach($files as $file) { + foreach ($files as $file) { $file = urldecode(basename($file)); OC_FakeDirStream::$dirs[$id][]=$file; } return opendir('fakedir://'.$id); - }catch(Exception $e) { + } catch(Exception $e) { return false; } } public function filetype($path) { $path=$this->cleanPath($path); - try{ + try { $response=$this->client->propfind($path, array('{DAV:}resourcetype')); $responseType=$response["{DAV:}resourcetype"]->resourceType; return (count($responseType)>0 and $responseType[0]=="{DAV:}collection")?'dir':'file'; - }catch(Exception $e) { + } catch(Exception $e) { error_log($e->getMessage()); \OCP\Util::writeLog("webdav client", \OCP\Util::sanitizeHTML($e->getMessage()), \OCP\Util::ERROR); return false; @@ -114,10 +123,10 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ public function file_exists($path) { $path=$this->cleanPath($path); - try{ + try { $this->client->propfind($path, array('{DAV:}resourcetype')); return true;//no 404 exception - }catch(Exception $e) { + } catch(Exception $e) { return false; } } @@ -126,12 +135,12 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ return $this->simpleResponse('DELETE', $path, null, 204); } - public function fopen($path,$mode) { + public function fopen($path, $mode) { $path=$this->cleanPath($path); switch($mode) { case 'r': case 'rb': - if(!$this->file_exists($path)) { + if ( ! $this->file_exists($path)) { return false; } //straight up curl instead of sabredav here, sabredav put's the entire get result in memory @@ -158,14 +167,14 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ case 'c': case 'c+': //emulate these - if(strrpos($path, '.')!==false) { + if (strrpos($path, '.')!==false) { $ext=substr($path, strrpos($path, '.')); - }else{ + } else { $ext=''; } $tmpFile=OCP\Files::tmpFile($ext); OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack'); - if($this->file_exists($path)) { + if ($this->file_exists($path)) { $this->getFile($path, $tmpFile); } self::$tempFiles[$tmpFile]=$path; @@ -174,7 +183,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ } public function writeBack($tmpFile) { - if(isset(self::$tempFiles[$tmpFile])) { + if (isset(self::$tempFiles[$tmpFile])) { $this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]); unlink($tmpFile); } @@ -182,32 +191,32 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ public function free_space($path) { $path=$this->cleanPath($path); - try{ + try { $response=$this->client->propfind($path, array('{DAV:}quota-available-bytes')); - if(isset($response['{DAV:}quota-available-bytes'])) { + if (isset($response['{DAV:}quota-available-bytes'])) { return (int)$response['{DAV:}quota-available-bytes']; - }else{ + } else { return 0; } - }catch(Exception $e) { + } catch(Exception $e) { return 0; } } - public function touch($path,$mtime=null) { - if(is_null($mtime)) { + public function touch($path, $mtime=null) { + if (is_null($mtime)) { $mtime=time(); } $path=$this->cleanPath($path); $this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime)); } - public function getFile($path,$target) { + public function getFile($path, $target) { $source=$this->fopen($path, 'r'); file_put_contents($target, $source); } - public function uploadFile($path,$target) { + public function uploadFile($path, $target) { $source=fopen($path, 'r'); $curl = curl_init(); @@ -221,13 +230,13 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ curl_close ($curl); } - public function rename($path1,$path2) { + public function rename($path1, $path2) { $path1=$this->cleanPath($path1); $path2=$this->root.$this->cleanPath($path2); - try{ + try { $response=$this->client->request('MOVE', $path1, null, array('Destination'=>$path2)); return true; - }catch(Exception $e) { + } catch(Exception $e) { echo $e; echo 'fail'; var_dump($response); @@ -235,13 +244,13 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ } } - public function copy($path1,$path2) { + public function copy($path1, $path2) { $path1=$this->cleanPath($path1); $path2=$this->root.$this->cleanPath($path2); - try{ + try { $response=$this->client->request('COPY', $path1, null, array('Destination'=>$path2)); return true; - }catch(Exception $e) { + } catch(Exception $e) { echo $e; echo 'fail'; var_dump($response); @@ -251,50 +260,50 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ public function stat($path) { $path=$this->cleanPath($path); - try{ - $response=$this->client->propfind($path, array('{DAV:}getlastmodified','{DAV:}getcontentlength')); + try { + $response=$this->client->propfind($path, array('{DAV:}getlastmodified', '{DAV:}getcontentlength')); return array( 'mtime'=>strtotime($response['{DAV:}getlastmodified']), 'size'=>(int)isset($response['{DAV:}getcontentlength']) ? $response['{DAV:}getcontentlength'] : 0, 'ctime'=>-1, ); - }catch(Exception $e) { + } catch(Exception $e) { return array(); } } public function getMimeType($path) { $path=$this->cleanPath($path); - try{ - $response=$this->client->propfind($path, array('{DAV:}getcontenttype','{DAV:}resourcetype')); + try { + $response=$this->client->propfind($path, array('{DAV:}getcontenttype', '{DAV:}resourcetype')); $responseType=$response["{DAV:}resourcetype"]->resourceType; $type=(count($responseType)>0 and $responseType[0]=="{DAV:}collection")?'dir':'file'; - if($type=='dir') { + if ($type=='dir') { return 'httpd/unix-directory'; - }elseif(isset($response['{DAV:}getcontenttype'])) { + } elseif (isset($response['{DAV:}getcontenttype'])) { return $response['{DAV:}getcontenttype']; - }else{ + } else { return false; } - }catch(Exception $e) { + } catch(Exception $e) { return false; } } private function cleanPath($path) { - if(!$path || $path[0]=='/') { + if ( ! $path || $path[0]=='/') { return substr($path, 1); - }else{ + } else { return $path; } } - private function simpleResponse($method,$path,$body,$expected) { + private function simpleResponse($method, $path, $body, $expected) { $path=$this->cleanPath($path); - try{ + try { $response=$this->client->request($method, $path, $body); return $response['statusCode']==$expected; - }catch(Exception $e) { + } catch(Exception $e) { return false; } } diff --git a/apps/files_external/personal.php b/apps/files_external/personal.php index f0d76460f54..4215b28787e 100755 --- a/apps/files_external/personal.php +++ b/apps/files_external/personal.php @@ -29,5 +29,6 @@ $tmpl = new OCP\Template('files_external', 'settings'); $tmpl->assign('isAdminPage', false, false); $tmpl->assign('mounts', OC_Mount_Config::getPersonalMountPoints()); $tmpl->assign('certs', OC_Mount_Config::getCertificates()); +$tmpl->assign('dependencies', OC_Mount_Config::checkDependencies(), false); $tmpl->assign('backends', $backends); return $tmpl->fetchPage(); diff --git a/apps/files_external/settings.php b/apps/files_external/settings.php index d2be21b7116..2f239f7cb95 100644 --- a/apps/files_external/settings.php +++ b/apps/files_external/settings.php @@ -30,5 +30,6 @@ $tmpl->assign('mounts', OC_Mount_Config::getSystemMountPoints()); $tmpl->assign('backends', OC_Mount_Config::getBackends()); $tmpl->assign('groups', OC_Group::getGroups()); $tmpl->assign('users', OCP\User::getUsers()); +$tmpl->assign('dependencies', OC_Mount_Config::checkDependencies(), false); $tmpl->assign('allowUserMounting', OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes')); return $tmpl->fetchPage(); diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 367ce2bc03e..50f4a16a5ab 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -1,6 +1,7 @@ <form id="files_external"> <fieldset class="personalblock"> <legend><strong><?php echo $l->t('External Storage'); ?></strong></legend> + <?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) echo ''.$_['dependencies'].''; ?> <table id="externalStorage" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'> <thead> <tr> @@ -16,18 +17,22 @@ <?php $_['mounts'] = array_merge($_['mounts'], array('' => array())); ?> <?php foreach ($_['mounts'] as $mountPoint => $mount): ?> <tr <?php echo ($mountPoint != '') ? 'class="'.$mount['class'].'"' : 'id="addMountPoint"'; ?>> - <td class="mountPoint"><input type="text" name="mountPoint" value="<?php echo $mountPoint; ?>" placeholder="<?php echo $l->t('Mount point'); ?>" /></td> + <td class="mountPoint"><input type="text" name="mountPoint" + value="<?php echo $mountPoint; ?>" + placeholder="<?php echo $l->t('Mount point'); ?>" /></td> <?php if ($mountPoint == ''): ?> <td class="backend"> <select id="selectBackend" data-configurations='<?php echo json_encode($_['backends']); ?>'> - <option value="" disabled selected style="display:none;"><?php echo $l->t('Add mount point'); ?></option> + <option value="" disabled selected + style="display:none;"><?php echo $l->t('Add mount point'); ?></option> <?php foreach ($_['backends'] as $class => $backend): ?> <option value="<?php echo $class; ?>"><?php echo $backend['backend']; ?></option> <?php endforeach; ?> </select> </td> <?php else: ?> - <td class="backend" data-class="<?php echo $mount['class']; ?>"><?php echo $mount['backend']; ?></td> + <td class="backend" + data-class="<?php echo $mount['class']; ?>"><?php echo $mount['backend']; ?></td> <?php endif; ?> <td class ="configuration" width="100%"> <?php if (isset($mount['configuration'])): ?> @@ -35,46 +40,75 @@ <?php if (isset($_['backends'][$mount['class']]['configuration'][$parameter])): ?> <?php $placeholder = $_['backends'][$mount['class']]['configuration'][$parameter]; ?> <?php if (strpos($placeholder, '*') !== false): ?> - <input type="password" data-parameter="<?php echo $parameter; ?>" value="<?php echo $value; ?>" placeholder="<?php echo substr($placeholder, 1); ?>" /> - <?php elseif(strpos($placeholder, '!') !== false): ?> - <label><input type="checkbox" data-parameter="<?php echo $parameter; ?>" <?php if ($value == 'true') echo ' checked="checked"'; ?> /><?php echo substr($placeholder, 1); ?></label> + <input type="password" + data-parameter="<?php echo $parameter; ?>" + value="<?php echo $value; ?>" + placeholder="<?php echo substr($placeholder, 1); ?>" /> + <?php elseif (strpos($placeholder, '!') !== false): ?> + <label><input type="checkbox" + data-parameter="<?php echo $parameter; ?>" + <?php if ($value == 'true'): ?> checked="checked"<?php endif; ?> + /><?php echo substr($placeholder, 1); ?></label> <?php elseif (strpos($placeholder, '&') !== false): ?> - <input type="text" class="optional" data-parameter="<?php echo $parameter; ?>" value="<?php echo $value; ?>" placeholder="<?php echo substr($placeholder, 5); ?>" /> + <input type="text" + class="optional" + data-parameter="<?php echo $parameter; ?>" + value="<?php echo $value; ?>" + placeholder="<?php echo substr($placeholder, 5); ?>" /> <?php elseif (strpos($placeholder, '#') !== false): ?> - <input type="hidden" data-parameter="<?php echo $parameter; ?>" value="<?php echo $value; ?>" /> + <input type="hidden" + data-parameter="<?php echo $parameter; ?>" + value="<?php echo $value; ?>" /> <?php else: ?> - <input type="text" data-parameter="<?php echo $parameter; ?>" value="<?php echo $value; ?>" placeholder="<?php echo $placeholder; ?>" /> + <input type="text" + data-parameter="<?php echo $parameter; ?>" + value="<?php echo $value; ?>" + placeholder="<?php echo $placeholder; ?>" /> <?php endif; ?> <?php endif; ?> <?php endforeach; ?> - <?php if (isset($_['backends'][$mount['class']]['custom'])) OCP\Util::addScript('files_external', $_['backends'][$mount['class']]['custom']); ?> + <?php if (isset($_['backends'][$mount['class']]['custom'])): ?> + <?php OCP\Util::addScript('files_external', + $_['backends'][$mount['class']]['custom']); ?> + <?php endif; ?> <?php endif; ?> </td> - <!--<td class="options"> - <select class="selectOptions" title="<?php echo $l->t('None set')?>" multiple="multiple" disabled> - <?php if (OCP\App::isEnabled('files_encryption')) echo '<option value="Encrypt">Encrypt</option>'; ?> - <?php if (OCP\App::isEnabled('files_versions')) echo '<option value="Version control">Version control</option>'; ?> - <?php if (OCP\App::isEnabled('files_sharing')) echo '<option value="Allow sharing">Allow sharing</option>'; ?> - </select> - </td>--> <?php if ($_['isAdminPage']): ?> - <td class="applicable" align="right" data-applicable-groups='<?php if (isset($mount['applicable']['groups'])) echo json_encode($mount['applicable']['groups']); ?>' data-applicable-users='<?php if (isset($mount['applicable']['users'])) echo json_encode($mount['applicable']['users']); ?>'> - <select class="chzn-select" multiple style="width:20em;" data-placeholder="<?php echo $l->t('None set'); ?>"> + <td class="applicable" + align="right" + data-applicable-groups='<?php if (isset($mount['applicable']['groups'])) + echo json_encode($mount['applicable']['groups']); ?>' + data-applicable-users='<?php if (isset($mount['applicable']['users'])) + echo json_encode($mount['applicable']['users']); ?>'> + <select class="chzn-select" + multiple style="width:20em;" + data-placeholder="<?php echo $l->t('None set'); ?>"> <option value="all"><?php echo $l->t('All Users'); ?></option> <optgroup label="<?php echo $l->t('Groups'); ?>"> - <?php foreach ($_['groups'] as $group): ?> - <option value="<?php echo $group; ?>(group)" <?php if (isset($mount['applicable']['groups']) && in_array($group, $mount['applicable']['groups'])) echo 'selected="selected"'; ?>><?php echo $group; ?></option> - <?php endforeach; ?> + <?php foreach ($_['groups'] as $group): ?> + <option value="<?php echo $group; ?>(group)" + <?php if (isset($mount['applicable']['groups']) && in_array($group, $mount['applicable']['groups'])): ?> + selected="selected" + <?php endif; ?>><?php echo $group; ?></option> + <?php endforeach; ?> </optgroup> <optgroup label="<?php echo $l->t('Users'); ?>"> - <?php foreach ($_['users'] as $user): ?> - <option value="<?php echo $user; ?>" <?php if (isset($mount['applicable']['users']) && in_array($user, $mount['applicable']['users'])) echo 'selected="selected"'; ?>"><?php echo $user; ?></option> - <?php endforeach; ?> + <?php foreach ($_['users'] as $user): ?> + <option value="<?php echo $user; ?>" + <?php if (isset($mount['applicable']['users']) && in_array($user, $mount['applicable']['users'])): ?> + selected="selected" + <?php endif; ?>><?php echo $user; ?></option> + <?php endforeach; ?> </optgroup> </select> </td> <?php endif; ?> - <td <?php echo ($mountPoint != '') ? 'class="remove"' : 'style="visibility:hidden;"'; ?>><img alt="<?php echo $l->t('Delete'); ?>" title="<?php echo $l->t('Delete'); ?>" class="svg action" src="<?php echo image_path('core', 'actions/delete.svg'); ?>" /></td> + <td <?php if ($mountPoint != ''): ?>class="remove" + <?php else: ?>style="visibility:hidden;" + <?php endif ?>><img alt="<?php echo $l->t('Delete'); ?>" + title="<?php echo $l->t('Delete'); ?>" + class="svg action" + src="<?php echo image_path('core', 'actions/delete.svg'); ?>" /></td> </tr> <?php endforeach; ?> </tbody> @@ -83,16 +117,22 @@ <?php if ($_['isAdminPage']): ?> <br /> - <input type="checkbox" name="allowUserMounting" id="allowUserMounting" value="1" <?php if ($_['allowUserMounting'] == 'yes') echo ' checked="checked"'; ?> /> + <input type="checkbox" + name="allowUserMounting" + id="allowUserMounting" + value="1" <?php if ($_['allowUserMounting'] == 'yes') echo ' checked="checked"'; ?> /> <label for="allowUserMounting"><?php echo $l->t('Enable User External Storage'); ?></label><br/> <em><?php echo $l->t('Allow users to mount their own external storage'); ?></em> <?php endif; ?> </fieldset> </form> -<form id="files_external" method="post" enctype="multipart/form-data" action="<?php echo OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php'); ?>"> +<form id="files_external" + method="post" + enctype="multipart/form-data" + action="<?php echo OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php'); ?>"> <fieldset class="personalblock"> -<?php if (!$_['isAdminPage']): ?> +<?php if ( ! $_['isAdminPage']): ?> <table id="sslCertificate" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'> <thead> <tr> @@ -104,13 +144,18 @@ <?php foreach ($_['certs'] as $rootCert): ?> <tr id="<?php echo $rootCert ?>"> <td class="rootCert"><?php echo $rootCert ?></td> - <td <?php echo ($rootCert != '') ? 'class="remove"' : 'style="visibility:hidden;"'; ?>><img alt="<?php echo $l->t('Delete'); ?>" title="<?php echo $l->t('Delete'); ?>" class="svg action" src="<?php echo image_path('core', 'actions/delete.svg'); ?>" /></td> + <td <?php if ($rootCert != ''): ?>class="remove" + <?php else: ?>style="visibility:hidden;" + <?php endif; ?>><img alt="<?php echo $l->t('Delete'); ?>" + title="<?php echo $l->t('Delete'); ?>" + class="svg action" + src="<?php echo image_path('core', 'actions/delete.svg'); ?>" /></td> </tr> <?php endforeach; ?> </tbody> </table> - <input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;"> - <input type="submit" name="cert_import" value="<?php echo $l->t('Import Root Certificate'); ?>" /> + <input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;"> + <input type="submit" name="cert_import" value="<?php echo $l->t('Import Root Certificate'); ?>" /> <?php endif; ?> </fieldset> -</form>
\ No newline at end of file +</form> diff --git a/apps/files_external/tests/amazons3.php b/apps/files_external/tests/amazons3.php index 725f4ba05da..39f96fe8e55 100644 --- a/apps/files_external/tests/amazons3.php +++ b/apps/files_external/tests/amazons3.php @@ -28,7 +28,7 @@ class Test_Filestorage_AmazonS3 extends Test_FileStorage { 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']) { + 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 @@ -37,7 +37,8 @@ class Test_Filestorage_AmazonS3 extends Test_FileStorage { public function tearDown() { if ($this->instance) { - $s3 = new AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret'])); + $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/dropbox.php b/apps/files_external/tests/dropbox.php index 56319b9f5d7..304cb3ca38c 100644 --- a/apps/files_external/tests/dropbox.php +++ b/apps/files_external/tests/dropbox.php @@ -12,7 +12,7 @@ class Test_Filestorage_Dropbox extends Test_FileStorage { 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']) { + 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 diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php index 4549c420410..d0404b5f34c 100644 --- a/apps/files_external/tests/ftp.php +++ b/apps/files_external/tests/ftp.php @@ -12,7 +12,7 @@ class Test_Filestorage_FTP extends Test_FileStorage { 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']) { + 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 @@ -24,4 +24,26 @@ class Test_Filestorage_FTP extends Test_FileStorage { OCP\Files::rmdirr($this->instance->constructUrl('')); } } + + public function testConstructUrl(){ + $config = array ( 'host' => 'localhost', + 'user' => 'ftp', + 'password' => 'ftp', + 'root' => '/', + 'secure' => false ); + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = true; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = 'false'; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = 'true'; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + } } diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php index 46e622cc180..379bf992ff5 100644 --- a/apps/files_external/tests/google.php +++ b/apps/files_external/tests/google.php @@ -27,7 +27,7 @@ class Test_Filestorage_Google extends Test_FileStorage { 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']) { + 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 diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php index 2c03ef5dbd0..2d6268ef269 100644 --- a/apps/files_external/tests/smb.php +++ b/apps/files_external/tests/smb.php @@ -12,7 +12,7 @@ class Test_Filestorage_SMB extends Test_FileStorage { 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']) { + 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 diff --git a/apps/files_external/tests/swift.php b/apps/files_external/tests/swift.php index 8cf2a3abc76..8b25db50996 100644 --- a/apps/files_external/tests/swift.php +++ b/apps/files_external/tests/swift.php @@ -12,7 +12,7 @@ class Test_Filestorage_SWIFT extends Test_FileStorage { 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']) { + 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 diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php index 2da88f63edd..dd938a0c93a 100644 --- a/apps/files_external/tests/webdav.php +++ b/apps/files_external/tests/webdav.php @@ -12,7 +12,7 @@ class Test_Filestorage_DAV extends Test_FileStorage { 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']) { + 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 diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index e75c538b150..e998626f4a4 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -19,11 +19,11 @@ if (version_compare($installedVersion, '0.3', '<')) { $itemType = 'file'; } if ($row['permissions'] == 0) { - $permissions = OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE; + $permissions = OCP\PERMISSION_READ | OCP\PERMISSION_SHARE; } else { - $permissions = OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_UPDATE | OCP\Share::PERMISSION_SHARE; + $permissions = OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE | OCP\PERMISSION_SHARE; if ($itemType == 'folder') { - $permissions |= OCP\Share::PERMISSION_CREATE; + $permissions |= OCP\PERMISSION_CREATE; } } $pos = strrpos($row['uid_shared_with'], '@'); diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 7eb086712f4..8a546d62163 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -33,6 +33,4 @@ $(document).ready(function() { }); OC.Share.loadIcons('file'); } - - -});
\ No newline at end of file +}); diff --git a/apps/files_sharing/l10n/gl.php b/apps/files_sharing/l10n/gl.php index c9644d720e3..d03f1a5005f 100644 --- a/apps/files_sharing/l10n/gl.php +++ b/apps/files_sharing/l10n/gl.php @@ -1,7 +1,9 @@ <?php $TRANSLATIONS = array( "Password" => "Contrasinal", "Submit" => "Enviar", -"Download" => "Baixar", -"No preview available for" => "Sen vista previa dispoñible para ", +"%s shared the folder %s with you" => "%s compartiu o cartafol %s con vostede", +"%s shared the file %s with you" => "%s compartiu o ficheiro %s con vostede", +"Download" => "Descargar", +"No preview available for" => "Sen vista previa dispoñíbel para", "web services under your control" => "servizos web baixo o seu control" ); diff --git a/apps/files_sharing/l10n/ko.php b/apps/files_sharing/l10n/ko.php new file mode 100644 index 00000000000..600168d9bfa --- /dev/null +++ b/apps/files_sharing/l10n/ko.php @@ -0,0 +1,9 @@ +<?php $TRANSLATIONS = array( +"Password" => "암호", +"Submit" => "제출", +"%s shared the folder %s with you" => "%s 님이 폴더 %s을(를) 공유하였습니다", +"%s shared the file %s with you" => "%s 님이 파일 %s을(를) 공유하였습니다", +"Download" => "다운로드", +"No preview available for" => "다음 항목을 미리 볼 수 없음:", +"web services under your control" => "내가 관리하는 웹 서비스" +); diff --git a/apps/files_sharing/l10n/ta_LK.php b/apps/files_sharing/l10n/ta_LK.php new file mode 100644 index 00000000000..6cf6f6236b7 --- /dev/null +++ b/apps/files_sharing/l10n/ta_LK.php @@ -0,0 +1,9 @@ +<?php $TRANSLATIONS = array( +"Password" => "கடவுச்சொல்", +"Submit" => "சமர்ப்பிக்குக", +"%s shared the folder %s with you" => "%s கோப்புறையானது %s உடன் பகிரப்பட்டது", +"%s shared the file %s with you" => "%s கோப்பானது %s உடன் பகிரப்பட்டது", +"Download" => "பதிவிறக்குக", +"No preview available for" => "அதற்கு முன்னோக்கு ஒன்றும் இல்லை", +"web services under your control" => "வலைய சேவைகள் உங்களுடைய கட்டுப்பாட்டின் கீழ் உள்ளது" +); diff --git a/apps/files_sharing/l10n/tr.php b/apps/files_sharing/l10n/tr.php new file mode 100644 index 00000000000..f2e6e5697d6 --- /dev/null +++ b/apps/files_sharing/l10n/tr.php @@ -0,0 +1,9 @@ +<?php $TRANSLATIONS = array( +"Password" => "Şifre", +"Submit" => "Gönder", +"%s shared the folder %s with you" => "%s sizinle paylaşılan %s klasör", +"%s shared the file %s with you" => "%s sizinle paylaşılan %s klasör", +"Download" => "İndir", +"No preview available for" => "Kullanılabilir önizleme yok", +"web services under your control" => "Bilgileriniz güvenli ve şifreli" +); diff --git a/apps/files_sharing/l10n/uk.php b/apps/files_sharing/l10n/uk.php index 43b86a28c17..cdc103ad465 100644 --- a/apps/files_sharing/l10n/uk.php +++ b/apps/files_sharing/l10n/uk.php @@ -1,4 +1,9 @@ <?php $TRANSLATIONS = array( "Password" => "Пароль", -"Download" => "Завантажити" +"Submit" => "Submit", +"%s shared the folder %s with you" => "%s опублікував каталог %s для Вас", +"%s shared the file %s with you" => "%s опублікував файл %s для Вас", +"Download" => "Завантажити", +"No preview available for" => "Попередній перегляд недоступний для", +"web services under your control" => "підконтрольні Вам веб-сервіси" ); diff --git a/apps/files_sharing/l10n/vi.php b/apps/files_sharing/l10n/vi.php index 6a36f11899e..afeec5c6481 100644 --- a/apps/files_sharing/l10n/vi.php +++ b/apps/files_sharing/l10n/vi.php @@ -1,8 +1,8 @@ <?php $TRANSLATIONS = array( "Password" => "Mật khẩu", "Submit" => "Xác nhận", -"%s shared the folder %s with you" => "%s đã chia sẽ thư mục %s với bạn", -"%s shared the file %s with you" => "%s đã chia sẽ tập tin %s với bạn", +"%s shared the folder %s with you" => "%s đã chia sẻ thư mục %s với bạn", +"%s shared the file %s with you" => "%s đã chia sẻ tập tin %s với bạn", "Download" => "Tải về", "No preview available for" => "Không có xem trước cho", "web services under your control" => "dịch vụ web dưới sự kiểm soát của bạn" diff --git a/apps/files_sharing/l10n/zh_TW.php b/apps/files_sharing/l10n/zh_TW.php index 27fa634c03d..fa4f8075c6e 100644 --- a/apps/files_sharing/l10n/zh_TW.php +++ b/apps/files_sharing/l10n/zh_TW.php @@ -1,6 +1,8 @@ <?php $TRANSLATIONS = array( "Password" => "密碼", "Submit" => "送出", +"%s shared the folder %s with you" => "%s 分享了資料夾 %s 給您", +"%s shared the file %s with you" => "%s 分享了檔案 %s 給您", "Download" => "下載", "No preview available for" => "無法預覽" ); diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index 9a880505926..ac585236831 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -97,10 +97,10 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { $file['permissions'] = $item['permissions']; if ($file['type'] == 'file') { // Remove Create permission if type is file - $file['permissions'] &= ~OCP\Share::PERMISSION_CREATE; + $file['permissions'] &= ~OCP\PERMISSION_CREATE; } // NOTE: Temporary fix to allow unsharing of files in root of Shared directory - $file['permissions'] |= OCP\Share::PERMISSION_DELETE; + $file['permissions'] |= OCP\PERMISSION_DELETE; $files[] = $file; } return $files; @@ -113,7 +113,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { } $size += $item['size']; } - return array(0 => array('id' => -1, 'name' => 'Shared', 'mtime' => $mtime, 'mimetype' => 'httpd/unix-directory', 'size' => $size, 'writable' => false, 'type' => 'dir', 'directory' => '', 'permissions' => OCP\Share::PERMISSION_READ)); + return array(0 => array('id' => -1, 'name' => 'Shared', 'mtime' => $mtime, 'mimetype' => 'httpd/unix-directory', 'size' => $size, 'writable' => false, 'type' => 'dir', 'directory' => '', 'permissions' => OCP\PERMISSION_READ)); } else if ($format == self::FORMAT_OPENDIR) { $files = array(); foreach ($items as $item) { diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php index bddda99f8bb..d414fcf10fc 100644 --- a/apps/files_sharing/lib/share/folder.php +++ b/apps/files_sharing/lib/share/folder.php @@ -41,7 +41,7 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share $file['permissions'] = $folder['permissions']; if ($file['type'] == 'file') { // Remove Create permission if type is file - $file['permissions'] &= ~OCP\Share::PERMISSION_CREATE; + $file['permissions'] &= ~OCP\PERMISSION_CREATE; } } return $files; diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 7271dcc930b..50db9166fe7 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -201,7 +201,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { if ($path == '') { return false; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_CREATE); + return ($this->getPermissions($path) & OCP\PERMISSION_CREATE); } public function isReadable($path) { @@ -212,21 +212,21 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { if ($path == '') { return false; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_UPDATE); + return ($this->getPermissions($path) & OCP\PERMISSION_UPDATE); } public function isDeletable($path) { if ($path == '') { return true; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_DELETE); + return ($this->getPermissions($path) & OCP\PERMISSION_DELETE); } public function isSharable($path) { if ($path == '') { return false; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_SHARE); + return ($this->getPermissions($path) & OCP\PERMISSION_SHARE); } public function file_exists($path) { @@ -451,7 +451,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { * @param int $time * @return bool */ - public function hasUpdated($path,$time) { + public function hasUpdated($path, $time) { //TODO return false; } diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 105e94f1140..fef0ed8a8c2 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -1,223 +1,280 @@ -<?php
-// Load other apps for file previews
-OC_App::loadApps();
-
-// Compatibility with shared-by-link items from ownCloud 4.0
-// requires old Sharing table !
-// support will be removed in OC 5.0,a
-if (isset($_GET['token'])) {
- unset($_GET['file']);
- $qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ? LIMIT 1');
- $filepath = $qry->execute(array($_GET['token']))->fetchOne();
- if(isset($filepath)) {
- $info = OC_FileCache_Cached::get($filepath, '');
- if(strtolower($info['mimetype']) == 'httpd/unix-directory') {
- $_GET['dir'] = $filepath;
- } else {
- $_GET['file'] = $filepath;
- }
- \OCP\Util::writeLog('files_sharing', 'You have files that are shared by link originating from ownCloud 4.0. Redistribute the new links, because backwards compatibility will be removed in ownCloud 5.', \OCP\Util::WARN);
- }
-}
-// Enf of backward compatibility
-
-function getID($path) {
- // use the share table from the db to find the item source if the file was reshared because shared files
- //are not stored in the file cache.
- if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") {
- $path_parts = explode('/', $path, 5);
- $user = $path_parts[1];
- $intPath = '/'.$path_parts[4];
- $query = \OC_DB::prepare('SELECT item_source FROM *PREFIX*share WHERE uid_owner = ? AND file_target = ? ');
- $result = $query->execute(array($user, $intPath));
- $row = $result->fetchRow();
- $fileSource = $row['item_source'];
- } else {
- $fileSource = OC_Filecache::getId($path, '');
- }
-
- return $fileSource;
-}
-
-if (isset($_GET['file']) || isset($_GET['dir'])) {
- if (isset($_GET['dir'])) {
- $type = 'folder';
- $path = $_GET['dir'];
- if(strlen($path)>1 and substr($path, -1, 1)==='/') {
- $path=substr($path, 0, -1);
- }
- $baseDir = $path;
- $dir = $baseDir;
- } else {
- $type = 'file';
- $path = $_GET['file'];
- if(strlen($path)>1 and substr($path, -1, 1)==='/') {
- $path=substr($path, 0, -1);
- }
- }
- $uidOwner = substr($path, 1, strpos($path, '/', 1) - 1);
- if (OCP\User::userExists($uidOwner)) {
- OC_Util::setupFS($uidOwner);
- $fileSource = getId($path);
- if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink($type, $fileSource, $uidOwner))) {
- // TODO Fix in the getItems
- if (!isset($linkItem['item_type']) || $linkItem['item_type'] != $type) {
- header('HTTP/1.0 404 Not Found');
- $tmpl = new OCP\Template('', '404', 'guest');
- $tmpl->printPage();
- exit();
- }
- 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'];
- $forcePortable = (CRYPT_BLOWFISH != 1);
- $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', $url);
- $tmpl->assign('error', true);
- $tmpl->printPage();
- exit();
- } else {
- // Save item id in session for future requests
- $_SESSION['public_link_authenticated'] = $linkItem['id'];
- }
- // Check if item id is set in session
- } 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', $url);
- $tmpl->printPage();
- exit();
- }
- }
- $path = $linkItem['path'];
- if (isset($_GET['path'])) {
- $path .= $_GET['path'];
- $dir .= $_GET['path'];
- if (!OC_Filesystem::file_exists($path)) {
- header('HTTP/1.0 404 Not Found');
- $tmpl = new OCP\Template('', '404', 'guest');
- $tmpl->printPage();
- exit();
- }
- }
- // Download the file
- if (isset($_GET['download'])) {
- if (isset($_GET['dir'])) {
- if ( isset($_GET['files']) ) { // download selected files
- OC_Files::get($path, $_GET['files'], $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
- } else if (isset($_GET['path']) && $_GET['path'] != '' ) { // download a file from a shared directory
- OC_Files::get('', $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
- } else { // download the whole shared directory
- OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
- }
- } else { // download a single shared file
- OC_Files::get("", $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
- }
-
- } else {
- OCP\Util::addStyle('files_sharing', 'public');
- OCP\Util::addScript('files_sharing', 'public');
- OCP\Util::addScript('files', 'fileactions');
- $tmpl = new OCP\Template('files_sharing', 'public', 'base');
- $tmpl->assign('owner', $uidOwner);
- // Show file list
- if (OC_Filesystem::is_dir($path)) {
- OCP\Util::addStyle('files', 'files');
- OCP\Util::addScript('files', 'files');
- OCP\Util::addScript('files', 'filelist');
- $files = array();
- $rootLength = strlen($baseDir) + 1;
- foreach (OC_Files::getDirectoryContent($path) as $i) {
- $i['date'] = OCP\Util::formatDate($i['mtime']);
- if ($i['type'] == 'file') {
- $fileinfo = pathinfo($i['name']);
- $i['basename'] = $fileinfo['filename'];
- $i['extension'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : '';
- }
- $i['directory'] = '/'.substr('/'.$uidOwner.'/files'.$i['directory'], $rootLength);
- if ($i['directory'] == '/') {
- $i['directory'] = '';
- }
- $i['permissions'] = OCP\Share::PERMISSION_READ;
- $files[] = $i;
- }
- // Make breadcrumb
- $breadcrumb = array();
- $pathtohere = '';
- $count = 1;
- foreach (explode('/', $dir) as $i) {
- if ($i != '') {
- if ($i != $baseDir) {
- $pathtohere .= '/'.$i;
- }
- if ( strlen($pathtohere) < strlen($_GET['dir'])) {
- continue;
- }
- $breadcrumb[] = array('dir' => str_replace($_GET['dir'], "", $pathtohere, $count), 'name' => $i);
- }
- }
- $list = new OCP\Template('files', 'part.list', '');
- $list->assign('files', $files, false);
- $list->assign('publicListView', true);
- $list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']).'&path=', false);
- $list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path=', false);
- $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' );
- $breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
- $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']).'&path=', false);
- $folder = new OCP\Template('files', 'index', '');
- $folder->assign('fileList', $list->fetchPage(), false);
- $folder->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
- $folder->assign('dir', basename($dir));
- $folder->assign('isCreatable', false);
- $folder->assign('permissions', 0);
- $folder->assign('files', $files);
- $folder->assign('uploadMaxFilesize', 0);
- $folder->assign('uploadMaxHumanFilesize', 0);
- $folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
- $tmpl->assign('folder', $folder->fetchPage(), false);
- $tmpl->assign('uidOwner', $uidOwner);
- $tmpl->assign('dir', basename($dir));
- $tmpl->assign('filename', basename($path));
- $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path));
- $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
- if (isset($_GET['path'])) {
- $getPath = $_GET['path'];
- } else {
- $getPath = '';
- }
- $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path='.urlencode($getPath), false);
- } else {
- // Show file preview if viewer is available
- $tmpl->assign('uidOwner', $uidOwner);
- $tmpl->assign('dir', dirname($path));
- $tmpl->assign('filename', basename($path));
- $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path));
- if ($type == 'file') {
- $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&file='.urlencode($_GET['file']).'&download', false);
- } else {
- if (isset($_GET['path'])) {
- $getPath = $_GET['path'];
- } else {
- $getPath = '';
- }
- $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path='.urlencode($getPath), false);
- }
- }
- $tmpl->printPage();
- }
- exit();
- }
- }
-}
-header('HTTP/1.0 404 Not Found');
-$tmpl = new OCP\Template('', '404', 'guest');
-$tmpl->printPage();
+<?php +// Load other apps for file previews +OC_App::loadApps(); + +// Compatibility with shared-by-link items from ownCloud 4.0 +// requires old Sharing table ! +// support will be removed in OC 5.0,a +if (isset($_GET['token'])) { + unset($_GET['file']); + $qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ? LIMIT 1'); + $filepath = $qry->execute(array($_GET['token']))->fetchOne(); + if(isset($filepath)) { + $info = OC_FileCache_Cached::get($filepath, ''); + if(strtolower($info['mimetype']) == 'httpd/unix-directory') { + $_GET['dir'] = $filepath; + } else { + $_GET['file'] = $filepath; + } + \OCP\Util::writeLog('files_sharing', 'You have files that are shared by link originating from ownCloud 4.0. Redistribute the new links, because backwards compatibility will be removed in ownCloud 5.', \OCP\Util::WARN); + } +} + +function getID($path) { + // use the share table from the db to find the item source if the file was reshared because shared files + //are not stored in the file cache. + if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") { + $path_parts = explode('/', $path, 5); + $user = $path_parts[1]; + $intPath = '/'.$path_parts[4]; + $query = \OC_DB::prepare('SELECT `item_source` FROM `*PREFIX*share` WHERE `uid_owner` = ? AND `file_target` = ? '); + $result = $query->execute(array($user, $intPath)); + $row = $result->fetchRow(); + $fileSource = $row['item_source']; + } else { + $fileSource = OC_Filecache::getId($path, ''); + } + + return $fileSource; +} +// Enf of backward compatibility + +/** + * lookup file path and owner by fetching it from the fscache + * needed becaus OC_FileCache::getPath($id, $user) already requires the user + * @param int $id + * @return array + */ +function getPathAndUser($id) { + $query = \OC_DB::prepare('SELECT `user`, `path` FROM `*PREFIX*fscache` WHERE `id` = ?'); + $result = $query->execute(array($id)); + $row = $result->fetchRow(); + return $row; +} + + +if (isset($_GET['t'])) { + $token = $_GET['t']; + $linkItem = OCP\Share::getShareByToken($token); + if (is_array($linkItem) && isset($linkItem['uid_owner'])) { + // seems to be a valid share + $type = $linkItem['item_type']; + $fileSource = $linkItem['file_source']; + $shareOwner = $linkItem['uid_owner']; + + if (OCP\User::userExists($shareOwner) && $fileSource != -1 ) { + + $pathAndUser = getPathAndUser($linkItem['file_source']); + $fileOwner = $pathAndUser['user']; + + //if this is a reshare check the file owner also exists + if ($shareOwner != $fileOwner && ! OCP\User::userExists($fileOwner)) { + OCP\Util::writeLog('share', 'original file owner '.$fileOwner.' does not exist for share '.$linkItem['id'], \OCP\Util::ERROR); + header('HTTP/1.0 404 Not Found'); + $tmpl = new OCP\Template('', '404', 'guest'); + $tmpl->printPage(); + exit(); + } + + //mount filesystem of file owner + OC_Util::setupFS($fileOwner); + } + } +} else if (isset($_GET['file']) || isset($_GET['dir'])) { + OCP\Util::writeLog('share', 'Missing token, trying fallback file/dir links', \OCP\Util::DEBUG); + if (isset($_GET['dir'])) { + $type = 'folder'; + $path = $_GET['dir']; + if(strlen($path)>1 and substr($path, -1, 1)==='/') { + $path=substr($path, 0, -1); + } + $baseDir = $path; + $dir = $baseDir; + } else { + $type = 'file'; + $path = $_GET['file']; + if(strlen($path)>1 and substr($path, -1, 1)==='/') { + $path=substr($path, 0, -1); + } + } + $shareOwner = substr($path, 1, strpos($path, '/', 1) - 1); + + if (OCP\User::userExists($shareOwner)) { + OC_Util::setupFS($shareOwner); + $fileSource = getId($path); + if ($fileSource != -1 ) { + $linkItem = OCP\Share::getItemSharedWithByLink($type, $fileSource, $shareOwner); + $pathAndUser['path'] = $path; + $path_parts = explode('/', $path, 5); + $pathAndUser['user'] = $path_parts[1]; + $fileOwner = $path_parts[1]; + } + } +} + +if ($linkItem) { + if (!isset($linkItem['item_type'])) { + OCP\Util::writeLog('share', 'No item type set for share id: '.$linkItem['id'], \OCP\Util::ERROR); + header('HTTP/1.0 404 Not Found'); + $tmpl = new OCP\Template('', '404', 'guest'); + $tmpl->printPage(); + exit(); + } + if (isset($linkItem['share_with'])) { + // Authenticate share_with + $url = OCP\Util::linkToPublic('files').'&t='.$token; + if (isset($_GET['file'])) { + $url .= '&file='.urlencode($_GET['file']); + } else if (isset($_GET['dir'])) { + $url .= '&dir='.urlencode($_GET['dir']); + } + if (isset($_POST['password'])) { + $password = $_POST['password']; + if ($linkItem['share_type'] == OCP\Share::SHARE_TYPE_LINK) { + // Check Password + $forcePortable = (CRYPT_BLOWFISH != 1); + $hasher = new PasswordHash(8, $forcePortable); + if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $linkItem['share_with']))) { + $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); + $tmpl->assign('URL', $url); + $tmpl->assign('error', true); + $tmpl->printPage(); + exit(); + } else { + // Save item id in session for future requests + $_SESSION['public_link_authenticated'] = $linkItem['id']; + } + } else { + OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type'].' for share id '.$linkItem['id'], \OCP\Util::ERROR); + header('HTTP/1.0 404 Not Found'); + $tmpl = new OCP\Template('', '404', 'guest'); + $tmpl->printPage(); + exit(); + } + // Check if item id is set in session + } 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', $url); + $tmpl->printPage(); + exit(); + } + } + $basePath = substr($pathAndUser['path'], strlen('/'.$fileOwner.'/files')); + $path = $basePath; + if (isset($_GET['path'])) { + $path .= $_GET['path']; + } + if (!$path || !OC_Filesystem::isValidPath($path) || !OC_Filesystem::file_exists($path)) { + OCP\Util::writeLog('share', 'Invalid path '.$path.' for share id '.$linkItem['id'], \OCP\Util::ERROR); + header('HTTP/1.0 404 Not Found'); + $tmpl = new OCP\Template('', '404', 'guest'); + $tmpl->printPage(); + exit(); + } + $dir = dirname($path); + $file = basename($path); + // Download the file + if (isset($_GET['download'])) { + if (isset($_GET['path']) && $_GET['path'] !== '' ) { + if ( isset($_GET['files']) ) { // download selected files + OC_Files::get($path, $_GET['files'], $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } else if (isset($_GET['path']) && $_GET['path'] != '' ) { // download a file from a shared directory + OC_Files::get($dir, $file, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } else { // download the whole shared directory + OC_Files::get($dir, $file, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } + } else { // download a single shared file + OC_Files::get($dir, $file, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } + + } else { + OCP\Util::addStyle('files_sharing', 'public'); + OCP\Util::addScript('files_sharing', 'public'); + OCP\Util::addScript('files', 'fileactions'); + $tmpl = new OCP\Template('files_sharing', 'public', 'base'); + $tmpl->assign('uidOwner', $shareOwner); + $tmpl->assign('dir', $dir); + $tmpl->assign('filename', $file); + $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path)); + if (isset($_GET['path'])) { + $getPath = $_GET['path']; + } else { + $getPath = ''; + } + // + $urlLinkIdentifiers= (isset($token)?'&t='.$token:'').(isset($_GET['dir'])?'&dir='.$_GET['dir']:'').(isset($_GET['file'])?'&file='.$_GET['file']:''); + // Show file list + if (OC_Filesystem::is_dir($path)) { + OCP\Util::addStyle('files', 'files'); + OCP\Util::addScript('files', 'files'); + OCP\Util::addScript('files', 'filelist'); + $files = array(); + $rootLength = strlen($basePath) + 1; + foreach (OC_Files::getDirectoryContent($path) as $i) { + $i['date'] = OCP\Util::formatDate($i['mtime']); + if ($i['type'] == 'file') { + $fileinfo = pathinfo($i['name']); + $i['basename'] = $fileinfo['filename']; + $i['extension'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : ''; + } + $i['directory'] = '/'.substr($i['directory'], $rootLength); + if ($i['directory'] == '/') { + $i['directory'] = ''; + } + $i['permissions'] = OCP\PERMISSION_READ; + $files[] = $i; + } + // Make breadcrumb + $breadcrumb = array(); + $pathtohere = ''; + + //add base breadcrumb + $breadcrumb[] = array('dir' => '/', 'name' => basename($basePath)); + + //add subdir breadcrumbs + foreach (explode('/', urldecode($getPath)) as $i) { + if ($i != '') { + $pathtohere .= '/'.$i; + $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i); + } + } + + $list = new OCP\Template('files', 'part.list', ''); + $list->assign('files', $files, false); + $list->assign('publicListView', true); + $list->assign('baseURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&path=', false); + $list->assign('downloadURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&download&path=', false); + $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' ); + $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); + $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&path=', false); + $folder = new OCP\Template('files', 'index', ''); + $folder->assign('fileList', $list->fetchPage(), false); + $folder->assign('breadcrumb', $breadcrumbNav->fetchPage(), false); + $folder->assign('dir', basename($dir)); + $folder->assign('isCreatable', false); + $folder->assign('permissions', 0); + $folder->assign('files', $files); + $folder->assign('uploadMaxFilesize', 0); + $folder->assign('uploadMaxHumanFilesize', 0); + $folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); + $tmpl->assign('folder', $folder->fetchPage(), false); + $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); + $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&download&path='.urlencode($getPath)); + } else { + // Show file preview if viewer is available + if ($type == 'file') { + $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&download'); + } else { + $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&download&path='.urlencode($getPath)); + } + } + $tmpl->printPage(); + } + exit(); +} else { + OCP\Util::writeLog('share', 'could not resolve linkItem', \OCP\Util::DEBUG); +} +header('HTTP/1.0 404 Not Found'); +$tmpl = new OCP\Template('', '404', 'guest'); +$tmpl->printPage(); diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 35cca7c42dc..647e1e08a31 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -1,3 +1,11 @@ +<script type="text/javascript"> + <?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) { + echo "var publicListView = true;"; + } else { + echo "var publicListView = false;"; + } + ?> +</script> <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir"> <input type="hidden" name="downloadURL" value="<?php echo $_['downloadURL'] ?>" id="downloadURL"> <input type="hidden" name="filename" value="<?php echo $_['filename'] ?>" id="filename"> diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 746f89a8139..afc0a67edba 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -5,12 +5,12 @@ OC::$CLASSPATH['OCA_Versions\Storage'] = 'apps/files_versions/lib/versions.php'; OC::$CLASSPATH['OCA_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php'; OCP\App::registerAdmin('files_versions', 'settings'); -OCP\App::registerPersonal('files_versions','settings-personal'); +OCP\App::registerPersonal('files_versions', 'settings-personal'); OCP\Util::addscript('files_versions', 'versions'); // Listen to write signals -OCP\Util::connectHook('OC_Filesystem', 'post_write', "OCA_Versions\Hooks", "write_hook"); +OCP\Util::connectHook('OC_Filesystem', 'write', "OCA_Versions\Hooks", "write_hook"); // Listen to delete and rename signals OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA_Versions\Hooks", "remove_hook"); OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA_Versions\Hooks", "rename_hook");
\ No newline at end of file diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index 0ebb34f45e4..d4c278ebd85 100644 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -22,7 +22,7 @@ */ OCP\User::checkLoggedIn( ); -OCP\Util::addStyle('files_versions','versions'); +OCP\Util::addStyle('files_versions', 'versions'); $tmpl = new OCP\Template( 'files_versions', 'history', 'user' ); if ( isset( $_GET['path'] ) ) { @@ -33,7 +33,7 @@ if ( isset( $_GET['path'] ) ) { $versions = new OCA_Versions\Storage(); // roll back to old version if button clicked - if( isset( $_GET['revert'] ) ) { + if( isset( $_GET['revert'] ) ) { if( $versions->rollback( $path, $_GET['revert'] ) ) { @@ -52,7 +52,7 @@ if ( isset( $_GET['path'] ) ) { } // show the history only if there is something to show - if( OCA_Versions\Storage::isversioned( $path ) ) { + if( OCA_Versions\Storage::isversioned( $path ) ) { $count = 999; //show the newest revisions $versions = OCA_Versions\Storage::getVersions( $path, $count); diff --git a/apps/files_versions/l10n/gl.php b/apps/files_versions/l10n/gl.php index c0d5937e1b1..f10c1e16263 100644 --- a/apps/files_versions/l10n/gl.php +++ b/apps/files_versions/l10n/gl.php @@ -1,7 +1,8 @@ <?php $TRANSLATIONS = array( -"Expire all versions" => "Caducar todas as versións", +"Expire all versions" => "Caducan todas as versións", +"History" => "Historial", "Versions" => "Versións", -"This will delete all existing backup versions of your files" => "Esto eliminará todas as copias de respaldo existentes dos seus ficheiros", -"Files Versioning" => "Versionado de ficheiros", -"Enable" => "Habilitar" +"This will delete all existing backup versions of your files" => "Isto eliminará todas as copias de seguranza que haxa dos seus ficheiros", +"Files Versioning" => "Sistema de versión de ficheiros", +"Enable" => "Activar" ); diff --git a/apps/files_versions/l10n/he.php b/apps/files_versions/l10n/he.php index 09a013f45a8..061e88b0dbf 100644 --- a/apps/files_versions/l10n/he.php +++ b/apps/files_versions/l10n/he.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( "Expire all versions" => "הפגת תוקף כל הגרסאות", +"History" => "היסטוריה", "Versions" => "גרסאות", -"This will delete all existing backup versions of your files" => "פעולה זו תמחק את כל גיבויי הגרסאות הקיימים של הקבצים שלך" +"This will delete all existing backup versions of your files" => "פעולה זו תמחק את כל גיבויי הגרסאות הקיימים של הקבצים שלך", +"Files Versioning" => "שמירת הבדלי גרסאות של קבצים", +"Enable" => "הפעלה" ); diff --git a/apps/files_versions/l10n/ko.php b/apps/files_versions/l10n/ko.php new file mode 100644 index 00000000000..688babb1121 --- /dev/null +++ b/apps/files_versions/l10n/ko.php @@ -0,0 +1,8 @@ +<?php $TRANSLATIONS = array( +"Expire all versions" => "모든 버전 삭제", +"History" => "역사", +"Versions" => "버전", +"This will delete all existing backup versions of your files" => "이 파일의 모든 백업 버전을 삭제합니다", +"Files Versioning" => "파일 버전 관리", +"Enable" => "사용함" +); diff --git a/apps/files_versions/l10n/ru_RU.php b/apps/files_versions/l10n/ru_RU.php index a14258eea87..557c2f8e6d1 100644 --- a/apps/files_versions/l10n/ru_RU.php +++ b/apps/files_versions/l10n/ru_RU.php @@ -2,7 +2,7 @@ "Expire all versions" => "Срок действия всех версий истекает", "History" => "История", "Versions" => "Версии", -"This will delete all existing backup versions of your files" => "Это приведет к удалению всех существующих версий резервной копии ваших файлов", +"This will delete all existing backup versions of your files" => "Это приведет к удалению всех существующих версий резервной копии Ваших файлов", "Files Versioning" => "Файлы управления версиями", "Enable" => "Включить" ); diff --git a/apps/files_versions/l10n/ta_LK.php b/apps/files_versions/l10n/ta_LK.php new file mode 100644 index 00000000000..f1215b3ecc1 --- /dev/null +++ b/apps/files_versions/l10n/ta_LK.php @@ -0,0 +1,8 @@ +<?php $TRANSLATIONS = array( +"Expire all versions" => "எல்லா பதிப்புகளும் காலாவதியாகிவிட்டது", +"History" => "வரலாறு", +"Versions" => "பதிப்புகள்", +"This will delete all existing backup versions of your files" => "உங்களுடைய கோப்புக்களில் ஏற்கனவே உள்ள ஆதாரநகல்களின் பதிப்புக்களை இவை அழித்துவிடும்", +"Files Versioning" => "கோப்பு பதிப்புகள்", +"Enable" => "இயலுமைப்படுத்துக" +); diff --git a/apps/files_versions/l10n/vi.php b/apps/files_versions/l10n/vi.php index a92e85a017a..260c3b6b39c 100644 --- a/apps/files_versions/l10n/vi.php +++ b/apps/files_versions/l10n/vi.php @@ -2,7 +2,7 @@ "Expire all versions" => "Hết hạn tất cả các phiên bản", "History" => "Lịch sử", "Versions" => "Phiên bản", -"This will delete all existing backup versions of your files" => "Điều này sẽ xóa tất cả các phiên bản sao lưu hiện có ", -"Files Versioning" => "Phiên bản tệp tin", -"Enable" => "Kích hoạtLịch sử" +"This will delete all existing backup versions of your files" => "Khi bạn thực hiện thao tác này sẽ xóa tất cả các phiên bản sao lưu hiện có ", +"Files Versioning" => "Phiên bản tập tin", +"Enable" => "Bật " ); diff --git a/apps/files_versions/l10n/zh_TW.php b/apps/files_versions/l10n/zh_TW.php new file mode 100644 index 00000000000..a21fdc85f8d --- /dev/null +++ b/apps/files_versions/l10n/zh_TW.php @@ -0,0 +1,7 @@ +<?php $TRANSLATIONS = array( +"Expire all versions" => "所有逾期的版本", +"History" => "歷史", +"Versions" => "版本", +"Files Versioning" => "檔案版本化中...", +"Enable" => "啟用" +); diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index 822103ebc32..e897a81f7af 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'],0750, 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 2f27cd0e667..0ccaaf1095d 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -1,278 +1,278 @@ -<?php
-/**
- * Copyright (c) 2012 Frank Karlitschek <frank@owncloud.org>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-/**
- * Versions
- *
- * A class to handle the versioning of files.
- */
-
-namespace OCA_Versions;
-
-class Storage {
-
-
- // config.php configuration:
- // - files_versions
- // - files_versionsfolder
- // - files_versionsblacklist
- // - files_versionsmaxfilesize
- // - files_versionsinterval
- // - files_versionmaxversions
- //
- // todo:
- // - finish porting to OC_FilesystemView to enable network transparency
- // - add transparent compression. first test if it´s worth it.
-
- const DEFAULTENABLED=true;
- const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp';
- const DEFAULTMAXFILESIZE=1048576; // 10MB
- const DEFAULTMININTERVAL=60; // 1 min
- const DEFAULTMAXVERSIONS=50;
-
- private static function getUidAndFilename($filename)
- {
- if (\OCP\App::isEnabled('files_sharing')
- && substr($filename, 0, 7) == '/Shared'
- && $source = \OCP\Share::getItemSharedWith('file',
- substr($filename, 7),
- \OC_Share_Backend_File::FORMAT_SHARED_STORAGE)) {
- $filename = $source['path'];
- $pos = strpos($filename, '/files', 1);
- $uid = substr($filename, 1, $pos - 1);
- $filename = substr($filename, $pos + 6);
- } else {
- $uid = \OCP\User::getUser();
- }
- return array($uid, $filename);
- }
-
- /**
- * store a new version of a file.
- */
- public function store($filename) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
- list($uid, $filename) = self::getUidAndFilename($filename);
- $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser() .'/files');
- $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser());
-
- //check if source file already exist as version to avoid recursions.
- // todo does this check work?
- if ($users_view->file_exists($filename)) {
- return false;
- }
-
- // check if filename is a directory
- if($files_view->is_dir($filename)) {
- return false;
- }
-
- // check filetype blacklist
- $blacklist=explode(' ',\OCP\Config::getSystemValue('files_versionsblacklist', Storage::DEFAULTBLACKLIST));
- foreach($blacklist as $bl) {
- $parts=explode('.', $filename);
- $ext=end($parts);
- if(strtolower($ext)==$bl) {
- return false;
- }
- }
- // we should have a source file to work with
- if (!$files_view->file_exists($filename)) {
- return false;
- }
-
- // check filesize
- if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)) {
- return false;
- }
-
-
- // check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval)
- if ($uid == \OCP\User::getUser()) {
- $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions');
- $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
- $versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('');
- $matches=glob($versionsName.'.v*');
- sort($matches);
- $parts=explode('.v',end($matches));
- if((end($parts)+Storage::DEFAULTMININTERVAL)>time()) {
- return false;
- }
- }
-
-
- // create all parent folders
- $info=pathinfo($filename);
- if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
- mkdir($versionsFolderName.'/'.$info['dirname'],0750,true);
- }
-
- // store a new version of a file
- $users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.time());
-
- // expire old revisions if necessary
- Storage::expire($filename);
- }
- }
-
-
- /**
- * rollback to an old version of a file.
- */
- public static function rollback($filename,$revision) {
-
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
- list($uid, $filename) = self::getUidAndFilename($filename);
- $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser());
-
- // rollback
- if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) {
-
- return true;
-
- }else{
-
- return false;
-
- }
-
- }
-
- }
-
- /**
- * check if old versions of a file exist.
- */
- public static function isversioned($filename) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
- list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions');
-
- $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
-
- // check for old versions
- $matches=glob($versionsName.'.v*');
- if(count($matches)>0) {
- return true;
- }else{
- return false;
- }
- }else{
- return(false);
- }
- }
-
-
-
- /**
- * @brief get a list of all available versions of a file in descending chronological order
- * @param $filename file to find versions of, relative to the user files dir
- * @param $count number of versions to return
- * @returns array
- */
- public static function getVersions( $filename, $count = 0 ) {
- if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
- list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions');
-
- $versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
- $versions = array();
- // fetch for old versions
- $matches = glob( $versionsName.'.v*' );
-
- sort( $matches );
-
- $i = 0;
-
- $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files');
- $local_file = $files_view->getLocalFile($filename);
- foreach( $matches as $ma ) {
-
- $i++;
- $versions[$i]['cur'] = 0;
- $parts = explode( '.v', $ma );
- $versions[$i]['version'] = ( end( $parts ) );
-
- // if file with modified date exists, flag it in array as currently enabled version
- ( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
-
- }
-
- $versions = array_reverse( $versions );
-
- foreach( $versions as $key => $value ) {
-
- // flag the first matched file in array (which will have latest modification date) as current version
- if ( $value['fileMatch'] ) {
-
- $value['cur'] = 1;
- break;
-
- }
-
- }
-
- $versions = array_reverse( $versions );
-
- // only show the newest commits
- if( $count != 0 and ( count( $versions )>$count ) ) {
-
- $versions = array_slice( $versions, count( $versions ) - $count );
-
- }
-
- return( $versions );
-
-
- } else {
-
- // if versioning isn't enabled then return an empty array
- return( array() );
-
- }
-
- }
-
- /**
- * @brief Erase a file's versions which exceed the set quota
- */
- public static function expire($filename) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
- list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
-
- $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
-
- // check for old versions
- $matches = glob( $versionsName.'.v*' );
-
- if( count( $matches ) > \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ) ) {
-
- $numberToDelete = count($matches) - \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS );
-
- // delete old versions of a file
- $deleteItems = array_slice( $matches, 0, $numberToDelete );
-
- foreach( $deleteItems as $de ) {
-
- unlink( $versionsName.'.v'.$de );
-
- }
- }
- }
- }
-
- /**
- * @brief Erase all old versions of all user files
- * @return true/false
- */
- public function expireAll() {
- $view = \OCP\Files::getStorage('files_versions');
- return $view->deleteAll('', true);
- }
+<?php +/** + * Copyright (c) 2012 Frank Karlitschek <frank@owncloud.org> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +/** + * Versions + * + * A class to handle the versioning of files. + */ + +namespace OCA_Versions; + +class Storage { + + + // config.php configuration: + // - files_versions + // - files_versionsfolder + // - files_versionsblacklist + // - files_versionsmaxfilesize + // - files_versionsinterval + // - files_versionmaxversions + // + // todo: + // - finish porting to OC_FilesystemView to enable network transparency + // - add transparent compression. first test if it´s worth it. + + const DEFAULTENABLED=true; + const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp'; + const DEFAULTMAXFILESIZE=1048576; // 10MB + const DEFAULTMININTERVAL=60; // 1 min + const DEFAULTMAXVERSIONS=50; + + private static function getUidAndFilename($filename) + { + if (\OCP\App::isEnabled('files_sharing') + && substr($filename, 0, 7) == '/Shared' + && $source = \OCP\Share::getItemSharedWith('file', + substr($filename, 7), + \OC_Share_Backend_File::FORMAT_SHARED_STORAGE)) { + $filename = $source['path']; + $pos = strpos($filename, '/files', 1); + $uid = substr($filename, 1, $pos - 1); + $filename = substr($filename, $pos + 6); + } else { + $uid = \OCP\User::getUser(); + } + return array($uid, $filename); + } + + /** + * store a new version of a file. + */ + public function store($filename) { + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $files_view = new \OC_FilesystemView('/'.$uid .'/files'); + $users_view = new \OC_FilesystemView('/'.$uid); + + //check if source file already exist as version to avoid recursions. + // todo does this check work? + if ($users_view->file_exists($filename)) { + return false; + } + + // check if filename is a directory + if($files_view->is_dir($filename)) { + return false; + } + + // check filetype blacklist + $blacklist=explode(' ', \OCP\Config::getSystemValue('files_versionsblacklist', Storage::DEFAULTBLACKLIST)); + foreach($blacklist as $bl) { + $parts=explode('.', $filename); + $ext=end($parts); + if(strtolower($ext)==$bl) { + return false; + } + } + // we should have a source file to work with + if (!$files_view->file_exists($filename)) { + return false; + } + + // check filesize + if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)) { + return false; + } + + + // check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval) + if ($uid == \OCP\User::getUser()) { + $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + $versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath(''); + $matches=glob($versionsName.'.v*'); + sort($matches); + $parts=explode('.v', end($matches)); + if((end($parts)+Storage::DEFAULTMININTERVAL)>time()) { + return false; + } + } + + + // create all parent folders + $info=pathinfo($filename); + if(!file_exists($versionsFolderName.'/'.$info['dirname'])) { + mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true); + } + + // store a new version of a file + $users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.time()); + + // expire old revisions if necessary + Storage::expire($filename); + } + } + + + /** + * rollback to an old version of a file. + */ + public static function rollback($filename, $revision) { + + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $users_view = new \OC_FilesystemView('/'.$uid); + + // rollback + if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) { + + return true; + + }else{ + + return false; + + } + + } + + } + + /** + * check if old versions of a file exist. + */ + public static function isversioned($filename) { + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + + $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + + // check for old versions + $matches=glob($versionsName.'.v*'); + if(count($matches)>0) { + return true; + }else{ + return false; + } + }else{ + return(false); + } + } + + + + /** + * @brief get a list of all available versions of a file in descending chronological order + * @param $filename file to find versions of, relative to the user files dir + * @param $count number of versions to return + * @returns array + */ + public static function getVersions( $filename, $count = 0 ) { + if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) { + list($uid, $filename) = self::getUidAndFilename($filename); + $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + + $versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + $versions = array(); + // fetch for old versions + $matches = glob( $versionsName.'.v*' ); + + sort( $matches ); + + $i = 0; + + $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files'); + $local_file = $files_view->getLocalFile($filename); + foreach( $matches as $ma ) { + + $i++; + $versions[$i]['cur'] = 0; + $parts = explode( '.v', $ma ); + $versions[$i]['version'] = ( end( $parts ) ); + + // if file with modified date exists, flag it in array as currently enabled version + ( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 ); + + } + + $versions = array_reverse( $versions ); + + foreach( $versions as $key => $value ) { + + // flag the first matched file in array (which will have latest modification date) as current version + if ( $value['fileMatch'] ) { + + $value['cur'] = 1; + break; + + } + + } + + $versions = array_reverse( $versions ); + + // only show the newest commits + if( $count != 0 and ( count( $versions )>$count ) ) { + + $versions = array_slice( $versions, count( $versions ) - $count ); + + } + + return( $versions ); + + + } else { + + // if versioning isn't enabled then return an empty array + return( array() ); + + } + + } + + /** + * @brief Erase a file's versions which exceed the set quota + */ + public static function expire($filename) { + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + + $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + + // check for old versions + $matches = glob( $versionsName.'.v*' ); + + if( count( $matches ) > \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ) ) { + + $numberToDelete = count($matches) - \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ); + + // delete old versions of a file + $deleteItems = array_slice( $matches, 0, $numberToDelete ); + + foreach( $deleteItems as $de ) { + + unlink( $versionsName.'.v'.$de ); + + } + } + } + } + + /** + * @brief Erase all old versions of all user files + * @return true/false + */ + public function expireAll() { + $view = \OCP\Files::getStorage('files_versions'); + return $view->deleteAll('', true); + } } diff --git a/apps/files_versions/settings-personal.php b/apps/files_versions/settings-personal.php index 4fb866bd999..6555bc99c3e 100644 --- a/apps/files_versions/settings-personal.php +++ b/apps/files_versions/settings-personal.php @@ -2,6 +2,6 @@ $tmpl = new OCP\Template( 'files_versions', 'settings-personal'); -OCP\Util::addscript('files_versions','settings-personal'); +OCP\Util::addscript('files_versions', 'settings-personal'); return $tmpl->fetchPage(); diff --git a/apps/files_versions/templates/history.php b/apps/files_versions/templates/history.php index 854d032da62..cc5a494f19e 100644 --- a/apps/files_versions/templates/history.php +++ b/apps/files_versions/templates/history.php @@ -23,7 +23,9 @@ if( isset( $_['message'] ) ) { echo ' '; echo OCP\Util::formatDate( doubleval($v['version']) ); echo ' <a href="'.OCP\Util::linkTo('files_versions', 'history.php', array('path' => $_['path'], 'revert' => $v['version'])) .'" class="button">Revert</a><br /><br />'; - if ( $v['cur'] ) { echo ' (<b>Current</b>)'; } + if ( $v['cur'] ) { + echo ' (<b>Current</b>)'; + } echo '<br /><br />'; } diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 0eec7829a4a..ce3079da0ba 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -42,3 +42,6 @@ $entry = array( ); OCP\Backgroundjob::addRegularTask('OCA\user_ldap\lib\Jobs', 'updateGroups'); +if(OCP\App::isEnabled('user_webdavauth')) { + OCP\Util::writeLog('user_ldap', 'user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour', OCP\Util::WARN); +} diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml index 30fbf687dbe..a7605775274 100644 --- a/apps/user_ldap/appinfo/info.xml +++ b/apps/user_ldap/appinfo/info.xml @@ -2,7 +2,9 @@ <info> <id>user_ldap</id> <name>LDAP user and group backend</name> - <description>Authenticate Users by LDAP</description> + <description>Authenticate users and groups by LDAP resp. Active Directoy. + + This app is not compatible to the WebDAV user backend.</description> <licence>AGPL</licence> <author>Dominik Schmidt and Arthur Schiwon</author> <require>4.9</require> diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index e6e25cec734..9b54ba18b6c 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -34,22 +34,49 @@ $groupBE = new \OCA\user_ldap\GROUP_LDAP(); $groupBE->setConnector($connector); foreach($objects as $object) { - $fetchDNSql = 'SELECT `ldap_dn`, `owncloud_name` FROM `*PREFIX*ldap_'.$object.'_mapping` WHERE `directory_uuid` = \'\''; - $updateSql = 'UPDATE `*PREFIX*ldap_'.$object.'_mapping` SET `ldap_DN` = ?, `directory_uuid` = ? WHERE `ldap_dn` = ?'; + $fetchDNSql = ' + SELECT `ldap_dn`, `owncloud_name`, `directory_uuid` + FROM `*PREFIX*ldap_'.$object.'_mapping`'; + $updateSql = ' + UPDATE `*PREFIX*ldap_'.$object.'_mapping` + SET `ldap_DN` = ?, `directory_uuid` = ? + WHERE `ldap_dn` = ?'; $query = OCP\DB::prepare($fetchDNSql); $res = $query->execute(); $DNs = $res->fetchAll(); $updateQuery = OCP\DB::prepare($updateSql); foreach($DNs as $dn) { - $newDN = mb_strtolower($dn['ldap_dn'], 'UTF-8'); - if($object == 'user') { + $newDN = escapeDN(mb_strtolower($dn['ldap_dn'], 'UTF-8')); + if(!empty($dn['directory_uuid'])) { + $uuid = $dn['directory_uuid']; + } elseif($object == 'user') { $uuid = $userBE->getUUID($newDN); //fix home folder to avoid new ones depending on the configuration $userBE->getHome($dn['owncloud_name']); } else { $uuid = $groupBE->getUUID($newDN); } - $updateQuery->execute(array($newDN, $uuid, $dn['ldap_dn'])); + try { + $updateQuery->execute(array($newDN, $uuid, $dn['ldap_dn'])); + } catch(Exception $e) { + \OCP\Util::writeLog('user_ldap', 'Could not update '.$object.' '.$dn['ldap_dn'].' in the mappings table. ', \OCP\Util::WARN); + } + + } +} + +function escapeDN($dn) { + $aDN = ldap_explode_dn($dn, false); + unset($aDN['count']); + foreach($aDN as $key => $part) { + $value = substr($part, strpos($part, '=')+1); + $escapedValue = strtr($value, Array(','=>'\2c', '='=>'\3d', '+'=>'\2b', + '<'=>'\3c', '>'=>'\3e', ';'=>'\3b', '\\'=>'\5c', + '"'=>'\22', '#'=>'\23')); + $part = str_replace($part, $value, $escapedValue); } + $dn = implode(',', $aDN); + + return $dn; } diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version index 73082a89b35..b1a5f4781d1 100644 --- a/apps/user_ldap/appinfo/version +++ b/apps/user_ldap/appinfo/version @@ -1 +1 @@ -0.3.0.0
\ No newline at end of file +0.3.0.1
\ No newline at end of file diff --git a/apps/user_ldap/css/settings.css b/apps/user_ldap/css/settings.css index 30c5c175c9b..f3f41fb2d8b 100644 --- a/apps/user_ldap/css/settings.css +++ b/apps/user_ldap/css/settings.css @@ -7,4 +7,9 @@ #ldap fieldset input { width: 70%; display: inline-block; +} + +.ldapwarning { + margin-left: 1.4em; + color: #FF3B3B; }
\ No newline at end of file diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 6c6cc5679ba..63437310088 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -124,7 +124,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface { $this->connection->ldapGroupFilter, $this->connection->ldapGroupMemberAssocAttr.'='.$uid )); - $groups = $this->fetchListOfGroups($filter, array($this->connection->ldapGroupDisplayName,'dn')); + $groups = $this->fetchListOfGroups($filter, array($this->connection->ldapGroupDisplayName, 'dn')); $groups = array_unique($this->ownCloudGroupNames($groups), SORT_LOCALE_STRING); $this->connection->writeToCache($cacheKey, $groups); diff --git a/apps/user_ldap/l10n/ca.php b/apps/user_ldap/l10n/ca.php index be72912040d..d801ddff631 100644 --- a/apps/user_ldap/l10n/ca.php +++ b/apps/user_ldap/l10n/ca.php @@ -1,4 +1,6 @@ <?php $TRANSLATIONS = array( +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Avís:</b> Les aplicacions user_ldap i user_webdavauth són incompatibles. Podeu experimentar comportaments no desitjats. Demaneu a l'administrador del sistema que en desactivi una.", +"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avís:</b> El mòdul PHP LDAP necessari no està instal·lat, el dorsal no funcionarà. Demaneu a l'administrador del sistema que l'instal·li.", "Host" => "Màquina", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Podeu ometre el protocol, excepte si requeriu SSL. Llavors comenceu amb ldaps://", "Base DN" => "DN Base", diff --git a/apps/user_ldap/l10n/cs_CZ.php b/apps/user_ldap/l10n/cs_CZ.php index c90dc9ed568..0c14ebb9d1e 100644 --- a/apps/user_ldap/l10n/cs_CZ.php +++ b/apps/user_ldap/l10n/cs_CZ.php @@ -1,4 +1,6 @@ <?php $TRANSLATIONS = array( +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Varování:</b> Aplikace user_ldap a user_webdavauth nejsou kompatibilní. Může nastávat neočekávané chování. Požádejte, prosím, správce systému aby jednu z nich zakázal.", +"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Varování:</b> není nainstalován LDAP modul pro PHP, podpůrná vrstva nebude fungovat. Požádejte, prosím, správce systému aby jej nainstaloval.", "Host" => "Počítač", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Můžete vynechat protokol, vyjma pokud požadujete SSL. Tehdy začněte s ldaps://", "Base DN" => "Základní DN", diff --git a/apps/user_ldap/l10n/de.php b/apps/user_ldap/l10n/de.php index 97debcbab60..ed9fb6f8123 100644 --- a/apps/user_ldap/l10n/de.php +++ b/apps/user_ldap/l10n/de.php @@ -1,4 +1,5 @@ <?php $TRANSLATIONS = array( +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Warnung:</b> Die Apps user_ldap und user_webdavauth sind nicht kompatible. Unerwartetes Verhalten kann auftreten. Bitte Deinen System-Verwalter eine von beiden zu de-aktivieren.", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Du kannst das Protokoll auslassen, außer wenn Du SSL benötigst. Beginne dann mit ldaps://", "Base DN" => "Basis-DN", diff --git a/apps/user_ldap/l10n/gl.php b/apps/user_ldap/l10n/gl.php new file mode 100644 index 00000000000..41431293cba --- /dev/null +++ b/apps/user_ldap/l10n/gl.php @@ -0,0 +1,37 @@ +<?php $TRANSLATIONS = array( +"Host" => "Servidor", +"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Pode omitir o protocolo agás que precise de SSL. Nese caso comece con ldaps://", +"Base DN" => "DN base", +"You can specify Base DN for users and groups in the Advanced tab" => "Pode especificar a DN base para usuarios e grupos na lapela de «Avanzado»", +"User DN" => "DN do usuario", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "O DN do cliente do usuario co que hai que estabelecer unha conexión, p.ex uid=axente, dc=exemplo, dc=com. Para o acceso en anónimo de o DN e o contrasinal baleiros.", +"Password" => "Contrasinal", +"For anonymous access, leave DN and Password empty." => "Para o acceso anónimo deixe o DN e o contrasinal baleiros.", +"User Login Filter" => "Filtro de acceso de usuarios", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Define o filtro que se aplica cando se intenta o acceso. %%uid substitúe o nome de usuario e a acción de acceso.", +"use %%uid placeholder, e.g. \"uid=%%uid\"" => "usar a marca de posición %%uid, p.ex «uid=%%uid»", +"User List Filter" => "Filtro da lista de usuarios", +"Defines the filter to apply, when retrieving users." => "Define o filtro a aplicar cando se recompilan os usuarios.", +"without any placeholder, e.g. \"objectClass=person\"." => "sen ningunha marca de posición, como p.ex «objectClass=persoa».", +"Group Filter" => "Filtro de grupo", +"Defines the filter to apply, when retrieving groups." => "Define o filtro a aplicar cando se recompilan os grupos.", +"without any placeholder, e.g. \"objectClass=posixGroup\"." => "sen ningunha marca de posición, como p.ex «objectClass=grupoPosix».", +"Port" => "Porto", +"Base User Tree" => "Base da árbore de usuarios", +"Base Group Tree" => "Base da árbore de grupo", +"Group-Member association" => "Asociación de grupos e membros", +"Use TLS" => "Usar TLS", +"Do not use it for SSL connections, it will fail." => "Non empregualo para conexións SSL: fallará.", +"Case insensitve LDAP server (Windows)" => "Servidor LDAP que non distingue entre maiúsculas e minúsculas (Windows)", +"Turn off SSL certificate validation." => "Desactiva a validación do certificado SSL.", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se a conexión só funciona con esta opción importa o certificado SSL do servidor LDAP no seu servidor ownCloud.", +"Not recommended, use for testing only." => "Non se recomenda. Só para probas.", +"User Display Name Field" => "Campo de mostra do nome de usuario", +"The LDAP attribute to use to generate the user`s ownCloud name." => "O atributo LDAP a empregar para xerar o nome de usuario de ownCloud.", +"Group Display Name Field" => "Campo de mostra do nome de grupo", +"The LDAP attribute to use to generate the groups`s ownCloud name." => "O atributo LDAP úsase para xerar os nomes dos grupos de ownCloud.", +"in bytes" => "en bytes", +"in seconds. A change empties the cache." => "en segundos. Calquera cambio baleira a caché.", +"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Deixar baleiro para o nome de usuario (predeterminado). Noutro caso, especifique un atributo LDAP/AD.", +"Help" => "Axuda" +); diff --git a/apps/user_ldap/l10n/it.php b/apps/user_ldap/l10n/it.php index f07f0aa5a42..915ce3af5b8 100644 --- a/apps/user_ldap/l10n/it.php +++ b/apps/user_ldap/l10n/it.php @@ -1,4 +1,6 @@ <?php $TRANSLATIONS = array( +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Avviso:</b> le applicazioni user_ldap e user_webdavauth sono incompatibili. Potresti riscontrare un comportamento inatteso. Chiedi al tuo amministratore di sistema di disabilitarne uno.", +"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avviso:</b> il modulo PHP LDAP richiesto non è installato, il motore non funzionerà. Chiedi al tuo amministratore di sistema di installarlo.", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "È possibile omettere il protocollo, ad eccezione se è necessario SSL. Quindi inizia con ldaps://", "Base DN" => "DN base", diff --git a/apps/user_ldap/l10n/ja_JP.php b/apps/user_ldap/l10n/ja_JP.php index ffaae4e9bd2..c7b2a0f91b8 100644 --- a/apps/user_ldap/l10n/ja_JP.php +++ b/apps/user_ldap/l10n/ja_JP.php @@ -1,4 +1,6 @@ <?php $TRANSLATIONS = array( +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>警告:</b> user_ldap と user_webdavauth のアプリには互換性がありません。予期せぬ動作をする可能姓があります。システム管理者にどちらかを無効にするよう問い合わせてください。", +"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>警告:</b> PHP LDAP モジュールがインストールされていません。バックエンドが正しくどうさしません。システム管理者にインストールするよう問い合わせてください。", "Host" => "ホスト", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "SSL通信しない場合には、プロトコル名を省略することができます。そうでない場合には、ldaps:// から始めてください。", "Base DN" => "ベースDN", diff --git a/apps/user_ldap/l10n/ko.php b/apps/user_ldap/l10n/ko.php new file mode 100644 index 00000000000..aa775e42b16 --- /dev/null +++ b/apps/user_ldap/l10n/ko.php @@ -0,0 +1,37 @@ +<?php $TRANSLATIONS = array( +"Host" => "호스트", +"You can omit the protocol, except you require SSL. Then start with ldaps://" => "SSL을 사용하는 경우가 아니라면 프로토콜을 입력하지 않아도 됩니다. SSL을 사용하려면 ldaps://를 입력하십시오.", +"Base DN" => "기본 DN", +"You can specify Base DN for users and groups in the Advanced tab" => "고급 탭에서 사용자 및 그룹에 대한 기본 DN을 지정할 수 있습니다.", +"User DN" => "사용자 DN", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "바인딩 작업을 수행할 클라이언트 사용자 DN입니다. 예를 들어서 uid=agent,dc=example,dc=com입니다. 익명 접근을 허용하려면 DN과 암호를 비워 두십시오.", +"Password" => "암호", +"For anonymous access, leave DN and Password empty." => "익명 접근을 허용하려면 DN과 암호를 비워 두십시오.", +"User Login Filter" => "사용자 로그인 필터", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "로그인을 시도할 때 적용할 필터입니다. %%uid는 로그인 작업에서의 사용자 이름으로 대체됩니다.", +"use %%uid placeholder, e.g. \"uid=%%uid\"" => "%%uid 자리 비움자를 사용하십시오. 예제: \"uid=%%uid\"\"", +"User List Filter" => "사용자 목록 필터", +"Defines the filter to apply, when retrieving users." => "사용자를 검색할 때 적용할 필터를 정의합니다.", +"without any placeholder, e.g. \"objectClass=person\"." => "자리 비움자를 사용할 수 없습니다. 예제: \"objectClass=person\"", +"Group Filter" => "그룹 필터", +"Defines the filter to apply, when retrieving groups." => "그룹을 검색할 때 적용할 필터를 정의합니다.", +"without any placeholder, e.g. \"objectClass=posixGroup\"." => "자리 비움자를 사용할 수 없습니다. 예제: \"objectClass=posixGroup\"", +"Port" => "포트", +"Base User Tree" => "기본 사용자 트리", +"Base Group Tree" => "기본 그룹 트리", +"Group-Member association" => "그룹-회원 연결", +"Use TLS" => "TLS 사용", +"Do not use it for SSL connections, it will fail." => "SSL 연결 시 사용하는 경우 연결되지 않습니다.", +"Case insensitve LDAP server (Windows)" => "서버에서 대소문자를 구분하지 않음 (Windows)", +"Turn off SSL certificate validation." => "SSL 인증서 유효성 검사를 해제합니다.", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "이 옵션을 사용해야 연결할 수 있는 경우에는 LDAP 서버의 SSL 인증서를 ownCloud로 가져올 수 있습니다.", +"Not recommended, use for testing only." => "추천하지 않음, 테스트로만 사용하십시오.", +"User Display Name Field" => "사용자의 표시 이름 필드", +"The LDAP attribute to use to generate the user`s ownCloud name." => "LDAP 속성은 사용자의 ownCloud 이름을 생성하기 위해 사용합니다.", +"Group Display Name Field" => "그룹의 표시 이름 필드", +"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/apps/user_ldap/l10n/nl.php b/apps/user_ldap/l10n/nl.php new file mode 100644 index 00000000000..84c36881f9a --- /dev/null +++ b/apps/user_ldap/l10n/nl.php @@ -0,0 +1,37 @@ +<?php $TRANSLATIONS = array( +"Host" => "Host", +"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Je kunt het protocol weglaten, tenzij je SSL vereist. Start in dat geval met ldaps://", +"Base DN" => "Basis DN", +"You can specify Base DN for users and groups in the Advanced tab" => "Je kunt het standaard DN voor gebruikers en groepen specificeren in het tab Geavanceerd.", +"User DN" => "Gebruikers DN", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "De DN van de client gebruiker waarmee de verbinding zal worden gemaakt, bijv. uid=agent,dc=example,dc=com. Voor anonieme toegang laat je het DN en het wachtwoord leeg.", +"Password" => "Wachtwoord", +"For anonymous access, leave DN and Password empty." => "Voor anonieme toegang, laat de DN en het wachtwoord leeg.", +"User Login Filter" => "Gebruikers Login Filter", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Definiëerd de toe te passen filter indien er geprobeerd wordt in te loggen. %%uid vervangt de gebruikersnaam in de login actie.", +"use %%uid placeholder, e.g. \"uid=%%uid\"" => "gebruik %%uid placeholder, bijv. \"uid=%%uid\"", +"User List Filter" => "Gebruikers Lijst Filter", +"Defines the filter to apply, when retrieving users." => "Definiëerd de toe te passen filter voor het ophalen van gebruikers.", +"without any placeholder, e.g. \"objectClass=person\"." => "zonder een placeholder, bijv. \"objectClass=person\"", +"Group Filter" => "Groep Filter", +"Defines the filter to apply, when retrieving groups." => "Definiëerd de toe te passen filter voor het ophalen van groepen.", +"without any placeholder, e.g. \"objectClass=posixGroup\"." => "zonder een placeholder, bijv. \"objectClass=posixGroup\"", +"Port" => "Poort", +"Base User Tree" => "Basis Gebruikers Structuur", +"Base Group Tree" => "Basis Groupen Structuur", +"Group-Member association" => "Groepslid associatie", +"Use TLS" => "Gebruik TLS", +"Do not use it for SSL connections, it will fail." => "Gebruik niet voor SSL connecties, deze mislukken.", +"Case insensitve LDAP server (Windows)" => "Niet-hoofdlettergevoelige LDAP server (Windows)", +"Turn off SSL certificate validation." => "Schakel SSL certificaat validatie uit.", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Als de connectie alleen werkt met deze optie, importeer dan het LDAP server SSL certificaat naar je ownCloud server.", +"Not recommended, use for testing only." => "Niet aangeraden, gebruik alleen voor test doeleinden.", +"User Display Name Field" => "Gebruikers Schermnaam Veld", +"The LDAP attribute to use to generate the user`s ownCloud name." => "Het te gebruiken LDAP attribuut voor het genereren van de ownCloud naam voor de gebruikers.", +"Group Display Name Field" => "Groep Schermnaam Veld", +"The LDAP attribute to use to generate the groups`s ownCloud name." => "Het te gebruiken LDAP attribuut voor het genereren van de ownCloud naam voor de groepen.", +"in bytes" => "in bytes", +"in seconds. A change empties the cache." => "in seconden. Een verandering maakt de cache leeg.", +"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Laat leeg voor de gebruikersnaam (standaard). Of, specificeer een LDAP/AD attribuut.", +"Help" => "Help" +); diff --git a/apps/user_ldap/l10n/pt_PT.php b/apps/user_ldap/l10n/pt_PT.php index c517949de50..a17e1a95923 100644 --- a/apps/user_ldap/l10n/pt_PT.php +++ b/apps/user_ldap/l10n/pt_PT.php @@ -4,15 +4,32 @@ "Base DN" => "DN base", "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", "User DN" => "DN do utilizador", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "O DN to cliente ", "Password" => "Palavra-passe", "For anonymous access, leave DN and Password empty." => "Para acesso anónimo, deixe DN e a Palavra-passe vazios.", +"User Login Filter" => "Filtro de login de utilizador", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Define o filtro a aplicar, para aquando de uma tentativa de login. %%uid substitui o nome de utilizador utilizado.", +"use %%uid placeholder, e.g. \"uid=%%uid\"" => "Use a variável %%uid , exemplo: \"uid=%%uid\"", +"User List Filter" => "Utilizar filtro", "Defines the filter to apply, when retrieving users." => "Defina o filtro a aplicar, ao recuperar utilizadores.", +"without any placeholder, e.g. \"objectClass=person\"." => "Sem variável. Exemplo: \"objectClass=pessoa\".", "Group Filter" => "Filtrar por grupo", "Defines the filter to apply, when retrieving groups." => "Defina o filtro a aplicar, ao recuperar grupos.", +"without any placeholder, e.g. \"objectClass=posixGroup\"." => "Sem nenhuma variável. Exemplo: \"objectClass=posixGroup\".", "Port" => "Porto", +"Base User Tree" => "Base da árvore de utilizadores.", +"Base Group Tree" => "Base da árvore de grupos.", +"Group-Member association" => "Associar utilizador ao grupo.", "Use TLS" => "Usar TLS", "Do not use it for SSL connections, it will fail." => "Não use para ligações SSL, irá falhar.", +"Case insensitve LDAP server (Windows)" => "Servidor LDAP (Windows) não sensível a maiúsculas.", "Turn off SSL certificate validation." => "Desligar a validação de certificado SSL.", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se a ligação apenas funcionar com está opção, importe o certificado SSL do servidor LDAP para o seu servidor do ownCloud.", +"Not recommended, use for testing only." => "Não recomendado, utilizado apenas para testes!", +"User Display Name Field" => "Mostrador do nome de utilizador.", +"The LDAP attribute to use to generate the user`s ownCloud name." => "Atributo LDAP para gerar o nome de utilizador do ownCloud.", +"Group Display Name Field" => "Mostrador do nome do grupo.", +"The LDAP attribute to use to generate the groups`s ownCloud name." => "Atributo LDAP para gerar o nome do grupo do ownCloud.", "in bytes" => "em bytes", "in seconds. A change empties the cache." => "em segundos. Uma alteração esvazia a cache.", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Deixe vazio para nome de utilizador (padrão). De outro modo, especifique um atributo LDAP/AD.", diff --git a/apps/user_ldap/l10n/ru.php b/apps/user_ldap/l10n/ru.php index 92982d868b8..f41a0b05838 100644 --- a/apps/user_ldap/l10n/ru.php +++ b/apps/user_ldap/l10n/ru.php @@ -1,4 +1,6 @@ <?php $TRANSLATIONS = array( +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Внимание:</b>Приложения user_ldap и user_webdavauth несовместимы. Вы можете столкнуться с неожиданным поведением. Пожалуйста, обратитесь к системному администратору, чтобы отключить одно из них.", +"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Внимание:</b> Необходимый PHP LDAP модуль не установлен, внутренний интерфейс не будет работать. Пожалуйста, обратитесь к системному администратору, чтобы установить его.", "Host" => "Сервер", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Можно опустить протокол, за исключением того, когда вам требуется SSL. Тогда начните с ldaps :/ /", "Base DN" => "Базовый DN", diff --git a/apps/user_ldap/l10n/sl.php b/apps/user_ldap/l10n/sl.php index 098224bb319..1d1fc33a83b 100644 --- a/apps/user_ldap/l10n/sl.php +++ b/apps/user_ldap/l10n/sl.php @@ -1,4 +1,6 @@ <?php $TRANSLATIONS = array( +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Opozorilo:</b> Aplikaciji user_ldap in user_webdavauth nista združljivi. Morda boste opazili nepričakovano obnašanje sistema. Prosimo, prosite vašega skrbnika, da eno od aplikacij onemogoči.", +"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Opozorilo:</b> PHP LDAP modul mora biti nameščen, sicer ta vmesnik ne bo deloval. Prosimo, prosite vašega skrbnika, če ga namesti.", "Host" => "Gostitelj", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokol je lahko izpuščen, če ni posebej zahtevan SSL. V tem primeru se mora naslov začeti z ldaps://", "Base DN" => "Osnovni DN", diff --git a/apps/user_ldap/l10n/ta_LK.php b/apps/user_ldap/l10n/ta_LK.php new file mode 100644 index 00000000000..2028becaf98 --- /dev/null +++ b/apps/user_ldap/l10n/ta_LK.php @@ -0,0 +1,27 @@ +<?php $TRANSLATIONS = array( +"Host" => "ஓம்புனர்", +"You can omit the protocol, except you require SSL. Then start with ldaps://" => "நீங்கள் SSL சேவையை தவிர உடன்படு வரைமுறையை தவிர்க்க முடியும். பிறகு ldaps:.// உடன் ஆரம்பிக்கவும்", +"Base DN" => "தள DN", +"You can specify Base DN for users and groups in the Advanced tab" => "நீங்கள் பயனாளர்களுக்கும் மேன்மை தத்தலில் உள்ள குழுவிற்கும் தள DN ஐ குறிப்பிடலாம் ", +"User DN" => "பயனாளர் DN", +"Password" => "கடவுச்சொல்", +"without any placeholder, e.g. \"objectClass=posixGroup\"." => "எந்த ஒதுக்கீடும் இல்லாமல், உதாரணம். \"objectClass=posixGroup\".", +"Port" => "துறை ", +"Base User Tree" => "தள பயனாளர் மரம்", +"Base Group Tree" => "தள குழு மரம்", +"Group-Member association" => "குழு உறுப்பினர் சங்கம்", +"Use TLS" => "TLS ஐ பயன்படுத்தவும்", +"Do not use it for SSL connections, it will fail." => "SSL இணைப்பிற்கு பயன்படுத்தவேண்டாம், அது தோல்வியடையும்.", +"Case insensitve LDAP server (Windows)" => "உணர்ச்சியான LDAP சேவையகம் (சாளரங்கள்)", +"Turn off SSL certificate validation." => "SSL சான்றிதழின் செல்லுபடியை நிறுத்திவிடவும்", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "இந்த தெரிவுகளில் மட்டும் இணைப்பு வேலைசெய்தால், உங்களுடைய owncloud சேவையகத்திலிருந்து LDAP சேவையகத்தின் SSL சான்றிதழை இறக்குமதி செய்யவும்", +"Not recommended, use for testing only." => "பரிந்துரைக்கப்படவில்லை, சோதனைக்காக மட்டும் பயன்படுத்தவும்.", +"User Display Name Field" => "பயனாளர் காட்சிப்பெயர் புலம்", +"The LDAP attribute to use to generate the user`s ownCloud name." => "பயனாளரின் ownCloud பெயரை உருவாக்க LDAP பண்புக்கூறை பயன்படுத்தவும்.", +"Group Display Name Field" => "குழுவின் காட்சி பெயர் புலம் ", +"The LDAP attribute to use to generate the groups`s ownCloud name." => "ownCloud குழுக்களின் பெயர்களை உருவாக்க LDAP பண்புக்கூறை பயன்படுத்தவும்.", +"in bytes" => "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/apps/user_ldap/l10n/uk.php b/apps/user_ldap/l10n/uk.php index fd6a88d2372..1bbd24f679b 100644 --- a/apps/user_ldap/l10n/uk.php +++ b/apps/user_ldap/l10n/uk.php @@ -1,4 +1,37 @@ <?php $TRANSLATIONS = array( +"Host" => "Хост", +"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Можна не вказувати протокол, якщо вам не потрібен SSL. Тоді почніть з ldaps://", +"Base DN" => "Базовий DN", +"You can specify Base DN for users and groups in the Advanced tab" => "Ви можете задати Базовий DN для користувачів і груп на вкладинці Додатково", +"User DN" => "DN Користувача", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN клієнтського користувача для прив'язки, наприклад: uid=agent,dc=example,dc=com. Для анонімного доступу, залиште DN і Пароль порожніми.", "Password" => "Пароль", +"For anonymous access, leave DN and Password empty." => "Для анонімного доступу, залиште DN і Пароль порожніми.", +"User Login Filter" => "Фільтр Користувачів, що під'єднуються", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Визначає фільтр, який застосовується при спробі входу. %%uid замінює ім'я користувача при вході.", +"use %%uid placeholder, e.g. \"uid=%%uid\"" => "використовуйте %%uid заповнювач, наприклад: \"uid=%%uid\"", +"User List Filter" => "Фільтр Списку Користувачів", +"Defines the filter to apply, when retrieving users." => "Визначає фільтр, який застосовується при отриманні користувачів", +"without any placeholder, e.g. \"objectClass=person\"." => "без будь-якого заповнювача, наприклад: \"objectClass=person\".", +"Group Filter" => "Фільтр Груп", +"Defines the filter to apply, when retrieving groups." => "Визначає фільтр, який застосовується при отриманні груп.", +"without any placeholder, e.g. \"objectClass=posixGroup\"." => "без будь-якого заповнювача, наприклад: \"objectClass=posixGroup\".", +"Port" => "Порт", +"Base User Tree" => "Основне Дерево Користувачів", +"Base Group Tree" => "Основне Дерево Груп", +"Group-Member association" => "Асоціація Група-Член", +"Use TLS" => "Використовуйте TLS", +"Do not use it for SSL connections, it will fail." => "Не використовуйте його для SSL з'єднань, це не буде виконано.", +"Case insensitve LDAP server (Windows)" => "Нечутливий до регістру LDAP сервер (Windows)", +"Turn off SSL certificate validation." => "Вимкнути перевірку SSL сертифіката.", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Якщо з'єднання працює лише з цією опцією, імпортуйте SSL сертифікат LDAP сервера у ваший ownCloud сервер.", +"Not recommended, use for testing only." => "Не рекомендується, використовуйте лише для тестів.", +"User Display Name Field" => "Поле, яке відображає Ім'я Користувача", +"The LDAP attribute to use to generate the user`s ownCloud name." => "Атрибут LDAP, який використовується для генерації імен користувачів ownCloud.", +"Group Display Name Field" => "Поле, яке відображає Ім'я Групи", +"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/apps/user_ldap/l10n/vi.php b/apps/user_ldap/l10n/vi.php index 7a6ac2665c6..3d32c8125b8 100644 --- a/apps/user_ldap/l10n/vi.php +++ b/apps/user_ldap/l10n/vi.php @@ -1,13 +1,37 @@ <?php $TRANSLATIONS = array( "Host" => "Máy chủ", +"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Bạn có thể bỏ qua các giao thức, ngoại trừ SSL. Sau đó bắt đầu với ldaps://", +"Base DN" => "DN cơ bản", +"You can specify Base DN for users and groups in the Advanced tab" => "Bạn có thể chỉ định DN cơ bản cho người dùng và các nhóm trong tab Advanced", +"User DN" => "Người dùng DN", +"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Các DN của người sử dụng đã được thực hiện, ví dụ như uid =agent , dc = example, dc = com. Để truy cập nặc danh ,DN và mật khẩu trống.", "Password" => "Mật khẩu", +"For anonymous access, leave DN and Password empty." => "Cho phép truy cập nặc danh , DN và mật khẩu trống.", +"User Login Filter" => "Lọc người dùng đăng nhập", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action." => "Xác định các bộ lọc để áp dụng, khi đăng nhập . uid%% thay thế tên người dùng trong các lần đăng nhập.", +"use %%uid placeholder, e.g. \"uid=%%uid\"" => "use %%uid placeholder, e.g. \"uid=%%uid\"", +"User List Filter" => "Lọc danh sách thành viên", +"Defines the filter to apply, when retrieving users." => "Xác định các bộ lọc để áp dụng, khi người dụng sử dụng.", +"without any placeholder, e.g. \"objectClass=person\"." => "mà không giữ chỗ nào, ví dụ như \"objectClass = person\".", +"Group Filter" => "Bộ lọc nhóm", +"Defines the filter to apply, when retrieving groups." => "Xác định các bộ lọc để áp dụng, khi nhóm sử dụng.", +"without any placeholder, e.g. \"objectClass=posixGroup\"." => "mà không giữ chỗ nào, ví dụ như \"objectClass = osixGroup\".", "Port" => "Cổng", +"Base User Tree" => "Cây người dùng cơ bản", +"Base Group Tree" => "Cây nhóm cơ bản", +"Group-Member association" => "Nhóm thành viên Cộng đồng", "Use TLS" => "Sử dụng TLS", +"Do not use it for SSL connections, it will fail." => "Kết nối SSL bị lỗi. ", +"Case insensitve LDAP server (Windows)" => "Trường hợp insensitve LDAP máy chủ (Windows)", "Turn off SSL certificate validation." => "Tắt xác thực chứng nhận SSL", +"If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Nếu kết nối chỉ hoạt động với tùy chọn này, vui lòng import LDAP certificate SSL trong máy chủ ownCloud của bạn.", "Not recommended, use for testing only." => "Không khuyến khích, Chỉ sử dụng để thử nghiệm.", "User Display Name Field" => "Hiển thị tên người sử dụng", +"The LDAP attribute to use to generate the user`s ownCloud name." => "Các thuộc tính LDAP sử dụng để tạo tên người dùng ownCloud.", "Group Display Name Field" => "Hiển thị tên nhóm", +"The LDAP attribute to use to generate the groups`s ownCloud name." => "Các thuộc tính LDAP sử dụng để tạo các nhóm ownCloud.", "in bytes" => "Theo Byte", +"in seconds. A change empties the cache." => "trong vài giây. Một sự thay đổi bộ nhớ cache.", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Để trống tên người dùng (mặc định). Nếu không chỉ định thuộc tính LDAP/AD", "Help" => "Giúp đỡ" ); diff --git a/apps/user_ldap/l10n/zh_TW.php b/apps/user_ldap/l10n/zh_TW.php new file mode 100644 index 00000000000..abc1b03d49d --- /dev/null +++ b/apps/user_ldap/l10n/zh_TW.php @@ -0,0 +1,6 @@ +<?php $TRANSLATIONS = array( +"Password" => "密碼", +"Use TLS" => "使用TLS", +"Turn off SSL certificate validation." => "關閉 SSL 憑證驗證", +"Help" => "說明" +); diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index f1e2143cfaf..f888577aedb 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -40,9 +40,11 @@ abstract class Access { * @brief reads a given attribute for an LDAP record identified by a DN * @param $dn the record in question * @param $attr the attribute that shall be retrieved - * @returns the values in an array on success, false otherwise + * if empty, just check the record's existence + * @returns an array of values on success or an empty + * array if $attr is empty, false otherwise * - * Reads an attribute from an LDAP entry + * Reads an attribute from an LDAP entry or check if entry exists */ public function readAttribute($dn, $attr, $filter = 'objectClass=*') { if(!$this->checkConnection()) { @@ -56,11 +58,16 @@ abstract class Access { return false; } $rr = @ldap_read($cr, $dn, $filter, array($attr)); + $dn = $this->DNasBaseParameter($dn); if(!is_resource($rr)) { - \OCP\Util::writeLog('user_ldap', 'readAttribute '.$attr.' failed for DN '.$dn, \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG); //in case an error occurs , e.g. object does not exist return false; } + if (empty($attr)) { + \OCP\Util::writeLog('user_ldap', 'readAttribute: '.$dn.' found', \OCP\Util::DEBUG); + return array(); + } $er = ldap_first_entry($cr, $rr); if(!is_resource($er)) { //did not match the filter, return false @@ -73,7 +80,13 @@ abstract class Access { if(isset($result[$attr]) && $result[$attr]['count'] > 0) { $values = array(); for($i=0;$i<$result[$attr]['count'];$i++) { - $values[] = $this->resemblesDN($attr) ? $this->sanitizeDN($result[$attr][$i]) : $result[$attr][$i]; + if($this->resemblesDN($attr)) { + $values[] = $this->sanitizeDN($result[$attr][$i]); + } elseif(strtolower($attr) == 'objectguid') { + $values[] = $this->convertObjectGUID2Str($result[$attr][$i]); + } else { + $values[] = $result[$attr][$i]; + } } return $values; } @@ -107,6 +120,21 @@ abstract class Access { //make comparisons and everything work $dn = mb_strtolower($dn, 'UTF-8'); + //escape DN values according to RFC 2253 – this is already done by ldap_explode_dn + //to use the DN in search filters, \ needs to be escaped to \5c additionally + //to use them in bases, we convert them back to simple backslashes in readAttribute() + $replacements = array( + '\,' => '\5c2C', + '\=' => '\5c3D', + '\+' => '\5c2B', + '\<' => '\5c3C', + '\>' => '\5c3E', + '\;' => '\5c3B', + '\"' => '\5c22', + '\#' => '\5c23', + ); + $dn = str_replace(array_keys($replacements), array_values($replacements), $dn); + return $dn; } @@ -215,7 +243,6 @@ abstract class Access { * returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN */ public function dn2ocname($dn, $ldapname = null, $isUser = true) { - $dn = $this->sanitizeDN($dn); $table = $this->getMapTable($isUser); if($isUser) { $fncFindMappedName = 'findMappedUser'; @@ -261,8 +288,8 @@ abstract class Access { } $ldapname = $this->sanitizeUsername($ldapname); - //a new user/group! Then let's try to add it. We're shooting into the blue with the user/group name, assuming that in most cases there will not be a conflict. Otherwise an error will occur and we will continue with our second shot. - if(($isUser && !\OCP\User::userExists($ldapname)) || (!$isUser && !\OC_Group::groupExists($ldapname))) { + //a new user/group! Add it only if it doesn't conflict with other backend's users or existing groups + if(($isUser && !\OCP\User::userExists($ldapname, 'OCA\\user_ldap\\USER_LDAP')) || (!$isUser && !\OC_Group::groupExists($ldapname))) { if($this->mapComponent($dn, $ldapname, $isUser)) { return $ldapname; } @@ -320,20 +347,20 @@ abstract class Access { } private function findMappedGroup($dn) { - static $query = null; + static $query = null; if(is_null($query)) { $query = \OCP\DB::prepare(' - SELECT `owncloud_name` - FROM `'.$this->getMapTable(false).'` - WHERE `ldap_dn` = ?' - ); - } - $res = $query->execute(array($dn))->fetchOne(); - if($res) { - return $res; - } + SELECT `owncloud_name` + FROM `'.$this->getMapTable(false).'` + WHERE `ldap_dn` = ?' + ); + } + $res = $query->execute(array($dn))->fetchOne(); + if($res) { + return $res; + } return false; - } + } private function ldap2ownCloudNames($ldapObjects, $isUsers) { @@ -412,7 +439,6 @@ abstract class Access { */ private function mapComponent($dn, $ocname, $isUser = true) { $table = $this->getMapTable($isUser); - $dn = $this->sanitizeDN($dn); $sqlAdjustment = ''; $dbtype = \OCP\Config::getSystemValue('dbtype'); @@ -593,7 +619,7 @@ abstract class Access { //a) paged search insuccessful, though attempted //b) no paged search, but limit set if((!$this->pagedSearchedSuccessful - && $pagedSearchOK) + && $pagedSearchOK) || ( !$pagedSearchOK && !is_null($limit) @@ -665,6 +691,7 @@ abstract class Access { } public function areCredentialsValid($name, $password) { + $name = $this->DNasBaseParameter($name); $testConnection = clone $this->connection; $credentials = array( 'ldapAgentName' => $name, @@ -707,6 +734,7 @@ abstract class Access { public function getUUID($dn) { if($this->detectUuidAttribute($dn)) { + \OCP\Util::writeLog('user_ldap', 'UUID Checking \ UUID for '.$dn.' using '. $this->connection->ldapUuidAttribute, \OCP\Util::DEBUG); $uuid = $this->readAttribute($dn, $this->connection->ldapUuidAttribute); if(!is_array($uuid) && $this->connection->ldapOverrideUuidAttribute) { $this->detectUuidAttribute($dn, true); @@ -724,6 +752,46 @@ abstract class Access { } /** + * @brief converts a binary ObjectGUID into a string representation + * @param $oguid the ObjectGUID in it's binary form as retrieved from AD + * @returns String + * + * converts a binary ObjectGUID into a string representation + * http://www.php.net/manual/en/function.ldap-get-values-len.php#73198 + */ + private function convertObjectGUID2Str($oguid) { + $hex_guid = bin2hex($oguid); + $hex_guid_to_guid_str = ''; + for($k = 1; $k <= 4; ++$k) { + $hex_guid_to_guid_str .= substr($hex_guid, 8 - 2 * $k, 2); + } + $hex_guid_to_guid_str .= '-'; + for($k = 1; $k <= 2; ++$k) { + $hex_guid_to_guid_str .= substr($hex_guid, 12 - 2 * $k, 2); + } + $hex_guid_to_guid_str .= '-'; + for($k = 1; $k <= 2; ++$k) { + $hex_guid_to_guid_str .= substr($hex_guid, 16 - 2 * $k, 2); + } + $hex_guid_to_guid_str .= '-' . substr($hex_guid, 16, 4); + $hex_guid_to_guid_str .= '-' . substr($hex_guid, 20); + + return strtoupper($hex_guid_to_guid_str); + } + + /** + * @brief converts a stored DN so it can be used as base parameter for LDAP queries + * @param $dn the DN + * @returns String + * + * converts a stored DN so it can be used as base parameter for LDAP queries + * internally we store them for usage in LDAP filters + */ + private function DNasBaseParameter($dn) { + return str_replace('\\5c', '\\', $dn); + } + + /** * @brief get a cookie for the next LDAP paged search * @param $filter the search filter to identify the correct search * @param $limit the limit (or 'pageSize'), to identify the correct search well @@ -813,4 +881,4 @@ abstract class Access { return $pagedSearchOK; } -}
\ No newline at end of file +} diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index a570b29b793..b14cdafff89 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -89,7 +89,7 @@ class Connection { \OCP\Util::writeLog('user_ldap', 'Set config ldapUuidAttribute to '.$value, \OCP\Util::DEBUG); $this->config[$name] = $value; if(!empty($this->configID)) { - \OCP\Config::getAppValue($this->configID, 'ldap_uuid_attribute', $value); + \OCP\Config::setAppValue($this->configID, 'ldap_uuid_attribute', $value); } $changed = true; } @@ -180,22 +180,22 @@ class Connection { * Caches the general LDAP configuration. */ private function readConfiguration($force = false) { - \OCP\Util::writeLog('user_ldap','Checking conf state: isConfigured? '.print_r($this->configured, true).' isForce? '.print_r($force, true).' configID? '.print_r($this->configID, true), \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'Checking conf state: isConfigured? '.print_r($this->configured, true).' isForce? '.print_r($force, true).' configID? '.print_r($this->configID, true), \OCP\Util::DEBUG); if((!$this->configured || $force) && !is_null($this->configID)) { - \OCP\Util::writeLog('user_ldap','Reading the configuration', \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'Reading the configuration', \OCP\Util::DEBUG); $this->config['ldapHost'] = \OCP\Config::getAppValue($this->configID, 'ldap_host', ''); $this->config['ldapPort'] = \OCP\Config::getAppValue($this->configID, 'ldap_port', 389); - $this->config['ldapAgentName'] = \OCP\Config::getAppValue($this->configID, 'ldap_dn',''); - $this->config['ldapAgentPassword'] = base64_decode(\OCP\Config::getAppValue($this->configID, 'ldap_agent_password','')); + $this->config['ldapAgentName'] = \OCP\Config::getAppValue($this->configID, 'ldap_dn', ''); + $this->config['ldapAgentPassword'] = base64_decode(\OCP\Config::getAppValue($this->configID, 'ldap_agent_password', '')); $this->config['ldapBase'] = \OCP\Config::getAppValue($this->configID, 'ldap_base', ''); - $this->config['ldapBaseUsers'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_users',$this->config['ldapBase']); + $this->config['ldapBaseUsers'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_users', $this->config['ldapBase']); $this->config['ldapBaseGroups'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_groups', $this->config['ldapBase']); - $this->config['ldapTLS'] = \OCP\Config::getAppValue($this->configID, 'ldap_tls',0); + $this->config['ldapTLS'] = \OCP\Config::getAppValue($this->configID, 'ldap_tls', 0); $this->config['ldapNoCase'] = \OCP\Config::getAppValue($this->configID, 'ldap_nocase', 0); $this->config['turnOffCertCheck'] = \OCP\Config::getAppValue($this->configID, 'ldap_turn_off_cert_check', 0); $this->config['ldapUserDisplayName'] = mb_strtolower(\OCP\Config::getAppValue($this->configID, 'ldap_display_name', 'uid'), 'UTF-8'); - $this->config['ldapUserFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_userlist_filter','objectClass=person'); - $this->config['ldapGroupFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_group_filter','(objectClass=posixGroup)'); + $this->config['ldapUserFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_userlist_filter', 'objectClass=person'); + $this->config['ldapGroupFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_group_filter', '(objectClass=posixGroup)'); $this->config['ldapLoginFilter'] = \OCP\Config::getAppValue($this->configID, 'ldap_login_filter', '(uid=%uid)'); $this->config['ldapGroupDisplayName'] = mb_strtolower(\OCP\Config::getAppValue($this->configID, 'ldap_group_display_name', 'uid'), 'UTF-8'); $this->config['ldapQuotaAttribute'] = \OCP\Config::getAppValue($this->configID, 'ldap_quota_attr', ''); @@ -263,7 +263,7 @@ class Connection { if(empty($this->config['ldapGroupFilter']) && empty($this->config['ldapGroupMemberAssocAttr'])) { \OCP\Util::writeLog('user_ldap', 'No group filter is specified, LDAP group feature will not be used.', \OCP\Util::INFO); } - if(!in_array($this->config['ldapUuidAttribute'], array('auto','entryuuid', 'nsuniqueid', 'objectguid')) && (!is_null($this->configID))) { + if(!in_array($this->config['ldapUuidAttribute'], array('auto', 'entryuuid', 'nsuniqueid', 'objectguid')) && (!is_null($this->configID))) { \OCP\Config::setAppValue($this->configID, 'ldap_uuid_attribute', 'auto'); \OCP\Util::writeLog('user_ldap', 'Illegal value for the UUID Attribute, reset to autodetect.', \OCP\Util::INFO); } @@ -338,11 +338,11 @@ class Connection { } $this->ldapConnectionRes = ldap_connect($this->config['ldapHost'], $this->config['ldapPort']); if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_PROTOCOL_VERSION, 3)) { - if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_REFERRALS, 0)) { - if($this->config['ldapTLS']) { - ldap_start_tls($this->ldapConnectionRes); - } + if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_REFERRALS, 0)) { + if($this->config['ldapTLS']) { + ldap_start_tls($this->ldapConnectionRes); } + } } return $this->bind(); diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index f765151456a..2ee936d29a8 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -26,16 +26,12 @@ OCP\Util::addscript('user_ldap', 'settings'); OCP\Util::addstyle('user_ldap', 'settings'); if ($_POST) { + $clearCache = false; foreach($params as $param) { if(isset($_POST[$param])) { + $clearCache = true; if('ldap_agent_password' == $param) { OCP\Config::setAppValue('user_ldap', $param, base64_encode($_POST[$param])); - } elseif('ldap_cache_ttl' == $param) { - if(OCP\Config::getAppValue('user_ldap', $param,'') != $_POST[$param]) { - $ldap = new \OCA\user_ldap\lib\Connection('user_ldap'); - $ldap->clearCache(); - OCP\Config::setAppValue('user_ldap', $param, $_POST[$param]); - } } elseif('home_folder_naming_rule' == $param) { $value = empty($_POST[$param]) ? 'opt:username' : 'attr:'.$_POST[$param]; OCP\Config::setAppValue('user_ldap', $param, $value); @@ -54,12 +50,16 @@ if ($_POST) { OCP\Config::setAppValue('user_ldap', $param, 0); } } + if($clearCache) { + $ldap = new \OCA\user_ldap\lib\Connection('user_ldap'); + $ldap->clearCache(); + } } // fill template $tmpl = new OCP\Template( 'user_ldap', 'settings'); foreach($params as $param) { - $value = OCP\Config::getAppValue('user_ldap', $param,''); + $value = OCP\Config::getAppValue('user_ldap', $param, ''); $tmpl->assign($param, $value); } diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 3a653ad7208..8522d2f835c 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -4,6 +4,13 @@ <li><a href="#ldapSettings-1">LDAP Basic</a></li> <li><a href="#ldapSettings-2">Advanced</a></li> </ul> + <?php if(OCP\App::isEnabled('user_webdavauth')) { + echo '<p class="ldapwarning">'.$l->t('<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them.').'</p>'; + } + if(!function_exists('ldap_connect')) { + echo '<p class="ldapwarning">'.$l->t('<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it.').'</p>'; + } + ?> <fieldset id="ldapSettings-1"> <p><label for="ldap_host"><?php echo $l->t('Host');?></label><input type="text" id="ldap_host" name="ldap_host" value="<?php echo $_['ldap_host']; ?>" title="<?php echo $l->t('You can omit the protocol, except you require SSL. Then start with ldaps://');?>"></p> <p><label for="ldap_base"><?php echo $l->t('Base DN');?></label><input type="text" id="ldap_base" name="ldap_base" value="<?php echo $_['ldap_base']; ?>" title="<?php echo $l->t('You can specify Base DN for users and groups in the Advanced tab');?>" /></p> @@ -29,7 +36,7 @@ <p><label for="ldap_cache_ttl">Cache Time-To-Live</label><input type="text" id="ldap_cache_ttl" name="ldap_cache_ttl" value="<?php echo $_['ldap_cache_ttl']; ?>" title="<?php echo $l->t('in seconds. A change empties the cache.');?>" /></p> <p><label for="home_folder_naming_rule">User Home Folder Naming Rule</label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" value="<?php echo $_['home_folder_naming_rule']; ?>" title="<?php echo $l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.');?>" /></p> </fieldset> - <input type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection">Test Configuration</button> <a href="http://owncloud.org/support/ldap-backend/" target="_blank"><img src="<?php echo OCP\Util::imagePath('','actions/info.png'); ?>" style="height:1.75ex" /> <?php echo $l->t('Help');?></a> + <input type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection">Test Configuration</button> <a href="http://owncloud.org/support/ldap-backend/" target="_blank"><img src="<?php echo OCP\Util::imagePath('', 'actions/info.png'); ?>" style="height:1.75ex" /> <?php echo $l->t('Help');?></a> </div> </form> diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php index 2acb8c35a19..f99902d32f5 100644 --- a/apps/user_ldap/tests/group_ldap.php +++ b/apps/user_ldap/tests/group_ldap.php @@ -32,8 +32,8 @@ class Test_Group_Ldap extends UnitTestCase { $this->assertIsA(OC_Group::getGroups(), gettype(array())); $this->assertIsA($group_ldap->getGroups(), gettype(array())); - $this->assertFalse(OC_Group::inGroup('john','dosers'), gettype(false)); - $this->assertFalse($group_ldap->inGroup('john','dosers'), gettype(false)); + $this->assertFalse(OC_Group::inGroup('john', 'dosers'), gettype(false)); + $this->assertFalse($group_ldap->inGroup('john', 'dosers'), gettype(false)); //TODO: check also for expected true result. This backend won't be able to do any modifications, maybe use a dummy for this. $this->assertIsA(OC_Group::getUserGroups('john doe'), gettype(array())); diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 69e470c78a7..6591d1d5fee 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -149,9 +149,8 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { return false; } - //if user really still exists, we will be able to read his objectclass - $objcs = $this->readAttribute($dn, 'objectclass'); - if(!$objcs || empty($objcs)) { + //check if user really still exists by reading its entry + if(!is_array($this->readAttribute($dn, ''))) { $this->connection->writeToCache('userExists'.$uid, false); return false; } diff --git a/apps/user_webdavauth/appinfo/app.php b/apps/user_webdavauth/appinfo/app.php index 3ab323becce..c4c131b7ef0 100755 --- a/apps/user_webdavauth/appinfo/app.php +++ b/apps/user_webdavauth/appinfo/app.php @@ -23,7 +23,7 @@ require_once 'apps/user_webdavauth/user_webdavauth.php'; -OC_APP::registerAdmin('user_webdavauth','settings'); +OC_APP::registerAdmin('user_webdavauth', 'settings'); OC_User::registerBackend("WEBDAVAUTH"); OC_User::useBackend( "WEBDAVAUTH" ); diff --git a/apps/user_webdavauth/appinfo/info.xml b/apps/user_webdavauth/appinfo/info.xml index 9a8027daee6..e51f2e9ec4f 100755 --- a/apps/user_webdavauth/appinfo/info.xml +++ b/apps/user_webdavauth/appinfo/info.xml @@ -2,10 +2,14 @@ <info> <id>user_webdavauth</id> <name>WebDAV user backend</name> - <description>Authenticate Users by a WebDAV call</description> - <version>1.0</version> + <description>Authenticate users by a WebDAV call. You can use any WebDAV server, ownCloud server or other webserver to authenticate. It should return http 200 for right credentials and http 401 for wrong ones. + + This app is not compatible to the LDAP user and group backend.</description> <licence>AGPL</licence> <author>Frank Karlitschek</author> <require>4.9</require> <shipped>true</shipped> + <types> + <authentication/> + </types> </info> diff --git a/apps/user_webdavauth/appinfo/version b/apps/user_webdavauth/appinfo/version new file mode 100644 index 00000000000..a6bbdb5ff48 --- /dev/null +++ b/apps/user_webdavauth/appinfo/version @@ -0,0 +1 @@ +1.1.0.0 diff --git a/apps/user_webdavauth/l10n/.gitkeep b/apps/user_webdavauth/l10n/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/apps/user_webdavauth/l10n/.gitkeep diff --git a/apps/user_webdavauth/l10n/ar.php b/apps/user_webdavauth/l10n/ar.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ar.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ca.php b/apps/user_webdavauth/l10n/ca.php new file mode 100644 index 00000000000..a59bffb870d --- /dev/null +++ b/apps/user_webdavauth/l10n/ca.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "Adreça WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/cs_CZ.php b/apps/user_webdavauth/l10n/cs_CZ.php new file mode 100644 index 00000000000..a5b7e56771f --- /dev/null +++ b/apps/user_webdavauth/l10n/cs_CZ.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/de.php b/apps/user_webdavauth/l10n/de.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/de.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/de_DE.php b/apps/user_webdavauth/l10n/de_DE.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/de_DE.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/el.php b/apps/user_webdavauth/l10n/el.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/el.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/eo.php b/apps/user_webdavauth/l10n/eo.php new file mode 100644 index 00000000000..b4a2652d33e --- /dev/null +++ b/apps/user_webdavauth/l10n/eo.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV-a URL: http://" +); diff --git a/apps/user_webdavauth/l10n/es.php b/apps/user_webdavauth/l10n/es.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/es.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/es_AR.php b/apps/user_webdavauth/l10n/es_AR.php new file mode 100644 index 00000000000..81f2ea1e578 --- /dev/null +++ b/apps/user_webdavauth/l10n/es_AR.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL de WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/et_EE.php b/apps/user_webdavauth/l10n/et_EE.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/et_EE.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/eu.php b/apps/user_webdavauth/l10n/eu.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/eu.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/fi_FI.php b/apps/user_webdavauth/l10n/fi_FI.php new file mode 100644 index 00000000000..070a0ffdaff --- /dev/null +++ b/apps/user_webdavauth/l10n/fi_FI.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV-osoite: http://" +); diff --git a/apps/user_webdavauth/l10n/fr.php b/apps/user_webdavauth/l10n/fr.php new file mode 100644 index 00000000000..759d45b230e --- /dev/null +++ b/apps/user_webdavauth/l10n/fr.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV : http://" +); diff --git a/apps/user_webdavauth/l10n/gl.php b/apps/user_webdavauth/l10n/gl.php new file mode 100644 index 00000000000..a5b7e56771f --- /dev/null +++ b/apps/user_webdavauth/l10n/gl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/it.php b/apps/user_webdavauth/l10n/it.php new file mode 100644 index 00000000000..a5b7e56771f --- /dev/null +++ b/apps/user_webdavauth/l10n/it.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/ja_JP.php b/apps/user_webdavauth/l10n/ja_JP.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ja_JP.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ko.php b/apps/user_webdavauth/l10n/ko.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ko.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/nl.php b/apps/user_webdavauth/l10n/nl.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/nl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/pl.php b/apps/user_webdavauth/l10n/pl.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/pl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/pt_BR.php b/apps/user_webdavauth/l10n/pt_BR.php new file mode 100644 index 00000000000..991c746a221 --- /dev/null +++ b/apps/user_webdavauth/l10n/pt_BR.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL do WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/pt_PT.php b/apps/user_webdavauth/l10n/pt_PT.php new file mode 100644 index 00000000000..1aca5caeff1 --- /dev/null +++ b/apps/user_webdavauth/l10n/pt_PT.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "Endereço WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/ru.php b/apps/user_webdavauth/l10n/ru.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ru.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ru_RU.php b/apps/user_webdavauth/l10n/ru_RU.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ru_RU.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/si_LK.php b/apps/user_webdavauth/l10n/si_LK.php new file mode 100644 index 00000000000..cc5cfb3c9b2 --- /dev/null +++ b/apps/user_webdavauth/l10n/si_LK.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV යොමුව: http://" +); diff --git a/apps/user_webdavauth/l10n/sk_SK.php b/apps/user_webdavauth/l10n/sk_SK.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/sk_SK.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/sl.php b/apps/user_webdavauth/l10n/sl.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/sl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/sv.php b/apps/user_webdavauth/l10n/sv.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/sv.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ta_LK.php b/apps/user_webdavauth/l10n/ta_LK.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ta_LK.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/th_TH.php b/apps/user_webdavauth/l10n/th_TH.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/th_TH.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/tr.php b/apps/user_webdavauth/l10n/tr.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/tr.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/uk.php b/apps/user_webdavauth/l10n/uk.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/uk.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/vi.php b/apps/user_webdavauth/l10n/vi.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/vi.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/zh_CN.php b/apps/user_webdavauth/l10n/zh_CN.php new file mode 100644 index 00000000000..33c77f7d30e --- /dev/null +++ b/apps/user_webdavauth/l10n/zh_CN.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV地址: http://" +); diff --git a/apps/user_webdavauth/l10n/zh_TW.php b/apps/user_webdavauth/l10n/zh_TW.php new file mode 100644 index 00000000000..79740561e5a --- /dev/null +++ b/apps/user_webdavauth/l10n/zh_TW.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV 網址 http://" +); diff --git a/apps/user_webdavauth/settings.php b/apps/user_webdavauth/settings.php index 4f1ddbbefda..910073c7841 100755 --- a/apps/user_webdavauth/settings.php +++ b/apps/user_webdavauth/settings.php @@ -21,12 +21,11 @@ * */ -print_r($_POST); if($_POST) { - if(isset($_POST['webdav_url'])) { - OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url'])); - } + if(isset($_POST['webdav_url'])) { + OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url'])); + } } // fill template diff --git a/apps/user_webdavauth/templates/settings.php b/apps/user_webdavauth/templates/settings.php index c00c199632a..e6ca5d97d3c 100755 --- a/apps/user_webdavauth/templates/settings.php +++ b/apps/user_webdavauth/templates/settings.php @@ -1,7 +1,7 @@ <form id="webdavauth" action="#" method="post"> <fieldset class="personalblock"> <legend><strong>WebDAV Authentication</strong></legend> - <p><label for="webdav_url"><?php echo $l->t('webdav_url');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label> + <p><label for="webdav_url"><?php echo $l->t('WebDAV URL: http://');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label> <input type="submit" value="Save" /> </fieldset> </form> diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php index bd9f45d357b..839196c114c 100755 --- a/apps/user_webdavauth/user_webdavauth.php +++ b/apps/user_webdavauth/user_webdavauth.php @@ -30,24 +30,23 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { public function createUser() { // Can't create user - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to create users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to create users from web frontend using WebDAV user backend', 3); return false; } - public function deleteUser() { + public function deleteUser($uid) { // Can't delete user - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend', 3); return false; } public function setPassword ( $uid, $password ) { // We can't change user password - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to change password for users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to change password for users from web frontend using WebDAV user backend', 3); return false; } public function checkPassword( $uid, $password ) { - $url= 'http://'.urlencode($uid).':'.urlencode($password).'@'.$this->webdavauth_url; $headers = get_headers($url); if($headers==false) { @@ -57,10 +56,10 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { } $returncode= substr($headers[0], 9, 3); - if($returncode=='401') { - return false; + if(($returncode=='401') or ($returncode=='403')) { + return(false); }else{ - return true; + return($uid); } } @@ -68,14 +67,15 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { /* * we don´t know if a user exists without the password. so we have to return false all the time */ - public function userExists( $uid ) { - return false; + public function userExists( $uid ){ + return true; } + /* * we don´t know the users so all we can do it return an empty array here */ - public function getUsers() { + public function getUsers($search = '', $limit = 10, $offset = 0) { $returnArray = array(); return $returnArray; |