diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-01-24 22:55:02 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-01-24 22:55:02 +0000 |
commit | d92002f922b9b10fc394c49572f53927c62430f2 (patch) | |
tree | a215e96d380d02bc34f817f93cb8185481a04d38 /admin | |
parent | 8dae2c5cb2023f461ea8f012850d3e791d4c0bab (diff) |
- 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
Diffstat (limited to 'admin')
-rw-r--r-- | admin/install.php | 13 |
1 files changed, 8 insertions, 5 deletions
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 = "<?php"; @@ -84,7 +86,7 @@ if ( isset($_GET['step']) && $_GET['step'] == 1 ) $file_content.= "\n\$prefixeTable = '".$_POST['prefixeTable']."';"; $file_content.= "\n?>"; // 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); |