Merge pull request #6685 from nupplaphil/basepath_fix

Basepath fix
This commit is contained in:
Michael Vogel 2019-02-18 12:00:35 +01:00 committed by GitHub
commit a3152a96c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 21 deletions

View file

@ -219,7 +219,7 @@ class App
$this->logger = $logger;
$this->config = $config;
$this->profiler = $profiler;
$this->basePath = $this->config->getCache()->get('system', 'basepath');
$this->basePath = $this->config->get('system', 'basepath');
if (!Core\System::isDirectoryUsable($this->basePath, false)) {
throw new Exception('Basepath \'' . $this->basePath . '\' isn\'t usable.');

View file

@ -57,13 +57,14 @@ class JITConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAdapte
// manage array value
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
$this->in_db[$cat][$key] = true;
return $value;
} else {
$this->in_db[$cat][$key] = false;
return '!<unset>!';
if (isset($value) && $value !== '') {
$this->in_db[$cat][$key] = true;
return $value;
}
}
$this->in_db[$cat][$key] = false;
return '!<unset>!';
}
/**

View file

@ -57,13 +57,14 @@ class JITPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfigAdap
// manage array value
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $pconfig['v']) ? unserialize($pconfig['v']) : $pconfig['v']);
$this->in_db[$uid][$cat][$key] = true;
return $value;
} else {
$this->in_db[$uid][$cat][$key] = false;
return '!<unset>!';
if (isset($value) && $value !== '') {
$this->in_db[$uid][$cat][$key] = true;
return $value;
}
}
$this->in_db[$uid][$cat][$key] = false;
return '!<unset>!';
}
/**

View file

@ -55,11 +55,12 @@ class PreloadConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAd
// manage array value
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
return $value;
} else {
return '!<unset>!';
if (isset($value) && $value !== '') {
return $value;
}
}
return '!<unset>!';
}
/**

View file

@ -71,10 +71,11 @@ class PreloadPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfig
// manage array value
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
return $value;
} else {
return '!<unset>!';
if (isset($value) && $value !== '') {
return $value;
}
}
return '!<unset>!';
}
/**

View file

@ -439,7 +439,7 @@ class Worker
Logger::log("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - done in ".number_format($duration, 4)." seconds. Process PID: ".$new_process_id);
$a->getProfiler()->saveLog("ID " . $queue["id"] . ": " . $funcname);
$a->getProfiler()->saveLog($a->getLogger(), "ID " . $queue["id"] . ": " . $funcname);
$cooldown = Config::get("system", "worker_cooldown", 0);