summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/cs_CZ.php1
-rw-r--r--lib/l10n/da.php1
-rw-r--r--lib/l10n/en_GB.php1
-rw-r--r--lib/l10n/es.php1
-rw-r--r--lib/l10n/et_EE.php2
-rw-r--r--lib/l10n/fi_FI.php1
-rw-r--r--lib/l10n/it.php1
-rw-r--r--lib/l10n/nl.php1
-rw-r--r--lib/l10n/pt_BR.php1
-rw-r--r--lib/l10n/sv.php1
-rw-r--r--lib/l10n/tr.php1
-rw-r--r--lib/private/db/adapter.php2
-rw-r--r--lib/private/group/manager.php17
-rwxr-xr-xlib/private/preview.php14
14 files changed, 37 insertions, 8 deletions
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index 244fc53fbf3..a8143d4e431 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Nastavení",
"Users" => "Uživatelé",
"Admin" => "Administrace",
+"Recommended" => "Doporučené",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "Aplikace \\\"%s\\\" nemůže být nainstalována, protože není kompatibilní s touto verzí ownCloud.",
"No app name specified" => "Nebyl zadan název aplikace",
"Unknown filetype" => "Neznámý typ souboru",
diff --git a/lib/l10n/da.php b/lib/l10n/da.php
index 1568d72e3a6..8ae7d847a09 100644
--- a/lib/l10n/da.php
+++ b/lib/l10n/da.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Indstillinger",
"Users" => "Brugere",
"Admin" => "Admin",
+"Recommended" => "Anbefalet",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "App'en \\\"%s\\\" kan ikke installeres, da den ikke er kompatible med denne version af ownCloud.",
"No app name specified" => "Intet app-navn angivet",
"Unknown filetype" => "Ukendt filtype",
diff --git a/lib/l10n/en_GB.php b/lib/l10n/en_GB.php
index da3cacfce98..5a3ba3a6c54 100644
--- a/lib/l10n/en_GB.php
+++ b/lib/l10n/en_GB.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Settings",
"Users" => "Users",
"Admin" => "Admin",
+"Recommended" => "Recommended",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud.",
"No app name specified" => "No app name specified",
"Unknown filetype" => "Unknown filetype",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index 04253fc7b0c..553ccd519fd 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Ajustes",
"Users" => "Usuarios",
"Admin" => "Administración",
+"Recommended" => "Recomendado",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "La aplicación \\\"%s\\\" no se puede instalar porque no es compatible con esta versión de ownCloud.",
"No app name specified" => "No se ha especificado nombre de la aplicación",
"Unknown filetype" => "Tipo de archivo desconocido",
diff --git a/lib/l10n/et_EE.php b/lib/l10n/et_EE.php
index 8adc51dd118..5dd406ac399 100644
--- a/lib/l10n/et_EE.php
+++ b/lib/l10n/et_EE.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Seaded",
"Users" => "Kasutajad",
"Admin" => "Admin",
+"Recommended" => "Soovitatud",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "Rakendit \\\"%s\\\" ei saa paigaldada, kuna see pole ühilduv selle ownCloud versiooniga.",
"No app name specified" => "Ühegi rakendi nime pole määratletud",
"Unknown filetype" => "Tundmatu failitüüp",
@@ -50,6 +51,7 @@ $TRANSLATIONS = array(
"PostgreSQL username and/or password not valid" => "PostgreSQL kasutajatunnus ja/või parool pole õiged",
"Set an admin username." => "Määra admin kasutajanimi.",
"Set an admin password." => "Määra admini parool.",
+"Can't create or write into the data directory %s" => "Ei suuda luua või kirjutada andmete kataloogi %s",
"%s shared »%s« with you" => "%s jagas sinuga »%s«",
"Sharing %s failed, because the file does not exist" => "%s jagamine ebaõnnestus, kuna faili pole olemas",
"You are not allowed to share %s" => "Sul pole lubatud %s jagada",
diff --git a/lib/l10n/fi_FI.php b/lib/l10n/fi_FI.php
index b002ab02495..5c9a6442c76 100644
--- a/lib/l10n/fi_FI.php
+++ b/lib/l10n/fi_FI.php
@@ -10,6 +10,7 @@ $TRANSLATIONS = array(
"Settings" => "Asetukset",
"Users" => "Käyttäjät",
"Admin" => "Ylläpito",
+"Recommended" => "Suositeltu",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "Sovellusta \\\"%s\\\" ei voi asentaa, koska se ei ole yhteensopiva tämän ownCloud-version kanssa.",
"No app name specified" => "Sovelluksen nimeä ei määritelty",
"Unknown filetype" => "Tuntematon tiedostotyyppi",
diff --git a/lib/l10n/it.php b/lib/l10n/it.php
index 1d71816d32c..c9eaff8a35c 100644
--- a/lib/l10n/it.php
+++ b/lib/l10n/it.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Impostazioni",
"Users" => "Utenti",
"Admin" => "Admin",
+"Recommended" => "Consigliata",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "L'applicazione \\\"%s\\\" non può essere installata poiché non è compatibile con questa versione di ownCloud.",
"No app name specified" => "Il nome dell'applicazione non è specificato",
"Unknown filetype" => "Tipo di file sconosciuto",
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index f7a91d2785d..f5a81dd6ee3 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Instellingen",
"Users" => "Gebruikers",
"Admin" => "Beheerder",
+"Recommended" => "Aanbevolen",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "App \\\"%s\\\" kan niet worden geïnstalleerd omdat de app niet compatible is met deze versie van ownCloud.",
"No app name specified" => "De app naam is niet gespecificeerd.",
"Unknown filetype" => "Onbekend bestandsformaat",
diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php
index 57152025794..d0dc9078128 100644
--- a/lib/l10n/pt_BR.php
+++ b/lib/l10n/pt_BR.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Configurações",
"Users" => "Usuários",
"Admin" => "Admin",
+"Recommended" => "Recomendado",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "Aplicação \\\"%s\\\" não pode ser instalada porque não é compatível com esta versão do ownCloud.",
"No app name specified" => "O nome do aplicativo não foi especificado.",
"Unknown filetype" => "Tipo de arquivo desconhecido",
diff --git a/lib/l10n/sv.php b/lib/l10n/sv.php
index 6558e3bb02e..c042b6af6cb 100644
--- a/lib/l10n/sv.php
+++ b/lib/l10n/sv.php
@@ -8,6 +8,7 @@ $TRANSLATIONS = array(
"Settings" => "Inställningar",
"Users" => "Användare",
"Admin" => "Admin",
+"Recommended" => "Rekomenderad",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "Applikationen \\\"%s\\\" kan inte installeras då en inte är kompatibel med denna version utav ownCloud.",
"No app name specified" => "Inget appnamn angivet",
"Unknown filetype" => "Okänd filtyp",
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index aba1e7db1cc..4477efd07cc 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"Settings" => "Ayarlar",
"Users" => "Kullanıcılar",
"Admin" => "Yönetici",
+"Recommended" => "Önerilen",
"App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." => "ownCloud yazılımının bu sürümü ile uyumlu olmadığı için \\\"%s\\\" uygulaması kurulamaz.",
"No app name specified" => "Uygulama adı belirtilmedi",
"Unknown filetype" => "Bilinmeyen dosya türü",
diff --git a/lib/private/db/adapter.php b/lib/private/db/adapter.php
index 6742ccdbb45..972008776f6 100644
--- a/lib/private/db/adapter.php
+++ b/lib/private/db/adapter.php
@@ -42,7 +42,7 @@ class Adapter {
/**
* insert the @input values when they do not exist yet
* @param string $table name
- * @param array $input key->value pairs
+ * @param array $input key->value pair, key has to be sanitized properly
* @return int count of inserted rows
*/
public function insertIfNotExist($table, $input) {
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index 58a23924872..816e7b427f5 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -48,6 +48,7 @@ class Manager extends PublicEmitter implements IGroupManager {
*/
private $cachedUserGroups = array();
+
/**
* @param \OC\User\Manager $userManager
*/
@@ -180,18 +181,24 @@ class Manager extends PublicEmitter implements IGroupManager {
$groups[$groupId] = $this->get($groupId);
}
}
- $this->cachedUserGroups[$uid] = array_values($groups);
+ $this->cachedUserGroups[$uid] = $groups;
return $this->cachedUserGroups[$uid];
}
+
/**
+ * get a list of group ids for a user
* @param \OC\User\User $user
- * @return array with group names
+ * @return array with group ids
*/
public function getUserGroupIds($user) {
$groupIds = array();
- foreach ($this->backends as $backend) {
- $groupIds = array_merge($groupIds, $backend->getUserGroups($user->getUID()));
-
+ $userId = $user->getUID();
+ if (isset($this->cachedUserGroups[$userId])) {
+ return array_keys($this->cachedUserGroups[$userId]);
+ } else {
+ foreach ($this->backends as $backend) {
+ $groupIds = array_merge($groupIds, $backend->getUserGroups($userId));
+ }
}
return $groupIds;
}
diff --git a/lib/private/preview.php b/lib/private/preview.php
index e9bfb3b9285..f8b19f11cb0 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -814,8 +814,18 @@ class Preview {
self::initProviders();
}
- foreach (self::$providers as $supportedMimeType => $provider) {
- if (preg_match($supportedMimeType, $mimeType)) {
+ // FIXME: Ugly hack to prevent SVG of being returned if the SVG
+ // provider is not enabled.
+ // This is required because the preview system is designed in a
+ // bad way and relies on opt-in with asterisks (i.e. image/*)
+ // which will lead to the fact that a SVG will also match the image
+ // provider.
+ if($mimeType === 'image/svg+xml' && !array_key_exists('/image\/svg\+xml/', self::$providers)) {
+ return false;
+ }
+
+ foreach(self::$providers as $supportedMimetype => $provider) {
+ if(preg_match($supportedMimetype, $mimeType)) {
return true;
}
}