summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-08-21 19:20:25 +0200
committerkondou <kondou@ts.unde.re>2013-08-21 19:20:25 +0200
commit0ce35af02acb2fa9fe0ef401dc75345b5114e3d6 (patch)
tree5ff19a7cc1bce5901cfeec7e11179ed2682b9e78 /lib
parent7c296a6cf915da6630422ceb8e253ebf9f004964 (diff)
parenta89199cc7bd19f6ba3e76fcd510219b2bd930ae6 (diff)
downloadnextcloud-server-0ce35af02acb2fa9fe0ef401dc75345b5114e3d6.tar.gz
nextcloud-server-0ce35af02acb2fa9fe0ef401dc75345b5114e3d6.zip
Merge branch 'master' into improve_app-management
Conflicts: settings/js/apps.js
Diffstat (limited to 'lib')
-rw-r--r--lib/app.php2
-rw-r--r--lib/archive.php2
-rw-r--r--lib/autoloader.php26
-rw-r--r--lib/base.php35
-rw-r--r--lib/cache/file.php4
-rw-r--r--lib/cache/fileglobal.php4
-rw-r--r--lib/connector/sabre/file.php12
-rw-r--r--lib/connector/sabre/objecttree.php2
-rw-r--r--lib/connector/sabre/principal.php14
-rw-r--r--lib/connector/sabre/quotaplugin.php2
-rw-r--r--lib/fileproxy/quota.php114
-rw-r--r--lib/files/cache/scanner.php2
-rw-r--r--lib/files/filesystem.php17
-rw-r--r--lib/files/mount/manager.php7
-rw-r--r--lib/files/mount/mount.php7
-rw-r--r--lib/files/storage/common.php8
-rw-r--r--lib/files/storage/commontest.php2
-rw-r--r--lib/files/storage/local.php2
-rw-r--r--lib/files/storage/wrapper/quota.php104
-rw-r--r--lib/files/storage/wrapper/wrapper.php2
-rw-r--r--lib/files/stream/quota.php128
-rw-r--r--lib/files/view.php2
-rw-r--r--lib/geo.php2
-rw-r--r--lib/helper.php8
-rw-r--r--lib/installer.php2
-rw-r--r--lib/l10n/ar.php1
-rw-r--r--lib/l10n/bg_BG.php1
-rw-r--r--lib/l10n/ca.php1
-rw-r--r--lib/l10n/cs_CZ.php9
-rw-r--r--lib/l10n/cy_GB.php1
-rw-r--r--lib/l10n/da.php1
-rw-r--r--lib/l10n/de.php1
-rw-r--r--lib/l10n/de_CH.php1
-rw-r--r--lib/l10n/de_DE.php1
-rw-r--r--lib/l10n/el.php1
-rw-r--r--lib/l10n/es.php1
-rw-r--r--lib/l10n/es_AR.php1
-rw-r--r--lib/l10n/et_EE.php1
-rw-r--r--lib/l10n/eu.php1
-rw-r--r--lib/l10n/fa.php1
-rw-r--r--lib/l10n/fi_FI.php1
-rw-r--r--lib/l10n/fr.php1
-rw-r--r--lib/l10n/gl.php1
-rw-r--r--lib/l10n/hu_HU.php1
-rw-r--r--lib/l10n/id.php1
-rw-r--r--lib/l10n/it.php1
-rw-r--r--lib/l10n/ja_JP.php9
-rw-r--r--lib/l10n/ka_GE.php1
-rw-r--r--lib/l10n/ko.php1
-rw-r--r--lib/l10n/lv.php14
-rw-r--r--lib/l10n/my_MM.php1
-rw-r--r--lib/l10n/nl.php9
-rw-r--r--lib/l10n/pl.php1
-rw-r--r--lib/l10n/pt_BR.php1
-rw-r--r--lib/l10n/pt_PT.php1
-rw-r--r--lib/l10n/ro.php1
-rw-r--r--lib/l10n/ru.php9
-rw-r--r--lib/l10n/sk_SK.php9
-rw-r--r--lib/l10n/sl.php1
-rw-r--r--lib/l10n/sq.php1
-rw-r--r--lib/l10n/sr.php1
-rw-r--r--lib/l10n/sv.php9
-rw-r--r--lib/l10n/th_TH.php1
-rw-r--r--lib/l10n/tr.php1
-rw-r--r--lib/l10n/uk.php1
-rw-r--r--lib/l10n/vi.php1
-rw-r--r--lib/l10n/zh_CN.php3
-rw-r--r--lib/l10n/zh_TW.php1
-rw-r--r--lib/memcache/factory.php29
-rw-r--r--lib/ocs/result.php2
-rw-r--r--lib/public/groupinterface.php2
-rw-r--r--lib/public/userinterface.php2
-rw-r--r--lib/public/util.php8
-rw-r--r--lib/user/http.php2
-rw-r--r--lib/user/interface.php2
-rwxr-xr-xlib/util.php41
-rw-r--r--lib/vobject/compoundproperty.php2
-rw-r--r--lib/vobject/stringproperty.php2
78 files changed, 464 insertions, 244 deletions
diff --git a/lib/app.php b/lib/app.php
index 51dbdba041d..8f5dd1d685e 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -667,7 +667,7 @@ class OC_App{
}
$dh = opendir( $apps_dir['path'] );
- while( $file = readdir( $dh ) ) {
+ while (($file = readdir($dh)) !== false) {
if ($file[0] != '.' and is_file($apps_dir['path'].'/'.$file.'/appinfo/app.php')) {
diff --git a/lib/archive.php b/lib/archive.php
index 70615db714e..364cd5a74a1 100644
--- a/lib/archive.php
+++ b/lib/archive.php
@@ -121,7 +121,7 @@ abstract class OC_Archive{
function addRecursive($path, $source) {
if($dh=opendir($source)) {
$this->addFolder($path);
- while($file=readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if($file=='.' or $file=='..') {
continue;
}
diff --git a/lib/autoloader.php b/lib/autoloader.php
index 21170639092..01841f831be 100644
--- a/lib/autoloader.php
+++ b/lib/autoloader.php
@@ -111,15 +111,39 @@ class Autoloader {
* @param string $class
* @return bool
*/
+ protected $memoryCache = null;
+ protected $constructingMemoryCache = true; // hack to prevent recursion
public function load($class) {
- $paths = $this->findClass($class);
+ // Does this PHP have an in-memory cache? We cache the paths there
+ if ($this->constructingMemoryCache && !$this->memoryCache) {
+ $this->constructingMemoryCache = false;
+ $this->memoryCache = \OC\Memcache\Factory::createLowLatency('Autoloader');
+ }
+ if ($this->memoryCache) {
+ $pathsToRequire = $this->memoryCache->get($class);
+ if (is_array($pathsToRequire)) {
+ foreach ($pathsToRequire as $path) {
+ require_once $path;
+ }
+ return false;
+ }
+ }
+ // Use the normal class loading path
+ $paths = $this->findClass($class);
if (is_array($paths)) {
+ $pathsToRequire = array();
foreach ($paths as $path) {
if ($fullPath = stream_resolve_include_path($path)) {
require_once $fullPath;
+ $pathsToRequire[] = $fullPath;
}
}
+
+ // Save in our memory cache
+ if ($this->memoryCache) {
+ $this->memoryCache->set($class, $pathsToRequire, 60); // cache 60 sec
+ }
}
return false;
}
diff --git a/lib/base.php b/lib/base.php
index eaee8424651..2613e88d053 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -91,7 +91,7 @@ class OC {
// ensure we can find OC_Config
set_include_path(
OC::$SERVERROOT . '/lib' . PATH_SEPARATOR .
- get_include_path()
+ get_include_path()
);
OC::$SUBURI = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT)));
@@ -160,11 +160,11 @@ class OC {
// set the right include path
set_include_path(
OC::$SERVERROOT . '/lib' . PATH_SEPARATOR .
- OC::$SERVERROOT . '/config' . PATH_SEPARATOR .
- OC::$THIRDPARTYROOT . '/3rdparty' . PATH_SEPARATOR .
- implode($paths, PATH_SEPARATOR) . PATH_SEPARATOR .
- get_include_path() . PATH_SEPARATOR .
- OC::$SERVERROOT
+ OC::$SERVERROOT . '/config' . PATH_SEPARATOR .
+ OC::$THIRDPARTYROOT . '/3rdparty' . PATH_SEPARATOR .
+ implode($paths, PATH_SEPARATOR) . PATH_SEPARATOR .
+ get_include_path() . PATH_SEPARATOR .
+ OC::$SERVERROOT
);
}
@@ -278,17 +278,17 @@ class OC {
ini_set('session.cookie_httponly', '1;');
// set the cookie path to the ownCloud directory
- $cookie_path = OC::$WEBROOT ?: '/';
+ $cookie_path = OC::$WEBROOT ? : '/';
ini_set('session.cookie_path', $cookie_path);
//set the session object to a dummy session so code relying on the session existing still works
self::$session = new \OC\Session\Memory('');
-
- try{
+
+ try {
// set the session name to the instance id - which is unique
self::$session = new \OC\Session\Internal(OC_Util::getInstanceId());
// if session cant be started break with http 500 error
- }catch (Exception $e){
+ } catch (Exception $e) {
OC_Log::write('core', 'Session could not be initialized',
OC_Log::ERROR);
@@ -352,7 +352,7 @@ class OC {
public static function init() {
// register autoloader
require_once __DIR__ . '/autoloader.php';
- self::$loader=new \OC\Autoloader();
+ self::$loader = new \OC\Autoloader();
self::$loader->registerPrefix('Doctrine\\Common', 'doctrine/common/lib');
self::$loader->registerPrefix('Doctrine\\DBAL', 'doctrine/dbal/lib');
self::$loader->registerPrefix('Symfony\\Component\\Routing', 'symfony/routing');
@@ -373,7 +373,7 @@ class OC {
ini_set('arg_separator.output', '&amp;');
// try to switch magic quotes off.
- if (get_magic_quotes_gpc()==1) {
+ if (get_magic_quotes_gpc() == 1) {
ini_set('magic_quotes_runtime', 0);
}
@@ -398,7 +398,8 @@ class OC {
//set http auth headers for apache+php-cgi work around
if (isset($_SERVER['HTTP_AUTHORIZATION'])
- && preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)) {
+ && preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)
+ ) {
list($name, $password) = explode(':', base64_decode($matches[1]), 2);
$_SERVER['PHP_AUTH_USER'] = strip_tags($name);
$_SERVER['PHP_AUTH_PW'] = strip_tags($password);
@@ -406,7 +407,8 @@ class OC {
//set http auth headers for apache+php-cgi work around if variable gets renamed by apache
if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])
- && preg_match('/Basic\s+(.*)$/i', $_SERVER['REDIRECT_HTTP_AUTHORIZATION'], $matches)) {
+ && preg_match('/Basic\s+(.*)$/i', $_SERVER['REDIRECT_HTTP_AUTHORIZATION'], $matches)
+ ) {
list($name, $password) = explode(':', base64_decode($matches[1]), 2);
$_SERVER['PHP_AUTH_USER'] = strip_tags($name);
$_SERVER['PHP_AUTH_PW'] = strip_tags($password);
@@ -435,10 +437,11 @@ class OC {
stream_wrapper_register('fakedir', 'OC\Files\Stream\Dir');
stream_wrapper_register('static', 'OC\Files\Stream\StaticStream');
stream_wrapper_register('close', 'OC\Files\Stream\Close');
+ stream_wrapper_register('quota', 'OC\Files\Stream\Quota');
stream_wrapper_register('oc', 'OC\Files\Stream\OC');
self::initTemplateEngine();
- if ( !self::$CLI ) {
+ if (!self::$CLI) {
self::initSession();
} else {
self::$session = new \OC\Session\Memory('');
@@ -459,7 +462,7 @@ class OC {
// User and Groups
if (!OC_Config::getValue("installed", false)) {
- self::$session->set('user_id','');
+ self::$session->set('user_id', '');
}
OC_User::useBackend(new OC_User_Database());
diff --git a/lib/cache/file.php b/lib/cache/file.php
index ba3dedaf8f3..9fee6034a71 100644
--- a/lib/cache/file.php
+++ b/lib/cache/file.php
@@ -80,7 +80,7 @@ class OC_Cache_File{
$storage = $this->getStorage();
if($storage and $storage->is_dir('/')) {
$dh=$storage->opendir('/');
- while($file=readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if($file!='.' and $file!='..' and ($prefix==='' || strpos($file, $prefix) === 0)) {
$storage->unlink('/'.$file);
}
@@ -94,7 +94,7 @@ class OC_Cache_File{
if($storage and $storage->is_dir('/')) {
$now = time();
$dh=$storage->opendir('/');
- while($file=readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if($file!='.' and $file!='..') {
$mtime = $storage->filemtime('/'.$file);
if ($mtime < $now) {
diff --git a/lib/cache/fileglobal.php b/lib/cache/fileglobal.php
index 6d01964e185..2fbd8ca3edb 100644
--- a/lib/cache/fileglobal.php
+++ b/lib/cache/fileglobal.php
@@ -69,7 +69,7 @@ class OC_Cache_FileGlobal{
$prefix = $this->fixKey($prefix);
if($cache_dir and is_dir($cache_dir)) {
$dh=opendir($cache_dir);
- while($file=readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if($file!='.' and $file!='..' and ($prefix==='' || strpos($file, $prefix) === 0)) {
unlink($cache_dir.$file);
}
@@ -88,7 +88,7 @@ class OC_Cache_FileGlobal{
$cache_dir = self::getCacheDir();
if($cache_dir and is_dir($cache_dir)) {
$dh=opendir($cache_dir);
- while($file=readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if($file!='.' and $file!='..') {
$mtime = filemtime($cache_dir.$file);
if ($mtime < $now) {
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index 06ab73e3e4d..61bdcd5e0ae 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -50,6 +50,11 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
throw new \Sabre_DAV_Exception_Forbidden();
}
+ // throw an exception if encryption was disabled but the files are still encrypted
+ if (\OC_Util::encryptedFiles()) {
+ throw new \Sabre_DAV_Exception_ServiceUnavailable();
+ }
+
// mark file as partial while uploading (ignored by the scanner)
$partpath = $this->path . '.part';
@@ -89,7 +94,12 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function get() {
- return \OC\Files\Filesystem::fopen($this->path, 'rb');
+ //throw execption if encryption is disabled but files are still encrypted
+ if (\OC_Util::encryptedFiles()) {
+ throw new \Sabre_DAV_Exception_ServiceUnavailable();
+ } else {
+ return \OC\Files\Filesystem::fopen($this->path, 'rb');
+ }
}
diff --git a/lib/connector/sabre/objecttree.php b/lib/connector/sabre/objecttree.php
index c4ddcbecbb8..b298813a202 100644
--- a/lib/connector/sabre/objecttree.php
+++ b/lib/connector/sabre/objecttree.php
@@ -88,7 +88,7 @@ class ObjectTree extends \Sabre_DAV_ObjectTree {
} else {
Filesystem::mkdir($destination);
$dh = Filesystem::opendir($source);
- while ($subnode = readdir($dh)) {
+ while (($subnode = readdir($dh)) !== false) {
if ($subnode == '.' || $subnode == '..') continue;
$this->copy($source . '/' . $subnode, $destination . '/' . $subnode);
diff --git a/lib/connector/sabre/principal.php b/lib/connector/sabre/principal.php
index 16c88b96ea6..59a96797c16 100644
--- a/lib/connector/sabre/principal.php
+++ b/lib/connector/sabre/principal.php
@@ -66,13 +66,13 @@ class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend {
*/
public function getGroupMemberSet($principal) {
// TODO: for now the group principal has only one member, the user itself
- list($prefix, $name) = Sabre_DAV_URLUtil::splitPath($principal);
-
- $principal = $this->getPrincipalByPath($prefix);
- if (!$principal) throw new Sabre_DAV_Exception('Principal not found');
+ $principal = $this->getPrincipalByPath($principal);
+ if (!$principal) {
+ throw new Sabre_DAV_Exception('Principal not found');
+ }
return array(
- $prefix
+ $principal['uri']
);
}
@@ -88,7 +88,9 @@ class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend {
$group_membership = array();
if ($prefix == 'principals') {
$principal = $this->getPrincipalByPath($principal);
- if (!$principal) throw new Sabre_DAV_Exception('Principal not found');
+ if (!$principal) {
+ throw new Sabre_DAV_Exception('Principal not found');
+ }
// TODO: for now the user principal has only its own groups
return array(
diff --git a/lib/connector/sabre/quotaplugin.php b/lib/connector/sabre/quotaplugin.php
index c80a33d04b1..34d4b676157 100644
--- a/lib/connector/sabre/quotaplugin.php
+++ b/lib/connector/sabre/quotaplugin.php
@@ -51,7 +51,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
}
list($parentUri, $newName) = Sabre_DAV_URLUtil::splitPath($uri);
$freeSpace = \OC\Files\Filesystem::free_space($parentUri);
- if ($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN && $length > $freeSpace) {
+ if ($freeSpace !== \OC\Files\SPACE_UNKNOWN && $length > $freeSpace) {
throw new Sabre_DAV_Exception_InsufficientStorage();
}
}
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
deleted file mode 100644
index 3dac3264fbe..00000000000
--- a/lib/fileproxy/quota.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/**
-* ownCloud
-*
-* @author Robin Appelman
-* @copyright 2011 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-/**
- * user quota management
- */
-
-class OC_FileProxy_Quota extends OC_FileProxy{
- static $rootView;
- private $userQuota=array();
-
- /**
- * get the quota for the user
- * @param user
- * @return int
- */
- private function getQuota($user) {
- if(in_array($user, $this->userQuota)) {
- return $this->userQuota[$user];
- }
- $userQuota=OC_Preferences::getValue($user, 'files', 'quota', 'default');
- if($userQuota=='default') {
- $userQuota=OC_AppConfig::getValue('files', 'default_quota', 'none');
- }
- if($userQuota=='none') {
- $this->userQuota[$user]=-1;
- }else{
- $this->userQuota[$user]=OC_Helper::computerFileSize($userQuota);
- }
- return $this->userQuota[$user];
-
- }
-
- /**
- * get the free space in the path's owner home folder
- * @param path
- * @return int
- */
- private function getFreeSpace($path) {
- /**
- * @var \OC\Files\Storage\Storage $storage
- * @var string $internalPath
- */
- list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($path);
- $owner = $storage->getOwner($internalPath);
- if (!$owner) {
- return -1;
- }
-
- $totalSpace = $this->getQuota($owner);
- if($totalSpace == -1) {
- return -1;
- }
-
- $view = new \OC\Files\View("/".$owner."/files");
-
- $rootInfo = $view->getFileInfo('/');
- $usedSpace = isset($rootInfo['size'])?$rootInfo['size']:0;
- return $totalSpace - $usedSpace;
- }
-
- public function postFree_space($path, $space) {
- $free=$this->getFreeSpace($path);
- if($free==-1) {
- return $space;
- }
- if ($space < 0){
- return $free;
- }
- return min($free, $space);
- }
-
- public function preFile_put_contents($path, $data) {
- if (is_resource($data)) {
- $data = '';//TODO: find a way to get the length of the stream without emptying it
- }
- return (strlen($data)<$this->getFreeSpace($path) or $this->getFreeSpace($path)==-1);
- }
-
- public function preCopy($path1, $path2) {
- if(!self::$rootView) {
- self::$rootView = new \OC\Files\View('');
- }
- return (self::$rootView->filesize($path1)<$this->getFreeSpace($path2) or $this->getFreeSpace($path2)==-1);
- }
-
- public function preFromTmpFile($tmpfile, $path) {
- return (filesize($tmpfile)<$this->getFreeSpace($path) or $this->getFreeSpace($path)==-1);
- }
-
- public function preFromUploadedFile($tmpfile, $path) {
- return (filesize($tmpfile)<$this->getFreeSpace($path) or $this->getFreeSpace($path)==-1);
- }
-}
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index 597eabecf54..87fa7c1365a 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -159,7 +159,7 @@ class Scanner extends BasicEmitter {
$newChildren = array();
if ($this->storage->is_dir($path) && ($dh = $this->storage->opendir($path))) {
\OC_DB::beginTransaction();
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
$child = ($path) ? $path . '/' . $file : $file;
if (!Filesystem::isIgnoredDir($file)) {
$newChildren[] = $file;
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index d6ebe7d629a..10ec5c41d11 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -31,8 +31,9 @@
namespace OC\Files;
use OC\Files\Storage\Loader;
-const FREE_SPACE_UNKNOWN = -2;
-const FREE_SPACE_UNLIMITED = -3;
+const SPACE_NOT_COMPUTED = -1;
+const SPACE_UNKNOWN = -2;
+const SPACE_UNLIMITED = -3;
class Filesystem {
/**
@@ -148,6 +149,18 @@ class Filesystem {
*/
private static $loader;
+ /**
+ * @param callable $wrapper
+ */
+ public static function addStorageWrapper($wrapper) {
+ self::getLoader()->addStorageWrapper($wrapper);
+
+ $mounts = self::getMountManager()->getAll();
+ foreach ($mounts as $mount) {
+ $mount->wrapStorage($wrapper);
+ }
+ }
+
public static function getLoader() {
if (!self::$loader) {
self::$loader = new Loader();
diff --git a/lib/files/mount/manager.php b/lib/files/mount/manager.php
index 25a5fe241cc..4c432dcf724 100644
--- a/lib/files/mount/manager.php
+++ b/lib/files/mount/manager.php
@@ -96,6 +96,13 @@ class Manager {
}
/**
+ * @return Mount[]
+ */
+ public function getAll() {
+ return $this->mounts;
+ }
+
+ /**
* Find mounts by numeric storage id
*
* @param string $id
diff --git a/lib/files/mount/mount.php b/lib/files/mount/mount.php
index 17b0055ee84..0ce2f5975c7 100644
--- a/lib/files/mount/mount.php
+++ b/lib/files/mount/mount.php
@@ -138,4 +138,11 @@ class Mount {
}
return $path;
}
+
+ /**
+ * @param callable $wrapper
+ */
+ public function wrapStorage($wrapper) {
+ $this->storage = $wrapper($this->mountPoint, $this->storage);
+ }
}
diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php
index 3da13ac4df0..01560f34fde 100644
--- a/lib/files/storage/common.php
+++ b/lib/files/storage/common.php
@@ -142,7 +142,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
return false;
} else {
$directoryHandle = $this->opendir($directory);
- while ($contents = readdir($directoryHandle)) {
+ while (($contents = readdir($directoryHandle)) !== false) {
if (!\OC\Files\Filesystem::isIgnoredDir($contents)) {
$path = $directory . '/' . $contents;
if ($this->is_dir($path)) {
@@ -225,7 +225,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
private function addLocalFolder($path, $target) {
if ($dh = $this->opendir($path)) {
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if ($file !== '.' and $file !== '..') {
if ($this->is_dir($path . '/' . $file)) {
mkdir($target . '/' . $file);
@@ -243,7 +243,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
$files = array();
$dh = $this->opendir($dir);
if ($dh) {
- while ($item = readdir($dh)) {
+ while (($item = readdir($dh)) !== false) {
if ($item == '.' || $item == '..') continue;
if (strstr(strtolower($item), strtolower($query)) !== false) {
$files[] = $dir . '/' . $item;
@@ -366,6 +366,6 @@ abstract class Common implements \OC\Files\Storage\Storage {
* @return int
*/
public function free_space($path) {
- return \OC\Files\FREE_SPACE_UNKNOWN;
+ return \OC\Files\SPACE_UNKNOWN;
}
}
diff --git a/lib/files/storage/commontest.php b/lib/files/storage/commontest.php
index fbdb7fbf110..c3f1eb31955 100644
--- a/lib/files/storage/commontest.php
+++ b/lib/files/storage/commontest.php
@@ -77,4 +77,4 @@ class CommonTest extends \OC\Files\Storage\Common{
public function touch($path, $mtime=null) {
return $this->storage->touch($path, $mtime);
}
-} \ No newline at end of file
+}
diff --git a/lib/files/storage/local.php b/lib/files/storage/local.php
index b08fd73ce19..5209fabc30a 100644
--- a/lib/files/storage/local.php
+++ b/lib/files/storage/local.php
@@ -265,7 +265,7 @@ if (\OC_Util::runningOnWindows()) {
public function free_space($path) {
$space = @disk_free_space($this->datadir . $path);
if ($space === false) {
- return \OC\Files\FREE_SPACE_UNKNOWN;
+ return \OC\Files\SPACE_UNKNOWN;
}
return $space;
}
diff --git a/lib/files/storage/wrapper/quota.php b/lib/files/storage/wrapper/quota.php
new file mode 100644
index 00000000000..e2da8cf2e05
--- /dev/null
+++ b/lib/files/storage/wrapper/quota.php
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Files\Storage\Wrapper;
+
+class Quota extends Wrapper {
+
+ /**
+ * @var int $quota
+ */
+ protected $quota;
+
+ /**
+ * @param array $parameters
+ */
+ public function __construct($parameters) {
+ $this->storage = $parameters['storage'];
+ $this->quota = $parameters['quota'];
+ }
+
+ protected function getSize($path) {
+ $cache = $this->getCache();
+ $data = $cache->get($path);
+ if (is_array($data) and isset($data['size'])) {
+ return $data['size'];
+ } else {
+ return \OC\Files\SPACE_NOT_COMPUTED;
+ }
+ }
+
+ /**
+ * Get free space as limited by the quota
+ *
+ * @param string $path
+ * @return int
+ */
+ public function free_space($path) {
+ if ($this->quota < 0) {
+ return $this->storage->free_space($path);
+ } else {
+ $used = $this->getSize('');
+ if ($used < 0) {
+ return \OC\Files\SPACE_NOT_COMPUTED;
+ } else {
+ $free = $this->storage->free_space($path);
+ return min($free, (max($this->quota - $used, 0)));
+ }
+ }
+ }
+
+ /**
+ * see http://php.net/manual/en/function.file_put_contents.php
+ *
+ * @param string $path
+ * @param string $data
+ * @return bool
+ */
+ public function file_put_contents($path, $data) {
+ $free = $this->free_space('');
+ if ($free < 0 or strlen($data) < $free) {
+ return $this->storage->file_put_contents($path, $data);
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * see http://php.net/manual/en/function.copy.php
+ *
+ * @param string $source
+ * @param string $target
+ * @return bool
+ */
+ public function copy($source, $target) {
+ $free = $this->free_space('');
+ if ($free < 0 or $this->getSize($source) < $free) {
+ return $this->storage->copy($source, $target);
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * see http://php.net/manual/en/function.fopen.php
+ *
+ * @param string $path
+ * @param string $mode
+ * @return resource
+ */
+ public function fopen($path, $mode) {
+ $source = $this->storage->fopen($path, $mode);
+ $free = $this->free_space('');
+ if ($free >= 0) {
+ return \OC\Files\Stream\Quota::wrap($source, $free);
+ } else {
+ return $source;
+ }
+ }
+}
diff --git a/lib/files/storage/wrapper/wrapper.php b/lib/files/storage/wrapper/wrapper.php
index 4feb0520f12..0336c27efa1 100644
--- a/lib/files/storage/wrapper/wrapper.php
+++ b/lib/files/storage/wrapper/wrapper.php
@@ -395,7 +395,7 @@ class Wrapper implements \OC\Files\Storage\Storage {
* @return \OC\Files\Cache\Permissions
*/
public function getPermissionsCache($path = '') {
- return $this->storage->getPermissions($path);
+ return $this->storage->getPermissionsCache($path);
}
/**
diff --git a/lib/files/stream/quota.php b/lib/files/stream/quota.php
new file mode 100644
index 00000000000..53d8a03d30f
--- /dev/null
+++ b/lib/files/stream/quota.php
@@ -0,0 +1,128 @@
+<?php
+/**
+ * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Files\Stream;
+
+/**
+ * stream wrapper limits the amount of data that can be written to a stream
+ *
+ * usage: void \OC\Files\Stream\Quota::register($id, $stream, $limit)
+ * or: resource \OC\Files\Stream\Quota::wrap($stream, $limit)
+ */
+class Quota {
+ private static $streams = array();
+
+ /**
+ * @var resource $source
+ */
+ private $source;
+
+ /**
+ * @var int $limit
+ */
+ private $limit;
+
+ /**
+ * @param string $id
+ * @param resource $stream
+ * @param int $limit
+ */
+ public static function register($id, $stream, $limit) {
+ self::$streams[$id] = array($stream, $limit);
+ }
+
+ /**
+ * remove all registered streams
+ */
+ public static function clear() {
+ self::$streams = array();
+ }
+
+ /**
+ * @param resource $stream
+ * @param int $limit
+ * @return resource
+ */
+ static public function wrap($stream, $limit) {
+ $id = uniqid();
+ self::register($id, $stream, $limit);
+ $meta = stream_get_meta_data($stream);
+ return fopen('quota://' . $id, $meta['mode']);
+ }
+
+ public function stream_open($path, $mode, $options, &$opened_path) {
+ $id = substr($path, strlen('quota://'));
+ if (isset(self::$streams[$id])) {
+ list($this->source, $this->limit) = self::$streams[$id];
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public function stream_seek($offset, $whence = SEEK_SET) {
+ if ($whence === SEEK_SET) {
+ $this->limit += $this->stream_tell() - $offset;
+ } else {
+ $this->limit -= $offset;
+ }
+ fseek($this->source, $offset, $whence);
+ }
+
+ public function stream_tell() {
+ return ftell($this->source);
+ }
+
+ public function stream_read($count) {
+ $this->limit -= $count;
+ return fread($this->source, $count);
+ }
+
+ public function stream_write($data) {
+ $size = strlen($data);
+ if ($size > $this->limit) {
+ $data = substr($data, 0, $this->limit);
+ $size = $this->limit;
+ }
+ $this->limit -= $size;
+ return fwrite($this->source, $data);
+ }
+
+ public function stream_set_option($option, $arg1, $arg2) {
+ switch ($option) {
+ case STREAM_OPTION_BLOCKING:
+ stream_set_blocking($this->source, $arg1);
+ break;
+ case STREAM_OPTION_READ_TIMEOUT:
+ stream_set_timeout($this->source, $arg1, $arg2);
+ break;
+ case STREAM_OPTION_WRITE_BUFFER:
+ stream_set_write_buffer($this->source, $arg1, $arg2);
+ }
+ }
+
+ public function stream_stat() {
+ return fstat($this->source);
+ }
+
+ public function stream_lock($mode) {
+ flock($this->source, $mode);
+ }
+
+ public function stream_flush() {
+ return fflush($this->source);
+ }
+
+ public function stream_eof() {
+ return feof($this->source);
+ }
+
+ public function stream_close() {
+ fclose($this->source);
+ }
+}
diff --git a/lib/files/view.php b/lib/files/view.php
index c9727fe4984..bb737f19ef8 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -499,7 +499,7 @@ class View {
} else {
if ($this->is_dir($path1) && ($dh = $this->opendir($path1))) {
$result = $this->mkdir($path2);
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if (!Filesystem::isIgnoredDir($file)) {
$result = $this->copy($path1 . '/' . $file, $path2 . '/' . $file);
}
diff --git a/lib/geo.php b/lib/geo.php
index 4eb785da355..ed01ad0b616 100644
--- a/lib/geo.php
+++ b/lib/geo.php
@@ -28,4 +28,4 @@ class OC_Geo{
reset($variances);
return current($variances);
}
-} \ No newline at end of file
+}
diff --git a/lib/helper.php b/lib/helper.php
index 51165193623..1024a570e36 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -55,8 +55,8 @@ class OC_Helper {
*
* Returns a url to the given app and file.
*/
- public static function linkTo($app, $file, $args = array()) {
- if ($app != '') {
+ public static function linkTo( $app, $file, $args = array() ) {
+ if( $app != '' ) {
$app_path = OC_App::getAppPath($app);
// Check if the app is in the app folder
if ($app_path && file_exists($app_path . '/' . $file)) {
@@ -786,14 +786,14 @@ class OC_Helper {
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$freeSpace = \OC\Files\Filesystem::free_space($dir);
if ((int)$upload_max_filesize === 0 and (int)$post_max_size === 0) {
- $maxUploadFilesize = \OC\Files\FREE_SPACE_UNLIMITED;
+ $maxUploadFilesize = \OC\Files\SPACE_UNLIMITED;
} elseif ((int)$upload_max_filesize === 0 or (int)$post_max_size === 0) {
$maxUploadFilesize = max($upload_max_filesize, $post_max_size); //only the non 0 value counts
} else {
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
}
- if ($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN) {
+ if ($freeSpace !== \OC\Files\SPACE_UNKNOWN) {
$freeSpace = max($freeSpace, 0);
return min($maxUploadFilesize, $freeSpace);
diff --git a/lib/installer.php b/lib/installer.php
index c9d331551c0..b9684eaeea0 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -107,7 +107,7 @@ class OC_Installer{
if(!is_file($extractDir.'/appinfo/info.xml')) {
//try to find it in a subdir
$dh=opendir($extractDir);
- while($folder=readdir($dh)) {
+ while (($folder = readdir($dh)) !== false) {
if($folder[0]!='.' and is_dir($extractDir.'/'.$folder)) {
if(is_file($extractDir.'/'.$folder.'/appinfo/info.xml')) {
$extractDir.='/'.$folder;
diff --git a/lib/l10n/ar.php b/lib/l10n/ar.php
index 2e95f28841e..f626dcdfda6 100644
--- a/lib/l10n/ar.php
+++ b/lib/l10n/ar.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "الملفات بحاجة الى ان يتم تحميلها واحد تلو الاخر",
"Back to Files" => "العودة الى الملفات",
"Selected files too large to generate zip file." => "الملفات المحددة كبيرة جدا ليتم ضغطها في ملف zip",
-"couldn't be determined" => "تعذّر تحديده",
"Application is not enabled" => "التطبيق غير مفعّل",
"Authentication error" => "لم يتم التأكد من الشخصية بنجاح",
"Token expired. Please reload page." => "انتهت صلاحية الكلمة , يرجى اعادة تحميل الصفحة",
diff --git a/lib/l10n/bg_BG.php b/lib/l10n/bg_BG.php
index 10d3bb610af..b6cc949eb8a 100644
--- a/lib/l10n/bg_BG.php
+++ b/lib/l10n/bg_BG.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Файловете трябва да се изтеглят един по един.",
"Back to Files" => "Назад към файловете",
"Selected files too large to generate zip file." => "Избраните файлове са прекалено големи за генерирането на ZIP архив.",
-"couldn't be determined" => "не може да се определи",
"Application is not enabled" => "Приложението не е включено.",
"Authentication error" => "Възникна проблем с идентификацията",
"Token expired. Please reload page." => "Ключът е изтекъл, моля презаредете страницата",
diff --git a/lib/l10n/ca.php b/lib/l10n/ca.php
index 95faed498cd..67ccdabc636 100644
--- a/lib/l10n/ca.php
+++ b/lib/l10n/ca.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Torna a Fitxers",
"Selected files too large to generate zip file." => "Els fitxers seleccionats son massa grans per generar un fitxer zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Baixeu els fitxers en trossos petits, de forma separada, o pregunteu a l'administrador.",
-"couldn't be determined" => "no s'ha pogut determinar",
"Application is not enabled" => "L'aplicació no està habilitada",
"Authentication error" => "Error d'autenticació",
"Token expired. Please reload page." => "El testimoni ha expirat. Torneu a carregar la pàgina.",
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index ec54376024d..1a80fc78bb6 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Zpět k souborům",
"Selected files too large to generate zip file." => "Vybrané soubory jsou příliš velké pro vytvoření ZIP souboru.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Stáhněte soubory po menších částech, samostatně, nebo se obraťte na správce.",
-"couldn't be determined" => "nelze zjistit",
"Application is not enabled" => "Aplikace není povolena",
"Authentication error" => "Chyba ověření",
"Token expired. Please reload page." => "Token vypršel. Obnovte prosím stránku.",
@@ -41,13 +40,13 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Váš webový server není správně nastaven pro umožnění synchronizace, rozhraní WebDAV se zdá být rozbité.",
"Please double check the <a href='%s'>installation guides</a>." => "Zkonzultujte, prosím, <a href='%s'>průvodce instalací</a>.",
"seconds ago" => "před pár sekundami",
-"_%n minute ago_::_%n minutes ago_" => array("","",""),
-"_%n hour ago_::_%n hours ago_" => array("","",""),
+"_%n minute ago_::_%n minutes ago_" => array("před %n minutou","před %n minutami","před %n minutami"),
+"_%n hour ago_::_%n hours ago_" => array("před %n hodinou","před %n hodinami","před %n hodinami"),
"today" => "dnes",
"yesterday" => "včera",
-"_%n day go_::_%n days ago_" => array("","",""),
+"_%n day go_::_%n days ago_" => array("před %n dnem","před %n dny","před %n dny"),
"last month" => "minulý měsíc",
-"_%n month ago_::_%n months ago_" => array("","",""),
+"_%n month ago_::_%n months ago_" => array("před %n měsícem","před %n měsíci","před %n měsíci"),
"last year" => "minulý rok",
"years ago" => "před lety",
"Caused by:" => "Příčina:",
diff --git a/lib/l10n/cy_GB.php b/lib/l10n/cy_GB.php
index 649a1ebffac..6973b51878f 100644
--- a/lib/l10n/cy_GB.php
+++ b/lib/l10n/cy_GB.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Mae angen llwytho ffeiliau i lawr fesul un.",
"Back to Files" => "Nôl i Ffeiliau",
"Selected files too large to generate zip file." => "Mae'r ffeiliau ddewiswyd yn rhy fawr i gynhyrchu ffeil zip.",
-"couldn't be determined" => "methwyd pennu",
"Application is not enabled" => "Nid yw'r pecyn wedi'i alluogi",
"Authentication error" => "Gwall dilysu",
"Token expired. Please reload page." => "Tocyn wedi dod i ben. Ail-lwythwch y dudalen.",
diff --git a/lib/l10n/da.php b/lib/l10n/da.php
index cbf6b16debb..78859b08745 100644
--- a/lib/l10n/da.php
+++ b/lib/l10n/da.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Tilbage til Filer",
"Selected files too large to generate zip file." => "De markerede filer er for store til at generere en ZIP-fil.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Download filerne i små bider, seperat, eller kontakt venligst din administrator.",
-"couldn't be determined" => "kunne ikke fastslås",
"Application is not enabled" => "Programmet er ikke aktiveret",
"Authentication error" => "Adgangsfejl",
"Token expired. Please reload page." => "Adgang er udløbet. Genindlæs siden.",
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index 798322fdb47..01fe5ee0583 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Zurück zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewählten Dateien sind zu groß, um eine ZIP-Datei zu erstellen.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Lade die Dateien in kleineren, separaten, Stücken herunter oder bitte deinen Administrator.",
-"couldn't be determined" => "konnte nicht festgestellt werden",
"Application is not enabled" => "Die Anwendung ist nicht aktiviert",
"Authentication error" => "Fehler bei der Anmeldung",
"Token expired. Please reload page." => "Token abgelaufen. Bitte lade die Seite neu.",
diff --git a/lib/l10n/de_CH.php b/lib/l10n/de_CH.php
index d99c144f185..188ea4e2fc0 100644
--- a/lib/l10n/de_CH.php
+++ b/lib/l10n/de_CH.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Zurück zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewählten Dateien sind zu gross, um eine ZIP-Datei zu erstellen.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laden Sie die Dateien in kleineren, separaten, Stücken herunter oder bitten Sie Ihren Administrator.",
-"couldn't be determined" => "konnte nicht ermittelt werden",
"Application is not enabled" => "Die Anwendung ist nicht aktiviert",
"Authentication error" => "Authentifizierungs-Fehler",
"Token expired. Please reload page." => "Token abgelaufen. Bitte laden Sie die Seite neu.",
diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php
index 698a36bd780..9fd319b7e1b 100644
--- a/lib/l10n/de_DE.php
+++ b/lib/l10n/de_DE.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Zurück zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewählten Dateien sind zu groß, um eine ZIP-Datei zu erstellen.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laden Sie die Dateien in kleineren, separaten, Stücken herunter oder bitten Sie Ihren Administrator.",
-"couldn't be determined" => "konnte nicht ermittelt werden",
"Application is not enabled" => "Die Anwendung ist nicht aktiviert",
"Authentication error" => "Authentifizierungs-Fehler",
"Token expired. Please reload page." => "Token abgelaufen. Bitte laden Sie die Seite neu.",
diff --git a/lib/l10n/el.php b/lib/l10n/el.php
index 0fbd134ae92..dcbf82d4a4b 100644
--- a/lib/l10n/el.php
+++ b/lib/l10n/el.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Πίσω στα Αρχεία",
"Selected files too large to generate zip file." => "Τα επιλεγμένα αρχεία είναι μεγάλα ώστε να δημιουργηθεί αρχείο zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Λήψη των αρχείων σε μικρότερα κομμάτια, χωριστά ή ρωτήστε τον διαχειριστή σας.",
-"couldn't be determined" => "δεν μπορούσε να προσδιορισθεί",
"Application is not enabled" => "Δεν ενεργοποιήθηκε η εφαρμογή",
"Authentication error" => "Σφάλμα πιστοποίησης",
"Token expired. Please reload page." => "Το αναγνωριστικό έληξε. Παρακαλώ φορτώστε ξανά την σελίδα.",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index 2029c9b17fe..14bbf6f6a13 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Volver a Archivos",
"Selected files too large to generate zip file." => "Los archivos seleccionados son demasiado grandes para generar el archivo zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descargue los archivos en trozos más pequeños, por separado o solicítelos amablemente su administrador.",
-"couldn't be determined" => "no pudo ser determinado",
"Application is not enabled" => "La aplicación no está habilitada",
"Authentication error" => "Error de autenticación",
"Token expired. Please reload page." => "Token expirado. Por favor, recarga la página.",
diff --git a/lib/l10n/es_AR.php b/lib/l10n/es_AR.php
index 0632c754052..26f1e4ecd5e 100644
--- a/lib/l10n/es_AR.php
+++ b/lib/l10n/es_AR.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Volver a Archivos",
"Selected files too large to generate zip file." => "Los archivos seleccionados son demasiado grandes para generar el archivo zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descargá los archivos en partes más chicas, de forma separada, o pedíselos al administrador",
-"couldn't be determined" => "no se pudo determinar",
"Application is not enabled" => "La aplicación no está habilitada",
"Authentication error" => "Error al autenticar",
"Token expired. Please reload page." => "Token expirado. Por favor, recargá la página.",
diff --git a/lib/l10n/et_EE.php b/lib/l10n/et_EE.php
index a7d823a62c1..912ef37a935 100644
--- a/lib/l10n/et_EE.php
+++ b/lib/l10n/et_EE.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Tagasi failide juurde",
"Selected files too large to generate zip file." => "Valitud failid on ZIP-faili loomiseks liiga suured.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laadi failid alla eraldi väiksemate osadena või küsi nõu oma süsteemiadminstraatorilt.",
-"couldn't be determined" => "ei suudetud tuvastada",
"Application is not enabled" => "Rakendus pole sisse lülitatud",
"Authentication error" => "Autentimise viga",
"Token expired. Please reload page." => "Kontrollkood aegus. Paelun lae leht uuesti.",
diff --git a/lib/l10n/eu.php b/lib/l10n/eu.php
index c5ce243f2fa..8f967314f4b 100644
--- a/lib/l10n/eu.php
+++ b/lib/l10n/eu.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Itzuli fitxategietara",
"Selected files too large to generate zip file." => "Hautatuko fitxategiak oso handiak dira zip fitxategia sortzeko.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Deskargatu fitzategiak zati txikiagoetan, banan-banan edo eskatu mesedez zure administradoreari",
-"couldn't be determined" => "ezin izan da zehaztu",
"Application is not enabled" => "Aplikazioa ez dago gaituta",
"Authentication error" => "Autentifikazio errorea",
"Token expired. Please reload page." => "Tokena iraungitu da. Mesedez birkargatu orria.",
diff --git a/lib/l10n/fa.php b/lib/l10n/fa.php
index e2d8ed50aa3..e9cb695bade 100644
--- a/lib/l10n/fa.php
+++ b/lib/l10n/fa.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "فایل ها باید به صورت یکی یکی دانلود شوند",
"Back to Files" => "بازگشت به فایل ها",
"Selected files too large to generate zip file." => "فایل های انتخاب شده بزرگتر از آن هستند که بتوان یک فایل فشرده تولید کرد",
-"couldn't be determined" => "نمیتواند مشخص شود",
"Application is not enabled" => "برنامه فعال نشده است",
"Authentication error" => "خطا در اعتبار سنجی",
"Token expired. Please reload page." => "رمز منقضی شده است. لطفا دوباره صفحه را بارگذاری نمایید.",
diff --git a/lib/l10n/fi_FI.php b/lib/l10n/fi_FI.php
index dccb1753042..4552d4627c0 100644
--- a/lib/l10n/fi_FI.php
+++ b/lib/l10n/fi_FI.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Tiedostot on ladattava yksittäin.",
"Back to Files" => "Takaisin tiedostoihin",
"Selected files too large to generate zip file." => "Valitut tiedostot ovat liian suurikokoisia mahtuakseen zip-tiedostoon.",
-"couldn't be determined" => "ei voitu määrittää",
"Application is not enabled" => "Sovellusta ei ole otettu käyttöön",
"Authentication error" => "Tunnistautumisvirhe",
"Token expired. Please reload page." => "Valtuutus vanheni. Lataa sivu uudelleen.",
diff --git a/lib/l10n/fr.php b/lib/l10n/fr.php
index 0a040bb9e8e..cfcca28d5f8 100644
--- a/lib/l10n/fr.php
+++ b/lib/l10n/fr.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Les fichiers nécessitent d'être téléchargés un par un.",
"Back to Files" => "Retour aux Fichiers",
"Selected files too large to generate zip file." => "Les fichiers sélectionnés sont trop volumineux pour être compressés.",
-"couldn't be determined" => "impossible à déterminer",
"Application is not enabled" => "L'application n'est pas activée",
"Authentication error" => "Erreur d'authentification",
"Token expired. Please reload page." => "La session a expiré. Veuillez recharger la page.",
diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php
index f105578ace2..4d92e89ebba 100644
--- a/lib/l10n/gl.php
+++ b/lib/l10n/gl.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Volver aos ficheiros",
"Selected files too large to generate zip file." => "Os ficheiros seleccionados son demasiado grandes como para xerar un ficheiro zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descargue os ficheiros en cachos máis pequenos e por separado, ou pídallos amabelmente ao seu administrador.",
-"couldn't be determined" => "non foi posíbel determinalo",
"Application is not enabled" => "O aplicativo non está activado",
"Authentication error" => "Produciuse un erro de autenticación",
"Token expired. Please reload page." => "Testemuña caducada. Recargue a páxina.",
diff --git a/lib/l10n/hu_HU.php b/lib/l10n/hu_HU.php
index c8aff3add72..7ec7621a655 100644
--- a/lib/l10n/hu_HU.php
+++ b/lib/l10n/hu_HU.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Vissza a Fájlokhoz",
"Selected files too large to generate zip file." => "A kiválasztott fájlok túl nagyok a zip tömörítéshez.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Tölts le a fileokat kisebb chunkokban, kölün vagy kérj segitséget a rendszergazdádtól.",
-"couldn't be determined" => "nem határozható meg",
"Application is not enabled" => "Az alkalmazás nincs engedélyezve",
"Authentication error" => "Azonosítási hiba",
"Token expired. Please reload page." => "A token lejárt. Frissítse az oldalt.",
diff --git a/lib/l10n/id.php b/lib/l10n/id.php
index eaec65516b8..080faddb321 100644
--- a/lib/l10n/id.php
+++ b/lib/l10n/id.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Berkas harus diunduh satu persatu.",
"Back to Files" => "Kembali ke Daftar Berkas",
"Selected files too large to generate zip file." => "Berkas yang dipilih terlalu besar untuk dibuat berkas zip-nya.",
-"couldn't be determined" => "tidak dapat ditentukan",
"Application is not enabled" => "Aplikasi tidak diaktifkan",
"Authentication error" => "Galat saat autentikasi",
"Token expired. Please reload page." => "Token kedaluwarsa. Silakan muat ulang halaman.",
diff --git a/lib/l10n/it.php b/lib/l10n/it.php
index c29ab4833e3..e734fbdbb9b 100644
--- a/lib/l10n/it.php
+++ b/lib/l10n/it.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Torna ai file",
"Selected files too large to generate zip file." => "I file selezionati sono troppo grandi per generare un file zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Scarica i file in blocchi più piccoli, separatamente o chiedi al tuo amministratore.",
-"couldn't be determined" => "non può essere determinato",
"Application is not enabled" => "L'applicazione non è abilitata",
"Authentication error" => "Errore di autenticazione",
"Token expired. Please reload page." => "Token scaduto. Ricarica la pagina.",
diff --git a/lib/l10n/ja_JP.php b/lib/l10n/ja_JP.php
index 482806d4946..902170524b9 100644
--- a/lib/l10n/ja_JP.php
+++ b/lib/l10n/ja_JP.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "ファイルに戻る",
"Selected files too large to generate zip file." => "選択したファイルはZIPファイルの生成には大きすぎます。",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "ファイルは、小さいファイルに分割されてダウンロードされます。もしくは、管理者にお尋ねください。",
-"couldn't be determined" => "測定できませんでした",
"Application is not enabled" => "アプリケーションは無効です",
"Authentication error" => "認証エラー",
"Token expired. Please reload page." => "トークンが無効になりました。ページを再読込してください。",
@@ -41,13 +40,13 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "WebDAVインタフェースが動作していないと考えられるため、あなたのWEBサーバはまだファイルの同期を許可するように適切な設定がされていません。",
"Please double check the <a href='%s'>installation guides</a>." => "<a href='%s'>インストールガイド</a>をよく確認してください。",
"seconds ago" => "数秒前",
-"_%n minute ago_::_%n minutes ago_" => array(""),
-"_%n hour ago_::_%n hours ago_" => array(""),
+"_%n minute ago_::_%n minutes ago_" => array("%n 分前"),
+"_%n hour ago_::_%n hours ago_" => array("%n 時間後"),
"today" => "今日",
"yesterday" => "昨日",
-"_%n day go_::_%n days ago_" => array(""),
+"_%n day go_::_%n days ago_" => array("%n 日後"),
"last month" => "一月前",
-"_%n month ago_::_%n months ago_" => array(""),
+"_%n month ago_::_%n months ago_" => array("%n カ月後"),
"last year" => "一年前",
"years ago" => "年前",
"Caused by:" => "原因は以下:",
diff --git a/lib/l10n/ka_GE.php b/lib/l10n/ka_GE.php
index 3cb55277d6c..8fbe34e6786 100644
--- a/lib/l10n/ka_GE.php
+++ b/lib/l10n/ka_GE.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ფაილები უნდა გადმოიტვირთოს სათითაოდ.",
"Back to Files" => "უკან ფაილებში",
"Selected files too large to generate zip file." => "არჩეული ფაილები ძალიან დიდია zip ფაილის გენერაციისთვის.",
-"couldn't be determined" => "ვერ განისაზღვრა",
"Application is not enabled" => "აპლიკაცია არ არის აქტიური",
"Authentication error" => "ავთენტიფიკაციის შეცდომა",
"Token expired. Please reload page." => "Token–ს ვადა გაუვიდა. გთხოვთ განაახლოთ გვერდი.",
diff --git a/lib/l10n/ko.php b/lib/l10n/ko.php
index 824882c984d..4dab8b816bf 100644
--- a/lib/l10n/ko.php
+++ b/lib/l10n/ko.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "파일을 개별적으로 다운로드해야 합니다.",
"Back to Files" => "파일로 돌아가기",
"Selected files too large to generate zip file." => "선택한 파일들은 ZIP 파일을 생성하기에 너무 큽니다.",
-"couldn't be determined" => "결정할 수 없음",
"Application is not enabled" => "앱이 활성화되지 않았습니다",
"Authentication error" => "인증 오류",
"Token expired. Please reload page." => "토큰이 만료되었습니다. 페이지를 새로 고치십시오.",
diff --git a/lib/l10n/lv.php b/lib/l10n/lv.php
index 2a2daee8d89..4090a36edcc 100644
--- a/lib/l10n/lv.php
+++ b/lib/l10n/lv.php
@@ -5,12 +5,14 @@ $TRANSLATIONS = array(
"Settings" => "Iestatījumi",
"Users" => "Lietotāji",
"Admin" => "Administratori",
+"Failed to upgrade \"%s\"." => "Kļūda atjauninot \"%s\"",
"web services under your control" => "tīmekļa servisi tavā varā",
+"cannot open \"%s\"" => "Nevar atvērt \"%s\"",
"ZIP download is turned off." => "ZIP lejupielādēšana ir izslēgta.",
"Files need to be downloaded one by one." => "Datnes var lejupielādēt tikai katru atsevišķi.",
"Back to Files" => "Atpakaļ pie datnēm",
"Selected files too large to generate zip file." => "Izvēlētās datnes ir pārāk lielas, lai izveidotu zip datni.",
-"couldn't be determined" => "nevarēja noteikt",
+"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Lejupielādējiet savus failus mazākās daļās, atsevišķi vai palūdziet tos administratoram.",
"Application is not enabled" => "Lietotne nav aktivēta",
"Authentication error" => "Autentifikācijas kļūda",
"Token expired. Please reload page." => "Pilnvarai ir beidzies termiņš. Lūdzu, pārlādējiet lapu.",
@@ -29,6 +31,7 @@ $TRANSLATIONS = array(
"Drop this user from MySQL" => "Izmest šo lietotāju no MySQL",
"MySQL user '%s'@'%%' already exists" => "MySQL lietotājs '%s'@'%%' jau eksistē",
"Drop this user from MySQL." => "Izmest šo lietotāju no MySQL.",
+"Oracle connection could not be established" => "Nevar izveidot savienojumu ar Oracle",
"Oracle username and/or password not valid" => "Nav derīga Oracle parole un/vai lietotājvārds",
"Offending command was: \"%s\", name: %s, password: %s" => "Vainīgā komanda bija \"%s\", vārds: %s, parole: %s",
"PostgreSQL username and/or password not valid" => "Nav derīga PostgreSQL parole un/vai lietotājvārds",
@@ -37,15 +40,16 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Jūsu serveris vēl nav pareizi iestatīts, lai ļautu sinhronizēt datnes, jo izskatās, ka WebDAV saskarne ir salauzta.",
"Please double check the <a href='%s'>installation guides</a>." => "Lūdzu, vēlreiz pārbaudiet <a href='%s'>instalēšanas palīdzību</a>.",
"seconds ago" => "sekundes atpakaļ",
-"_%n minute ago_::_%n minutes ago_" => array("","",""),
-"_%n hour ago_::_%n hours ago_" => array("","",""),
+"_%n minute ago_::_%n minutes ago_" => array("","","Pirms %n minūtēm"),
+"_%n hour ago_::_%n hours ago_" => array("","","Pirms %n stundām"),
"today" => "šodien",
"yesterday" => "vakar",
-"_%n day go_::_%n days ago_" => array("","",""),
+"_%n day go_::_%n days ago_" => array("","","Pirms %n dienām"),
"last month" => "pagājušajā mēnesī",
-"_%n month ago_::_%n months ago_" => array("","",""),
+"_%n month ago_::_%n months ago_" => array("","","Pirms %n mēnešiem"),
"last year" => "gājušajā gadā",
"years ago" => "gadus atpakaļ",
+"Caused by:" => "Cēlonis:",
"Could not find category \"%s\"" => "Nevarēja atrast kategoriju “%s”"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);";
diff --git a/lib/l10n/my_MM.php b/lib/l10n/my_MM.php
index b2e9ca18139..5f4b6ddc820 100644
--- a/lib/l10n/my_MM.php
+++ b/lib/l10n/my_MM.php
@@ -8,7 +8,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ဖိုင်များသည် တစ်ခုပြီး တစ်ခုဒေါင်းလုတ်ချရန်လိုအပ်သည်",
"Back to Files" => "ဖိုင်သို့ပြန်သွားမည်",
"Selected files too large to generate zip file." => "zip ဖိုင်အဖြစ်ပြုလုပ်ရန် ရွေးချယ်ထားသောဖိုင်များသည် အရမ်းကြီးလွန်းသည်",
-"couldn't be determined" => "မဆုံးဖြတ်နိုင်ပါ။",
"Authentication error" => "ခွင့်ပြုချက်မအောင်မြင်",
"Files" => "ဖိုင်များ",
"Text" => "စာသား",
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index 2d737bd5ebd..338c3673c5b 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Terug naar bestanden",
"Selected files too large to generate zip file." => "De geselecteerde bestanden zijn te groot om een zip bestand te maken.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Download de bestanden in kleinere brokken, appart of vraag uw administrator.",
-"couldn't be determined" => "kon niet worden vastgesteld",
"Application is not enabled" => "De applicatie is niet actief",
"Authentication error" => "Authenticatie fout",
"Token expired. Please reload page." => "Token verlopen. Herlaad de pagina.",
@@ -41,13 +40,13 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Uw webserver is nog niet goed ingesteld voor bestandssynchronisatie omdat de WebDAV interface verbroken lijkt.",
"Please double check the <a href='%s'>installation guides</a>." => "Controleer de <a href='%s'>installatiehandleiding</a> goed.",
"seconds ago" => "seconden geleden",
-"_%n minute ago_::_%n minutes ago_" => array("",""),
-"_%n hour ago_::_%n hours ago_" => array("",""),
+"_%n minute ago_::_%n minutes ago_" => array("%n minuut geleden","%n minuten geleden"),
+"_%n hour ago_::_%n hours ago_" => array("%n uur geleden","%n uur geleden"),
"today" => "vandaag",
"yesterday" => "gisteren",
-"_%n day go_::_%n days ago_" => array("",""),
+"_%n day go_::_%n days ago_" => array("%n dag terug","%n dagen geleden"),
"last month" => "vorige maand",
-"_%n month ago_::_%n months ago_" => array("",""),
+"_%n month ago_::_%n months ago_" => array("%n maand geleden","%n maanden geleden"),
"last year" => "vorig jaar",
"years ago" => "jaar geleden",
"Caused by:" => "Gekomen door:",
diff --git a/lib/l10n/pl.php b/lib/l10n/pl.php
index 1740676080e..984043aa0be 100644
--- a/lib/l10n/pl.php
+++ b/lib/l10n/pl.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Wróć do plików",
"Selected files too large to generate zip file." => "Wybrane pliki są zbyt duże, aby wygenerować plik zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Pobierz pliki w mniejszy kawałkach, oddzielnie lub poproś administratora o zwiększenie limitu.",
-"couldn't be determined" => "nie może zostać znaleziony",
"Application is not enabled" => "Aplikacja nie jest włączona",
"Authentication error" => "Błąd uwierzytelniania",
"Token expired. Please reload page." => "Token wygasł. Proszę ponownie załadować stronę.",
diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php
index 4ebf587cf86..52329667174 100644
--- a/lib/l10n/pt_BR.php
+++ b/lib/l10n/pt_BR.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Voltar para Arquivos",
"Selected files too large to generate zip file." => "Arquivos selecionados são muito grandes para gerar arquivo zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Baixe os arquivos em pedaços menores, separadamente ou solicite educadamente ao seu administrador.",
-"couldn't be determined" => "não pôde ser determinado",
"Application is not enabled" => "Aplicação não está habilitada",
"Authentication error" => "Erro de autenticação",
"Token expired. Please reload page." => "Token expirou. Por favor recarregue a página.",
diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php
index 3131499e130..c8a2f78cbf5 100644
--- a/lib/l10n/pt_PT.php
+++ b/lib/l10n/pt_PT.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Voltar a Ficheiros",
"Selected files too large to generate zip file." => "Os ficheiros seleccionados são grandes demais para gerar um ficheiro zip.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descarregue os ficheiros em partes menores, separados ou peça gentilmente ao seu administrador.",
-"couldn't be determined" => "Não foi possível determinar",
"Application is not enabled" => "A aplicação não está activada",
"Authentication error" => "Erro na autenticação",
"Token expired. Please reload page." => "O token expirou. Por favor recarregue a página.",
diff --git a/lib/l10n/ro.php b/lib/l10n/ro.php
index 2b6d14d58f3..b338b349239 100644
--- a/lib/l10n/ro.php
+++ b/lib/l10n/ro.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Fișierele trebuie descărcate unul câte unul.",
"Back to Files" => "Înapoi la fișiere",
"Selected files too large to generate zip file." => "Fișierele selectate sunt prea mari pentru a genera un fișier zip.",
-"couldn't be determined" => "nu poate fi determinat",
"Application is not enabled" => "Aplicația nu este activată",
"Authentication error" => "Eroare la autentificare",
"Token expired. Please reload page." => "Token expirat. Te rugăm să reîncarci pagina.",
diff --git a/lib/l10n/ru.php b/lib/l10n/ru.php
index 92b14b9b89e..c3b6a077b72 100644
--- a/lib/l10n/ru.php
+++ b/lib/l10n/ru.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Назад к файлам",
"Selected files too large to generate zip file." => "Выбранные файлы слишком велики, чтобы создать zip файл.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Загрузите файл маленьшими порциями, раздельно или вежливо попросите Вашего администратора.",
-"couldn't be determined" => "Невозможно установить",
"Application is not enabled" => "Приложение не разрешено",
"Authentication error" => "Ошибка аутентификации",
"Token expired. Please reload page." => "Токен просрочен. Перезагрузите страницу.",
@@ -41,13 +40,13 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ваш веб сервер до сих пор не настроен правильно для возможности синхронизации файлов, похоже что проблема в неисправности интерфейса WebDAV.",
"Please double check the <a href='%s'>installation guides</a>." => "Пожалуйста, дважды просмотрите <a href='%s'>инструкции по установке</a>.",
"seconds ago" => "несколько секунд назад",
-"_%n minute ago_::_%n minutes ago_" => array("","",""),
-"_%n hour ago_::_%n hours ago_" => array("","",""),
+"_%n minute ago_::_%n minutes ago_" => array("%n минута назад","%n минуты назад","%n минут назад"),
+"_%n hour ago_::_%n hours ago_" => array("%n час назад","%n часа назад","%n часов назад"),
"today" => "сегодня",
"yesterday" => "вчера",
-"_%n day go_::_%n days ago_" => array("","",""),
+"_%n day go_::_%n days ago_" => array("%n день назад","%n дня назад","%n дней назад"),
"last month" => "в прошлом месяце",
-"_%n month ago_::_%n months ago_" => array("","",""),
+"_%n month ago_::_%n months ago_" => array("%n месяц назад","%n месяца назад","%n месяцев назад"),
"last year" => "в прошлом году",
"years ago" => "несколько лет назад",
"Caused by:" => "Вызвано:",
diff --git a/lib/l10n/sk_SK.php b/lib/l10n/sk_SK.php
index ef3dc6eb977..4101af247c2 100644
--- a/lib/l10n/sk_SK.php
+++ b/lib/l10n/sk_SK.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Späť na súbory",
"Selected files too large to generate zip file." => "Zvolené súbory sú príliš veľké na vygenerovanie zip súboru.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Stiahnite súbory po menších častiach, samostatne, alebo sa obráťte na správcu.",
-"couldn't be determined" => "nedá sa zistiť",
"Application is not enabled" => "Aplikácia nie je zapnutá",
"Authentication error" => "Chyba autentifikácie",
"Token expired. Please reload page." => "Token vypršal. Obnovte, prosím, stránku.",
@@ -41,13 +40,13 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Váš webový server nie je správne nastavený na synchronizáciu, pretože rozhranie WebDAV je poškodené.",
"Please double check the <a href='%s'>installation guides</a>." => "Prosím skontrolujte <a href='%s'>inštalačnú príručku</a>.",
"seconds ago" => "pred sekundami",
-"_%n minute ago_::_%n minutes ago_" => array("","",""),
-"_%n hour ago_::_%n hours ago_" => array("","",""),
+"_%n minute ago_::_%n minutes ago_" => array("","","pred %n minútami"),
+"_%n hour ago_::_%n hours ago_" => array("","","pred %n hodinami"),
"today" => "dnes",
"yesterday" => "včera",
-"_%n day go_::_%n days ago_" => array("","",""),
+"_%n day go_::_%n days ago_" => array("","","pred %n dňami"),
"last month" => "minulý mesiac",
-"_%n month ago_::_%n months ago_" => array("","",""),
+"_%n month ago_::_%n months ago_" => array("","","pred %n mesiacmi"),
"last year" => "minulý rok",
"years ago" => "pred rokmi",
"Caused by:" => "Príčina:",
diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php
index 73a397f3c84..5722191aedf 100644
--- a/lib/l10n/sl.php
+++ b/lib/l10n/sl.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Datoteke je mogoče prejeti le posamično.",
"Back to Files" => "Nazaj na datoteke",
"Selected files too large to generate zip file." => "Izbrane datoteke so prevelike za ustvarjanje datoteke arhiva zip.",
-"couldn't be determined" => "ni mogoče določiti",
"Application is not enabled" => "Program ni omogočen",
"Authentication error" => "Napaka pri overjanju",
"Token expired. Please reload page." => "Žeton je potekel. Stran je treba ponovno naložiti.",
diff --git a/lib/l10n/sq.php b/lib/l10n/sq.php
index ca2364f9864..c2447b7ea23 100644
--- a/lib/l10n/sq.php
+++ b/lib/l10n/sq.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Skedarët duhet të shkarkohen një nga një.",
"Back to Files" => "Kthehu tek skedarët",
"Selected files too large to generate zip file." => "Skedarët e selektuar janë shumë të mëdhenj për të krijuar një skedar ZIP.",
-"couldn't be determined" => "nuk u vendos dot",
"Application is not enabled" => "Programi nuk është i aktivizuar.",
"Authentication error" => "Veprim i gabuar gjatë vërtetimit të identitetit",
"Token expired. Please reload page." => "Përmbajtja ka skaduar. Ju lutemi ringarkoni faqen.",
diff --git a/lib/l10n/sr.php b/lib/l10n/sr.php
index c42419b6d92..9441d0578fc 100644
--- a/lib/l10n/sr.php
+++ b/lib/l10n/sr.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Датотеке морате преузимати једну по једну.",
"Back to Files" => "Назад на датотеке",
"Selected files too large to generate zip file." => "Изабране датотеке су превелике да бисте направили ZIP датотеку.",
-"couldn't be determined" => "није одређено",
"Application is not enabled" => "Апликација није омогућена",
"Authentication error" => "Грешка при провери идентитета",
"Token expired. Please reload page." => "Жетон је истекао. Поново учитајте страницу.",
diff --git a/lib/l10n/sv.php b/lib/l10n/sv.php
index fa3ae318cee..dd54e6ca5d3 100644
--- a/lib/l10n/sv.php
+++ b/lib/l10n/sv.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Tillbaka till Filer",
"Selected files too large to generate zip file." => "Valda filer är för stora för att skapa zip-fil.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Ladda ner filerna i mindre bitar, separat eller fråga din administratör.",
-"couldn't be determined" => "kunde inte bestämmas",
"Application is not enabled" => "Applikationen är inte aktiverad",
"Authentication error" => "Fel vid autentisering",
"Token expired. Please reload page." => "Ogiltig token. Ladda om sidan.",
@@ -41,13 +40,13 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Din webbserver är inte korrekt konfigurerad för att tillåta filsynkronisering eftersom WebDAV inte verkar fungera.",
"Please double check the <a href='%s'>installation guides</a>." => "Var god kontrollera <a href='%s'>installationsguiden</a>.",
"seconds ago" => "sekunder sedan",
-"_%n minute ago_::_%n minutes ago_" => array("",""),
-"_%n hour ago_::_%n hours ago_" => array("",""),
+"_%n minute ago_::_%n minutes ago_" => array("%n minut sedan","%n minuter sedan"),
+"_%n hour ago_::_%n hours ago_" => array("%n timme sedan","%n timmar sedan"),
"today" => "i dag",
"yesterday" => "i går",
-"_%n day go_::_%n days ago_" => array("",""),
+"_%n day go_::_%n days ago_" => array("%n dag sedan","%n dagar sedan"),
"last month" => "förra månaden",
-"_%n month ago_::_%n months ago_" => array("",""),
+"_%n month ago_::_%n months ago_" => array("%n månad sedan","%n månader sedan"),
"last year" => "förra året",
"years ago" => "år sedan",
"Caused by:" => "Orsakad av:",
diff --git a/lib/l10n/th_TH.php b/lib/l10n/th_TH.php
index 53a150d8f1e..3344d0bb18e 100644
--- a/lib/l10n/th_TH.php
+++ b/lib/l10n/th_TH.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ไฟล์สามารถดาวน์โหลดได้ทีละครั้งเท่านั้น",
"Back to Files" => "กลับไปที่ไฟล์",
"Selected files too large to generate zip file." => "ไฟล์ที่เลือกมีขนาดใหญ่เกินกว่าที่จะสร้างเป็นไฟล์ zip",
-"couldn't be determined" => "ไม่สามารถกำหนดได้",
"Application is not enabled" => "แอพพลิเคชั่นดังกล่าวยังไม่ได้เปิดใช้งาน",
"Authentication error" => "เกิดข้อผิดพลาดในสิทธิ์การเข้าใช้งาน",
"Token expired. Please reload page." => "รหัสยืนยันความถูกต้องหมดอายุแล้ว กรุณาโหลดหน้าเว็บใหม่อีกครั้ง",
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index f95933645da..498469ea8b1 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -13,7 +13,6 @@ $TRANSLATIONS = array(
"Back to Files" => "Dosyalara dön",
"Selected files too large to generate zip file." => "Seçilen dosyalar bir zip dosyası oluşturmak için fazla büyüktür.",
"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Dosyaları ayrı ayrı, küçük parçalar halinde indirin ya da yöneticinizden yardım isteyin. ",
-"couldn't be determined" => "tespit edilemedi",
"Application is not enabled" => "Uygulama etkinleştirilmedi",
"Authentication error" => "Kimlik doğrulama hatası",
"Token expired. Please reload page." => "Jetonun süresi geçti. Lütfen sayfayı yenileyin.",
diff --git a/lib/l10n/uk.php b/lib/l10n/uk.php
index 26617396e06..c1513c5bb79 100644
--- a/lib/l10n/uk.php
+++ b/lib/l10n/uk.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Файли повинні бути завантаженні послідовно.",
"Back to Files" => "Повернутися до файлів",
"Selected files too large to generate zip file." => "Вибрані фали завеликі для генерування zip файлу.",
-"couldn't be determined" => "не може бути визначено",
"Application is not enabled" => "Додаток не увімкнений",
"Authentication error" => "Помилка автентифікації",
"Token expired. Please reload page." => "Строк дії токена скінчився. Будь ласка, перезавантажте сторінку.",
diff --git a/lib/l10n/vi.php b/lib/l10n/vi.php
index ebdb3ab2810..dc0045c35ca 100644
--- a/lib/l10n/vi.php
+++ b/lib/l10n/vi.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Tập tin cần phải được tải về từng người một.",
"Back to Files" => "Trở lại tập tin",
"Selected files too large to generate zip file." => "Tập tin được chọn quá lớn để tạo tập tin ZIP.",
-"couldn't be determined" => "không thể phát hiện được",
"Application is not enabled" => "Ứng dụng không được BẬT",
"Authentication error" => "Lỗi xác thực",
"Token expired. Please reload page." => "Mã Token đã hết hạn. Hãy tải lại trang.",
diff --git a/lib/l10n/zh_CN.php b/lib/l10n/zh_CN.php
index b814b055a22..03bd48de74b 100644
--- a/lib/l10n/zh_CN.php
+++ b/lib/l10n/zh_CN.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "需要逐一下载文件",
"Back to Files" => "回到文件",
"Selected files too large to generate zip file." => "选择的文件太大,无法生成 zip 文件。",
-"couldn't be determined" => "无法确定",
"Application is not enabled" => "应用程序未启用",
"Authentication error" => "认证出错",
"Token expired. Please reload page." => "Token 过期,请刷新页面。",
@@ -38,7 +37,7 @@ $TRANSLATIONS = array(
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "您的Web服务器尚未正确设置以允许文件同步, 因为WebDAV的接口似乎已损坏.",
"Please double check the <a href='%s'>installation guides</a>." => "请认真检查<a href='%s'>安装指南</a>.",
"seconds ago" => "秒前",
-"_%n minute ago_::_%n minutes ago_" => array(""),
+"_%n minute ago_::_%n minutes ago_" => array("%n 分钟前"),
"_%n hour ago_::_%n hours ago_" => array(""),
"today" => "今天",
"yesterday" => "昨天",
diff --git a/lib/l10n/zh_TW.php b/lib/l10n/zh_TW.php
index 83e0dff3926..f405eb88ae9 100644
--- a/lib/l10n/zh_TW.php
+++ b/lib/l10n/zh_TW.php
@@ -10,7 +10,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "檔案需要逐一下載。",
"Back to Files" => "回到檔案列表",
"Selected files too large to generate zip file." => "選擇的檔案太大以致於無法產生壓縮檔。",
-"couldn't be determined" => "無法判斷",
"Application is not enabled" => "應用程式未啟用",
"Authentication error" => "認證錯誤",
"Token expired. Please reload page." => "Token 過期,請重新整理頁面。",
diff --git a/lib/memcache/factory.php b/lib/memcache/factory.php
index 4c1b1ab207f..fde7d947567 100644
--- a/lib/memcache/factory.php
+++ b/lib/memcache/factory.php
@@ -37,4 +37,33 @@ class Factory {
public function isAvailable() {
return XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable() || Memcached::isAvailable();
}
+
+ /**
+ * get a in-server cache instance, will return null if no backend is available
+ *
+ * @param string $prefix
+ * @return \OC\Memcache\Cache
+ */
+ public static function createLowLatency($prefix = '') {
+ if (XCache::isAvailable()) {
+ return new XCache($prefix);
+ } elseif (APCu::isAvailable()) {
+ return new APCu($prefix);
+ } elseif (APC::isAvailable()) {
+ return new APC($prefix);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * check if there is a in-server backend available
+ *
+ * @return bool
+ */
+ public static function isAvailableLowLatency() {
+ return XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable();
+ }
+
+
}
diff --git a/lib/ocs/result.php b/lib/ocs/result.php
index 729c39056d9..84f06fa01c7 100644
--- a/lib/ocs/result.php
+++ b/lib/ocs/result.php
@@ -94,4 +94,4 @@ class OC_OCS_Result{
}
-} \ No newline at end of file
+}
diff --git a/lib/public/groupinterface.php b/lib/public/groupinterface.php
index 97833028118..5603faa8265 100644
--- a/lib/public/groupinterface.php
+++ b/lib/public/groupinterface.php
@@ -28,4 +28,4 @@
namespace OCP;
-interface GroupInterface extends \OC_Group_Interface {} \ No newline at end of file
+interface GroupInterface extends \OC_Group_Interface {}
diff --git a/lib/public/userinterface.php b/lib/public/userinterface.php
index b73a8f8d8b0..53d9faf7a5e 100644
--- a/lib/public/userinterface.php
+++ b/lib/public/userinterface.php
@@ -28,4 +28,4 @@
namespace OCP;
-interface UserInterface extends \OC_User_Interface {} \ No newline at end of file
+interface UserInterface extends \OC_User_Interface {}
diff --git a/lib/public/util.php b/lib/public/util.php
index 693805946ea..b33f07b55e6 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -123,6 +123,14 @@ class Util {
}
/**
+ * @brief check if some encrypted files are stored
+ * @return bool
+ */
+ public static function encryptedFiles() {
+ return \OC_Util::encryptedFiles();
+ }
+
+ /**
* @brief Creates an absolute url
* @param string $app app
* @param string $file file
diff --git a/lib/user/http.php b/lib/user/http.php
index 944ede73a0b..1e044ed4188 100644
--- a/lib/user/http.php
+++ b/lib/user/http.php
@@ -103,4 +103,4 @@ class OC_User_HTTP extends OC_User_Backend {
return false;
}
}
-} \ No newline at end of file
+}
diff --git a/lib/user/interface.php b/lib/user/interface.php
index b1e19aea7fb..c72bdfaf3fd 100644
--- a/lib/user/interface.php
+++ b/lib/user/interface.php
@@ -77,4 +77,4 @@ interface OC_User_Interface {
* @return boolean if users can be listed or not
*/
public function hasUserListings();
-} \ No newline at end of file
+}
diff --git a/lib/util.php b/lib/util.php
index 25632ac1ea2..e03667b0794 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -46,6 +46,16 @@ class OC_Util {
}
if( $user != "" ) { //if we aren't logged in, there is no use to set up the filesystem
+ $quota = self::getUserQuota($user);
+ if ($quota !== \OC\Files\SPACE_UNLIMITED) {
+ \OC\Files\Filesystem::addStorageWrapper(function($mountPoint, $storage) use ($quota, $user) {
+ if ($mountPoint === '/' . $user . '/'){
+ return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $quota));
+ } else {
+ return $storage;
+ }
+ });
+ }
$user_dir = '/'.$user.'/files';
$user_root = OC_User::getHome($user);
$userdirectory = $user_root . '/files';
@@ -55,9 +65,7 @@ class OC_Util {
//jail the user into his "home" directory
\OC\Files\Filesystem::init($user, $user_dir);
- $quotaProxy=new OC_FileProxy_Quota();
$fileOperationProxy = new OC_FileProxy_FileOperations();
- OC_FileProxy::register($quotaProxy);
OC_FileProxy::register($fileOperationProxy);
OC_Hook::emit('OC_Filesystem', 'setup', array('user' => $user, 'user_dir' => $user_dir));
@@ -65,6 +73,18 @@ class OC_Util {
return true;
}
+ public static function getUserQuota($user){
+ $userQuota = OC_Preferences::getValue($user, 'files', 'quota', 'default');
+ if($userQuota === 'default') {
+ $userQuota = OC_AppConfig::getValue('files', 'default_quota', 'none');
+ }
+ if($userQuota === 'none') {
+ return \OC\Files\SPACE_UNLIMITED;
+ }else{
+ return OC_Helper::computerFileSize($userQuota);
+ }
+ }
+
public static function tearDownFS() {
\OC\Files\Filesystem::tearDown();
self::$fsSetup=false;
@@ -320,6 +340,23 @@ class OC_Util {
}
/**
+ * @brief check if there are still some encrypted files stored
+ * @return boolean
+ */
+ public static function encryptedFiles() {
+ //check if encryption was enabled in the past
+ $encryptedFiles = false;
+ if (OC_App::isEnabled('files_encryption') === false) {
+ $view = new OC\Files\View('/' . OCP\User::getUser());
+ if ($view->file_exists('/files_encryption/keyfiles')) {
+ $encryptedFiles = true;
+ }
+ }
+
+ return $encryptedFiles;
+ }
+
+ /**
* Check for correct file permissions of data directory
* @return array arrays with error messages and hints
*/
diff --git a/lib/vobject/compoundproperty.php b/lib/vobject/compoundproperty.php
index d702ab802e0..7fe42574bed 100644
--- a/lib/vobject/compoundproperty.php
+++ b/lib/vobject/compoundproperty.php
@@ -67,4 +67,4 @@ class CompoundProperty extends \Sabre\VObject\Property\Compound {
}
-} \ No newline at end of file
+}
diff --git a/lib/vobject/stringproperty.php b/lib/vobject/stringproperty.php
index b98a8f26c2b..a9d63a0a789 100644
--- a/lib/vobject/stringproperty.php
+++ b/lib/vobject/stringproperty.php
@@ -77,4 +77,4 @@ class StringProperty extends \Sabre\VObject\Property {
}
-} \ No newline at end of file
+}