forked from extern/egroupware
fix not working admin >> site configuration
This commit is contained in:
parent
bfdc1ca966
commit
b1b31e2b0b
@ -127,7 +127,7 @@ class admin_config
|
|||||||
}
|
}
|
||||||
|
|
||||||
$c = new Api\Config($config_appname);
|
$c = new Api\Config($config_appname);
|
||||||
$c->read_repository();
|
$old = $c->read_repository();
|
||||||
if ($_content['cancel'] || ($_content['save'] || $_content['apply']) && $GLOBALS['egw']->acl->check('site_config_acce',2,'admin'))
|
if ($_content['cancel'] || ($_content['save'] || $_content['apply']) && $GLOBALS['egw']->acl->check('site_config_acce',2,'admin'))
|
||||||
{
|
{
|
||||||
Api\Framework::redirect_link('/admin/index.php?ajax=true');
|
Api\Framework::redirect_link('/admin/index.php?ajax=true');
|
||||||
@ -179,11 +179,20 @@ class admin_config
|
|||||||
unset($GLOBALS['egw_info']['server']['found_validation_hook']);
|
unset($GLOBALS['egw_info']['server']['found_validation_hook']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$modifications = array_diff_assoc($c->config_data, $old);
|
||||||
|
$removals = array_diff_assoc($old, $c->config_data);
|
||||||
|
if ($modifications || $removals)
|
||||||
|
{
|
||||||
$c->save_repository();
|
$c->save_repository();
|
||||||
|
$msg = lang('Configuration saved.');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$msg = lang('Nothing to save.');
|
||||||
|
}
|
||||||
if(!$errors && !$_content['apply'])
|
if(!$errors && !$_content['apply'])
|
||||||
{
|
{
|
||||||
Api\Framework::message(lang('Configuration saved.'), 'success');
|
Api\Framework::message($msg, 'success');
|
||||||
Api\Framework::redirect_link('/index.php', array(
|
Api\Framework::redirect_link('/index.php', array(
|
||||||
'menuaction' => 'admin.admin_ui.index',
|
'menuaction' => 'admin.admin_ui.index',
|
||||||
'ajax' => 'true'
|
'ajax' => 'true'
|
||||||
@ -199,7 +208,7 @@ class admin_config
|
|||||||
}
|
}
|
||||||
elseif ($_content['apply'])
|
elseif ($_content['apply'])
|
||||||
{
|
{
|
||||||
Api\Framework::message(lang('Configuration saved.'), 'success');
|
Api\Framework::message($msg, 'success');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sel_options = $readonlys = array();
|
$sel_options = $readonlys = array();
|
||||||
@ -218,6 +227,8 @@ class admin_config
|
|||||||
$tmpl = new Api\Etemplate($appname.'.config');
|
$tmpl = new Api\Etemplate($appname.'.config');
|
||||||
$path = (parse_url($tmpl->rel_path, PHP_URL_SCHEME) !== 'vfs' ? EGW_SERVER_ROOT : '').$tmpl->rel_path;
|
$path = (parse_url($tmpl->rel_path, PHP_URL_SCHEME) !== 'vfs' ? EGW_SERVER_ROOT : '').$tmpl->rel_path;
|
||||||
$content = array(
|
$content = array(
|
||||||
|
'tabs' => $_content['tabs'],
|
||||||
|
'tabs2' => $_content['tabs2'],
|
||||||
'template' => $appname.'.config',
|
'template' => $appname.'.config',
|
||||||
'newsettings' => array(),
|
'newsettings' => array(),
|
||||||
);
|
);
|
||||||
|
@ -2,20 +2,6 @@
|
|||||||
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
|
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
|
||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
<overlay>
|
<overlay>
|
||||||
<template id="admin.config" template="" lang="" group="0" version="18.1">
|
|
||||||
<tabbox id="tabs" width="100%">
|
|
||||||
<tabs>
|
|
||||||
<tab id="general" label="General"/>
|
|
||||||
<tab id="appearance" label="Appearance"/>
|
|
||||||
<tab id="secrurity" label="Security"/>
|
|
||||||
</tabs>
|
|
||||||
<tabpanels>
|
|
||||||
<template id="admin.config.general"/>
|
|
||||||
<template id="admin.config.appearance"/>
|
|
||||||
<template id="admin.config.security"/>
|
|
||||||
</tabpanels>
|
|
||||||
</tabbox>
|
|
||||||
</template>
|
|
||||||
<template id="admin.config.general" template="" lang="" group="0" version="18.1">
|
<template id="admin.config.general" template="" lang="" group="0" version="18.1">
|
||||||
<grid width="100%" class="admin-config egwGridView_grid">
|
<grid width="100%" class="admin-config egwGridView_grid">
|
||||||
<columns>
|
<columns>
|
||||||
@ -325,4 +311,18 @@
|
|||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
|
<template id="admin.config" template="" lang="" group="0" version="18.1">
|
||||||
|
<tabbox id="tabs" width="100%">
|
||||||
|
<tabs>
|
||||||
|
<tab id="general" label="General"/>
|
||||||
|
<tab id="appearance" label="Appearance"/>
|
||||||
|
<tab id="security" label="Security"/>
|
||||||
|
</tabs>
|
||||||
|
<tabpanels>
|
||||||
|
<template id="admin.config.general"/>
|
||||||
|
<template id="admin.config.appearance"/>
|
||||||
|
<template id="admin.config.security"/>
|
||||||
|
</tabpanels>
|
||||||
|
</tabbox>
|
||||||
|
</template>
|
||||||
</overlay>
|
</overlay>
|
||||||
|
Loading…
Reference in New Issue
Block a user