diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-02-15 15:20:46 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-02-15 15:20:46 +0000 |
commit | a210406591f6a97d9f3d90df0dd375fcca3571f4 (patch) | |
tree | 5e69ba449395f96120e80e2cafc69a7f8a21ec47 | |
parent | a06ecffa834ac26fd4e3d353c8216c9ee3525fca (diff) | |
download | elgg-a210406591f6a97d9f3d90df0dd375fcca3571f4.tar.gz elgg-a210406591f6a97d9f3d90df0dd375fcca3571f4.tar.bz2 |
Added the concept of a site_id to msot of the database tables. Also some extra installation stuff.
git-svn-id: https://code.elgg.org/elgg/trunk@43 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/schema/mysql.sql | 26 | ||||
-rw-r--r-- | engine/start.php | 5 | ||||
-rw-r--r-- | install.php | 4 |
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
|