Skip to content
Snippets Groups Projects
Commit e969a78c authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Merge pull request #1443 from owncloud/use-module-file-info-master

we get best results regarding mime type detection if we use fileinfo - l...
parents 93b15973 6058c2f7
No related branches found
No related tags found
No related merge requests found
......@@ -534,6 +534,14 @@ class OC_Util {
}
}
/**
* Check if the PHP module fileinfo is loaded.
* @return bool
*/
public static function fileInfoLoaded() {
return function_exists('finfo_open');
}
/**
* Check if the ownCloud server can connect to the internet
*/
......
......@@ -31,6 +31,7 @@ $tmpl->assign('entriesremain', $entriesremain);
$tmpl->assign('htaccessworking', $htaccessworking);
$tmpl->assign('internetconnectionworking', OC_Util::isinternetconnectionworking());
$tmpl->assign('islocaleworking', OC_Util::issetlocaleworking());
$tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
$tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
......
......@@ -22,7 +22,20 @@ if (!$_['htaccessworking']) {
<?php
}
// is locale working ?
// if module fileinfo available?
if (!$_['has_fileinfo']) {
?>
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Module \'fileinfo\' missing');?></strong></legend>
<span class="connectionwarning">
<?php echo $l->t('The PHP module \'fileinfo\' is missing. We strongly recommend to enable this module to get best results with mime-type detection.'); ?>
</span>
</fieldset>
<?php
}
if (!$_['islocaleworking']) {
?>
<fieldset class="personalblock">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment