[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup config.php,1.72.2.1,1.72.2.2
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup config.php,1.72.2.1,1.72.2.2 |
Date: |
Sun, 07 Apr 2002 16:29:22 -0400 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv19475/setup
Modified Files:
Tag: Version-0_9_14-branch
config.php
Log Message:
Changed to GLOBALS[''] for phpgw_setup.
Index: config.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/config.php,v
retrieving revision 1.72.2.1
retrieving revision 1.72.2.2
diff -C2 -r1.72.2.1 -r1.72.2.2
*** config.php 8 Feb 2002 17:00:33 -0000 1.72.2.1
--- config.php 7 Apr 2002 20:29:19 -0000 1.72.2.2
***************
*** 25,29 ****
Does not return unless user is authorized
*/
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 25,29 ----
Does not return unless user is authorized
*/
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 31,35 ****
}
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 31,35 ----
}
! $tpl_root = $GLOBALS['phpgw_setup']->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 44,48 ****
set_magic_quotes_runtime(0);
! $phpgw_setup->loaddb();
/* Guessing default values. */
--- 44,48 ----
set_magic_quotes_runtime(0);
! $GLOBALS['phpgw_setup']->loaddb();
/* Guessing default values. */
***************
*** 75,79 ****
}
! if ($HTTP_POST_VARS['cancel'])
{
Header('Location: index.php');
--- 75,79 ----
}
! if (@$GLOBALS['HTTP_POST_VARS']['cancel'])
{
Header('Location: index.php');
***************
*** 82,87 ****
/* Check api version, use correct table */
! $setup_info = $phpgw_setup->get_db_versions();
! if($phpgw_setup->alessthanb($setup_info['phpgwapi']['currentver'],
'0.9.10pre7'))
{
$configtbl = 'config';
--- 82,87 ----
/* Check api version, use correct table */
! $setup_info = $GLOBALS['phpgw_setup']->get_db_versions();
!
if($GLOBALS['phpgw_setup']->alessthanb($setup_info['phpgwapi']['currentver'],
'0.9.10pre7'))
{
$configtbl = 'config';
***************
*** 92,103 ****
}
! if ($HTTP_POST_VARS['submit'] && $HTTP_POST_VARS['newsettings'])
{
! $phpgw_setup->db->transaction_begin();
/* This is only temp: */
! $phpgw_setup->db->query("DELETE FROM $configtbl WHERE
config_name='useframes'");
! $phpgw_setup->db->query("INSERT INTO $configtbl
(config_app,config_name, config_value) values
('phpgwapi','useframes','never')");
! $newsettings = $HTTP_POST_VARS['newsettings'];
while (list($setting,$value) = @each($newsettings))
--- 92,103 ----
}
! if (@$GLOBALS['HTTP_POST_VARS']['submit'] &&
@$GLOBALS['HTTP_POST_VARS']['newsettings'])
{
! $GLOBALS['phpgw_setup']->db->transaction_begin();
/* This is only temp: */
! $GLOBALS['phpgw_setup']->db->query("DELETE FROM $configtbl
WHERE config_name='useframes'");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO $configtbl
(config_app,config_name, config_value) values
('phpgwapi','useframes','never')");
! $newsettings = @$GLOBALS['HTTP_POST_VARS']['newsettings'];
while (list($setting,$value) = @each($newsettings))
***************
*** 107,132 ****
if(!ereg('passwd',$setting) &&
!ereg('password',$setting) && !ereg('root_pw',$setting))
{
! @$phpgw_setup->db->query("DELETE FROM
$configtbl WHERE config_name='" . $setting . "'");
}
if($value)
{
! $phpgw_setup->db->query("INSERT INTO $configtbl
(config_app,config_name, config_value) VALUES ('phpgwapi','" .
$phpgw_setup->db->db_addslashes($setting)
! . "','" .
$phpgw_setup->db->db_addslashes($value) . "')");
}
}
! $phpgw_setup->db->transaction_commit();
/* Add cleaning of app_sessions per skeeter, but with a check
for the table being there, just in case */
! $tablenames = $phpgw_setup->db->table_names();
while(list($key,$val) = @each($tablenames))
{
$tables[] = $val['table_name'];
}
! if ($phpgw_setup->isinarray('phpgw_app_sessions',$tables))
{
! $phpgw_setup->db->lock(array('phpgw_app_sessions'));
! @$phpgw_setup->db->query("DELETE FROM
phpgw_app_sessions WHERE sessionid = '0' and loginid = '0' and app = 'phpgwapi'
and location = 'config'",__LINE__,__FILE__);
! @$phpgw_setup->db->query("DELETE FROM
phpgw_app_sessions WHERE app = 'phpgwapi' and location =
'phpgw_info_cache'",__LINE__,__FILE__);
! $phpgw_setup->db->unlock();
}
--- 107,132 ----
if(!ereg('passwd',$setting) &&
!ereg('password',$setting) && !ereg('root_pw',$setting))
{
! @$GLOBALS['phpgw_setup']->db->query("DELETE
FROM $configtbl WHERE config_name='" . $setting . "'");
}
if($value)
{
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
$configtbl (config_app,config_name, config_value) VALUES ('phpgwapi','" .
$GLOBALS['phpgw_setup']->db->db_addslashes($setting)
! . "','" .
$GLOBALS['phpgw_setup']->db->db_addslashes($value) . "')");
}
}
! $GLOBALS['phpgw_setup']->db->transaction_commit();
/* Add cleaning of app_sessions per skeeter, but with a check
for the table being there, just in case */
! $tablenames = $GLOBALS['phpgw_setup']->db->table_names();
while(list($key,$val) = @each($tablenames))
{
$tables[] = $val['table_name'];
}
! if
($GLOBALS['phpgw_setup']->isinarray('phpgw_app_sessions',$tables))
{
!
$GLOBALS['phpgw_setup']->db->lock(array('phpgw_app_sessions'));
! @$GLOBALS['phpgw_setup']->db->query("DELETE FROM
phpgw_app_sessions WHERE sessionid = '0' and loginid = '0' and app = 'phpgwapi'
and location = 'config'",__LINE__,__FILE__);
! @$GLOBALS['phpgw_setup']->db->query("DELETE FROM
phpgw_app_sessions WHERE app = 'phpgwapi' and location =
'phpgw_info_cache'",__LINE__,__FILE__);
! $GLOBALS['phpgw_setup']->db->unlock();
}
***************
*** 145,155 ****
if ($newsettings['auth_type'] != 'ldap')
{
!
$phpgw_setup->show_header(lang('Configuration'),False,'config',$ConfigDomain .
'(' . $phpgw_domain[$ConfigDomain]["db_type"] . ')');
}
! @$phpgw_setup->db->query("SELECT * FROM $configtbl");
! while (@$phpgw_setup->db->next_record())
{
! $GLOBALS['current_config'][$phpgw_setup->db->f('config_name')]
= $phpgw_setup->db->f('config_value');
}
--- 145,155 ----
if ($newsettings['auth_type'] != 'ldap')
{
!
$GLOBALS['phpgw_setup']->show_header(lang('Configuration'),False,'config',$ConfigDomain
. '(' . $phpgw_domain[$ConfigDomain]["db_type"] . ')');
}
! @$GLOBALS['phpgw_setup']->db->query("SELECT * FROM $configtbl");
! while (@$GLOBALS['phpgw_setup']->db->next_record())
{
! $GLOBALS['current_config'][$phpgw_setup->db->f('config_name')]
= $GLOBALS['phpgw_setup']->db->f('config_value');
}
***************
*** 162,166 ****
{
/* Please check the number and dial again :) */
! $phpgw_setup->show_alert_msg('Error',
lang('There was a problem trying to connect to your
LDAP server. <br>'
.'please check your LDAP server configuration')
. '.');
--- 162,166 ----
{
/* Please check the number and dial again :) */
! $GLOBALS['phpgw_setup']->show_alert_msg('Error',
lang('There was a problem trying to connect to your
LDAP server. <br>'
.'please check your LDAP server configuration')
. '.');
***************
*** 179,183 ****
$GLOBALS['phpgw'] = new phpgw;
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
! $GLOBALS['phpgw']->db = $phpgw_setup->db;
$cfg_apps = array('phpgwapi','admin','preferences');
--- 179,183 ----
$GLOBALS['phpgw'] = new phpgw;
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
! $GLOBALS['phpgw']->db = $GLOBALS['phpgw_setup']->db;
$cfg_apps = array('phpgwapi','admin','preferences');
***************
*** 195,199 ****
$vars = $t->get_undefined('body');
! $phpgw_setup->hook('config',$cfg_app);
while (list($null,$value) = each($vars))
--- 195,199 ----
$vars = $t->get_undefined('body');
! $GLOBALS['phpgw_setup']->hook('config',$cfg_app);
while (list($null,$value) = each($vars))
***************
*** 265,268 ****
$setup_tpl->set_var('lang_cancel',lang('cancel'));
$setup_tpl->pparse('out','T_config_post_script');
! $phpgw_setup->show_footer();
?>
--- 265,268 ----
$setup_tpl->set_var('lang_cancel',lang('cancel'));
$setup_tpl->pparse('out','T_config_post_script');
! $GLOBALS['phpgw_setup']->show_footer();
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup config.php,1.72.2.1,1.72.2.2,
Mark A Peters <address@hidden> <=