Added already-installed check to cli-core
authorDan
Wed, 14 Jan 2009 23:29:14 -0500
changeset 813 3fe11491f512
parent 812 68060328e9c6
child 814 7664d7d38a4a
Added already-installed check to cli-core
install/includes/cli-core.php
--- a/install/includes/cli-core.php	Wed Jan 14 20:33:05 2009 -0500
+++ b/install/includes/cli-core.php	Wed Jan 14 23:29:14 2009 -0500
@@ -30,6 +30,14 @@
   exit;
 }
 
+if ( defined('ENANO_INSTALLED') )
+{
+  // start up the API to let it error out if something's wrong
+  require(ENANO_ROOT . '/includes/common.php');
+  
+  installer_fail('Enano is already installed. Uninstall it by deleting config.php and creating a blank file called config.new.php.');
+}
+
 // parse command line args
 foreach ( array('silent', 'driver', 'dbhost', 'dbuser', 'dbpasswd', 'dbname', 'db_prefix', 'user', 'pass', 'email', 'sitename', 'sitedesc', 'copyright', 'urlscheme', 'lang_id', 'scriptpath') as $var )
 {