aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/cs_CZ.js2
-rw-r--r--lib/l10n/cs_CZ.json2
-rw-r--r--lib/l10n/de.js2
-rw-r--r--lib/l10n/de.json2
-rw-r--r--lib/l10n/de_DE.js2
-rw-r--r--lib/l10n/de_DE.json2
-rw-r--r--lib/l10n/en_GB.js2
-rw-r--r--lib/l10n/en_GB.json2
-rw-r--r--lib/l10n/es.js2
-rw-r--r--lib/l10n/es.json2
-rw-r--r--lib/l10n/fr.js2
-rw-r--r--lib/l10n/fr.json2
-rw-r--r--lib/l10n/it.js4
-rw-r--r--lib/l10n/it.json4
-rw-r--r--lib/l10n/nl.js2
-rw-r--r--lib/l10n/nl.json2
-rw-r--r--lib/l10n/pt_BR.js2
-rw-r--r--lib/l10n/pt_BR.json2
-rw-r--r--lib/private/AllConfig.php4
-rw-r--r--lib/private/Repair/AssetCache.php6
-rw-r--r--lib/private/Setup.php4
-rw-r--r--lib/private/Setup/AbstractDatabase.php23
-rw-r--r--lib/private/Setup/MySQL.php35
-rw-r--r--lib/private/Setup/PostgreSQL.php185
-rw-r--r--lib/private/TemplateLayout.php151
-rw-r--r--lib/private/legacy/template.php42
26 files changed, 133 insertions, 357 deletions
diff --git a/lib/l10n/cs_CZ.js b/lib/l10n/cs_CZ.js
index a35567d96f5..c883042bfae 100644
--- a/lib/l10n/cs_CZ.js
+++ b/lib/l10n/cs_CZ.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Příslušný příkaz byl: \"%s\"",
"You need to enter either an existing account or the administrator." : "Musíte zadat existující účet či správce.",
"Offending command was: \"%s\", name: %s, password: %s" : "Příslušný příkaz byl: \"%s\", jméno: %s, heslo: %s",
- "PostgreSQL connection failed" : "PostgreSQL připojení selhalo",
- "Please check your connection details." : "Ověřte prosím konfiguraci připojení.",
"PostgreSQL username and/or password not valid" : "Uživatelské jméno či heslo PostgreSQL není platné",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X není podporován a %s nebude na této platformě správně fungovat. Používejte pouze na vlastní nebezpečí!",
"For the best results, please consider using a GNU/Linux server instead." : "Místo toho zvažte pro nejlepší funkčnost použití GNU/Linux serveru.",
diff --git a/lib/l10n/cs_CZ.json b/lib/l10n/cs_CZ.json
index 7be3bd629d6..ab21d2bf1f4 100644
--- a/lib/l10n/cs_CZ.json
+++ b/lib/l10n/cs_CZ.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Příslušný příkaz byl: \"%s\"",
"You need to enter either an existing account or the administrator." : "Musíte zadat existující účet či správce.",
"Offending command was: \"%s\", name: %s, password: %s" : "Příslušný příkaz byl: \"%s\", jméno: %s, heslo: %s",
- "PostgreSQL connection failed" : "PostgreSQL připojení selhalo",
- "Please check your connection details." : "Ověřte prosím konfiguraci připojení.",
"PostgreSQL username and/or password not valid" : "Uživatelské jméno či heslo PostgreSQL není platné",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X není podporován a %s nebude na této platformě správně fungovat. Používejte pouze na vlastní nebezpečí!",
"For the best results, please consider using a GNU/Linux server instead." : "Místo toho zvažte pro nejlepší funkčnost použití GNU/Linux serveru.",
diff --git a/lib/l10n/de.js b/lib/l10n/de.js
index 960654ecdb7..227c7c4ab48 100644
--- a/lib/l10n/de.js
+++ b/lib/l10n/de.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"You need to enter either an existing account or the administrator." : "Du musst entweder ein existierendes Benutzerkonto oder das Administratorenkonto angeben.",
"Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
- "PostgreSQL connection failed" : "Die Verbindung zu PostgreSQL ist fehlgeschlagen",
- "Please check your connection details." : "Bitte überprüfe deine Verbindungseinstellungen.",
"PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X wird nicht unterstützt und %s wird auf dieser Plattform nicht richtig funktionieren. Die Benutzung erfolgt auf eigene Gefahr!",
"For the best results, please consider using a GNU/Linux server instead." : "Zur Gewährleistung eines optimalen Betriebs sollte stattdessen ein GNU/Linux-Server verwendet werden.",
diff --git a/lib/l10n/de.json b/lib/l10n/de.json
index 3cbe433d029..96c684f48cf 100644
--- a/lib/l10n/de.json
+++ b/lib/l10n/de.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"You need to enter either an existing account or the administrator." : "Du musst entweder ein existierendes Benutzerkonto oder das Administratorenkonto angeben.",
"Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
- "PostgreSQL connection failed" : "Die Verbindung zu PostgreSQL ist fehlgeschlagen",
- "Please check your connection details." : "Bitte überprüfe deine Verbindungseinstellungen.",
"PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X wird nicht unterstützt und %s wird auf dieser Plattform nicht richtig funktionieren. Die Benutzung erfolgt auf eigene Gefahr!",
"For the best results, please consider using a GNU/Linux server instead." : "Zur Gewährleistung eines optimalen Betriebs sollte stattdessen ein GNU/Linux-Server verwendet werden.",
diff --git a/lib/l10n/de_DE.js b/lib/l10n/de_DE.js
index adabe585119..52c30cab0bf 100644
--- a/lib/l10n/de_DE.js
+++ b/lib/l10n/de_DE.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"You need to enter either an existing account or the administrator." : "Sie müssen entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
"Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
- "PostgreSQL connection failed" : "Die Verbindung zu PostgreSQL ist fehlgeschlagen",
- "Please check your connection details." : "Bitte überprüfen Sie ihre Verbindungseinstellungen.",
"PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X wird nicht unterstützt und %s wird auf dieser Plattform nicht richtig funktionieren. Die Benutzung erfolgt auf eigene Gefahr!",
"For the best results, please consider using a GNU/Linux server instead." : "Zur Gewährleistung eines optimalen Betriebs sollte stattdessen ein GNU/Linux-Server verwendet werden.",
diff --git a/lib/l10n/de_DE.json b/lib/l10n/de_DE.json
index 47267e52061..317284274a0 100644
--- a/lib/l10n/de_DE.json
+++ b/lib/l10n/de_DE.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"You need to enter either an existing account or the administrator." : "Sie müssen entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
"Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
- "PostgreSQL connection failed" : "Die Verbindung zu PostgreSQL ist fehlgeschlagen",
- "Please check your connection details." : "Bitte überprüfen Sie ihre Verbindungseinstellungen.",
"PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X wird nicht unterstützt und %s wird auf dieser Plattform nicht richtig funktionieren. Die Benutzung erfolgt auf eigene Gefahr!",
"For the best results, please consider using a GNU/Linux server instead." : "Zur Gewährleistung eines optimalen Betriebs sollte stattdessen ein GNU/Linux-Server verwendet werden.",
diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js
index 79d7cb99115..24b4cd78558 100644
--- a/lib/l10n/en_GB.js
+++ b/lib/l10n/en_GB.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Offending command was: \"%s\"",
"You need to enter either an existing account or the administrator." : "You need to enter either an existing account or the administrator.",
"Offending command was: \"%s\", name: %s, password: %s" : "Offending command was: \"%s\", name: %s, password: %s",
- "PostgreSQL connection failed" : "PostgreSQL connection failed",
- "Please check your connection details." : "Please check your connection details.",
"PostgreSQL username and/or password not valid" : "PostgreSQL username and/or password not valid",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! ",
"For the best results, please consider using a GNU/Linux server instead." : "For the best results, please consider using a GNU/Linux server instead.",
diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json
index f8147ae8a52..8ed16e7d074 100644
--- a/lib/l10n/en_GB.json
+++ b/lib/l10n/en_GB.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Offending command was: \"%s\"",
"You need to enter either an existing account or the administrator." : "You need to enter either an existing account or the administrator.",
"Offending command was: \"%s\", name: %s, password: %s" : "Offending command was: \"%s\", name: %s, password: %s",
- "PostgreSQL connection failed" : "PostgreSQL connection failed",
- "Please check your connection details." : "Please check your connection details.",
"PostgreSQL username and/or password not valid" : "PostgreSQL username and/or password not valid",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! ",
"For the best results, please consider using a GNU/Linux server instead." : "For the best results, please consider using a GNU/Linux server instead.",
diff --git a/lib/l10n/es.js b/lib/l10n/es.js
index cc1120cf17e..5a630b1a1fc 100644
--- a/lib/l10n/es.js
+++ b/lib/l10n/es.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Comando infractor: \"%s\"",
"You need to enter either an existing account or the administrator." : "Tiene que ingresar una cuenta existente o la del administrador.",
"Offending command was: \"%s\", name: %s, password: %s" : "Comando infractor: \"%s\", nombre: %s, contraseña: %s",
- "PostgreSQL connection failed" : "Falló la conexión PostgreSQL",
- "Please check your connection details." : "Por favor, compruebe los detalles de su conexión",
"PostgreSQL username and/or password not valid" : "Usuario y/o contraseña de PostgreSQL no válidos",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X no está soportado y %s no funcionará bien en esta plataforma. ¡Úsela bajo su propio riesgo! ",
"For the best results, please consider using a GNU/Linux server instead." : "Para resultados óptimos, considere utilizar un servidor GNU/Linux.",
diff --git a/lib/l10n/es.json b/lib/l10n/es.json
index 6da8e3b85e4..1ee4027ccb0 100644
--- a/lib/l10n/es.json
+++ b/lib/l10n/es.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Comando infractor: \"%s\"",
"You need to enter either an existing account or the administrator." : "Tiene que ingresar una cuenta existente o la del administrador.",
"Offending command was: \"%s\", name: %s, password: %s" : "Comando infractor: \"%s\", nombre: %s, contraseña: %s",
- "PostgreSQL connection failed" : "Falló la conexión PostgreSQL",
- "Please check your connection details." : "Por favor, compruebe los detalles de su conexión",
"PostgreSQL username and/or password not valid" : "Usuario y/o contraseña de PostgreSQL no válidos",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X no está soportado y %s no funcionará bien en esta plataforma. ¡Úsela bajo su propio riesgo! ",
"For the best results, please consider using a GNU/Linux server instead." : "Para resultados óptimos, considere utilizar un servidor GNU/Linux.",
diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js
index c1e345f643c..09b26b48209 100644
--- a/lib/l10n/fr.js
+++ b/lib/l10n/fr.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "La requête en cause est : \"%s\"",
"You need to enter either an existing account or the administrator." : "Vous devez spécifier le nom d'un compte existant, ou celui de l'administrateur.",
"Offending command was: \"%s\", name: %s, password: %s" : "La requête en cause est : \"%s\", nom : %s, mot de passe : %s",
- "PostgreSQL connection failed" : "Échec de la connection PostgreSQL",
- "Please check your connection details." : "Veuillez vérifier vos détails de connexion.",
"PostgreSQL username and/or password not valid" : "Nom d'utilisateur et/ou mot de passe de la base PostgreSQL non valide(s)",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X n'est pas pris en charge et %s ne fonctionnera pas correctement sur cette plate-forme. Son utilisation est à vos risques et périls !",
"For the best results, please consider using a GNU/Linux server instead." : "Pour obtenir les meilleurs résultats, vous devriez utiliser un serveur GNU/Linux.",
diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json
index 15d04ae135a..983167bf9af 100644
--- a/lib/l10n/fr.json
+++ b/lib/l10n/fr.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "La requête en cause est : \"%s\"",
"You need to enter either an existing account or the administrator." : "Vous devez spécifier le nom d'un compte existant, ou celui de l'administrateur.",
"Offending command was: \"%s\", name: %s, password: %s" : "La requête en cause est : \"%s\", nom : %s, mot de passe : %s",
- "PostgreSQL connection failed" : "Échec de la connection PostgreSQL",
- "Please check your connection details." : "Veuillez vérifier vos détails de connexion.",
"PostgreSQL username and/or password not valid" : "Nom d'utilisateur et/ou mot de passe de la base PostgreSQL non valide(s)",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X n'est pas pris en charge et %s ne fonctionnera pas correctement sur cette plate-forme. Son utilisation est à vos risques et périls !",
"For the best results, please consider using a GNU/Linux server instead." : "Pour obtenir les meilleurs résultats, vous devriez utiliser un serveur GNU/Linux.",
diff --git a/lib/l10n/it.js b/lib/l10n/it.js
index 47114165470..bf042a58286 100644
--- a/lib/l10n/it.js
+++ b/lib/l10n/it.js
@@ -50,7 +50,7 @@ OC.L10N.register(
"Signature could not get checked. Please contact the app developer and check your admin screen." : "La firma non può essere verificata. Contatta lo sviluppatore dell'applicazione e controlla la schermata di amministrazione.",
"App can't be installed because of not allowed code in the App" : "L'applicazione non può essere installata a causa di codice non consentito al suo interno",
"App can't be installed because it is not compatible with this version of the server" : "L'applicazione non può essere installata perché non è compatibile con questa versione del server",
- "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'applicazione non può essere installata poiché contiene il tag <shipped>true<shipped> che è consentito per le applicazioni native",
+ "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'applicazione non può essere installata poiché contiene l'etichetta <shipped>true<shipped> che è consentita per le applicazioni native",
"App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "L'applicazione non può essere installata poiché la versione nel file info.xml non è la stessa riportata dall'app store",
"%s enter the database username and name." : "%s digita il nome utente e il nome del database.",
"%s enter the database username." : "%s digita il nome utente del database.",
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Il comando non consentito era: \"%s\"",
"You need to enter either an existing account or the administrator." : "È necessario inserire un account esistente o l'amministratore.",
"Offending command was: \"%s\", name: %s, password: %s" : "Il comando non consentito era: \"%s\", nome: %s, password: %s",
- "PostgreSQL connection failed" : "Connessione a PostgreSQL non riuscita",
- "Please check your connection details." : "Controlla le informazioni di connessione.",
"PostgreSQL username and/or password not valid" : "Nome utente e/o password di PostgreSQL non validi",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X non è supportato e %s non funzionerà correttamente su questa piattaforma. Usalo a tuo rischio!",
"For the best results, please consider using a GNU/Linux server instead." : "Per avere il risultato migliore, prendi in considerazione l'utilizzo di un server GNU/Linux.",
diff --git a/lib/l10n/it.json b/lib/l10n/it.json
index 65592c9fb85..5e04cc1003e 100644
--- a/lib/l10n/it.json
+++ b/lib/l10n/it.json
@@ -48,7 +48,7 @@
"Signature could not get checked. Please contact the app developer and check your admin screen." : "La firma non può essere verificata. Contatta lo sviluppatore dell'applicazione e controlla la schermata di amministrazione.",
"App can't be installed because of not allowed code in the App" : "L'applicazione non può essere installata a causa di codice non consentito al suo interno",
"App can't be installed because it is not compatible with this version of the server" : "L'applicazione non può essere installata perché non è compatibile con questa versione del server",
- "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'applicazione non può essere installata poiché contiene il tag <shipped>true<shipped> che è consentito per le applicazioni native",
+ "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "L'applicazione non può essere installata poiché contiene l'etichetta <shipped>true<shipped> che è consentita per le applicazioni native",
"App can't be installed because the version in info.xml is not the same as the version reported from the app store" : "L'applicazione non può essere installata poiché la versione nel file info.xml non è la stessa riportata dall'app store",
"%s enter the database username and name." : "%s digita il nome utente e il nome del database.",
"%s enter the database username." : "%s digita il nome utente del database.",
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Il comando non consentito era: \"%s\"",
"You need to enter either an existing account or the administrator." : "È necessario inserire un account esistente o l'amministratore.",
"Offending command was: \"%s\", name: %s, password: %s" : "Il comando non consentito era: \"%s\", nome: %s, password: %s",
- "PostgreSQL connection failed" : "Connessione a PostgreSQL non riuscita",
- "Please check your connection details." : "Controlla le informazioni di connessione.",
"PostgreSQL username and/or password not valid" : "Nome utente e/o password di PostgreSQL non validi",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X non è supportato e %s non funzionerà correttamente su questa piattaforma. Usalo a tuo rischio!",
"For the best results, please consider using a GNU/Linux server instead." : "Per avere il risultato migliore, prendi in considerazione l'utilizzo di un server GNU/Linux.",
diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js
index 4e6eef3fe37..c6772b00985 100644
--- a/lib/l10n/nl.js
+++ b/lib/l10n/nl.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Onjuiste commande was: \"%s\"",
"You need to enter either an existing account or the administrator." : "Geef of een bestaand account op, of het beheerdersaccount.",
"Offending command was: \"%s\", name: %s, password: %s" : "Onjuiste commando was: \"%s\", naam: %s, wachtwoord: %s",
- "PostgreSQL connection failed" : "PostgreSQL niet verbonden",
- "Please check your connection details." : "Controleer je connectie details",
"PostgreSQL username and/or password not valid" : "PostgreSQL gebruikersnaam en/of wachtwoord ongeldig",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OSX wordt niet ondersteund en %s zal niet goed werken op dit platform. Gebruik het op je eigen risico!",
"For the best results, please consider using a GNU/Linux server instead." : "Voor het beste resultaat adviseren wij het gebruik van een GNU/Linux server.",
diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json
index 5a0af1d44dc..8800328b4e4 100644
--- a/lib/l10n/nl.json
+++ b/lib/l10n/nl.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Onjuiste commande was: \"%s\"",
"You need to enter either an existing account or the administrator." : "Geef of een bestaand account op, of het beheerdersaccount.",
"Offending command was: \"%s\", name: %s, password: %s" : "Onjuiste commando was: \"%s\", naam: %s, wachtwoord: %s",
- "PostgreSQL connection failed" : "PostgreSQL niet verbonden",
- "Please check your connection details." : "Controleer je connectie details",
"PostgreSQL username and/or password not valid" : "PostgreSQL gebruikersnaam en/of wachtwoord ongeldig",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OSX wordt niet ondersteund en %s zal niet goed werken op dit platform. Gebruik het op je eigen risico!",
"For the best results, please consider using a GNU/Linux server instead." : "Voor het beste resultaat adviseren wij het gebruik van een GNU/Linux server.",
diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js
index 10432e1392c..465cacea6d2 100644
--- a/lib/l10n/pt_BR.js
+++ b/lib/l10n/pt_BR.js
@@ -62,8 +62,6 @@ OC.L10N.register(
"Offending command was: \"%s\"" : "Comando ofensivo era: \"%s\"",
"You need to enter either an existing account or the administrator." : "Você precisa inserir uma conta existente ou a do administrador.",
"Offending command was: \"%s\", name: %s, password: %s" : "Comando ofensivo era: \"%s\", nome: %s, senha: %s",
- "PostgreSQL connection failed" : "PostgreSQL conexão falhou",
- "Please check your connection details." : "Por favor verifique os detalhes da sua conexão",
"PostgreSQL username and/or password not valid" : "Nome de usuário e/ou senha PostgreSQL inválido(s)",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X não é suportado e %s não funcionará corretamente nesta plataforma. Use-o por sua conta e risco!",
"For the best results, please consider using a GNU/Linux server instead." : "Para obter os melhores resultados, por favor, considere o uso de um servidor GNU/Linux em seu lugar.",
diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json
index a1b20e5db0b..11203f2e65f 100644
--- a/lib/l10n/pt_BR.json
+++ b/lib/l10n/pt_BR.json
@@ -60,8 +60,6 @@
"Offending command was: \"%s\"" : "Comando ofensivo era: \"%s\"",
"You need to enter either an existing account or the administrator." : "Você precisa inserir uma conta existente ou a do administrador.",
"Offending command was: \"%s\", name: %s, password: %s" : "Comando ofensivo era: \"%s\", nome: %s, senha: %s",
- "PostgreSQL connection failed" : "PostgreSQL conexão falhou",
- "Please check your connection details." : "Por favor verifique os detalhes da sua conexão",
"PostgreSQL username and/or password not valid" : "Nome de usuário e/ou senha PostgreSQL inválido(s)",
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X não é suportado e %s não funcionará corretamente nesta plataforma. Use-o por sua conta e risco!",
"For the best results, please consider using a GNU/Linux server instead." : "Para obter os melhores resultados, por favor, considere o uso de um servidor GNU/Linux em seu lugar.",
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index c8b2009fcc7..b50fc0f42ce 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -428,4 +428,8 @@ class AllConfig implements \OCP\IConfig {
return $userIDs;
}
+
+ public function getSystemConfig() {
+ return $this->systemConfig;
+ }
}
diff --git a/lib/private/Repair/AssetCache.php b/lib/private/Repair/AssetCache.php
index e4787bab95f..84c22d4d8a2 100644
--- a/lib/private/Repair/AssetCache.php
+++ b/lib/private/Repair/AssetCache.php
@@ -29,14 +29,10 @@ use OCP\Migration\IRepairStep;
class AssetCache implements IRepairStep {
public function getName() {
- return 'Clear asset cache after upgrade';
+ return 'Remove asset cache';
}
public function run(IOutput $output) {
- if (!\OC_Template::isAssetPipelineEnabled()) {
- $output->info('Asset pipeline disabled -> nothing to do');
- return;
- }
$assetDir = \OC::$server->getConfig()->getSystemValue('assetdirectory', \OC::$SERVERROOT) . '/assets';
\OC_Helper::rmdirr($assetDir, false);
$output->info('Asset cache cleared.');
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 7b2c4392360..4a81bb31516 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -134,8 +134,8 @@ class Setup {
'name' => 'MySQL/MariaDB'
),
'pgsql' => array(
- 'type' => 'function',
- 'call' => 'pg_connect',
+ 'type' => 'pdo',
+ 'call' => 'pgsql',
'name' => 'PostgreSQL'
),
'oci' => array(
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index 08ed741f51c..8dee96b1ba5 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -23,6 +23,8 @@
*/
namespace OC\Setup;
+use OC\AllConfig;
+use OC\DB\ConnectionFactory;
use OCP\IConfig;
use OCP\ILogger;
use OCP\Security\ISecureRandom;
@@ -45,7 +47,7 @@ abstract class AbstractDatabase {
protected $dbPort;
/** @var string */
protected $tablePrefix;
- /** @var IConfig */
+ /** @var AllConfig */
protected $config;
/** @var ILogger */
protected $logger;
@@ -99,6 +101,25 @@ abstract class AbstractDatabase {
}
/**
+ * @param array $configOverwrite
+ * @return \OC\DB\Connection
+ */
+ protected function connect(array $configOverwrite = []) {
+ $systemConfig = $this->config->getSystemConfig();
+ $cf = new ConnectionFactory();
+ $connectionParams = $cf->createConnectionParams($systemConfig);
+ // we don't save username/password to the config immediately so this might not be set
+ if (!$connectionParams['user']) {
+ $connectionParams['user'] = $this->dbUser;
+ }
+ if (!$connectionParams['password']) {
+ $connectionParams['password'] = $this->dbPassword;
+ }
+ $connectionParams = array_merge($connectionParams, $configOverwrite);
+ return $cf->getConnection($systemConfig->getValue('dbtype', 'sqlite'), $connectionParams);
+ }
+
+ /**
* @param string $userName
*/
abstract public function setupDatabase($userName);
diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php
index 1ff7b278b86..03a1421f428 100644
--- a/lib/private/Setup/MySQL.php
+++ b/lib/private/Setup/MySQL.php
@@ -88,41 +88,6 @@ class MySQL extends AbstractDatabase {
}
/**
- * @return \OC\DB\Connection
- * @throws \OC\DatabaseSetupException
- */
- private function connect() {
-
- $connectionParams = array(
- 'host' => $this->dbHost,
- 'user' => $this->dbUser,
- 'password' => $this->dbPassword,
- 'tablePrefix' => $this->tablePrefix,
- );
-
- // adding port support through installer
- if(!empty($this->dbPort)) {
- if (ctype_digit($this->dbPort)) {
- $connectionParams['port'] = $this->dbPort;
- } else {
- $connectionParams['unix_socket'] = $this->dbPort;
- }
- } else if (strpos($this->dbHost, ':')) {
- // Host variable may carry a port or socket.
- list($host, $portOrSocket) = explode(':', $this->dbHost, 2);
- if (ctype_digit($portOrSocket)) {
- $connectionParams['port'] = $portOrSocket;
- } else {
- $connectionParams['unix_socket'] = $portOrSocket;
- }
- $connectionParams['host'] = $host;
- }
-
- $cf = new ConnectionFactory();
- return $cf->getConnection('mysql', $connectionParams);
- }
-
- /**
* @param $username
* @param IDBConnection $connection
* @return array
diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php
index 464d1e02e21..b4b0ebeb299 100644
--- a/lib/private/Setup/PostgreSQL.php
+++ b/lib/private/Setup/PostgreSQL.php
@@ -26,42 +26,34 @@
*/
namespace OC\Setup;
+use OC\DatabaseException;
+use OC\DB\QueryBuilder\Literal;
+use OCP\IDBConnection;
+
class PostgreSQL extends AbstractDatabase {
public $dbprettyname = 'PostgreSQL';
public function setupDatabase($username) {
- $e_host = addslashes($this->dbHost);
- $e_user = addslashes($this->dbUser);
- $e_password = addslashes($this->dbPassword);
-
- // adding port support through installer
- if(!empty($this->dbPort)) {
- // casting to int to avoid malicious input
- $port = (int)$this->dbPort;
- } else if(strpos($e_host, ':')) {
- list($e_host, $port)=explode(':', $e_host, 2);
- } else {
- $port=false;
+ $connection = $this->connect([
+ 'dbname' => 'postgres'
+ ]);
+ //check for roles creation rights in postgresql
+ $builder = $connection->getQueryBuilder();
+ $builder->automaticTablePrefix(false);
+ $query = $builder
+ ->select('rolname')
+ ->from('pg_roles')
+ ->where($builder->expr()->eq('rolcreaterole', new Literal('TRUE')))
+ ->andWhere($builder->expr()->eq('rolname', $builder->createNamedParameter($this->dbUser)));
+
+ try {
+ $result = $query->execute();
+ $canCreateRoles = $result->rowCount() > 0;
+ } catch (DatabaseException $e) {
+ $canCreateRoles = false;
}
- //check if the database user has admin rights
- $connection_string = "host='$e_host' dbname=postgres user='$e_user' port='$port' password='$e_password'";
- $connection = @pg_connect($connection_string);
- if(!$connection) {
- // Try if we can connect to the DB with the specified name
- $e_dbname = addslashes($this->dbName);
- $connection_string = "host='$e_host' dbname='$e_dbname' user='$e_user' port='$port' password='$e_password'";
- $connection = @pg_connect($connection_string);
-
- if(!$connection)
- throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL connection failed'),
- $this->trans->t('Please check your connection details.'));
- }
- $e_user = pg_escape_string($this->dbUser);
- //check for roles creation rights in postgresql
- $query="SELECT 1 FROM pg_roles WHERE rolcreaterole=TRUE AND rolname='$e_user'";
- $result = pg_query($connection, $query);
- if($result and pg_num_rows($result) > 0) {
+ if($canCreateRoles) {
//use the admin login data for the new database user
//add prefix to the postgresql user name to prevent collisions
@@ -72,7 +64,7 @@ class PostgreSQL extends AbstractDatabase {
$this->createDBUser($connection);
}
- $systemConfig = \OC::$server->getSystemConfig();
+ $systemConfig = $this->config->getSystemConfig();
$systemConfig->setValues([
'dbuser' => $this->dbUser,
'dbpassword' => $this->dbPassword,
@@ -80,98 +72,85 @@ class PostgreSQL extends AbstractDatabase {
//create the database
$this->createDatabase($connection);
+ $query = $connection->prepare("select count(*) FROM pg_class WHERE relname=? limit 1");
+ $query->execute([$this->tablePrefix . "users"]);
+ $tablesSetup = $query->fetchColumn() > 0;
// the connection to dbname=postgres is not needed anymore
- pg_close($connection);
+ $connection->close();
// connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled
$this->dbUser = $systemConfig->getValue('dbuser');
$this->dbPassword = $systemConfig->getValue('dbpassword');
-
- $e_host = addslashes($this->dbHost);
- $e_dbname = addslashes($this->dbName);
- $e_user = addslashes($this->dbUser);
- $e_password = addslashes($this->dbPassword);
-
- // Fix database with port connection
- if(strpos($e_host, ':')) {
- list($e_host, $port)=explode(':', $e_host, 2);
- } else {
- $port=false;
- }
-
- $connection_string = "host='$e_host' dbname='$e_dbname' user='$e_user' port='$port' password='$e_password'";
- $connection = @pg_connect($connection_string);
- if(!$connection) {
+ $connection = $this->connect();
+ try {
+ $connection->connect();
+ } catch (\Exception $e) {
+ $this->logger->logException($e);
throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'),
- $this->trans->t('You need to enter either an existing account or the administrator.'));
+ $this->trans->t('You need to enter either an existing account or the administrator.'));
}
- $query = "select count(*) FROM pg_class WHERE relname='".$this->tablePrefix."users' limit 1";
- $result = pg_query($connection, $query);
- if($result) {
- $row = pg_fetch_row($result);
- }
- if(!$result or $row[0]==0) {
+
+
+ if(!$tablesSetup) {
\OC_DB::createDbFromStructure($this->dbDefinitionFile);
}
}
- private function createDatabase($connection) {
- //we can't use OC_BD functions here because we need to connect as the administrative user.
- $e_name = pg_escape_string($this->dbName);
- $e_user = pg_escape_string($this->dbUser);
- $query = "select datname from pg_database where datname = '$e_name'";
- $result = pg_query($connection, $query);
- if(!$result) {
- $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />';
- $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />';
- \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN);
- }
- if(! pg_fetch_row($result)) {
+ private function createDatabase(IDBConnection $connection) {
+ if(!$this->databaseExists($connection)) {
//The database does not exists... let's create it
- $query = "CREATE DATABASE \"$e_name\" OWNER \"$e_user\"";
- $result = pg_query($connection, $query);
- if(!$result) {
- $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />';
- $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />';
- \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN);
+ $query = $connection->prepare("CREATE DATABASE " . addslashes($this->dbName) . " OWNER " . addslashes($this->dbUser));
+ try {
+ $query->execute();
+ } catch (DatabaseException $e) {
+ $this->logger->error('Error while trying to create database');
+ $this->logger->logException($e);
}
- else {
- $query = "REVOKE ALL PRIVILEGES ON DATABASE \"$e_name\" FROM PUBLIC";
- pg_query($connection, $query);
+ } else {
+ $query = $connection->prepare("REVOKE ALL PRIVILEGES ON DATABASE " . addslashes($this->dbName) . " FROM PUBLIC");
+ try {
+ $query->execute();
+ } catch (DatabaseException $e) {
+ $this->logger->error('Error while trying to restrict database permissions');
+ $this->logger->logException($e);
}
}
}
- private function createDBUser($connection) {
- $e_name = pg_escape_string($this->dbUser);
- $e_password = pg_escape_string($this->dbPassword);
- $query = "select * from pg_roles where rolname='$e_name';";
- $result = pg_query($connection, $query);
- if(!$result) {
- $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />';
- $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />';
- \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN);
- }
+ private function userExists(IDBConnection $connection) {
+ $builder = $connection->getQueryBuilder();
+ $builder->automaticTablePrefix(false);
+ $query = $builder->select('*')
+ ->from('pg_roles')
+ ->where($builder->expr()->eq('rolname', $builder->createNamedParameter($this->dbUser)));
+ $result = $query->execute();
+ return $result->rowCount() > 0;
+ }
- if(! pg_fetch_row($result)) {
- //user does not exists let's create it :)
- $query = "CREATE USER \"$e_name\" CREATEDB PASSWORD '$e_password';";
- $result = pg_query($connection, $query);
- if(!$result) {
- $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />';
- $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />';
- \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN);
- }
- }
- else { // change password of the existing role
- $query = "ALTER ROLE \"$e_name\" WITH PASSWORD '$e_password';";
- $result = pg_query($connection, $query);
- if(!$result) {
- $entry = $this->trans->t('DB Error: "%s"', array(pg_last_error($connection))) . '<br />';
- $entry .= $this->trans->t('Offending command was: "%s"', array($query)) . '<br />';
- \OCP\Util::writeLog('setup.pg', $entry, \OCP\Util::WARN);
+ private function databaseExists(IDBConnection $connection) {
+ $builder = $connection->getQueryBuilder();
+ $builder->automaticTablePrefix(false);
+ $query = $builder->select('datname')
+ ->from('pg_database')
+ ->where($builder->expr()->eq('datname', $builder->createNamedParameter($this->dbName)));
+ $result = $query->execute();
+ return $result->rowCount() > 0;
+ }
+
+ private function createDBUser(IDBConnection $connection) {
+ try {
+ if ($this->userExists($connection)) {
+ // change the password
+ $query = $connection->prepare("ALTER ROLE " . addslashes($this->dbUser) . " CREATEDB WITH PASSWORD '" . addslashes($this->dbPassword) . "'");
+ } else {
+ // create the user
+ $query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");
}
+ $query->execute();
+ } catch (DatabaseException $e) {
+ $this->logger->error('Error while trying to create database user');
+ $this->logger->logException($e);
}
}
}
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 9a0fbda741d..4255c8998f6 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -137,36 +137,30 @@ class TemplateLayout extends \OC_Template {
self::$versionHash = md5('not installed');
}
- $useAssetPipeline = self::isAssetPipelineEnabled();
- if ($useAssetPipeline) {
+ // Add the js files
+ $jsFiles = self::findJavascriptFiles(\OC_Util::$scripts);
+ $this->assign('jsfiles', array());
+ if ($this->config->getSystemValue('installed', false) && $renderAs != 'error') {
$this->append( 'jsfiles', \OC::$server->getURLGenerator()->linkToRoute('js_config', ['v' => self::$versionHash]));
- $this->generateAssets();
- } else {
- // Add the js files
- $jsFiles = self::findJavascriptFiles(\OC_Util::$scripts);
- $this->assign('jsfiles', array());
- if ($this->config->getSystemValue('installed', false) && $renderAs != 'error') {
- $this->append( 'jsfiles', \OC::$server->getURLGenerator()->linkToRoute('js_config', ['v' => self::$versionHash]));
- }
- foreach($jsFiles as $info) {
- $web = $info[1];
- $file = $info[2];
- $this->append( 'jsfiles', $web.'/'.$file . '?v=' . self::$versionHash);
- }
+ }
+ foreach($jsFiles as $info) {
+ $web = $info[1];
+ $file = $info[2];
+ $this->append( 'jsfiles', $web.'/'.$file . '?v=' . self::$versionHash);
+ }
- // Add the css files
- $cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
- $this->assign('cssfiles', array());
- $this->assign('printcssfiles', []);
- foreach($cssFiles as $info) {
- $web = $info[1];
- $file = $info[2];
+ // Add the css files
+ $cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
+ $this->assign('cssfiles', array());
+ $this->assign('printcssfiles', []);
+ foreach($cssFiles as $info) {
+ $web = $info[1];
+ $file = $info[2];
if (substr($file, -strlen('print.css')) === 'print.css') {
- $this->append( 'printcssfiles', $web.'/'.$file . '?v=' . self::$versionHash);
- } else {
- $this->append( 'cssfiles', $web.'/'.$file . '?v=' . self::$versionHash);
- }
+ $this->append( 'printcssfiles', $web.'/'.$file . '?v=' . self::$versionHash);
+ } else {
+ $this->append( 'cssfiles', $web.'/'.$file . '?v=' . self::$versionHash);
}
}
}
@@ -205,91 +199,6 @@ class TemplateLayout extends \OC_Template {
return $locator->getResources();
}
- public function generateAssets() {
- $assetDir = \OC::$server->getConfig()->getSystemValue('assetdirectory', \OC::$SERVERROOT);
- $jsFiles = self::findJavascriptFiles(\OC_Util::$scripts);
- $jsHash = self::hashFileNames($jsFiles);
-
- if (!file_exists("$assetDir/assets/$jsHash.js")) {
- $jsFiles = array_map(function ($item) {
- $root = $item[0];
- $file = $item[2];
- // no need to minifiy minified files
- if (substr($file, -strlen('.min.js')) === '.min.js') {
- return new FileAsset($root . '/' . $file, array(
- new SeparatorFilter(';')
- ), $root, $file);
- }
- return new FileAsset($root . '/' . $file, array(
- new JSqueezeFilter(),
- new SeparatorFilter(';')
- ), $root, $file);
- }, $jsFiles);
- $jsCollection = new AssetCollection($jsFiles);
- $jsCollection->setTargetPath("assets/$jsHash.js");
-
- $writer = new AssetWriter($assetDir);
- $writer->writeAsset($jsCollection);
- }
-
- $cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
-
- // differentiate between screen stylesheets and printer stylesheets
- $screenCssFiles = array_filter($cssFiles, function($cssFile) {
- return substr_compare($cssFile[2], 'print.css', -strlen('print.css')) !== 0;
- });
- $screenCssAsset = $this->generateCssAsset($screenCssFiles);
-
- $printCssFiles = array_filter($cssFiles, function($cssFile) {
- return substr_compare($cssFile[2], 'print.css', -strlen('print.css')) === 0;
- });
- $printCssAsset = $this->generateCssAsset($printCssFiles);
-
- $this->append('jsfiles', \OC::$server->getURLGenerator()->linkTo('assets', "$jsHash.js"));
- $this->append('cssfiles', $screenCssAsset);
- $this->append('printcssfiles', $printCssAsset);
- }
-
- /**
- * generates a single css asset file from an array of css files if at least one of them has changed
- * otherwise it just returns the path to the old asset file
- * @param $files
- * @return string
- */
- private function generateCssAsset($files) {
- $assetDir = \OC::$server->getConfig()->getSystemValue('assetdirectory', \OC::$SERVERROOT);
- $hash = self::hashFileNames($files);
-
- if (!file_exists("$assetDir/assets/$hash.css")) {
- $files = array_map(function ($item) {
- $root = $item[0];
- $file = $item[2];
- $assetPath = $root . '/' . $file;
- $sourceRoot = \OC::$SERVERROOT;
- $sourcePath = substr($assetPath, strlen(\OC::$SERVERROOT));
- return new FileAsset(
- $assetPath,
- array(
- new CssRewriteFilter(),
- new CssMinFilter(),
- new CssImportFilter()
- ),
- $sourceRoot,
- $sourcePath
- );
- }, $files);
-
- $cssCollection = new AssetCollection($files);
- $cssCollection->setTargetPath("assets/$hash.css");
-
- $writer = new AssetWriter($assetDir);
- $writer->writeAsset($cssCollection);
-
- }
-
- return \OC::$server->getURLGenerator()->linkTo('assets', "$hash.css");
- }
-
/**
* Converts the absolute file path to a relative path from \OC::$SERVERROOT
* @param string $filePath Absolute path
@@ -304,24 +213,4 @@ class TemplateLayout extends \OC_Template {
return $relativePath[1];
}
-
- /**
- * @param array $files
- * @return string
- */
-
- private static function hashFileNames($files) {
- foreach($files as $i => $file) {
- try {
- $files[$i] = self::convertToRelativePath($file[0]).'/'.$file[2];
- } catch (\Exception $e) {
- $files[$i] = $file[0].'/'.$file[2];
- }
- }
-
- sort($files);
- // include the apps' versions hash to invalidate the cached assets
- $files[] = self::$versionHash;
- return hash('md5', implode('', $files));
- }
}
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index e2956508090..b42c14095b5 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -395,46 +395,4 @@ class OC_Template extends \OC\Template\Base {
}
return 'HTTP/1.1';
}
-
- /**
- * @return bool
- */
- public static function isAssetPipelineEnabled() {
- try {
- if (\OCP\Util::needUpgrade()) {
- // Don't use the compiled asset when we need to do an update
- return false;
- }
- } catch (\Exception $e) {
- // Catch any exception, because this code is also called when displaying
- // an exception error page.
- return false;
- }
-
- // asset management enabled?
- $config = \OC::$server->getConfig();
- $useAssetPipeline = $config->getSystemValue('asset-pipeline.enabled', false);
- if (!$useAssetPipeline) {
- return false;
- }
-
- // assets folder exists?
- $assetDir = $config->getSystemValue('assetdirectory', \OC::$SERVERROOT) . '/assets';
- if (!is_dir($assetDir)) {
- if (!mkdir($assetDir)) {
- \OCP\Util::writeLog('assets',
- "Folder <$assetDir> does not exist and/or could not be generated.", \OCP\Util::ERROR);
- return false;
- }
- }
-
- // assets folder can be accessed?
- if (!touch($assetDir."/.oc")) {
- \OCP\Util::writeLog('assets',
- "Folder <$assetDir> could not be accessed.", \OCP\Util::ERROR);
- return false;
- }
- return $useAssetPipeline;
- }
-
}