From e1b59cb0a83e8b6cff7b05ea18cd8cdd985a9af7 Mon Sep 17 00:00:00 2001 From: gweltas Date: Sun, 11 Jan 2004 23:40:39 +0000 Subject: Corrections de quelques warnings php. git-svn-id: http://piwigo.org/svn/branches/release-1_3@274 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/install.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'admin/install.php') 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' ); } -- cgit v1.2.3