]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
allow setting some initial tags on a new network
authorEvan Prodromou <evan@status.net>
Wed, 1 Jun 2011 14:53:46 +0000 (10:53 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 1 Jun 2011 14:53:46 +0000 (10:53 -0400)
plugins/DomainStatusNetwork/domainstatusnetworkinstaller.php
scripts/setup.cfg.sample

index b2042abe947630542cd227665526dde0183ece42..efa77849551ad7896b19e55525ba0e2d1662dbd3 100644 (file)
@@ -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;
     }
index 049cd3e8595cc9f63ffc62d99924f16c24ed443f..3296bbe043425f7b859047340efe51ec1dbc9457 100644 (file)
@@ -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