install sample config
This commit is contained in:
parent
aa5020d46b
commit
bc68b0eb5a
|
@ -116,7 +116,7 @@ if (!extension_loaded('zip')) {
|
|||
}
|
||||
// check for main config
|
||||
$mainConfig = new LAMCfgMain();
|
||||
if (!$mainConfig->isConfigFileExisting()) {
|
||||
if (!$mainConfig->isConfigFileExisting() && !$mainConfig->installSampleConfig()) {
|
||||
$criticalErrors[] = array("ERROR", "The main config file (config.cfg) does not exist.", "Please see the manual for installation instructions.");
|
||||
}
|
||||
// stop login if critical errors occured
|
||||
|
|
|
@ -2312,6 +2312,16 @@ class LAMCfgMain {
|
|||
return file_exists($this->conffile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to copy the config file from sample config.
|
||||
*
|
||||
* @return boolean copied
|
||||
*/
|
||||
public function installSampleConfig() {
|
||||
$samplePath = dirname(dirname(__FILE__)) . '/config/config.cfg.sample';
|
||||
return file_exists($samplePath) && copy($samplePath, $this->conffile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the path to the SSL CA certificate file that overrides the system certificates.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue