Skip to content

Commit c37e29a

Browse files
committed
feat: Write config file and backup file to var/config if defined
1 parent 6546374 commit c37e29a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Horde/Config.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@ public function getPHPConfig()
302302
public function writePHPConfig($formvars, &$php = null)
303303
{
304304
$php = $this->generatePHPConfig($formvars);
305-
$path = $GLOBALS['registry']->get('fileroot', $this->_app) . '/config';
305+
if (defined('HORDE_CONFIG_BASE')) {
306+
$path = HORDE_CONFIG_BASE;
307+
} else {
308+
$path = $GLOBALS['registry']->get('fileroot', $this->_app) . '/config';
309+
}
306310
$configFile = $this->configFile();
307311
if (file_exists($configFile)) {
308312
if (@copy($configFile, $path . '/conf.bak.php')) {

0 commit comments

Comments
 (0)