diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-13 09:00:22 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-05-13 09:00:22 +0000 |
commit | dccdeba838129a5a3805c7669ec0a6328269f738 (patch) | |
tree | c0be99c6f36c6d32330ae304a3d13e84a783dfb4 /lib/install.php | |
parent | 1e9f582cf1dba653f45bbc5835fa662a3c163e69 (diff) | |
download | ampache-dccdeba838129a5a3805c7669ec0a6328269f738.tar.gz ampache-dccdeba838129a5a3805c7669ec0a6328269f738.tar.bz2 ampache-dccdeba838129a5a3805c7669ec0a6328269f738.zip |
first step of installer works, will finish later tomorrow morning
Diffstat (limited to 'lib/install.php')
-rw-r--r-- | lib/install.php | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/lib/install.php b/lib/install.php index 0efdeaa7..4bf47b11 100644 --- a/lib/install.php +++ b/lib/install.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -19,17 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/*! - @header Install docuement - @discussion this document contains the functions needed to see if - ampache needs to be installed -*/ -/*! - @function split_sql - @discussion splits up a standard SQL dump file into distinct - sql queryies -*/ +/** + * split_sql + * splits up a standard SQL dump file into distinct + * sql queryies + */ function split_sql($sql) { $sql = trim($sql); $sql = ereg_replace("\n#[^\n]*\n", "\n", $sql); @@ -59,13 +54,12 @@ function split_sql($sql) { return($ret); } // split_sql -/*! - @function install_check_status() - @discussion this function checks to see if we actually - still need to install ampache. This function is - very important, we don't want to reinstall over top - of an existing install -*/ +/** + * install_check_status + * this function checks to see if we actually + * still need to install ampache. This function is + * very important, we don't want to reinstall over top of an existing install + */ function install_check_status($configfile) { /* @@ -81,11 +75,10 @@ function install_check_status($configfile) { Check and see if they've got _any_ account if they don't then they're cool */ - $results = read_config($GLOBALS['configfile'], 0, 0); - $dbh = check_database($results['local_host'],$results['local_username'],$results['local_pass']); + $results = parse_ini_file($GLOBALS['configfile']); + $dbh = check_database($results['database_hostname'],$results['database_username'],$results['database_password']); if (is_resource($dbh)) { - $db_select = mysql_select_db($results['local_db'],$dbh); $sql = "SELECT * FROM user"; $db_results = @mysql_query($sql, $dbh); @@ -94,8 +87,6 @@ function install_check_status($configfile) { } } - - /* Defaut to no */ return false; |