diff --git a/setup/applications.php b/setup/applications.php
index cd3a489258..3c1ebed9fb 100644
--- a/setup/applications.php
+++ b/setup/applications.php
@@ -19,26 +19,26 @@
this will happen without further warning.
*/
- $phpgw_info = array();
- $GLOBALS['phpgw_info']['flags'] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include ('./inc/functions.inc.php');
@set_time_limit(0);
// Check header and authentication
- if (!$GLOBALS['phpgw_setup']->auth('Config'))
+ if (!$GLOBALS['egw_setup']->auth('Config'))
{
Header('Location: index.php');
exit;
}
// Does not return unless user is authorized
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
'T_head' => 'head.tpl',
@@ -94,16 +94,16 @@
}
}
- $GLOBALS['phpgw_setup']->loaddb();
- $GLOBALS['phpgw_info']['setup']['stage']['db'] = $GLOBALS['phpgw_setup']->detection->check_db();
+ $GLOBALS['egw_setup']->loaddb();
+ $GLOBALS['egw_info']['setup']['stage']['db'] = $GLOBALS['egw_setup']->detection->check_db();
- $setup_info = $GLOBALS['phpgw_setup']->detection->get_versions();
+ $setup_info = $GLOBALS['egw_setup']->detection->get_versions();
//var_dump($setup_info);exit;
- $setup_info = $GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info);
+ $setup_info = $GLOBALS['egw_setup']->detection->get_db_versions($setup_info);
//var_dump($setup_info);exit;
- $setup_info = $GLOBALS['phpgw_setup']->detection->compare_versions($setup_info);
+ $setup_info = $GLOBALS['egw_setup']->detection->compare_versions($setup_info);
//var_dump($setup_info);exit;
- $setup_info = $GLOBALS['phpgw_setup']->detection->check_depends($setup_info);
+ $setup_info = $GLOBALS['egw_setup']->detection->check_depends($setup_info);
//var_dump($setup_info);exit;
@ksort($setup_info);
@@ -115,7 +115,7 @@
if(@get_var('submit',Array('POST')))
{
- $GLOBALS['phpgw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
$setup_tpl->set_var('description',lang('App install/remove/upgrade') . ':');
$setup_tpl->pparse('out','header');
@@ -129,7 +129,7 @@
if(!empty($remove) && is_array($remove))
{
$historylog = CreateObject('phpgwapi.historylog');
- $historylog->db = $GLOBALS['phpgw_setup']->db;
+ $historylog->db = $GLOBALS['egw_setup']->db;
foreach($remove as $appname => $key)
{
@@ -139,16 +139,16 @@
if ($setup_info[$appname]['tables'])
{
- $GLOBALS['phpgw_setup']->process->droptables($terror,$DEBUG);
+ $GLOBALS['egw_setup']->process->droptables($terror,$DEBUG);
echo '
' . $app_title . ' ' . lang('tables dropped') . '.';
}
- $GLOBALS['phpgw_setup']->deregister_app($setup_info[$appname]['name']);
+ $GLOBALS['egw_setup']->deregister_app($setup_info[$appname]['name']);
echo '
' . $app_title . ' ' . lang('deregistered') . '.';
if ($setup_info[$appname]['hooks'])
{
- $GLOBALS['phpgw_setup']->deregister_hooks($setup_info[$appname]['name']);
+ $GLOBALS['egw_setup']->deregister_hooks($setup_info[$appname]['name']);
echo '
' . $app_title . ' ' . lang('hooks deregistered') . '.';
}
$do_langs = true;
@@ -159,8 +159,8 @@
}
// delete all application categories and ACL
- $GLOBALS['phpgw_setup']->db->query("DELETE FROM phpgw_categories WHERE cat_appname='$appname'",__LINE__,__FILE__);
- $GLOBALS['phpgw_setup']->db->query("DELETE FROM phpgw_acl WHERE acl_appname='$appname'",__LINE__,__FILE__);
+ $GLOBALS['egw_setup']->db->query("DELETE FROM phpgw_categories WHERE cat_appname='$appname'",__LINE__,__FILE__);
+ $GLOBALS['egw_setup']->db->query("DELETE FROM phpgw_acl WHERE acl_appname='$appname'",__LINE__,__FILE__);
}
}
@@ -174,26 +174,26 @@
if ($setup_info[$appname]['tables'])
{
- $terror = $GLOBALS['phpgw_setup']->process->current($terror,$DEBUG);
- $terror = $GLOBALS['phpgw_setup']->process->default_records($terror,$DEBUG);
+ $terror = $GLOBALS['egw_setup']->process->current($terror,$DEBUG);
+ $terror = $GLOBALS['egw_setup']->process->default_records($terror,$DEBUG);
echo '
' . $app_title . ' '
. lang('tables installed, unless there are errors printed above') . '.';
}
else
{
- if ($GLOBALS['phpgw_setup']->app_registered($setup_info[$appname]['name']))
+ if ($GLOBALS['egw_setup']->app_registered($setup_info[$appname]['name']))
{
- $GLOBALS['phpgw_setup']->update_app($setup_info[$appname]['name']);
+ $GLOBALS['egw_setup']->update_app($setup_info[$appname]['name']);
}
else
{
- $GLOBALS['phpgw_setup']->register_app($setup_info[$appname]['name']);
+ $GLOBALS['egw_setup']->register_app($setup_info[$appname]['name']);
}
echo '
' . $app_title . ' ' . lang('registered') . '.';
if ($setup_info[$appname]['hooks'])
{
- $GLOBALS['phpgw_setup']->register_hooks($setup_info[$appname]['name']);
+ $GLOBALS['egw_setup']->register_hooks($setup_info[$appname]['name']);
echo '
' . $app_title . ' ' . lang('hooks registered') . '.';
}
}
@@ -209,7 +209,7 @@
$terror = array();
$terror[] = $setup_info[$appname];
- $GLOBALS['phpgw_setup']->process->upgrade($terror,$DEBUG);
+ $GLOBALS['egw_setup']->process->upgrade($terror,$DEBUG);
if ($setup_info[$appname]['tables'])
{
echo '
' . $app_title . ' ' . lang('tables upgraded') . '.';
@@ -224,7 +224,7 @@
}
if ($do_langs)
{
- $GLOBALS['phpgw_setup']->process->translation->drop_add_all_langs();
+ $GLOBALS['egw_setup']->process->translation->drop_add_all_langs();
}
//$setup_tpl->set_var('goback',
echo '
' . lang('Go back') . '';
@@ -234,7 +234,7 @@
}
else
{
- $GLOBALS['phpgw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
}
$detail = get_var('detail',Array('GET'));
@@ -411,7 +411,7 @@
case 'C':
$setup_tpl->set_var('remove','');
$setup_tpl->set_var('upgrade',' ');
- if (!$GLOBALS['phpgw_setup']->detection->check_app_tables($value['name']))
+ if (!$GLOBALS['egw_setup']->detection->check_app_tables($value['name']))
{
// App installed and enabled, but some tables are missing
$setup_tpl->set_var('instimg','table.png');
@@ -449,7 +449,7 @@
$setup_tpl->set_var('instalt',lang('Not Completed'));
if (!@$value['currentver'])
{
- if ($value['tables'] && $GLOBALS['phpgw_setup']->detection->check_app_tables($value['name'],True))
+ if ($value['tables'] && $GLOBALS['egw_setup']->detection->check_app_tables($value['name'],True))
{
// Some tables missing
$setup_tpl->set_var('remove','');
@@ -533,6 +533,6 @@
$setup_tpl->set_var('cancel',lang('Cancel'));
$setup_tpl->pparse('out','app_footer');
$setup_tpl->pparse('out','footer');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
}
?>
diff --git a/setup/check_install.php b/setup/check_install.php
index f05f3e31b0..fbadebe5af 100644
--- a/setup/check_install.php
+++ b/setup/check_install.php
@@ -17,22 +17,22 @@
if ($run_by_webserver)
{
- $phpgw_info = array();
- $GLOBALS['phpgw_info']['flags'] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
$safe_er = error_reporting();
include ('./inc/functions.inc.php');
error_reporting($safe_er);
- $GLOBALS['phpgw_info']['setup']['stage']['header'] = $GLOBALS['phpgw_setup']->detection->check_header();
- if ($GLOBALS['phpgw_info']['setup']['stage']['header'] == '10')
+ $GLOBALS['egw_info']['setup']['stage']['header'] = $GLOBALS['egw_setup']->detection->check_header();
+ if ($GLOBALS['egw_info']['setup']['stage']['header'] == '10')
{
// Check header and authentication
- if (!$GLOBALS['phpgw_setup']->auth('Config') && !$GLOBALS['phpgw_setup']->auth('Header'))
+ if (!$GLOBALS['egw_setup']->auth('Config') && !$GLOBALS['egw_setup']->auth('Header'))
{
Header('Location: index.php');
exit;
@@ -143,7 +143,7 @@
'header.inc.php' => array(
'func' => 'permission_check',
'is_world_readable' => False,
- 'only_if_exists' => @$GLOBALS['phpgw_info']['setup']['stage']['header'] != 10
+ 'only_if_exists' => @$GLOBALS['egw_info']['setup']['stage']['header'] != 10
),
'phpgwapi/images' => array(
'func' => 'permission_check',
@@ -443,7 +443,7 @@
if ($run_by_webserver)
{
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
'T_head' => 'head.tpl',
@@ -453,9 +453,9 @@
if (@$_GET['intro']) {
if($ConfigLang = get_var('ConfigLang',array('POST','COOKIE')))
{
- $GLOBALS['phpgw_setup']->set_cookie('ConfigLang',$ConfigLang,(int) (time()+(1200*9)),'/');
+ $GLOBALS['egw_setup']->set_cookie('ConfigLang',$ConfigLang,(int) (time()+(1200*9)),'/');
}
- $GLOBALS['phpgw_setup']->html->show_header(lang('Welcome to the eGroupWare Installation'),False,'config');
+ $GLOBALS['egw_setup']->html->show_header(lang('Welcome to the eGroupWare Installation'),False,'config');
echo '
'.lang('Welcome to the eGroupWare Installation')."
\n";
if(!$ConfigLang)
{
@@ -467,7 +467,7 @@
$setup_tpl->pparse('out','T_footer');
exit;
} else {
- $GLOBALS['phpgw_setup']->html->show_header(lang('Checking the eGroupWare Installation'),False,'config',$ConfigDomain ? $ConfigDomain . '(' . @$phpgw_domain[$ConfigDomain]['db_type'] . ')' : '');
+ $GLOBALS['egw_setup']->html->show_header(lang('Checking the eGroupWare Installation'),False,'config',$ConfigDomain ? $ConfigDomain . '(' . @$GLOBALS['egw_domain'][$ConfigDomain]['db_type'] . ')' : '');
echo ''.lang('Checking the eGroupWare Installation')."
\n";
# echo "\n";;
}
@@ -489,7 +489,7 @@
{
# echo "
\n";;
- if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != 10)
+ if ($GLOBALS['egw_info']['setup']['stage']['header'] != 10)
{
if (!$Ok)
{
diff --git a/setup/config.php b/setup/config.php
index ba3c799eb5..fac078a825 100644
--- a/setup/config.php
+++ b/setup/config.php
@@ -11,26 +11,26 @@
/* $Id$ */
- $phpgw_info = array();
- $GLOBALS['phpgw_info']['flags'] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include('./inc/functions.inc.php');
/*
Authorize the user to use setup app and load the database
Does not return unless user is authorized
*/
- if(!$GLOBALS['phpgw_setup']->auth('Config') || @$_POST['cancel'])
+ if(!$GLOBALS['egw_setup']->auth('Config') || @$_POST['cancel'])
{
Header('Location: index.php');
exit;
}
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
@@ -44,12 +44,12 @@
/* Following to ensure windows file paths are saved correctly */
set_magic_quotes_runtime(0);
- $GLOBALS['phpgw_setup']->loaddb();
+ $GLOBALS['egw_setup']->loaddb();
/* Check api version, use correct table */
- $setup_info = $GLOBALS['phpgw_setup']->detection->get_db_versions();
+ $setup_info = $GLOBALS['egw_setup']->detection->get_db_versions();
- if($GLOBALS['phpgw_setup']->alessthanb($setup_info['phpgwapi']['currentver'], '0.9.10pre7'))
+ if($GLOBALS['egw_setup']->alessthanb($setup_info['phpgwapi']['currentver'], '0.9.10pre7'))
{
$configtbl = 'config';
}
@@ -63,7 +63,7 @@
if(@get_var('submit',Array('POST')) && @$newsettings)
{
/* Load hook file with functions to validate each config (one/none/all) */
- $GLOBALS['phpgw_setup']->hook('config_validate','setup');
+ $GLOBALS['egw_setup']->hook('config_validate','setup');
$datetime = CreateObject('phpgwapi.datetime');
switch((int)$newsettings['daytime_port'])
@@ -82,14 +82,14 @@
print_debug('TZ_OFFSET',$newsettings['tz_offset']);
- $GLOBALS['phpgw_setup']->db->transaction_begin();
+ $GLOBALS['egw_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')");
+ $GLOBALS['egw_setup']->db->query("DELETE FROM $configtbl WHERE config_name='useframes'");
+ $GLOBALS['egw_setup']->db->query("INSERT INTO $configtbl (config_app,config_name, config_value) values ('phpgwapi','useframes','never')");
while(list($setting,$value) = @each($newsettings))
{
- if($GLOBALS['phpgw_info']['server']['found_validation_hook'] && @function_exists($setting))
+ if($GLOBALS['egw_info']['server']['found_validation_hook'] && @function_exists($setting))
{
call_user_func($setting,$newsettings);
if($GLOBALS['config_error'])
@@ -105,12 +105,12 @@
/* Don't erase passwords, since we also do not print them below */
if($value || (!stristr($setting,'passwd') && !stristr($setting,'password') && !stristr($setting,'root_pw')))
{
- @$GLOBALS['phpgw_setup']->db->query("DELETE FROM $configtbl WHERE config_name='" . $setting . "'");
+ @$GLOBALS['egw_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['egw_setup']->db->query("INSERT INTO $configtbl (config_app,config_name, config_value) VALUES ('phpgwapi','" . $GLOBALS['egw_setup']->db->db_addslashes($setting)
+ . "','" . $GLOBALS['egw_setup']->db->db_addslashes($value) . "')");
}
}
}
@@ -118,31 +118,31 @@
{
if($value || (!stristr($setting,'passwd') && !stristr($setting,'password') && !stristr($setting,'root_pw')))
{
- @$GLOBALS['phpgw_setup']->db->query("DELETE FROM $configtbl WHERE config_name='" . $setting . "'");
+ @$GLOBALS['egw_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['egw_setup']->db->query("INSERT INTO $configtbl (config_app,config_name, config_value) VALUES ('phpgwapi','" . $GLOBALS['egw_setup']->db->db_addslashes($setting)
+ . "','" . $GLOBALS['egw_setup']->db->db_addslashes($value) . "')");
}
}
}
if(!$GLOBALS['error'])
{
- $GLOBALS['phpgw_setup']->db->transaction_commit();
+ $GLOBALS['egw_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();
+ $tablenames = $GLOBALS['egw_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();
+ $GLOBALS['egw_setup']->db->lock(array('phpgw_app_sessions'));
+ @$GLOBALS['egw_setup']->db->query("DELETE FROM phpgw_app_sessions WHERE sessionid = '0' and loginid = '0' and app = 'phpgwapi' and location = 'config'",__LINE__,__FILE__);
+ @$GLOBALS['egw_setup']->db->query("DELETE FROM phpgw_app_sessions WHERE app = 'phpgwapi' and location = 'phpgw_info_cache'",__LINE__,__FILE__);
+ $GLOBALS['egw_setup']->db->unlock();
}
if($newsettings['auth_type'] == 'ldap')
@@ -158,12 +158,12 @@
}
}
- $GLOBALS['phpgw_setup']->html->show_header(lang('Configuration'),False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header(lang('Configuration'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
- @$GLOBALS['phpgw_setup']->db->query("SELECT * FROM $configtbl");
- while(@$GLOBALS['phpgw_setup']->db->next_record())
+ @$GLOBALS['egw_setup']->db->query("SELECT * FROM $configtbl");
+ while(@$GLOBALS['egw_setup']->db->next_record())
{
- $GLOBALS['current_config'][$GLOBALS['phpgw_setup']->db->f('config_name')] = $GLOBALS['phpgw_setup']->db->f('config_value');
+ $GLOBALS['current_config'][$GLOBALS['egw_setup']->db->f('config_name')] = $GLOBALS['egw_setup']->db->f('config_value');
}
$setup_tpl->pparse('out','T_config_pre_script');
@@ -176,18 +176,18 @@
var $applications;
var $db;
}
- $GLOBALS['phpgw'] = new phpgw;
- $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
- $GLOBALS['phpgw']->db = $GLOBALS['phpgw_setup']->db;
+ $GLOBALS['egw'] = new phpgw;
+ $GLOBALS['egw']->common = CreateObject('phpgwapi.common');
+ $GLOBALS['egw']->db = $GLOBALS['egw_setup']->db;
- $t = CreateObject('setup.Template',$GLOBALS['phpgw']->common->get_tpl_dir('setup'));
+ $t = CreateObject('setup.Template',$GLOBALS['egw']->common->get_tpl_dir('setup'));
$t->set_unknowns('keep');
$t->set_file(array('config' => 'config.tpl'));
$t->set_block('config','body','body');
$vars = $t->get_undefined('body');
- $GLOBALS['phpgw_setup']->hook('config','setup');
+ $GLOBALS['egw_setup']->hook('config','setup');
while(list($null,$value) = each($vars))
{
@@ -253,12 +253,12 @@
if($GLOBALS['error'] == 'badldapconnection')
{
/* Please check the number and dial again :) */
- $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',
+ $GLOBALS['egw_setup']->html->show_alert_msg('Error',
lang('There was a problem trying to connect to your LDAP server.
'
.'please check your LDAP server configuration') . '.');
}
- $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$GLOBALS['error']);
+ $GLOBALS['egw_setup']->html->show_alert_msg('Error',$GLOBALS['error']);
}
$t->pfp('out','body');
@@ -270,5 +270,5 @@
$setup_tpl->set_var('lang_cancel',lang('Cancel'));
$setup_tpl->pparse('out','T_config_post_script');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
?>
diff --git a/setup/db_backup.php b/setup/db_backup.php
index d75fc1c715..23d093b6c0 100644
--- a/setup/db_backup.php
+++ b/setup/db_backup.php
@@ -12,29 +12,30 @@
/* $Id$ */
- if (!is_object(@$GLOBALS['phpgw'])) // called from outside eGW ==> setup
+ if (!is_object(@$GLOBALS['egw'])) // called from outside eGW ==> setup
{
- $GLOBALS['phpgw_info'] = array('flags' => array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
));
include ('./inc/functions.inc.php');
@set_time_limit(0);
// Check header and authentication
- if (!$GLOBALS['phpgw_setup']->auth('Config'))
+ if (!$GLOBALS['egw_setup']->auth('Config'))
{
Header('Location: index.php');
exit;
}
// Does not return unless user is authorized
- $GLOBALS['phpgw_setup']->loaddb();
+ $GLOBALS['egw_setup']->loaddb();
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$self = 'db_backup.php';
}
$db_backup = CreateObject('phpgwapi.db_backup');
@@ -67,16 +68,16 @@
$bgcolor = array('#DDDDDD','#EEEEEE');
- if (is_object($GLOBALS['phpgw_setup']->html))
+ if (is_object($GLOBALS['egw_setup']->html))
{
- $GLOBALS['phpgw_setup']->html->show_header($stage_title,False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header($stage_title,False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
}
else
{
$setup_tpl->set_block('T_db_backup','setup_header');
$setup_tpl->set_var('setup_header','');
- $GLOBALS['phpgw_info']['flags']['app_header'] = $stage_title;
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['egw_info']['flags']['app_header'] = $stage_title;
+ $GLOBALS['egw']->common->phpgw_header();
parse_navbar();
}
// create a backup now
@@ -231,8 +232,8 @@
$setup_tpl->set_var('self',$self);
$setup_tpl->pparse('out','T_db_backup');
- if (is_object($GLOBALS['phpgw_setup']->html))
+ if (is_object($GLOBALS['egw_setup']->html))
{
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
}
?>
diff --git a/phpgwapi/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php
similarity index 84%
rename from phpgwapi/inc/class.setup.inc.php
rename to setup/inc/class.setup.inc.php
index 664cca4d4f..1b9d7df3b1 100644
--- a/phpgwapi/inc/class.setup.inc.php
+++ b/setup/inc/class.setup.inc.php
@@ -36,13 +36,13 @@
function setup($html=False, $translation=False)
{
- $this->detection = CreateObject('phpgwapi.setup_detection');
- $this->process = CreateObject('phpgwapi.setup_process');
- $this->appreg = CreateObject('phpgwapi.app_registry');
+ $this->detection = CreateObject('setup.setup_detection');
+ $this->process = CreateObject('setup.setup_process');
+ $this->appreg = CreateObject('setup.app_registry');
/* The setup application needs these */
- $this->html = $html ? CreateObject('phpgwapi.setup_html') : '';
- $this->translation = $translation ? CreateObject('phpgwapi.setup_translation') : '';
+ $this->html = $html ? CreateObject('setup.setup_html') : '';
+ $this->translation = $translation ? CreateObject('setup.setup_translation') : '';
// $this->tbl_apps = $this->get_apps_table_name();
// $this->tbl_config = $this->get_config_table_name();
@@ -60,19 +60,19 @@
$this->ConfigDomain = get_var('ConfigDomain',array('COOKIE','POST'),$_POST['FormDomain']);
}
- $GLOBALS['phpgw_info']['server']['db_type'] = $GLOBALS['phpgw_domain'][$this->ConfigDomain]['db_type'];
+ $GLOBALS['egw_info']['server']['db_type'] = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_type'];
- if ($GLOBALS['phpgw_info']['server']['db_type'] == 'pgsql')
+ if ($GLOBALS['egw_info']['server']['db_type'] == 'pgsql')
{
- $GLOBALS['phpgw_info']['server']['db_persistent'] = False;
+ $GLOBALS['egw_info']['server']['db_persistent'] = False;
}
$this->db = CreateObject('phpgwapi.db');
- $this->db->Host = $GLOBALS['phpgw_domain'][$this->ConfigDomain]['db_host'];
- $this->db->Port = $GLOBALS['phpgw_domain'][$this->ConfigDomain]['db_port'];
- $this->db->Type = $GLOBALS['phpgw_domain'][$this->ConfigDomain]['db_type'];
- $this->db->Database = $GLOBALS['phpgw_domain'][$this->ConfigDomain]['db_name'];
- $this->db->User = $GLOBALS['phpgw_domain'][$this->ConfigDomain]['db_user'];
- $this->db->Password = $GLOBALS['phpgw_domain'][$this->ConfigDomain]['db_pass'];
+ $this->db->Host = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_host'];
+ $this->db->Port = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_port'];
+ $this->db->Type = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_type'];
+ $this->db->Database = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_name'];
+ $this->db->User = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_user'];
+ $this->db->Password = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_pass'];
$this->db->set_app('phpgwapi');
@@ -154,13 +154,13 @@
/* Setup defaults to aid in header upgrade to version 1.26.
* This was the first version to include the following values.
*/
- if(!@isset($GLOBALS['phpgw_domain'][$FormDomain]['config_user']) && isset($GLOBALS['phpgw_domain'][$FormDomain]))
+ if(!@isset($GLOBALS['egw_domain'][$FormDomain]['config_user']) && isset($GLOBALS['egw_domain'][$FormDomain]))
{
- @$GLOBALS['phpgw_domain'][$FormDomain]['config_user'] = 'admin';
+ @$GLOBALS['egw_domain'][$FormDomain]['config_user'] = 'admin';
}
- if(!@isset($GLOBALS['phpgw_info']['server']['header_admin_user']))
+ if(!@isset($GLOBALS['egw_info']['server']['header_admin_user']))
{
- @$GLOBALS['phpgw_info']['server']['header_admin_user'] = 'admin';
+ @$GLOBALS['egw_info']['server']['header_admin_user'] = 'admin';
}
}
@@ -177,9 +177,9 @@
$this->set_cookie('ConfigPW','',$expire,'/');
$this->set_cookie('ConfigDomain','',$expire,'/');
$this->set_cookie('ConfigLang','',$expire,'/');
- $GLOBALS['phpgw_info']['setup']['LastDomain'] = $_COOKIE['ConfigDomain'];
- $GLOBALS['phpgw_info']['setup']['ConfigLoginMSG'] = lang('You have successfully logged out');
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = '';
+ $GLOBALS['egw_info']['setup']['LastDomain'] = $_COOKIE['ConfigDomain'];
+ $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = lang('You have successfully logged out');
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = '';
return False;
case 'header':
/* header admin logout */
@@ -187,8 +187,8 @@
$this->set_cookie('HeaderUser','',$expire,'/');
$this->set_cookie('HeaderPW','',$expire,'/');
$this->set_cookie('ConfigLang','',$expire,'/');
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('You have successfully logged out');
- $GLOBALS['phpgw_info']['setup']['ConfigLoginMSG'] = '';
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('You have successfully logged out');
+ $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = '';
return False;
}
@@ -203,8 +203,8 @@
{
/* header admin login */
/* New test is md5, cleartext version is for header < 1.26 */
- if ($this->check_auth($FormUser,$FormPW,$GLOBALS['phpgw_info']['server']['header_admin_user'],
- $GLOBALS['phpgw_info']['server']['header_admin_password']))
+ if ($this->check_auth($FormUser,$FormPW,$GLOBALS['egw_info']['server']['header_admin_user'],
+ $GLOBALS['egw_info']['server']['header_admin_password']))
{
$this->set_cookie('HeaderUser',"$FormUser",$expire,'/');
$this->set_cookie('HeaderPW',"$FormPW",$expire,'/');
@@ -213,8 +213,8 @@
}
else
{
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('Invalid password');
- $GLOBALS['phpgw_info']['setup']['ConfigLoginMSG'] = '';
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('Invalid password');
+ $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = '';
return False;
}
}
@@ -222,8 +222,8 @@
{
// Returning after login to header admin
/* New test is md5, cleartext version is for header < 1.26 */
- if ($this->check_auth($HeaderUser,$HeaderPW,$GLOBALS['phpgw_info']['server']['header_admin_user'],
- $GLOBALS['phpgw_info']['server']['header_admin_password']))
+ if ($this->check_auth($HeaderUser,$HeaderPW,$GLOBALS['egw_info']['server']['header_admin_user'],
+ $GLOBALS['egw_info']['server']['header_admin_password']))
{
$this->set_cookie('HeaderUser',"$HeaderUser",$expire,'/');
$this->set_cookie('HeaderPW',"$HeaderPW",$expire,'/');
@@ -232,8 +232,8 @@
}
else
{
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('Invalid password');
- $GLOBALS['phpgw_info']['setup']['ConfigLoginMSG'] = '';
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('Invalid password');
+ $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = '';
return False;
}
}
@@ -243,9 +243,9 @@
{
/* config login */
/* New test is md5, cleartext version is for header < 1.26 */
- if (isset($GLOBALS['phpgw_domain'][$FormDomain]) &&
- $this->check_auth($FormUser,$FormPW,@$GLOBALS['phpgw_domain'][$FormDomain]['config_user'],
- @$GLOBALS['phpgw_domain'][$FormDomain]['config_passwd']))
+ if (isset($GLOBALS['egw_domain'][$FormDomain]) &&
+ $this->check_auth($FormUser,$FormPW,@$GLOBALS['egw_domain'][$FormDomain]['config_user'],
+ @$GLOBALS['egw_domain'][$FormDomain]['config_passwd']))
{
$this->set_cookie('ConfigUser',"$FormUser",$expire,'/');
$this->set_cookie('ConfigPW',"$FormPW",$expire,'/');
@@ -257,8 +257,8 @@
}
else
{
- $GLOBALS['phpgw_info']['setup']['ConfigLoginMSG'] = lang('Invalid password');
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = '';
+ $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = lang('Invalid password');
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = '';
return False;
}
}
@@ -266,8 +266,8 @@
{
// Returning after login to config
/* New test is md5, cleartext version is for header < 1.26 */
- if ($this->check_auth($ConfigUser,$ConfigPW,@$GLOBALS['phpgw_domain'][$this->ConfigDomain]['config_user'],
- @$GLOBALS['phpgw_domain'][$this->ConfigDomain]['config_passwd']))
+ if ($this->check_auth($ConfigUser,$ConfigPW,@$GLOBALS['egw_domain'][$this->ConfigDomain]['config_user'],
+ @$GLOBALS['egw_domain'][$this->ConfigDomain]['config_passwd']))
{
$this->set_cookie('ConfigUser',"$ConfigUser",$expire,'/');
$this->set_cookie('ConfigPW',"$ConfigPW",$expire,'/');
@@ -277,8 +277,8 @@
}
else
{
- $GLOBALS['phpgw_info']['setup']['ConfigLoginMSG'] = lang('Invalid password');
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = '';
+ $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = lang('Invalid password');
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = '';
return False;
}
}
@@ -304,9 +304,9 @@
function checkip($remoteip='')
{
- //echo "setup::checkip($remoteip) against setup_acl='".$GLOBALS['phpgw_info']['server']['setup_acl']."'
\n";
- $allowed_ips = explode(',',@$GLOBALS['phpgw_info']['server']['setup_acl']);
- if(empty($GLOBALS['phpgw_info']['server']['setup_acl']) || !is_array($allowed_ips))
+ //echo "setup::checkip($remoteip) against setup_acl='".$GLOBALS['egw_info']['server']['setup_acl']."'
\n";
+ $allowed_ips = explode(',',@$GLOBALS['egw_info']['server']['setup_acl']);
+ if(empty($GLOBALS['egw_info']['server']['setup_acl']) || !is_array($allowed_ips))
{
return True; // no test
}
@@ -331,8 +331,8 @@
return True; // match
}
}
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = '';
- $GLOBALS['phpgw_info']['setup']['ConfigLoginMSG'] = lang('Invalid IP address');
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = '';
+ $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = lang('Invalid IP address');
return False;
}
@@ -555,7 +555,7 @@
if($tableschanged == True)
{
- $GLOBALS['phpgw_info']['setup']['tableschanged'] = True;
+ $GLOBALS['egw_info']['setup']['tableschanged'] = True;
}
if($setup_info[$appname]['currentver'])
{
@@ -848,7 +848,7 @@
function setup_account_object()
{
- if (!is_object($GLOBALS['phpgw']->accounts))
+ if (!is_object($GLOBALS['egw']->accounts))
{
if (!is_object($this->db))
{
@@ -859,20 +859,20 @@
. "WHERE config_name LIKE 'ldap%' OR config_name LIKE 'account_%' OR config_name LIKE '%encryption%'",__LINE__,__FILE__);
while($this->db->next_record())
{
- $GLOBALS['phpgw_info']['server'][$this->db->f('config_name')] = $this->db->f('config_value');
+ $GLOBALS['egw_info']['server'][$this->db->f('config_name')] = $this->db->f('config_value');
}
- if (!is_object($GLOBALS['phpgw']))
+ if (!is_object($GLOBALS['egw']))
{
- $GLOBALS['phpgw'] = CreateObject('phpgwapi.phpgw');
+ $GLOBALS['egw'] = CreateObject('phpgwapi.phpgw');
}
- copyobj($this->db,$GLOBALS['phpgw']->db);
- $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
- $GLOBALS['phpgw']->accounts = CreateObject('phpgwapi.accounts');
+ copyobj($this->db,$GLOBALS['egw']->db);
+ $GLOBALS['egw']->common = CreateObject('phpgwapi.common');
+ $GLOBALS['egw']->accounts = CreateObject('phpgwapi.accounts');
- if(($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap') &&
- !$GLOBALS['phpgw']->accounts->ds)
+ if(($GLOBALS['egw_info']['server']['account_repository'] == 'ldap') &&
+ !$GLOBALS['egw']->accounts->ds)
{
- printf("Error: Error connecting to LDAP server %s!
",$GLOBALS['phpgw_info']['server']['ldap_host']);
+ printf("Error: Error connecting to LDAP server %s!
",$GLOBALS['egw_info']['server']['ldap_host']);
exit;
}
}
@@ -893,11 +893,11 @@
{
$this->setup_account_object();
- $groupid = $group ? $GLOBALS['phpgw']->accounts->name2id($group) : False;
+ $groupid = $group ? $GLOBALS['egw']->accounts->name2id($group) : False;
- if(!($accountid = $GLOBALS['phpgw']->accounts->name2id($username)))
+ if(!($accountid = $GLOBALS['egw']->accounts->name2id($username)))
{
- $accountid = $accountid ? $accountid : $GLOBALS['phpgw']->accounts->create(array(
+ $accountid = $accountid ? $accountid : $GLOBALS['egw']->accounts->create(array(
'account_type' => $group ? 'u' : 'g',
'account_lid' => $username,
'account_passwd' => $passwd,
@@ -931,7 +931,7 @@
if (!is_int($account))
{
$this->setup_account_object();
- $account = $GLOBALS['phpgw']->accounts->name2id($account);
+ $account = $GLOBALS['egw']->accounts->name2id($account);
}
$rights = (int)$rights;
if(!is_object($this->db))
diff --git a/phpgwapi/inc/class.setup_detection.inc.php b/setup/inc/class.setup_detection.inc.php
old mode 100644
new mode 100755
similarity index 84%
rename from phpgwapi/inc/class.setup_detection.inc.php
rename to setup/inc/class.setup_detection.inc.php
index bf476ff9ee..ec3d754273
--- a/phpgwapi/inc/class.setup_detection.inc.php
+++ b/setup/inc/class.setup_detection.inc.php
@@ -18,12 +18,12 @@
{
function get_versions()
{
- $d = dir(PHPGW_SERVER_ROOT);
+ $d = dir(EGW_SERVER_ROOT);
while($entry=$d->read())
{
- if($entry != ".." && !ereg('setup',$entry) && is_dir(PHPGW_SERVER_ROOT . '/' . $entry))
+ if($entry != ".." && !ereg('setup',$entry) && is_dir(EGW_SERVER_ROOT . '/' . $entry))
{
- $f = PHPGW_SERVER_ROOT . '/' . $entry . '/setup/setup.inc.php';
+ $f = EGW_SERVER_ROOT . '/' . $entry . '/setup/setup.inc.php';
if (@file_exists ($f))
{
include($f);
@@ -224,29 +224,29 @@
{
if(!file_exists('../header.inc.php'))
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One';
return '1';
}
else
{
- if(!@isset($GLOBALS['phpgw_info']['server']['header_admin_password']))
+ if(!@isset($GLOBALS['egw_info']['server']['header_admin_password']))
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (No header admin password set)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One (No header admin password set)';
return '2';
}
- elseif(!@isset($GLOBALS['phpgw_domain']))
+ elseif(!@isset($GLOBALS['egw_domain']))
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Add domains to your header.inc.php)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One (Add domains to your header.inc.php)';
return '3';
}
- elseif(@$GLOBALS['phpgw_info']['server']['versions']['header'] != @$GLOBALS['phpgw_info']['server']['versions']['current_header'])
+ elseif(@$GLOBALS['egw_info']['server']['versions']['header'] != @$GLOBALS['egw_info']['server']['versions']['current_header'])
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Upgrade your header.inc.php)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One (Upgrade your header.inc.php)';
return '4';
}
}
/* header.inc.php part settled. Moving to authentication */
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Completed)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One (Completed)';
return '10';
}
@@ -266,7 +266,7 @@
}
if (!$GLOBALS['phpgw_setup']->db->Link_ID)
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 1 (Create Database)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Create Database)';
return 1;
}
if(!isset($setup_info['phpgwapi']['currentver']))
@@ -278,12 +278,12 @@
{
if(@$setup_info['phpgwapi']['currentver'] == @$setup_info['phpgwapi']['version'])
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 1 (Tables Complete)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Tables Complete)';
return 10;
}
else
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 1 (Tables need upgrading)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Tables need upgrading)';
return 4;
}
}
@@ -294,12 +294,12 @@
if(!$GLOBALS['phpgw_setup']->db->Errno)
{
$GLOBALS['phpgw_setup']->db->query('DROP TABLE phpgw_testrights');
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 3 (Install Applications)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 3 (Install Applications)';
return 3;
}
else
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 1 (Create Database)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Create Database)';
return 1;
}
}
@@ -308,13 +308,13 @@
function check_config()
{
$GLOBALS['phpgw_setup']->db->Halt_On_Error = 'no';
- if(@$GLOBALS['phpgw_info']['setup']['stage']['db'] != 10)
+ if(@$GLOBALS['egw_info']['setup']['stage']['db'] != 10)
{
return '';
}
/* Since 0.9.10pre6 config table is named as phpgw_config */
- $ver = explode('.',@$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
+ $ver = explode('.',@$GLOBALS['egw_info']['server']['versions']['phpgwapi']);
$config_table = $ver[0] > 0 || (int)$ver[2] > 10 ? 'phpgw_config' : 'config';
if(ereg("([0-9]+)(pre)([0-9]+)",$ver[2],$regs))
@@ -329,12 +329,12 @@
$configured = $GLOBALS['phpgw_setup']->db->next_record() ? $GLOBALS['phpgw_setup']->db->f('config_value') : False;
if($configed)
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 2 (Needs Configuration)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Needs Configuration)';
return 1;
}
else
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 2 (Configuration OK)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Configuration OK)';
return 10;
}
}
@@ -342,7 +342,7 @@
function check_lang($check = True)
{
$GLOBALS['phpgw_setup']->db->Halt_On_Error = 'no';
- if($check && $GLOBALS['phpgw_info']['setup']['stage']['db'] != 10)
+ if($check && $GLOBALS['egw_info']['setup']['stage']['db'] != 10)
{
return '';
}
@@ -364,25 +364,25 @@
$GLOBALS['phpgw_setup']->db->query($q = "SELECT DISTINCT lang FROM $langtbl",__LINE__,__FILE__);
if($GLOBALS['phpgw_setup']->db->num_rows() == 0)
{
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 3 (No languages installed)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 3 (No languages installed)';
return 1;
}
else
{
while(@$GLOBALS['phpgw_setup']->db->next_record())
{
- $GLOBALS['phpgw_info']['setup']['installed_langs'][$GLOBALS['phpgw_setup']->db->f('lang')] = $GLOBALS['phpgw_setup']->db->f('lang');
+ $GLOBALS['egw_info']['setup']['installed_langs'][$GLOBALS['phpgw_setup']->db->f('lang')] = $GLOBALS['phpgw_setup']->db->f('lang');
}
- foreach($GLOBALS['phpgw_info']['setup']['installed_langs'] as $key => $value)
+ foreach($GLOBALS['egw_info']['setup']['installed_langs'] as $key => $value)
{
$sql = "SELECT lang_name FROM $languagestbl WHERE lang_id = '".$value."'";
$GLOBALS['phpgw_setup']->db->query($sql);
if ($GLOBALS['phpgw_setup']->db->next_record())
{
- $GLOBALS['phpgw_info']['setup']['installed_langs'][$value] = $GLOBALS['phpgw_setup']->db->f('lang_name');
+ $GLOBALS['egw_info']['setup']['installed_langs'][$value] = $GLOBALS['phpgw_setup']->db->f('lang_name');
}
}
- $GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 3 (Completed)';
+ $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 3 (Completed)';
return 10;
}
}
diff --git a/phpgwapi/inc/class.setup_html.inc.php b/setup/inc/class.setup_html.inc.php
similarity index 90%
rename from phpgwapi/inc/class.setup_html.inc.php
rename to setup/inc/class.setup_html.inc.php
index 089b975e15..959c996ffd 100644
--- a/phpgwapi/inc/class.setup_html.inc.php
+++ b/setup/inc/class.setup_html.inc.php
@@ -97,9 +97,9 @@
function setup_tpl_dir($app_name='setup')
{
/* hack to get tpl dir */
- if (is_dir(PHPGW_SERVER_ROOT))
+ if (is_dir(EGW_SERVER_ROOT))
{
- $srv_root = PHPGW_SERVER_ROOT . SEP . "$app_name" . SEP;
+ $srv_root = EGW_SERVER_ROOT . SEP . "$app_name" . SEP;
}
else
{
@@ -155,7 +155,7 @@
}
$GLOBALS['setup_tpl']->set_var('lang_version',lang('version'));
- $GLOBALS['setup_tpl']->set_var('pgw_ver',@$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
+ $GLOBALS['setup_tpl']->set_var('pgw_ver',@$GLOBALS['egw_info']['server']['versions']['phpgwapi']);
$GLOBALS['setup_tpl']->set_var(array(
'logoutbutton' => $btn_logout,
'indexbutton' => $index_btn,
@@ -204,8 +204,8 @@
function login_form()
{
/* begin use TEMPLATE login_main.tpl */
- $GLOBALS['setup_tpl']->set_var('ConfigLoginMSG',@$GLOBALS['phpgw_info']['setup']['ConfigLoginMSG']);
- $GLOBALS['setup_tpl']->set_var('HeaderLoginMSG',@$GLOBALS['phpgw_info']['setup']['HeaderLoginMSG']);
+ $GLOBALS['setup_tpl']->set_var('ConfigLoginMSG',@$GLOBALS['egw_info']['setup']['ConfigLoginMSG']);
+ $GLOBALS['setup_tpl']->set_var('HeaderLoginMSG',@$GLOBALS['egw_info']['setup']['HeaderLoginMSG']);
$GLOBALS['setup_tpl']->set_var('lang_header_username',lang('Header Username'));
$GLOBALS['setup_tpl']->set_var('lang_header_password',lang('Header Password'));
$GLOBALS['setup_tpl']->set_var('lang_header_login',lang('Header Admin Login'));
@@ -216,17 +216,17 @@
$GLOBALS['setup_tpl']->set_var('lang_select',lang_select());
- if ($GLOBALS['phpgw_info']['setup']['stage']['header'] == '10')
+ if ($GLOBALS['egw_info']['setup']['stage']['header'] == '10')
{
/*
Begin use SUB-TEMPLATE login_stage_header,
fills V_login_stage_header used inside of login_main.tpl
*/
- if (count($GLOBALS['phpgw_domain']) > 1)
+ if (count($GLOBALS['egw_domain']) > 1)
{
- foreach($GLOBALS['phpgw_domain'] as $domain => $data)
+ foreach($GLOBALS['egw_domain'] as $domain => $data)
{
- $domains .= "\n";
+ $domains .= "\n";
}
$GLOBALS['setup_tpl']->set_var('domains',$domains);
@@ -237,8 +237,8 @@
}
else
{
- reset($GLOBALS['phpgw_domain']);
- $default_domain = each($GLOBALS['phpgw_domain']);
+ reset($GLOBALS['egw_domain']);
+ $default_domain = each($GLOBALS['egw_domain']);
$GLOBALS['setup_tpl']->set_var('default_domain_zero',$default_domain[0]);
/* Use BLOCK B_single_domain inside of login_stage_header */
@@ -268,18 +268,18 @@
function get_template_list()
{
- $d = dir(PHPGW_SERVER_ROOT . '/phpgwapi/templates');
+ $d = dir(EGW_SERVER_ROOT . '/phpgwapi/templates');
while($entry = $d->read())
{
if ($entry != 'CVS' && $entry != '.' && $entry != '..')
{
$list[$entry]['name'] = $entry;
- $f = PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/details.inc.php';
+ $f = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/details.inc.php';
if (file_exists ($f))
{
include($f);
- $list[$entry]['title'] = 'Use ' . $GLOBALS['phpgw_info']['template'][$entry]['title'] . 'interface';
+ $list[$entry]['title'] = 'Use ' . $GLOBALS['egw_info']['template'][$entry]['title'] . 'interface';
}
else
{
@@ -294,7 +294,7 @@
function list_themes()
{
- $dh = dir(PHPGW_SERVER_ROOT . '/phpgwapi/themes');
+ $dh = dir(EGW_SERVER_ROOT . '/phpgwapi/themes');
while ($file = $dh->read())
{
if (eregi("\.theme$", $file))
diff --git a/phpgwapi/inc/class.setup_process.inc.php b/setup/inc/class.setup_process.inc.php
old mode 100644
new mode 100755
similarity index 100%
rename from phpgwapi/inc/class.setup_process.inc.php
rename to setup/inc/class.setup_process.inc.php
diff --git a/phpgwapi/inc/class.setup_translation.inc.php b/setup/inc/class.setup_translation.inc.php
similarity index 98%
rename from phpgwapi/inc/class.setup_translation.inc.php
rename to setup/inc/class.setup_translation.inc.php
index 26e7f3ea81..7eb35439f1 100644
--- a/phpgwapi/inc/class.setup_translation.inc.php
+++ b/setup/inc/class.setup_translation.inc.php
@@ -98,7 +98,7 @@
{
if (!is_object($this->sql))
{
- include_once(PHPGW_API_INC.'/class.translation_sql.inc.php');
+ include_once(EGW_API_INC.'/class.translation_sql.inc.php');
$this->sql = new translation;
}
}
diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php
index 82f46ce436..f16d3e5251 100644
--- a/setup/inc/functions.inc.php
+++ b/setup/inc/functions.inc.php
@@ -16,18 +16,6 @@
/* $Id$ */
- /* ######## Start security check ########## */
- $d1 = strtolower(substr(@$GLOBALS['phpgw_info']['server']['api_inc'],0,3));
- $d2 = strtolower(substr(@$GLOBALS['phpgw_info']['server']['server_root'],0,3));
- $d3 = strtolower(substr(@$GLOBALS['phpgw_info']['server']['app_inc'],0,3));
- if($d1 == 'htt' || $d1 == 'ftp' || $d2 == 'htt' || $d2 == 'ftp' || $d3 == 'htt' || $d3 == 'ftp')
- {
- echo 'Failed attempt to break in via an old Security Hole!
';
- exit;
- }
- unset($d1);unset($d2);unset($d3);
- /* ######## End security check ########## */
-
error_reporting(error_reporting() & ~E_NOTICE);
if(file_exists('../header.inc.php'))
@@ -43,13 +31,15 @@
}
/* If we included the header.inc.php, but it is somehow broken, cover ourselves... */
- if(!defined('PHPGW_SERVER_ROOT') && !defined('PHPGW_INCLUDE_ROOT'))
+ if(!defined('EGW_SERVER_ROOT') && !defined('EGW_INCLUDE_ROOT'))
{
+ define('EGW_SERVER_ROOT','..');
+ define('EGW_INCLUDE_ROOT','..');
define('PHPGW_SERVER_ROOT','..');
define('PHPGW_INCLUDE_ROOT','..');
}
- include(PHPGW_INCLUDE_ROOT . '/phpgwapi/inc/common_functions.inc.php');
+ include(EGW_INCLUDE_ROOT . '/phpgwapi/inc/common_functions.inc.php');
define('SEP',filesystem_separator());
@@ -129,18 +119,18 @@
return $select;
}
- if(file_exists(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'))
+ if(file_exists(EGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'))
{
- include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'); /* To set the current core version */
+ include(EGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'); /* To set the current core version */
/* This will change to just use setup_info */
- $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
+ $GLOBALS['egw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
}
else
{
- $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = 'Undetected';
+ $GLOBALS['egw_info']['server']['versions']['phpgwapi'] = 'Undetected';
}
- $GLOBALS['phpgw_info']['server']['app_images'] = 'templates/default/images';
+ $GLOBALS['egw_info']['server']['app_images'] = 'templates/default/images';
- $GLOBALS['phpgw_setup'] = CreateObject('phpgwapi.setup',True,True);
-?>
+ $GLOBALS['egw_setup'] = CreateObject('setup.setup',True,True);
+ $GLOBALS['phpgw_setup'] =& $GLOBALS['egw_setup'];
diff --git a/setup/index.php b/setup/index.php
index 396b4d4586..a00a92bb84 100644
--- a/setup/index.php
+++ b/setup/index.php
@@ -11,20 +11,19 @@
/* $Id$ */
$GLOBALS['DEBUG'] = False;
- $phpgw_info = array();
- $GLOBALS['phpgw_info']['flags'] = array
- (
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True,
- 'nocachecontrol' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True,
+ 'nocachecontrol' => True
+ ));
include('./inc/functions.inc.php');
@set_time_limit(0);
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array
(
@@ -52,10 +51,10 @@
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_default','V_db_stage_default');
// Check header and authentication
- $GLOBALS['phpgw_info']['setup']['stage']['header'] = $GLOBALS['phpgw_setup']->detection->check_header();
- if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != '10')
+ $GLOBALS['egw_info']['setup']['stage']['header'] = $GLOBALS['egw_setup']->detection->check_header();
+ if ($GLOBALS['egw_info']['setup']['stage']['header'] != '10')
{
- if ($GLOBALS['phpgw_info']['setup']['stage']['header'] == 4) // header needs update, go there direct
+ if ($GLOBALS['egw_info']['setup']['stage']['header'] == 4) // header needs update, go there direct
{
Header('Location: manageheader.php');
}
@@ -65,42 +64,42 @@
}
exit;
}
- elseif(!$GLOBALS['phpgw_setup']->auth('Config'))
+ elseif(!$GLOBALS['egw_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();
+ $GLOBALS['egw_setup']->html->show_header(lang('Please login'),True);
+ $GLOBALS['egw_setup']->html->login_form();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
- $GLOBALS['phpgw_setup']->loaddb();
+ $GLOBALS['egw_setup']->loaddb();
- $GLOBALS['phpgw_setup']->html->show_header(
- $GLOBALS['phpgw_info']['setup']['header_msg'],
+ $GLOBALS['egw_setup']->html->show_header(
+ $GLOBALS['egw_info']['setup']['header_msg'],
False,
'config',
- $GLOBALS['phpgw_setup']->ConfigDomain . '(' . $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')'
+ $GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')'
);
/* 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(); */
+ /* $GLOBALS['egw_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($setup_info);
- if ($GLOBALS['phpgw_info']['setup']['stage']['db'] != 1)
+ $setup_info = $GLOBALS['egw_setup']->detection->get_versions();
+ $GLOBALS['egw_info']['setup']['stage']['db'] = $GLOBALS['egw_setup']->detection->check_db($setup_info);
+ if ($GLOBALS['egw_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($setup_info);
+ $setup_info = $GLOBALS['egw_setup']->detection->get_versions();
+ $setup_info = $GLOBALS['egw_setup']->detection->get_db_versions($setup_info);
+ $GLOBALS['egw_info']['setup']['stage']['db'] = $GLOBALS['egw_setup']->detection->check_db($setup_info);
if($GLOBALS['DEBUG'])
{
_debug_array($setup_info);
}
}
- if ($GLOBALS['DEBUG']) { echo 'Stage: ' . $GLOBALS['phpgw_info']['setup']['stage']['db']; }
+ if ($GLOBALS['DEBUG']) { echo 'Stage: ' . $GLOBALS['egw_info']['setup']['stage']['db']; }
// begin DEBUG code
- //$GLOBALS['phpgw_info']['setup']['stage']['db'] = 0;
+ //$GLOBALS['egw_info']['setup']['stage']['db'] = 0;
//$action = 'Upgrade';
// end DEBUG code
@@ -110,22 +109,22 @@
$subtitle = lang('Deleting Tables');
$submsg = lang('Are you sure you want to delete your existing tables and data?') . '.';
$subaction = lang('uninstall');
- $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'predrop';
- $GLOBALS['phpgw_info']['setup']['stage']['db'] = 5;
+ $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'predrop';
+ $GLOBALS['egw_info']['setup']['stage']['db'] = 5;
break;
case 'Create Database':
$subtitle = lang('Create Database');
$submsg = lang('At your request, this script is going to attempt to create the database and assign the db user rights to it');
$subaction = lang('created');
- $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'dbcreate';
- $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
+ $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'dbcreate';
+ $GLOBALS['egw_info']['setup']['stage']['db'] = 6;
break;
case 'REALLY Uninstall all applications':
$subtitle = lang('Deleting Tables');
$submsg = lang('At your request, this script is going to take the evil action of uninstalling all your apps, which deletes your existing tables and data') . '.';
$subaction = lang('uninstalled');
- $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'drop';
- $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
+ $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'drop';
+ $GLOBALS['egw_info']['setup']['stage']['db'] = 6;
break;
case 'Upgrade':
$subtitle = lang('Upgrading Tables');
@@ -135,8 +134,8 @@
$submsg .= ' '.lang('After backing up your tables first.');
}
$subaction = lang('upgraded');
- $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
- $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
+ $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
+ $GLOBALS['egw_info']['setup']['stage']['db'] = 6;
break;
case 'Install':
$subtitle = lang('Creating Tables');
@@ -149,8 +148,8 @@
$submsg = lang('At your request, this script is going to attempt to install the core tables and the admin and preferences applications for you').'.';
}
$subaction = lang('installed');
- $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'new';
- $GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
+ $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'new';
+ $GLOBALS['egw_info']['setup']['stage']['db'] = 6;
break;
}
$setup_tpl->set_var('subtitle',@$subtitle);
@@ -160,35 +159,35 @@
// Old PHP
if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+
{
- $GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['header_msg'],True);
- $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',
+ $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['header_msg'],True);
+ $GLOBALS['egw_setup']->html->show_alert_msg('Error',
lang('You appear to be running an old version of PHP
It its recommend that you upgrade to a new version.
Older version of PHP might not run eGroupWare correctly, if at all.
Please upgrade to at least version %1','4.1'));
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
// 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.png';
- $completed = $GLOBALS['phpgw_info']['server']['app_images'] . '/completed.png';
+ //$GLOBALS['egw_setup']->app_status();
+ $GLOBALS['egw_info']['server']['app_images'] = 'templates/default/images';
+ $incomplete = $GLOBALS['egw_info']['server']['app_images'] . '/incomplete.png';
+ $completed = $GLOBALS['egw_info']['server']['app_images'] . '/completed.png';
$setup_tpl->set_var('img_incomplete',$incomplete);
$setup_tpl->set_var('img_completed',$completed);
$setup_tpl->set_var('db_step_text',lang('Step %1 - Simple Application Management',1));
- switch($GLOBALS['phpgw_info']['setup']['stage']['db'])
+ switch($GLOBALS['egw_info']['setup']['stage']['db'])
{
case 1:
- $setup_tpl->set_var('dbnotexist',lang('Your Database is not working!').':'.$GLOBALS['phpgw_setup']->db->Error);
+ $setup_tpl->set_var('dbnotexist',lang('Your Database is not working!').':
'.$GLOBALS['egw_setup']->db->Error);
$setup_tpl->set_var('makesure',lang('makesure'));
$setup_tpl->set_var('notcomplete',lang('not complete'));
$setup_tpl->set_var('oncesetup',lang('Once the database is setup correctly'));
$setup_tpl->set_var('createdb',lang('Or we can attempt to create the database for you:'));
$setup_tpl->set_var('create_database',lang('Create database'));
- $info = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_setup']->ConfigDomain];
+ $info = $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain];
switch ($info['db_type'])
{
case 'mysql':
@@ -231,7 +230,7 @@
$setup_tpl->set_var('coreapps',lang('all applications'));
$setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages'));
$setup_tpl->set_var('lang_system_charset',lang('charset to use (use utf-8 if you plan to use languages with different charsets):'));
- $setup_tpl->set_var('system_charset',$GLOBALS['phpgw_setup']->translation->get_charsets('system_charset',lang('charset')));
+ $setup_tpl->set_var('system_charset',$GLOBALS['egw_setup']->translation->get_charsets('system_charset',lang('charset')));
$setup_tpl->set_var('lang_restore',lang('Or you can install a previous backup.'));
$setup_tpl->set_var('upload',' '.
'');
@@ -278,16 +277,16 @@
$setup_tpl->set_var('tableshave',lang('If you did not receive any errors, your applications have been'));
// FIXME : CAPTURE THIS OUTPUT
- $GLOBALS['phpgw_setup']->db->Halt_On_Error = 'report';
+ $GLOBALS['egw_setup']->db->Halt_On_Error = 'report';
- switch ($GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'])
+ switch ($GLOBALS['egw_info']['setup']['currentver']['phpgwapi'])
{
case 'dbcreate':
- $GLOBALS['phpgw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass']);
+ $GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass']);
break;
case 'drop':
- $setup_info = $GLOBALS['phpgw_setup']->detection->get_versions($setup_info);
- $setup_info = $GLOBALS['phpgw_setup']->process->droptables($setup_info);
+ $setup_info = $GLOBALS['egw_setup']->detection->get_versions($setup_info);
+ $setup_info = $GLOBALS['egw_setup']->process->droptables($setup_info);
break;
case 'new':
// use uploaded backup, instead installing from scratch
@@ -321,14 +320,14 @@
}
else
{
- $setup_info = $GLOBALS['phpgw_setup']->detection->upgrade_exclude($setup_info);
+ $setup_info = $GLOBALS['egw_setup']->detection->upgrade_exclude($setup_info);
// Set the DB's client charset if a system-charset is set
if ($_REQUEST['system_charset'])
{
- $GLOBALS['phpgw_setup']->db->Link_ID->SetCharSet($_REQUEST['system_charset']);
+ $GLOBALS['egw_setup']->db->Link_ID->SetCharSet($_REQUEST['system_charset']);
}
- $setup_info = $GLOBALS['phpgw_setup']->process->pass($setup_info,'new',$_REQUEST['debug'],True,$_REQUEST['system_charset']);
- $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
+ $setup_info = $GLOBALS['egw_setup']->process->pass($setup_info,'new',$_REQUEST['debug'],True,$_REQUEST['system_charset']);
+ $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
}
break;
case 'oldversion':
@@ -352,13 +351,13 @@
}
if (!@$_POST['backup'] || !is_string($f))
{
- $setup_info = $GLOBALS['phpgw_setup']->process->pass($setup_info,'upgrade',$_REQUEST['debug']);
- $GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
+ $setup_info = $GLOBALS['egw_setup']->process->pass($setup_info,'upgrade',$_REQUEST['debug']);
+ $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
}
break;
}
- $GLOBALS['phpgw_setup']->db->Halt_On_Error = 'no';
+ $GLOBALS['egw_setup']->db->Halt_On_Error = 'no';
$setup_tpl->set_var('re-check_my_installation',lang('Re-Check My Installation'));
$setup_tpl->parse('V_db_stage_6_post','B_db_stage_6_post');
@@ -397,7 +396,7 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
}
if ($check_in_docroot)
{
- $docroots = array(PHPGW_SERVER_ROOT,$_SERVER['DOCUMENT_ROOT']);
+ $docroots = array(EGW_SERVER_ROOT,$_SERVER['DOCUMENT_ROOT']);
$dir = realpath($dir);
foreach ($docroots as $docroot)
@@ -421,18 +420,18 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
// Config Section
$setup_tpl->set_var('config_step_text',lang('Step %1 - Configuration',2));
- $GLOBALS['phpgw_info']['setup']['stage']['config'] = $GLOBALS['phpgw_setup']->detection->check_config();
+ $GLOBALS['egw_info']['setup']['stage']['config'] = $GLOBALS['egw_setup']->detection->check_config();
// begin DEBUG code
- //$GLOBALS['phpgw_info']['setup']['stage']['config'] = 10;
+ //$GLOBALS['egw_info']['setup']['stage']['config'] = 10;
// end DEBUG code
$setup_tpl->set_var('config_status_img',$incomplete);
$setup_tpl->set_var('config_status_alt',lang('not completed'));
- switch($GLOBALS['phpgw_info']['setup']['stage']['config'])
+ switch($GLOBALS['egw_info']['setup']['stage']['config'])
{
case 1:
- $btn_config_now = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
+ $btn_config_now = $GLOBALS['egw_setup']->html->make_frm_btn_simple(
lang('Please configure eGroupWare for your environment'),
'POST','config.php',
'submit',lang('Configure Now'),
@@ -441,10 +440,10 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
$setup_tpl->set_var('ldap_table_data',' ');
break;
case 10:
- $GLOBALS['phpgw_setup']->db->query("SELECT config_name,config_value FROM phpgw_config WHERE config_app='phpgwapi'");
- while($GLOBALS['phpgw_setup']->db->next_record())
+ $GLOBALS['egw_setup']->db->query("SELECT config_name,config_value FROM phpgw_config WHERE config_app='phpgwapi'");
+ while($GLOBALS['egw_setup']->db->next_record())
{
- $config[$GLOBALS['phpgw_setup']->db->f(0)] = $GLOBALS['phpgw_setup']->db->f(1);
+ $config[$GLOBALS['egw_setup']->db->f(0)] = $GLOBALS['egw_setup']->db->f(1);
}
// set and create the default backup_dir
if (@is_writeable($config['files_dir']) && !isset($config['backup_dir']) && $config['file_store_contents'] == 'filesystem')
@@ -452,7 +451,7 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
$config['backup_dir'] = $config['files_dir'].'/db_backup';
if (!is_dir($config['backup_dir']) && mkdir($config['backup_dir']))
{
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_config (config_app,config_name,config_value) VALUES ('phpgwapi','backup_dir',".$GLOBALS['phpgw_setup']->db->quote($config['backup_dir']).')',__LINE__,__FILE__);
+ $GLOBALS['egw_setup']->db->query("INSERT INTO phpgw_config (config_app,config_name,config_value) VALUES ('phpgwapi','backup_dir',".$GLOBALS['egw_setup']->db->quote($config['backup_dir']).')',__LINE__,__FILE__);
}
}
$config_msg = '';
@@ -474,7 +473,7 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
$setup_tpl->set_var('config_status_alt',lang('completed'));
$config_msg = lang('Configuration completed');
}
- $btn_edit_config = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
+ $btn_edit_config = $GLOBALS['egw_setup']->html->make_frm_btn_simple(
$config_msg,
'POST','config.php',
'submit',lang('Edit Current Configuration'),
@@ -484,7 +483,7 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
{
if ($config['ldap_host'] != '')
{
- $btn_config_ldap = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
+ $btn_config_ldap = $GLOBALS['egw_setup']->html->make_frm_btn_simple(
lang('LDAP account import/export'),
'POST','ldap.php',
'submit',lang('Configure Now'),
@@ -509,16 +508,16 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
// Admin Account Section
$setup_tpl->set_var('admin_step_text',lang('Step %1 - Admin Account',3));
- switch($GLOBALS['phpgw_info']['setup']['stage']['config'])
+ switch($GLOBALS['egw_info']['setup']['stage']['config'])
{
case 10:
// check if there is already a user account (not the anonymous account of sitemgr or a group)
// Note: this does not check the availiblitly of accounts via other auth-methods then sql !!!
- $GLOBALS['phpgw_setup']->db->query("SELECT count(*) FROM phpgw_accounts WHERE account_type='u' AND account_lid!='anonymous'",__LINE__,__FILE__);
- $no_accounts = !$GLOBALS['phpgw_setup']->db->next_record() || !$GLOBALS['phpgw_setup']->db->f(0);
+ $GLOBALS['egw_setup']->db->query("SELECT count(*) FROM phpgw_accounts WHERE account_type='u' AND account_lid!='anonymous'",__LINE__,__FILE__);
+ $no_accounts = !$GLOBALS['egw_setup']->db->next_record() || !$GLOBALS['egw_setup']->db->f(0);
$setup_tpl->set_var('admin_status_img',$no_accounts ? $incomplete : $completed);
$setup_tpl->set_var('admin_status_alt',$no_accounts ? lang('not completed') : lang('completed'));
- $setup_tpl->set_var('admin_table_data',$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
+ $setup_tpl->set_var('admin_table_data',$GLOBALS['egw_setup']->html->make_frm_btn_simple(
$no_accounts ? lang('No accounts existing') : lang('Accounts existing'),
'POST','setup_demo.php',
'submit',lang('Create admin account'),
@@ -534,18 +533,18 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
// Lang Section
$setup_tpl->set_var('lang_step_text',lang('Step %1 - Language Management',4));
- $GLOBALS['phpgw_info']['setup']['stage']['lang'] = $GLOBALS['phpgw_setup']->detection->check_lang();
+ $GLOBALS['egw_info']['setup']['stage']['lang'] = $GLOBALS['egw_setup']->detection->check_lang();
// begin DEBUG code
- //$GLOBALS['phpgw_info']['setup']['stage']['lang'] = 0;
+ //$GLOBALS['egw_info']['setup']['stage']['lang'] = 0;
// end DEBUG code
- switch($GLOBALS['phpgw_info']['setup']['stage']['lang'])
+ switch($GLOBALS['egw_info']['setup']['stage']['lang'])
{
case 1:
$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(
+ $btn_install_lang = $GLOBALS['egw_setup']->html->make_frm_btn_simple(
lang('You do not have any languages installed. Please install one now
'),
'POST','lang.php',
'submit',lang('Install Language'),
@@ -555,19 +554,19 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
case 10:
$langs_list = array();
$languages = get_langs();
- foreach ($GLOBALS['phpgw_info']['setup']['installed_langs'] as $key => $value)
+ foreach ($GLOBALS['egw_info']['setup']['installed_langs'] as $key => $value)
{
$langs_list[] = isset($languages[$key]) ? $languages[$key]['descr'] : $value;
}
$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(
+ $btn_manage_lang = $GLOBALS['egw_setup']->html->make_frm_btn_simple(
lang('This stage is completed
') . lang('Currently installed languages: %1
',implode(', ',$langs_list)),
'POST','lang.php',
'submit',lang('Manage Languages'),
'');
// show system-charset and offer conversation
- include_once(PHPGW_API_INC.'/class.translation_sql.inc.php');
+ include_once(EGW_API_INC.'/class.translation_sql.inc.php');
$translation = new translation;
$btn_manage_lang .= lang('Current system-charset is %1, click %2here%3 to change it.',
$translation->system_charset ? "'$translation->system_charset'" : lang('not set'),
@@ -582,8 +581,8 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
}
$setup_tpl->set_var('apps_step_text',lang('Step %1 - Advanced Application Management',5));
-// $GLOBALS['phpgw_info']['setup']['stage']['apps'] = $GLOBALS['phpgw_setup']->check_apps();
- switch($GLOBALS['phpgw_info']['setup']['stage']['db'])
+// $GLOBALS['egw_info']['setup']['stage']['apps'] = $GLOBALS['egw_setup']->check_apps();
+ switch($GLOBALS['egw_info']['setup']['stage']['db'])
{
case 10:
$setup_tpl->set_var('apps_status_img',$completed);
@@ -597,7 +596,7 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
$to_upgrade[] = $app;
}
}
- $btn_manage_apps = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
+ $btn_manage_apps = $GLOBALS['egw_setup']->html->make_frm_btn_simple(
count($to_upgrade) ? ''.lang('The following applications need to be upgraded:').' '.implode(', ',$to_upgrade) :
lang('This stage is completed
'),
'','applications.php',
@@ -613,12 +612,12 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
}
// Backup and restore section
$setup_tpl->set_var('backup_step_text',lang('Step %1 - DB backup and restore',6));
- switch($GLOBALS['phpgw_info']['setup']['stage']['db'])
+ switch($GLOBALS['egw_info']['setup']['stage']['db'])
{
case 10:
$setup_tpl->set_var('backup_status_img',$completed);
$setup_tpl->set_var('backup_status_alt',lang('completed'));
- $setup_tpl->set_var('backup_table_data',$GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
+ $setup_tpl->set_var('backup_table_data',$GLOBALS['egw_setup']->html->make_frm_btn_simple(
''/*lang('This stage is completed
')*/,
'','db_backup.php',
'submit',lang('backup and restore'),
@@ -632,5 +631,5 @@ function check_dir($dir,&$msg,$check_in_docroot=false)
}
$setup_tpl->pparse('out','T_setup_main');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
?>
diff --git a/setup/lang.php b/setup/lang.php
index c75f810a9b..20482f673c 100644
--- a/setup/lang.php
+++ b/setup/lang.php
@@ -11,37 +11,37 @@
/* $Id$ */
- $phpgw_info = array();
- $GLOBALS['phpgw_info']['flags'] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include('./inc/functions.inc.php');
// Authorize the user to use setup app and load the database
// Does not return unless user is authorized
- if (!$GLOBALS['phpgw_setup']->auth('Config') || @$_POST['cancel'])
+ if (!$GLOBALS['egw_setup']->auth('Config') || @$_POST['cancel'])
{
Header('Location: index.php');
exit;
}
- $GLOBALS['phpgw_setup']->loaddb();
+ $GLOBALS['egw_setup']->loaddb();
if (@$_POST['submit'])
{
- $GLOBALS['phpgw_setup']->translation->setup_translation_sql();
- $GLOBALS['phpgw_setup']->translation->sql->install_langs(@$_POST['lang_selected'],@$_POST['upgrademethod']);
+ $GLOBALS['egw_setup']->translation->setup_translation_sql();
+ $GLOBALS['egw_setup']->translation->sql->install_langs(@$_POST['lang_selected'],@$_POST['upgrademethod']);
- if( !$GLOBALS['phpgw_setup']->translation->sql->line_rejected )
+ if( !$GLOBALS['egw_setup']->translation->sql->line_rejected )
{
Header('Location: index.php');
exit;
}
}
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
'T_head' => 'head.tpl',
@@ -59,9 +59,9 @@
$td_align = @$newinstall ? ' align="center"' : '';
$hidden_var1 = @$newinstall ? '' : '';
- if (!@$newinstall && !isset($GLOBALS['phpgw_info']['setup']['installed_langs']))
+ if (!@$newinstall && !isset($GLOBALS['egw_info']['setup']['installed_langs']))
{
- $GLOBALS['phpgw_setup']->detection->check_lang(false); // get installed langs
+ $GLOBALS['egw_setup']->detection->check_lang(false); // get installed langs
}
$select_box_desc = lang('Select which languages you would like to use');
$select_box = '';
@@ -72,7 +72,7 @@
$select_box_langs =
@$select_box_langs
.''
."\n";
}
@@ -97,10 +97,10 @@
}
// Rejected Lines
- if($_POST['debug'] && count($GLOBALS['phpgw_setup']->translation->sql->line_rejected))
+ if($_POST['debug'] && count($GLOBALS['egw_setup']->translation->sql->line_rejected))
{
$str = '';
- foreach($GLOBALS['phpgw_setup']->translation->sql->line_rejected as $badline)
+ foreach($GLOBALS['egw_setup']->translation->sql->line_rejected as $badline)
{
$_f_buffer = split("[/\\]", $badline['appfile']);
$str .= lang('Application: %1, File: %2, Line: "%3"',''.$_f_buffer[count($_f_buffer)-3].'',
@@ -123,11 +123,11 @@
$setup_tpl->set_var('lang_install',lang('install'));
$setup_tpl->set_var('lang_cancel',lang('cancel'));
- $GLOBALS['phpgw_setup']->html->show_header("$stage_title",False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header("$stage_title",False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
$setup_tpl->pparse('out','T_lang_main');
if($alert)
$setup_tpl->pparse('out','T_alert_msg');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
?>
diff --git a/setup/ldap.php b/setup/ldap.php
index dbf23eefbb..7baeb5d003 100644
--- a/setup/ldap.php
+++ b/setup/ldap.php
@@ -11,17 +11,17 @@
/* $Id$ */
- $GLOBALS['phpgw_info'] = array();
- $GLOBALS['phpgw_info']['flags'] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include('./inc/functions.inc.php');
// Authorize the user to use setup app and load the database
- if (!$GLOBALS['phpgw_setup']->auth('Config'))
+ if (!$GLOBALS['egw_setup']->auth('Config'))
{
Header('Location: index.php');
exit;
@@ -34,7 +34,7 @@
exit;
}
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
'ldap' => 'ldap.tpl',
@@ -43,12 +43,12 @@
'T_alert_msg' => 'msg_alert_msg.tpl'
));
- $GLOBALS['phpgw_setup']->html->show_header(lang('LDAP Config'),False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header(lang('LDAP Config'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
if ($GLOBALS['error'])
{
//echo '
Error: '.$error.'';
- $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$GLOBALS['error']);
+ $GLOBALS['egw_setup']->html->show_alert_msg('Error',$GLOBALS['error']);
}
$setup_tpl->set_block('ldap','header','header');
@@ -73,5 +73,5 @@
$setup_tpl->pfp('out','cancel_only');
$setup_tpl->pfp('out','footer');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
?>
diff --git a/setup/ldapexport.php b/setup/ldapexport.php
index 3fd8f5cc70..c9255eb6e0 100644
--- a/setup/ldapexport.php
+++ b/setup/ldapexport.php
@@ -11,17 +11,17 @@
/* $Id$ */
- $phpgw_info = array();
- $phpgw_info['flags'] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include('./inc/functions.inc.php');
// Authorize the user to use setup app and load the database
- if (!$GLOBALS['phpgw_setup']->auth('Config'))
+ if (!$GLOBALS['egw_setup']->auth('Config'))
{
Header('Location: index.php');
exit;
@@ -39,10 +39,10 @@
$phpgw->common = CreateObject('phpgwapi.common');
$common = $phpgw->common;
- $GLOBALS['phpgw_setup']->loaddb();
- copyobj($GLOBALS['phpgw_setup']->db,$phpgw->db);
+ $GLOBALS['egw_setup']->loaddb();
+ copyobj($GLOBALS['egw_setup']->db,$phpgw->db);
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
'ldap' => 'ldap.tpl',
@@ -51,10 +51,10 @@
'T_alert_msg' => 'msg_alert_msg.tpl'
));
- $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())
+ $GLOBALS['egw_setup']->db->query("SELECT config_name,config_value FROM phpgw_config WHERE config_name LIKE 'ldap%'",__LINE__,__FILE__);
+ while ($GLOBALS['egw_setup']->db->next_record())
{
- $config[$GLOBALS['phpgw_setup']->db->f('config_name')] = $GLOBALS['phpgw_setup']->db->f('config_value');
+ $config[$GLOBALS['egw_setup']->db->f('config_name')] = $GLOBALS['egw_setup']->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
$phpgw_info['server']['ldap_context'] = $config['ldap_context'];
@@ -87,16 +87,16 @@
}
$sql = "SELECT * FROM phpgw_accounts WHERE account_type='u'";
- $GLOBALS['phpgw_setup']->db->query($sql,__LINE__,__FILE__);
- while($GLOBALS['phpgw_setup']->db->next_record())
+ $GLOBALS['egw_setup']->db->query($sql,__LINE__,__FILE__);
+ while($GLOBALS['egw_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');
+ $i = $GLOBALS['egw_setup']->db->f('account_id');
+ $account_info[$i]['account_id'] = $GLOBALS['egw_setup']->db->f('account_id');
+ $account_info[$i]['account_lid'] = $GLOBALS['egw_setup']->db->f('account_lid');
+ $account_info[$i]['account_firstname'] = $GLOBALS['egw_setup']->db->f('account_firstname');
+ $account_info[$i]['account_lastname'] = $GLOBALS['egw_setup']->db->f('account_lastname');
+ $account_info[$i]['account_status'] = $GLOBALS['egw_setup']->db->f('account_status');
+ $account_info[$i]['account_expires'] = $GLOBALS['egw_setup']->db->f('account_expires');
}
while(list($key,$data) = @each($account_info))
@@ -107,16 +107,16 @@
$account_info = $newaccount;
$sql = "SELECT * FROM phpgw_accounts WHERE account_type='g'";
- $GLOBALS['phpgw_setup']->db->query($sql,__LINE__,__FILE__);
- while($GLOBALS['phpgw_setup']->db->next_record())
+ $GLOBALS['egw_setup']->db->query($sql,__LINE__,__FILE__);
+ while($GLOBALS['egw_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');
+ $i = $GLOBALS['egw_setup']->db->f('account_id');
+ $group_info[$i]['account_id'] = $GLOBALS['egw_setup']->db->f('account_id');
+ $group_info[$i]['account_lid'] = $GLOBALS['egw_setup']->db->f('account_lid');
+ $group_info[$i]['account_firstname'] = $GLOBALS['egw_setup']->db->f('account_firstname');
+ $group_info[$i]['account_lastname'] = $GLOBALS['egw_setup']->db->f('account_lastname');
+ $group_info[$i]['account_status'] = $GLOBALS['egw_setup']->db->f('account_status');
+ $group_info[$i]['account_expires'] = $GLOBALS['egw_setup']->db->f('account_expires');
}
while(list($key,$data) = @each($group_info))
@@ -156,7 +156,7 @@
if(!empty($thisacctid) && !empty($thisacctlid))
{
$groups = CreateObject('phpgwapi.accounts',(int)$thisacctid);
- copyobj($GLOBALS['phpgw_setup']->db,$groups->db);
+ copyobj($GLOBALS['egw_setup']->db,$groups->db);
// Check if the account is already there.
// If so, we won't try to create it again.
@@ -204,7 +204,7 @@
if(!empty($thisacctid) && !empty($thisacctlid))
{
$accounts = CreateObject('phpgwapi.accounts',(int)$thisacctid);
- copyobj($GLOBALS['phpgw_setup']->db,$accounts->db);
+ copyobj($GLOBALS['egw_setup']->db,$accounts->db);
// Check if the account is already there.
// If so, we won't try to create it again.
@@ -238,19 +238,19 @@
$setup_complete = True;
}
- $GLOBALS['phpgw_setup']->html->show_header(lang('LDAP Export'),False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header(lang('LDAP Export'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
if($error)
{
//echo '
Error: '.$error.'';
- $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$error);
+ $GLOBALS['egw_setup']->html->show_alert_msg('Error',$error);
}
if($setup_complete)
{
echo '
'.lang('Export has been completed! You will need to set the user passwords manually.').'';
echo '
'.lang('Click here to return to setup.').'';
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
@@ -309,5 +309,5 @@
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
?>
diff --git a/setup/ldapimport.php b/setup/ldapimport.php
index 0230a72849..c4fc808a8a 100644
--- a/setup/ldapimport.php
+++ b/setup/ldapimport.php
@@ -11,17 +11,17 @@
/* $Id$ */
- $phpgw_info = array();
- $phpgw_info["flags"] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include('./inc/functions.inc.php');
// Authorize the user to use setup app and load the database
- if(!$GLOBALS['phpgw_setup']->auth('Config'))
+ if(!$GLOBALS['egw_setup']->auth('Config'))
{
Header('Location: index.php');
exit;
@@ -39,10 +39,10 @@
$phpgw->common = CreateObject('phpgwapi.common');
$common = $phpgw->common;
- $GLOBALS['phpgw_setup']->loaddb();
- $phpgw->db = $GLOBALS['phpgw_setup']->db;
+ $GLOBALS['egw_setup']->loaddb();
+ $phpgw->db = $GLOBALS['egw_setup']->db;
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
'ldap' => 'ldap.tpl',
@@ -56,10 +56,10 @@
$phpgw->applications = CreateObject('phpgwapi.applications');
$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())
+ $GLOBALS['egw_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['egw_setup']->db->next_record())
{
- $config[$GLOBALS['phpgw_setup']->db->f('config_name')] = $GLOBALS['phpgw_setup']->db->f('config_value');
+ $config[$GLOBALS['egw_setup']->db->f('config_name')] = $GLOBALS['egw_setup']->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
$phpgw_info['server']['ldap_context'] = $config['ldap_context'];
@@ -128,10 +128,10 @@
$group_info = array();
}
- $GLOBALS['phpgw_setup']->db->query("SELECT app_name FROM phpgw_applications WHERE app_enabled!='0' AND app_enabled!='3' ORDER BY app_name",__LINE__,__FILE__);
- while($GLOBALS['phpgw_setup']->db->next_record())
+ $GLOBALS['egw_setup']->db->query("SELECT app_name FROM phpgw_applications WHERE app_enabled!='0' AND app_enabled!='3' ORDER BY app_name",__LINE__,__FILE__);
+ while($GLOBALS['egw_setup']->db->next_record())
{
- $apps[$GLOBALS['phpgw_setup']->db->f('app_name')] = lang($GLOBALS['phpgw_setup']->db->f('app_name'));
+ $apps[$GLOBALS['egw_setup']->db->f('app_name')] = lang($GLOBALS['egw_setup']->db->f('app_name'));
}
$cancel = get_var('cancel','POST');
@@ -176,7 +176,7 @@
if(!empty($thisacctid) && !empty($thisacctlid))
{
$accounts = CreateObject('phpgwapi.accounts',(int)$thisacctid);
- copyobj($GLOBALS['phpgw_setup']->db,$accounts->db);
+ copyobj($GLOBALS['egw_setup']->db,$accounts->db);
// Check if the account is already there.
// If so, we won't try to create it again.
@@ -210,7 +210,7 @@
// these rights. Instead, we make the user a member of the Default group
// below.
$acl = CreateObject('phpgwapi.acl',(int)$thisacctid);
- $acl->db = $GLOBALS['phpgw_setup']->db;
+ $acl->db = $GLOBALS['egw_setup']->db;
$acl->read_repository();
// Only give them admin if we asked for them to have it.
@@ -258,7 +258,7 @@
if(!empty($thisacctid) && !empty($thisacctlid))
{
$groups = CreateObject('phpgwapi.accounts',(int)$thisacctid);
- copyobj($GLOBALS['phpgw_setup']->db,$groups->db);
+ copyobj($GLOBALS['egw_setup']->db,$groups->db);
// Check if the account is already there.
// If so, we won't try to create it again.
@@ -313,7 +313,7 @@
if($tmpid)
{
$acl = CreateObject('phpgwapi.acl',$tmpid);
- copyobj($GLOBALS['phpgw_setup']->db,$acl->db);
+ copyobj($GLOBALS['egw_setup']->db,$acl->db);
$acl->account_id = (int)$tmpid;
$acl->read_repository();
@@ -330,7 +330,7 @@
App access is added below.
*/
$pref = CreateObject('phpgwapi.preferences',$tmpid);
- $pref->db = $GLOBALS['phpgw_setup']->db;
+ $pref->db = $GLOBALS['egw_setup']->db;
$pref->account_id = (int)$tmpid;
$pref->read_repository();
@reset($s_apps);
@@ -344,7 +344,7 @@
/* Now give this group some rights */
$phpgw_info['user']['account_id'] = $thisacctid;
$acl = CreateObject('phpgwapi.acl');
- copyobj($GLOBALS['phpgw_setup']->db,$acl->db);
+ copyobj($GLOBALS['egw_setup']->db,$acl->db);
$acl->account_id = (int)$thisacctid;
$acl->read_repository();
@reset($s_apps);
@@ -362,7 +362,7 @@
{
/* Create the 'Default' group */
$groups = CreateObject('phpgwapi.accounts',$defaultgroupid);
- copyobj($GLOBALS['phpgw_setup']->db,$groups->db);
+ copyobj($GLOBALS['egw_setup']->db,$groups->db);
// Check if the group account is already there.
// If so, set our group_id to that account's id for use below.
@@ -391,7 +391,7 @@
$defaultgroupid = $acct->name2id('Default');
$acl = CreateObject('phpgwapi.acl',$defaultgroupid);
- copyobj($GLOBALS['phpgw_setup']->db,$acl->db);
+ copyobj($GLOBALS['egw_setup']->db,$acl->db);
$acl->account_id = (int)$defaultgroupid;
$acl->read_repository();
@reset($s_apps);
@@ -406,18 +406,18 @@
$setup_complete = True;
}
- $GLOBALS['phpgw_setup']->html->show_header(lang('LDAP Import'),False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header(lang('LDAP Import'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
if($error)
{
//echo '
Error: '.$error.'';
- $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$error);
+ $GLOBALS['egw_setup']->html->show_alert_msg('Error',$error);
}
if($setup_complete)
{
echo '
'.lang('Import has been completed!').' '.lang('Click here to return to setup.').'';
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
@@ -494,5 +494,5 @@
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
?>
diff --git a/setup/ldapmodify.php b/setup/ldapmodify.php
index 587c68b40f..c321749208 100644
--- a/setup/ldapmodify.php
+++ b/setup/ldapmodify.php
@@ -11,17 +11,17 @@
/* $Id$ */
- $phpgw_info = array();
- $phpgw_info["flags"] = array(
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include('./inc/functions.inc.php');
/* Authorize the user to use setup app and load the database */
- if(!$GLOBALS['phpgw_setup']->auth('Config'))
+ if(!$GLOBALS['egw_setup']->auth('Config'))
{
Header('Location: index.php');
exit;
@@ -39,10 +39,10 @@
$phpgw->common = CreateObject('phpgwapi.common');
$common = $phpgw->common;
- $GLOBALS['phpgw_setup']->loaddb();
- copyobj($GLOBALS['phpgw_setup']->db,$phpgw->db);
+ $GLOBALS['egw_setup']->loaddb();
+ copyobj($GLOBALS['egw_setup']->db,$phpgw->db);
- $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
'ldap' => 'ldap.tpl',
@@ -51,10 +51,10 @@
'T_alert_msg' => 'msg_alert_msg.tpl'
));
- $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())
+ $GLOBALS['egw_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['egw_setup']->db->next_record())
{
- $config[$GLOBALS['phpgw_setup']->db->f('config_name')] = $GLOBALS['phpgw_setup']->db->f('config_value');
+ $config[$GLOBALS['egw_setup']->db->f('config_name')] = $GLOBALS['egw_setup']->db->f('config_value');
}
$phpgw_info['server']['ldap_host'] = $config['ldap_host'];
$phpgw_info['server']['ldap_context'] = $config['ldap_context'];
@@ -111,10 +111,10 @@
$group_info = array();
}
- $GLOBALS['phpgw_setup']->db->query("SELECT app_name FROM phpgw_applications WHERE app_enabled!='0' AND app_enabled!='3' ORDER BY app_name",__LINE__,__FILE__);
- while($GLOBALS['phpgw_setup']->db->next_record())
+ $GLOBALS['egw_setup']->db->query("SELECT app_name FROM phpgw_applications WHERE app_enabled!='0' AND app_enabled!='3' ORDER BY app_name",__LINE__,__FILE__);
+ while($GLOBALS['egw_setup']->db->next_record())
{
- $apps[$GLOBALS['phpgw_setup']->db->f('app_name')] = lang($GLOBALS['phpgw_setup']->db->f('app_name'));
+ $apps[$GLOBALS['egw_setup']->db->f('app_name')] = lang($GLOBALS['egw_setup']->db->f('app_name'));
}
if($cancel)
@@ -123,16 +123,16 @@
exit;
}
- $GLOBALS['phpgw_setup']->html->show_header(lang('LDAP Modify'),False,'config',$GLOBALS['phpgw_setup']->ConfigDomain . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']->ConfigDomain]['db_type'] . ')');
+ $GLOBALS['egw_setup']->html->show_header(lang('LDAP Modify'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')');
$setup_complete = False;
if(isset($_POST['submit']))
{
$acl = CreateObject('phpgwapi.acl');
- copyobj($GLOBALS['phpgw_setup']->db,$acl->db);
+ copyobj($GLOBALS['egw_setup']->db,$acl->db);
if(isset($_POST['ldapgroups']))
{
$groups = CreateObject('phpgwapi.accounts');
- copyobj($GLOBALS['phpgw_setup']->db,$groups->db);
+ copyobj($GLOBALS['egw_setup']->db,$groups->db);
while(list($key,$groupid) = each($_POST['ldapgroups']))
{
$id_exist = 0;
@@ -248,7 +248,7 @@
if(isset($_POST['users']))
{
$accounts = CreateObject('phpgwapi.accounts');
- copyobj($GLOBALS['phpgw_setup']->db,$accounts->db);
+ copyobj($GLOBALS['egw_setup']->db,$accounts->db);
while(list($key,$id) = each($_POST['users']))
{
$id_exist = 0;
@@ -350,13 +350,13 @@
if(isset($_GET['error']))
{
/* echo '
Error: '.$error.''; */
- $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',$_GET['error']);
+ $GLOBALS['egw_setup']->html->show_alert_msg('Error',$_GET['error']);
}
if($setup_complete)
{
echo '
'.lang('Modifications have been completed!').' '.lang('Click here to return to setup.').'
';
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
@@ -430,5 +430,5 @@
$setup_tpl->pfp('out','submit');
$setup_tpl->pfp('out','footer');
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
?>
diff --git a/setup/manageheader.php b/setup/manageheader.php
index 589ed28ebb..11b7449f27 100644
--- a/setup/manageheader.php
+++ b/setup/manageheader.php
@@ -11,14 +11,14 @@
/* $Id$ */
- $phpgw_info = array();
- $GLOBALS['phpgw_info']['flags'] = array(
- 'nocachecontrol' => True,
- 'noheader' => True,
- 'nonavbar' => True,
- 'currentapp' => 'home',
- 'noapi' => True
- );
+ $GLOBALS['egw_info'] = array(
+ 'flags' => array(
+ 'nocachecontrol' => True,
+ 'noheader' => True,
+ 'nonavbar' => True,
+ 'currentapp' => 'home',
+ 'noapi' => True
+ ));
include('./inc/functions.inc.php');
// some constanst for pre php4.3
@@ -39,8 +39,8 @@
function_exists('dl') && @dl(PHP_SHLIB_PREFIX.$extension.'.'.PHP_SHLIB_SUFFIX);
}
- $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
- $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
+ $GLOBALS['egw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
+ $GLOBALS['egw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
unset($setup_info);
/* Fetch the current real path.
@@ -121,7 +121,7 @@
if($errors)
{
- $GLOBALS['phpgw_setup']->html->show_header('Error',True);
+ $GLOBALS['egw_setup']->html->show_header('Error',True);
echo $errors;
echo '';
exit;
@@ -129,10 +129,10 @@
}
/* authentication phase */
- $GLOBALS['phpgw_info']['setup']['stage']['header'] = $GLOBALS['phpgw_setup']->detection->check_header();
+ $GLOBALS['egw_info']['setup']['stage']['header'] = $GLOBALS['egw_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');
+ $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array(
'T_head' => 'head.tpl',
@@ -148,50 +148,50 @@
$setup_tpl->set_block('T_setup_manage','domain','domain');
/* Detect current mode */
- switch($GLOBALS['phpgw_info']['setup']['stage']['header'])
+ switch($GLOBALS['egw_info']['setup']['stage']['header'])
{
case '1':
- $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Create your header.inc.php');
- $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('You have not created your header.inc.php yet!
You can create it now.');
+ $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Create your header.inc.php');
+ $GLOBALS['egw_info']['setup']['PageMSG'] = lang('You have not created your header.inc.php yet!
You can create it now.');
break;
case '2':
- $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Your header admin password is NOT set. Please set it now!');
- $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header admin password is NOT set. Please set it now!');
+ $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Your header admin password is NOT set. Please set it now!');
+ $GLOBALS['egw_info']['setup']['PageMSG'] = lang('Your header admin password is NOT set. Please set it now!');
break;
case '3':
- $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('You need to add some domains to your header.inc.php.');
- $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('You need to add some domains to your header.inc.php.');
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('You need to add some domains to your header.inc.php.');
- if(!$GLOBALS['phpgw_setup']->auth('Header'))
+ $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('You need to add some domains to your header.inc.php.');
+ $GLOBALS['egw_info']['setup']['PageMSG'] = lang('You need to add some domains to your header.inc.php.');
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('You need to add some domains to your header.inc.php.');
+ if(!$GLOBALS['egw_setup']->auth('Header'))
{
- $GLOBALS['phpgw_setup']->html->show_header('Please login',True);
- $GLOBALS['phpgw_setup']->html->login_form();
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_header('Please login',True);
+ $GLOBALS['egw_setup']->html->login_form();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
break;
case '4':
- $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Your header.inc.php needs upgrading.');
- $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.
MAKE BACKUPS!');
- $GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('Your header.inc.php needs upgrading.');
- if(!$GLOBALS['phpgw_setup']->auth('Header'))
+ $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Your header.inc.php needs upgrading.');
+ $GLOBALS['egw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.
MAKE BACKUPS!');
+ $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('Your header.inc.php needs upgrading.');
+ if(!$GLOBALS['egw_setup']->auth('Header'))
{
- $GLOBALS['phpgw_setup']->html->show_header('Please login',True);
- $GLOBALS['phpgw_setup']->html->login_form();
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_header('Please login',True);
+ $GLOBALS['egw_setup']->html->login_form();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
break;
case '10':
- if(!$GLOBALS['phpgw_setup']->auth('Header'))
+ if(!$GLOBALS['egw_setup']->auth('Header'))
{
- $GLOBALS['phpgw_setup']->html->show_header('Please login',True);
- $GLOBALS['phpgw_setup']->html->login_form();
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_header('Please login',True);
+ $GLOBALS['egw_setup']->html->login_form();
+ $GLOBALS['egw_setup']->html->show_footer();
exit;
}
- $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Edit your header.inc.php');
- $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Edit your existing header.inc.php');
+ $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Edit your header.inc.php');
+ $GLOBALS['egw_info']['setup']['PageMSG'] = lang('Edit your existing header.inc.php');
break;
}
@@ -210,16 +210,16 @@
header('Pragma: no-cache');
header('Expires: 0');
*/
- $newheader = $GLOBALS['phpgw_setup']->html->generate_header();
+ $newheader = $GLOBALS['egw_setup']->html->generate_header();
echo $newheader;
break;
case 'view':
check_form_values();
$header_template = CreateObject('setup.Template','../');
- $GLOBALS['phpgw_setup']->html->show_header('Generated header.inc.php', False, 'header');
+ $GLOBALS['egw_setup']->html->show_header('Generated header.inc.php', False, 'header');
echo '';
- $GLOBALS['phpgw_setup']->html->show_footer();
+ $GLOBALS['egw_setup']->html->show_footer();
break;
case 'write':
check_form_values();
$header_template = CreateObject('setup.Template','../');
if(is_writeable('../header.inc.php') || (!file_exists('../header.inc.php') && is_writeable('../')))
{
- $newheader = $GLOBALS['phpgw_setup']->html->generate_header();
+ $newheader = $GLOBALS['egw_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');
+ $GLOBALS['egw_setup']->html->show_header('Saved header.inc.php', False, 'header');
echo '