summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/ast.php2
-rw-r--r--lib/l10n/bg_BG.php1
-rw-r--r--lib/l10n/cs_CZ.php1
-rw-r--r--lib/l10n/de.php1
-rw-r--r--lib/l10n/de_DE.php1
-rw-r--r--lib/l10n/en_GB.php1
-rw-r--r--lib/l10n/es.php3
-rw-r--r--lib/l10n/eu.php1
-rw-r--r--lib/l10n/fr.php2
-rw-r--r--lib/l10n/gl.php1
-rw-r--r--lib/l10n/it.php1
-rw-r--r--lib/l10n/nb_NO.php2
-rw-r--r--lib/l10n/nl.php1
-rw-r--r--lib/l10n/pt_BR.php1
-rw-r--r--lib/l10n/pt_PT.php1
-rw-r--r--lib/l10n/sl.php2
-rw-r--r--lib/l10n/tr.php1
-rw-r--r--lib/private/files/cache/scanner.php2
-rw-r--r--lib/private/files/view.php10
-rw-r--r--lib/private/preview/txt.php9
20 files changed, 41 insertions, 3 deletions
diff --git a/lib/l10n/ast.php b/lib/l10n/ast.php
index 9ff0f12aa91..f3a690cd97d 100644
--- a/lib/l10n/ast.php
+++ b/lib/l10n/ast.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "La triba de compartición %s nun ye válida pa %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Falló dar permisos a %s, porque los permisos son mayores que los otorgaos a %s",
"Setting permissions for %s failed, because the item was not found" => "Falló dar permisos a %s, porque l'elementu nun s'atopó",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Nun pue afitase la data de caducidá. Ficheros compartíos nun puen caducar dempués de %s de compartise",
+"Cannot set expiration date. Expiration date is in the past" => "Nun pue afitase la data d'espiración. La data d'espiración ta nel pasáu",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "El motor compartíu %s tien d'implementar la interfaz OCP\\Share_Backend",
"Sharing backend %s not found" => "Nun s'alcontró'l botón de compartición %s",
"Sharing backend for %s not found" => "Nun s'alcontró'l botón de partición pa %s",
diff --git a/lib/l10n/bg_BG.php b/lib/l10n/bg_BG.php
index 4a2d04eaace..bd8b7565da1 100644
--- a/lib/l10n/bg_BG.php
+++ b/lib/l10n/bg_BG.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Споделянето на тип %s не валидно за %s.",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Неуспешна промяна на правата за достъп за %s, защото промените надвишават правата на достъп дадени на %s.",
"Setting permissions for %s failed, because the item was not found" => "Неуспешна промяна на правата за достъп за %s, защото съдържанието не е открито.",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Неуспешно задаване на дата на изтичане. Споделни папки или файлове не могат да изтичат по-късно от %s след като са били споделени",
"Cannot set expiration date. Expiration date is in the past" => "Неуспешно задаване на дата на изтичане. Датата на изтичане е в миналото",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Споделянето на сървърния %s трябва да поддържа OCP\\Share_Backend интерфейс.",
"Sharing backend %s not found" => "Споделянето на сървърния %s не е открито.",
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index c46139da321..4fdeea9a417 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Sdílení typu %s není korektní pro %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Nastavení oprávnění pro %s selhalo, protože jsou k tomu nutná vyšší oprávnění, než jaká byla povolena pro %s",
"Setting permissions for %s failed, because the item was not found" => "Nastavení práv pro %s selhalo, protože položka nebyla nalezena",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Nelze nastavit datum vypršení platnosti. Sdílení nemůže vypršet později než za %s po zveřejnění.",
"Cannot set expiration date. Expiration date is in the past" => "Nelze nastavit datum vypršení platnosti. Datum vypršení je v minulosti.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Podpůrná vrstva pro sdílení %s musí obsahovat rozhraní OCP\\Share_Backend",
"Sharing backend %s not found" => "Podpůrná vrstva sdílení %s nenalezena",
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index 9bb1f76488a..bf44ae04461 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Freigabetyp %s ist nicht gültig für %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da die Berechtigungen, die erteilten Berechtigungen %s überschreiten",
"Setting permissions for %s failed, because the item was not found" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da das Objekt nicht gefunden wurde",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Ablaufdatum kann nicht gesetzt werden. Freigaben können nach dem Teilen, nicht länger als %s gültig sein.",
"Cannot set expiration date. Expiration date is in the past" => "Ablaufdatum kann nicht gesetzt werden. Ablaufdatum liegt in der Vergangenheit.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden",
"Sharing backend %s not found" => "Freigabe-Backend %s nicht gefunden",
diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php
index edb1d7a46f3..65d508de0ff 100644
--- a/lib/l10n/de_DE.php
+++ b/lib/l10n/de_DE.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Freigabetyp %s ist nicht gültig für %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da die Berechtigungen, die erteilten Berechtigungen %s überschreiten",
"Setting permissions for %s failed, because the item was not found" => "Das Setzen der Berechtigungen für %s ist fehlgeschlagen, da das Objekt nicht gefunden wurde",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Ablaufdatum kann nicht gesetzt werden. Freigaben können nach dem Teilen, nicht länger als %s gültig sein.",
"Cannot set expiration date. Expiration date is in the past" => "Ablaufdatum kann nicht gesetzt werden. Ablaufdatum liegt in der Vergangenheit.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden",
"Sharing backend %s not found" => "Freigabe-Backend %s nicht gefunden",
diff --git a/lib/l10n/en_GB.php b/lib/l10n/en_GB.php
index 0553e80d70e..c1ad8703ea3 100644
--- a/lib/l10n/en_GB.php
+++ b/lib/l10n/en_GB.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Share type %s is not valid for %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Setting permissions for %s failed, because the permissions exceed permissions granted to %s",
"Setting permissions for %s failed, because the item was not found" => "Setting permissions for %s failed, because the item was not found",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Cannot set expiry date. Shares cannot expire later than %s after they have been shared",
"Cannot set expiration date. Expiration date is in the past" => "Cannot set expiry date. Expiry date is in the past",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Sharing backend %s must implement the interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Sharing backend %s not found",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index bb0aadeba2e..6c5ac83280a 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -1,6 +1,6 @@
<?php
$TRANSLATIONS = array(
-"Cannot write into \"config\" directory!" => "No se puede escribir en el directorio de Configuración!",
+"Cannot write into \"config\" directory!" => "¡No se puede escribir en el directorio de Configuración!",
"This can usually be fixed by giving the webserver write access to the config directory" => "Esto puede ser facilmente solucionado, dando permisos de escritura al directorio de configuración en el servidor Web",
"See %s" => "Mirar %s",
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." => "Esto puede ser facilmente solucionado, %sdando permisos de escritura al directorio de configuración en el servidor Web%s.",
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Compartir tipo %s no es válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Configuración de permisos para %s ha fallado, ya que los permisos superan los permisos dados a %s",
"Setting permissions for %s failed, because the item was not found" => "Configuración de permisos para %s ha fallado, ya que el elemento no fue encontrado",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "No se puede fijar fecha de caducidad. Archivos compartidos no pueden caducar luego de %s de ser compartidos",
"Cannot set expiration date. Expiration date is in the past" => "No se puede fijar la fecha de caducidad. La fecha de caducidad está en el pasado.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "El motor compartido %s debe implementar la interfaz OCP\\Share_Backend",
"Sharing backend %s not found" => "El motor compartido %s no se ha encontrado",
diff --git a/lib/l10n/eu.php b/lib/l10n/eu.php
index 5221b35a307..c395e2d0821 100644
--- a/lib/l10n/eu.php
+++ b/lib/l10n/eu.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "%s elkarbanaketa mota ez da %srentzako egokia",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "%srentzako baimenak ezartzea huts egin du, baimenak %sri emandakoak baino gehiago direlako",
"Setting permissions for %s failed, because the item was not found" => "%srentzako baimenak ezartzea huts egin du, aurkitu ez delako",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Ezin izan da jarri iraungitze data. Konpartitzea ezin da iraungi konpartitu eta %s ondoren.",
"Cannot set expiration date. Expiration date is in the past" => "Ezin da jarri iraungitze data. Iraungitze data iragan da.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "%s elkarbanaketa motorra OCP\\Share_Backend interfazea inplementatu behar du ",
"Sharing backend %s not found" => "Ez da %s elkarbanaketa motorra aurkitu",
diff --git a/lib/l10n/fr.php b/lib/l10n/fr.php
index b20f89a9ad7..f1f4bf68a26 100644
--- a/lib/l10n/fr.php
+++ b/lib/l10n/fr.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Le type de partage %s n'est pas valide pour %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Le réglage des permissions pour %s a échoué car les permissions dépassent celle accordée à %s",
"Setting permissions for %s failed, because the item was not found" => "Le réglage des permissions pour %s a échoué car l'objet n'a pas été trouvé",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Impossible de configurer la date d'expiration. Un partage ne peut expirer plus de %s après sa date de début.",
+"Cannot set expiration date. Expiration date is in the past" => "Impossible de configurer la date d'expiration. La date d'expiration est dans le passé.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "L'emplacement du partage %s doit implémenter l'interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Emplacement de partage %s introuvable",
"Sharing backend for %s not found" => "L'emplacement du partage %s est introuvable",
diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php
index 26ded2e51b1..07e9f848c11 100644
--- a/lib/l10n/gl.php
+++ b/lib/l10n/gl.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Non se admite a compartición do tipo %s para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Non é posíbel estabelecer permisos para %s, os permisos superan os permisos concedidos a %s",
"Setting permissions for %s failed, because the item was not found" => "Non é posíbel estabelecer permisos para %s, non se atopa o elemento",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Non é posíbel estabelecer a data de caducidade. As comparticións non poden caducar máis aló de %s após de seren compartidas",
"Cannot set expiration date. Expiration date is in the past" => "Non é posíbel estabelecer a data de caducidade. A data de caducidade está no pasado.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "A infraestrutura de compartición %s ten que implementar a interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Non se atopou a infraestrutura de compartición %s",
diff --git a/lib/l10n/it.php b/lib/l10n/it.php
index 08d356b9f62..1608a4461f1 100644
--- a/lib/l10n/it.php
+++ b/lib/l10n/it.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Il tipo di condivisione %s non è valido per %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Impostazione permessi per %s non riuscita, poiché i permessi superano i permessi accordati a %s",
"Setting permissions for %s failed, because the item was not found" => "Impostazione permessi per %s non riuscita, poiché l'elemento non è stato trovato",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Impossibile impostare la data di scadenza. Le condivisioni non possono scadere più tardi di %s dalla loro attivazione",
"Cannot set expiration date. Expiration date is in the past" => "Impossibile impostare la data di scadenza. La data di scadenza è nel passato.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Il motore di condivisione %s deve implementare l'interfaccia OCP\\Share_Backend",
"Sharing backend %s not found" => "Motore di condivisione %s non trovato",
diff --git a/lib/l10n/nb_NO.php b/lib/l10n/nb_NO.php
index 1b7196c0881..12c5cd438fd 100644
--- a/lib/l10n/nb_NO.php
+++ b/lib/l10n/nb_NO.php
@@ -67,6 +67,8 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Delingstype %s er ikke gyldig for %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Setting av tillatelser for %s feilet, fordi tillatelsene gikk ut over tillatelsene som er gitt til %s",
"Setting permissions for %s failed, because the item was not found" => "Setting av tillatelser for %s feilet, fordi elementet ikke ble funnet",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Kan ikke sette utøpsdato. Delinger kan ikke utløpe senere enn %s etter at de har blitt delt",
+"Cannot set expiration date. Expiration date is in the past" => "Kan ikke sette utløpsdato. Utløpsdato er tilbake i tid",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Delings-server %s må implementere grensesnittet OCP\\Share_Backend",
"Sharing backend %s not found" => "Delings-server %s ikke funnet",
"Sharing backend for %s not found" => "Delings-server for %s ikke funnet",
diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php
index 7b5aff3217f..25e77deedfe 100644
--- a/lib/l10n/nl.php
+++ b/lib/l10n/nl.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Delen van type %s is niet geldig voor %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Instellen van de permissies voor %s is mislukt, omdat de permissies hoger zijn dan de aan %s toegekende permissies",
"Setting permissions for %s failed, because the item was not found" => "Instellen van de permissies voor %s is mislukt, omdat het object niet is gevonden",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Kon vervaldatum niet instellen. Shares kunnen niet langer dan %s vervallen na het moment van delen",
"Cannot set expiration date. Expiration date is in the past" => "Kon vervaldatum niet instellen. De vervaldatum ligt in het verleden",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Het share-backend %s moet de OCP\\Share_Backend interface implementeren",
"Sharing backend %s not found" => "Het share-backend %s is niet gevonden",
diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php
index 16ca7965402..ca0f94d4929 100644
--- a/lib/l10n/pt_BR.php
+++ b/lib/l10n/pt_BR.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "Tipo de compartilhamento %s não é válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Setting permissions for %s failed, because the item was not found" => "Definir permissões para %s falhou, porque o item não foi encontrado",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Não é possível definir a data de expiração. Compartilhamentos não podem expirar mais tarde que %s depois de terem sido compartilhados",
"Cannot set expiration date. Expiration date is in the past" => "Não é possível definir a data de validade. Data de expiração está no passado",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Compartilhando backend %s deve implementar a interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Compartilhamento backend %s não encontrado",
diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php
index 49977bb2d4f..db29fb52cc7 100644
--- a/lib/l10n/pt_PT.php
+++ b/lib/l10n/pt_PT.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "O tipo de partilha %s não é válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Setting permissions for %s failed, because the item was not found" => "Definir permissões para %s falhou, porque o item não foi encontrado",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Não é possível definir data de expiração. As partilhas não podem expirar mais de %s depois de terem sido partilhadas",
"Cannot set expiration date. Expiration date is in the past" => "Não é possivel definir data de expiração. A data de expiração está no passado",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Partilhar backend %s tem de implementar o interface OCP\\Share_Backend",
"Sharing backend %s not found" => "Partilha backend %s não foi encontrado",
diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php
index 8e62df09696..3578b5c43c6 100644
--- a/lib/l10n/sl.php
+++ b/lib/l10n/sl.php
@@ -1,5 +1,7 @@
<?php
$TRANSLATIONS = array(
+"Cannot write into \"config\" directory!" => "Mapa 'config' nima določenih ustreznih dovoljenj za pisanje!",
+"See %s" => "Oglejte si %s",
"Help" => "Pomoč",
"Personal" => "Osebno",
"Settings" => "Nastavitve",
diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php
index 39d80a30b3d..d3b29f24937 100644
--- a/lib/l10n/tr.php
+++ b/lib/l10n/tr.php
@@ -67,6 +67,7 @@ $TRANSLATIONS = array(
"Share type %s is not valid for %s" => "%s paylaşım türü %s için geçerli değil",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" => "%s için izinler, izinler %s için verilen izinleri aştığından dolayı ayarlanamadı",
"Setting permissions for %s failed, because the item was not found" => "%s için izinler öge bulunamadığından ayarlanamadı",
+"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" => "Son kullanma tarihi ayarlanamıyor. Paylaşımların süreleri, paylaşıldıkları süreden %s sonra dolamaz.",
"Cannot set expiration date. Expiration date is in the past" => "Son kullanma tarihi ayarlanamıyor. Son kullanma tarihi geçmişte",
"Sharing backend %s must implement the interface OCP\\Share_Backend" => "Paylaşma arka ucu %s OCP\\Share_Backend arayüzünü desteklemeli",
"Sharing backend %s not found" => "Paylaşım arka ucu %s bulunamadı",
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 89fa6b8cc13..2d87871fd89 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -67,7 +67,7 @@ class Scanner extends BasicEmitter {
public function getData($path) {
if (!$this->storage->isReadable($path)) {
//cant read, nothing we can do
- \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not readable !!!", \OCP\Util::DEBUG);
+ \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not accessible or present !!!", \OCP\Util::DEBUG);
return null;
}
$data = array();
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 85af4a9abef..2a28e6fce88 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -960,6 +960,10 @@ class View {
$content['permissions'] = $storage->getPermissions($content['path']);
$cache->update($content['fileid'], array('permissions' => $content['permissions']));
}
+ // if sharing was disabled for the user we remove the share permissions
+ if (\OCP\Util::isSharingDisabledForUser()) {
+ $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
+ }
$files[] = new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content);
}
@@ -1008,6 +1012,12 @@ class View {
}
}
$rootEntry['path'] = substr($path . '/' . $rootEntry['name'], strlen($user) + 2); // full path without /$user/
+
+ // if sharing was disabled for the user we remove the share permissions
+ if (\OCP\Util::isSharingDisabledForUser()) {
+ $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
+ }
+
$files[] = new FileInfo($path . '/' . $rootEntry['name'], $subStorage, '', $rootEntry);
}
}
diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php
index b81436baa06..2ac77faf48b 100644
--- a/lib/private/preview/txt.php
+++ b/lib/private/preview/txt.php
@@ -54,13 +54,20 @@ class TXT extends Provider {
$fontFile .= '/../../../core';
$fontFile .= '/fonts/OpenSans-Regular.ttf';
+ $canUseTTF = function_exists('imagettftext');
+
foreach($lines as $index => $line) {
$index = $index + 1;
$x = (int) 1;
$y = (int) ($index * $lineSize);
- imagettftext($image, $fontSize, 0, $x, $y, $textColor, $fontFile, $line);
+ if ($canUseTTF === true) {
+ imagettftext($image, $fontSize, 0, $x, $y, $textColor, $fontFile, $line);
+ } else {
+ $y -= $fontSize;
+ imagestring($image, 1, $x, $y, $line, $textColor);
+ }
if(($index * $lineSize) >= $maxY) {
break;