Follow-up to c72ea0e
Don't use Pico::getAbsolutePath() for $config['content_dir'], just make sure the trailing slash exists. The config.php in Picos root dir should be interpreted exactly like in Pico 0.9 (the option didn't exist in Pico 0.8), thus the path isn't necessarily relative to Picos root dir
This commit is contained in:
parent
71076e8eba
commit
c0d30d20f8
1 changed files with 4 additions and 12 deletions
|
@ -176,19 +176,11 @@ class PicoDeprecated extends AbstractPicoPlugin
|
|||
require($this->getRootDir() . 'config.php');
|
||||
|
||||
if (is_array($config)) {
|
||||
if (array_key_exists('base_url', $config)) {
|
||||
if (!empty($config['base_url'])) {
|
||||
$config['base_url'] = rtrim($config['base_url'], '/') . '/';
|
||||
} else {
|
||||
unset($config['base_url']);
|
||||
}
|
||||
if (isset($config['base_url'])) {
|
||||
$config['base_url'] = rtrim($config['base_url'], '/') . '/';
|
||||
}
|
||||
if (array_key_exists('content_dir', $config)) {
|
||||
if (!empty($config['content_dir'])) {
|
||||
$config['content_dir'] = $this->getAbsolutePath($config['content_dir']);
|
||||
} else {
|
||||
unset($config['content_dir']);
|
||||
}
|
||||
if (isset($config['content_dir'])) {
|
||||
$config['content_dir'] = rtrim($config['content_dir'], '/') . '/';
|
||||
}
|
||||
|
||||
$realConfig = $config + $realConfig;
|
||||
|
|
Loading…
Reference in a new issue