summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php48
-rw-r--r--lib/l10n/ca.php1
-rw-r--r--lib/l10n/cs_CZ.php1
-rw-r--r--lib/l10n/da.php1
-rw-r--r--lib/l10n/de.php2
-rw-r--r--lib/l10n/de_CH.php1
-rw-r--r--lib/l10n/de_DE.php2
-rw-r--r--lib/l10n/el.php3
-rw-r--r--lib/l10n/en_GB.php2
-rw-r--r--lib/l10n/es.php1
-rw-r--r--lib/l10n/es_AR.php1
-rw-r--r--lib/l10n/et_EE.php2
-rw-r--r--lib/l10n/eu.php1
-rw-r--r--lib/l10n/fr.php1
-rw-r--r--lib/l10n/gl.php2
-rw-r--r--lib/l10n/hu_HU.php1
-rw-r--r--lib/l10n/it.php2
-rw-r--r--lib/l10n/ja_JP.php1
-rw-r--r--lib/l10n/ko.php1
-rw-r--r--lib/l10n/lb.php4
-rw-r--r--lib/l10n/lt_LT.php1
-rw-r--r--lib/l10n/lv.php1
-rw-r--r--lib/l10n/nl.php1
-rw-r--r--lib/l10n/pl.php1
-rw-r--r--lib/l10n/pt_BR.php2
-rw-r--r--lib/l10n/pt_PT.php2
-rw-r--r--lib/l10n/ru.php2
-rw-r--r--lib/l10n/ru_RU.php1
-rw-r--r--lib/l10n/sk_SK.php25
-rw-r--r--lib/l10n/sl.php21
-rw-r--r--lib/l10n/sv.php1
-rw-r--r--lib/l10n/tr.php2
-rw-r--r--lib/l10n/tzm.php8
-rw-r--r--lib/l10n/uz.php8
-rw-r--r--lib/l10n/zh_TW.php1
-rw-r--r--lib/private/api.php71
-rw-r--r--lib/private/avatar.php8
-rw-r--r--lib/private/avatarmanager.php26
-rw-r--r--lib/private/backgroundjob/joblist.php2
-rw-r--r--lib/private/connector/sabre/file.php28
-rw-r--r--lib/private/connector/sabre/filesplugin.php30
-rw-r--r--lib/private/connector/sabre/node.php2
-rw-r--r--lib/private/db/adaptersqlsrv.php7
-rw-r--r--lib/private/db/mdb2schemareader.php7
-rw-r--r--lib/private/files.php14
-rw-r--r--lib/private/files/cache/cache.php3
-rw-r--r--lib/private/files/cache/homecache.php53
-rw-r--r--lib/private/files/cache/scanner.php24
-rw-r--r--lib/private/files/cache/updater.php2
-rw-r--r--lib/private/files/cache/watcher.php9
-rw-r--r--lib/private/files/filesystem.php40
-rw-r--r--lib/private/files/storage/common.php49
-rw-r--r--lib/private/files/storage/commontest.php2
-rw-r--r--lib/private/files/storage/home.php43
-rw-r--r--lib/private/files/storage/local.php8
-rw-r--r--lib/private/files/storage/mappedlocal.php8
-rw-r--r--lib/private/files/view.php6
-rw-r--r--lib/private/helper.php9
-rw-r--r--lib/private/installer.php9
-rw-r--r--lib/private/preview/image.php4
-rw-r--r--lib/private/preview/movies.php63
-rw-r--r--lib/private/preview/mp3.php6
-rw-r--r--lib/private/preview/office-cl.php3
-rw-r--r--lib/private/preview/office-fallback.php3
-rwxr-xr-xlib/private/request.php16
-rw-r--r--lib/private/server.php12
-rw-r--r--lib/private/setup.php17
-rw-r--r--lib/private/updater.php1
-rw-r--r--lib/private/user.php14
-rw-r--r--lib/private/user/session.php5
-rwxr-xr-xlib/private/util.php45
-rw-r--r--lib/public/iavatar.php38
-rw-r--r--lib/public/iavatarmanager.php23
-rw-r--r--lib/public/iservercontainer.php6
-rw-r--r--lib/public/share.php2
75 files changed, 657 insertions, 216 deletions
diff --git a/lib/base.php b/lib/base.php
index 47064c103e7..187cedf9422 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -178,11 +178,19 @@ class OC {
if (file_exists(OC::$SERVERROOT . "/config/config.php")
and !is_writable(OC::$SERVERROOT . "/config/config.php")) {
$defaults = new OC_Defaults();
- OC_Template::printErrorPage(
- "Can't write into config directory!",
- 'This can usually be fixed by '
- .'<a href="' . link_to_docs('admin-dir_permissions') . '" target="_blank">giving the webserver write access to the config directory</a>.'
- );
+ if (self::$CLI) {
+ echo "Can't write into config directory!\n";
+ echo "This can usually be fixed by giving the webserver write access to the config directory\n";
+ echo "\n";
+ echo "See " . \OC_Helper::linkToDocs('admin-dir_permissions') . "\n";
+ exit;
+ } else {
+ OC_Template::printErrorPage(
+ "Can't write into config directory!",
+ 'This can usually be fixed by '
+ .'<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">giving the webserver write access to the config directory</a>.'
+ );
+ }
}
}
@@ -241,7 +249,7 @@ class OC {
$minimizerCSS->clearCache();
$minimizerJS = new OC_Minimizer_JS();
$minimizerJS->clearCache();
- OC_Util::addscript('update');
+ OC_Util::addScript('update');
$tmpl = new OC_Template('', 'update.admin', 'guest');
$tmpl->assign('version', OC_Util::getVersionString());
$tmpl->printPage();
@@ -308,14 +316,9 @@ class OC {
self::$session = new \OC\Session\Internal(OC_Util::getInstanceId());
// if session cant be started break with http 500 error
} catch (Exception $e) {
- OC_Log::write('core', 'Session could not be initialized. Exception message: '.$e->getMessage(),
- OC_Log::ERROR);
- header('HTTP/1.1 500 Internal Server Error');
- OC_Util::addStyle("styles");
- $error = 'Session could not be initialized. Please contact your ';
- $error .= 'system administrator.';
-
- OC_Template::printErrorPage($error);
+ //show the user a detailed error page
+ OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
+ OC_Template::printExceptionErrorPage($e);
}
$sessionLifeTime = self::getSessionLifeTime();
@@ -485,7 +488,14 @@ class OC {
$errors = OC_Util::checkServer();
if (count($errors) > 0) {
- OC_Template::printGuestPage('', 'error', array('errors' => $errors));
+ if (self::$CLI) {
+ foreach ($errors as $error) {
+ echo $error['error']."\n";
+ echo $error['hint'] . "\n\n";
+ }
+ } else {
+ OC_Template::printGuestPage('', 'error', array('errors' => $errors));
+ }
exit;
}
@@ -564,12 +574,6 @@ class OC {
}
}
- // write error into log if locale can't be set
- if (OC_Util::isSetLocaleWorking() == false) {
- OC_Log::write('core',
- 'setting locale to en_US.UTF-8/en_US.UTF8 failed. Support is probably not installed on your system',
- OC_Log::ERROR);
- }
if (OC_Config::getValue('installed', false) && !self::checkUpgrade(false)) {
if (OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') {
OC_Util::addScript('backgroundjobs');
@@ -624,6 +628,8 @@ class OC {
public static function registerPreviewHooks() {
OC_Hook::connect('OC_Filesystem', 'post_write', 'OC\Preview', 'post_write');
OC_Hook::connect('OC_Filesystem', 'delete', 'OC\Preview', 'post_delete');
+ OC_Hook::connect('\OCP\Versions', 'delete', 'OC\Preview', 'post_delete');
+ OC_Hook::connect('\OCP\Trashbin', 'delete', 'OC\Preview', 'post_delete');
}
/**
diff --git a/lib/l10n/ca.php b/lib/l10n/ca.php
index f0cbe6a5a07..01457275cf2 100644
--- a/lib/l10n/ca.php
+++ b/lib/l10n/ca.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Els fitxers s'han de baixar d'un en un.",
"Back to Files" => "Torna a Fitxers",
"Selected files too large to generate zip file." => "Els fitxers seleccionats son massa grans per generar un fitxer zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Baixeu els fitxers en trossos petits, de forma separada, o pregunteu a l'administrador.",
"No source specified when installing app" => "No heu especificat la font en instalยทlar l'aplicaciรณ",
"No href specified when installing app from http" => "No heu especificat href en instalยทlar l'aplicaciรณ des de http",
"No path specified when installing app from local file" => "No heu seleccionat el camรญ en instalยทlar una aplicaciรณ des d'un fitxer local",
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index 0b09997ee2f..0e44dd2a4bd 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Soubory musรญ bรฝt stahovรกny jednotlivฤ›.",
"Back to Files" => "Zpฤ›t k souborลฏm",
"Selected files too large to generate zip file." => "Vybranรฉ soubory jsou pล™รญliลก velkรฉ pro vytvoล™enรญ ZIP souboru.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Stรกhnฤ›te soubory po menลกรญch ฤรกstech, samostatnฤ›, nebo se obraลฅte na sprรกvce.",
"No source specified when installing app" => "Nebyl zadรกn zdroj pล™i instalaci aplikace",
"No href specified when installing app from http" => "Nebyl zadรกn odkaz pro instalaci aplikace z HTTP",
"No path specified when installing app from local file" => "Nebyla zadรกna cesta pro instalaci aplikace z mรญstnรญho souboru",
diff --git a/lib/l10n/da.php b/lib/l10n/da.php
index bf233e0338d..f95aa30d7a0 100644
--- a/lib/l10n/da.php
+++ b/lib/l10n/da.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Filer skal downloades en for en.",
"Back to Files" => "Tilbage til Filer",
"Selected files too large to generate zip file." => "De markerede filer er for store til at generere en ZIP-fil.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Download filerne i smรฅ bider, seperat, eller kontakt venligst din administrator.",
"No source specified when installing app" => "Ingen kilde angivet under installation af app",
"No href specified when installing app from http" => "Ingen href angivet under installation af app via http",
"No path specified when installing app from local file" => "Ingen sti angivet under installation af app fra lokal fil",
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index 84543fa75d2..5b09d350a7d 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Die Dateien mรผssen einzeln heruntergeladen werden.",
"Back to Files" => "Zurรผck zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewรคhlten Dateien sind zu groรŸ, um eine ZIP-Datei zu erstellen.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Lade die Dateien in kleineren, separaten, Stรผcken herunter oder bitte deinen Administrator.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Bitte lade die Dateien einzeln in kleineren Teilen herunter oder bitte Deinen Administrator.",
"No source specified when installing app" => "Fรผr die Installation der Applikation wurde keine Quelle angegeben",
"No href specified when installing app from http" => "Der Link (href) wurde nicht angegeben um die Applikation per http zu installieren",
"No path specified when installing app from local file" => "Bei der Installation der Applikation aus einer lokalen Datei wurde kein Pfad angegeben",
diff --git a/lib/l10n/de_CH.php b/lib/l10n/de_CH.php
index c4f06520b50..502791ff578 100644
--- a/lib/l10n/de_CH.php
+++ b/lib/l10n/de_CH.php
@@ -14,7 +14,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Die Dateien mรผssen einzeln heruntergeladen werden.",
"Back to Files" => "Zurรผck zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewรคhlten Dateien sind zu gross, um eine ZIP-Datei zu erstellen.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laden Sie die Dateien in kleineren, separaten, Stรผcken herunter oder bitten Sie Ihren Administrator.",
"App can't be installed because of not allowed code in the App" => "Anwendung kann wegen nicht erlaubten Codes nicht installiert werden",
"App directory already exists" => "Anwendungsverzeichnis existiert bereits",
"Application is not enabled" => "Die Anwendung ist nicht aktiviert",
diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php
index a84b954eb44..e76718b4117 100644
--- a/lib/l10n/de_DE.php
+++ b/lib/l10n/de_DE.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Die Dateien mรผssen einzeln heruntergeladen werden.",
"Back to Files" => "Zurรผck zu \"Dateien\"",
"Selected files too large to generate zip file." => "Die gewรคhlten Dateien sind zu groรŸ, um eine ZIP-Datei zu erstellen.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laden Sie die Dateien in kleineren, separaten, Stรผcken herunter oder bitten Sie Ihren Administrator.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Bitte laden Sie die Dateien einzeln in kleineren Teilen herunter oder bitten Sie Ihren Administrator.",
"No source specified when installing app" => "Fรผr die Installation der Applikation wurde keine Quelle angegeben",
"No href specified when installing app from http" => "Der Link (href) wurde nicht angegeben um die Applikation per http zu installieren",
"No path specified when installing app from local file" => "Bei der Installation der Applikation aus einer lokalen Datei wurde kein Pfad angegeben",
diff --git a/lib/l10n/el.php b/lib/l10n/el.php
index aed5e052a8e..d536b699a9e 100644
--- a/lib/l10n/el.php
+++ b/lib/l10n/el.php
@@ -14,7 +14,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ฮคฮฑ ฮฑฯฯ‡ฮตฮฏฮฑ ฯ€ฯฮญฯ€ฮตฮน ฮฝฮฑ ฮปฮทฯ†ฮธฮฟฯฮฝ ฮญฮฝฮฑ-ฮญฮฝฮฑ.",
"Back to Files" => "ฮ ฮฏฯƒฯ‰ ฯƒฯ„ฮฑ ฮ‘ฯฯ‡ฮตฮฏฮฑ",
"Selected files too large to generate zip file." => "ฮคฮฑ ฮตฯ€ฮนฮปฮตฮณฮผฮญฮฝฮฑ ฮฑฯฯ‡ฮตฮฏฮฑ ฮตฮฏฮฝฮฑฮน ฮผฮตฮณฮฌฮปฮฑ ฯŽฯƒฯ„ฮต ฮฝฮฑ ฮดฮทฮผฮนฮฟฯ…ฯฮณฮทฮธฮตฮฏ ฮฑฯฯ‡ฮตฮฏฮฟ zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "ฮ›ฮฎฯˆฮท ฯ„ฯ‰ฮฝ ฮฑฯฯ‡ฮตฮฏฯ‰ฮฝ ฯƒฮต ฮผฮนฮบฯฯŒฯ„ฮตฯฮฑ ฮบฮฟฮผฮผฮฌฯ„ฮนฮฑ, ฯ‡ฯ‰ฯฮนฯƒฯ„ฮฌ ฮฎ ฯฯ‰ฯ„ฮฎฯƒฯ„ฮต ฯ„ฮฟฮฝ ฮดฮนฮฑฯ‡ฮตฮนฯฮนฯƒฯ„ฮฎ ฯƒฮฑฯ‚.",
"Application is not enabled" => "ฮ”ฮตฮฝ ฮตฮฝฮตฯฮณฮฟฯ€ฮฟฮนฮฎฮธฮทฮบฮต ฮท ฮตฯ†ฮฑฯฮผฮฟฮณฮฎ",
"Authentication error" => "ฮฃฯ†ฮฌฮปฮผฮฑ ฯ€ฮนฯƒฯ„ฮฟฯ€ฮฟฮฏฮทฯƒฮทฯ‚",
"Token expired. Please reload page." => "ฮคฮฟ ฮฑฮฝฮฑฮณฮฝฯ‰ฯฮนฯƒฯ„ฮนฮบฯŒ ฮญฮปฮทฮพฮต. ฮ ฮฑฯฮฑฮบฮฑฮปฯŽ ฯ†ฮฟฯฯ„ฯŽฯƒฯ„ฮต ฮพฮฑฮฝฮฌ ฯ„ฮทฮฝ ฯƒฮตฮปฮฏฮดฮฑ.",
@@ -43,7 +42,7 @@ $TRANSLATIONS = array(
"Please double check the <a href='%s'>installation guides</a>." => "ฮ•ฮปฮญฮณฮพฯ„ฮต ฮพฮฑฮฝฮฌ ฯ„ฮนฯ‚ <a href='%s'>ฮฟฮดฮทฮณฮฏฮตฯ‚ ฮตฮณฮบฮฑฯ„ฮฌฯƒฯ„ฮฑฯƒฮทฯ‚</a>.",
"Could not find category \"%s\"" => "ฮ‘ฮดฯ…ฮฝฮฑฮผฮฏฮฑ ฮตฯฯฮตฯƒฮทฯ‚ ฮบฮฑฯ„ฮทฮณฮฟฯฮฏฮฑฯ‚ \"%s\"",
"seconds ago" => "ฮดฮตฯ…ฯ„ฮตฯฯŒฮปฮตฯ€ฯ„ฮฑ ฯ€ฯฮนฮฝ",
-"_%n minute ago_::_%n minutes ago_" => array("",""),
+"_%n minute ago_::_%n minutes ago_" => array("","%n ฮปฮตฯ€ฯ„ฮฌ ฯ€ฯฮนฮฝ"),
"_%n hour ago_::_%n hours ago_" => array("",""),
"today" => "ฯƒฮฎฮผฮตฯฮฑ",
"yesterday" => "ฯ‡ฯ„ฮตฯ‚",
diff --git a/lib/l10n/en_GB.php b/lib/l10n/en_GB.php
index 73697d101c1..295700d234a 100644
--- a/lib/l10n/en_GB.php
+++ b/lib/l10n/en_GB.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Files need to be downloaded one by one.",
"Back to Files" => "Back to Files",
"Selected files too large to generate zip file." => "Selected files too large to generate zip file.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Download the files in smaller chunks, seperately or kindly ask your administrator.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Please download the files separately in smaller chunks or kindly ask your administrator.",
"No source specified when installing app" => "No source specified when installing app",
"No href specified when installing app from http" => "No href specified when installing app from http",
"No path specified when installing app from local file" => "No path specified when installing app from local file",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index 7e56e31aeaf..8e79c9f1059 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Los archivos deben ser descargados uno por uno.",
"Back to Files" => "Volver a Archivos",
"Selected files too large to generate zip file." => "Los archivos seleccionados son demasiado grandes para generar el archivo zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descargue los archivos en trozos mรกs pequeรฑos, por separado o solicรญtelos amablemente su administrador.",
"No source specified when installing app" => "No se ha especificado origen cuando se ha instalado la aplicaciรณn",
"No href specified when installing app from http" => "No href especificado cuando se ha instalado la aplicaciรณn",
"No path specified when installing app from local file" => "Sin path especificado cuando se ha instalado la aplicaciรณn desde el fichero local",
diff --git a/lib/l10n/es_AR.php b/lib/l10n/es_AR.php
index 4e65755ba87..e2c771d47ad 100644
--- a/lib/l10n/es_AR.php
+++ b/lib/l10n/es_AR.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Los archivos deben ser descargados de a uno.",
"Back to Files" => "Volver a Archivos",
"Selected files too large to generate zip file." => "Los archivos seleccionados son demasiado grandes para generar el archivo zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descargรก los archivos en partes mรกs chicas, de forma separada, o pedรญselos al administrador",
"No source specified when installing app" => "No se especificรณ el origen al instalar la app",
"No href specified when installing app from http" => "No se especificรณ href al instalar la app",
"No path specified when installing app from local file" => "No se especificรณ PATH al instalar la app desde el archivo local",
diff --git a/lib/l10n/et_EE.php b/lib/l10n/et_EE.php
index e307979fa74..7340ee72c28 100644
--- a/lib/l10n/et_EE.php
+++ b/lib/l10n/et_EE.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Failid tuleb alla laadida รผkshaaval.",
"Back to Files" => "Tagasi failide juurde",
"Selected files too large to generate zip file." => "Valitud failid on ZIP-faili loomiseks liiga suured.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Laadi failid alla eraldi vรคiksemate osadena vรตi kรผsi nรตu oma sรผsteemiadminstraatorilt.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Palun laadi failid alla eraldi vรคiksemate osadena vรตi palu abi oma sรผsteemihaldurilt.",
"No source specified when installing app" => "รœhegi lรคhteallikat pole rakendi paigalduseks mรครคratletud",
"No href specified when installing app from http" => "รœhtegi aadressi pole mรครคratletud rakendi paigalduseks veebist",
"No path specified when installing app from local file" => "รœhtegi teed pole mรครคratletud paigaldamaks rakendit kohalikust failist",
diff --git a/lib/l10n/eu.php b/lib/l10n/eu.php
index 9758fdd1f32..f28a77eeb03 100644
--- a/lib/l10n/eu.php
+++ b/lib/l10n/eu.php
@@ -12,7 +12,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Fitxategiak banan-banan deskargatu behar dira.",
"Back to Files" => "Itzuli fitxategietara",
"Selected files too large to generate zip file." => "Hautatuko fitxategiak oso handiak dira zip fitxategia sortzeko.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Deskargatu fitzategiak zati txikiagoetan, banan-banan edo eskatu mesedez zure administradoreari",
"Application is not enabled" => "Aplikazioa ez dago gaituta",
"Authentication error" => "Autentifikazio errorea",
"Token expired. Please reload page." => "Tokena iraungitu da. Mesedez birkargatu orria.",
diff --git a/lib/l10n/fr.php b/lib/l10n/fr.php
index 895daa5b452..c9767565b18 100644
--- a/lib/l10n/fr.php
+++ b/lib/l10n/fr.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Les fichiers nรฉcessitent d'รชtre tรฉlรฉchargรฉs un par un.",
"Back to Files" => "Retour aux Fichiers",
"Selected files too large to generate zip file." => "Les fichiers sรฉlectionnรฉs sont trop volumineux pour รชtre compressรฉs.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Tรฉlรฉcharger les fichiers en parties plus petites, sรฉparรฉment ou demander avec bienveillance ร  votre administrateur.",
"No source specified when installing app" => "Aucune source spรฉcifiรฉe pour installer l'application",
"No href specified when installing app from http" => "Aucun href spรฉcifiรฉ pour installer l'application par http",
"No path specified when installing app from local file" => "Aucun chemin spรฉcifiรฉ pour installer l'application depuis un fichier local",
diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php
index 72ee66b6f57..cf13408b2cd 100644
--- a/lib/l10n/gl.php
+++ b/lib/l10n/gl.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Os ficheiros necesitan seren descargados dun en un.",
"Back to Files" => "Volver aos ficheiros",
"Selected files too large to generate zip file." => "Os ficheiros seleccionados son demasiado grandes como para xerar un ficheiro zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descargue os ficheiros en cachos mรกis pequenos e por separado, ou pรญdallos amabelmente ao seu administrador.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Descargue os ficheiros en fragmentos mรกis pequenos e por separado, ou pรญdallos amabelmente ao seu administrador.",
"No source specified when installing app" => "Non foi especificada ningunha orixe ao instalar aplicativos",
"No href specified when installing app from http" => "Non foi especificada ningunha href ao instalar aplicativos",
"No path specified when installing app from local file" => "Non foi especificada ningunha ruta ao instalar aplicativos desde un ficheiro local",
diff --git a/lib/l10n/hu_HU.php b/lib/l10n/hu_HU.php
index cf1e6c2f100..0d91b70b51a 100644
--- a/lib/l10n/hu_HU.php
+++ b/lib/l10n/hu_HU.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "A fรกjlokat egyenkรฉnt kell letรถlteni.",
"Back to Files" => "Vissza a Fรกjlokhoz",
"Selected files too large to generate zip file." => "A kivรกlasztott fรกjlok tรบl nagyok a zip tรถmรถrรญtรฉshez.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Tรถlts le a fileokat kisebb chunkokban, kรถlรผn vagy kรฉrj segitsรฉget a rendszergazdรกdtรณl.",
"No source specified when installing app" => "Az alkalmazรกs telepรญtรฉsรฉhez nincs forrรกs megadva",
"No href specified when installing app from http" => "Az alkalmazรกs http-n keresztรผl tรถrtรฉnล‘ telepรญtรฉsรฉhez nincs href hivetkozรกs megadva",
"No path specified when installing app from local file" => "Az alkalmazรกs helyi telepรญtรฉsรฉhez nincs รบtvonal (mappa) megadva",
diff --git a/lib/l10n/it.php b/lib/l10n/it.php
index 240442d396d..b1259a0a874 100644
--- a/lib/l10n/it.php
+++ b/lib/l10n/it.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "I file devono essere scaricati uno alla volta.",
"Back to Files" => "Torna ai file",
"Selected files too large to generate zip file." => "I file selezionati sono troppo grandi per generare un file zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Scarica i file in blocchi piรน piccoli, separatamente o chiedi al tuo amministratore.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Scarica i file separatamente in blocchi piรน piccoli o chiedi al tuo amministratore.",
"No source specified when installing app" => "Nessuna fonte specificata durante l'installazione dell'applicazione",
"No href specified when installing app from http" => "Nessun href specificato durante l'installazione dell'applicazione da http",
"No path specified when installing app from local file" => "Nessun percorso specificato durante l'installazione dell'applicazione da file locale",
diff --git a/lib/l10n/ja_JP.php b/lib/l10n/ja_JP.php
index f156c68715c..f7af9b592ad 100644
--- a/lib/l10n/ja_JP.php
+++ b/lib/l10n/ja_JP.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ใƒ•ใ‚กใ‚คใƒซใฏ1ใคใšใคใƒ€ใ‚ฆใƒณใƒญใƒผใƒ‰ใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚",
"Back to Files" => "ใƒ•ใ‚กใ‚คใƒซใซๆˆปใ‚‹",
"Selected files too large to generate zip file." => "้ธๆŠžใ—ใŸใƒ•ใ‚กใ‚คใƒซใฏZIPใƒ•ใ‚กใ‚คใƒซใฎ็”Ÿๆˆใซใฏๅคงใใ™ใŽใพใ™ใ€‚",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "ใƒ•ใ‚กใ‚คใƒซใฏใ€ๅฐใ•ใ„ใƒ•ใ‚กใ‚คใƒซใซๅˆ†ๅ‰ฒใ•ใ‚Œใฆใƒ€ใ‚ฆใƒณใƒญใƒผใƒ‰ใ•ใ‚Œใพใ™ใ€‚ใ‚‚ใ—ใใฏใ€็ฎก็†่€…ใซใŠๅฐ‹ใญใใ ใ•ใ„ใ€‚",
"No source specified when installing app" => "ใ‚ขใƒ—ใƒชใ‚คใƒณใ‚นใƒˆใƒผใƒซๆ™‚ใฎใ‚ฝใƒผใ‚นใŒๆœชๆŒ‡ๅฎš",
"No href specified when installing app from http" => "ใ‚ขใƒ—ใƒชใ‚คใƒณใ‚นใƒˆใƒผใƒซๆ™‚ใฎhttpใฎ URL ใŒๆœชๆŒ‡ๅฎš",
"No path specified when installing app from local file" => "ใ‚ขใƒ—ใƒชใ‚คใƒณใ‚นใƒˆใƒผใƒซๆ™‚ใฎใƒญใƒผใ‚ซใƒซใƒ•ใ‚กใ‚คใƒซใฎใƒ‘ใ‚นใŒๆœชๆŒ‡ๅฎš",
diff --git a/lib/l10n/ko.php b/lib/l10n/ko.php
index 297e7ac5805..102bf9f978d 100644
--- a/lib/l10n/ko.php
+++ b/lib/l10n/ko.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ํŒŒ์ผ์„ ๊ฐœ๋ณ„์ ์œผ๋กœ ๋‹ค์šด๋กœ๋“œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.",
"Back to Files" => "ํŒŒ์ผ๋กœ ๋Œ์•„๊ฐ€๊ธฐ",
"Selected files too large to generate zip file." => "์„ ํƒํ•œ ํŒŒ์ผ๋“ค์€ ZIP ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๊ธฐ์— ๋„ˆ๋ฌด ํฝ๋‹ˆ๋‹ค.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "์ž‘์€ ์กฐ๊ฐ๋“ค ์•ˆ์— ๋“ค์–ด์žˆ๋Š” ํŒŒ์ผ๋“ค์„ ๋ฐ›๊ณ ์ž ํ•˜์‹ ๋‹ค๋ฉด, ๋‚˜๋ˆ„์–ด์„œ ๋ฐ›์œผ์‹œ๊ฑฐ๋‚˜ ํ˜น์€ ์‹œ์Šคํ…œ ๊ด€๋ฆฌ์ž์—๊ฒŒ ์ •์ค‘ํ•˜๊ฒŒ ๋ฌผ์–ด๋ณด์‹ญ์‹œ์˜ค",
"No source specified when installing app" => "์•ฑ์„ ์„ค์น˜ํ•  ๋•Œ ์†Œ์Šค๊ฐ€ ์ง€์ •๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.",
"No href specified when installing app from http" => "http์—์„œ ์•ฑ์„ ์„ค์น˜ํ•  ๋Œ€ href๊ฐ€ ์ง€์ •๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.",
"No path specified when installing app from local file" => "๋กœ์ปฌ ํŒŒ์ผ์—์„œ ์•ฑ์„ ์„ค์น˜ํ•  ๋•Œ ๊ฒฝ๋กœ๊ฐ€ ์ง€์ •๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.",
diff --git a/lib/l10n/lb.php b/lib/l10n/lb.php
index c25f5b55bd5..629d5b11c30 100644
--- a/lib/l10n/lb.php
+++ b/lib/l10n/lb.php
@@ -5,12 +5,14 @@ $TRANSLATIONS = array(
"Settings" => "Astellungen",
"Users" => "Benotzer",
"Admin" => "Admin",
+"Unknown filetype" => "Onbekannten Fichier Typ",
+"Invalid image" => "Ongรผlteg d'Bild",
"web services under your control" => "Web-Servicer รซnnert denger Kontroll",
"Authentication error" => "Authentifikatioun's Fehler",
"Files" => "Dateien",
"Text" => "SMS",
"seconds ago" => "Sekonnen hir",
-"_%n minute ago_::_%n minutes ago_" => array("",""),
+"_%n minute ago_::_%n minutes ago_" => array("","%n Minutten hir"),
"_%n hour ago_::_%n hours ago_" => array("",""),
"today" => "haut",
"yesterday" => "gรซschter",
diff --git a/lib/l10n/lt_LT.php b/lib/l10n/lt_LT.php
index e322c9141d8..9c4eccd9d62 100644
--- a/lib/l10n/lt_LT.php
+++ b/lib/l10n/lt_LT.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Failai turi bลซti parsiunฤiami vienas po kito.",
"Back to Files" => "Atgal ฤฏ Failus",
"Selected files too large to generate zip file." => "Pasirinkti failai per dideli archyvavimui ฤฏ ZIP.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Atsisiลณskite failus maลพesnฤ—mis dalimis atskirai, arba mandagiai praลกykite savo administratoriaus.",
"No source specified when installing app" => "Nenurodytas ลกaltinis diegiant programฤ…",
"No href specified when installing app from http" => "Nenurodytas href diegiant programฤ… iลก http",
"No path specified when installing app from local file" => "Nenurodytas kelias diegiant programฤ… iลก vietinio failo",
diff --git a/lib/l10n/lv.php b/lib/l10n/lv.php
index cf96c4c4ab8..ef5fd2d5ca8 100644
--- a/lib/l10n/lv.php
+++ b/lib/l10n/lv.php
@@ -12,7 +12,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Datnes var lejupielฤdฤ“t tikai katru atseviลกฤทi.",
"Back to Files" => "Atpakaฤผ pie datnฤ“m",
"Selected files too large to generate zip file." => "Izvฤ“lฤ“tฤs datnes ir pฤrฤk lielas, lai izveidotu zip datni.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Lejupielฤdฤ“jiet savus failus mazฤkฤs daฤผฤs, atseviลกฤทi vai palลซdziet tos administratoram.",
"Application is not enabled" => "Lietotne nav aktivฤ“ta",
"Authentication error" => "Autentifikฤcijas kฤผลซda",
"Token expired. Please reload page." => "Pilnvarai ir beidzies termiล†ลก. Lลซdzu, pฤrlฤdฤ“jiet lapu.",
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index 91ce25c13cc..d3a94d20f54 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Bestanden moeten รฉรฉn voor รฉรฉn worden gedownload.",
"Back to Files" => "Terug naar bestanden",
"Selected files too large to generate zip file." => "De geselecteerde bestanden zijn te groot om een zip bestand te maken.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Download de bestanden in kleinere brokken, appart of vraag uw administrator.",
"No source specified when installing app" => "Geen bron opgegeven bij installatie van de app",
"No href specified when installing app from http" => "Geen href opgegeven bij installeren van de app vanaf http",
"No path specified when installing app from local file" => "Geen pad opgegeven bij installeren van de app vanaf een lokaal bestand",
diff --git a/lib/l10n/pl.php b/lib/l10n/pl.php
index 72f01d784c4..82d4f753a81 100644
--- a/lib/l10n/pl.php
+++ b/lib/l10n/pl.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Pliki muszฤ… zostaฤ‡ pobrane pojedynczo.",
"Back to Files" => "Wrรณฤ‡ do plikรณw",
"Selected files too large to generate zip file." => "Wybrane pliki sฤ… zbyt duลผe, aby wygenerowaฤ‡ plik zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Pobierz pliki w mniejszy kawaล‚kach, oddzielnie lub poproล› administratora o zwiฤ™kszenie limitu.",
"No source specified when installing app" => "Nie okreล›lono ลบrรณdล‚a podczas instalacji aplikacji",
"No href specified when installing app from http" => "Nie okreล›lono linku skฤ…d aplikacja ma byฤ‡ zainstalowana",
"No path specified when installing app from local file" => "Nie okreล›lono lokalnego pliku z ktรณrego miaล‚a byฤ‡ instalowana aplikacja",
diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php
index 784f9fe9f66..d6912f07110 100644
--- a/lib/l10n/pt_BR.php
+++ b/lib/l10n/pt_BR.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Arquivos precisam ser baixados um de cada vez.",
"Back to Files" => "Voltar para Arquivos",
"Selected files too large to generate zip file." => "Arquivos selecionados sรฃo muito grandes para gerar arquivo zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Baixe os arquivos em pedaรงos menores, separadamente ou solicite educadamente ao seu administrador.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Por favor baixe os arquivos separadamente em pedaรงos ou educadamente pergunte ao seu administrador.",
"No source specified when installing app" => "Nenhuma fonte foi especificada enquanto instalava o aplicativo",
"No href specified when installing app from http" => "Nenhuma href foi especificada enquanto instalava o aplicativo de httml",
"No path specified when installing app from local file" => "Nenhum caminho foi especificado enquanto instalava o aplicativo do arquivo local",
diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php
index cb990aed110..2b12b4d8a17 100644
--- a/lib/l10n/pt_PT.php
+++ b/lib/l10n/pt_PT.php
@@ -16,10 +16,10 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Os ficheiros precisam de ser descarregados um por um.",
"Back to Files" => "Voltar a Ficheiros",
"Selected files too large to generate zip file." => "Os ficheiros seleccionados sรฃo grandes demais para gerar um ficheiro zip.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Descarregue os ficheiros em partes menores, separados ou peรงa gentilmente ao seu administrador.",
"Archives of type %s are not supported" => "Arquivos do tipo %s nรฃo sรฃo suportados",
"App does not provide an info.xml file" => "A aplicaรงรฃo nรฃo disponibiliza um ficheiro info.xml",
"App can't be installed because of not allowed code in the App" => "A aplicaรงรฃo nรฃo pode ser instalado devido a cรณdigo nรฃo permitido dentro da aplicaรงรฃo",
+"App can't be installed because it is not compatible with this version of ownCloud" => "A aplicaรงรฃo nรฃo pode ser instalada por nรฃo ser compatรญvel com esta versรฃo do ownCloud",
"App directory already exists" => "A directoria da aplicaรงรฃo jรก existe",
"Can't create app folder. Please fix permissions. %s" => "Nรฃo foi possรญvel criar a pasta da aplicaรงรฃo. Por favor verifique as permissรตes. %s",
"Application is not enabled" => "A aplicaรงรฃo nรฃo estรก activada",
diff --git a/lib/l10n/ru.php b/lib/l10n/ru.php
index e77daa7dfdb..baf80cbf24e 100644
--- a/lib/l10n/ru.php
+++ b/lib/l10n/ru.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ะคะฐะนะปั‹ ะดะพะปะถะฝั‹ ะฑั‹ั‚ัŒ ะทะฐะณั€ัƒะถะตะฝั‹ ะฟะพ ะพะดะฝะพะผัƒ.",
"Back to Files" => "ะะฐะทะฐะด ะบ ั„ะฐะนะปะฐะผ",
"Selected files too large to generate zip file." => "ะ’ั‹ะฑั€ะฐะฝะฝั‹ะต ั„ะฐะนะปั‹ ัะปะธัˆะบะพะผ ะฒะตะปะธะบะธ, ั‡ั‚ะพะฑั‹ ัะพะทะดะฐั‚ัŒ zip ั„ะฐะนะป.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "ะ—ะฐะณั€ัƒะทะธั‚ะต ั„ะฐะนะป ะผะฐะปะตะฝัŒัˆะธะผะธ ะฟะพั€ั†ะธัะผะธ, ั€ะฐะทะดะตะปัŒะฝะพ ะธะปะธ ะฒะตะถะปะธะฒะพ ะฟะพะฟั€ะพัะธั‚ะต ะ’ะฐัˆะตะณะพ ะฐะดะผะธะฝะธัั‚ั€ะฐั‚ะพั€ะฐ.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "ะ—ะฐะณั€ัƒะทะธั‚ะต ั„ะฐะนะปั‹ ั€ะฐะทะดะตะปัŒะฝะพ ะผะฐะปะตะฝัŒะบะธะผะธ ั‡ะฐัั‚ัะผะธ ะธะปะธ ะฒะตะถะปะธะฒะพ ะฟะพะฟั€ะพัะธั‚ะต ะฒะฐัˆะตะณะพ ะฐะดะผะธะฝะธัั‚ั€ะฐั‚ะพั€ะฐ.",
"No source specified when installing app" => "ะะต ัƒะบะฐะทะฐะฝ ะธัั‚ะพั‡ะฝะธะบ ะฟั€ะธ ัƒัั‚ะฐะฝะพะฒะบะต ะฟั€ะธะปะพะถะตะฝะธั",
"No href specified when installing app from http" => "ะะต ัƒะบะฐะทะฐะฝ ะฐั‚ั€ะธะฑัƒั‚ href ะฟั€ะธ ัƒัั‚ะฐะฝะพะฒะบะต ะฟั€ะธะปะพะถะตะฝะธั ั‡ะตั€ะตะท http",
"No path specified when installing app from local file" => "ะะต ัƒะบะฐะทะฐะฝ ะฟัƒั‚ัŒ ะฟั€ะธ ัƒัั‚ะฐะฝะพะฒะบะต ะฟั€ะธะปะพะถะตะฝะธั ะธะท ะปะพะบะฐะปัŒะฝะพะณะพ ั„ะฐะนะปะฐ",
diff --git a/lib/l10n/ru_RU.php b/lib/l10n/ru_RU.php
index 622333c3855..23e900721e8 100644
--- a/lib/l10n/ru_RU.php
+++ b/lib/l10n/ru_RU.php
@@ -3,6 +3,7 @@ $TRANSLATIONS = array(
"Help" => "ะŸะพะผะพั‰ัŒ",
"Settings" => "ะะฐัั‚ั€ะพะนะบะธ",
"Files" => "ะคะฐะนะปั‹",
+"Text" => "ะขะตะบัั‚",
"_%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/sk_SK.php b/lib/l10n/sk_SK.php
index 494a34075b9..493374ade09 100644
--- a/lib/l10n/sk_SK.php
+++ b/lib/l10n/sk_SK.php
@@ -1,6 +1,6 @@
<?php
$TRANSLATIONS = array(
-"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Aplikรกcia \"%s\" nemรดลพe byลฅ nainลกtalovanรก kvรดli nekompatibilite z danou verziou ownCloudu.",
+"App \"%s\" can't be installed because it is not compatible with this version of ownCloud." => "Aplikรกcia \"%s\" nemรดลพe byลฅ nainลกtalovanรก kvรดli nekompatibilite z touto verziou ownCloudu.",
"No app name specified" => "Neลกpecifikovanรฉ meno aplikรกcie",
"Help" => "Pomoc",
"Personal" => "Osobnรฉ",
@@ -16,18 +16,17 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Sรบbory musia byลฅ nahrรกvanรฉ jeden za druhรฝm.",
"Back to Files" => "Spรคลฅ na sรบbory",
"Selected files too large to generate zip file." => "Zvolenรฉ sรบbory sรบ prรญliลก veฤพkรฉ na vygenerovanie zip sรบboru.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Stiahnite sรบbory po menลกรญch ฤastiach, samostatne, alebo sa obrรกลฅte na sprรกvcu.",
"No source specified when installing app" => "Neลกpecifikovanรฝ zdroj pri inลกtalรกcii aplikรกcie",
"No href specified when installing app from http" => "Neลกpecifikovanรฝ atribรบt \"href\" pri inลกtalรกcii aplikรกcie pomocou protokolu \"http\"",
"No path specified when installing app from local file" => "Neลกpecifikovanรก cesta pri inลกtalรกcii aplikรกcie z lokรกlneho sรบboru",
-"Archives of type %s are not supported" => "Typ archรญvu %s nie je podporovanรฝ",
+"Archives of type %s are not supported" => "Tento typ archรญvu %s nie je podporovanรฝ",
"Failed to open archive when installing app" => "Zlyhanie pri otvรกranรญ archรญvu poฤas inลกtalรกcie aplikรกcie",
"App does not provide an info.xml file" => "Aplikรกcia neposkytuje sรบbor info.xml",
-"App can't be installed because of not allowed code in the App" => "Aplikรกcia nemรดลพe byลฅ inลกtalovanรก pre nepovolenรฝ kรณd v aplikรกcii",
-"App can't be installed because it is not compatible with this version of ownCloud" => "Aplikรกcia nemรดลพe byลฅ inลกtalovanรก pre nekompatibilitu z danou verziou ownCloudu",
-"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Aplikรกcia nemรดลพe byลฅ inลกtalovanรก pretoลพe obsahuje <shipped>pravรฝ</shipped> ลกtรญtok, ktorรฝ nie je povolenรฝ pre zaslanรฉ \"shipped\" aplikรกcie",
-"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Aplikรกcia nemรดลพe byลฅ inลกtalovanรก pretoลพe verzia v info.xml/version nezodpovedรก verzii ลกpecifikovanej v aplikaฤnom obchode",
-"App directory already exists" => "Aplikaฤnรฝ adresรกr uลพ existuje",
+"App can't be installed because of not allowed code in the App" => "Aplikรกcia nemรดลพe byลฅ nainลกtalovanรก pre nepovolenรฝ kรณd v aplikรกcii",
+"App can't be installed because it is not compatible with this version of ownCloud" => "Aplikรกcia nemรดลพe byลฅ nainลกtalovanรก pre nekompatibilitu z touto verziou ownCloudu",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Aplikรกcia nemรดลพe byลฅ nainลกtalovanรก pretoลพe obsahuje <shipped>pravรฝ</shipped> ลกtรญtok, ktorรฝ nie je povolenรฝ pre zaslanรฉ \"shipped\" aplikรกcie",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Aplikรกcia nemรดลพe byลฅ nainลกtalovanรก pretoลพe verzia v info.xml/version nezodpovedรก verzii ลกpecifikovanej v obchode s aplikรกciami",
+"App directory already exists" => "Aplikaฤnรฝ prieฤinok uลพ existuje",
"Can't create app folder. Please fix permissions. %s" => "Nemoลพno vytvoriลฅ aplikaฤnรฝ prieฤinok. Prosรญm upravte povolenia. %s",
"Application is not enabled" => "Aplikรกcia nie je zapnutรก",
"Authentication error" => "Chyba autentifikรกcie",
@@ -35,7 +34,7 @@ $TRANSLATIONS = array(
"Files" => "Sรบbory",
"Text" => "Text",
"Images" => "Obrรกzky",
-"%s enter the database username." => "Zadajte pouลพรญvateฤพskรฉ meno %s databรกzy..",
+"%s enter the database username." => "Zadajte pouลพรญvateฤพskรฉ meno %s databรกzy.",
"%s enter the database name." => "Zadajte nรกzov databรกzy pre %s databรกzy.",
"%s you may not use dots in the database name" => "V nรกzve databรกzy %s nemรดลพete pouลพรญvaลฅ bodky",
"MS SQL username and/or password not valid: %s" => "Pouลพรญvateฤพskรฉ meno, alebo heslo MS SQL nie je platnรฉ: %s",
@@ -57,13 +56,13 @@ $TRANSLATIONS = array(
"Please double check the <a href='%s'>installation guides</a>." => "Prosรญm skontrolujte <a href='%s'>inลกtalaฤnรบ prรญruฤku</a>.",
"Could not find category \"%s\"" => "Nemoลพno nรกjsลฅ danรบ kategรณriu \"%s\"",
"seconds ago" => "pred sekundami",
-"_%n minute ago_::_%n minutes ago_" => array("","","pred %n minรบtami"),
-"_%n hour ago_::_%n hours ago_" => array("","","pred %n hodinami"),
+"_%n minute ago_::_%n minutes ago_" => array("pred %n minรบtou","pred %n minรบtami","pred %n minรบtami"),
+"_%n hour ago_::_%n hours ago_" => array("pred %n hodinou","pred %n hodinami","pred %n hodinami"),
"today" => "dnes",
"yesterday" => "vฤera",
-"_%n day go_::_%n days ago_" => array("","","pred %n dลˆami"),
+"_%n day go_::_%n days ago_" => array("pred %n dลˆom","pred %n dลˆami","pred %n dลˆami"),
"last month" => "minulรฝ mesiac",
-"_%n month ago_::_%n months ago_" => array("","","pred %n mesiacmi"),
+"_%n month ago_::_%n months ago_" => array("pred %n mesiacom","pred %n mesiacmi","pred %n mesiacmi"),
"last year" => "minulรฝ rok",
"years ago" => "pred rokmi",
"Caused by:" => "Prรญฤina:"
diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php
index 286ec733205..56be601f54d 100644
--- a/lib/l10n/sl.php
+++ b/lib/l10n/sl.php
@@ -5,13 +5,18 @@ $TRANSLATIONS = array(
"Settings" => "Nastavitve",
"Users" => "Uporabniki",
"Admin" => "Skrbniลกtvo",
+"Failed to upgrade \"%s\"." => "Posodabljanje \"%s\" je spodletelo.",
+"Unknown filetype" => "Neznana vrsta datoteke",
+"Invalid image" => "Neveljavna slika",
"web services under your control" => "spletne storitve pod vaลกim nadzorom",
+"cannot open \"%s\"" => "ni mogoฤe odpreti \"%s\"",
"ZIP download is turned off." => "Prejemanje datotek v paketu ZIP je onemogoฤeno.",
"Files need to be downloaded one by one." => "Datoteke je mogoฤe prejeti le posamiฤno.",
"Back to Files" => "Nazaj na datoteke",
"Selected files too large to generate zip file." => "Izbrane datoteke so prevelike za ustvarjanje datoteke arhiva zip.",
+"App directory already exists" => "Programska mapa ลพe obstaja",
"Application is not enabled" => "Program ni omogoฤen",
-"Authentication error" => "Napaka pri overjanju",
+"Authentication error" => "Napaka overjanja",
"Token expired. Please reload page." => "ลฝeton je potekel. Stran je treba ponovno naloลพiti.",
"Files" => "Datoteke",
"Text" => "Besedilo",
@@ -25,10 +30,10 @@ $TRANSLATIONS = array(
"DB Error: \"%s\"" => "Napaka podatkovne zbirke: \"%s\"",
"Offending command was: \"%s\"" => "Napaฤni ukaz je: \"%s\"",
"MySQL user '%s'@'localhost' exists already." => "Uporabnik MySQL '%s'@'localhost' ลพe obstaja.",
-"Drop this user from MySQL" => "Odstrani uporabnika s podatkovne zbirke MySQL",
+"Drop this user from MySQL" => "Odstrani uporabnika iz podatkovne zbirke MySQL",
"MySQL user '%s'@'%%' already exists" => "Uporabnik MySQL '%s'@'%%' ลพe obstaja.",
-"Drop this user from MySQL." => "Odstrani uporabnika s podatkovne zbirke MySQL",
-"Oracle connection could not be established" => "Povezava z bazo Oracle ni uspela.",
+"Drop this user from MySQL." => "Odstrani uporabnika iz podatkovne zbirke MySQL",
+"Oracle connection could not be established" => "Povezave s sistemom Oracle ni mogoฤe vzpostaviti.",
"Oracle username and/or password not valid" => "Uporabniลกko ime ali geslo Oracle ni veljavno",
"Offending command was: \"%s\", name: %s, password: %s" => "Napaฤni ukaz je: \"%s\", ime: %s, geslo: %s",
"PostgreSQL username and/or password not valid" => "Uporabniลกko ime ali geslo PostgreSQL ni veljavno",
@@ -38,13 +43,13 @@ $TRANSLATIONS = array(
"Please double check the <a href='%s'>installation guides</a>." => "Preverite <a href='%s'>navodila namestitve</a>.",
"Could not find category \"%s\"" => "Kategorije \"%s\" ni mogoฤe najti.",
"seconds ago" => "pred nekaj sekundami",
-"_%n minute ago_::_%n minutes ago_" => array("","","",""),
-"_%n hour ago_::_%n hours ago_" => array("","","",""),
+"_%n minute ago_::_%n minutes ago_" => array("pred %n minuto","pred %n minutama","pred %n minutami","pred %n minutami"),
+"_%n hour ago_::_%n hours ago_" => array("pred %n uro","pred %n urama","pred %n urami","pred %n urami"),
"today" => "danes",
"yesterday" => "vฤeraj",
-"_%n day go_::_%n days ago_" => array("","","",""),
+"_%n day go_::_%n days ago_" => array("pred %n dnevom","pred %n dnevoma","pred %n dnevi","pred %n dnevi"),
"last month" => "zadnji mesec",
-"_%n month ago_::_%n months ago_" => array("","","",""),
+"_%n month ago_::_%n months ago_" => array("pred %n mesecem","pred %n mesecema","pred %n meseci","pred %n meseci"),
"last year" => "lansko leto",
"years ago" => "let nazaj"
);
diff --git a/lib/l10n/sv.php b/lib/l10n/sv.php
index 5432eed5858..66cd34f73dd 100644
--- a/lib/l10n/sv.php
+++ b/lib/l10n/sv.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Filer laddas ner en รฅt gรฅngen.",
"Back to Files" => "Tillbaka till Filer",
"Selected files too large to generate zip file." => "Valda filer รคr fรถr stora fรถr att skapa zip-fil.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Ladda ner filerna i mindre bitar, separat eller frรฅga din administratรถr.",
"No source specified when installing app" => "Ingen kรคlla angiven vid installation av app ",
"No href specified when installing app from http" => "Ingen href angiven vid installation av app frรฅn http",
"No path specified when installing app from local file" => "Ingen sรถkvรคg angiven vid installation av app frรฅn lokal fil",
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index eb838f6c537..11f0c72671f 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -16,7 +16,7 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Dosyalarฤฑn birer birer indirilmesi gerekmektedir.",
"Back to Files" => "Dosyalara dรถn",
"Selected files too large to generate zip file." => "Seรงilen dosyalar bir zip dosyasฤฑ oluลŸturmak iรงin fazla bรผyรผktรผr.",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "Dosyalarฤฑ ayrฤฑ ayrฤฑ, kรผรงรผk parรงalar halinde indirin ya da yรถneticinizden yardฤฑm isteyin. ",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Dosyalarฤฑ ayrฤฑ ayrฤฑ, kรผรงรผk parรงalar halinde indirin veya yรถneticinizden yardฤฑm isteyin. ",
"No source specified when installing app" => "Uygulama kurulurken bir kaynak belirtilmedi",
"No href specified when installing app from http" => "Uygulama kuruluyorken http'de href belirtilmedi.",
"No path specified when installing app from local file" => "Uygulama yerel dosyadan kuruluyorken dosya yolu belirtilmedi",
diff --git a/lib/l10n/tzm.php b/lib/l10n/tzm.php
new file mode 100644
index 00000000000..3120c509265
--- /dev/null
+++ b/lib/l10n/tzm.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 == 0 || n == 1 || (n > 10 && n < 100) ? 0 : 1;";
diff --git a/lib/l10n/uz.php b/lib/l10n/uz.php
new file mode 100644
index 00000000000..e7b09649a24
--- /dev/null
+++ b/lib/l10n/uz.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=1; plural=0;";
diff --git a/lib/l10n/zh_TW.php b/lib/l10n/zh_TW.php
index 0081a37dadd..187d40e540e 100644
--- a/lib/l10n/zh_TW.php
+++ b/lib/l10n/zh_TW.php
@@ -16,7 +16,6 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "ๆช”ๆกˆ้œ€่ฆ้€ไธ€ไธ‹่ผ‰ใ€‚",
"Back to Files" => "ๅ›žๅˆฐๆช”ๆกˆๅˆ—่กจ",
"Selected files too large to generate zip file." => "้ธๆ“‡็š„ๆช”ๆกˆๅคชๅคงไปฅ่‡ดๆ–ผ็„กๆณ•็”ข็”Ÿๅฃ“็ธฎๆช”ใ€‚",
-"Download the files in smaller chunks, seperately or kindly ask your administrator." => "ไปฅๅฐๅˆ†ๅ‰ฒไธ‹่ผ‰ๆ‚จ็š„ๆช”ๆกˆ๏ผŒ่ซ‹่ฉขๅ•ๆ‚จ็š„็ณป็ตฑ็ฎก็†ๅ“กใ€‚",
"No source specified when installing app" => "ๆฒ’ๆœ‰ๆŒ‡ๅฎšๆ‡‰็”จ็จ‹ๅผๅฎ‰่ฃไพ†ๆบ",
"No href specified when installing app from http" => "ๅพž http ๅฎ‰่ฃๆ‡‰็”จ็จ‹ๅผ๏ผŒๆ‰พไธๅˆฐ href ๅฑฌๆ€ง",
"No path specified when installing app from local file" => "ๅพžๆœฌๅœฐๆช”ๆกˆๅฎ‰่ฃๆ‡‰็”จ็จ‹ๅผๆ™‚ๆฒ’ๆœ‰ๆŒ‡ๅฎš่ทฏๅพ‘",
diff --git a/lib/private/api.php b/lib/private/api.php
index 7e69a6a77d2..03d7b7382a5 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -96,6 +96,7 @@ class OC_API {
$responses[] = array(
'app' => $action['app'],
'response' => new OC_OCS_Result(null, OC_API::RESPOND_UNAUTHORISED, 'Unauthorised'),
+ 'shipped' => OC_App::isShipped($action['app']),
);
continue;
}
@@ -103,6 +104,7 @@ class OC_API {
$responses[] = array(
'app' => $action['app'],
'response' => new OC_OCS_Result(null, OC_API::RESPOND_NOT_FOUND, 'Api method not found'),
+ 'shipped' => OC_App::isShipped($action['app']),
);
continue;
}
@@ -110,6 +112,7 @@ class OC_API {
$responses[] = array(
'app' => $action['app'],
'response' => call_user_func($action['action'], $parameters),
+ 'shipped' => OC_App::isShipped($action['app']),
);
}
$response = self::mergeResponses($responses);
@@ -127,7 +130,7 @@ class OC_API {
* merge the returned result objects into one response
* @param array $responses
*/
- private static function mergeResponses($responses) {
+ public static function mergeResponses($responses) {
$response = array();
// Sort into shipped and thirdparty
$shipped = array(
@@ -140,50 +143,76 @@ class OC_API {
);
foreach($responses as $response) {
- if(OC_App::isShipped($response['app']) || ($response['app'] === 'core')) {
+ if($response['shipped'] || ($response['app'] === 'core')) {
if($response['response']->succeeded()) {
- $shipped['succeeded'][$response['app']] = $response['response'];
+ $shipped['succeeded'][$response['app']] = $response;
} else {
- $shipped['failed'][$response['app']] = $response['response'];
+ $shipped['failed'][$response['app']] = $response;
}
} else {
if($response['response']->succeeded()) {
- $thirdparty['succeeded'][$response['app']] = $response['response'];
+ $thirdparty['succeeded'][$response['app']] = $response;
} else {
- $thirdparty['failed'][$response['app']] = $response['response'];
+ $thirdparty['failed'][$response['app']] = $response;
}
}
}
// Remove any error responses if there is one shipped response that succeeded
- if(!empty($shipped['succeeded'])) {
- $responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
- } else if(!empty($shipped['failed'])) {
+ if(!empty($shipped['failed'])) {
// Which shipped response do we use if they all failed?
// They may have failed for different reasons (different status codes)
// Which reponse code should we return?
// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
- $response = reset($shipped['failed']);
+ // Merge failed responses if more than one
+ $data = array();
+ $meta = array();
+ foreach($shipped['failed'] as $failure) {
+ $data = array_merge_recursive($data, $failure['response']->getData());
+ }
+ $picked = reset($shipped['failed']);
+ $code = $picked['response']->getStatusCode();
+ $response = new OC_OCS_Result($data, $code);
return $response;
+ } elseif(!empty($shipped['succeeded'])) {
+ $responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
} elseif(!empty($thirdparty['failed'])) {
- // Return the third party failure result
- $response = reset($thirdparty['failed']);
+ // Merge failed responses if more than one
+ $data = array();
+ $meta = array();
+ foreach($thirdparty['failed'] as $failure) {
+ $data = array_merge_recursive($data, $failure['response']->getData());
+ }
+ $picked = reset($thirdparty['failed']);
+ $code = $picked['response']->getStatusCode();
+ $response = new OC_OCS_Result($data, $code);
return $response;
} else {
- $responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
+ $responses = $thirdparty['succeeded'];
}
// Merge the successful responses
$meta = array();
$data = array();
foreach($responses as $app => $response) {
- if(OC_App::isShipped($app)) {
- $data = array_merge_recursive($response->getData(), $data);
+ if($response['shipped']) {
+ $data = array_merge_recursive($response['response']->getData(), $data);
} else {
- $data = array_merge_recursive($data, $response->getData());
+ $data = array_merge_recursive($data, $response['response']->getData());
+ }
+ $codes[] = $response['response']->getStatusCode();
+ }
+
+ // Use any non 100 status codes
+ $statusCode = 100;
+ foreach($codes as $code) {
+ if($code != 100) {
+ $statusCode = $code;
+ break;
}
}
- $result = new OC_OCS_Result($data, 100);
+
+ $result = new OC_OCS_Result($data, $statusCode);
return $result;
}
@@ -245,6 +274,10 @@ class OC_API {
$return = OC_User::login($authUser, $authPw);
if ($return === true) {
self::$logoutRequired = true;
+
+ // initialize the user's filesystem
+ \OC_Util::setUpFS(\OC_User::getUser());
+
return $authUser;
}
@@ -252,6 +285,10 @@ class OC_API {
$loggedIn = OC_User::isLoggedIn();
$ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false;
if ($loggedIn === true && $ocsApiRequest) {
+
+ // initialize the user's filesystem
+ \OC_Util::setUpFS(\OC_User::getUser());
+
return OC_User::getUser();
}
diff --git a/lib/private/avatar.php b/lib/private/avatar.php
index 720740569df..814a9b22bed 100644
--- a/lib/private/avatar.php
+++ b/lib/private/avatar.php
@@ -10,7 +10,7 @@
* This class gets and sets users avatars.
*/
-class OC_Avatar {
+class OC_Avatar implements \OCP\IAvatar {
private $view;
@@ -24,7 +24,7 @@ class OC_Avatar {
/**
* @brief get the users avatar
- * @param $size integer size in px of the avatar, defaults to 64
+ * @param $size integer size in px of the avatar, avatars are square, defaults to 64
* @return boolean|\OC_Image containing the avatar or false if there's no image
*/
public function get ($size = 64) {
@@ -54,7 +54,9 @@ class OC_Avatar {
$img = new OC_Image($data);
$type = substr($img->mimeType(), -3);
- if ($type === 'peg') { $type = 'jpg'; }
+ if ($type === 'peg') {
+ $type = 'jpg';
+ }
if ($type !== 'jpg' && $type !== 'png') {
$l = \OC_L10N::get('lib');
throw new \Exception($l->t("Unknown filetype"));
diff --git a/lib/private/avatarmanager.php b/lib/private/avatarmanager.php
new file mode 100644
index 00000000000..3ca46868ea6
--- /dev/null
+++ b/lib/private/avatarmanager.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC;
+
+use OCP\IAvatarManager;
+
+/*
+ * This class implements methods to access Avatar functionality
+ */
+class AvatarManager implements IAvatarManager {
+
+ /**
+ * @brief return a user specific instance of \OCP\IAvatar
+ * @see \OCP\IAvatar
+ * @param $user string the ownCloud user id
+ * @return \OCP\IAvatar
+ */
+ function getAvatar($user) {
+ return new \OC_Avatar($user);
+ }
+}
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index cc803dd9b5f..99743a70c77 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -138,7 +138,7 @@ class JobList {
$job = new $class();
$job->setId($row['id']);
$job->setLastRun($row['last_run']);
- $job->setArgument(json_decode($row['argument']));
+ $job->setArgument(json_decode($row['argument'], true));
return $job;
}
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 919bb1fc6f4..26b5d200bde 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -230,9 +230,31 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
}
if ($chunk_handler->isComplete()) {
- $newPath = $path . '/' . $info['name'];
- $chunk_handler->file_assemble($newPath);
- return OC_Connector_Sabre_Node::getETagPropertyForPath($newPath);
+
+ // we first assembly the target file as a part file
+ $partFile = $path . '/' . $info['name'] . '.ocTransferId' . $info['transferid'] . '.part';
+ $chunk_handler->file_assemble($partFile);
+
+ // here is the final atomic rename
+ $fs = $this->getFS();
+ $targetPath = $path . '/' . $info['name'];
+ $renameOkay = $fs->rename($partFile, $targetPath);
+ $fileExists = $fs->file_exists($targetPath);
+ if ($renameOkay === false || $fileExists === false) {
+ \OC_Log::write('webdav', '\OC\Files\Filesystem::rename() failed', \OC_Log::ERROR);
+ $fs->unlink($targetPath);
+ throw new Sabre_DAV_Exception();
+ }
+
+ // allow sync clients to send the mtime along in a header
+ $mtime = OC_Request::hasModificationTime();
+ if ($mtime !== false) {
+ if($fs->touch($this->path, $mtime)) {
+ header('X-OC-MTime: accepted');
+ }
+ }
+
+ return OC_Connector_Sabre_Node::getETagPropertyForPath($targetPath);
}
return null;
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index ac781825672..65231040fb5 100644
--- a/lib/private/connector/sabre/filesplugin.php
+++ b/lib/private/connector/sabre/filesplugin.php
@@ -40,6 +40,8 @@ class OC_Connector_Sabre_FilesPlugin extends Sabre_DAV_ServerPlugin
$this->server = $server;
$this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
+ $this->server->subscribeEvent('afterCreateFile', array($this, 'sendFileIdHeader'));
+ $this->server->subscribeEvent('afterWriteContent', array($this, 'sendFileIdHeader'));
}
/**
@@ -70,4 +72,32 @@ class OC_Connector_Sabre_FilesPlugin extends Sabre_DAV_ServerPlugin
}
+ /**
+ * @param $filePath
+ * @param Sabre_DAV_INode $node
+ * @throws Sabre_DAV_Exception_BadRequest
+ */
+ public function sendFileIdHeader($filePath, Sabre_DAV_INode $node = null) {
+ // chunked upload handling
+ if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
+ list($path, $name) = \Sabre_DAV_URLUtil::splitPath($filePath);
+ $info = OC_FileChunking::decodeName($name);
+ if (!empty($info)) {
+ $filePath = $path . '/' . $info['name'];
+ }
+ }
+
+ // we get the node for the given $filePath here because in case of afterCreateFile $node is the parent folder
+ if (!$this->server->tree->nodeExists($filePath)) {
+ return;
+ }
+ $node = $this->server->tree->getNodeForPath($filePath);
+ if ($node instanceof OC_Connector_Sabre_Node) {
+ $fileId = $node->getFileId();
+ if (!is_null($fileId)) {
+ $this->server->httpResponse->setHeader('OC-FileId', $fileId);
+ }
+ }
+ }
+
}
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php
index 76fbc251100..993aa73faeb 100644
--- a/lib/private/connector/sabre/node.php
+++ b/lib/private/connector/sabre/node.php
@@ -276,7 +276,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
if (isset($this->fileinfo_cache['fileid'])) {
$instanceId = OC_Util::getInstanceId();
$id = sprintf('%08d', $this->fileinfo_cache['fileid']);
- return $instanceId . $id;
+ return $id . $instanceId;
}
return null;
diff --git a/lib/private/db/adaptersqlsrv.php b/lib/private/db/adaptersqlsrv.php
index d0a67af28a7..a6bc0e21052 100644
--- a/lib/private/db/adaptersqlsrv.php
+++ b/lib/private/db/adaptersqlsrv.php
@@ -10,13 +10,6 @@
namespace OC\DB;
class AdapterSQLSrv extends Adapter {
- public function lastInsertId($table) {
- if($table !== null) {
- $table = $this->conn->replaceTablePrefix( $table );
- }
- return $this->conn->lastInsertId($table);
- }
-
public function fixupStatement($statement) {
$statement = preg_replace( "/\`(.*?)`/", "[$1]", $statement );
$statement = str_ireplace( 'NOW()', 'CURRENT_TIMESTAMP', $statement );
diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php
index b7128a2f176..511bd1c90bd 100644
--- a/lib/private/db/mdb2schemareader.php
+++ b/lib/private/db/mdb2schemareader.php
@@ -150,6 +150,9 @@ class MDB2SchemaReader {
case 'timestamp':
$type = 'datetime';
break;
+ case 'numeric':
+ $type = 'decimal';
+ break;
}
break;
case 'length':
@@ -186,14 +189,14 @@ class MDB2SchemaReader {
}
}
if (isset($name) && isset($type)) {
- if (empty($options['default'])) {
+ if (isset($options['default']) && empty($options['default'])) {
if (empty($options['notnull']) || !$options['notnull']) {
unset($options['default']);
$options['notnull'] = false;
} else {
$options['default'] = '';
}
- if ($type == 'integer') {
+ if ($type == 'integer' || $type == 'decimal') {
$options['default'] = 0;
} elseif ($type == 'boolean') {
$options['default'] = false;
diff --git a/lib/private/files.php b/lib/private/files.php
index c705d2adb1a..8b8ff81ec5e 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -28,8 +28,8 @@
class OC_Files {
static $tmpFiles = array();
- static public function getFileInfo($path){
- return \OC\Files\Filesystem::getFileInfo($path);
+ static public function getFileInfo($path, $includeMountPoints = true){
+ return \OC\Files\Filesystem::getFileInfo($path, $includeMountPoints);
}
static public function getDirectoryContent($path){
@@ -131,9 +131,11 @@ class OC_Files {
if ($filesize > -1) {
header("Content-Length: ".$filesize);
}
- list($storage) = \OC\Files\Filesystem::resolvePath($filename);
- if ($storage instanceof \OC\Files\Storage\Local) {
- self::addSendfileHeader(\OC\Files\Filesystem::getLocalFile($filename));
+ if ($xsendfile) {
+ list($storage) = \OC\Files\Filesystem::resolvePath(\OC\Files\Filesystem::getView()->getAbsolutePath($filename));
+ if ($storage instanceof \OC\Files\Storage\Local) {
+ self::addSendfileHeader(\OC\Files\Filesystem::getLocalFile($filename));
+ }
}
}
} elseif ($zip or !\OC\Files\Filesystem::file_exists($filename)) {
@@ -251,7 +253,7 @@ class OC_Files {
header("HTTP/1.0 409 Conflict");
OC_Template::printErrorPage(
$l->t('Selected files too large to generate zip file.'),
- $l->t('Download the files in smaller chunks, seperately or kindly ask your administrator.')
+ $l->t('Please download the files separately in smaller chunks or kindly ask your administrator.')
.'<br/><a href="javascript:history.back()">'
. $l->t('Back to Files') . '</a>'
);
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index c1e5b34c8aa..ac50a988e32 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -144,6 +144,7 @@ class Cache {
$data['fileid'] = (int)$data['fileid'];
$data['size'] = (int)$data['size'];
$data['mtime'] = (int)$data['mtime'];
+ $data['storage_mtime'] = (int)$data['storage_mtime'];
$data['encrypted'] = (bool)$data['encrypted'];
$data['unencrypted_size'] = (int)$data['unencrypted_size'];
$data['storage'] = $this->storageId;
@@ -506,7 +507,7 @@ class Cache {
$entry = $this->get($path);
if ($entry && $entry['mimetype'] === 'httpd/unix-directory') {
$id = $entry['fileid'];
- $sql = 'SELECT SUM(`size`), MIN(`size`) FROM `*PREFIX*filecache` '.
+ $sql = 'SELECT SUM(`size`) AS f1, MIN(`size`) AS f2 FROM `*PREFIX*filecache` '.
'WHERE `parent` = ? AND `storage` = ?';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
diff --git a/lib/private/files/cache/homecache.php b/lib/private/files/cache/homecache.php
new file mode 100644
index 00000000000..18dfbfe3191
--- /dev/null
+++ b/lib/private/files/cache/homecache.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Files\Cache;
+
+class HomeCache extends Cache {
+ /**
+ * get the size of a folder and set it in the cache
+ *
+ * @param string $path
+ * @return int
+ */
+ public function calculateFolderSize($path) {
+ if ($path !== '/' and $path !== '') {
+ return parent::calculateFolderSize($path);
+ }
+
+ $totalSize = 0;
+ $entry = $this->get($path);
+ if ($entry && $entry['mimetype'] === 'httpd/unix-directory') {
+ $id = $entry['fileid'];
+ $sql = 'SELECT SUM(`size`) FROM `*PREFIX*filecache` ' .
+ 'WHERE `parent` = ? AND `storage` = ? AND `size` >= 0';
+ $result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
+ if ($row = $result->fetchRow()) {
+ list($sum) = array_values($row);
+ $totalSize = (int)$sum;
+ if ($entry['size'] !== $totalSize) {
+ $this->update($id, array('size' => $totalSize));
+ }
+ }
+ }
+ return $totalSize;
+ }
+
+ public function get($path) {
+ $data = parent::get($path);
+ if ($path === '' or $path === '/') {
+ // only the size of the "files" dir counts
+ $filesData = parent::get('files');
+
+ if (isset($filesData['size'])) {
+ $data['size'] = $filesData['size'];
+ }
+ }
+ return $data;
+ }
+}
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index f63abf2d4fc..34184c68c64 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -17,6 +17,8 @@ use OC\Hooks\BasicEmitter;
* Hooks available in scope \OC\Files\Cache\Scanner:
* - scanFile(string $path, string $storageId)
* - scanFolder(string $path, string $storageId)
+ * - postScanFile(string $path, string $storageId)
+ * - postScanFolder(string $path, string $storageId)
*
* @package OC\Files\Cache
*/
@@ -62,8 +64,12 @@ class Scanner extends BasicEmitter {
* @return array with metadata of the file
*/
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);
+ return null;
+ }
$data = array();
- if (!$this->storage->isReadable($path)) return null; //cant read, nothing we can do
$data['mimetype'] = $this->storage->getMimeType($path);
$data['mtime'] = $this->storage->filemtime($path);
if ($data['mimetype'] == 'httpd/unix-directory') {
@@ -104,7 +110,9 @@ class Scanner extends BasicEmitter {
$newData = $data;
$cacheData = $this->cache->get($file);
if ($cacheData) {
- $this->permissionsCache->remove($cacheData['fileid']);
+ if (isset($cacheData['fileid'])) {
+ $this->permissionsCache->remove($cacheData['fileid']);
+ }
if ($reuseExisting) {
// prevent empty etag
$etag = $cacheData['etag'];
@@ -136,11 +144,20 @@ class Scanner extends BasicEmitter {
}
}
// Only update metadata that has changed
- $newData = array_diff($data, $cacheData);
+ $newData = array_diff_assoc($data, $cacheData);
+ if (isset($newData['etag'])) {
+ $cacheDataString = print_r($cacheData, true);
+ $dataString = print_r($data, true);
+ \OCP\Util::writeLog('OC\Files\Cache\Scanner',
+ "!!! No reuse of etag for '$file' !!! \ncache: $cacheDataString \ndata: $dataString",
+ \OCP\Util::DEBUG);
+ }
}
}
if (!empty($newData)) {
$this->cache->put($file, $newData);
+ $this->emit('\OC\Files\Cache\Scanner', 'postScanFile', array($file, $this->storageId));
+ \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId));
}
} else {
$this->cache->remove($file);
@@ -245,6 +262,7 @@ class Scanner extends BasicEmitter {
}
$this->cache->put($path, array('size' => $size));
}
+ $this->emit('\OC\Files\Cache\Scanner', 'postScanFolder', array($path, $this->storageId));
return $size;
}
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php
index da223567001..d45c5e17fc8 100644
--- a/lib/private/files/cache/updater.php
+++ b/lib/private/files/cache/updater.php
@@ -142,7 +142,7 @@ class Updater {
$cache->update($id, array('mtime' => $time, 'etag' => $storage->getETag($internalPath)));
if ($realPath !== '') {
$realPath = dirname($realPath);
- if($realPath === '/') {
+ if($realPath === DIRECTORY_SEPARATOR ) {
$realPath = "";
}
// check storage for parent in case we change the storage in this step
diff --git a/lib/private/files/cache/watcher.php b/lib/private/files/cache/watcher.php
index 8bfd4602f3a..58f624c8990 100644
--- a/lib/private/files/cache/watcher.php
+++ b/lib/private/files/cache/watcher.php
@@ -15,17 +15,17 @@ class Watcher {
/**
* @var \OC\Files\Storage\Storage $storage
*/
- private $storage;
+ protected $storage;
/**
* @var Cache $cache
*/
- private $cache;
+ protected $cache;
/**
* @var Scanner $scanner;
*/
- private $scanner;
+ protected $scanner;
/**
* @param \OC\Files\Storage\Storage $storage
@@ -40,6 +40,7 @@ class Watcher {
* check $path for updates
*
* @param string $path
+ * @return boolean true if path was updated, false otherwise
*/
public function checkUpdate($path) {
$cachedEntry = $this->cache->get($path);
@@ -53,7 +54,9 @@ class Watcher {
$this->cleanFolder($path);
}
$this->cache->correctFolderSize($path);
+ return true;
}
+ return false;
}
/**
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index e40502bbe64..a83e9aa86d2 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -307,10 +307,18 @@ class Filesystem {
$root = \OC_User::getHome($user);
$userObject = \OC_User::getManager()->get($user);
- if (\OC\Files\Cache\Storage::exists('local::' . $root . '/') or is_null($userObject)) {
+
+ if (!is_null($userObject)) {
+ // check for legacy home id (<= 5.0.12)
+ if (\OC\Files\Cache\Storage::exists('local::' . $root . '/')) {
+ self::mount('\OC\Files\Storage\Home', array('user' => $userObject, 'legacy' => true), $user);
+ }
+ else {
+ self::mount('\OC\Files\Storage\Home', array('user' => $userObject), $user);
+ }
+ }
+ else {
self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
- } else {
- self::mount('\OC\Files\Storage\Home', array('user' => $userObject), $user);
}
$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
@@ -681,18 +689,32 @@ class Filesystem {
}
//no windows style slashes
$path = str_replace('\\', '/', $path);
+
//add leading slash
if ($path[0] !== '/') {
$path = '/' . $path;
}
- //remove duplicate slashes
- while (strpos($path, '//') !== false) {
- $path = str_replace('//', '/', $path);
+
+ // remove '/./'
+ // ugly, but str_replace() can't replace them all in one go
+ // as the replacement itself is part of the search string
+ // which will only be found during the next iteration
+ while (strpos($path, '/./') !== false) {
+ $path = str_replace('/./', '/', $path);
}
+ // remove sequences of slashes
+ $path = preg_replace('#/{2,}#', '/', $path);
+
//remove trailing slash
if ($stripTrailingSlash and strlen($path) > 1 and substr($path, -1, 1) === '/') {
$path = substr($path, 0, -1);
}
+
+ // remove trailing '/.'
+ if (substr($path, -2) == '/.') {
+ $path = substr($path, 0, -2);
+ }
+
//normalize unicode if possible
$path = \OC_Util::normalizeUnicode($path);
@@ -703,6 +725,8 @@ class Filesystem {
* get the filesystem info
*
* @param string $path
+ * @param boolean $includeMountPoints whether to add mountpoint sizes,
+ * defaults to true
* @return array
*
* returns an associative array with the following keys:
@@ -712,8 +736,8 @@ class Filesystem {
* - encrypted
* - versioned
*/
- public static function getFileInfo($path) {
- return self::$defaultInstance->getFileInfo($path);
+ public static function getFileInfo($path, $includeMountPoints = true) {
+ return self::$defaultInstance->getFileInfo($path, $includeMountPoints);
}
/**
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index a5b79f0e967..678bf419023 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -21,11 +21,11 @@ namespace OC\Files\Storage;
*/
abstract class Common implements \OC\Files\Storage\Storage {
- private $cache;
- private $scanner;
- private $permissioncache;
- private $watcher;
- private $storageCache;
+ protected $cache;
+ protected $scanner;
+ protected $permissioncache;
+ protected $watcher;
+ protected $storageCache;
public function __construct($parameters) {
}
@@ -51,6 +51,19 @@ abstract class Common implements \OC\Files\Storage\Storage {
}
}
+ public function isReadable($path) {
+ // at least check whether it exists
+ // subclasses might want to implement this more thoroughly
+ return $this->file_exists($path);
+ }
+
+ public function isUpdatable($path) {
+ // at least check whether it exists
+ // subclasses might want to implement this more thoroughly
+ // a non-existing file/folder isn't updatable
+ return $this->file_exists($path);
+ }
+
public function isCreatable($path) {
if ($this->is_dir($path) && $this->isUpdatable($path)) {
return true;
@@ -142,7 +155,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
return false;
} else {
$directoryHandle = $this->opendir($directory);
- if(is_resource($directoryHandle)) {
+ if (is_resource($directoryHandle)) {
while (($contents = readdir($directoryHandle)) !== false) {
if (!\OC\Files\Filesystem::isIgnoredDir($contents)) {
$path = $directory . '/' . $contents;
@@ -165,27 +178,13 @@ abstract class Common implements \OC\Files\Storage\Storage {
}
public function getMimeType($path) {
- if (!$this->file_exists($path)) {
- return false;
- }
if ($this->is_dir($path)) {
return 'httpd/unix-directory';
- }
- $source = $this->fopen($path, 'r');
- if (!$source) {
- return false;
- }
- $head = fread($source, 8192); //8kb should suffice to determine a mimetype
- if ($pos = strrpos($path, '.')) {
- $extension = substr($path, $pos);
+ } elseif ($this->file_exists($path)) {
+ return \OC_Helper::getFileNameMimeType($path);
} else {
- $extension = '';
+ return false;
}
- $tmpFile = \OC_Helper::tmpFile($extension);
- file_put_contents($tmpFile, $head);
- $mime = \OC_Helper::getMimeType($tmpFile);
- unlink($tmpFile);
- return $mime;
}
public function hash($type, $path, $raw = false) {
@@ -227,7 +226,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
private function addLocalFolder($path, $target) {
$dh = $this->opendir($path);
- if(is_resource($dh)) {
+ if (is_resource($dh)) {
while (($file = readdir($dh)) !== false) {
if ($file !== '.' and $file !== '..') {
if ($this->is_dir($path . '/' . $file)) {
@@ -298,7 +297,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
return $this->watcher;
}
- public function getStorageCache(){
+ public function getStorageCache() {
if (!isset($this->storageCache)) {
$this->storageCache = new \OC\Files\Cache\Storage($this);
}
diff --git a/lib/private/files/storage/commontest.php b/lib/private/files/storage/commontest.php
index c3f1eb31955..2394b14a82f 100644
--- a/lib/private/files/storage/commontest.php
+++ b/lib/private/files/storage/commontest.php
@@ -54,7 +54,7 @@ class CommonTest extends \OC\Files\Storage\Common{
return $this->storage->stat($path);
}
public function filetype($path) {
- return $this->storage->filetype($path);
+ return @$this->storage->filetype($path);
}
public function isReadable($path) {
return $this->storage->isReadable($path);
diff --git a/lib/private/files/storage/home.php b/lib/private/files/storage/home.php
index 47a76c1b840..1c2a682f197 100644
--- a/lib/private/files/storage/home.php
+++ b/lib/private/files/storage/home.php
@@ -13,19 +13,54 @@ namespace OC\Files\Storage;
*/
class Home extends Local {
/**
+ * @var string
+ */
+ protected $id;
+
+ /**
* @var \OC\User\User $user
*/
protected $user;
+ /**
+ * @brief Construct a Home storage instance
+ * @param array $arguments array with "user" containing the
+ * storage owner and "legacy" containing "true" if the storage is
+ * a legacy storage with "local::" URL instead of the new "home::" one.
+ */
public function __construct($arguments) {
$this->user = $arguments['user'];
- $this->datadir = $this->user->getHome();
- if (substr($this->datadir, -1) !== '/') {
- $this->datadir .= '/';
+ $datadir = $this->user->getHome();
+ if (isset($arguments['legacy']) && $arguments['legacy']) {
+ // legacy home id (<= 5.0.12)
+ $this->id = 'local::' . $datadir . '/';
+ }
+ else {
+ $this->id = 'home::' . $this->user->getUID();
}
+
+ parent::__construct(array('datadir' => $datadir));
}
public function getId() {
- return 'home::' . $this->user->getUID();
+ return $this->id;
+ }
+
+ /**
+ * @return \OC\Files\Cache\HomeCache
+ */
+ public function getCache($path = '') {
+ if (!isset($this->cache)) {
+ $this->cache = new \OC\Files\Cache\HomeCache($this);
+ }
+ return $this->cache;
+ }
+
+ /**
+ * @brief Returns the owner of this home storage
+ * @return \OC\User\User owner of this home storage
+ */
+ public function getUser() {
+ return $this->user;
}
}
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index 5209fabc30a..02e8df4af4e 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -203,14 +203,6 @@ if (\OC_Util::runningOnWindows()) {
return $return;
}
- public function getMimeType($path) {
- if ($this->isReadable($path)) {
- return \OC_Helper::getMimeType($this->datadir . $path);
- } else {
- return false;
- }
- }
-
private function delTree($dir) {
$dirRelative = $dir;
$dir = $this->datadir . $dir;
diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php
index ba5ac4191c5..6c37d445867 100644
--- a/lib/private/files/storage/mappedlocal.php
+++ b/lib/private/files/storage/mappedlocal.php
@@ -210,14 +210,6 @@ class MappedLocal extends \OC\Files\Storage\Common{
return $return;
}
- public function getMimeType($path) {
- if($this->isReadable($path)) {
- return \OC_Helper::getMimeType($this->buildPath($path));
- }else{
- return false;
- }
- }
-
private function delTree($dir, $isLogicPath=true) {
$dirRelative=$dir;
if ($isLogicPath) {
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index c0b9f0fc9c8..8cb56ede91b 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -762,6 +762,8 @@ class View {
* get the filesystem info
*
* @param string $path
+ * @param boolean $includeMountPoints whether to add mountpoint sizes,
+ * defaults to true
* @return array
*
* returns an associative array with the following keys:
@@ -771,7 +773,7 @@ class View {
* - encrypted
* - versioned
*/
- public function getFileInfo($path) {
+ public function getFileInfo($path, $includeMountPoints = true) {
$data = array();
if (!Filesystem::isValidPath($path)) {
return $data;
@@ -798,7 +800,7 @@ class View {
$data = $cache->get($internalPath);
if ($data and $data['fileid']) {
- if ($data['mimetype'] === 'httpd/unix-directory') {
+ if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') {
//add the sizes of other mountpoints to the folder
$mountPoints = Filesystem::getMountPoints($path);
foreach ($mountPoints as $mountPoint) {
diff --git a/lib/private/helper.php b/lib/private/helper.php
index fca08adca8b..c82d3bd4ef4 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -64,7 +64,7 @@ class OC_Helper {
*/
public static function linkToDocs($key) {
$theme = new OC_Defaults();
- return $theme->getDocBaseUrl() . '/server/5.0/go.php?to=' . $key;
+ return $theme->getDocBaseUrl() . '/server/6.0/go.php?to=' . $key;
}
/**
@@ -231,11 +231,11 @@ class OC_Helper {
* Returns the path to the preview of the file.
*/
public static function previewIcon($path) {
- return self::linkToRoute( 'core_ajax_preview', array('x' => 36, 'y' => 36, 'file' => urlencode($path) ));
+ return self::linkToRoute( 'core_ajax_preview', array('x' => 36, 'y' => 36, 'file' => $path ));
}
public static function publicPreviewIcon( $path, $token ) {
- return self::linkToRoute( 'core_ajax_public_preview', array('x' => 36, 'y' => 36, 'file' => urlencode($path), 't' => $token));
+ return self::linkToRoute( 'core_ajax_public_preview', array('x' => 36, 'y' => 36, 'file' => $path, 't' => $token));
}
/**
@@ -876,7 +876,8 @@ class OC_Helper {
* @return array
*/
public static function getStorageInfo($path) {
- $rootInfo = \OC\Files\Filesystem::getFileInfo($path);
+ // return storage info without adding mount points
+ $rootInfo = \OC\Files\Filesystem::getFileInfo($path, false);
$used = $rootInfo['size'];
if ($used < 0) {
$used = 0;
diff --git a/lib/private/installer.php b/lib/private/installer.php
index d7b207c6aad..9b49543c3fb 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -147,7 +147,14 @@ class OC_Installer{
}
// check if the ocs version is the same as the version in info.xml/version
- if(!isset($info['version']) or ($info['version']<>$data['appdata']['version'])) {
+ $versionFile= $extractDir.'/appinfo/version';
+ if(is_file($versionFile)) {
+ $version = trim(file_get_contents($versionFile));
+ }else{
+ $version = trim($info['version']);
+ }
+
+ if($version<>trim($data['appdata']['version'])) {
OC_Helper::rmdirr($extractDir);
throw new \Exception($l->t("App can't be installed because the version in info.xml/version is not the same as the version reported from the app store"));
}
diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php
index 9aec967282d..84343df2608 100644
--- a/lib/private/preview/image.php
+++ b/lib/private/preview/image.php
@@ -21,11 +21,11 @@ class Image extends Provider {
return false;
}
+ $image = new \OC_Image();
//check if file is encrypted
if($fileInfo['encrypted'] === true) {
- $image = new \OC_Image(stream_get_contents($fileview->fopen($path, 'r')));
+ $image->loadFromData(stream_get_contents($fileview->fopen($path, 'r')));
}else{
- $image = new \OC_Image();
$image->loadFromFile($fileview->getLocalFile($path));
}
diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php
index 4d85e23c63c..ac771deb413 100644
--- a/lib/private/preview/movies.php
+++ b/lib/private/preview/movies.php
@@ -8,43 +8,82 @@
*/
namespace OC\Preview;
+function findBinaryPath($program) {
+ exec('which ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode);
+ if ($returnCode === 0 && count($output) > 0) {
+ return escapeshellcmd($output[0]);
+ }
+ return null;
+}
+
// movie preview is currently not supported on Windows
if (!\OC_Util::runningOnWindows()) {
- $isShellExecEnabled = !in_array('shell_exec', explode(', ', ini_get('disable_functions')));
- $whichAVCONV = ($isShellExecEnabled ? shell_exec('which avconv') : '');
- $isAVCONVAvailable = !empty($whichAVCONV);
+ $isExecEnabled = !in_array('exec', explode(', ', ini_get('disable_functions')));
+ $ffmpegBinary = null;
+ $avconvBinary = null;
+
+ if ($isExecEnabled) {
+ $avconvBinary = findBinaryPath('avconv');
+ if (!$avconvBinary) {
+ $ffmpegBinary = findBinaryPath('ffmpeg');
+ }
+ }
- if($isShellExecEnabled && $isAVCONVAvailable) {
+ if($isExecEnabled && ( $avconvBinary || $ffmpegBinary )) {
class Movie extends Provider {
+ public static $avconvBinary;
+ public static $ffmpegBinary;
public function getMimeType() {
return '/video\/.*/';
}
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
+ // TODO: use proc_open() and stream the source file ?
$absPath = \OC_Helper::tmpFile();
$tmpPath = \OC_Helper::tmpFile();
$handle = $fileview->fopen($path, 'rb');
- $firstmb = stream_get_contents($handle, 1048576); //1024 * 1024 = 1048576
+ // we better use 5MB (1024 * 1024 * 5 = 5242880) instead of 1MB.
+ // in some cases 1MB was no enough to generate thumbnail
+ $firstmb = stream_get_contents($handle, 5242880);
file_put_contents($absPath, $firstmb);
- //$cmd = 'ffmpeg -y -i ' . escapeshellarg($absPath) . ' -f mjpeg -vframes 1 -ss 1 -s ' . escapeshellarg($maxX) . 'x' . escapeshellarg($maxY) . ' ' . $tmpPath;
- $cmd = 'avconv -an -y -ss 1 -i ' . escapeshellarg($absPath) . ' -f mjpeg -vframes 1 ' . escapeshellarg($tmpPath);
+ if (self::$avconvBinary) {
+ $cmd = self::$avconvBinary . ' -an -y -ss 5'.
+ ' -i ' . escapeshellarg($absPath) .
+ ' -f mjpeg -vframes 1 -vsync 1 ' . escapeshellarg($tmpPath) .
+ ' > /dev/null 2>&1';
+ }
+ else {
+ $cmd = self::$ffmpegBinary . ' -y -ss 5' .
+ ' -i ' . escapeshellarg($absPath) .
+ ' -f mjpeg -vframes 1' .
+ ' -s ' . escapeshellarg($maxX) . 'x' . escapeshellarg($maxY) .
+ ' ' . escapeshellarg($tmpPath) .
+ ' > /dev/null 2>&1';
+ }
- shell_exec($cmd);
-
- $image = new \OC_Image($tmpPath);
+ exec($cmd, $output, $returnCode);
unlink($absPath);
- unlink($tmpPath);
- return $image->valid() ? $image : false;
+ if ($returnCode === 0) {
+ $image = new \OC_Image();
+ $image->loadFromFile($tmpPath);
+ unlink($tmpPath);
+ return $image->valid() ? $image : false;
+ }
+ return false;
}
}
+ // a bit hacky but didn't want to use subclasses
+ Movie::$avconvBinary = $avconvBinary;
+ Movie::$ffmpegBinary = $ffmpegBinary;
+
\OC\Preview::registerProvider('OC\Preview\Movie');
}
}
diff --git a/lib/private/preview/mp3.php b/lib/private/preview/mp3.php
index 1eed566315c..3fc0ab0490c 100644
--- a/lib/private/preview/mp3.php
+++ b/lib/private/preview/mp3.php
@@ -25,7 +25,8 @@ class MP3 extends Provider {
if(isset($tags['id3v2']['APIC'][0]['data'])) {
$picture = @$tags['id3v2']['APIC'][0]['data'];
unlink($tmpPath);
- $image = new \OC_Image($picture);
+ $image = new \OC_Image();
+ $image->loadFromData($picture);
return $image->valid() ? $image : $this->getNoCoverThumbnail();
}
@@ -39,7 +40,8 @@ class MP3 extends Provider {
return false;
}
- $image = new \OC_Image($icon);
+ $image = new \OC_Image();
+ $image->loadFromFile($icon);
return $image->valid() ? $image : false;
}
diff --git a/lib/private/preview/office-cl.php b/lib/private/preview/office-cl.php
index 8f2e06c050b..b11fed13ba1 100644
--- a/lib/private/preview/office-cl.php
+++ b/lib/private/preview/office-cl.php
@@ -48,7 +48,8 @@ if (!\OC_Util::runningOnWindows()) {
return false;
}
- $image = new \OC_Image($pdf);
+ $image = new \OC_Image();
+ $image->loadFromData($pdf);
unlink($absPath);
unlink($absPath . '.pdf');
diff --git a/lib/private/preview/office-fallback.php b/lib/private/preview/office-fallback.php
index e69ab0ab8cb..f184b3149d5 100644
--- a/lib/private/preview/office-fallback.php
+++ b/lib/private/preview/office-fallback.php
@@ -80,7 +80,8 @@ class MSOfficeExcel extends Provider {
unlink($absPath);
unlink($tmpPath);
- $image = new \OC_Image($pdf);
+ $image = new \OC_Image();
+ $image->loadFromData($pdf);
return $image->valid() ? $image : false;
}
diff --git a/lib/private/request.php b/lib/private/request.php
index df33217f95d..7a75bf25208 100755
--- a/lib/private/request.php
+++ b/lib/private/request.php
@@ -9,6 +9,7 @@
class OC_Request {
/**
* @brief Check overwrite condition
+ * @param string $type
* @returns bool
*/
private static function isOverwriteCondition($type = '') {
@@ -99,7 +100,7 @@ class OC_Request {
public static function scriptName() {
$name = $_SERVER['SCRIPT_NAME'];
if (OC_Config::getValue('overwritewebroot', '') !== '' and self::isOverwriteCondition()) {
- $serverroot = str_replace("\\", '/', substr(__DIR__, 0, -4));
+ $serverroot = str_replace("\\", '/', substr(__DIR__, 0, -strlen('lib/private/')));
$suburi = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen($serverroot)));
$name = OC_Config::getValue('overwritewebroot', '') . $suburi;
}
@@ -135,7 +136,18 @@ class OC_Request {
* @returns string Path info or false when not found
*/
public static function getRawPathInfo() {
- $path_info = substr($_SERVER['REQUEST_URI'], strlen($_SERVER['SCRIPT_NAME']));
+ $requestUri = $_SERVER['REQUEST_URI'];
+ // remove too many leading slashes - can be caused by reverse proxy configuration
+ if (strpos($requestUri, '/') === 0) {
+ $requestUri = '/' . ltrim($requestUri, '/');
+ }
+
+ $scriptName = $_SERVER['SCRIPT_NAME'];
+ // in case uri and script name don't match we better throw an exception
+ if (strpos($requestUri, $scriptName) !== 0) {
+ throw new Exception("REQUEST_URI($requestUri) does not start with the SCRIPT_NAME($scriptName)");
+ }
+ $path_info = substr($requestUri, strlen($scriptName));
// Remove the query string from REQUEST_URI
if ($pos = strpos($path_info, '?')) {
$path_info = substr($path_info, 0, $pos);
diff --git a/lib/private/server.php b/lib/private/server.php
index 65899f3007e..77c3732a9ca 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -131,6 +131,9 @@ class Server extends SimpleContainer implements IServerContainer {
$this->registerService('ActivityManager', function($c) {
return new ActivityManager();
});
+ $this->registerService('AvatarManager', function($c) {
+ return new AvatarManager();
+ });
}
/**
@@ -171,6 +174,15 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
+ * Returns the avatar manager, used for avatar functionality
+ *
+ * @return \OCP\IAvatarManager
+ */
+ function getAvatarManager() {
+ return $this->query('AvatarManager');
+ }
+
+ /**
* Returns the root folder of ownCloud's data directory
*
* @return \OCP\Files\Folder
diff --git a/lib/private/setup.php b/lib/private/setup.php
index 3cc1d29c6a4..b5c530a091f 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -165,8 +165,19 @@ class OC_Setup {
}
public static function protectDataDirectory() {
- $content = "deny from all\n";
- $content.= "IndexIgnore *";
+ //Require all denied
+ $now = date('Y-m-d H:i:s');
+ $content = "# Generated by ownCloud on $now\n";
+ $content.= "# line below if for Apache 2.4\n";
+ $content.= "<ifModule mod_authz_core>\n";
+ $content.= "Require all denied\n";
+ $content.= "</ifModule>\n\n";
+ $content.= "# line below if for Apache 2.2\n";
+ $content.= "<ifModule !mod_authz_core>\n";
+ $content.= "deny from all\n";
+ $content.= "</ifModule>\n\n";
+ $content.= "# section for Apache 2.2 and 2.4\n";
+ $content.= "IndexIgnore *\n";
file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content);
file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/index.html', '');
}
@@ -183,7 +194,7 @@ class OC_Setup {
$error = $l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.');
$hint = $l->t('Please double check the <a href=\'%s\'>installation guides</a>.',
- link_to_docs('admin-install'));
+ \OC_Helper::linkToDocs('admin-install'));
OC_Template::printErrorPage($error, $hint);
exit();
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 9827d8a8c12..a1b07c5a242 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -58,6 +58,7 @@ class Updater extends BasicEmitter {
$version['updated'] = \OC_Appconfig::getValue('core', 'lastupdatedat');
$version['updatechannel'] = \OC_Util::getChannel();
$version['edition'] = \OC_Util::getEditionString();
+ $version['build'] = \OC_Util::getBuild();
$versionString = implode('x', $version);
//fetch xml data from updater
diff --git a/lib/private/user.php b/lib/private/user.php
index f15fdf1dbbc..5bd36006750 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -54,6 +54,9 @@ class OC_User {
private static $_setupedBackends = array();
+ // bool, stores if a user want to access a resource anonymously, e.g if he opens a public link
+ private static $incognitoMode = false;
+
/**
* @brief registers backend
* @param string $backend name of the backend
@@ -320,6 +323,15 @@ class OC_User {
}
/**
+ * @brief set incognito mode, e.g. if a user wants to open a public link
+ * @param bool $status
+ */
+ public static function setIncognitoMode($status) {
+ self::$incognitoMode = $status;
+
+ }
+
+ /**
* Supplies an attribute to the logout hyperlink. The default behaviour
* is to return an href with '?logout=true' appended. However, it can
* supply any attribute(s) which are valid for <a>.
@@ -354,7 +366,7 @@ class OC_User {
*/
public static function getUser() {
$uid = OC::$session ? OC::$session->get('user_id') : null;
- if (!is_null($uid)) {
+ if (!is_null($uid) && self::$incognitoMode === false) {
return $uid;
} else {
return false;
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index 525c65ab8a1..9c9bee3da25 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -170,5 +170,10 @@ class Session implements Emitter, \OCP\IUserSession {
setcookie('oc_username', '', time()-3600, \OC::$WEBROOT);
setcookie('oc_token', '', time()-3600, \OC::$WEBROOT);
setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT);
+ // old cookies might be stored under /webroot/ instead of /webroot
+ // and Firefox doesn't like it!
+ setcookie('oc_username', '', time()-3600, \OC::$WEBROOT . '/');
+ setcookie('oc_token', '', time()-3600, \OC::$WEBROOT . '/');
+ setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT . '/');
}
}
diff --git a/lib/private/util.php b/lib/private/util.php
index 176eb4bc369..b5c5546da35 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -53,16 +53,21 @@ class OC_Util {
//if we aren't logged in, there is no use to set up the filesystem
if( $user != "" ) {
- $quota = self::getUserQuota($user);
- if ($quota !== \OC\Files\SPACE_UNLIMITED) {
- \OC\Files\Filesystem::addStorageWrapper(function($mountPoint, $storage) use ($quota, $user) {
- if ($mountPoint === '/' . $user . '/'){
+ \OC\Files\Filesystem::addStorageWrapper(function($mountPoint, $storage){
+ // set up quota for home storages, even for other users
+ // which can happen when using sharing
+
+ if ($storage instanceof \OC\Files\Storage\Home) {
+ $user = $storage->getUser()->getUID();
+ $quota = OC_Util::getUserQuota($user);
+ if ($quota !== \OC\Files\SPACE_UNLIMITED) {
return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $quota));
- } else {
- return $storage;
}
- });
- }
+ }
+
+ return $storage;
+ });
+
$userDir = '/'.$user.'/files';
$userRoot = OC_User::getHome($user);
$userDirectory = $userRoot . '/files';
@@ -353,6 +358,13 @@ class OC_Util {
$errors = array_merge($errors, self::checkDataDirectoryPermissions($CONFIG_DATADIRECTORY));
}
+ if(!OC_Util::isSetLocaleWorking()) {
+ $errors[] = array(
+ 'error' => 'Setting locale to en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8 failed',
+ 'hint' => 'Please install one of theses locales on your system and restart your webserver.'
+ );
+ }
+
$moduleHint = "Please ask your server administrator to install the module.";
// check if all required php modules are present
if(!class_exists('ZipArchive')) {
@@ -847,8 +859,8 @@ class OC_Util {
return true;
}
- $result = setlocale(LC_ALL, 'en_US.UTF-8', 'en_US.UTF8');
- if($result == false) {
+ \Patchwork\Utf8\Bootup::initLocale();
+ if ('' === basename('ยง')) {
return false;
}
return true;
@@ -1099,4 +1111,17 @@ class OC_Util {
$t = explode('/', $file);
return array_pop($t);
}
+
+ /**
+ * A human readable string is generated based on version, channel and build number
+ * @return string
+ */
+ public static function getHumanVersion() {
+ $version = OC_Util::getVersionString().' ('.OC_Util::getChannel().')';
+ $build = OC_Util::getBuild();
+ if(!empty($build) and OC_Util::getChannel() === 'daily') {
+ $version .= ' Build:' . $build;
+ }
+ return $version;
+ }
}
diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php
new file mode 100644
index 00000000000..2cbec0d45c3
--- /dev/null
+++ b/lib/public/iavatar.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP;
+
+/**
+ * This class provides avatar functionality
+ */
+
+interface IAvatar {
+
+ /**
+ * @brief get the users avatar
+ * @param $size integer size in px of the avatar, avatars are square, defaults to 64
+ * @return boolean|\OC_Image containing the avatar or false if there's no image
+ */
+ function get($size = 64);
+
+ /**
+ * @brief sets the users avatar
+ * @param $data mixed imagedata or path to set a new avatar
+ * @throws Exception if the provided file is not a jpg or png image
+ * @throws Exception if the provided image is not valid
+ * @throws \OCP\NotSquareException if the image is not square
+ * @return void
+ */
+ function set($data);
+
+ /**
+ * @brief remove the users avatar
+ * @return void
+ */
+ function remove();
+}
diff --git a/lib/public/iavatarmanager.php b/lib/public/iavatarmanager.php
new file mode 100644
index 00000000000..9b185ae0467
--- /dev/null
+++ b/lib/public/iavatarmanager.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP;
+
+/**
+ * This class provides avatar functionality
+ */
+
+interface IAvatarManager {
+
+ /**
+ * @brief return a user specific instance of \OCP\IAvatar
+ * @see \OCP\IAvatar
+ * @param $user string the ownCloud user id
+ * @return \OCP\IAvatar
+ */
+ function getAvatar($user);
+}
diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php
index 14822817a47..36296a59850 100644
--- a/lib/public/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -154,4 +154,10 @@ interface IServerContainer {
*/
function getDatabaseConnection();
+ /**
+ * @brief Returns an avatar manager, used for avatar functionality
+ * @return \OCP\IAvatarManager
+ */
+ function getAvatarManager();
+
}
diff --git a/lib/public/share.php b/lib/public/share.php
index 003a91a93b6..6178a5ae043 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -354,7 +354,7 @@ class Share {
\OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result) . ', token=' . $token, \OC_Log::ERROR);
}
$row = $result->fetchRow();
- if (self::expireItem($row)) {
+ if (is_array($row) and self::expireItem($row)) {
return false;
}
return $row;