Browse Source

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

we get best results regarding mime type detection if we use fileinfo - l...
remotes/origin/stable5
Lukas Reschke 13 years ago
parent
commit
e969a78cf9
  1. 8
      lib/util.php
  2. 1
      settings/admin.php
  3. 15
      settings/templates/admin.php

8
lib/util.php

@ -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
*/

1
settings/admin.php

@ -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'));

15
settings/templates/admin.php

@ -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">

Loading…
Cancel
Save