[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup applications.php,1.15,1.16 applist.php,1.7
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup applications.php,1.15,1.16 applist.php,1.7,1.8 config.php,1.72,1.73 index.php,1.104,1.105 lang.php,1.33,1.34 ldap.php,1.50,1.51 ldapexport.php,1.3,1.4 ldapimport.php,1.5,1.6 ldapmodify.php,1.5,1.6 manageheader.php,1.31,1.32 schematoy.php,1.7,1.8 setup_demo.php,1.25,1.26 sqltoarray.php,1.9,1.10 |
Date: |
Sun, 03 Mar 2002 16:53:03 -0500 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv16191
Modified Files:
applications.php applist.php config.php index.php lang.php
ldap.php ldapexport.php ldapimport.php ldapmodify.php
manageheader.php schematoy.php setup_demo.php sqltoarray.php
Log Message:
Moved setup and schema_proc classes to api; reorganize how the setup class
is created
Index: applications.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/applications.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** applications.php 18 Feb 2002 16:18:34 -0000 1.15
--- applications.php 3 Mar 2002 21:52:52 -0000 1.16
***************
*** 32,36 ****
// Check header and authentication
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 32,36 ----
// Check header and authentication
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 41,45 ****
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ?
$HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 41,45 ----
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ?
$HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 97,110 ****
}
! $phpgw_setup->loaddb();
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$phpgw_setup->check_db();
! $setup_info = $phpgw_setup->get_versions();
//var_dump($setup_info);exit;
! $setup_info = $phpgw_setup->get_db_versions($setup_info);
//var_dump($setup_info);exit;
! $setup_info = $phpgw_setup->compare_versions($setup_info);
//var_dump($setup_info);exit;
! $setup_info = $phpgw_setup->check_depends($setup_info);
//var_dump($setup_info);exit;
@ksort($setup_info);
--- 97,110 ----
}
! $GLOBALS['phpgw_setup']->loaddb();
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$GLOBALS['phpgw_setup']->detection->check_db();
! $setup_info = $GLOBALS['phpgw_setup']->detection->get_versions();
//var_dump($setup_info);exit;
! $setup_info =
$GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info);
//var_dump($setup_info);exit;
! $setup_info =
$GLOBALS['phpgw_setup']->detection->compare_versions($setup_info);
//var_dump($setup_info);exit;
! $setup_info =
$GLOBALS['phpgw_setup']->detection->check_depends($setup_info);
//var_dump($setup_info);exit;
@ksort($setup_info);
***************
*** 118,122 ****
if(@$HTTP_POST_VARS['submit'])
{
! $phpgw_setup->show_header(lang('Application
Management'),False,'config',$ConfigDomain . '(' .
$phpgw_domain[$ConfigDomain]['db_type'] . ')');
$setup_tpl->set_var('description',lang('App
install/remove/upgrade') . ':');
$setup_tpl->pparse('out','header');
--- 118,122 ----
if(@$HTTP_POST_VARS['submit'])
{
! $GLOBALS['phpgw_setup']->html->show_header(lang('Application
Management'),False,'config',$ConfigDomain . '(' .
$phpgw_domain[$ConfigDomain]['db_type'] . ')');
$setup_tpl->set_var('description',lang('App
install/remove/upgrade') . ':');
$setup_tpl->pparse('out','header');
***************
*** 134,151 ****
if ($setup_info[$appname]['tables'])
{
!
$phpgw_setup->process_droptables($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('tables dropped') . '.';
}
!
$phpgw_setup->deregister_app($setup_info[$appname]['name']);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('deregistered') . '.';
if ($setup_info[$appname]['hooks'])
{
!
$phpgw_setup->deregister_hooks($setup_info[$appname]['name']);
echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('hooks deregistered') . '.';
}
! $terror =
$phpgw_setup->process_drop_langs($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations removed') . '.';
}
--- 134,151 ----
if ($setup_info[$appname]['tables'])
{
!
$GLOBALS['phpgw_setup']->process->droptables($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('tables dropped') . '.';
}
!
$GLOBALS['phpgw_setup']->deregister_app($setup_info[$appname]['name']);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('deregistered') . '.';
if ($setup_info[$appname]['hooks'])
{
!
$GLOBALS['phpgw_setup']->deregister_hooks($setup_info[$appname]['name']);
echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('hooks deregistered') . '.';
}
! $terror =
$GLOBALS['phpgw_setup']->process->drop_langs($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations removed') . '.';
}
***************
*** 158,163 ****
if ($setup_info[$appname]['tables'])
{
! $terror =
$phpgw_setup->process_current($terror,$DEBUG);
! $terror =
$phpgw_setup->process_default_records($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] .
' '
. lang('tables installed, unless there
are errors printed above') . '.';
--- 158,163 ----
if ($setup_info[$appname]['tables'])
{
! $terror =
$GLOBALS['phpgw_setup']->process->current($terror,$DEBUG);
! $terror =
$GLOBALS['phpgw_setup']->process->default_records($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] .
' '
. lang('tables installed, unless there
are errors printed above') . '.';
***************
*** 165,175 ****
else
{
! if
($phpgw_setup->app_registered($setup_info[$appname]['name']))
{
!
$phpgw_setup->update_app($setup_info[$appname]['name']);
}
else
{
!
$phpgw_setup->register_app($setup_info[$appname]['name']);
}
echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('registered') . '.';
--- 165,175 ----
else
{
! if
($GLOBALS['phpgw_setup']->app_registered($setup_info[$appname]['name']))
{
!
$GLOBALS['phpgw_setup']->update_app($setup_info[$appname]['name']);
}
else
{
!
$GLOBALS['phpgw_setup']->register_app($setup_info[$appname]['name']);
}
echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('registered') . '.';
***************
*** 177,181 ****
if ($setup_info[$appname]['hooks'])
{
!
$phpgw_setup->register_hooks($setup_info[$appname]['name']);
echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('hooks registered') . '.';
}
--- 177,181 ----
if ($setup_info[$appname]['hooks'])
{
!
$GLOBALS['phpgw_setup']->register_hooks($setup_info[$appname]['name']);
echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('hooks registered') . '.';
}
***************
*** 186,190 ****
$force_en = True;
}
! $terror =
$phpgw_setup->process_add_langs($terror,$DEBUG,$force_en);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations added') . '.';
}
--- 186,190 ----
$force_en = True;
}
! $terror =
$GLOBALS['phpgw_setup']->process->add_langs($terror,$DEBUG,$force_en);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations added') . '.';
}
***************
*** 195,199 ****
$terror[] = $setup_info[$appname];
! $phpgw_setup->process_upgrade($terror,$DEBUG);
if ($setup_info[$appname]['tables'])
{
--- 195,199 ----
$terror[] = $setup_info[$appname];
!
$GLOBALS['phpgw_setup']->process->upgrade($terror,$DEBUG);
if ($setup_info[$appname]['tables'])
{
***************
*** 206,210 ****
}
! $terror =
$phpgw_setup->process_upgrade_langs($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations upgraded') . '.';
}
--- 206,210 ----
}
! $terror =
$GLOBALS['phpgw_setup']->process->upgrade_langs($terror,$DEBUG);
echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations upgraded') . '.';
}
***************
*** 218,222 ****
else
{
! $phpgw_setup->show_header(lang('Application
Management'),False,'config',$ConfigDomain . '(' .
$phpgw_domain[$ConfigDomain]['db_type'] . ')');
}
--- 218,222 ----
else
{
! $GLOBALS['phpgw_setup']->html->show_header(lang('Application
Management'),False,'config',$ConfigDomain . '(' .
$phpgw_domain[$ConfigDomain]['db_type'] . ')');
}
***************
*** 390,394 ****
$setup_tpl->set_var('remove','<input type="checkbox" name="remove[' .
$value['name'] . ']">');
$setup_tpl->set_var('upgrade',' ');
! if
(!$phpgw_setup->check_app_tables($value['name']))
{
// App installed and
enabled, but some tables are missing
--- 390,394 ----
$setup_tpl->set_var('remove','<input type="checkbox" name="remove[' .
$value['name'] . ']">');
$setup_tpl->set_var('upgrade',' ');
! if
(!$GLOBALS['phpgw_setup']->detection->check_app_tables($value['name']))
{
// App installed and
enabled, but some tables are missing
***************
*** 428,432 ****
if (address@hidden'currentver'])
{
! if ($value['tables'] &&
$phpgw_setup->check_app_tables($value['name'],True))
{
// Some tables
missing
--- 428,432 ----
if (address@hidden'currentver'])
{
! if ($value['tables'] &&
$GLOBALS['phpgw_setup']->detection->check_app_tables($value['name'],True))
{
// Some tables
missing
***************
*** 517,521 ****
$setup_tpl->pparse('out','app_footer');
$setup_tpl->pparse('out','footer');
! $phpgw_setup->show_footer();
}
?>
--- 517,521 ----
$setup_tpl->pparse('out','app_footer');
$setup_tpl->pparse('out','footer');
! $GLOBALS['phpgw_setup']->html->show_footer();
}
?>
Index: applist.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/applist.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** applist.php 8 Jan 2002 14:48:35 -0000 1.7
--- applist.php 3 Mar 2002 21:52:52 -0000 1.8
***************
*** 20,27 ****
);
include('./inc/functions.inc.php');
! include('./inc/xml_functions.inc.php');
/* Check header and authentication */
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 20,27 ----
);
include('./inc/functions.inc.php');
! include(PHPGW_SERVER_ROOT . 'phpgwapi/inc/xml_functions.inc.php');
/* Check header and authentication */
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 30,34 ****
// Does not return unless user is authorized
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 30,34 ----
// Does not return unless user is authorized
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 41,45 ****
$path = '/cvsdemo/xmlrpc.php';
! $phpgw_setup->show_header(lang('Application List'),True);
/* Login as demo */
--- 41,45 ----
$path = '/cvsdemo/xmlrpc.php';
! $GLOBALS['phpgw_setup']->html->show_header(lang('Application
List'),True);
/* Login as demo */
***************
*** 99,102 ****
$v = $r->value();
! $phpgw_setup->show_footer();
?>
--- 99,102 ----
$v = $r->value();
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: config.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/config.php,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -r1.72 -r1.73
*** config.php 5 Jan 2002 23:50:18 -0000 1.72
--- config.php 3 Mar 2002 21:52:52 -0000 1.73
***************
*** 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']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 44,53 ****
set_magic_quotes_runtime(0);
! $phpgw_setup->loaddb();
/* Guessing default values. */
$GLOBALS['current_config']['hostname'] = $HTTP_HOST;
$GLOBALS['current_config']['files_dir'] =
ereg_replace('/setup','/files',dirname($SCRIPT_FILENAME));
! if (@is_dir('/tmp'))
{
$GLOBALS['current_config']['temp_dir'] = '/tmp';
--- 44,53 ----
set_magic_quotes_runtime(0);
! $GLOBALS['phpgw_setup']->loaddb();
/* Guessing default values. */
$GLOBALS['current_config']['hostname'] = $HTTP_HOST;
$GLOBALS['current_config']['files_dir'] =
ereg_replace('/setup','/files',dirname($SCRIPT_FILENAME));
! if(@is_dir('/tmp'))
{
$GLOBALS['current_config']['temp_dir'] = '/tmp';
***************
*** 58,62 ****
}
! if ($HTTP_POST_VARS['cancel'])
{
Header('Location: index.php');
--- 58,62 ----
}
! if($HTTP_POST_VARS['cancel'])
{
Header('Location: index.php');
***************
*** 65,70 ****
/* 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';
--- 65,70 ----
/* Check api version, use correct table */
! $setup_info = $GLOBALS['phpgw_setup']->detection->get_db_versions();
!
if($GLOBALS['phpgw_setup']->alessthanb($setup_info['phpgwapi']['currentver'],
'0.9.10pre7'))
{
$configtbl = 'config';
***************
*** 75,88 ****
}
! 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))
{
/* echo '<br>Updating: ' . $setting . '=' . $value; */
--- 75,88 ----
}
! if($HTTP_POST_VARS['submit'] && $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 = $HTTP_POST_VARS['newsettings'];
! while(list($setting,$value) = @each($newsettings))
{
/* echo '<br>Updating: ' . $setting . '=' . $value; */
***************
*** 90,118 ****
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();
}
! if ($newsettings['auth_type'] == 'ldap')
{
Header('Location:
'.$newsettings['webserver_url'].'/setup/ldap.php');
--- 90,118 ----
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(in_array('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();
}
! if($newsettings['auth_type'] == 'ldap')
{
Header('Location:
'.$newsettings['webserver_url'].'/setup/ldap.php');
***************
*** 126,149 ****
}
! 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');
}
! if ($GLOBALS['current_config']['files_dir'] ==
'/path/to/dir/phpgroupware/files')
{
$GLOBALS['current_config']['files_dir'] =
$GLOBALS['phpgw_info']['server']['server_root'] . '/files';
}
! if ($error == 'badldapconnection')
{
/* 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')
. '.');
--- 126,149 ----
}
! if($newsettings['auth_type'] != 'ldap')
{
!
$GLOBALS['phpgw_setup']->html->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'][$GLOBALS['phpgw_setup']->db->f('config_name')] =
$GLOBALS['phpgw_setup']->db->f('config_value');
}
! if($GLOBALS['current_config']['files_dir'] ==
'/path/to/dir/phpgroupware/files')
{
$GLOBALS['current_config']['files_dir'] =
$GLOBALS['phpgw_info']['server']['server_root'] . '/files';
}
! if($error == 'badldapconnection')
{
/* Please check the number and dial again :) */
! $GLOBALS['phpgw_setup']->html->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 ****
$GLOBALS['phpgw'] = new phpgw;
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
! $GLOBALS['phpgw']->db = $phpgw_setup->db;
$cfg_apps = array('phpgwapi','admin','preferences');
--- 162,166 ----
$GLOBALS['phpgw'] = new phpgw;
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
! $GLOBALS['phpgw']->db = $GLOBALS['phpgw_setup']->db;
$cfg_apps = array('phpgwapi','admin','preferences');
***************
*** 178,184 ****
$vars = $t->get_undefined('body');
! $phpgw_setup->hook('config',$cfg_app);
! while (list($null,$value) = each($vars))
{
$valarray = explode('_',$value);
--- 178,184 ----
$vars = $t->get_undefined('body');
! $GLOBALS['phpgw_setup']->hook('config',$cfg_app);
! while(list($null,$value) = each($vars))
{
$valarray = explode('_',$value);
***************
*** 214,218 ****
$newvals = explode(' ',$newval);
$setting = end($newvals);
! for ($i=0;$i<(count($newvals) - 1);
$i++)
{
$configs[] = $newvals[$i];
--- 214,218 ----
$newvals = explode(' ',$newval);
$setting = end($newvals);
! for($i=0;$i<(count($newvals) - 1); $i++)
{
$configs[] = $newvals[$i];
***************
*** 220,224 ****
$config = implode('_',$configs);
/* echo $config . '=' .
$current_config[$config]; */
! if ($current_config[$config] ==
$setting)
{
$t->set_var($value,' selected');
--- 220,224 ----
$config = implode('_',$configs);
/* echo $config . '=' .
$current_config[$config]; */
! if($current_config[$config] == $setting)
{
$t->set_var($value,' selected');
***************
*** 248,251 ****
$setup_tpl->set_var('lang_cancel',lang('cancel'));
$setup_tpl->pparse('out','T_config_post_script');
! $phpgw_setup->show_footer();
?>
--- 248,252 ----
$setup_tpl->set_var('lang_cancel',lang('cancel'));
$setup_tpl->pparse('out','T_config_post_script');
!
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/index.php,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -r1.104 -r1.105
*** index.php 18 Feb 2002 16:18:34 -0000 1.104
--- index.php 3 Mar 2002 21:52:52 -0000 1.105
***************
*** 30,34 ****
set_time_limit(0);
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 30,34 ----
set_time_limit(0);
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 56,60 ****
// Check header and authentication
! $GLOBALS['phpgw_info']['setup']['stage']['header'] =
$phpgw_setup->check_header();
if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != '10')
{
--- 56,60 ----
// Check header and authentication
! $GLOBALS['phpgw_info']['setup']['stage']['header'] =
$GLOBALS['phpgw_setup']->detection->check_header();
if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != '10')
{
***************
*** 62,86 ****
exit;
}
! elseif (!$phpgw_setup->auth('Config'))
{
! $phpgw_setup->show_header(lang('Please login'),True);
! $phpgw_setup->login_form();
! $phpgw_setup->show_footer();
exit;
}
! $phpgw_setup->loaddb();
/* Add cleaning of app_sessions per skeeter, but with a check for the
table being there, just in case */
! $phpgw_setup->clear_session_cache();
// Database actions
! $setup_info = $phpgw_setup->get_versions();
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$phpgw_setup->check_db();
if ($GLOBALS['phpgw_info']['setup']['stage']['db'] != 1)
{
! $setup_info = $phpgw_setup->get_versions();
! $setup_info = $phpgw_setup->get_db_versions($setup_info);
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$phpgw_setup->check_db();
if($GLOBALS['DEBUG'])
{
--- 62,86 ----
exit;
}
! elseif (!$GLOBALS['phpgw_setup']->auth('Config'))
{
! $GLOBALS['phpgw_setup']->html->show_header(lang('Please
login'),True);
! $GLOBALS['phpgw_setup']->html->login_form();
! $GLOBALS['phpgw_setup']->html->show_footer();
exit;
}
! $GLOBALS['phpgw_setup']->loaddb();
/* Add cleaning of app_sessions per skeeter, but with a check for the
table being there, just in case */
! $GLOBALS['phpgw_setup']->clear_session_cache();
// Database actions
! $setup_info = $GLOBALS['phpgw_setup']->detection->get_versions();
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$GLOBALS['phpgw_setup']->detection->check_db();
if ($GLOBALS['phpgw_info']['setup']['stage']['db'] != 1)
{
! $setup_info =
$GLOBALS['phpgw_setup']->detection->get_versions();
! $setup_info =
$GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info);
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$GLOBALS['phpgw_setup']->detection->check_db();
if($GLOBALS['DEBUG'])
{
***************
*** 140,147 ****
if (phpversion() < '3.0.16')
{
!
$phpgw_setup->show_header($GLOBALS['phpgw_info']['setup']['header_msg'],True);
! $phpgw_setup->show_alert_msg('Error',
lang('You appear to be running an old version of PHP
<br>It its recommend that you upgrade to a new version. <br>Older version of
PHP might not run phpGroupWare correctly, if at all. <br><br>Please upgrade to
at least version 3.0.16'));
! $phpgw_setup->show_footer();
exit;
}
--- 140,147 ----
if (phpversion() < '3.0.16')
{
!
$GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['header_msg'],True);
! $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',
lang('You appear to be running an old version of PHP
<br>It its recommend that you upgrade to a new version. <br>Older version of
PHP might not run phpGroupWare correctly, if at all. <br><br>Please upgrade to
at least version 3.0.16'));
! $GLOBALS['phpgw_setup']->html->show_footer();
exit;
}
***************
*** 149,153 ****
// BEGIN setup page
! //$phpgw_setup->app_status();
$GLOBALS['phpgw_info']['server']['app_images'] =
'templates/default/images';
$incomplete = $GLOBALS['phpgw_info']['server']['app_images'] .
'/incomplete.gif';
--- 149,153 ----
// BEGIN setup page
! //$GLOBALS['phpgw_setup']->app_status();
$GLOBALS['phpgw_info']['server']['app_images'] =
'templates/default/images';
$incomplete = $GLOBALS['phpgw_info']['server']['app_images'] .
'/incomplete.gif';
***************
*** 230,248 ****
// FIXME : CAPTURE THIS OUTPUT
! $phpgw_setup->db->Halt_On_Error = 'report';
switch
($GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'])
{
case 'dbcreate':
!
$phpgw_setup->db->create_database($db_root, $db_pass);
break;
case 'drop':
! $setup_info =
$phpgw_setup->get_versions($setup_info);
! $setup_info =
$phpgw_setup->process_droptables($setup_info);
break;
case 'new':
/* process all apps and langs(last
param True), excluding apps with the no_mass_update flag set. */
! $setup_info =
$phpgw_setup->upgrade_exclude($setup_info);
! $setup_info =
$phpgw_setup->process_pass($setup_info,'new',$GLOBALS['DEBUG'],True);
$GLOBALS['included'] = True;
include('lang.php');
--- 230,249 ----
// FIXME : CAPTURE THIS OUTPUT
! $GLOBALS['phpgw_setup']->db->Halt_On_Error = 'report';
switch
($GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'])
{
case 'dbcreate':
!
$GLOBALS['phpgw_setup']->db->create_database($db_root, $db_pass);
break;
case 'drop':
! $setup_info =
$GLOBALS['phpgw_setup']->detection->get_versions($setup_info);
! $setup_info =
$GLOBALS['phpgw_setup']->process->droptables($setup_info);
break;
case 'new':
/* process all apps and langs(last
param True), excluding apps with the no_mass_update flag set. */
! $setup_info =
$GLOBALS['phpgw_setup']->detection->upgrade_exclude($setup_info);
! $setup_info =
$GLOBALS['phpgw_setup']->process->pass($setup_info,'new',$GLOBALS['DEBUG'],True);
!
$GLOBALS['included'] = True;
include('lang.php');
***************
*** 250,259 ****
break;
case 'oldversion':
! $setup_info =
$phpgw_setup->process_pass($setup_info,'upgrade',$GLOBALS['DEBUG']);
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
break;
}
! $phpgw_setup->db->Halt_On_Error = 'no';
$setup_tpl->set_var('tableshave',lang('If you did not
receive any errors, your applications have been'));
--- 251,260 ----
break;
case 'oldversion':
! $setup_info =
$GLOBALS['phpgw_setup']->process->pass($setup_info,'upgrade',$GLOBALS['DEBUG']);
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
break;
}
! $GLOBALS['phpgw_setup']->db->Halt_On_Error = 'no';
$setup_tpl->set_var('tableshave',lang('If you did not
receive any errors, your applications have been'));
***************
*** 283,287 ****
// Config Section
$setup_tpl->set_var('config_step_text',lang('Step 2 - Configuration'));
! $GLOBALS['phpgw_info']['setup']['stage']['config'] =
$phpgw_setup->check_config();
// begin DEBUG code
--- 284,288 ----
// Config Section
$setup_tpl->set_var('config_step_text',lang('Step 2 - Configuration'));
! $GLOBALS['phpgw_info']['setup']['stage']['config'] =
$GLOBALS['phpgw_setup']->detection->check_config();
// begin DEBUG code
***************
*** 294,298 ****
$setup_tpl->set_var('config_status_img',$incomplete);
$setup_tpl->set_var('config_status_alt',lang('not
completed'));
! $btn_config_now = $phpgw_setup->make_frm_btn_simple(
lang('Please configure phpGroupWare for your
environment'),
'POST','config.php',
--- 295,299 ----
$setup_tpl->set_var('config_status_img',$incomplete);
$setup_tpl->set_var('config_status_alt',lang('not
completed'));
! $btn_config_now =
$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
lang('Please configure phpGroupWare for your
environment'),
'POST','config.php',
***************
*** 305,309 ****
$setup_tpl->set_var('config_status_img',$completed);
$setup_tpl->set_var('config_status_alt',lang('completed'));
! $btn_edit_config = $phpgw_setup->make_frm_btn_simple(
lang('Configuration completed'),
'POST','config.php',
--- 306,310 ----
$setup_tpl->set_var('config_status_img',$completed);
$setup_tpl->set_var('config_status_alt',lang('completed'));
! $btn_edit_config =
$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
lang('Configuration completed'),
'POST','config.php',
***************
*** 311,323 ****
''
);
! $phpgw_setup->db->query("select config_value FROM
phpgw_config WHERE config_name='auth_type'");
! $phpgw_setup->db->next_record();
! if ($phpgw_setup->db->f(0) == 'ldap')
{
! $phpgw_setup->db->query("select config_value
FROM phpgw_config WHERE config_name='ldap_host'");
! $phpgw_setup->db->next_record();
! if ($phpgw_setup->db->f(0) != '')
{
! $btn_config_ldap =
$phpgw_setup->make_frm_btn_simple(
lang('LDAP account
import/export'),
'POST','ldap.php',
--- 312,324 ----
''
);
! $GLOBALS['phpgw_setup']->db->query("select config_value
FROM phpgw_config WHERE config_name='auth_type'");
! $GLOBALS['phpgw_setup']->db->next_record();
! if ($GLOBALS['phpgw_setup']->db->f(0) == 'ldap')
{
! $GLOBALS['phpgw_setup']->db->query("select
config_value FROM phpgw_config WHERE config_name='ldap_host'");
! $GLOBALS['phpgw_setup']->db->next_record();
! if ($GLOBALS['phpgw_setup']->db->f(0) != '')
{
! $btn_config_ldap =
$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
lang('LDAP account
import/export'),
'POST','ldap.php',
***************
*** 330,338 ****
$btn_config_ldap = '';
}
! $phpgw_setup->db->query("select config_value
FROM phpgw_config WHERE config_name='webserver_url'");
! $phpgw_setup->db->next_record();
! if ($phpgw_setup->db->f(0))
{
! $link_make_accts =
$phpgw_setup->make_href_link_simple(
'<br>',
'setup_demo.php',
--- 331,339 ----
$btn_config_ldap = '';
}
! $GLOBALS['phpgw_setup']->db->query("select
config_value FROM phpgw_config WHERE config_name='webserver_url'");
! $GLOBALS['phpgw_setup']->db->next_record();
! if ($GLOBALS['phpgw_setup']->db->f(0))
{
! $link_make_accts =
$GLOBALS['phpgw_setup']->html->make_href_link_simple(
'<br>',
'setup_demo.php',
***************
*** 350,354 ****
{
$btn_config_ldap = '';
! $link_make_accts =
$phpgw_setup->make_href_link_simple(
'<br>',
'setup_demo.php',
--- 351,355 ----
{
$btn_config_ldap = '';
! $link_make_accts =
$GLOBALS['phpgw_setup']->html->make_href_link_simple(
'<br>',
'setup_demo.php',
***************
*** 371,375 ****
// Lang Section
$setup_tpl->set_var('lang_step_text',lang('Step 3 - Language
Management'));
! $GLOBALS['phpgw_info']['setup']['stage']['lang'] =
$phpgw_setup->check_lang();
// begin DEBUG code
--- 372,376 ----
// Lang Section
$setup_tpl->set_var('lang_step_text',lang('Step 3 - Language
Management'));
! $GLOBALS['phpgw_info']['setup']['stage']['lang'] =
$GLOBALS['phpgw_setup']->detection->check_lang();
// begin DEBUG code
***************
*** 382,386 ****
$setup_tpl->set_var('lang_status_img',$incomplete);
$setup_tpl->set_var('lang_status_alt','not completed');
! $btn_install_lang = $phpgw_setup->make_frm_btn_simple(
lang('You do not have any languages installed.
Please install one now <br>'),
'POST','lang.php',
--- 383,387 ----
$setup_tpl->set_var('lang_status_img',$incomplete);
$setup_tpl->set_var('lang_status_alt','not completed');
! $btn_install_lang =
$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
lang('You do not have any languages installed.
Please install one now <br>'),
'POST','lang.php',
***************
*** 406,410 ****
$setup_tpl->set_var('lang_status_img',$completed);
$setup_tpl->set_var('lang_status_alt','completed');
! $btn_manage_lang = $phpgw_setup->make_frm_btn_simple(
lang('This stage is completed<br>') .
lang('Currently installed languages: x <br>',$langs_list),
'POST','lang.php',
--- 407,411 ----
$setup_tpl->set_var('lang_status_img',$completed);
$setup_tpl->set_var('lang_status_alt','completed');
! $btn_manage_lang =
$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
lang('This stage is completed<br>') .
lang('Currently installed languages: x <br>',$langs_list),
'POST','lang.php',
***************
*** 421,425 ****
$setup_tpl->set_var('apps_step_text',lang('Step 4 - Advanced
Application Management'));
! // $GLOBALS['phpgw_info']['setup']['stage']['apps'] =
$phpgw_setup->check_apps();
switch($GLOBALS['phpgw_info']['setup']['stage']['db'])
{
--- 422,426 ----
$setup_tpl->set_var('apps_step_text',lang('Step 4 - Advanced
Application Management'));
! // $GLOBALS['phpgw_info']['setup']['stage']['apps'] =
$GLOBALS['phpgw_setup']->check_apps();
switch($GLOBALS['phpgw_info']['setup']['stage']['db'])
{
***************
*** 428,432 ****
$setup_tpl->set_var('apps_status_img',$completed);
$setup_tpl->set_var('apps_status_alt',lang('completed'));
! $btn_manage_apps = $phpgw_setup->make_frm_btn_simple(
lang('This stage is completed<br>'),
'','applications.php',
--- 429,433 ----
$setup_tpl->set_var('apps_status_img',$completed);
$setup_tpl->set_var('apps_status_alt',lang('completed'));
! $btn_manage_apps =
$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
lang('This stage is completed<br>'),
'','applications.php',
***************
*** 442,447 ****
}
!
$phpgw_setup->show_header($GLOBALS['phpgw_info']['setup']['header_msg'],False,'config',$GLOBALS['ConfigDomain']
. '(' . $GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_type'] . ')');
$setup_tpl->pparse('out','T_setup_main');
! $phpgw_setup->show_footer();
?>
--- 443,453 ----
}
! $GLOBALS['phpgw_setup']->html->show_header(
! $GLOBALS['phpgw_info']['setup']['header_msg'],
! False,
! 'config',
! $GLOBALS['ConfigDomain'] . '(' .
$GLOBALS['phpgw_domain'][$GLOBALS['ConfigDomain']]['db_type'] . ')'
! );
$setup_tpl->pparse('out','T_setup_main');
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: lang.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/lang.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** lang.php 18 Feb 2002 16:18:34 -0000 1.33
--- lang.php 3 Mar 2002 21:52:52 -0000 1.34
***************
*** 24,33 ****
// Authorize the user to use setup app and load the database
// Does not return unless user is authorized
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
exit;
}
! $phpgw_setup->loaddb();
include(PHPGW_API_INC.'/class.common.inc.php');
--- 24,33 ----
// Authorize the user to use setup app and load the database
// Does not return unless user is authorized
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
exit;
}
! $GLOBALS['phpgw_setup']->loaddb();
include(PHPGW_API_INC.'/class.common.inc.php');
***************
*** 46,53 ****
}
! $setup_info_temp = $phpgw_setup->get_versions();
! $setup_info = $phpgw_setup->get_db_versions($setup_info_temp);
! if($phpgw_setup->alessthanb($setup_info['phpgwapi']['currentver'],
'0.9.15.002'))
{
$langtbl = 'lang';
--- 46,53 ----
}
! $setup_info_temp = $GLOBALS['phpgw_setup']->detection->get_versions();
! $setup_info =
$GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info_temp);
!
if($GLOBALS['phpgw_setup']->alessthanb($setup_info['phpgwapi']['currentver'],
'0.9.15.002'))
{
$langtbl = 'lang';
***************
*** 64,73 ****
$lang_selected = $HTTP_POST_VARS['lang_selected'];
$upgrademethod = $HTTP_POST_VARS['upgrademethod'];
! $phpgw_setup->db->transaction_begin();
if (count($lang_selected))
{
if ($upgrademethod == 'dumpold')
{
! $phpgw_setup->db->query('DELETE FROM
'.$langtbl,__LINE__,__FILE__);
//echo '<br>Test: dumpold';
}
--- 64,73 ----
$lang_selected = $HTTP_POST_VARS['lang_selected'];
$upgrademethod = $HTTP_POST_VARS['upgrademethod'];
! $GLOBALS['phpgw_setup']->db->transaction_begin();
if (count($lang_selected))
{
if ($upgrademethod == 'dumpold')
{
! $GLOBALS['phpgw_setup']->db->query('DELETE FROM
'.$langtbl,__LINE__,__FILE__);
//echo '<br>Test: dumpold';
}
***************
*** 79,86 ****
{
//echo "<br>Test: addonlynew - select
count(*) from lang where lang='$lang'";
! $phpgw_setup->db->query("SELECT
COUNT(*) FROM $langtbl WHERE lang='$lang'",__LINE__,__FILE__);
! $phpgw_setup->db->next_record();
! if ($phpgw_setup->db->f(0) == 0)
{
//echo '<br>Test: addonlynew -
True';
--- 79,86 ----
{
//echo "<br>Test: addonlynew - select
count(*) from lang where lang='$lang'";
!
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM $langtbl WHERE
lang='$lang'",__LINE__,__FILE__);
!
$GLOBALS['phpgw_setup']->db->next_record();
! if ($GLOBALS['phpgw_setup']->db->f(0)
== 0)
{
//echo '<br>Test: addonlynew -
True';
***************
*** 91,96 ****
{
//echo '<br>Test: loop above file()';
! $setup_info =
$phpgw_setup->get_versions();
! $setup_info =
$phpgw_setup->get_db_versions($setup_info);
$raw = $raw_file = array();
// Visit each app/setup dir, look for a
lang file
--- 91,96 ----
{
//echo '<br>Test: loop above file()';
! $setup_info =
$GLOBALS['phpgw_setup']->detection->get_versions();
! $setup_info =
$GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info);
$raw = $raw_file = array();
// Visit each app/setup dir, look for a
lang file
***************
*** 99,103 ****
$appfile = PHPGW_SERVER_ROOT .
SEP . $app['name'] . SEP . 'setup' . SEP . 'phpgw_' . strtolower($lang) .
'.lang';
//echo '<br>Checking in: ' .
$app['name'];
!
if($phpgw_setup->app_registered($app['name']) && file_exists($appfile))
{
//echo '<br>Including:
' . $appfile;
--- 99,103 ----
$appfile = PHPGW_SERVER_ROOT .
SEP . $app['name'] . SEP . 'setup' . SEP . 'phpgw_' . strtolower($lang) .
'.lang';
//echo '<br>Checking in: ' .
$app['name'];
!
if($GLOBALS['phpgw_setup']->app_registered($app['name']) &&
file_exists($appfile))
{
//echo '<br>Including:
' . $appfile;
***************
*** 111,129 ****
{
$addit = False;
!
list($message_id,$app_name,$phpgw_setup->db_lang,$content) =
explode("\t",$line);
! $message_id =
$phpgw_setup->db->db_addslashes(chop($message_id));
//echo '<br>APPNAME:' .
$app_name . ' PHRASE:' . $message_id;
! $app_name =
$phpgw_setup->db->db_addslashes(chop($app_name));
! $phpgw_setup->db_lang
= $phpgw_setup->db->db_addslashes(chop($phpgw_setup->db_lang));
! $content =
$phpgw_setup->db->db_addslashes(chop($content));
if ($upgrademethod ==
'addmissing')
{
//echo
'<br>Test: addmissing';
!
$phpgw_setup->db->query("SELECT COUNT(*) FROM $langtbl WHERE
message_id='$message_id' and lang='$phpgw_setup->db_lang'",__LINE__,__FILE__);
!
$phpgw_setup->db->next_record();
! if
($phpgw_setup->db->f(0) == 0)
{
! //echo
'<br>Test: addmissing - True - Total: ' . $phpgw_setup->db->f(0);
$addit
= True;
}
--- 111,130 ----
{
$addit = False;
!
list($message_id,$app_name,$GLOBALS['phpgw_setup']->db_lang,$content) =
explode("\t",$line);
! $message_id =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($message_id));
//echo '<br>APPNAME:' .
$app_name . ' PHRASE:' . $message_id;
! $app_name =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($app_name));
!
$GLOBALS['phpgw_setup']->db_lang =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($GLOBALS['phpgw_setup']->db_lang));
! $content =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($content));
if ($upgrademethod ==
'addmissing')
{
//echo
'<br>Test: addmissing';
!
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM $langtbl WHERE
message_id='$message_id' and lang='"
! .
$GLOBALS['phpgw_setup']->db_lang . "'",__LINE__,__FILE__);
!
$GLOBALS['phpgw_setup']->db->next_record();
! if
($GLOBALS['phpgw_setup']->db->f(0) == 0)
{
! //echo
'<br>Test: addmissing - True - Total: ' . $GLOBALS['phpgw_setup']->db->f(0);
$addit
= True;
}
***************
*** 134,139 ****
if($message_id
&& $content)
{
! // echo
"<br>adding - insert into $langtbl(message_id,app_name,lang,content) values
('$message_id','$app_name','$phpgw_setup->db_lang','$content')";
!
$phpgw_setup->db->query("INSERT into $langtbl(message_id,app_name,lang,content)
VALUES
('$message_id','$app_name','$phpgw_setup->db_lang','$content')",__LINE__,__FILE__);
}
}
--- 135,141 ----
if($message_id
&& $content)
{
! // echo
"<br>adding - insert into $langtbl(message_id,app_name,lang,content) values
('$message_id','$app_name','" . $GLOBALS['phpgw_setup']->db_lang .
"','$content')";
!
$GLOBALS['phpgw_setup']->db->query("INSERT into
$langtbl(message_id,app_name,lang,content) VALUES ('$message_id','$app_name','"
!
. $GLOBALS['phpgw_setup']->db_lang . "','$content')",__LINE__,__FILE__);
}
}
***************
*** 142,146 ****
}
}
! $phpgw_setup->db->transaction_commit();
}
--- 144,148 ----
}
}
! $GLOBALS['phpgw_setup']->db->transaction_commit();
}
***************
*** 161,165 ****
if (address@hidden'included'])
{
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl =
CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 163,167 ----
if (address@hidden'included'])
{
! $tpl_root =
$GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl =
CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 181,190 ****
$select_box_desc = lang('Select which languages you
would like to use');
$select_box_langs = '';
! $phpgw_setup->db->query("select lang_id,lang_name from
$langstbl where available='Yes'");
! while ($phpgw_setup->db->next_record())
{
$select_box_langs .=
! '<option value="' .
$phpgw_setup->db->f('lang_id') . '">'
! . $phpgw_setup->db->f('lang_name') .
'</option>'
."\n";
}
--- 183,192 ----
$select_box_desc = lang('Select which languages you
would like to use');
$select_box_langs = '';
! $GLOBALS['phpgw_setup']->db->query("select
lang_id,lang_name from $langstbl where available='Yes'");
! while ($GLOBALS['phpgw_setup']->db->next_record())
{
$select_box_langs .=
! '<option value="' .
$GLOBALS['phpgw_setup']->db->f('lang_id') . '">'
! .
$GLOBALS['phpgw_setup']->db->f('lang_name') . '</option>'
."\n";
}
***************
*** 221,227 ****
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ?
$HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
!
$phpgw_setup->show_header("$stage_title",False,'config',$ConfigDomain . '(' .
$phpgw_domain[$ConfigDomain]['db_type'] . ')');
$setup_tpl->pparse('out','T_lang_main');
! $phpgw_setup->show_footer();
}
}
--- 223,229 ----
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ?
$HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
!
$GLOBALS['phpgw_setup']->html->show_header("$stage_title",False,'config',$ConfigDomain
. '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')');
$setup_tpl->pparse('out','T_lang_main');
! $GLOBALS['phpgw_setup']->html->show_footer();
}
}
Index: ldap.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/ldap.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** ldap.php 18 Dec 2001 02:25:54 -0000 1.50
--- ldap.php 3 Mar 2002 21:52:52 -0000 1.51
***************
*** 22,26 ****
// Authorize the user to use setup app and load the database
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 22,26 ----
// Authorize the user to use setup app and load the database
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 35,39 ****
}
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 35,39 ----
}
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 44,53 ****
));
! $phpgw_setup->show_header(lang('LDAP Config'),'','ldap',$ConfigDomain);
if ($error)
{
//echo '<br><center><b>Error:</b> '.$error.'</center>';
! $phpgw_setup->show_alert_msg('Error',$error);
}
--- 44,53 ----
));
! $GLOBALS['phpgw_setup']->html->show_header(lang('LDAP
Config'),'','ldap',$ConfigDomain);
if ($error)
{
//echo '<br><center><b>Error:</b> '.$error.'</center>';
! $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$error);
}
***************
*** 74,77 ****
$setup_tpl->pfp('out','footer');
! $phpgw_setup->show_footer();
?>
--- 74,77 ----
$setup_tpl->pfp('out','footer');
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: ldapexport.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/ldapexport.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ldapexport.php 18 Dec 2001 02:25:54 -0000 1.3
--- ldapexport.php 3 Mar 2002 21:52:52 -0000 1.4
***************
*** 22,26 ****
// Authorize the user to use setup app and load the database
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 22,26 ----
// Authorize the user to use setup app and load the database
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 40,47 ****
$common = $phpgw->common;
! $phpgw_setup->loaddb();
! $phpgw->db = $phpgw_setup->db;
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 40,47 ----
$common = $phpgw->common;
! $GLOBALS['phpgw_setup']->loaddb();
! $phpgw->db = $GLOBALS['phpgw_setup']->db;
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 52,64 ****
));
! $phpgw_info['server']['account_repository'] = 'ldap';
!
! $phpgw->accounts = CreateObject('phpgwapi.accounts');
! $acct = $phpgw->accounts;
!
! $phpgw_setup->db->query("select config_name,config_value from
phpgw_config where config_name like 'ldap%'",__LINE__,__FILE__);
! while ($phpgw_setup->db->next_record())
{
! $config[$phpgw_setup->db->f('config_name')] =
$phpgw_setup->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
--- 52,59 ----
));
! $GLOBALS['phpgw_setup']->db->query("SELECT config_name,config_value
FROM phpgw_config WHERE config_name LIKE 'ldap%'",__LINE__,__FILE__);
! while ($GLOBALS['phpgw_setup']->db->next_record())
{
! $config[$GLOBALS['phpgw_setup']->db->f('config_name')] =
$GLOBALS['phpgw_setup']->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
***************
*** 67,84 ****
$phpgw_info['server']['ldap_root_dn'] = $config['ldap_root_dn'];
$phpgw_info['server']['ldap_root_pw'] = $config['ldap_root_pw'];
! $phpgw_info["server"]['ldap_account_home'] =
$config['ldap_account_home'];
! $phpgw_info["server"]['ldap_account_shell'] =
$config['ldap_account_shell'];
$phpgw_info['server']['ldap_extra_attributes'] =
$config['ldap_extra_attributes'];
// First, see if we can connect to the LDAP server, if not send `em
back to config.php with an
// error message.
// connect to ldap server
! if (! $ldap = $common->ldapConnect())
{
$noldapconnection = True;
}
! if ($noldapconnection)
{
Header('Location: config.php?error=badldapconnection');
--- 62,84 ----
$phpgw_info['server']['ldap_root_dn'] = $config['ldap_root_dn'];
$phpgw_info['server']['ldap_root_pw'] = $config['ldap_root_pw'];
! $phpgw_info['server']['ldap_account_home'] =
$config['ldap_account_home'];
! $phpgw_info['server']['ldap_account_shell'] =
$config['ldap_account_shell'];
$phpgw_info['server']['ldap_extra_attributes'] =
$config['ldap_extra_attributes'];
+ $phpgw_info['server']['account_repository'] = 'ldap';
+
+ $phpgw->accounts = CreateObject('phpgwapi.accounts');
+ $acct = $phpgw->accounts;
+
// First, see if we can connect to the LDAP server, if not send `em
back to config.php with an
// error message.
// connect to ldap server
! if(!$ldap = $common->ldapConnect())
{
$noldapconnection = True;
}
! if($noldapconnection)
{
Header('Location: config.php?error=badldapconnection');
***************
*** 87,103 ****
$sql = "SELECT * FROM phpgw_accounts WHERE account_type='u'";
! $phpgw_setup->db->query($sql,__LINE__,__FILE__);
! while($phpgw_setup->db->next_record())
{
! $i = $phpgw_setup->db->f('account_id');
! $account_info[$i]['account_id'] =
$phpgw_setup->db->f('account_id');
! $account_info[$i]['account_lid'] =
$phpgw_setup->db->f('account_lid');
! $account_info[$i]['account_firstname'] =
$phpgw_setup->db->f('account_firstname');
! $account_info[$i]['account_lastname'] =
$phpgw_setup->db->f('account_lastname');
! $account_info[$i]['account_status'] =
$phpgw_setup->db->f('account_status');
! $account_info[$i]['account_expires'] =
$phpgw_setup->db->f('account_expires');
}
! while (list($key,$data) = @each($account_info))
{
$tmp = $data['account_id'];
--- 87,103 ----
$sql = "SELECT * FROM phpgw_accounts WHERE account_type='u'";
! $GLOBALS['phpgw_setup']->db->query($sql,__LINE__,__FILE__);
! while($GLOBALS['phpgw_setup']->db->next_record())
{
! $i = $GLOBALS['phpgw_setup']->db->f('account_id');
! $account_info[$i]['account_id'] =
$GLOBALS['phpgw_setup']->db->f('account_id');
! $account_info[$i]['account_lid'] =
$GLOBALS['phpgw_setup']->db->f('account_lid');
! $account_info[$i]['account_firstname'] =
$GLOBALS['phpgw_setup']->db->f('account_firstname');
! $account_info[$i]['account_lastname'] =
$GLOBALS['phpgw_setup']->db->f('account_lastname');
! $account_info[$i]['account_status'] =
$GLOBALS['phpgw_setup']->db->f('account_status');
! $account_info[$i]['account_expires'] =
$GLOBALS['phpgw_setup']->db->f('account_expires');
}
! while(list($key,$data) = @each($account_info))
{
$tmp = $data['account_id'];
***************
*** 107,123 ****
$sql = "SELECT * FROM phpgw_accounts WHERE account_type='g'";
! $phpgw_setup->db->query($sql,__LINE__,__FILE__);
! while($phpgw_setup->db->next_record())
{
! $i = $phpgw_setup->db->f('account_id');
! $group_info[$i]['account_id'] =
$phpgw_setup->db->f('account_id');
! $group_info[$i]['account_lid'] =
$phpgw_setup->db->f('account_lid');
! $group_info[$i]['account_firstname'] =
$phpgw_setup->db->f('account_firstname');
! $group_info[$i]['account_lastname'] =
$phpgw_setup->db->f('account_lastname');
! $group_info[$i]['account_status'] =
$phpgw_setup->db->f('account_status');
! $group_info[$i]['account_expires'] =
$phpgw_setup->db->f('account_expires');
}
! while (list($key,$data) = @each($group_info))
{
$tmp = $data['account_id'][0];
--- 107,123 ----
$sql = "SELECT * FROM phpgw_accounts WHERE account_type='g'";
! $GLOBALS['phpgw_setup']->db->query($sql,__LINE__,__FILE__);
! while($GLOBALS['phpgw_setup']->db->next_record())
{
! $i = $GLOBALS['phpgw_setup']->db->f('account_id');
! $group_info[$i]['account_id'] =
$GLOBALS['phpgw_setup']->db->f('account_id');
! $group_info[$i]['account_lid'] =
$GLOBALS['phpgw_setup']->db->f('account_lid');
! $group_info[$i]['account_firstname'] =
$GLOBALS['phpgw_setup']->db->f('account_firstname');
! $group_info[$i]['account_lastname'] =
$GLOBALS['phpgw_setup']->db->f('account_lastname');
! $group_info[$i]['account_status'] =
$GLOBALS['phpgw_setup']->db->f('account_status');
! $group_info[$i]['account_expires'] =
$GLOBALS['phpgw_setup']->db->f('account_expires');
}
! while(list($key,$data) = @each($group_info))
{
$tmp = $data['account_id'][0];
***************
*** 126,140 ****
$group_info = $newgroup;
! if ($cancel)
{
! Header("Location: ldap.php");
exit;
}
! if ($submit)
{
! if ($ldapgroups)
{
! while (list($key,$groupid) = each($ldapgroups))
{
$id_exist = 0;
--- 126,140 ----
$group_info = $newgroup;
! if($cancel)
{
! Header('Location: ldap.php');
exit;
}
! if($submit)
{
! if($ldapgroups)
{
! while(list($key,$groupid) = each($ldapgroups))
{
$id_exist = 0;
***************
*** 146,158 ****
// Do some checks before we try to import the
data to LDAP.
! if (!empty($thisacctid) && !empty($thisacctlid))
{
$groups =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $groups->db = $phpgw_setup->db;
// Check if the account is already
there.
// If so, we won't try to create it
again.
$acct_exist =
$acct->name2id($thisacctlid);
! if ($acct_exist)
{
$thisacctid = $acct_exist;
--- 146,158 ----
// Do some checks before we try to import the
data to LDAP.
! if(!empty($thisacctid) && !empty($thisacctlid))
{
$groups =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $groups->db =
$GLOBALS['phpgw_setup']->db;
// Check if the account is already
there.
// If so, we won't try to create it
again.
$acct_exist =
$acct->name2id($thisacctlid);
! if($acct_exist)
{
$thisacctid = $acct_exist;
***************
*** 183,189 ****
}
! if ($users)
{
! while (list($key,$accountid) = each($users))
{
$id_exist = 0; $acct_exist = 0;
--- 183,189 ----
}
! if($users)
{
! while(list($key,$accountid) = each($users))
{
$id_exist = 0; $acct_exist = 0;
***************
*** 194,206 ****
// Do some checks before we try to import the
data.
! if (!empty($thisacctid) && !empty($thisacctlid))
{
$accounts =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $accounts->db = $phpgw_setup->db;
// Check if the account is already
there.
// If so, we won't try to create it
again.
$acct_exist =
$acct->name2id($thisacctlid);
! if ($acct_exist)
{
$thisacctid = $acct_exist;
--- 194,206 ----
// Do some checks before we try to import the
data.
! if(!empty($thisacctid) && !empty($thisacctlid))
{
$accounts =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $accounts->db =
$GLOBALS['phpgw_setup']->db;
// Check if the account is already
there.
// If so, we won't try to create it
again.
$acct_exist =
$acct->name2id($thisacctlid);
! if($acct_exist)
{
$thisacctid = $acct_exist;
***************
*** 231,247 ****
}
! $phpgw_setup->show_header('LDAP Export','','ldapexport',$ConfigDomain);
! if ($error)
{
//echo '<br><center><b>Error:</b> '.$error.'</center>';
! $phpgw_setup->show_alert_msg('Error',$error);
}
! if ($setup_complete)
{
echo lang('<br><center>Export has been completed! You will
need to set the user passwords manually.</center>');
echo lang('<br><center>Click <a href="index.php">here</a> to
return to setup </center>');
! $phpgw_setup->show_footer();
exit;
}
--- 231,247 ----
}
! $GLOBALS['phpgw_setup']->html->show_header('LDAP
Export','','ldapexport',$ConfigDomain);
! if($error)
{
//echo '<br><center><b>Error:</b> '.$error.'</center>';
! $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$error);
}
! if($setup_complete)
{
echo lang('<br><center>Export has been completed! You will
need to set the user passwords manually.</center>');
echo lang('<br><center>Click <a href="index.php">here</a> to
return to setup </center>');
! $GLOBALS['phpgw_setup']->html->show_footer();
exit;
}
***************
*** 255,259 ****
$setup_tpl->set_block('ldap','footer','footer');
! while (list($key,$account) = @each($account_info))
{
$user_list .= '<option value="' . $account['account_id'] . '">'
--- 255,259 ----
$setup_tpl->set_block('ldap','footer','footer');
! while(list($key,$account) = @each($account_info))
{
$user_list .= '<option value="' . $account['account_id'] . '">'
***************
*** 263,267 ****
@reset($account_info);
! while (list($key,$account) = @each($account_info))
{
$admin_list .= '<option value="' . $account['account_id'] . '">'
--- 263,267 ----
@reset($account_info);
! while(list($key,$account) = @each($account_info))
{
$admin_list .= '<option value="' . $account['account_id'] . '">'
***************
*** 270,274 ****
}
! while (list($key,$group) = @each($group_info))
{
$group_list .= '<option value="' . $group['account_id'] . '">'
--- 270,274 ----
}
! while(list($key,$group) = @each($group_info))
{
$group_list .= '<option value="' . $group['account_id'] . '">'
***************
*** 295,299 ****
$setup_tpl->pfp('out','user_list');
}
! if ($group_info)
{
$setup_tpl->pfp('out','group_list');
--- 295,299 ----
$setup_tpl->pfp('out','user_list');
}
! if($group_info)
{
$setup_tpl->pfp('out','group_list');
***************
*** 301,304 ****
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
! $phpgw_setup->show_footer();
?>
--- 301,305 ----
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
!
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: ldapimport.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/ldapimport.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** ldapimport.php 2 Jan 2002 14:33:05 -0000 1.5
--- ldapimport.php 3 Mar 2002 21:52:52 -0000 1.6
***************
*** 22,26 ****
// Authorize the user to use setup app and load the database
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 22,26 ----
// Authorize the user to use setup app and load the database
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 40,47 ****
$common = $phpgw->common;
! $phpgw_setup->loaddb();
! $phpgw->db = $phpgw_setup->db;
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 40,47 ----
$common = $phpgw->common;
! $GLOBALS['phpgw_setup']->loaddb();
! $phpgw->db = $GLOBALS['phpgw_setup']->db;
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 57,64 ****
$applications = $phpgw->applications;
! $phpgw_setup->db->query("SELECT config_name,config_value FROM
phpgw_config WHERE config_name LIKE 'ldap%' OR
config_name='account_repository'",__LINE__,__FILE__);
! while ($phpgw_setup->db->next_record())
{
! $config[$phpgw_setup->db->f('config_name')] =
$phpgw_setup->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
--- 57,64 ----
$applications = $phpgw->applications;
! $GLOBALS['phpgw_setup']->db->query("SELECT config_name,config_value
FROM phpgw_config WHERE config_name LIKE 'ldap%' OR
config_name='account_repository'",__LINE__,__FILE__);
! while ($GLOBALS['phpgw_setup']->db->next_record())
{
! $config[$GLOBALS['phpgw_setup']->db->f('config_name')] =
$GLOBALS['phpgw_setup']->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
***************
*** 129,137 ****
}
! $phpgw_setup->db->query("SELECT app_name,app_title FROM
phpgw_applications WHERE app_enabled != '0' AND app_enabled != '3' AND "
. "app_name != 'administration' ORDER BY
app_title",__LINE__,__FILE__);
! while ($phpgw_setup->db->next_record())
{
! $apps[$phpgw_setup->db->f('app_name')] =
$phpgw_setup->db->f('app_title');
}
--- 129,137 ----
}
! $GLOBALS['phpgw_setup']->db->query("SELECT app_name,app_title FROM
phpgw_applications WHERE app_enabled != '0' AND app_enabled != '3' AND "
. "app_name != 'administration' ORDER BY
app_title",__LINE__,__FILE__);
! while ($GLOBALS['phpgw_setup']->db->next_record())
{
! $apps[$GLOBALS['phpgw_setup']->db->f('app_name')] =
$GLOBALS['phpgw_setup']->db->f('app_title');
}
***************
*** 171,175 ****
{
$accounts =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $accounts->db =
$phpgw_setup->db;
// Check if the account is
already there.
--- 171,175 ----
{
$accounts =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $accounts->db =
$GLOBALS['phpgw_setup']->db;
// Check if the account is
already there.
***************
*** 203,207 ****
// below.
$acl =
CreateObject('phpgwapi.acl',intval($thisacctid));
! $acl->db = $phpgw_setup->db;
$acl->read_repository();
--- 203,207 ----
// below.
$acl =
CreateObject('phpgwapi.acl',intval($thisacctid));
! $acl->db =
$GLOBALS['phpgw_setup']->db;
$acl->read_repository();
***************
*** 251,255 ****
{
$groups =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $groups->db = $phpgw_setup->db;
// Check if the account is
already there.
--- 251,255 ----
{
$groups =
CreateObject('phpgwapi.accounts',intval($thisacctid));
! $groups->db =
$GLOBALS['phpgw_setup']->db;
// Check if the account is
already there.
***************
*** 304,308 ****
{
$acl =
CreateObject('phpgwapi.acl',$tmpid);
! $acl->db =
$phpgw_setup->db;
$acl->account_id = intval($tmpid);
$acl->read_repository();
--- 304,308 ----
{
$acl =
CreateObject('phpgwapi.acl',$tmpid);
! $acl->db =
$GLOBALS['phpgw_setup']->db;
$acl->account_id = intval($tmpid);
$acl->read_repository();
***************
*** 321,325 ****
*/
$pref =
CreateObject('phpgwapi.preferences',$tmpid);
! $pref->db =
$phpgw_setup->db;
$pref->account_id = intval($tmpid);
$pref->read_repository();
--- 321,325 ----
*/
$pref =
CreateObject('phpgwapi.preferences',$tmpid);
! $pref->db =
$GLOBALS['phpgw_setup']->db;
$pref->account_id = intval($tmpid);
$pref->read_repository();
***************
*** 335,339 ****
$phpgw_info['user']['account_id'] = $thisacctid;
$acl =
CreateObject('phpgwapi.acl');
! $acl->db = $phpgw_setup->db;
$acl->account_id =
intval($thisacctid);
$acl->read_repository();
--- 335,339 ----
$phpgw_info['user']['account_id'] = $thisacctid;
$acl =
CreateObject('phpgwapi.acl');
! $acl->db =
$GLOBALS['phpgw_setup']->db;
$acl->account_id =
intval($thisacctid);
$acl->read_repository();
***************
*** 353,357 ****
/* Create the 'Default' group */
$groups =
CreateObject('phpgwapi.accounts',$defaultgroupid);
! $groups->db = $phpgw_setup->db;
// Check if the group account is already there.
--- 353,357 ----
/* Create the 'Default' group */
$groups =
CreateObject('phpgwapi.accounts',$defaultgroupid);
! $groups->db = $GLOBALS['phpgw_setup']->db;
// Check if the group account is already there.
***************
*** 382,386 ****
$acl =
CreateObject('phpgwapi.acl',$defaultgroupid);
! $acl->db = $phpgw_setup->db;
$acl->account_id = intval($defaultgroupid);
$acl->read_repository();
--- 382,386 ----
$acl =
CreateObject('phpgwapi.acl',$defaultgroupid);
! $acl->db = $GLOBALS['phpgw_setup']->db;
$acl->account_id = intval($defaultgroupid);
$acl->read_repository();
***************
*** 397,406 ****
}
! $phpgw_setup->show_header('LDAP Import','','ldapimport',$ConfigDomain);
if ($error)
{
//echo '<br><center><b>Error:</b> '.$error.'</center>';
! $phpgw_setup->show_alert_msg('Error',$error);
}
--- 397,406 ----
}
! $GLOBALS['phpgw_setup']->html->show_header('LDAP
Import','','ldapimport',$ConfigDomain);
if ($error)
{
//echo '<br><center><b>Error:</b> '.$error.'</center>';
! $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$error);
}
***************
*** 408,412 ****
{
echo lang('<br><center>Import has been completed! Click <a
href="index.php">here</a> to return to setup </center>');
! $phpgw_setup->show_footer();
exit;
}
--- 408,412 ----
{
echo lang('<br><center>Import has been completed! Click <a
href="index.php">here</a> to return to setup </center>');
! $GLOBALS['phpgw_setup']->html->show_footer();
exit;
}
***************
*** 477,480 ****
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
! $phpgw_setup->show_footer();
?>
--- 477,481 ----
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
!
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: ldapmodify.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/ldapmodify.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** ldapmodify.php 18 Dec 2001 02:25:55 -0000 1.5
--- ldapmodify.php 3 Mar 2002 21:52:52 -0000 1.6
***************
*** 22,26 ****
/* Authorize the user to use setup app and load the database */
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 22,26 ----
/* Authorize the user to use setup app and load the database */
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 40,47 ****
$common = $phpgw->common;
! $phpgw_setup->loaddb();
! $phpgw->db = $phpgw_setup->db;
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 40,47 ----
$common = $phpgw->common;
! $GLOBALS['phpgw_setup']->loaddb();
! $phpgw->db = $GLOBALS['phpgw_setup']->db;
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 52,59 ****
));
! $phpgw_setup->db->query("SELECT config_name,config_value FROM
phpgw_config WHERE config_name LIKE 'ldap%' OR
config_name='account_repository'",__LINE__,__FILE__);
! while ($phpgw_setup->db->next_record())
{
! $config[$phpgw_setup->db->f('config_name')] =
$phpgw_setup->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
--- 52,59 ----
));
! $GLOBALS['phpgw_setup']->db->query("SELECT config_name,config_value
FROM phpgw_config WHERE config_name LIKE 'ldap%' OR
config_name='account_repository'",__LINE__,__FILE__);
! while ($GLOBALS['phpgw_setup']->db->next_record())
{
! $config[$GLOBALS['phpgw_setup']->db->f('config_name')] =
$GLOBALS['phpgw_setup']->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
***************
*** 111,119 ****
}
! $phpgw_setup->db->query("SELECT app_name,app_title FROM
phpgw_applications WHERE app_enabled != '0' AND app_enabled != '3' AND "
. "app_name != 'administration' ORDER BY
app_title",__LINE__,__FILE__);
! while ($phpgw_setup->db->next_record())
{
! $apps[$phpgw_setup->db->f('app_name')] =
$phpgw_setup->db->f('app_title');
}
--- 111,119 ----
}
! $GLOBALS['phpgw_setup']->db->query("SELECT app_name,app_title FROM
phpgw_applications WHERE app_enabled != '0' AND app_enabled != '3' AND "
. "app_name != 'administration' ORDER BY
app_title",__LINE__,__FILE__);
! while ($GLOBALS['phpgw_setup']->db->next_record())
{
! $apps[$GLOBALS['phpgw_setup']->db->f('app_name')] =
$GLOBALS['phpgw_setup']->db->f('app_title');
}
***************
*** 124,137 ****
}
! $phpgw_setup->show_header('LDAP Modify','','ldapmodify',$ConfigDomain);
if ($submit)
{
$acl = CreateObject('phpgwapi.acl');
! $acl->db = $phpgw_setup->db;
if ($ldapgroups)
{
$groups = CreateObject('phpgwapi.accounts');
! $groups->db = $phpgw_setup->db;
while (list($key,$groupid) = each($ldapgroups))
{
--- 124,137 ----
}
! $GLOBALS['phpgw_setup']->html->show_header('LDAP
Modify','','ldapmodify',$ConfigDomain);
if ($submit)
{
$acl = CreateObject('phpgwapi.acl');
! $acl->db = $GLOBALS['phpgw_setup']->db;
if ($ldapgroups)
{
$groups = CreateObject('phpgwapi.accounts');
! $groups->db = $GLOBALS['phpgw_setup']->db;
while (list($key,$groupid) = each($ldapgroups))
{
***************
*** 244,248 ****
{
$accounts = CreateObject('phpgwapi.accounts');
! $accounts->db = $phpgw_setup->db;
while (list($key,$id) = each($users))
{
--- 244,248 ----
{
$accounts = CreateObject('phpgwapi.accounts');
! $accounts->db = $GLOBALS['phpgw_setup']->db;
while (list($key,$id) = each($users))
{
***************
*** 344,348 ****
{
/* echo '<br><center><b>Error:</b> '.$error.'</center>'; */
! $phpgw_setup->show_alert_msg('Error',$error);
}
--- 344,348 ----
{
/* echo '<br><center><b>Error:</b> '.$error.'</center>'; */
! $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$error);
}
***************
*** 350,354 ****
{
echo lang('<br><center>Modifications have been completed!
Click <a href="index.php">here</a> to return to setup </center>');
! $phpgw_setup->show_footer();
exit;
}
--- 350,354 ----
{
echo lang('<br><center>Modifications have been completed!
Click <a href="index.php">here</a> to return to setup </center>');
! $GLOBALS['phpgw_setup']->html->show_footer();
exit;
}
***************
*** 412,415 ****
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
! $phpgw_setup->show_footer();
?>
--- 412,416 ----
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
!
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: manageheader.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/manageheader.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** manageheader.php 8 Jan 2002 02:12:43 -0000 1.31
--- manageheader.php 3 Mar 2002 21:52:52 -0000 1.32
***************
*** 12,16 ****
/* $Id$ */
! $phpgw_info['flags'] = array(
'nocachecontrol' => True,
'noheader' => True,
--- 12,17 ----
/* $Id$ */
! $phpgw_info = array();
! $GLOBALS['phpgw_info']['flags'] = array(
'nocachecontrol' => True,
'noheader' => True,
***************
*** 22,26 ****
include('../phpgwapi/setup/setup.inc.php');
! $phpgw_info['server']['versions']['current_header'] =
$setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
#include('../version.inc.php');
--- 23,27 ----
include('../phpgwapi/setup/setup.inc.php');
! $GLOBALS['phpgw_info']['server']['versions']['current_header'] =
$setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
#include('../version.inc.php');
***************
*** 39,43 ****
if ($errors)
{
! $GLOBALS['phpgw_setup']->show_header('Error',True);
echo $errors;
exit;
--- 40,44 ----
if ($errors)
{
!
$GLOBALS['phpgw_setup']->html->show_header('Error',True);
echo $errors;
exit;
***************
*** 46,53 ****
/* authentication phase */
! $phpgw_info['setup']['stage']['header'] = $phpgw_setup->check_header();
// added these to let the app work, need to templatize still
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 47,54 ----
/* authentication phase */
! $GLOBALS['phpgw_info']['setup']['stage']['header'] =
$GLOBALS['phpgw_setup']->detection->check_header();
// added these to let the app work, need to templatize still
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 63,96 ****
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
! switch($phpgw_info['setup']['stage']['header'])
{
case '1':
! $phpgw_info['setup']['HeaderFormMSG'] = 'Create your
header.inc.php';
! $phpgw_info['setup']['PageMSG'] = 'You have not created
your header.inc.php yet!<br> You can create it now.';
break;
case '2':
! $phpgw_info['setup']['HeaderFormMSG'] = 'Your header
admin password is NOT set. Please set it now!';
! $phpgw_info['setup']['PageMSG'] = 'Your header admin
password is NOT set. Please set it now!';
break;
case '3':
! $phpgw_info['setup']['HeaderFormMSG'] = 'Your
header.inc.php needs upgrading.';
! $phpgw_info['setup']['PageMSG'] = 'Your header.inc.php
needs upgrading.<br><blink><font
color=CC0000><b>WARNING!</b></font></blink><br>If you are using virtual domain
support, this will <b>NOT</b> copy those domains over. You will need to do
this manually, <b>MAKE BACKUPS!</b>';
! $phpgw_info['setup']['HeaderLoginMSG'] = 'Your
header.inc.php needs upgrading.';
! if (!$phpgw_setup->auth('Header'))
{
! $phpgw_setup->show_header('Please login',True);
! $phpgw_setup->login_form();
exit;
}
break;
case '10':
! if (!$phpgw_setup->auth('Header'))
{
! $phpgw_setup->show_header('Please login',True);
! $phpgw_setup->login_form();
exit;
}
! $phpgw_info['setup']['HeaderFormMSG'] = 'Edit your
header.inc.php';
! $phpgw_info['setup']['PageMSG'] = 'Edit your existing
header.inc.php';
break;
}
--- 64,97 ----
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
! switch($GLOBALS['phpgw_info']['setup']['stage']['header'])
{
case '1':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Create your header.inc.php';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = 'You have
not created your header.inc.php yet!<br> You can create it now.';
break;
case '2':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Your header admin password is NOT set. Please set it now!';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = 'Your
header admin password is NOT set. Please set it now!';
break;
case '3':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Your header.inc.php needs upgrading.';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = 'Your
header.inc.php needs upgrading.<br><blink><font
color=CC0000><b>WARNING!</b></font></blink><br>If you are using virtual domain
support, this will <b>NOT</b> copy those domains over. You will need to do
this manually, <b>MAKE BACKUPS!</b>';
! $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] =
'Your header.inc.php needs upgrading.';
! if (!$GLOBALS['phpgw_setup']->auth('Header'))
{
!
$GLOBALS['phpgw_setup']->html->show_header('Please login',True);
! $GLOBALS['phpgw_setup']->html->login_form();
exit;
}
break;
case '10':
! if (!$GLOBALS['phpgw_setup']->auth('Header'))
{
!
$GLOBALS['phpgw_setup']->html->show_header('Please login',True);
! $GLOBALS['phpgw_setup']->html->login_form();
exit;
}
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Edit your header.inc.php';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = 'Edit your
existing header.inc.php';
break;
}
***************
*** 105,109 ****
header('Pragma: no-cache');
header('Expires: 0');
! $newheader = $phpgw_setup->generate_header();
echo $newheader;
break;
--- 106,110 ----
header('Pragma: no-cache');
header('Expires: 0');
! $newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
echo $newheader;
break;
***************
*** 111,117 ****
check_form_values();
$header_template =
CreateObject('phpgwapi.Template','../');
! $phpgw_setup->show_header('Generated header.inc.php',
False, 'header');
echo '<br>Save this text as contents of your
header.inc.php<br><hr>';
! $newheader = $phpgw_setup->generate_header();
echo '<pre>';
echo htmlentities($newheader);
--- 112,118 ----
check_form_values();
$header_template =
CreateObject('phpgwapi.Template','../');
! $GLOBALS['phpgw_setup']->html->show_header('Generated
header.inc.php', False, 'header');
echo '<br>Save this text as contents of your
header.inc.php<br><hr>';
! $newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
echo '<pre>';
echo htmlentities($newheader);
***************
*** 129,137 ****
if(is_writeable ('../header.inc.php')|| (!file_exists
('../header.inc.php') && is_writeable ('../')))
{
! $newheader = $phpgw_setup->generate_header();
$fsetup = fopen('../header.inc.php','wb');
fwrite($fsetup,$newheader);
fclose($fsetup);
! $phpgw_setup->show_header('Saved
header.inc.php', False, 'header');
echo '<form action="index.php" method=post>';
echo '<br>Created header.inc.php! ';
--- 130,138 ----
if(is_writeable ('../header.inc.php')|| (!file_exists
('../header.inc.php') && is_writeable ('../')))
{
! $newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
$fsetup = fopen('../header.inc.php','wb');
fwrite($fsetup,$newheader);
fclose($fsetup);
!
$GLOBALS['phpgw_setup']->html->show_header('Saved header.inc.php', False,
'header');
echo '<form action="index.php" method=post>';
echo '<br>Created header.inc.php! ';
***************
*** 144,148 ****
else
{
! $phpgw_setup->show_header('Error generating
header.inc.php', False, 'header');
echo 'Could not open header.inc.php for
writing!<br>' . "\n";
echo 'Please check read/write permissions on
directories or back up and use another option.<br>';
--- 145,149 ----
else
{
!
$GLOBALS['phpgw_setup']->html->show_header('Error generating header.inc.php',
False, 'header');
echo 'Could not open header.inc.php for
writing!<br>' . "\n";
echo 'Please check read/write permissions on
directories or back up and use another option.<br>';
***************
*** 151,156 ****
break;
default:
!
$phpgw_setup->show_header($phpgw_info['setup']['HeaderFormMSG'], False,
'header');
! echo $phpgw_info['setup']['PageMSG'];
/*
echo '<table border="0" width="100%" cellspacing="0"
cellpadding="2">';
--- 152,157 ----
break;
default:
!
$GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['HeaderFormMSG'],
False, 'header');
! echo $GLOBALS['phpgw_info']['setup']['PageMSG'];
/*
echo '<table border="0" width="100%" cellspacing="0"
cellpadding="2">';
***************
*** 230,234 ****
{
echo 'Found existing configuration file.
Loading settings from the file...<br>' . "\n";
! $phpgw_info['flags']['noapi'] = True;
include('../header.inc.php');
$no_guess = true;
--- 231,235 ----
{
echo 'Found existing configuration file.
Loading settings from the file...<br>' . "\n";
! $GLOBALS['phpgw_info']['flags']['noapi'] = True;
include('../header.inc.php');
$no_guess = true;
***************
*** 241,245 ****
else
{
! if
($phpgw_info['server']['header_version'] !=
$phpgw_info['server']['current_header_version'])
{
echo 'Your using an old
header.inc.php version...<br>' . "\n";
--- 242,246 ----
else
{
! if
($GLOBALS['phpgw_info']['server']['header_version'] !=
$GLOBALS['phpgw_info']['server']['current_header_version'])
{
echo 'Your using an old
header.inc.php version...<br>' . "\n";
***************
*** 248,272 ****
reset($phpgw_domain);
$default_domain = each($phpgw_domain);
! $phpgw_info['server']['default_domain']
= $default_domain[0];
unset ($default_domain); // we kill
this for security reasons
! $phpgw_info['server']['db_host'] =
$phpgw_domain[$phpgw_info['server']['default_domain']]['db_host'];
! $phpgw_info['server']['db_name'] =
$phpgw_domain[$phpgw_info['server']['default_domain']]['db_name'];
! $phpgw_info['server']['db_user'] =
$phpgw_domain[$phpgw_info['server']['default_domain']]['db_user'];
! $phpgw_info['server']['db_pass'] =
$phpgw_domain[$phpgw_info['server']['default_domain']]['db_pass'];
! $phpgw_info['server']['db_type'] =
$phpgw_domain[$phpgw_info['server']['default_domain']]['db_type'];
! $phpgw_info['server']['config_passwd']
= $phpgw_domain[$phpgw_info['server']['default_domain']]['config_passwd'];
}
if (defined('PHPGW_SERVER_ROOT'))
{
! $phpgw_info['server']['server_root'] =
PHPGW_SERVER_ROOT;
! $phpgw_info['server']['include_root'] =
PHPGW_INCLUDE_ROOT;
}
! elseif
(!isset($phpgw_info['server']['include_root']) &&
$phpgw_info['server']['header_version'] <= 1.6)
{
! $phpgw_info['server']['include_root'] =
$phpgw_info['server']['server_root'];
}
! elseif
(!isset($phpgw_info['server']['header_version']) &&
$phpgw_info['server']['header_version'] <= 1.6)
{
! $phpgw_info['server']['include_root'] =
$phpgw_info['server']['server_root'];
}
}
--- 249,273 ----
reset($phpgw_domain);
$default_domain = each($phpgw_domain);
!
$GLOBALS['phpgw_info']['server']['default_domain'] = $default_domain[0];
unset ($default_domain); // we kill
this for security reasons
!
$GLOBALS['phpgw_info']['server']['db_host'] =
$phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_host'];
!
$GLOBALS['phpgw_info']['server']['db_name'] =
$phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_name'];
!
$GLOBALS['phpgw_info']['server']['db_user'] =
$phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_user'];
!
$GLOBALS['phpgw_info']['server']['db_pass'] =
$phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_pass'];
!
$GLOBALS['phpgw_info']['server']['db_type'] =
$phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_type'];
!
$GLOBALS['phpgw_info']['server']['config_passwd'] =
$phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['config_passwd'];
}
if (defined('PHPGW_SERVER_ROOT'))
{
!
$GLOBALS['phpgw_info']['server']['server_root'] = PHPGW_SERVER_ROOT;
!
$GLOBALS['phpgw_info']['server']['include_root'] = PHPGW_INCLUDE_ROOT;
}
! elseif
(!isset($GLOBALS['phpgw_info']['server']['include_root']) &&
$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
{
!
$GLOBALS['phpgw_info']['server']['include_root'] =
$GLOBALS['phpgw_info']['server']['server_root'];
}
! elseif
(!isset($GLOBALS['phpgw_info']['server']['header_version']) &&
$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
{
!
$GLOBALS['phpgw_info']['server']['include_root'] =
$GLOBALS['phpgw_info']['server']['server_root'];
}
}
***************
*** 274,294 ****
{
echo 'sample configuration not found. using
built in defaults<br>' . "\n";
! $phpgw_info['server']['server_root'] =
'/path/to/phpgroupware';
! $phpgw_info['server']['include_root'] =
'/path/to/phpgroupware';
/* This is the basic include needed on each
page for phpGroupWare application compliance */
! $phpgw_info['flags']['htmlcompliant'] = True;
/* These are the settings for the database
system */
! $phpgw_info['server']['db_host'] = 'localhost';
! $phpgw_info['server']['db_name'] =
'phpgroupware';
! $phpgw_info['server']['db_user'] =
'phpgroupware';
! $phpgw_info['server']['db_pass'] =
'your_password';
! $phpgw_info['server']['db_type'] = 'mysql';
//mysql, pgsql (for postgresql), or oracle
/* These are a few of the advanced settings */
! $phpgw_info['server']['db_persistent'] = True;
! $phpgw_info['server']['config_passwd'] =
'changeme';
! $phpgw_info['server']['mcrypt_enabled'] = False;
! $phpgw_info['server']['mcrypt_version'] =
'2.6.3';
srand((double)microtime()*1000000);
--- 275,295 ----
{
echo 'sample configuration not found. using
built in defaults<br>' . "\n";
! $GLOBALS['phpgw_info']['server']['server_root']
= '/path/to/phpgroupware';
!
$GLOBALS['phpgw_info']['server']['include_root'] = '/path/to/phpgroupware';
/* This is the basic include needed on each
page for phpGroupWare application compliance */
!
$GLOBALS['phpgw_info']['flags']['htmlcompliant'] = True;
/* These are the settings for the database
system */
! $GLOBALS['phpgw_info']['server']['db_host'] =
'localhost';
! $GLOBALS['phpgw_info']['server']['db_name'] =
'phpgroupware';
! $GLOBALS['phpgw_info']['server']['db_user'] =
'phpgroupware';
! $GLOBALS['phpgw_info']['server']['db_pass'] =
'your_password';
! $GLOBALS['phpgw_info']['server']['db_type'] =
'mysql'; //mysql, pgsql (for postgresql), or oracle
/* These are a few of the advanced settings */
!
$GLOBALS['phpgw_info']['server']['db_persistent'] = True;
!
$GLOBALS['phpgw_info']['server']['config_passwd'] = 'changeme';
!
$GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = False;
!
$GLOBALS['phpgw_info']['server']['mcrypt_version'] = '2.6.3';
srand((double)microtime()*1000000);
***************
*** 301,305 ****
for ($i=0; $i<30; $i++)
{
! $phpgw_info['server']['mcrypt_iv'] .=
$random_char[rand(1,count($random_char))];
}
}
--- 302,306 ----
for ($i=0; $i<30; $i++)
{
!
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] .=
$random_char[rand(1,count($random_char))];
}
}
***************
*** 311,316 ****
$this_dir = dirname($SCRIPT_FILENAME);
$updir = ereg_replace('/setup','',$this_dir);
! $phpgw_info['server']['server_root'] = $updir;
! $phpgw_info['server']['include_root'] = $updir;
}
?>
--- 312,317 ----
$this_dir = dirname($SCRIPT_FILENAME);
$updir = ereg_replace('/setup','',$this_dir);
! $GLOBALS['phpgw_info']['server']['server_root']
= $updir;
!
$GLOBALS['phpgw_info']['server']['include_root'] = $updir;
}
?>
***************
*** 319,330 ****
<form action="manageheader.php" method="post">
<input type="hidden" name="setting[write_config]" value="true">
! <tr><td colspan="2"><b>Server Root</b><br><input type="text"
name="setting[server_root]" size="80" value="<?php echo
$phpgw_info['server']['server_root'] ?>"></td></tr>
! <tr><td colspan="2"><b>Include Root (this should be the same as
Server Root unless you know what you are doing)</b><br><input type="text"
name="setting[include_root]" size="80" value="<?php echo
$phpgw_info['server']['include_root'] ?>"></td></tr>
! <tr><td colspan="2"><b>Admin password to header manager
</b><br><input type="text" name="setting[HEADER_ADMIN_PASSWORD]" size="80"
value="<?php echo $phpgw_info['server']['header_admin_password'] ?>"></td></tr>
<br><br>
! <tr><td><b>DB Host</b><br><input type="text" name="setting[db_host]"
value="<?php echo $phpgw_info['server']['db_host'] ?>"></td><td>Hostname/IP of
Databaseserver</td></tr>
! <tr><td><b>DB Name</b><br><input type="text" name="setting[db_name]"
value="<?php echo $phpgw_info['server']['db_name'] ?>"></td><td>Name of
Database</td></tr>
! <tr><td><b>DB User</b><br><input type="text" name="setting[db_user]"
value="<?php echo $phpgw_info['server']['db_user'] ?>"></td><td>Name of DB User
as phpgroupware has to connect as</td></tr>
! <tr><td><b>DB Password</b><br><input type="text"
name="setting[db_pass]" value="<?php echo $phpgw_info['server']['db_pass']
?>"></td><td>Password of DB User</td></tr>
<tr><td><b>DB Type</b><br><select name="setting[db_type]">
<?php
--- 320,331 ----
<form action="manageheader.php" method="post">
<input type="hidden" name="setting[write_config]" value="true">
! <tr><td colspan="2"><b>Server Root</b><br><input type="text"
name="setting[server_root]" size="80" value="<?php echo
$GLOBALS['phpgw_info']['server']['server_root'] ?>"></td></tr>
! <tr><td colspan="2"><b>Include Root (this should be the same as
Server Root unless you know what you are doing)</b><br><input type="text"
name="setting[include_root]" size="80" value="<?php echo
$GLOBALS['phpgw_info']['server']['include_root'] ?>"></td></tr>
! <tr><td colspan="2"><b>Admin password to header manager
</b><br><input type="text" name="setting[HEADER_ADMIN_PASSWORD]" size="80"
value="<?php echo $GLOBALS['phpgw_info']['server']['header_admin_password']
?>"></td></tr>
<br><br>
! <tr><td><b>DB Host</b><br><input type="text" name="setting[db_host]"
value="<?php echo $GLOBALS['phpgw_info']['server']['db_host']
?>"></td><td>Hostname/IP of Databaseserver</td></tr>
! <tr><td><b>DB Name</b><br><input type="text" name="setting[db_name]"
value="<?php echo $GLOBALS['phpgw_info']['server']['db_name'] ?>"></td><td>Name
of Database</td></tr>
! <tr><td><b>DB User</b><br><input type="text" name="setting[db_user]"
value="<?php echo $GLOBALS['phpgw_info']['server']['db_user'] ?>"></td><td>Name
of DB User as phpgroupware has to connect as</td></tr>
! <tr><td><b>DB Password</b><br><input type="text"
name="setting[db_pass]" value="<?php echo
$GLOBALS['phpgw_info']['server']['db_pass'] ?>"></td><td>Password of DB
User</td></tr>
<tr><td><b>DB Type</b><br><select name="setting[db_type]">
<?php
***************
*** 333,337 ****
while(list($k,$v) = each($supported_db))
{
! if($v == $phpgw_info['server']['db_type'])
{
$selected = ' selected ';
--- 334,338 ----
while(list($k,$v) = each($supported_db))
{
! if($v == $GLOBALS['phpgw_info']['server']['db_type'])
{
$selected = ' selected ';
***************
*** 348,356 ****
</td><td>What Database do you want to use with PHPGroupWare?</td></tr>
! <tr><td><b>Configuration Password</b><br><input type=text
name="setting[config_pass]" value="<?php echo
$phpgw_info['server']['config_passwd'] ?>"></td><td>Password needed for
configuration</td></tr>
<tr><td><b>Persistent connection</b><br>
<select type="checkbox" name="setting[db_persistent]">
! <option value="True"<?php echo
($phpgw_info['server']['db_persistent']?' selected':''); ?>>True</option>
! <option value="False"<?php echo (!
$phpgw_info['server']['db_persistent']?' selected':''); ?>>False</option>
</select></td>
<td>Do you want persistent connections (higher performance, but eats
memory)</td></tr>
--- 349,357 ----
</td><td>What Database do you want to use with PHPGroupWare?</td></tr>
! <tr><td><b>Configuration Password</b><br><input type=text
name="setting[config_pass]" value="<?php echo
$GLOBALS['phpgw_info']['server']['config_passwd'] ?>"></td><td>Password needed
for configuration</td></tr>
<tr><td><b>Persistent connection</b><br>
<select type="checkbox" name="setting[db_persistent]">
! <option value="True"<?php echo
($GLOBALS['phpgw_info']['server']['db_persistent']?' selected':'');
?>>True</option>
! <option value="False"<?php echo (!
$GLOBALS['phpgw_info']['server']['db_persistent']?' selected':'');
?>>False</option>
</select></td>
<td>Do you want persistent connections (higher performance, but eats
memory)</td></tr>
***************
*** 361,365 ****
while(list($k,$v) = each($supported_sessions_type))
{
! if($v == $phpgw_info['server']['sessions_type'])
{
$selected = ' selected ';
--- 362,366 ----
while(list($k,$v) = each($supported_sessions_type))
{
! if($v ==
$GLOBALS['phpgw_info']['server']['sessions_type'])
{
$selected = ' selected ';
***************
*** 376,380 ****
<tr><td colspan=2><b>Enable MCrypt</b><br>
<select name="setting[enable_mcrypt]">
! <?php if($phpgw_info["server"]["mcrypt_enabled"] == True) { ?>
<option value="True" selected>True
<option value="False">False
--- 377,381 ----
<tr><td colspan=2><b>Enable MCrypt</b><br>
<select name="setting[enable_mcrypt]">
! <?php if($GLOBALS['phpgw_info']["server"]["mcrypt_enabled"] == True)
{ ?>
<option value="True" selected>True
<option value="False">False
***************
*** 385,394 ****
</select>
</td></tr>
! <tr><td><b>MCrypt version</b><br><input type="text"
name="setting[mcrypt_version]" value="<?php echo
$phpgw_info['server']['versions']['mcrypt'] ?>"></td><td>Set this to "old" for
versions < 2.4, otherwise the exact mcrypt version you use</td></tr>
! <tr><td><b>MCrypt initilazation vector</b><br><input type="text"
name="setting[mcrypt_iv]" value="<?php echo $phpgw_info['server']['mcrypt_iv']
?>" size="30"></td><td>It should be around 30 bytes in length.<br>Note: The
default has been randomly generated.</td></tr>
<tr><td><b>Domain select box on login</b><br>
<select name="setting[domain_selectbox]">
! <option value="True"<?php echo
($phpgw_info['server']['domain_selectbox']?' selected':''); ?>>True</option>
! <option value="False"<?php echo (!
$phpgw_info['server']['domain_selectbox']?' selected':''); ?>>False</option>
</select></td><td> </td>
</tr>
--- 386,395 ----
</select>
</td></tr>
! <tr><td><b>MCrypt version</b><br><input type="text"
name="setting[mcrypt_version]" value="<?php echo
$GLOBALS['phpgw_info']['server']['versions']['mcrypt'] ?>"></td><td>Set this to
"old" for versions < 2.4, otherwise the exact mcrypt version you
use</td></tr>
! <tr><td><b>MCrypt initilazation vector</b><br><input type="text"
name="setting[mcrypt_iv]" value="<?php echo
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] ?>" size="30"></td><td>It should
be around 30 bytes in length.<br>Note: The default has been randomly
generated.</td></tr>
<tr><td><b>Domain select box on login</b><br>
<select name="setting[domain_selectbox]">
! <option value="True"<?php echo
($GLOBALS['phpgw_info']['server']['domain_selectbox']?' selected':'');
?>>True</option>
! <option value="False"<?php echo (!
$GLOBALS['phpgw_info']['server']['domain_selectbox']?' selected':'');
?>>False</option>
</select></td><td> </td>
</tr>
***************
*** 397,401 ****
if(!$found_dbtype)
{
! echo '<br><font color=red>Warning!<br>The db_type in
defaults ('.$phpgw_info['server']['db_type'].') is not supported on this
server. using first supported type.</font>';
}
echo "<br>";
--- 398,402 ----
if(!$found_dbtype)
{
! echo '<br><font color=red>Warning!<br>The db_type in
defaults ('.$GLOBALS['phpgw_info']['server']['db_type'].') is not supported on
this server. using first supported type.</font>';
}
echo "<br>";
***************
*** 416,421 ****
//echo '<input type=hidden name="FormLogout" value="config">';
//echo '<input type=hidden name="ConfigLogin" value="Login">';
! //echo '<input type=hidden name="FormPW"
value="'.$phpgw_domain[$phpgw_info["server"]["default_domain"]]["config_passwd"].'">';
! //echo '<input type=hidden name="FormDomain"
value="'.$phpgw_info["server"]["default_domain"].'">';
echo '<input type=submit name="junk" value="continue">';
echo '</form>';
--- 417,422 ----
//echo '<input type=hidden name="FormLogout" value="config">';
//echo '<input type=hidden name="ConfigLogin" value="Login">';
! //echo '<input type=hidden name="FormPW"
value="'.$phpgw_domain[$GLOBALS['phpgw_info']["server"]["default_domain"]]["config_passwd"].'">';
! //echo '<input type=hidden name="FormDomain"
value="'.$GLOBALS['phpgw_info']["server"]["default_domain"].'">';
echo '<input type=submit name="junk" value="continue">';
echo '</form>';
Index: schematoy.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/schematoy.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** schematoy.php 18 Feb 2002 16:18:34 -0000 1.7
--- schematoy.php 3 Mar 2002 21:52:52 -0000 1.8
***************
*** 24,28 ****
// Check header and authentication
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 24,28 ----
// Check header and authentication
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 31,35 ****
// Does not return unless user is authorized
! $tpl_root = $GLOBALS['phpgw_setup']->setup_tpl_dir('setup');
$GLOBALS['setup_tpl'] = CreateObject('phpgwapi.Template',$tpl_root);
$GLOBALS['setup_tpl']->set_file(array(
--- 31,35 ----
// Does not return unless user is authorized
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$GLOBALS['setup_tpl'] = CreateObject('phpgwapi.Template',$tpl_root);
$GLOBALS['setup_tpl']->set_file(array(
***************
*** 88,100 ****
$GLOBALS['phpgw_setup']->loaddb();
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$GLOBALS['phpgw_setup']->check_db();
! $GLOBALS['setup_info'] = $GLOBALS['phpgw_setup']->get_versions();
//var_dump($GLOBALS['setup_info']);exit;
! $GLOBALS['setup_info'] =
$GLOBALS['phpgw_setup']->get_db_versions($GLOBALS['setup_info']);
//var_dump($GLOBALS['setup_info']);exit;
! $GLOBALS['setup_info'] =
$GLOBALS['phpgw_setup']->compare_versions($GLOBALS['setup_info']);
//var_dump($GLOBALS['setup_info']);exit;
! $GLOBALS['setup_info'] =
$GLOBALS['phpgw_setup']->check_depends($GLOBALS['setup_info']);
//var_dump($GLOBALS['setup_info']);exit;
@ksort($GLOBALS['setup_info']);
--- 88,100 ----
$GLOBALS['phpgw_setup']->loaddb();
! $GLOBALS['phpgw_info']['setup']['stage']['db'] =
$GLOBALS['phpgw_setup']->detection->check_db();
! $GLOBALS['setup_info'] =
$GLOBALS['phpgw_setup']->detection->get_versions();
//var_dump($GLOBALS['setup_info']);exit;
! $GLOBALS['setup_info'] =
$GLOBALS['phpgw_setup']->detection->get_db_versions($GLOBALS['setup_info']);
//var_dump($GLOBALS['setup_info']);exit;
! $GLOBALS['setup_info'] =
$GLOBALS['phpgw_setup']->detection->compare_versions($GLOBALS['setup_info']);
//var_dump($GLOBALS['setup_info']);exit;
! $GLOBALS['setup_info'] =
$GLOBALS['phpgw_setup']->detection->check_depends($GLOBALS['setup_info']);
//var_dump($GLOBALS['setup_info']);exit;
@ksort($GLOBALS['setup_info']);
***************
*** 107,111 ****
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ?
$HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
! $GLOBALS['phpgw_setup']->show_header(lang("Developers' Table Schema
Toy"),False,'config',$ConfigDomain);
if ($HTTP_POST_VARS['submit'])
--- 107,111 ----
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ?
$HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
! $GLOBALS['phpgw_setup']->html->show_header(lang("Developers' Table
Schema Toy"),False,'config',$ConfigDomain);
if ($HTTP_POST_VARS['submit'])
***************
*** 128,132 ****
// Drop newest tables
$terror[$appname]['tables'] =
$GLOBALS['setup_info'][$appname]['tables'];
!
$GLOBALS['phpgw_setup']->process_droptables($terror,$GLOBALS['DEBUG']);
$terror[$appname]['tables'] = array();
--- 128,132 ----
// Drop newest tables
$terror[$appname]['tables'] =
$GLOBALS['setup_info'][$appname]['tables'];
!
$GLOBALS['phpgw_setup']->process->droptables($terror,$GLOBALS['DEBUG']);
$terror[$appname]['tables'] = array();
***************
*** 146,156 ****
echo '<br>Processing ' .
$terror[$appname]['name'] . ' to ' . $version[$appname];
! $terror =
$GLOBALS['phpgw_setup']->process_droptables($terror,$GLOBALS['DEBUG']);
$GLOBALS['phpgw_setup']->deregister_app($terror[$appname]['name']);
! $terror =
$GLOBALS['phpgw_setup']->process_baseline($terror,$GLOBALS['DEBUG']);
! $terror =
$GLOBALS['phpgw_setup']->process_test_data($terror,$GLOBALS['DEBUG']);
! $terror =
$GLOBALS['phpgw_setup']->process_upgrade($terror,$GLOBALS['DEBUG']);
}
else
--- 146,156 ----
echo '<br>Processing ' .
$terror[$appname]['name'] . ' to ' . $version[$appname];
! $terror =
$GLOBALS['phpgw_setup']->process->droptables($terror,$GLOBALS['DEBUG']);
$GLOBALS['phpgw_setup']->deregister_app($terror[$appname]['name']);
! $terror =
$GLOBALS['phpgw_setup']->process->baseline($terror,$GLOBALS['DEBUG']);
! $terror =
$GLOBALS['phpgw_setup']->process->test_data($terror,$GLOBALS['DEBUG']);
! $terror =
$GLOBALS['phpgw_setup']->process->upgrade($terror,$GLOBALS['DEBUG']);
}
else
***************
*** 272,275 ****
$GLOBALS['setup_tpl']->pparse('out','app_footer');
$GLOBALS['setup_tpl']->pparse('out','footer');
! $GLOBALS['phpgw_setup']->show_footer();
?>
--- 272,275 ----
$GLOBALS['setup_tpl']->pparse('out','app_footer');
$GLOBALS['setup_tpl']->pparse('out','footer');
! $GLOBALS['phpgw_setup']->html->show_footer();
?>
Index: setup_demo.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/setup_demo.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** setup_demo.php 18 Feb 2002 12:44:25 -0000 1.25
--- setup_demo.php 3 Mar 2002 21:52:52 -0000 1.26
***************
*** 17,21 ****
'noheader' => True,
'nonavbar' => True,
! 'currentapp' => "home",
'noapi' => True
);
--- 17,21 ----
'noheader' => True,
'nonavbar' => True,
! 'currentapp' => 'home',
'noapi' => True
);
***************
*** 24,28 ****
// Authorize the user to use setup app and load the database
// Does not return unless user is authorized
! if (!$phpgw_setup->auth('Config') || $HTTP_POST_VARS['cancel'])
{
Header('Location: index.php');
--- 24,28 ----
// Authorize the user to use setup app and load the database
// Does not return unless user is authorized
! if(!$GLOBALS['phpgw_setup']->auth('Config') ||
$HTTP_POST_VARS['cancel'])
{
Header('Location: index.php');
***************
*** 46,52 ****
}
! if (!$HTTP_POST_VARS['submit'])
{
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
--- 46,52 ----
}
! if(!$HTTP_POST_VARS['submit'])
{
! $tpl_root =
$GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
***************
*** 61,65 ****
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
! $phpgw_setup->show_header(lang('Demo Server Setup'));
$setup_tpl->set_var('action_url','setup_demo.php');
--- 61,65 ----
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
! $GLOBALS['phpgw_setup']->html->show_header(lang('Demo Server
Setup'));
$setup_tpl->set_var('action_url','setup_demo.php');
***************
*** 78,82 ****
$setup_tpl->set_var('lang_cancel',lang('cancel'));
$setup_tpl->pparse('out','T_setup_demo');
! $phpgw_setup->show_footer();
}
else
--- 78,82 ----
$setup_tpl->set_var('lang_cancel',lang('cancel'));
$setup_tpl->pparse('out','T_setup_demo');
! $GLOBALS['phpgw_setup']->html->show_footer();
}
else
***************
*** 89,98 ****
$lname = $HTTP_POST_VARS['lname'];
! if ($passwd != $passwd2)
{
echo lang('Passwords did not match, please re-enter') .
'.';
exit;
}
! if (!$username)
{
echo lang('You must enter a username for the admin') .
'.';
--- 89,98 ----
$lname = $HTTP_POST_VARS['lname'];
! if($passwd != $passwd2)
{
echo lang('Passwords did not match, please re-enter') .
'.';
exit;
}
! if(!$username)
{
echo lang('You must enter a username for the admin') .
'.';
***************
*** 100,109 ****
}
! $phpgw_setup->loaddb();
/* Load up some configured values */
! $phpgw_setup->db->query("SELECT config_name,config_value FROM
phpgw_config WHERE config_name LIKE 'ldap%' OR
config_name='account_repository'",__LINE__,__FILE__);
! while ($phpgw_setup->db->next_record())
{
! $config[$phpgw_setup->db->f('config_name')] =
$phpgw_setup->db->f('config_value');
}
$GLOBALS['phpgw_info']['server']['ldap_host'] =
$config['ldap_host'];
--- 100,109 ----
}
! $GLOBALS['phpgw_setup']->loaddb();
/* Load up some configured values */
! $GLOBALS['phpgw_setup']->db->query("SELECT
config_name,config_value FROM phpgw_config WHERE config_name LIKE 'ldap%' OR
config_name='account_repository'",__LINE__,__FILE__);
! while ($GLOBALS['phpgw_setup']->db->next_record())
{
! $config[$GLOBALS['phpgw_setup']->db->f('config_name')]
= $GLOBALS['phpgw_setup']->db->f('config_value');
}
$GLOBALS['phpgw_info']['server']['ldap_host'] =
$config['ldap_host'];
***************
*** 127,131 ****
}
$GLOBALS['phpgw'] = new phpgw;
! $GLOBALS['phpgw']->db = $phpgw_setup->db;
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
$GLOBALS['phpgw']->accounts = CreateObject('phpgwapi.accounts');
--- 127,131 ----
}
$GLOBALS['phpgw'] = new phpgw;
! $GLOBALS['phpgw']->db = $GLOBALS['phpgw_setup']->db;
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
$GLOBALS['phpgw']->accounts = CreateObject('phpgwapi.accounts');
***************
*** 138,147 ****
/* Begin transaction for acl, etc */
! $phpgw_setup->db->transaction_begin();
/* Now, clear out existing tables */
! $phpgw_setup->db->query('DELETE FROM phpgw_accounts');
! $phpgw_setup->db->query('DELETE FROM phpgw_preferences');
! $phpgw_setup->db->query('DELETE FROM phpgw_acl');
$defaultprefs =
'a:3:{s:6:"common";a:10:{s:9:"maxmatchs";s:2:"15";s:12:"template_set";s:8:"verdilak";s:5:"theme";s:6:"purple";s:13:"navbar_format";s:5:"icons";s:9:"tz_offset";s:0:"";s:10:"dateformat";s:5:"m/d/Y";s:10:"timeformat";s:2:"12";s:4:"lang";s:2:"en";s:11:"default_app";s:0:"";s:8:"currency";s:1:"$";}s:11:"addressbook";a:1:{s:0:"";s:4:"True";}s:8:"calendar";a:4:{s:13:"workdaystarts";s:1:"7";s:11:"workdayends";s:2:"15";s:13:"weekdaystarts";s:6:"Monday";s:15:"defaultcalendar";s:9:"month.php";}}';
--- 138,147 ----
/* Begin transaction for acl, etc */
! $GLOBALS['phpgw_setup']->db->transaction_begin();
/* Now, clear out existing tables */
! $GLOBALS['phpgw_setup']->db->query('DELETE FROM
phpgw_accounts');
! $GLOBALS['phpgw_setup']->db->query('DELETE FROM
phpgw_preferences');
! $GLOBALS['phpgw_setup']->db->query('DELETE FROM phpgw_acl');
$defaultprefs =
'a:3:{s:6:"common";a:10:{s:9:"maxmatchs";s:2:"15";s:12:"template_set";s:8:"verdilak";s:5:"theme";s:6:"purple";s:13:"navbar_format";s:5:"icons";s:9:"tz_offset";s:0:"";s:10:"dateformat";s:5:"m/d/Y";s:10:"timeformat";s:2:"12";s:4:"lang";s:2:"en";s:11:"default_app";s:0:"";s:8:"currency";s:1:"$";}s:11:"addressbook";a:1:{s:0:"";s:4:"True";}s:8:"calendar";a:4:{s:13:"workdaystarts";s:1:"7";s:11:"workdayends";s:2:"15";s:13:"weekdaystarts";s:6:"Monday";s:15:"defaultcalendar";s:9:"month.php";}}';
***************
*** 152,193 ****
/* Creation of the demo accounts is now optional - the checkbox
is on by default. */
! if ($HTTP_POST_VARS['create_demo'])
{
/* Create records for demo accounts */
$accountid =
add_account('demo','Demo','Account','guest');
! $phpgw_setup->db->query("INSERT INTO phpgw_preferences
(preference_owner, preference_value) VALUES ('$accountid', '$defaultprefs')");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('preferences',
'changepassword', ".$accountid.", 0)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('phpgw_group',
'".$defaultgroupid."', $accountid, 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('addressbook',
'run', ".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('filemanager',
'run', ".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('calendar', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('email', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('notes', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('todo', 'run',
".$accountid.", 1)");
$accountid =
add_account('demo2','Demo2','Account','guest');
! $phpgw_setup->db->query("INSERT INTO phpgw_preferences
(preference_owner, preference_value) VALUES ('$accountid', '$defaultprefs')");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('preferences',
'changepassword', ".$accountid.", 0)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_account, acl_location, acl_rights) VALUES ('phpgw_group',
'".$defaultgroupid."', $accountid, 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('addressbook',
'run', ".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('filemanager',
'run', ".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('calendar', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('email', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('notes', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('todo', 'run',
".$accountid.", 1)");
$accountid =
add_account('demo3','Demo3','Account','guest');
! $phpgw_setup->db->query("INSERT INTO phpgw_preferences
(preference_owner, preference_value) VALUES ('$accountid', '$defaultprefs')");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('preferences',
'changepassword', ".$accountid.", 0)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('phpgw_group',
'".$defaultgroupid."', $accountid, 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('addressbook',
'run', ".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('filemanager',
'run', ".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('calendar', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('email', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('notes', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('todo', 'run',
".$accountid.", 1)");
}
--- 152,193 ----
/* Creation of the demo accounts is now optional - the checkbox
is on by default. */
! if($HTTP_POST_VARS['create_demo'])
{
/* Create records for demo accounts */
$accountid =
add_account('demo','Demo','Account','guest');
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences (preference_owner, preference_value) VALUES ('$accountid',
'$defaultprefs')");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('preferences', 'changepassword', ".$accountid.", 0)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('phpgw_group', '".$defaultgroupid."', $accountid, 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('addressbook', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('filemanager', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('calendar', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('email',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('notes',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('todo',
'run', ".$accountid.", 1)");
$accountid =
add_account('demo2','Demo2','Account','guest');
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences (preference_owner, preference_value) VALUES ('$accountid',
'$defaultprefs')");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('preferences', 'changepassword', ".$accountid.", 0)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_account, acl_location, acl_rights) VALUES
('phpgw_group', '".$defaultgroupid."', $accountid, 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('addressbook', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('filemanager', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('calendar', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('email',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('notes',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('todo',
'run', ".$accountid.", 1)");
$accountid =
add_account('demo3','Demo3','Account','guest');
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences (preference_owner, preference_value) VALUES ('$accountid',
'$defaultprefs')");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('preferences', 'changepassword', ".$accountid.", 0)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('phpgw_group', '".$defaultgroupid."', $accountid, 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('addressbook', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('filemanager', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES
('calendar', 'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('email',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('notes',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('todo',
'run', ".$accountid.", 1)");
}
***************
*** 195,213 ****
$accountid = add_account($username,$fname,$lname,$passwd);
! $phpgw_setup->db->query("INSERT INTO phpgw_preferences
(preference_owner, preference_value) VALUES ('$accountid', '$defaultprefs')");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('phpgw_group',
'".$defaultgroupid."', $accountid, 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('phpgw_group',
'".$admingroupid."', $accountid, 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('preferences', 'changepassword',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('admin', 'run', ".$accountid.",
1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('addressbook', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('filemanager', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('calendar', 'run',
".$accountid.", 1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('email', 'run', ".$accountid.",
1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('notes', 'run', ".$accountid.",
1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('nntp', 'run', ".$accountid.",
1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('todo', 'run', ".$accountid.",
1)");
! $phpgw_setup->db->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights) VALUES ('manual', 'run', ".$accountid.",
1)");
! $phpgw_setup->db->transaction_commit();
Header('Location: index.php');
--- 195,213 ----
$accountid = add_account($username,$fname,$lname,$passwd);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences (preference_owner, preference_value) VALUES ('$accountid',
'$defaultprefs')");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('phpgw_group',
'".$defaultgroupid."', $accountid, 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('phpgw_group',
'".$admingroupid."', $accountid, 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('preferences',
'changepassword', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('admin', 'run',
".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('addressbook',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('filemanager',
'run', ".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('calendar', 'run',
".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('email', 'run',
".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('notes', 'run',
".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('nntp', 'run',
".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('todo', 'run',
".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_acl
(acl_appname, acl_location, acl_account, acl_rights) VALUES ('manual', 'run',
".$accountid.", 1)");
! $GLOBALS['phpgw_setup']->db->transaction_commit();
Header('Location: index.php');
Index: sqltoarray.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/sqltoarray.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** sqltoarray.php 8 Jan 2002 02:12:43 -0000 1.9
--- sqltoarray.php 3 Mar 2002 21:52:52 -0000 1.10
***************
*** 21,26 ****
include ('./inc/functions.inc.php');
! // Check header and authentication
! if (!$phpgw_setup->auth('Config'))
{
Header('Location: index.php');
--- 21,26 ----
include ('./inc/functions.inc.php');
! /* Check header and authentication */
! if (!$GLOBALS['phpgw_setup']->auth('Config'))
{
Header('Location: index.php');
***************
*** 29,33 ****
// Does not return unless user is authorized
! $tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
--- 29,33 ----
// Does not return unless user is authorized
! $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
***************
*** 71,75 ****
}
! $phpgw_setup->loaddb();
function parse_vars($table,$term)
--- 71,75 ----
}
! $GLOBALS['phpgw_setup']->loaddb();
function parse_vars($table,$term)
***************
*** 78,82 ****
$GLOBALS['setup_tpl']->set_var('term',$term);
! list($arr,$pk,$fk,$ix,$uc) =
$GLOBALS['phpgw_setup']->sql_to_array($table);
$GLOBALS['setup_tpl']->set_var('arr',$arr);
if (count($pk) > 1)
--- 78,82 ----
$GLOBALS['setup_tpl']->set_var('term',$term);
! list($arr,$pk,$fk,$ix,$uc) =
$GLOBALS['phpgw_setup']->process->sql_to_array($table);
$GLOBALS['setup_tpl']->set_var('arr',$arr);
if (count($pk) > 1)
***************
*** 170,174 ****
if (!$download)
{
! $phpgw_setup->show_header();
}
--- 170,174 ----
if (!$download)
{
! $GLOBALS['phpgw_setup']->html->show_header();
}
***************
*** 183,187 ****
$dlstring .= printout('sqlheader');
! $db = $phpgw_setup->db;
$db->query('SHOW TABLES');
while($db->next_record())
--- 183,187 ----
$dlstring .= printout('sqlheader');
! $db = $GLOBALS['phpgw_setup']->db;
$db->query('SHOW TABLES');
while($db->next_record())
***************
*** 237,241 ****
else
{
! $phpgw_setup->show_header();
$setup_tpl->set_var('action_url','sqltoarray.php');
--- 237,241 ----
else
{
! $GLOBALS['phpgw_setup']->html->show_header();
$setup_tpl->set_var('action_url','sqltoarray.php');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup applications.php,1.15,1.16 applist.php,1.7,1.8 config.php,1.72,1.73 index.php,1.104,1.105 lang.php,1.33,1.34 ldap.php,1.50,1.51 ldapexport.php,1.3,1.4 ldapimport.php,1.5,1.6 ldapmodify.php,1.5,1.6 manageheader.php,1.31,1.32 schematoy.php,1.7,1.8 setup_demo.php,1.25,1.26 sqltoarray.php,1.9,1.10,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup/inc README,1.2,1.3 functions.inc.php,1.45,1.46 class.schema_proc.inc.php,1.5,NONE class.schema_proc_array.inc.php,1.3,NONE class.schema_proc_mssql.inc.php,1.4,NONE class.schema_proc_mysql.inc.php,1.8,NONE class.schema_proc_pgsql.inc.php,1.11,NONE class.setup.inc.php,1.24,NONE class.setup_detection.inc.php,1.14,NONE class.setup_html.inc.php,1.9,NONE class.setup_lang.inc.php,1.9,NONE class.setup_process.inc.php,1.12,NONE xml_functions.inc.php,1.1,NONE
- Next by Date:
[Phpgroupware-cvs] CVS: setup/inc README,1.3,1.4
- Previous by thread:
[Phpgroupware-cvs] CVS: setup/inc README,1.2,1.3 functions.inc.php,1.45,1.46 class.schema_proc.inc.php,1.5,NONE class.schema_proc_array.inc.php,1.3,NONE class.schema_proc_mssql.inc.php,1.4,NONE class.schema_proc_mysql.inc.php,1.8,NONE class.schema_proc_pgsql.inc.php,1.11,NONE class.setup.inc.php,1.24,NONE class.setup_detection.inc.php,1.14,NONE class.setup_html.inc.php,1.9,NONE class.setup_lang.inc.php,1.9,NONE class.setup_process.inc.php,1.12,NONE xml_functions.inc.php,1.1,NONE
- Next by thread:
[Phpgroupware-cvs] CVS: setup/inc README,1.3,1.4
- Index(es):