Commit 7f1a30dc authored by Evan Prodromou's avatar Evan Prodromou

allow setting some initial tags on a new network

parent a4750b44
......@@ -120,6 +120,14 @@ class DomainStatusNetworkInstaller extends Installer
$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;
......@@ -185,7 +193,15 @@ class DomainStatusNetworkInstaller extends Installer
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;
}
......
......@@ -18,3 +18,4 @@ export MAILSUBJECT="Your new StatusNet site"
export POSTINSTALL=/etc/statusnet/morestuff.sh
export WEBUSER=www-data
export WEBGROUP=www-data
export TAGS=tag1,tag2,tag3
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment