Merge pull request #1443 from owncloud/use-module-file-info-master
we get best results regarding mime type detection if we use fileinfo - l...
This commit is contained in:
commit
e969a78cf9
|
@ -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
|
* Check if the ownCloud server can connect to the internet
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -31,6 +31,7 @@ $tmpl->assign('entriesremain', $entriesremain);
|
||||||
$tmpl->assign('htaccessworking', $htaccessworking);
|
$tmpl->assign('htaccessworking', $htaccessworking);
|
||||||
$tmpl->assign('internetconnectionworking', OC_Util::isinternetconnectionworking());
|
$tmpl->assign('internetconnectionworking', OC_Util::isinternetconnectionworking());
|
||||||
$tmpl->assign('islocaleworking', OC_Util::issetlocaleworking());
|
$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('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
|
||||||
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
|
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,20 @@ if (!$_['htaccessworking']) {
|
||||||
<?php
|
<?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']) {
|
if (!$_['islocaleworking']) {
|
||||||
?>
|
?>
|
||||||
<fieldset class="personalblock">
|
<fieldset class="personalblock">
|
||||||
|
|
Loading…
Reference in New Issue