diff options
author | gweltas <gweltas@piwigo.org> | 2004-01-11 23:40:39 +0000 |
---|---|---|
committer | gweltas <gweltas@piwigo.org> | 2004-01-11 23:40:39 +0000 |
commit | e1b59cb0a83e8b6cff7b05ea18cd8cdd985a9af7 (patch) | |
tree | fc9212377cc1e9f055c1b34f9f26808d5ab53bf9 /admin/install.php | |
parent | 298077dff661711fe55694f5e31931246e483495 (diff) |
Corrections de quelques warnings php.
git-svn-id: http://piwigo.org/svn/branches/release-1_3@274 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/install.php')
-rw-r--r-- | admin/install.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/admin/install.php b/admin/install.php index 3b5a4619f..d8b641208 100644 --- a/admin/install.php +++ b/admin/install.php @@ -18,7 +18,7 @@ ***************************************************************************/ //-------------------------------------------------------------------- includes -define( PREFIX_INCLUDE, '.' ); +define( 'PREFIX_INCLUDE', '.' ); include( '../include/vtemplate.class.php' ); include( '../include/functions.inc.php' ); //----------------------------------------------------- template initialization @@ -45,7 +45,7 @@ if ( isset( $_GET['language'] ) ) $vtp->setGlobalVar( $handle, 'language', $_GET['language'] ); } //---------------------- Step 1 : connection informations, write of config file -if ( $_GET['step'] == 1 ) +if ( isset($_GET['step']) && $_GET['step'] == 1 ) { $errors = array(); $infos = array(); @@ -150,9 +150,11 @@ if ( $_GET['step'] == 1 ) else $vtp->setVar( $handle, 'step1.f_host', $_POST['cfgHote'] ); // user - $vtp->setVar( $handle, 'step1.f_user', $_POST['cfgUser'] ); + if ( isset( $_POST['cfgUser'] ) ) + $vtp->setVar( $handle, 'step1.f_user', $_POST['cfgUser'] ); // base - $vtp->setVar( $handle, 'step1.f_base', $_POST['cfgBase'] ); + if ( isset( $_POST['cfgBase'] ) ) + $vtp->setVar( $handle, 'step1.f_base', $_POST['cfgBase'] ); // prefixeTable if ( !isset( $_POST['prefixeTable'] ) ) $vtp->setVar( $handle, 'step1.f_prefixeTable', 'phpwebgallery_' ); @@ -163,7 +165,7 @@ if ( $_GET['step'] == 1 ) } } //------------------------------------- Step 2 : creation of tables in database -else if ( $_GET['step'] == 2 ) +else if ( isset($_GET['step']) && $_GET['step'] == 2 ) { $errors = array(); $infos = array(); @@ -267,7 +269,9 @@ else if ( $_GET['step'] == 2 ) if ( !isset( $_POST['submit'] ) or sizeof( $errors ) > 0 ) { $vtp->addSession( $handle, 'step2' ); + if ( isset( $_POST['webmaster'] )) $vtp->setVar( $handle, 'step2.f_webmaster', $_POST['webmaster'] ); + if ( isset( $_POST['mail_webmaster'] )) $vtp->setVar( $handle, 'step2.f_mail_webmaster', $_POST['mail_webmaster']); $vtp->closeSession( $handle, 'step2' ); } |