mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
5ec5bab294
|
@ -216,6 +216,8 @@
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.25
|
Changes in version 5.1.25
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
- certain fields in configuration can be disabled for editing, also works for
|
||||||
|
configuration fields of extensions
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.24
|
Changes in version 5.1.24
|
||||||
|
|
|
@ -310,13 +310,16 @@ if ($action == "saveSettings")
|
||||||
}
|
}
|
||||||
|
|
||||||
// SETTINGS - EXTENSIONS
|
// SETTINGS - EXTENSIONS
|
||||||
if(isset($_POST['extensions']) && !in_array('extensions', $settings->_hiddenConfFields)) {
|
if(isset($_POST['extensions'])) {
|
||||||
foreach($_POST['extensions'] as $extname=>$conf) {
|
foreach($_POST['extensions'] as $extname=>$conf) {
|
||||||
if(!in_array('extensions|'.$extname, $settings->_hiddenConfFields)) {
|
if(!in_array($extname.'|', $settings->_hiddenConfFields)) {
|
||||||
$settings->_extensions[$extname] = $conf;
|
foreach($conf as $confname=>$confval) {
|
||||||
|
if(!in_array($extname.'|'.$confname, $settings->_hiddenConfFields)) {
|
||||||
|
$settings->_extensions[$extname][$confname] = $confval;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// $settings->_extensions = isset($_POST["extensions"]) ? $_POST["extensions"] : array();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
|
@ -573,10 +573,12 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
foreach($extmgr->getExtensionConfiguration() as $extname=>$extconf) {
|
foreach($extmgr->getExtensionConfiguration() as $extname=>$extconf) {
|
||||||
if($this->hasHook('processConfig'))
|
if($this->hasHook('processConfig'))
|
||||||
$extconf = $this->callHook('processConfig', $extname, $extconf);
|
$extconf = $this->callHook('processConfig', $extname, $extconf);
|
||||||
|
if($this->isVisible($extname.'|')) {
|
||||||
if($extconf['config']) {
|
if($extconf['config']) {
|
||||||
$this->showRawConfigHeadline("<a name=\"".$extname."\"></a>".'<input type="hidden" name="extensions['.$extname.'][__disable__]" value="'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? '1' : '').'" /><i class="fa fa-circle'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? ' disabled' : ' enabled').'"></i> <span title="'.$extname.'">'.$extconf['title'].'</span>');
|
$this->showRawConfigHeadline("<a name=\"".$extname."\"></a>".'<input type="hidden" name="extensions['.$extname.'][__disable__]" value="'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? '1' : '').'" /><i class="fa fa-circle'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? ' disabled' : ' enabled').'"></i> <span title="'.$extname.'">'.$extconf['title'].'</span>');
|
||||||
foreach($extconf['config'] as $confkey=>$conf) {
|
foreach($extconf['config'] as $confkey=>$conf) {
|
||||||
ob_start();
|
ob_start();
|
||||||
|
if($this->isVisible($extname.'|'.$confkey)) {
|
||||||
switch($conf['type']) {
|
switch($conf['type']) {
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
?>
|
?>
|
||||||
|
@ -692,6 +694,9 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
default:
|
default:
|
||||||
$this->showTextField("extensions[".$extname."][".$confkey."]", isset($settings->_extensions[$extname][$confkey]) ? $settings->_extensions[$extname][$confkey] : '', isset($conf['type']) ? $conf['type'] : '', isset($conf['placeholder']) ? $conf['placeholder'] : '');
|
$this->showTextField("extensions[".$extname."][".$confkey."]", isset($settings->_extensions[$extname][$confkey]) ? $settings->_extensions[$extname][$confkey] : '', isset($conf['type']) ? $conf['type'] : '', isset($conf['placeholder']) ? $conf['placeholder'] : '');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
echo getMLText('settings_conf_field_not_editable');
|
||||||
|
}
|
||||||
$html = ob_get_clean();
|
$html = ob_get_clean();
|
||||||
$this->showConfigPlain($conf['title'], isset($conf['help']) ? $conf['help'] : '', $html);
|
$this->showConfigPlain($conf['title'], isset($conf['help']) ? $conf['help'] : '', $html);
|
||||||
}
|
}
|
||||||
|
@ -703,6 +708,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
echo '<input type="hidden" name="extensions['.$extname.'][__disable__]" value="'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? '1' : '').'" />'."\n";
|
echo '<input type="hidden" name="extensions['.$extname.'][__disable__]" value="'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? '1' : '').'" />'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->showEndPaneContent('extensions', $currenttab);
|
$this->showEndPaneContent('extensions', $currenttab);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user