|
|
@ -446,6 +446,10 @@ class Pico |
|
|
|
protected function loadConfig() |
|
|
|
protected function loadConfig() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$config = null; |
|
|
|
$config = null; |
|
|
|
|
|
|
|
if (file_exists($this->getConfigDir() . 'config.php')) { |
|
|
|
|
|
|
|
require($this->getConfigDir() . 'config.php'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$defaultConfig = array( |
|
|
|
$defaultConfig = array( |
|
|
|
'site_title' => 'Pico', |
|
|
|
'site_title' => 'Pico', |
|
|
|
'base_url' => '', |
|
|
|
'base_url' => '', |
|
|
@ -460,11 +464,6 @@ class Pico |
|
|
|
'timezone' => '' |
|
|
|
'timezone' => '' |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
$configFile = $this->getConfigDir() . 'config.php'; |
|
|
|
|
|
|
|
if (file_exists($configFile)) { |
|
|
|
|
|
|
|
require $configFile; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->config = is_array($this->config) ? $this->config : array(); |
|
|
|
$this->config = is_array($this->config) ? $this->config : array(); |
|
|
|
$this->config += is_array($config) ? $config + $defaultConfig : $defaultConfig; |
|
|
|
$this->config += is_array($config) ? $config + $defaultConfig : $defaultConfig; |
|
|
|
|
|
|
|
|
|
|
@ -1308,7 +1307,7 @@ class Pico |
|
|
|
* @param string $path relative or absolute path |
|
|
|
* @param string $path relative or absolute path |
|
|
|
* @return string absolute path |
|
|
|
* @return string absolute path |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected function getAbsolutePath($path) |
|
|
|
public function getAbsolutePath($path) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (substr($path, 0, 1) !== '/') { |
|
|
|
if (substr($path, 0, 1) !== '/') { |
|
|
|
$path = $this->getRootDir() . $path; |
|
|
|
$path = $this->getRootDir() . $path; |
|
|
|