mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
temporary(?) fix to ensure certain old core apps still work, since their
configs are (still) api
This commit is contained in:
parent
4235b55980
commit
72628a8880
@ -20,17 +20,32 @@
|
|||||||
);
|
);
|
||||||
include('../header.inc.php');
|
include('../header.inc.php');
|
||||||
|
|
||||||
$config_appname = $appname;
|
switch($GLOBALS['HTTP_GET_VARS']['appname'])
|
||||||
if ($appname == 'admin' || $appname == 'preferences')
|
|
||||||
{
|
{
|
||||||
$appname = 'preferences';
|
case 'admin':
|
||||||
$config_appname = 'phpgwapi';
|
case 'preferences':
|
||||||
|
$appname = 'preferences';
|
||||||
|
$config_appname = 'phpgwapi';
|
||||||
|
break;
|
||||||
|
case 'addressbook':
|
||||||
|
case 'calendar':
|
||||||
|
case 'email':
|
||||||
|
/*
|
||||||
|
Other special apps can go here for now, e.g.:
|
||||||
|
case 'bogusappname':
|
||||||
|
*/
|
||||||
|
$appname = $GLOBALS['HTTP_GET_VARS']['appname'];
|
||||||
|
$config_appname = 'phpgwapi';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$appname = $GLOBALS['HTTP_GET_VARS']['appname'];
|
||||||
|
$config_appname = $appname;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir($appname));
|
|
||||||
|
$t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir($appname));
|
||||||
$t->set_unknowns('keep');
|
$t->set_unknowns('keep');
|
||||||
$t->set_file(array(
|
$t->set_file(array('config' => 'config.tpl'));
|
||||||
'config' => 'config.tpl'
|
|
||||||
));
|
|
||||||
$t->set_block('config','header','header');
|
$t->set_block('config','header','header');
|
||||||
$t->set_block('config','body','body');
|
$t->set_block('config','body','body');
|
||||||
$t->set_block('config','footer','footer');
|
$t->set_block('config','footer','footer');
|
||||||
@ -43,12 +58,12 @@
|
|||||||
$current_config = $c->config_data;
|
$current_config = $c->config_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cancel)
|
if ($GLOBALS['HTTP_POST_VARS']['cancel'])
|
||||||
{
|
{
|
||||||
Header('Location: '.$phpgw->link('/admin/index.php'));
|
Header('Location: '.$GLOBALS['phpgw']->link('/admin/index.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($submit)
|
if ($GLOBALS['HTTP_POST_VARS']['submit'])
|
||||||
{
|
{
|
||||||
while (list($key,$config) = each($newsettings))
|
while (list($key,$config) = each($newsettings))
|
||||||
{
|
{
|
||||||
@ -63,24 +78,24 @@
|
|||||||
}
|
}
|
||||||
$c->save_repository(True);
|
$c->save_repository(True);
|
||||||
|
|
||||||
Header('Location: '.$phpgw->link('/admin/index.php'));
|
Header('Location: '.$GLOBALS['phpgw']->link('/admin/index.php'));
|
||||||
$phpgw->common->phpgw_exit();
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->common->phpgw_header();
|
$GLOBALS['phpgw']->common->phpgw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$t->set_var('title',lang('Site Configuration'));
|
$t->set_var('title',lang('Site Configuration'));
|
||||||
$t->set_var('action_url',$phpgw->link('/admin/config.php','appname=' . $appname));
|
$t->set_var('action_url',$GLOBALS['phpgw']->link('/admin/config.php','appname=' . $appname));
|
||||||
$t->set_var('th_bg',$phpgw_info['theme']['th_bg']);
|
$t->set_var('th_bg', $GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||||
$t->set_var('th_text',$phpgw_info['theme']['th_text']);
|
$t->set_var('th_text', $GLOBALS['phpgw_info']['theme']['th_text']);
|
||||||
$t->set_var('row_on',$phpgw_info['theme']['row_on']);
|
$t->set_var('row_on', $GLOBALS['phpgw_info']['theme']['row_on']);
|
||||||
$t->set_var('row_off',$phpgw_info['theme']['row_off']);
|
$t->set_var('row_off', $GLOBALS['phpgw_info']['theme']['row_off']);
|
||||||
$t->pparse('out','header');
|
$t->pparse('out','header');
|
||||||
|
|
||||||
$vars = $t->get_undefined('body');
|
$vars = $t->get_undefined('body');
|
||||||
|
|
||||||
$phpgw->common->hook_single('config',$appname);
|
$GLOBALS['phpgw']->common->hook_single('config',$appname);
|
||||||
|
|
||||||
while (list($null,$value) = each($vars))
|
while (list($null,$value) = each($vars))
|
||||||
{
|
{
|
||||||
@ -96,10 +111,10 @@
|
|||||||
|
|
||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case "lang":
|
case 'lang':
|
||||||
$t->set_var($value,lang($newval));
|
$t->set_var($value,lang($newval));
|
||||||
break;
|
break;
|
||||||
case "value":
|
case 'value':
|
||||||
$newval = ereg_replace(' ','_',$newval);
|
$newval = ereg_replace(' ','_',$newval);
|
||||||
$t->set_var($value,$current_config[$newval]);
|
$t->set_var($value,$current_config[$newval]);
|
||||||
break;
|
break;
|
||||||
@ -114,7 +129,7 @@
|
|||||||
$t->set_var($value,'');
|
$t->set_var($value,'');
|
||||||
}
|
}
|
||||||
break;*/
|
break;*/
|
||||||
case "selected":
|
case 'selected':
|
||||||
$configs = array();
|
$configs = array();
|
||||||
$config = '';
|
$config = '';
|
||||||
$newvals = explode(' ',$newval);
|
$newvals = explode(' ',$newval);
|
||||||
@ -149,5 +164,5 @@
|
|||||||
$t->set_var('lang_submit', lang('submit'));
|
$t->set_var('lang_submit', lang('submit'));
|
||||||
$t->set_var('lang_cancel', lang('cancel'));
|
$t->set_var('lang_cancel', lang('cancel'));
|
||||||
$t->pfp('out','footer');
|
$t->pfp('out','footer');
|
||||||
$phpgw->common->phpgw_footer();
|
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user