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 | |
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')
-rw-r--r-- | admin/admin.php | 1 | ||||
-rw-r--r-- | admin/include/isadmin.inc.php | 2 | ||||
-rw-r--r-- | admin/install.php | 14 |
3 files changed, 11 insertions, 6 deletions
diff --git a/admin/admin.php b/admin/admin.php index 66608a74d..fbdb590ae 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -35,6 +35,7 @@ if ( is_file( './install.php' ) ) //--------------------------------------- validating page and creation of title $page_valide = false; $title = ''; +if (isset( $_GET['page'] )) switch ( $_GET['page'] ) { case 'user_list': diff --git a/admin/include/isadmin.inc.php b/admin/include/isadmin.inc.php index d6f8c2cc5..e548d56bd 100644 --- a/admin/include/isadmin.inc.php +++ b/admin/include/isadmin.inc.php @@ -16,7 +16,7 @@ * the Free Software Foundation; * * * ***************************************************************************/ -define( PREFIX_INCLUDE, '.' ); +define( 'PREFIX_INCLUDE', '.' ); include_once( '../include/config.inc.php' ); include_once( '../include/user.inc.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' ); } |