Merge pull request #9890 from owncloud/check-php-charset-master
setting and checking default_charset in php.ini to be UTF-8
This commit is contained in:
commit
3e493501da
|
@ -1467,4 +1467,11 @@ class OC_Util {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function isPhpCharSetUtf8() {
|
||||||
|
return ini_get('default_charset') === 'UTF-8';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ $tmpl->assign('entriesremain', $entriesremain);
|
||||||
$tmpl->assign('htaccessworking', $htaccessworking);
|
$tmpl->assign('htaccessworking', $htaccessworking);
|
||||||
$tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled() ? OC_Util::isInternetConnectionWorking() : false);
|
$tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled() ? OC_Util::isInternetConnectionWorking() : false);
|
||||||
$tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking());
|
$tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking());
|
||||||
|
$tmpl->assign('isPhpCharSetUtf8', OC_Util::isPhpCharSetUtf8());
|
||||||
$tmpl->assign('isAnnotationsWorking', OC_Util::isAnnotationsWorking());
|
$tmpl->assign('isAnnotationsWorking', OC_Util::isAnnotationsWorking());
|
||||||
$tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking());
|
$tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking());
|
||||||
$tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
|
$tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
|
||||||
|
|
|
@ -129,14 +129,28 @@ if (!$_['has_fileinfo']) {
|
||||||
// is PHP at least at 5.3.8?
|
// is PHP at least at 5.3.8?
|
||||||
if ($_['old_php']) {
|
if ($_['old_php']) {
|
||||||
?>
|
?>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2><?php p($l->t('Your PHP version is outdated'));?></h2>
|
<h2><?php p($l->t('Your PHP version is outdated'));?></h2>
|
||||||
|
|
||||||
<span class="connectionwarning">
|
<span class="connectionwarning">
|
||||||
<?php p($l->t('Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly.')); ?>
|
<?php p($l->t('Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly.')); ?>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
// is PHP charset set to UTF8?
|
||||||
|
if (!$_['isPhpCharSetUtf8']) {
|
||||||
|
?>
|
||||||
|
<div class="section">
|
||||||
|
<h2><?php p($l->t('PHP charset is not set to UTF-8'));?></h2>
|
||||||
|
|
||||||
|
<span class="connectionwarning">
|
||||||
|
<?php p($l->t("PHP charset is not set to UTF-8. This can cause major issues with non-acsii characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'.")); ?>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,14 +182,14 @@ if (!$_['isLocaleWorking']) {
|
||||||
// is internet connection working ?
|
// is internet connection working ?
|
||||||
if (!$_['internetconnectionworking']) {
|
if (!$_['internetconnectionworking']) {
|
||||||
?>
|
?>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2><?php p($l->t('Internet connection not working'));?></h2>
|
<h2><?php p($l->t('Internet connection not working'));?></h2>
|
||||||
|
|
||||||
<span class="connectionwarning">
|
<span class="connectionwarning">
|
||||||
<?php p($l->t('This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features.')); ?>
|
<?php p($l->t('This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features.')); ?>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue