From: Evan Prodromou Date: Wed, 1 Jun 2011 14:53:46 +0000 (-0400) Subject: allow setting some initial tags on a new network X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7f1a30dc40ac772247425a49498d7f5d4550e01f;p=quix0rs-gnu-social.git allow setting some initial tags on a new network --- diff --git a/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php b/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php index b2042abe94..efa7784955 100644 --- a/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php +++ b/plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php @@ -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; } diff --git a/scripts/setup.cfg.sample b/scripts/setup.cfg.sample index 049cd3e859..3296bbe043 100644 --- a/scripts/setup.cfg.sample +++ b/scripts/setup.cfg.sample @@ -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