diff --git a/header.inc.php.template b/header.inc.php.template
index 6cca34f2ff..d073f09fe6 100644
--- a/header.inc.php.template
+++ b/header.inc.php.template
@@ -23,16 +23,14 @@
define('PHPGW_INCLUDE_ROOT','{INCLUDE_ROOT}');
$GLOBALS['phpgw_info']['server']['header_admin_password'] = '{HEADER_ADMIN_PASSWORD}';
- $GLOBALS['phpgw_domain']['default'] = array (
- 'db_host' => '{DB_HOST}',
- 'db_name' => '{DB_NAME}',
- 'db_user' => '{DB_USER}',
- 'db_pass' => '{DB_PASS}',
- // Look at the README file
- 'db_type' => '{DB_TYPE}',
- // This will limit who is allowed to make configuration modifcations
- 'config_passwd' => '{CONFIG_PASS}'
- );
+ /* phpGroupWare domain-specific db settings */{domains}
+ /*
+ ** If you want to have your domains in a select box, change to True
+ ** If not, users will have to login as user@domain
+ ** Note: This is only for virtual domain support, default domain users can login only using
+ ** there loginid.
+ */
+ $GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX};
$GLOBALS['phpgw_info']['server']['db_persistent'] = {DB_PERSISTENT};
@@ -44,46 +42,25 @@
*/
$GLOBALS['phpgw_info']['server']['sessions_type'] = '{SESSIONS_TYPE}';
- /*
- ** If you want to have your domains in a select box, change to True
- ** If not, users will have to login as user@domain
- ** Note: This is only for virtual domian support, default domain users can login only using
- ** there loginid.
- */
- $GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX};
-
/* Select which login template set you want, most people will use default */
$GLOBALS['phpgw_info']['login_template_set'] = 'default';
/* This is used to control mcrypt's use */
$GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = {ENABLE_MCRYPT};
- /* Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. */
+ /* Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */
$GLOBALS['phpgw_info']['server']['versions']['mcrypt'] = '{MCRYPT_VERSION}';
/*
- ** This is a random string used as the initilazation vector for mcrypt
- ** feel free to change it when setting up phpgroupware on a clean database,
+ ** This is a random string used as the initialization vector for mcrypt
+ ** feel free to change it when setting up phpgroupware on a clean database,
** but you must not change it after that point!
** It should be around 30 bytes in length.
- */
+ */
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}';
- /* Uncomment this out and use this for supporting different domains using this single install */
- /* (ignore if you are only supporting a single domain)*/
-/*
- $GLOBALS['phpgw_domain']['domain2.com'] = array (
- 'db_host' => 'localhost',
- 'db_name' => 'phpgw_domain2',
- 'db_user' => 'phpgroupware',
- 'db_pass' => 'their_password',
- 'db_type' => 'mysql',
- 'config_passwd' => 'changeme'
- );
-*/
-
/* If you want phpGroupWare to be cached by proxy servers, uncomment the following */
/* This is NOT recommended, but phpGroupWare should still work fine. */
- if (!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'] == True)
+ if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'] == True)
{
header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
@@ -101,12 +78,12 @@
\**************************************************************************/
define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
- $GLOBALS['phpgw_info']["server"]["versions"]["phpgwapi"] = $setup_info['phpgwapi']['version'];
+ $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
$GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
- $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.20';
+ $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.21';
/* This is a fix for NT */
- if (!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
+ if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
{
include(PHPGW_API_INC . '/functions.inc.php');
include(PHPGW_API_INC . '/xml_functions.inc.php');
@@ -116,4 +93,16 @@
/*
Leave off the final php closing tag, some editors will add
a \n or space after which will mess up cookies later on
- */
+ */
+ $GLOBALS['phpgw_domain']['{DB_DOMAIN}'] = array (
+ 'db_host' => '{DB_HOST}',
+ 'db_name' => '{DB_NAME}',
+ 'db_user' => '{DB_USER}',
+ 'db_pass' => '{DB_PASS}',
+ // Look at the README file
+ 'db_type' => '{DB_TYPE}',
+ // This will limit who is allowed to make configuration modifications
+ 'config_passwd' => '{CONFIG_PASS}'
+ );
+
+
diff --git a/phpgwapi/inc/class.setup_html.inc.php b/phpgwapi/inc/class.setup_html.inc.php
index 0ce05e43c8..594d812e74 100644
--- a/phpgwapi/inc/class.setup_html.inc.php
+++ b/phpgwapi/inc/class.setup_html.inc.php
@@ -23,8 +23,27 @@
function generate_header()
{
$GLOBALS['header_template']->set_file(array('header' => 'header.inc.php.template'));
+ $GLOBALS['header_template']->set_block('header','domain','domain');
$var = Array();
+ @reset($GLOBALS['HTTP_POST_VARS']['domains']);
+ while(list($k,$v) = @each($GLOBALS['HTTP_POST_VARS']['domains']))
+ {
+ if(isset($GLOBALS['HTTP_POST_VARS']['deletedomain'][$v]))
+ {
+ continue;
+ }
+ $dom = $GLOBALS['HTTP_POST_VARS']["setting_$v"];
+ $GLOBALS['header_template']->set_var('DB_DOMAIN',$v);
+ while(list($x,$y) = @each($dom))
+ {
+ $GLOBALS['header_template']->set_var(strtoupper($x),$y);
+ }
+ $GLOBALS['header_template']->fp('domains','domain',True);
+ }
+
+ $GLOBALS['header_template']->set_var('domain','');
+
while(list($k,$v) = @each($GLOBALS['HTTP_POST_VARS']['setting']))
{
$var[strtoupper($k)] = $v;
diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php
index 4c4627f381..7f7e2f1abb 100755
--- a/phpgwapi/setup/setup.inc.php
+++ b/phpgwapi/setup/setup.inc.php
@@ -15,7 +15,7 @@
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
$setup_info['phpgwapi']['version'] = '0.9.15.002';
- $setup_info['phpgwapi']['versions']['current_header'] = '1.20';
+ $setup_info['phpgwapi']['versions']['current_header'] = '1.21';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
diff --git a/setup/lang/newheaderlangs b/setup/lang/newheaderlangs
index d4d9d8b69d..4ba64d3b33 100644
--- a/setup/lang/newheaderlangs
+++ b/setup/lang/newheaderlangs
@@ -1,3 +1,4 @@
+add a domain setup en Add a domain
admin password to header manager setup en Admin password to header manager
after retrieving the file, put it into place as the header.inc.php. then, click "continue". setup en After retrieving the file, put it into place as the header.inc.php. Then, click "continue".
analysis setup en Analysis
@@ -17,10 +18,14 @@ edit your existing header.inc.php setup en Edit your existing header.inc.php
edit your header.inc.php setup en Edit your header.inc.php
enable mcrypt setup en Enable MCrypt
found existing configuration file. loading settings from the file... setup en Found existing configuration file. Loading settings from the file...
+hostname/ip of database server setup en Hostname/IP of database server
importing old settings into the new format.... setup en Importing old settings into the new format....
include root (this should be the same as server root unless you know what you are doing) setup en Include Root (this should be the same as Server Root unless you know what you are doing)
mcrypt initialization vector setup en MCrypt initialization vector
mcrypt version setup en MCrypt version
+name of database setup en Name of database
+name of db user phpGroupWare uses to connect setup en Name of db user phpGroupWare uses to connect
+new setup en New
no microsoft sql server support found. disabling setup en No Microsoft SQL Server support found. Disabling
no mysql support found. disabling setup en No MySQL support found. Disabling
no oracle-db support found. disabling setup en No Oracle-DB support found. Disabling
@@ -29,6 +34,7 @@ no xml support found. disabling setup en No XML support found. Disabling
now guessing better values for defaults... setup en Now guessing better values for defaults...
or setup en or
password needed for configuration setup en Password needed for configuration
+password of db user setup en Password of db user
persistent connections setup en Persistent connections
please check read/write permissions on directories, or back up and use another option. setup en Please check read/write permissions on directories, or back up and use another option.
sample configuration not found. using built in defaults setup en Sample configuration not found. using built in defaults
@@ -51,11 +57,11 @@ you appear to have oracle support enabled setup en You appear to have Oracle sup
you appear to have oracle v8 (oci) support enabled setup en You appear to have Oracle V8 (OCI) support enabled
you appear to have postgres-db support enabled setup en You appear to have Postgres-DB support enabled
you appear to have xml support enabled setup en You appear to have XML support enabled
-you didn't enter a config password setup en You didn't enter a config password
+you didn't enter a config password for domain x setup en You didn't enter a config password for domain %1
you didn't enter a header admin password setup en You didn't enter a header admin password
you have not created your header.inc.php yet! you can create it now. setup en You have not created your header.inc.php yet! You can create it now.
-your header admin password is not set. please set it now! setup en Your header admin password is NOT set. Please set it now!
-your header.inc.php needs upgrading. setup en Your header.inc.php needs upgrading.
-your header.inc.php needs upgrading.
if you are using virtual domain support, this will not copy those domains over. you will need to do this manually, make backups! setup en Your header.inc.php needs upgrading.
If you are using virtual domain support, this will NOT copy those domains over. You will need to do this manually, MAKE BACKUPS!
you're using an old configuration file format... setup en You're using an old configuration file format...
you're using an old header.inc.php version... setup en You're using an old header.inc.php version...
+your header admin password is not set. please set it now! setup en Your header admin password is NOT set. Please set it now!
+your header.inc.php needs upgrading. setup en Your header.inc.php needs upgrading.
+your header.inc.php needs upgrading.
make backups! setup en Your header.inc.php needs upgrading.
MAKE BACKUPS!
diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang
index 953e40a887..ccabc2cdb0 100644
--- a/setup/lang/phpgw_en.lang
+++ b/setup/lang/phpgw_en.lang
@@ -1,6 +1,7 @@
(account deletion in SQL Only) setup en (account deletion in SQL Only)
Import has been completed! Click here to return to setup
setup en
Import has been completed! Click here to return to setup
actions setup en Actions
+add a domain setup en Add a domain
add auto-created users to this group ('Default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.)
admin first name setup en Admin first name
admin last name setup en Admin last name
@@ -108,6 +109,7 @@ has a version mismatch setup en has a version mismatch
hooks deregistered setup en hooks deregistered
hooks registered setup en hooks registered
host information setup en Host information
+hostname/ip of database server setup en Hostname/IP of database server
however, the application is otherwise installed setup en However, the application is otherwise installed
if no ACL records for user or any group the user is a member of setup en If no ACL records for user or any group the user is a member of
if the application has no defined tables, selecting upgrade should remedy the problem setup en If the application has no defined tables, selecting upgrade should remedy the problem
@@ -153,7 +155,10 @@ minimum account id (e.g. 500 or 100, etc.) setup en Minimum account id (e.g. 500
modify an existing ldap account store for use with phpgroupware (for a new install using ldap accounts) setup en Modify an existing LDAP account store for use with phpGroupWare (for a new install using LDAP accounts)
multi-language support setup setup en Multi-Language support setup
mysqlinstr setup en Instructions for creating the database in MySQL: Login to mysql - [user@server user]# mysql -u root -p Create the empty database and grant user permissions - mysql> create database phpgroupware; mysql> grant all on phpgroupware.* to phpgroupware@localhost identified by 'password';
+name of database setup en Name of database
+name of db user phpGroupWare uses to connect setup en Name of db user phpGroupWare uses to connect
never setup en never
+new setup en New
no setup en No
no algorithms available setup en no algorithms available
no microsoft sql server support found. disabling setup en No Microsoft SQL Server support found. Disabling
@@ -175,6 +180,7 @@ only add languages that are not in the database already setup en Only add langua
only add new phrases setup en Only add new phrases
or setup en or
password needed for configuration setup en Password needed for configuration
+password of db user setup en Password of db user
passwords did not match, please re-enter setup en Passwords did not match, please re-enter
path information setup en Path information
persistent connections setup en Persistent connections
@@ -283,7 +289,7 @@ you appear to have oracle v8 (oci) support enabled setup en You appear to have O
you appear to have postgres-db support enabled setup en You appear to have Postgres-DB support enabled
you appear to have xml support enabled setup en You appear to have XML support enabled
you are ready for this stage, but this stage is not yet written. setup en You are ready for this stage, but this stage is not yet written.
-you didn't enter a config password setup en You didn't enter a config password
+you didn't enter a config password for domain x setup en You didn't enter a config password for domain %1
you didn't enter a header admin password setup en You didn't enter a header admin password
you do not have any languages installed. please install one now setup en You do not have any languages installed. Please install one now
you have not created your header.inc.php yet! you can create it now. setup en You have not created your header.inc.php yet! You can create it now.
@@ -297,7 +303,7 @@ your database does not exist setup en Your database does not exist
your database is working, but you dont have any applications installed setup en Your database is working, but you dont have any applications installed
your header admin password is not set. please set it now! setup en Your header admin password is NOT set. Please set it now!
your header.inc.php needs upgrading. setup en Your header.inc.php needs upgrading.
-your header.inc.php needs upgrading.
if you are using virtual domain support, this will not copy those domains over. you will need to do this manually, make backups! setup en Your header.inc.php needs upgrading.
If you are using virtual domain support, this will NOT copy those domains over. You will need to do this manually, MAKE BACKUPS!
+your header.inc.php needs upgrading.
make backups! setup en Your header.inc.php needs upgrading.
MAKE BACKUPS!
your tables are current setup en Your tables are current
your tables may be altered and you may lose data setup en Your tables may be altered and you may lose data.
your tables will be dropped and you will lose data setup en Your tables will be dropped and you will lose data !!
diff --git a/setup/manageheader.php b/setup/manageheader.php
index e3899e4ae2..9020f20e5f 100644
--- a/setup/manageheader.php
+++ b/setup/manageheader.php
@@ -26,18 +26,32 @@
unset($setup_info);
#include('../version.inc.php');
+ if($GLOBALS['HTTP_POST_VARS']['adddomain'])
+ {
+ }
+
function check_form_values()
{
- if (! $GLOBALS['HTTP_POST_VARS']['setting']['config_pass'])
+ @reset($GLOBALS['HTTP_POST_VARS']['domains']);
+ while(list($k,$v) = @each($GLOBALS['HTTP_POST_VARS']['domains']))
{
- $errors .= ' ' . lang("You didn't enter a config password");
+ if(isset($GLOBALS['HTTP_POST_VARS']['deletedomain'][$v]))
+ {
+ continue;
+ }
+ $dom = $GLOBALS['HTTP_POST_VARS']["setting_$v"];
+ if(!$dom['config_pass'])
+ {
+ $errors .= ' ' . lang("You didn't enter a config password for domain x",$v);
+ }
}
- if (! $GLOBALS['HTTP_POST_VARS']['setting']['HEADER_ADMIN_PASSWORD'])
+
+ if(!$GLOBALS['HTTP_POST_VARS']['setting']['HEADER_ADMIN_PASSWORD'])
{
$errors .= ' ' . lang("You didn't enter a header admin password");
}
- if ($errors)
+ if($errors)
{
$GLOBALS['phpgw_setup']->html->show_header('Error',True);
echo $errors;
@@ -61,6 +75,7 @@
));
$setup_tpl->set_block('T_login_stage_header','B_multi_domain','V_multi_domain');
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
+ $setup_tpl->set_block('T_setup_manage','domain','domain');
/* Detect current mode */
switch($GLOBALS['phpgw_info']['setup']['stage']['header'])
@@ -75,7 +90,7 @@
break;
case '3':
$GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Your header.inc.php needs upgrading.');
- $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.
If you are using virtual domain support, this will NOT copy those domains over. You will need to do this manually, MAKE BACKUPS!');
+ $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.