Check if ReflectionMethod::getDocComment is working
This commit is contained in:
parent
1083085e6e
commit
287c8981bc
|
@ -938,6 +938,18 @@ class OC_Util {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if it's possible to get the inline annotations
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function isAnnotationsWorking() {
|
||||||
|
$reflection = new \ReflectionMethod(__METHOD__);
|
||||||
|
$docs = $reflection->getDocComment();
|
||||||
|
|
||||||
|
return (is_string($docs) && strlen($docs) > 50);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the PHP module fileinfo is loaded.
|
* @brief Check if the PHP module fileinfo is loaded.
|
||||||
* @return bool
|
* @return bool
|
||||||
|
|
|
@ -38,6 +38,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('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());
|
||||||
$tmpl->assign('old_php', OC_Util::isPHPoutdated());
|
$tmpl->assign('old_php', OC_Util::isPHPoutdated());
|
||||||
|
|
|
@ -83,6 +83,21 @@ if (!$_['isWebDavWorking']) {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Are doc blocks accessible?
|
||||||
|
if (!$_['isAnnotationsWorking']) {
|
||||||
|
?>
|
||||||
|
<fieldset class="personalblock">
|
||||||
|
<h2><?php p($l->t('Setup Warning'));?></h2>
|
||||||
|
|
||||||
|
<span class="securitywarning">
|
||||||
|
<?php p($l->t('PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.')); ?>
|
||||||
|
<?php p($l->t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.')); ?>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
// if module fileinfo available?
|
// if module fileinfo available?
|
||||||
if (!$_['has_fileinfo']) {
|
if (!$_['has_fileinfo']) {
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue