$this->sitehost = $config['DBHOST'];
$this->sitedb = $config['SITEDB'];
+ $tagstr = $config['TAGS'];
+
+ if (!empty($tagstr)) {
+ $this->tags = preg_split('/[\s,]+/', $tagstr);
+ } else {
+ $this->tags = array();
+ }
+
// Explicitly empty
$this->adminNick = null;
throw new ServerException("Created {$this->nickname} status_network and could not find it again.");
}
- $sn->setTags(array('domain='.$this->domain));
+ // Set default tags
+
+ $tags = $this->tags;
+
+ // Add domain tag
+
+ $tags[] = 'domain='.$this->domain;
+
+ $sn->setTags($tags);
$this->sn = $sn;
}
StatusNet::switchSite($this->nickname);
+ // We need to initialize the schema_version stuff to make later setup easier
+
+ $schema = array();
+ require INSTALLDIR.'/db/core.php';
+ $tableDefs = $schema;
+
+ $schema = Schema::get();
+ $schemaUpdater = new SchemaUpdater($schema);
+
+ foreach ($tableDefs as $table => $def) {
+ $schemaUpdater->register($table, $def);
+ }
+
+ $schemaUpdater->checkSchema();
+
Event::handle('CheckSchema');
}