summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php124
-rw-r--r--lib/l10n/ast.php11
-rw-r--r--lib/l10n/bg_BG.php2
-rw-r--r--lib/l10n/cs_CZ.php2
-rw-r--r--lib/l10n/da.php15
-rw-r--r--lib/l10n/de.php2
-rw-r--r--lib/l10n/de_DE.php2
-rw-r--r--lib/l10n/en_GB.php2
-rw-r--r--lib/l10n/es.php4
-rw-r--r--lib/l10n/es_CL.php19
-rw-r--r--lib/l10n/eu.php2
-rw-r--r--lib/l10n/fi_FI.php10
-rw-r--r--lib/l10n/fr.php6
-rw-r--r--lib/l10n/gl.php2
-rw-r--r--lib/l10n/ia.php4
-rw-r--r--lib/l10n/io.php8
-rw-r--r--lib/l10n/it.php2
-rw-r--r--lib/l10n/ja.php1
-rw-r--r--lib/l10n/ko.php7
-rw-r--r--lib/l10n/nb_NO.php2
-rw-r--r--lib/l10n/nl.php2
-rw-r--r--lib/l10n/pl.php29
-rw-r--r--lib/l10n/pt_BR.php2
-rw-r--r--lib/l10n/pt_PT.php38
-rw-r--r--lib/l10n/ru.php3
-rw-r--r--lib/l10n/sl.php2
-rw-r--r--lib/l10n/ta_IN.php1
-rw-r--r--lib/l10n/tr.php2
-rw-r--r--lib/l10n/zh_HK.php11
-rw-r--r--lib/private/app.php1
-rw-r--r--lib/private/appframework/utility/controllermethodreflector.php1
-rw-r--r--lib/private/archive.php5
-rw-r--r--lib/private/archive/tar.php10
-rw-r--r--lib/private/backgroundjob/joblist.php5
-rw-r--r--lib/private/connector/sabre/filesplugin.php2
-rw-r--r--lib/private/connector/sabre/server.php31
-rw-r--r--lib/private/contacts/localaddressbook.php104
-rw-r--r--lib/private/db/mdb2schemamanager.php3
-rw-r--r--lib/private/db/migrator.php4
-rw-r--r--lib/private/db/mysqlmigrator.php4
-rw-r--r--lib/private/db/sqlitemigrator.php39
-rw-r--r--lib/private/defaults.php54
-rw-r--r--lib/private/eventsource.php2
-rw-r--r--lib/private/files/cache/scanner.php2
-rw-r--r--lib/private/files/fileinfo.php2
-rw-r--r--lib/private/files/node/folder.php41
-rw-r--r--lib/private/files/node/root.php28
-rw-r--r--lib/private/files/storage/local.php17
-rw-r--r--lib/private/files/storage/mappedlocal.php29
-rw-r--r--lib/private/files/view.php13
-rw-r--r--lib/private/group.php29
-rw-r--r--lib/private/group/database.php2
-rw-r--r--lib/private/group/group.php4
-rw-r--r--lib/private/group/manager.php5
-rw-r--r--lib/private/image.php8
-rw-r--r--lib/private/largefilehelper.php2
-rw-r--r--lib/private/mail.php10
-rw-r--r--lib/private/memcache/factory.php5
-rw-r--r--lib/private/mimetypes.list.php2
-rw-r--r--lib/private/ocsclient.php18
-rwxr-xr-xlib/private/preview.php40
-rw-r--r--lib/private/preview/mp3.php2
-rw-r--r--lib/private/preview/office-cl.php5
-rw-r--r--lib/private/preview/provider.php10
-rw-r--r--lib/private/preview/txt.php19
-rwxr-xr-xlib/private/previewmanager.php18
-rw-r--r--lib/private/server.php83
-rw-r--r--lib/private/share/mailnotifications.php15
-rw-r--r--lib/private/share/share.php75
-rw-r--r--lib/private/updater.php5
-rw-r--r--lib/private/user.php2
-rw-r--r--lib/private/user/session.php2
-rw-r--r--lib/private/user/user.php2
-rwxr-xr-xlib/private/util.php31
-rw-r--r--lib/public/appframework/http/templateresponse.php4
-rw-r--r--lib/public/defaults.php16
-rw-r--r--lib/public/igroup.php81
-rw-r--r--lib/public/igroupmanager.php83
-rw-r--r--lib/public/ipreview.php7
-rw-r--r--lib/public/iservercontainer.php7
-rw-r--r--lib/public/iuser.php6
-rw-r--r--lib/public/share.php14
-rw-r--r--lib/public/util.php14
-rw-r--r--lib/repair/innodb.php2
84 files changed, 1060 insertions, 282 deletions
diff --git a/lib/base.php b/lib/base.php
index 840d9044711..cba5d4a4276 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -132,20 +132,25 @@ class OC {
}
// search the 3rdparty folder
- if (OC_Config::getValue('3rdpartyroot', '') <> '' and OC_Config::getValue('3rdpartyurl', '') <> '') {
- OC::$THIRDPARTYROOT = OC_Config::getValue('3rdpartyroot', '');
- OC::$THIRDPARTYWEBROOT = OC_Config::getValue('3rdpartyurl', '');
- } elseif (file_exists(OC::$SERVERROOT . '/3rdparty')) {
- OC::$THIRDPARTYROOT = OC::$SERVERROOT;
- OC::$THIRDPARTYWEBROOT = OC::$WEBROOT;
- } elseif (file_exists(OC::$SERVERROOT . '/../3rdparty')) {
- OC::$THIRDPARTYWEBROOT = rtrim(dirname(OC::$WEBROOT), '/');
- OC::$THIRDPARTYROOT = rtrim(dirname(OC::$SERVERROOT), '/');
- } else {
- throw new Exception('3rdparty directory not found! Please put the ownCloud 3rdparty'
+ OC::$THIRDPARTYROOT = OC_Config::getValue('3rdpartyroot', null);
+ OC::$THIRDPARTYWEBROOT = OC_Config::getValue('3rdpartyurl', null);
+
+ if (empty(OC::$THIRDPARTYROOT) && empty(OC::$THIRDPARTYWEBROOT)) {
+ if (file_exists(OC::$SERVERROOT . '/3rdparty')) {
+ OC::$THIRDPARTYROOT = OC::$SERVERROOT;
+ OC::$THIRDPARTYWEBROOT = OC::$WEBROOT;
+ } elseif (file_exists(OC::$SERVERROOT . '/../3rdparty')) {
+ OC::$THIRDPARTYWEBROOT = rtrim(dirname(OC::$WEBROOT), '/');
+ OC::$THIRDPARTYROOT = rtrim(dirname(OC::$SERVERROOT), '/');
+ }
+ }
+ if (empty(OC::$THIRDPARTYROOT) || !file_exists(OC::$THIRDPARTYROOT)) {
+ echo('3rdparty directory not found! Please put the ownCloud 3rdparty'
. ' folder in the ownCloud folder or the folder above.'
. ' You can also configure the location in the config.php file.');
+ return;
}
+
// search the apps folder
$config_paths = OC_Config::getValue('apps_paths', array());
if (!empty($config_paths)) {
@@ -211,9 +216,11 @@ class OC {
public static function checkInstalled() {
// Redirect to installer if not installed
if (!OC_Config::getValue('installed', false) && OC::$SUBURI != '/index.php') {
- if (!OC::$CLI) {
+ if (OC::$CLI) {
+ throw new Exception('Not installed');
+ } else {
$url = 'http://' . $_SERVER['SERVER_NAME'] . OC::$WEBROOT . '/index.php';
- header("Location: $url");
+ header('Location: ' . $url);
}
exit();
}
@@ -472,38 +479,10 @@ class OC {
@ini_set('post_max_size', '10G');
@ini_set('file_uploads', '50');
- //copy http auth headers for apache+php-fcgid work around
- if (isset($_SERVER['HTTP_XAUTHORIZATION']) && !isset($_SERVER['HTTP_AUTHORIZATION'])) {
- $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['HTTP_XAUTHORIZATION'];
- }
-
- //set http auth headers for apache+php-cgi work around
- if (isset($_SERVER['HTTP_AUTHORIZATION'])
- && 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);
- }
-
- //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)
- ) {
- list($name, $password) = explode(':', base64_decode($matches[1]), 2);
- $_SERVER['PHP_AUTH_USER'] = strip_tags($name);
- $_SERVER['PHP_AUTH_PW'] = strip_tags($password);
- }
-
+ self::handleAuthHeaders();
self::initPaths();
- if (OC_Config::getValue('instanceid', false)) {
- // \OC\Memcache\Cache has a hidden dependency on
- // OC_Util::getInstanceId() for namespacing. See #5409.
- try {
- self::$loader->setMemoryCache(\OC\Memcache\Factory::createLowLatency('Autoloader'));
- } catch (\Exception $ex) {
- }
- }
+ self::registerAutoloaderCache();
+
OC_Util::isSetLocaleWorking();
// setup 3rdparty autoloader
@@ -541,10 +520,10 @@ class OC {
self::initTemplateEngine();
OC_App::loadApps(array('session'));
- if (!self::$CLI) {
- self::initSession();
- } else {
+ if (self::$CLI) {
self::$session = new \OC\Session\Memory('');
+ } else {
+ self::initSession();
}
self::checkConfig();
self::checkInstalled();
@@ -585,6 +564,7 @@ class OC {
self::registerPreviewHooks();
self::registerShareHooks();
self::registerLogRotate();
+ self::registerLocalAddressBook();
//make sure temporary files are cleaned up
register_shutdown_function(array('OC_Helper', 'cleanTmp'));
@@ -596,6 +576,14 @@ class OC {
}
}
+ private static function registerLocalAddressBook() {
+ self::$server->getContactsManager()->register(function() {
+ $userManager = \OC::$server->getUserManager();
+ \OC::$server->getContactsManager()->registerAddressBook(
+ new \OC\Contacts\LocalAddressBook($userManager));
+ });
+ }
+
/**
* register hooks for the cache
*/
@@ -654,6 +642,23 @@ class OC {
}
}
+ protected static function registerAutoloaderCache() {
+ // The class loader takes an optional low-latency cache, which MUST be
+ // namespaced. The instanceid is used for namespacing, but might be
+ // unavailable at this point. Futhermore, it might not be possible to
+ // generate an instanceid via \OC_Util::getInstanceId() because the
+ // config file may not be writable. As such, we only register a class
+ // loader cache if instanceid is available without trying to create one.
+ $instanceId = OC_Config::getValue('instanceid', null);
+ if ($instanceId) {
+ try {
+ $memcacheFactory = new \OC\Memcache\Factory($instanceId);
+ self::$loader->setMemoryCache($memcacheFactory->createLowLatency('Autoloader'));
+ } catch (\Exception $ex) {
+ }
+ }
+ }
+
/**
* Handle the request
*/
@@ -675,8 +680,8 @@ class OC {
if (!OC::$CLI
// overwritehost is always trusted
&& OC_Request::getOverwriteHost() === null
- && !OC_Request::isTrustedDomain($host)) {
-
+ && !OC_Request::isTrustedDomain($host)
+ ) {
header('HTTP/1.1 400 Bad Request');
header('Status: 400 Bad Request');
OC_Template::printErrorPage(
@@ -814,6 +819,27 @@ class OC {
return false;
}
+ protected static function handleAuthHeaders() {
+ //copy http auth headers for apache+php-fcgid work around
+ if (isset($_SERVER['HTTP_XAUTHORIZATION']) && !isset($_SERVER['HTTP_AUTHORIZATION'])) {
+ $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['HTTP_XAUTHORIZATION'];
+ }
+
+ // Extract PHP_AUTH_USER/PHP_AUTH_PW from other headers if necessary.
+ $vars = array(
+ 'HTTP_AUTHORIZATION', // apache+php-cgi work around
+ 'REDIRECT_HTTP_AUTHORIZATION', // apache+php-cgi alternative
+ );
+ foreach ($vars as $var) {
+ if (isset($_SERVER[$var]) && preg_match('/Basic\s+(.*)$/i', $_SERVER[$var], $matches)) {
+ list($name, $password) = explode(':', base64_decode($matches[1]), 2);
+ $_SERVER['PHP_AUTH_USER'] = $name;
+ $_SERVER['PHP_AUTH_PW'] = $password;
+ break;
+ }
+ }
+ }
+
protected static function handleLogin() {
OC_App::loadApps(array('prelogin'));
$error = array();
diff --git a/lib/l10n/ast.php b/lib/l10n/ast.php
index 644bd4e5b40..f3a690cd97d 100644
--- a/lib/l10n/ast.php
+++ b/lib/l10n/ast.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "La triba de compartición %s nun ye válida pa %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Falló dar permisos a %s, porque los permisos son mayores que los otorgaos a %s",
"Setting permissions for %s failed, because the item was not found" => "Falló dar permisos a %s, porque l'elementu nun s'atopó",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Nun pue afitase la data de caducidá. Ficheros compartíos nun puen caducar dempués de %s de compartise",
+"Cannot set expiration date. Expiration date is in the past" => "Nun pue afitase la data d'espiración. La data d'espiración ta nel pasáu",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "El motor compartíu %s tien d'implementar la interfaz OCP\\Share_Backend",
"Sharing backend %s not found" => "Nun s'alcontró'l botón de compartición %s",
"Sharing backend for %s not found" => "Nun s'alcontró'l botón de partición pa %s",
@@ -94,16 +96,20 @@ $TRANSLATIONS = array(
"Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." => "Davezu los permisos puen iguase %sdándo-y al sirvidor web accesu d'escritura al direutoriu raigañu%s.",
"Cannot write into \"config\" directory" => "Nun pue escribise nel direutoriu \"config\"",
"Cannot write into \"apps\" directory" => "Nun pue escribise nel direutoriu \"apps\"",
+"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." => "Esto pue iguase %sdando permisos d'escritura al sirvidor Web nel direutoriu%s d'apps o deshabilitando la tienda d'apps nel ficheru de configuración.",
"Cannot create \"data\" directory (%s)" => "Nun pue crease'l direutoriu \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." => "Esto pue iguase davezu <a href=\"%s\" target=\"_blank\">dándo-y accesu d'escritura al direutoriu raigañu</a>.",
+"Setting locale to %s failed" => "Falló l'activación del idioma %s",
"Please install one of theses locales on your system and restart your webserver." => "Instala ún d'estos locales nel to sistema y reanicia'l sirvidor web",
"Please ask your server administrator to install the module." => "Por favor, entrúga-y al to alministrador del sirvidor pa instalar el módulu.",
"PHP module %s not installed." => "Nun ta instaláu'l módulu PHP %s",
"PHP %s or higher is required." => "Necesítase PHP %s o superior",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." => "Por favor, entrúga-y al to alministrador del sirvidor p'anovar PHP a la cabera versión. La to versión PHP nun ta sofitada por ownCloud y la comunidá PHP.",
"PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." => "Ta habilitáu'l mou seguru de PHP. ownCloud requier que tea deshabilitáu pa furrular afayadízamente",
-"Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." => "Tán habilitaes les Magic Quotes. ownCloud requier que les deshabilites pa furrular afayadizamente.",
-"PHP modules have been installed, but they are still listed as missing?" => "Instaláronse los módulos PHP, ¿pero tán entá llistaos cómo faltantes?",
+"PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "Mou seguru de PHP ye un entornu en desusu que tien de desactivase. Contauta col alministrador del sirvidor pa desactivalu en php.ini o na configuración del sirvidor web.",
+"Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." => "Tán habilitaes les Magic Quotes. ownCloud requier que les deshabilites pa funcionar afayadizamente.",
+"Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "Magic Quotes ye un entornu en desusu y tien de desactivase. Consulta col alministrador del sirvidor pa desactivalu en php.ini o na configuración del sirvidor web.",
+"PHP modules have been installed, but they are still listed as missing?" => "Instaláronse los módulos PHP, ¿pero tán entá llistaos como faltantes?",
"Please ask your server administrator to restart the web server." => "Por favor, entruga al to alministrador pa reaniciar el sirvidor web.",
"PostgreSQL >= 9 required" => "PostgreSQL >= 9 requeríu",
"Please upgrade your database version" => "Por favor, anueva la versión de la to base de datos",
@@ -112,6 +118,7 @@ $TRANSLATIONS = array(
"Please change the permissions to 0770 so that the directory cannot be listed by other users." => "Por favor, camuda los permisos a 0770 pa que'l direutoriu nun pueda llistase por otros usuarios.",
"Data directory (%s) is readable by other users" => "El direutoriu de datos (%s) ye llexible por otros usuarios",
"Data directory (%s) is invalid" => "Ye inválidu'l direutoriu de datos (%s)",
+"Please check that the data directory contains a file \".ocdata\" in its root." => "Verifica que'l direutoriu de datos contién un ficheru \".ocdata\" nel direutoriu raigañu.",
"Could not obtain lock type %d on \"%s\"." => "Nun pudo facese'l bloquéu %d en \"%s\"."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/lib/l10n/bg_BG.php b/lib/l10n/bg_BG.php
index 5da769bfca5..bd8b7565da1 100644
--- a/lib/l10n/bg_BG.php
+++ b/lib/l10n/bg_BG.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Споделянето на тип %s не валидно за %s.",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Неуспешна промяна на правата за достъп за %s, защото промените надвишават правата на достъп дадени на %s.",
"Setting permissions for %s failed, because the item was not found" => "Неуспешна промяна на правата за достъп за %s, защото съдържанието не е открито.",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Неуспешно задаване на дата на изтичане. Споделни папки или файлове не могат да изтичат по-късно от %s след като са били споделени",
+"Cannot set expiration date. Expiration date is in the past" => "Неуспешно задаване на дата на изтичане. Датата на изтичане е в миналото",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Споделянето на сървърния %s трябва да поддържа OCP\\Share_Backend интерфейс.",
"Sharing backend %s not found" => "Споделянето на сървърния %s не е открито.",
"Sharing backend for %s not found" => "Споделянето на сървъра за %s не е открито.",
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index 336579588ab..4fdeea9a417 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Sdílení typu %s není korektní pro %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Nastavení oprávnění pro %s selhalo, protože jsou k tomu nutná vyšší oprávnění, než jaká byla povolena pro %s",
"Setting permissions for %s failed, because the item was not found" => "Nastavení práv pro %s selhalo, protože položka nebyla nalezena",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Nelze nastavit datum vypršení platnosti. Sdílení nemůže vypršet později než za %s po zveřejnění.",
+"Cannot set expiration date. Expiration date is in the past" => "Nelze nastavit datum vypršení platnosti. Datum vypršení je v minulosti.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Podpůrná vrstva pro sdílení %s musí obsahovat rozhraní OCP\\Share_Backend",
"Sharing backend %s not found" => "Podpůrná vrstva sdílení %s nenalezena",
"Sharing backend for %s not found" => "Podpůrná vrstva sdílení pro %s nenalezena",
diff --git a/lib/l10n/da.php b/lib/l10n/da.php
index 96e20b2acf5..93a727bf085 100644
--- a/lib/l10n/da.php
+++ b/lib/l10n/da.php
@@ -3,6 +3,7 @@ $TRANSLATIONS = array(
"Cannot write into \"config\" directory!" => "Kan ikke skrive til mappen \"config\"!",
"This can usually be fixed by giving the webserver write access to the config directory" => "Dette kan normalvis ordnes ved at give webserveren skrive adgang til config mappen",
"See %s" => "Se %s",
+"This can usually be fixed by %sgiving the webserver write access to the config directory%s." => "Dette kan som regel rettes ved at %sgive webserveren skriveadgang til config-mappen%s.",
"You are accessing the server from an untrusted domain." => "Du tilgår serveren fra et utroværdigt domæne",
"Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." => "Kontakt venligst din administrator. Hvis du er administrator, konfigurer \"trusted_domain\" indstillingen i config/config.php. Et eksempel kan ses i config/config.sample.php.",
"Help" => "Hjælp",
@@ -90,17 +91,31 @@ $TRANSLATIONS = array(
"A valid password must be provided" => "En gyldig adgangskode skal angives",
"The username is already being used" => "Brugernavnet er allerede i brug",
"No database drivers (sqlite, mysql, or postgresql) installed." => "Ingen database driver (sqlite, mysql eller postgresql) er installeret.",
+"Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." => "Rettigheder kan som regel rettes ved %sat give webserveren skriveadgang til rodmappen%s.",
"Cannot write into \"config\" directory" => "Kan ikke skrive til mappen \"config\"",
"Cannot write into \"apps\" directory" => "Kan ikke skrive til mappen \"apps\"",
"Cannot create \"data\" directory (%s)" => "Kan ikke oprette mappen \"data\" (%s)",
+"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." => "Dette kan som regel rettes ved <a href=\"%s\" target=\"_blank\">give webserveren skriveadgang til rodmappen</a>.",
+"Setting locale to %s failed" => "Angivelse af %s for lokalitet mislykkedes",
+"Please install one of theses locales on your system and restart your webserver." => "Installér venligst én af disse lokaliteter på dit system, og genstart din webserver.",
"Please ask your server administrator to install the module." => "Du bedes anmode din serveradministrator om at installere modulet.",
"PHP module %s not installed." => "PHP-modulet %s er ikke installeret.",
"PHP %s or higher is required." => "Der kræves PHP %s eller nyere.",
+"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." => "Bed venligst din serveradministrator om at opdatere PHP til seneste version. Din PHP-version understøttes ikke længere af ownCload og PHP-fællesskabet.",
+"PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." => "PHP Safe Mode er slået til. ownCload kræver at denne er slået fra, for at fungere ordentligt.",
+"PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "PHP Safe Mode er udgået og stort set en ubrugelig indstilling, der bør slås fra. Spørg venligst din serveradministrator om at slå den fra i php.ini eller din webeserver-konfiguration.",
+"Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." => "Magic Quotes er slået til. ownCloud kræver at denne er slået fra, for at fungere ordentligt.",
+"Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "Magic Quotes er udgået og stort set en ubrugelig indstilling, der bør slås fra. Spørg venligst din serveradministrator om at slå den fra i php.ini eller din webeserver-konfiguration.",
+"PHP modules have been installed, but they are still listed as missing?" => "Der er installeret PHP-moduler, men de fremgår stadig som fraværende?",
"Please ask your server administrator to restart the web server." => "Du bedes anmode din serveradministrator om at genstarte webserveren.",
"PostgreSQL >= 9 required" => "PostgreSQL >= 9 kræves",
"Please upgrade your database version" => "Opgradér venligst din databaseversion",
+"Error occurred while checking PostgreSQL version" => "Der opstod fejl under tjek af PostgreSQL-versionen",
+"Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" => "Sørg venligst for at du har PostgreSQL >= 9 eller tjek loggen for flere informationer om fejlen",
+"Please change the permissions to 0770 so that the directory cannot be listed by other users." => "Tilpas venligst rettigheder til 0770, så mappen ikke fremvises for andre brugere.",
"Data directory (%s) is readable by other users" => "Datamappen (%s) kan læses af andre brugere",
"Data directory (%s) is invalid" => "Datamappen (%s) er ugyldig",
+"Please check that the data directory contains a file \".ocdata\" in its root." => "Tjek venligst at datamappen indeholder en fil, \".ocdata\" i dens rod.",
"Could not obtain lock type %d on \"%s\"." => "Kunne ikke opnå en låsetype %d på \"%s\"."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index d951975c478..bf44ae04461 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Freigabetyp %s ist nicht gültig für %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da die Berechtigungen, die erteilten Berechtigungen %s überschreiten",
"Setting permissions for %s failed, because the item was not found" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da das Objekt nicht gefunden wurde",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Ablaufdatum kann nicht gesetzt werden. Freigaben können nach dem Teilen, nicht länger als %s gültig sein.",
+"Cannot set expiration date. Expiration date is in the past" => "Ablaufdatum kann nicht gesetzt werden. Ablaufdatum liegt in der Vergangenheit.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden",
"Sharing backend %s not found" => "Freigabe-Backend %s nicht gefunden",
"Sharing backend for %s not found" => "Freigabe-Backend für %s nicht gefunden",
diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php
index e142fb9f7a9..65d508de0ff 100644
--- a/lib/l10n/de_DE.php
+++ b/lib/l10n/de_DE.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Freigabetyp %s ist nicht gültig für %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da die Berechtigungen, die erteilten Berechtigungen %s überschreiten",
"Setting permissions for %s failed, because the item was not found" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da das Objekt nicht gefunden wurde",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Ablaufdatum kann nicht gesetzt werden. Freigaben können nach dem Teilen, nicht länger als %s gültig sein.",
+"Cannot set expiration date. Expiration date is in the past" => "Ablaufdatum kann nicht gesetzt werden. Ablaufdatum liegt in der Vergangenheit.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden",
"Sharing backend %s not found" => "Freigabe-Backend %s nicht gefunden",
"Sharing backend for %s not found" => "Freigabe-Backend für %s nicht gefunden",
diff --git a/lib/l10n/en_GB.php b/lib/l10n/en_GB.php
index e1e485058e1..c1ad8703ea3 100644
--- a/lib/l10n/en_GB.php
+++ b/lib/l10n/en_GB.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Share type %s is not valid for %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Setting permissions for %s failed, because the permissions exceed permissions granted to %s",
"Setting permissions for %s failed, because the item was not found" => "Setting permissions for %s failed, because the item was not found",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Cannot set expiry date. Shares cannot expire later than %s after they have been shared",
+"Cannot set expiration date. Expiration date is in the past" => "Cannot set expiry date. Expiry date is in the past",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Sharing backend %s must implement the interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Sharing backend %s not found",
"Sharing backend for %s not found" => "Sharing backend for %s not found",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index fb059bf8b7a..6c5ac83280a 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -1,6 +1,6 @@
<?php
$TRANSLATIONS = array(
-"Cannot write into \"config\" directory!" => "No se puede escribir en el directorio de Configuración!",
+"Cannot write into \"config\" directory!" => "¡No se puede escribir en el directorio de Configuración!",
"This can usually be fixed by giving the webserver write access to the config directory" => "Esto puede ser facilmente solucionado, dando permisos de escritura al directorio de configuración en el servidor Web",
"See %s" => "Mirar %s",
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." => "Esto puede ser facilmente solucionado, %sdando permisos de escritura al directorio de configuración en el servidor Web%s.",
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Compartir tipo %s no es válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Configuración de permisos para %s ha fallado, ya que los permisos superan los permisos dados a %s",
"Setting permissions for %s failed, because the item was not found" => "Configuración de permisos para %s ha fallado, ya que el elemento no fue encontrado",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "No se puede fijar fecha de caducidad. Archivos compartidos no pueden caducar luego de %s de ser compartidos",
+"Cannot set expiration date. Expiration date is in the past" => "No se puede fijar la fecha de caducidad. La fecha de caducidad está en el pasado.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "El motor compartido %s debe implementar la interfaz OCP\\Share_Backend",
"Sharing backend %s not found" => "El motor compartido %s no se ha encontrado",
"Sharing backend for %s not found" => "Motor compartido para %s no encontrado",
diff --git a/lib/l10n/es_CL.php b/lib/l10n/es_CL.php
index 261dc7c29cc..d6a416acbf9 100644
--- a/lib/l10n/es_CL.php
+++ b/lib/l10n/es_CL.php
@@ -1,6 +1,25 @@
<?php
$TRANSLATIONS = array(
+"Cannot write into \"config\" directory!" => "No se puede escribir en el directorio \"config\"!",
+"This can usually be fixed by giving the webserver write access to the config directory" => "Generalmente esto se puede resolver otorgando permisos de escritura al servidor web en la carpeta configurada",
+"See %s" => "Ver %s",
+"This can usually be fixed by %sgiving the webserver write access to the config directory%s." => "Generalmente esto se puede resolver %s otorgando permisos de escritura al servidor web en la carpeta configurada %s",
+"You are accessing the server from an untrusted domain." => "Usted está accediendo al servidor desde un dominio no confiable.",
+"Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." => "Por favor contacte con su administrador. Si usted es el administrador de esta instancia, configure la opción \"trusted_domain\" en \"config/config.php\". Un ejemplo de la configuración está disponible en config/config.sample.php",
+"Help" => "Ayuda",
+"Personal" => "Personal",
"Settings" => "Configuración",
+"Users" => "Usuarios",
+"Admin" => "Administración",
+"Failed to upgrade \"%s\"." => "Falló el upgrade de \"%s\".",
+"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "La aplicación \\\"%s\\\" no puede ser instalada debido a que no es compatible con esta versión de ownCloud.",
+"No app name specified" => "No se especificó el nombre de la aplicación",
+"Unknown filetype" => "Tipo de archivo desconocido",
+"Invalid image" => "Imagen no válida",
+"web services under your control" => "Servicios Web bajo su control",
+"App directory already exists" => "El directorio de la aplicación ya existe",
+"Can't create app folder. Please fix permissions. %s" => "No se puede crear el directorio de aplicación. Por favor corregir los permisos. %s",
+"No source specified when installing app" => "No se especificó el origen al instalar la aplicación",
"seconds ago" => "segundos antes",
"_%n minute ago_::_%n minutes ago_" => array("",""),
"_%n hour ago_::_%n hours ago_" => array("",""),
diff --git a/lib/l10n/eu.php b/lib/l10n/eu.php
index 0bdfd6fef97..c395e2d0821 100644
--- a/lib/l10n/eu.php
+++ b/lib/l10n/eu.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "%s elkarbanaketa mota ez da %srentzako egokia",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "%srentzako baimenak ezartzea huts egin du, baimenak %sri emandakoak baino gehiago direlako",
"Setting permissions for %s failed, because the item was not found" => "%srentzako baimenak ezartzea huts egin du, aurkitu ez delako",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Ezin izan da jarri iraungitze data. Konpartitzea ezin da iraungi konpartitu eta %s ondoren.",
+"Cannot set expiration date. Expiration date is in the past" => "Ezin da jarri iraungitze data. Iraungitze data iragan da.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "%s elkarbanaketa motorra OCP\\Share_Backend interfazea inplementatu behar du ",
"Sharing backend %s not found" => "Ez da %s elkarbanaketa motorra aurkitu",
"Sharing backend for %s not found" => "Ez da %srako elkarbanaketa motorrik aurkitu",
diff --git a/lib/l10n/fi_FI.php b/lib/l10n/fi_FI.php
index 43b941b5e4d..b1e0cc6698f 100644
--- a/lib/l10n/fi_FI.php
+++ b/lib/l10n/fi_FI.php
@@ -56,8 +56,10 @@ $TRANSLATIONS = array(
"Sharing %s failed, because this item is already shared with %s" => "Kohteen %s jakaminen epäonnistui, koska kohde on jo jaettu käyttäjän %s kanssa",
"Sharing %s failed, because the group %s does not exist" => "Kohteen %s jakaminen epäonnistui, koska ryhmää %s ei ole olemassa",
"Sharing %s failed, because %s is not a member of the group %s" => "Kohteen %s jakaminen epäonnistui, koska käyttäjä %s ei ole ryhmän %s jäsen",
+"You need to provide a password to create a public link, only protected links are allowed" => "Anna salasana luodaksesi julkisen linkin. Vain suojatut linkit ovat sallittuja",
"Sharing %s failed, because sharing with links is not allowed" => "Kohteen %s jakaminen epäonnistui, koska jakaminen linkkejä käyttäen ei ole sallittu",
"Setting permissions for %s failed, because the item was not found" => "Kohteen %s oikeuksien asettaminen epäonnistui, koska kohdetta ei löytynyt",
+"Cannot set expiration date. Expiration date is in the past" => "Vanhentumispäivää ei voi asettaa. Vanhentumispäivä on jo mennyt",
"Sharing backend %s not found" => "Jakamisen taustaosaa %s ei löytynyt",
"Sharing backend for %s not found" => "Jakamisen taustaosaa kohteelle %s ei löytynyt",
"Sharing %s failed, because the user %s is the original sharer" => "Kohteen %s jakaminen epäonnistui, koska käyttäjä %s on alkuperäinen jakaja",
@@ -81,18 +83,26 @@ $TRANSLATIONS = array(
"No database drivers (sqlite, mysql, or postgresql) installed." => "Tietokanta-ajureita (sqlite, mysql tai postgresql) ei ole asennettu.",
"Cannot write into \"config\" directory" => "Hakemistoon \"config\" kirjoittaminen ei onnistu",
"Cannot write into \"apps\" directory" => "Hakemistoon \"apps\" kirjoittaminen ei onnistu",
+"Cannot create \"data\" directory (%s)" => "Kansion \"data\" luominen ei onnistu (%s)",
+"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." => "Tämä on yleensä korjattavissa <a href=\"%s\" target=\"_blank\">antamalla http-palvelimelle kirjoitusoikeuden juurihakemistoon</a>.",
"Setting locale to %s failed" => "Maa-asetuksen %s asettaminen epäonnistui",
+"Please install one of theses locales on your system and restart your webserver." => "Asenna järjestelmään yksi näistä maa-asetuksista ja käynnistä http-palvelin uudelleen.",
"Please ask your server administrator to install the module." => "Pyydä palvelimen ylläpitäjää asentamaan moduulin.",
"PHP module %s not installed." => "PHP-moduulia %s ei ole asennettu.",
"PHP %s or higher is required." => "PHP %s tai sitä uudempi vaaditaan.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." => "Pyydä palvelimen ylläpitäjää päivittämään PHP uusimpaan versioon. Käyttämäsi PHP-versio ei ole enää tuettu ownCloud- ja PHP-yhteisön toimesta.",
"PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." => "PHP:n \"Safe Mode\" on käytössä. ownCloud vaatii toimiakseen \"Safe Moden\" poistamisen käytöstä.",
+"Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." => "Magic Quotes -asetus on käytössä. ownCloud vaatii toimiakseen kyseisen asetuksen poistamisen käytöstä.",
+"Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "Magic Quotes -asetus on vanhennettu ja pääosin hyödytön, joten se tulisi poistaa käytöstä. Pyydä palvelimen ylläpitäjää poistamaan asetus käytöstä php.ini-tiedoston avulla tai http-palvelimen asetuksista.",
"PHP modules have been installed, but they are still listed as missing?" => "PHP-moduulit on asennettu, mutta ovatko ne vieläkin listattu puuttuviksi?",
"Please ask your server administrator to restart the web server." => "Pyydä palvelimen ylläpitäjää käynnistämään web-palvelin uudelleen.",
"PostgreSQL >= 9 required" => "PostgreSQL >= 9 vaaditaan",
"Please upgrade your database version" => "Päivitä tietokantasi versio",
"Error occurred while checking PostgreSQL version" => "Virhe PostgreSQL:n versiota tarkistaessa",
"Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" => "Varmista, että käytössäsi on PostgreSQL >= 9 tai tarkista lokit saadaksesi lisätietoja virheestä",
+"Data directory (%s) is readable by other users" => "Datakansio (%s) on muiden käyttäjien luettavissa",
+"Data directory (%s) is invalid" => "Datakansio (%s) on virheellinen",
+"Please check that the data directory contains a file \".ocdata\" in its root." => "Varmista, että datakansion juuressa on tiedosto \".ocdata\".",
"Could not obtain lock type %d on \"%s\"." => "Lukitustapaa %d ei saatu kohteelle \"%s\"."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/lib/l10n/fr.php b/lib/l10n/fr.php
index 567e9ff0c0e..f1f4bf68a26 100644
--- a/lib/l10n/fr.php
+++ b/lib/l10n/fr.php
@@ -12,7 +12,7 @@ $TRANSLATIONS = array(
"Users" => "Utilisateurs",
"Admin" => "Administration",
"Failed to upgrade \"%s\"." => "Echec de la mise à niveau \"%s\".",
-"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "L'application \\\"%s\\\" ne peut être installée car elle n'est pas compatible avec cette version de ownCloud.",
+"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "L'application \\\"%s\\\" ne peut pas être installée car elle n'est pas compatible avec cette version de ownCloud.",
"No app name specified" => "Aucun nom d'application spécifié",
"Unknown filetype" => "Type de fichier inconnu",
"Invalid image" => "Image invalide",
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Le type de partage %s n'est pas valide pour %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Le réglage des permissions pour %s a échoué car les permissions dépassent celle accordée à %s",
"Setting permissions for %s failed, because the item was not found" => "Le réglage des permissions pour %s a échoué car l'objet n'a pas été trouvé",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Impossible de configurer la date d'expiration. Un partage ne peut expirer plus de %s après sa date de début.",
+"Cannot set expiration date. Expiration date is in the past" => "Impossible de configurer la date d'expiration. La date d'expiration est dans le passé.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "L'emplacement du partage %s doit implémenter l'interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Emplacement de partage %s introuvable",
"Sharing backend for %s not found" => "L'emplacement du partage %s est introuvable",
@@ -89,7 +91,7 @@ $TRANSLATIONS = array(
"Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" => "Seuls les caractères suivants sont autorisés dans un nom d'utilisateur : \"a-z\", \"A-Z\", \"0-9\", et \"_.@-\"",
"A valid username must be provided" => "Un nom d'utilisateur valide doit être saisi",
"A valid password must be provided" => "Un mot de passe valide doit être saisi",
-"The username is already being used" => "Le nom d'utilisateur est déjà utilisé",
+"The username is already being used" => "Ce nom d'utilisateur est déjà utilisé",
"No database drivers (sqlite, mysql, or postgresql) installed." => "Aucun pilote de base de données (sqlite, mysql, ou postgresql) n’est installé.",
"Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." => "Les permissions peuvent, généralement, être résolues %sen donnant au serveur web un accès en écriture au répertoire racine%s",
"Cannot write into \"config\" directory" => "Impossible d’écrire dans le répertoire \"config\"",
diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php
index 8d580f6125b..07e9f848c11 100644
--- a/lib/l10n/gl.php
+++ b/lib/l10n/gl.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Non se admite a compartición do tipo %s para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Non é posíbel estabelecer permisos para %s, os permisos superan os permisos concedidos a %s",
"Setting permissions for %s failed, because the item was not found" => "Non é posíbel estabelecer permisos para %s, non se atopa o elemento",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Non é posíbel estabelecer a data de caducidade. As comparticións non poden caducar máis aló de %s após de seren compartidas",
+"Cannot set expiration date. Expiration date is in the past" => "Non é posíbel estabelecer a data de caducidade. A data de caducidade está no pasado.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "A infraestrutura de compartición %s ten que implementar a interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Non se atopou a infraestrutura de compartición %s",
"Sharing backend for %s not found" => "Non se atopou a infraestrutura de compartición para %s",
diff --git a/lib/l10n/ia.php b/lib/l10n/ia.php
index 51dc365ed6b..03fbad47682 100644
--- a/lib/l10n/ia.php
+++ b/lib/l10n/ia.php
@@ -13,9 +13,9 @@ $TRANSLATIONS = array(
"_%n hour ago_::_%n hours ago_" => array("","%n horas passate"),
"today" => "hodie",
"yesterday" => "heri",
-"_%n day go_::_%n days ago_" => array("",""),
+"_%n day go_::_%n days ago_" => array("","%n dies ante"),
"last month" => "ultime mense",
-"_%n month ago_::_%n months ago_" => array("",""),
+"_%n month ago_::_%n months ago_" => array("","%n menses ante"),
"last year" => "ultime anno",
"years ago" => "annos passate"
);
diff --git a/lib/l10n/io.php b/lib/l10n/io.php
new file mode 100644
index 00000000000..15f78e0bce6
--- /dev/null
+++ b/lib/l10n/io.php
@@ -0,0 +1,8 @@
+<?php
+$TRANSLATIONS = array(
+"_%n minute ago_::_%n minutes ago_" => array("",""),
+"_%n hour ago_::_%n hours ago_" => array("",""),
+"_%n day go_::_%n days ago_" => array("",""),
+"_%n month ago_::_%n months ago_" => array("","")
+);
+$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/lib/l10n/it.php b/lib/l10n/it.php
index 7c971c60092..1608a4461f1 100644
--- a/lib/l10n/it.php
+++ b/lib/l10n/it.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Il tipo di condivisione %s non è valido per %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Impostazione permessi per %s non riuscita, poiché i permessi superano i permessi accordati a %s",
"Setting permissions for %s failed, because the item was not found" => "Impostazione permessi per %s non riuscita, poiché l'elemento non è stato trovato",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Impossibile impostare la data di scadenza. Le condivisioni non possono scadere più tardi di %s dalla loro attivazione",
+"Cannot set expiration date. Expiration date is in the past" => "Impossibile impostare la data di scadenza. La data di scadenza è nel passato.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Il motore di condivisione %s deve implementare l'interfaccia OCP\\Share_Backend",
"Sharing backend %s not found" => "Motore di condivisione %s non trovato",
"Sharing backend for %s not found" => "Motore di condivisione di %s non trovato",
diff --git a/lib/l10n/ja.php b/lib/l10n/ja.php
index 435db02ef09..13b70541ad4 100644
--- a/lib/l10n/ja.php
+++ b/lib/l10n/ja.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "%s の共有方法は、%s には適用できません。",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "%s の権限設定に失敗しました。%s に許可されている権限を越えています。",
"Setting permissions for %s failed, because the item was not found" => "%s の権限設定に失敗しました。アイテムが存在しません。",
+"Cannot set expiration date. Expiration date is in the past" => "有効期限を設定できません。有効期限が過去を示しています。",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "%s のバックエンドの共有には、OCP\\Share_Backend インターフェースを実装しなければなりません。",
"Sharing backend %s not found" => "共有バックエンド %s が見つかりません",
"Sharing backend for %s not found" => "%s のための共有バックエンドが見つかりません",
diff --git a/lib/l10n/ko.php b/lib/l10n/ko.php
index 7923015d125..67429486f06 100644
--- a/lib/l10n/ko.php
+++ b/lib/l10n/ko.php
@@ -61,6 +61,11 @@ $TRANSLATIONS = array(
"Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" => "사용자 명에는 다음과 같은 문자만 사용이 가능합니다: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"",
"A valid username must be provided" => "올바른 사용자 이름을 입력해야 함",
"A valid password must be provided" => "올바른 암호를 입력해야 함",
-"The username is already being used" => "이 사용자명은 현재 사용중입니다"
+"The username is already being used" => "이 사용자명은 현재 사용중입니다",
+"PHP module %s not installed." => "%s PHP 모듈이 설치되지 않았습니다.",
+"PHP %s or higher is required." => "%s 버전의 PHP 혹은 높은 버전을 필요로 합니다.",
+"PostgreSQL >= 9 required" => "PostgreSQL 9 혹은 이상 버전을 필요로합니다",
+"Please upgrade your database version" => "데이터베이스 버전을 업그레이드 하십시오",
+"Error occurred while checking PostgreSQL version" => "PostgreSQL 버전을 확인하던중 오류가 발생하였습니다"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";
diff --git a/lib/l10n/nb_NO.php b/lib/l10n/nb_NO.php
index 1b7196c0881..12c5cd438fd 100644
--- a/lib/l10n/nb_NO.php
+++ b/lib/l10n/nb_NO.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Delingstype %s er ikke gyldig for %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Setting av tillatelser for %s feilet, fordi tillatelsene gikk ut over tillatelsene som er gitt til %s",
"Setting permissions for %s failed, because the item was not found" => "Setting av tillatelser for %s feilet, fordi elementet ikke ble funnet",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Kan ikke sette utøpsdato. Delinger kan ikke utløpe senere enn %s etter at de har blitt delt",
+"Cannot set expiration date. Expiration date is in the past" => "Kan ikke sette utløpsdato. Utløpsdato er tilbake i tid",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Delings-server %s må implementere grensesnittet OCP\\Share_Backend",
"Sharing backend %s not found" => "Delings-server %s ikke funnet",
"Sharing backend for %s not found" => "Delings-server for %s ikke funnet",
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index b758e5776ed..25e77deedfe 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Delen van type %s is niet geldig voor %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Instellen van de permissies voor %s is mislukt, omdat de permissies hoger zijn dan de aan %s toegekende permissies",
"Setting permissions for %s failed, because the item was not found" => "Instellen van de permissies voor %s is mislukt, omdat het object niet is gevonden",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Kon vervaldatum niet instellen. Shares kunnen niet langer dan %s vervallen na het moment van delen",
+"Cannot set expiration date. Expiration date is in the past" => "Kon vervaldatum niet instellen. De vervaldatum ligt in het verleden",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Het share-backend %s moet de OCP\\Share_Backend interface implementeren",
"Sharing backend %s not found" => "Het share-backend %s is niet gevonden",
"Sharing backend for %s not found" => "Het share-backend voor %s is niet gevonden",
diff --git a/lib/l10n/pl.php b/lib/l10n/pl.php
index f024682adff..877c3fcdbe8 100644
--- a/lib/l10n/pl.php
+++ b/lib/l10n/pl.php
@@ -1,6 +1,9 @@
<?php
$TRANSLATIONS = array(
+"Cannot write into \"config\" directory!" => "Nie można zapisać do katalogu \"config\"!",
+"This can usually be fixed by giving the webserver write access to the config directory" => "Można to zwykle rozwiązać przez dodanie serwerowi www uprawnień zapisu do katalogu config.",
"See %s" => "Zobacz %s",
+"This can usually be fixed by %sgiving the webserver write access to the config directory%s." => "Można to zwykle rozwiązać przez %sdodanie serwerowi www uprawnień zapisu do katalogu config%s.",
"You are accessing the server from an untrusted domain." => "Dostajesz się do serwera z niezaufanej domeny.",
"Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." => "Proszę skontaktuj się z administratorem. Jeśli jesteś administratorem tej instancji, skonfiguruj parametr \"trusted_domain\" w pliku config/config.php. Przykładowa konfiguracja jest dostępna w pliku config/config.sample.php.",
"Help" => "Pomoc",
@@ -87,7 +90,33 @@ $TRANSLATIONS = array(
"A valid username must be provided" => "Należy podać prawidłową nazwę użytkownika",
"A valid password must be provided" => "Należy podać prawidłowe hasło",
"The username is already being used" => "Ta nazwa użytkownika jest już używana",
+"No database drivers (sqlite, mysql, or postgresql) installed." => "Brak sterowników bazy danych (sqlite, mysql or postgresql).",
+"Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." => "Problemy z uprawnieniami można zwykle naprawić przez %sdodanie serwerowi www uprawnień zapisu do katalogu głównego%s.",
+"Cannot write into \"config\" directory" => "Nie można zapisać do katalogu \"config\"",
+"Cannot write into \"apps\" directory" => "Nie można zapisać do katalogu \"apps\"",
+"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." => "Można to zwykle rozwiązać przez %sdodanie serwerowi www uprawnień zapisu do katalogu apps%s lub wyłączenie appstore w pliku konfiguracyjnym.",
+"Cannot create \"data\" directory (%s)" => "Nie można utworzyć katalogu \"data\" (%s)",
+"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." => "Można to zwykle rozwiązać przez <a href=\"%s\" target=\"_blank\">dodanie serwerowi www uprawnień zapisu do katalogu głównego</a>.",
+"Setting locale to %s failed" => "Nie udało się zmienić języka na %s",
+"Please install one of theses locales on your system and restart your webserver." => "Proszę zainstalować jeden z tych języków w twoim systemie i zrestartować serwer www.",
+"Please ask your server administrator to install the module." => "Proszę poproś administratora serwera aby zainstalował ten moduł.",
+"PHP module %s not installed." => "Moduł PHP %s nie jest zainstalowany.",
+"PHP %s or higher is required." => "PHP %s lub wyższe jest wymagane.",
+"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." => "Proszę poproś administratora serwera aby zaktualizował PHP do najnowszej wersji. Twoja wersja PHP nie jest już dłużej wspierana przez ownCloud i społeczność PHP.",
+"PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." => "Bezpieczny tryb PHP jest aktywny. ownCloud do poprawnej pracy wymaga aby był on wyłączony.",
+"PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "Bezpieczny tryb PHP jest przestarzały i w większości bezużyteczny i powinien być wyłączony. Proszę poproś administratora serwera aby wyłączył go w php.ini lub w pliku konfiguracyjnym serwera www.",
+"Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." => "Magic Quotes są włączone. Do poprawnego działania ownCloud wymagane jest ich wyłączenie.",
+"Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "Magic Quotes to przestarzałe i zasadniczo bezużyteczne ustawienie, które powinno być wyłączone. Poproś administratora serwera, by wyłączył je w php.ini albo w konfiguracji serwera www.",
+"PHP modules have been installed, but they are still listed as missing?" => "Moduły PHP zostały zainstalowane, ale nadal brakuje ich na liście?",
+"Please ask your server administrator to restart the web server." => "Poproś administratora serwera o restart serwera www.",
"PostgreSQL >= 9 required" => "Wymagany PostgreSQL >= 9",
+"Please upgrade your database version" => "Uaktualnij wersję bazy danych",
+"Error occurred while checking PostgreSQL version" => "Wystąpił błąd podczas sprawdzania wersji PostgreSQL",
+"Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" => "Upewnij się, że PostgreSQL jest w wersji co najmniej 9 lub sprawdź log by uzyskać więcej informacji na temat błędu",
+"Please change the permissions to 0770 so that the directory cannot be listed by other users." => "Zmień uprawnienia na 0770, żeby ukryć zawartość katalogu przed innymi użytkownikami.",
+"Data directory (%s) is readable by other users" => "Katalog danych (%s) jest możliwy do odczytania przez innych użytkowników",
+"Data directory (%s) is invalid" => "Katalog danych (%s) jest nieprawidłowy",
+"Please check that the data directory contains a file \".ocdata\" in its root." => "Sprawdź, czy katalog danych zawiera plik \".ocdata\".",
"Could not obtain lock type %d on \"%s\"." => "Nie można uzyskać blokady typu %d na \"%s\"."
);
$PLURAL_FORMS = "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";
diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php
index 72142183995..ca0f94d4929 100644
--- a/lib/l10n/pt_BR.php
+++ b/lib/l10n/pt_BR.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Tipo de compartilhamento %s não é válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Setting permissions for %s failed, because the item was not found" => "Definir permissões para %s falhou, porque o item não foi encontrado",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Não é possível definir a data de expiração. Compartilhamentos não podem expirar mais tarde que %s depois de terem sido compartilhados",
+"Cannot set expiration date. Expiration date is in the past" => "Não é possível definir a data de validade. Data de expiração está no passado",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Compartilhando backend %s deve implementar a interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Compartilhamento backend %s não encontrado",
"Sharing backend for %s not found" => "Compartilhamento backend para %s não encontrado",
diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php
index 0774e6ea36d..db29fb52cc7 100644
--- a/lib/l10n/pt_PT.php
+++ b/lib/l10n/pt_PT.php
@@ -1,12 +1,18 @@
<?php
$TRANSLATIONS = array(
+"Cannot write into \"config\" directory!" => "Não é possível gravar na directoria \"configurar\"!",
+"This can usually be fixed by giving the webserver write access to the config directory" => "Isto pode ser resolvido normalmente dando ao servidor web direitos de escrita ao directório de configuração",
+"See %s" => "Ver %s",
+"This can usually be fixed by %sgiving the webserver write access to the config directory%s." => "Isto pode ser resolvido normalmente %sdando ao servidor web direitos de escrita no directório de configuração%s.",
"You are accessing the server from an untrusted domain." => "Está a aceder ao servidor a partir de um domínio que não é de confiança.",
+"Please contact your administrator. If you are an administrator of this instance, configure the \"trusted_domain\" setting in config/config.php. An example configuration is provided in config/config.sample.php." => "Por favor contacte o seu administrador. Se é um administrador desta instância, configure as definições \"trusted_domain\" em config/config.php. Um exemplo de configuração é fornecido em config/config.sample.php.",
"Help" => "Ajuda",
"Personal" => "Pessoal",
"Settings" => "Configurações",
"Users" => "Utilizadores",
"Admin" => "Admin",
"Failed to upgrade \"%s\"." => "A actualização \"%s\" falhou.",
+"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "A Aplicação \\\"%s\\\" não pode ser instalada porque não é compatível com esta versão do owncloud.",
"No app name specified" => "O nome da aplicação não foi especificado",
"Unknown filetype" => "Ficheiro desconhecido",
"Invalid image" => "Imagem inválida",
@@ -56,16 +62,21 @@ $TRANSLATIONS = array(
"Sharing %s failed, because this item is already shared with %s" => "A partilha %s falhou, porque o item já está a ser partilhado com %s",
"Sharing %s failed, because the group %s does not exist" => "A partilha %s falhou, porque o grupo %s não existe",
"Sharing %s failed, because %s is not a member of the group %s" => "A partilha %s falhou, porque o utilizador %s não é membro do grupo %s",
+"You need to provide a password to create a public link, only protected links are allowed" => "Necessita de fornecer a senha para criar um link publico, só são permitidos links protegidos",
"Sharing %s failed, because sharing with links is not allowed" => "A partilha de %s falhou, porque partilhar com links não é permitido",
"Share type %s is not valid for %s" => "O tipo de partilha %s não é válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Setting permissions for %s failed, because the item was not found" => "Definir permissões para %s falhou, porque o item não foi encontrado",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Não é possível definir data de expiração. As partilhas não podem expirar mais de %s depois de terem sido partilhadas",
+"Cannot set expiration date. Expiration date is in the past" => "Não é possivel definir data de expiração. A data de expiração está no passado",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Partilhar backend %s tem de implementar o interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Partilha backend %s não foi encontrado",
"Sharing backend for %s not found" => "Partilha backend para %s não foi encontrado",
"Sharing %s failed, because the user %s is the original sharer" => "A partilha %s falhou, porque o utilizador %s é o proprietário original",
"Sharing %s failed, because the permissions exceed permissions granted to %s" => "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Sharing %s failed, because resharing is not allowed" => "A partilha %s falhou, porque repartilhar não é permitido",
+"Sharing %s failed, because the sharing backend for %s could not find its source" => "A partilha %s falhou, devido a partilha em segundo plano para %s não conseguir encontrar a sua fonte",
+"Sharing %s failed, because the file could not be found in the file cache" => "A partilha %s falhou, devido ao ficheiro não poder ser encontrado na cache de ficheiros",
"Could not find category \"%s\"" => "Não foi encontrado a categoria \"%s\"",
"seconds ago" => "Minutos atrás",
"_%n minute ago_::_%n minutes ago_" => array("","%n minutos atrás"),
@@ -81,6 +92,33 @@ $TRANSLATIONS = array(
"A valid username must be provided" => "Um nome de utilizador válido deve ser fornecido",
"A valid password must be provided" => "Uma password válida deve ser fornecida",
"The username is already being used" => "O nome de utilizador já está a ser usado",
+"No database drivers (sqlite, mysql, or postgresql) installed." => "Nenhuma base de dados de drivers (sqlite, mysql, or postgresql) instaladas.",
+"Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." => "As autorizações podem ser resolvidas normalmente %sdando ao servidor web direito de escrita para o directório root%s.",
+"Cannot write into \"config\" directory" => "Não é possível escrever na directoria \"configurar\"",
+"Cannot write into \"apps\" directory" => "Não é possivel escrever na directoria \"aplicações\"",
+"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." => "Isto pode ser normalmente resolvido %sdando ao servidor web direito de escrita para o directório de aplicação%s ou desactivando a loja de aplicações no ficheiro de configuração.",
+"Cannot create \"data\" directory (%s)" => "Não é possivel criar a directoria \"data\" (%s)",
+"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." => "Isto pode ser normalmente resolvido <a href=\"%s\" target=\"_blank\">dando ao servidor web direito de escrita para o directório do root</a>.",
+"Setting locale to %s failed" => "Definindo local para %s falhado",
+"Please install one of theses locales on your system and restart your webserver." => "Por favor instale um desses locais no seu sistema e reinicie o seu servidor web.",
+"Please ask your server administrator to install the module." => "Por favor pergunte ao seu administrador do servidor para instalar o modulo.",
+"PHP module %s not installed." => "O modulo %s PHP não está instalado.",
+"PHP %s or higher is required." => "Necessário PHP %s ou maior.",
+"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." => "Por favor pessa ao seu administrador de servidor para actualizar o PHP para a ultima versão. A sua versão de PHP não é mais suportada pelo owncloud e a comunidade PHP.",
+"PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly." => "O modo seguro de PHP está activo. O ownCloud requer que isto esteja desactivado para funcionar em condições.",
+"PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "O modo seguro PHP está obsoleto e a maior parte das definições inúteis devem ser desactivadas. Por favor pessa ao seu administrador de servidor para desactivar isto em php.ini ou no seu config do servidor web.",
+"Magic Quotes is enabled. ownCloud requires that it is disabled to work properly." => "Aspas mágicas estão activadas. O ownCloud requere que isto esteja desactivado para trabalhar em condições.",
+"Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config." => "As aspas mágicas é uma definição obsoleta e inútil que deve ser desactivada. Por favor pessa ao seu administrador do servidor para desactivar isto em php.ini ou no config do seu servidor web.",
+"PHP modules have been installed, but they are still listed as missing?" => "Os módulos PHP foram instalados, mas eles ainda estão listados como desaparecidos?",
+"Please ask your server administrator to restart the web server." => "Pro favor pergunte ao seu administrador do servidor para reiniciar o servidor da internet.",
+"PostgreSQL >= 9 required" => "Necessita PostgreSQL >= 9",
+"Please upgrade your database version" => "Por favor actualize a sua versão da base de dados",
+"Error occurred while checking PostgreSQL version" => "Ocorreu um erro enquanto pesquisava a versão do PostgreSQL",
+"Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" => "Por favor confirme que tem o PostgreSQL >= 9 ou verifique os registos para mais informação sobre o erro",
+"Please change the permissions to 0770 so that the directory cannot be listed by other users." => "Por favor altere as permissões para 0770 para que esse directório não possa ser listado por outros utilizadores.",
+"Data directory (%s) is readable by other users" => "O directório de dados (%s) é legível para outros utilizadores",
+"Data directory (%s) is invalid" => "Directoria data (%s) é invalida",
+"Please check that the data directory contains a file \".ocdata\" in its root." => "Por favor verifique que a directoria data contem um ficheiro \".ocdata\" na sua raiz.",
"Could not obtain lock type %d on \"%s\"." => "Não foi possível obter o tipo de bloqueio %d em \"%s\"."
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/lib/l10n/ru.php b/lib/l10n/ru.php
index 64ce78990a1..c8514fc3f9e 100644
--- a/lib/l10n/ru.php
+++ b/lib/l10n/ru.php
@@ -64,9 +64,10 @@ $TRANSLATIONS = array(
"Sharing %s failed, because %s is not a member of the group %s" => "Не удалось установить общий доступ для %s, %s не является членом группы %s",
"You need to provide a password to create a public link, only protected links are allowed" => "Вам нужно задать пароль для создания публичной ссылки. Разрешены только защищённые ссылки",
"Sharing %s failed, because sharing with links is not allowed" => "Не удалось установить общий доступ для %s, потому что обмен со ссылками не допускается",
-"Share type %s is not valid for %s" => "Такой втд общего доступа как %s не допустим для %s",
+"Share type %s is not valid for %s" => "Такой тип общего доступа как %s не допустим для %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Настройка прав доступа для %s невозможна, поскольку права доступа превышают предоставленные права доступа %s",
"Setting permissions for %s failed, because the item was not found" => "Не удалось произвести настройку прав доступа для %s , элемент не был найден.",
+"Cannot set expiration date. Expiration date is in the past" => "Невозможно установить дату окончания. Дата окончания в прошлом.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Бэкенд для опубликования %s должен реализовывать интерфейс OCP\\Share_Backend",
"Sharing backend %s not found" => "Бэкэнд для общего доступа %s не найден",
"Sharing backend for %s not found" => "Бэкэнд для общего доступа к %s не найден",
diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php
index 8e62df09696..3578b5c43c6 100644
--- a/lib/l10n/sl.php
+++ b/lib/l10n/sl.php
@@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
+"Cannot write into \"config\" directory!" => "Mapa 'config' nima določenih ustreznih dovoljenj za pisanje!",
+"See %s" => "Oglejte si %s",
"Help" => "Pomoč",
"Personal" => "Osebno",
"Settings" => "Nastavitve",
diff --git a/lib/l10n/ta_IN.php b/lib/l10n/ta_IN.php
index 15f78e0bce6..5907e09695d 100644
--- a/lib/l10n/ta_IN.php
+++ b/lib/l10n/ta_IN.php
@@ -1,5 +1,6 @@
<?php
$TRANSLATIONS = array(
+"Settings" => "அமைப்புகள்",
"_%n minute ago_::_%n minutes ago_" => array("",""),
"_%n hour ago_::_%n hours ago_" => array("",""),
"_%n day go_::_%n days ago_" => array("",""),
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index 5586943c262..d3b29f24937 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "%s paylaşım türü %s için geçerli değil",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "%s için izinler, izinler %s için verilen izinleri aştığından dolayı ayarlanamadı",
"Setting permissions for %s failed, because the item was not found" => "%s için izinler öge bulunamadığından ayarlanamadı",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Son kullanma tarihi ayarlanamıyor. Paylaşımların süreleri, paylaşıldıkları süreden %s sonra dolamaz.",
+"Cannot set expiration date. Expiration date is in the past" => "Son kullanma tarihi ayarlanamıyor. Son kullanma tarihi geçmişte",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Paylaşma arka ucu %s OCP\\Share_Backend arayüzünü desteklemeli",
"Sharing backend %s not found" => "Paylaşım arka ucu %s bulunamadı",
"Sharing backend for %s not found" => "%s için paylaşım arka ucu bulunamadı",
diff --git a/lib/l10n/zh_HK.php b/lib/l10n/zh_HK.php
index e4039324d98..75085e02ae3 100644
--- a/lib/l10n/zh_HK.php
+++ b/lib/l10n/zh_HK.php
@@ -5,12 +5,15 @@ $TRANSLATIONS = array(
"Settings" => "設定",
"Users" => "用戶",
"Admin" => "管理",
-"_%n minute ago_::_%n minutes ago_" => array(""),
-"_%n hour ago_::_%n hours ago_" => array(""),
+"seconds ago" => "秒前",
+"_%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" => "年前"
);
$PLURAL_FORMS = "nplurals=1; plural=0;";
diff --git a/lib/private/app.php b/lib/private/app.php
index 7bf04f11267..e4b11f982dc 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -172,6 +172,7 @@ class OC_App {
if (!$forceRefresh && !empty(self::$enabledAppsCache)) {
return self::$enabledAppsCache;
}
+ $apps = array();
$appConfig = \OC::$server->getAppConfig();
$appStatus = $appConfig->getValues(false, 'enabled');
$user = \OC_User::getUser();
diff --git a/lib/private/appframework/utility/controllermethodreflector.php b/lib/private/appframework/utility/controllermethodreflector.php
index d5cf2f52eb2..c49dd80091e 100644
--- a/lib/private/appframework/utility/controllermethodreflector.php
+++ b/lib/private/appframework/utility/controllermethodreflector.php
@@ -62,6 +62,7 @@ class ControllerMethodReflector {
} else {
$this->types = array_combine($matches['var'], $matches['type']);
}
+
// get method parameters
foreach ($reflection->getParameters() as $param) {
if($param->isOptional()) {
diff --git a/lib/private/archive.php b/lib/private/archive.php
index a62f22cf6d7..562172ddefa 100644
--- a/lib/private/archive.php
+++ b/lib/private/archive.php
@@ -20,11 +20,8 @@ abstract class OC_Archive{
case '.gz':
case '.bz':
case '.bz2':
- if(strpos($path, '.tar.')) {
- return new OC_Archive_TAR($path);
- }
- break;
case '.tgz':
+ case '.tar':
return new OC_Archive_TAR($path);
}
}
diff --git a/lib/private/archive/tar.php b/lib/private/archive/tar.php
index 21a995d9e50..3f64b4c5064 100644
--- a/lib/private/archive/tar.php
+++ b/lib/private/archive/tar.php
@@ -40,12 +40,14 @@ class OC_Archive_TAR extends OC_Archive{
if(strpos($file, '.')) {
$extension=substr($file, strrpos($file, '.'));
switch($extension) {
- case 'gz':
- case 'tgz':
+ case '.gz':
+ case '.tgz':
return self::GZIP;
- case 'bz':
- case 'bz2':
+ case '.bz':
+ case '.bz2':
return self::BZIP;
+ case '.tar':
+ return self::PLAIN;
default:
return self::PLAIN;
}
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index 211d7e9abfc..9d15cd1663a 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -96,7 +96,10 @@ class JobList implements IJobList {
$query->execute();
$jobs = array();
while ($row = $query->fetch()) {
- $jobs[] = $this->buildJob($row);
+ $job = $this->buildJob($row);
+ if ($job) {
+ $jobs[] = $job;
+ }
}
return $jobs;
}
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index 871fac88e68..5f83aa0fb55 100644
--- a/lib/private/connector/sabre/filesplugin.php
+++ b/lib/private/connector/sabre/filesplugin.php
@@ -37,7 +37,7 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
$server->xmlNamespaces[self::NS_OWNCLOUD] = 'oc';
$server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}id';
- $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}perm';
+ $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}permissions';
$this->server = $server;
$this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
diff --git a/lib/private/connector/sabre/server.php b/lib/private/connector/sabre/server.php
index e4ee5dcefbf..aaf4fe85af9 100644
--- a/lib/private/connector/sabre/server.php
+++ b/lib/private/connector/sabre/server.php
@@ -29,6 +29,37 @@
class OC_Connector_Sabre_Server extends Sabre\DAV\Server {
/**
+ * @var string
+ */
+ private $overLoadedUri = null;
+
+ public function getRequestUri() {
+
+ if (!is_null($this->overLoadedUri)) {
+ return $this->overLoadedUri;
+ }
+
+ return parent::getRequestUri();
+ }
+
+ public function checkPreconditions($handleAsGET = false) {
+ // chunked upload handling
+ if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
+ $filePath = parent::getRequestUri();
+ list($path, $name) = \Sabre\DAV\URLUtil::splitPath($filePath);
+ $info = OC_FileChunking::decodeName($name);
+ if (!empty($info)) {
+ $filePath = $path . '/' . $info['name'];
+ $this->overLoadedUri = $filePath;
+ }
+ }
+
+ $result = parent::checkPreconditions($handleAsGET);
+ $this->overLoadedUri = null;
+ return $result;
+ }
+
+ /**
* @see \Sabre\DAV\Server
*/
protected function httpPropfind($uri) {
diff --git a/lib/private/contacts/localaddressbook.php b/lib/private/contacts/localaddressbook.php
new file mode 100644
index 00000000000..483bbee83f8
--- /dev/null
+++ b/lib/private/contacts/localaddressbook.php
@@ -0,0 +1,104 @@
+<?php
+ /**
+ * ownCloud
+ *
+ * @author Thomas Müller
+ * @copyright 2014 Thomas Müller >deepdiver@owncloud.com>
+ *
+ */
+
+namespace OC\Contacts;
+
+class LocalAddressBook implements \OCP\IAddressBook {
+
+ /**
+ * @var \OCP\IUserManager
+ */
+ private $userManager;
+
+ /**
+ * @param $userManager
+ */
+ public function __construct($userManager) {
+ $this->userManager = $userManager;
+ }
+
+ /**
+ * @return string defining the technical unique key
+ */
+ public function getKey() {
+ return 'local';
+ }
+
+ /**
+ * In comparison to getKey() this function returns a human readable (maybe translated) name
+ *
+ * @return mixed
+ */
+ public function getDisplayName() {
+ return "Local users";
+ }
+
+ /**
+ * @param string $pattern which should match within the $searchProperties
+ * @param array $searchProperties defines the properties within the query pattern should match
+ * @param array $options - for future use. One should always have options!
+ * @return array an array of contacts which are arrays of key-value-pairs
+ */
+ public function search($pattern, $searchProperties, $options) {
+ $users = array();
+ if($pattern == '') {
+ // Fetch all contacts
+ $users = $this->userManager->search('');
+ } else {
+ foreach($searchProperties as $property) {
+ $result = array();
+ if($property === 'FN') {
+ $result = $this->userManager->searchDisplayName($pattern);
+ } else if ($property === 'id') {
+ $result = $this->userManager->search($pattern);
+ }
+ if (is_array($result)) {
+ $users = array_merge($users, $result);
+ }
+ }
+ }
+
+ $contacts = array();
+ foreach($users as $user){
+ $contact = array(
+ "id" => $user->getUID(),
+ "FN" => $user->getDisplayname(),
+ "EMAIL" => array(),
+ "IMPP" => array(
+ "x-owncloud-handle:" . $user->getUID()
+ )
+ );
+ $contacts[] = $contact;
+ }
+ return $contacts;
+ }
+
+ /**
+ * @param array $properties this array if key-value-pairs defines a contact
+ * @return array an array representing the contact just created or updated
+ */
+ public function createOrUpdate($properties) {
+ return array();
+ }
+
+ /**
+ * @return int
+ */
+ public function getPermissions() {
+ return \OCP\PERMISSION_READ;
+ }
+
+ /**
+ * @param object $id the unique identifier to a contact
+ * @return bool successful or not
+ */
+ public function delete($id) {
+ return false;
+ }
+}
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php
index d3e379c9417..91e590a901a 100644
--- a/lib/private/db/mdb2schemamanager.php
+++ b/lib/private/db/mdb2schemamanager.php
@@ -59,7 +59,8 @@ class MDB2SchemaManager {
public function getMigrator() {
$platform = $this->conn->getDatabasePlatform();
if ($platform instanceof SqlitePlatform) {
- return new SQLiteMigrator($this->conn);
+ $config = \OC::$server->getConfig();
+ return new SQLiteMigrator($this->conn, $config);
} else if ($platform instanceof OraclePlatform) {
return new OracleMigrator($this->conn);
} else if ($platform instanceof MySqlPlatform) {
diff --git a/lib/private/db/migrator.php b/lib/private/db/migrator.php
index 6443cf4ed48..d05f8455551 100644
--- a/lib/private/db/migrator.php
+++ b/lib/private/db/migrator.php
@@ -110,7 +110,9 @@ class Migrator {
$this->dropTable($tmpName);
} catch (DBALException $e) {
// pgsql needs to commit it's failed transaction before doing anything else
- $this->connection->commit();
+ if ($this->connection->isTransactionActive()) {
+ $this->connection->commit();
+ }
$this->dropTable($tmpName);
throw new MigrationException($table->getName(), $e->getMessage());
}
diff --git a/lib/private/db/mysqlmigrator.php b/lib/private/db/mysqlmigrator.php
index 97495f52032..c0adcdf5df3 100644
--- a/lib/private/db/mysqlmigrator.php
+++ b/lib/private/db/mysqlmigrator.php
@@ -17,6 +17,10 @@ class MySQLMigrator extends Migrator {
* @return \Doctrine\DBAL\Schema\SchemaDiff
*/
protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) {
+ $platform = $connection->getDatabasePlatform();
+ $platform->registerDoctrineTypeMapping('enum', 'string');
+ $platform->registerDoctrineTypeMapping('bit', 'string');
+
$schemaDiff = parent::getDiff($targetSchema, $connection);
// identifiers need to be quoted for mysql
diff --git a/lib/private/db/sqlitemigrator.php b/lib/private/db/sqlitemigrator.php
index f5f78986771..94b421c5562 100644
--- a/lib/private/db/sqlitemigrator.php
+++ b/lib/private/db/sqlitemigrator.php
@@ -9,8 +9,24 @@
namespace OC\DB;
use Doctrine\DBAL\DBALException;
+use Doctrine\DBAL\Schema\Schema;
class SQLiteMigrator extends Migrator {
+
+ /**
+ * @var \OCP\IConfig
+ */
+ private $config;
+
+ /**
+ * @param \Doctrine\DBAL\Connection $connection
+ * @param \OCP\IConfig $config
+ */
+ public function __construct(\Doctrine\DBAL\Connection $connection, \OCP\IConfig $config) {
+ parent::__construct($connection);
+ $this->config = $config;
+ }
+
/**
* @param \Doctrine\DBAL\Schema\Schema $targetSchema
* @throws \OC\DB\MigrationException
@@ -19,7 +35,7 @@ class SQLiteMigrator extends Migrator {
*/
public function checkMigrate(\Doctrine\DBAL\Schema\Schema $targetSchema) {
$dbFile = $this->connection->getDatabase();
- $tmpFile = \OC_Helper::tmpFile('.db');
+ $tmpFile = $this->buildTempDatabase();
copy($dbFile, $tmpFile);
$connectionParams = array(
@@ -37,4 +53,25 @@ class SQLiteMigrator extends Migrator {
throw new MigrationException('', $e->getMessage());
}
}
+
+ /**
+ * @return string
+ */
+ private function buildTempDatabase() {
+ $dataDir = $this->config->getSystemValue("datadirectory", \OC::$SERVERROOT . '/data');
+ $tmpFile = uniqid("oc_");
+ return "$dataDir/$tmpFile.db";
+ }
+
+ /**
+ * @param Schema $targetSchema
+ * @param \Doctrine\DBAL\Connection $connection
+ * @return \Doctrine\DBAL\Schema\SchemaDiff
+ */
+ protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) {
+ $platform = $connection->getDatabasePlatform();
+ $platform->registerDoctrineTypeMapping('tinyint unsigned', 'integer');
+
+ return parent::getDiff($targetSchema, $connection);
+ }
}
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index a439bf0d6db..dfd114cd2fe 100644
--- a/lib/private/defaults.php
+++ b/lib/private/defaults.php
@@ -18,6 +18,8 @@ class OC_Defaults {
private $defaultTitle;
private $defaultBaseUrl;
private $defaultSyncClientUrl;
+ private $defaultiOSClientUrl;
+ private $defaultAndroidClientUrl;
private $defaultDocBaseUrl;
private $defaultDocVersion;
private $defaultSlogan;
@@ -28,18 +30,20 @@ class OC_Defaults {
$this->l = OC_L10N::get('lib');
$version = OC_Util::getVersion();
- $this->defaultEntity = "ownCloud"; /* e.g. company name, used for footers and copyright notices */
- $this->defaultName = "ownCloud"; /* short name, used when referring to the software */
- $this->defaultTitle = "ownCloud"; /* can be a longer name, for titles */
- $this->defaultBaseUrl = "https://owncloud.org";
- $this->defaultSyncClientUrl = "https://owncloud.org/sync-clients/";
- $this->defaultDocBaseUrl = "http://doc.owncloud.org";
- $this->defaultDocVersion = $version[0] . ".0"; // used to generate doc links
- $this->defaultSlogan = $this->l->t("web services under your control");
- $this->defaultLogoClaim = "";
- $this->defaultMailHeaderColor = "#1d2d44"; /* header color of mail notifications */
-
- if (class_exists("OC_Theme")) {
+ $this->defaultEntity = 'ownCloud'; /* e.g. company name, used for footers and copyright notices */
+ $this->defaultName = 'ownCloud'; /* short name, used when referring to the software */
+ $this->defaultTitle = 'ownCloud'; /* can be a longer name, for titles */
+ $this->defaultBaseUrl = 'https://owncloud.org';
+ $this->defaultSyncClientUrl = 'https://owncloud.org/sync-clients/';
+ $this->defaultiOSClientUrl = 'https://itunes.apple.com/us/app/owncloud/id543672169?mt=8';
+ $this->defaultAndroidClientUrl = 'https://play.google.com/store/apps/details?id=com.owncloud.android';
+ $this->defaultDocBaseUrl = 'http://doc.owncloud.org';
+ $this->defaultDocVersion = $version[0] . '.0'; // used to generate doc links
+ $this->defaultSlogan = $this->l->t('web services under your control');
+ $this->defaultLogoClaim = '';
+ $this->defaultMailHeaderColor = '#1d2d44'; /* header color of mail notifications */
+
+ if (class_exists('OC_Theme')) {
$this->theme = new OC_Theme();
}
}
@@ -79,6 +83,30 @@ class OC_Defaults {
}
/**
+ * Returns the URL to the App Store for the iOS Client
+ * @return string URL
+ */
+ public function getiOSClientUrl() {
+ if ($this->themeExist('getiOSClientUrl')) {
+ return $this->theme->getiOSClientUrl();
+ } else {
+ return $this->defaultiOSClientUrl;
+ }
+ }
+
+ /**
+ * Returns the URL to Google Play for the Android Client
+ * @return string URL
+ */
+ public function getAndroidClientUrl() {
+ if ($this->themeExist('getAndroidClientUrl')) {
+ return $this->theme->getAndroidClientUrl();
+ } else {
+ return $this->defaultAndroidClientUrl;
+ }
+ }
+
+ /**
* Returns the documentation URL
* @return string URL
*/
@@ -158,7 +186,7 @@ class OC_Defaults {
if ($this->themeExist('getShortFooter')) {
$footer = $this->theme->getShortFooter();
} else {
- $footer = "<a href=\"". $this->getBaseUrl() . "\" target=\"_blank\">" .$this->getEntity() . "</a>".
+ $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank">' .$this->getEntity() . '</a>'.
' – ' . $this->getSlogan();
}
diff --git a/lib/private/eventsource.php b/lib/private/eventsource.php
index 5a41ddd8b37..192c1446b5a 100644
--- a/lib/private/eventsource.php
+++ b/lib/private/eventsource.php
@@ -34,6 +34,7 @@ class OC_EventSource{
public function __construct() {
OC_Util::obEnd();
header('Cache-Control: no-cache');
+ header('X-Accel-Buffering: no');
$this->fallback=isset($_GET['fallback']) and $_GET['fallback']=='true';
if($this->fallback) {
$this->fallBackId=$_GET['fallback_id'];
@@ -44,6 +45,7 @@ class OC_EventSource{
}
if( !OC_Util::isCallRegistered()) {
$this->send('error', 'Possible CSRF attack. Connection will be closed.');
+ $this->close();
exit();
}
flush();
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 89fa6b8cc13..2d87871fd89 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -67,7 +67,7 @@ class Scanner extends BasicEmitter {
public function getData($path) {
if (!$this->storage->isReadable($path)) {
//cant read, nothing we can do
- \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not readable !!!", \OCP\Util::DEBUG);
+ \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not accessible or present !!!", \OCP\Util::DEBUG);
return null;
}
$data = array();
diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php
index d012c0c5a63..716b7d39402 100644
--- a/lib/private/files/fileinfo.php
+++ b/lib/private/files/fileinfo.php
@@ -215,7 +215,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
$sid = $this->getStorage()->getId();
if (!is_null($sid)) {
$sid = explode(':', $sid);
- return ($sid[0] !== 'local' and $sid[0] !== 'home');
+ return ($sid[0] !== 'local' and $sid[0] !== 'home' and $sid[0] !== 'shared');
}
return false;
diff --git a/lib/private/files/node/folder.php b/lib/private/files/node/folder.php
index 3e23f5c2c94..8c7acc339ae 100644
--- a/lib/private/files/node/folder.php
+++ b/lib/private/files/node/folder.php
@@ -27,22 +27,19 @@ class Folder extends Node implements \OCP\Files\Folder {
/**
* @param string $path
- * @throws \OCP\Files\NotFoundException
* @return string
*/
public function getRelativePath($path) {
if ($this->path === '' or $this->path === '/') {
return $this->normalizePath($path);
}
- if (strpos($path, $this->path) !== 0) {
- throw new NotFoundException();
+ if ($path === $this->path) {
+ return '/';
+ } else if (strpos($path, $this->path . '/') !== 0) {
+ return null;
} else {
$path = substr($path, strlen($this->path));
- if (strlen($path) === 0) {
- return '/';
- } else {
- return $this->normalizePath($path);
- }
+ return $this->normalizePath($path);
}
}
@@ -295,15 +292,29 @@ class Folder extends Node implements \OCP\Files\Folder {
* @return \OC\Files\Node\Node[]
*/
public function getById($id) {
- $nodes = $this->root->getById($id);
- $result = array();
- foreach ($nodes as $node) {
- $pathPart = substr($node->getPath(), 0, strlen($this->getPath()) + 1);
- if ($this->path === '/' or $pathPart === $this->getPath() . '/') {
- $result[] = $node;
+ $mounts = $this->root->getMountsIn($this->path);
+ $mounts[] = $this->root->getMount($this->path);
+ // reverse the array so we start with the storage this view is in
+ // which is the most likely to contain the file we're looking for
+ $mounts = array_reverse($mounts);
+
+ $nodes = array();
+ foreach ($mounts as $mount) {
+ /**
+ * @var \OC\Files\Mount\Mount $mount
+ */
+ if ($mount->getStorage()) {
+ $cache = $mount->getStorage()->getCache();
+ $internalPath = $cache->getPathById($id);
+ if (is_string($internalPath)) {
+ $fullPath = $mount->getMountPoint() . $internalPath;
+ if (!is_null($path = $this->getRelativePath($fullPath))) {
+ $nodes[] = $this->get($path);
+ }
+ }
}
}
- return $result;
+ return $nodes;
}
public function getFreeSpace() {
diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php
index 70135285b0d..18e7a6b681a 100644
--- a/lib/private/files/node/root.php
+++ b/lib/private/files/node/root.php
@@ -162,39 +162,13 @@ class Root extends Folder implements Emitter {
if ($this->view->file_exists($fullPath)) {
return $this->createNode($fullPath);
} else {
- throw new NotFoundException();
+ throw new NotFoundException($path);
}
} else {
throw new NotPermittedException();
}
}
- /**
- * search file by id
- *
- * An array is returned because in the case where a single storage is mounted in different places the same file
- * can exist in different places
- *
- * @param int $id
- * @throws \OCP\Files\NotFoundException
- * @return Node[]
- */
- public function getById($id) {
- $result = Cache::getById($id);
- if (is_null($result)) {
- throw new NotFoundException();
- } else {
- list($storageId, $internalPath) = $result;
- $nodes = array();
- $mounts = $this->mountManager->findByStorageId($storageId);
- foreach ($mounts as $mount) {
- $nodes[] = $this->get($mount->getMountPoint() . $internalPath);
- }
- return $nodes;
- }
-
- }
-
//most operations cant be done on the root
/**
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index 63570d70cff..a8b420e978a 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -208,22 +208,7 @@ if (\OC_Util::runningOnWindows()) {
}
public function fopen($path, $mode) {
- if ($return = fopen($this->datadir . $path, $mode)) {
- switch ($mode) {
- case 'r':
- break;
- case 'r+':
- case 'w+':
- case 'x+':
- case 'a+':
- break;
- case 'w':
- case 'x':
- case 'a':
- break;
- }
- }
- return $return;
+ return fopen($this->datadir . $path, $mode);
}
public function hash($type, $path, $raw = false) {
diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php
index c4a8dc1961c..0760d842eaf 100644
--- a/lib/private/files/storage/mappedlocal.php
+++ b/lib/private/files/storage/mappedlocal.php
@@ -79,7 +79,7 @@ class MappedLocal extends \OC\Files\Storage\Common {
$logicalPath = $this->mapper->physicalToLogic($physicalPath);
$dh = opendir($physicalPath);
- if(is_resource($dh)) {
+ if (is_resource($dh)) {
while (($file = readdir($dh)) !== false) {
if ($file === '.' or $file === '..') {
continue;
@@ -87,9 +87,9 @@ class MappedLocal extends \OC\Files\Storage\Common {
$logicalFilePath = $this->mapper->physicalToLogic($physicalPath . '/' . $file);
- $file= $this->mapper->stripRootFolder($logicalFilePath, $logicalPath);
+ $file = $this->mapper->stripRootFolder($logicalFilePath, $logicalPath);
$file = $this->stripLeading($file);
- $files[]= $file;
+ $files[] = $file;
}
}
@@ -245,28 +245,15 @@ class MappedLocal extends \OC\Files\Storage\Common {
}
public function fopen($path, $mode) {
- if ($return = fopen($this->buildPath($path), $mode)) {
- switch ($mode) {
- case 'r':
- break;
- case 'r+':
- case 'w+':
- case 'x+':
- case 'a+':
- break;
- case 'w':
- case 'x':
- case 'a':
- break;
- }
- }
- return $return;
+ return fopen($this->buildPath($path), $mode);
}
/**
* @param string $dir
+ * @param bool $isLogicPath
+ * @return bool
*/
- private function delTree($dir, $isLogicPath=true) {
+ private function delTree($dir, $isLogicPath = true) {
$dirRelative = $dir;
if ($isLogicPath) {
$dir = $this->buildPath($dir);
@@ -380,7 +367,7 @@ class MappedLocal extends \OC\Files\Storage\Common {
/**
* @param string $path
*/
- private function cleanMapper($path, $isLogicPath = true, $recursive=true) {
+ private function cleanMapper($path, $isLogicPath = true, $recursive = true) {
$fullPath = $path;
if ($isLogicPath) {
$fullPath = $this->datadir . $path;
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index e08cb20f73d..2a28e6fce88 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -781,6 +781,9 @@ class View {
return false;
}
$defaultRoot = Filesystem::getRoot();
+ if ($defaultRoot === null) {
+ return false;
+ }
if ($this->fakeRoot === $defaultRoot) {
return true;
}
@@ -957,6 +960,10 @@ class View {
$content['permissions'] = $storage->getPermissions($content['path']);
$cache->update($content['fileid'], array('permissions' => $content['permissions']));
}
+ // if sharing was disabled for the user we remove the share permissions
+ if (\OCP\Util::isSharingDisabledForUser()) {
+ $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
+ }
$files[] = new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content);
}
@@ -1005,6 +1012,12 @@ class View {
}
}
$rootEntry['path'] = substr($path . '/' . $rootEntry['name'], strlen($user) + 2); // full path without /$user/
+
+ // if sharing was disabled for the user we remove the share permissions
+ if (\OCP\Util::isSharingDisabledForUser()) {
+ $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
+ }
+
$files[] = new FileInfo($path . '/' . $rootEntry['name'], $subStorage, '', $rootEntry);
}
}
diff --git a/lib/private/group.php b/lib/private/group.php
index bd9e3d37d1f..49f683c411a 100644
--- a/lib/private/group.php
+++ b/lib/private/group.php
@@ -34,26 +34,19 @@
* post_removeFromGroup(uid, gid)
*/
class OC_Group {
- /**
- * @var \OC\Group\Manager $manager
- */
- private static $manager;
/**
- * @var \OC\User\Manager
+ * @return \OC\Group\Manager
*/
- private static $userManager;
+ public static function getManager() {
+ return \OC::$server->getGroupManager();
+ }
/**
- * @return \OC\Group\Manager
+ * @return \OC\User\Manager
*/
- public static function getManager() {
- if (self::$manager) {
- return self::$manager;
- }
- self::$userManager = \OC_User::getManager();
- self::$manager = new \OC\Group\Manager(self::$userManager);
- return self::$manager;
+ private static function getUserManager() {
+ return \OC::$server->getUserManager();
}
/**
@@ -127,7 +120,7 @@ class OC_Group {
*/
public static function inGroup($uid, $gid) {
$group = self::getManager()->get($gid);
- $user = self::$userManager->get($uid);
+ $user = self::getUserManager()->get($uid);
if ($group and $user) {
return $group->inGroup($user);
}
@@ -144,7 +137,7 @@ class OC_Group {
*/
public static function addToGroup($uid, $gid) {
$group = self::getManager()->get($gid);
- $user = self::$userManager->get($uid);
+ $user = self::getUserManager()->get($uid);
if ($group and $user) {
OC_Hook::emit("OC_Group", "pre_addToGroup", array("run" => true, "uid" => $uid, "gid" => $gid));
$group->addUser($user);
@@ -165,7 +158,7 @@ class OC_Group {
*/
public static function removeFromGroup($uid, $gid) {
$group = self::getManager()->get($gid);
- $user = self::$userManager->get($uid);
+ $user = self::getUserManager()->get($uid);
if ($group and $user) {
OC_Hook::emit("OC_Group", "pre_removeFromGroup", array("run" => true, "uid" => $uid, "gid" => $gid));
$group->removeUser($user);
@@ -185,7 +178,7 @@ class OC_Group {
* if the user exists at all.
*/
public static function getUserGroups($uid) {
- $user = self::$userManager->get($uid);
+ $user = self::getUserManager()->get($uid);
if ($user) {
return self::getManager()->getUserGroupIds($user);
} else {
diff --git a/lib/private/group/database.php b/lib/private/group/database.php
index b7148f38fe3..8d6ea1f50a5 100644
--- a/lib/private/group/database.php
+++ b/lib/private/group/database.php
@@ -185,7 +185,7 @@ class OC_Group_Database extends OC_Group_Backend {
public function groupExists($gid) {
$query = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE `gid` = ?');
$result = $query->execute(array($gid))->fetchOne();
- if ($result) {
+ if ($result !== false) {
return true;
}
return false;
diff --git a/lib/private/group/group.php b/lib/private/group/group.php
index e0a35924854..6f8b84dff1a 100644
--- a/lib/private/group/group.php
+++ b/lib/private/group/group.php
@@ -9,7 +9,9 @@
namespace OC\Group;
-class Group {
+use OCP\IGroup;
+
+class Group implements IGroup {
/**
* @var string $id
*/
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index 3613c7547bd..bea7ad193bf 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -10,6 +10,7 @@
namespace OC\Group;
use OC\Hooks\PublicEmitter;
+use OCP\IGroupManager;
/**
* Class Manager
@@ -26,7 +27,7 @@ use OC\Hooks\PublicEmitter;
*
* @package OC\Group
*/
-class Manager extends PublicEmitter {
+class Manager extends PublicEmitter implements IGroupManager {
/**
* @var \OC_Group_Backend[]|\OC_Group_Database[] $backends
*/
@@ -125,7 +126,7 @@ class Manager extends PublicEmitter {
* @return \OC\Group\Group
*/
public function createGroup($gid) {
- if (!$gid) {
+ if ($gid === '' || is_null($gid)) {
return false;
} else if ($group = $this->get($gid)) {
return $group;
diff --git a/lib/private/image.php b/lib/private/image.php
index 5331c399159..0dff8c5a9da 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -870,6 +870,14 @@ class OC_Image {
imagedestroy($process);
return false;
}
+
+ // preserve transparency
+ if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) {
+ imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127));
+ imagealphablending($process, false);
+ imagesavealpha($process, true);
+ }
+
imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $w, $h, $w, $h);
if ($process == false) {
OC_Log::write('core', __METHOD__.'(): Error resampling process image '.$w.'x'.$h, OC_Log::ERROR);
diff --git a/lib/private/largefilehelper.php b/lib/private/largefilehelper.php
index 293e09fe2c9..2c35feefc8b 100644
--- a/lib/private/largefilehelper.php
+++ b/lib/private/largefilehelper.php
@@ -147,7 +147,7 @@ class LargeFileHelper {
if (\OC_Helper::is_function_enabled('exec')) {
$os = strtolower(php_uname('s'));
$arg = escapeshellarg($filename);
- $result = '';
+ $result = null;
if (strpos($os, 'linux') !== false) {
$result = $this->exec("stat -c %s $arg");
} else if (strpos($os, 'bsd') !== false) {
diff --git a/lib/private/mail.php b/lib/private/mail.php
index 81bcb3d8deb..82107c32dc7 100644
--- a/lib/private/mail.php
+++ b/lib/private/mail.php
@@ -74,16 +74,16 @@ class OC_Mail {
$toaddress = self::buildAsciiEmail($toaddress);
$mailo->AddAddress($toaddress, $toname);
- if($ccaddress<>'') $mailo->AddCC($ccaddress, $ccname);
- if($bcc<>'') $mailo->AddBCC($bcc);
+ if($ccaddress != '') $mailo->AddCC($ccaddress, $ccname);
+ if($bcc != '') $mailo->AddBCC($bcc);
$mailo->AddReplyTo($fromaddress, $fromname);
- $mailo->WordWrap = 50;
- if($html==1) $mailo->IsHTML(true); else $mailo->IsHTML(false);
+ $mailo->WordWrap = 78;
+ $mailo->IsHTML($html == 1);
$mailo->Subject = $subject;
- if($altbody=='') {
+ if($altbody == '') {
$mailo->Body = $mailtext.OC_MAIL::getfooter();
$mailo->AltBody = '';
}else{
diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php
index d60b157efe2..8e47a8899fc 100644
--- a/lib/private/memcache/factory.php
+++ b/lib/private/memcache/factory.php
@@ -59,7 +59,8 @@ class Factory implements ICacheFactory {
* @param string $prefix
* @return null|Cache
*/
- public static function createLowLatency($prefix = '') {
+ public function createLowLatency($prefix = '') {
+ $prefix = $this->globalPrefix . '/' . $prefix;
if (XCache::isAvailable()) {
return new XCache($prefix);
} elseif (APCu::isAvailable()) {
@@ -76,7 +77,7 @@ class Factory implements ICacheFactory {
*
* @return bool
*/
- public static function isAvailableLowLatency() {
+ public function isAvailableLowLatency() {
return XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable();
}
diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php
index d27e9e6348b..8db78361433 100644
--- a/lib/private/mimetypes.list.php
+++ b/lib/private/mimetypes.list.php
@@ -28,6 +28,7 @@
* is considered secure.
*/
return array(
+ '3gp' => array('video/3gpp', null),
'7z' => array('application/x-7z-compressed', null),
'accdb' => array('application/msaccess', null),
'ai' => array('application/illustrator', null),
@@ -137,6 +138,7 @@ return array(
'txt' => array('text/plain', null),
'vcard' => array('text/vcard', null),
'vcf' => array('text/vcard', null),
+ 'vob' => array('video/dvd', null),
'wav' => array('audio/wav', null),
'webm' => array('video/webm', null),
'woff' => array('application/font-woff', null),
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index dc52fc27b5e..e4cce6b2260 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -59,7 +59,7 @@ class OC_OCSClient{
/**
* Get all the categories from the OCS server
- * @return array an array of category ids
+ * @return array|null an array of category ids or null
* @note returns NULL if config value appstoreenabled is set to false
* This function returns a list of all the application categories on the OCS server
*/
@@ -92,7 +92,7 @@ class OC_OCSClient{
/**
* Get all the applications from the OCS server
- * @return array an array of application data
+ * @return array|null an array of application data or null
*
* This function returns a list of all the applications on the OCS server
* @param array|string $categories
@@ -150,9 +150,9 @@ class OC_OCSClient{
/**
* Get an the applications from the OCS server
* @param string $id
- * @return array an array of application data
+ * @return array|null an array of application data or null
*
- * This function returns an applications from the OCS server
+ * This function returns an applications from the OCS server
*/
public static function getApplication($id) {
if(OC_Config::getValue('appstoreenabled', true)==false) {
@@ -162,7 +162,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
- OC_Log::write('core', 'Unable to parse OCS content', OC_Log::FATAL);
+ OC_Log::write('core', 'Unable to parse OCS content for app ' . $id, OC_Log::FATAL);
return null;
}
$loadEntities = libxml_disable_entity_loader(true);
@@ -170,6 +170,10 @@ class OC_OCSClient{
libxml_disable_entity_loader($loadEntities);
$tmp=$data->data->content;
+ if (is_null($tmp)) {
+ OC_Log::write('core', 'Invalid OCS content returned for app ' . $id, OC_Log::FATAL);
+ return null;
+ }
$app=array();
$app['id']=$tmp->id;
$app['name']=$tmp->name;
@@ -192,7 +196,7 @@ class OC_OCSClient{
/**
* Get the download url for an application from the OCS server
- * @return array an array of application data
+ * @return array|null an array of application data or null
*
* This function returns an download url for an applications from the OCS server
* @param string $id
@@ -223,6 +227,4 @@ class OC_OCSClient{
return $app;
}
-
-
}
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 8089379bde5..aeb9806904a 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -13,6 +13,7 @@
*/
namespace OC;
+use OC\Files\Filesystem;
use OC\Preview\Provider;
require_once 'preview/image.php';
@@ -561,9 +562,15 @@ class Preview {
$realX = (int)$image->width();
$realY = (int)$image->height();
- // compute $maxY using the aspect of the generated preview
+ // compute $maxY and $maxX using the aspect of the generated preview
if ($this->keepAspect) {
- $y = $x / ($realX / $realY);
+ $ratio = $realX / $realY;
+ if($x / $ratio < $y) {
+ // width restricted
+ $y = $x / $ratio;
+ } else {
+ $x = $y * $ratio;
+ }
}
if ($x === $realX && $y === $realY) {
@@ -726,6 +733,35 @@ class Preview {
}
/**
+ * Check if a preview can be generated for a file
+ *
+ * @param \OC\Files\FileInfo $file
+ * @return bool
+ */
+ public static function isAvailable($file) {
+ if (!\OC_Config::getValue('enable_previews', true)) {
+ return false;
+ }
+
+ //check if there are preview backends
+ if (empty(self::$providers)) {
+ self::initProviders();
+ }
+
+ //remove last element because it has the mimetype *
+ $providers = array_slice(self::$providers, 0, -1);
+ foreach ($providers as $supportedMimeType => $provider) {
+ /**
+ * @var \OC\Preview\Provider $provider
+ */
+ if (preg_match($supportedMimeType, $file->getMimetype())) {
+ return $provider->isAvailable($file);
+ }
+ }
+ return false;
+ }
+
+ /**
* @param string $mimeType
* @return bool
*/
diff --git a/lib/private/preview/mp3.php b/lib/private/preview/mp3.php
index 21f160fd50f..bb4d3dfce86 100644
--- a/lib/private/preview/mp3.php
+++ b/lib/private/preview/mp3.php
@@ -14,8 +14,6 @@ class MP3 extends Provider {
}
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
- require_once('getid3/getid3.php');
-
$getID3 = new \getID3();
$tmpPath = $fileview->toTmpFile($path);
diff --git a/lib/private/preview/office-cl.php b/lib/private/preview/office-cl.php
index 6e4d4321eb7..81e0cf4b6ae 100644
--- a/lib/private/preview/office-cl.php
+++ b/lib/private/preview/office-cl.php
@@ -29,13 +29,12 @@ if (!\OC_Util::runningOnWindows()) {
$tmpDir = get_temp_dir();
- $defaultParameters = ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ';
+ $defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir) . ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ';
$clParameters = \OCP\Config::getSystemValue('preview_office_cl_parameters', $defaultParameters);
$exec = $this->cmd . $clParameters . escapeshellarg($tmpDir) . ' ' . escapeshellarg($absPath);
- $export = 'export HOME=/' . $tmpDir;
- shell_exec($export . "\n" . $exec);
+ shell_exec($exec);
//create imagick object from pdf
try{
diff --git a/lib/private/preview/provider.php b/lib/private/preview/provider.php
index f769823f6e6..f544c2c4b13 100644
--- a/lib/private/preview/provider.php
+++ b/lib/private/preview/provider.php
@@ -11,6 +11,16 @@ abstract class Provider {
abstract public function getMimeType();
/**
+ * Check if a preview can be generated for $path
+ *
+ * @param string $path
+ * @return bool
+ */
+ public function isAvailable($path) {
+ return true;
+ }
+
+ /**
* get thumbnail for file at path $path
* @param string $path Path of file
* @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php
index 063543c6279..2ac77faf48b 100644
--- a/lib/private/preview/txt.php
+++ b/lib/private/preview/txt.php
@@ -14,6 +14,16 @@ class TXT extends Provider {
}
/**
+ * Check if a preview can be generated for $path
+ *
+ * @param \OC\Files\FileInfo $file
+ * @return bool
+ */
+ public function isAvailable($file) {
+ return $file->getSize() > 5;
+ }
+
+ /**
* @param string $path
* @param int $maxX
* @param int $maxY
@@ -44,13 +54,20 @@ class TXT extends Provider {
$fontFile .= '/../../../core';
$fontFile .= '/fonts/OpenSans-Regular.ttf';
+ $canUseTTF = function_exists('imagettftext');
+
foreach($lines as $index => $line) {
$index = $index + 1;
$x = (int) 1;
$y = (int) ($index * $lineSize);
- imagettftext($image, $fontSize, 0, $x, $y, $textColor, $fontFile, $line);
+ if ($canUseTTF === true) {
+ imagettftext($image, $fontSize, 0, $x, $y, $textColor, $fontFile, $line);
+ } else {
+ $y -= $fontSize;
+ imagestring($image, 1, $x, $y, $line, $textColor);
+ }
if(($index * $lineSize) >= $maxY) {
break;
diff --git a/lib/private/previewmanager.php b/lib/private/previewmanager.php
index 23dbee13c7d..85bf609743d 100755
--- a/lib/private/previewmanager.php
+++ b/lib/private/previewmanager.php
@@ -14,25 +14,35 @@ use OCP\IPreview;
class PreviewManager implements IPreview {
/**
* return a preview of a file
+ *
* @param string $file The path to the file where you want a thumbnail from
* @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
* @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
* @param boolean $scaleUp Scale smaller images up to the thumbnail size or not. Might look ugly
* @return \OCP\Image
*/
- function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false)
- {
+ function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false) {
$preview = new \OC\Preview('', '/', $file, $maxX, $maxY, $scaleUp);
return $preview->getPreview();
}
/**
* returns true if the passed mime type is supported
+ *
* @param string $mimeType
* @return boolean
*/
- function isMimeSupported($mimeType = '*')
- {
+ function isMimeSupported($mimeType = '*') {
return \OC\Preview::isMimeSupported($mimeType);
}
+
+ /**
+ * Check if a preview can be generated for a file
+ *
+ * @param \OC\Files\FileInfo $file
+ * @return bool
+ */
+ function isAvailable($file) {
+ return \OC\Preview::isAvailable($file);
+ }
}
diff --git a/lib/private/server.php b/lib/private/server.php
index 3237ce30ccf..aab3c82bfeb 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -13,6 +13,7 @@ use OCP\IServerContainer;
/**
* Class Server
+ *
* @package OC
*
* TODO: hookup all manager classes
@@ -20,10 +21,10 @@ use OCP\IServerContainer;
class Server extends SimpleContainer implements IServerContainer {
function __construct() {
- $this->registerService('ContactsManager', function($c) {
+ $this->registerService('ContactsManager', function ($c) {
return new ContactsManager();
});
- $this->registerService('Request', function($c) {
+ $this->registerService('Request', function ($c) {
if (isset($c['urlParams'])) {
$urlParams = $c['urlParams'];
} else {
@@ -37,7 +38,8 @@ class Server extends SimpleContainer implements IServerContainer {
}
if (defined('PHPUNIT_RUN') && PHPUNIT_RUN
- && in_array('fakeinput', stream_get_wrappers())) {
+ && in_array('fakeinput', stream_get_wrappers())
+ ) {
$stream = 'fakeinput://data';
} else {
$stream = 'php://input';
@@ -52,21 +54,21 @@ class Server extends SimpleContainer implements IServerContainer {
'env' => $_ENV,
'cookies' => $_COOKIE,
'method' => (isset($_SERVER) && isset($_SERVER['REQUEST_METHOD']))
- ? $_SERVER['REQUEST_METHOD']
- : null,
+ ? $_SERVER['REQUEST_METHOD']
+ : null,
'urlParams' => $urlParams,
'requesttoken' => $requestToken,
), $stream
);
});
- $this->registerService('PreviewManager', function($c) {
+ $this->registerService('PreviewManager', function ($c) {
return new PreviewManager();
});
- $this->registerService('TagManager', function($c) {
+ $this->registerService('TagManager', function ($c) {
$user = \OC_User::getUser();
return new TagManager($user);
});
- $this->registerService('RootFolder', function($c) {
+ $this->registerService('RootFolder', function ($c) {
// TODO: get user and user manager from container as well
$user = \OC_User::getUser();
/** @var $c SimpleContainer */
@@ -76,7 +78,7 @@ class Server extends SimpleContainer implements IServerContainer {
$view = new View();
return new Root($manager, $view, $user);
});
- $this->registerService('UserManager', function($c) {
+ $this->registerService('UserManager', function ($c) {
/**
* @var SimpleContainer $c
* @var \OC\AllConfig $config
@@ -84,7 +86,15 @@ class Server extends SimpleContainer implements IServerContainer {
$config = $c->query('AllConfig');
return new \OC\User\Manager($config);
});
- $this->registerService('UserSession', function($c) {
+ $this->registerService('GroupManager', function ($c) {
+ /**
+ * @var SimpleContainer $c
+ * @var \OC\User\Manager $userManager
+ */
+ $userManager = $c->query('UserManager');
+ return new \OC\Group\Manager($userManager);
+ });
+ $this->registerService('UserSession', function ($c) {
/**
* @var SimpleContainer $c
* @var \OC\User\Manager $manager
@@ -126,40 +136,40 @@ class Server extends SimpleContainer implements IServerContainer {
});
return $userSession;
});
- $this->registerService('NavigationManager', function($c) {
+ $this->registerService('NavigationManager', function ($c) {
return new \OC\NavigationManager();
});
- $this->registerService('AllConfig', function($c) {
+ $this->registerService('AllConfig', function ($c) {
return new \OC\AllConfig();
});
$this->registerService('AppConfig', function ($c) {
return new \OC\AppConfig(\OC_DB::getConnection());
});
- $this->registerService('L10NFactory', function($c) {
+ $this->registerService('L10NFactory', function ($c) {
return new \OC\L10N\Factory();
});
- $this->registerService('URLGenerator', function($c) {
+ $this->registerService('URLGenerator', function ($c) {
/** @var $c SimpleContainer */
$config = $c->query('AllConfig');
return new \OC\URLGenerator($config);
});
- $this->registerService('AppHelper', function($c) {
+ $this->registerService('AppHelper', function ($c) {
return new \OC\AppHelper();
});
- $this->registerService('UserCache', function($c) {
+ $this->registerService('UserCache', function ($c) {
return new UserCache();
});
$this->registerService('MemCacheFactory', function ($c) {
$instanceId = \OC_Util::getInstanceId();
return new \OC\Memcache\Factory($instanceId);
});
- $this->registerService('ActivityManager', function($c) {
+ $this->registerService('ActivityManager', function ($c) {
return new ActivityManager();
});
- $this->registerService('AvatarManager', function($c) {
+ $this->registerService('AvatarManager', function ($c) {
return new AvatarManager();
});
- $this->registerService('Logger', function($c) {
+ $this->registerService('Logger', function ($c) {
/** @var $c SimpleContainer */
$logClass = $c->query('AllConfig')->getSystemValue('log_type', 'owncloud');
$logger = 'OC_Log_' . ucfirst($logClass);
@@ -174,7 +184,7 @@ class Server extends SimpleContainer implements IServerContainer {
$config = $c->getConfig();
return new \OC\BackgroundJob\JobList($c->getDatabaseConnection(), $config);
});
- $this->registerService('Router', function ($c){
+ $this->registerService('Router', function ($c) {
/**
* @var Server $c
*/
@@ -186,10 +196,10 @@ class Server extends SimpleContainer implements IServerContainer {
}
return $router;
});
- $this->registerService('Search', function($c){
+ $this->registerService('Search', function ($c) {
return new Search();
});
- $this->registerService('Db', function($c){
+ $this->registerService('Db', function ($c) {
return new Db();
});
}
@@ -255,18 +265,22 @@ class Server extends SimpleContainer implements IServerContainer {
* @return \OCP\Files\Folder
*/
function getUserFolder() {
- $dir = '/' . $this->getUserSession()->getUser()->getUID();
+ $user = $this->getUserSession()->getUser();
+ if (!$user) {
+ return null;
+ }
+ $dir = '/' . $user->getUID();
$root = $this->getRootFolder();
$folder = null;
- if(!$root->nodeExists($dir)) {
+ if (!$root->nodeExists($dir)) {
$folder = $root->newFolder($dir);
} else {
$folder = $root->get($dir);
}
$dir = '/files';
- if(!$folder->nodeExists($dir)) {
+ if (!$folder->nodeExists($dir)) {
$folder = $folder->newFolder($dir);
} else {
$folder = $folder->get($dir);
@@ -281,11 +295,10 @@ class Server extends SimpleContainer implements IServerContainer {
* @return \OCP\Files\Folder
*/
function getAppFolder() {
-
$dir = '/' . \OC_App::getCurrentApp();
$root = $this->getRootFolder();
$folder = null;
- if(!$root->nodeExists($dir)) {
+ if (!$root->nodeExists($dir)) {
$folder = $root->newFolder($dir);
} else {
$folder = $root->get($dir);
@@ -301,6 +314,13 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
+ * @return \OC\Group\Manager
+ */
+ function getGroupManager() {
+ return $this->query('GroupManager');
+ }
+
+ /**
* @return \OC\User\Session
*/
function getUserSession() {
@@ -326,12 +346,13 @@ class Server extends SimpleContainer implements IServerContainer {
*
* @return \OCP\IAppConfig
*/
- function getAppConfig(){
+ function getAppConfig() {
return $this->query('AppConfig');
}
/**
* get an L10N instance
+ *
* @param string $app appid
* @return \OC_L10N
*/
@@ -403,7 +424,7 @@ class Server extends SimpleContainer implements IServerContainer {
*
* @return \OCP\BackgroundJob\IJobList
*/
- function getJobList(){
+ function getJobList() {
return $this->query('JobList');
}
@@ -421,12 +442,13 @@ class Server extends SimpleContainer implements IServerContainer {
*
* @return \OCP\Route\IRouter
*/
- function getRouter(){
+ function getRouter() {
return $this->query('Router');
}
/**
* Returns a search instance
+ *
* @return \OCP\ISearch
*/
function getSearch() {
@@ -435,6 +457,7 @@ class Server extends SimpleContainer implements IServerContainer {
/**
* Returns an instance of the db facade
+ *
* @return \OCP\IDb
*/
function getDb() {
diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php
index cb74dcf8b90..1f4645eed9f 100644
--- a/lib/private/share/mailnotifications.php
+++ b/lib/private/share/mailnotifications.php
@@ -99,15 +99,20 @@ class MailNotifications {
}
}
+ // Link to folder, or root folder if a file
+
if ($itemType === 'folder') {
- $foldername = "/Shared/" . $filename;
+ $args = array(
+ 'dir' => $filename,
+ );
} else {
- // if it is a file we can just link to the Shared folder,
- // that's the place where the user will find the file
- $foldername = "/Shared";
+ $args = array(
+ 'dir' => '/',
+ 'scrollto' => $filename,
+ );
}
- $link = \OCP\Util::linkToAbsolute('files', 'index.php', array("dir" => $foldername));
+ $link = \OCP\Util::linkToAbsolute('files', 'index.php', $args);
list($htmlMail, $alttextMail) = $this->createMailBody($filename, $link, $expiration);
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 673c0dc383a..646511fd64d 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -595,6 +595,7 @@ class Share extends \OC\Share\Constants {
$shareWith['group'] = $group;
$shareWith['users'] = array_diff(\OC_Group::usersInGroup($group), array($uidOwner));
} else if ($shareType === self::SHARE_TYPE_LINK) {
+ $updateExistingShare = false;
if (\OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes') == 'yes') {
// when updating a link share
@@ -629,7 +630,7 @@ class Share extends \OC\Share\Constants {
throw new \Exception($message_t);
}
- if (!empty($updateExistingShare) &&
+ if ($updateExistingShare === false &&
self::isDefaultExpireDateEnabled() &&
empty($expirationDate)) {
$expirationDate = Helper::calcExpireDate();
@@ -925,19 +926,69 @@ class Share extends \OC\Share\Constants {
}
/**
+ * validate expiration date if it meets all constraints
+ *
+ * @param string $expireDate well formate date string, e.g. "DD-MM-YYYY"
+ * @param string $shareTime timestamp when the file was shared
+ * @param string $itemType
+ * @param string $itemSource
+ * @return DateTime validated date
+ * @throws \Exception
+ */
+ private static function validateExpireDate($expireDate, $shareTime, $itemType, $itemSource) {
+ $l = \OC_L10N::get('lib');
+ $date = new \DateTime($expireDate);
+ $today = new \DateTime('now');
+
+ // if the user doesn't provide a share time we need to get it from the database
+ // fall-back mode to keep API stable, because the $shareTime parameter was added later
+ $defaultExpireDateEnforced = \OCP\Util::isDefaultExpireDateEnforced();
+ if ($defaultExpireDateEnforced && $shareTime === null) {
+ $items = self::getItemShared($itemType, $itemSource);
+ $firstItem = reset($items);
+ $shareTime = (int)$firstItem['stime'];
+ }
+
+ if ($defaultExpireDateEnforced) {
+ // initialize max date with share time
+ $maxDate = new \DateTime();
+ $maxDate->setTimestamp($shareTime);
+ $maxDays = \OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7');
+ $maxDate->add(new \DateInterval('P' . $maxDays . 'D'));
+ if ($date > $maxDate) {
+ $warning = 'Cannot set expiration date. Shares cannot expire later than ' . $maxDays . ' after they have been shared';
+ $warning_t = $l->t('Cannot set expiration date. Shares cannot expire later than %s after they have been shared', array($maxDays));
+ \OCP\Util::writeLog('OCP\Share', $warning, \OCP\Util::WARN);
+ throw new \Exception($warning_t);
+ }
+ }
+
+ if ($date < $today) {
+ $message = 'Cannot set expiration date. Expiration date is in the past';
+ $message_t = $l->t('Cannot set expiration date. Expiration date is in the past');
+ \OCP\Util::writeLog('OCP\Share', $message, \OCP\Util::WARN);
+ throw new \Exception($message_t);
+ }
+
+ return $date;
+ }
+
+ /**
* Set expiration date for a share
* @param string $itemType
* @param string $itemSource
* @param string $date expiration date
+ * @param int $shareTime timestamp from when the file was shared
+ * @throws \Exception
* @return boolean
*/
- public static function setExpirationDate($itemType, $itemSource, $date) {
+ public static function setExpirationDate($itemType, $itemSource, $date, $shareTime = null) {
$user = \OC_User::getUser();
if ($date == '') {
$date = null;
} else {
- $date = new \DateTime($date);
+ $date = self::validateExpireDate($date, $shareTime, $itemType, $itemSource);
}
$query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `expiration` = ? WHERE `item_type` = ? AND `item_source` = ? AND `uid_owner` = ? AND `share_type` = ?');
$query->bindValue(1, $date, 'datetime');
@@ -954,11 +1005,10 @@ class Share extends \OC\Share\Constants {
'date' => $date,
'uidOwner' => $user
));
-
+
return true;
+ }
- }
-
/**
* Checks whether a share has expired, calls unshareItem() if yes.
* @param array $item Share data (usually database row)
@@ -968,10 +1018,10 @@ class Share extends \OC\Share\Constants {
$result = false;
- // only use default expire date for link shares
+ // only use default expiration date for link shares
if ((int) $item['share_type'] === self::SHARE_TYPE_LINK) {
- // calculate expire date
+ // calculate expiration date
if (!empty($item['expiration'])) {
$userDefinedExpire = new \DateTime($item['expiration']);
$expires = $userDefinedExpire->getTimestamp();
@@ -980,7 +1030,7 @@ class Share extends \OC\Share\Constants {
}
- // get default expire settings
+ // get default expiration settings
$defaultSettings = Helper::getDefaultExpireSetting();
$expires = Helper::calculateExpireDate($defaultSettings, $item['stime'], $expires);
@@ -1064,7 +1114,7 @@ class Share extends \OC\Share\Constants {
*
* Resharing is allowed by default if not configured
*/
- private static function isResharingAllowed() {
+ public static function isResharingAllowed() {
if (!isset(self::$isResharingAllowed)) {
if (\OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes') == 'yes') {
self::$isResharingAllowed = true;
@@ -1338,7 +1388,8 @@ class Share extends \OC\Share\Constants {
}
if ($mounts[$row['storage']]) {
$path = $mounts[$row['storage']]->getMountPoint().$row['path'];
- $row['path'] = substr($path, $root);
+ $relPath = substr($path, $root); // path relative to data/user
+ $row['path'] = rtrim($relPath, '/');
}
}
}
@@ -1348,7 +1399,7 @@ class Share extends \OC\Share\Constants {
}
}
// Check if resharing is allowed, if not remove share permission
- if (isset($row['permissions']) && !self::isResharingAllowed()) {
+ if (isset($row['permissions']) && (!self::isResharingAllowed() | \OC_Util::isSharingDisabledForUser())) {
$row['permissions'] &= ~\OCP\PERMISSION_SHARE;
}
// Add display names to result
diff --git a/lib/private/updater.php b/lib/private/updater.php
index d50c2554c75..7acd6446ec4 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -212,8 +212,6 @@ class Updater extends BasicEmitter {
\OC_DB::updateDbFromStructure(\OC::$SERVERROOT . '/db_structure.xml');
$this->emit('\OC\Updater', 'dbUpgrade');
- // TODO: why not do this at the end ?
- \OC_Config::setValue('version', implode('.', \OC_Util::getVersion()));
$disabledApps = \OC_App::checkAppsRequirements();
if (!empty($disabledApps)) {
$this->emit('\OC\Updater', 'disabledApps', array($disabledApps));
@@ -227,6 +225,9 @@ class Updater extends BasicEmitter {
//Invalidate update feed
\OC_Appconfig::setValue('core', 'lastupdatedat', 0);
+
+ // only set the final version if everything went well
+ \OC_Config::setValue('version', implode('.', \OC_Util::getVersion()));
}
}
}
diff --git a/lib/private/user.php b/lib/private/user.php
index a8431af97fd..5efe205ced9 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -337,7 +337,7 @@ class OC_User {
* Checks if the user is logged in
*/
public static function isLoggedIn() {
- if (\OC::$session->get('user_id') && self::$incognitoMode === false) {
+ if (\OC::$session->get('user_id') !== null && self::$incognitoMode === false) {
return self::userExists(\OC::$session->get('user_id'));
}
return false;
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index 8c9b3e264e3..6abf8fb80d2 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -106,7 +106,7 @@ class Session implements IUserSession, Emitter {
return $this->activeUser;
} else {
$uid = $this->session->get('user_id');
- if ($uid) {
+ if ($uid !== null) {
$this->activeUser = $this->manager->get($uid);
return $this->activeUser;
} else {
diff --git a/lib/private/user/user.php b/lib/private/user/user.php
index f9c2cb4d130..993fb4c0c64 100644
--- a/lib/private/user/user.php
+++ b/lib/private/user/user.php
@@ -156,7 +156,7 @@ class User implements IUser {
* @param string $recoveryPassword for the encryption app to reset encryption keys
* @return bool
*/
- public function setPassword($password, $recoveryPassword) {
+ public function setPassword($password, $recoveryPassword = null) {
if ($this->emitter) {
$this->emitter->emit('\OC\User', 'preSetPassword', array($this, $password, $recoveryPassword));
}
diff --git a/lib/private/util.php b/lib/private/util.php
index eea194288f9..be4aac69564 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -22,7 +22,7 @@ class OC_Util {
self::$rootMounted = true;
}
}
-
+
/**
* mounting an object storage as the root fs will in essence remove the
* necessity of a data folder being present.
@@ -50,7 +50,7 @@ class OC_Util {
self::$rootMounted = true;
}
}
-
+
/**
* Can be set up
* @param string $user
@@ -171,6 +171,21 @@ class OC_Util {
}
/**
+ * check if share API enforces a default expire date
+ * @return boolean
+ */
+ public static function isDefaultExpireDateEnforced() {
+ $isDefaultExpireDateEnabled = \OCP\Config::getAppValue('core', 'shareapi_default_expire_date', 'no');
+ $enforceDefaultExpireDate = false;
+ if ($isDefaultExpireDateEnabled === 'yes') {
+ $value = \OCP\Config::getAppValue('core', 'shareapi_enforce_expire_date', 'no');
+ $enforceDefaultExpireDate = ($value === 'yes') ? true : false;
+ }
+
+ return $enforceDefaultExpireDate;
+ }
+
+ /**
* Get the quota of a user
* @param string $user
* @return int Quota bytes
@@ -1217,11 +1232,16 @@ class OC_Util {
/**
* @Brief Get file content via curl.
* @param string $url Url to get content
+ * @throws Exception If the URL does not start with http:// or https://
* @return string of the response or false on error
* This function get the content of a page via curl, if curl is enabled.
* If not, file_get_contents is used.
*/
public static function getUrlContent($url) {
+ if (strpos($url, 'http://') !== 0 && strpos($url, 'https://') !== 0) {
+ throw new Exception('$url must start with https:// or http://', 1);
+ }
+
if (function_exists('curl_init')) {
$curl = curl_init();
$max_redirects = 10;
@@ -1447,4 +1467,11 @@ class OC_Util {
return false;
}
}
+
+ /**
+ * @return string
+ */
+ public static function isPhpCharSetUtf8() {
+ return ini_get('default_charset') === 'UTF-8';
+ }
}
diff --git a/lib/public/appframework/http/templateresponse.php b/lib/public/appframework/http/templateresponse.php
index 02589f4e2a4..c74d3b60254 100644
--- a/lib/public/appframework/http/templateresponse.php
+++ b/lib/public/appframework/http/templateresponse.php
@@ -134,8 +134,10 @@ class TemplateResponse extends Response {
* @return string the rendered html
*/
public function render(){
+ // \OCP\Template needs an empty string instead of 'blank' for an unwrapped response
+ $renderAs = $this->renderAs === 'blank' ? '' : $this->renderAs;
- $template = new \OCP\Template($this->appName, $this->templateName, $this->renderAs);
+ $template = new \OCP\Template($this->appName, $this->templateName, $renderAs);
foreach($this->params as $key => $value){
$template->assign($key, $value);
diff --git a/lib/public/defaults.php b/lib/public/defaults.php
index 34b68903ee8..9af31245ff4 100644
--- a/lib/public/defaults.php
+++ b/lib/public/defaults.php
@@ -66,6 +66,22 @@ class Defaults {
}
/**
+ * link to the iOS client
+ * @return string
+ */
+ public function getiOSClientUrl() {
+ return $this->defaults->getiOSClientUrl();
+ }
+
+ /**
+ * link to the Android client
+ * @return string
+ */
+ public function getAndroidClientUrl() {
+ return $this->defaults->getAndroidClientUrl();
+ }
+
+ /**
* base URL to the documentation of your ownCloud instance
* @return string
*/
diff --git a/lib/public/igroup.php b/lib/public/igroup.php
new file mode 100644
index 00000000000..392ac5d92b9
--- /dev/null
+++ b/lib/public/igroup.php
@@ -0,0 +1,81 @@
+<?php
+
+/**
+ * Copyright (c) 2014 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 OCP;
+
+interface IGroup {
+ /**
+ * @return string
+ */
+ public function getGID();
+
+ /**
+ * get all users in the group
+ *
+ * @return \OCP\IUser[]
+ */
+ public function getUsers();
+
+ /**
+ * check if a user is in the group
+ *
+ * @param \OCP\IUser $user
+ * @return bool
+ */
+ public function inGroup($user);
+
+ /**
+ * add a user to the group
+ *
+ * @param \OCP\IUser $user
+ */
+ public function addUser($user);
+
+ /**
+ * remove a user from the group
+ *
+ * @param \OCP\IUser $user
+ */
+ public function removeUser($user);
+
+ /**
+ * search for users in the group by userid
+ *
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
+ * @return \OCP\IUser[]
+ */
+ public function searchUsers($search, $limit = null, $offset = null);
+
+ /**
+ * returns the number of users matching the search string
+ *
+ * @param string $search
+ * @return int|bool
+ */
+ public function count($search = '');
+
+ /**
+ * search for users in the group by displayname
+ *
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
+ * @return \OCP\IUser[]
+ */
+ public function searchDisplayName($search, $limit = null, $offset = null);
+
+ /**
+ * delete the group
+ *
+ * @return bool
+ */
+ public function delete();
+}
diff --git a/lib/public/igroupmanager.php b/lib/public/igroupmanager.php
new file mode 100644
index 00000000000..dc69044c490
--- /dev/null
+++ b/lib/public/igroupmanager.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * Copyright (c) 2014 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 OCP;
+
+/**
+ * Class Manager
+ *
+ * Hooks available in scope \OC\Group:
+ * - preAddUser(\OC\Group\Group $group, \OC\User\User $user)
+ * - postAddUser(\OC\Group\Group $group, \OC\User\User $user)
+ * - preRemoveUser(\OC\Group\Group $group, \OC\User\User $user)
+ * - postRemoveUser(\OC\Group\Group $group, \OC\User\User $user)
+ * - preDelete(\OC\Group\Group $group)
+ * - postDelete(\OC\Group\Group $group)
+ * - preCreate(string $groupId)
+ * - postCreate(\OC\Group\Group $group)
+ *
+ * @package OC\Group
+ */
+interface IGroupManager {
+ /**
+ * @param \OCP\UserInterface $backend
+ */
+ public function addBackend($backend);
+
+ public function clearBackends();
+
+ /**
+ * @param string $gid
+ * @return \OCP\IGroup
+ */
+ public function get($gid);
+
+ /**
+ * @param string $gid
+ * @return bool
+ */
+ public function groupExists($gid);
+
+ /**
+ * @param string $gid
+ * @return \OCP\IGroup
+ */
+ public function createGroup($gid);
+
+ /**
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
+ * @return \OCP\IGroup[]
+ */
+ public function search($search, $limit = null, $offset = null);
+
+ /**
+ * @param \OCP\IUser $user
+ * @return \OCP\IGroup[]
+ */
+ public function getUserGroups($user);
+
+ /**
+ * @param \OCP\IUser $user
+ * @return array with group names
+ */
+ public function getUserGroupIds($user);
+
+ /**
+ * get a list of all display names in a group
+ *
+ * @param string $gid
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
+ * @return array an array of display names (value) and user ids (key)
+ */
+ public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0);
+}
diff --git a/lib/public/ipreview.php b/lib/public/ipreview.php
index f74472ad368..cc756ef80d3 100644
--- a/lib/public/ipreview.php
+++ b/lib/public/ipreview.php
@@ -57,4 +57,11 @@ interface IPreview
*/
function isMimeSupported($mimeType = '*');
+ /**
+ * Check if a preview can be generated for a file
+ *
+ * @param \OCP\Files\FileInfo $file
+ * @return bool
+ */
+ function isAvailable($file);
}
diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php
index f3dbc18322e..9c39ac7ae73 100644
--- a/lib/public/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -100,6 +100,13 @@ interface IServerContainer {
function getUserManager();
/**
+ * Returns a group manager
+ *
+ * @return \OCP\IGroupManager
+ */
+ function getGroupManager();
+
+ /**
* Returns the user session
*
* @return \OCP\IUserSession
diff --git a/lib/public/iuser.php b/lib/public/iuser.php
index dc4acc7658f..c15edcd14dd 100644
--- a/lib/public/iuser.php
+++ b/lib/public/iuser.php
@@ -18,14 +18,14 @@ interface IUser {
public function getUID();
/**
- * get the displayname for the user, if no specific displayname is set it will fallback to the user id
+ * get the display name for the user, if no specific display name is set it will fallback to the user id
*
* @return string
*/
public function getDisplayName();
/**
- * set the displayname for the user
+ * set the display name for the user
*
* @param string $displayName
* @return bool
@@ -59,7 +59,7 @@ interface IUser {
* @param string $recoveryPassword for the encryption app to reset encryption keys
* @return bool
*/
- public function setPassword($password, $recoveryPassword);
+ public function setPassword($password, $recoveryPassword = null);
/**
* get the users home folder to mount
diff --git a/lib/public/share.php b/lib/public/share.php
index 8566a38c61e..e6519dd3e3a 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -298,10 +298,11 @@ class Share extends \OC\Share\Constants {
* @param string $itemType
* @param string $itemSource
* @param string $date expiration date
+ * @param int $shareTime timestamp from when the file was shared
* @return boolean
*/
- public static function setExpirationDate($itemType, $itemSource, $date) {
- return \OC\Share\Share::setExpirationDate($itemType, $itemSource, $date);
+ public static function setExpirationDate($itemType, $itemSource, $date, $shareTime = null) {
+ return \OC\Share\Share::setExpirationDate($itemType, $itemSource, $date, $shareTime);
}
/**
@@ -329,6 +330,15 @@ class Share extends \OC\Share\Constants {
public static function checkPasswordProtectedShare(array $linkItem) {
return \OC\Share\Share::checkPasswordProtectedShare($linkItem);
}
+
+ /**
+ * Check if resharing is allowed
+ *
+ * @return boolean true if allowed or false
+ */
+ public static function isResharingAllowed() {
+ return \OC\Share\Share::isResharingAllowed();
+ }
}
/**
diff --git a/lib/public/util.php b/lib/public/util.php
index 8f4691eeade..87b7a4f19db 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -128,10 +128,11 @@ class Util {
/**
* get l10n object
* @param string $application
+ * @param string|null $language
* @return \OC_L10N
*/
- public static function getL10N( $application ) {
- return \OC_L10N::get( $application );
+ public static function getL10N($application, $language = null) {
+ return \OC_L10N::get($application, $language);
}
/**
@@ -518,6 +519,15 @@ class Util {
}
/**
+ * check if share API enforces a default expire date
+ * @return boolean
+ */
+ public static function isDefaultExpireDateEnforced() {
+ return \OC_Util::isDefaultExpireDateEnforced();
+ }
+
+
+ /**
* Checks whether the current version needs upgrade.
*
* @return bool true if upgrade is needed, false otherwise
diff --git a/lib/repair/innodb.php b/lib/repair/innodb.php
index 6f7fcfcd4c9..6b795a749e9 100644
--- a/lib/repair/innodb.php
+++ b/lib/repair/innodb.php
@@ -43,7 +43,7 @@ class InnoDB extends BasicEmitter implements \OC\RepairStep {
private function getAllMyIsamTables($connection) {
$dbName = \OC::$server->getConfig()->getSystemValue("dbname");
$result = $connection->fetchArray(
- "SELECT table_name FROM information_schema.tables WHERE table_schema = ? AND engine = 'MyISAM'",
+ "SELECT table_name FROM information_schema.tables WHERE table_schema = ? AND engine = 'MyISAM' AND TABLE_NAME LIKE \"*PREFIX*%\"",
array($dbName)
);