Browse Source

extension_loaded fileinfo

https://github.com/FreshRSS/FreshRSS/issues/1375
Alexandre Alapetite 9 years ago
parent
commit
b28b6a4bf2

+ 4 - 0
app/i18n/cz/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'Tabulka kanálů je nastavena špatně.',
 			'ok' => 'Tabulka kanálů je v pořádku.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Nemáte PHP fileinfo (balíček fileinfo).',
+			'ok' => 'Máte rozšíření fileinfo.',
+		),
 		'files' => 'Instalace souborů',
 		'json' => array(
 			'nok' => 'Nemáte JSON (balíček php5-json).',

+ 4 - 0
app/i18n/cz/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => 'Zkontrolujte oprávnění adresáře <em>./data/favicons</em>. HTTP server musí mít do tohoto adresáře práva zápisu',
 			'ok' => 'Oprávnění adresáře favicons jsou v pořádku.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Nemáte PHP fileinfo (balíček fileinfo).',
+			'ok' => 'Máte rozšíření fileinfo.',
+		),
 		'http_referer' => array(
 			'nok' => 'Zkontrolujte prosím že neměníte HTTP REFERER.',
 			'ok' => 'Váš HTTP REFERER je znám a odpovídá Vašemu serveru.',

+ 4 - 0
app/i18n/de/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'Die Tabelle <em>feed</em> ist schlecht konfiguriert.',
 			'ok' => 'Die Tabelle <em>feed</em> ist korrekt konfiguriert.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Ihnen fehlt PHP fileinfo (Paket fileinfo).',
+			'ok' => 'Sie haben die fileinfo-Erweiterung.',
+		),
 		'files' => 'Datei-Installation',
 		'json' => array(
 			'nok' => 'Ihnen fehlt die JSON-Erweiterung (Paket php5-json).',

+ 4 - 0
app/i18n/de/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => 'Überprüfen Sie die Berechtigungen des Verzeichnisses <em>./data/favicons</em>. Der HTTP-Server muss Schreibrechte besitzen.',
 			'ok' => 'Die Berechtigungen des Verzeichnisses <em>./data/favicons</em> sind in Ordnung.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Ihnen fehlt PHP fileinfo (Paket fileinfo).',
+			'ok' => 'Sie haben die fileinfo-Erweiterung.',
+		),
 		'http_referer' => array(
 			'nok' => 'Bitte stellen Sie sicher, dass Sie Ihren HTTP REFERER nicht abändern.',
 			'ok' => 'Ihr HTTP REFERER ist bekannt und entspricht Ihrem Server.',

+ 4 - 0
app/i18n/en/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'Feed table is bad configured.',
 			'ok' => 'Feed table is ok.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Cannot find the PHP fileinfo library (fileinfo package).',
+			'ok' => 'You have the fileinfo library.',
+		),
 		'files' => 'File installation',
 		'json' => array(
 			'nok' => 'Cannot find JSON (php5-json package).',

+ 4 - 0
app/i18n/en/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => 'Check permissions on <em>./data/favicons</em> directory. HTTP server must have rights to write into',
 			'ok' => 'Permissions on favicons directory are good.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Cannot find the PHP fileinfo library (fileinfo package).',
+			'ok' => 'You have the fileinfo library.',
+		),
 		'http_referer' => array(
 			'nok' => 'Please check that you are not altering your HTTP REFERER.',
 			'ok' => 'Your HTTP REFERER is known and corresponds to your server.',

+ 4 - 0
app/i18n/fr/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'La table feed est mal configurée.',
 			'ok' => 'La table feed est bien configurée.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Impossible de trouver la librairie PHP fileinfo (paquet fileinfo).',
+			'ok' => 'Vous disposez de la librairie fileinfo.',
+		),
 		'files' => 'Installation des fichiers',
 		'json' => array(
 			'nok' => 'Vous ne disposez pas de JSON (paquet php5-json).',

+ 4 - 0
app/i18n/fr/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => 'Veuillez vérifier les droits sur le répertoire <em>./data/favicons</em>. Le serveur HTTP doit être capable d’écrire dedans',
 			'ok' => 'Les droits sur le répertoire des favicons sont bons.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Vous ne disposez pas de PHP fileinfo (paquet fileinfo).',
+			'ok' => 'Vous disposez de fileinfo.',
+		),
 		'http_referer' => array(
 			'nok' => 'Veuillez vérifier que vous ne modifiez pas votre HTTP REFERER.',
 			'ok' => 'Le HTTP REFERER est connu et semble correspondre à votre serveur.',

+ 4 - 0
app/i18n/it/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'La tabella Feed ha una configurazione errata.',
 			'ok' => 'Tabella Feed OK.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Manca il supporto per PHP fileinfo (pacchetto fileinfo).',
+			'ok' => 'Estensione fileinfo presente.',
+		),
 		'files' => 'Installazione files',
 		'json' => array(
 			'nok' => 'Manca il supoorto a JSON (pacchetto php5-json).',

+ 4 - 0
app/i18n/it/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => 'Verifica i permessi sulla cartella <em>./data/favicons</em>. Il server HTTP deve avere i permessi per scriverci dentro',
 			'ok' => 'I permessi sulla cartella favicons sono corretti.',
 		),
+		'fileinfo' => array(
+			'nok' => 'Manca il supporto per PHP fileinfo (pacchetto fileinfo).',
+			'ok' => 'Estensione fileinfo presente.',
+		),
 		'http_referer' => array(
 			'nok' => 'Per favore verifica che non stai alterando il tuo HTTP REFERER.',
 			'ok' => 'Il tuo HTTP REFERER riconosciuto corrisponde al tuo server.',

+ 4 - 0
app/i18n/nl/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'Feed tabel is slecht geconfigureerd.',
 			'ok' => 'Feed tabel is ok.',
 		),
+		'fileinfo' => array(
+			'nok' => 'U mist de PHP fileinfo (fileinfo package).',
+			'ok' => 'U hebt de fileinfo uitbreiding.',
+		),
 		'files' => 'Bestanden installatie',
 		'json' => array(
 			'nok' => 'U mist JSON (php5-json package).',

+ 4 - 0
app/i18n/nl/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => 'Controleer permissies van de <em>./data/favicons</em> map. HTTP server moet rechten hebben om er in te kunnen schrijven',
 			'ok' => 'Permissies van de favicons map zijn goed.',
 		),
+		'fileinfo' => array(
+			'nok' => 'U mist PHP fileinfo (fileinfo package).',
+			'ok' => 'U hebt de fileinfo uitbreiding.',
+		),
 		'http_referer' => array(
 			'nok' => 'Controleer a.u.b. dat u niet uw HTTP REFERER wijzigd.',
 			'ok' => 'Uw HTTP REFERER is bekend en komt overeen met uw server.',

+ 4 - 0
app/i18n/ru/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'Таблица подписок (feed) неправильно настроена.',
 			'ok' => 'Таблица подписок (feed) настроена правильно.',
 		),
+		'fileinfo' => array(
+			'nok' => 'У вас не установлено расширение PHP fileinfo (пакет fileinfo).',
+			'ok' => 'У вас установлено расширение fileinfo.',
+		),
 		'files' => 'Установка файлов',
 		'json' => array(
 			'nok' => 'У вас не установлена библиотека для работы с JSON (пакет php5-json).',

+ 4 - 0
app/i18n/ru/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => 'Проверьте права доступа к папке <em>./data/favicons</em> . Сервер HTTP должен иметь права на запись в эту папку.',
 			'ok' => 'Права на папку значков в порядке.',
 		),
+		'fileinfo' => array(
+			'nok' => 'У вас нет расширения PHP fileinfo (пакет fileinfo).',
+			'ok' => 'У вас установлено расширение fileinfo.',
+		),
 		'http_referer' => array(
 			'nok' => 'Убедитесь, что вы не изменяете ваш HTTP REFERER.',
 			'ok' => 'Ваш HTTP REFERER известен и соотвествует вашему серверу.',

+ 4 - 0
app/i18n/tr/admin.php

@@ -57,6 +57,10 @@ return array(
 			'nok' => 'Akış tablosu kötü yapılandırılmış.',
 			'ok' => 'Akış tablosu sorunsuz.',
 		),
+		'fileinfo' => array(
+			'nok' => 'PHP fileinfo eksik (fileinfo package).',
+			'ok' => 'fileinfo eklentisi sorunsuz.',
+		),
 		'files' => 'Dosya kurulumu',
 		'json' => array(
 			'nok' => 'JSON eklentisi eksik (php5-json package).',

+ 4 - 0
app/i18n/tr/install.php

@@ -56,6 +56,10 @@ return array(
 			'nok' => '<em>./data/favicons</em> klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı',
 			'ok' => 'Site ikonu klasörü yetkileri sorunsuz.',
 		),
+		'fileinfo' => array(
+			'nok' => 'PHP fileinfo eksik (fileinfo package).',
+			'ok' => 'fileinfo eklentisi sorunsuz.',
+		),
 		'http_referer' => array(
 			'nok' => 'Lütfen HTTP REFERER değiştirmediğinize emin olun.',
 			'ok' => 'HTTP REFERER ve sunucunuz arası iletişim sorunsuz.',

+ 6 - 0
app/install.php

@@ -478,6 +478,12 @@ function printStep1() {
 	<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.xml.nok'); ?></p>
 	<?php } ?>
 
+	<?php if ($res['fileinfo'] == 'ok') { ?>
+	<p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.fileinfo.ok'); ?></p>
+	<?php } else { ?>
+	<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.fileinfo.nok'); ?></p>
+	<?php } ?>
+
 	<?php if ($res['data'] == 'ok') { ?>
 	<p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.data.ok'); ?></p>
 	<?php } else { ?>

+ 3 - 1
lib/lib_install.php

@@ -15,6 +15,7 @@ function checkRequirements() {
 	$pdo = $pdo_mysql || $pdo_sqlite || $pdo_pgsql;
 	$pcre = extension_loaded('pcre');
 	$ctype = extension_loaded('ctype');
+	$fileinfo = extension_loaded('fileinfo');
 	$dom = class_exists('DOMDocument');
 	$xml = function_exists('xml_parser_create');
 	$json = function_exists('json_encode');
@@ -34,6 +35,7 @@ function checkRequirements() {
 		'pdo' => $pdo ? 'ok' : 'ko',
 		'pcre' => $pcre ? 'ok' : 'ko',
 		'ctype' => $ctype ? 'ok' : 'ko',
+		'fileinfo' => $fileinfo ? 'ok' : 'ko',
 		'dom' => $dom ? 'ok' : 'ko',
 		'xml' => $xml ? 'ok' : 'ko',
 		'json' => $json ? 'ok' : 'ko',
@@ -42,7 +44,7 @@ function checkRequirements() {
 		'users' => $users ? 'ok' : 'ko',
 		'favicons' => $favicons ? 'ok' : 'ko',
 		'http_referer' => $http_referer ? 'ok' : 'ko',
-		'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $xml &&
+		'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $fileinfo && $dom && $xml &&
 		         $data && $cache && $users && $favicons && $http_referer ?
 		         'ok' : 'ko'
 	);

+ 1 - 0
lib/lib_rss.php

@@ -398,6 +398,7 @@ function check_install_php() {
 		'pdo' => $pdo_mysql || $pdo_sqlite,
 		'pcre' => extension_loaded('pcre'),
 		'ctype' => extension_loaded('ctype'),
+		'fileinfo' => extension_loaded('fileinfo'),
 		'dom' => class_exists('DOMDocument'),
 		'json' => extension_loaded('json'),
 		'zip' => extension_loaded('zip'),