Disable some server checks when running on HHVM

Ref https://github.com/owncloud/core/issues/10837#issuecomment-76516839
This commit is contained in:
Lukas Reschke 2015-02-28 10:08:41 +01:00
parent 42f6448da2
commit 4100610390
1 changed files with 34 additions and 26 deletions

View File

@ -608,36 +608,44 @@ class OC_Util {
$invalidIniSettings = []; $invalidIniSettings = [];
$moduleHint = $l->t('Please ask your server administrator to install the module.'); $moduleHint = $l->t('Please ask your server administrator to install the module.');
foreach ($dependencies['classes'] as $class => $module) { /**
if (!class_exists($class)) { * FIXME: The dependency check does not work properly on HHVM on the moment
$missingDependencies[] = $module; * and prevents installation. Once HHVM is more compatible with our
} * approach to check for these values we should re-enable those
} * checks.
foreach ($dependencies['functions'] as $function => $module) { */
if (!function_exists($function)) { if (!self::runningOnHhvm()) {
$missingDependencies[] = $module; foreach ($dependencies['classes'] as $class => $module) {
} if (!class_exists($class)) {
} $missingDependencies[] = $module;
foreach ($dependencies['defined'] as $defined => $module) {
if (!defined($defined)) {
$missingDependencies[] = $module;
}
}
foreach($dependencies['ini'] as $setting => $expected) {
$iniWrapper = \OC::$server->getIniWrapper();
if(is_bool($expected)) {
if($iniWrapper->getBool($setting) !== $expected) {
$invalidIniSettings[] = [$setting, $expected];
} }
} }
if(is_int($expected)) { foreach ($dependencies['functions'] as $function => $module) {
if($iniWrapper->getNumeric($setting) !== $expected) { if (!function_exists($function)) {
$invalidIniSettings[] = [$setting, $expected]; $missingDependencies[] = $module;
} }
} }
if(is_string($expected)) { foreach ($dependencies['defined'] as $defined => $module) {
if(strtolower($iniWrapper->getString($setting)) !== strtolower($expected)) { if (!defined($defined)) {
$invalidIniSettings[] = [$setting, $expected]; $missingDependencies[] = $module;
}
}
foreach ($dependencies['ini'] as $setting => $expected) {
$iniWrapper = \OC::$server->getIniWrapper();
if (is_bool($expected)) {
if ($iniWrapper->getBool($setting) !== $expected) {
$invalidIniSettings[] = [$setting, $expected];
}
}
if (is_int($expected)) {
if ($iniWrapper->getNumeric($setting) !== $expected) {
$invalidIniSettings[] = [$setting, $expected];
}
}
if (is_string($expected)) {
if (strtolower($iniWrapper->getString($setting)) !== strtolower($expected)) {
$invalidIniSettings[] = [$setting, $expected];
}
} }
} }
} }