diff --git a/.gitignore b/.gitignore index ae63693170..4749dea19d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,10 +19,12 @@ _darcs/* CVS/* .svn/* RCS/* +*.backup* # kdevelop .kdev *.kdev4 +*.kate-swp # Lokalize *lokalize* diff --git a/.tx/config b/.tx/config deleted file mode 100644 index b51860f8b2..0000000000 --- a/.tx/config +++ /dev/null @@ -1,182 +0,0 @@ -[main] -host = https://www.transifex.net - -[owncloud.core] -file_filter = l10n//core.po -host = http://www.transifex.net -source_file = l10n/templates/core.pot -source_lang = en -trans.bg_BG = l10n/bg_BG/core.po -trans.ca = l10n/ca/core.po -trans.cs_CZ = l10n/cs_CZ/core.po -trans.da = l10n/da/core.po -trans.de = l10n/de/core.po -trans.el = l10n/el/core.po -trans.es = l10n/es/core.po -trans.et_EE = l10n/et_EE/core.po -trans.fr = l10n/fr/core.po -trans.id = l10n/id/core.po -trans.it = l10n/it/core.po -trans.lb = l10n/lb/core.po -trans.ms_MY = l10n/ms_MY/core.po -trans.nb_NO = l10n/nb_NO/core.po -trans.nl = l10n/nl/core.po -trans.pl = l10n/pl/core.po -trans.pt_BR = l10n/pt_BR/core.po -trans.pt_PT = l10n/pt_PT/core.po -trans.ro = l10n/ro/core.po -trans.ru = l10n/ru/core.po -trans.sr = l10n/sr/core.po -trans.sr@latin = l10n/sr@latin/core.po -trans.sv = l10n/sv/core.po -trans.zh_CN = l10n/zh_CN/core.po - -[owncloud.settings] -file_filter = l10n//settings.po -host = http://www.transifex.net -source_file = l10n/templates/settings.pot -source_lang = en -trans.bg_BG = l10n/bg_BG/settings.po -trans.ca = l10n/ca/settings.po -trans.cs_CZ = l10n/cs_CZ/settings.po -trans.da = l10n/da/settings.po -trans.de = l10n/de/settings.po -trans.el = l10n/el/settings.po -trans.es = l10n/es/settings.po -trans.et_EE = l10n/et_EE/settings.po -trans.fr = l10n/fr/settings.po -trans.id = l10n/id/settings.po -trans.it = l10n/it/settings.po -trans.lb = l10n/lb/settings.po -trans.ms_MY = l10n/ms_MY/settings.po -trans.nb_NO = l10n/nb_NO/settings.po -trans.nl = l10n/nl/settings.po -trans.pl = l10n/pl/settings.po -trans.pt_BR = l10n/pt_BR/settings.po -trans.pt_PT = l10n/pt_PT/settings.po -trans.ro = l10n/ro/settings.po -trans.ru = l10n/ru/settings.po -trans.sr = l10n/sr/settings.po -trans.sr@latin = l10n/sr@latin/settings.po -trans.sv = l10n/sv/settings.po -trans.zh_CN = l10n/zh_CN/settings.po - -[owncloud.files] -file_filter = translations/owncloud.files/.po -host = http://www.transifex.net -source_file = l10n/templates/files.pot -source_lang = en -trans.bg_BG = l10n/bg_BG/files.po -trans.ca = l10n/ca/files.po -trans.cs_CZ = l10n/cs_CZ/files.po -trans.da = l10n/da/files.po -trans.de = l10n/de/files.po -trans.el = l10n/el/files.po -trans.es = l10n/es/files.po -trans.et_EE = l10n/et_EE/files.po -trans.fr = l10n/fr/files.po -trans.id = l10n/id/files.po -trans.it = l10n/it/files.po -trans.lb = l10n/lb/files.po -trans.ms_MY = l10n/ms_MY/files.po -trans.nb_NO = l10n/nb_NO/files.po -trans.nl = l10n/nl/files.po -trans.pl = l10n/pl/files.po -trans.pt_BR = l10n/pt_BR/files.po -trans.pt_PT = l10n/pt_PT/files.po -trans.ro = l10n/ro/files.po -trans.ru = l10n/ru/files.po -trans.sr = l10n/sr/files.po -trans.sr@latin = l10n/sr@latin/files.po -trans.sv = l10n/sv/files.po -trans.zh_CN = l10n/zh_CN/files.po - -[owncloud.media] -file_filter = translations/owncloud.media/.po -host = http://www.transifex.net -source_file = l10n/templates/media.pot -source_lang = en -trans.bg_BG = l10n/bg_BG/media.po -trans.ca = l10n/ca/media.po -trans.cs_CZ = l10n/cs_CZ/media.po -trans.da = l10n/da/media.po -trans.de = l10n/de/media.po -trans.el = l10n/el/media.po -trans.es = l10n/es/media.po -trans.et_EE = l10n/et_EE/media.po -trans.fr = l10n/fr/media.po -trans.id = l10n/id/media.po -trans.it = l10n/it/media.po -trans.lb = l10n/lb/media.po -trans.ms_MY = l10n/ms_MY/media.po -trans.nb_NO = l10n/nb_NO/media.po -trans.nl = l10n/nl/media.po -trans.pl = l10n/pl/media.po -trans.pt_BR = l10n/pt_BR/media.po -trans.pt_PT = l10n/pt_PT/media.po -trans.ro = l10n/ro/media.po -trans.ru = l10n/ru/media.po -trans.sr = l10n/sr/media.po -trans.sr@latin = l10n/sr@latin/media.po -trans.sv = l10n/sv/media.po -trans.zh_CN = l10n/zh_CN/media.po - -[owncloud.calendar] -file_filter = l10n//calendar.po -host = http://www.transifex.net -source_file = l10n/templates/calendar.pot -source_lang = en -trans.bg_BG = l10n/bg_BG/calendar.po -trans.ca = l10n/ca/calendar.po -trans.cs_CZ = l10n/cs_CZ/calendar.po -trans.da = l10n/da/calendar.po -trans.de = l10n/de/calendar.po -trans.el = l10n/el/calendar.po -trans.es = l10n/es/calendar.po -trans.et_EE = l10n/et_EE/calendar.po -trans.fr = l10n/fr/calendar.po -trans.id = l10n/id/calendar.po -trans.it = l10n/it/calendar.po -trans.lb = l10n/lb/calendar.po -trans.ms_MY = l10n/ms_MY/calendar.po -trans.nb_NO = l10n/nb_NO/calendar.po -trans.nl = l10n/nl/calendar.po -trans.pl = l10n/pl/calendar.po -trans.pt_BR = l10n/pt_BR/calendar.po -trans.pt_PT = l10n/pt_PT/calendar.po -trans.ro = l10n/ro/calendar.po -trans.ru = l10n/ru/calendar.po -trans.sr = l10n/sr/calendar.po -trans.sr@latin = l10n/sr@latin/calendar.po -trans.sv = l10n/sv/calendar.po -trans.zh_CN = l10n/zh_CN/calendar.po - -[owncloud.contacts] -file_filter = translations/owncloud.contacts/.po -host = http://www.transifex.net -source_file = l10n/templates/contacts.pot -source_lang = en -trans.bg_BG = l10n/bg_BG/contacts.po -trans.ca = l10n/ca/contacts.po -trans.cs_CZ = l10n/cs_CZ/contacts.po -trans.da = l10n/da/contacts.po -trans.de = l10n/de/contacts.po -trans.el = l10n/el/contacts.po -trans.es = l10n/es/contacts.po -trans.et_EE = l10n/et_EE/contacts.po -trans.fr = l10n/fr/contacts.po -trans.id = l10n/id/contacts.po -trans.it = l10n/it/contacts.po -trans.lb = l10n/lb/contacts.po -trans.ms_MY = l10n/ms_MY/contacts.po -trans.nb_NO = l10n/nb_NO/contacts.po -trans.nl = l10n/nl/contacts.po -trans.pl = l10n/pl/contacts.po -trans.pt_BR = l10n/pt_BR/contacts.po -trans.pt_PT = l10n/pt_PT/contacts.po -trans.ro = l10n/ro/contacts.po -trans.ru = l10n/ru/contacts.po -trans.sr = l10n/sr/contacts.po -trans.sr@latin = l10n/sr@latin/contacts.po -trans.sv = l10n/sv/contacts.po -trans.zh_CN = l10n/zh_CN/contacts.po diff --git a/AUTHORS b/AUTHORS index f618df9311..f79733c250 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,3 +19,6 @@ With help from many libraries and frameworks including: SabreDAV jQuery … + +"Lock” symbol from thenounproject.com collection +"Clock” symbol by Brandon Hopkins, from thenounproject.com collection \ No newline at end of file diff --git a/apps/files/admin.php b/apps/files/admin.php index d05eb7267b..a8f2deffc9 100644 --- a/apps/files/admin.php +++ b/apps/files/admin.php @@ -23,7 +23,7 @@ // Init owncloud - + OCP\User::checkAdminUser(); @@ -33,7 +33,7 @@ $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize') $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); $maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size)); if($_POST) { - if(isset($_POST['maxUploadSize'])){ + if(isset($_POST['maxUploadSize'])) { if(($setMaxSize = OC_Files::setUploadLimit(OCP\Util::computerFileSize($_POST['maxUploadSize']))) !== false) { $maxUploadFilesize = OCP\Util::humanFileSize($setMaxSize); } diff --git a/apps/files/ajax/autocomplete.php b/apps/files/ajax/autocomplete.php index e504bb24bf..fae38368a8 100644 --- a/apps/files/ajax/autocomplete.php +++ b/apps/files/ajax/autocomplete.php @@ -11,20 +11,20 @@ OCP\JSON::checkLoggedIn(); $query = $_GET['term']; $dirOnly=(isset($_GET['dironly']))?($_GET['dironly']=='true'):false; -if($query[0]!='/'){ +if($query[0]!='/') { $query='/'.$query; } -if(substr($query,-1,1)=='/'){ +if(substr($query, -1, 1)=='/') { $base=$query; -}else{ +} else { $base=dirname($query); } -$query=substr($query,strlen($base)); +$query=substr($query, strlen($base)); -if($base!='/'){ - $query=substr($query,1); +if($base!='/') { + $query=substr($query, 1); } $queryLen=strlen($query); $query=strtolower($query); @@ -33,17 +33,17 @@ $query=strtolower($query); $files=array(); -if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)){ +if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)) { $dh = OC_Filesystem::opendir($base); - if($dh){ - if(substr($base,-1,1)!='/'){ + if($dh) { + if(substr($base, -1, 1)!='/') { $base=$base.'/'; } while (($file = readdir($dh)) !== false) { - if ($file != "." && $file != ".."){ - if(substr(strtolower($file),0,$queryLen)==$query){ + if ($file != "." && $file != "..") { + if(substr(strtolower($file), 0, $queryLen)==$query) { $item=$base.$file; - if((!$dirOnly or OC_Filesystem::is_dir($item))){ + if((!$dirOnly or OC_Filesystem::is_dir($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 695f803884..e9bcea1893 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -15,7 +15,7 @@ $filesWithError = ''; $success = true; //Now delete foreach($files as $file) { - if( !OC_Files::delete( $dir, $file )){ + if( !OC_Files::delete( $dir, $file )) { $filesWithError .= $file . "\n"; $success = false; } diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index dae0c1a828..568fe754c0 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -14,25 +14,25 @@ $doBreadcrumb = isset( $_GET['breadcrumb'] ) ? true : false; $data = array(); // Make breadcrumb -if($doBreadcrumb){ +if($doBreadcrumb) { $breadcrumb = array(); $pathtohere = "/"; - foreach( explode( "/", $dir ) as $i ){ - if( $i != "" ){ + foreach( explode( "/", $dir ) as $i ) { + if( $i != "" ) { $pathtohere .= "$i/"; $breadcrumb[] = array( "dir" => $pathtohere, "name" => $i ); } } - + $breadcrumbNav = new OCP\Template( "files", "part.breadcrumb", "" ); $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); - + $data['breadcrumb'] = $breadcrumbNav->fetchPage(); } // make filelist $files = array(); -foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ +foreach( OC_Files::getdirectorycontent( $dir ) as $i ) { $i["date"] = OCP\Util::formatDate($i["mtime"] ); $files[] = $i; } diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 3d4003a8ed..8b3149ef14 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -12,8 +12,8 @@ $file = stripslashes($_GET["file"]); $target = stripslashes($_GET["target"]); -if(OC_Files::move($dir,$file,$target,$file)){ +if(OC_Files::move($dir, $file, $target, $file)) { OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file ))); -}else{ +} else { OCP\JSON::error(array("data" => array( "message" => "Could not move $file" ))); } diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index cc9208ad08..4619315ce0 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -3,7 +3,7 @@ // Init owncloud global $eventSource; -if(!OC_User::isLoggedIn()){ +if(!OC_User::isLoggedIn()) { exit; } @@ -15,9 +15,9 @@ $filename = isset( $_REQUEST['filename'] ) ? stripslashes($_REQUEST['filename']) $content = isset( $_REQUEST['content'] ) ? $_REQUEST['content'] : ''; $source = isset( $_REQUEST['source'] ) ? stripslashes($_REQUEST['source']) : ''; -if($source){ +if($source) { $eventSource=new OC_EventSource(); -}else{ +} else { OC_JSON::callCheck(); } @@ -25,12 +25,12 @@ if($filename == '') { OCP\JSON::error(array("data" => array( "message" => "Empty Filename" ))); exit(); } -if(strpos($filename,'/')!==false){ +if(strpos($filename, '/')!==false) { OCP\JSON::error(array("data" => array( "message" => "Invalid Filename" ))); exit(); } -function progress($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max){ +function progress($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { static $filesize = 0; static $lastsize = 0; global $eventSource; @@ -39,14 +39,14 @@ function progress($notification_code, $severity, $message, $message_code, $bytes case STREAM_NOTIFY_FILE_SIZE_IS: $filesize = $bytes_max; break; - + case STREAM_NOTIFY_PROGRESS: if ($bytes_transferred > 0) { if (!isset($filesize)) { } else { $progress = (int)(($bytes_transferred/$filesize)*100); - if($progress>$lastsize){//limit the number or messages send - $eventSource->send('progress',$progress); + if($progress>$lastsize) {//limit the number or messages send + $eventSource->send('progress', $progress); } $lastsize=$progress; } @@ -55,31 +55,31 @@ function progress($notification_code, $severity, $message, $message_code, $bytes } } -if($source){ - if(substr($source,0,8)!='https://' and substr($source,0,7)!='http://'){ +if($source) { + if(substr($source, 0, 8)!='https://' and substr($source, 0, 7)!='http://') { OCP\JSON::error(array("data" => array( "message" => "Not a valid source" ))); exit(); } $ctx = stream_context_create(null, array('notification' =>'progress')); - $sourceStream=fopen($source,'rb', false, $ctx); + $sourceStream=fopen($source, 'rb', false, $ctx); $target=$dir.'/'.$filename; - $result=OC_Filesystem::file_put_contents($target,$sourceStream); - if($result){ + $result=OC_Filesystem::file_put_contents($target, $sourceStream); + if($result) { $mime=OC_Filesystem::getMimetype($target); - $eventSource->send('success',$mime); - }else{ - $eventSource->send('error',"Error while downloading ".$source. ' to '.$target); + $eventSource->send('success', $mime); + } else { + $eventSource->send('error', "Error while downloading ".$source. ' to '.$target); } $eventSource->close(); exit(); -}else{ - if($content){ - if(OC_Filesystem::file_put_contents($dir.'/'.$filename,$content)){ +} else { + if($content) { + if(OC_Filesystem::file_put_contents($dir.'/'.$filename, $content)) { OCP\JSON::success(array("data" => array('content'=>$content))); exit(); } - }elseif(OC_Files::newFile($dir, $filename, 'file')){ + }elseif(OC_Files::newFile($dir, $filename, 'file')) { OCP\JSON::success(array("data" => array('content'=>$content))); exit(); } diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php index ae92bcf09b..34c2d0ca14 100644 --- a/apps/files/ajax/newfolder.php +++ b/apps/files/ajax/newfolder.php @@ -14,7 +14,7 @@ if(trim($foldername) == '') { OCP\JSON::error(array("data" => array( "message" => "Empty Foldername" ))); exit(); } -if(strpos($foldername,'/')!==false){ +if(strpos($foldername, '/')!==false) { OCP\JSON::error(array("data" => array( "message" => "Invalid Foldername" ))); exit(); } diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php index d159f6e152..e0aa0bdac5 100644 --- a/apps/files/ajax/rawlist.php +++ b/apps/files/ajax/rawlist.php @@ -5,19 +5,19 @@ $RUNTIME_APPTYPES=array('filesystem'); // Init owncloud -require_once('lib/template.php'); +require_once 'lib/template.php'; OCP\JSON::checkLoggedIn(); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; -$mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : ''; +$mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : ''; // make filelist $files = array(); -foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ){ +foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ) { $i["date"] = OCP\Util::formatDate($i["mtime"] ); - $i['mimetype_icon'] = $i['type'] == 'dir' ? \mimetype_icon('dir'): \mimetype_icon($i['mimetype']); + $i['mimetype_icon'] = $i['type'] == 'dir' ? \mimetype_icon('dir'): \mimetype_icon($i['mimetype']); $files[] = $i; } diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index eef3885851..d2ec1ab516 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -6,38 +6,38 @@ $force=isset($_GET['force']) and $_GET['force']=='true'; $dir=isset($_GET['dir'])?$_GET['dir']:''; $checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true'; -if(!$checkOnly){ +if(!$checkOnly) { $eventSource=new OC_EventSource(); } session_write_close(); //create the file cache if necesary -if($force or !OC_FileCache::inCache('')){ - if(!$checkOnly){ +if($force or !OC_FileCache::inCache('')) { + if(!$checkOnly) { OCP\DB::beginTransaction(); - - if(OC_Cache::isFast()){ + + if(OC_Cache::isFast()) { OC_Cache::clear('fileid/'); //make sure the old fileid's don't mess things up } - + OC_FileCache::scan($dir,$eventSource); OC_FileCache::clean(); OCP\DB::commit(); - $eventSource->send('success',true); - }else{ + $eventSource->send('success', true); + } else { OCP\JSON::success(array('data'=>array('done'=>true))); exit; } -}else{ - if($checkOnly){ +} else { + if($checkOnly) { OCP\JSON::success(array('data'=>array('done'=>false))); exit; } - if(isset($eventSource)){ - $eventSource->send('success',false); - }else{ + if(isset($eventSource)) { + $eventSource->send('success', false); + } else { exit; } } -$eventSource->close(); \ No newline at end of file +$eventSource->close(); diff --git a/apps/files/ajax/timezone.php b/apps/files/ajax/timezone.php index 0be441a36a..b71fa3940c 100644 --- a/apps/files/ajax/timezone.php +++ b/apps/files/ajax/timezone.php @@ -3,4 +3,3 @@ // see lib/base.php for an example //session_start(); $_SESSION['timezone'] = $_GET['time']; - \ No newline at end of file diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 74e6eb560d..7709becc6a 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -35,27 +35,27 @@ $dir = $_POST['dir']; $error=''; $totalSize=0; -foreach($files['size'] as $size){ +foreach($files['size'] as $size) { $totalSize+=$size; } -if($totalSize>OC_Filesystem::free_space('/')){ +if($totalSize>OC_Filesystem::free_space('/')) { OCP\JSON::error(array("data" => array( "message" => "Not enough space available" ))); exit(); } $result=array(); -if(strpos($dir,'..') === false){ +if(strpos($dir, '..') === false) { $fileCount=count($files['name']); - for($i=0;$i<$fileCount;$i++){ + for($i=0;$i<$fileCount;$i++) { $target = OCP\Files::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]); - if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i],$target)){ + if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) { $meta=OC_FileCache_Cached::get($target); $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>basename($target)); } } OCP\JSON::encodedPrint($result); exit(); -}else{ +} else { $error='invalid dir'; } diff --git a/apps/files/appinfo/filesync.php b/apps/files/appinfo/filesync.php index 707ee2435c..c1fe444cec 100644 --- a/apps/files/appinfo/filesync.php +++ b/apps/files/appinfo/filesync.php @@ -23,14 +23,14 @@ // only need filesystem apps $RUNTIME_APPTYPES=array('filesystem','authentication'); OC_App::loadApps($RUNTIME_APPTYPES); -if(!OC_User::isLoggedIn()){ - if(!isset($_SERVER['PHP_AUTH_USER'])){ +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"])){ + if(!OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) { exit(); } } diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index b2480a58f5..35008e345b 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -5,7 +5,7 @@ $installedVersion=OCP\Config::getAppValue('files', 'installed_version'); if (version_compare($installedVersion, '1.1.4', '<')) { $query = OC_DB::prepare( "SELECT `propertyname`, `propertypath`, `userid` FROM `*PREFIX*properties`" ); $result = $query->execute(); - while( $row = $result->fetchRow()){ + while( $row = $result->fetchRow()) { $query = OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertyname` = ? WHERE `userid` = ? AND `propertypath` = ?' ); $query->execute( array( preg_replace("/^{.*}/", "", $row["propertyname"]),$row["userid"], $row["propertypath"] )); } @@ -41,5 +41,3 @@ foreach($filesToRemove as $file) { break; } } - - diff --git a/apps/files/css/files.css b/apps/files/css/files.css index bdd35285e7..f35478ecc2 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -47,9 +47,6 @@ tbody a { color:#000; } span.extension, span.uploading, td.date { color:#999; } span.extension { text-transform:lowercase; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70); opacity:.7; -webkit-transition:opacity 300ms; -moz-transition:opacity 300ms; -o-transition:opacity 300ms; transition:opacity 300ms; } tr:hover span.extension { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; color:#777; } -div.crumb { float:left; display:block; background:no-repeat right 0; padding:.75em 1.5em 0 1em; height:2.9em; } -div.crumb:first-child { padding-left:1em; } -div.crumb.last { font-weight:bold; } table tr.mouseOver td { background-color:#eee; } table th { height:2em; padding:0 .5em; color:#999; } table th .name { float:left; margin-left:.5em; } diff --git a/apps/files/download.php b/apps/files/download.php index 4e2478d1ad..ff6aefbbe0 100644 --- a/apps/files/download.php +++ b/apps/files/download.php @@ -22,14 +22,14 @@ */ // Init owncloud - + // Check if we are a user OCP\User::checkLoggedIn(); $filename = $_GET["file"]; -if(!OC_Filesystem::file_exists($filename)){ +if(!OC_Filesystem::file_exists($filename)) { header("HTTP/1.0 404 Not Found"); $tmpl = new OCP\Template( '', '404', 'guest' ); $tmpl->assign('file',$filename); diff --git a/apps/files/index.php b/apps/files/index.php index 6d53527025..493087d26f 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -31,7 +31,7 @@ OCP\Util::addscript( 'files', 'jquery.fileupload' ); OCP\Util::addscript( 'files', 'files' ); OCP\Util::addscript( 'files', 'filelist' ); OCP\Util::addscript( 'files', 'fileactions' ); -if(!isset($_SESSION['timezone'])){ +if(!isset($_SESSION['timezone'])) { OCP\Util::addscript( 'files', 'timezone' ); } OCP\App::setActiveNavigationEntry( 'files_index' ); @@ -44,9 +44,9 @@ if(!OC_Filesystem::is_dir($dir.'/')) { } $files = array(); -foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ +foreach( OC_Files::getdirectorycontent( $dir ) as $i ) { $i['date'] = OCP\Util::formatDate($i['mtime'] ); - if($i['type']=='file'){ + if($i['type']=='file') { $fileinfo=pathinfo($i['name']); $i['basename']=$fileinfo['filename']; if (!empty($fileinfo['extension'])) { @@ -56,7 +56,7 @@ foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ $i['extension']=''; } } - if($i['directory']=='/'){ + if($i['directory']=='/') { $i['directory']=''; } $files[] = $i; @@ -65,8 +65,8 @@ foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ // Make breadcrumb $breadcrumb = array(); $pathtohere = ''; -foreach( explode( '/', $dir ) as $i ){ - if( $i != '' ){ +foreach( explode( '/', $dir ) as $i ) { + if( $i != '' ) { $pathtohere .= '/'.str_replace('+','%20', urlencode($i)); $breadcrumb[] = array( 'dir' => $pathtohere, 'name' => $i ); } @@ -89,11 +89,23 @@ $freeSpace=OC_Filesystem::free_space('/'); $freeSpace=max($freeSpace,0); $maxUploadFilesize = min($maxUploadFilesize ,$freeSpace); +$permissions = OCP\Share::PERMISSION_READ; +if (OC_Filesystem::isUpdatable($dir.'/')) { + $permissions |= OCP\Share::PERMISSION_UPDATE; +} +if (OC_Filesystem::isDeletable($dir.'/')) { + $permissions |= OCP\Share::PERMISSION_DELETE; +} +if (OC_Filesystem::isSharable($dir.'/')) { + $permissions |= OCP\Share::PERMISSION_SHARE; +} + $tmpl = new OCP\Template( 'files', 'index', 'user' ); $tmpl->assign( 'fileList', $list->fetchPage(), false ); $tmpl->assign( 'breadcrumb', $breadcrumbNav->fetchPage(), false ); $tmpl->assign( 'dir', OC_Filesystem::normalizePath($dir)); $tmpl->assign( 'isCreatable', OC_Filesystem::isCreatable($dir.'/')); +$tmpl->assign('permissions', $permissions); $tmpl->assign( 'files', $files ); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign( 'uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 89e7bdd7ad..1403d345e8 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -1,9 +1,4 @@ -FileActions={ - PERMISSION_CREATE:4, - PERMISSION_READ:1, - PERMISSION_UPDATE:2, - PERMISSION_DELETE:8, - PERMISSION_SHARE:16, +var FileActions={ actions:{}, defaults:{}, icons:{}, @@ -25,20 +20,20 @@ FileActions={ get:function(mime,type,permissions){ var actions={}; if(FileActions.actions.all){ - actions=$.extend( actions, FileActions.actions.all ) + actions=$.extend( actions, FileActions.actions.all ); } if(mime){ if(FileActions.actions[mime]){ - actions=$.extend( actions, FileActions.actions[mime] ) + actions=$.extend( actions, FileActions.actions[mime] ); } var mimePart=mime.substr(0,mime.indexOf('/')); if(FileActions.actions[mimePart]){ - actions=$.extend( actions, FileActions.actions[mimePart] ) + actions=$.extend( actions, FileActions.actions[mimePart] ); } } if(type){//type is 'dir' or 'file' if(FileActions.actions[type]){ - actions=$.extend( actions, FileActions.actions[type] ) + actions=$.extend( actions, FileActions.actions[type] ); } } var filteredActions = {}; @@ -108,7 +103,12 @@ FileActions={ if(img.call){ img=img(file); } - var html=''+basename + html+=''+basename; if(extension){ html+=''+extension+''; } @@ -36,9 +36,12 @@ FileList={ }else{ $('tr').filterAttr('data-file',name).find('td.filename').draggable(dragOptions); } + if (hidden) { + $('tr').filterAttr('data-file', name).hide(); + } }, - addDir:function(name,size,lastModified){ - html = $('').attr({ "data-type": "dir", "data-size": size, "data-file": name}); + addDir:function(name,size,lastModified,hidden){ + html = $('').attr({ "data-type": "dir", "data-size": size, "data-file": name, "data-permissions": $('#permissions').val()}); td = $('').attr({"class": "filename", "style": 'background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')' }); td.append(''); var link_elem = $('').attr({ "class": "name", "href": OC.linkTo('files', 'index.php')+"&dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/') }); @@ -63,6 +66,9 @@ FileList={ 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); + if (hidden) { + $('tr').filterAttr('data-file', name).hide(); + } }, refresh:function(data) { result = jQuery.parseJSON(data.responseText); @@ -82,7 +88,7 @@ FileList={ }, insertElement:function(name,type,element){ //find the correct spot to insert the file or folder - var fileElements=$('tr[data-file][data-type="'+type+'"]'); + var fileElements=$('tr[data-file][data-type="'+type+'"]:visible'); var pos; if(name.localeCompare($(fileElements[0]).attr('data-file'))<0){ pos=-1; @@ -137,11 +143,7 @@ FileList={ event.preventDefault(); var newname=input.val(); if (newname != name) { - if ($('tr').filterAttr('data-file', newname).length > 0) { - $('#notification').html(newname+' '+t('files', 'already exists')+''+t('files', 'replace')+''+t('files', 'cancel')+''); - $('#notification').data('oldName', name); - $('#notification').data('newName', newname); - $('#notification').fadeIn(); + if (FileList.checkName(name, newname, false)) { newname = name; } else { $.get(OC.filePath('files','ajax','rename.php'), { dir : $('#dir').val(), newname: newname, file: name },function(result) { @@ -151,7 +153,6 @@ FileList={ } }); } - } tr.attr('data-file', newname); var path = td.children('a.name').attr('href'); @@ -179,58 +180,77 @@ FileList={ form.trigger('submit'); }); }, - replace:function(oldName, newName) { + checkName:function(oldName, newName, isNewFile) { + if (isNewFile || $('tr').filterAttr('data-file', newName).length > 0) { + if (isNewFile) { + $('#notification').html(newName+' '+t('files', 'already exists')+''+t('files', 'replace')+''+t('files', 'suggest name')+''+t('files', 'cancel')+''); + } else { + $('#notification').html(newName+' '+t('files', 'already exists')+''+t('files', 'replace')+''+t('files', 'cancel')+''); + } + $('#notification').data('oldName', oldName); + $('#notification').data('newName', newName); + $('#notification').data('isNewFile', isNewFile); + $('#notification').fadeIn(); + return true; + } else { + return false; + } + }, + replace:function(oldName, newName, isNewFile) { // Finish any existing actions if (FileList.lastAction || !FileList.useUndo) { FileList.lastAction(); } - var tr = $('tr').filterAttr('data-file', oldName); - tr.hide(); + $('tr').filterAttr('data-file', oldName).hide(); + $('tr').filterAttr('data-file', newName).hide(); + var tr = $('tr').filterAttr('data-file', oldName).clone(); + tr.attr('data-replace', 'true'); + tr.attr('data-file', newName); + var td = tr.children('td.filename'); + td.children('a.name .span').text(newName); + var path = td.children('a.name').attr('href'); + td.children('a.name').attr('href', path.replace(encodeURIComponent(oldName), encodeURIComponent(newName))); + if (newName.indexOf('.') > 0) { + var basename = newName.substr(0, newName.lastIndexOf('.')); + } else { + var basename = newName; + } + td.children('a.name').empty(); + var span = $(''); + span.text(basename); + td.children('a.name').append(span); + if (newName.indexOf('.') > 0) { + span.append($(''+newName.substr(newName.lastIndexOf('.'))+'')); + } + FileList.insertElement(newName, tr.data('type'), tr); + tr.show(); FileList.replaceCanceled = false; FileList.replaceOldName = oldName; FileList.replaceNewName = newName; + FileList.replaceIsNewFile = isNewFile; FileList.lastAction = function() { FileList.finishReplace(); }; - $('#notification').html(t('files', 'replaced')+' '+newName+' '+t('files', 'with')+' '+oldName+''+t('files', 'undo')+''); + if (isNewFile) { + $('#notification').html(t('files', 'replaced')+' '+newName+''+t('files', 'undo')+''); + } else { + $('#notification').html(t('files', 'replaced')+' '+newName+' '+t('files', 'with')+' '+oldName+''+t('files', 'undo')+''); + } $('#notification').fadeIn(); }, finishReplace:function() { if (!FileList.replaceCanceled && FileList.replaceOldName && FileList.replaceNewName) { - // Delete the file being replaced and rename the replacement - FileList.deleteCanceled = false; - FileList.deleteFiles = [FileList.replaceNewName]; - FileList.finishDelete(function() { - $.ajax({url: OC.filePath('files', 'ajax', 'rename.php'), async: false, data: { dir: $('#dir').val(), newname: FileList.replaceNewName, file: FileList.replaceOldName }, success: function(result) { - if (result && result.status == 'success') { - var tr = $('tr').filterAttr('data-file', FileList.replaceOldName); - tr.attr('data-file', FileList.replaceNewName); - var td = tr.children('td.filename'); - td.children('a.name .span').text(FileList.replaceNewName); - var path = td.children('a.name').attr('href'); - td.children('a.name').attr('href', path.replace(encodeURIComponent(FileList.replaceOldName), encodeURIComponent(FileList.replaceNewName))); - if (FileList.replaceNewName.indexOf('.') > 0) { - var basename = FileList.replaceNewName.substr(0, FileList.replaceNewName.lastIndexOf('.')); - } else { - var basename = FileList.replaceNewName; - } - td.children('a.name').empty(); - var span = $(''); - span.text(basename); - td.children('a.name').append(span); - if (FileList.replaceNewName.indexOf('.') > 0) { - span.append($(''+FileList.replaceNewName.substr(FileList.replaceNewName.lastIndexOf('.'))+'')); - } - tr.show(); - } else { - OC.dialogs.alert(result.data.message, 'Error moving file'); - } - FileList.replaceCanceled = true; - FileList.replaceOldName = null; - FileList.replaceNewName = null; - FileList.lastAction = null; - }}); - }, true); + $.ajax({url: OC.filePath('files', 'ajax', 'rename.php'), async: false, data: { dir: $('#dir').val(), newname: FileList.replaceNewName, file: FileList.replaceOldName }, success: function(result) { + if (result && result.status == 'success') { + $('tr').filterAttr('data-replace', 'true').removeAttr('data-replace'); + } else { + OC.dialogs.alert(result.data.message, 'Error moving file'); + } + FileList.replaceCanceled = true; + FileList.replaceOldName = null; + FileList.replaceNewName = null; + FileList.lastAction = null; + }}); } }, do_delete:function(files){ @@ -243,7 +263,12 @@ FileList={ return; } FileList.prepareDeletion(files); - $('#notification').html(t('files', 'deleted')+' '+files+''+t('files', 'undo')+''); + // NOTE: Temporary fix to change the text to unshared for files in root of Shared folder + if ($('#dir').val() == '/Shared') { + $('#notification').html(t('files', 'unshared')+' '+files+''+t('files', 'undo')+''); + } else { + $('#notification').html(t('files', 'deleted')+' '+files+''+t('files', 'undo')+''); + } $('#notification').fadeIn(); }, finishDelete:function(ready,sync){ @@ -255,7 +280,7 @@ FileList={ data: {dir:$('#dir').val(),files:fileNames}, complete: function(data){ boolOperationFinished(data, function(){ - $('#notification').fadeOut(); + $('#notification').fadeOut('400'); $.each(FileList.deleteFiles,function(index,file){ FileList.remove(file); }); @@ -299,21 +324,39 @@ $(document).ready(function(){ FileList.deleteCanceled=true; FileList.deleteFiles=null; } else if (FileList.replaceOldName && FileList.replaceNewName) { - $('tr').filterAttr('data-file', FileList.replaceOldName).show(); + if (FileList.replaceIsNewFile) { + // Delete the new uploaded file + FileList.deleteCanceled = false; + FileList.deleteFiles = [FileList.replaceOldName]; + FileList.finishDelete(null, true); + } else { + $('tr').filterAttr('data-file', FileList.replaceOldName).show(); + } + $('tr').filterAttr('data-replace', 'true').remove(); + $('tr').filterAttr('data-file', FileList.replaceNewName).show(); FileList.replaceCanceled = true; FileList.replaceOldName = null; FileList.replaceNewName = null; + FileList.replaceIsNewFile = null; } FileList.lastAction = null; - $('#notification').fadeOut(); + $('#notification').fadeOut('400'); }); $('#notification .replace').live('click', function() { $('#notification').fadeOut('400', function() { - FileList.replace($('#notification').data('oldName'), $('#notification').data('newName')); + FileList.replace($('#notification').data('oldName'), $('#notification').data('newName'), $('#notification').data('isNewFile')); }); }); + $('#notification .suggest').live('click', function() { + $('tr').filterAttr('data-file', $('#notification').data('oldName')).show(); + $('#notification').fadeOut('400'); + }); $('#notification .cancel').live('click', function() { - $('#notification').fadeOut(); + if ($('#notification').data('isNewFile')) { + FileList.deleteCanceled = false; + FileList.deleteFiles = [$('#notification').data('oldName')]; + FileList.finishDelete(null, true); + } }); FileList.useUndo=('onbeforeunload' in window) $(window).bind('beforeunload', function (){ diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 049afea4f6..101e2bad2e 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -26,7 +26,7 @@ Files={ }); procesSelection(); } -} +}; $(document).ready(function() { $('#fileList tr').each(function(){ //little hack to set unescape filenames in attribute @@ -40,8 +40,16 @@ $(document).ready(function() { $('#file_action_panel').attr('activeAction', false); //drag/drop of files - $('#fileList tr[data-write="true"] td.filename').draggable(dragOptions); - $('#fileList tr[data-type="dir"][data-write="true"] td.filename').droppable(folderDropOptions); + $('#fileList tr td.filename').each(function(i,e){ + if ($(e).parent().data('permissions') & OC.PERMISSION_DELETE) { + $(e).draggable(dragOptions); + } + }); + $('#fileList tr[data-type="dir"] td.filename').each(function(i,e){ + if ($(e).parent().data('permissions') & OC.PERMISSION_CREATE){ + $(e).droppable(folderDropOptions); + } + }); $('div.crumb:not(.last)').droppable(crumbDropOptions); $('ul#apps>li:first-child').data('dir',''); if($('div.crumb').length){ @@ -228,7 +236,14 @@ $(document).ready(function() { var size=t('files','Pending'); } if(files && !dirName){ - FileList.addFile(getUniqueName(files[i].name),size,date,true); + var uniqueName = getUniqueName(files[i].name); + if (uniqueName != files[i].name) { + FileList.checkName(uniqueName, files[i].name, true); + var hidden = true; + } else { + var hidden = false; + } + FileList.addFile(uniqueName,size,date,true,hidden); } else if(dirName) { var uploadtext = $('tr').filterAttr('data-type', 'dir').filterAttr('data-file', dirName).find('.uploadtext') var currentUploads = parseInt(uploadtext.attr('currentUploads')); @@ -247,7 +262,14 @@ $(document).ready(function() { } }else{ var filename=this.value.split('\\').pop(); //ie prepends C:\fakepath\ in front of the filename - FileList.addFile(getUniqueName(filename),'Pending',date,true); + var uniqueName = getUniqueName(filename); + if (uniqueName != filename) { + FileList.checkName(uniqueName, filename, true); + var hidden = true; + } else { + var hidden = false; + } + FileList.addFile(uniqueName,'Pending',date,true,hidden); } if($.support.xhrFileUpload) { for(var i=0;i 0) + return t('files','File upload is in progress. Leaving the page now will cancel the upload.'); + }); + //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') @@ -452,21 +489,27 @@ $(document).ready(function() { $(this).append(input); input.focus(); input.change(function(){ - var name=getUniqueName($(this).val()); - if(type != 'web' && name.indexOf('/')!=-1){ + if(type != 'web' && $(this).val().indexOf('/')!=-1){ $('#notification').text(t('files','Invalid name, \'/\' is not allowed.')); $('#notification').fadeIn(); return; } + var name = getUniqueName($(this).val()); + if (name != $(this).val()) { + FileList.checkName(name, $(this).val(), true); + var hidden = true; + } else { + var hidden = false; + } switch(type){ case 'file': $.post( OC.filePath('files','ajax','newfile.php'), - {dir:$('#dir').val(),filename:name,content:" \n"}, + {dir:$('#dir').val(),filename:name}, function(result){ if (result.status == 'success') { var date=new Date(); - FileList.addFile(name,0,date); + FileList.addFile(name,0,date,false,hidden); var tr=$('tr').filterAttr('data-file',name); tr.data('mime','text/plain'); getMimeIcon('text/plain',function(path){ @@ -485,7 +528,7 @@ $(document).ready(function() { function(result){ if (result.status == 'success') { var date=new Date(); - FileList.addDir(name,0,date); + FileList.addDir(name,0,date,hidden); } else { OC.dialogs.alert(result.data.message, 'Error'); } @@ -516,7 +559,7 @@ $(document).ready(function() { eventSource.listen('success',function(mime){ $('#uploadprogressbar').fadeOut(); var date=new Date(); - FileList.addFile(localName,0,date); + FileList.addFile(localName,0,date,false,hidden); var tr=$('tr').filterAttr('data-file',localName); tr.data('mime',mime); getMimeIcon(mime,function(path){ @@ -542,7 +585,7 @@ $(document).ready(function() { scanFiles(); } }, "json"); - + var lastWidth = 0; var breadcrumbs = []; var breadcrumbsWidth = $('#navigation').get(0).offsetWidth; @@ -603,7 +646,7 @@ $(document).ready(function() { $(window).resize(function() { resizeBreadcrumbs(false); }); - + resizeBreadcrumbs(true); }); diff --git a/apps/files/l10n/ca.php b/apps/files/l10n/ca.php index 81bbfe03a0..26c6ad4de6 100644 --- a/apps/files/l10n/ca.php +++ b/apps/files/l10n/ca.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "S'ha perdut un fitxer temporal", "Failed to write to disk" => "Ha fallat en escriure al disc", "Files" => "Fitxers", +"Unshare" => "Deixa de compartir", "Delete" => "Suprimeix", "already exists" => "ja existeix", "replace" => "substitueix", +"suggest name" => "sugereix un nom", "cancel" => "cancel·la", "replaced" => "substituït", -"with" => "per", "undo" => "desfés", +"with" => "per", +"unshared" => "No compartits", "deleted" => "esborrat", "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", "Pending" => "Pendents", "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 '/'.", "Size" => "Mida", "Modified" => "Modificat", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Activa la baixada ZIP", "0 is unlimited" => "0 és sense límit", "Maximum input size for ZIP files" => "Mida màxima d'entrada per fitxers ZIP", +"Save" => "Desa", "New" => "Nou", "Text file" => "Fitxer de text", "Folder" => "Carpeta", diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php index 4dc4b8b0cb..41ef4e7849 100644 --- a/apps/files/l10n/cs_CZ.php +++ b/apps/files/l10n/cs_CZ.php @@ -1,51 +1,56 @@ "Soubor byl odeslán úspěšně", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "Odeslaný soubor přesáhl velikostí parametr upload_max_filesize v php.ini", -"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Odeslaný soubor přesáhl velikostí parametr MAX_FILE_SIZE specifikovaný v HTML formuláři", +"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 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" => "Soubor nebyl odeslán", -"Missing a temporary folder" => "Chybí adresář pro sočasné soubory", -"Failed to write to disk" => "Zápis na disk se nezdařil", +"No file was uploaded" => "Žádný soubor nebyl odeslán", +"Missing a temporary folder" => "Chybí adresář pro dočasné soubory", +"Failed to write to disk" => "Zápis na disk selhal", "Files" => "Soubory", -"Delete" => "Vymazat", +"Unshare" => "Zrušit sdílení", +"Delete" => "Smazat", "already exists" => "již existuje", -"replace" => "zaměnit", -"cancel" => "storno", -"replaced" => "zaměněno", -"with" => "s", +"replace" => "nahradit", +"suggest name" => "navrhnout název", +"cancel" => "zrušit", +"replaced" => "nahrazeno", "undo" => "zpět", +"with" => "s", +"unshared" => "sdílení zrušeno", "deleted" => "smazáno", -"generating ZIP-file, it may take some time." => "generuji ZIP soubor, může to chvíli trvat", -"Unable to upload your file as it is a directory or has 0 bytes" => "Nemohu nahrát váš soubor neboť to je adresář a nebo má nulovou délku.", -"Upload Error" => "Chyba při nahrávání", -"Pending" => "Očekává se", -"Upload cancelled." => "Nahrávání zrušeno", -"Invalid name, '/' is not allowed." => "Špatné jméno, znak '/' není povolen", +"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í", +"Pending" => "Čekající", +"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", "Size" => "Velikost", "Modified" => "Změněno", -"folder" => "adresář", -"folders" => "adresáře", +"folder" => "složka", +"folders" => "složky", "file" => "soubor", "files" => "soubory", -"File handling" => "Nastavení chování k souborům", -"Maximum upload size" => "Maximální velikost ukládaných souborů", -"max. possible: " => "největší možná:", -"Needed for multi-file and folder downloads." => "Potřeba pro vícesoborvé stahování a stahování adresářů", +"File handling" => "Zacházení se soubory", +"Maximum upload size" => "Maximální velikost pro odesílání", +"max. possible: " => "největší možná: ", +"Needed for multi-file and folder downloads." => "Potřebné pro více-souborové stahování a stahování složek.", "Enable ZIP-download" => "Povolit ZIP-stahování", "0 is unlimited" => "0 znamená bez omezení", "Maximum input size for ZIP files" => "Maximální velikost vstupu pro ZIP soubory", +"Save" => "Uložit", "New" => "Nový", "Text file" => "Textový soubor", -"Folder" => "Adresář", +"Folder" => "Složka", "From url" => "Z url", -"Upload" => "Uložit", -"Cancel upload" => "Zrušit upload", -"Nothing in here. Upload something!" => "Žádný obsah. Uložte si něco!", +"Upload" => "Odeslat", +"Cancel upload" => "Zrušit odesílání", +"Nothing in here. Upload something!" => "Žádný obsah. Nahrajte něco.", "Name" => "Název", "Share" => "Sdílet", "Download" => "Stáhnout", -"Upload too large" => "Příliš velký soubor", -"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Soubory, které se snažíte uložit, překračují maximální velikosti uploadu na tomto serveru.", +"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.", "Files are being scanned, please wait." => "Soubory se prohledávají, prosím čekejte.", "Current scanning" => "Aktuální prohledávání" ); diff --git a/apps/files/l10n/da.php b/apps/files/l10n/da.php index 56af0fa61d..020f6142ec 100644 --- a/apps/files/l10n/da.php +++ b/apps/files/l10n/da.php @@ -12,14 +12,15 @@ "replace" => "erstat", "cancel" => "fortryd", "replaced" => "erstattet", -"with" => "med", "undo" => "fortryd", +"with" => "med", "deleted" => "Slettet", "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", "Pending" => "Afventer", "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.", "Size" => "Størrelse", "Modified" => "Ændret", diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index 5da3a99721..324fae16f0 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -1,26 +1,30 @@ "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 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 exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Die Größe der hochzuladenden Datei überschreitet die MAX_FILE_SIZE-Richtlinie, die im HTML-Formular angegeben wurde", "The uploaded file was only partially uploaded" => "Die Datei wurde nur teilweise hochgeladen.", "No file was uploaded" => "Es wurde keine Datei hochgeladen.", "Missing a temporary folder" => "Temporärer Ordner fehlt.", "Failed to write to disk" => "Fehler beim Schreiben auf die Festplatte", "Files" => "Dateien", +"Unshare" => "Nicht mehr teilen", "Delete" => "Löschen", "already exists" => "ist bereits vorhanden", "replace" => "ersetzen", +"suggest name" => "Name vorschlagen", "cancel" => "abbrechen", "replaced" => "ersetzt", -"with" => "mit", "undo" => "rückgängig machen", +"with" => "mit", +"unshared" => "Nicht mehr teilen", "deleted" => "gelöscht", "generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Ihre Datei kann nicht hochgeladen werden, da sie ein Verzeichnis ist oder 0 Bytes hat.", "Upload Error" => "Fehler beim Hochladen", "Pending" => "Ausstehend", "Upload cancelled." => "Hochladen abgebrochen.", -"Invalid name, '/' is not allowed." => "Ungültiger Name, \"/\" ist nicht erlaubt.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Dateiupload läuft. Wenn Sie die Seite jetzt verlassen, wird der Upload abgebrochen.", +"Invalid name, '/' is not allowed." => "Ungültiger Name: \"/\" ist nicht erlaubt.", "Size" => "Größe", "Modified" => "Bearbeitet", "folder" => "Ordner", @@ -30,10 +34,11 @@ "File handling" => "Dateibehandlung", "Maximum upload size" => "Maximale Upload-Größe", "max. possible: " => "maximal möglich:", -"Needed for multi-file and folder downloads." => "Für Mehrfachdateien- und Ordnerdownloads benötigt:", +"Needed for multi-file and folder downloads." => "Für Mehrfachdatei- und Ordnerdownloads benötigt:", "Enable ZIP-download" => "ZIP-Download aktivieren", "0 is unlimited" => "0 bedeutet unbegrenzt", -"Maximum input size for ZIP files" => "Maximale Größe für ZIP Dateien", +"Maximum input size for ZIP files" => "Maximale Größe für ZIP-Dateien", +"Save" => "Speichern", "New" => "Neu", "Text file" => "Textdatei", "Folder" => "Ordner", diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php index 3ab4b12094..9f311c6b28 100644 --- a/apps/files/l10n/el.php +++ b/apps/files/l10n/el.php @@ -12,8 +12,8 @@ "replace" => "αντικατέστησε", "cancel" => "ακύρωση", "replaced" => "αντικαταστάθηκε", -"with" => "με", "undo" => "αναίρεση", +"with" => "με", "deleted" => "διαγράφηκε", "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", diff --git a/apps/files/l10n/eo.php b/apps/files/l10n/eo.php index acaf06e830..95df1363ff 100644 --- a/apps/files/l10n/eo.php +++ b/apps/files/l10n/eo.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Mankas tempa dosierujo", "Failed to write to disk" => "Malsukcesis skribo al disko", "Files" => "Dosieroj", +"Unshare" => "Malkunhavigi", "Delete" => "Forigi", "already exists" => "jam ekzistas", "replace" => "anstataŭigi", +"suggest name" => "sugesti nomon", "cancel" => "nuligi", "replaced" => "anstataŭigita", -"with" => "kun", "undo" => "malfari", +"with" => "kun", +"unshared" => "malkunhavigita", "deleted" => "forigita", "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", "Pending" => "Traktotaj", "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.", "Size" => "Grando", "Modified" => "Modifita", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Kapabligi ZIP-elŝuton", "0 is unlimited" => "0 signifas senlime", "Maximum input size for ZIP files" => "Maksimuma enirgrando por ZIP-dosieroj", +"Save" => "Konservi", "New" => "Nova", "Text file" => "Tekstodosiero", "Folder" => "Dosierujo", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 6cd51d60e2..d07149d859 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Falta un directorio temporal", "Failed to write to disk" => "La escritura en disco ha fallado", "Files" => "Archivos", +"Unshare" => "Dejar de compartir", "Delete" => "Eliminado", "already exists" => "ya existe", "replace" => "reemplazar", +"suggest name" => "sugerir nombre", "cancel" => "cancelar", "replaced" => "reemplazado", -"with" => "con", "undo" => "deshacer", +"with" => "con", +"unshared" => "no compartido", "deleted" => "borrado", "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", "Pending" => "Pendiente", "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.", "Size" => "Tamaño", "Modified" => "Modificado", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Habilitar descarga en ZIP", "0 is unlimited" => "0 es ilimitado", "Maximum input size for ZIP files" => "Tamaño máximo para archivos ZIP de entrada", +"Save" => "Guardar", "New" => "Nuevo", "Text file" => "Archivo de texto", "Folder" => "Carpeta", diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php index 956c5cc911..88e9171928 100644 --- a/apps/files/l10n/et_EE.php +++ b/apps/files/l10n/et_EE.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Ajutiste failide kaust puudub", "Failed to write to disk" => "Kettale kirjutamine ebaõnnestus", "Files" => "Failid", +"Unshare" => "Lõpeta jagamine", "Delete" => "Kustuta", "already exists" => "on juba olemas", "replace" => "asenda", +"suggest name" => "soovita nime", "cancel" => "loobu", "replaced" => "asendatud", -"with" => "millega", "undo" => "tagasi", +"with" => "millega", +"unshared" => "jagamata", "deleted" => "kustutatud", "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", "Pending" => "Ootel", "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.", "Size" => "Suurus", "Modified" => "Muudetud", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Luba ZIP-ina allalaadimine", "0 is unlimited" => "0 tähendab piiramatut", "Maximum input size for ZIP files" => "Maksimaalne ZIP-faili sisestatava faili suurus", +"Save" => "Salvesta", "New" => "Uus", "Text file" => "Tekstifail", "Folder" => "Kaust", diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php index d9c2689d1c..d72e73adf0 100644 --- a/apps/files/l10n/eu.php +++ b/apps/files/l10n/eu.php @@ -7,19 +7,23 @@ "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", "Delete" => "Ezabatu", "already exists" => "dagoeneko existitzen da", "replace" => "ordeztu", +"suggest name" => "aholkatu izena", "cancel" => "ezeztatu", "replaced" => "ordeztua", -"with" => "honekin", "undo" => "desegin", +"with" => "honekin", +"unshared" => "Ez partekatuta", "deleted" => "ezabatuta", "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", "Pending" => "Zain", "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. ", "Size" => "Tamaina", "Modified" => "Aldatuta", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Gaitu ZIP-deskarga", "0 is unlimited" => "0 mugarik gabe esan nahi du", "Maximum input size for ZIP files" => "ZIP fitxategien gehienezko tamaina", +"Save" => "Gorde", "New" => "Berria", "Text file" => "Testu fitxategia", "Folder" => "Karpeta", diff --git a/apps/files/l10n/fa.php b/apps/files/l10n/fa.php index 4dac88fc54..e6ddd50f91 100644 --- a/apps/files/l10n/fa.php +++ b/apps/files/l10n/fa.php @@ -12,8 +12,8 @@ "replace" => "جایگزین", "cancel" => "لغو", "replaced" => "جایگزین‌شده", -"with" => "همراه", "undo" => "بازگشت", +"with" => "همراه", "deleted" => "حذف شده", "generating ZIP-file, it may take some time." => "در حال ساخت فایل فشرده ممکن است زمان زیادی به طول بیانجامد", "Unable to upload your file as it is a directory or has 0 bytes" => "ناتوان در بارگذاری یا فایل یک پوشه است یا 0بایت دارد", diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php index 902ea859a3..757d0594d3 100644 --- a/apps/files/l10n/fi_FI.php +++ b/apps/files/l10n/fi_FI.php @@ -10,16 +10,18 @@ "Delete" => "Poista", "already exists" => "on jo olemassa", "replace" => "korvaa", +"suggest name" => "ehdota nimeä", "cancel" => "peru", "replaced" => "korvattu", -"with" => "käyttäen", "undo" => "kumoa", +"with" => "käyttäen", "deleted" => "poistettu", "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.", "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.", "Size" => "Koko", "Modified" => "Muutettu", @@ -34,6 +36,7 @@ "Enable ZIP-download" => "Ota ZIP-paketin lataaminen käytöön", "0 is unlimited" => "0 on rajoittamaton", "Maximum input size for ZIP files" => "ZIP-tiedostojen enimmäiskoko", +"Save" => "Tallenna", "New" => "Uusi", "Text file" => "Tekstitiedosto", "Folder" => "Kansio", @@ -46,5 +49,6 @@ "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.", -"Files are being scanned, please wait." => "Tiedostoja tarkistetaan, odota hetki." +"Files are being scanned, please wait." => "Tiedostoja tarkistetaan, odota hetki.", +"Current scanning" => "Tämänhetkinen tutkinta" ); diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index 6eb4341bd6..929a2ffd4a 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -10,16 +10,19 @@ "Delete" => "Supprimer", "already exists" => "existe déjà", "replace" => "remplacer", +"suggest name" => "Suggérer un nom", "cancel" => "annuler", "replaced" => "remplacé", -"with" => "avec", "undo" => "annuler", +"with" => "avec", +"unshared" => "non partagée", "deleted" => "supprimé", -"generating ZIP-file, it may take some time." => "Générer un fichier ZIP, cela peut prendre du temps", +"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", "Pending" => "En cours", -"Upload cancelled." => "Chargement annulé", +"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é.", "Size" => "Taille", "Modified" => "Modifié", @@ -34,18 +37,19 @@ "Enable ZIP-download" => "Activer le téléchargement ZIP", "0 is unlimited" => "0 est illimité", "Maximum input size for ZIP files" => "Taille maximale pour les fichiers ZIP", +"Save" => "Sauvegarder", "New" => "Nouveau", "Text file" => "Fichier texte", "Folder" => "Dossier", "From url" => "Depuis URL", "Upload" => "Envoyer", -"Cancel upload" => "Annuler envoi", +"Cancel upload" => "Annuler l'envoi", "Nothing in here. Upload something!" => "Il n'y a rien ici ! Envoyez donc quelque chose :)", "Name" => "Nom", "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.", -"Files are being scanned, please wait." => "Les fichiers sont analysés, patientez svp.", +"Files are being scanned, please wait." => "Les fichiers sont en cours d'analyse, veuillez patienter.", "Current scanning" => "Analyse en cours" ); diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index 3a36a23f0c..67293de5cb 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -12,8 +12,8 @@ "replace" => "substituír", "cancel" => "cancelar", "replaced" => "substituído", -"with" => "con", "undo" => "desfacer", +"with" => "con", "deleted" => "eliminado", "generating ZIP-file, it may take some time." => "xerando ficheiro ZIP, 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", diff --git a/apps/files/l10n/hr.php b/apps/files/l10n/hr.php index cb8eb4033c..b05b7c568b 100644 --- a/apps/files/l10n/hr.php +++ b/apps/files/l10n/hr.php @@ -12,8 +12,8 @@ "replace" => "zamjeni", "cancel" => "odustani", "replaced" => "zamjenjeno", -"with" => "sa", "undo" => "vrati", +"with" => "sa", "deleted" => "izbrisano", "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", diff --git a/apps/files/l10n/hu_HU.php b/apps/files/l10n/hu_HU.php index 8d52765e93..95b3c57ce1 100644 --- a/apps/files/l10n/hu_HU.php +++ b/apps/files/l10n/hu_HU.php @@ -12,8 +12,8 @@ "replace" => "cserél", "cancel" => "mégse", "replaced" => "kicserélve", -"with" => "-val/-vel", "undo" => "visszavon", +"with" => "-val/-vel", "deleted" => "törölve", "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ű", diff --git a/apps/files/l10n/id.php b/apps/files/l10n/id.php index 47ce6429c9..351d064138 100644 --- a/apps/files/l10n/id.php +++ b/apps/files/l10n/id.php @@ -1,13 +1,32 @@ "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", "Delete" => "Hapus", +"already exists" => "sudah ada", +"replace" => "mengganti", +"cancel" => "batalkan", +"replaced" => "diganti", +"undo" => "batal dikerjakan", +"with" => "dengan", +"deleted" => "dihapus", +"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", +"Pending" => "Menunggu", +"Upload cancelled." => "Pengunggahan dibatalkan.", +"Invalid name, '/' is not allowed." => "Kesalahan nama, '/' tidak diijinkan.", "Size" => "Ukuran", "Modified" => "Dimodifikasi", +"folder" => "folder", +"folders" => "folder-folder", +"file" => "berkas", +"files" => "berkas-berkas", "File handling" => "Penanganan berkas", "Maximum upload size" => "Ukuran unggah maksimum", "max. possible: " => "Kemungkinan maks:", diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php index 6fda30a8f3..c7046118a3 100644 --- a/apps/files/l10n/it.php +++ b/apps/files/l10n/it.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Cartella temporanea mancante", "Failed to write to disk" => "Scrittura su disco non riuscita", "Files" => "File", +"Unshare" => "Rimuovi condivisione", "Delete" => "Elimina", "already exists" => "esiste già", "replace" => "sostituisci", +"suggest name" => "suggerisci nome", "cancel" => "annulla", "replaced" => "sostituito", -"with" => "con", "undo" => "annulla", +"with" => "con", +"unshared" => "condivisione rimossa", "deleted" => "eliminati", "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", "Pending" => "In corso", "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", "Size" => "Dimensione", "Modified" => "Modificato", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Abilita scaricamento ZIP", "0 is unlimited" => "0 è illimitato", "Maximum input size for ZIP files" => "Dimensione massima per i file ZIP", +"Save" => "Salva", "New" => "Nuovo", "Text file" => "File di testo", "Folder" => "Cartella", diff --git a/apps/files/l10n/ja_JP.php b/apps/files/l10n/ja_JP.php index 8c19e45501..6d278c3f0f 100644 --- a/apps/files/l10n/ja_JP.php +++ b/apps/files/l10n/ja_JP.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "テンポラリフォルダが見つかりません", "Failed to write to disk" => "ディスクへの書き込みに失敗しました", "Files" => "ファイル", +"Unshare" => "共有しない", "Delete" => "削除", "already exists" => "既に存在します", "replace" => "置き換え", +"suggest name" => "推奨名称", "cancel" => "キャンセル", "replaced" => "置換:", -"with" => "←", "undo" => "元に戻す", +"with" => "←", +"unshared" => "未共有", "deleted" => "削除", "generating ZIP-file, it may take some time." => "ZIPファイルを生成中です、しばらくお待ちください。", "Unable to upload your file as it is a directory or has 0 bytes" => "アップロード使用としているファイルがディレクトリ、もしくはサイズが0バイトのため、アップロードできません。", "Upload Error" => "アップロードエラー", "Pending" => "保留", "Upload cancelled." => "アップロードはキャンセルされました。", +"File upload is in progress. Leaving the page now will cancel the upload." => "ファイル転送を実行中です。今このページから移動するとアップロードが中止されます。", "Invalid name, '/' is not allowed." => "無効な名前、'/' は使用できません。", "Size" => "サイズ", "Modified" => "更新日時", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "ZIP形式のダウンロードを有効にする", "0 is unlimited" => "0を指定した場合は無制限", "Maximum input size for ZIP files" => "ZIPファイルへの最大入力サイズ", +"Save" => "保存", "New" => "新規", "Text file" => "テキストファイル", "Folder" => "フォルダ", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index 218dd0ea2d..121be7d1ab 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -8,7 +8,15 @@ "Failed to write to disk" => "디스크에 쓰지 못했습니다", "Files" => "파일", "Delete" => "삭제", +"already exists" => "이미 존재 합니다", +"replace" => "대체", +"cancel" => "취소", +"replaced" => "대체됨", +"undo" => "복구", +"with" => "와", +"deleted" => "삭제", "generating ZIP-file, it may take some time." => "ZIP파일 생성에 시간이 걸릴 수 있습니다.", +"Unable to upload your file as it is a directory or has 0 bytes" => "이 파일은 디렉토리이거나 0 바이트이기 때문에 업로드 할 수 없습니다.", "Upload Error" => "업로드 에러", "Pending" => "보류 중", "Upload cancelled." => "업로드 취소.", diff --git a/apps/files/l10n/lb.php b/apps/files/l10n/lb.php index f7a10fbc5c..92acea1d11 100644 --- a/apps/files/l10n/lb.php +++ b/apps/files/l10n/lb.php @@ -8,8 +8,25 @@ "Failed to write to disk" => "Konnt net op den Disk schreiwen", "Files" => "Dateien", "Delete" => "Läschen", +"already exists" => "existéiert schonn", +"replace" => "ersetzen", +"cancel" => "ofbriechen", +"replaced" => "ersat", +"undo" => "réckgängeg man", +"with" => "mat", +"deleted" => "geläscht", +"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", +"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.", "Size" => "Gréisst", "Modified" => "Geännert", +"folder" => "Dossier", +"folders" => "Dossieren", +"file" => "Datei", +"files" => "Dateien", "File handling" => "Fichier handling", "Maximum upload size" => "Maximum Upload Gréisst ", "max. possible: " => "max. méiglech:", diff --git a/apps/files/l10n/lv.php b/apps/files/l10n/lv.php index 54bd79f552..eedab2546c 100644 --- a/apps/files/l10n/lv.php +++ b/apps/files/l10n/lv.php @@ -1,6 +1,17 @@ "Neviens fails netika augšuplādēts", +"Failed to write to disk" => "Nav iespējams saglabāt", "Files" => "Faili", "Delete" => "Izdzēst", +"already exists" => "tāds fails jau eksistē", +"replace" => "aizvietot", +"cancel" => "atcelt", +"replaced" => "aizvietots", +"undo" => "vienu soli atpakaļ", +"with" => "ar", +"deleted" => "izdzests", +"generating ZIP-file, it may take some time." => "lai uzģenerētu ZIP failu, kāds brīdis ir jāpagaida", +"Unable to upload your file as it is a directory or has 0 bytes" => "Nav iespējams augšuplādēt jūsu failu, jo tāds jau eksistē vai arī failam nav izmēra (0 baiti)", "Upload Error" => "Augšuplādēšanas laikā radās kļūda", "Pending" => "Gaida savu kārtu", "Upload cancelled." => "Augšuplāde ir atcelta", @@ -12,9 +23,20 @@ "file" => "fails", "files" => "faili", "Maximum upload size" => "Maksimālais failu augšuplādes apjoms", +"max. possible: " => "maksīmālais iespējamais:", +"Enable ZIP-download" => "Iespējot ZIP lejuplādi", +"0 is unlimited" => "0 ir neierobežots", +"New" => "Jauns", +"Text file" => "Teksta fails", +"Folder" => "Mape", +"From url" => "No URL saites", "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", "Name" => "Nosaukums", +"Share" => "Līdzdalīt", "Download" => "Lejuplādēt", -"Upload too large" => "Fails ir par lielu lai to augšuplādetu" +"Upload too large" => "Fails ir par lielu lai to augšuplādetu", +"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/nb_NO.php b/apps/files/l10n/nb_NO.php index 92d0c23bfd..6331de6d45 100644 --- a/apps/files/l10n/nb_NO.php +++ b/apps/files/l10n/nb_NO.php @@ -12,8 +12,8 @@ "replace" => "erstatt", "cancel" => "avbryt", "replaced" => "erstattet", -"with" => "med", "undo" => "angre", +"with" => "med", "deleted" => "slettet", "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", @@ -34,6 +34,7 @@ "Enable ZIP-download" => "Aktiver nedlasting av ZIP", "0 is unlimited" => "0 er ubegrenset", "Maximum input size for ZIP files" => "Maksimal størrelse på ZIP-filer", +"Save" => "Lagre", "New" => "Ny", "Text file" => "Tekstfil", "Folder" => "Mappe", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index fb7ea34b9b..b54c96bd9a 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Een tijdelijke map mist", "Failed to write to disk" => "Schrijven naar schijf mislukt", "Files" => "Bestanden", +"Unshare" => "Stop delen", "Delete" => "Verwijder", "already exists" => "bestaat al", "replace" => "vervang", +"suggest name" => "Stel een naam voor", "cancel" => "annuleren", "replaced" => "vervangen", -"with" => "door", "undo" => "ongedaan maken", +"with" => "door", +"unshared" => "niet gedeeld", "deleted" => "verwijderd", "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", "Pending" => "Wachten", "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.", "Size" => "Bestandsgrootte", "Modified" => "Laatst aangepast", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Zet ZIP-download aan", "0 is unlimited" => "0 is ongelimiteerd", "Maximum input size for ZIP files" => "Maximale grootte voor ZIP bestanden", +"Save" => "Opslaan", "New" => "Nieuw", "Text file" => "Tekstbestand", "Folder" => "Map", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index eb791330bf..d3814333ac 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -10,16 +10,18 @@ "Delete" => "Usuwa element", "already exists" => "Już istnieje", "replace" => "zastap", +"suggest name" => "zasugeruj nazwę", "cancel" => "anuluj", "replaced" => "zastąpione", -"with" => "z", "undo" => "wróć", +"with" => "z", "deleted" => "skasuj", "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", "Pending" => "Oczekujące", "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.", "Size" => "Rozmiar", "Modified" => "Czas modyfikacji", @@ -34,6 +36,7 @@ "Enable ZIP-download" => "Włącz pobieranie ZIP-paczki", "0 is unlimited" => "0 jest nielimitowane", "Maximum input size for ZIP files" => "Maksymalna wielkość pliku wejściowego ZIP ", +"Save" => "Zapisz", "New" => "Nowy", "Text file" => "Plik tekstowy", "Folder" => "Katalog", diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php index 09c4f2b026..e9fe7747c1 100644 --- a/apps/files/l10n/pt_BR.php +++ b/apps/files/l10n/pt_BR.php @@ -12,8 +12,8 @@ "replace" => "substituir", "cancel" => "cancelar", "replaced" => "substituido ", -"with" => "com", "undo" => "desfazer", +"with" => "com", "deleted" => "deletado", "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.", diff --git a/apps/files/l10n/pt_PT.php b/apps/files/l10n/pt_PT.php index e413d7cbe7..998c494a69 100644 --- a/apps/files/l10n/pt_PT.php +++ b/apps/files/l10n/pt_PT.php @@ -12,8 +12,8 @@ "replace" => "substituir", "cancel" => "cancelar", "replaced" => "substituido", -"with" => "com", "undo" => "desfazer", +"with" => "com", "deleted" => "apagado", "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 é possivel fazer o upload do ficheiro devido a ser uma pasta ou ter 0 bytes", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index 71b30d22df..61091790af 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Невозможно найти временную папку", "Failed to write to disk" => "Ошибка записи на диск", "Files" => "Файлы", +"Unshare" => "Отменить публикацию", "Delete" => "Удалить", "already exists" => "уже существует", "replace" => "заменить", +"suggest name" => "предложить название", "cancel" => "отмена", "replaced" => "заменён", -"with" => "с", "undo" => "отмена", +"with" => "с", +"unshared" => "публикация отменена", "deleted" => "удален", "generating ZIP-file, it may take some time." => "создание ZIP-файла, это может занять некоторое время.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не удается загрузить файл размером 0 байт в каталог", "Upload Error" => "Ошибка загрузки", "Pending" => "Ожидание", "Upload cancelled." => "Загрузка отменена.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Файл в процессе загрузки. Покинув страницу вы прервёте загрузку.", "Invalid name, '/' is not allowed." => "Неверное имя, '/' не допускается.", "Size" => "Размер", "Modified" => "Изменён", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Включить ZIP-скачивание", "0 is unlimited" => "0 - без ограничений", "Maximum input size for ZIP files" => "Максимальный исходный размер для ZIP файлов", +"Save" => "Сохранить", "New" => "Новый", "Text file" => "Текстовый файл", "Folder" => "Папка", diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php index f6322b2507..1a7ae8c0b1 100644 --- a/apps/files/l10n/sl.php +++ b/apps/files/l10n/sl.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Manjka začasna mapa", "Failed to write to disk" => "Pisanje na disk je spodletelo", "Files" => "Datoteke", +"Unshare" => "Odstrani iz souporabe", "Delete" => "Izbriši", "already exists" => "že obstaja", "replace" => "nadomesti", +"suggest name" => "predlagaj ime", "cancel" => "ekliči", "replaced" => "nadomeščen", -"with" => "z", "undo" => "razveljavi", +"with" => "z", +"unshared" => "odstranjeno iz souporabe", "deleted" => "izbrisano", "generating ZIP-file, it may take some time." => "Ustvarjam ZIP datoteko. To lahko traja nekaj časa.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nalaganje ni mogoče, saj gre za mapo, ali pa ima datoteka velikost 0 bajtov.", "Upload Error" => "Napaka pri nalaganju", "Pending" => "Na čakanju", "Upload cancelled." => "Nalaganje je bilo preklicano.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Nalaganje datoteke je v teku. Če zapustite to stran zdaj, boste nalaganje preklicali.", "Invalid name, '/' is not allowed." => "Neveljavno ime. Znak '/' ni dovoljen.", "Size" => "Velikost", "Modified" => "Spremenjeno", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Omogoči ZIP-prejemanje", "0 is unlimited" => "0 je neskončno", "Maximum input size for ZIP files" => "Največja vhodna velikost za ZIP datoteke", +"Save" => "Shrani", "New" => "Nova", "Text file" => "Besedilna datoteka", "Folder" => "Mapa", diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php index a62b752251..06d988d451 100644 --- a/apps/files/l10n/sv.php +++ b/apps/files/l10n/sv.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "Saknar en tillfällig mapp", "Failed to write to disk" => "Misslyckades spara till disk", "Files" => "Filer", +"Unshare" => "Sluta dela", "Delete" => "Radera", "already exists" => "finns redan", "replace" => "ersätt", +"suggest name" => "föreslå namn", "cancel" => "avbryt", "replaced" => "ersatt", -"with" => "med", "undo" => "ångra", +"with" => "med", +"unshared" => "Ej delad", "deleted" => "raderad", "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", "Pending" => "Väntar", "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.", "Size" => "Storlek", "Modified" => "Ändrad", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "Aktivera ZIP-nerladdning", "0 is unlimited" => "0 är oändligt", "Maximum input size for ZIP files" => "Största tillåtna storlek för ZIP-filer", +"Save" => "Spara", "New" => "Ny", "Text file" => "Textfil", "Folder" => "Mapp", diff --git a/apps/files/l10n/th_TH.php b/apps/files/l10n/th_TH.php index eed9c36e13..2208051236 100644 --- a/apps/files/l10n/th_TH.php +++ b/apps/files/l10n/th_TH.php @@ -7,19 +7,23 @@ "Missing a temporary folder" => "แฟ้มเอกสารชั่วคราวเกิดการสูญหาย", "Failed to write to disk" => "เขียนข้อมูลลงแผ่นดิสก์ล้มเหลว", "Files" => "ไฟล์", +"Unshare" => "ยกเลิกการแชร์ข้อมูล", "Delete" => "ลบ", "already exists" => "มีอยู่แล้ว", "replace" => "แทนที่", +"suggest name" => "แนะนำชื่อ", "cancel" => "ยกเลิก", "replaced" => "แทนที่แล้ว", -"with" => "กับ", "undo" => "เลิกทำ", +"with" => "กับ", +"unshared" => "ยกเลิกการแชร์ข้อมูลแล้ว", "deleted" => "ลบแล้ว", "generating ZIP-file, it may take some time." => "กำลังสร้างไฟล์บีบอัด ZIP อาจใช้เวลาสักครู่", "Unable to upload your file as it is a directory or has 0 bytes" => "ไม่สามารถอัพโหลดไฟล์ของคุณได้ เนื่องจากไฟล์ดังกล่าวเป็นไดเร็กทอรี่หรือมีขนาด 0 ไบต์", "Upload Error" => "เกิดข้อผิดพลาดในการอัพโหลด", "Pending" => "อยู่ระหว่างดำเนินการ", "Upload cancelled." => "การอัพโหลดถูกยกเลิก", +"File upload is in progress. Leaving the page now will cancel the upload." => "การอัพโหลดไฟล์กำลังอยู่ในระหว่างดำเนินการ การออกจากหน้าเว็บนี้จะทำให้การอัพโหลดถูกยกเลิก", "Invalid name, '/' is not allowed." => "ชื่อที่ใช้ไม่ถูกต้อง '/' ไม่อนุญาตให้ใช้งาน", "Size" => "ขนาด", "Modified" => "ปรับปรุงล่าสุด", @@ -34,6 +38,7 @@ "Enable ZIP-download" => "อนุญาตให้ดาวน์โหลดเป็นไฟล์ ZIP ได้", "0 is unlimited" => "0 หมายถึงไม่จำกัด", "Maximum input size for ZIP files" => "ขนาดไฟล์ ZIP สูงสุด", +"Save" => "บันทึก", "New" => "อัพโหลดไฟล์ใหม่", "Text file" => "ไฟล์ข้อความ", "Folder" => "แฟ้มเอกสาร", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index 224322b24e..72e0e1427d 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -8,13 +8,19 @@ "Failed to write to disk" => "Diske yazılamadı", "Files" => "Dosyalar", "Delete" => "Sil", +"already exists" => "zaten mevcut", +"replace" => "değiştir", +"cancel" => "iptal", +"replaced" => "değiştirildi", "undo" => "geri al", +"with" => "ile", "deleted" => "silindi", "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ı", "Pending" => "Bekliyor", "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.", "Size" => "Boyut", "Modified" => "Değiştirilme", diff --git a/apps/files/l10n/vi.php b/apps/files/l10n/vi.php index c2284d5feb..ce7e0c219a 100644 --- a/apps/files/l10n/vi.php +++ b/apps/files/l10n/vi.php @@ -1,9 +1,28 @@ "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", "Files" => "Tập tin", +"Unshare" => "Không chia sẽ", "Delete" => "Xóa", +"already exists" => "đã tồn tại", +"replace" => "thay thế", +"suggest name" => "tên gợi ý", +"cancel" => "hủy", +"replaced" => "đã được thay thế", +"undo" => "lùi lại", +"with" => "với", +"deleted" => "đã xóa", +"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", +"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", "Pending" => "Chờ", "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 '/'", "Size" => "Kích cỡ", "Modified" => "Thay đổi", @@ -13,9 +32,11 @@ "files" => "files", "File handling" => "Xử lý tập tin", "Maximum upload size" => "Kích thước tối đa ", +"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", "Maximum input size for ZIP files" => "Kích thước tối đa cho các tập tin ZIP", +"Save" => "Lưu", "New" => "Mới", "Text file" => "Tập tin văn bản", "Folder" => "Folder", @@ -27,5 +48,7 @@ "Share" => "Chia sẻ", "Download" => "Tải xuống", "Upload too large" => "File tải lên quá lớn", -"Files are being scanned, please wait." => "Tập tin đang được quét ,vui lòng chờ." +"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.", +"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 6703e6f908..42063712ea 100644 --- a/apps/files/l10n/zh_CN.GB2312.php +++ b/apps/files/l10n/zh_CN.GB2312.php @@ -12,8 +12,8 @@ "replace" => "替换", "cancel" => "取消", "replaced" => "替换过了", -"with" => "随着", "undo" => "撤销", +"with" => "随着", "deleted" => "删除", "generating ZIP-file, it may take some time." => "正在生成ZIP文件,这可能需要点时间", "Unable to upload your file as it is a directory or has 0 bytes" => "不能上传你指定的文件,可能因为它是个文件夹或者大小为0", diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php index dc78301884..3fdb5b6af3 100644 --- a/apps/files/l10n/zh_CN.php +++ b/apps/files/l10n/zh_CN.php @@ -10,16 +10,18 @@ "Delete" => "删除", "already exists" => "已经存在", "replace" => "替换", +"suggest name" => "建议名称", "cancel" => "取消", "replaced" => "已经替换", -"with" => "随着", "undo" => "撤销", +"with" => "随着", "deleted" => "已经删除", "generating ZIP-file, it may take some time." => "正在生成 ZIP 文件,可能需要一些时间", "Unable to upload your file as it is a directory or has 0 bytes" => "无法上传文件,因为它是一个目录或者大小为 0 字节", "Upload Error" => "上传错误", "Pending" => "操作等待中", "Upload cancelled." => "上传已取消", +"File upload is in progress. Leaving the page now will cancel the upload." => "文件正在上传中。现在离开此页会导致上传动作被取消。", "Invalid name, '/' is not allowed." => "非法的名称,不允许使用‘/’。", "Size" => "大小", "Modified" => "修改日期", @@ -34,6 +36,7 @@ "Enable ZIP-download" => "启用 ZIP 下载", "0 is unlimited" => "0 为无限制", "Maximum input size for ZIP files" => "ZIP 文件的最大输入大小", +"Save" => "保存", "New" => "新建", "Text file" => "文本文件", "Folder" => "文件夹", diff --git a/apps/files/l10n/zh_TW.php b/apps/files/l10n/zh_TW.php index bc8aa4ff89..9652fb5a07 100644 --- a/apps/files/l10n/zh_TW.php +++ b/apps/files/l10n/zh_TW.php @@ -8,6 +8,15 @@ "Failed to write to disk" => "寫入硬碟失敗", "Files" => "檔案", "Delete" => "刪除", +"already exists" => "已經存在", +"replace" => "取代", +"cancel" => "取消", +"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" => "上傳發生錯誤", +"Upload cancelled." => "上傳取消", +"File upload is in progress. Leaving the page now will cancel the upload." => "檔案上傳中. 離開此頁面將會取消上傳.", +"Invalid name, '/' is not allowed." => "無效的名稱, '/'是不被允許的", "Size" => "大小", "Modified" => "修改", "File handling" => "檔案處理", diff --git a/apps/files/settings.php b/apps/files/settings.php index cd6dd8c161..52ec9fd0fe 100644 --- a/apps/files/settings.php +++ b/apps/files/settings.php @@ -23,7 +23,7 @@ // Init owncloud - + // Check if we are a user OCP\User::checkLoggedIn(); @@ -36,7 +36,7 @@ OCP\Util::addscript( "files", "files" ); $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; $files = array(); -foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ +foreach( OC_Files::getdirectorycontent( $dir ) as $i ) { $i["date"] = date( $CONFIG_DATEFORMAT, $i["mtime"] ); $files[] = $i; } @@ -44,8 +44,8 @@ foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ // Make breadcrumb $breadcrumb = array(); $pathtohere = "/"; -foreach( explode( "/", $dir ) as $i ){ - if( $i != "" ){ +foreach( explode( "/", $dir ) as $i ) { + if( $i != "" ) { $pathtohere .= "$i/"; $breadcrumb[] = array( "dir" => $pathtohere, "name" => $i ); } diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php index 23021ec664..c4fe4c8656 100644 --- a/apps/files/templates/admin.php +++ b/apps/files/templates/admin.php @@ -11,9 +11,6 @@ ' title="t( '0 is unlimited' ); ?>" />
- + - - - diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index bcf683ae4a..911a312fb9 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -32,6 +32,7 @@ +
@@ -53,7 +54,17 @@ t( 'Size' ); ?> - t( 'Modified' ); ?>t('Delete')?> <?php echo $l->t('Delete')?>" /> + + t( 'Modified' ); ?> + + + + t('Unshare')?> <?php echo $l->t('Unshare')?>" /> + + t('Delete')?> <?php echo $l->t('Delete')?>" /> + + + diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index 22d9bb4490..875fc747bb 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,6 +1,6 @@
svg" data-dir='' style='background-image:url("")'> - "> + ">
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index 679d0b95ed..bb130a366b 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -10,7 +10,7 @@ OCP\Util::connectHook('OC_User','post_login','OC_Crypt','loginListener'); 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) +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) OCP\User::logout(); header("Location: ".OC::$WEBROOT.'/'); exit(); diff --git a/apps/files_encryption/js/settings.js b/apps/files_encryption/js/settings.js index 8cc433246c..6fc70eba7f 100644 --- a/apps/files_encryption/js/settings.js +++ b/apps/files_encryption/js/settings.js @@ -11,7 +11,7 @@ $(document).ready(function(){ onuncheck:blackListChange, createText:'...', }); - + function blackListChange(){ var blackList=$('#encryption_blacklist').val().join(','); OC.AppConfig.setValue('files_encryption','type_blacklist',blackList); @@ -20,5 +20,5 @@ $(document).ready(function(){ $('#enable_encryption').change(function(){ var checked=$('#enable_encryption').is(':checked'); OC.AppConfig.setValue('files_encryption','enable_encryption',(checked)?'true':'false'); - }) -}) \ No newline at end of file + }); +}); diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php index 15cf770570..9be2be9809 100644 --- a/apps/files_encryption/l10n/cs_CZ.php +++ b/apps/files_encryption/l10n/cs_CZ.php @@ -1,6 +1,6 @@ "Kryptování", -"Exclude the following file types from encryption" => "Při kryptování vynechat následující typy souborů", -"None" => "Žádný", -"Enable Encryption" => "Povolit kryptování" +"Encryption" => "Šifrování", +"Exclude the following file types from encryption" => "Při šifrování vynechat následující typy souborů", +"None" => "Žádné", +"Enable Encryption" => "Povolit šifrování" ); diff --git a/apps/files_encryption/l10n/sk_SK.php b/apps/files_encryption/l10n/sk_SK.php new file mode 100644 index 0000000000..598f1294f6 --- /dev/null +++ b/apps/files_encryption/l10n/sk_SK.php @@ -0,0 +1,6 @@ + "Šifrovanie", +"Exclude the following file types from encryption" => "Vynechať nasledujúce súbory pri šifrovaní", +"None" => "Žiadne", +"Enable Encryption" => "Zapnúť šifrovanie" +); diff --git a/apps/files_encryption/l10n/vi.php b/apps/files_encryption/l10n/vi.php new file mode 100644 index 0000000000..cabf2da7dc --- /dev/null +++ b/apps/files_encryption/l10n/vi.php @@ -0,0 +1,6 @@ + "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", +"Enable Encryption" => "BẬT mã hóa" +); diff --git a/apps/files_encryption/l10n/zh_CN.php b/apps/files_encryption/l10n/zh_CN.php new file mode 100644 index 0000000000..1e1247d15f --- /dev/null +++ b/apps/files_encryption/l10n/zh_CN.php @@ -0,0 +1,6 @@ + "加密", +"Exclude the following file types from encryption" => "从加密中排除列出的文件类型", +"None" => "None", +"Enable Encryption" => "开启加密" +); diff --git a/apps/files_encryption/l10n/zh_TW.php b/apps/files_encryption/l10n/zh_TW.php new file mode 100644 index 0000000000..4c62130cf4 --- /dev/null +++ b/apps/files_encryption/l10n/zh_TW.php @@ -0,0 +1,6 @@ + "加密", +"Exclude the following file types from encryption" => "下列的檔案類型不加密", +"None" => "無", +"Enable Encryption" => "啟用加密" +); diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 849e88ee0b..38d8edf28c 100644 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -31,7 +31,7 @@ // - IMPORTANT! Check if the block lenght of the encrypted data stays the same -require_once('Crypt_Blowfish/Blowfish.php'); +require_once 'Crypt_Blowfish/Blowfish.php'; /** * This class is for crypting and decrypting @@ -39,18 +39,18 @@ require_once('Crypt_Blowfish/Blowfish.php'); class OC_Crypt { static private $bf = null; - public static function loginListener($params){ + public static function loginListener($params) { self::init($params['uid'],$params['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'); @@ -66,14 +66,14 @@ class OC_Crypt { * * if the key is left out, the default handeler will be used */ - public static function getBlowfish($key=''){ - if($key){ + public static function getBlowfish($key='') { + if($key) { return new Crypt_Blowfish($key); }else{ - if(!isset($_SESSION['enckey'])){ + if(!isset($_SESSION['enckey'])) { return false; } - if(!self::$bf){ + if(!self::$bf) { self::$bf=new Crypt_Blowfish($_SESSION['enckey']); } return self::$bf; @@ -96,7 +96,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); @@ -179,7 +179,7 @@ class OC_Crypt { 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); @@ -188,29 +188,29 @@ class OC_Crypt { fclose($handleread); } } - + /** * encrypt data in 8192b sized blocks */ - public static function blockEncrypt($data, $key=''){ + public static function blockEncrypt($data, $key='') { $result=''; - while(strlen($data)){ + while(strlen($data)) { $result.=self::encrypt(substr($data,0,8192),$key); $data=substr($data,8192); } return $result; } - + /** * 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)){ + 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{ return rtrim($result, "\0"); diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php index 46471911d9..721a1b955d 100644 --- a/apps/files_encryption/lib/cryptstream.php +++ b/apps/files_encryption/lib/cryptstream.php @@ -36,18 +36,18 @@ class OC_CryptStream{ private $size; private static $rootView; - public function stream_open($path, $mode, $options, &$opened_path){ - if(!self::$rootView){ + public function stream_open($path, $mode, $options, &$opened_path) { + 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{ $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{ $this->size=self::$rootView->filesize($path,$mode); @@ -55,55 +55,55 @@ class OC_CryptStream{ 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); } - - public function stream_seek($offset, $whence=SEEK_SET){ + + public function stream_seek($offset, $whence=SEEK_SET) { $this->flush(); fseek($this->source,$offset,$whence); } - - public function stream_tell(){ + + public function stream_tell() { return ftell($this->source); } - - public function stream_read($count){ + + public function stream_read($count) { //$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){ + 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{ $result=''; } $length=$this->size-$pos; - if($length<8192){ + if($length<8192) { $result=substr($result,0,$length); } return $result; } - - public function stream_write($data){ + + 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); @@ -113,8 +113,8 @@ class OC_CryptStream{ 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{ @@ -127,8 +127,8 @@ class OC_CryptStream{ return $length; } - public function stream_set_option($option,$arg1,$arg2){ - switch($option){ + public function stream_set_option($option,$arg1,$arg2) { + switch($option) { case STREAM_OPTION_BLOCKING: stream_set_blocking($this->source,$arg1); break; @@ -140,33 +140,33 @@ class OC_CryptStream{ } } - public function stream_stat(){ + public function stream_stat() { return fstat($this->source); } - - public function stream_lock($mode){ + + public function stream_lock($mode) { flock($this->source,$mode); } - - public function stream_flush(){ + + public function stream_flush() { return fflush($this->source); } - public function stream_eof(){ + public function stream_eof() { return feof($this->source); } - private function flush(){ - if($this->writeCache){ + private function flush() { + if($this->writeCache) { $encrypted=OC_Crypt::encrypt($this->writeCache); fwrite($this->source,$encrypted); $this->writeCache=''; } } - public function stream_close(){ + 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 f25e4a662f..f61cd1e377 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -28,27 +28,27 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ private static $blackList=null; //mimetypes blacklisted from encryption private static $enableEncryption=null; - + /** * check if a file should be encrypted during write * @param string $path * @return bool */ - private static function shouldEncrypt($path){ - if(is_null(self::$enableEncryption)){ + private static function shouldEncrypt($path) { + 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)){ + 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; } } @@ -58,13 +58,13 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ * @param string $path * @return bool */ - private static function isEncrypted($path){ + private static function isEncrypted($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)){ + + public function preFile_put_contents($path,&$data) { + 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); @@ -72,25 +72,25 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ } } } - - public function postFile_get_contents($path,$data){ - if(self::isEncrypted($path)){ + + 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){ + + public function postFopen($path,&$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){ + }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); $tmp=fopen('php://temp'); @@ -104,23 +104,23 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ return $result; } - public function postGetMimeType($path,$mime){ - if(self::isEncrypted($path)){ + 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)){ + 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)){ + public function postFileSize($path,$size) { + if(self::isEncrypted($path)) { $cached=OC_FileCache_Cached::get($path,''); return $cached['size']; }else{ diff --git a/apps/files_encryption/templates/settings.php b/apps/files_encryption/templates/settings.php index 79780d694c..55e8cf1542 100644 --- a/apps/files_encryption/templates/settings.php +++ b/apps/files_encryption/templates/settings.php @@ -7,6 +7,6 @@ - > + > diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php index 286770a69f..89397f6ef2 100644 --- a/apps/files_encryption/tests/encryption.php +++ b/apps/files_encryption/tests/encryption.php @@ -7,7 +7,7 @@ */ class Test_Encryption extends UnitTestCase { - function testEncryption(){ + function testEncryption() { $key=uniqid(); $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $source=file_get_contents($file); //nice large text file @@ -23,7 +23,7 @@ class Test_Encryption extends UnitTestCase { $decrypted=OC_Crypt::decrypt($encrypted,$key); $decrypted=rtrim($decrypted, "\0"); $this->assertEqual($decrypted,$chunk); - + $encrypted=OC_Crypt::blockEncrypt($source,$key); $decrypted=OC_Crypt::blockDecrypt($encrypted,$key); $this->assertNotEqual($encrypted,$source); @@ -54,9 +54,9 @@ class Test_Encryption extends UnitTestCase { } - function testBinary(){ + function testBinary() { $key=uniqid(); - + $file=__DIR__.'/binary'; $source=file_get_contents($file); //binary file $encrypted=OC_Crypt::encrypt($source,$key); diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php index 5463836a20..042011a6c8 100644 --- a/apps/files_encryption/tests/proxy.php +++ b/apps/files_encryption/tests/proxy.php @@ -9,18 +9,18 @@ class Test_CryptProxy extends UnitTestCase { private $oldConfig; private $oldKey; - - public function setUp(){ + + 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->oldKey=isset($_SESSION['enckey'])?$_SESSION['enckey']:null; - - + + //set testing key $_SESSION['enckey']=md5(time()); - + //clear all proxies and hooks so we can do clean testing OC_FileProxy::clearProxies(); OC_Hook::clear('OC_Filesystem'); @@ -40,23 +40,23 @@ class Test_CryptProxy extends UnitTestCase { $rootView->mkdir('/'.$user.'/files'); } - public function tearDown(){ + public function tearDown() { OCP\Config::setAppValue('files_encryption','enable_encryption',$this->oldConfig); - if(!is_null($this->oldKey)){ + if(!is_null($this->oldKey)) { $_SESSION['enckey']=$this->oldKey; } } - public function testSimple(){ + public function testSimple() { $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $original=file_get_contents($file); 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->assertEqual(strlen($original),strlen($fromFile)); @@ -64,7 +64,7 @@ class Test_CryptProxy extends UnitTestCase { } - public function testView(){ + public function testView() { $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; $original=file_get_contents($file); @@ -86,7 +86,7 @@ class Test_CryptProxy extends UnitTestCase { $this->assertEqual($original,$fromFile); } - public function testBinary(){ + public function testBinary() { $file=__DIR__.'/binary'; $original=file_get_contents($file); diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index d95ea792f7..39b1362078 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -8,8 +8,8 @@ class Test_CryptStream extends UnitTestCase { private $tmpFiles=array(); - - function testStream(){ + + function testStream() { $stream=$this->getStream('test1','w',strlen('foobar')); fwrite($stream,'foobar'); fclose($stream); @@ -40,11 +40,11 @@ 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{ @@ -55,7 +55,7 @@ class Test_CryptStream extends UnitTestCase { return fopen('crypt://streams/'.$id,$mode); } - function testBinary(){ + function testBinary() { $file=__DIR__.'/binary'; $source=file_get_contents($file); diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php index d28a7d24b2..a8719fc7a3 100644 --- a/apps/files_external/ajax/addRootCertificate.php +++ b/apps/files_external/ajax/addRootCertificate.php @@ -14,7 +14,7 @@ $fh = fopen($to, 'r'); $data = fread($fh, filesize($to)); fclose($fh); if (!strpos($data, 'BEGIN CERTIFICATE')) { - $pem = chunk_split(base64_encode($data), 64, "\n"); + $pem = chunk_split(base64_encode($data), 64, "\n"); $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n"; $fh = fopen($to, 'w'); fwrite($fh, $pem); @@ -25,4 +25,3 @@ OC_Mount_Config::createCertificateBundle(); header("Location: settings/personal.php"); exit; -?> \ No newline at end of file diff --git a/apps/files_external/ajax/dropbox.php b/apps/files_external/ajax/dropbox.php index 5f2ff17e62..f5923940dc 100644 --- a/apps/files_external/ajax/dropbox.php +++ b/apps/files_external/ajax/dropbox.php @@ -37,5 +37,3 @@ if (isset($_POST['app_key']) && isset($_POST['app_secret'])) { } else { OCP\JSON::error(array('data' => array('message' => 'Please provide a valid Dropbox app key and secret.'))); } - -?> \ No newline at end of file diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php index 23ecfc3708..4cd01c06cc 100644 --- a/apps/files_external/ajax/google.php +++ b/apps/files_external/ajax/google.php @@ -47,5 +47,3 @@ if (isset($_POST['step'])) { break; } } - -?> \ No newline at end of file diff --git a/apps/files_external/ajax/removeRootCertificate.php b/apps/files_external/ajax/removeRootCertificate.php index f78f85b8fe..9b78e180d9 100644 --- a/apps/files_external/ajax/removeRootCertificate.php +++ b/apps/files_external/ajax/removeRootCertificate.php @@ -9,4 +9,3 @@ $cert = $_POST['cert']; $file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert; unlink($file); OC_Mount_Config::createCertificateBundle(); -?> \ No newline at end of file diff --git a/apps/files_external/js/dropbox.js b/apps/files_external/js/dropbox.js index 92194792f4..dd3a1cb185 100644 --- a/apps/files_external/js/dropbox.js +++ b/apps/files_external/js/dropbox.js @@ -10,7 +10,7 @@ $(document).ready(function() { var app_secret = $(this).find('.configuration [data-parameter="app_secret"]').val(); var config = $(this).find('.configuration'); if (app_key != '' && app_secret != '') { - var pos = window.location.search.indexOf('oauth_token') + 12 + var pos = window.location.search.indexOf('oauth_token') + 12; var token = $(this).find('.configuration [data-parameter="token"]'); if (pos != -1 && window.location.search.substr(pos, $(token).val().length) == $(token).val()) { var token_secret = $(this).find('.configuration [data-parameter="token_secret"]'); @@ -73,7 +73,7 @@ $(document).ready(function() { } }); } else { - OC.dialogs.alert('Please provide a valid Dropbox app key and secret.', 'Error configuring Dropbox storage') + OC.dialogs.alert('Please provide a valid Dropbox app key and secret.', 'Error configuring Dropbox storage'); } }); diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 23f02bbefc..89f346574e 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -66,11 +66,11 @@ OC.MountConfig={ return true; } } -} +}; $(document).ready(function() { $('.chzn-select').chosen(); - + $('#selectBackend').live('change', function() { var tr = $(this).parent().parent(); $('#externalStorage tbody').append($(tr).clone()); @@ -133,7 +133,7 @@ $(document).ready(function() { } } return defaultMountPoint+append; - } + } $('#externalStorage td').live('change', function() { OC.MountConfig.saveStorage($(this).parent()); @@ -179,4 +179,4 @@ $(document).ready(function() { } }); -}); \ No newline at end of file +}); diff --git a/apps/files_external/l10n/cs_CZ.php b/apps/files_external/l10n/cs_CZ.php index 8f11d7da11..7589960334 100644 --- a/apps/files_external/l10n/cs_CZ.php +++ b/apps/files_external/l10n/cs_CZ.php @@ -1,13 +1,18 @@ "Externí úložiště", "Mount point" => "Přípojný bod", -"Configuration" => "Konfigurace", -"Options" => "Nastavení", -"Add mount point" => "Přidat přípojný bod", +"Backend" => "Podpůrná vrstva", +"Configuration" => "Nastavení", +"Options" => "Možnosti", +"Applicable" => "Platný", +"Add mount point" => "Přidat bod připojení", +"None set" => "Nenastaveno", "All Users" => "Všichni uživatelé", "Groups" => "Skupiny", "Users" => "Uživatelé", "Delete" => "Smazat", -"Enable User External Storage" => "Zapnout uživatelské externí úložiště", -"Allow users to mount their own external storage" => "Povolit uživatelů připojit jejich vlastní externí úložiště" +"SSL root certificates" => "Kořenové certifikáty SSL", +"Import Root Certificate" => "Importovat kořenového certifikátu", +"Enable User External Storage" => "Zapnout externí uživatelské úložiště", +"Allow users to mount their own external storage" => "Povolit uživatelům připojení jejich vlastních externích úložišť" ); diff --git a/apps/files_external/l10n/es.php b/apps/files_external/l10n/es.php index c1c605735f..004c352c19 100644 --- a/apps/files_external/l10n/es.php +++ b/apps/files_external/l10n/es.php @@ -1,5 +1,6 @@ "Almacenamiento externo", +"Mount point" => "Punto de montaje", "Backend" => "Motor", "Configuration" => "Configuración", "Options" => "Opciones", @@ -9,5 +10,9 @@ "All Users" => "Todos los usuarios", "Groups" => "Grupos", "Users" => "Usuarios", -"Delete" => "Eliiminar" +"Delete" => "Eliiminar", +"SSL root certificates" => "Raíz de certificados SSL ", +"Import Root Certificate" => "Importar certificado raíz", +"Enable User External Storage" => "Habilitar almacenamiento de usuario externo", +"Allow users to mount their own external storage" => "Permitir a los usuarios montar su propio almacenamiento externo" ); diff --git a/apps/files_external/l10n/et_EE.php b/apps/files_external/l10n/et_EE.php index a6907e775b..f47ebc936b 100644 --- a/apps/files_external/l10n/et_EE.php +++ b/apps/files_external/l10n/et_EE.php @@ -1,12 +1,18 @@ "Väline salvestuskoht", "Mount point" => "Ühenduspunkt", +"Backend" => "Admin", "Configuration" => "Seadistamine", "Options" => "Valikud", +"Applicable" => "Rakendatav", "Add mount point" => "Lisa ühenduspunkt", "None set" => "Pole määratud", "All Users" => "Kõik kasutajad", "Groups" => "Grupid", "Users" => "Kasutajad", -"Delete" => "Kustuta" +"Delete" => "Kustuta", +"SSL root certificates" => "SSL root sertifikaadid", +"Import Root Certificate" => "Impordi root sertifikaadid", +"Enable User External Storage" => "Luba kasutajatele väline salvestamine", +"Allow users to mount their own external storage" => "Luba kasutajatel ühendada külge nende enda välised salvestusseadmed" ); diff --git a/apps/files_external/l10n/eu.php b/apps/files_external/l10n/eu.php index a594cdff1f..6299390c26 100644 --- a/apps/files_external/l10n/eu.php +++ b/apps/files_external/l10n/eu.php @@ -1,8 +1,10 @@ "Kanpoko Biltegiratzea", "Mount point" => "Montatze puntua", +"Backend" => "Motorra", "Configuration" => "Konfigurazioa", "Options" => "Aukerak", +"Applicable" => "Aplikagarria", "Add mount point" => "Gehitu muntatze puntua", "None set" => "Ezarri gabe", "All Users" => "Erabiltzaile guztiak", diff --git a/apps/files_external/l10n/fi_FI.php b/apps/files_external/l10n/fi_FI.php index 7dca49791e..cea671368e 100644 --- a/apps/files_external/l10n/fi_FI.php +++ b/apps/files_external/l10n/fi_FI.php @@ -4,6 +4,7 @@ "Backend" => "Taustaosa", "Configuration" => "Asetukset", "Options" => "Valinnat", +"Applicable" => "Sovellettavissa", "Add mount point" => "Lisää liitospiste", "None set" => "Ei asetettu", "All Users" => "Kaikki käyttäjät", @@ -12,5 +13,6 @@ "Delete" => "Poista", "SSL root certificates" => "SSL-juurivarmenteet", "Import Root Certificate" => "Tuo juurivarmenne", +"Enable User External Storage" => "Ota käyttöön ulkopuoliset tallennuspaikat", "Allow users to mount their own external storage" => "Salli käyttäjien liittää omia erillisiä tallennusvälineitä" ); diff --git a/apps/files_external/l10n/he.php b/apps/files_external/l10n/he.php new file mode 100644 index 0000000000..edfa9aa85f --- /dev/null +++ b/apps/files_external/l10n/he.php @@ -0,0 +1,13 @@ + "אחסון חיצוני", +"Configuration" => "הגדרות", +"Options" => "אפשרויות", +"All Users" => "כל המשתמשים", +"Groups" => "קבוצות", +"Users" => "משתמשים", +"Delete" => "מחיקה", +"SSL root certificates" => "שורש אישורי אבטחת SSL ", +"Import Root Certificate" => "ייבוא אישור אבטחת שורש", +"Enable User External Storage" => "הפעלת אחסון חיצוני למשתמשים", +"Allow users to mount their own external storage" => "יאפשר למשתמשים לעגן את האחסון החיצוני שלהם" +); diff --git a/apps/files_external/l10n/it.php b/apps/files_external/l10n/it.php index 927499b017..5c5d32b214 100644 --- a/apps/files_external/l10n/it.php +++ b/apps/files_external/l10n/it.php @@ -11,8 +11,8 @@ "Groups" => "Gruppi", "Users" => "Utenti", "Delete" => "Elimina", -"SSL root certificates" => "Certificato principale per SSL", -"Import Root Certificate" => "Importa certificato principale", +"SSL root certificates" => "Certificati SSL radice", +"Import Root Certificate" => "Importa certificato radice", "Enable User External Storage" => "Abilita la memoria esterna dell'utente", -"Allow users to mount their own external storage" => "Consente agli utenti di montare la propria memoria esterna" +"Allow users to mount their own external storage" => "Consenti agli utenti di montare la propria memoria esterna" ); diff --git a/apps/files_external/l10n/sk_SK.php b/apps/files_external/l10n/sk_SK.php new file mode 100644 index 0000000000..24087ea7fe --- /dev/null +++ b/apps/files_external/l10n/sk_SK.php @@ -0,0 +1,18 @@ + "Externé úložisko", +"Mount point" => "Prípojný bod", +"Backend" => "Backend", +"Configuration" => "Nastavenia", +"Options" => "Možnosti", +"Applicable" => "Aplikovateľné", +"Add mount point" => "Pridať prípojný bod", +"None set" => "Žiadne nastavené", +"All Users" => "Všetci užívatelia", +"Groups" => "Skupiny", +"Users" => "Užívatelia", +"Delete" => "Odstrániť", +"SSL root certificates" => "Koreňové SSL certifikáty", +"Import Root Certificate" => "Importovať koreňový certifikát", +"Enable User External Storage" => "Povoliť externé úložisko", +"Allow users to mount their own external storage" => "Povoliť užívateľom pripojiť ich vlastné externé úložisko" +); diff --git a/apps/files_external/l10n/uk.php b/apps/files_external/l10n/uk.php new file mode 100644 index 0000000000..79920b9014 --- /dev/null +++ b/apps/files_external/l10n/uk.php @@ -0,0 +1,5 @@ + "Групи", +"Users" => "Користувачі", +"Delete" => "Видалити" +); diff --git a/apps/files_external/l10n/vi.php b/apps/files_external/l10n/vi.php new file mode 100644 index 0000000000..35312329da --- /dev/null +++ b/apps/files_external/l10n/vi.php @@ -0,0 +1,18 @@ + "Lưu trữ ngoài", +"Mount point" => "Điểm gắn", +"Backend" => "phụ trợ", +"Configuration" => "Cấu hình", +"Options" => "Tùy chọn", +"Applicable" => "Áp dụng", +"Add mount point" => "Thêm điểm lắp", +"None set" => "không", +"All Users" => "Tất cả người dùng", +"Groups" => "Nhóm", +"Users" => "Người dùng", +"Delete" => "Xóa", +"SSL root certificates" => "Chứng chỉ SSL root", +"Import Root Certificate" => "Nhập Root Certificate", +"Enable User External Storage" => "Kích hoạt tính năng lưu trữ ngoài", +"Allow users to mount their own external storage" => "Cho phép người dùng kết nối với lưu trữ riêng bên ngoài của họ" +); diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index 3c2e333017..41ec3c70b4 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -29,7 +29,7 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { private $objects = array(); private static $tempFiles = array(); - + // TODO options: storage class, encryption server side, encrypt before upload? public function __construct($params) { @@ -216,7 +216,7 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { } public function free_space($path) { - // Infinite? + // Infinite? return false; } @@ -232,5 +232,3 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common { } } - -?> \ No newline at end of file diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index f1bc16e253..eec31ec2ef 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -1,283 +1,281 @@ -. -*/ - -/** -* Class to configure the config/mount.php and data/$user/mount.php files -*/ -class OC_Mount_Config { - - const MOUNT_TYPE_GLOBAL = 'global'; - const MOUNT_TYPE_GROUP = 'group'; - const MOUNT_TYPE_USER = 'user'; - - /** - * Get details on each of the external storage backends, used for the mount config UI - * If a custom UI is needed, add the key 'custom' and a javascript file with that name will be loaded - * If the configuration parameter should be secret, add a '*' to the beginning of the value - * If the configuration parameter is a boolean, add a '!' to the beginning of the value - * If the configuration parameter is optional, add a '&' to the beginning of the value - * If the configuration parameter is hidden, add a '#' to the begining of the value - * @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://')) - ); - } - - /** - * Get the system mount points - * The returned array is not in the same format as getUserMountPoints() - * @return array - */ - public static function getSystemMountPoints() { - $mountPoints = self::readData(false); - $backends = self::getBackends(); - $system = array(); - if (isset($mountPoints[self::MOUNT_TYPE_GROUP])) { - foreach ($mountPoints[self::MOUNT_TYPE_GROUP] as $group => $mounts) { - foreach ($mounts as $mountPoint => $mount) { - // Remove '/$user/files/' from mount point - $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)); - } else { - $system[$mountPoint] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options'], 'applicable' => array('groups' => array($group), 'users' => array())); - } - } - } - } - if (isset($mountPoints[self::MOUNT_TYPE_USER])) { - foreach ($mountPoints[self::MOUNT_TYPE_USER] as $user => $mounts) { - foreach ($mounts as $mountPoint => $mount) { - // Remove '/$user/files/' from mount point - $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)); - } else { - $system[$mountPoint] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options'], 'applicable' => array('groups' => array(), 'users' => array($user))); - } - } - } - } - return $system; - } - - /** - * Get the personal mount points of the current user - * The returned array is not in the same format as getUserMountPoints() - * @return array - */ - public static function getPersonalMountPoints() { - $mountPoints = self::readData(true); - $backends = self::getBackends(); - $uid = OCP\User::getUser(); - $personal = array(); - 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']); - } - } - return $personal; - } - - - /** - * Add a mount point to the filesystem - * @param string Mount point - * @param string Backend class - * @param array Backend parameters for the class - * @param string MOUNT_TYPE_GROUP | MOUNT_TYPE_USER - * @param string User or group to apply mount to - * @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) { - if ($isPersonal) { - // Verify that the mount point applies for the current user - // Prevent non-admin users from mounting local storage - if ($applicable != OCP\User::getUser() || $class == 'OC_Filestorage_Local') { - return false; - } - $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/'); - } else { - $mountPoint = '/$user/files/'.ltrim($mountPoint, '/'); - } - $mount = array($applicable => array($mountPoint => array('class' => $class, 'options' => $classOptions))); - $mountPoints = self::readData($isPersonal); - // 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]); - } else { - $mountPoints[$mountType] = array_merge($mountPoints[$mountType], $mount); - } - } else { - $mountPoints[$mountType] = $mount; - } - self::writeData($isPersonal, $mountPoints); - return true; - } - - /** - * - * @param string Mount point - * @param string MOUNT_TYPE_GROUP | MOUNT_TYPE_USER - * @param string User or group to remove mount from - * @param bool Personal or system mount point - * @return bool - */ - public static function removeMountPoint($mountPoint, $mountType, $applicable, $isPersonal = false) { - // Verify that the mount point applies for the current user - if ($isPersonal) { - if ($applicable != OCP\User::getUser()) { - return false; - } - $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/'); - } else { - $mountPoint = '/$user/files/'.ltrim($mountPoint, '/'); - } - $mountPoints = self::readData($isPersonal); - // Remove mount point - unset($mountPoints[$mountType][$applicable][$mountPoint]); - // Unset parent arrays if empty - if (empty($mountPoints[$mountType][$applicable])) { - unset($mountPoints[$mountType][$applicable]); - if (empty($mountPoints[$mountType])) { - unset($mountPoints[$mountType]); - } - } - self::writeData($isPersonal, $mountPoints); - return true; - } - - /** - * Read the mount points in the config file into an array - * @param bool Personal or system config file - * @return array - */ - private static function readData($isPersonal) { - if ($isPersonal) { - $file = OC::$SERVERROOT.'/data/'.OCP\User::getUser().'/mount.php'; - } else { - $file = OC::$SERVERROOT.'/config/mount.php'; - } - if (is_file($file)) { - $mountPoints = include($file); - if (is_array($mountPoints)) { - return $mountPoints; - } - } - return array(); - } - - /** - * Write the mount points to the config file - * @param bool Personal or system config file - * @param array Mount points - */ - private static function writeData($isPersonal, $data) { - if ($isPersonal) { - $file = OC::$SERVERROOT.'/data/'.OCP\User::getUser().'/mount.php'; - } else { - $file = OC::$SERVERROOT.'/config/mount.php'; - } - $content = " array (\n"; - foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) { - $content .= "\t\t'".$group."' => array (\n"; - foreach ($mounts as $mountPoint => $mount) { - $content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n"; - - } - $content .= "\t\t),\n"; - } - $content .= "\t),\n"; - } - if (isset($data[self::MOUNT_TYPE_USER])) { - $content .= "\t'user' => array (\n"; - foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) { - $content .= "\t\t'".$user."' => array (\n"; - foreach ($mounts as $mountPoint => $mount) { - $content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n"; - } - $content .= "\t\t),\n"; - } - $content .= "\t),\n"; - } - $content .= ");\n?>"; - @file_put_contents($file, $content); - } - - /** - * Returns all user uploaded ssl root certificates - * @return array - */ - public static function getCertificates() { - $view = \OCP\Files::getStorage('files_external'); - $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'; - if (!is_dir($path)) mkdir($path); - $result = array(); - $handle = opendir($path); - while (false !== ($file = readdir($handle))) { - if($file != '.' && $file != '..') $result[] = $file; - } - return $result; - } - - /** - * creates certificate bundle - */ - public static function createCertificateBundle() { - $view = \OCP\Files::getStorage("files_external"); - $path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath(""); - - $certs = OC_Mount_Config::getCertificates(); - $fh_certs = fopen($path."/rootcerts.crt", 'w'); - foreach ($certs as $cert) { - $file=$path.'/uploads/'.$cert; - $fh = fopen($file, "r"); - $data = fread($fh, filesize($file)); - fclose($fh); - if (strpos($data, 'BEGIN CERTIFICATE')) { - fwrite($fh_certs, $data); - } - } - - fclose($fh_certs); - - return true; - } - -} - -?> \ No newline at end of file +. +*/ + +/** +* Class to configure the config/mount.php and data/$user/mount.php files +*/ +class OC_Mount_Config { + + const MOUNT_TYPE_GLOBAL = 'global'; + const MOUNT_TYPE_GROUP = 'group'; + const MOUNT_TYPE_USER = 'user'; + + /** + * Get details on each of the external storage backends, used for the mount config UI + * If a custom UI is needed, add the key 'custom' and a javascript file with that name will be loaded + * If the configuration parameter should be secret, add a '*' to the beginning of the value + * If the configuration parameter is a boolean, add a '!' to the beginning of the value + * If the configuration parameter is optional, add a '&' to the beginning of the value + * If the configuration parameter is hidden, add a '#' to the begining of the value + * @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://')) + ); + } + + /** + * Get the system mount points + * The returned array is not in the same format as getUserMountPoints() + * @return array + */ + public static function getSystemMountPoints() { + $mountPoints = self::readData(false); + $backends = self::getBackends(); + $system = array(); + if (isset($mountPoints[self::MOUNT_TYPE_GROUP])) { + foreach ($mountPoints[self::MOUNT_TYPE_GROUP] as $group => $mounts) { + foreach ($mounts as $mountPoint => $mount) { + // Remove '/$user/files/' from mount point + $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)); + } else { + $system[$mountPoint] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options'], 'applicable' => array('groups' => array($group), 'users' => array())); + } + } + } + } + if (isset($mountPoints[self::MOUNT_TYPE_USER])) { + foreach ($mountPoints[self::MOUNT_TYPE_USER] as $user => $mounts) { + foreach ($mounts as $mountPoint => $mount) { + // Remove '/$user/files/' from mount point + $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)); + } else { + $system[$mountPoint] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options'], 'applicable' => array('groups' => array(), 'users' => array($user))); + } + } + } + } + return $system; + } + + /** + * Get the personal mount points of the current user + * The returned array is not in the same format as getUserMountPoints() + * @return array + */ + public static function getPersonalMountPoints() { + $mountPoints = self::readData(true); + $backends = self::getBackends(); + $uid = OCP\User::getUser(); + $personal = array(); + 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']); + } + } + return $personal; + } + + + /** + * Add a mount point to the filesystem + * @param string Mount point + * @param string Backend class + * @param array Backend parameters for the class + * @param string MOUNT_TYPE_GROUP | MOUNT_TYPE_USER + * @param string User or group to apply mount to + * @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) { + if ($isPersonal) { + // Verify that the mount point applies for the current user + // Prevent non-admin users from mounting local storage + if ($applicable != OCP\User::getUser() || $class == 'OC_Filestorage_Local') { + return false; + } + $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/'); + } else { + $mountPoint = '/$user/files/'.ltrim($mountPoint, '/'); + } + $mount = array($applicable => array($mountPoint => array('class' => $class, 'options' => $classOptions))); + $mountPoints = self::readData($isPersonal); + // 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]); + } else { + $mountPoints[$mountType] = array_merge($mountPoints[$mountType], $mount); + } + } else { + $mountPoints[$mountType] = $mount; + } + self::writeData($isPersonal, $mountPoints); + return true; + } + + /** + * + * @param string Mount point + * @param string MOUNT_TYPE_GROUP | MOUNT_TYPE_USER + * @param string User or group to remove mount from + * @param bool Personal or system mount point + * @return bool + */ + public static function removeMountPoint($mountPoint, $mountType, $applicable, $isPersonal = false) { + // Verify that the mount point applies for the current user + if ($isPersonal) { + if ($applicable != OCP\User::getUser()) { + return false; + } + $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/'); + } else { + $mountPoint = '/$user/files/'.ltrim($mountPoint, '/'); + } + $mountPoints = self::readData($isPersonal); + // Remove mount point + unset($mountPoints[$mountType][$applicable][$mountPoint]); + // Unset parent arrays if empty + if (empty($mountPoints[$mountType][$applicable])) { + unset($mountPoints[$mountType][$applicable]); + if (empty($mountPoints[$mountType])) { + unset($mountPoints[$mountType]); + } + } + self::writeData($isPersonal, $mountPoints); + return true; + } + + /** + * Read the mount points in the config file into an array + * @param bool Personal or system config file + * @return array + */ + private static function readData($isPersonal) { + if ($isPersonal) { + $file = OC_User::getHome(OCP\User::getUser()).'/mount.php'; + } else { + $file = OC::$SERVERROOT.'/config/mount.php'; + } + if (is_file($file)) { + $mountPoints = include($file); + if (is_array($mountPoints)) { + return $mountPoints; + } + } + return array(); + } + + /** + * Write the mount points to the config file + * @param bool Personal or system config file + * @param array Mount points + */ + private static function writeData($isPersonal, $data) { + if ($isPersonal) { + $file = OC_User::getHome(OCP\User::getUser()).'/mount.php'; + } else { + $file = OC::$SERVERROOT.'/config/mount.php'; + } + $content = " array (\n"; + foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) { + $content .= "\t\t'".$group."' => array (\n"; + foreach ($mounts as $mountPoint => $mount) { + $content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n"; + + } + $content .= "\t\t),\n"; + } + $content .= "\t),\n"; + } + if (isset($data[self::MOUNT_TYPE_USER])) { + $content .= "\t'user' => array (\n"; + foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) { + $content .= "\t\t'".$user."' => array (\n"; + foreach ($mounts as $mountPoint => $mount) { + $content .= "\t\t\t'".$mountPoint."' => ".str_replace("\n", '', var_export($mount, true)).",\n"; + } + $content .= "\t\t),\n"; + } + $content .= "\t),\n"; + } + $content .= ");\n?>"; + @file_put_contents($file, $content); + } + + /** + * Returns all user uploaded ssl root certificates + * @return array + */ + public static function getCertificates() { + $view = \OCP\Files::getStorage('files_external'); + $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'; + if (!is_dir($path)) mkdir($path); + $result = array(); + $handle = opendir($path); + while (false !== ($file = readdir($handle))) { + if($file != '.' && $file != '..') $result[] = $file; + } + return $result; + } + + /** + * creates certificate bundle + */ + public static function createCertificateBundle() { + $view = \OCP\Files::getStorage("files_external"); + $path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath(""); + + $certs = OC_Mount_Config::getCertificates(); + $fh_certs = fopen($path."/rootcerts.crt", 'w'); + foreach ($certs as $cert) { + $file=$path.'/uploads/'.$cert; + $fh = fopen($file, "r"); + $data = fread($fh, filesize($file)); + fclose($fh); + if (strpos($data, 'BEGIN CERTIFICATE')) { + fwrite($fh_certs, $data); + } + } + + fclose($fh_certs); + + return true; + } + +} diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php index b90563a506..bb86894e55 100755 --- a/apps/files_external/lib/dropbox.php +++ b/apps/files_external/lib/dropbox.php @@ -251,5 +251,3 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common { } } - -?> \ No newline at end of file diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php index 63f14a2877..261141455c 100644 --- a/apps/files_external/lib/ftp.php +++ b/apps/files_external/lib/ftp.php @@ -14,14 +14,14 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ private $root; private static $tempFiles=array(); - - public function __construct($params){ + + public function __construct($params) { $this->host=$params['host']; $this->user=$params['user']; $this->password=$params['password']; $this->secure=isset($params['secure'])?(bool)$params['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 @@ -35,16 +35,16 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ * @param string path * @return string */ - public function constructUrl($path){ + 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){ - switch($mode){ + public function fopen($path,$mode) { + switch($mode) { case 'r': case 'rb': case 'w': @@ -63,14 +63,14 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ case 'c': case 'c+': //emulate these - if(strrpos($path,'.')!==false){ + 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)){ + if($this->file_exists($path)) { $this->getFile($path,$tmpFile); } self::$tempFiles[$tmpFile]=$path; @@ -78,8 +78,8 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ } } - public function writeBack($tmpFile){ - if(isset(self::$tempFiles[$tmpFile])){ + public function writeBack($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 73317bbf71..9b83dcee53 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -119,7 +119,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } } } - return false; + return false; } private function getFeed($feedUri, $httpMethod, $postData = null) { @@ -174,7 +174,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { return 'html'; } } - + public function mkdir($path) { $collection = dirname($path); @@ -254,7 +254,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } 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)) +// 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); @@ -304,7 +304,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } return false; } - + public function file_exists($path) { if ($path == '' || $path == '/') { return true; @@ -313,7 +313,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } return false; } - + public function unlink($path) { // Get resource self link to trash resource if ($entry = $this->getResource($path)) { @@ -482,7 +482,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { // TODO Wait for resource entry } } - + 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 if ($entry == null) { @@ -522,7 +522,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } return false; } - + public function free_space($path) { if ($dom = $this->getFeed('https://docs.google.com/feeds/metadata/default', 'GET')) { // NOTE: Native Google Docs resources don't count towards quota @@ -532,9 +532,9 @@ class OC_Filestorage_Google extends OC_Filestorage_Common { } return false; } - + public function touch($path, $mtime = null) { - + } } \ No newline at end of file diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 8a5e993b1d..e5ba7a1774 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('smb4php/smb.php'); +require_once 'smb4php/smb.php'; class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ private $password; @@ -15,40 +15,40 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ private $root; private $share; - public function __construct($params){ + public function __construct($params) { $this->host=$params['host']; $this->user=$params['user']; $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)=='/'){ + 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)=='/'){ + public function constructUrl($path) { + 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 + public function stat($path) { + if(!$path and $this->root=='/') {//mtime doesn't work for shares $mtime=$this->shareMTime(); $stat=stat($this->constructUrl($path)); $stat['mtime']=$mtime; @@ -58,7 +58,7 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ } } - public function filetype($path){ + public function filetype($path) { return (bool)@$this->opendir($path);//using opendir causes the same amount of requests and caches the content of the folder in one go } @@ -67,8 +67,8 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ * @param int $time * @return bool */ - public function hasUpdated($path,$time){ - if(!$path and $this->root=='/'){ + 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{ @@ -80,13 +80,13 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ /** * get the best guess for the modification time of the share */ - private function shareMTime(){ + private function shareMTime() { $dh=$this->opendir(''); $lastCtime=0; - while($file=readdir($dh)){ - if($file!='.' and $file!='..'){ + while($file=readdir($dh)) { + 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 467c5a5b84..7263ef2325 100644 --- a/apps/files_external/lib/streamwrapper.php +++ b/apps/files_external/lib/streamwrapper.php @@ -10,12 +10,12 @@ abstract class OC_FileStorage_StreamWrapper extends OC_Filestorage_Common{ abstract public function constructUrl($path); - public function mkdir($path){ + public function mkdir($path) { return mkdir($this->constructUrl($path)); } - public function rmdir($path){ - if($this->file_exists($path)){ + public function rmdir($path) { + if($this->file_exists($path)) { $succes=rmdir($this->constructUrl($path)); clearstatcache(); return $succes; @@ -24,42 +24,42 @@ abstract class OC_FileStorage_StreamWrapper extends OC_Filestorage_Common{ } } - public function opendir($path){ + public function opendir($path) { return opendir($this->constructUrl($path)); } - public function filetype($path){ + public function filetype($path) { return filetype($this->constructUrl($path)); } - public function isReadable($path){ + public function isReadable($path) { return true;//not properly supported } - public function isUpdatable($path){ + public function isUpdatable($path) { return true;//not properly supported } - public function file_exists($path){ + public function file_exists($path) { return file_exists($this->constructUrl($path)); } - public function unlink($path){ + public function unlink($path) { $succes=unlink($this->constructUrl($path)); clearstatcache(); return $succes; } - public function fopen($path,$mode){ + public function fopen($path,$mode) { return fopen($this->constructUrl($path),$mode); } - public function free_space($path){ + public function free_space($path) { return 0; } - public function touch($path,$mtime=null){ - if(is_null($mtime)){ + public function touch($path,$mtime=null) { + if(is_null($mtime)) { $fh=$this->fopen($path,'a'); fwrite($fh,''); fclose($fh); @@ -68,19 +68,19 @@ abstract class OC_FileStorage_StreamWrapper extends OC_Filestorage_Common{ } } - public function getFile($path,$target){ + public function getFile($path,$target) { return copy($this->constructUrl($path),$target); } - public function uploadFile($path,$target){ + public function uploadFile($path,$target) { return copy($path,$this->constructUrl($target)); } - public function rename($path1,$path2){ + public function rename($path1,$path2) { return rename($this->constructUrl($path1),$this->constructUrl($path2)); } - public function stat($path){ + 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 94ccde1ff8..c29d28b44c 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -6,7 +6,7 @@ * See the COPYING-README file. */ -require_once('php-cloudfiles/cloudfiles.php'); +require_once 'php-cloudfiles/cloudfiles.php'; class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ private $host; @@ -38,7 +38,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string path * @return string */ - private function getContainerName($path){ + private function getContainerName($path) { $path=trim($this->root.$path,'/'); return str_replace('/','\\',$path); } @@ -48,18 +48,18 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string path * @return CF_Container */ - private function getContainer($path){ - if($path=='' or $path=='/'){ + private function getContainer($path) { + if($path=='' or $path=='/') { return $this->rootContainer; } - if(isset($this->containers[$path])){ + if(isset($this->containers[$path])) { return $this->containers[$path]; } try{ $container=$this->conn->get_container($this->getContainerName($path)); $this->containers[$path]=$container; return $container; - }catch(NoSuchContainerException $e){ + }catch(NoSuchContainerException $e) { return null; } } @@ -69,15 +69,15 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string path * @return CF_Container */ - private function createContainer($path){ - if($path=='' or $path=='/'){ + private function createContainer($path) { + if($path=='' or $path=='/') { return $this->conn->create_container($this->getContainerName($path)); } $parent=dirname($path); - if($parent=='' or $parent=='/'){ + if($parent=='' or $parent=='/') { $parentContainer=$this->rootContainer; }else{ - if(!$this->containerExists($parent)){ + if(!$this->containerExists($parent)) { $parentContainer=$this->createContainer($parent); }else{ $parentContainer=$this->getContainer($parent); @@ -92,19 +92,19 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string path * @return CF_Object */ - private function getObject($path){ - if(isset($this->objects[$path])){ + private function getObject($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{ try{ $obj=$container->get_object(basename($path)); $this->objects[$path]=$obj; return $obj; - }catch(NoSuchObjectException $e){ + }catch(NoSuchObjectException $e) { return null; } } @@ -115,12 +115,12 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param CF_Container * @return array */ - private function getObjects($container){ - if(is_null($container)){ + private function getObjects($container) { + if(is_null($container)) { return array(); }else{ $files=$container->get_objects(); - foreach($files as &$file){ + foreach($files as &$file) { $file=$file->name; } return $files; @@ -132,9 +132,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string path * @return CF_Object */ - private function createObject($path){ + private function createObject($path) { $container=$this->getContainer(dirname($path)); - if(!is_null($container)){ + if(!is_null($container)) { $container=$this->createContainer($path); } return $container->create_object(basename($path)); @@ -145,7 +145,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string * @return bool */ - private function objectExists($path){ + private function objectExists($path) { return !is_null($this->getObject($path)); } @@ -154,7 +154,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param string path * @return bool */ - private function containerExists($path){ + private function containerExists($path) { return !is_null($this->getContainer($path)); } @@ -163,18 +163,18 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param CF_Container container * @return array */ - private function getSubContainers($container){ + private function getSubContainers($container) { $tmpFile=OCP\Files::tmpFile(); $obj=$this->getSubContainerFile($container); 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; @@ -186,8 +186,8 @@ 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(); @@ -195,17 +195,17 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ 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"); } - }catch(Exception $e){ + }catch(Exception $e) { $containers=array(); file_put_contents($tmpFile,$name."\n"); } @@ -221,8 +221,8 @@ 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(); @@ -230,14 +230,14 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ 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){ + if($i===false) { unlink($tmpFile); return false; }else{ @@ -255,29 +255,29 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * @param CF_Container container * @return CF_Object */ - private function getSubContainerFile($container){ + private function getSubContainerFile($container) { try{ return $container->get_object(self::SUBCONTAINER_FILE); - }catch(NoSuchObjectException $e){ + }catch(NoSuchObjectException $e) { return $container->create_object(self::SUBCONTAINER_FILE); } } - public function __construct($params){ + public function __construct($params) { $this->token=$params['token']; $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(!$this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } $this->auth = new CF_Authentication($this->user, $this->token, null, $this->host); $this->auth->authenticate(); - + $this->conn = new CF_Connection($this->auth); - if(!$this->containerExists($this->root)){ + if(!$this->containerExists($this->root)) { $this->rootContainer=$this->createContainer('/'); }else{ $this->rootContainer=$this->getContainer('/'); @@ -285,8 +285,8 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } - public function mkdir($path){ - if($this->containerExists($path)){ + public function mkdir($path) { + if($this->containerExists($path)) { return false; }else{ $this->createContainer($path); @@ -294,30 +294,30 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } } - public function rmdir($path){ - if(!$this->containerExists($path)){ + public function rmdir($path) { + if(!$this->containerExists($path)) { return false; }else{ $this->emptyContainer($path); - if($path!='' and $path!='/'){ + if($path!='' and $path!='/') { $parentContainer=$this->getContainer(dirname($path)); $this->removeSubContainer($parentContainer,basename($path)); } - + $this->conn->delete_container($this->getContainerName($path)); unset($this->containers[$path]); return true; } } - private function emptyContainer($path){ + 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]); @@ -325,17 +325,17 @@ 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]); } } - public function opendir($path){ + public function opendir($path) { $container=$this->getContainer($path); $files=$this->getObjects($container); $i=array_search(self::SUBCONTAINER_FILE,$files); - if($i!==false){ + if($i!==false) { unset($files[$i]); } $subContainers=$this->getSubContainers($container); @@ -345,43 +345,43 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ return opendir('fakedir://'.$id); } - public function filetype($path){ - if($this->containerExists($path)){ + public function filetype($path) { + if($this->containerExists($path)) { return 'dir'; }else{ return 'file'; } } - public function isReadable($path){ + public function isReadable($path) { return true; } - public function isUpdatable($path){ + public function isUpdatable($path) { return true; } - public function file_exists($path){ - if($this->is_dir($path)){ + public function file_exists($path) { + if($this->is_dir($path)) { return true; }else{ return $this->objectExists($path); } } - public function file_get_contents($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)); @@ -390,8 +390,8 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ return $obj->write($content); } - public function unlink($path){ - if($this->objectExists($path)){ + public function unlink($path) { + if($this->objectExists($path)) { $container=$this->getContainer(dirname($path)); $container->delete_object(basename($path)); unset($this->objects[$path]); @@ -400,17 +400,17 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } } - public function fopen($path,$mode){ + public function fopen($path,$mode) { $obj=$this->getObject($path); - if(is_null($obj)){ + if(is_null($obj)) { return false; } - switch($mode){ + switch($mode) { case 'r': case 'rb': $fp = fopen('php://temp', 'r+'); $obj->stream($fp); - + rewind($fp); return $fp; case 'w': @@ -432,61 +432,61 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } } - public function writeBack($tmpFile){ - if(isset(self::$tempFiles[$tmpFile])){ + public function writeBack($tmpFile) { + if(isset(self::$tempFiles[$tmpFile])) { $this->fromTmpFile($tmpFile,self::$tempFiles[$tmpFile]); unlink($tmpFile); } } - public function free_space($path){ + public function free_space($path) { return 0; } - 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(); } - + //emulate setting mtime with metadata $obj->metadata['Mtime']=$mtime; $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)); 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){ + if($result) { $targetObj=$this->getObject($path2); $this->resetMTime($targetObj); } return $result; } - public function stat($path){ + public function stat($path) { $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{ $mtime=strtotime($obj->last_modified); @@ -498,9 +498,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ ); } - private function getTmpFile($path){ + 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; @@ -509,9 +509,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ } } - 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); @@ -522,8 +522,8 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ * remove custom mtime metadata * @param CF_Object obj */ - private function resetMTime($obj){ - if(isset($obj->metadata['Mtime'])){ + private function resetMTime($obj) { + 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 e3f73c5c0a..3c18b227fa 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -18,8 +18,8 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ private $client; private static $tempFiles=array(); - - public function __construct($params){ + + public function __construct($params) { $host = $params['host']; //remove leading http[s], will be generated in createBaseUri() if (substr($host,0,8) == "https://") $host = substr($host, 8); @@ -29,13 +29,13 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->password=$params['password']; $this->secure=(isset($params['secure']) && $params['secure'] == 'true')?true: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.='/'; } - + $settings = array( 'baseUri' => $this->createBaseUri(), 'userName' => $this->user, @@ -43,7 +43,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ ); $this->client = new OC_Connector_Sabre_Client($settings); - + if($caview = \OCP\Files::getStorage('files_external')) { $certPath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("").'rootcerts.crt'; if (file_exists($certPath)) { @@ -54,26 +54,26 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->mkdir(''); } - private function createBaseUri(){ + private function createBaseUri() { $baseUri='http'; - if($this->secure){ + if($this->secure) { $baseUri.='s'; } $baseUri.='://'.$this->host.$this->root; return $baseUri; } - public function mkdir($path){ + public function mkdir($path) { $path=$this->cleanPath($path); return $this->simpleResponse('MKCOL',$path,null,201); } - public function rmdir($path){ + public function rmdir($path) { $path=$this->cleanPath($path); return $this->simpleResponse('DELETE',$path,null,204); } - public function opendir($path){ + public function opendir($path) { $path=$this->cleanPath($path); try{ $response=$this->client->propfind($path, array(),1); @@ -81,54 +81,54 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ 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){ + public function filetype($path) { $path=$this->cleanPath($path); 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; } } - public function isReadable($path){ + public function isReadable($path) { return true;//not properly supported } - public function isUpdatable($path){ + public function isUpdatable($path) { return true;//not properly supported } - public function file_exists($path){ + public function file_exists($path) { $path=$this->cleanPath($path); try{ $this->client->propfind($path, array('{DAV:}resourcetype')); return true;//no 404 exception - }catch(Exception $e){ + }catch(Exception $e) { return false; } } - public function unlink($path){ + public function unlink($path) { return $this->simpleResponse('DELETE',$path,null,204); } - public function fopen($path,$mode){ + public function fopen($path,$mode) { $path=$this->cleanPath($path); - switch($mode){ + switch($mode) { case 'r': case 'rb': //straight up curl instead of sabredav here, sabredav put's the entire get result in memory @@ -155,14 +155,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{ $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; @@ -170,41 +170,41 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ } } - public function writeBack($tmpFile){ - if(isset(self::$tempFiles[$tmpFile])){ + public function writeBack($tmpFile) { + if(isset(self::$tempFiles[$tmpFile])) { $this->uploadFile($tmpFile,self::$tempFiles[$tmpFile]); unlink($tmpFile); } } - public function free_space($path){ + public function free_space($path) { $path=$this->cleanPath($path); 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{ 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(); @@ -218,13 +218,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{ $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); @@ -232,13 +232,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{ $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); @@ -246,7 +246,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ } } - public function stat($path){ + public function stat($path) { $path=$this->cleanPath($path); try{ $response=$this->client->propfind($path, array('{DAV:}getlastmodified','{DAV:}getcontentlength')); @@ -255,45 +255,44 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ 'size'=>(int)isset($response['{DAV:}getcontentlength']) ? $response['{DAV:}getcontentlength'] : 0, 'ctime'=>-1, ); - }catch(Exception $e){ + }catch(Exception $e) { return array(); } } - public function getMimeType($path){ + public function getMimeType($path) { $path=$this->cleanPath($path); 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{ return false; } - }catch(Exception $e){ + }catch(Exception $e) { return false; } } - private function cleanPath($path){ - if(!$path || $path[0]=='/'){ + private function cleanPath($path) { + if(!$path || $path[0]=='/') { return substr($path,1); }else{ return $path; } } - private function simpleResponse($method,$path,$body,$expected){ + private function simpleResponse($method,$path,$body,$expected) { $path=$this->cleanPath($path); 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 dec501741b..f0d76460f5 100755 --- a/apps/files_external/personal.php +++ b/apps/files_external/personal.php @@ -31,5 +31,3 @@ $tmpl->assign('mounts', OC_Mount_Config::getPersonalMountPoints()); $tmpl->assign('certs', OC_Mount_Config::getCertificates()); $tmpl->assign('backends', $backends); return $tmpl->fetchPage(); - -?> \ No newline at end of file diff --git a/apps/files_external/settings.php b/apps/files_external/settings.php index acc9036b29..b586ce1e8c 100644 --- a/apps/files_external/settings.php +++ b/apps/files_external/settings.php @@ -30,5 +30,3 @@ $tmpl->assign('groups', OC_Group::getGroups()); $tmpl->assign('users', OCP\User::getUsers()); $tmpl->assign('allowUserMounting', OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes')); return $tmpl->fetchPage(); - -?> \ No newline at end of file diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 397f0d951b..c44b09b180 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -80,9 +80,9 @@
- + - '> +
'> @@ -91,17 +91,17 @@ - + -
t('SSL root certificates'); ?>
><?php echo $l->t('Delete'); ?>
+ - + - +
/> diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php index 97796bca12..12f3ec3908 100644 --- a/apps/files_external/tests/ftp.php +++ b/apps/files_external/tests/ftp.php @@ -5,25 +5,24 @@ * later. * See the COPYING-README file. */ - + $config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']){ +if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']) { abstract class Test_Filestorage_FTP extends Test_FileStorage{} return; }else{ class Test_Filestorage_FTP extends Test_FileStorage { private $config; - public function setUp(){ + public function setUp() { $id=uniqid(); $this->config=include('apps/files_external/tests/config.php'); $this->config['ftp']['root'].='/'.$id;//make sure we have an new empty folder to work in $this->instance=new OC_Filestorage_FTP($this->config['ftp']); } - public function tearDown(){ + public function tearDown() { OCP\Files::rmdirr($this->instance->constructUrl('')); } } } - diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php index 806db5a6aa..d2a6358ade 100644 --- a/apps/files_external/tests/google.php +++ b/apps/files_external/tests/google.php @@ -21,24 +21,23 @@ */ $config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['google']) or !$config['google']['run']){ +if(!is_array($config) or !isset($config['google']) or !$config['google']['run']) { abstract class Test_Filestorage_Google extends Test_FileStorage{} return; }else{ class Test_Filestorage_Google extends Test_FileStorage { - + private $config; - public function setUp(){ + public function setUp() { $id=uniqid(); $this->config=include('apps/files_external/tests/config.php'); $this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in $this->instance=new OC_Filestorage_Google($this->config['google']); } - public function tearDown(){ + public function tearDown() { $this->instance->rmdir('/'); } } } - diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php index 001ef84227..7de4fddbb3 100644 --- a/apps/files_external/tests/smb.php +++ b/apps/files_external/tests/smb.php @@ -8,21 +8,21 @@ $config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['smb']) or !$config['smb']['run']){ +if(!is_array($config) or !isset($config['smb']) or !$config['smb']['run']) { abstract class Test_Filestorage_SMB extends Test_FileStorage{} return; }else{ class Test_Filestorage_SMB extends Test_FileStorage { private $config; - public function setUp(){ + public function setUp() { $id=uniqid(); $this->config=include('apps/files_external/tests/config.php'); $this->config['smb']['root'].=$id;//make sure we have an new empty folder to work in $this->instance=new OC_Filestorage_SMB($this->config['smb']); } - public function tearDown(){ + public function tearDown() { OCP\Files::rmdirr($this->instance->constructUrl('')); } } diff --git a/apps/files_external/tests/swift.php b/apps/files_external/tests/swift.php index 1520c9473d..a6f5eace1c 100644 --- a/apps/files_external/tests/swift.php +++ b/apps/files_external/tests/swift.php @@ -7,25 +7,24 @@ */ $config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']){ +if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']) { abstract class Test_Filestorage_SWIFT extends Test_FileStorage{} return; }else{ class Test_Filestorage_SWIFT extends Test_FileStorage { private $config; - public function setUp(){ + public function setUp() { $id=uniqid(); $this->config=include('apps/files_external/tests/config.php'); $this->config['swift']['root'].='/'.$id;//make sure we have an new empty folder to work in $this->instance=new OC_Filestorage_SWIFT($this->config['swift']); } - - public function tearDown(){ + + public function tearDown() { $this->instance->rmdir(''); } - + } } - diff --git a/apps/files_external/tests/test.php b/apps/files_external/tests/test.php deleted file mode 100644 index bd24404f3b..0000000000 --- a/apps/files_external/tests/test.php +++ /dev/null @@ -1,7 +0,0 @@ -"; -print_r(OC_Mount_Config::getSystemMountPoints()); -echo ""; -// OC_Mount_Config::addMountPoint('Photos', 'OC_Filestorage_SWIFT', array('host' => 'gapinthecloud.com', 'user' => 'Gap', 'token' => '23423afdasFJEW22', 'secure' => 'true', 'root' => ''), OC_Mount_Config::MOUNT_TYPE_GROUP, 'admin', false); -?> diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php index 14abbef2cb..74d980aa3f 100644 --- a/apps/files_external/tests/webdav.php +++ b/apps/files_external/tests/webdav.php @@ -7,23 +7,22 @@ */ $config=include('apps/files_external/tests/config.php'); -if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run']){ +if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run']) { abstract class Test_Filestorage_DAV extends Test_FileStorage{} return; }else{ class Test_Filestorage_DAV extends Test_FileStorage { private $config; - public function setUp(){ + public function setUp() { $id=uniqid(); $this->config=include('apps/files_external/tests/config.php'); $this->config['webdav']['root'].='/'.$id;//make sure we have an new empty folder to work in $this->instance=new OC_Filestorage_DAV($this->config['webdav']); } - public function tearDown(){ + public function tearDown() { $this->instance->rmdir('/'); } } } - diff --git a/apps/files_sharing/ajax/togglesharewitheveryone.php b/apps/files_sharing/ajax/togglesharewitheveryone.php deleted file mode 100644 index 96c43711cb..0000000000 --- a/apps/files_sharing/ajax/togglesharewitheveryone.php +++ /dev/null @@ -1,11 +0,0 @@ - - - *dbname* - true - false - utf8 - - *dbprefix*sharing - - - uid_owner - text - true - 64 - - - uid_shared_with - text - true - 64 - - - source - text - true - 128 - - - target - text - true - 128 - - - permissions - integer - true - 1 - - -
-
diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index e31d3299f5..6a8fc89ada 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -12,7 +12,7 @@ - get.php - get.php + public.php + public.php diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index b43269d69f..eabd1167c9 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -1,16 +1,47 @@ execute(); + $groupShares = array(); + while ($row = $result->fetchRow()) { + $itemSource = OC_FileCache::getId($row['source'], ''); + if ($itemSource != -1) { + $file = OC_FileCache::get($row['source'], ''); + if ($file['mimetype'] == 'httpd/unix-directory') { + $itemType = 'folder'; + } else { + $itemType = 'file'; + } + if ($row['permissions'] == 0) { + $permissions = OCP\Share::PERMISSION_READ; + } else { + $permissions = OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_UPDATE; + if ($itemType == 'folder') { + $permissions |= OCP\Share::PERMISSION_CREATE; + } + } + $pos = strrpos($row['uid_shared_with'], '@'); + if ($pos !== false && OC_Group::groupExists(substr($row['uid_shared_with'], $pos + 1))) { + $shareType = OCP\Share::SHARE_TYPE_GROUP; + $shareWith = substr($row['uid_shared_with'], 0, $pos); + if (isset($groupShares[$shareWith][$itemSource])) { + continue; + } else { + $groupShares[$shareWith][$itemSource] = true; + } + } else if ($row['uid_shared_with'] == 'public') { + $shareType = OCP\Share::SHARE_TYPE_LINK; + $shareWith = null; + } else { + $shareType = OCP\Share::SHARE_TYPE_USER; + $shareWith = $row['uid_shared_with']; + } + OC_User::setUserId($row['uid_owner']); + OCP\Share::shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions); + } } + // NOTE: Let's drop the table after more testing +// $query = OCP\DB::prepare('DROP TABLE `*PREFIX*sharing`'); +// $query->execute(); } \ No newline at end of file diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version index f4778493c5..9fc80f937f 100644 --- a/apps/files_sharing/appinfo/version +++ b/apps/files_sharing/appinfo/version @@ -1 +1 @@ -0.2.2 \ No newline at end of file +0.3.2 \ No newline at end of file diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index aa76c06175..a700cc2169 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -1,2 +1,8 @@ -#content { position:relative; } -#preview p { text-align: center; } \ No newline at end of file +body { background:#ddd; } +#header { position:fixed; top:0; left:0; right:0; z-index:100; height:2.5em; line-height:2.5em; padding:.5em; background:#1d2d44; -moz-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; } +#details { color:#fff; } +#header #download { margin-left:2em; font-weight:bold; color:#fff; } +#preview { min-height:30em; margin:50px auto; padding-top:2em; border-bottom:1px solid #f8f8f8; background:#eee; text-align:center; } +#noPreview { display:none; padding-top:5em; } +p.info { width:22em; text-align: center; margin:2em auto; color:#777; text-shadow:#fff 0 1px 0; } +p.info a { font-weight:bold; color:#777; } \ No newline at end of file diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 755382e073..92b626bba1 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -10,8 +10,12 @@ $(document).ready(function() { // Show file preview if previewer is available, images are already handled by the template if (mimetype.substr(0, mimetype.indexOf('/')) != 'image') { // Trigger default action if not download TODO - var action = FileActions.getDefault(mimetype, 'file', FileActions.PERMISSION_READ); - action($('#filename').val()); + var action = FileActions.getDefault(mimetype, 'file', OC.PERMISSION_READ); + if (typeof action === 'undefined') { + $('#noPreview').show(); + } else { + action($('#filename').val()); + } } } diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 79ab4adeba..9d0e2c90f8 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -2,7 +2,7 @@ $(document).ready(function() { if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined') { OC.Share.loadIcons('file'); - FileActions.register('all', 'Share', FileActions.PERMISSION_READ, function(filename) { + FileActions.register('all', 'Share', OC.PERMISSION_READ, function(filename) { // Return the correct sharing icon if (scanFiles.scanning) { return; } // workaround to prevent additional http request block scanning feedback if ($('#dir').val() == '/') { @@ -39,8 +39,10 @@ $(document).ready(function() { var tr = $('tr').filterAttr('data-file', filename); if ($(tr).data('type') == 'dir') { var itemType = 'folder'; + var link = false; } else { var itemType = 'file'; + var link = true; } var possiblePermissions = $(tr).data('permissions'); var appendTo = $(tr).find('td.filename'); @@ -49,14 +51,14 @@ $(document).ready(function() { if (item != $('#dropdown').data('item')) { OC.Share.hideDropDown(function () { $(tr).addClass('mouseOver'); - OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions); + OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, link, possiblePermissions); }); } else { OC.Share.hideDropDown(); } } else { $(tr).addClass('mouseOver'); - OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions); + OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, link, possiblePermissions); } }); } diff --git a/apps/files_sharing/l10n/ca.php b/apps/files_sharing/l10n/ca.php index 6931389b9c..f00d0d7263 100644 --- a/apps/files_sharing/l10n/ca.php +++ b/apps/files_sharing/l10n/ca.php @@ -1,6 +1,7 @@ "Mida", -"Modified" => "Modificat", -"Delete all" => "Esborra-ho tot", -"Delete" => "Elimina" +"Password" => "Contrasenya", +"Submit" => "Envia", +"Download" => "Baixa", +"No preview available for" => "No hi ha vista prèvia disponible per a", +"web services under your control" => "controleu els vostres serveis web" ); diff --git a/apps/files_sharing/l10n/cs_CZ.php b/apps/files_sharing/l10n/cs_CZ.php index 7c5828a613..e9185e979c 100644 --- a/apps/files_sharing/l10n/cs_CZ.php +++ b/apps/files_sharing/l10n/cs_CZ.php @@ -1,6 +1,7 @@ "Velikost", -"Modified" => "Upraveno", -"Delete all" => "Smazat vše", -"Delete" => "Smazat" +"Password" => "Heslo", +"Submit" => "Odeslat", +"Download" => "Stáhnout", +"No preview available for" => "Náhled není dostupný pro", +"web services under your control" => "služby webu pod Vaší kontrolou" ); diff --git a/apps/files_sharing/l10n/de.php b/apps/files_sharing/l10n/de.php index d42383b43b..90dce8ec62 100644 --- a/apps/files_sharing/l10n/de.php +++ b/apps/files_sharing/l10n/de.php @@ -1,6 +1,7 @@ "Größe", -"Modified" => "Geändert", -"Delete all" => "Alle löschen", -"Delete" => "Löschen" +"Password" => "Passwort", +"Submit" => "Absenden", +"Download" => "Download", +"No preview available for" => "Es ist keine Vorschau verfügbar für", +"web services under your control" => "Web-Services unter Ihrer Kontrolle" ); diff --git a/apps/files_sharing/l10n/el.php b/apps/files_sharing/l10n/el.php index 63f4c61204..123a008e55 100644 --- a/apps/files_sharing/l10n/el.php +++ b/apps/files_sharing/l10n/el.php @@ -1,6 +1,4 @@ "Μέγεθος", -"Modified" => "Τροποποιήθηκε", -"Delete all" => "Διαγραφή όλων", -"Delete" => "Διαγραφή" +"Password" => "Συνθηματικό", +"Submit" => "Καταχώρηση" ); diff --git a/apps/files_sharing/l10n/eo.php b/apps/files_sharing/l10n/eo.php index 81a8dcb152..e71715f0f1 100644 --- a/apps/files_sharing/l10n/eo.php +++ b/apps/files_sharing/l10n/eo.php @@ -1,3 +1,7 @@ "Forigi" +"Password" => "Pasvorto", +"Submit" => "Sendi", +"Download" => "Elŝuti", +"No preview available for" => "Ne haveblas antaŭvido por", +"web services under your control" => "TTT-servoj regataj de vi" ); diff --git a/apps/files_sharing/l10n/es.php b/apps/files_sharing/l10n/es.php index 85f880927d..b1d44e5485 100644 --- a/apps/files_sharing/l10n/es.php +++ b/apps/files_sharing/l10n/es.php @@ -1,6 +1,7 @@ "Tamaño", -"Modified" => "Modificado", -"Delete all" => "Eliminar todo", -"Delete" => "Eliminar" +"Password" => "Contraseña", +"Submit" => "Enviar", +"Download" => "Descargar", +"No preview available for" => "No hay vista previa disponible para", +"web services under your control" => "Servicios web bajo su control" ); diff --git a/apps/files_sharing/l10n/et_EE.php b/apps/files_sharing/l10n/et_EE.php index da299f4ff7..94b9b1d7ae 100644 --- a/apps/files_sharing/l10n/et_EE.php +++ b/apps/files_sharing/l10n/et_EE.php @@ -1,3 +1,7 @@ "Kustutamine" +"Password" => "Parool", +"Submit" => "Saada", +"Download" => "Lae alla", +"No preview available for" => "Eelvaadet pole saadaval", +"web services under your control" => "veebitenused sinu kontrolli all" ); diff --git a/apps/files_sharing/l10n/eu.php b/apps/files_sharing/l10n/eu.php index 916c3151dc..70ff2e8876 100644 --- a/apps/files_sharing/l10n/eu.php +++ b/apps/files_sharing/l10n/eu.php @@ -1,6 +1,7 @@ "Tamaina", -"Modified" => "Aldatuta", -"Delete all" => "Ezabatu dena", -"Delete" => "Ezabatu" +"Password" => "Pasahitza", +"Submit" => "Bidali", +"Download" => "Deskargatu", +"No preview available for" => "Ez dago aurrebista eskuragarririk hauentzat ", +"web services under your control" => "web zerbitzuak zure kontrolpean" ); diff --git a/apps/files_sharing/l10n/fi_FI.php b/apps/files_sharing/l10n/fi_FI.php index ca7928aeec..85c6c7a713 100644 --- a/apps/files_sharing/l10n/fi_FI.php +++ b/apps/files_sharing/l10n/fi_FI.php @@ -1,6 +1,7 @@ "Koko", -"Modified" => "Muokattu", -"Delete all" => "Poista kaikki", -"Delete" => "Poista" +"Password" => "Salasana", +"Submit" => "Lähetä", +"Download" => "Lataa", +"No preview available for" => "Ei esikatselua kohteelle", +"web services under your control" => "verkkopalvelut hallinnassasi" ); diff --git a/apps/files_sharing/l10n/fr.php b/apps/files_sharing/l10n/fr.php index 5a90331e42..54d9e9ec56 100644 --- a/apps/files_sharing/l10n/fr.php +++ b/apps/files_sharing/l10n/fr.php @@ -1,6 +1,7 @@ "Taille", -"Modified" => "Modifié", -"Delete all" => "Tout effacer", -"Delete" => "Effacement" +"Password" => "Mot de passe", +"Submit" => "Envoyer", +"Download" => "Télécharger", +"No preview available for" => "Pas d'aperçu disponible pour", +"web services under your control" => "services web sous votre contrôle" ); diff --git a/apps/files_sharing/l10n/he.php b/apps/files_sharing/l10n/he.php new file mode 100644 index 0000000000..68a337241d --- /dev/null +++ b/apps/files_sharing/l10n/he.php @@ -0,0 +1,7 @@ + "ססמה", +"Submit" => "שליחה", +"Download" => "הורדה", +"No preview available for" => "אין תצוגה מקדימה זמינה עבור", +"web services under your control" => "שירותי רשת תחת השליטה שלך" +); diff --git a/apps/files_sharing/l10n/it.php b/apps/files_sharing/l10n/it.php index 7f91b85678..5bedabde9b 100644 --- a/apps/files_sharing/l10n/it.php +++ b/apps/files_sharing/l10n/it.php @@ -1,6 +1,7 @@ "Dimensione", -"Modified" => "Modificato", -"Delete all" => "Elimina tutto", -"Delete" => "Eliminazione" +"Password" => "Password", +"Submit" => "Invia", +"Download" => "Scarica", +"No preview available for" => "Nessuna anteprima disponibile per", +"web services under your control" => "servizi web nelle tue mani" ); diff --git a/apps/files_sharing/l10n/ja_JP.php b/apps/files_sharing/l10n/ja_JP.php index 9fca88d0a3..5d63f371d5 100644 --- a/apps/files_sharing/l10n/ja_JP.php +++ b/apps/files_sharing/l10n/ja_JP.php @@ -1,6 +1,7 @@ "サイズ", -"Modified" => "変更", -"Delete all" => "すべて削除", -"Delete" => "削除" +"Password" => "パスワード", +"Submit" => "送信", +"Download" => "ダウンロード", +"No preview available for" => "プレビューはありません", +"web services under your control" => "管理下のウェブサービス" ); diff --git a/apps/files_sharing/l10n/nl.php b/apps/files_sharing/l10n/nl.php index d357d66f67..2f732ed662 100644 --- a/apps/files_sharing/l10n/nl.php +++ b/apps/files_sharing/l10n/nl.php @@ -1,6 +1,7 @@ "Grootte", -"Modified" => "Aangepast", -"Delete all" => "Verwijder alles", -"Delete" => "Vewijder" +"Password" => "Wachtwoord", +"Submit" => "Verzenden", +"Download" => "Downloaden", +"No preview available for" => "Geen voorbeeldweergave beschikbaar voor", +"web services under your control" => "Webdiensten in eigen beheer" ); diff --git a/apps/files_sharing/l10n/pl.php b/apps/files_sharing/l10n/pl.php index 7f612126b9..1d5e6261ef 100644 --- a/apps/files_sharing/l10n/pl.php +++ b/apps/files_sharing/l10n/pl.php @@ -1,6 +1,7 @@ "Rozmiar", -"Modified" => "Zmodyfikowane", -"Delete all" => "Usuń wszystko", -"Delete" => "Usuń" +"Password" => "Hasło", +"Submit" => "Wyślij", +"Download" => "Pobierz", +"No preview available for" => "Podgląd nie jest dostępny dla", +"web services under your control" => "Kontrolowane serwisy" ); diff --git a/apps/files_sharing/l10n/ru.php b/apps/files_sharing/l10n/ru.php index 796403ae99..398d9a8bbc 100644 --- a/apps/files_sharing/l10n/ru.php +++ b/apps/files_sharing/l10n/ru.php @@ -1,6 +1,7 @@ "Размер", -"Modified" => "Изменён", -"Delete all" => "Удалить все", -"Delete" => "Удалить" +"Password" => "Пароль", +"Submit" => "Отправить", +"Download" => "Скачать", +"No preview available for" => "Предпросмотр недоступен для", +"web services under your control" => "веб-сервисы под вашим управлением" ); diff --git a/apps/files_sharing/l10n/sk_SK.php b/apps/files_sharing/l10n/sk_SK.php new file mode 100644 index 0000000000..ec9fc31c87 --- /dev/null +++ b/apps/files_sharing/l10n/sk_SK.php @@ -0,0 +1,7 @@ + "Heslo", +"Submit" => "Odoslať", +"Download" => "Stiahnuť", +"No preview available for" => "Žiaden náhľad k dispozícii pre", +"web services under your control" => "webové služby pod Vašou kontrolou" +); diff --git a/apps/files_sharing/l10n/sl.php b/apps/files_sharing/l10n/sl.php index a241c6e504..5e7d2d5004 100644 --- a/apps/files_sharing/l10n/sl.php +++ b/apps/files_sharing/l10n/sl.php @@ -1,6 +1,7 @@ "Velikost", -"Modified" => "Spremenjeno", -"Delete all" => "Izbriši vse", -"Delete" => "Izbriši" +"Password" => "Geslo", +"Submit" => "Pošlji", +"Download" => "Prenesi", +"No preview available for" => "Predogled ni na voljo za", +"web services under your control" => "spletne storitve pod vašim nadzorom" ); diff --git a/apps/files_sharing/l10n/sv.php b/apps/files_sharing/l10n/sv.php index 5a2cda4368..78b1983649 100644 --- a/apps/files_sharing/l10n/sv.php +++ b/apps/files_sharing/l10n/sv.php @@ -1,6 +1,7 @@ "Storlek", -"Modified" => "Ändrad", -"Delete all" => "Radera alla", -"Delete" => "Radera" +"Password" => "Lösenord", +"Submit" => "Skicka", +"Download" => "Ladda ner", +"No preview available for" => "Ingen förhandsgranskning tillgänglig för", +"web services under your control" => "webbtjänster under din kontroll" ); diff --git a/apps/files_sharing/l10n/th_TH.php b/apps/files_sharing/l10n/th_TH.php index 3f8908a91a..8a3f1207db 100644 --- a/apps/files_sharing/l10n/th_TH.php +++ b/apps/files_sharing/l10n/th_TH.php @@ -1,6 +1,7 @@ "ขนาด", -"Modified" => "แก้ไขแล้ว", -"Delete all" => "ลบทั้งหมด", -"Delete" => "ลบ" +"Password" => "รหัสผ่าน", +"Submit" => "ส่ง", +"Download" => "ดาวน์โหลด", +"No preview available for" => "ไม่สามารถดูตัวอย่างได้สำหรับ", +"web services under your control" => "เว็บเซอร์วิสที่คุณควบคุมการใช้งานได้" ); diff --git a/apps/files_sharing/l10n/uk.php b/apps/files_sharing/l10n/uk.php new file mode 100644 index 0000000000..43b86a28c1 --- /dev/null +++ b/apps/files_sharing/l10n/uk.php @@ -0,0 +1,4 @@ + "Пароль", +"Download" => "Завантажити" +); diff --git a/apps/files_sharing/l10n/vi.php b/apps/files_sharing/l10n/vi.php new file mode 100644 index 0000000000..d4faee06bf --- /dev/null +++ b/apps/files_sharing/l10n/vi.php @@ -0,0 +1,7 @@ + "Mật khẩu", +"Submit" => "Xác nhậ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 new file mode 100644 index 0000000000..27fa634c03 --- /dev/null +++ b/apps/files_sharing/l10n/zh_TW.php @@ -0,0 +1,6 @@ + "密碼", +"Submit" => "送出", +"Download" => "下載", +"No preview available for" => "無法預覽" +); diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index 5005d9a39d..2149da1d73 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -27,10 +27,10 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { const FORMAT_OPENDIR = 3; private $path; - + public function isValidSource($itemSource, $uidOwner) { $path = OC_FileCache::getPath($itemSource, $uidOwner); - if (OC_Filesystem::file_exists($path)) { + if ($path) { $this->path = $path; return true; } @@ -46,9 +46,25 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { return false; } - public function generateTarget($itemSource, $shareWith, $exclude = null) { - // TODO Make sure target path doesn't exist already - return $itemSource; + public function generateTarget($filePath, $shareWith, $exclude = null) { + $target = $filePath; + if (isset($exclude)) { + if ($pos = strrpos($target, '.')) { + $name = substr($target, 0, $pos); + $ext = substr($target, $pos); + } else { + $name = $filePath; + $ext = ''; + } + $i = 2; + $append = ''; + while (in_array($name.$append.$ext, $exclude)) { + $append = ' ('.$i.')'; + $i++; + } + $target = $name.$append.$ext; + } + return $target; } public function formatItems($items, $format, $parameters = null) { @@ -75,6 +91,8 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { // Remove Create permission if type is file $file['permissions'] &= ~OCP\Share::PERMISSION_CREATE; } + // NOTE: Temporary fix to allow unsharing of files in root of Shared directory + $file['permissions'] |= OCP\Share::PERMISSION_DELETE; $files[] = $file; } return $files; @@ -94,7 +112,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { $files[] = basename($item['file_target']); } return $files; - } + } return array(); } diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php index 665583e83a..e29e9b7e00 100644 --- a/apps/files_sharing/lib/share/folder.php +++ b/apps/files_sharing/lib/share/folder.php @@ -19,7 +19,7 @@ * License along with this library. If not, see . */ -class OC_Share_Backend_Folder extends OC_Share_Backend_File { +class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share_Backend_Collection { public function formatItems($items, $format, $parameters = null) { if ($format == self::FORMAT_SHARED_STORAGE) { @@ -50,12 +50,22 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File { } public function getChildren($itemSource) { - $files = OC_FileCache::getFolderContent($itemSource); - $sources = array(); - foreach ($files as $file) { - $sources[] = $file['path']; + $children = array(); + $parents = array($itemSource); + while (!empty($parents)) { + $parents = "'".implode("','", $parents)."'"; + $query = OC_DB::prepare('SELECT `id`, `name`, `mimetype` FROM `*PREFIX*fscache` WHERE `parent` IN ('.$parents.')'); + $result = $query->execute(); + $parents = array(); + while ($file = $result->fetchRow()) { + $children[] = array('source' => $file['id'], 'file_path' => $file['name']); + // If a child folder is found look inside it + if ($file['mimetype'] == 'httpd/unix-directory') { + $parents[] = $file['id']; + } + } } - return $sources; + return $children; } } \ No newline at end of file diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index a3a8750d27..6dba76955a 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -24,13 +24,12 @@ * Convert target path to source path and pass the function call to the correct storage provider */ class OC_Filestorage_Shared extends OC_Filestorage_Common { - + private $sharedFolder; private $files = array(); - + public function __construct($arguments) { $this->sharedFolder = $arguments['sharedFolder']; - OC_Util::setupFS4all(); } /** @@ -78,6 +77,8 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { private function getSourcePath($target) { $file = $this->getFile($target); if (isset($file['path'])) { + $uid = substr($file['path'], 1, strpos($file['path'], '/', 1) - 1); + OC_Filesystem::mount('OC_Filestorage_Local', array('datadir' => OC_User::getHome($uid)), $uid); return $file['path']; } return false; @@ -106,17 +107,17 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { $internalPath = substr($path, strlen($mountPoint)); return $internalPath; } - + public function mkdir($path) { if ($path == '' || $path == '/' || !$this->isCreatable(dirname($path))) { - return false; + return false; } else if ($source = $this->getSourcePath($path)) { $storage = OC_Filesystem::getStorage($source); return $storage->mkdir($this->getInternalPath($source)); } return false; } - + public function rmdir($path) { if (($source = $this->getSourcePath($path)) && $this->isDeletable($path)) { $storage = OC_Filesystem::getStorage($source); @@ -124,7 +125,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { } return false; } - + public function opendir($path) { if ($path == '' || $path == '/') { $files = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_Folder::FORMAT_OPENDIR); @@ -208,7 +209,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { public function isDeletable($path) { if ($path == '') { - return false; + return true; } return ($this->getPermissions($path) & OCP\Share::PERMISSION_DELETE); } @@ -229,10 +230,10 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { } return false; } - + public function filectime($path) { if ($path == '' || $path == '/') { - $ctime = 0; + $ctime = 0; if ($dh = $this->opendir($path)) { while (($filename = readdir($dh)) !== false) { $tempctime = $this->filectime($filename); @@ -250,10 +251,10 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { } } } - + public function filemtime($path) { if ($path == '' || $path == '/') { - $mtime = 0; + $mtime = 0; if ($dh = $this->opendir($path)) { while (($filename = readdir($dh)) !== false) { $tempmtime = $this->filemtime($filename); @@ -271,7 +272,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { } } } - + public function file_get_contents($path) { $source = $this->getSourcePath($path); if ($source) { @@ -284,7 +285,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { return $storage->file_get_contents($this->getInternalPath($source)); } } - + public function file_put_contents($path, $data) { if ($source = $this->getSourcePath($path)) { // Check if permission is granted @@ -302,16 +303,26 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { } return false; } - + public function unlink($path) { // Delete the file if DELETE permission is granted - if (($source = $this->getSourcePath($path)) && $this->isDeletable($path)) { - $storage = OC_Filesystem::getStorage($source); - return $storage->unlink($this->getInternalPath($source)); + if ($source = $this->getSourcePath($path)) { + if ($this->isDeletable($path)) { + $storage = OC_Filesystem::getStorage($source); + return $storage->unlink($this->getInternalPath($source)); + } else if (dirname($path) == '/' || dirname($path) == '.') { + // Unshare the file from the user if in the root of the Shared folder + if ($this->is_dir($path)) { + $itemType = 'folder'; + } else { + $itemType = 'file'; + } + return OCP\Share::unshareFromSelf($itemType, $path); + } } return false; } - + public function rename($path1, $path2) { // Renaming/moving is only allowed within shared folders $pos1 = strpos($path1, '/', 1); @@ -344,7 +355,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { } return false; } - + public function copy($path1, $path2) { // Copy the file if CREATE permission is granted if ($this->isCreatable(dirname($path2))) { @@ -432,7 +443,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 15dac576d9..010f6b9de1 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -6,9 +6,8 @@ if (isset($_GET['file'])) { $uidOwner = substr($_GET['file'], 1, $pos - 1); if (OCP\User::userExists($uidOwner)) { OC_Util::setupFS($uidOwner); - $file = substr($_GET['file'], $pos); $fileSource = OC_Filecache::getId($_GET['file'], ''); - if ($linkItem = OCP\Share::getItemSharedWithByLink('file', $fileSource, $uidOwner)) { + if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink('file', $fileSource, $uidOwner))) { if (isset($linkItem['share_with'])) { // Check password if (isset($_POST['password'])) { @@ -18,14 +17,19 @@ if (isset($_GET['file'])) { $hasher = new PasswordHash(8, $forcePortable); if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $storedHash))) { $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); + $tmpl->assign('URL', OCP\Util::linkToPublic('files').'&file='.$_GET['file']); $tmpl->assign('error', true); $tmpl->printPage(); exit(); + } else { + // Save item id in session for future requests + $_SESSION['public_link_authenticated'] = $linkItem['id']; } - // Continue on if password is valid - } else { + // 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', OCP\Util::linkToPublic('files').'&file='.$_GET['file']); $tmpl->printPage(); exit(); } @@ -45,7 +49,8 @@ if (isset($_GET['file'])) { OCP\Util::addStyle('files_sharing', 'public'); OCP\Util::addScript('files_sharing', 'public'); OCP\Util::addScript('files', 'fileactions'); - $tmpl = new OCP\Template('files_sharing', 'public', 'guest'); + $tmpl = new OCP\Template('files_sharing', 'public', 'base'); + $tmpl->assign('details', $uidOwner.' shared the file '.basename($path).' with you'); $tmpl->assign('owner', $uidOwner); $tmpl->assign('name', basename($path)); // Show file list @@ -66,4 +71,4 @@ if (isset($_GET['file'])) { } header('HTTP/1.0 404 Not Found'); $tmpl = new OCP\Template('', '404', 'guest'); -$tmpl->printPage(); \ No newline at end of file +$tmpl->printPage(); diff --git a/apps/files_sharing/templates/authenticate.php b/apps/files_sharing/templates/authenticate.php index 41064d5146..9695caebf1 100644 --- a/apps/files_sharing/templates/authenticate.php +++ b/apps/files_sharing/templates/authenticate.php @@ -1,4 +1,4 @@ -
+

diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 065818c220..ca48a35575 100755 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -2,12 +2,24 @@ +

-

shared the file with you

-
-
+ +
+
-Download \ No newline at end of file +

ownCloudt('web services under your control'); ?>

\ No newline at end of file diff --git a/apps/files_versions/ajax/expireAll.php b/apps/files_versions/ajax/expireAll.php index 2a678c7f0a..5c95885ffb 100644 --- a/apps/files_versions/ajax/expireAll.php +++ b/apps/files_versions/ajax/expireAll.php @@ -31,14 +31,14 @@ OCP\JSON::callCheck(); $versions = new OCA_Versions\Storage(); -if( $versions->expireAll() ){ - +if( $versions->expireAll() ) { + OCP\JSON::success(); die(); - + } else { - + OCP\JSON::error(); die(); - + } \ No newline at end of file diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php index 1a0e21732c..8476e5e8a5 100644 --- a/apps/files_versions/ajax/getVersions.php +++ b/apps/files_versions/ajax/getVersions.php @@ -9,19 +9,19 @@ if( OCA_Versions\Storage::isversioned( $source ) ) { $count=5; //show the newest revisions $versions = OCA_Versions\Storage::getVersions( $source, $count); $versionsFormatted = array(); - + foreach ( $versions AS $version ) { $versionsFormatted[] = OCP\Util::formatDate( $version['version'] ); } $versionsSorted = array_reverse( $versions ); - + if ( !empty( $versionsSorted ) ) { OCP\JSON::encodedPrint($versionsSorted); } - + } else { return; - + } diff --git a/apps/files_versions/ajax/rollbackVersion.php b/apps/files_versions/ajax/rollbackVersion.php index 24d71a914a..f1b02eb4b9 100644 --- a/apps/files_versions/ajax/rollbackVersion.php +++ b/apps/files_versions/ajax/rollbackVersion.php @@ -9,7 +9,7 @@ $file = $_GET['file']; $revision=(int)$_GET['revision']; if( OCA_Versions\Storage::isversioned( $file ) ) { - if(OCA_Versions\Storage::rollback( $file, $revision )){ + if(OCA_Versions\Storage::rollback( $file, $revision )) { OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file ))); }else{ OCP\JSON::error(array("data" => array( "message" => "Could not revert:" . $file ))); diff --git a/apps/files_versions/appinfo/api.php b/apps/files_versions/appinfo/api.php index a7386bc2c9..3c45ff5245 100644 --- a/apps/files_versions/appinfo/api.php +++ b/apps/files_versions/appinfo/api.php @@ -32,5 +32,3 @@ return array( ) ) ); - -?> \ No newline at end of file diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 9ac7f6d5cd..746f89a813 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -1,6 +1,6 @@ . - * + * */ OCP\User::checkLoggedIn( ); @@ -34,40 +34,40 @@ if ( isset( $_GET['path'] ) ) { // roll back to old version if button clicked if( isset( $_GET['revert'] ) ) { - - if( $versions->rollback( $path, $_GET['revert'] ) ) { - + + if( $versions->rollback( $path, $_GET['revert'] ) ) { + $tmpl->assign( 'outcome_stat', 'success' ); - + $tmpl->assign( 'outcome_msg', "File {$_GET['path']} was reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) ); - + } else { - + $tmpl->assign( 'outcome_stat', 'failure' ); - + $tmpl->assign( 'outcome_msg', "File {$_GET['path']} could not be reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) ); - + } - + } // show the history only if there is something to show if( OCA_Versions\Storage::isversioned( $path ) ) { - + $count = 999; //show the newest revisions $versions = OCA_Versions\Storage::getVersions( $path, $count); $tmpl->assign( 'versions', array_reverse( $versions ) ); - + }else{ - + $tmpl->assign( 'message', 'No old versions available' ); - + } }else{ - + $tmpl->assign( 'message', 'No path specified' ); - + } $tmpl->printPage( ); diff --git a/apps/files_versions/js/settings-personal.js b/apps/files_versions/js/settings-personal.js index 6ea8c1a950..1e6b036fda 100644 --- a/apps/files_versions/js/settings-personal.js +++ b/apps/files_versions/js/settings-personal.js @@ -2,16 +2,16 @@ $( document ).ready(function(){ // - $( '#expireAllBtn' ).click( - + $( '#expireAllBtn' ).click( + function( event ) { - + // Prevent page from reloading event.preventDefault(); - + // Show loading gif $('.expireAllLoading').show(); - + $.getJSON( OC.filePath('files_versions','ajax','expireAll.php'), function(result){ @@ -19,20 +19,20 @@ $( document ).ready(function(){ $('.expireAllLoading').hide(); $('#expireAllBtn').html('Expiration successful'); } else { - + // Cancel loading $('#expireAllBtn').html('Expiration failed'); - + // Show Dialog OC.dialogs.alert( - 'Something went wrong, your files may not have been expired', - 'An error has occurred', - function(){ - $('#expireAllBtn').html(t('files_versions', 'Expire all versions')+''); - } - ); + 'Something went wrong, your files may not have been expired', + 'An error has occurred', + function(){ + $('#expireAllBtn').html(t('files_versions', 'Expire all versions')+''); + } + ); } - } + } ); } ); diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index c5c1553f1a..1c8d083ea4 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -11,10 +11,10 @@ $(document).ready(function() { $(document).ready(function(){ if (typeof FileActions !== 'undefined') { // Add history button to files/index.php - FileActions.register('file','History', FileActions.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/history')},function(filename){ + FileActions.register('file','History', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/history');},function(filename){ if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback - + var file = $('#dir').val()+'/'+filename; // Check if drop down is already visible for a different file if (($('#dropdown').length > 0)) { @@ -35,7 +35,7 @@ $(document).ready(function(){ function createVersionsDropdown(filename, files) { var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ); - + var html = '
t('Help');?> diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php index 106459580f..b953127d86 100644 --- a/apps/user_ldap/tests/group_ldap.php +++ b/apps/user_ldap/tests/group_ldap.php @@ -21,15 +21,15 @@ */ class Test_Group_Ldap extends UnitTestCase { - function setUp(){ + function setUp() { OC_Group::clearBackends(); } - function testSingleBackend(){ + function testSingleBackend() { OC_Group::useBackend(new OCA\user_ldap\GROUP_LDAP()); $group_ldap = new OCA\user_ldap\GROUP_LDAP(); - $this->assertIsA(OC_Group::getGroups(),gettype(array())); + $this->assertIsA(OC_Group::getGroups(),gettype(array())); $this->assertIsA($group_ldap->getGroups(),gettype(array())); $this->assertFalse(OC_Group::inGroup('john','dosers'),gettype(false)); diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index a97df7b4fd..bacdb8b9ae 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -65,7 +65,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { * * Check if the password is correct without logging in the user */ - public function checkPassword($uid, $password){ + public function checkPassword($uid, $password) { //find out dn of the user name $filter = \OCP\Util::mb_str_replace('%uid', $uid, $this->connection->ldapLoginFilter, 'UTF-8'); $ldap_users = $this->fetchListOfUsers($filter, 'dn'); @@ -82,7 +82,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { //do we have a username for him/her? $ocname = $this->dn2username($dn); - if($ocname){ + if($ocname) { //update some settings, if necessary $this->updateQuota($dn); $this->updateEmail($dn); @@ -100,7 +100,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { * * Get a list of all users. */ - public function getUsers($search = '', $limit = 10, $offset = 0){ + public function getUsers($search = '', $limit = 10, $offset = 0) { $ldap_users = $this->connection->getFromCache('getUsers'); if(is_null($ldap_users)) { $ldap_users = $this->fetchListOfUsers($this->connection->ldapUserFilter, array($this->connection->ldapUserDisplayName, 'dn')); @@ -126,7 +126,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { * @param string $uid the username * @return boolean */ - public function userExists($uid){ + public function userExists($uid) { if($this->connection->isCached('userExists'.$uid)) { return $this->connection->getFromCache('userExists'.$uid); } @@ -161,6 +161,44 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { } /** + * @brief determine the user's home directory + * @param string $uid the owncloud username + * @return boolean + */ + private function determineHomeDir($uid) { + if(strpos($this->connection->homeFolderNamingRule, 'attr:') === 0) { + $attr = substr($this->connection->homeFolderNamingRule, strlen('attr:')); + $homedir = $this->readAttribute($this->username2dn($uid), $attr); + if($homedir) { + $homedir = \OCP\Config::getSystemValue( "datadirectory", \OC::$SERVERROOT."/data" ) . '/' . $homedir[0]; + \OCP\Config::setUserValue($uid, 'user_ldap', 'homedir', $homedir); + return $homedir; + } + } + + //fallback and default: username + $homedir = \OCP\Config::getSystemValue( "datadirectory", \OC::$SERVERROOT."/data" ) . '/' . $uid; + \OCP\Config::setUserValue($uid, 'user_ldap', 'homedir', $homedir); + return $homedir; + } + + /** + * @brief get the user's home directory + * @param string $uid the username + * @return boolean + */ + public function getHome($uid) { + if($this->userExists($uid)) { + $homedir = \OCP\Config::getUserValue($uid, 'user_ldap', 'homedir', false); + if(!$homedir) { + $homedir = $this->determineHomeDir($uid); + } + return $homedir; + } + return false; + } + + /** * @brief Check if backend implements actions * @param $actions bitwise-or'ed actions * @returns boolean @@ -169,7 +207,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { * compared with OC_USER_BACKEND_CREATE_USER etc. */ public function implementsActions($actions) { - return (bool)(OC_USER_BACKEND_CHECK_PASSWORD & $actions); + return (bool)((OC_USER_BACKEND_CHECK_PASSWORD | OC_USER_BACKEND_GET_HOME) & $actions); } } \ No newline at end of file diff --git a/apps/user_webdavauth/appinfo/app.php b/apps/user_webdavauth/appinfo/app.php index db1087449a..3ab323becc 100755 --- a/apps/user_webdavauth/appinfo/app.php +++ b/apps/user_webdavauth/appinfo/app.php @@ -21,7 +21,7 @@ * */ -require_once('apps/user_webdavauth/user_webdavauth.php'); +require_once 'apps/user_webdavauth/user_webdavauth.php'; OC_APP::registerAdmin('user_webdavauth','settings'); @@ -35,4 +35,3 @@ $entry = array( 'href' => OC_Helper::linkTo( "user_webdavauth", "settings.php" ), 'name' => 'WEBDAVAUTH' ); -?> diff --git a/apps/user_webdavauth/appinfo/info.xml b/apps/user_webdavauth/appinfo/info.xml index 77fe3b892c..dc555739f4 100755 --- a/apps/user_webdavauth/appinfo/info.xml +++ b/apps/user_webdavauth/appinfo/info.xml @@ -7,4 +7,5 @@ AGPL Frank Karlitschek 3 + true diff --git a/apps/user_webdavauth/settings.php b/apps/user_webdavauth/settings.php index 5bd1af53c9..4f1ddbbefd 100755 --- a/apps/user_webdavauth/settings.php +++ b/apps/user_webdavauth/settings.php @@ -22,9 +22,9 @@ */ print_r($_POST); -if($_POST){ +if($_POST) { - if(isset($_POST['webdav_url'])){ + if(isset($_POST['webdav_url'])) { OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url'])); } } @@ -34,7 +34,3 @@ $tmpl = new OC_Template( 'user_webdavauth', 'settings'); $tmpl->assign( 'webdav_url', OC_Config::getValue( "user_webdavauth_url" )); return $tmpl->fetchPage(); - - - -?> diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php index 71c503f940..c36d37c1fa 100755 --- a/apps/user_webdavauth/user_webdavauth.php +++ b/apps/user_webdavauth/user_webdavauth.php @@ -23,11 +23,11 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { protected $webdavauth_url; - + public function __construct() { $this->webdavauth_url = OC_Config::getValue( "user_webdavauth_url" ); } - + 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); @@ -45,14 +45,14 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { 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){ + if($headers==false) { OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to connect to WebDAV Url: "'.$this->webdavauth_url.'" ' ,3); - return false; + return false; } $returncode= substr($headers[0], 9, 3); @@ -64,22 +64,20 @@ 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 ){ + public function userExists( $uid ) { return false; } /* * we don´t know the users so all we can do it return an empty array here */ - public function getUsers(){ + public function getUsers() { $returnArray = array(); - + return $returnArray; } } - -?> diff --git a/core/ajax/appconfig.php b/core/ajax/appconfig.php index bf749be3e3..1b43afa74f 100644 --- a/core/ajax/appconfig.php +++ b/core/ajax/appconfig.php @@ -5,18 +5,18 @@ * See the COPYING-README file. */ -require_once ("../../lib/base.php"); +require_once "../../lib/base.php"; OC_Util::checkAdminUser(); OCP\JSON::callCheck(); $action=isset($_POST['action'])?$_POST['action']:$_GET['action']; $result=false; -switch($action){ +switch($action) { case 'getValue': - $result=OC_Appconfig::getValue($_GET['app'],$_GET['key'],$_GET['defaultValue']); + $result=OC_Appconfig::getValue($_GET['app'], $_GET['key'], $_GET['defaultValue']); break; case 'setValue': - $result=OC_Appconfig::setValue($_POST['app'],$_POST['key'],$_POST['value']); + $result=OC_Appconfig::setValue($_POST['app'], $_POST['key'], $_POST['value']); break; case 'getApps': $result=OC_Appconfig::getApps(); @@ -25,10 +25,10 @@ switch($action){ $result=OC_Appconfig::getKeys($_GET['app']); break; case 'hasKey': - $result=OC_Appconfig::hasKey($_GET['app'],$_GET['key']); + $result=OC_Appconfig::hasKey($_GET['app'], $_GET['key']); break; case 'deleteKey': - $result=OC_Appconfig::deleteKey($_POST['app'],$_POST['key']); + $result=OC_Appconfig::deleteKey($_POST['app'], $_POST['key']); break; case 'deleteApp': $result=OC_Appconfig::deleteApp($_POST['app']); diff --git a/core/ajax/share.php b/core/ajax/share.php index 8c2e85523e..b615cfd354 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -78,7 +78,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo $reshare = false; } if ($_GET['checkShares'] == 'true') { - $shares = OCP\Share::getItemShared($_GET['itemType'], $_GET['itemSource']); + $shares = OCP\Share::getItemShared($_GET['itemType'], $_GET['itemSource'], OCP\Share::FORMAT_NONE, null, true); } else { $shares = false; } @@ -88,23 +88,23 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo case 'getShareWith': if (isset($_GET['search'])) { $shareWith = array(); - if (OC_App::isEnabled('contacts')) { - // TODO Add function to contacts to only get the 'fullname' column to improve performance - $ids = OC_Contacts_Addressbook::activeIds(); - foreach ($ids as $id) { - $vcards = OC_Contacts_VCard::all($id); - foreach ($vcards as $vcard) { - $contact = $vcard['fullname']; - if (stripos($contact, $_GET['search']) !== false - && (!isset($_GET['itemShares']) - || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]) - || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]) - || !in_array($contact, $_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]))) { - $shareWith[] = array('label' => $contact, 'value' => array('shareType' => 5, 'shareWith' => $vcard['id'])); - } - } - } - } +// if (OC_App::isEnabled('contacts')) { +// // TODO Add function to contacts to only get the 'fullname' column to improve performance +// $ids = OC_Contacts_Addressbook::activeIds(); +// foreach ($ids as $id) { +// $vcards = OC_Contacts_VCard::all($id); +// foreach ($vcards as $vcard) { +// $contact = $vcard['fullname']; +// if (stripos($contact, $_GET['search']) !== false +// && (!isset($_GET['itemShares']) +// || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]) +// || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]) +// || !in_array($contact, $_GET['itemShares'][OCP\Share::SHARE_TYPE_CONTACT]))) { +// $shareWith[] = array('label' => $contact, 'value' => array('shareType' => 5, 'shareWith' => $vcard['id'])); +// } +// } +// } +// } $count = 0; $users = array(); $limit = 0; @@ -141,5 +141,3 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo break; } } - -?> \ No newline at end of file diff --git a/core/ajax/translations.php b/core/ajax/translations.php index 2bd6b7ed63..75679da2c0 100644 --- a/core/ajax/translations.php +++ b/core/ajax/translations.php @@ -22,7 +22,7 @@ */ // Init owncloud -require_once('../../lib/base.php'); +require_once '../../lib/base.php'; $app = $_POST["app"]; diff --git a/core/ajax/vcategories/add.php b/core/ajax/vcategories/add.php index e69f8bb726..81fa06dbf1 100644 --- a/core/ajax/vcategories/add.php +++ b/core/ajax/vcategories/add.php @@ -7,14 +7,14 @@ */ function bailOut($msg) { OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core','ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG); + OC_Log::write('core', 'ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG); exit(); } function debug($msg) { - OC_Log::write('core','ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG); + OC_Log::write('core', 'ajax/vcategories/add.php: '.$msg, OC_Log::DEBUG); } -require_once('../../../lib/base.php'); +require_once '../../../lib/base.php'; OC_JSON::checkLoggedIn(); $category = isset($_GET['category'])?strip_tags($_GET['category']):null; $app = isset($_GET['app'])?$_GET['app']:null; diff --git a/core/ajax/vcategories/delete.php b/core/ajax/vcategories/delete.php index a41fa083c3..cd46a25b79 100644 --- a/core/ajax/vcategories/delete.php +++ b/core/ajax/vcategories/delete.php @@ -8,14 +8,14 @@ function bailOut($msg) { OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core','ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG); + OC_Log::write('core', 'ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG); exit(); } function debug($msg) { - OC_Log::write('core','ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG); + OC_Log::write('core', 'ajax/vcategories/delete.php: '.$msg, OC_Log::DEBUG); } -require_once('../../../lib/base.php'); +require_once '../../../lib/base.php'; OC_JSON::checkLoggedIn(); $app = isset($_POST['app'])?$_POST['app']:null; $categories = isset($_POST['categories'])?$_POST['categories']:null; diff --git a/core/ajax/vcategories/edit.php b/core/ajax/vcategories/edit.php index 3e5540cbc2..a0e67841c5 100644 --- a/core/ajax/vcategories/edit.php +++ b/core/ajax/vcategories/edit.php @@ -8,14 +8,14 @@ function bailOut($msg) { OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('core','ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG); + OC_Log::write('core', 'ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG); exit(); } function debug($msg) { - OC_Log::write('core','ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG); + OC_Log::write('core', 'ajax/vcategories/edit.php: '.$msg, OC_Log::DEBUG); } -require_once('../../../lib/base.php'); +require_once '../../../lib/base.php'; OC_JSON::checkLoggedIn(); $app = isset($_GET['app'])?$_GET['app']:null; @@ -29,5 +29,5 @@ $tmpl = new OC_TEMPLATE("core", "edit_categories_dialog"); $vcategories = new OC_VCategories($app); $categories = $vcategories->categories(); debug(print_r($categories, true)); -$tmpl->assign('categories',$categories); +$tmpl->assign('categories', $categories); $tmpl->printpage(); diff --git a/core/css/share.css b/core/css/share.css index a8ffc8df42..cccc3585a4 100644 --- a/core/css/share.css +++ b/core/css/share.css @@ -15,4 +15,6 @@ a.showCruds { display:inline; opacity:.5; } a.showCruds:hover { opacity:1; } a.unshare { float:right; display:inline; padding:.3em 0 0 .3em !important; opacity:.5; } a.unshare:hover { opacity:1; } -#link { border-top:1px solid #ddd; padding-top:0.5em; } \ No newline at end of file +#link { border-top:1px solid #ddd; padding-top:0.5em; } +#dropdown input[type="text"], #dropdown input[type="password"] { width:90%; } +#linkText, #linkPass { display:none; } diff --git a/core/css/styles.css b/core/css/styles.css index 488ac48e4b..6bf3757df2 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -169,3 +169,8 @@ a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padd .arrow.left { left: -13px; bottom: 1.2em; -webkit-transform: rotate(270deg); -moz-transform: rotate(270deg); -o-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .arrow.up { top: -8px; right: 2em; } .arrow.down { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -o-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } + +/* ---- BREADCRUMB ---- */ +div.crumb { float:left; display:block; background:no-repeat right 0; padding:.75em 1.5em 0 1em; height:2.9em; } +div.crumb:first-child { padding-left:1em; } +div.crumb.last { font-weight:bold; } diff --git a/core/img/actions/clock.png b/core/img/actions/clock.png new file mode 100644 index 0000000000..671b3f4f0c Binary files /dev/null and b/core/img/actions/clock.png differ diff --git a/core/img/actions/clock.svg b/core/img/actions/clock.svg new file mode 100755 index 0000000000..1821f474df --- /dev/null +++ b/core/img/actions/clock.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/img/actions/lock.png b/core/img/actions/lock.png new file mode 100644 index 0000000000..511bfa615b Binary files /dev/null and b/core/img/actions/lock.png differ diff --git a/core/img/actions/lock.svg b/core/img/actions/lock.svg new file mode 100755 index 0000000000..8fb039b9e3 --- /dev/null +++ b/core/img/actions/lock.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/core/img/icon-error.png b/core/img/icon-error.png index 1ce0be0fb2..edeaceb169 100644 Binary files a/core/img/icon-error.png and b/core/img/icon-error.png differ diff --git a/core/img/icon-error.svg b/core/img/icon-error.svg index 6392d819ad..bba639bfd7 100644 --- a/core/img/icon-error.svg +++ b/core/img/icon-error.svg @@ -19,9 +19,9 @@ viewBox="0 0 32 31.999997" enable-background="new 0 0 595.275 311.111" xml:space="preserve" - inkscape:version="0.48.2 r9819" - sodipodi:docname="icon-error.svg" - inkscape:export-filename="/home/user/owncloud/core/img/icon-error.png" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="icon-error-light.svg" + inkscape:export-filename="/home/user/owncloud/core/img/icon-error-light.png" inkscape:export-xdpi="89.826416" inkscape:export-ydpi="89.826416"> @@ -289,7 +289,7 @@ x2="-2.4040222" y2="18.967093" /> diff --git a/core/img/icon-sync.png b/core/img/icon-sync.png index a3d0970424..c38ca87a23 100644 Binary files a/core/img/icon-sync.png and b/core/img/icon-sync.png differ diff --git a/core/img/icon-sync.svg b/core/img/icon-sync.svg index f9ebec4a5b..0806572f2c 100644 --- a/core/img/icon-sync.svg +++ b/core/img/icon-sync.svg @@ -19,9 +19,9 @@ viewBox="0 0 32 31.999997" enable-background="new 0 0 595.275 311.111" xml:space="preserve" - inkscape:version="0.48.2 r9819" - sodipodi:docname="icon-sync.svg" - inkscape:export-filename="/home/user/owncloud/core/img/icon.png" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="icon-sync-light.svg" + inkscape:export-filename="/home/user/owncloud/core/img/icon-sync-light.png" inkscape:export-xdpi="89.826416" inkscape:export-ydpi="89.826416"> diff --git a/core/img/icon.png b/core/img/icon.png index 745b82584c..e87191f1c0 100644 Binary files a/core/img/icon.png and b/core/img/icon.png differ diff --git a/core/img/icon.svg b/core/img/icon.svg index 95eac44548..6f91abe6e4 100644 --- a/core/img/icon.svg +++ b/core/img/icon.svg @@ -19,14 +19,14 @@ viewBox="0 0 32 31.999997" enable-background="new 0 0 595.275 311.111" xml:space="preserve" - inkscape:version="0.48.2 r9819" - sodipodi:docname="icon.svg" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="icon-light.svg" inkscape:export-filename="/home/user/owncloud/core/img/icon.png" inkscape:export-xdpi="89.826416" inkscape:export-ydpi="89.826416">image/svg+xml

'+t('core', 'Settings')+'

').show(); popup.find('.close').bind('click', function() { popup.remove(); - }) + }); if(typeof props.loadJS !== 'undefined') { var scriptname; if(props.loadJS === true) { @@ -230,6 +244,49 @@ OC.search.lastResults={}; OC.addStyle.loaded=[]; OC.addScript.loaded=[]; +OC.Breadcrumb={ + container:null, + crumbs:[], + push:function(name, link){ + if(!OC.Breadcrumb.container){//default + OC.Breadcrumb.container=$('#controls'); + } + var crumb=$('
'); + crumb.addClass('crumb').addClass('last'); + crumb.attr('style','background-image:url("'+OC.imagePath('core','breadcrumb')+'")'); + + var crumbLink=$(''); + crumbLink.attr('href',link); + crumbLink.text(name); + crumb.append(crumbLink); + + var existing=OC.Breadcrumb.container.find('div.crumb'); + if(existing.length){ + existing.removeClass('last'); + existing.last().after(crumb); + }else{ + OC.Breadcrumb.container.append(crumb); + } + OC.Breadcrumb.crumbs.push(crumb); + return crumb; + }, + pop:function(){ + if(!OC.Breadcrumb.container){//default + OC.Breadcrumb.container=$('#controls'); + } + OC.Breadcrumb.container.find('div.crumb').last().remove(); + OC.Breadcrumb.container.find('div.crumb').last().addClass('last'); + OC.Breadcrumb.crumbs.pop(); + }, + clear:function(){ + if(!OC.Breadcrumb.container){//default + OC.Breadcrumb.container=$('#controls'); + } + OC.Breadcrumb.container.find('div.crumb').remove(); + OC.Breadcrumb.crumbs=[]; + } +} + if(typeof localStorage !='undefined' && localStorage != null){ //user and instance awere localstorage OC.localStorage={ @@ -586,3 +643,40 @@ function formatDate(date){ t('files','July'), t('files','August'), t('files','September'), t('files','October'), t('files','November'), t('files','December') ]; return monthNames[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+', '+((date.getHours()<10)?'0':'')+date.getHours()+':'+((date.getMinutes()<10)?'0':'')+date.getMinutes(); } + +/** + * get a variable by name + * @param string name + */ +OC.get=function(name) { + var namespaces = name.split("."); + var tail = namespaces.pop(); + var context=window; + + for(var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + if(!context){ + return false; + } + } + return context[tail]; +} + +/** + * set a variable by name + * @param string name + * @param mixed value + */ +OC.set=function(name, value) { + var namespaces = name.split("."); + var tail = namespaces.pop(); + var context=window; + + for(var i = 0; i < namespaces.length; i++) { + if(!context[namespaces[i]]){ + context[namespaces[i]]={}; + } + context = context[namespaces[i]]; + } + context[tail]=value; +} diff --git a/core/js/listview.js b/core/js/listview.js index e3e5ebdab8..3a713a6222 100644 --- a/core/js/listview.js +++ b/core/js/listview.js @@ -11,15 +11,15 @@ ListView.generateTable=function(collumns){ html+=''; html+=''; html+=''; - html+'' + html+''; $.each(collumns,function(index,collumn){ html+=''; }); - html+'' + html+''; html+=''; html=''; return $(html); -} +}; ListView.prototype={ rows:{}, @@ -49,7 +49,7 @@ ListView.prototype={ var element=$(html); element.append($('')); element.click(element.callback); - tr.children('td.'+collumn).append(element) + tr.children('td.'+collumn).append(element); }); }); if(this.deleteCallback){ @@ -68,4 +68,4 @@ ListView.prototype={ empty:function(){ this.element.children('tr:not(.template)').remove(); } -} \ No newline at end of file +}; diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 0fa41696a1..4dd3c89c14 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -22,7 +22,7 @@ /** * this class to ease the usage of jquery dialogs */ -OCdialogs = { +var OCdialogs = { /** * displays alert dialog * @param text content of dialog diff --git a/core/js/oc-vcategories.js b/core/js/oc-vcategories.js index dfed8223b1..c99dd51f53 100644 --- a/core/js/oc-vcategories.js +++ b/core/js/oc-vcategories.js @@ -1,4 +1,4 @@ -OCCategories={ +var OCCategories={ edit:function(){ if(OCCategories.app == undefined) { OC.dialogs.alert('OCCategories.app is not set!'); @@ -95,7 +95,7 @@ OCCategories={ } }).error(function(xhr){ if (xhr.status == 404) { - OC.dialogs.alert('The required file ' + OC.filePath(Categories.app, 'ajax', 'categories/rescan.php') + ' is not installed!', 'Error'); + OC.dialogs.alert('The required file ' + OC.filePath(OCCategories.app, 'ajax', 'categories/rescan.php') + ' is not installed!', 'Error'); } }); }, diff --git a/core/js/setup.js b/core/js/setup.js index 23c705a068..39fcf4a271 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -1,11 +1,11 @@ -var dbtypes +var dbtypes; $(document).ready(function() { dbtypes={ sqlite:!!$('#hasSQLite').val(), mysql:!!$('#hasMySQL').val(), postgresql:!!$('#hasPostgreSQL').val(), oracle:!!$('#hasOracle').val(), - } + }; $('#selectDbType').buttonset(); $('#datadirContent').hide(250); diff --git a/core/js/share.js b/core/js/share.js index 2f3b5c2fa5..8a00587b77 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -3,11 +3,6 @@ OC.Share={ SHARE_TYPE_GROUP:1, SHARE_TYPE_LINK:3, SHARE_TYPE_EMAIL:4, - PERMISSION_CREATE:4, - PERMISSION_READ:1, - PERMISSION_UPDATE:2, - PERMISSION_DELETE:8, - PERMISSION_SHARE:16, itemShares:[], statuses:[], droppedDown:false, @@ -76,7 +71,8 @@ OC.Share={ var item = itemSource; } if (typeof OC.Share.statuses[item] === 'undefined') { - checkShares = false; + // NOTE: Check doesn't always work and misses some shares, fix later + checkShares = true; } else { checkShares = true; } @@ -129,18 +125,19 @@ OC.Share={ } html += '
'; } - if (possiblePermissions & OC.Share.PERMISSION_SHARE) { - html += ''; + if (possiblePermissions & OC.PERMISSION_SHARE) { + html += ''; html += '
    '; html += '
'; if (link) { html += '
'; } html += '
'; @@ -155,7 +152,11 @@ OC.Share={ if (share.share_type == OC.Share.SHARE_TYPE_LINK) { OC.Share.showLink(itemSource, share.share_with); } else { - OC.Share.addShareWith(share.share_type, share.share_with, share.permissions, possiblePermissions); + if (share.collection) { + OC.Share.addShareWith(share.share_type, share.share_with, share.permissions, possiblePermissions, share.collection); + } else { + OC.Share.addShareWith(share.share_type, share.share_with, share.permissions, possiblePermissions, false); + } } }); } @@ -168,12 +169,12 @@ OC.Share={ response(result.data); } else { // Suggest sharing via email if valid email address - var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i); - if (pattern.test(search.term)) { - response([{label: 'Share via email: '+search.term, value: {shareType: OC.Share.SHARE_TYPE_EMAIL, shareWith: search.term}}]); - } else { +// var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i); +// if (pattern.test(search.term)) { +// response([{label: 'Share via email: '+search.term, value: {shareType: OC.Share.SHARE_TYPE_EMAIL, shareWith: search.term}}]); +// } else { response(['No people found']); - } +// } } }); // } @@ -188,7 +189,7 @@ OC.Share={ var shareWith = selected.item.value.shareWith; $(this).val(shareWith); // Default permissions are Read and Share - var permissions = OC.Share.PERMISSION_READ | OC.Share.PERMISSION_SHARE; + var permissions = OC.PERMISSION_READ | OC.PERMISSION_SHARE; OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function() { OC.Share.addShareWith(shareType, shareWith, permissions, possiblePermissions); $('#shareWith').val(''); @@ -219,56 +220,70 @@ OC.Share={ } }); }, - addShareWith:function(shareType, shareWith, permissions, possiblePermissions) { + addShareWith:function(shareType, shareWith, permissions, possiblePermissions, collection) { if (!OC.Share.itemShares[shareType]) { OC.Share.itemShares[shareType] = []; } OC.Share.itemShares[shareType].push(shareWith); - var editChecked = createChecked = updateChecked = deleteChecked = shareChecked = ''; - if (permissions & OC.Share.PERMISSION_CREATE) { - createChecked = 'checked="checked"'; - editChecked = 'checked="checked"'; - } - if (permissions & OC.Share.PERMISSION_UPDATE) { - updateChecked = 'checked="checked"'; - editChecked = 'checked="checked"'; - } - if (permissions & OC.Share.PERMISSION_DELETE) { - deleteChecked = 'checked="checked"'; - editChecked = 'checked="checked"'; - } - if (permissions & OC.Share.PERMISSION_SHARE) { - shareChecked = 'checked="checked"'; - } - var html = '
  • '; - html += shareWith; - if (possiblePermissions & OC.Share.PERMISSION_CREATE || possiblePermissions & OC.Share.PERMISSION_UPDATE || possiblePermissions & OC.Share.PERMISSION_DELETE) { - if (editChecked == '') { - html += '
  • Shared in '+item+' with '+shareWith+'
  • '; + $('#shareWithList').prepend(html); + } + } else { + var editChecked = createChecked = updateChecked = deleteChecked = shareChecked = ''; + if (permissions & OC.PERMISSION_CREATE) { + createChecked = 'checked="checked"'; + editChecked = 'checked="checked"'; + } + if (permissions & OC.PERMISSION_UPDATE) { + updateChecked = 'checked="checked"'; + editChecked = 'checked="checked"'; + } + if (permissions & OC.PERMISSION_DELETE) { + deleteChecked = 'checked="checked"'; + editChecked = 'checked="checked"'; + } + if (permissions & OC.PERMISSION_SHARE) { + shareChecked = 'checked="checked"'; + } + var html = '
  • '; + html += shareWith; + if (possiblePermissions & OC.PERMISSION_CREATE || possiblePermissions & OC.PERMISSION_UPDATE || possiblePermissions & OC.PERMISSION_DELETE) { + if (editChecked == '') { + html += '
  • '; + $(html).appendTo('#shareWithList'); } - html += ''; - html += ''; - html += ''; - html += ''; - $(html).appendTo('#shareWithList'); - }, showLink:function(itemSource, password) { $('#linkCheckbox').attr('checked', true); @@ -283,9 +298,15 @@ OC.Share={ $('#linkText').val(link); $('#linkText').show('blind'); $('#showPassword').show(); + if (password != null) { + $('#linkPass').show('blind'); + $('#linkPassText').attr('placeholder', 'Password protected'); + } }, hideLink:function() { $('#linkText').hide('blind'); + $('#showPassword').hide(); + $('#linkPass').hide(); }, dirname:function(path) { return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, ''); @@ -381,7 +402,7 @@ $(document).ready(function() { $(checkboxes).filter('input[name="edit"]').attr('checked', true); } } - var permissions = OC.Share.PERMISSION_READ; + var permissions = OC.PERMISSION_READ; $(checkboxes).filter(':not(input[name="edit"])').filter(':checked').each(function(index, checkbox) { permissions |= $(checkbox).data('permissions'); }); @@ -393,7 +414,7 @@ $(document).ready(function() { var itemSource = $('#dropdown').data('item-source'); if (this.checked) { // Create a link - OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.Share.PERMISSION_READ, function() { + OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.PERMISSION_READ, function() { OC.Share.showLink(itemSource); // TODO Change icon }); @@ -411,30 +432,28 @@ $(document).ready(function() { }); $('#showPassword').live('click', function() { - $('#linkText').after('
    '); - $('#linkPassText').toggle('blind'); + $('#linkPass').toggle('blind'); }); $('#linkPassText').live('keyup', function(event) { if (event.keyCode == 13) { var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); - // TODO Do this internally - OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, ''); - OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, $(this).val(), OC.Share.PERMISSION_READ); + OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, $(this).val(), OC.PERMISSION_READ, function() { + $('#linkPassText').val(''); + $('#linkPassText').attr('placeholder', 'Password protected'); + }); } }); - $('#expirationCheckbox').live('change', function() { + $('#expirationCheckbox').live('click', function() { if (this.checked) { - console.log('checked'); $('#expirationDate').before('
    '); $('#expirationDate').show(); $('#expirationDate').datepicker({ dateFormat : 'dd-mm-yy' }); } else { - console.log('unchecled'); $('#expirationDate').hide(); } }); @@ -449,7 +468,4 @@ $(document).ready(function() { }); }); - $('#emailPrivateLink').live('submit', function() { - OC.Share.emailPrivateLink(); - }); }); diff --git a/core/l10n/ca.php b/core/l10n/ca.php index 9be2fe6adf..6c70c29e6c 100644 --- a/core/l10n/ca.php +++ b/core/l10n/ca.php @@ -2,7 +2,6 @@ "Application name not provided." => "No s'ha facilitat cap nom per l'aplicació.", "No category to add?" => "No voleu afegir cap categoria?", "This category already exists: " => "Aquesta categoria ja existeix:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Arranjament", "January" => "Gener", "February" => "Febrer", @@ -51,6 +50,7 @@ "Database user" => "Usuari de la base de dades", "Database password" => "Contrasenya de la base de dades", "Database name" => "Nom de la base de dades", +"Database tablespace" => "Espai de taula de la base de dades", "Database host" => "Ordinador central de la base de dades", "Finish setup" => "Acaba la configuració", "web services under your control" => "controleu els vostres serveis web", diff --git a/core/l10n/cs_CZ.php b/core/l10n/cs_CZ.php index 7daeb52e63..6a4dad08cb 100644 --- a/core/l10n/cs_CZ.php +++ b/core/l10n/cs_CZ.php @@ -1,8 +1,7 @@ "Jméno aplikace nezadáno.", +"Application name not provided." => "Nezadán název aplikace.", "No category to add?" => "Žádná kategorie k přidání?", -"This category already exists: " => "Tato kategorie již existuje:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", +"This category already exists: " => "Tato kategorie již existuje: ", "Settings" => "Nastavení", "January" => "Leden", "February" => "Únor", @@ -19,14 +18,14 @@ "Cancel" => "Zrušit", "No" => "Ne", "Yes" => "Ano", -"Ok" => "Budiž", +"Ok" => "Ok", "No categories selected for deletion." => "Žádné kategorie nebyly vybrány ke smazání.", "Error" => "Chyba", -"ownCloud password reset" => "Reset hesla pro ownCloud", -"Use the following link to reset your password: {link}" => "Heslo vyresetujete použitím následujícího odkazu: {link}", -"You will receive a link to reset your password via Email." => "Bude Vám zaslán odkaz pro obnovu hesla", +"ownCloud password reset" => "Obnovení hesla pro ownCloud", +"Use the following link to reset your password: {link}" => "Heslo obnovíte použitím následujícího odkazu: {link}", +"You will receive a link to reset your password via Email." => "Bude Vám e-mailem zaslán odkaz pro obnovu hesla.", "Requested" => "Požadováno", -"Login failed!" => "Přihlášení selhalo", +"Login failed!" => "Přihlášení selhalo.", "Username" => "Uživatelské jméno", "Request reset" => "Vyžádat obnovu", "Your password was reset" => "Vaše heslo bylo obnoveno", @@ -36,29 +35,30 @@ "Personal" => "Osobní", "Users" => "Uživatelé", "Apps" => "Aplikace", -"Admin" => "Admin", +"Admin" => "Administrace", "Help" => "Nápověda", -"Access forbidden" => "Přístup odmítnut", +"Access forbidden" => "Přístup zakázán", "Cloud not found" => "Cloud nebyl nalezen", "Edit categories" => "Upravit kategorie", "Add" => "Přidat", "Create an admin account" => "Vytvořit účet správce", "Password" => "Heslo", -"Advanced" => "Rozšířené volby", -"Data folder" => "Datový adresář", -"Configure the database" => "Konfigurace databáze", +"Advanced" => "Pokročilé", +"Data folder" => "Složka s daty", +"Configure the database" => "Nastavit databázi", "will be used" => "bude použito", "Database user" => "Uživatel databáze", -"Database password" => "Heslo k databázi", +"Database password" => "Heslo databáze", "Database name" => "Název databáze", +"Database tablespace" => "Tabulkový prostor databáze", "Database host" => "Hostitel databáze", -"Finish setup" => "Dokončit instalaci", +"Finish setup" => "Dokončit nastavení", "web services under your control" => "webové služby pod Vaší kontrolou", "Log out" => "Odhlásit se", -"Lost your password?" => "Zapomenuté heslo?", +"Lost your password?" => "Ztratili jste své heslo?", "remember" => "zapamatovat si", -"Log in" => "Login", +"Log in" => "Přihlásit", "You are logged out." => "Jste odhlášeni.", -"prev" => "zpět", -"next" => "vpřed" +"prev" => "předchozí", +"next" => "následující" ); diff --git a/core/l10n/da.php b/core/l10n/da.php index 5e62b5b95d..4bb953a4c5 100644 --- a/core/l10n/da.php +++ b/core/l10n/da.php @@ -2,7 +2,6 @@ "Application name not provided." => "Applikationens navn ikke medsendt", "No category to add?" => "Ingen kategori at tilføje?", "This category already exists: " => "Denne kategori eksisterer allerede: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Indstillinger", "January" => "Januar", "February" => "Februar", @@ -51,6 +50,7 @@ "Database user" => "Databasebruger", "Database password" => "Databasekodeord", "Database name" => "Navn på database", +"Database tablespace" => "Database tabelplads", "Database host" => "Databasehost", "Finish setup" => "Afslut opsætning", "web services under your control" => "Webtjenester under din kontrol", diff --git a/core/l10n/de.php b/core/l10n/de.php index 9ed2d61782..611c208fe4 100644 --- a/core/l10n/de.php +++ b/core/l10n/de.php @@ -2,7 +2,6 @@ "Application name not provided." => "Applikationsname nicht angegeben", "No category to add?" => "Keine Kategorie hinzuzufügen?", "This category already exists: " => "Kategorie existiert bereits:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Einstellungen", "January" => "Januar", "February" => "Februar", @@ -20,7 +19,7 @@ "No" => "Nein", "Yes" => "Ja", "Ok" => "OK", -"No categories selected for deletion." => "Keine Kategorien zum Löschen angegeben.", +"No categories selected for deletion." => "Es wurde keine Kategorien zum Löschen ausgewählt.", "Error" => "Fehler", "ownCloud password reset" => "ownCloud-Passwort zurücksetzen", "Use the following link to reset your password: {link}" => "Nutzen Sie den nachfolgenden Link, um Ihr Passwort zurückzusetzen: {link}", @@ -51,6 +50,7 @@ "Database user" => "Datenbank-Benutzer", "Database password" => "Datenbank-Passwort", "Database name" => "Datenbank-Name", +"Database tablespace" => "Datenbank-Tablespace", "Database host" => "Datenbank-Host", "Finish setup" => "Installation abschließen", "web services under your control" => "Web-Services unter Ihrer Kontrolle", diff --git a/core/l10n/el.php b/core/l10n/el.php index d8f32fb51e..18a26f892c 100644 --- a/core/l10n/el.php +++ b/core/l10n/el.php @@ -2,7 +2,6 @@ "Application name not provided." => "Δε προσδιορίστηκε όνομα εφαρμογής", "No category to add?" => "Δεν έχετε να προστέσθέσεται μια κα", "This category already exists: " => "Αυτή η κατηγορία υπάρχει ήδη", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Ρυθμίσεις", "January" => "Ιανουάριος", "February" => "Φεβρουάριος", diff --git a/core/l10n/eo.php b/core/l10n/eo.php index f5e5ca9d0e..f1deaf3c9d 100644 --- a/core/l10n/eo.php +++ b/core/l10n/eo.php @@ -2,7 +2,6 @@ "Application name not provided." => "Nomo de aplikaĵo ne proviziiĝis.", "No category to add?" => "Ĉu neniu kategorio estas aldonota?", "This category already exists: " => "Ĉi tiu kategorio jam ekzistas: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Agordo", "January" => "Januaro", "February" => "Februaro", @@ -51,6 +50,7 @@ "Database user" => "Datumbaza uzanto", "Database password" => "Datumbaza pasvorto", "Database name" => "Datumbaza nomo", +"Database tablespace" => "Datumbaza tabelospaco", "Database host" => "Datumbaza gastigo", "Finish setup" => "Fini la instalon", "web services under your control" => "TTT-servoj sub via kontrolo", diff --git a/core/l10n/es.php b/core/l10n/es.php index 8766228ba8..21866d2ed6 100644 --- a/core/l10n/es.php +++ b/core/l10n/es.php @@ -2,7 +2,6 @@ "Application name not provided." => "Nombre de la aplicación no provisto.", "No category to add?" => "¿Ninguna categoría para añadir?", "This category already exists: " => "Esta categoría ya existe: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Ajustes", "January" => "Enero", "February" => "Febrero", @@ -51,6 +50,7 @@ "Database user" => "Usuario de la base de datos", "Database password" => "Contraseña de la base de datos", "Database name" => "Nombre de la base de datos", +"Database tablespace" => "Espacio de tablas de la base de datos", "Database host" => "Host de la base de datos", "Finish setup" => "Completar la instalación", "web services under your control" => "servicios web bajo tu control", diff --git a/core/l10n/et_EE.php b/core/l10n/et_EE.php index 734021605c..871cc25fee 100644 --- a/core/l10n/et_EE.php +++ b/core/l10n/et_EE.php @@ -2,7 +2,6 @@ "Application name not provided." => "Rakenduse nime pole sisestatud.", "No category to add?" => "Pole kategooriat, mida lisada?", "This category already exists: " => "See kategooria on juba olemas: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Seaded", "January" => "Jaanuar", "February" => "Veebruar", diff --git a/core/l10n/eu.php b/core/l10n/eu.php index 2e5a2c00e2..58a63b6e68 100644 --- a/core/l10n/eu.php +++ b/core/l10n/eu.php @@ -2,7 +2,6 @@ "Application name not provided." => "Aplikazioaren izena falta da", "No category to add?" => "Ez dago gehitzeko kategoriarik?", "This category already exists: " => "Kategoria hau dagoeneko existitzen da:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Ezarpenak", "January" => "Urtarrila", "February" => "Otsaila", @@ -51,6 +50,7 @@ "Database user" => "Datubasearen erabiltzailea", "Database password" => "Datubasearen pasahitza", "Database name" => "Datubasearen izena", +"Database tablespace" => "Datu basearen taula-lekua", "Database host" => "Datubasearen hostalaria", "Finish setup" => "Bukatu konfigurazioa", "web services under your control" => "web zerbitzuak zure kontrolpean", diff --git a/core/l10n/fa.php b/core/l10n/fa.php index 5fe98629ba..7b7af3937b 100644 --- a/core/l10n/fa.php +++ b/core/l10n/fa.php @@ -2,7 +2,6 @@ "Application name not provided." => "نام برنامه پیدا نشد", "No category to add?" => "آیا گروه دیگری برای افزودن ندارید", "This category already exists: " => "این گروه از قبل اضافه شده", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "تنظیمات", "January" => "ژانویه", "February" => "فبریه", diff --git a/core/l10n/fi_FI.php b/core/l10n/fi_FI.php index 64bb4dca63..d253ee9433 100644 --- a/core/l10n/fi_FI.php +++ b/core/l10n/fi_FI.php @@ -50,6 +50,7 @@ "Database user" => "Tietokannan käyttäjä", "Database password" => "Tietokannan salasana", "Database name" => "Tietokannan nimi", +"Database tablespace" => "Tietokannan taulukkotila", "Database host" => "Tietokantapalvelin", "Finish setup" => "Viimeistele asennus", "web services under your control" => "verkkopalvelut hallinnassasi", diff --git a/core/l10n/fr.php b/core/l10n/fr.php index 43917917ad..2904ebf48b 100644 --- a/core/l10n/fr.php +++ b/core/l10n/fr.php @@ -2,21 +2,20 @@ "Application name not provided." => "Nom de l'application non fourni.", "No category to add?" => "Pas de catégorie à ajouter ?", "This category already exists: " => "Cette catégorie existe déjà : ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Paramètres", -"January" => "Janvier", -"February" => "Février", -"March" => "Mars", -"April" => "Avril", -"May" => "Mai", -"June" => "Juin", -"July" => "Juillet", -"August" => "Août", -"September" => "Septembre", -"October" => "Octobre", -"November" => "Novembre", -"December" => "Décembre", -"Cancel" => "Annulé", +"January" => "janvier", +"February" => "février", +"March" => "mars", +"April" => "avril", +"May" => "mai", +"June" => "juin", +"July" => "juillet", +"August" => "août", +"September" => "septembre", +"October" => "octobre", +"November" => "novembre", +"December" => "décembre", +"Cancel" => "Annuler", "No" => "Non", "Yes" => "Oui", "Ok" => "Ok", @@ -24,7 +23,7 @@ "Error" => "Erreur", "ownCloud password reset" => "Réinitialisation de votre mot de passe Owncloud", "Use the following link to reset your password: {link}" => "Utilisez le lien suivant pour réinitialiser votre mot de passe : {link}", -"You will receive a link to reset your password via Email." => "Vous allez recevoir un e-mail contenant un lien pour réinitialiser votre mot de passe", +"You will receive a link to reset your password via Email." => "Vous allez recevoir un e-mail contenant un lien pour réinitialiser votre mot de passe.", "Requested" => "Demande envoyée", "Login failed!" => "Nom d'utilisateur ou e-mail invalide", "Username" => "Nom d'utilisateur", @@ -51,6 +50,7 @@ "Database user" => "Utilisateur pour la base de données", "Database password" => "Mot de passe de la base de données", "Database name" => "Nom de la base de données", +"Database tablespace" => "Tablespaces de la base de données", "Database host" => "Serveur de la base de données", "Finish setup" => "Terminer l'installation", "web services under your control" => "services web sous votre contrôle", diff --git a/core/l10n/gl.php b/core/l10n/gl.php index eeff78826f..af84971219 100644 --- a/core/l10n/gl.php +++ b/core/l10n/gl.php @@ -2,7 +2,6 @@ "Application name not provided." => "Non se indicou o nome do aplicativo.", "No category to add?" => "Sen categoría que engadir?", "This category already exists: " => "Esta categoría xa existe: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Preferencias", "January" => "Xaneiro", "February" => "Febreiro", diff --git a/core/l10n/hi.php b/core/l10n/hi.php new file mode 100644 index 0000000000..cc9cbdb22f --- /dev/null +++ b/core/l10n/hi.php @@ -0,0 +1,14 @@ + "प्रयोक्ता का नाम", +"Cloud not found" => "क्लौड नहीं मिला ", +"Create an admin account" => "व्यवस्थापक खाता बनाएँ", +"Password" => "पासवर्ड", +"Advanced" => "उन्नत", +"Configure the database" => "डेटाबेस कॉन्फ़िगर करें ", +"Database user" => "डेटाबेस उपयोगकर्ता", +"Database password" => "डेटाबेस पासवर्ड", +"Finish setup" => "सेटअप समाप्त करे", +"You are logged out." => "आप लोग आउट कर दिए गए हैं.", +"prev" => "पिछला", +"next" => "अगला" +); diff --git a/core/l10n/hr.php b/core/l10n/hr.php index d4e773afc1..723cceb4d0 100644 --- a/core/l10n/hr.php +++ b/core/l10n/hr.php @@ -2,7 +2,6 @@ "Application name not provided." => "Ime aplikacije nije pribavljeno.", "No category to add?" => "Nemate kategorija koje možete dodati?", "This category already exists: " => "Ova kategorija već postoji: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Postavke", "January" => "Siječanj", "February" => "Veljača", diff --git a/core/l10n/hu_HU.php b/core/l10n/hu_HU.php index dbfe2781d5..a97c4cb886 100644 --- a/core/l10n/hu_HU.php +++ b/core/l10n/hu_HU.php @@ -2,7 +2,6 @@ "Application name not provided." => "Alkalmazásnév hiányzik", "No category to add?" => "Nincs hozzáadandó kategória?", "This category already exists: " => "Ez a kategória már létezik", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Beállítások", "January" => "Január", "February" => "Február", diff --git a/core/l10n/id.php b/core/l10n/id.php index 296e2d62a4..47758f8861 100644 --- a/core/l10n/id.php +++ b/core/l10n/id.php @@ -3,6 +3,23 @@ "No category to add?" => "Tidak ada kategori yang akan ditambahkan?", "This category already exists: " => "Kategori ini sudah ada:", "Settings" => "Setelan", +"January" => "Januari", +"February" => "Februari", +"March" => "Maret", +"April" => "April", +"May" => "Mei", +"June" => "Juni", +"July" => "Juli", +"August" => "Agustus", +"September" => "September", +"October" => "Oktober", +"November" => "Nopember", +"December" => "Desember", +"Cancel" => "Batalkan", +"No" => "Tidak", +"Yes" => "Ya", +"Ok" => "Oke", +"No categories selected for deletion." => "Tidak ada kategori terpilih untuk penghapusan.", "ownCloud password reset" => "reset password ownCloud", "Use the following link to reset your password: {link}" => "Gunakan tautan berikut untuk mereset password anda: {link}", "You will receive a link to reset your password via Email." => "Anda akan mendapatkan link untuk mereset password anda lewat Email.", diff --git a/core/l10n/ignorelist b/core/l10n/ignorelist new file mode 100644 index 0000000000..a2b225cbe4 --- /dev/null +++ b/core/l10n/ignorelist @@ -0,0 +1 @@ +js/jquery-ui-1.8.16.custom.min.js diff --git a/core/l10n/it.php b/core/l10n/it.php index 1c0bf94ca7..8d9ac21cd4 100644 --- a/core/l10n/it.php +++ b/core/l10n/it.php @@ -2,7 +2,6 @@ "Application name not provided." => "Nome dell'applicazione non fornito.", "No category to add?" => "Nessuna categoria da aggiungere?", "This category already exists: " => "Questa categoria esiste già: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Impostazioni", "January" => "Gennaio", "February" => "Febbraio", @@ -39,7 +38,7 @@ "Admin" => "Admin", "Help" => "Aiuto", "Access forbidden" => "Accesso negato", -"Cloud not found" => "Cloud non trovata", +"Cloud not found" => "Nuvola non trovata", "Edit categories" => "Modifica le categorie", "Add" => "Aggiungi", "Create an admin account" => "Crea un account amministratore", @@ -47,10 +46,11 @@ "Advanced" => "Avanzate", "Data folder" => "Cartella dati", "Configure the database" => "Configura il database", -"will be used" => "sarà usato", +"will be used" => "sarà utilizzato", "Database user" => "Utente del database", "Database password" => "Password del database", "Database name" => "Nome del database", +"Database tablespace" => "Spazio delle tabelle del database", "Database host" => "Host del database", "Finish setup" => "Termina la configurazione", "web services under your control" => "servizi web nelle tue mani", diff --git a/core/l10n/ja_JP.php b/core/l10n/ja_JP.php index 5f9b9da33a..62f5e16f3c 100644 --- a/core/l10n/ja_JP.php +++ b/core/l10n/ja_JP.php @@ -2,7 +2,6 @@ "Application name not provided." => "アプリケーション名は提供されていません。", "No category to add?" => "追加するカテゴリはありませんか?", "This category already exists: " => "このカテゴリはすでに存在します: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "設定", "January" => "1月", "February" => "2月", @@ -51,6 +50,7 @@ "Database user" => "データベースのユーザ名", "Database password" => "データベースのパスワード", "Database name" => "データベース名", +"Database tablespace" => "データベースの表領域", "Database host" => "データベースのホスト名", "Finish setup" => "セットアップを完了します", "web services under your control" => "管理下にあるウェブサービス", diff --git a/core/l10n/ko.php b/core/l10n/ko.php index 5a330581ff..9f82a79c43 100644 --- a/core/l10n/ko.php +++ b/core/l10n/ko.php @@ -2,7 +2,6 @@ "Application name not provided." => "응용 프로그램의 이름이 규정되어 있지 않습니다. ", "No category to add?" => "추가할 카테고리가 없습니까?", "This category already exists: " => "이 카테고리는 이미 존재합니다:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "설정", "January" => "1월", "February" => "2월", diff --git a/core/l10n/lb.php b/core/l10n/lb.php index eafdcc3737..0959e0ed25 100644 --- a/core/l10n/lb.php +++ b/core/l10n/lb.php @@ -3,6 +3,24 @@ "No category to add?" => "Keng Kategorie fir bäizesetzen?", "This category already exists: " => "Des Kategorie existéiert schonn:", "Settings" => "Astellungen", +"January" => "Januar", +"February" => "Februar", +"March" => "Mäerz", +"April" => "Abrëll", +"May" => "Mee", +"June" => "Juni", +"July" => "Juli", +"August" => "August", +"September" => "September", +"October" => "Oktober", +"November" => "November", +"December" => "Dezember", +"Cancel" => "Ofbriechen", +"No" => "Nee", +"Yes" => "Jo", +"Ok" => "OK", +"No categories selected for deletion." => "Keng Kategorien ausgewielt fir ze läschen.", +"Error" => "Fehler", "ownCloud password reset" => "ownCloud Passwuert reset", "Use the following link to reset your password: {link}" => "Benotz folgende Link fir däi Passwuert ze reseten: {link}", "You will receive a link to reset your password via Email." => "Du kriss en Link fir däin Passwuert nei ze setzen via Email geschéckt.", @@ -25,13 +43,14 @@ "Add" => "Bäisetzen", "Create an admin account" => "En Admin Account uleeën", "Password" => "Passwuert", -"Advanced" => "Erweidert", +"Advanced" => "Advanced", "Data folder" => "Daten Dossier", "Configure the database" => "Datebank konfiguréieren", "will be used" => "wärt benotzt ginn", "Database user" => "Datebank Benotzer", "Database password" => "Datebank Passwuert", "Database name" => "Datebank Numm", +"Database tablespace" => "Datebank Tabelle-Gréisst", "Database host" => "Datebank Server", "Finish setup" => "Installatioun ofschléissen", "web services under your control" => "Web Servicer ënnert denger Kontroll", diff --git a/core/l10n/lt_LT.php b/core/l10n/lt_LT.php index f36f697b67..0a3320351c 100644 --- a/core/l10n/lt_LT.php +++ b/core/l10n/lt_LT.php @@ -2,7 +2,6 @@ "Application name not provided." => "Nepateiktas programos pavadinimas.", "No category to add?" => "Nepridėsite jokios kategorijos?", "This category already exists: " => "Tokia kategorija jau yra:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Nustatymai", "January" => "Sausis", "February" => "Vasaris", diff --git a/core/l10n/mk.php b/core/l10n/mk.php index af49a04f11..3eea6cd58d 100644 --- a/core/l10n/mk.php +++ b/core/l10n/mk.php @@ -2,7 +2,6 @@ "Application name not provided." => "Име за апликацијата не е доставено.", "No category to add?" => "Нема категорија да се додаде?", "This category already exists: " => "Оваа категорија веќе постои:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Поставки", "January" => "Јануари", "February" => "Февруари", diff --git a/core/l10n/ms_MY.php b/core/l10n/ms_MY.php index 25da7cd862..c99c510be6 100644 --- a/core/l10n/ms_MY.php +++ b/core/l10n/ms_MY.php @@ -2,7 +2,6 @@ "Application name not provided." => "nama applikasi tidak disediakan", "No category to add?" => "Tiada kategori untuk di tambah?", "This category already exists: " => "Kategori ini telah wujud", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Tetapan", "January" => "Januari", "February" => "Februari", diff --git a/core/l10n/nb_NO.php b/core/l10n/nb_NO.php index d30823b59f..a8bfebb8a5 100644 --- a/core/l10n/nb_NO.php +++ b/core/l10n/nb_NO.php @@ -2,7 +2,6 @@ "Application name not provided." => "Applikasjonsnavn ikke angitt.", "No category to add?" => "Ingen kategorier å legge til?", "This category already exists: " => "Denne kategorien finnes allerede:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Innstillinger", "January" => "Januar", "February" => "Februar", diff --git a/core/l10n/nl.php b/core/l10n/nl.php index 874a710a75..3497381f74 100644 --- a/core/l10n/nl.php +++ b/core/l10n/nl.php @@ -28,7 +28,7 @@ "Login failed!" => "Login mislukt!", "Username" => "Gebruikersnaam", "Request reset" => "Resetaanvraag", -"Your password was reset" => "Je wachtwoord is geweizigd", +"Your password was reset" => "Je wachtwoord is gewijzigd", "To login page" => "Naar de login-pagina", "New password" => "Nieuw wachtwoord", "Reset password" => "Reset wachtwoord", @@ -50,6 +50,7 @@ "Database user" => "Gebruiker databank", "Database password" => "Wachtwoord databank", "Database name" => "Naam databank", +"Database tablespace" => "Database tablespace", "Database host" => "Database server", "Finish setup" => "Installatie afronden", "web services under your control" => "webdiensten die je beheerst", diff --git a/core/l10n/pl.php b/core/l10n/pl.php index 4eb5f1f9ae..5f8752b69b 100644 --- a/core/l10n/pl.php +++ b/core/l10n/pl.php @@ -2,7 +2,6 @@ "Application name not provided." => "Brak nazwy dla aplikacji", "No category to add?" => "Brak kategorii", "This category already exists: " => "Ta kategoria już istnieje", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Ustawienia", "January" => "Styczeń", "February" => "Luty", @@ -51,6 +50,7 @@ "Database user" => "Użytkownik bazy danych", "Database password" => "Hasło do bazy danych", "Database name" => "Nazwa bazy danych", +"Database tablespace" => "Obszar tabel bazy danych", "Database host" => "Komputer bazy danych", "Finish setup" => "Zakończ konfigurowanie", "web services under your control" => "usługi internetowe pod kontrolą", diff --git a/core/l10n/pt_BR.php b/core/l10n/pt_BR.php index 46d601e6eb..9ad2f3de53 100644 --- a/core/l10n/pt_BR.php +++ b/core/l10n/pt_BR.php @@ -2,7 +2,6 @@ "Application name not provided." => "Nome da aplicação não foi fornecido.", "No category to add?" => "Nenhuma categoria adicionada?", "This category already exists: " => "Essa categoria já existe", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Configurações", "January" => "Janeiro", "February" => "Fevereiro", diff --git a/core/l10n/pt_PT.php b/core/l10n/pt_PT.php index 29135f0d66..4da513c1ae 100644 --- a/core/l10n/pt_PT.php +++ b/core/l10n/pt_PT.php @@ -2,7 +2,6 @@ "Application name not provided." => "Nome da aplicação não definida.", "No category to add?" => "Nenhuma categoria para adicionar?", "This category already exists: " => "Esta categoria já existe:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Definições", "January" => "Janeiro", "February" => "Fevereiro", diff --git a/core/l10n/ru.php b/core/l10n/ru.php index edb5557777..c7ce381c05 100644 --- a/core/l10n/ru.php +++ b/core/l10n/ru.php @@ -2,7 +2,6 @@ "Application name not provided." => "Имя приложения не установлено.", "No category to add?" => "Нет категорий для добавления?", "This category already exists: " => "Эта категория уже существует: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Настройки", "January" => "Январь", "February" => "Февраль", @@ -51,6 +50,7 @@ "Database user" => "Имя пользователя для базы данных", "Database password" => "Пароль для базы данных", "Database name" => "Название базы данных", +"Database tablespace" => "Табличое пространство базы данных", "Database host" => "Хост базы данных", "Finish setup" => "Завершить установку", "web services under your control" => "Сетевые службы под твоим контролем", diff --git a/core/l10n/sk_SK.php b/core/l10n/sk_SK.php index b6bff1e049..8c3339170d 100644 --- a/core/l10n/sk_SK.php +++ b/core/l10n/sk_SK.php @@ -2,7 +2,6 @@ "Application name not provided." => "Meno aplikácie nezadané.", "No category to add?" => "Žiadna kategória pre pridanie?", "This category already exists: " => "Táto kategória už existuje:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Nastavenia", "January" => "Január", "February" => "Február", diff --git a/core/l10n/sl.php b/core/l10n/sl.php index 2f998c9549..b7850c2861 100644 --- a/core/l10n/sl.php +++ b/core/l10n/sl.php @@ -2,7 +2,6 @@ "Application name not provided." => "Ime aplikacije ni bilo določeno.", "No category to add?" => "Ni kategorije za dodajanje?", "This category already exists: " => "Ta kategorija že obstaja:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Nastavitve", "January" => "januar", "February" => "februar", @@ -51,6 +50,7 @@ "Database user" => "Uporabnik zbirke", "Database password" => "Geslo podatkovne zbirke", "Database name" => "Ime podatkovne zbirke", +"Database tablespace" => "Razpredelnica podatkovne zbirke", "Database host" => "Gostitelj podatkovne zbirke", "Finish setup" => "Dokončaj namestitev", "web services under your control" => "spletne storitve pod vašim nadzorom", diff --git a/core/l10n/sv.php b/core/l10n/sv.php index 25ba95558e..6b075f0aaf 100644 --- a/core/l10n/sv.php +++ b/core/l10n/sv.php @@ -2,7 +2,6 @@ "Application name not provided." => "Programnamn har inte angetts.", "No category to add?" => "Ingen kategori att lägga till?", "This category already exists: " => "Denna kategori finns redan:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Inställningar", "January" => "Januari", "February" => "Februari", @@ -51,6 +50,7 @@ "Database user" => "Databasanvändare", "Database password" => "Lösenord till databasen", "Database name" => "Databasnamn", +"Database tablespace" => "Databas tabellutrymme", "Database host" => "Databasserver", "Finish setup" => "Avsluta installation", "web services under your control" => "webbtjänster under din kontroll", diff --git a/core/l10n/th_TH.php b/core/l10n/th_TH.php index 8bd4d36524..fd25105f15 100644 --- a/core/l10n/th_TH.php +++ b/core/l10n/th_TH.php @@ -2,7 +2,6 @@ "Application name not provided." => "ยังไม่ได้ตั้งชื่อแอพพลิเคชั่น", "No category to add?" => "ไม่มีหมวดหมู่ที่ต้องการเพิ่ม?", "This category already exists: " => "หมวดหมู่นี้มีอยู่แล้ว: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "ตั้งค่า", "January" => "มกราคม", "February" => "กุมภาพันธ์", @@ -51,6 +50,7 @@ "Database user" => "ชื่อผู้ใช้งานฐานข้อมูล", "Database password" => "รหัสผ่านฐานข้อมูล", "Database name" => "ชื่อฐานข้อมูล", +"Database tablespace" => "พื้นที่ตารางในฐานข้อมูล", "Database host" => "Database host", "Finish setup" => "ติดตั้งเรียบร้อยแล้ว", "web services under your control" => "web services under your control", diff --git a/core/l10n/tr.php b/core/l10n/tr.php index e2d0d9b073..7d6d4a33a6 100644 --- a/core/l10n/tr.php +++ b/core/l10n/tr.php @@ -2,7 +2,6 @@ "Application name not provided." => "Uygulama adı verilmedi.", "No category to add?" => "Eklenecek kategori yok?", "This category already exists: " => "Bu kategori zaten mevcut: ", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Ayarlar", "January" => "Ocak", "February" => "Şubat", @@ -51,6 +50,7 @@ "Database user" => "Veritabanı kullanıcı adı", "Database password" => "Veritabanı parolası", "Database name" => "Veritabanı adı", +"Database tablespace" => "Veritabanı tablo alanı", "Database host" => "Veritabanı sunucusu", "Finish setup" => "Kurulumu tamamla", "web services under your control" => "kontrolünüzdeki web servisleri", diff --git a/core/l10n/uk.php b/core/l10n/uk.php index 4a10a9fc74..e84ec8f883 100644 --- a/core/l10n/uk.php +++ b/core/l10n/uk.php @@ -1,5 +1,21 @@ "Налаштування", +"January" => "Січень", +"February" => "Лютий", +"March" => "Березень", +"April" => "Квітень", +"May" => "Травень", +"June" => "Червень", +"July" => "Липень", +"August" => "Серпень", +"September" => "Вересень", +"October" => "Жовтень", +"November" => "Листопад", +"December" => "Грудень", +"Cancel" => "Відмінити", +"No" => "Ні", +"Yes" => "Так", +"Error" => "Помилка", "You will receive a link to reset your password via Email." => "Ви отримаєте посилання для скидання вашого паролю на e-mail.", "Username" => "Ім'я користувача", "Your password was reset" => "Ваш пароль був скинутий", @@ -10,6 +26,7 @@ "Users" => "Користувачі", "Admin" => "Адміністратор", "Help" => "Допомога", +"Add" => "Додати", "Password" => "Пароль", "Configure the database" => "Налаштування бази даних", "will be used" => "буде використано", diff --git a/core/l10n/vi.php b/core/l10n/vi.php index 4a4c97032f..de4764c3a5 100644 --- a/core/l10n/vi.php +++ b/core/l10n/vi.php @@ -2,7 +2,6 @@ "Application name not provided." => "Tên ứng dụng không tồn tại", "No category to add?" => "Không có danh mục được thêm?", "This category already exists: " => "Danh mục này đã được tạo :", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "Cài đặt", "January" => "Tháng 1", "February" => "Tháng 2", diff --git a/core/l10n/zh_CN.GB2312.php b/core/l10n/zh_CN.GB2312.php index 770d2b6772..58104df399 100644 --- a/core/l10n/zh_CN.GB2312.php +++ b/core/l10n/zh_CN.GB2312.php @@ -2,7 +2,6 @@ "Application name not provided." => "应用程序并没有被提供.", "No category to add?" => "没有分类添加了?", "This category already exists: " => "这个分类已经存在了:", -"ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" => "ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=", "Settings" => "设置", "January" => "一月", "February" => "二月", diff --git a/core/l10n/zh_CN.php b/core/l10n/zh_CN.php index 1f5216a2ff..4e0a37a877 100644 --- a/core/l10n/zh_CN.php +++ b/core/l10n/zh_CN.php @@ -50,6 +50,7 @@ "Database user" => "数据库用户", "Database password" => "数据库密码", "Database name" => "数据库名", +"Database tablespace" => "数据库表空间", "Database host" => "数据库主机", "Finish setup" => "安装完成", "web services under your control" => "由您掌控的网络服务", diff --git a/core/l10n/zh_TW.php b/core/l10n/zh_TW.php index 37c0d8cc9d..57a087fae9 100644 --- a/core/l10n/zh_TW.php +++ b/core/l10n/zh_TW.php @@ -3,6 +3,24 @@ "No category to add?" => "無分類添加?", "This category already exists: " => "此分類已經存在:", "Settings" => "設定", +"January" => "一月", +"February" => "二月", +"March" => "三月", +"April" => "四月", +"May" => "五月", +"June" => "六月", +"July" => "七月", +"August" => "八月", +"September" => "九月", +"October" => "十月", +"November" => "十一月", +"December" => "十二月", +"Cancel" => "取消", +"No" => "No", +"Yes" => "Yes", +"Ok" => "Ok", +"No categories selected for deletion." => "沒選擇要刪除的分類", +"Error" => "錯誤", "ownCloud password reset" => "ownCloud 密碼重設", "Use the following link to reset your password: {link}" => "請循以下聯結重設你的密碼: (聯結) ", "You will receive a link to reset your password via Email." => "重設密碼的連結將會寄到你的電子郵件信箱", @@ -32,6 +50,7 @@ "Database user" => "資料庫使用者", "Database password" => "資料庫密碼", "Database name" => "資料庫名稱", +"Database tablespace" => "資料庫 tablespace", "Database host" => "資料庫主機", "Finish setup" => "完成設定", "web services under your control" => "網路服務已在你控制", diff --git a/core/lostpassword/index.php b/core/lostpassword/index.php index 8f86fe23aa..3f58b03c98 100644 --- a/core/lostpassword/index.php +++ b/core/lostpassword/index.php @@ -7,7 +7,7 @@ */ $RUNTIME_NOAPPS = TRUE; //no apps -require_once('../../lib/base.php'); +require_once '../../lib/base.php'; // Someone lost their password: @@ -17,26 +17,26 @@ if (isset($_POST['user'])) { OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword', $token); $email = OC_Preferences::getValue($_POST['user'], 'settings', 'email', ''); if (!empty($email) and isset($_POST['sectoken']) and isset($_SESSION['sectoken']) and ($_POST['sectoken']==$_SESSION['sectoken']) ) { - $link = OC_Helper::linkToAbsolute('core/lostpassword', 'resetpassword.php').'?user='.urlencode($_POST['user']).'&token='.$token; + $link = OC_Helper::linkToAbsolute('core/lostpassword', 'resetpassword.php', array('user' => urlencode($_POST['user']), 'token' => $token)); $tmpl = new OC_Template('core/lostpassword', 'email'); $tmpl->assign('link', $link, false); $msg = $tmpl->fetchPage(); $l = OC_L10N::get('core'); $from = 'lostpassword-noreply@' . OCP\Util::getServerHost(); - OC_MAIL::send($email,$_POST['user'],$l->t('ownCloud password reset'),$msg,$from,'ownCloud'); + OC_MAIL::send($email, $_POST['user'], $l->t('ownCloud password reset'), $msg, $from, 'ownCloud'); echo('sent'); } - $sectoken=rand(1000000,9999999); + $sectoken=rand(1000000, 9999999); $_SESSION['sectoken']=$sectoken; OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => false, 'requested' => true, 'sectoken' => $sectoken)); } else { - $sectoken=rand(1000000,9999999); + $sectoken=rand(1000000, 9999999); $_SESSION['sectoken']=$sectoken; OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => true, 'requested' => false, 'sectoken' => $sectoken)); } } else { - $sectoken=rand(1000000,9999999); + $sectoken=rand(1000000, 9999999); $_SESSION['sectoken']=$sectoken; OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => false, 'requested' => false, 'sectoken' => $sectoken)); } diff --git a/core/lostpassword/resetpassword.php b/core/lostpassword/resetpassword.php index 33be9d7053..28a0063fc6 100644 --- a/core/lostpassword/resetpassword.php +++ b/core/lostpassword/resetpassword.php @@ -7,7 +7,7 @@ */ $RUNTIME_NOAPPS = TRUE; //no apps -require_once('../../lib/base.php'); +require_once '../../lib/base.php'; // Someone wants to reset their password: if(isset($_GET['token']) && isset($_GET['user']) && OC_Preferences::getValue($_GET['user'], 'owncloud', 'lostpassword') === $_GET['token']) { diff --git a/core/lostpassword/templates/email.php b/core/lostpassword/templates/email.php index d146d8e4c3..b65049feff 100644 --- a/core/lostpassword/templates/email.php +++ b/core/lostpassword/templates/email.php @@ -1 +1,2 @@ -t('Use the following link to reset your password: {link}')) ?> +t('Use the following link to reset your password: {link}')); \ No newline at end of file diff --git a/core/minimizer.php b/core/minimizer.php index 0abbca7502..4da9037c41 100644 --- a/core/minimizer.php +++ b/core/minimizer.php @@ -3,12 +3,12 @@ session_write_close(); OC_App::loadApps(); -if ($service == 'core.css'){ +if ($service == 'core.css') { $minimizer = new OC_Minimizer_CSS(); $files = OC_TemplateLayout::findStylesheetFiles(OC_Util::$core_styles); $minimizer->output($files, $service); } -else if ($service == 'core.js'){ +else if ($service == 'core.js') { $minimizer = new OC_Minimizer_JS(); $files = OC_TemplateLayout::findJavascriptFiles(OC_Util::$core_scripts); $minimizer->output($files, $service); diff --git a/core/templates/403.php b/core/templates/403.php index cdfef08ac7..fbf0e64fdb 100644 --- a/core/templates/403.php +++ b/core/templates/403.php @@ -1,5 +1,5 @@ We're sorry, but something went terribly wrong.

    Bugtracker, please copy the following informations into the description.