From d92002f922b9b10fc394c49572f53927c62430f2 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sat, 24 Jan 2004 22:55:02 +0000 Subject: - Php Warnings correction (file not found) - feature 5 : using same mail address for webmaster and initial admin git-svn-id: http://piwigo.org/svn/branches/release-1_3@317 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/install.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'admin/install.php') diff --git a/admin/install.php b/admin/install.php index d8b641208..7175c81c2 100644 --- a/admin/install.php +++ b/admin/install.php @@ -73,7 +73,9 @@ if ( isset($_GET['step']) && $_GET['step'] == 1 ) { array_push( $errors, $lang['step1_err_server'] ); } - + + $config_file = '../include/mysql.inc.php'; + if ( count( $errors ) == 0 ) { $file_content = ""; // writting the configuration file - if ( $fp = @fopen( '../include/mysql.inc.php', 'a+' ) ) + if ( $fp = @fopen( $config_file, 'a+' ) ) { fwrite( $fp, $file_content ); fclose( $fp ); @@ -93,7 +95,7 @@ if ( isset($_GET['step']) && $_GET['step'] == 1 ) $cfgUser = ''; $cfgPassword = ''; $cfgBase = ''; - include( '../include/mysql.inc.php' ); + if ( is_file( $config_file ) ) include( $config_file ); $file_OK = false; if ( @mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) ) { @@ -239,9 +241,10 @@ else if ( isset($_GET['step']) && $_GET['step'] == 2 ) // webmaster admin user $query = 'INSERT INTO '.$prefixeTable.'users'; - $query.= ' (id,username,password,status,language) VALUES '; + $query.= ' (id,username,password,status,language,mail_address) VALUES '; $query.= "(1,'".$webmaster."','".md5( $_POST['pwdWebmaster'] )."'"; - $query.= ",'admin','".$_GET['language']."')"; + $query.= ",'admin','".$_GET['language']."'"; + $query.= ",'".$_POST['mail_webmaster']."')"; $query.= ';'; mysql_query($query); -- cgit v1.2.3