fix #1 - saving of config files
Dieser Commit ist enthalten in:
Ursprung
3ea22223d6
Commit
f0585f18c2
2 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
|
@ -69,15 +69,15 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
|
||||||
|
|
||||||
if (mr_arrayValue($request, 'checkrootdir') == 1) {
|
if (mr_arrayValue($request, 'checkrootdir') == 1) {
|
||||||
// root dir check is enabled, this results in error
|
// root dir check is enabled, this results in error
|
||||||
$sMsg = i18n("The specified directory '%s' does not exists", "cl-mod-rewrite");
|
$sMsgTpl = i18n("The specified directory '%s' does not exists", "cl-mod-rewrite");
|
||||||
$sMsg = sprintf($sMsg, $_SERVER['DOCUMENT_ROOT'] . $request['rootdir']);
|
$sMsg = sprintf($sMsgTpl, $_SERVER['DOCUMENT_ROOT'] . $request['rootdir']);
|
||||||
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
|
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
|
||||||
$bError = true;
|
$bError = true;
|
||||||
} else {
|
} else {
|
||||||
// root dir check ist disabled, take over the setting and
|
// root dir check ist disabled, take over the setting and
|
||||||
// output a warning.
|
// output a warning.
|
||||||
$sMsg = i18n("The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends DOCUMENT_ROOT. However, the setting will be taken over because of disabled check.", "cl-mod-rewrite");
|
$sMsgTpl = i18n("The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends DOCUMENT_ROOT. However, the setting will be taken over because of disabled check.", "cl-mod-rewrite");
|
||||||
$sMsg = sprintf($sMsg, $request['rootdir'], $_SERVER['DOCUMENT_ROOT']);
|
$sMsg = sprintf($sMsgTpl, $request['rootdir'], $_SERVER['DOCUMENT_ROOT']);
|
||||||
$this->_oView->rootdir_error = $this->_notifyBox('warning', $sMsg);
|
$this->_oView->rootdir_error = $this->_notifyBox('warning', $sMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
|
||||||
$this->_oView->content_before .= $this->_notifyBox('info', $sMsg);
|
$this->_oView->content_before .= $this->_notifyBox('info', $sMsg);
|
||||||
} else {
|
} else {
|
||||||
$sMsg = i18n("Configuration could not saved. Please check write permissions for %s ", "cl-mod-rewrite");
|
$sMsg = i18n("Configuration could not saved. Please check write permissions for %s ", "cl-mod-rewrite");
|
||||||
$sMsg = sprintf($sMsg, $options['key']);
|
$sMsg = sprintf($sMsg, mr_getConfigurationFilePath($this->_client));
|
||||||
$this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
|
$this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -688,12 +688,12 @@ function mr_setConfiguration($clientId, array $config) {
|
||||||
|
|
||||||
if(file_exists($sConfigClientPath) && is_writable($sConfigClientPath)) {
|
if(file_exists($sConfigClientPath) && is_writable($sConfigClientPath)) {
|
||||||
$file = $sConfigClientPath. 'config.mod_rewrite.php';
|
$file = $sConfigClientPath. 'config.mod_rewrite.php';
|
||||||
} else {
|
} else {
|
||||||
$file = cRegistry::getConfigValue('path', 'contenido') . cRegistry::getConfigValue('path', 'plugins') . 'cl-mod-rewrite/includes/config.mod_rewrite_' . cRegistry::getClientId() . '.php';
|
$file = cRegistry::getConfigValue('path', 'contenido') . cRegistry::getConfigValue('path', 'plugins') . 'cl-mod-rewrite/includes/config.mod_rewrite_' . cRegistry::getClientId() . '.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = file_put_contents($file, serialize($config));
|
$result = file_put_contents($file, serialize($config));
|
||||||
return ($result) ? true : false;
|
return (empty($result)) ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Laden …
In neuem Issue referenzieren