aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/schema/mysql.sql26
-rw-r--r--engine/start.php5
-rw-r--r--install.php4
3 files changed, 28 insertions, 7 deletions
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 9c0428ce7..2882d2c7a 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -17,6 +17,7 @@
CREATE TABLE `prefix_access_groups` (
`id` int(11) NOT NULL,
`name` varchar(16) NOT NULL,
+ `site_id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=MyISAM ;
@@ -25,10 +26,10 @@ CREATE TABLE `prefix_access_groups` (
-- Dumping data for table `access_groups`
--
-INSERT INTO `prefix_access_groups` (`id`, `name`) VALUES
-(0, 'PRIVATE'),
-(1, 'LOGGED_IN'),
-(2, 'PUBLIC');
+INSERT INTO `prefix_access_groups` (`id`, `name`, `site_id`) VALUES
+(0, 'PRIVATE', 0),
+(1, 'LOGGED_IN', 0),
+(2, 'PUBLIC', 0);
-- --------------------------------------------------------
@@ -53,6 +54,7 @@ CREATE TABLE `prefix_configuration` (
`id` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`value` text NOT NULL,
+ `site_id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=MyISAM ;
@@ -94,7 +96,7 @@ CREATE TABLE `prefix_metadata_value` (
CREATE TABLE `prefix_objects` (
`id` int(11) NOT NULL auto_increment,
`owner_id` int(11) NOT NULL,
- `site_id` int(11) NOT NULL,
+ `site_id` int(11) NOT NULL default '0',
`type_id` int(11) NOT NULL,
`title` text NOT NULL,
`description` text NOT NULL,
@@ -116,6 +118,7 @@ CREATE TABLE `prefix_object_metadata` (
`metadata_type_id` int(11) NOT NULL,
`value_id` int(11) NOT NULL,
`access_id` int(11) NOT NULL,
+ `site_id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `object_id` (`object_id`,`metadata_type_id`,`value_id`),
KEY `access_id` (`access_id`)
@@ -175,3 +178,16 @@ CREATE TABLE `prefix_user_metadata` (
KEY `user_id` (`user_id`,`metadata_type_id`,`value_id`),
KEY `access_id` (`access_id`)
) ENGINE=MyISAM ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sites`
+--
+
+CREATE TABLE `prefix_sites` (
+ `id` int(11) NOT NULL auto_increment,
+ `name` text NOT NULL,
+ `domain` text NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM ; \ No newline at end of file
diff --git a/engine/start.php b/engine/start.php
index a0ca5d718..fd61dbd6a 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -96,5 +96,10 @@
// Trigger events
trigger_event('init', 'system');
+
+ // Forward if we haven't been installed
+ if ((!is_installed() || !is_db_installed()) && !substr_count($_SERVER["PHP_SELF"],"install.php")) {
+ forward("install.php");
+ }
?> \ No newline at end of file
diff --git a/install.php b/install.php
index 3be2b3c78..35d4febd6 100644
--- a/install.php
+++ b/install.php
@@ -20,8 +20,8 @@
/**
* If we're installed, go back to the homepage
*/
- if (is_installed())
- forward();
+ if (is_installed() && is_db_installed())
+ forward("index.php");
/**
* Install the database